test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Private Attributes
EventShapeDQM Class Reference

#include <EventShapeDQM.h>

Inheritance diagram for EventShapeDQM:
DQMEDAnalyzer edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 EventShapeDQM (const edm::ParameterSet &ps)
 
virtual ~EventShapeDQM ()
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Protected Member Functions

void analyze (edm::Event const &e, edm::EventSetup const &eSetup)
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
- 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)
 

Private Attributes

int EPidx_
 
int EPlvl_
 
MonitorElementh_Q
 
int order_
 
edm::EDGetTokenT
< reco::EvtPlaneCollection
theEPCollection_
 
std::string triggerPath_
 
edm::EDGetTokenT
< edm::TriggerResults
triggerResults_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T...> CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T...> HasAbility
 
typedef
CacheTypes::LuminosityBlockCache 
LuminosityBlockCache
 
typedef
LuminosityBlockContextT
< LuminosityBlockCache,
RunCache, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr
< dqmDetails::NoCache
globalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr
< dqmDetails::NoCache
globalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Detailed Description

Definition at line 23 of file EventShapeDQM.h.

Constructor & Destructor Documentation

EventShapeDQM::EventShapeDQM ( const edm::ParameterSet ps)

Definition at line 8 of file EventShapeDQM.cc.

References EPidx_, EPlvl_, edm::ParameterSet::getParameter(), order_, AlCaHLTBitMon_QueryRunRegistry::string, theEPCollection_, triggerPath_, and triggerResults_.

9 {
10  triggerResults_ = consumes<edm::TriggerResults>(ps.getParameter<edm::InputTag>("triggerResults"));
11  theEPCollection_ = consumes<reco::EvtPlaneCollection>(ps.getParameter<edm::InputTag>("EPlabel"));
12  triggerPath_ = ps.getParameter<std::string>("triggerPath");
13 
14  order_ = ps.getParameter<int>("order");
15  EPidx_ = ps.getParameter<int>("EPidx");
16  EPlvl_ = ps.getParameter<int>("EPlvl");
17 }
T getParameter(std::string const &) const
std::string triggerPath_
Definition: EventShapeDQM.h:36
edm::EDGetTokenT< reco::EvtPlaneCollection > theEPCollection_
Definition: EventShapeDQM.h:34
edm::EDGetTokenT< edm::TriggerResults > triggerResults_
Definition: EventShapeDQM.h:33
EventShapeDQM::~EventShapeDQM ( )
virtual

Definition at line 19 of file EventShapeDQM.cc.

20 {
21 
22 }

Member Function Documentation

void EventShapeDQM::analyze ( edm::Event const &  e,
edm::EventSetup const &  eSetup 
)
protectedvirtual

Implements edm::stream::EDAnalyzerBase.

Definition at line 35 of file EventShapeDQM.cc.

References EPidx_, EPlvl_, MonitorElement::Fill(), edm::Event::getByToken(), h_Q, edm::HandleBase::isValid(), edm::TriggerNames::size(), theEPCollection_, edm::TriggerNames::triggerName(), edm::Event::triggerNames(), triggerPath_, triggerResults_, and trigNames.

36 {
37 
39  e.getByToken(triggerResults_,hltresults);
40  if(!hltresults.isValid())
41  {
42  return;
43  }
44 
45  bool hasFired = false;
46  const edm::TriggerNames& trigNames = e.triggerNames(*hltresults);
47  unsigned int numTriggers = trigNames.size();
48  for( unsigned int hltIndex=0; hltIndex<numTriggers; ++hltIndex ) {
49  if (trigNames.triggerName(hltIndex).find(triggerPath_) != std::string::npos && hltresults->wasrun(hltIndex) && hltresults->accept(hltIndex)){
50  hasFired = true;
51  }
52  }
53 
55  e.getByToken(theEPCollection_, ep_);
56  if ( !ep_.isValid() ) {
57  return;
58  }
59 
60  if ( hasFired ) {
61  h_Q->Fill( (*ep_)[EPidx_].vn(EPlvl_) );
62  }
63 
64 }
MonitorElement * h_Q
Definition: EventShapeDQM.h:42
Strings::size_type size() const
Definition: TriggerNames.cc:39
void Fill(long long x)
std::string triggerPath_
Definition: EventShapeDQM.h:36
bool isValid() const
Definition: HandleBase.h:75
static const char *const trigNames[]
Definition: EcalDumpRaw.cc:74
std::string const & triggerName(unsigned int index) const
Definition: TriggerNames.cc:27
edm::EDGetTokenT< reco::EvtPlaneCollection > theEPCollection_
Definition: EventShapeDQM.h:34
edm::EDGetTokenT< edm::TriggerResults > triggerResults_
Definition: EventShapeDQM.h:33
void EventShapeDQM::bookHistograms ( DQMStore::IBooker ibooker_,
edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 25 of file EventShapeDQM.cc.

References DQMStore::IBooker::book1D(), DQMStore::IBooker::cd(), h_Q, order_, DQMStore::IBooker::setCurrentFolder(), and triggerPath_.

26 {
27  ibooker_.cd();;
28  ibooker_.setCurrentFolder("HLT/HI/" + triggerPath_);
29 
30  h_Q = ibooker_.book1D("hQn", Form("Q%i;Q%i", order_, order_), 500, 0, 0.5);
31 
32  ibooker_.cd();
33 }
MonitorElement * h_Q
Definition: EventShapeDQM.h:42
void cd(void)
Definition: DQMStore.cc:268
std::string triggerPath_
Definition: EventShapeDQM.h:36
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:276

Member Data Documentation

int EventShapeDQM::EPidx_
private

Definition at line 38 of file EventShapeDQM.h.

Referenced by analyze(), and EventShapeDQM().

int EventShapeDQM::EPlvl_
private

Definition at line 39 of file EventShapeDQM.h.

Referenced by analyze(), and EventShapeDQM().

MonitorElement* EventShapeDQM::h_Q
private

Definition at line 42 of file EventShapeDQM.h.

Referenced by analyze(), and bookHistograms().

int EventShapeDQM::order_
private

Definition at line 37 of file EventShapeDQM.h.

Referenced by bookHistograms(), and EventShapeDQM().

edm::EDGetTokenT<reco::EvtPlaneCollection> EventShapeDQM::theEPCollection_
private

Definition at line 34 of file EventShapeDQM.h.

Referenced by analyze(), and EventShapeDQM().

std::string EventShapeDQM::triggerPath_
private

Definition at line 36 of file EventShapeDQM.h.

Referenced by analyze(), bookHistograms(), and EventShapeDQM().

edm::EDGetTokenT<edm::TriggerResults> EventShapeDQM::triggerResults_
private

Definition at line 33 of file EventShapeDQM.h.

Referenced by analyze(), and EventShapeDQM().