CbmRoot
Loading...
Searching...
No Matches
CbmStsSensor.h
Go to the documentation of this file.
1/* Copyright (C) 2013-2020 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Volker Friese [committer] */
4
13#ifndef CBMSTSSENSOR_H
14#define CBMSTSSENSOR_H 1
15#include "CbmStsAddress.h" // for GetElementId, kStsSensor
16#include "CbmStsElement.h" // for CbmStsElement
17#include "CbmStsParSensorCond.h" // for CbmStsParSensorCond
18
19#include <Rtypes.h> // for THashConsistencyHolder, ClassDef
20#include <RtypesCore.h> // for Double_t, Int_t, UInt_t, Bool_t, kTRUE
21#include <TString.h> // for TString
22
23#include <string> // for string
24
25class CbmEvent;
26class CbmStsCluster;
27class CbmStsModule;
28class CbmStsParSensor;
29class TClonesArray;
30class TGeoPhysicalNode;
31
43
44public:
50 CbmStsSensor(UInt_t address = 0, TGeoPhysicalNode* node = nullptr, CbmStsElement* mother = nullptr);
51
52
54 virtual ~CbmStsSensor() {};
55
56
61 static UInt_t GetAddressFromName(TString name);
62
63
68
69
74
75
79 TGeoPhysicalNode* GetNode() const { return fNode; }
80
81
85 const CbmStsParSensor* GetParams() const { return fParams; }
86
87
96
97
101 void SetAddress(Int_t address)
102 {
103 fAddress = address;
105 }
106
107
114 void SetConditions(const CbmStsParSensorCond* conditions)
115 {
116 if (!fConditions) fConditions = new CbmStsParSensorCond(*conditions);
117 else
118 *fConditions = *conditions;
119 }
120
121
129 void SetParameters(const CbmStsParSensor* par) { fParams = par; }
130
131
135 void SetNode(TGeoPhysicalNode* node) { fNode = node; }
136
137
139 virtual std::string ToString() const;
140
141
142protected:
143 const CbmStsParSensor* fParams = nullptr;
145
147 CbmStsSensor(const CbmStsSensor&) = delete;
148
151
152
154};
155
156
157#endif
@ kStsSensor
Class characterising one event by a collection of links (indices) to data objects,...
Definition CbmEvent.h:34
Data class for STS clusters.
Class representing an element of the STS setup.
TGeoPhysicalNode * fNode
Pointer to geometry.
Int_t fAddress
Unique element address.
Class representing an instance of a readout unit in the CBM-STS.
Parameters for operating conditions of a STS sensor.
Constructional parameters of a STS sensor.
Class representing an instance of a sensor in the CBM-STS.
const CbmStsParSensorCond * GetConditions() const
Sensor conditions.
const CbmStsParSensor * GetParams() const
Sensor parameters.
virtual std::string ToString() const
String output.
ClassDef(CbmStsSensor, 2)
static UInt_t GetAddressFromName(TString name)
Get the address from the sensor name (static)
CbmStsSensor & operator=(const CbmStsSensor &)=delete
Copy assignment constructor (disabled)
Int_t GetSensorId() const
Sensor Id within the module.
void SetNode(TGeoPhysicalNode *node)
Set the physical node.
void SetConditions(const CbmStsParSensorCond *conditions)
Set the sensor conditions.
CbmStsSensor(UInt_t address=0, TGeoPhysicalNode *node=nullptr, CbmStsElement *mother=nullptr)
const CbmStsParSensor * fParams
Sensor parameters.
void SetAddress(Int_t address)
Set sensor address.
CbmStsModule * GetModule() const
Get mother module.
CbmStsParSensorCond * fConditions
Operating conditions.
void SetParameters(const CbmStsParSensor *par)
Set the sensor parameters.
TGeoPhysicalNode * GetNode() const
CbmStsSensor(const CbmStsSensor &)=delete
Copy constructor (disabled)
virtual ~CbmStsSensor()
uint32_t GetElementId(int32_t address, int32_t level)
Get the index of an element.