CbmRoot
Loading...
Searching...
No Matches
CbmStsParSensor.h
Go to the documentation of this file.
1/* Copyright (C) 2020 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Volker Friese [committer] */
4
10#ifndef CBMSTSPARSENSOR_H
11#define CBMSTSPARSENSOR_H 1
12
13#define NPARAMS 10
14
15#include "CbmStsDefs.h" // for CbmStsSensorClass, CbmStsSensorClass::kDssdS...
16
17#include <Rtypes.h> // for THashConsistencyHolder, ClassDefNV
18#include <RtypesCore.h> // for UInt_t, Float_t, Int_t
19
20#include <array> // for array
21#include <string> // for string
22
43
44public:
51
52
55
56
60 CbmStsSensorClass GetClass() const { return fClass; }
61
62
69 Float_t GetPar(UInt_t index) const;
70
71
78 Int_t GetParInt(UInt_t index) const;
79
80
87 void SetPar(UInt_t index, Float_t value)
88 {
89 if (index < fPar.size()) fPar[index] = value;
90 }
91
92
94 std::string ToString() const;
95
96
97private:
99 std::array<float, NPARAMS> fPar {{0., 0., 0., 0., 0., 0., 0., 0., 0., 0.}};
100
101
103};
104
105#endif /* CBMSTSPARSENSOR_H */
CbmStsSensorClass
Sensor classes.
Definition CbmStsDefs.h:68
Constructional parameters of a STS sensor.
Int_t GetParInt(UInt_t index) const
Get the nearest integer value of a parameter.
CbmStsParSensor(CbmStsSensorClass sClass=CbmStsSensorClass::kDssdStereo)
Constructor.
std::array< float, NPARAMS > fPar
std::string ToString() const
Info to string.
~CbmStsParSensor()
Destructor.
void SetPar(UInt_t index, Float_t value)
Set a parameter.
CbmStsSensorClass GetClass() const
Get the sensor class.
ClassDefNV(CbmStsParSensor, 1)
CbmStsSensorClass fClass
Float_t GetPar(UInt_t index) const
Get a parameter.