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 > > 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 > >
void accumulate (edm::StreamID id, edm::Event const &event, edm::EventSetup const &setup) const final
 
virtual void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &, std::vector< TrigObjTnPHistColl > &) const=0
 
virtual void dqmEndRun (edm::Run const &, edm::EventSetup const &, std::vector< TrigObjTnPHistColl > const &) const
 
 DQMGlobalEDAnalyzer ()
 
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
 
void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup) const final
 
- Public Member Functions inherited from edm::global::EDProducer< edm::RunCache< std::vector< TrigObjTnPHistColl > >, edm::EndRunProducer, edm::Accumulator, Args... >
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () 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 &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (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::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
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 Attributes

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

Additional Inherited Members

- Public Types inherited from DQMGlobalEDAnalyzer< std::vector< TrigObjTnPHistColl > >
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
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
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
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)
 
template<Transition B>
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 (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (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)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

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")) {}

◆ ~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
override

Definition at line 53 of file TrigObjTnPSource.cc.

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 }

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

◆ dqmAnalyze()

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

Implements DQMGlobalEDAnalyzer< std::vector< TrigObjTnPHistColl > >.

Definition at line 73 of file TrigObjTnPSource.cc.

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 }

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

◆ dqmBeginRun()

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

Reimplemented from DQMGlobalEDAnalyzer< std::vector< TrigObjTnPHistColl > >.

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.

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 }

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), edm::ParameterSetDescription::addVPSet(), HLT_2018_cff::InputTag, and TrigObjTnPHistColl::makePSetDescription().

◆ 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().

edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
edm::InputTag::process
std::string const & process() const
Definition: InputTag.h:40
TrigObjTnPSource::hltProcess_
std::string hltProcess_
Definition: TrigObjTnPSource.cc:33
TrigObjTnPHistColl
Definition: TrigObjTnPHistColl.h:86
edm::Handle< trigger::TriggerEvent >
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
config
Definition: config.py:1
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
TrigObjTnPSource::trigEvtToken_
edm::EDGetTokenT< trigger::TriggerEvent > trigEvtToken_
Definition: TrigObjTnPSource.cc:31
TrigObjTnPHistColl::makePSetDescription
static edm::ParameterSetDescription makePSetDescription()
Definition: TrigObjTnPHistColl.cc:27
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
edm::ParameterSetDescription::addVPSet
ParameterDescriptionBase * addVPSet(U const &iLabel, ParameterSetDescription const &validator, std::vector< ParameterSet > const &defaults)
Definition: ParameterSetDescription.h:149
HLTConfigProvider
Definition: HLTConfigProvider.h:28
TrigObjTnPSource::histCollConfigs_
std::vector< edm::ParameterSet > histCollConfigs_
Definition: TrigObjTnPSource.cc:36
writedatasetfile.run
run
Definition: writedatasetfile.py:27
HltComparatorCreateWorkflow.hltConfig
hltConfig
Definition: HltComparatorCreateWorkflow.py:161
TrigObjTnPSource::trigResultsToken_
edm::EDGetTokenT< edm::TriggerResults > trigResultsToken_
Definition: TrigObjTnPSource.cc:32
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
event
Definition: event.py:1
edm::InputTag
Definition: InputTag.h:15