CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
DQMScalInfo Class Reference

#include <DQMScalInfo.h>

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

Public Member Functions

 DQMScalInfo (const edm::ParameterSet &ps)
 Constructor. More...
 
virtual ~DQMScalInfo ()
 Destructor. More...
 
- 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 ()
 
 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 & itemsToGetFromEvent () 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
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c) override
 Analyze. More...
 
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 Member Functions

void makeL1Scalars (const edm::Event &e)
 
void makeLumiScalars (const edm::Event &e)
 

Private Attributes

edm::EDGetTokenT< DcsStatusCollectiondcsStatusCollection_
 
edm::EDGetTokenT< L1GlobalTriggerReadoutRecordgtCollection_
 
MonitorElementhinstLumi_
 
MonitorElementhlEC0_
 
MonitorElementhlHR_
 
MonitorElementhlOC0_
 
MonitorElementhlresync_
 
MonitorElementhlstart_
 
MonitorElementhlTE_
 
MonitorElementhphysTrig_
 
edm::EDGetTokenT< Level1TriggerScalersCollectionl1tscollectionToken_
 
edm::EDGetTokenT< LumiScalersCollectionlumicollectionToken_
 
edm::ParameterSet parameters_
 
std::string scalfolder_
 

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, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
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::NoCacheglobalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr< dqmDetails::NoCacheglobalBeginRunSummary (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 33 of file DQMScalInfo.h.

Constructor & Destructor Documentation

DQMScalInfo::DQMScalInfo ( const edm::ParameterSet ps)

Constructor.

Definition at line 27 of file DQMScalInfo.cc.

References edm::ParameterSet::getUntrackedParameter(), and AlCaHLTBitMon_QueryRunRegistry::string.

28 {
29  parameters_ = ps;
30 
31  scalfolder_ = parameters_.getUntrackedParameter<std::string>("dqmScalFolder", "Scal") ;
32  gtCollection_ = consumes<L1GlobalTriggerReadoutRecord>(parameters_.getUntrackedParameter<edm::InputTag>("gtCollection", edm::InputTag("gtDigis")));
33  dcsStatusCollection_ = consumes<DcsStatusCollection>(parameters_.getUntrackedParameter<edm::InputTag>("dcsStatusCollection", edm::InputTag("scalersRawToDigi")));
34  l1tscollectionToken_ = consumes<Level1TriggerScalersCollection>(parameters_.getUntrackedParameter<edm::InputTag>("l1TSCollection", edm::InputTag("scalersRawToDigi")));
35  lumicollectionToken_ = consumes<LumiScalersCollection>(parameters_.getUntrackedParameter<edm::InputTag>("lumiCollection", edm::InputTag("scalersRawToDigi")));
36 }
T getUntrackedParameter(std::string const &, T const &) const
std::string scalfolder_
Definition: DQMScalInfo.h:55
edm::EDGetTokenT< DcsStatusCollection > dcsStatusCollection_
Definition: DQMScalInfo.h:57
edm::EDGetTokenT< LumiScalersCollection > lumicollectionToken_
Definition: DQMScalInfo.h:59
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > gtCollection_
Definition: DQMScalInfo.h:56
edm::ParameterSet parameters_
Definition: DQMScalInfo.h:54
edm::EDGetTokenT< Level1TriggerScalersCollection > l1tscollectionToken_
Definition: DQMScalInfo.h:58
DQMScalInfo::~DQMScalInfo ( )
virtual

Destructor.

Definition at line 38 of file DQMScalInfo.cc.

38  {
39 }

Member Function Documentation

void DQMScalInfo::analyze ( const edm::Event e,
const edm::EventSetup c 
)
overrideprotected

Analyze.

Definition at line 67 of file DQMScalInfo.cc.

67  {
68  makeL1Scalars(e);
69  makeLumiScalars(e);
70  return;
71 }
void makeL1Scalars(const edm::Event &e)
Definition: DQMScalInfo.cc:74
void makeLumiScalars(const edm::Event &e)
Definition: DQMScalInfo.cc:100
void DQMScalInfo::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 41 of file DQMScalInfo.cc.

References DQMStore::IBooker::book1D(), DQMStore::IBooker::cd(), MonitorElement::setAxisTitle(), and DQMStore::IBooker::setCurrentFolder().

43  {
44 
45  const int maxNbins = 2001;
46 
47  // Fetch GlobalTag information and fill the string/ME.
48  ibooker.cd();
49  ibooker.setCurrentFolder(scalfolder_ +"/L1TriggerScalers/");
50  const int fracLS = 16;
51  const int maxLS = 250;
52  hlresync_ = ibooker.book1D("lresync","Orbit of last resync",fracLS*maxLS,0,maxLS*262144);
53  hlOC0_ = ibooker.book1D("lOC0","Orbit of last OC0",fracLS*maxLS,0,maxLS*262144);
54  hlTE_ = ibooker.book1D("lTE","Orbit of last TestEnable",fracLS*maxLS,0,maxLS*262144);
55  hlstart_ = ibooker.book1D("lstart","Orbit of last Start",fracLS*maxLS,0,maxLS*262144);
56  hlEC0_ = ibooker.book1D("lEC0","Orbit of last EC0",fracLS*maxLS,0,maxLS*262144);
57  hlHR_ = ibooker.book1D("lHR","Orbit of last HardReset",fracLS*maxLS,0,maxLS*262144);
58 
59  hphysTrig_ = ibooker.book1D("Physics_Triggers", "Physics Triggers", maxNbins, -0.5, double(maxNbins)-0.5);
60  hphysTrig_->setAxisTitle("Lumi Section", 1);
61 
62  ibooker.cd();
63  ibooker.setCurrentFolder(scalfolder_ +"/LumiScalers/");
64  hinstLumi_ = ibooker.book1D("Instant_Lumi", "Instant Lumi", maxNbins, -0.5, double(maxNbins)-0.5);
65 }
void cd(void)
Definition: DQMStore.cc:269
MonitorElement * hlOC0_
Definition: DQMScalInfo.h:63
std::string scalfolder_
Definition: DQMScalInfo.h:55
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
MonitorElement * hphysTrig_
Definition: DQMScalInfo.h:68
MonitorElement * hinstLumi_
Definition: DQMScalInfo.h:70
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:277
MonitorElement * hlstart_
Definition: DQMScalInfo.h:65
MonitorElement * hlTE_
Definition: DQMScalInfo.h:64
MonitorElement * hlEC0_
Definition: DQMScalInfo.h:66
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
MonitorElement * hlHR_
Definition: DQMScalInfo.h:67
MonitorElement * hlresync_
Definition: DQMScalInfo.h:62
void DQMScalInfo::makeL1Scalars ( const edm::Event e)
private

Definition at line 74 of file DQMScalInfo.cc.

References edm::Event::getByToken(), and reco::return().

75 {
79  e.getByToken(lumicollectionToken_,lumiScalers);
80 
81  Level1TriggerScalersCollection::const_iterator it = l1ts->begin();
82 
83  if(l1ts->size()==0) return;
84  hlresync_->Fill((*l1ts)[0].lastResync());
85  hlOC0_->Fill((*l1ts)[0].lastOrbitCounter0());
86  hlTE_->Fill((*l1ts)[0].lastTestEnable());
87  hlstart_->Fill((*l1ts)[0].lastStart());
88  hlEC0_->Fill((*l1ts)[0].lastEventCounter0());
89  hlHR_->Fill((*l1ts)[0].lastHardReset());
90 
91  unsigned int lumisection = it->lumiSegmentNr();
92  if(lumisection){
93  hphysTrig_->setBinContent(lumisection + 1, it->l1AsPhysics());
94  }
95 
96  return ;
97 }
void setBinContent(int binx, double content)
set content of bin (1-D)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:457
MonitorElement * hlOC0_
Definition: DQMScalInfo.h:63
void Fill(long long x)
MonitorElement * hphysTrig_
Definition: DQMScalInfo.h:68
edm::EDGetTokenT< LumiScalersCollection > lumicollectionToken_
Definition: DQMScalInfo.h:59
MonitorElement * hlstart_
Definition: DQMScalInfo.h:65
MonitorElement * hlTE_
Definition: DQMScalInfo.h:64
return(e1-e2)*(e1-e2)+dp *dp
MonitorElement * hlEC0_
Definition: DQMScalInfo.h:66
edm::EDGetTokenT< Level1TriggerScalersCollection > l1tscollectionToken_
Definition: DQMScalInfo.h:58
MonitorElement * hlHR_
Definition: DQMScalInfo.h:67
MonitorElement * hlresync_
Definition: DQMScalInfo.h:62
void DQMScalInfo::makeLumiScalars ( const edm::Event e)
private

Definition at line 100 of file DQMScalInfo.cc.

References edm::Event::getByToken().

101 {
103  e.getByToken(lumicollectionToken_,lumiScalers);
104 
105  LumiScalersCollection::const_iterator it = lumiScalers->begin();
106 
107  if(lumiScalers->size()){
108  unsigned int lumisection = it->sectionNumber();
109  if(lumisection){
110  hinstLumi_->setBinContent(lumisection + 1, it->instantLumi());
111  }
112  }
113 
114  return;
115 }
void setBinContent(int binx, double content)
set content of bin (1-D)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:457
MonitorElement * hinstLumi_
Definition: DQMScalInfo.h:70
edm::EDGetTokenT< LumiScalersCollection > lumicollectionToken_
Definition: DQMScalInfo.h:59

Member Data Documentation

edm::EDGetTokenT<DcsStatusCollection> DQMScalInfo::dcsStatusCollection_
private

Definition at line 57 of file DQMScalInfo.h.

edm::EDGetTokenT<L1GlobalTriggerReadoutRecord> DQMScalInfo::gtCollection_
private

Definition at line 56 of file DQMScalInfo.h.

MonitorElement* DQMScalInfo::hinstLumi_
private

Definition at line 70 of file DQMScalInfo.h.

MonitorElement* DQMScalInfo::hlEC0_
private

Definition at line 66 of file DQMScalInfo.h.

MonitorElement* DQMScalInfo::hlHR_
private

Definition at line 67 of file DQMScalInfo.h.

MonitorElement* DQMScalInfo::hlOC0_
private

Definition at line 63 of file DQMScalInfo.h.

MonitorElement* DQMScalInfo::hlresync_
private

Definition at line 62 of file DQMScalInfo.h.

MonitorElement* DQMScalInfo::hlstart_
private

Definition at line 65 of file DQMScalInfo.h.

MonitorElement* DQMScalInfo::hlTE_
private

Definition at line 64 of file DQMScalInfo.h.

MonitorElement* DQMScalInfo::hphysTrig_
private

Definition at line 68 of file DQMScalInfo.h.

edm::EDGetTokenT<Level1TriggerScalersCollection> DQMScalInfo::l1tscollectionToken_
private

Definition at line 58 of file DQMScalInfo.h.

edm::EDGetTokenT<LumiScalersCollection> DQMScalInfo::lumicollectionToken_
private

Definition at line 59 of file DQMScalInfo.h.

edm::ParameterSet DQMScalInfo::parameters_
private
std::string DQMScalInfo::scalfolder_
private

Definition at line 55 of file DQMScalInfo.h.