BmnRoot
Loading...
Searching...
No Matches
CbmStsElement.h
Go to the documentation of this file.
1
6#ifndef CBMSTSELEMENT_H
7#define CBMSTSELEMENT_H 1
8
9
10#include <vector>
11#include "TNamed.h"
12#include "CbmStsAddress.h"
13
14class TGeoPhysicalNode;
15
16using namespace std;
17
18
19
31class CbmStsElement : public TNamed
32{
33
34 public:
35
38
39
46 CbmStsElement(const char* name, const char* title,
47 Int_t level, TGeoPhysicalNode* node = NULL);
48
49
51 virtual ~CbmStsElement() { };
52
53
58 virtual void AddDaughter(CbmStsElement* element);
59
60
64 UInt_t GetAddress() const { return fAddress; }
65
66
70 CbmStsElement* GetDaughter(Int_t index) const;
71
72
76 Int_t GetIndex() const {
78 }
79
80
84 StsElementLevel GetLevel() const { return fLevel; }
85
86
90 Int_t GetNofDaughters() const { return fDaughters.size(); }
91
92
94 void InitDaughters();
95
96
98 virtual void Print(Option_t* opt = "") const;
99
100
101
102
103
104 protected:
105
106 UInt_t fAddress;
108 TGeoPhysicalNode* fNode;
109 vector<CbmStsElement*> fDaughters;
110
111
116 void SetLevel(Int_t level);
117
118
119 // --- Prevent usage of copy constructor and assignment operator
122
123
125
126};
127
128#endif /* CBMSTSELEMENT_H */
StsElementLevel
static Int_t GetElementId(UInt_t address, Int_t level)
Class representing an element of the STS setup.
CbmStsElement(const CbmStsElement &)
void SetLevel(Int_t level)
UInt_t GetAddress() const
virtual void AddDaughter(CbmStsElement *element)
StsElementLevel GetLevel() const
UInt_t fAddress
Unique address.
StsElementLevel fLevel
Level in hierarchy.
vector< CbmStsElement * > fDaughters
Array of daughters.
TGeoPhysicalNode * fNode
Pointer to geometry.
virtual ~CbmStsElement()
virtual void Print(Option_t *opt="") const
Int_t GetNofDaughters() const
CbmStsElement & operator=(const CbmStsElement &)
Int_t GetIndex() const
ClassDef(CbmStsElement, 1)
CbmStsElement * GetDaughter(Int_t index) const
STL namespace.