CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | 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< T > 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< T >
 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 Attributes

std::vector< edm::ParameterSethistCollConfigs_
 
std::string hltProcess_
 
edm::EDGetTokenT
< trigger::TriggerEvent
trigEvtToken_
 
edm::EDGetTokenT
< edm::TriggerResults
trigResultsToken_
 

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
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
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)
 
- 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::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_
edm::EDGetTokenT< edm::TriggerResults > trigResultsToken_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
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
overridevirtual

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

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
overridevirtual

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

Definition at line 73 of file TrigObjTnPSource.cc.

References 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::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const override
Definition: Event.cc:275
edm::EDGetTokenT< edm::TriggerResults > trigResultsToken_
bool isValid() const
Definition: HandleBase.h:70
edm::EDGetTokenT< trigger::TriggerEvent > trigEvtToken_
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  {}
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(), submitPVResolutionJobs::desc, HLT_FULL_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().