100 using namespace reco;
101 using namespace trigger;
125 std::vector<std::string> activeHLTPathsInThisEvent =
hltConfig.triggerNames();
126 std::map<std::string, bool> triggerInMenu;
127 std::map<std::string, bool> triggerUnprescaled;
135 for (std::vector<std::string>::const_iterator iHLT = activeHLTPathsInThisEvent.begin();
136 iHLT != activeHLTPathsInThisEvent.end();
140 if (TString(*iHLT).Contains(TRegexp(
hltTag_))) {
141 triggerInMenu[*iHLT] =
true;
143 triggerUnprescaled[*iHLT] =
true;
148 if (not trgEvent.isValid()) {
162 std::vector<int>
index;
163 std::vector<std::string>
filters;
166 for (std::map<std::string, bool>::const_iterator iMyHLT = triggerInMenu.begin(); iMyHLT != triggerInMenu.end();
168 if (!(iMyHLT->second && triggerUnprescaled[iMyHLT->first]))
171 int triggerIndex = -1;
175 triggerIndex =
hltConfig.triggerIndex(iMyHLT->first);
177 cout <<
"bad trigger\n";
180 if (triggerIndex == -1 || !(pTrgResults->wasrun(triggerIndex)) || !(pTrgResults->accept(triggerIndex)) ||
181 (pTrgResults->error(triggerIndex))) {
187 int testindex = trgEvent->filterIndex(testTag);
188 if (!(testindex >= trgEvent->sizeFilters())) {
195 index.push_back(trgEvent->filterIndex(filterTag));
205 for (
size_t i = 0;
i < candHandle->size(); ++
i) {
207 refs.push_back(candHandle->refAt(
i));
212 bool hltTrigger =
false;
213 for (
unsigned int idx = 0; idx <
index.size(); ++idx) {
221 for (
int ipart = 0; ipart != nK; ++ipart) {
231 outColRef->push_back(refs[
counter]);
232 outColPtr->push_back(ptrVect[counter]);
HLTPrescaleProvider hltPrescaleProvider_
T prescaleValue(const edm::Event &iEvent, const edm::EventSetup &iSetup, const std::string &trigger)
combining the two methods above
Log< level::Error, false > LogError
std::vector< TPRegexp > filters
edm::InputTag _inputProducer
Single trigger physics object (e.g., an isolated muon)
edm::EDGetTokenT< edm::View< object > > _inputProducerToken
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Log< level::Info, false > LogInfo
edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
edm::EDGetTokenT< trigger::TriggerEvent > triggerEventToken_
std::vector< size_type > Keys
HLTConfigProvider const & hltConfigProvider() const
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
static std::atomic< unsigned int > counter
void push_back(const RefToBase< T > &)
edm::InputTag triggerEventTag_