Trigger input names added to ESD (Plamen)
[u/mrichter/AliRoot.git] / STEER / AliESDHeader.h
CommitLineData
d5ebf00e 1// -*- mode: C++ -*-
2#ifndef ALIESDHEADER_H
3#define ALIESDHEADER_H
4
5/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
6 * See cxx source for full Copyright notice */
7
8//-------------------------------------------------------------------------
9// Class AliESDHeader
10// Header data
11// for the ESD
12// Origin: Christian Klein-Boesing, CERN, Christian.Klein-Boesing@cern.ch
13//-------------------------------------------------------------------------
14
8258ca76 15#include <TClonesArray.h>
9ae2e5e6 16#include "AliVHeader.h"
bf1f98c4 17#include "AliTriggerScalersESD.h"
18#include "AliTriggerScalersRecordESD.h"
19
20class AliTriggerScalersESD;
21class AliTriggerScalersRecordESD;
76a7c65b 22class AliTriggerIR;
d5ebf00e 23
9ae2e5e6 24class AliESDHeader: public AliVHeader {
d5ebf00e 25public:
26 AliESDHeader();
9ae2e5e6 27 virtual ~AliESDHeader();
d5ebf00e 28 AliESDHeader(const AliESDHeader& header);
29 AliESDHeader& operator=(const AliESDHeader& header);
732a24fe 30 virtual void Copy(TObject &obj) const;
d5ebf00e 31
32 void SetTriggerMask(ULong64_t n) {fTriggerMask=n;}
33 void SetOrbitNumber(UInt_t n) {fOrbitNumber=n;}
34 void SetTimeStamp(UInt_t timeStamp){fTimeStamp = timeStamp;}
35 void SetEventType(UInt_t eventType){fEventType = eventType;}
fd2e2210 36 void SetEventSpecie(UInt_t eventSpecie){fEventSpecie = eventSpecie;}
d5ebf00e 37 void SetEventNumberInFile(Int_t n) {fEventNumberInFile=n;}
38 void SetBunchCrossNumber(UShort_t n) {fBunchCrossNumber=n;}
9ae2e5e6 39 void SetPeriodNumber(UInt_t n) {fPeriodNumber=n;}
d5ebf00e 40 void SetTriggerCluster(UChar_t n) {fTriggerCluster = n;}
c47cda51 41 Bool_t AddTriggerIR(const AliTriggerIR* ir);
d5ebf00e 42
b21623e0 43//************Setters/Getters for Trigger Inputs and TriggerScalersRecordESD
44 void SetL0TriggerInputs(UInt_t n) {fL0TriggerInputs=n;}
45 void SetL1TriggerInputs(UInt_t n) {fL1TriggerInputs=n;}
46 void SetL2TriggerInputs(UShort_t n) {fL2TriggerInputs=n;}
47 UInt_t GetL0TriggerInputs() const {return fL0TriggerInputs;}
48 UInt_t GetL1TriggerInputs() const {return fL1TriggerInputs;}
49 UShort_t GetL2TriggerInputs() const {return fL2TriggerInputs;}
bf1f98c4 50 void SetTriggerScalersRecord(AliTriggerScalersESD *scalerRun) {fTriggerScalers.AddTriggerScalers(scalerRun); }
51 const AliTriggerScalersRecordESD* GetTriggerScalersRecord() const {return &fTriggerScalers; }
c48e777c 52 const AliTriggerIR* GetTriggerIR(Int_t i) const { return fIRArray[i]; }
6ef9caeb 53 void SetActiveTriggerInputs(const char*name, Int_t index);
54 const char* GetTriggerInputName(Int_t index, Int_t trglevel) const;
55 TString GetActiveTriggerInputs() const;
56 TString GetFiredTriggerInputs() const;
57 Bool_t IsTriggerInputFired(const char *name) const;
b21623e0 58//**************************************************************************
59
d5ebf00e 60 ULong64_t GetTriggerMask() const {return fTriggerMask;}
61 UInt_t GetOrbitNumber() const {return fOrbitNumber;}
62 UInt_t GetTimeStamp() const { return fTimeStamp;}
63 UInt_t GetEventType() const { return fEventType;}
fd2e2210 64 UInt_t GetEventSpecie() const { return fEventSpecie;}
d5ebf00e 65 Int_t GetEventNumberInFile() const {return fEventNumberInFile;}
66 UShort_t GetBunchCrossNumber() const {return fBunchCrossNumber;}
9ae2e5e6 67 UInt_t GetPeriodNumber() const {return fPeriodNumber;}
d5ebf00e 68 UChar_t GetTriggerCluster() const {return fTriggerCluster;}
69
d5ebf00e 70 void Reset();
9ae2e5e6 71 void Print(const Option_t *opt=0) const;
6ef9caeb 72
73 enum {kNTriggerInputs = 60}; //24 L0, 24 L1 and 12 L2 inputs
d5ebf00e 74private:
75
76 // Event Identification
77 ULong64_t fTriggerMask; // Trigger Type (mask)
78 UInt_t fOrbitNumber; // Orbit Number
79 UInt_t fTimeStamp; // Time stamp
80 UInt_t fEventType; // Type of Event
fd2e2210 81 UInt_t fEventSpecie; // Reconstruction event specie (1-default,2-lowM,4-highM,8-cosmic,16-cal)
4f036e6e 82 UInt_t fPeriodNumber; // Period Number
87d395bd 83 Int_t fEventNumberInFile; // Running Event count in the file
d5ebf00e 84 UShort_t fBunchCrossNumber; // Bunch Crossing Number
85 UChar_t fTriggerCluster; // Trigger cluster (mask)
6ef9caeb 86 UInt_t fL0TriggerInputs; //L0 Trigger Inputs (mask)
87 UInt_t fL1TriggerInputs; //L1 Trigger Inputs (mask)
88 UShort_t fL2TriggerInputs; //L2 Trigger Inputs (mask)
8258ca76 89 AliTriggerScalersRecordESD fTriggerScalers; //Trigger counters of triggered classes in event
99dd1587 90 enum {kNMaxIR = 3}; // Max number of interaction records (IR)
91 AliTriggerIR* fIRArray[kNMaxIR];// Array with trigger IRs
6ef9caeb 92 TObjArray fTriggerInputsNames;// Array of TNamed of the active trigger inputs (L0,L1 and L2)
93 ClassDef(AliESDHeader,8)
d5ebf00e 94};
95
96#endif