CMS 3D CMS Logo

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

#include <TriggerSummaryProducerAOD.h>

Inheritance diagram for TriggerSummaryProducerAOD:
edm::global::EDProducer<> edm::global::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Classes

struct  OrderInputTag
 InputTag ordering class. More...
 

Public Member Functions

void endJob () override
 
void produce (edm::StreamID, edm::Event &, const edm::EventSetup &) const override
 
 TriggerSummaryProducerAOD (const edm::ParameterSet &)
 
 ~TriggerSummaryProducerAOD () override
 
- Public Member Functions inherited from edm::global::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
 
EDProduceroperator= (const EDProducer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
bool wantsStreamLuminosityBlocks () const final
 
bool wantsStreamRuns () const final
 
- Public Member Functions inherited from edm::global::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDProducerBase () 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
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex >
const & 
esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
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::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, 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
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::global::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Types

using InputTagSet = std::set< edm::InputTag, OrderInputTag >
 
using ProductIDtoIndex = std::map< edm::ProductID, unsigned int >
 

Private Member Functions

template<typename C >
void fillFilterObjectMember (trigger::Keys &keys, trigger::Vids &ids, const int &, const int &, const edm::Ref< C > &) const
 
void fillFilterObjectMember (trigger::Keys &keys, trigger::Vids &ids, const int &, const int &, const edm::Ref< l1extra::L1HFRingsCollection > &) const
 
void fillFilterObjectMember (trigger::Keys &keys, trigger::Vids &ids, const int &, const int &, const edm::Ref< l1extra::L1EtMissParticleCollection > &) const
 
void fillFilterObjectMember (trigger::Keys &keys, trigger::Vids &ids, const int &, const int &, const edm::Ref< reco::PFMETCollection > &) const
 
void fillFilterObjectMember (trigger::Keys &keys, trigger::Vids &ids, const int &, const int &, const edm::Ref< reco::CaloMETCollection > &) const
 
void fillFilterObjectMember (trigger::Keys &keys, trigger::Vids &ids, const int &, const int &, const edm::Ref< reco::METCollection > &) const
 
template<typename C >
void fillFilterObjectMembers (const edm::Event &, const edm::InputTag &tag, const trigger::Vids &, const std::vector< edm::Ref< C >> &, const ProductIDtoIndex &, trigger::Keys &keys, trigger::Vids &oIds) const
 
template<typename T >
void fillTriggerObject (trigger::TriggerObjectCollection &, const T &) const
 
void fillTriggerObject (trigger::TriggerObjectCollection &, const l1extra::L1HFRings &) const
 
void fillTriggerObject (trigger::TriggerObjectCollection &, const l1extra::L1EtMissParticle &) const
 
void fillTriggerObject (trigger::TriggerObjectCollection &, const reco::PFMET &) const
 
void fillTriggerObject (trigger::TriggerObjectCollection &, const reco::CaloMET &) const
 
void fillTriggerObject (trigger::TriggerObjectCollection &, const reco::MET &) const
 
template<typename C >
void fillTriggerObjectCollections (trigger::TriggerObjectCollection &, ProductIDtoIndex &, std::vector< std::string > &, trigger::Keys &, const edm::Event &, const edm::GetterOfProducts< C > &, const InputTagSet &) const
 

Private Attributes

tbb::concurrent_unordered_set
< edm::InputTag, InputTagHash
collectionTagsGlobal_
 list of L3 collection tags More...
 
tbb::concurrent_unordered_set
< edm::InputTag, InputTagHash
filterTagsGlobal_
 list of L3 filter tags More...
 
edm::GetterOfProducts
< reco::CaloJetCollection
getCaloJetCollection_
 
edm::GetterOfProducts
< reco::CaloMETCollection
getCaloMETCollection_
 
edm::GetterOfProducts
< reco::CompositeCandidateCollection
getCompositeCandidateCollection_
 
edm::GetterOfProducts
< reco::ElectronCollection
getElectronCollection_
 
edm::GetterOfProducts
< reco::IsolatedPixelTrackCandidateCollection
getIsolatedPixelTrackCandidateCollection_
 
edm::GetterOfProducts
< l1extra::L1EmParticleCollection
getL1EmParticleCollection_
 
edm::GetterOfProducts
< l1extra::L1EtMissParticleCollection
getL1EtMissParticleCollection_
 
edm::GetterOfProducts
< l1extra::L1HFRingsCollection
getL1HFRingsCollection_
 
edm::GetterOfProducts
< l1extra::L1JetParticleCollection
getL1JetParticleCollection_
 
edm::GetterOfProducts
< l1extra::L1MuonParticleCollection
getL1MuonParticleCollection_
 
edm::GetterOfProducts
< l1t::EGammaBxCollection
getL1TEGammaParticleCollection_
 
edm::GetterOfProducts
< l1t::EtSumBxCollection
getL1TEtSumParticleCollection_
 
edm::GetterOfProducts
< l1t::HPSPFTauCollection
getL1THPSPFTauCollection_
 
edm::GetterOfProducts
< l1t::JetBxCollection
getL1TJetParticleCollection_
 
edm::GetterOfProducts
< l1t::MuonBxCollection
getL1TMuonParticleCollection_
 
edm::GetterOfProducts
< l1t::PFJetCollection
getL1TPFJetCollection_
 
edm::GetterOfProducts
< l1t::PFTauCollection
getL1TPFTauCollection_
 
edm::GetterOfProducts
< l1t::PFTrackCollection
getL1TPFTrackCollection_
 
edm::GetterOfProducts
< l1t::TauBxCollection
getL1TTauParticleCollection_
 
edm::GetterOfProducts
< l1t::TkElectronCollection
getL1TTkElectronCollection_
 
edm::GetterOfProducts
< l1t::TkEmCollection
getL1TTkEmCollection_
 
edm::GetterOfProducts
< l1t::TkMuonCollection
getL1TTkMuonCollection_
 
edm::GetterOfProducts
< reco::METCollection
getMETCollection_
 
edm::GetterOfProducts
< reco::PFJetCollection
getPFJetCollection_
 
edm::GetterOfProducts
< reco::PFMETCollection
getPFMETCollection_
 
edm::GetterOfProducts
< reco::PFTauCollection
getPFTauCollection_
 
edm::GetterOfProducts
< reco::RecoChargedCandidateCollection
getRecoChargedCandidateCollection_
 
edm::GetterOfProducts
< reco::RecoEcalCandidateCollection
getRecoEcalCandidateCollection_
 
edm::GetterOfProducts
< trigger::TriggerFilterObjectWithRefs
getTriggerFilterObjectWithRefs_
 trigger object collection More...
 
std::vector< std::regex > moduleLabelPatternsToMatch_
 module labels which should be avoided More...
 
std::vector< std::regex > moduleLabelPatternsToSkip_
 
std::string pn_
 process name More...
 
const bool throw_
 throw on error More...
 

Additional Inherited Members

- Public Types inherited from edm::global::EDProducerBase
typedef EDProducerBase 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::ProducerBase
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
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)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

This class is an EDProducer making the HLT summary object for AOD

Author
Martin Grunewald

See header file for documentation

Author
Martin Grunewald

Definition at line 87 of file TriggerSummaryProducerAOD.h.

Member Typedef Documentation

Definition at line 116 of file TriggerSummaryProducerAOD.h.

using TriggerSummaryProducerAOD::ProductIDtoIndex = std::map<edm::ProductID, unsigned int>
private

Definition at line 115 of file TriggerSummaryProducerAOD.h.

Constructor & Destructor Documentation

TriggerSummaryProducerAOD::TriggerSummaryProducerAOD ( const edm::ParameterSet ps)
explicit

Definition at line 85 of file TriggerSummaryProducerAOD.cc.

