AliRoot Core  3dc7879 (3dc7879)
Go to the documentation of this file.
1 // -*- mode: C++ -*-
5 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
6  * See cxx source for full Copyright notice */
8 //-------------------------------------------------------------------------
9 // Class AliESDHeader
10 // Header data
11 // for the ESD
12 // Origin: Christian Klein-Boesing, CERN,
13 //-------------------------------------------------------------------------
15 #include <TObjArray.h>
16 #include <TClonesArray.h>
17 #include <TBits.h>
18 #include "AliVHeader.h"
19 #include "AliTriggerScalersESD.h"
24 class AliTriggerIR;
27 class AliESDHeader: public AliVHeader {
28 public:
29  AliESDHeader();
30  virtual ~AliESDHeader();
31  AliESDHeader(const AliESDHeader& header);
32  AliESDHeader& operator=(const AliESDHeader& header);
33  virtual void Copy(TObject &obj) const;
35  void SetTriggerMask(ULong64_t n) {fTriggerMask=n;}
37  void SetOrbitNumber(UInt_t n) {fOrbitNumber=n;}
38  void SetTimeStamp(UInt_t timeStamp){fTimeStamp = timeStamp;}
39  void SetEventType(UInt_t eventType){fEventType = eventType;}
40  void SetEventSpecie(UInt_t eventSpecie){fEventSpecie = eventSpecie;}
42  void SetBunchCrossNumber(UShort_t n) {fBunchCrossNumber=n;}
43  void SetPeriodNumber(UInt_t n) {fPeriodNumber=n;}
44  void SetTriggerCluster(UChar_t n) {fTriggerCluster = n;}
45  Bool_t AddTriggerIR(const AliTriggerIR* ir);
46  void SetCTPConfig(AliTriggerConfiguration* ctpConfig) {fCTPConfig=ctpConfig;};
47 //************Setters/Getters for Trigger Inputs and TriggerScalersRecordESD
50  void SetL2TriggerInputs(UShort_t n) {fL2TriggerInputs=n;}
51  UInt_t GetL0TriggerInputs() const {return fL0TriggerInputs;}
52  UInt_t GetL1TriggerInputs() const {return fL1TriggerInputs;}
53  UShort_t GetL2TriggerInputs() const {return fL2TriggerInputs;}
60  const AliTriggerIR* GetTriggerIR(Int_t i) const { return (const AliTriggerIR*)fIRBufferArray[i]; }
61  void SetActiveTriggerInputs(const char*name, Int_t index);
62  const char* GetTriggerInputName(Int_t index, Int_t trglevel) const;
63  TString GetActiveTriggerInputs() const;
64  TString GetFiredTriggerInputs() const;
65  Bool_t IsTriggerInputFired(const char *name) const;
67  Int_t FindIRIntInteractionsBXMap(Int_t difference) const;
70  Int_t GetIRInt2ClosestInteractionMap() const;
71  Int_t GetIRInt1ClosestInteractionMap(Int_t gap = 3) const;
72  Int_t GetIRInt2LastInteractionMap() const;
73 //**************************************************************************
75  ULong64_t GetTriggerMask() const {return fTriggerMask;}
76  ULong64_t GetTriggerMaskNext50() const {return fTriggerMaskNext50;}
77  void GetTriggerMaskAll(ULong64_t& low,ULong64_t& high) const {low=fTriggerMask;high=fTriggerMaskNext50;}
78  UInt_t GetOrbitNumber() const {return fOrbitNumber;}
79  UInt_t GetTimeStamp() const { return fTimeStamp;}
80  UInt_t GetEventType() const { return fEventType;}
81  UInt_t GetEventSpecie() const { return fEventSpecie;}
82  Int_t GetEventNumberInFile() const {return fEventNumberInFile;}
83  UShort_t GetBunchCrossNumber() const {return fBunchCrossNumber;}
84  UInt_t GetPeriodNumber() const {return fPeriodNumber;}
85  UChar_t GetTriggerCluster() const {return fTriggerCluster;}
86  Int_t GetTriggerIREntries() const { return fIRBufferArray.GetEntriesFast();};
87  Int_t GetTriggerIREntries(Int_t int1, Int_t int2, Float_t deltaTime = 180.) const;
88  TObjArray GetIRArray(Int_t int1, Int_t int2, Float_t deltaTime = 180.) const;
89  void Reset();
90  void Print(const Option_t *opt=0) const;
92  enum {kNTriggerInputs = 60}; //24 L0, 24 L1 and 12 L2 inputs
93  Char_t GetTPCNoiseFilterCounter(UInt_t index) {return fTPCNoiseFilterCounter[index%3];};
94  void SetTPCNoiseFilterCounter(UInt_t index,UChar_t value) {fTPCNoiseFilterCounter[index%3]=value;};
96 private:
97  void SetIRInteractionMap() const;
99 private:
101  // Event Identification
102  ULong64_t fTriggerMask; // Trigger Type (mask) 1-50 bits
103  ULong64_t fTriggerMaskNext50; // Trigger Type (mask) 51-100 bits
104  UInt_t fOrbitNumber; // Orbit Number
105  UInt_t fTimeStamp; // Time stamp
106  UInt_t fEventType; // Type of Event
107  UInt_t fEventSpecie; // Reconstruction event specie (1-default,2-lowM,4-highM,8-cosmic,16-cal)
108  UInt_t fPeriodNumber; // Period Number
109  Int_t fEventNumberInFile; // Running Event count in the file
110  UShort_t fBunchCrossNumber; // Bunch Crossing Number
111  UChar_t fTriggerCluster; // Trigger cluster (mask)
112  UInt_t fL0TriggerInputs; // L0 Trigger Inputs (mask)
113  UInt_t fL1TriggerInputs; // L1 Trigger Inputs (mask)
114  UShort_t fL2TriggerInputs; // L2 Trigger Inputs (mask)
115  AliTriggerScalersRecordESD fTriggerScalers; //Trigger counters of triggered classes in event, interpolated to the event time
116  AliTriggerScalersRecordESD fTriggerScalersDeltaEvent; // Change in the trigger scalers between the two counter readings closest to the event time
117  AliTriggerScalersRecordESD fTriggerScalersDeltaRun; // Total number of counts in the trigger scalers for the duration of the run
118  enum {kNMaxIR = 3}; // Max number of interaction records (IR)
119  AliTriggerIR* fIRArray[kNMaxIR];// Array with trigger IRs
120  TObjArray fTriggerInputsNames;// Array of TNamed of the active trigger inputs (L0,L1 and L2)
121  AliTriggerConfiguration* fCTPConfig; // Trigger configuration for the run
122  TObjArray fIRBufferArray;// Array with interaction records before and after triggered event
123  mutable TBits fIRInt2InteractionsMap; // map of the Int2 events (normally 0TVX) near the event, that's Int2Id-EventId within -90 +90 BXs
124  mutable TBits fIRInt1InteractionsMap; // map of the Int1 events (normally V0A&V0C) near the event, that's Int1Id-EventId within -90 +90 BXs
125  UChar_t fTPCNoiseFilterCounter[3]; // filter counter [0]=sector, [1]-timebin/sector, [2]-padrowsector
128  ClassDef(AliESDHeader,14)
129 };
131 #endif
Int_t fEventNumberInFile
Definition: AliESDHeader.h:109
void SetTriggerMaskNext50(ULong64_t n)
Definition: AliESDHeader.h:36
TBits fIRInt2InteractionsMap
Definition: AliESDHeader.h:123
ULong64_t GetTriggerMask() const
Definition: AliESDHeader.h:75
AliTriggerConfiguration * fCTPConfig
Definition: AliESDHeader.h:121
AliESDHeader & operator=(const AliESDHeader &header)
AliTriggerScalersRecordESD fTriggerScalersDeltaRun
Definition: AliESDHeader.h:117
UInt_t GetL1TriggerInputs() const
Definition: AliESDHeader.h:52
#define TObjArray
TObjArray GetIRArray(Int_t int1, Int_t int2, Float_t deltaTime=180.) const
void Print(const Option_t *opt=0) const
UInt_t fEventSpecie
Definition: AliESDHeader.h:107
AliTriggerIR * fIRArray[kNMaxIR]
Definition: AliESDHeader.h:119
UShort_t GetL2TriggerInputs() const
Definition: AliESDHeader.h:53
TString GetFiredTriggerInputs() const
UInt_t fL1TriggerInputs
Definition: AliESDHeader.h:113
void AddTriggerScalers(AliTriggerScalersESD *scaler)
TBits fIRInt1InteractionsMap
Definition: AliESDHeader.h:124
UInt_t fEventType
Definition: AliESDHeader.h:106
void SetTriggerScalersDeltaRun(const AliTriggerScalersRecordESD *scalerRun)
Definition: AliESDHeader.h:56
ULong64_t fTriggerMaskNext50
Definition: AliESDHeader.h:103
void SetCTPConfig(AliTriggerConfiguration *ctpConfig)
Definition: AliESDHeader.h:46
UChar_t GetTriggerCluster() const
Definition: AliESDHeader.h:85
Int_t GetIRInt2ClosestInteractionMap() const
void SetOrbitNumber(UInt_t n)
Definition: AliESDHeader.h:37
UShort_t fBunchCrossNumber
Definition: AliESDHeader.h:110
const AliTriggerIR * GetTriggerIR(Int_t i) const
Definition: AliESDHeader.h:60
void SetTriggerMask(ULong64_t n)
Definition: AliESDHeader.h:35
Int_t GetIRInt1ClosestInteractionMap(Int_t gap=3) const
void SetBunchCrossNumber(UShort_t n)
Definition: AliESDHeader.h:42
void SetEventNumberInFile(Int_t n)
Definition: AliESDHeader.h:41
Int_t GetIRInt2LastInteractionMap() const
Int_t GetEventNumberInFile() const
Definition: AliESDHeader.h:82
const AliTriggerScalersRecordESD * GetTriggerScalersDeltaEvent() const
Definition: AliESDHeader.h:58
Bool_t IsTriggerInputFired(const char *name) const
UInt_t GetPeriodNumber() const
Definition: AliESDHeader.h:84
void SetTimeStamp(UInt_t timeStamp)
Definition: AliESDHeader.h:38
const AliTriggerScalersRecordESD * GetTriggerScalersDeltaRun() const
Definition: AliESDHeader.h:59
UInt_t GetL0TriggerInputs() const
Definition: AliESDHeader.h:51
UInt_t fOrbitNumber
Definition: AliESDHeader.h:104
virtual void Copy(TObject &obj) const
void SetEventType(UInt_t eventType)
Definition: AliESDHeader.h:39
ULong64_t fTriggerMask
Definition: AliESDHeader.h:102
void SetL0TriggerInputs(UInt_t n)
Definition: AliESDHeader.h:48
AliTriggerScalersRecordESD fTriggerScalersDeltaEvent
Definition: AliESDHeader.h:116
void SetTriggerScalersRecord(AliTriggerScalersESD *scalerRun)
Definition: AliESDHeader.h:54
void SetIRInteractionMap() const
Char_t GetTPCNoiseFilterCounter(UInt_t index)
Definition: AliESDHeader.h:93
UInt_t fTimeStamp
Definition: AliESDHeader.h:105
Bool_t AddTriggerIR(const AliTriggerIR *ir)
void SetEventSpecie(UInt_t eventSpecie)
Definition: AliESDHeader.h:40
virtual ~AliESDHeader()
AliTriggerScalersRecordESD fTriggerScalers
Definition: AliESDHeader.h:115
UInt_t GetTimeStamp() const
Definition: AliESDHeader.h:79
TString GetActiveTriggerInputs() const
void SetActiveTriggerInputs(const char *name, Int_t index)
const AliTriggerConfiguration * GetCTPConfig() const
Definition: AliESDHeader.h:66
ULong64_t GetTriggerMaskNext50() const
Definition: AliESDHeader.h:76
UInt_t GetOrbitNumber() const
Definition: AliESDHeader.h:78
TObjArray fTriggerInputsNames
Definition: AliESDHeader.h:120
const AliTriggerScalersRecordESD * GetTriggerScalersRecord() const
Definition: AliESDHeader.h:57
void SetL2TriggerInputs(UShort_t n)
Definition: AliESDHeader.h:50
UChar_t fTPCNoiseFilterCounter[3]
Definition: AliESDHeader.h:125
void SetL1TriggerInputs(UInt_t n)
Definition: AliESDHeader.h:49
UShort_t GetBunchCrossNumber() const
Definition: AliESDHeader.h:83
void SetTriggerCluster(UChar_t n)
Definition: AliESDHeader.h:44
TObjArray fIRBufferArray
Definition: AliESDHeader.h:122
TBits GetIRInt2InteractionMap() const
Definition: AliESDHeader.h:68
UInt_t fPeriodNumber
Definition: AliESDHeader.h:108
void SetTPCNoiseFilterCounter(UInt_t index, UChar_t value)
Definition: AliESDHeader.h:94
const char * GetTriggerInputName(Int_t index, Int_t trglevel) const
void SetTriggerScalersDeltaEvent(const AliTriggerScalersRecordESD *scalerRun)
Definition: AliESDHeader.h:55
UShort_t fL2TriggerInputs
Definition: AliESDHeader.h:114
void GetTriggerMaskAll(ULong64_t &low, ULong64_t &high) const
Definition: AliESDHeader.h:77
Int_t GetTriggerIREntries() const
Definition: AliESDHeader.h:86
UInt_t GetEventSpecie() const
Definition: AliESDHeader.h:81
UChar_t fTriggerCluster
Definition: AliESDHeader.h:111
Int_t FindIRIntInteractionsBXMap(Int_t difference) const
void SetPeriodNumber(UInt_t n)
Definition: AliESDHeader.h:43
UInt_t GetEventType() const
Definition: AliESDHeader.h:80
TBits GetIRInt1InteractionMap() const
Definition: AliESDHeader.h:69
UInt_t fL0TriggerInputs
Definition: AliESDHeader.h:112