-
Notifications
You must be signed in to change notification settings - Fork 2
/
OHltMenu.h
202 lines (159 loc) · 3.81 KB
/
OHltMenu.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
//////////////////////////////////////////////////////////
// L1/HLT Menu Class
// Class to hold Open HLT Menu
// in form of maps b/w path names and L1Bits, Thresholds,
// Descriptions, Prescales.
// Author: Vladimir Rekovic (UMN) Date: Mar, 2008
//////////////////////////////////////////////////////////
#ifndef OHltMenu_h
#define OHltMenu_h
#include <iostream>
#include <vector>
#include <map>
#include <TROOT.h>
#include "HLTDatasets.h" //SAK
class OHltMenu
{
public:
OHltMenu();
OHltMenu(bool isL1)
{
isL1Menu = isL1;
}
virtual ~OHltMenu()
{
}
inline bool DoL1preLoop()
{
return doL1preloop;
}
inline bool IsL1Menu()
{
return isL1Menu;
}
inline bool IsHltMenu()
{
return !isL1Menu;
}
inline bool IsRealData()
{
return isRealData;
}
inline unsigned int GetTriggerSize()
{
return names.size();
}
inline std::vector<TString>& GetTriggerNames()
{
return names;
}
inline TString GetTriggerName(int i)
{
return names[i];
}
inline std::map<TString,float>& GetPrescaleMap()
{
return prescales;
}
inline float GetPrescale(int i)
{
return prescales[names[i]];
}
inline float GetPrescale(TString s)
{
return prescales[s];
}
inline std::map<TString,float>& GetEventsizeMap()
{
return eventSizes;
}
inline float GetEventsize(int i)
{
return eventSizes[names[i]];
}
inline TString GetSeedCondition(int i)
{
return seedcondition[names[i]];
}
inline TString GetSeedCondition(TString s)
{
return seedcondition[s];
}
inline int GetReferenceRunPrescale(int i)
{
return referenceRunPrescales[names[i]];
}
inline int GetReferenceRunPrescale(TString s)
{
return referenceRunPrescales[s];
}
void SetMapL1SeedsOfStandardHLTPath(std::map<TString, std::vector<TString> >);
std::map<TString, std::vector<TString> >& GetL1SeedsOfHLTPathMap()
{
return map_L1SeedsOfStandardHLTPath;
}
// mapping to all seeds
void AddTrigger(
TString trigname,
float prescale,
float eventSize);
void AddTrigger(
TString trigname,
TString seedcond,
float prescale,
float eventSize,
int referencePrescale);
void SetIsL1Menu(bool isL1)
{
isL1Menu=isL1;
}
void SetDoL1preloop(bool doL1prel)
{
doL1preloop=doL1prel;
}
void SetIsRealData(bool isRealDataLS)
{
isRealData=isRealDataLS;
}
void print();
// For L1 prescale preloop to be used in HLT mode only
void AddL1forPreLoop(TString trigname, float prescale);
inline unsigned int GetL1TriggerSize()
{
return L1names.size();
}
inline std::vector<TString>& GetL1Names()
{
return L1names;
}
inline TString GetL1TriggerName(int i)
{
return L1names[i];
}
inline std::map<TString,float>& GetL1PrescaleMap()
{
return L1prescales;
}
inline float GetL1Prescale(int i)
{
return L1prescales[L1names[i]];
}
inline float GetL1Prescale(TString s)
{
return L1prescales[s];
}
private:
bool isL1Menu; // if false: is HLTMenu
bool doL1preloop; // if false: is HLTMenu
bool isRealData; // if true: count lumi sections for real data
std::vector<TString> names;
std::map<TString,TString> seedcondition;
std::map<TString,float> eventSizes;
std::map<TString,float> prescales;
std::map<TString,int> referenceRunPrescales;
// For L1 prescale preloop to be used in HLT mode only
std::vector<TString> L1names;
std::map<TString,float> L1prescales;
std::map<TString, std::vector<TString> > map_L1SeedsOfStandardHLTPath; // mapping to all seeds
};
#endif