CMS 3D CMS Logo

TrackingOfflineDQM.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: TrackingMonitorClient
4 // Class: TrackingOfflineDQM
5 //
13 //
14 // Original Author: Samvel Khalatyan (ksamdev at gmail dot com)
15 // Created: Wed Oct 5 16:42:34 CET 2006
16 // $Id: TrackingOfflineDQM.cc,v 1.42 2013/01/02 17:41:51 wmtan Exp $
17 //
18 //
19 
21 
26 
28 
31 
33 
34 //Run Info
38 // Cabling
41 
42 #include <iostream>
43 #include <iomanip>
44 #include <cstdio>
45 #include <string>
46 #include <sstream>
47 #include <cmath>
48 
57  // Action Executor
59 
60  usedWithEDMtoMEConverter_ = configPar_.getUntrackedParameter<bool>("UsedWithEDMtoMEConverter", false);
63  globalStatusFilling_ = configPar_.getUntrackedParameter<int>("GlobalStatusFilling", 1);
64 }
78 void TrackingOfflineDQM::beginJob() { edm::LogInfo("BeginJobDone") << "TrackingOfflineDQM::beginJob done"; }
89  edm::LogInfo("BeginRun") << "TrackingOfflineDQM:: Begining of Run";
90 
91  int nFEDs = 0;
92  int nPixelFEDs = 0;
93 
94  if (auto runInfoRec = eSetup.tryToGet<RunInfoRcd>()) {
96  runInfoRec->get(sumFED);
97 
98  if (sumFED.isValid()) {
99  const int siStripFedIdMin = FEDNumbering::MINSiStripFEDID;
100  const int siStripFedIdMax = FEDNumbering::MAXSiStripFEDID;
101  const int siPixelFedIdMin = FEDNumbering::MINSiPixelFEDID;
102  const int siPixelFedIdMax = FEDNumbering::MAXSiPixelFEDID;
103 
104  std::vector<int> FedsInIds = sumFED->m_fed_in;
105  for (auto fedID : FedsInIds) {
106  if (fedID >= siPixelFedIdMin && fedID <= siPixelFedIdMax) {
107  ++nPixelFEDs;
108  ++nFEDs;
109  }
110  if (fedID >= siStripFedIdMin && fedID <= siStripFedIdMax)
111  ++nFEDs;
112  }
113  }
114  }
115  const int siPixelFedN = (FEDNumbering::MAXSiPixelFEDID - FEDNumbering::MINSiPixelFEDID + 1);
116  allpixelFEDsFound_ = (nPixelFEDs == siPixelFedN);
117  trackerFEDsFound_ = (nFEDs > 0);
118 }
119 
127  DQMStore::IGetter& igetter_,
128  edm::LuminosityBlock const& lumiSeg,
129  edm::EventSetup const& iSetup) {
130  edm::LogInfo("TrackingOfflineDQM") << "TrackingOfflineDQM::dqmBeginLuminosityBlock";
131 
132  if (globalStatusFilling_ > 0) {
133  actionExecutor_->createLSStatus(ibooker_, igetter_);
134 
135  if (trackerFEDsFound_)
136  actionExecutor_->fillStatusAtLumi(ibooker_, igetter_);
137  else
139  }
140 }
148  edm::LogInfo("TrackingOfflineDQM") << "TrackingOfflineDQM::dqmEndJob";
149 
150  if (globalStatusFilling_ > 0) {
151  actionExecutor_->createGlobalStatus(ibooker_, igetter_);
152 
153  if (!trackerFEDsFound_) {
155  return;
156  } else {
157  actionExecutor_->fillGlobalStatus(ibooker_, igetter_);
158  }
159  }
160 }
161 
std::string inputFileName_
T getUntrackedParameter(std::string const &, T const &) const
std::optional< T > tryToGet() const
Definition: EventSetup.h:94
std::string outputFileName_
void fillGlobalStatus(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
void fillStatusAtLumi(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
void createLSStatus(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
void beginJob() override
BeginJob.
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
~TrackingOfflineDQM() override
Destructor.
std::vector< int > m_fed_in
Definition: RunInfo.h:25
void dqmEndLuminosityBlock(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_, edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &eSetup) override
End Luminosity Block.
TrackingActionExecutor * actionExecutor_
TrackingOfflineDQM(const edm::ParameterSet &ps)
Constructor.
void beginRun(edm::Run const &run, edm::EventSetup const &eSetup) override
BeginRun.
void createGlobalStatus(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
bool isValid() const
Definition: ESHandle.h:44
edm::ParameterSet configPar_
void dqmEndJob(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_) override
Endjob.
Definition: Run.h:45