Update master to aliroot
[u/mrichter/AliRoot.git] / STEER / STEER / AliEventInfo.h
CommitLineData
6769d914 1#ifndef ALIEVENTINFO_H
2#define ALIEVENTINFO_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6//////////////////////////////////////////////////////////////////////////////
7// Class AliEventInfo //
7e88424f 8// Container class for all the information related to //
9// event type, trigger mask and trigger clusters. //
10// It is used together with AliRunInfo in order to provide the detector's //
11// AliRecoParam object with //
12// the necessary information so that it can decide which instance of //
13// AliDetectorRecoParam objects to use in reconstruction one particular //
14// event. //
6769d914 15// //
16// cvetan.cheshkov@cern.ch 12/06/2008 //
17//////////////////////////////////////////////////////////////////////////////
18
19#include <TObject.h>
20#include <TObjString.h>
21
22class AliEventInfo : public TObject {
23
24 public:
505082ca 25 enum {kBeamTrigBit=BIT(14),kCosmicBit=BIT(15),kLaserBit=BIT(16)};
6769d914 26 AliEventInfo();
7e88424f 27 AliEventInfo(UInt_t evType,
28 const char *classes,
29 ULong64_t mask,
30 const char *cluster,
31 const char *decision);
6769d914 32 virtual ~AliEventInfo() {}
33
34 void SetEventType(UInt_t evType) { fEventType = evType; }
7e88424f 35 void SetTriggerClasses(const char *classes) { fTriggerClasses = classes; }
7c573ad6 36 void SetTriggerMask(ULong64_t mask) { fTriggerMask = mask; }
f4332838 37 void SetTriggerMaskNext50(ULong64_t mask) { fTriggerMaskNext50 = mask; }
7e88424f 38 void SetTriggerCluster(const char *cluster) { fTriggerCluster = cluster; }
39 void SetHLTDecision(const char *decision) { fHLTDecision = decision; }
6769d914 40
505082ca 41 // virtual void Print(Option_t */*option=""*/) const { Dump(); }
6769d914 42
6bcbb25b 43 UInt_t GetEventType() const { return fEventType; }
7e88424f 44 const char *GetTriggerClasses() const { return fTriggerClasses.Data(); }
7c573ad6 45 ULong64_t GetTriggerMask() const { return fTriggerMask; }
f4332838 46 ULong64_t GetTriggerMaskNext50() const { return fTriggerMaskNext50; }
7e88424f 47 const char *GetTriggerCluster() const { return fTriggerCluster.Data(); }
48 const char *GetHLTDecision() const { return fHLTDecision.Data(); }
6769d914 49
50 AliEventInfo(const AliEventInfo &evInfo);
51 AliEventInfo& operator= (const AliEventInfo& evInfo);
52
505082ca 53 Bool_t HasBeamTrigger() const {return TestBit(kBeamTrigBit);}
54 Bool_t HasCosmicTrigger() const {return TestBit(kCosmicBit);}
55 Bool_t HasCalibLaserTrigger() const {return TestBit(kLaserBit);}
56 void SetBeamTrigger(Bool_t v=kTRUE) {SetBit(kBeamTrigBit,v);}
57 void SetCosmicTrigger(Bool_t v=kTRUE) {SetBit(kCosmicBit,v);}
58 void SetCalibLaserTrigger(Bool_t v=kTRUE) {SetBit(kLaserBit,v);}
59
6769d914 60 void Reset();
7e88424f 61
505082ca 62 void Print(Option_t* opt=0) const;
63
6769d914 64 private:
65
6769d914 66 UInt_t fEventType; // event type as defined by DAQ (start_of_*,calibration,physics etc) (per event)
7e88424f 67 TString fTriggerClasses; // list of fired trigger classes (per event)
7c573ad6 68 ULong64_t fTriggerMask; // trigger mask as received from DAQ or CTP raw-data payload (per event)
f4332838 69 ULong64_t fTriggerMaskNext50; // trigger mask as received from DAQ or CTP raw-data payload (per event)
7e88424f 70 TString fTriggerCluster; // list of detectors that have been read out (per event)
71 TString fHLTDecision; // string describing the HLT decision (per event)
6769d914 72
f4332838 73 ClassDef(AliEventInfo,4) // Event info class
6769d914 74};
75
76#endif