CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
HLTHighLevel Class Reference

#include <HLTHighLevel.h>

Inheritance diagram for HLTHighLevel:
edm::EDFilter edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

bool filter (edm::Event &, const edm::EventSetup &) override
 
 HLTHighLevel (const edm::ParameterSet &)
 
std::vector< std::string > pathsFromSetup (const std::string &key, const edm::Event &, const edm::EventSetup &iSetup) const
 get HLTPaths with key 'key' from EventSetup (AlCaRecoTriggerBitsRcd) More...
 
 ~HLTHighLevel () override
 
- Public Member Functions inherited from edm::EDFilter
 EDFilter ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDFilter () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::EDFilter
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 

Private Member Functions

void init (const edm::TriggerResults &results, const edm::Event &, const edm::EventSetup &iSetup, const edm::TriggerNames &triggerNames)
 initialize the trigger conditions (call this if the trigger paths have changed) More...
 
std::string const & moduleLabel () const
 
std::string const & pathName (const edm::Event &) const
 stolen from HLTFilter More...
 

Private Attributes

bool andOr_
 false = and-mode (all requested triggers), true = or-mode (at least one) More...
 
const std::string eventSetupPathsKey_
 not empty => use read paths from AlCaRecoTriggerBitsRcd via this key More...
 
std::vector< unsigned int > HLTPathsByIndex_
 list of required HLT triggers by HLT index More...
 
std::vector< std::string > HLTPathsByName_
 list of required HLT triggers by HLT name More...
 
std::vector< std::string > HLTPatterns_
 input patterns that will be expanded into trigger names More...
 
edm::InputTag inputTag_
 HLT TriggerResults EDProduct. More...
 
edm::EDGetTokenT< edm::TriggerResultsinputToken_
 
bool throw_
 throw on any requested trigger being unknown More...
 
edm::ParameterSetID triggerNamesID_
 HLT trigger names. More...
 
edm::ESWatcher< AlCaRecoTriggerBitsRcd > * watchAlCaRecoTriggerBitsRcd_
 Watcher to be created and used if 'eventSetupPathsKey_' non empty: More...
 

Additional Inherited Members

