CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
DQMScalInfo Class Reference
Inheritance diagram for DQMScalInfo:

Public Member Functions

 DQMScalInfo (const edm::ParameterSet &ps)
 Constructor. More...
 
 ~DQMScalInfo () override=default
 Destructor. More...
 

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
 

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_
 

Detailed Description

Definition at line 40 of file DQMScalInfo.cc.

Constructor & Destructor Documentation

◆ DQMScalInfo()

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

Constructor.

Definition at line 81 of file DQMScalInfo.cc.

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

81  {
82  parameters_ = ps;
83 
84  scalfolder_ = parameters_.getUntrackedParameter<std::string>("dqmScalFolder", "Scal");
85  gtCollection_ = consumes<L1GlobalTriggerReadoutRecord>(
86  parameters_.getUntrackedParameter<edm::InputTag>("gtCollection", edm::InputTag("gtDigis")));
87  dcsStatusCollection_ = consumes<DcsStatusCollection>(
88  parameters_.getUntrackedParameter<edm::InputTag>("dcsStatusCollection", edm::InputTag("scalersRawToDigi")));
89  l1tscollectionToken_ = consumes<Level1TriggerScalersCollection>(
90  parameters_.getUntrackedParameter<edm::InputTag>("l1TSCollection", edm::InputTag("scalersRawToDigi")));
91  lumicollectionToken_ = consumes<LumiScalersCollection>(
92  parameters_.getUntrackedParameter<edm::InputTag>("lumiCollection", edm::InputTag("scalersRawToDigi")));
93 }
std::string scalfolder_
Definition: DQMScalInfo.cc:58
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< DcsStatusCollection > dcsStatusCollection_
Definition: DQMScalInfo.cc:60
edm::EDGetTokenT< LumiScalersCollection > lumicollectionToken_
Definition: DQMScalInfo.cc:62
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > gtCollection_
Definition: DQMScalInfo.cc:59
edm::ParameterSet parameters_
Definition: DQMScalInfo.cc:57
edm::EDGetTokenT< Level1TriggerScalersCollection > l1tscollectionToken_
Definition: DQMScalInfo.cc:61

◆ ~DQMScalInfo()

DQMScalInfo::~DQMScalInfo ( )
overridedefault

Destructor.

Member Function Documentation

◆ analyze()

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

Analyze.

Definition at line 120 of file DQMScalInfo.cc.

References MillePedeFileConverter_cfg::e.

120  {
121  makeL1Scalars(e);
123  return;
124 }
void makeL1Scalars(const edm::Event &e)
Definition: DQMScalInfo.cc:126
void makeLumiScalars(const edm::Event &e)
Definition: DQMScalInfo.cc:151

◆ bookHistograms()

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

Definition at line 95 of file DQMScalInfo.cc.

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

97  {
98  const int maxNbins = 2001;
99 
100  // Fetch GlobalTag information and fill the string/ME.
101  ibooker.cd();
102  ibooker.setCurrentFolder(scalfolder_ + "/L1TriggerScalers/");
103  const int fracLS = 16;
104  const int maxLS = 250;
105  hlresync_ = ibooker.book1D("lresync", "Orbit of last resync", fracLS * maxLS, 0, maxLS * 262144);
106  hlOC0_ = ibooker.book1D("lOC0", "Orbit of last OC0", fracLS * maxLS, 0, maxLS * 262144);
107  hlTE_ = ibooker.book1D("lTE", "Orbit of last TestEnable", fracLS * maxLS, 0, maxLS * 262144);
108  hlstart_ = ibooker.book1D("lstart", "Orbit of last Start", fracLS * maxLS, 0, maxLS * 262144);
109  hlEC0_ = ibooker.book1D("lEC0", "Orbit of last EC0", fracLS * maxLS, 0, maxLS * 262144);
110  hlHR_ = ibooker.book1D("lHR", "Orbit of last HardReset", fracLS * maxLS, 0, maxLS * 262144);
111 
112  hphysTrig_ = ibooker.book1D("Physics_Triggers", "Physics Triggers", maxNbins, -0.5, double(maxNbins) - 0.5);
113  hphysTrig_->setAxisTitle("Lumi Section", 1);
114 
115  ibooker.cd();
116  ibooker.setCurrentFolder(scalfolder_ + "/LumiScalers/");
117  hinstLumi_ = ibooker.book1D("Instant_Lumi", "Instant Lumi", maxNbins, -0.5, double(maxNbins) - 0.5);
118 }
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
MonitorElement * hlOC0_
Definition: DQMScalInfo.cc:66
std::string scalfolder_
Definition: DQMScalInfo.cc:58
MonitorElement * hphysTrig_
Definition: DQMScalInfo.cc:71
MonitorElement * hinstLumi_
Definition: DQMScalInfo.cc:73
MonitorElement * hlstart_
Definition: DQMScalInfo.cc:68
MonitorElement * hlTE_
Definition: DQMScalInfo.cc:67
MonitorElement * hlEC0_
Definition: DQMScalInfo.cc:69
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
MonitorElement * hlHR_
Definition: DQMScalInfo.cc:70
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
MonitorElement * hlresync_
Definition: DQMScalInfo.cc:65

