CbmRoot
CbmStsParSetSensorCond.h
Go to the documentation of this file.
1 
7 #ifndef CBMSTSPARSETSENSORCOND_H
8 #define CBMSTSPARSETSENSORCOND_H 1
9 
10 #include <Rtypes.h> // for THashConsistencyHolder, ClassDef
11 #include <RtypesCore.h> // for Double_t, UInt_t, Bool_t, kFALSE
12 
13 #include <FairParGenericSet.h> // for FairParGenericSet
14 
15 #include <map> // for map
16 #include <string> // for string
17 
18 #include "CbmStsParSensorCond.h" // for CbmStsParSensorCond
19 
20 class FairParamList;
21 
30 class CbmStsParSetSensorCond : public FairParGenericSet {
31 
32 public:
38  CbmStsParSetSensorCond(const char* name = "CbmStsParSetSensorCond",
39  const char* title = "STS parameters",
40  const char* context = "Default");
41 
42 
45 
46 
49 
50 
52  virtual ~CbmStsParSetSensorCond();
53 
54 
56  virtual void clear();
57 
58 
63  virtual Bool_t getParams(FairParamList* parList);
64 
65 
70  const CbmStsParSensorCond& GetParSensor(UInt_t address);
71 
72 
76  Bool_t IsSet() const { return (fGlobal || !fParams.empty()); }
77 
78 
81 
82 
85 
86 
91  virtual void putParams(FairParamList* parList);
92 
93 
109  UInt_t ReadParams(const char* fileName);
110 
111 
119  void SetGlobalPar(Double_t vDep,
120  Double_t vBias,
121  Double_t temperature,
122  Double_t cCoupling,
123  Double_t cInterstrip);
124 
125 
129  void SetGlobalPar(const CbmStsParSensorCond& conditions);
130 
131 
133  std::string ToString();
134 
135 
136 private:
143  void Init();
144 
145 
146 private:
149 
151  std::map<UInt_t, CbmStsParSensorCond> fParams {};
152 
153  Bool_t fGlobal = kFALSE;
154  Bool_t fIsInit = kFALSE;
155 
157 };
158 
159 #endif /* CBMSTSPARSETSENSORCOND */
CbmStsParSensorCond
Parameters for operating conditions of a STS sensor.
Definition: CbmStsParSensorCond.h:28
CbmStsParSetSensorCond::~CbmStsParSetSensorCond
virtual ~CbmStsParSetSensorCond()
Destructor.
Definition: CbmStsParSetSensorCond.cxx:32
CbmStsParSetSensorCond::SetGlobalPar
void SetGlobalPar(Double_t vDep, Double_t vBias, Double_t temperature, Double_t cCoupling, Double_t cInterstrip)
Set global conditions (for all sensors)
Definition: CbmStsParSetSensorCond.cxx:182
CbmStsParSetSensorCond::clear
virtual void clear()
Reset all parameters.
Definition: CbmStsParSetSensorCond.cxx:37
CbmStsParSensorCond.h
CbmStsParSetSensorCond::IsSet
Bool_t IsSet() const
Check for parameter set being filled.
Definition: CbmStsParSetSensorCond.h:76
CbmStsParSetSensorCond::operator=
CbmStsParSetSensorCond & operator=(const CbmStsParSetSensorCond &)=delete
Copy assignment operator (disabled)
CbmStsParSetSensorCond::CbmStsParSetSensorCond
CbmStsParSetSensorCond(const CbmStsParSetSensorCond &)=delete
Copy constructor (disabled)
CbmStsParSetSensorCond
Parameters container for CbmStsParSensorCond.
Definition: CbmStsParSetSensorCond.h:30
CbmStsParSetSensorCond::fGlobalParams
CbmStsParSensorCond fGlobalParams
Global parameters, used for all sensors.
Definition: CbmStsParSetSensorCond.h:148
CbmStsParSetSensorCond::CbmStsParSetSensorCond
CbmStsParSetSensorCond(const char *name="CbmStsParSetSensorCond", const char *title="STS parameters", const char *context="Default")
Constructor.
CbmStsParSetSensorCond::ToString
std::string ToString()
Info to string.
Definition: CbmStsParSetSensorCond.cxx:209
CbmStsParSetSensorCond::operator=
CbmStsParSetSensorCond & operator=(CbmStsParSetSensorCond &&)=delete
Move assignment operator (disabled)
CbmStsParSetSensorCond::fGlobal
Bool_t fGlobal
Use global parameters for all sensors.
Definition: CbmStsParSetSensorCond.h:153
CbmStsParSetSensorCond::fIsInit
Bool_t fIsInit
Definition: CbmStsParSetSensorCond.h:154
CbmStsParSetSensorCond::ReadParams
UInt_t ReadParams(const char *fileName)
Read sensor conditions from file.
Definition: CbmStsParSetSensorCond.cxx:96
CbmStsParSetSensorCond::putParams
virtual void putParams(FairParamList *parList)
Writing parameters to ASCII. Abstract in base class.
Definition: CbmStsParSetSensorCond.cxx:89
CbmStsParSetSensorCond::ClassDef
ClassDef(CbmStsParSetSensorCond, 2)
Initialisation flag.
CbmStsParSetSensorCond::fParams
std::map< UInt_t, CbmStsParSensorCond > fParams
Map of parameters. Key is sensor address.
Definition: CbmStsParSetSensorCond.h:151
CbmStsParSetSensorCond::getParams
virtual Bool_t getParams(FairParamList *parList)
Reading parameters from ASCII. Abstract in base class.
Definition: CbmStsParSetSensorCond.cxx:48
CbmStsParSetSensorCond::CbmStsParSetSensorCond
CbmStsParSetSensorCond(CbmStsParSetSensorCond &&)=delete
Move constructor (disabled)
CbmStsParSetSensorCond::GetParSensor
const CbmStsParSensorCond & GetParSensor(UInt_t address)
Get condition parameters of a sensor.
Definition: CbmStsParSetSensorCond.cxx:57
CbmStsParSetSensorCond::Init
void Init()
Initialise all condition parameters.
Definition: CbmStsParSetSensorCond.cxx:74