- Public Types inherited from edm::EDFilter
typedef EDFilter ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<typename ESProduct , Transition Tr = Transition::Event>
auto esConsumes (eventsetup::EventSetupRecordKey const &, ESInputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

See header file for documentation

Author
Martin Grunewald

This class is an HLTFilter (-> EDFilter) implementing filtering on HLT bits

Author
Martin Grunewald

Definition at line 38 of file HLTHighLevel.h.

Constructor & Destructor Documentation

HLTHighLevel::HLTHighLevel ( const edm::ParameterSet iConfig)
explicit

Definition at line 38 of file HLTHighLevel.cc.

References eventSetupPathsKey_, Exception, edm::ParameterSet::getParameter(), HLTPatterns_, AlCaHLTBitMon_QueryRunRegistry::string, and watchAlCaRecoTriggerBitsRcd_.

38  :
39  inputTag_ (iConfig.getParameter<edm::InputTag> ("TriggerResultsTag")),
40  inputToken_ (consumes<edm::TriggerResults>(inputTag_)),
41  triggerNamesID_ (),
42  andOr_ (iConfig.getParameter<bool> ("andOr")),
43  throw_ (iConfig.getParameter<bool> ("throw")),
44  eventSetupPathsKey_(iConfig.getParameter<std::string>("eventSetupPathsKey")),
46  HLTPatterns_ (iConfig.getParameter<std::vector<std::string> >("HLTPaths")),
49 {
50  // names and slot numbers are computed during the event loop,
51  // as they need to access the TriggerNames object via the TriggerResults
52 
53  if (!eventSetupPathsKey_.empty()) {
54  // If paths come from eventsetup, we must watch for IOV changes.
55  if (!HLTPatterns_.empty()) {
56  // We do not want double trigger path setting, so throw!
57  throw cms::Exception("Configuration")
58  << " HLTHighLevel instance: "<< iConfig.getParameter<std::string>("@module_label")
59  << "\n configured with " << HLTPatterns_.size() << " HLTPaths and\n"
60  << " eventSetupPathsKey " << eventSetupPathsKey_ << ", choose either of them.";
61  }
63  }
64 }
T getParameter(std::string const &) const
bool andOr_
false = and-mode (all requested triggers), true = or-mode (at least one)
Definition: HLTHighLevel.h:68
std::vector< unsigned int > HLTPathsByIndex_
list of required HLT triggers by HLT index
Definition: HLTHighLevel.h:89
edm::ParameterSetID triggerNamesID_
HLT trigger names.
Definition: HLTHighLevel.h:65
edm::EDGetTokenT< edm::TriggerResults > inputToken_
Definition: HLTHighLevel.h:62
const std::string eventSetupPathsKey_
not empty => use read paths from AlCaRecoTriggerBitsRcd via this key
Definition: HLTHighLevel.h:78
bool throw_
throw on any requested trigger being unknown
Definition: HLTHighLevel.h:71
std::vector< std::string > HLTPathsByName_
list of required HLT triggers by HLT name
Definition: HLTHighLevel.h:86
std::vector< std::string > HLTPatterns_
input patterns that will be expanded into trigger names
Definition: HLTHighLevel.h:83
edm::InputTag inputTag_
HLT TriggerResults EDProduct.
Definition: HLTHighLevel.h:61
edm::ESWatcher< AlCaRecoTriggerBitsRcd > * watchAlCaRecoTriggerBitsRcd_
Watcher to be created and used if &#39;eventSetupPathsKey_&#39; non empty:
Definition: HLTHighLevel.h:80
HLTHighLevel::~HLTHighLevel ( )
override

Definition at line 66 of file HLTHighLevel.cc.

References watchAlCaRecoTriggerBitsRcd_.

67 {
68  delete watchAlCaRecoTriggerBitsRcd_; // safe on null pointer...
69 }
edm::ESWatcher< AlCaRecoTriggerBitsRcd > * watchAlCaRecoTriggerBitsRcd_
Watcher to be created and used if &#39;eventSetupPathsKey_&#39; non empty:
Definition: HLTHighLevel.h:80

Member Function Documentation

void HLTHighLevel::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 76 of file HLTHighLevel.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), DQMSequences_cfi::hltPaths, and AlCaHLTBitMon_QueryRunRegistry::string.

