Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

LCDtowerID Class Reference

#include <LCDtowerID.h>

Collaboration diagram for LCDtowerID:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LCDtowerID ()
 LCDtowerID (int tag)
 ~LCDtowerID ()
unsigned int GetTag () const
void SetTag (unsigned int tagVal)
int GetTheta () const
void SetTheta (int thetaVal)
int GetPhi () const
void SetPhi (int phiVal)
int GetLayer () const
void SetLayer (int layerVal)
int GetSystem () const
void SetSystem (int systemVal)
int GetBarrelEndcap () const
void SetBarrelEndcap (int barrelEndcapVal)
LCDtowerIDoperator= (const LCDtowerID &)
LCDtowerIDoperator= (const int &)

Private Attributes

int m_tag

Constructor & Destructor Documentation

LCDtowerID::LCDtowerID  )  [inline]
 

Definition at line 32 of file LCDtowerID.h.

References m_tag.

00032 : m_tag(0) {}

LCDtowerID::LCDtowerID int  tag  )  [inline]
 

Definition at line 34 of file LCDtowerID.h.

References m_tag.

00034 : m_tag(tag) {}

LCDtowerID::~LCDtowerID  )  [inline]
 

Definition at line 35 of file LCDtowerID.h.

00035 {}


Member Function Documentation

int LCDtowerID::GetBarrelEndcap  )  const
 

Definition at line 54 of file LCDtowerID.cc.

References CAL_V_SYSTEM, and m_tag.

00054                                       {
00055   return ((m_tag >> CAL_V_SYSTEM) & 1);
00056 }

int LCDtowerID::GetLayer  )  const
 

Definition at line 35 of file LCDtowerID.cc.

References CAL_M_LAYER, CAL_V_LAYER, and m_tag.

00035                                {
00036   return ((m_tag >> CAL_V_LAYER) & CAL_M_LAYER);
00037 }

int LCDtowerID::GetPhi  )  const
 

Definition at line 25 of file LCDtowerID.cc.

References CAL_M_PHI, CAL_V_PHI, and m_tag.

00025                              {
00026   return ((m_tag >> CAL_V_PHI) & CAL_M_PHI);
00027 }

int LCDtowerID::GetSystem  )  const
 

Definition at line 45 of file LCDtowerID.cc.

References CAL_M_SYSTEM, CAL_V_SYSTEM, and m_tag.

00045                                 {
00046   return ((m_tag >> CAL_V_SYSTEM) & CAL_M_SYSTEM);
00047 }

unsigned int LCDtowerID::GetTag  )  const [inline]
 

Definition at line 37 of file LCDtowerID.h.

References m_tag.

Referenced by LCDG4EventAction::EndOfEventAction(), and LCDG4CalHit::GetCellID().

00037 { return m_tag  ; }

int LCDtowerID::GetTheta  )  const
 

Definition at line 15 of file LCDtowerID.cc.

References CAL_M_THETA, CAL_V_THETA, and m_tag.

00015                                {
00016   return (m_tag >> CAL_V_THETA) & CAL_M_THETA;
00017 }

LCDtowerID & LCDtowerID::operator= const int &   )  [inline]
 

Definition at line 75 of file LCDtowerID.h.

References m_tag.

00075                                                          {
00076   m_tag = p;
00077   return *this;
00078 }

LCDtowerID & LCDtowerID::operator= const LCDtowerID  )  [inline]
 

Definition at line 70 of file LCDtowerID.h.

References m_tag.

00070                                                                 {
00071   m_tag = p.m_tag;
00072   return *this;
00073 }

void LCDtowerID::SetBarrelEndcap int  barrelEndcapVal  ) 
 

Definition at line 58 of file LCDtowerID.cc.

References CAL_M_SYSTEM, CAL_V_SYSTEM, and m_tag.

00058                                         {
00059   m_tag &= ~(CAL_M_SYSTEM << CAL_V_SYSTEM);
00060   m_tag |= tag << CAL_V_SYSTEM;
00061 }

void LCDtowerID::SetLayer int  layerVal  ) 
 

Definition at line 39 of file LCDtowerID.cc.

References CAL_M_LAYER, CAL_V_LAYER, and m_tag.

Referenced by LCDG4EventAction::EndOfEventAction(), and LCDG4CalHit::GetCellID().

00039                                  {
00040   assert((tag & ~CAL_M_LAYER) == 0);
00041   m_tag &= ~(CAL_M_LAYER << CAL_V_LAYER);
00042   m_tag |= tag << CAL_V_LAYER;
00043 }

void LCDtowerID::SetPhi int  phiVal  ) 
 

Definition at line 29 of file LCDtowerID.cc.

References CAL_M_PHI, CAL_V_PHI, and m_tag.

Referenced by LCDG4EventAction::EndOfEventAction(), and LCDG4CalHit::GetCellID().

00029                                {
00030   assert((tag & ~CAL_M_PHI) == 0);
00031   m_tag &= ~(CAL_M_PHI << CAL_V_PHI);
00032   m_tag |= tag << CAL_V_PHI;
00033 }

void LCDtowerID::SetSystem int  systemVal  ) 
 

Definition at line 49 of file LCDtowerID.cc.

References CAL_M_SYSTEM, CAL_V_SYSTEM, and m_tag.

Referenced by LCDG4EventAction::EndOfEventAction(), and LCDG4CalHit::GetCellID().

00049                                   {
00050   m_tag &= ~(CAL_M_SYSTEM << CAL_V_SYSTEM);
00051   m_tag |= tag << CAL_V_SYSTEM;
00052 }

void LCDtowerID::SetTag unsigned int  tagVal  )  [inline]
 

Definition at line 38 of file LCDtowerID.h.

References m_tag.

00038 { m_tag = tagVal; }

void LCDtowerID::SetTheta int  thetaVal  ) 
 

Definition at line 19 of file LCDtowerID.cc.

References CAL_M_THETA, CAL_V_THETA, and m_tag.

Referenced by LCDG4EventAction::EndOfEventAction(), and LCDG4CalHit::GetCellID().

00019                                  {
00020   assert((tag & ~CAL_M_THETA) == 0);
00021   m_tag &= ~(CAL_M_THETA << CAL_V_THETA);
00022   m_tag |= tag << CAL_V_THETA;
00023 }


Member Data Documentation

int LCDtowerID::m_tag [private]
 

Definition at line 66 of file LCDtowerID.h.

Referenced by GetBarrelEndcap(), GetLayer(), GetPhi(), GetSystem(), GetTag(), GetTheta(), LCDtowerID(), operator=(), SetBarrelEndcap(), SetLayer(), SetPhi(), SetSystem(), SetTag(), and SetTheta().


The documentation for this class was generated from the following files:
Generated on Thu Oct 7 18:45:07 2004 for LCDG4 by doxygen 1.3.4