◆ makeL1Scalars()

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

Definition at line 126 of file DQMScalInfo.cc.

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

126  {
128  e.getByToken(l1tscollectionToken_, l1ts);
130  e.getByToken(lumicollectionToken_, lumiScalers);
131 
132  auto it = l1ts->begin();
133 
134  if (l1ts->empty())
135  return;
136  hlresync_->Fill((*l1ts)[0].lastResync());
137  hlOC0_->Fill((*l1ts)[0].lastOrbitCounter0());
138  hlTE_->Fill((*l1ts)[0].lastTestEnable());
139  hlstart_->Fill((*l1ts)[0].lastStart());
140  hlEC0_->Fill((*l1ts)[0].lastEventCounter0());
141  hlHR_->Fill((*l1ts)[0].lastHardReset());
142 
143  unsigned int lumisection = it->lumiSegmentNr();
144  if (lumisection) {
145  hphysTrig_->setBinContent(lumisection + 1, it->l1AsPhysics());
146  }
147 
148  return;
149 }
MonitorElement * hlOC0_
Definition: DQMScalInfo.cc:66
void Fill(long long x)
MonitorElement * hphysTrig_
Definition: DQMScalInfo.cc:71
edm::EDGetTokenT< LumiScalersCollection > lumicollectionToken_
Definition: DQMScalInfo.cc:62
MonitorElement * hlstart_
Definition: DQMScalInfo.cc:68
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * hlTE_
Definition: DQMScalInfo.cc:67
MonitorElement * hlEC0_
Definition: DQMScalInfo.cc:69
edm::EDGetTokenT< Level1TriggerScalersCollection > l1tscollectionToken_
Definition: DQMScalInfo.cc:61
MonitorElement * hlHR_
Definition: DQMScalInfo.cc:70
MonitorElement * hlresync_
Definition: DQMScalInfo.cc:65

◆ makeLumiScalars()

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

Definition at line 151 of file DQMScalInfo.cc.

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

151  {
153  e.getByToken(lumicollectionToken_, lumiScalers);
154 
155  auto it = lumiScalers->begin();
156 
157  if (!lumiScalers->empty()) {
158  unsigned int lumisection = it->sectionNumber();
159  if (lumisection) {
160  hinstLumi_->setBinContent(lumisection + 1, it->instantLumi());
161  }
162  }
163 
164  return;
165 }
MonitorElement * hinstLumi_
Definition: DQMScalInfo.cc:73
edm::EDGetTokenT< LumiScalersCollection > lumicollectionToken_
Definition: DQMScalInfo.cc:62
virtual void setBinContent(int binx, double content)
set content of bin (1-D)

Member Data Documentation

◆ dcsStatusCollection_

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

Definition at line 60 of file DQMScalInfo.cc.

◆ gtCollection_

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

Definition at line 59 of file DQMScalInfo.cc.

◆ hinstLumi_

MonitorElement* DQMScalInfo::hinstLumi_
private

Definition at line 73 of file DQMScalInfo.cc.

◆ hlEC0_

MonitorElement* DQMScalInfo::hlEC0_
private

Definition at line 69 of file DQMScalInfo.cc.

◆ hlHR_

MonitorElement* DQMScalInfo::hlHR_
private

Definition at line 70 of file DQMScalInfo.cc.

◆ hlOC0_

MonitorElement* DQMScalInfo::hlOC0_
private

Definition at line 66 of file DQMScalInfo.cc.

◆ hlresync_

MonitorElement* DQMScalInfo::hlresync_
private

Definition at line 65 of file DQMScalInfo.cc.

◆ hlstart_

MonitorElement* DQMScalInfo::hlstart_
private

Definition at line 68 of file DQMScalInfo.cc.

◆ hlTE_

MonitorElement* DQMScalInfo::hlTE_
private

Definition at line 67 of file DQMScalInfo.cc.

◆ hphysTrig_

MonitorElement* DQMScalInfo::hphysTrig_
private

Definition at line 71 of file DQMScalInfo.cc.

◆ l1tscollectionToken_

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

Definition at line 61 of file DQMScalInfo.cc.

◆ lumicollectionToken_

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

Definition at line 62 of file DQMScalInfo.cc.

◆ parameters_

edm::ParameterSet DQMScalInfo::parameters_
private

◆ scalfolder_

std::string DQMScalInfo::scalfolder_
private

Definition at line 58 of file DQMScalInfo.cc.