1 ////////////////////////////////////////////////////////////////////////////////
3 // Author: Artur Szostak
4 // Email: artur@alice.phy.uct.ac.za | artursz@iafrica.com
6 ////////////////////////////////////////////////////////////////////////////////
8 #include "AliRoot/TriggerRecord.hpp"
11 ClassImp(AliHLTMUONTriggerRecord)
14 AliHLTMUONTriggerRecord::AliHLTMUONTriggerRecord() :
15 TObject(), fTriggerNumber(-1), fParticleSign(0), fPt(0), fSt1Point(), fSt2Point()
17 // Default constructor initialises everything to zero and the trigger number to -1.
23 AliHLTMUONTriggerRecord::AliHLTMUONTriggerRecord(
24 Int_t triggernumber, Int_t sign, Float_t pt,
25 const AliHLTMUONPoint& station1point, const AliHLTMUONPoint& station2point
27 TObject(), fTriggerNumber(-1), fParticleSign(0), fPt(0), fSt1Point(), fSt2Point()
29 // Creates a trigger record from the specified parameters.
30 // Note: the trigger number must be greater or equal to zero. The particle
31 // sign must also be one of the following values: -1, 0 or +1
32 // Pt must be a positive number.
33 // If these conditions are not met then an error message is displayed and
34 // the object is filled like it is in the default constructor.
36 if (triggernumber < 0)
39 Error("AliHLTMUONTriggerRecord",
40 "The trigger number must be a positive number. Got: %d",
44 else if (sign < -1 || +1 < sign)
47 Error("AliHLTMUONTriggerRecord",
48 "The particle sign must a value of -1, 0 or +1. Got: %d",
55 Error("AliHLTMUONTriggerRecord",
56 "The transverse momentum must be a positive number. Got: %f",
62 fTriggerNumber = triggernumber;
65 fSt1Point = station1point;
66 fSt2Point = station2point;
71 void AliHLTMUONTriggerRecord::Init()
73 // Performs internal initialisation for the constructors.
81 void AliHLTMUONTriggerRecord::TriggerNumber(Int_t value)
83 // Set method for the trigger number.
84 // The trigger number must be positive when assigning the trigger number.
85 // If it is not then an error message is displayed and the internal value
89 fTriggerNumber = value;
91 Error("TriggerNumber",
92 "The trigger number must be a positive number. Got: %d",
98 void AliHLTMUONTriggerRecord::ParticleSign(Int_t value)
100 // Set method for the particle sign.
101 // The particle sign must be one of the following values: -1, 0 or +1
102 // If it is not then an error message is displayed and the internal value
103 // remains untouched.
105 if (-1 <= value && value <= +1)
106 fParticleSign = value;
108 Error("ParticleSign",
109 "The particle sign must a value of -1, 0 or +1. Got: %d",
115 void AliHLTMUONTriggerRecord::Pt(Float_t value)
117 // Set method for the particle Pt, as measured by the L0 trigger.
118 // The pt must be a positive number when assigning the pt.
119 // If it is not then an error message is displayed and the internal value
120 // remains untouched.
126 "The transverse momentum must be a positive number. Got: %f",
132 ostream& operator << (ostream& os, const AliHLTMUONTriggerRecord& r)
134 os << "{trig#: " << r.fTriggerNumber << ", sign: " << r.fParticleSign
135 << ", pt: " << r.fPt << ", st1: " << r.fSt1Point << ", st2: "
136 << r.fSt2Point << "}";