References edm::ProducerBase::callWhenNewProductsRegistered(), getCaloJetCollection_, getCaloMETCollection_, getCompositeCandidateCollection_, getElectronCollection_, getIsolatedPixelTrackCandidateCollection_, getL1EmParticleCollection_, getL1EtMissParticleCollection_, getL1HFRingsCollection_, getL1JetParticleCollection_, getL1MuonParticleCollection_, getL1TEGammaParticleCollection_, getL1TEtSumParticleCollection_, getL1THPSPFTauCollection_, getL1TJetParticleCollection_, getL1TMuonParticleCollection_, getL1TPFJetCollection_, getL1TPFTauCollection_, getL1TPFTrackCollection_, getL1TTauParticleCollection_, getL1TTkElectronCollection_, getL1TTkEmCollection_, getL1TTkMuonCollection_, getMETCollection_, getPFJetCollection_, getPFMETCollection_, getPFTauCollection_, edm::service::TriggerNamesService::getProcessName(), getRecoChargedCandidateCollection_, getRecoEcalCandidateCollection_, getTriggerFilterObjectWithRefs_, edm::Service< T >::isAvailable(), label, LogDebug, match(), HLT_Fake1_cff::moduleLabelPatternsToMatch, moduleLabelPatternsToMatch_, HLT_Fake1_cff::moduleLabelPatternsToSkip, moduleLabelPatternsToSkip_, pn_, reject, and edm::tns().

86  : throw_(ps.getParameter<bool>("throw")),
87  pn_(ps.getParameter<std::string>("processName")),
89  convertToRegex(ps.getParameter<std::vector<std::string>>("moduleLabelPatternsToMatch"))),
91  convertToRegex(ps.getParameter<std::vector<std::string>>("moduleLabelPatternsToSkip"))) {
92  if (pn_ == "@") {
94  if (tns.isAvailable()) {
95  pn_ = tns->getProcessName();
96  } else {
97  edm::LogError("TriggerSummaryProducerAOD") << "HLT Error: TriggerNamesService not available!";
98  pn_ = "*";
99  }
100  }
101  LogDebug("TriggerSummaryProducerAOD") << "Using process name: '" << pn_ << "'";
102 
103  produces<trigger::TriggerEvent>();
104 
105  auto const* pProcessName = &pn_;
108  auto productMatch = [pProcessName, &moduleLabelPatternsToSkip, &moduleLabelPatternsToMatch](
109  edm::BranchDescription const& iBranch) -> bool {
110  if (iBranch.processName() == *pProcessName || *pProcessName == "*") {
111  auto const& label = iBranch.moduleLabel();
112  for (auto& match : moduleLabelPatternsToMatch) {
113  if (std::regex_match(label, match)) {
114  //make sure this is not in the reject list
115  for (auto& reject : moduleLabelPatternsToSkip) {
116  if (std::regex_match(label, reject)) {
117  return false;
118  }
119  }
120  return true;
121  }
122  }
123  }
124  return false;
125  };
126 
147 
155 
159 
167  getMETCollection_(bd);
190  });
191 }
void callWhenNewProductsRegistered(std::function< void(BranchDescription const &)> const &func)
Definition: ProducerBase.h:85
edm::GetterOfProducts< l1t::TauBxCollection > getL1TTauParticleCollection_
std::vector< std::regex > moduleLabelPatternsToSkip_
pathNames_ & tns()), endPathNames_(&tns.getEndPaths()), wantSummary_(tns.wantSummary()
Definition: Schedule.cc:691
edm::GetterOfProducts< l1extra::L1JetParticleCollection > getL1JetParticleCollection_
edm::GetterOfProducts< reco::IsolatedPixelTrackCandidateCollection > getIsolatedPixelTrackCandidateCollection_
edm::GetterOfProducts< reco::RecoEcalCandidateCollection > getRecoEcalCandidateCollection_
std::string const & getProcessName() const
edm::GetterOfProducts< l1t::PFTrackCollection > getL1TPFTrackCollection_
edm::GetterOfProducts< l1extra::L1MuonParticleCollection > getL1MuonParticleCollection_
edm::GetterOfProducts< reco::PFTauCollection > getPFTauCollection_
edm::GetterOfProducts< reco::METCollection > getMETCollection_
edm::GetterOfProducts< l1t::JetBxCollection > getL1TJetParticleCollection_
edm::GetterOfProducts< l1t::TkElectronCollection > getL1TTkElectronCollection_
edm::GetterOfProducts< reco::CaloJetCollection > getCaloJetCollection_
edm::GetterOfProducts< l1extra::L1EtMissParticleCollection > getL1EtMissParticleCollection_
tuple moduleLabelPatternsToMatch
Log< level::Error, false > LogError
edm::GetterOfProducts< reco::PFJetCollection > getPFJetCollection_
const bool throw_
throw on error
char const * label
edm::GetterOfProducts< l1t::TkEmCollection > getL1TTkEmCollection_
edm::GetterOfProducts< reco::RecoChargedCandidateCollection > getRecoChargedCandidateCollection_
edm::GetterOfProducts< l1extra::L1HFRingsCollection > getL1HFRingsCollection_
edm::GetterOfProducts< l1t::TkMuonCollection > getL1TTkMuonCollection_
std::vector< std::regex > moduleLabelPatternsToMatch_
module labels which should be avoided
bool isAvailable() const
Definition: Service.h:40
edm::GetterOfProducts< l1t::PFTauCollection > getL1TPFTauCollection_
edm::GetterOfProducts< l1t::MuonBxCollection > getL1TMuonParticleCollection_
edm::GetterOfProducts< l1t::HPSPFTauCollection > getL1THPSPFTauCollection_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::GetterOfProducts< reco::CaloMETCollection > getCaloMETCollection_
edm::GetterOfProducts< reco::ElectronCollection > getElectronCollection_
tuple moduleLabelPatternsToSkip
edm::GetterOfProducts< reco::CompositeCandidateCollection > getCompositeCandidateCollection_
edm::GetterOfProducts< trigger::TriggerFilterObjectWithRefs > getTriggerFilterObjectWithRefs_
trigger object collection
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10
edm::GetterOfProducts< reco::PFMETCollection > getPFMETCollection_
edm::GetterOfProducts< l1t::PFJetCollection > getL1TPFJetCollection_
edm::GetterOfProducts< l1t::EtSumBxCollection > getL1TEtSumParticleCollection_
edm::GetterOfProducts< l1extra::L1EmParticleCollection > getL1EmParticleCollection_
#define LogDebug(id)
edm::GetterOfProducts< l1t::EGammaBxCollection > getL1TEGammaParticleCollection_
TriggerSummaryProducerAOD::~TriggerSummaryProducerAOD ( )
overridedefault

Member Function Documentation

void TriggerSummaryProducerAOD::endJob ( void  )
overridevirtual

Reimplemented from edm::global::EDProducerBase.

Definition at line 758 of file TriggerSummaryProducerAOD.cc.

References collectionTagsGlobal_, HLT_FULL_cff::distance, and filterTagsGlobal_.

758  {
759  using namespace std;
760  using namespace edm;
761  using namespace trigger;
762 
763  LogVerbatim("TriggerSummaryProducerAOD") << endl;
764  LogVerbatim("TriggerSummaryProducerAOD") << "TriggerSummaryProducerAOD::globalEndJob - accumulated tags:" << endl;
765 
766  InputTagSet filterTags(false);
767  InputTagSet collectionTags(false);
768 
769  filterTags.insert(filterTagsGlobal_.begin(), filterTagsGlobal_.end());
770  collectionTags.insert(collectionTagsGlobal_.begin(), collectionTagsGlobal_.end());
771 
772  const unsigned int nc(collectionTags.size());
773  const unsigned int nf(filterTags.size());
774  LogVerbatim("TriggerSummaryProducerAOD") << " Overall number of Collections/Filters: " << nc << "/" << nf << endl;
775 
776  LogVerbatim("TriggerSummaryProducerAOD") << " The collections: " << nc << endl;
777  const InputTagSet::const_iterator cb(collectionTags.begin());
778  const InputTagSet::const_iterator ce(collectionTags.end());
779  for (InputTagSet::const_iterator ci = cb; ci != ce; ++ci) {
780  LogVerbatim("TriggerSummaryProducerAOD") << " " << distance(cb, ci) << " " << ci->encode() << endl;
781  }
782 
783  LogVerbatim("TriggerSummaryProducerAOD") << " The filters:" << nf << endl;
784  const InputTagSet::const_iterator fb(filterTags.begin());
785  const InputTagSet::const_iterator fe(filterTags.end());
786  for (InputTagSet::const_iterator fi = fb; fi != fe; ++fi) {
787  LogVerbatim("TriggerSummaryProducerAOD") << " " << distance(fb, fi) << " " << fi->encode() << endl;
788  }
789 
790  LogVerbatim("TriggerSummaryProducerAOD") << "TriggerSummaryProducerAOD::endJob." << endl;
791  LogVerbatim("TriggerSummaryProducerAOD") << endl;
792 
793  return;
794 }
Log< level::Info, true > LogVerbatim
tbb::concurrent_unordered_set< edm::InputTag, InputTagHash > filterTagsGlobal_
list of L3 filter tags
tbb::concurrent_unordered_set< edm::InputTag, InputTagHash > collectionTagsGlobal_
list of L3 collection tags
std::set< edm::InputTag, OrderInputTag > InputTagSet
void TriggerSummaryProducerAOD::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 225 of file TriggerSummaryProducerAOD.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), submitPVResolutionJobs::desc, edm::ParameterDescriptionNode::setComment(), and AlCaHLTBitMon_QueryRunRegistry::string.

