CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
TrigObjTnPSource Class Reference
Inheritance diagram for TrigObjTnPSource:
DQMGlobalEDAnalyzer< std::vector< TrigObjTnPHistColl > > DQMGlobalEDAnalyzerBase< std::vector< TrigObjTnPHistColl >, Args... > edm::global::EDProducer< edm::RunCache< std::vector< TrigObjTnPHistColl > >, edm::EndRunProducer, edm::Accumulator, Args... > edm::global::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

void bookHistograms (DQMStore::IBooker &, const edm::Run &, const edm::EventSetup &, std::vector< TrigObjTnPHistColl > &) const override
 
void dqmAnalyze (const edm::Event &, const edm::EventSetup &, const std::vector< TrigObjTnPHistColl > &) const override
 
void dqmBeginRun (const edm::Run &, const edm::EventSetup &, std::vector< TrigObjTnPHistColl > &) const override
 
TrigObjTnPSourceoperator= (const TrigObjTnPSource &)=delete
 
 TrigObjTnPSource (const edm::ParameterSet &)
 
 TrigObjTnPSource (const TrigObjTnPSource &)=delete
 
 ~TrigObjTnPSource () override=default
 
- Public Member Functions inherited from DQMGlobalEDAnalyzer< std::vector< TrigObjTnPHistColl > >
virtual void dqmEndRun (edm::Run const &, edm::EventSetup const &, std::vector< TrigObjTnPHistColl > const &) const
 
void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup) const final
 
- Public Member Functions inherited from DQMGlobalEDAnalyzerBase< std::vector< TrigObjTnPHistColl >, Args... >
void accumulate (edm::StreamID id, edm::Event const &event, edm::EventSetup const &setup) const final
 
 DQMGlobalEDAnalyzerBase ()
 
std::shared_ptr< std::vector< TrigObjTnPHistColl > > globalBeginRun (edm::Run const &run, edm::EventSetup const &setup) const final
 
void globalEndRun (edm::Run const &, edm::EventSetup const &) const final
 
- Public Member Functions inherited from edm::global::EDProducer< edm::RunCache< std::vector< TrigObjTnPHistColl > >, edm::EndRunProducer, edm::Accumulator, Args... >
 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
 
std::vector< bool > const & recordProvenanceList () 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)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~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
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > 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
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices 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 Attributes

std::vector< edm::ParameterSethistCollConfigs_
 
std::string hltProcess_
 
edm::EDGetTokenT< trigger::TriggerEventtrigEvtToken_
 
edm::EDGetTokenT< edm::TriggerResultstrigResultsToken_
 

Additional Inherited Members

- Public Types inherited from DQMGlobalEDAnalyzerBase< std::vector< TrigObjTnPHistColl >, Args... >
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::global::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
template<typename T >
using BranchAliasSetterT = ProductRegistryHelper::BranchAliasSetterT< T >
 
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 DQMGlobalEDAnalyzerBase< std::vector< TrigObjTnPHistColl >, Args... >
uint64_t meId (edm::Run const &run) const
 
- Protected Member Functions inherited from edm::ProducerBase
template<Transition Tr = Transition::Event>
auto produces (std::string instanceName) noexcept
 declare what type of product will make and with which optional label More...
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
template<Transition Tr = Transition::Event>
auto produces () noexcept
 
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< Bconsumes (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 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 ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
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)
 
- Protected Attributes inherited from DQMGlobalEDAnalyzerBase< std::vector< TrigObjTnPHistColl >, Args... >
DQMStoredqmstore_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 14 of file TrigObjTnPSource.cc.

Constructor & Destructor Documentation

◆ TrigObjTnPSource() [1/2]

TrigObjTnPSource::TrigObjTnPSource ( const edm::ParameterSet config)
explicit

Definition at line 39 of file TrigObjTnPSource.cc.

40  : trigEvtToken_(consumes<trigger::TriggerEvent>(config.getParameter<edm::InputTag>("triggerEvent"))),
41  trigResultsToken_(consumes<edm::TriggerResults>(config.getParameter<edm::InputTag>("triggerResults"))),
42  hltProcess_(config.getParameter<edm::InputTag>("triggerResults").process()),
43  histCollConfigs_(config.getParameter<std::vector<edm::ParameterSet>>("histColls")) {}
std::vector< edm::ParameterSet > histCollConfigs_
Definition: config.py:1
edm::EDGetTokenT< edm::TriggerResults > trigResultsToken_
std::string hltProcess_
std::string const & process() const
Definition: InputTag.h:40
edm::EDGetTokenT< trigger::TriggerEvent > trigEvtToken_

◆ ~TrigObjTnPSource()

TrigObjTnPSource::~TrigObjTnPSource ( )
overridedefault

◆ TrigObjTnPSource() [2/2]

