CbmRoot
CbmStsDigi.h
Go to the documentation of this file.
1 
8 #ifndef CBMSTSDIGI_H
9 #define CBMSTSDIGI_H 1
10 
11 #include <Rtypes.h> // for ClassDef
12 #include <RtypesCore.h> // for Int_t, Double_t, UShort_t, Long64_t, ULong64_t
13 
14 #include <string> // for string
15 
16 #include "CbmDefs.h" // for ECbmModuleId::kSts
17 
18 #include <boost/serialization/access.hpp>
19 #include <boost/serialization/base_object.hpp>
20 
29 class CbmStsDigi {
30 
31 public:
34 
35 
42  CbmStsDigi(Int_t address, Int_t channel, ULong64_t time, UShort_t charge)
43  : fTime(time), fAddress(address), fChannel(channel), fCharge(charge) {}
44 
45 
48 
49 
53  Int_t GetAddress() const { return fAddress; }
54 
55 
59  UShort_t GetChannel() const { return fChannel; }
60 
61 
65  static const char* GetClassName() { return "CbmStsDigi"; }
66 
67 
71  Double_t GetCharge() const { return Double_t(fCharge); }
72 
73 
78 
79 
83  Double_t GetTime() const { return Double_t(fTime); }
84 
85 
86  template<class Archive>
87  void serialize(Archive& ar, const unsigned int /*version*/) {
88  ar& fTime;
89  ar& fAddress;
90  ar& fChannel;
91  ar& fCharge;
92  }
93 
94 
98  void SetTime(Double_t dNewTime) { fTime = dNewTime; }
99 
100 
102  std::string ToString() const;
103 
104 
105 private:
107 
108  Long64_t fTime = 0.;
109  Int_t fAddress = 0;
110  UShort_t fChannel = 0;
111  UShort_t fCharge = 0;
112 
113 
115 };
116 
117 
118 #endif
CbmStsDigi::fAddress
Int_t fAddress
Unique element address.
Definition: CbmStsDigi.h:109
CbmStsDigi::access
friend class boost::serialization::access
Definition: CbmStsDigi.h:106
CbmStsDigi::serialize
void serialize(Archive &ar, const unsigned int)
Definition: CbmStsDigi.h:87
ECbmModuleId
ECbmModuleId
Definition: CbmDefs.h:33
CbmStsDigi::GetClassName
static const char * GetClassName()
Class name (static)
Definition: CbmStsDigi.h:65
CbmStsDigi::~CbmStsDigi
~CbmStsDigi()
Definition: CbmStsDigi.h:47
CbmStsDigi::ToString
std::string ToString() const
Definition: CbmStsDigi.cxx:15
CbmStsDigi::CbmStsDigi
CbmStsDigi()
Definition: CbmStsDigi.h:33
CbmStsDigi::GetTime
Double_t GetTime() const
Definition: CbmStsDigi.h:83
CbmStsDigi::fCharge
UShort_t fCharge
Charge [ADC units].
Definition: CbmStsDigi.h:111
CbmStsDigi
Data class for a single-channel message in the STS.
Definition: CbmStsDigi.h:29
CbmStsDigi::GetSystem
static ECbmModuleId GetSystem()
Definition: CbmStsDigi.h:77
CbmStsDigi::GetCharge
Double_t GetCharge() const
Definition: CbmStsDigi.h:71
CbmStsDigi::fChannel
UShort_t fChannel
Channel number.
Definition: CbmStsDigi.h:110
CbmStsDigi::GetAddress
Int_t GetAddress() const
Definition: CbmStsDigi.h:53
CbmStsDigi::SetTime
void SetTime(Double_t dNewTime)
Definition: CbmStsDigi.h:98
CbmStsDigi::CbmStsDigi
CbmStsDigi(Int_t address, Int_t channel, ULong64_t time, UShort_t charge)
Definition: CbmStsDigi.h:42
CbmStsDigi::ClassDefNV
ClassDefNV(CbmStsDigi, 7)
CbmStsDigi::fTime
Long64_t fTime
Time [ns].
Definition: CbmStsDigi.h:108
ECbmModuleId::kSts
@ kSts
Silicon Tracking System.
CbmStsDigi::GetChannel
UShort_t GetChannel() const
Channel number in module @value Channel number.
Definition: CbmStsDigi.h:59
CbmDefs.h