CbmRoot
CbmStsSensor.h
Go to the documentation of this file.
1 
9 #ifndef CBMSTSSENSOR_H
10 #define CBMSTSSENSOR_H 1
11 #include <Rtypes.h> // for THashConsistencyHolder, ClassDef
12 #include <RtypesCore.h> // for Double_t, Int_t, UInt_t, Bool_t, kTRUE
13 #include <TString.h> // for TString
14 
15 #include <string> // for string
16 
17 #include "CbmStsAddress.h" // for GetElementId, kStsSensor
18 #include "CbmStsElement.h" // for CbmStsElement
19 #include "CbmStsParSensorCond.h" // for CbmStsParSensorCond
20 
21 class CbmEvent;
22 class CbmStsCluster;
23 class CbmStsModule;
24 class CbmStsParSensor;
25 class TClonesArray;
26 class TGeoPhysicalNode;
27 
38 class CbmStsSensor : public CbmStsElement {
39 
40 public:
46  CbmStsSensor(UInt_t address = 0,
47  TGeoPhysicalNode* node = nullptr,
48  CbmStsElement* mother = nullptr);
49 
50 
52  virtual ~CbmStsSensor() {};
53 
54 
59  static UInt_t GetAddressFromName(TString name);
60 
61 
65  const CbmStsParSensorCond* GetConditions() const { return fConditions; }
66 
67 
72 
73 
77  TGeoPhysicalNode* GetNode() const { return fNode; }
78 
79 
83  const CbmStsParSensor* GetParams() const { return fParams; }
84 
85 
93  Int_t GetSensorId() const {
95  }
96 
97 
101  void SetAddress(Int_t address) {
102  fAddress = address;
103  fName = CbmStsElement::ConstructName(address, kStsSensor);
104  }
105 
106 
113  void SetConditions(const CbmStsParSensorCond* conditions) {
114  if (!fConditions)
115  fConditions = new CbmStsParSensorCond(*conditions);
116  else
117  *fConditions = *conditions;
118  }
119 
120 
128  void SetParameters(const CbmStsParSensor* par) { fParams = par; }
129 
130 
134  void SetNode(TGeoPhysicalNode* node) { fNode = node; }
135 
136 
138  virtual std::string ToString() const;
139 
140 
141 protected:
142  const CbmStsParSensor* fParams = nullptr;
144 
146  CbmStsSensor(const CbmStsSensor&) = delete;
147 
150 
151 
153 };
154 
155 
156 #endif
CbmStsSensor::operator=
CbmStsSensor & operator=(const CbmStsSensor &)=delete
Copy assignment constructor (disabled)
CbmStsSensor::CbmStsSensor
CbmStsSensor(const CbmStsSensor &)=delete
Copy constructor (disabled)
CbmStsSensor::ClassDef
ClassDef(CbmStsSensor, 2)
CbmStsCluster
Data class for STS clusters.
Definition: CbmStsCluster.h:31
CbmStsSensor::GetAddressFromName
static UInt_t GetAddressFromName(TString name)
Get the address from the sensor name (static)
Definition: CbmStsSensor.cxx:18
CbmStsSensor::ToString
virtual std::string ToString() const
String output.
Definition: CbmStsSensor.cxx:32
CbmStsParSensorCond
Parameters for operating conditions of a STS sensor.
Definition: CbmStsParSensorCond.h:28
CbmStsSensor::SetAddress
void SetAddress(Int_t address)
Set sensor address.
Definition: CbmStsSensor.h:101
CbmStsParSensorCond.h
CbmStsSensor::SetParameters
void SetParameters(const CbmStsParSensor *par)
Set the sensor parameters.
Definition: CbmStsSensor.h:128
CbmStsSensor::fParams
const CbmStsParSensor * fParams
Sensor parameters.
Definition: CbmStsSensor.h:142
CbmStsModule
Class representing an instance of a readout unit in the CBM-STS.
Definition: CbmStsModule.h:31
CbmStsParSensor
Constructional parameters of a STS sensor.
Definition: CbmStsParSensor.h:38
CbmStsElement::ConstructName
void ConstructName()
Definition: CbmStsElement.cxx:54
CbmStsSensor::fConditions
CbmStsParSensorCond * fConditions
Operating conditions.
Definition: CbmStsSensor.h:143
CbmStsAddress::GetElementId
UInt_t GetElementId(Int_t address, Int_t level)
Get the index of an element.
Definition: CbmStsAddress.cxx:180
CbmStsElement.h
CbmStsSensor
Class representing an instance of a sensor in the CBM-STS.
Definition: CbmStsSensor.h:38
CbmStsSensor::GetConditions
const CbmStsParSensorCond * GetConditions() const
Sensor conditions.
Definition: CbmStsSensor.h:65
CbmStsSensor::CbmStsSensor
CbmStsSensor(UInt_t address=0, TGeoPhysicalNode *node=nullptr, CbmStsElement *mother=nullptr)
Definition: CbmStsSensor.cxx:11
CbmStsSensor::GetSensorId
Int_t GetSensorId() const
Sensor Id within the module.
Definition: CbmStsSensor.h:93
CbmStsSensor::GetNode
TGeoPhysicalNode * GetNode() const
Definition: CbmStsSensor.h:77
kStsSensor
@ kStsSensor
Definition: CbmStsAddress.h:22
CbmEvent
Class characterising one event by a collection of links (indices) to data objects,...
Definition: CbmEvent.h:30
CbmStsAddress.h
CbmStsSensor::SetNode
void SetNode(TGeoPhysicalNode *node)
Set the physical node.
Definition: CbmStsSensor.h:134
CbmStsSensor::GetModule
CbmStsModule * GetModule() const
Get mother module.
CbmStsSensor::GetParams
const CbmStsParSensor * GetParams() const
Sensor parameters.
Definition: CbmStsSensor.h:83
CbmStsElement
Class representing an element of the STS setup.
Definition: CbmStsElement.h:32
CbmStsElement::fAddress
Int_t fAddress
Unique element address.
Definition: CbmStsElement.h:124
CbmStsSensor::SetConditions
void SetConditions(const CbmStsParSensorCond *conditions)
Set the sensor conditions.
Definition: CbmStsSensor.h:113
CbmStsElement::fNode
TGeoPhysicalNode * fNode
Pointer to geometry.
Definition: CbmStsElement.h:126
CbmStsSensor::~CbmStsSensor
virtual ~CbmStsSensor()
Definition: CbmStsSensor.h:52