StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StDetectorDbTriggerID.h
1 // $Id: StDetectorDbTriggerID.h,v 1.14 2007/08/10 15:57:45 fisyak Exp $
2 //
3 // $Log: StDetectorDbTriggerID.h,v $
4 // Revision 1.14 2007/08/10 15:57:45 fisyak
5 // Fix bug in chairs destractors, clean up, add debug print outs
6 //
7 // Revision 1.13 2007/07/12 19:23:15 fisyak
8 // Provide access to Db tables by demand only
9 //
10 // Revision 1.12 2007/05/11 05:30:33 dunlop
11 // Add in the additionalTriggerID table
12 //
13 // Revision 1.11 2006/05/04 17:44:34 dunlop
14 // moved $LOG
15 //
16 // Revision 1.10 2006/05/04 17:39:57 dunlop
17 // Doxygenized and cvs commented
18 //
19 
30 #ifndef StDetectorDbTriggerID_h
31 #define StDetectorDbTriggerID_h
32 
33 #include <map>
34 
35 #include "St_triggerIDC.h"
36 #include "St_trigPrescalesC.h"
37 #include "St_L0TriggerInfoC.h"
38 #include "St_defaultTrgLvlC.h"
39 #include "St_trigL3ExpandedC.h"
40 #include "St_dsmPrescalesC.h"
41 #include "St_additionalTriggerIDC.h"
42 
43 
44 
45 enum { kDbTriggerBadID = 999 };
46 
48  public:
49  static StDetectorDbTriggerID* instance() {if (! fgInstance) fgInstance = new StDetectorDbTriggerID(); return fgInstance;};
50  virtual ~StDetectorDbTriggerID() {fgInstance = 0;}
54  UInt_t getIDNumRows() {return St_triggerIDC::instance()->getNumRows();}
55  UInt_t getIDRunNumber() {return St_triggerIDC::instance()->runNumber();}
56  UInt_t getIdxTrg(UInt_t entry = 0) {return St_triggerIDC::instance()->idxTrg(entry);}
57  UInt_t getDaqTrgId(UInt_t entry = 0) {return St_triggerIDC::instance()->daqTrgId(entry);}
58  UInt_t getOfflineTrgId(UInt_t entry = 0) {return St_triggerIDC::instance()->offlineTrgId(entry);}
59  UInt_t getTrgNameVersion(UInt_t entry = 0) {return St_triggerIDC::instance()->trgNameVersion(entry);}
60  UInt_t getTrgVersion(UInt_t entry = 0) {return St_triggerIDC::instance()->trgVersion(entry);}
61  UInt_t getThreashVersion(UInt_t entry = 0) {return St_triggerIDC::instance()->threashVersion(entry);}
62  UInt_t getPsVersion(UInt_t entry = 0) {return St_triggerIDC::instance()->psVersion(entry);}
63 
69  UInt_t getSNumRows() {return St_trigPrescalesC::instance()->getNumRows();}
70  Int_t getSRunNumber() {return St_trigPrescalesC::instance()->runNumber();}
71  Int_t getIdxTrigger(UInt_t entry = 0) {return St_trigPrescalesC::instance()->idxTrigger(entry);}
72  Int_t getIdxLevel(UInt_t entry = 0) {return St_trigPrescalesC::instance()->idxLevel(entry);}
73  Int_t getId(UInt_t entry = 0) {return St_trigPrescalesC::instance()->id(entry);}
74  Float_t getPs(UInt_t entry = 0) {return St_trigPrescalesC::instance()->ps(entry);}
75 
81  UInt_t getL0NumRows() {return St_L0TriggerInfoC::instance()->getNumRows();}
82  Int_t getL0RunNumber() {return St_L0TriggerInfoC::instance()->runNumber();}
83  Int_t getL0DaqTrgId(UInt_t entry = 0) {return St_L0TriggerInfoC::instance()->daqTriggerId(entry);}
84  Int_t getL0OfflineTrgId(UInt_t entry = 0) {return St_L0TriggerInfoC::instance()->offlineTriggerId(entry);}
85  Int_t getPsL0(UInt_t entry = 0) {return St_L0TriggerInfoC::instance()->psL0(entry);}
86  Char_t* getName(UInt_t entry = 0) {return St_L0TriggerInfoC::instance()->name(entry);}
87  UInt_t getDetectorLiveOnBits(UInt_t entry = 0) {return St_L0TriggerInfoC::instance()->detectorLiveOnBits(entry);}
88  UInt_t getDetectorLiveOffBits(UInt_t entry = 0) {return St_L0TriggerInfoC::instance()->detectorLiveOffBits(entry);}
89  UInt_t getDetectorRequest(UInt_t entry = 0) {return St_L0TriggerInfoC::instance()->detectorRequest(entry);}
90 
96  UInt_t getTrigL3ExpandedNumRows() {return St_trigL3ExpandedC::instance()->getNumRows();}
97  Int_t getTrigL3ExpandedRunNumber() {return St_trigL3ExpandedC::instance()->runNumber();}
98  Char_t* getTrigL3ExpandedL2TriggerResultType(UInt_t entry=0) {return St_trigL3ExpandedC::instance()->l2TriggerResultType(entry);}
99  Int_t getTrigL3ExpandedL3TrgId(UInt_t entry=0) {return St_trigL3ExpandedC::instance()->l3TrgId(entry);}
100  Int_t getTrigL3ExpandedL3ExpandedTrgId(UInt_t entry=0) {return St_trigL3ExpandedC::instance()->l3ExpandedTrgId(entry);}
101  Int_t getTrigL3ExpandedL2Algo(UInt_t entry=0) {return St_trigL3ExpandedC::instance()->l2Algo(entry);}
102  Float_t getTrigL3ExpandedL2Ps(UInt_t entry=0) {return St_trigL3ExpandedC::instance()->l2Ps(entry);}
103  Char_t* getTrigL3ExpandedName(UInt_t entry=0) {return (Char_t *) St_trigL3ExpandedC::instance()->name(entry);}
104 
105 
110  UInt_t getDsmPrescalesNumRows() {return St_dsmPrescalesC::instance()->getNumRows();}
111  Int_t getDsmPrescalesRunNumber() {return St_dsmPrescalesC::instance()->runNumber();}
112  Int_t getDsmPrescalesTrgId(UInt_t entry=0) {return St_dsmPrescalesC::instance()->trgId(entry);}
113  Int_t getDsmPrescalesDsmPrescale(UInt_t entry=0) {return St_dsmPrescalesC::instance()->dsmPrescale(entry);}
114 
121  UInt_t getDefaultTriggerLevel() {return St_defaultTrgLvlC::instance()->level();}
122 
127  Float_t getTotalPrescaleByTrgId(Int_t trgId);
128  map<Int_t,Float_t> getTotalPrescales();
138  UInt_t getAdditionalTriggerIDNumRows() {return St_additionalTriggerIDC::instance()->getNumRows();}
139  UInt_t getAdditionalTriggerIDRunNumber(UInt_t entry=0) {return St_additionalTriggerIDC::instance()->runNumber(entry);}
140  UInt_t getAdditionalTriggerIDEventNumber(UInt_t entry = 0) {return St_additionalTriggerIDC::instance()->eventNumber(entry);}
141  UInt_t getAdditionalTriggerIDIdxTrg(UInt_t entry = 0) {return St_additionalTriggerIDC::instance()->idxTrg(entry);}
142  UInt_t getAdditionalTriggerIDDaqTrgId(UInt_t entry = 0) {return St_additionalTriggerIDC::instance()->daqTrgId(entry);}
143  UInt_t getAdditionalTriggerIDOfflineTrgId(UInt_t entry = 0) {return St_additionalTriggerIDC::instance()->offlineTrgId(entry);}
144  UInt_t getAdditionalTriggerIDTrgNameVersion(UInt_t entry = 0) {return St_additionalTriggerIDC::instance()->trgNameVersion(entry);}
145  UInt_t getAdditionalTriggerIDTrgVersion(UInt_t entry = 0) {return St_additionalTriggerIDC::instance()->trgVersion(entry);}
146  UInt_t getAdditionalTriggerIDThreashVersion(UInt_t entry = 0) {return St_additionalTriggerIDC::instance()->threashVersion(entry);}
147  UInt_t getAdditionalTriggerIDPsVersion(UInt_t entry = 0) {return St_additionalTriggerIDC::instance()->psVersion(entry);}
148  private:
149  static StDetectorDbTriggerID* fgInstance;
150 };
151 #endif
map< Int_t, Float_t > getTotalPrescales()
Accessor to the database for trigger id information.
Float_t getTotalPrescaleByTrgId(Int_t trgId)