225  {
227  desc.add<bool>("throw", false)->setComment("Throw exception or LogError");
228  desc.add<std::string>("processName", "@")
229  ->setComment(
230  "Process name to use when getting data. The value of '@' is used to denote the current process name.");
231  desc.add<std::vector<std::string>>("moduleLabelPatternsToMatch", std::vector<std::string>(1, "hlt*"))
232  ->setComment("glob patterns for module labels to get data.");
233  desc.add<std::vector<std::string>>("moduleLabelPatternsToSkip", std::vector<std::string>())
234  ->setComment("module labels for data products which should not be gotten.");
235  descriptions.add("triggerSummaryProducerAOD", desc);
236 }
void setComment(std::string const &value)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
template<typename C >
void TriggerSummaryProducerAOD::fillFilterObjectMember ( trigger::Keys keys,
trigger::Vids ids,
const int &  offset,
const int &  id,
const edm::Ref< C > &  ref 
) const
private

Definition at line 653 of file TriggerSummaryProducerAOD.cc.

References edm::Ref< C, T, F >::key().

Referenced by fillFilterObjectMembers().

654  {
655  keys.push_back(offset + ref.key());
656  ids.push_back(id);
657 
658  return;
659 }
key_type key() const
Accessor for product key.
Definition: Ref.h:250
void TriggerSummaryProducerAOD::fillFilterObjectMember ( trigger::Keys keys,
trigger::Vids ids,
const int &  offset,
const int &  id,
const edm::Ref< l1extra::L1HFRingsCollection > &  ref 
) const
private

Definition at line 661 of file TriggerSummaryProducerAOD.cc.

References edm::Ref< C, T, F >::key(), and trigger::TriggerL1HfBitCounts.

665  {
666  using namespace trigger;
667 
668  if (id == TriggerL1HfBitCounts) {
669  keys.push_back(offset + 2 * ref.key() + 1);
670  } else { // if (ids[i]==TriggerL1HfRingEtSums) {
671  keys.push_back(offset + 2 * ref.key() + 0);
672  }
673  ids.push_back(id);
674 
675  return;
676 }
key_type key() const
Accessor for product key.
Definition: Ref.h:250
void TriggerSummaryProducerAOD::fillFilterObjectMember ( trigger::Keys keys,
trigger::Vids ids,
const int &  offset,
const int &  id,
const edm::Ref< l1extra::L1EtMissParticleCollection > &  ref 
) const
private

Definition at line 678 of file TriggerSummaryProducerAOD.cc.

References edm::Ref< C, T, F >::key(), trigger::TriggerL1ETT, and trigger::TriggerL1HTT.

682  {
683  using namespace trigger;
684 
685  if ((id == TriggerL1ETT) || (id == TriggerL1HTT)) {
686  keys.push_back(offset + 2 * ref.key() + 1);
687  } else {
688  keys.push_back(offset + 2 * ref.key() + 0);
689  }
690  ids.push_back(id);
691 
692  return;
693 }
key_type key() const
Accessor for product key.
Definition: Ref.h:250
void TriggerSummaryProducerAOD::fillFilterObjectMember ( trigger::Keys keys,
trigger::Vids ids,
const int &  offset,
const int &  id,
const edm::Ref< reco::PFMETCollection > &  ref 
) const
private

Definition at line 695 of file TriggerSummaryProducerAOD.cc.

References edm::Ref< C, T, F >::key(), trigger::TriggerELongit, trigger::TriggerHLongit, trigger::TriggerMETSig, trigger::TriggerMHTSig, trigger::TriggerTET, and trigger::TriggerTHT.

699  {
700  using namespace trigger;
701 
702  if ((id == TriggerTHT) || (id == TriggerTET)) {
703  keys.push_back(offset + 4 * ref.key() + 1);
704  } else if ((id == TriggerMETSig) || (id == TriggerMHTSig)) {
705  keys.push_back(offset + 4 * ref.key() + 2);
706  } else if ((id == TriggerELongit) || (id == TriggerHLongit)) {
707  keys.push_back(offset + 4 * ref.key() + 3);
708  } else {
709  keys.push_back(offset + 4 * ref.key() + 0);
710  }
711  ids.push_back(id);
712 
713  return;
714 }
key_type key() const
Accessor for product key.
Definition: Ref.h:250
void TriggerSummaryProducerAOD::fillFilterObjectMember ( trigger::Keys keys,
trigger::Vids ids,
const int &  offset,
const int &  id,
const edm::Ref< reco::CaloMETCollection > &  ref 
) const
private

Definition at line 716 of file TriggerSummaryProducerAOD.cc.

References edm::Ref< C, T, F >::key(), trigger::TriggerELongit, trigger::TriggerHLongit, trigger::TriggerMETSig, trigger::TriggerMHTSig, trigger::TriggerTET, and trigger::TriggerTHT.

720  {
721  using namespace trigger;
722 
723  if ((id == TriggerTHT) || (id == TriggerTET)) {
724  keys.push_back(offset + 4 * ref.key() + 1);
725  } else if ((id == TriggerMETSig) || (id == TriggerMHTSig)) {
726  keys.push_back(offset + 4 * ref.key() + 2);
727  } else if ((id == TriggerELongit) || (id == TriggerHLongit)) {
728  keys.push_back(offset + 4 * ref.key() + 3);
729  } else {
730  keys.push_back(offset + 4 * ref.key() + 0);
731  }
732  ids.push_back(id);
733 
734  return;
735 }
key_type key() const
Accessor for product key.
Definition: Ref.h:250
void TriggerSummaryProducerAOD::fillFilterObjectMember ( trigger::Keys keys,
trigger::Vids ids,
const int &  offset,
const int &  id,
const edm::Ref< reco::METCollection > &  ref 
) const
private

Definition at line 737 of file TriggerSummaryProducerAOD.cc.

References edm::Ref< C, T, F >::key(), trigger::TriggerELongit, trigger::TriggerHLongit, trigger::TriggerMETSig, trigger::TriggerMHTSig, trigger::TriggerTET, and trigger::TriggerTHT.

741  {
742  using namespace trigger;
743 
744  if ((id == TriggerTHT) || (id == TriggerTET)) {
745  keys.push_back(offset + 4 * ref.key() + 1);
746  } else if ((id == TriggerMETSig) || (id == TriggerMHTSig)) {
747  keys.push_back(offset + 4 * ref.key() + 2);
748  } else if ((id == TriggerELongit) || (id == TriggerHLongit)) {
749  keys.push_back(offset + 4 * ref.key() + 3);
750  } else {
751  keys.push_back(offset + 4 * ref.key() + 0);
752  }
753  ids.push_back(id);
754 
755  return;
756 }
key_type key() const
Accessor for product key.
Definition: Ref.h:250
template<typename C >
void TriggerSummaryProducerAOD::fillFilterObjectMembers ( const edm::Event iEvent,
const edm::InputTag tag,
const trigger::Vids ids,
const std::vector< edm::Ref< C >> &  refs,
const ProductIDtoIndex offset,
trigger::Keys keys,
trigger::Vids oIds 
) const
private

