BOSS 7.1.2
BESIII Offline Software System
Loading...
Searching...
No Matches
TrkDetElemId Class Reference

#include <TrkDetElemId.h>

Public Types

enum  systemIndex { null =0 , svt =1 , mdc =2 }
 

Public Member Functions

 TrkDetElemId (const int &id, TrkDetElemId::systemIndex sysInd)
 
 TrkDetElemId (const TrkDetElemId &)
 
virtual ~TrkDetElemId ()
 
TrkDetElemIdoperator= (const TrkDetElemId &)
 
bool operator== (const TrkDetElemId &rhs) const
 
bool operator< (const TrkDetElemId &rhs) const
 
int elemId () const
 
const int & systemElemId () const
 
const TrkDetElemId::systemIndexsysInd () const
 
void printAll (std::ostream &os=std::cout) const
 

Static Public Member Functions

static int calcValue (const int &id, TrkDetElemId::systemIndex sysInd)
 

Detailed Description

Definition at line 38 of file TrkDetElemId.h.

Member Enumeration Documentation

◆ systemIndex

Enumerator
null 
svt 
mdc 

Definition at line 47 of file TrkDetElemId.h.

47 { null=0,
48 svt=1,
49 mdc=2 };

Constructor & Destructor Documentation

◆ TrkDetElemId() [1/2]

TrkDetElemId::TrkDetElemId ( const int & id,
TrkDetElemId::systemIndex sysInd )

Definition at line 83 of file TrkDetElemId.cxx.

84 :_id(id),_sysInd(sysInd){
85}
const TrkDetElemId::systemIndex & sysInd() const

◆ TrkDetElemId() [2/2]

TrkDetElemId::TrkDetElemId ( const TrkDetElemId & rhs)

Definition at line 88 of file TrkDetElemId.cxx.

89 :_id(rhs.systemElemId()),_sysInd(rhs.sysInd()){
90}
const int & systemElemId() const

◆ ~TrkDetElemId()

TrkDetElemId::~TrkDetElemId ( )
virtual

Definition at line 96 of file TrkDetElemId.cxx.

96 {
97}

Member Function Documentation

◆ calcValue()

int TrkDetElemId::calcValue ( const int & id,
TrkDetElemId::systemIndex sysInd )
static

Definition at line 59 of file TrkDetElemId.cxx.

60 {
61 int retVal(id);
62 switch (sysInd) {
64 retVal += TrkDetElemId::svtOffset;
65 return retVal;
67 retVal += TrkDetElemId::mdcOffset;
68 return retVal;
69 default:
70 break;
71 }
72 return TrkDetElemId::nullElemID;
73}

Referenced by elemId().

◆ elemId()

int TrkDetElemId::elemId ( ) const
inline

Definition at line 88 of file TrkDetElemId.h.

88 {
89 return calcValue(_id,_sysInd);
90 };
static int calcValue(const int &id, TrkDetElemId::systemIndex sysInd)

Referenced by operator<(), operator==(), and printAll().

◆ operator<()

bool TrkDetElemId::operator< ( const TrkDetElemId & rhs) const
inline

Definition at line 83 of file TrkDetElemId.h.

83 {
84 return elemId() < rhs.elemId();
85 }
int elemId() const

◆ operator=()

TrkDetElemId & TrkDetElemId::operator= ( const TrkDetElemId & rhs)

Definition at line 104 of file TrkDetElemId.cxx.

104 {
105 _id = rhs.systemElemId();
106 _sysInd = rhs.sysInd();
107 return *this;
108}

◆ operator==()

bool TrkDetElemId::operator== ( const TrkDetElemId & rhs) const
inline

Definition at line 80 of file TrkDetElemId.h.

80 {
81 return elemId() == rhs.elemId();
82 }

◆ printAll()

void TrkDetElemId::printAll ( std::ostream & os = std::cout) const

Definition at line 111 of file TrkDetElemId.cxx.

111 {
112 os << _id << ' ' << _sysInd << ' ' << elemId() << endl;
113}

Referenced by TrkExpectedHotSet::printFit().

◆ sysInd()

const TrkDetElemId::systemIndex & TrkDetElemId::sysInd ( ) const
inline

◆ systemElemId()

const int & TrkDetElemId::systemElemId ( ) const
inline

Definition at line 92 of file TrkDetElemId.h.

92 {
93 return _id;
94 }

Referenced by operator=().


The documentation for this class was generated from the following files: