CbmRoot
CbmStsSignal.h
Go to the documentation of this file.
1 
6 #ifndef CBMSTSSIGNAL_H
7 #define CBMSTSSIGNAL_H 1
8 
9 #include "CbmMatch.h"
10 #include "TObject.h"
11 
12 
27 class CbmStsSignal : public TObject {
28 
29 public:
37  CbmStsSignal(Double_t time = 0.,
38  Double_t charge = 0.,
39  Int_t index = 0,
40  Int_t entry = -1,
41  Int_t file = -1);
42 
43 
45  virtual ~CbmStsSignal();
46 
47 
54  void
55  AddLink(Double_t charge, Int_t index, Int_t entry = -1, Int_t file = -1) {
56  fMatch.AddLink(charge, index, entry, file);
57  }
58 
59 
63  Double_t GetCharge() const { return fMatch.GetTotalWeight(); }
64 
65 
69  const CbmMatch& GetMatch() const { return fMatch; }
70 
71 
75  Double_t GetTime() const { return fTime; }
76 
77 
81  void SetTime(Double_t time) { fTime = time; }
82 
83 
88  bool operator<(const CbmStsSignal& otherSignal) const {
89  return (fTime < otherSignal.GetTime());
90  }
91 
92 
97  struct Before {
98  bool operator()(CbmStsSignal* signal1, CbmStsSignal* signal2) const {
99  return (signal1->GetTime() < signal2->GetTime());
100  }
101  };
102 
103 private:
104  Double_t fTime;
106 
108 };
109 
110 #endif /* CBMSTSSIGNAL_H */
CbmStsSignal::fMatch
CbmMatch fMatch
Match object (total weight = charge)
Definition: CbmStsSignal.h:105
CbmStsSignal::SetTime
void SetTime(Double_t time)
Definition: CbmStsSignal.h:81
CbmMatch
Definition: CbmMatch.h:22
CbmStsSignal::AddLink
void AddLink(Double_t charge, Int_t index, Int_t entry=-1, Int_t file=-1)
Definition: CbmStsSignal.h:55
CbmStsSignal::ClassDef
ClassDef(CbmStsSignal, 1)
CbmMatch.h
CbmStsSignal::GetTime
Double_t GetTime() const
Definition: CbmStsSignal.h:75
CbmStsSignal
Data class for an analog signal in the STS.
Definition: CbmStsSignal.h:27
CbmStsSignal::CbmStsSignal
CbmStsSignal(Double_t time=0., Double_t charge=0., Int_t index=0, Int_t entry=-1, Int_t file=-1)
Definition: CbmStsSignal.cxx:10
CbmMatch::GetTotalWeight
Double_t GetTotalWeight() const
Definition: CbmMatch.h:39
CbmStsSignal::operator<
bool operator<(const CbmStsSignal &otherSignal) const
Definition: CbmStsSignal.h:88
CbmStsSignal::Before::operator()
bool operator()(CbmStsSignal *signal1, CbmStsSignal *signal2) const
Definition: CbmStsSignal.h:98
CbmStsSignal::Before
Definition: CbmStsSignal.h:97
CbmStsSignal::~CbmStsSignal
virtual ~CbmStsSignal()
Definition: CbmStsSignal.cxx:22
CbmMatch::AddLink
void AddLink(const CbmLink &newLink)
Definition: CbmMatch.cxx:42
CbmStsSignal::fTime
Double_t fTime
Signal time [ns].
Definition: CbmStsSignal.h:104
CbmStsSignal::GetMatch
const CbmMatch & GetMatch() const
Definition: CbmStsSignal.h:69
CbmStsSignal::GetCharge
Double_t GetCharge() const
Definition: CbmStsSignal.h:63