TrigObjTnPSource::TrigObjTnPSource ( const TrigObjTnPSource )
delete

Member Function Documentation

◆ bookHistograms()

void TrigObjTnPSource::bookHistograms ( DQMStore::IBooker iBooker,
const edm::Run run,
const edm::EventSetup setup,
std::vector< TrigObjTnPHistColl > &  tnpHistColls 
) const
overridevirtual

Implements DQMGlobalEDAnalyzerBase< std::vector< TrigObjTnPHistColl >, Args... >.

Definition at line 53 of file TrigObjTnPSource.cc.

References histCollConfigs_, HltComparatorCreateWorkflow::hltConfig, hltProcess_, writedatasetfile::run, and singleTopDQM_cfi::setup.

56  {
57  tnpHistColls.clear();
59  bool hltChanged = false;
60  hltConfig.init(run, setup, hltProcess_, hltChanged);
61  for (auto& histCollConfig : histCollConfigs_)
62  tnpHistColls.emplace_back(TrigObjTnPHistColl(histCollConfig));
63  for (auto& histColl : tnpHistColls) {
64  histColl.init(hltConfig);
65  histColl.bookHists(iBooker);
66  }
67 }
std::vector< edm::ParameterSet > histCollConfigs_
std::string hltProcess_

◆ dqmAnalyze()

void TrigObjTnPSource::dqmAnalyze ( const edm::Event event,
const edm::EventSetup setup,
const std::vector< TrigObjTnPHistColl > &  tnpHistColls 
) const
overridevirtual

Implements DQMGlobalEDAnalyzerBase< std::vector< TrigObjTnPHistColl >, Args... >.

Definition at line 73 of file TrigObjTnPSource.cc.

References edm::HandleBase::isValid(), trigEvtToken_, and trigResultsToken_.

75  {
77  event.getByToken(trigEvtToken_, trigEvtHandle);
78  edm::Handle<edm::TriggerResults> trigResultsHandle;
79  event.getByToken(trigResultsToken_, trigResultsHandle);
80  //DQM should never crash the HLT under any circumstances (except at configure)
81  if (trigEvtHandle.isValid() && trigResultsHandle.isValid()) {
82  for (auto& histColl : tnpHistColls) {
83  histColl.fill(*trigEvtHandle, *trigResultsHandle, event.triggerNames(*trigResultsHandle));
84  }
85  }
86 }
edm::EDGetTokenT< edm::TriggerResults > trigResultsToken_
bool isValid() const
Definition: HandleBase.h:70
edm::EDGetTokenT< trigger::TriggerEvent > trigEvtToken_
Definition: event.py:1

◆ dqmBeginRun()

void TrigObjTnPSource::dqmBeginRun ( const edm::Run run,
const edm::EventSetup setup,
std::vector< TrigObjTnPHistColl > &  tnpHistColls 
) const
overridevirtual

Reimplemented from DQMGlobalEDAnalyzerBase< std::vector< TrigObjTnPHistColl >, Args... >.

Definition at line 69 of file TrigObjTnPSource.cc.

71  {}

◆ fillDescriptions()

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

Definition at line 45 of file TrigObjTnPSource.cc.

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, ProducerED_cfi::InputTag, and TrigObjTnPHistColl::makePSetDescription().

45  {
47  desc.add<edm::InputTag>("triggerEvent", edm::InputTag("hltTriggerSummaryAOD::HLT"));
48  desc.add<edm::InputTag>("triggerResults", edm::InputTag("TriggerResults::HLT"));
49  desc.addVPSet("histColls", TrigObjTnPHistColl::makePSetDescription(), std::vector<edm::ParameterSet>());
50  descriptions.add("trigObjTnPSource", desc);
51 }
static edm::ParameterSetDescription makePSetDescription()
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ operator=()

TrigObjTnPSource& TrigObjTnPSource::operator= ( const TrigObjTnPSource )
delete

Member Data Documentation

◆ histCollConfigs_

std::vector<edm::ParameterSet> TrigObjTnPSource::histCollConfigs_
private

Definition at line 36 of file TrigObjTnPSource.cc.

Referenced by bookHistograms().

◆ hltProcess_

std::string TrigObjTnPSource::hltProcess_
private

Definition at line 33 of file TrigObjTnPSource.cc.

Referenced by bookHistograms().

◆ trigEvtToken_

edm::EDGetTokenT<trigger::TriggerEvent> TrigObjTnPSource::trigEvtToken_
private

Definition at line 31 of file TrigObjTnPSource.cc.

Referenced by dqmAnalyze().

◆ trigResultsToken_

edm::EDGetTokenT<edm::TriggerResults> TrigObjTnPSource::trigResultsToken_
private

Definition at line 32 of file TrigObjTnPSource.cc.

Referenced by dqmAnalyze().