CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
pat::PATTriggerEventProducer Class Reference

Produces the central entry point to full PAT trigger information. More...

Inheritance diagram for pat::PATTriggerEventProducer:
edm::stream::EDProducer<>

Public Member Functions

 PATTriggerEventProducer (const edm::ParameterSet &iConfig)
 
 ~PATTriggerEventProducer () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Private Member Functions

void beginLuminosityBlock (const edm::LuminosityBlock &iLumi, const edm::EventSetup &iSetup) override
 
void beginRun (const edm::Run &iRun, const edm::EventSetup &iSetup) override
 
void produce (edm::Event &iEvent, const edm::EventSetup &iSetup) override
 

Private Attributes

bool autoProcessName_
 
edm::ConditionsInLumiBlock condLumi_
 
edm::ConditionsInRunBlock condRun_
 
bool gtCondLumiInit_ = false
 
bool gtCondRunInit_ = false
 
const edm::ESGetToken
< L1GtTriggerMenu,
L1GtTriggerMenuRcd
handleL1GtTriggerMenuToken_
 
HLTConfigProvider hltConfig_
 
bool hltConfigInit_
 
edm::EDGetTokenT
< L1GlobalTriggerReadoutRecord
l1GtToken_
 
std::string nameProcess_
 
edm::InputTag tagCondGt_
 
edm::EDGetTokenT
< edm::ConditionsInEventBlock
tagCondGtEventToken_
 
edm::EDGetTokenT
< edm::ConditionsInLumiBlock
tagCondGtLumiToken_
 
edm::EDGetTokenT
< edm::ConditionsInRunBlock
tagCondGtRunToken_
 
edm::InputTag tagL1Gt_
 
std::vector< edm::InputTagtagsTriggerMatcher_
 
edm::InputTag tagTriggerEvent_
 
edm::InputTag tagTriggerProducer_
 
edm::InputTag tagTriggerResults_
 
edm::EDGetTokenT
< TriggerAlgorithmCollection
triggerAlgorithmCollectionToken_
 
edm::EDGetTokenT
< TriggerConditionCollection
triggerConditionCollectionToken_
 
edm::EDGetTokenT
< TriggerFilterCollection
triggerFilterCollectionToken_
 
std::vector< edm::EDGetTokenT
< TriggerObjectStandAloneMatch > > 
triggerMatcherTokens_
 
edm::EDGetTokenT
< TriggerObjectCollection
triggerObjectCollectionToken_
 
edm::EDGetTokenT
< TriggerPathCollection
triggerPathCollectionToken_
 
edm::GetterOfProducts
< edm::TriggerResults
triggerResultsGetter_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
using CacheTypes = CacheContexts< T...>
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T...>
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

Detailed Description

Produces the central entry point to full PAT trigger information.

This producer extract general trigger and conditions information from

For me information, s. https://twiki.cern.ch/twiki/bin/view/CMS/SWGuidePATTrigger

Author
Volker Adler
Version
Id:
PATTriggerEventProducer.h,v 1.11 2010/11/27 15:16:20 vadler Exp

Definition at line 53 of file PATTriggerEventProducer.cc.

Constructor & Destructor Documentation

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

Definition at line 99 of file PATTriggerEventProducer.cc.

References DeDxTools::esConsumes().