this routine takes a vector of Ref<C>s and determines the corresponding vector of keys (i.e., indices) into the TriggerObjectCollection

Definition at line 593 of file TriggerSummaryProducerAOD.cc.

References gen::C, edm::InputTag::encode(), Exception, fillFilterObjectMember(), edm::Event::getStableProvenance(), mps_fire::i, HLT_FULL_cff::InputTag, instance, edm::ProductID::isValid(), label, min(), dqmiodumpmetadata::n, mergeVDriftHistosByStation::name, LaserDQM_cfg::process, dt_dqm_sourceclient_common_cff::reco, and throw_.

Referenced by produce().

599  {
603 
604  using namespace std;
605  using namespace edm;
606  using namespace reco;
607  using namespace l1extra;
608  using namespace trigger;
609 
610  if (ids.size() != refs.size()) {
611  LogError("TriggerSummaryProducerAOD") << "Vector length is different: " << ids.size() << " " << refs.size();
612  }
613 
614  const unsigned int n(min(ids.size(), refs.size()));
615  for (unsigned int i = 0; i != n; ++i) {
616  const ProductID pid(refs[i].id());
617  if (!(pid.isValid())) {
618  std::ostringstream ost;
619  ost << "Iinvalid pid: " << pid << " FilterTag / Key: " << tag.encode() << " / " << i << "of" << n
620  << " CollectionTag / Key: "
621  << " <Unrecoverable>"
622  << " / " << refs[i].key() << " CollectionType: " << typeid(C).name();
623  if (throw_) {
624  throw cms::Exception("TriggerSummaryProducerAOD") << ost.str();
625  } else {
626  LogError("TriggerSummaryProducerAOD") << ost.str();
627  }
628  } else {
629  auto itOffset = offset.find(pid);
630  if (itOffset == offset.end()) {
631  const auto& prov = iEvent.getStableProvenance(pid);
632  const string& label(prov.moduleLabel());
633  const string& instance(prov.productInstanceName());
634  const string& process(prov.processName());
635  std::ostringstream ost;
636  ost << "Uunknown pid: " << pid << " FilterTag / Key: " << tag.encode() << " / " << i << "of" << n
637  << " CollectionTag / Key: " << InputTag(label, instance, process).encode() << " / " << refs[i].key()
638  << " CollectionType: " << typeid(C).name();
639  if (throw_) {
640  throw cms::Exception("TriggerSummaryProducerAOD") << ost.str();
641  } else {
642  LogError("TriggerSummaryProducerAOD") << ost.str();
643  }
644  } else {
645  fillFilterObjectMember(keys, oIDs, itOffset->second, ids[i], refs[i]);
646  }
647  }
648  }
649  return;
650 }
static PFTauRenderPlugin instance
Log< level::Error, false > LogError
std::string encode() const
Definition: InputTag.cc:159
const bool throw_
throw on error
char const * label
T min(T a, T b)
Definition: MathUtil.h:58
void fillFilterObjectMember(trigger::Keys &keys, trigger::Vids &ids, const int &, const int &, const edm::Ref< C > &) const
tuple process
Definition: LaserDQM_cfg.py:3
StableProvenance const & getStableProvenance(BranchID const &theID) const
Definition: Event.cc:124
template<typename T >
void TriggerSummaryProducerAOD::fillTriggerObject ( trigger::TriggerObjectCollection toc,
const T object 
) const
private

Definition at line 510 of file TriggerSummaryProducerAOD.cc.

Referenced by fillTriggerObjectCollections().

510  {
511  using namespace trigger;
512  toc.emplace_back(object);
513 
514  return;
515 }
void TriggerSummaryProducerAOD::fillTriggerObject ( trigger::TriggerObjectCollection toc,
const l1extra::L1HFRings object 
) const
private

Definition at line 517 of file TriggerSummaryProducerAOD.cc.

References trigger::TriggerL1HfBitCounts, and trigger::TriggerL1HfRingEtSums.

518  {
519  using namespace l1extra;
520  using namespace trigger;
521 
522  toc.emplace_back(TriggerL1HfRingEtSums,
523  object.hfEtSum(L1HFRings::kRing1PosEta),
524  object.hfEtSum(L1HFRings::kRing1NegEta),
525  object.hfEtSum(L1HFRings::kRing2PosEta),
526  object.hfEtSum(L1HFRings::kRing2NegEta));
527  toc.emplace_back(TriggerL1HfBitCounts,
528  object.hfBitCount(L1HFRings::kRing1PosEta),
529  object.hfBitCount(L1HFRings::kRing1NegEta),
530  object.hfBitCount(L1HFRings::kRing2PosEta),
531  object.hfBitCount(L1HFRings::kRing2NegEta));
532 
533  return;
534 }
void TriggerSummaryProducerAOD::fillTriggerObject ( trigger::TriggerObjectCollection toc,
const l1extra::L1EtMissParticle object 
) const
private

Definition at line 536 of file TriggerSummaryProducerAOD.cc.

References trigger::TriggerL1ETT, and trigger::TriggerL1HTT.

537  {
538  using namespace l1extra;
539  using namespace trigger;
540 
541  toc.emplace_back(object);
542  if (object.type() == L1EtMissParticle::kMET) {
543  toc.emplace_back(TriggerL1ETT, object.etTotal(), 0.0, 0.0, 0.0);
544  } else if (object.type() == L1EtMissParticle::kMHT) {
545  toc.emplace_back(TriggerL1HTT, object.etTotal(), 0.0, 0.0, 0.0);
546  } else {
547  toc.emplace_back(0, object.etTotal(), 0.0, 0.0, 0.0);
548  }
549 
550  return;
551 }
void TriggerSummaryProducerAOD::fillTriggerObject ( trigger::TriggerObjectCollection toc,
const reco::PFMET object 
) const
private

Definition at line 553 of file TriggerSummaryProducerAOD.cc.

References dt_dqm_sourceclient_common_cff::reco, trigger::TriggerELongit, trigger::TriggerMETSig, and trigger::TriggerTET.

554  {
555  using namespace reco;
556  using namespace trigger;
557 
558  toc.emplace_back(object);
559  toc.emplace_back(TriggerTET, object.sumEt(), 0.0, 0.0, 0.0);
560  toc.emplace_back(TriggerMETSig, object.mEtSig(), 0.0, 0.0, 0.0);
561  toc.emplace_back(TriggerELongit, object.e_longitudinal(), 0.0, 0.0, 0.0);
562 
563  return;
564 }
void TriggerSummaryProducerAOD::fillTriggerObject ( trigger::TriggerObjectCollection toc,
const reco::CaloMET object 
) const
private

Definition at line 566 of file TriggerSummaryProducerAOD.cc.

References dt_dqm_sourceclient_common_cff::reco, trigger::TriggerELongit, trigger::TriggerMETSig, and trigger::TriggerTET.

567  {
568  using namespace reco;
569  using namespace trigger;
570 
571  toc.emplace_back(object);
572  toc.emplace_back(TriggerTET, object.sumEt(), 0.0, 0.0, 0.0);
573  toc.emplace_back(TriggerMETSig, object.mEtSig(), 0.0, 0.0, 0.0);
574  toc.emplace_back(TriggerELongit, object.e_longitudinal(), 0.0, 0.0, 0.0);
575 
576  return;
577 }
void TriggerSummaryProducerAOD::fillTriggerObject ( trigger::TriggerObjectCollection toc,
const reco::MET object 
) const
private

Definition at line 579 of file TriggerSummaryProducerAOD.cc.

References dt_dqm_sourceclient_common_cff::reco, trigger::TriggerHLongit, trigger::TriggerMHTSig, and trigger::TriggerTHT.

580  {
581  using namespace reco;
582  using namespace trigger;
583 
584  toc.emplace_back(object);
585  toc.emplace_back(TriggerTHT, object.sumEt(), 0.0, 0.0, 0.0);
586  toc.emplace_back(TriggerMHTSig, object.mEtSig(), 0.0, 0.0, 0.0);
587  toc.emplace_back(TriggerHLongit, object.e_longitudinal(), 0.0, 0.0, 0.0);
588 
589  return;
590 }
template<typename C >
void TriggerSummaryProducerAOD::fillTriggerObjectCollections ( trigger::TriggerObjectCollection toc,
ProductIDtoIndex offset,
std::vector< std::string > &  tags,
trigger::Keys keys,
const edm::Event iEvent,
const edm::GetterOfProducts< C > &  getter,
const InputTagSet collectionTagsEvent 
) const
private

