3 #ifndef ALIESDHLTDECISION_H
4 #define ALIESDHLTDECISION_H
5 /* This file is property of and copyright by the ALICE HLT Project *
6 * ALICE Experiment at CERN, All rights reserved. *
7 * See cxx source for full Copyright notice */
9 /// @file AliESDHLTDecision.h
10 /// @author matthias.richter@ift.uib.no
12 /// @brief Container for HLT decision within the ESD
16 #include "TArrayL64.h"
17 #include "TClonesArray.h"
19 class AliESDHLTDecision : public TNamed
25 AliESDHLTDecision(bool result, const char* description);
27 AliESDHLTDecision(const AliESDHLTDecision& src);
28 /// assignment operator
29 AliESDHLTDecision& operator=(const AliESDHLTDecision& src);
33 /// set trigger result
34 void SetTriggerResult(bool result) {SetBit(kTriggerResult, result);}
36 /// set the active HLT trigger items
37 int SetTriggerItems(TArrayI items) {fTriggerItems=items; return 0;}
39 /// set the event counters for HLT trigger items
40 int SetCounters(TArrayL64 counters) {fCounters=counters; return 0;}
42 /// get the description og the global trigger decision
43 const char* GetDescription() const;
46 bool Result() const { return TestBit(kTriggerResult) == 1; }
48 /// Inherited from TObject. Return the result of the trigger.
49 /// @return "0" or "1" (note: its a string)
50 virtual Option_t *GetOption() const {return Result()?"1":"0";}
52 /// check whether the HLT global trigger has fired, or
53 /// for a specific HLT trigger class if specified
54 Bool_t IsTriggerFired(const char* name=NULL) const;
56 /// Inherited from TObject. Print Information.
57 virtual void Print(Option_t* option = "") const;
59 /// Inherited from TObject. Copy this to the specified object.
60 virtual void Copy(TObject &object) const;
62 /// Inherited from TObject. Create a new clone.
63 virtual TObject *Clone(const char *newname="") const;
66 /// trigger result true/false
67 kTriggerResult = BIT(15),
68 /// indicate trigger decision object
69 kTriggerDecision = BIT(16)
72 static const char* Name() {return fgkName;}
76 /// short info about the input objects stored in TNamed
77 /// trigger name, description (title),
78 /// type: TObject bit 15 set for trigger decisions
79 /// decision: TObject bit 16 indicates true/false
80 TClonesArray fInputObjectInfo; // TNamed objects
82 /// array of fired trigger item ids from the HLT trigger menu
83 TArrayI fTriggerItems; // list of fired trigger items
85 /// trigger counters for HLT trigger items
86 TArrayL64 fCounters; // event counters for trigger items
88 /// object name for the HLT decision
89 static const char* fgkName; // the name of the HLT decision
91 ClassDef(AliESDHLTDecision, 1)
93 #endif //ALIESDHLTDECISION_H