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::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Public Member Functions

 DQMScalInfo (const edm::ParameterSet &ps)
 Constructor. More...
 
 ~DQMScalInfo () override
 Destructor. More...
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 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
 
const EDProduceroperator= (const EDProducer &)=delete
 

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 DQMEDAnalyzer
uint64_t meId () const
 

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 DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr< DQMEDAnalyzerGlobalCacheinitializeGlobalCache (edm::ParameterSet const &)
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Definition at line 32 of file DQMScalInfo.h.

Constructor & Destructor Documentation

◆ DQMScalInfo()

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

Constructor.

Definition at line 25 of file DQMScalInfo.cc.

25  {
26  parameters_ = ps;
27 
28  scalfolder_ = parameters_.getUntrackedParameter<std::string>("dqmScalFolder", "Scal");
29  gtCollection_ = consumes<L1GlobalTriggerReadoutRecord>(
30  parameters_.getUntrackedParameter<edm::InputTag>("gtCollection", edm::InputTag("gtDigis")));
31  dcsStatusCollection_ = consumes<DcsStatusCollection>(
32  parameters_.getUntrackedParameter<edm::InputTag>("dcsStatusCollection", edm::InputTag("scalersRawToDigi")));
33  l1tscollectionToken_ = consumes<Level1TriggerScalersCollection>(
34  parameters_.getUntrackedParameter<edm::InputTag>("l1TSCollection", edm::InputTag("scalersRawToDigi")));
35  lumicollectionToken_ = consumes<LumiScalersCollection>(
36  parameters_.getUntrackedParameter<edm::InputTag>("lumiCollection", edm::InputTag("scalersRawToDigi")));
37 }

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

◆ ~DQMScalInfo()

DQMScalInfo::~DQMScalInfo ( )
overridedefault

Destructor.

Member Function Documentation

◆ analyze()

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

Analyze.

Reimplemented from DQMEDAnalyzer.

Definition at line 66 of file DQMScalInfo.cc.

66  {
69  return;
70 }

References MillePedeFileConverter_cfg::e.

◆ bookHistograms()

void DQMScalInfo::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 41 of file DQMScalInfo.cc.

43  {
44  const int maxNbins = 2001;
45 
46  // Fetch GlobalTag information and fill the string/ME.
47  ibooker.cd();
48  ibooker.setCurrentFolder(scalfolder_ + "/L1TriggerScalers/");
49  const int fracLS = 16;
50  const int maxLS = 250;
51  hlresync_ = ibooker.book1D("lresync", "Orbit of last resync", fracLS * maxLS, 0, maxLS * 262144);
52  hlOC0_ = ibooker.book1D("lOC0", "Orbit of last OC0", fracLS * maxLS, 0, maxLS * 262144);
53  hlTE_ = ibooker.book1D("lTE", "Orbit of last TestEnable", fracLS * maxLS, 0, maxLS * 262144);
54  hlstart_ = ibooker.book1D("lstart", "Orbit of last Start", fracLS * maxLS, 0, maxLS * 262144);
55  hlEC0_ = ibooker.book1D("lEC0", "Orbit of last EC0", fracLS * maxLS, 0, maxLS * 262144);
56  hlHR_ = ibooker.book1D("lHR", "Orbit of last HardReset", fracLS * maxLS, 0, maxLS * 262144);
57 
58  hphysTrig_ = ibooker.book1D("Physics_Triggers", "Physics Triggers", maxNbins, -0.5, double(maxNbins) - 0.5);
59  hphysTrig_->setAxisTitle("Lumi Section", 1);
60 
61  ibooker.cd();
62  ibooker.setCurrentFolder(scalfolder_ + "/LumiScalers/");
63  hinstLumi_ = ibooker.book1D("Instant_Lumi", "Instant Lumi", maxNbins, -0.5, double(maxNbins) - 0.5);
64 }

References dqm::implementation::IBooker::book1D(), dqm::implementation::NavigatorBase::cd(), dqm::impl::MonitorElement::setAxisTitle(), and dqm::implementation::NavigatorBase::setCurrentFolder().

◆ makeL1Scalars()

void DQMScalInfo::makeL1Scalars ( const edm::Event e)
private

Definition at line 72 of file DQMScalInfo.cc.

72  {
74  e.getByToken(l1tscollectionToken_, l1ts);
76  e.getByToken(lumicollectionToken_, lumiScalers);
77 
78  auto it = l1ts->begin();
79 
80  if (l1ts->empty())
81  return;
82  hlresync_->Fill((*l1ts)[0].lastResync());
83  hlOC0_->Fill((*l1ts)[0].lastOrbitCounter0());
84  hlTE_->Fill((*l1ts)[0].lastTestEnable());
85  hlstart_->Fill((*l1ts)[0].lastStart());
86  hlEC0_->Fill((*l1ts)[0].lastEventCounter0());
87  hlHR_->Fill((*l1ts)[0].lastHardReset());
88 
89  unsigned int lumisection = it->lumiSegmentNr();
90  if (lumisection) {
91  hphysTrig_->setBinContent(lumisection + 1, it->l1AsPhysics());
92  }
93 
94  return;
95 }