this routine accesses the original (L3) collections (with C++ typename C), extracts 4-momentum and id of each collection member, and packs this up

end loop over handles

Definition at line 463 of file TriggerSummaryProducerAOD.cc.

References edm::GetterOfProducts< T >::fillHandles(), fillTriggerObject(), mps_fire::i, instance, label, edm::Provenance::moduleLabel(), dqmiodumpmetadata::n, LaserDQM_cfg::process, edm::Provenance::processName(), edm::Provenance::productInstanceName(), dt_dqm_sourceclient_common_cff::reco, and findQualityFiles::size.

469  {
473 
474  using namespace std;
475  using namespace edm;
476  using namespace reco;
477  using namespace l1extra;
478  using namespace trigger;
479  using namespace l1t;
480 
481  vector<Handle<C>> collections;
482  getter.fillHandles(iEvent, collections);
483  const unsigned int nc(collections.size());
484 
485  for (unsigned int ic = 0; ic != nc; ++ic) {
486  const Provenance& provenance(*(collections[ic].provenance()));
487  const string& label(provenance.moduleLabel());
488  const string& instance(provenance.productInstanceName());
489  const string& process(provenance.processName());
490  const InputTag collectionTag(label, instance, process);
491 
492  if (collectionTagsEvent.find(collectionTag) != collectionTagsEvent.end()) {
493  const ProductID pid(collections[ic].provenance()->productID());
494  if (offset.find(pid) != offset.end()) {
495  LogError("TriggerSummaryProducerAOD") << "Duplicate pid: " << pid;
496  }
497  offset[pid] = toc.size();
498  const unsigned int n(collections[ic]->size());
499  for (unsigned int i = 0; i != n; ++i) {
500  fillTriggerObject(toc, (*collections[ic])[i]);
501  }
502  tags.push_back(collectionTag.encode());
503  keys.push_back(toc.size());
504  }
505 
506  }
507 }
void fillTriggerObject(trigger::TriggerObjectCollection &, const T &) const
static PFTauRenderPlugin instance
void fillHandles(edm::Event const &event, std::vector< edm::Handle< T >> &handles) const
Log< level::Error, false > LogError
char const * label
tuple process
Definition: LaserDQM_cfg.py:3
tuple size
Write out results.
void TriggerSummaryProducerAOD::produce ( edm::StreamID  ,
edm::Event iEvent,
const edm::EventSetup iSetup 
) const
overridevirtual

check whether collection tags are recorded in filterobjects; if so, these are L3 collections to be packed up, and the corresponding filter is a L3 filter also to be packed up. Record the InputTags of those L3 filters and L3 collections

check uniqueness count

accumulate for endJob printout

debug printout

event-by-event tags

Now the processing: first trigger objects from L3 collections, then L3 filter objects

create trigger objects, fill triggerobjectcollection and offset map

construct single AOD product, reserving capacity

fill trigger object collection

fill the L3 filter objects

Implements edm::global::EDProducerBase.

Definition at line 239 of file TriggerSummaryProducerAOD.cc.

References collectionTagsGlobal_, HLT_FULL_cff::distance, fillFilterObjectMembers(), edm::GetterOfProducts< T >::fillHandles(), filterTagsGlobal_, getCaloJetCollection_, getCaloMETCollection_, getCompositeCandidateCollection_, getElectronCollection_, getIsolatedPixelTrackCandidateCollection_, getL1EmParticleCollection_, getL1EtMissParticleCollection_, getL1HFRingsCollection_, getL1JetParticleCollection_, getL1MuonParticleCollection_, getL1TEGammaParticleCollection_, getL1TEtSumParticleCollection_, getL1THPSPFTauCollection_, getL1TJetParticleCollection_, getL1TMuonParticleCollection_, getL1TPFJetCollection_, getL1TPFTauCollection_, getL1TPFTrackCollection_, getL1TTauParticleCollection_, getL1TTkElectronCollection_, getL1TTkEmCollection_, getL1TTkMuonCollection_, getMETCollection_, getPFJetCollection_, getPFMETCollection_, getPFTauCollection_, getRecoChargedCandidateCollection_, getRecoEcalCandidateCollection_, getTriggerFilterObjectWithRefs_, iEvent, HLT_FULL_cff::InputTag, instance, edm::isDebugEnabled(), relativeConstraints::keys, label, LogDebug, LogTrace, eostools::move(), hltrates_dqm_sourceclient-live_cfg::offset, pn_, LaserDQM_cfg::process, FSQHLTOfflineSource_cfi::processName, edm::Event::put(), dt_dqm_sourceclient_common_cff::reco, and getPayloadData::tags.

