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 
22 
27 
29 
32 
34 
35 //Run Info
39 // Cabling
42 
43 #include <iostream>
44 #include <iomanip>
45 #include <cstdio>
46 #include <string>
47 #include <sstream>
48 #include <cmath>
49 
50 
59  configPar_(pSet)
60 {
61 
62  // Action Executor
64 
65  usedWithEDMtoMEConverter_= configPar_.getUntrackedParameter<bool>("UsedWithEDMtoMEConverter",false);
68  globalStatusFilling_ = configPar_.getUntrackedParameter<int>("GlobalStatusFilling", 1);
69 
70 }
77 
78 }
87 
88  edm::LogInfo("BeginJobDone") << "TrackingOfflineDQM::beginJob done";
89 }
100  edm::LogInfo ("BeginRun") <<"TrackingOfflineDQM:: Begining of Run";
101 
102  int nFEDs = 0;
103  int nPixelFEDs = 0;
104 
105  if(auto runInfoRec = eSetup.tryToGet<RunInfoRcd>()) {
106 
107  edm::ESHandle<RunInfo> sumFED;
108  runInfoRec->get(sumFED);
109 
110  if ( sumFED.isValid() ) {
111 
112  const int siStripFedIdMin = FEDNumbering::MINSiStripFEDID;
113  const int siStripFedIdMax = FEDNumbering::MAXSiStripFEDID;
114  const int siPixelFedIdMin = FEDNumbering::MINSiPixelFEDID;
115  const int siPixelFedIdMax = FEDNumbering::MAXSiPixelFEDID;
116 
117  std::vector<int> FedsInIds= sumFED->m_fed_in;
118  for ( auto fedID : FedsInIds ) {
119  if ( fedID >= siPixelFedIdMin && fedID <= siPixelFedIdMax ) {
120  ++nPixelFEDs;
121  ++nFEDs;
122  }
123  if ( fedID >= siStripFedIdMin && fedID <= siStripFedIdMax )
124  ++nFEDs;
125  }
126  }
127  }
129  allpixelFEDsFound_ = (nPixelFEDs == siPixelFedN);
130  trackerFEDsFound_ = (nFEDs > 0);
131 
132 }
133 
141 
142 
143  edm::LogInfo("TrackingOfflineDQM") << "TrackingOfflineDQM::dqmBeginLuminosityBlock";
144 
145  if (globalStatusFilling_ > 0) {
146  actionExecutor_->createLSStatus(ibooker_,igetter_);
147 
148  if (trackerFEDsFound_) actionExecutor_->fillStatusAtLumi(ibooker_,igetter_);
150  }
151 }
159 {
160 
161  edm::LogInfo("TrackingOfflineDQM") << "TrackingOfflineDQM::dqmEndJob";
162 
163  if (globalStatusFilling_ > 0) {
164  actionExecutor_->createGlobalStatus(ibooker_,igetter_);
165 
166  if ( !trackerFEDsFound_ ) {
168  return;
169  } else {
170  actionExecutor_->fillGlobalStatus(ibooker_,igetter_);
171  }
172  }
173 }
174 
std::string inputFileName_
T getUntrackedParameter(std::string const &, T const &) const
std::optional< T > tryToGet() const
Definition: EventSetup.h:92
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:26
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