CbmRoot
CbmRichDigi.h
Go to the documentation of this file.
1 /*
2  * CbmRichDigi.h
3  *
4  * Created on: Dec 17, 2015
5  * Author: slebedev
6  * Modified on: Mar 25, 2019
7  * e.ovcharenko
8  */
9 
10 //TODO implement copy constructor and operator= ?
11 
12 #include <Rtypes.h> // for ClassDef
13 #include <RtypesCore.h> // for Double_t, Int_t
14 
15 #include <string> // for basic_string, string
16 
17 #include "CbmDefs.h" // for kRich
18 
19 #include <boost/serialization/access.hpp>
20 #include <boost/serialization/base_object.hpp>
21 
22 #ifndef DATA_RICH_CBMRICHDIGI_H_
23 #define DATA_RICH_CBMRICHDIGI_H_
24 
25 class CbmRichDigi {
26 public:
27  CbmRichDigi();
28 
29  CbmRichDigi(Int_t addr, Double_t time, Double_t tot);
30 
31  ~CbmRichDigi();
32 
33  /*
34  * \brief Inherited from CbmDigi
35  * @value Unique address of pixel channel
36  */
37  Int_t GetAddress() const { return fAddress; }
38 
45  Double_t GetCharge() const { return fToT; }
46 
50  static const char* GetClassName() { return "CbmRichDigi"; }
51 
56 
57  /*
58  * @brief Time
59  * @value Time [ns]
60  */
61  Double_t GetTime() const { return fTime; }
62 
63  /*
64  * \brief Get Time-over-threshold
65  * @value Time-over-threshold, pulse width [ns]
66  */
67  Double_t GetToT() const { return fToT; }
68 
69  /*
70  * \brief Set pixel Address
71  */
72  void SetAddress(Int_t address) { fAddress = address; }
73 
74  /*
75  * \brief Set pixel Address
76  */
77  void SetTime(Double_t time) { fTime = time; }
78 
79 
80  std::string ToString() const { return std::string {""}; }
81 
82 private:
86  Int_t fAddress;
87 
91  Double_t fTime;
92 
96  Double_t fToT;
97 
100  template<class Archive>
101  void serialize(Archive& ar, const unsigned int /*version*/) {
102  ar& fAddress;
103  ar& fTime;
104  ar& fToT;
105  }
106 
108 };
109 
110 #endif /* DATA_RICH_CBMRICHDIGI_H_ */
CbmRichDigi::GetClassName
static const char * GetClassName()
Class name (static)
Definition: CbmRichDigi.h:50
CbmRichDigi::fToT
Double_t fToT
Time-over-threshold, pulse width.
Definition: CbmRichDigi.h:96
CbmRichDigi::fTime
Double_t fTime
Leading (rising) edge time.
Definition: CbmRichDigi.h:91
CbmRichDigi
Definition: CbmRichDigi.h:25
ECbmModuleId
ECbmModuleId
Definition: CbmDefs.h:33
CbmRichDigi::fAddress
Int_t fAddress
Unique pixel address.
Definition: CbmRichDigi.h:86
CbmRichDigi::~CbmRichDigi
~CbmRichDigi()
Definition: CbmRichDigi.cxx:19
CbmRichDigi::GetTime
Double_t GetTime() const
Definition: CbmRichDigi.h:61
CbmRichDigi::ClassDefNV
ClassDefNV(CbmRichDigi, 3)
CbmRichDigi::access
friend class boost::serialization::access
BOOST serialization interface.
Definition: CbmRichDigi.h:99
CbmRichDigi::GetSystem
static ECbmModuleId GetSystem()
System identifier.
Definition: CbmRichDigi.h:55
CbmRichDigi::serialize
void serialize(Archive &ar, const unsigned int)
Definition: CbmRichDigi.h:101
ECbmModuleId::kRich
@ kRich
Ring-Imaging Cherenkov Detector.
CbmRichDigi::CbmRichDigi
CbmRichDigi()
Definition: CbmRichDigi.cxx:12
CbmRichDigi::SetTime
void SetTime(Double_t time)
Definition: CbmRichDigi.h:77
CbmRichDigi::GetAddress
Int_t GetAddress() const
Definition: CbmRichDigi.h:37
CbmRichDigi::GetCharge
Double_t GetCharge() const
Charge.
Definition: CbmRichDigi.h:45
CbmRichDigi::GetToT
Double_t GetToT() const
Definition: CbmRichDigi.h:67
CbmRichDigi::ToString
std::string ToString() const
Definition: CbmRichDigi.h:80
CbmRichDigi::SetAddress
void SetAddress(Int_t address)
Definition: CbmRichDigi.h:72
CbmDefs.h