239  {
240  using namespace std;
241  using namespace edm;
242  using namespace reco;
243  using namespace l1extra;
244  using namespace trigger;
245  using namespace l1t;
246 
247  std::vector<edm::Handle<trigger::TriggerFilterObjectWithRefs>> fobs;
249 
250  const unsigned int nfob(fobs.size());
251  LogTrace("TriggerSummaryProducerAOD") << "Number of filter objects found: " << nfob;
252 
253  string tagLabel, tagInstance, tagProcess;
254 
260  std::vector<bool> maskFilters;
261  maskFilters.resize(nfob);
262  InputTagSet filterTagsEvent(pn_ != "*");
263  InputTagSet collectionTagsEvent(pn_ != "*");
264 
265  unsigned int nf(0);
266  for (unsigned int ifob = 0; ifob != nfob; ++ifob) {
267  maskFilters[ifob] = false;
268  const vector<string>& collectionTags_(fobs[ifob]->getCollectionTagsAsStrings());
269  const unsigned int ncol(collectionTags_.size());
270  if (ncol > 0) {
271  nf++;
272  maskFilters[ifob] = true;
273  const string& label(fobs[ifob].provenance()->moduleLabel());
274  const string& instance(fobs[ifob].provenance()->productInstanceName());
275  const string& process(fobs[ifob].provenance()->processName());
276  filterTagsEvent.insert(InputTag(label, instance, process));
277  for (unsigned int icol = 0; icol != ncol; ++icol) {
278  // overwrite process name (usually not set)
279  tokenizeTag(collectionTags_[icol], tagLabel, tagInstance, tagProcess);
280  collectionTagsEvent.insert(InputTag(tagLabel, tagInstance, pn_));
281  }
282  }
283  }
285  if (filterTagsEvent.size() != nf) {
286  LogError("TriggerSummaryProducerAOD")
287  << "Mismatch in number of filter tags: " << filterTagsEvent.size() << "!=" << nf;
288  }
289 
291  collectionTagsGlobal_.insert(collectionTagsEvent.begin(), collectionTagsEvent.end());
292  filterTagsGlobal_.insert(filterTagsEvent.begin(), filterTagsEvent.end());
293 
295  if (isDebugEnabled()) {
297  const unsigned int nc(collectionTagsEvent.size());
298  LogTrace("TriggerSummaryProducerAOD") << "Number of unique collections requested " << nc;
299  const InputTagSet::const_iterator cb(collectionTagsEvent.begin());
300  const InputTagSet::const_iterator ce(collectionTagsEvent.end());
301  for (InputTagSet::const_iterator ci = cb; ci != ce; ++ci) {
302  LogTrace("TriggerSummaryProducerAOD") << distance(cb, ci) << " " << ci->encode();
303  }
304  const unsigned int nf(filterTagsEvent.size());
305  LogTrace("TriggerSummaryProducerAOD") << "Number of unique filters requested " << nf;
306  const InputTagSet::const_iterator fb(filterTagsEvent.begin());
307  const InputTagSet::const_iterator fe(filterTagsEvent.end());
308  for (InputTagSet::const_iterator fi = fb; fi != fe; ++fi) {
309  LogTrace("TriggerSummaryProducerAOD") << distance(fb, fi) << " " << fi->encode();
310  }
311  }
312 
319  //toc_.clear();
320  std::vector<std::string> tags;
322  std::map<edm::ProductID, unsigned int> offset;
323 
324  fillTriggerObjectCollections<RecoEcalCandidateCollection>(
325  toc, offset, tags, keys, iEvent, getRecoEcalCandidateCollection_, collectionTagsEvent);
326  fillTriggerObjectCollections<ElectronCollection>(
327  toc, offset, tags, keys, iEvent, getElectronCollection_, collectionTagsEvent);
328  fillTriggerObjectCollections<RecoChargedCandidateCollection>(
329  toc, offset, tags, keys, iEvent, getRecoChargedCandidateCollection_, collectionTagsEvent);
330  fillTriggerObjectCollections<CaloJetCollection>(
331  toc, offset, tags, keys, iEvent, getCaloJetCollection_, collectionTagsEvent);
332  fillTriggerObjectCollections<CompositeCandidateCollection>(
333  toc, offset, tags, keys, iEvent, getCompositeCandidateCollection_, collectionTagsEvent);
334  fillTriggerObjectCollections<METCollection>(toc, offset, tags, keys, iEvent, getMETCollection_, collectionTagsEvent);
335  fillTriggerObjectCollections<CaloMETCollection>(
336  toc, offset, tags, keys, iEvent, getCaloMETCollection_, collectionTagsEvent);
337  fillTriggerObjectCollections<IsolatedPixelTrackCandidateCollection>(
338  toc, offset, tags, keys, iEvent, getIsolatedPixelTrackCandidateCollection_, collectionTagsEvent);
340  fillTriggerObjectCollections<L1EmParticleCollection>(
341  toc, offset, tags, keys, iEvent, getL1EmParticleCollection_, collectionTagsEvent);
342  fillTriggerObjectCollections<L1MuonParticleCollection>(
343  toc, offset, tags, keys, iEvent, getL1MuonParticleCollection_, collectionTagsEvent);
344  fillTriggerObjectCollections<L1JetParticleCollection>(
345  toc, offset, tags, keys, iEvent, getL1JetParticleCollection_, collectionTagsEvent);
346  fillTriggerObjectCollections<L1EtMissParticleCollection>(
347  toc, offset, tags, keys, iEvent, getL1EtMissParticleCollection_, collectionTagsEvent);
348  fillTriggerObjectCollections<L1HFRingsCollection>(
349  toc, offset, tags, keys, iEvent, getL1HFRingsCollection_, collectionTagsEvent);
350  fillTriggerObjectCollections<MuonBxCollection>(
351  toc, offset, tags, keys, iEvent, getL1TMuonParticleCollection_, collectionTagsEvent);
352  fillTriggerObjectCollections<EGammaBxCollection>(
353  toc, offset, tags, keys, iEvent, getL1TEGammaParticleCollection_, collectionTagsEvent);
354  fillTriggerObjectCollections<JetBxCollection>(
355  toc, offset, tags, keys, iEvent, getL1TJetParticleCollection_, collectionTagsEvent);
356  fillTriggerObjectCollections<TauBxCollection>(
357  toc, offset, tags, keys, iEvent, getL1TTauParticleCollection_, collectionTagsEvent);
358  fillTriggerObjectCollections<EtSumBxCollection>(
359  toc, offset, tags, keys, iEvent, getL1TEtSumParticleCollection_, collectionTagsEvent);
361  fillTriggerObjectCollections<l1t::TkMuonCollection>(
362  toc, offset, tags, keys, iEvent, getL1TTkMuonCollection_, collectionTagsEvent);
363  fillTriggerObjectCollections<l1t::TkElectronCollection>(
364  toc, offset, tags, keys, iEvent, getL1TTkElectronCollection_, collectionTagsEvent);
365  fillTriggerObjectCollections<l1t::TkEmCollection>(
366  toc, offset, tags, keys, iEvent, getL1TTkEmCollection_, collectionTagsEvent);
367  fillTriggerObjectCollections<l1t::PFJetCollection>(
368  toc, offset, tags, keys, iEvent, getL1TPFJetCollection_, collectionTagsEvent);
369  fillTriggerObjectCollections<l1t::PFTauCollection>(
370  toc, offset, tags, keys, iEvent, getL1TPFTauCollection_, collectionTagsEvent);
371  fillTriggerObjectCollections<l1t::HPSPFTauCollection>(
372  toc, offset, tags, keys, iEvent, getL1THPSPFTauCollection_, collectionTagsEvent);
373  fillTriggerObjectCollections<l1t::PFTrackCollection>(
374  toc, offset, tags, keys, iEvent, getL1TPFTrackCollection_, collectionTagsEvent);
376  fillTriggerObjectCollections<reco::PFJetCollection>(
377  toc, offset, tags, keys, iEvent, getPFJetCollection_, collectionTagsEvent);
378  fillTriggerObjectCollections<reco::PFTauCollection>(
379  toc, offset, tags, keys, iEvent, getPFTauCollection_, collectionTagsEvent);
380  fillTriggerObjectCollections<reco::PFMETCollection>(
381  toc, offset, tags, keys, iEvent, getPFMETCollection_, collectionTagsEvent);
383  const unsigned int nk(tags.size());
384  LogDebug("TriggerSummaryProducerAOD") << "Number of collections found: " << nk;
385  const unsigned int no(toc.size());
386  LogDebug("TriggerSummaryProducerAOD") << "Number of physics objects found: " << no;
387 
390  unique_ptr<TriggerEvent> product(new TriggerEvent(pn_, nk, no, nf));
391 
393  product->addCollections(tags, keys);
394  product->addObjects(toc);
395 
397  trigger::Vids ids;
398  for (unsigned int ifob = 0; ifob != nfob; ++ifob) {
399  if (maskFilters[ifob]) {
400  const string& label(fobs[ifob].provenance()->moduleLabel());
401  const string& instance(fobs[ifob].provenance()->productInstanceName());
402  const string& process(fobs[ifob].provenance()->processName());
403  const edm::InputTag filterTag(label, instance, process);
404  ids.clear();
405  keys.clear();
406  fillFilterObjectMembers(iEvent, filterTag, fobs[ifob]->photonIds(), fobs[ifob]->photonRefs(), offset, keys, ids);
408  iEvent, filterTag, fobs[ifob]->electronIds(), fobs[ifob]->electronRefs(), offset, keys, ids);
409  fillFilterObjectMembers(iEvent, filterTag, fobs[ifob]->muonIds(), fobs[ifob]->muonRefs(), offset, keys, ids);
410  fillFilterObjectMembers(iEvent, filterTag, fobs[ifob]->jetIds(), fobs[ifob]->jetRefs(), offset, keys, ids);
412  iEvent, filterTag, fobs[ifob]->compositeIds(), fobs[ifob]->compositeRefs(), offset, keys, ids);
414  iEvent, filterTag, fobs[ifob]->basemetIds(), fobs[ifob]->basemetRefs(), offset, keys, ids);
416  iEvent, filterTag, fobs[ifob]->calometIds(), fobs[ifob]->calometRefs(), offset, keys, ids);
418  iEvent, filterTag, fobs[ifob]->pixtrackIds(), fobs[ifob]->pixtrackRefs(), offset, keys, ids);
419  fillFilterObjectMembers(iEvent, filterTag, fobs[ifob]->l1emIds(), fobs[ifob]->l1emRefs(), offset, keys, ids);
420  fillFilterObjectMembers(iEvent, filterTag, fobs[ifob]->l1muonIds(), fobs[ifob]->l1muonRefs(), offset, keys, ids);
421  fillFilterObjectMembers(iEvent, filterTag, fobs[ifob]->l1jetIds(), fobs[ifob]->l1jetRefs(), offset, keys, ids);
423  iEvent, filterTag, fobs[ifob]->l1etmissIds(), fobs[ifob]->l1etmissRefs(), offset, keys, ids);
425  iEvent, filterTag, fobs[ifob]->l1hfringsIds(), fobs[ifob]->l1hfringsRefs(), offset, keys, ids);
427  iEvent, filterTag, fobs[ifob]->l1tmuonIds(), fobs[ifob]->l1tmuonRefs(), offset, keys, ids);
429  iEvent, filterTag, fobs[ifob]->l1tegammaIds(), fobs[ifob]->l1tegammaRefs(), offset, keys, ids);
430  fillFilterObjectMembers(iEvent, filterTag, fobs[ifob]->l1tjetIds(), fobs[ifob]->l1tjetRefs(), offset, keys, ids);
431  fillFilterObjectMembers(iEvent, filterTag, fobs[ifob]->l1ttauIds(), fobs[ifob]->l1ttauRefs(), offset, keys, ids);
433  iEvent, filterTag, fobs[ifob]->l1tetsumIds(), fobs[ifob]->l1tetsumRefs(), offset, keys, ids);
434 
436  iEvent, filterTag, fobs[ifob]->l1ttkmuonIds(), fobs[ifob]->l1ttkmuonRefs(), offset, keys, ids);
438  iEvent, filterTag, fobs[ifob]->l1ttkeleIds(), fobs[ifob]->l1ttkeleRefs(), offset, keys, ids);
440  iEvent, filterTag, fobs[ifob]->l1ttkemIds(), fobs[ifob]->l1ttkemRefs(), offset, keys, ids);
442  iEvent, filterTag, fobs[ifob]->l1tpfjetIds(), fobs[ifob]->l1tpfjetRefs(), offset, keys, ids);
444  iEvent, filterTag, fobs[ifob]->l1tpftauIds(), fobs[ifob]->l1tpftauRefs(), offset, keys, ids);
446  iEvent, filterTag, fobs[ifob]->l1thpspftauIds(), fobs[ifob]->l1thpspftauRefs(), offset, keys, ids);
448  iEvent, filterTag, fobs[ifob]->l1tpftrackIds(), fobs[ifob]->l1tpftrackRefs(), offset, keys, ids);
449 
450  fillFilterObjectMembers(iEvent, filterTag, fobs[ifob]->pfjetIds(), fobs[ifob]->pfjetRefs(), offset, keys, ids);
451  fillFilterObjectMembers(iEvent, filterTag, fobs[ifob]->pftauIds(), fobs[ifob]->pftauRefs(), offset, keys, ids);
452  fillFilterObjectMembers(iEvent, filterTag, fobs[ifob]->pfmetIds(), fobs[ifob]->pfmetRefs(), offset, keys, ids);
453  product->addFilter(filterTag, ids, keys);
454  }
455  }
456 
457  OrphanHandle<TriggerEvent> ref = iEvent.put(std::move(product));
458  LogTrace("TriggerSummaryProducerAOD") << "Number of physics objects packed: " << ref->sizeObjects();
459  LogTrace("TriggerSummaryProducerAOD") << "Number of filter objects packed: " << ref->sizeFilters();
460 }
bool isDebugEnabled()
edm::GetterOfProducts< l1t::TauBxCollection > getL1TTauParticleCollection_
edm::GetterOfProducts< l1extra::L1JetParticleCollection > getL1JetParticleCollection_
edm::GetterOfProducts< reco::IsolatedPixelTrackCandidateCollection > getIsolatedPixelTrackCandidateCollection_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:133
edm::GetterOfProducts< reco::RecoEcalCandidateCollection > getRecoEcalCandidateCollection_
edm::GetterOfProducts< l1t::PFTrackCollection > getL1TPFTrackCollection_
edm::GetterOfProducts< l1extra::L1MuonParticleCollection > getL1MuonParticleCollection_
The single EDProduct to be saved for each event (AOD case)
Definition: TriggerEvent.h:25
edm::GetterOfProducts< reco::PFTauCollection > getPFTauCollection_
static PFTauRenderPlugin instance
edm::GetterOfProducts< reco::METCollection > getMETCollection_
edm::GetterOfProducts< l1t::JetBxCollection > getL1TJetParticleCollection_
edm::GetterOfProducts< l1t::TkElectronCollection > getL1TTkElectronCollection_
void fillHandles(edm::Event const &event, std::vector< edm::Handle< T >> &handles) const
tbb::concurrent_unordered_set< edm::InputTag, InputTagHash > filterTagsGlobal_
list of L3 filter tags
tbb::concurrent_unordered_set< edm::InputTag, InputTagHash > collectionTagsGlobal_
list of L3 collection tags
edm::GetterOfProducts< reco::CaloJetCollection > getCaloJetCollection_
edm::GetterOfProducts< l1extra::L1EtMissParticleCollection > getL1EtMissParticleCollection_
Log< level::Error, false > LogError
#define LogTrace(id)
edm::GetterOfProducts< reco::PFJetCollection > getPFJetCollection_
char const * label
std::set< edm::InputTag, OrderInputTag > InputTagSet
int iEvent
Definition: GenABIO.cc:224
edm::GetterOfProducts< l1t::TkEmCollection > getL1TTkEmCollection_
edm::GetterOfProducts< reco::RecoChargedCandidateCollection > getRecoChargedCandidateCollection_
edm::GetterOfProducts< l1extra::L1HFRingsCollection > getL1HFRingsCollection_
edm::GetterOfProducts< l1t::TkMuonCollection > getL1TTkMuonCollection_
def move
Definition: eostools.py:511
edm::GetterOfProducts< l1t::PFTauCollection > getL1TPFTauCollection_
edm::GetterOfProducts< l1t::MuonBxCollection > getL1TMuonParticleCollection_
edm::GetterOfProducts< l1t::HPSPFTauCollection > getL1THPSPFTauCollection_
void fillFilterObjectMembers(const edm::Event &, const edm::InputTag &tag, const trigger::Vids &, const std::vector< edm::Ref< C >> &, const ProductIDtoIndex &, trigger::Keys &keys, trigger::Vids &oIds) const
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:75
std::vector< size_type > Keys
edm::GetterOfProducts< reco::CaloMETCollection > getCaloMETCollection_
edm::GetterOfProducts< reco::ElectronCollection > getElectronCollection_
edm::GetterOfProducts< reco::CompositeCandidateCollection > getCompositeCandidateCollection_
edm::GetterOfProducts< trigger::TriggerFilterObjectWithRefs > getTriggerFilterObjectWithRefs_
trigger object collection
edm::GetterOfProducts< reco::PFMETCollection > getPFMETCollection_
edm::GetterOfProducts< l1t::PFJetCollection > getL1TPFJetCollection_
tuple process
Definition: LaserDQM_cfg.py:3
edm::GetterOfProducts< l1t::EtSumBxCollection > getL1TEtSumParticleCollection_
std::vector< int > Vids
edm::GetterOfProducts< l1extra::L1EmParticleCollection > getL1EmParticleCollection_
#define LogDebug(id)
edm::GetterOfProducts< l1t::EGammaBxCollection > getL1TEGammaParticleCollection_

