1 #ifndef AliOADBPhysicsSelection_H
2 #define AliOADBPhysicsSelection_H
3 /* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
8 //-------------------------------------------------------------------------
9 // OADB interface for the physics selection
10 // Author: Michele Floris, CERN
12 // This class contains the parameters needed to configure the physics
13 // selection. The online trigger class must be associated to an
14 // offline trigger mask, as defined in
15 // AliVEvent::EOfflineTriggerTypes. The offline condition, even for
16 // the same trigger mask, can be different for every different online
17 // trigger, so it must be given as a parameter in the Add...Class
18 // methods. It's up to the user to set the appropriate offline
19 // conditions when filling the class.
20 // -------------------------------------------------------------------------
23 #include "AliVEvent.h"
31 #define NTRIGGERBITS 32
32 #define NTRIGGERLOGICS 64
34 class AliOADBPhysicsSelection : public TNamed {
37 AliOADBPhysicsSelection();
38 AliOADBPhysicsSelection(const char* name);
39 virtual ~AliOADBPhysicsSelection();
40 AliOADBPhysicsSelection(const AliOADBPhysicsSelection& cont);
41 AliOADBPhysicsSelection& operator=(const AliOADBPhysicsSelection& cont);
44 // These take a mask of trigger bits, because you can activate several triggers at once
45 // TList * GetCollTrigClass(AliVEvent::EOfflineTriggerTypes trig) const;
46 // TList * GetBGTrigClass(AliVEvent::EOfflineTriggerTypes trig) const;
47 // TList * GetTrigClass(AliVEvent::EOfflineTriggerTypes trig, TList ** listClasses) const ;
49 TList * GetCollTrigClass(UInt_t triggerBit) { return fCollTrigClasses[triggerBit];}
50 TList * GetBGTrigClass(UInt_t triggerBit) { return fBGTrigClasses[triggerBit]; }
51 const TString GetBeamSide (const char * trigger) ;
52 TMap * Debug() { return fBeamSide; }
53 // Thess take a single trigger bit, as the HW/offline conditions are mapped 1 <-> 1 to a single EOfflineTriggerTypes bit
54 const TString GetHardwareTrigger(UInt_t triggerLogic) const { return triggerLogic >= NTRIGGERLOGICS ? "" : fHardwareTrigger[triggerLogic].String(); }
55 const TString GetOfflineTrigger (UInt_t triggerLogic) const { return triggerLogic >= NTRIGGERLOGICS ? "" : fOfflineTrigger [triggerLogic].String(); }
56 UInt_t GetNTriggerBits() const { return fNtriggerBits; }
58 void AddCollisionTriggerClass(AliVEvent::EOfflineTriggerTypes triggerMask, const char* className,const char * beamSide, UInt_t triggerLogic);
59 void AddBGTriggerClass (AliVEvent::EOfflineTriggerTypes triggerMask, const char* className,const char * beamSide, UInt_t triggerLogic);
62 void SetHardwareTrigger (UInt_t triggerLogic, const char * trigger) { fHardwareTrigger [triggerLogic].SetString(trigger); }
63 void SetOfflineTrigger (UInt_t triggerLogic, const char * trigger) { fOfflineTrigger [triggerLogic].SetString(trigger); }
64 void SetBeamSide (const char * className, const char * side);
66 virtual Bool_t IsFolder() const { return kTRUE; }
67 void Browse(TBrowser *b);
68 virtual void Print(Option_t* option = "") const;
70 static UInt_t GetActiveBit(UInt_t mask) ;
73 void CleanKey(TString & str) ;
74 const char* ExpandTriggerString(const char* className);
78 UInt_t fNtriggerBits; // Size of the arrays below. Initialized using NTRIGGERBITS
79 UInt_t fNtriggerLogics; // number of possible trigger logics, initialized using NTRIGGERLOGICS. To be increased if needed.
81 TList ** fCollTrigClasses ; //[fNtriggerBits] Array of collision trigger classes, corresponding to the different trigger bits defined in AliVEvent
82 TList ** fBGTrigClasses ; //[fNtriggerBits] Array of background trigger classes, corresponding to the different trigger bits defined in AliVEvent
83 TObjString * fHardwareTrigger ; //[fNtriggerLogics] Array of online trigger condition, corresponding to the different trigger logics set in Add...TriggerClass
84 TObjString * fOfflineTrigger ; //[fNtriggerLogics] Array of offline trigger condition, corresponding to the different trigger logics set in Add...TriggerClass
85 TMap * fBeamSide; // Map from the trigger classname to the beam side ("B", "A", "C", "E", "AC")
86 ClassDef(AliOADBPhysicsSelection, 1);