33 hltOnlineResults_(consumes<edm::TriggerResults>(iConfig.getParameter<edm::
InputTag>(
"OnlineResults"))),
34 hltOfflineResults_(consumes<edm::TriggerResults>(iConfig.getParameter<edm::
InputTag>(
"OfflineResults"))),
36 verbose_(iConfig.getUntrackedParameter<bool>(
"verbose")),
37 skipPathList_(iConfig.getUntrackedParameter<std::vector<std::
string> >(
"skipPaths")),
38 usePathList_(iConfig.getUntrackedParameter<std::vector<std::
string> >(
"usePaths"))
41 produces<StringCollection >(
"failedTriggerDescription");
76 std::map<std::string, unsigned int >offlineNameBitMap;
82 std::map<std::string, unsigned int >::iterator it =
84 if (it != offlineNameBitMap.end()) {
90 <<
" not found in Offline "
102 TH1F *
h = fs->
make<TH1F>(it->c_str(), it->c_str(), 10, 0, 10);
103 TAxis *
a = h->GetXaxis();
104 a->SetBinLabel(1,
"OnPass_OffPass");
105 a->SetBinLabel(2,
"OnFail_OffFail");
106 a->SetBinLabel(3,
"OnPass_OffFail");
107 a->SetBinLabel(4,
"OnFail_OffPass");
108 a->SetBinLabel(5,
"OnError_OffError");
109 a->SetBinLabel(6,
"OnRun_OffError");
110 a->SetBinLabel(7,
"OnError_OffRun");
111 a->SetBinLabel(8,
"OnRun_OffNotRun");
112 a->SetBinLabel(9,
"OnNotRun_OffRun");
113 a->SetBinLabel(10,
"OnNotRun_OffNotRun");
171 initialise(*onlineResults, *offlineResults, event);
175 bool hasDisagreement =
false;
179 bool onRun = onlineResults->wasrun(
i);
180 bool offRun = offlineResults->wasrun(offlineTriggerBit);
181 bool onAccept = onlineResults->accept(
i);
182 bool offAccept = offlineResults->accept(offlineTriggerBit);
183 bool onError = onlineResults->error(
i);
184 bool offError = offlineResults->error(offlineTriggerBit);
187 if (onError || offError) {
188 if (onError && offError) {
198 else if ((!onRun) || (!offRun)) {
199 if ((!onRun) && (!offRun)) {
210 if (onAccept && offAccept) {
213 else if ((!onAccept) && (!offAccept)) {
236 std::cout <<
"Found disagreemenet " << result <<
", name is "
240 std::ostringstream desc;
242 resultDescription->push_back(desc.str());
250 hasDisagreement =
true;
253 hasDisagreement =
true;
259 if (
verbose() && (result > 1)) {
260 std::cout <<
"HLT-Compare: Event " <<
event.id().event()
270 event.put(resultDescription,
"failedTriggerDescription");
273 if ( hasDisagreement )
290 std::cout <<
"HLT-Compare ---------- Trigger Comparison Summary ----------" << std::endl;
291 std::cout <<
"HLT-Compare The following events had trigger mismatches:" << std::endl;
292 std::map<unsigned int, std::map<std::string, unsigned int> >::iterator it;
294 std::cout <<
"HLT-Compare Event: " << it->first << std::endl;
295 std::map<std::string, unsigned int>::iterator jt;
296 for(jt = it->second.begin(); jt != it->second.end(); ++jt) {
300 std::cout <<
"HLT-Compare ------------ End Trigger Comparison ------------" << std::endl;
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
unsigned int numTriggers_
std::vector< unsigned int > onlineToOfflineBitMappings_
virtual bool filter(edm::Event &, const edm::EventSetup &)
T * make(const Args &...args) const
make new ROOT object
edm::EDGetTokenT< edm::TriggerResults > hltOnlineResults_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Strings const & triggerNames() const
HltComparator(const edm::ParameterSet &)
std::vector< TH1F * > comparisonHists_
edm::EDGetTokenT< edm::TriggerResults > hltOfflineResults_
std::vector< std::string > onlineActualNames_
std::vector< std::string > usePathList_
std::vector< std::string > offlineActualNames_
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
void initialise(const edm::TriggerResults &, const edm::TriggerResults &, edm::Event &e)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
std::string formatResult(const unsigned int)
std::vector< std::string > skipPathList_
std::vector< std::string > StringCollection
volatile std::atomic< bool > shutdown_flag false
std::map< unsigned int, std::map< std::string, unsigned int > > triggerComparisonErrors_