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 > > > edm::global::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

void bookHistograms (DQMStore::ConcurrentBooker &, 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 > > >
 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
 
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)
 
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 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 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 16 of file TrigObjTnPSource.cc.

Constructor & Destructor Documentation

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

Definition at line 39 of file TrigObjTnPSource.cc.

39  :
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"))
44 {
45 
46 }
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::ConcurrentBooker iBooker,
const edm::Run run,
const edm::EventSetup setup,
std::vector< TrigObjTnPHistColl > &  tnpHistColls 
) const
override

Definition at line 60 of file TrigObjTnPSource.cc.

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

63 {
64  tnpHistColls.clear();
65  HLTConfigProvider hltConfig;
66  bool hltChanged=false;
67  hltConfig.init(run, setup, hltProcess_, hltChanged);
68  for(auto& histCollConfig : histCollConfigs_) tnpHistColls.emplace_back(TrigObjTnPHistColl(histCollConfig));
69  for(auto& histColl : tnpHistColls){
70  histColl.init(hltConfig);
71  histColl.bookHists(iBooker);
72  }
73 }
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 80 of file TrigObjTnPSource.cc.

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

82 {
84  event.getByToken(trigEvtToken_,trigEvtHandle);
85  edm::Handle<edm::TriggerResults> trigResultsHandle;
86  event.getByToken(trigResultsToken_,trigResultsHandle);
87  //DQM should never crash the HLT under any circumstances (except at configure)
88  if(trigEvtHandle.isValid() && trigResultsHandle.isValid()){
89  for(auto& histColl: tnpHistColls){
90  histColl.fill(*trigEvtHandle,*trigResultsHandle,
91  event.triggerNames(*trigResultsHandle));
92  }
93  }
94 }
edm::EDGetTokenT< edm::TriggerResults > trigResultsToken_
bool isValid() const
Definition: HandleBase.h:74
edm::EDGetTokenT< trigger::TriggerEvent > trigEvtToken_
edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const override
Definition: Event.cc:301
void TrigObjTnPSource::dqmBeginRun ( const edm::Run run,
const edm::EventSetup setup,
std::vector< TrigObjTnPHistColl > &  tnpHistColls 
) const
override

Definition at line 75 of file TrigObjTnPSource.cc.

76 {
77 
78 }
void TrigObjTnPSource::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 49 of file TrigObjTnPSource.cc.

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

50 {
52  desc.add<edm::InputTag>("triggerEvent", edm::InputTag("hltTriggerSummaryAOD::HLT"));
53  desc.add<edm::InputTag>("triggerResults", edm::InputTag("TriggerResults::HLT"));
54  desc.addVPSet("histColls",
56  std::vector<edm::ParameterSet>());
57  descriptions.add("trigObjTnPSource",desc);
58 }
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 35 of file TrigObjTnPSource.cc.

Referenced by bookHistograms().

std::string TrigObjTnPSource::hltProcess_
private

Definition at line 32 of file TrigObjTnPSource.cc.

Referenced by bookHistograms().

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

Definition at line 30 of file TrigObjTnPSource.cc.

Referenced by dqmAnalyze().

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

Definition at line 31 of file TrigObjTnPSource.cc.

Referenced by dqmAnalyze().