100  : nameProcess_(iConfig.getParameter<std::string>("processName")),
102  tagTriggerProducer_("patTrigger"),
104  // L1 configuration parameters
105  tagL1Gt_(),
106  // HLTConfigProvider
107  hltConfigInit_(false),
108  // HLT configuration parameters
109  tagTriggerResults_("TriggerResults"),
110  tagTriggerEvent_("hltTriggerSummaryAOD"),
111  // Conditions configuration parameters
112  tagCondGt_(),
113  // Conditions
114  condRun_(),
115  condLumi_(),
117  if (iConfig.exists("triggerResults"))
118  tagTriggerResults_ = iConfig.getParameter<InputTag>("triggerResults");
123  this);
124  if (iConfig.exists("triggerEvent"))
125  tagTriggerEvent_ = iConfig.getParameter<InputTag>("triggerEvent");
126  if (iConfig.exists("patTriggerProducer"))
127  tagTriggerProducer_ = iConfig.getParameter<InputTag>("patTriggerProducer");
128  triggerAlgorithmCollectionToken_ = mayConsume<TriggerAlgorithmCollection>(tagTriggerProducer_);
129  triggerConditionCollectionToken_ = mayConsume<TriggerConditionCollection>(tagTriggerProducer_);
130  triggerPathCollectionToken_ = mayConsume<TriggerPathCollection>(tagTriggerProducer_);
131  triggerFilterCollectionToken_ = mayConsume<TriggerFilterCollection>(tagTriggerProducer_);
132  triggerObjectCollectionToken_ = mayConsume<TriggerObjectCollection>(tagTriggerProducer_);
133  if (iConfig.exists("condGtTag")) {
134  tagCondGt_ = iConfig.getParameter<InputTag>("condGtTag");
135  tagCondGtRunToken_ = mayConsume<ConditionsInRunBlock, InRun>(tagCondGt_);
136  tagCondGtLumiToken_ = mayConsume<ConditionsInLumiBlock, InLumi>(tagCondGt_);
137  tagCondGtEventToken_ = mayConsume<ConditionsInEventBlock>(tagCondGt_);
138  }
139  if (iConfig.exists("l1GtTag"))
140  tagL1Gt_ = iConfig.getParameter<InputTag>("l1GtTag");
141  l1GtToken_ = mayConsume<L1GlobalTriggerReadoutRecord>(tagL1Gt_);
142  if (iConfig.exists("patTriggerMatches"))
143  tagsTriggerMatcher_ = iConfig.getParameter<std::vector<InputTag> >("patTriggerMatches");
145  tagsTriggerMatcher_, [this](InputTag const& tag) { return mayConsume<TriggerObjectStandAloneMatch>(tag); });
146 
147  callWhenNewProductsRegistered([this](BranchDescription const& bd) {
148  if (not(this->autoProcessName_ and bd.processName() == this->moduleDescription().processName())) {
150  }
151  });
152 
153  for (size_t iMatch = 0; iMatch < tagsTriggerMatcher_.size(); ++iMatch) {
154  produces<TriggerObjectMatch>(tagsTriggerMatcher_.at(iMatch).label());
155  }
156  produces<TriggerEvent>();
157 }
edm::EDGetTokenT< TriggerObjectCollection > triggerObjectCollectionToken_
std::vector< edm::EDGetTokenT< TriggerObjectStandAloneMatch > > triggerMatcherTokens_
edm::EDGetTokenT< edm::ConditionsInLumiBlock > tagCondGtLumiToken_
edm::EDGetTokenT< TriggerConditionCollection > triggerConditionCollectionToken_
const edm::ESGetToken< L1GtTriggerMenu, L1GtTriggerMenuRcd > handleL1GtTriggerMenuToken_
edm::GetterOfProducts< edm::TriggerResults > triggerResultsGetter_
bool exists(std::string const &parameterName) const
checks if a parameter exists
edm::EDGetTokenT< TriggerPathCollection > triggerPathCollectionToken_
std::string const & processName() const
auto vector_transform(std::vector< InputType > const &input, Function predicate) -> std::vector< typename std::remove_cv< typename std::remove_reference< decltype(predicate(input.front()))>::type >::type >
Definition: transform.h:11
edm::EDGetTokenT< edm::ConditionsInEventBlock > tagCondGtEventToken_
edm::EDGetTokenT< edm::ConditionsInRunBlock > tagCondGtRunToken_
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > l1GtToken_
edm::EDGetTokenT< TriggerAlgorithmCollection > triggerAlgorithmCollectionToken_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::ConditionsInRunBlock condRun_
std::string const & label() const
Definition: InputTag.h:36
std::vector< edm::InputTag > tagsTriggerMatcher_
edm::EDGetTokenT< TriggerFilterCollection > triggerFilterCollectionToken_
edm::ConditionsInLumiBlock condLumi_
std::string const & instance() const
Definition: InputTag.h:37
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
pat::PATTriggerEventProducer::~PATTriggerEventProducer ( )
inlineoverride

