]>
Commit | Line | Data |
---|---|---|
37dde34e | 1 | // $Id: AliJRunHeader.h,v 1.1 2008/02/04 13:28:47 rak Exp $ |
2 | //////////////////////////////////////////////////// | |
3 | /*! | |
4 | \file AliJRunHeader.h | |
5 | \brief | |
6 | \author J. Rak, D.J.Kim, F.Krizek (Jyvaskyla || HIP) | |
7 | \email: djkim@cc.jyu.fi | |
8 | \version $Revision: 1.1 $ | |
9 | \date $Date: 2008/02/04 13:28:47 $ | |
10 | */ | |
11 | //////////////////////////////////////////////////// | |
12 | ||
13 | #ifndef ALIJRUNHEADER_H | |
14 | #define ALIJRUNHEADER_H | |
15 | #ifndef ROOT_TObject | |
16 | #include <TObject.h> | |
17 | #endif | |
18 | ||
19 | #include <TNamed.h> | |
20 | #include <TString.h> | |
21 | #include <TObjString.h> | |
22 | #include <TObjArray.h> | |
23 | #include <vector> | |
24 | #include <map> | |
25 | ||
26 | ||
27 | class AliJRunHeader : public TNamed { | |
28 | ||
29 | //#pragma link C++ class AliJRunHeader+; | |
30 | ||
31 | public: | |
32 | AliJRunHeader();//constructor | |
33 | AliJRunHeader(const AliJRunHeader& ap); | |
34 | ||
35 | virtual ~AliJRunHeader(){;} //destructor | |
36 | ||
37 | virtual Int_t GetRunNumber() const {return fRunNumber;} | |
38 | virtual void SetRunNumber(Int_t runN) { fRunNumber = runN;} | |
39 | ||
40 | ||
41 | void SetRunType(const TString info ) { fRunType = info; } | |
42 | TString GetRunType() const { return fRunType; } | |
43 | ||
44 | void SetESDInfo(const TString info ) { fESDInfo = info; } | |
45 | TString GetESDInfo() const { return fESDInfo; } | |
46 | ||
47 | // void SetESDInfo(const char* info ) { fESDInfo = info; } | |
48 | // char* GetESDInfo() const { return fESDInfo; } | |
49 | ||
50 | // s e t t e r s a n d g e t t e r s | |
51 | void SetL3Field(Short_t polarity,Double_t MagnetFieldInL3){ | |
52 | fL3MagnetPolarity = polarity; | |
53 | fMagneticFieldL3 = MagnetFieldInL3; | |
54 | } | |
55 | ||
56 | Short_t GetL3MagnetFieldPolarity() const { return fL3MagnetPolarity;} | |
57 | Double_t GetL3MagnetFieldIntensity() const { return fMagneticFieldL3;} | |
58 | ||
a10c1c2a | 59 | //--- Alice event trigger definition by BS like "kMB", "kHighMulti" |
60 | const std::map<TString, ULong64_t>& GetAliceTriggerDef() const { return fAliceTriggerDef; } | |
61 | ULong64_t GetAliceTriggerDef( const TString name ) const { return GetBitMaskDef( fAliceTriggerDef, name); } | |
62 | void AddAliceTriggerDef( const TString name, const ULong64_t mask){ fAliceTriggerDef[name]=mask; } | |
63 | void RemoveAliceTriggerDef( const TString name){ fAliceTriggerDef.erase(name); } | |
64 | ||
65 | //--- Alice track FilterMap by BS like "kEsdTrackCutsL" | |
66 | const std::map<TString, ULong64_t>& GetAliceFilterMapDef() const { return fAliceFilterMapDef; } | |
67 | ULong64_t GetAliceFilterMapDef( const TString name ) const { return GetBitMaskDef( fAliceFilterMapDef, name); } | |
68 | void AddAliceFilterMapDef( const TString name, const ULong64_t mask){ fAliceFilterMapDef[name]=mask; } | |
69 | void RemoveAliceFilterMapDef( const TString name){ fAliceFilterMapDef.erase(name); } | |
70 | ||
71 | //--- Common Method to handle BitMask Definition ( map<TString, ULong64_t> ) | |
72 | ULong64_t GetBitMaskDef( std::map<TString, ULong64_t> def, const TString name ) const{ | |
73 | std::map<TString, ULong64_t>::iterator _iter = def.find(name); | |
74 | //iter = def.find(name); | |
75 | if( _iter == def.end() ){ return 0; } | |
76 | else{ return _iter->second; } | |
77 | } | |
78 | ||
37dde34e | 79 | //-- Alice trigger table -- by Filip. "Trigger Class" like "+CMBACS2-B-NOPF-ALL" |
80 | void SetActiveTriggersAlice( const TString *triggers); | |
81 | Int_t GetActiveTriggerBitAlice(TString TriggerName); | |
82 | TString GetActiveTriggerAlice(Int_t TriggerBit) const { | |
83 | return ((TObjString*) (fActiveTriggersAlice.At(TriggerBit)))->GetString(); | |
84 | } | |
85 | ||
86 | //-- JCorran trigger table -- by Filip | |
87 | void SetActiveTriggersJCorran(const TString *triggers, Int_t range); | |
88 | TString GetActiveTriggerJCorran(Int_t TriggerBit) const { | |
89 | return ((TObjString*) (fActiveTriggersJCorran.At(TriggerBit)))->GetString(); | |
90 | } | |
91 | ||
92 | AliJRunHeader& operator=(const AliJRunHeader& header); | |
93 | ||
94 | void PrintOut(); | |
95 | ||
96 | protected: | |
97 | Int_t fRunNumber; //run number | |
98 | TString fRunType; // ex) LHC10h | |
99 | TString fESDInfo; // information of aliroot, root version while esd production | |
100 | // Char_t* fESDInfo; // information of aliroot, root version while esd production | |
101 | Short_t fL3MagnetPolarity; //Polarity of magnetic filed in L3 magnet (LHC convention: + -> +Bz) | |
102 | Double32_t fMagneticFieldL3; //Solenoid Magnetic Field in kG | |
103 | TObjArray fActiveTriggersAlice; //array maping between trigger bit and trigger names | |
104 | ||
c56ec698 | 105 | Int_t fSizeOfTableJCorran; //size of jcorran table |
a10c1c2a | 106 | // std::map<TString,ULong64_t> fAliceTriggerDef; //Alice event trigger definition by BS like "kMB", "kHighMulti" |
107 | // std::map<TString,ULong64_t> fAliceFilterMapDef;//Alice track FilterMap by BS like "kEsdTrackCutsL" | |
108 | ||
37dde34e | 109 | TObjArray fActiveTriggersJCorran; //array maping between trigger bit and trigger names |
110 | //TBit 0 = MB | |
a10c1c2a | 111 | std::map<TString,ULong64_t> fAliceTriggerDef; //Alice event trigger definition by BS like "kMB", "kHighMulti" |
112 | std::map<TString,ULong64_t> fAliceFilterMapDef;//Alice track FilterMap by BS like "kEsdTrackCutsL" | |
113 | //std::map<TString, ULong64_t>::iterator iter; | |
37dde34e | 114 | ClassDef(AliJRunHeader,2) |
115 | ||
116 | }; | |
117 | ||
118 | #endif |