CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
39 // Cabling
42 
43 #include <iomanip>
44 #include <cstdio>
45 #include <string>
46 #include <sstream>
47 #include <cmath>
48 
57  : configPar_(pSet), runInfoToken_(esConsumes<RunInfo, RunInfoRcd, edm::Transition::BeginRun>()) {
58  // Action Executor
60 
61  usedWithEDMtoMEConverter_ = configPar_.getUntrackedParameter<bool>("UsedWithEDMtoMEConverter", false);
64  globalStatusFilling_ = configPar_.getUntrackedParameter<int>("GlobalStatusFilling", 1);
65 }
79 void TrackingOfflineDQM::beginJob() { edm::LogInfo("BeginJobDone") << "TrackingOfflineDQM::beginJob done"; }
90  edm::LogInfo("BeginRun") << " Begining of Run";
91 
92  int nFEDs = 0;
93  int nPixelFEDs = 0;
94  edm::ESHandle<RunInfo> runInfoRec = eSetup.getHandle(runInfoToken_);
95  if (runInfoRec.isValid()) {
96  sumFED_ = runInfoRec.product();
97  if (sumFED_ != nullptr) {
98  const int siStripFedIdMin = FEDNumbering::MINSiStripFEDID;
99  const int siStripFedIdMax = FEDNumbering::MAXSiStripFEDID;
100  const int siPixelFedIdMin = FEDNumbering::MINSiPixelFEDID;
101  const int siPixelFedIdMax = FEDNumbering::MAXSiPixelFEDID;
102 
103  std::vector<int> FedsInIds = sumFED_->m_fed_in;
104  for (auto fedID : FedsInIds) {
105  if (fedID >= siPixelFedIdMin && fedID <= siPixelFedIdMax) {
106  ++nPixelFEDs;
107  ++nFEDs;
108  }
109  if (fedID >= siStripFedIdMin && fedID <= siStripFedIdMax)
110  ++nFEDs;
111  }
112  }
113  }
114  const int siPixelFedN = (FEDNumbering::MAXSiPixelFEDID - FEDNumbering::MINSiPixelFEDID + 1);
115  allpixelFEDsFound_ = (nPixelFEDs == siPixelFedN);
116  trackerFEDsFound_ = (nFEDs > 0);
117 }
118 
126  DQMStore::IGetter& igetter_,
127  edm::LuminosityBlock const& lumiSeg,
128  edm::EventSetup const& iSetup) {
129  edm::LogInfo("TrackingOfflineDQM") << "dqmBeginLuminosityBlock";
130 
131  if (globalStatusFilling_ > 0) {
132  actionExecutor_->createLSStatus(ibooker_, igetter_);
133 
134  if (trackerFEDsFound_)
135  actionExecutor_->fillStatusAtLumi(ibooker_, igetter_);
136  else
138  }
139 }
147  edm::LogInfo("TrackingOfflineDQM") << "dqmEndJob";
148 
149  if (globalStatusFilling_ > 0) {
150  actionExecutor_->createGlobalStatus(ibooker_, igetter_);
151 
152  if (!trackerFEDsFound_) {
154  return;
155  } else {
156  actionExecutor_->fillGlobalStatus(ibooker_, igetter_);
157  }
158  }
159 }
160 
std::string inputFileName_
T getUntrackedParameter(std::string const &, T const &) const
std::string outputFileName_
void fillGlobalStatus(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
void fillStatusAtLumi(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
void createLSStatus(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
void beginJob() override
BeginJob.
~TrackingOfflineDQM() override
Destructor.
std::vector< int > m_fed_in
Definition: RunInfo.h:25
Transition
Definition: Transition.h:12
void dqmEndLuminosityBlock(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_, edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &eSetup) override
End Luminosity Block.
TrackingActionExecutor * actionExecutor_
edm::ESGetToken< RunInfo, RunInfoRcd > runInfoToken_
Log< level::Info, false > LogInfo
TrackingOfflineDQM(const edm::ParameterSet &ps)
Constructor.
T const * product() const
Definition: ESHandle.h:86
void beginRun(edm::Run const &run, edm::EventSetup const &eSetup) override
BeginRun.
const RunInfo * sumFED_
void createGlobalStatus(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:151
bool isValid() const
Definition: ESHandle.h:44
edm::ParameterSet configPar_
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
void dqmEndJob(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_) override
Endjob.
Definition: Run.h:45