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;
105  if( eSetup.find( recordKey ) != nullptr) {
106 
107  edm::ESHandle<RunInfo> sumFED;
108  eSetup.get<RunInfoRcd>().get(sumFED);
109  if ( sumFED.isValid() ) {
110 
111  const int siStripFedIdMin = FEDNumbering::MINSiStripFEDID;
112  const int siStripFedIdMax = FEDNumbering::MAXSiStripFEDID;
113  const int siPixelFedIdMin = FEDNumbering::MINSiPixelFEDID;
114  const int siPixelFedIdMax = FEDNumbering::MAXSiPixelFEDID;
115 
116  std::vector<int> FedsInIds= sumFED->m_fed_in;
117  for ( auto fedID : FedsInIds ) {
118  if ( fedID >= siPixelFedIdMin && fedID <= siPixelFedIdMax ) {
119  ++nPixelFEDs;
120  ++nFEDs;
121  }
122  if ( fedID >= siStripFedIdMin && fedID <= siStripFedIdMax )
123  ++nFEDs;
124  }
125  }
126  }
128  allpixelFEDsFound_ = (nPixelFEDs == siPixelFedN);
129  trackerFEDsFound_ = (nFEDs > 0);
130 
131 }
132 
140 
141 
142  edm::LogInfo("TrackingOfflineDQM") << "TrackingOfflineDQM::dqmBeginLuminosityBlock";
143 
144  if (globalStatusFilling_ > 0) {
145  actionExecutor_->createLSStatus(ibooker_,igetter_);
146 
147  if (trackerFEDsFound_) actionExecutor_->fillStatusAtLumi(ibooker_,igetter_);
149  }
150 }
158 {
159 
160  edm::LogInfo("TrackingOfflineDQM") << "TrackingOfflineDQM::dqmEndJob";
161 
162  if (globalStatusFilling_ > 0) {
163  actionExecutor_->createGlobalStatus(ibooker_,igetter_);
164 
165  if ( !trackerFEDsFound_ ) {
167  return;
168  } else {
169  actionExecutor_->fillGlobalStatus(ibooker_,igetter_);
170  }
171  }
172 }
173 
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:17
void createLSStatus(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
static HCTypeTag findType(char const *iTypeName)
find a type based on the types name, if not found will return default HCTypeTag
void beginJob() override
BeginJob.
~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.
T get() const
Definition: EventSetup.h:63
boost::optional< eventsetup::EventSetupRecordGeneric > find(const eventsetup::EventSetupRecordKey &) const
Definition: EventSetup.cc:88
void createGlobalStatus(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
bool isValid() const
Definition: ESHandle.h:47
edm::ParameterSet configPar_
void dqmEndJob(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_) override
Endjob.
Definition: Run.h:44