41 |
|
} |
42 |
|
|
43 |
|
//-------------------------------------------------------------------------------------------------- |
44 |
< |
void HLTMod::AddTrigger(const char *expr) |
44 |
> |
void HLTMod::AddTrigger(const char *expr, UInt_t firstRun, UInt_t lastRun) |
45 |
|
{ |
46 |
|
// Add trigger search pattern to the list of patters. Each element of the list is logically |
47 |
|
// "ored". The given expression can contain several trigger names logically "anded" (using "&"). |
49 |
|
// "A", "!A", "A&B", "A&!B" or "A&B&C" |
50 |
|
|
51 |
|
string tname(expr); |
52 |
< |
fTrigNames.push_back(tname); |
52 |
> |
std::pair<std::string,std::pair<UInt_t,UInt_t> > element(tname,std::pair<UInt_t,UInt_t>(firstRun,lastRun)); |
53 |
> |
fTrigNames.push_back(element); |
54 |
|
} |
55 |
|
|
56 |
|
//-------------------------------------------------------------------------------------------------- |
96 |
|
Info("BeginRun", "Get trigger table for run %d", GetEventHeader()->RunNum()); |
97 |
|
fTriggers->Print(); |
98 |
|
} |
99 |
+ |
|
100 |
+ |
UInt_t runNumber = GetEventHeader()->RunNum(); |
101 |
|
|
102 |
|
for (UInt_t i=0; i<fTrigNames.size(); ++i) { |
103 |
+ |
|
104 |
+ |
UInt_t firstRun = fTrigNames.at(i).second.first; |
105 |
+ |
UInt_t lastRun = fTrigNames.at(i).second.second; |
106 |
+ |
|
107 |
+ |
if ( (!(firstRun==0 && lastRun==0)) && ( runNumber<firstRun || runNumber>lastRun ) ) continue; |
108 |
+ |
|
109 |
|
BitMask256 tmask; //trigger mask |
110 |
|
BitMask256 amask; //bitand mask |
111 |
< |
TString names(fTrigNames.at(i).c_str()); |
111 |
> |
TString names(fTrigNames.at(i).first.c_str()); |
112 |
|
|
113 |
|
TObjArray *arr = names.Tokenize("&"); |
114 |
|
if (arr) { |