Definition at line 56 of file PATTriggerEventProducer.cc.

56 {};

Member Function Documentation

void PATTriggerEventProducer::beginLuminosityBlock ( const edm::LuminosityBlock iLumi,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 224 of file PATTriggerEventProducer.cc.

References condLumi_, edm::InputTag::encode(), edm::LuminosityBlock::getByToken(), gtCondLumiInit_, edm::HandleBase::isValid(), edm::InputTag::label(), nameProcess_, tagCondGt_, and tagCondGtLumiToken_.

224  {
225  // Terminate, if auto process name determination failed
226  if (nameProcess_ == "*")
227  return;
228 
229  gtCondLumiInit_ = false;
230  if (!tagCondGt_.label().empty()) {
231  Handle<ConditionsInLumiBlock> condLumiBlock;
232  iLuminosityBlock.getByToken(tagCondGtLumiToken_, condLumiBlock);
233  if (condLumiBlock.isValid()) {
234  condLumi_ = *condLumiBlock;
235  gtCondLumiInit_ = true;
236  } else {
237  LogError("conditionsInEdm") << "ConditionsInLumiBlock product with InputTag '" << tagCondGt_.encode()
238  << "' not in lumi";
239  }
240  }
241 }
edm::EDGetTokenT< edm::ConditionsInLumiBlock > tagCondGtLumiToken_
Log< level::Error, false > LogError
std::string encode() const
Definition: InputTag.cc:159
bool isValid() const
Definition: HandleBase.h:70
std::string const & label() const
Definition: InputTag.h:36
edm::ConditionsInLumiBlock condLumi_
void PATTriggerEventProducer::beginRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 159 of file PATTriggerEventProducer.cc.

References autoProcessName_, condRun_, edm::InputTag::encode(), edm::ParameterSet::exists(), edm::Run::getByToken(), gtCondRunInit_, hltConfig_, hltConfigInit_, HLTConfigProvider::init(), HLT_FULL_cff::InputTag, edm::InputTag::instance(), instance, edm::HandleBase::isValid(), edm::InputTag::label(), LogDebug, nameProcess_, edm::InputTag::process(), edm::processConfiguration, edm::Run::processHistory(), HLTConfigProvider::size(), tagCondGt_, tagCondGtRunToken_, tagTriggerEvent_, and tagTriggerResults_.

159  {
160  // Initialize process name
161  if (autoProcessName_) {
162  // reset
163  nameProcess_ = "*";
164  // determine process name from last run TriggerSummaryProducerAOD module in process history of input
165  const ProcessHistory& processHistory(iRun.processHistory());
167  ParameterSet processPSet;
168  // unbroken loop, which relies on time ordering (accepts the last found entry)
169  for (ProcessHistory::const_iterator iHist = processHistory.begin(); iHist != processHistory.end(); ++iHist) {
170  if (processHistory.getConfigurationForProcess(iHist->processName(), processConfiguration) &&
171  pset::Registry::instance()->getMapped(processConfiguration.parameterSetID(), processPSet) &&
172  processPSet.exists(tagTriggerEvent_.label())) {
173  nameProcess_ = iHist->processName();
174  LogDebug("autoProcessName") << "HLT process name '" << nameProcess_ << "' discovered";
175  }
176  }
177  // terminate, if nothing is found
178  if (nameProcess_ == "*") {
179  LogError("autoProcessName") << "trigger::TriggerEvent product with label '" << tagTriggerEvent_.label()
180  << "' not produced according to process history of input data\n"
181  << "No trigger information produced.";
182  return;
183  }
184  LogInfo("autoProcessName") << "HLT process name " << nameProcess_ << " used for PAT trigger information";
185  }
186  // adapt configuration of used input tags
187  if (tagTriggerResults_.process().empty() || tagTriggerResults_.process() == "*") {
189  } else if (tagTriggerResults_.process() != nameProcess_) {
190  LogWarning("triggerResultsTag") << "TriggerResults process name '" << tagTriggerResults_.process()
191  << "' differs from HLT process name '" << nameProcess_ << "'";
192  }
193  if (tagTriggerEvent_.process().empty() || tagTriggerEvent_.process() == "*") {
195  } else if (tagTriggerEvent_.process() != nameProcess_) {
196  LogWarning("triggerEventTag") << "TriggerEvent process name '" << tagTriggerEvent_.process()
197  << "' differs from HLT process name '" << nameProcess_ << "'";
198  }
199 
200  gtCondRunInit_ = false;
201  if (!tagCondGt_.label().empty()) {
202  Handle<ConditionsInRunBlock> condRunBlock;
203  iRun.getByToken(tagCondGtRunToken_, condRunBlock);
204  if (condRunBlock.isValid()) {
205  condRun_ = *condRunBlock;
206  gtCondRunInit_ = true;
207  } else {
208  LogError("conditionsInEdm") << "ConditionsInRunBlock product with InputTag '" << tagCondGt_.encode()
209  << "' not in run";
210  }
211  }
212 
213  // Initialize HLTConfigProvider
214  hltConfigInit_ = false;
215  bool changed(true);
216  if (!hltConfig_.init(iRun, iSetup, nameProcess_, changed)) {
217  LogError("hltConfigExtraction") << "HLT config extraction error with process name '" << nameProcess_ << "'";
218  } else if (hltConfig_.size() <= 0) {
219  LogError("hltConfigSize") << "HLT config size error";
220  } else
221  hltConfigInit_ = true;
222 }
unsigned int size() const
number of trigger paths in trigger table
collection_type::const_iterator const_iterator
static PFTauRenderPlugin instance
bool exists(std::string const &parameterName) const
checks if a parameter exists
processConfiguration
Definition: Schedule.cc:687
Log< level::Error, false > LogError
std::string encode() const
Definition: InputTag.cc:159
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Run.h:318
ProcessHistory const & processHistory() const
Definition: Run.cc:113
edm::EDGetTokenT< edm::ConditionsInRunBlock > tagCondGtRunToken_
bool isValid() const
Definition: HandleBase.h:70
Log< level::Info, false > LogInfo
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d&#39;tor
edm::ConditionsInRunBlock condRun_
std::string const & label() const
Definition: InputTag.h:36
std::string const & process() const
Definition: InputTag.h:40
Log< level::Warning, false > LogWarning
std::string const & instance() const
Definition: InputTag.h:37
#define LogDebug(id)
void PATTriggerEventProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 243 of file PATTriggerEventProducer.cc.

References edm::ConditionsInRunBlock::BAvgCurrent, edm::ConditionsInRunBlock::beamMode, edm::ConditionsInRunBlock::beamMomentum, edm::ConditionsInRunBlock::BStartCurrent, edm::ConditionsInRunBlock::BStopCurrent, condLumi_, condRun_, edm::InputTag::encode(), edm::Event::get(), edm::Event::getByLabel(), edm::Event::getByToken(), edm::EventSetup::getHandle(), gtCondLumiInit_, gtCondRunInit_, handleL1GtTriggerMenuToken_, hltConfig_, hltConfigInit_, iEvent, dqmdumpme::indices, edm::EventBase::isRealData(), edm::HandleBase::isValid(), l1GtToken_, edm::InputTag::label(), edm::ConditionsInRunBlock::lhcFillNumber, eostools::move(), nameProcess_, L1GtFdlWord::physicsDeclared(), edm::Event::put(), AlCaHLTBitMon_QueryRunRegistry::string, HLTConfigProvider::tableName(), tagCondGt_, tagCondGtEventToken_, tagL1Gt_, tagsTriggerMatcher_, tagTriggerProducer_, tagTriggerResults_, edm::ConditionsInLumiBlock::totalIntensityBeam1, edm::ConditionsInLumiBlock::totalIntensityBeam2, triggerAlgorithmCollectionToken_, and triggerMatcherTokens_.

243  {
244  // Terminate, if auto process name determination failed
245  if (nameProcess_ == "*")
246  return;
247 
248  if (!hltConfigInit_)
249  return;
250 
251  auto handleL1GtTriggerMenu = iSetup.getHandle(handleL1GtTriggerMenuToken_);
252  Handle<TriggerResults> handleTriggerResults;
253  iEvent.getByLabel(tagTriggerResults_, handleTriggerResults);
254  // iEvent.getByToken( triggerResultsToken_, handleTriggerResults );
255  if (!handleTriggerResults.isValid()) {
256  LogError("triggerResultsValid") << "TriggerResults product with InputTag '" << tagTriggerResults_.encode()
257  << "' not in event\n"
258  << "No trigger information produced";
259  return;
260  }
261  Handle<TriggerAlgorithmCollection> handleTriggerAlgorithms;
262  iEvent.getByToken(triggerAlgorithmCollectionToken_, handleTriggerAlgorithms);
263  Handle<TriggerConditionCollection> handleTriggerConditions;
264  iEvent.getByToken(triggerConditionCollectionToken_, handleTriggerConditions);
265  Handle<TriggerPathCollection> handleTriggerPaths;
266  iEvent.getByToken(triggerPathCollectionToken_, handleTriggerPaths);
267  Handle<TriggerFilterCollection> handleTriggerFilters;
268  iEvent.getByToken(triggerFilterCollectionToken_, handleTriggerFilters);
269  Handle<TriggerObjectCollection> handleTriggerObjects;
270  iEvent.getByToken(triggerObjectCollectionToken_, handleTriggerObjects);
271 
272  bool physDecl(false);
273  if (iEvent.isRealData() && !tagL1Gt_.label().empty()) {
274  Handle<L1GlobalTriggerReadoutRecord> handleL1GlobalTriggerReadoutRecord;
275  iEvent.getByToken(l1GtToken_, handleL1GlobalTriggerReadoutRecord);
276  if (handleL1GlobalTriggerReadoutRecord.isValid()) {
277  L1GtFdlWord fdlWord = handleL1GlobalTriggerReadoutRecord->gtFdlWord();
278  if (fdlWord.physicsDeclared() == 1) {
279  physDecl = true;
280  }
281  } else {
282  LogError("l1GlobalTriggerReadoutRecordValid")
283  << "L1GlobalTriggerReadoutRecord product with InputTag '" << tagL1Gt_.encode() << "' not in event";
284  }
285  } else {
286  physDecl = true;
287  }
288 
289  // produce trigger event
290 
291  auto triggerEvent = std::make_unique<TriggerEvent>(handleL1GtTriggerMenu->gtTriggerMenuName(),
293  handleTriggerResults->wasrun(),
294  handleTriggerResults->accept(),
295  handleTriggerResults->error(),
296  physDecl);
297  // set product references to trigger collections
298  if (handleTriggerAlgorithms.isValid()) {
299  triggerEvent->setAlgorithms(handleTriggerAlgorithms);
300  } else {
301  LogError("triggerAlgorithmsValid") << "pat::TriggerAlgorithmCollection product with InputTag '"
302  << tagTriggerProducer_.encode() << "' not in event";
303  }
304  if (handleTriggerConditions.isValid()) {
305  triggerEvent->setConditions(handleTriggerConditions);
306  } else {
307  LogError("triggerConditionsValid") << "pat::TriggerConditionCollection product with InputTag '"
308  << tagTriggerProducer_.encode() << "' not in event";
309  }
310  if (handleTriggerPaths.isValid()) {
311  triggerEvent->setPaths(handleTriggerPaths);
312  } else {
313  LogError("triggerPathsValid") << "pat::TriggerPathCollection product with InputTag '"
314  << tagTriggerProducer_.encode() << "' not in event";
315  }
316  if (handleTriggerFilters.isValid()) {
317  triggerEvent->setFilters(handleTriggerFilters);
318  } else {
319  LogError("triggerFiltersValid") << "pat::TriggerFilterCollection product with InputTag '"
320  << tagTriggerProducer_.encode() << "' not in event";
321  }
322  if (handleTriggerObjects.isValid()) {
323  triggerEvent->setObjects(handleTriggerObjects);
324  } else {
325  LogError("triggerObjectsValid") << "pat::TriggerObjectCollection product with InputTag '"
326  << tagTriggerProducer_.encode() << "' not in event";
327  }
328  if (gtCondRunInit_) {
329  triggerEvent->setLhcFill(condRun_.lhcFillNumber);
330  triggerEvent->setBeamMode(condRun_.beamMode);
331  triggerEvent->setBeamMomentum(condRun_.beamMomentum);
332  triggerEvent->setBCurrentStart(condRun_.BStartCurrent);
333  triggerEvent->setBCurrentStop(condRun_.BStopCurrent);
334  triggerEvent->setBCurrentAvg(condRun_.BAvgCurrent);
335  }
336  if (gtCondLumiInit_) {
337  triggerEvent->setIntensityBeam1(condLumi_.totalIntensityBeam1);
338  triggerEvent->setIntensityBeam2(condLumi_.totalIntensityBeam2);
339  }
340  if (!tagCondGt_.label().empty()) {
341  Handle<ConditionsInEventBlock> condEventBlock;
342  iEvent.getByToken(tagCondGtEventToken_, condEventBlock);
343  if (condEventBlock.isValid()) {
344  triggerEvent->setBstMasterStatus(condEventBlock->bstMasterStatus);
345  triggerEvent->setTurnCount(condEventBlock->turnCountNumber);
346  } else {
347  LogError("conditionsInEdm") << "ConditionsInEventBlock product with InputTag '" << tagCondGt_.encode()
348  << "' not in event";
349  }
350  }
351 
352  // produce trigger match association and set references
353  if (handleTriggerObjects.isValid()) {
354  for (size_t iMatch = 0; iMatch < tagsTriggerMatcher_.size(); ++iMatch) {
355  const std::string labelTriggerObjectMatcher(tagsTriggerMatcher_.at(iMatch).label());
356  // copy trigger match association using TriggerObjectStandAlone to those using TriggerObject
357  // relying on the fact, that only one candidate collection is present in the association
358  Handle<TriggerObjectStandAloneMatch> handleTriggerObjectStandAloneMatch;
359  iEvent.getByToken(triggerMatcherTokens_.at(iMatch), handleTriggerObjectStandAloneMatch);
360  if (!handleTriggerObjectStandAloneMatch.isValid()) {
361  LogError("triggerMatchValid") << "pat::TriggerObjectStandAloneMatch product with InputTag '"
362  << labelTriggerObjectMatcher << "' not in event";
363  continue;
364  }
365  auto it = makeAssociativeIterator<reco::CandidateBaseRef>(*handleTriggerObjectStandAloneMatch, iEvent);
366  auto itEnd = it.end();
367  Handle<reco::CandidateView> handleCands;
368  if (it != itEnd)
369  iEvent.get(it->first.id(), handleCands);
370  std::vector<int> indices;
371  while (it != itEnd) {
372  indices.push_back(it->second.key());
373  ++it;
374  }
375  auto triggerObjectMatch = std::make_unique<TriggerObjectMatch>(handleTriggerObjects);
376  TriggerObjectMatch::Filler matchFiller(*triggerObjectMatch);
377  if (handleCands.isValid()) {
378  matchFiller.insert(handleCands, indices.begin(), indices.end());
379  }
380  matchFiller.fill();
381  OrphanHandle<TriggerObjectMatch> handleTriggerObjectMatch(
382  iEvent.put(std::move(triggerObjectMatch), labelTriggerObjectMatcher));
383  // set product reference to trigger match association
384  if (!handleTriggerObjectMatch.isValid()) {
385  LogError("triggerMatchValid") << "pat::TriggerObjectMatch product with InputTag '" << labelTriggerObjectMatcher
386  << "' not in event";
387  continue;
388  }
389  if (!(triggerEvent->addObjectMatchResult(handleTriggerObjectMatch, labelTriggerObjectMatcher))) {
390  LogWarning("triggerObjectMatchReplication")
391  << "pat::TriggerEvent contains already a pat::TriggerObjectMatch from matcher module '"
392  << labelTriggerObjectMatcher << "'";
393  }
394  }
395  }
396 
397  iEvent.put(std::move(triggerEvent));
398 }
edm::EDGetTokenT< TriggerObjectCollection > triggerObjectCollectionToken_
std::vector< edm::EDGetTokenT< TriggerObjectStandAloneMatch > > triggerMatcherTokens_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:133
edm::EDGetTokenT< TriggerConditionCollection > triggerConditionCollectionToken_
const edm::ESGetToken< L1GtTriggerMenu, L1GtTriggerMenuRcd > handleL1GtTriggerMenuToken_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
edm::EDGetTokenT< TriggerPathCollection > triggerPathCollectionToken_
const std::string & tableName() const
HLT ConfDB table name.
Log< level::Error, false > LogError
bool isRealData() const
Definition: EventBase.h:62
std::string encode() const
Definition: InputTag.cc:159
int iEvent
Definition: GenABIO.cc:224
edm::EDGetTokenT< edm::ConditionsInEventBlock > tagCondGtEventToken_
def move
Definition: eostools.py:511
bool get(ProductID const &oid, Handle< PROD > &result) const
Definition: Event.h:346
bool isValid() const
Definition: HandleBase.h:70
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:500
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > l1GtToken_
edm::EDGetTokenT< TriggerAlgorithmCollection > triggerAlgorithmCollectionToken_
const cms_uint16_t physicsDeclared() const
get/set &quot;physics declared&quot; bit
Definition: L1GtFdlWord.h:169
edm::ConditionsInRunBlock condRun_
std::string const & label() const
Definition: InputTag.h:36
std::vector< edm::InputTag > tagsTriggerMatcher_
edm::EDGetTokenT< TriggerFilterCollection > triggerFilterCollectionToken_
edm::ConditionsInLumiBlock condLumi_
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:157
Log< level::Warning, false > LogWarning
list indices
Definition: dqmdumpme.py:50

Member Data Documentation

bool pat::PATTriggerEventProducer::autoProcessName_
private

Definition at line 64 of file PATTriggerEventProducer.cc.

Referenced by beginRun().

edm::ConditionsInLumiBlock pat::PATTriggerEventProducer::condLumi_
private

Definition at line 88 of file PATTriggerEventProducer.cc.

Referenced by beginLuminosityBlock(), and produce().

edm::ConditionsInRunBlock pat::PATTriggerEventProducer::condRun_
private

Definition at line 87 of file PATTriggerEventProducer.cc.

Referenced by beginRun(), and produce().

bool pat::PATTriggerEventProducer::gtCondLumiInit_ = false
private

Definition at line 90 of file PATTriggerEventProducer.cc.

Referenced by beginLuminosityBlock(), and produce().

bool pat::PATTriggerEventProducer::gtCondRunInit_ = false
private

Definition at line 89 of file PATTriggerEventProducer.cc.

Referenced by beginRun(), and produce().

const edm::ESGetToken<L1GtTriggerMenu, L1GtTriggerMenuRcd> pat::PATTriggerEventProducer::handleL1GtTriggerMenuToken_
private

Definition at line 91 of file PATTriggerEventProducer.cc.

Referenced by produce().

HLTConfigProvider pat::PATTriggerEventProducer::hltConfig_
private

Definition at line 77 of file PATTriggerEventProducer.cc.

Referenced by beginRun(), and produce().

bool pat::PATTriggerEventProducer::hltConfigInit_
private

Definition at line 78 of file PATTriggerEventProducer.cc.

Referenced by beginRun(), and produce().

edm::EDGetTokenT<L1GlobalTriggerReadoutRecord> pat::PATTriggerEventProducer::l1GtToken_
private

Definition at line 75 of file PATTriggerEventProducer.cc.

Referenced by produce().

std::string pat::PATTriggerEventProducer::nameProcess_
private

Definition at line 63 of file PATTriggerEventProducer.cc.

Referenced by beginLuminosityBlock(), beginRun(), and produce().

edm::InputTag pat::PATTriggerEventProducer::tagCondGt_
private

Definition at line 83 of file PATTriggerEventProducer.cc.

Referenced by beginLuminosityBlock(), beginRun(), and produce().

edm::EDGetTokenT<edm::ConditionsInEventBlock> pat::PATTriggerEventProducer::tagCondGtEventToken_
private

Definition at line 86 of file PATTriggerEventProducer.cc.

Referenced by produce().

edm::EDGetTokenT<edm::ConditionsInLumiBlock> pat::PATTriggerEventProducer::tagCondGtLumiToken_
private

Definition at line 85 of file PATTriggerEventProducer.cc.

Referenced by beginLuminosityBlock().

edm::EDGetTokenT<edm::ConditionsInRunBlock> pat::PATTriggerEventProducer::tagCondGtRunToken_
private

Definition at line 84 of file PATTriggerEventProducer.cc.

Referenced by beginRun().

edm::InputTag pat::PATTriggerEventProducer::tagL1Gt_
private

Definition at line 74 of file PATTriggerEventProducer.cc.

Referenced by produce().

std::vector<edm::InputTag> pat::PATTriggerEventProducer::tagsTriggerMatcher_
private

Definition at line 71 of file PATTriggerEventProducer.cc.

Referenced by produce().

edm::InputTag pat::PATTriggerEventProducer::tagTriggerEvent_
private

Definition at line 81 of file PATTriggerEventProducer.cc.

Referenced by beginRun().

edm::InputTag pat::PATTriggerEventProducer::tagTriggerProducer_
private

Definition at line 65 of file PATTriggerEventProducer.cc.

Referenced by produce().

edm::InputTag pat::PATTriggerEventProducer::tagTriggerResults_
private

Definition at line 79 of file PATTriggerEventProducer.cc.

Referenced by beginRun(), and produce().

edm::EDGetTokenT<TriggerAlgorithmCollection> pat::PATTriggerEventProducer::triggerAlgorithmCollectionToken_
private

Definition at line 66 of file PATTriggerEventProducer.cc.

Referenced by produce().

edm::EDGetTokenT<TriggerConditionCollection> pat::PATTriggerEventProducer::triggerConditionCollectionToken_
private

Definition at line 67 of file PATTriggerEventProducer.cc.

edm::EDGetTokenT<TriggerFilterCollection> pat::PATTriggerEventProducer::triggerFilterCollectionToken_
private

Definition at line 69 of file PATTriggerEventProducer.cc.

std::vector<edm::EDGetTokenT<TriggerObjectStandAloneMatch> > pat::PATTriggerEventProducer::triggerMatcherTokens_
private

Definition at line 72 of file PATTriggerEventProducer.cc.

Referenced by produce().

edm::EDGetTokenT<TriggerObjectCollection> pat::PATTriggerEventProducer::triggerObjectCollectionToken_
private

Definition at line 70 of file PATTriggerEventProducer.cc.

edm::EDGetTokenT<TriggerPathCollection> pat::PATTriggerEventProducer::triggerPathCollectionToken_
private

Definition at line 68 of file PATTriggerEventProducer.cc.

edm::GetterOfProducts<edm::TriggerResults> pat::PATTriggerEventProducer::triggerResultsGetter_
private

Definition at line 80 of file PATTriggerEventProducer.cc.