Possibility to not write syswatch info to file (default)
[u/mrichter/AliRoot.git] / STEER / ESD / 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
96bf4ffc 15#include <TObjArray.h>
8258ca76 16#include <TClonesArray.h>
4ccebdba 17#include <TBits.h>
9ae2e5e6 18#include "AliVHeader.h"
bf1f98c4 19#include "AliTriggerScalersESD.h"
20#include "AliTriggerScalersRecordESD.h"
21
22class AliTriggerScalersESD;
23class AliTriggerScalersRecordESD;
76a7c65b 24class AliTriggerIR;
d789992f 25class AliTriggerConfiguration;
d5ebf00e 26
9ae2e5e6 27class AliESDHeader: public AliVHeader {
d5ebf00e 28public:
29 AliESDHeader();
9ae2e5e6 30 virtual ~AliESDHeader();
d5ebf00e 31 AliESDHeader(const AliESDHeader& header);
32 AliESDHeader& operator=(const AliESDHeader& header);
732a24fe 33 virtual void Copy(TObject &obj) const;
d5ebf00e 34
35 void SetTriggerMask(ULong64_t n) {fTriggerMask=n;}
da3314d6 36 void SetTriggerMaskNext50(ULong64_t n) {fTriggerMaskNext50=n;}
d5ebf00e 37 void SetOrbitNumber(UInt_t n) {fOrbitNumber=n;}
38 void SetTimeStamp(UInt_t timeStamp){fTimeStamp = timeStamp;}
39 void SetEventType(UInt_t eventType){fEventType = eventType;}
fd2e2210 40 void SetEventSpecie(UInt_t eventSpecie){fEventSpecie = eventSpecie;}
d5ebf00e 41 void SetEventNumberInFile(Int_t n) {fEventNumberInFile=n;}
42 void SetBunchCrossNumber(UShort_t n) {fBunchCrossNumber=n;}
9ae2e5e6 43 void SetPeriodNumber(UInt_t n) {fPeriodNumber=n;}
d5ebf00e 44 void SetTriggerCluster(UChar_t n) {fTriggerCluster = n;}
c47cda51 45 Bool_t AddTriggerIR(const AliTriggerIR* ir);
d789992f 46 void SetCTPConfig(AliTriggerConfiguration* ctpConfig) {fCTPConfig=ctpConfig;};
b21623e0 47//************Setters/Getters for Trigger Inputs and TriggerScalersRecordESD
48 void SetL0TriggerInputs(UInt_t n) {fL0TriggerInputs=n;}
49 void SetL1TriggerInputs(UInt_t n) {fL1TriggerInputs=n;}
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;}
bf1f98c4 54 void SetTriggerScalersRecord(AliTriggerScalersESD *scalerRun) {fTriggerScalers.AddTriggerScalers(scalerRun); }
d789992f 55 void SetTriggerScalersDeltaEvent(const AliTriggerScalersRecordESD *scalerRun) {fTriggerScalersDeltaEvent = *scalerRun; }
56 void SetTriggerScalersDeltaRun(const AliTriggerScalersRecordESD *scalerRun) {fTriggerScalersDeltaRun = *scalerRun; }
bf1f98c4 57 const AliTriggerScalersRecordESD* GetTriggerScalersRecord() const {return &fTriggerScalers; }
d789992f 58 const AliTriggerScalersRecordESD* GetTriggerScalersDeltaEvent() const {return &fTriggerScalersDeltaEvent; }
59 const AliTriggerScalersRecordESD* GetTriggerScalersDeltaRun() const {return &fTriggerScalersDeltaRun; }
96bf4ffc 60 const AliTriggerIR* GetTriggerIR(Int_t i) const { return (const AliTriggerIR*)fIRBufferArray[i]; }
d789992f 61 void SetActiveTriggerInputs(const char*name, Int_t index);
6ef9caeb 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;
d789992f 66 const AliTriggerConfiguration* GetCTPConfig() const { return fCTPConfig;}
299994c6 67 Int_t FindIRIntInteractionsBXMap(Int_t difference) const;
68 TBits GetIRInt2InteractionMap() const { SetIRInteractionMap(); return fIRInt2InteractionsMap; }
69 TBits GetIRInt1InteractionMap() const { SetIRInteractionMap(); return fIRInt1InteractionsMap; }
70 Int_t GetIRInt2ClosestInteractionMap() const;
71 Int_t GetIRInt1ClosestInteractionMap(Int_t gap = 3) const;
72 Int_t GetIRInt2LastInteractionMap() const;
b21623e0 73//**************************************************************************
74
d5ebf00e 75 ULong64_t GetTriggerMask() const {return fTriggerMask;}
da3314d6 76 ULong64_t GetTriggerMaskNext50() const {return fTriggerMaskNext50;}
77 void GetTriggerMaskAll(ULong64_t& low,ULong64_t& high) const {low=fTriggerMask;high=fTriggerMaskNext50;}
d5ebf00e 78 UInt_t GetOrbitNumber() const {return fOrbitNumber;}
79 UInt_t GetTimeStamp() const { return fTimeStamp;}
80 UInt_t GetEventType() const { return fEventType;}
fd2e2210 81 UInt_t GetEventSpecie() const { return fEventSpecie;}
d5ebf00e 82 Int_t GetEventNumberInFile() const {return fEventNumberInFile;}
83 UShort_t GetBunchCrossNumber() const {return fBunchCrossNumber;}
9ae2e5e6 84 UInt_t GetPeriodNumber() const {return fPeriodNumber;}
d5ebf00e 85 UChar_t GetTriggerCluster() const {return fTriggerCluster;}
d01710c6 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;
d5ebf00e 89 void Reset();
9ae2e5e6 90 void Print(const Option_t *opt=0) const;
6ef9caeb 91
d789992f 92 enum {kNTriggerInputs = 60}; //24 L0, 24 L1 and 12 L2 inputs
93
d5ebf00e 94private:
299994c6 95 void SetIRInteractionMap() const;
96
97private:
d5ebf00e 98
99 // Event Identification
da3314d6 100 ULong64_t fTriggerMask; // Trigger Type (mask) 1-50 bits
101 ULong64_t fTriggerMaskNext50; // Trigger Type (mask) 51-100 bits
d5ebf00e 102 UInt_t fOrbitNumber; // Orbit Number
103 UInt_t fTimeStamp; // Time stamp
104 UInt_t fEventType; // Type of Event
fd2e2210 105 UInt_t fEventSpecie; // Reconstruction event specie (1-default,2-lowM,4-highM,8-cosmic,16-cal)
4f036e6e 106 UInt_t fPeriodNumber; // Period Number
87d395bd 107 Int_t fEventNumberInFile; // Running Event count in the file
d5ebf00e 108 UShort_t fBunchCrossNumber; // Bunch Crossing Number
109 UChar_t fTriggerCluster; // Trigger cluster (mask)
d789992f 110 UInt_t fL0TriggerInputs; // L0 Trigger Inputs (mask)
111 UInt_t fL1TriggerInputs; // L1 Trigger Inputs (mask)
112 UShort_t fL2TriggerInputs; // L2 Trigger Inputs (mask)
113 AliTriggerScalersRecordESD fTriggerScalers; //Trigger counters of triggered classes in event, interpolated to the event time
114 AliTriggerScalersRecordESD fTriggerScalersDeltaEvent; // Change in the trigger scalers between the two counter readings closest to the event time
115 AliTriggerScalersRecordESD fTriggerScalersDeltaRun; // Total number of counts in the trigger scalers for the duration of the run
99dd1587 116 enum {kNMaxIR = 3}; // Max number of interaction records (IR)
117 AliTriggerIR* fIRArray[kNMaxIR];// Array with trigger IRs
6ef9caeb 118 TObjArray fTriggerInputsNames;// Array of TNamed of the active trigger inputs (L0,L1 and L2)
d789992f 119 AliTriggerConfiguration* fCTPConfig; // Trigger configuration for the run
96bf4ffc 120 TObjArray fIRBufferArray;// Array with interaction records before and after triggered event
299994c6 121 mutable TBits fIRInt2InteractionsMap; // map of the Int2 events (normally 0TVX) near the event, that's Int2Id-EventId within -90 +90 BXs
122 mutable TBits fIRInt1InteractionsMap; // map of the Int1 events (normally V0A&V0C) near the event, that's Int1Id-EventId within -90 +90 BXs
d789992f 123
96bf4ffc 124
da3314d6 125 ClassDef(AliESDHeader,12)
d5ebf00e 126};
127
128#endif