Go to the documentation of this file.
7 #include <FairLogger.h>
12 #include <TGeoManager.h>
14 #include <TGeoPhysicalNode.h>
39 TGeoPhysicalNode* node,
66 case 0: label =
"U";
break;
67 case 1: label =
"D";
break;
70 SetName(
fMother->GetName() + label);
84 SetName(
fMother->GetName() + label);
92 TString result =
"STS";
95 result += Form(
"_U%02i", unit + 1);
98 result += Form(
"_L%02i", ladder + 1);
101 result += (hladder == 0 ?
"U" :
"D");
104 result += Form(
"_M%02i", module + 1);
107 result += Form(
"_S%02i", sensor + 1);
133 else if (level ==
fLevel + 1)
155 LOG(error) << fName <<
": physical node is not set!";
159 TGeoNode* mNode =
fNode->GetNode();
160 TString mPath =
fNode->GetName();
162 for (Int_t iNode = 0; iNode < mNode->GetNdaughters(); iNode++) {
165 TString dName = mNode->GetDaughter(iNode)->GetName();
167 TString::kIgnoreCase)) {
170 TString dPath = mPath +
"/" + dName;
171 TGeoPhysicalNode* pNode =
new TGeoPhysicalNode(dPath.Data());
199 LOG(info) << setw(10) << right <<
fAddress <<
" " << setw(12) << left
200 << fName <<
" type " << setw(22) << fTitle <<
" path "
201 <<
fNode->GetName() <<
" " <<
fNode->GetTitle();
219 default: LOG(fatal) << fName <<
": Illegal element level " << level;
break;
std::vector< CbmStsElement * > fDaughters
Array of daughters.
CbmStsElement * fMother
Mother element.
static CbmStsSetup * Instance()
const char * GetLevelName(Int_t level) const
virtual void Print(Option_t *opt="") const
Class representing an instance of a readout unit in the CBM-STS.
Int_t GetNofElements(Int_t level) const
Int_t SetElementId(Int_t address, Int_t level, UInt_t newId)
Set the index of an element, leaving the other element levels untouched.
UInt_t GetElementId(Int_t address, Int_t level)
Get the index of an element.
ClassImp(CbmConverterManager) InitStatus CbmConverterManager
CbmStsElement * GetDaughter(Int_t index) const
Int_t GetNofDaughters() const
EStsElementLevel GetLevel() const
virtual void InitDaughters()
Class representing an element of the STS setup.
Int_t fAddress
Unique element address.
EStsElementLevel fLevel
Level in hierarchy.
TGeoPhysicalNode * fNode
Pointer to geometry.
void SetLevel(Int_t level)