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()
16 // Default constructor initialises everything to zero and the trigger number to -1.
22 AliHLTMUONTriggerRecord::AliHLTMUONTriggerRecord(
23 Int_t triggernumber, Int_t sign, Float_t pt,
24 const AliHLTMUONPoint& station1point, const AliHLTMUONPoint& station2point
27 // Creates a trigger record from the specified parameters.
28 // Note: the trigger number must be greater or equal to zero. The particle
29 // sign must also be one of the following values: -1, 0 or +1
30 // Pt must be a positive number.
31 // If these conditions are not met then an error message is displayed and
32 // the object is filled like it is in the default constructor.
34 if (triggernumber < 0)
37 Error("AliHLTMUONTriggerRecord",
38 "The trigger number must be a positive number. Got: %d",
42 else if (sign < -1 || +1 < sign)
45 Error("AliHLTMUONTriggerRecord",
46 "The particle sign must a value of -1, 0 or +1. Got: %d",
53 Error("AliHLTMUONTriggerRecord",
54 "The transverse momentum must be a positive number. Got: %f",
60 fTriggerNumber = triggernumber;
63 fSt1Point = station1point;
64 fSt2Point = station2point;
69 void AliHLTMUONTriggerRecord::Init()
71 // Performs internal initialisation for the constructors.
79 void AliHLTMUONTriggerRecord::TriggerNumber(Int_t value)
81 // Set method for the trigger number.
82 // The trigger number must be positive when assigning the trigger number.
83 // If it is not then an error message is displayed and the internal value
87 fTriggerNumber = value;
89 Error("TriggerNumber",
90 "The trigger number must be a positive number. Got: %d",
96 void AliHLTMUONTriggerRecord::ParticleSign(Int_t value)
98 // Set method for the particle sign.
99 // The particle sign must be one of the following values: -1, 0 or +1
100 // If it is not then an error message is displayed and the internal value
101 // remains untouched.
103 if (-1 <= value && value <= +1)
104 fParticleSign = value;
106 Error("ParticleSign",
107 "The particle sign must a value of -1, 0 or +1. Got: %d",
113 void AliHLTMUONTriggerRecord::Pt(Float_t value)
115 // Set method for the particle Pt, as measured by the L0 trigger.
116 // The pt must be a positive number when assigning the pt.
117 // If it is not then an error message is displayed and the internal value
118 // remains untouched.
124 "The transverse momentum must be a positive number. Got: %f",
130 ostream& operator << (ostream& os, const AliHLTMUONTriggerRecord& r)
132 os << "{trig#: " << r.fTriggerNumber << ", sign: " << r.fParticleSign
133 << ", pt: " << r.fPt << ", st1: " << r.fSt1Point << ", st2: "
134 << r.fSt2Point << "}";