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::EDAnalyzer< edm::RunCache< std::vector< TrigObjTnPHistColl > >, Args... > edm::global::EDAnalyzerBase edm::EDConsumerBase

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 edm::global::EDAnalyzer< edm::RunCache< std::vector< TrigObjTnPHistColl > >, Args... >
 EDAnalyzer ()=default
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsStreamLuminosityBlocks () const final
 
bool wantsStreamRuns () const final
 
- Public Member Functions inherited from edm::global::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDAnalyzerBase () 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
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
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::EDAnalyzerBase
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::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 14 of file TrigObjTnPSource.cc.

Constructor & Destructor Documentation

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")) {}
T getParameter(std::string const &) const
std::vector< edm::ParameterSet > histCollConfigs_
edm::EDGetTokenT< edm::TriggerResults > trigResultsToken_
std::string const & process() const
Definition: InputTag.h:40
std::string hltProcess_
edm::EDGetTokenT< trigger::TriggerEvent > trigEvtToken_
TrigObjTnPSource::~TrigObjTnPSource ( )
overridedefault
TrigObjTnPSource::TrigObjTnPSource ( const TrigObjTnPSource )
delete

Member Function Documentation

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.

References histCollConfigs_, HltComparatorCreateWorkflow::hltConfig, hltProcess_, and HLTConfigProvider::init().

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_
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d&#39;tor
std::string hltProcess_
void TrigObjTnPSource::dqmAnalyze ( const edm::Event event,
const edm::EventSetup setup,
const std::vector< TrigObjTnPHistColl > &  tnpHistColls 
) const
override

Definition at line 73 of file TrigObjTnPSource.cc.

References DEFINE_FWK_MODULE, edm::HandleBase::isValid(), trigEvtToken_, edm::Event::triggerNames(), 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_
edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const override
Definition: Event.cc:265
void TrigObjTnPSource::dqmBeginRun ( const edm::Run run,
const edm::EventSetup setup,
std::vector< TrigObjTnPHistColl > &  tnpHistColls 
) const
override

Definition at line 69 of file TrigObjTnPSource.cc.

71  {}
void TrigObjTnPSource::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 45 of file TrigObjTnPSource.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), edm::ParameterSetDescription::addVPSet(), HLT_2018_cff::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 }
ParameterDescriptionBase * addVPSet(U const &iLabel, ParameterSetDescription const &validator, std::vector< ParameterSet > const &defaults)
static edm::ParameterSetDescription makePSetDescription()
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
TrigObjTnPSource& TrigObjTnPSource::operator= ( const TrigObjTnPSource )
delete

Member Data Documentation

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

Definition at line 36 of file TrigObjTnPSource.cc.

Referenced by bookHistograms().

std::string TrigObjTnPSource::hltProcess_
private

Definition at line 33 of file TrigObjTnPSource.cc.

Referenced by bookHistograms().

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

Definition at line 31 of file TrigObjTnPSource.cc.

Referenced by dqmAnalyze().

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

Definition at line 32 of file TrigObjTnPSource.cc.

Referenced by dqmAnalyze().