Member Data Documentation

tbb::concurrent_unordered_set<edm::InputTag, InputTagHash> TriggerSummaryProducerAOD::collectionTagsGlobal_
mutableprivate

list of L3 collection tags

Definition at line 174 of file TriggerSummaryProducerAOD.h.

Referenced by endJob(), and produce().

tbb::concurrent_unordered_set<edm::InputTag, InputTagHash> TriggerSummaryProducerAOD::filterTagsGlobal_
mutableprivate

list of L3 filter tags

Definition at line 171 of file TriggerSummaryProducerAOD.h.

Referenced by endJob(), and produce().

edm::GetterOfProducts<reco::CaloJetCollection> TriggerSummaryProducerAOD::getCaloJetCollection_
private

Definition at line 194 of file TriggerSummaryProducerAOD.h.

Referenced by produce(), and TriggerSummaryProducerAOD().

edm::GetterOfProducts<reco::CaloMETCollection> TriggerSummaryProducerAOD::getCaloMETCollection_
private

Definition at line 197 of file TriggerSummaryProducerAOD.h.

Referenced by produce(), and TriggerSummaryProducerAOD().

edm::GetterOfProducts<reco::CompositeCandidateCollection> TriggerSummaryProducerAOD::getCompositeCandidateCollection_
private

Definition at line 195 of file TriggerSummaryProducerAOD.h.

