40 verbose_(iConfig.getUntrackedParameter<
bool>(
"verbose")),
44 produces<StringCollection>(
"failedTriggerDescription");
72 std::map<std::string, unsigned int> offlineNameBitMap;
79 if (
it != offlineNameBitMap.end()) {
83 <<
" not found in Offline " 94 TH1F *
h =
fs->make<TH1F>(
it->c_str(),
it->c_str(), 10, 0, 10);
95 TAxis *
a =
h->GetXaxis();
96 a->SetBinLabel(1,
"OnPass_OffPass");
97 a->SetBinLabel(2,
"OnFail_OffFail");
98 a->SetBinLabel(3,
"OnPass_OffFail");
99 a->SetBinLabel(4,
"OnFail_OffPass");
100 a->SetBinLabel(5,
"OnError_OffError");
101 a->SetBinLabel(6,
"OnRun_OffError");
102 a->SetBinLabel(7,
"OnError_OffRun");
103 a->SetBinLabel(8,
"OnRun_OffNotRun");
104 a->SetBinLabel(9,
"OnNotRun_OffRun");
105 a->SetBinLabel(10,
"OnNotRun_OffNotRun");
163 bool hasDisagreement =
false;
167 bool onRun = onlineResults->
wasrun(
i);
168 bool offRun = offlineResults->
wasrun(offlineTriggerBit);
169 bool onAccept = onlineResults->
accept(
i);
170 bool offAccept = offlineResults->
accept(offlineTriggerBit);
171 bool onError = onlineResults->
error(
i);
172 bool offError = offlineResults->
error(offlineTriggerBit);
175 if (onError || offError) {
176 if (onError && offError) {
178 }
else if (onError) {
183 }
else if ((!onRun) || (!offRun)) {
184 if ((!onRun) && (!offRun)) {
192 if (onAccept && offAccept) {
194 }
else if ((!onAccept) && (!offAccept)) {
196 }
else if (onAccept) {
216 std::ostringstream
desc;
218 resultDescription->push_back(
desc.str());
223 hasDisagreement =
true;
225 hasDisagreement =
true;
241 event.put(
std::move(resultDescription),
"failedTriggerDescription");
255 std::cout <<
"HLT-Compare ---------- Trigger Comparison Summary ----------" << std::endl;
256 std::cout <<
"HLT-Compare The following events had trigger mismatches:" << std::endl;
257 std::map<unsigned int, std::map<std::string, unsigned int>>::iterator
it;
259 std::cout <<
"HLT-Compare Event: " <<
it->first << std::endl;
260 std::map<std::string, unsigned int>::iterator jt;
261 for (jt =
it->second.begin(); jt !=
it->second.end(); ++jt) {
265 std::cout <<
"HLT-Compare ------------ End Trigger Comparison ------------" << std::endl;
static const std::string kSharedResource
bool accept() const
Has at least one path accepted the event?
unsigned int numTriggers_
std::vector< unsigned int > onlineToOfflineBitMappings_
bool error() const
Has any path encountered an error (exception)
Strings const & triggerNames() const
edm::EDGetTokenT< edm::TriggerResults > hltOnlineResults_
bool filter(edm::Event &, const edm::EventSetup &) override
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
HltComparator(const edm::ParameterSet &)
bool wasrun() const
Was at least one path run?
std::vector< TH1F * > comparisonHists_
edm::EDGetTokenT< edm::TriggerResults > hltOfflineResults_
std::vector< std::string > onlineActualNames_
std::vector< std::string > usePathList_
std::vector< std::string > offlineActualNames_
void initialise(const edm::TriggerResults &, const edm::TriggerResults &, edm::Event &e)
~HltComparator() override
std::string formatResult(const unsigned int)
std::vector< std::string > skipPathList_
std::vector< std::string > StringCollection
std::map< unsigned int, std::map< std::string, unsigned int > > triggerComparisonErrors_
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.