76  {
78  desc.add<edm::InputTag>("TriggerResultsTag",edm::InputTag("TriggerResults","","HLT"));
79  std::vector<std::string> hltPaths(0);
80  // # provide list of HLT paths (or patterns) you want
81  desc.add<std::vector<std::string> >("HLTPaths",hltPaths);
82  // # not empty => use read paths from AlCaRecoTriggerBitsRcd via this key
83  desc.add<std::string>("eventSetupPathsKey","");
84  // # how to deal with multiple triggers: True (OR) accept if ANY is true, False (AND) accept if ALL are true
85  desc.add<bool>("andOr",true);
86  // # throw exception on unknown path names
87  desc.add<bool>("throw",true);
88  descriptions.add("hltHighLevel", desc);
89 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
bool HLTHighLevel::filter ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
override

Definition at line 207 of file HLTHighLevel.cc.

References accept(), edm::HLTGlobalStatus::accept(), andOr_, edm::ESWatcher< T >::check(), edm::InputTag::encode(), Exception, edm::Event::getByToken(), HLTPathsByIndex_, HLTPathsByName_, mps_fire::i, init(), inputTag_, inputToken_, edm::HandleBase::isValid(), LogDebug, LogTrace, moduleLabel(), gen::n, or, edm::TriggerNames::parameterSetID(), pathName(), edm::HLTGlobalStatus::size(), AlCaHLTBitMon_QueryRunRegistry::string, throw_, edm::Event::triggerNames(), triggerNamesID_, and watchAlCaRecoTriggerBitsRcd_.

208 {
209  using namespace std;
210  using namespace edm;
211 
212  // get hold of TriggerResults Object
214  iEvent.getByToken(inputToken_, trh);
215  if (trh.isValid()) {
216  LogDebug("HLTHighLevel") << "TriggerResults found, number of HLT paths: " << trh->size();
217  } else {
218  LogError("HLTHighLevel") << "TriggerResults product " << inputTag_.encode() << " not found - returning result=false!";
219  return false;
220  }
221 
222  // init the TriggerNames with the TriggerResults
223  const edm::TriggerNames & triggerNames = iEvent.triggerNames(*trh);
224  bool config_changed = false;
225  if (triggerNamesID_ != triggerNames.parameterSetID()) {
226  triggerNamesID_ = triggerNames.parameterSetID();
227  config_changed = true;
228  }
229 
230  // (re)run the initialization stuff if
231  // - this is the first event
232  // - or the HLT table has changed
233  // - or selected trigger bits come from AlCaRecoTriggerBitsRcd and these changed
234  if (config_changed or (watchAlCaRecoTriggerBitsRcd_ and watchAlCaRecoTriggerBitsRcd_->check(iSetup))) {
235  this->init(*trh, iEvent, iSetup, triggerNames);
236  }
237  unsigned int n = HLTPathsByName_.size();
238  unsigned int nbad = 0;
239  unsigned int fired = 0;
240 
241  // count invalid and fired triggers
242  for (unsigned int i = 0; i < n; i++)
243  if (HLTPathsByIndex_[i] == (unsigned int) -1)
244  ++nbad;
245  else if (trh->accept(HLTPathsByIndex_[i]))
246  ++fired;
247 
248  if ((nbad > 0) and (config_changed or throw_)) {
249  // only generate the error message if it's actually going to be used
250  std::string message;
251 
252  for (unsigned int i = 0; i < n; i++)
253  if (HLTPathsByIndex_[i] == (unsigned int) -1)
254  message += HLTPathsByName_[i] + " ";
255 
256  if (config_changed) {
257  LogTrace("HLTHighLevel")
258  << " HLTHighLevel [instance: " << moduleLabel()
259  << " - path: " << pathName(iEvent)
260  << "] configured with " << nbad
261  << "/" << n
262  << " unknown HLT path names: " << message;
263  }
264 
265  if (throw_) {
266  throw cms::Exception("Configuration")
267  << " HLTHighLevel [instance: " << moduleLabel()
268  << " - path: " << pathName(iEvent)
269  << "] configured with " << nbad
270  << "/" << n
271  << " unknown HLT path names: " << message;
272  }
273  }
274 
275  // Boolean filter result (always at least one trigger)
276  const bool accept( (fired > 0) and ( andOr_ or (fired == n-nbad) ) );
277  LogDebug("HLTHighLevel") << "Accept = " << std::boolalpha << accept;
278 
279  return accept;
280 }
#define LogDebug(id)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:579
void init(const edm::TriggerResults &results, const edm::Event &, const edm::EventSetup &iSetup, const edm::TriggerNames &triggerNames)
initialize the trigger conditions (call this if the trigger paths have changed)
Definition: HLTHighLevel.cc:95
bool accept() const
Has at least one path accepted the event?
bool andOr_
false = and-mode (all requested triggers), true = or-mode (at least one)
Definition: HLTHighLevel.h:68
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:30
std::string encode() const
Definition: InputTag.cc:166
std::string const & moduleLabel() const
ParameterSetID const & parameterSetID() const
Definition: TriggerNames.cc:42
unsigned int size() const
Get number of paths stored.
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
std::vector< unsigned int > HLTPathsByIndex_
list of required HLT triggers by HLT index
Definition: HLTHighLevel.h:89
edm::ParameterSetID triggerNamesID_
HLT trigger names.
Definition: HLTHighLevel.h:65
bool isValid() const
Definition: HandleBase.h:74
#define LogTrace(id)
edm::EDGetTokenT< edm::TriggerResults > inputToken_
Definition: HLTHighLevel.h:62
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:57
bool throw_
throw on any requested trigger being unknown
Definition: HLTHighLevel.h:71
HLT enums.
std::string const & pathName(const edm::Event &) const
stolen from HLTFilter
std::vector< std::string > HLTPathsByName_
list of required HLT triggers by HLT name
Definition: HLTHighLevel.h:86
edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const override
Definition: Event.cc:301
edm::InputTag inputTag_
HLT TriggerResults EDProduct.
Definition: HLTHighLevel.h:61
edm::ESWatcher< AlCaRecoTriggerBitsRcd > * watchAlCaRecoTriggerBitsRcd_
Watcher to be created and used if &#39;eventSetupPathsKey_&#39; non empty:
Definition: HLTHighLevel.h:80
void HLTHighLevel::init ( const edm::TriggerResults results,
const edm::Event event,
const edm::EventSetup iSetup,
const edm::TriggerNames triggerNames 
)
private

initialize the trigger conditions (call this if the trigger paths have changed)

Definition at line 95 of file HLTHighLevel.cc.

References andOr_, edm::InputTag::encode(), eventSetupPathsKey_, Exception, HLTPathsByIndex_, HLTPathsByName_, HLTPatterns_, mps_fire::i, inputTag_, createfilelist::int, edm::is_glob(), LogDebug, LogTrace, match(), patRefSel_triggerMatching_cfi::matches, gen::n, pathsFromSetup(), listBenchmarks::pattern, edm::regexMatch(), edm::HLTGlobalStatus::size(), throw_, edm::TriggerNames::triggerIndex(), edm::TriggerNames::triggerName(), and edm::TriggerNames::triggerNames().

Referenced by filter().

99 {
100  unsigned int n;
101 
102  // clean up old data
103  HLTPathsByName_.clear();
104  HLTPathsByIndex_.clear();
105 
106  // Overwrite paths from EventSetup via AlCaRecoTriggerBitsRcd if configured:
107  if (!eventSetupPathsKey_.empty()) {
108  HLTPatterns_ = this->pathsFromSetup(eventSetupPathsKey_, event, iSetup);
109  }
110 
111  if (HLTPatterns_.empty()) {
112  // for empty input vector, default to all HLT trigger paths
113  n = result.size();
114  HLTPathsByName_.resize(n);
115  HLTPathsByIndex_.resize(n);
116  for (unsigned int i = 0; i < n; ++i) {
117  HLTPathsByName_[i] = triggerNames.triggerName(i);
118  HLTPathsByIndex_[i] = i;
119  }
120  } else {
121  // otherwise, expand wildcards in trigger names...
122  for(auto const& pattern : HLTPatterns_) {
123  if (edm::is_glob(pattern)) {
124  // found a glob pattern, expand it
125  std::vector< std::vector<std::string>::const_iterator > matches = edm::regexMatch(triggerNames.triggerNames(), pattern);
126  if (matches.empty()) {
127  // pattern does not match any trigger paths
128  if (throw_)
129  throw cms::Exception("Configuration") << "requested pattern \"" << pattern << "\" does not match any HLT paths";
130  else
131  edm::LogInfo("Configuration") << "requested pattern \"" << pattern << "\" does not match any HLT paths";
132  } else {
133  // store the matching patterns
134  for(auto const& match : matches)
135  HLTPathsByName_.push_back(*match);
136  }
137  } else {
138  // found a trigger name, just copy it
139  HLTPathsByName_.push_back(pattern);
140  }
141  }
142  n = HLTPathsByName_.size();
143 
144  // ...and get hold of trigger indices
145  bool valid = false;
146  HLTPathsByIndex_.resize(n);
147  for (unsigned int i = 0; i < HLTPathsByName_.size(); i++) {
148  HLTPathsByIndex_[i] = triggerNames.triggerIndex(HLTPathsByName_[i]);
149  if (HLTPathsByIndex_[i] < result.size()) {
150  valid = true;
151  } else {
152  // trigger path not found
153  HLTPathsByIndex_[i] = (unsigned int) -1;
154  if (throw_)
155  throw cms::Exception("Configuration") << "requested HLT path \"" << HLTPathsByName_[i] << "\" does not exist";
156  else
157  edm::LogInfo("Configuration") << "requested HLT path \"" << HLTPathsByName_[i] << "\" does not exist";
158  }
159  }
160 
161  if (not valid) {
162  // no point in throwing - if requested, it should have already happened
163  edm::LogWarning("Configuration") << "none of the requested paths and pattern match any HLT path - no events will be selected";
164  }
165 
166  }
167 
168  // report on what is finally used
169  LogDebug("HLTHighLevel") << "HLT trigger paths: " + inputTag_.encode()
170  << " - Number of paths: " << n
171  << " - andOr mode: " << andOr_
172  << " - throw mode: " << throw_;
173 
174  LogTrace("HLTHighLevel") << "The HLT trigger paths (# index name):";
175  for (unsigned int i = 0; i < n; ++i)
176  if (HLTPathsByIndex_[i] == (unsigned int) -1)
177  LogTrace("HLTHighLevel") << " n/a " << HLTPathsByName_[i];
178  else
179  LogTrace("HLTHighLevel") << " " << std::setw(4) << HLTPathsByIndex_[i] << " " << HLTPathsByName_[i];
180 
181 }
#define LogDebug(id)
bool is_glob(std::string const &pattern)
Definition: RegexMatch.cc:18
bool andOr_
false = and-mode (all requested triggers), true = or-mode (at least one)
Definition: HLTHighLevel.h:68
Strings const & triggerNames() const
Definition: TriggerNames.cc:24
std::string encode() const
Definition: InputTag.cc:166
unsigned int triggerIndex(std::string const &name) const
Definition: TriggerNames.cc:32
std::vector< unsigned int > HLTPathsByIndex_
list of required HLT triggers by HLT index
Definition: HLTHighLevel.h:89
#define LogTrace(id)
const std::string eventSetupPathsKey_
not empty => use read paths from AlCaRecoTriggerBitsRcd via this key
Definition: HLTHighLevel.h:78
std::string const & triggerName(unsigned int index) const
Definition: TriggerNames.cc:27
std::vector< std::string > pathsFromSetup(const std::string &key, const edm::Event &, const edm::EventSetup &iSetup) const
get HLTPaths with key &#39;key&#39; from EventSetup (AlCaRecoTriggerBitsRcd)
std::vector< std::vector< std::string >::const_iterator > regexMatch(std::vector< std::string > const &strings, std::regex const &regexp)
Definition: RegexMatch.cc:30
bool throw_
throw on any requested trigger being unknown
Definition: HLTHighLevel.h:71
std::vector< std::string > HLTPathsByName_
list of required HLT triggers by HLT name
Definition: HLTHighLevel.h:86
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10
std::vector< std::string > HLTPatterns_
input patterns that will be expanded into trigger names
Definition: HLTHighLevel.h:83
edm::InputTag inputTag_
HLT TriggerResults EDProduct.
Definition: HLTHighLevel.h:61
std::string const & HLTHighLevel::moduleLabel ( ) const
private

Definition at line 287 of file HLTHighLevel.cc.

References edm::EDFilter::moduleDescription(), and edm::ModuleDescription::moduleLabel().

Referenced by filter(), and pathsFromSetup().

287  {
288  return moduleDescription().moduleLabel();
289 }
std::string const & moduleLabel() const
ModuleDescription const & moduleDescription() const
Definition: EDFilter.h:53
std::string const & HLTHighLevel::pathName ( const edm::Event event) const
private

stolen from HLTFilter

Definition at line 283 of file HLTHighLevel.cc.

Referenced by filter(), and pathsFromSetup().

283  {
284  return event.moduleCallingContext()->placeInPathContext()->pathContext()->pathName();
285 }
std::vector< std::string > HLTHighLevel::pathsFromSetup ( const std::string &  key,
const edm::Event event,
const edm::EventSetup iSetup 
) const

get HLTPaths with key 'key' from EventSetup (AlCaRecoTriggerBitsRcd)

Definition at line 185 of file HLTHighLevel.cc.

References AlCaRecoTriggerBits::decompose(), Exception, edm::EventSetup::get(), AlCaRecoTriggerBits::m_alcarecoToTrig, moduleLabel(), and pathName().

Referenced by init().

186 {
187  // Get map of strings to concatenated list of names of HLT paths from EventSetup:
189  iSetup.get<AlCaRecoTriggerBitsRcd>().get(triggerBits);
190  typedef std::map<std::string, std::string> TriggerMap;
191  const TriggerMap &triggerMap = triggerBits->m_alcarecoToTrig;
192 
193  auto listIter = triggerMap.find(key);
194  if (listIter == triggerMap.end()) {
195  throw cms::Exception("Configuration")
196  << " HLTHighLevel [instance: " << moduleLabel() << " - path: " << pathName(event)
197  << "]: No triggerList with key " << key << " in AlCaRecoTriggerBitsRcd";
198  }
199 
200  // We must avoid a map<string,vector<string> > in DB for performance reason,
201  // so the paths are mapped into one string that we have to decompose:
202  return triggerBits->decompose(listIter->second);
203 }
std::map< std::string, std::string > m_alcarecoToTrig
std::vector< std::string > decompose(const std::string &concatPaths) const
Decompose one value of map from concatenated string.
std::string const & moduleLabel() const
T get() const
Definition: EventSetup.h:68
std::string const & pathName(const edm::Event &) const
stolen from HLTFilter

Member Data Documentation

bool HLTHighLevel::andOr_
private

false = and-mode (all requested triggers), true = or-mode (at least one)

Definition at line 68 of file HLTHighLevel.h.

Referenced by filter(), and init().

const std::string HLTHighLevel::eventSetupPathsKey_
private

not empty => use read paths from AlCaRecoTriggerBitsRcd via this key

Definition at line 78 of file HLTHighLevel.h.

Referenced by HLTHighLevel(), and init().

std::vector<unsigned int> HLTHighLevel::HLTPathsByIndex_
private

list of required HLT triggers by HLT index

Definition at line 89 of file HLTHighLevel.h.

Referenced by filter(), and init().

std::vector<std::string> HLTHighLevel::HLTPathsByName_
private

list of required HLT triggers by HLT name

Definition at line 86 of file HLTHighLevel.h.

Referenced by filter(), and init().

std::vector<std::string> HLTHighLevel::HLTPatterns_
private

input patterns that will be expanded into trigger names

Definition at line 83 of file HLTHighLevel.h.

Referenced by HLTHighLevel(), and init().

edm::InputTag HLTHighLevel::inputTag_
private

HLT TriggerResults EDProduct.

Definition at line 61 of file HLTHighLevel.h.

Referenced by filter(), and init().

edm::EDGetTokenT<edm::TriggerResults> HLTHighLevel::inputToken_
private

Definition at line 62 of file HLTHighLevel.h.

Referenced by filter().

bool HLTHighLevel::throw_
private

throw on any requested trigger being unknown

Definition at line 71 of file HLTHighLevel.h.

Referenced by filter(), and init().

edm::ParameterSetID HLTHighLevel::triggerNamesID_
private

HLT trigger names.

Definition at line 65 of file HLTHighLevel.h.

Referenced by filter().

edm::ESWatcher<AlCaRecoTriggerBitsRcd>* HLTHighLevel::watchAlCaRecoTriggerBitsRcd_
private

Watcher to be created and used if 'eventSetupPathsKey_' non empty:

Definition at line 80 of file HLTHighLevel.h.

Referenced by filter(), HLTHighLevel(), and ~HLTHighLevel().