Referenced by produce(), and TriggerSummaryProducerAOD().

edm::GetterOfProducts<reco::ElectronCollection> TriggerSummaryProducerAOD::getElectronCollection_
private

Definition at line 192 of file TriggerSummaryProducerAOD.h.

Referenced by produce(), and TriggerSummaryProducerAOD().

edm::GetterOfProducts<reco::IsolatedPixelTrackCandidateCollection> TriggerSummaryProducerAOD::getIsolatedPixelTrackCandidateCollection_
private

Definition at line 199 of file TriggerSummaryProducerAOD.h.

Referenced by produce(), and TriggerSummaryProducerAOD().

edm::GetterOfProducts<l1extra::L1EmParticleCollection> TriggerSummaryProducerAOD::getL1EmParticleCollection_
private

Definition at line 200 of file TriggerSummaryProducerAOD.h.

Referenced by produce(), and TriggerSummaryProducerAOD().

edm::GetterOfProducts<l1extra::L1EtMissParticleCollection> TriggerSummaryProducerAOD::getL1EtMissParticleCollection_
private

Definition at line 203 of file TriggerSummaryProducerAOD.h.

Referenced by produce(), and TriggerSummaryProducerAOD().

edm::GetterOfProducts<l1extra::L1HFRingsCollection> TriggerSummaryProducerAOD::getL1HFRingsCollection_
private

Definition at line 204 of file TriggerSummaryProducerAOD.h.

Referenced by produce(), and TriggerSummaryProducerAOD().

edm::GetterOfProducts<l1extra::L1JetParticleCollection> TriggerSummaryProducerAOD::getL1JetParticleCollection_
private

Definition at line 202 of file TriggerSummaryProducerAOD.h.

Referenced by produce(), and TriggerSummaryProducerAOD().

edm::GetterOfProducts<l1extra::L1MuonParticleCollection> TriggerSummaryProducerAOD::getL1MuonParticleCollection_
private

Definition at line 201 of file TriggerSummaryProducerAOD.h.

Referenced by produce(), and TriggerSummaryProducerAOD().

edm::GetterOfProducts<l1t::EGammaBxCollection> TriggerSummaryProducerAOD::getL1TEGammaParticleCollection_
private

Definition at line 208 of file TriggerSummaryProducerAOD.h.

Referenced by produce(), and TriggerSummaryProducerAOD().

edm::GetterOfProducts<l1t::EtSumBxCollection> TriggerSummaryProducerAOD::getL1TEtSumParticleCollection_
private

Definition at line 211 of file TriggerSummaryProducerAOD.h.

Referenced by produce(), and TriggerSummaryProducerAOD().

edm::GetterOfProducts<l1t::HPSPFTauCollection> TriggerSummaryProducerAOD::getL1THPSPFTauCollection_
private

Definition at line 217 of file TriggerSummaryProducerAOD.h.

Referenced by produce(), and TriggerSummaryProducerAOD().

edm::GetterOfProducts<l1t::JetBxCollection> TriggerSummaryProducerAOD::getL1TJetParticleCollection_
private

Definition at line 209 of file TriggerSummaryProducerAOD.h.

Referenced by produce(), and TriggerSummaryProducerAOD().

edm::GetterOfProducts<l1t::MuonBxCollection> TriggerSummaryProducerAOD::getL1TMuonParticleCollection_
private

Definition at line 207 of file TriggerSummaryProducerAOD.h.

Referenced by produce(), and TriggerSummaryProducerAOD().

edm::GetterOfProducts<l1t::PFJetCollection> TriggerSummaryProducerAOD::getL1TPFJetCollection_
private

Definition at line 215 of file TriggerSummaryProducerAOD.h.

Referenced by produce(), and TriggerSummaryProducerAOD().

edm::GetterOfProducts<l1t::PFTauCollection> TriggerSummaryProducerAOD::getL1TPFTauCollection_
private

Definition at line 216 of file TriggerSummaryProducerAOD.h.

Referenced by produce(), and TriggerSummaryProducerAOD().

edm::GetterOfProducts<l1t::PFTrackCollection> TriggerSummaryProducerAOD::getL1TPFTrackCollection_
private

Definition at line 218 of file TriggerSummaryProducerAOD.h.

Referenced by produce(), and TriggerSummaryProducerAOD().

edm::GetterOfProducts<l1t::TauBxCollection> TriggerSummaryProducerAOD::getL1TTauParticleCollection_
private

Definition at line 210 of file TriggerSummaryProducerAOD.h.

Referenced by produce(), and TriggerSummaryProducerAOD().

edm::GetterOfProducts<l1t::TkElectronCollection> TriggerSummaryProducerAOD::getL1TTkElectronCollection_
private

Definition at line 213 of file TriggerSummaryProducerAOD.h.

Referenced by produce(), and TriggerSummaryProducerAOD().

edm::GetterOfProducts<l1t::TkEmCollection> TriggerSummaryProducerAOD::getL1TTkEmCollection_
private

Definition at line 214 of file TriggerSummaryProducerAOD.h.

Referenced by produce(), and TriggerSummaryProducerAOD().

edm::GetterOfProducts<l1t::TkMuonCollection> TriggerSummaryProducerAOD::getL1TTkMuonCollection_
private

Definition at line 212 of file TriggerSummaryProducerAOD.h.

Referenced by produce(), and TriggerSummaryProducerAOD().

edm::GetterOfProducts<reco::METCollection> TriggerSummaryProducerAOD::getMETCollection_
private

Definition at line 196 of file TriggerSummaryProducerAOD.h.

Referenced by produce(), and TriggerSummaryProducerAOD().

edm::GetterOfProducts<reco::PFJetCollection> TriggerSummaryProducerAOD::getPFJetCollection_
private

Definition at line 205 of file TriggerSummaryProducerAOD.h.

Referenced by produce(), and TriggerSummaryProducerAOD().

edm::GetterOfProducts<reco::PFMETCollection> TriggerSummaryProducerAOD::getPFMETCollection_
private

Definition at line 198 of file TriggerSummaryProducerAOD.h.

Referenced by produce(), and TriggerSummaryProducerAOD().

edm::GetterOfProducts<reco::PFTauCollection> TriggerSummaryProducerAOD::getPFTauCollection_
private

Definition at line 206 of file TriggerSummaryProducerAOD.h.

Referenced by produce(), and TriggerSummaryProducerAOD().

edm::GetterOfProducts<reco::RecoChargedCandidateCollection> TriggerSummaryProducerAOD::getRecoChargedCandidateCollection_
private

Definition at line 193 of file TriggerSummaryProducerAOD.h.

Referenced by produce(), and TriggerSummaryProducerAOD().

edm::GetterOfProducts<reco::RecoEcalCandidateCollection> TriggerSummaryProducerAOD::getRecoEcalCandidateCollection_
private

Definition at line 191 of file TriggerSummaryProducerAOD.h.

Referenced by produce(), and TriggerSummaryProducerAOD().

edm::GetterOfProducts<trigger::TriggerFilterObjectWithRefs> TriggerSummaryProducerAOD::getTriggerFilterObjectWithRefs_
private

trigger object collection

global map for indices into toc_: offset per input L3 collection keys ids packing decision

Definition at line 190 of file TriggerSummaryProducerAOD.h.

Referenced by produce(), and TriggerSummaryProducerAOD().

std::vector<std::regex> TriggerSummaryProducerAOD::moduleLabelPatternsToMatch_
private

module labels which should be avoided

Definition at line 167 of file TriggerSummaryProducerAOD.h.

Referenced by TriggerSummaryProducerAOD().

std::vector<std::regex> TriggerSummaryProducerAOD::moduleLabelPatternsToSkip_
private

Definition at line 168 of file TriggerSummaryProducerAOD.h.

Referenced by TriggerSummaryProducerAOD().

std::string TriggerSummaryProducerAOD::pn_
private

process name

Definition at line 165 of file TriggerSummaryProducerAOD.h.

Referenced by produce(), and TriggerSummaryProducerAOD().

const bool TriggerSummaryProducerAOD::throw_
private

throw on error

Definition at line 163 of file TriggerSummaryProducerAOD.h.

Referenced by fillFilterObjectMembers().