BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Reconstruction/MdcPatRec/TrkBase/include/TrkBase/TrkDetElemId.h
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2// File and Version Information:
3// $Id: TrkDetElemId.h,v 1.1.1.1 2005/04/21 06:01:42 zhangy Exp $
4//
5// Description:
6// Class TrkDetElemId
7//
8// Environment:
9// Software developed for BaBar expirment @ SLAC B-Factory
10//
11// Author List:
12// Eric A Charles
13//
14// Copyright Information:
15// Copyright (C) 1998 Univ. Wisconsin-Madsion
16//
17//------------------------------------------------------------------------
18
19#ifndef TRKDETELEMID_HH
20#define TRKDETELEMID_HH
21
22//-------------
23// C Headers --
24//-------------
25extern "C" {}
26
27//---------------
28// C++ Headers --
29//---------------
30
31#include <iostream>
32
33// ---------------------
34// -- Class Interface --
35// ---------------------
36
37class TrkDetElemId {
38
39 //------------------
40 // Static Members --
41 //------------------
42
43public:
44 // Typedefs, consts, and enums
45 enum systemIndex { null = 0, svt = 1, mdc = 2 };
46
47 // functions
48 static int calcValue( const int& id, TrkDetElemId::systemIndex sysInd );
49
50private:
51 static const int svtOffset;
52 static const int mdcOffset;
53 static const int nullElemID;
54
55 //--------------------
56 // Instance Members --
57 //--------------------
58
59public:
60 // Constructors
62
63 // Copy Constructor
65
66 // Destructor
67 virtual ~TrkDetElemId();
68
69 // Operators
70
72
73 bool operator==( const TrkDetElemId& rhs ) const { return elemId() == rhs.elemId(); }
74 bool operator<( const TrkDetElemId& rhs ) const { return elemId() < rhs.elemId(); }
75
76 // Selectors (const)
77 int elemId() const { return calcValue( _id, _sysInd ); };
78
79 const int& systemElemId() const { return _id; }
80
81 const TrkDetElemId::systemIndex& sysInd() const { return _sysInd; }
82
83 void printAll( std::ostream& os = std::cout ) const;
84
85private:
86 // Data members
87 int _id;
89};
90
91std::ostream& operator<<( std::ostream& os, const TrkDetElemId& id );
92
93// Inline implementations
94// #include "TrkDetElemId.icc"
95
96#endif
std::ostream & operator<<(std::ostream &os, const TrkDetElemId &id)
static int calcValue(const int &id, TrkDetElemId::systemIndex sysInd)
TrkDetElemId & operator=(const TrkDetElemId &)
TrkDetElemId(const int &id, TrkDetElemId::systemIndex sysInd)
const TrkDetElemId::systemIndex & sysInd() const
virtual ~TrkDetElemId()
void printAll(std::ostream &os=std::cout) const
static int calcValue(const int &id, TrkDetElemId::systemIndex sysInd)
TrkDetElemId(const TrkDetElemId &)