References MillePedeFileConverter_cfg::e, and V0Monitor_cfi::lumiScalers.

◆ makeLumiScalars()

void DQMScalInfo::makeLumiScalars ( const edm::Event e)
private

Definition at line 97 of file DQMScalInfo.cc.

97  {
99  e.getByToken(lumicollectionToken_, lumiScalers);
100 
101  auto it = lumiScalers->begin();
102 
103  if (!lumiScalers->empty()) {
104  unsigned int lumisection = it->sectionNumber();
105  if (lumisection) {
106  hinstLumi_->setBinContent(lumisection + 1, it->instantLumi());
107  }
108  }
109 
110  return;
111 }

References MillePedeFileConverter_cfg::e, and V0Monitor_cfi::lumiScalers.

Member Data Documentation

◆ dcsStatusCollection_

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

Definition at line 52 of file DQMScalInfo.h.

◆ gtCollection_

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

Definition at line 51 of file DQMScalInfo.h.

◆ hinstLumi_

MonitorElement* DQMScalInfo::hinstLumi_
private

Definition at line 65 of file DQMScalInfo.h.

◆ hlEC0_

MonitorElement* DQMScalInfo::hlEC0_
private

Definition at line 61 of file DQMScalInfo.h.

◆ hlHR_

MonitorElement* DQMScalInfo::hlHR_
private

Definition at line 62 of file DQMScalInfo.h.

◆ hlOC0_

MonitorElement* DQMScalInfo::hlOC0_
private

Definition at line 58 of file DQMScalInfo.h.

◆ hlresync_

MonitorElement* DQMScalInfo::hlresync_
private

Definition at line 57 of file DQMScalInfo.h.

◆ hlstart_

MonitorElement* DQMScalInfo::hlstart_
private

Definition at line 60 of file DQMScalInfo.h.

◆ hlTE_

MonitorElement* DQMScalInfo::hlTE_
private

Definition at line 59 of file DQMScalInfo.h.

◆ hphysTrig_

MonitorElement* DQMScalInfo::hphysTrig_
private

Definition at line 63 of file DQMScalInfo.h.

◆ l1tscollectionToken_

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

Definition at line 53 of file DQMScalInfo.h.

◆ lumicollectionToken_

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

Definition at line 54 of file DQMScalInfo.h.

◆ parameters_

edm::ParameterSet DQMScalInfo::parameters_
private

◆ scalfolder_

std::string DQMScalInfo::scalfolder_
private

Definition at line 50 of file DQMScalInfo.h.

DQMScalInfo::makeLumiScalars
void makeLumiScalars(const edm::Event &e)
Definition: DQMScalInfo.cc:97
V0Monitor_cfi.lumiScalers
lumiScalers
Definition: V0Monitor_cfi.py:9
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
DQMScalInfo::scalfolder_
std::string scalfolder_
Definition: DQMScalInfo.h:50
edm::Handle
Definition: AssociativeIterator.h:50
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
dqm::implementation::NavigatorBase::cd
virtual void cd()
Definition: DQMStore.cc:29
DQMScalInfo::hphysTrig_
MonitorElement * hphysTrig_
Definition: DQMScalInfo.h:63
DQMScalInfo::l1tscollectionToken_
edm::EDGetTokenT< Level1TriggerScalersCollection > l1tscollectionToken_
Definition: DQMScalInfo.h:53
DQMScalInfo::parameters_
edm::ParameterSet parameters_
Definition: DQMScalInfo.h:49
DQMScalInfo::hlresync_
MonitorElement * hlresync_
Definition: DQMScalInfo.h:57
DQMScalInfo::dcsStatusCollection_
edm::EDGetTokenT< DcsStatusCollection > dcsStatusCollection_
Definition: DQMScalInfo.h:52
DQMScalInfo::lumicollectionToken_
edm::EDGetTokenT< LumiScalersCollection > lumicollectionToken_
Definition: DQMScalInfo.h:54
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
DQMScalInfo::hlEC0_
MonitorElement * hlEC0_
Definition: DQMScalInfo.h:61
dqm::impl::MonitorElement::setBinContent
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
Definition: MonitorElement.cc:691
DQMScalInfo::hlstart_
MonitorElement * hlstart_
Definition: DQMScalInfo.h:60
DQMScalInfo::makeL1Scalars
void makeL1Scalars(const edm::Event &e)
Definition: DQMScalInfo.cc:72
DQMScalInfo::hlTE_
MonitorElement * hlTE_
Definition: DQMScalInfo.h:59
DQMScalInfo::gtCollection_
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > gtCollection_
Definition: DQMScalInfo.h:51
DQMScalInfo::hlHR_
MonitorElement * hlHR_
Definition: DQMScalInfo.h:62
DQMScalInfo::hinstLumi_
MonitorElement * hinstLumi_
Definition: DQMScalInfo.h:65
dqm::impl::MonitorElement::setAxisTitle
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:800
edm::InputTag
Definition: InputTag.h:15
DQMScalInfo::hlOC0_
MonitorElement * hlOC0_
Definition: DQMScalInfo.h:58
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37