CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules 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 // 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 
FEDNumbering.h
TrackingOfflineDQM::~TrackingOfflineDQM
~TrackingOfflineDQM() override
Destructor.
Definition: TrackingOfflineDQM.cc:70
MessageLogger.h
SiStripFolderOrganizer.h
RunSummaryRcd.h
TrackingOfflineDQM::beginJob
void beginJob() override
BeginJob.
Definition: TrackingOfflineDQM.cc:78
TrackingOfflineDQM::beginRun
void beginRun(edm::Run const &run, edm::EventSetup const &eSetup) override
BeginRun.
Definition: TrackingOfflineDQM.cc:88
TrackingActionExecutor::fillDummyLSStatus
void fillDummyLSStatus()
Definition: TrackingActionExecutor.cc:57
edm::LuminosityBlock
Definition: LuminosityBlock.h:50
edm::Run
Definition: Run.h:45
TrackingOfflineDQM::configPar_
edm::ParameterSet configPar_
Definition: TrackingOfflineDQM.h:78
LuminosityBlock.h
edm::LogInfo
Definition: MessageLogger.h:254
TrackingActionExecutor::createGlobalStatus
void createGlobalStatus(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
Definition: TrackingActionExecutor.cc:40
TrackingOfflineDQM::inputFileName_
std::string inputFileName_
Definition: TrackingOfflineDQM.h:71
RunInfo::m_fed_in
std::vector< int > m_fed_in
Definition: RunInfo.h:25
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
TrackingOfflineDQM::globalStatusFilling_
int globalStatusFilling_
Definition: TrackingOfflineDQM.h:73
FileInPath.h
MakerMacros.h
TrackingActionExecutor::fillDummyGlobalStatus
void fillDummyGlobalStatus()
Definition: TrackingActionExecutor.cc:55
SiStripDetCabling.h
TrackingOfflineDQM::actionExecutor_
TrackingActionExecutor * actionExecutor_
Definition: TrackingOfflineDQM.h:69
edm::EventSetup::tryToGet
std::optional< T > tryToGet() const
Definition: EventSetup.h:94
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
TrackingOfflineDQM::allpixelFEDsFound_
bool allpixelFEDsFound_
Definition: TrackingOfflineDQM.h:76
TrackingOfflineDQM::usedWithEDMtoMEConverter_
bool usedWithEDMtoMEConverter_
Definition: TrackingOfflineDQM.h:74
FEDNumbering::MAXSiPixelFEDID
Definition: FEDNumbering.h:28
Service.h
edm::ESHandle
Definition: DTSurvey.h:22
TrackingActionExecutor::createLSStatus
void createLSStatus(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
Definition: TrackingActionExecutor.cc:46
RunInfoRcd
Definition: RunSummaryRcd.h:26
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TrackingActionExecutor::fillStatusAtLumi
void fillStatusAtLumi(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
Definition: TrackingActionExecutor.cc:68
FEDNumbering::MAXSiStripFEDID
Definition: FEDNumbering.h:30
edm::ParameterSet
Definition: ParameterSet.h:36
TrackingOfflineDQM::dqmEndJob
void dqmEndJob(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_) override
Endjob.
Definition: TrackingOfflineDQM.cc:147
edm::EventSetup
Definition: EventSetup.h:57
TrackingOfflineDQM
Definition: TrackingOfflineDQM.h:42
RunSummary.h
edm::ESHandleBase::isValid
bool isValid() const
Definition: ESHandle.h:44
FEDNumbering::MINSiPixelFEDID
Definition: FEDNumbering.h:27
RunInfo.h
TrackingActionExecutor.h
writedatasetfile.run
run
Definition: writedatasetfile.py:27
TrackingOfflineDQM.h
TrackingOfflineDQM::trackerFEDsFound_
bool trackerFEDsFound_
Definition: TrackingOfflineDQM.h:75
TrackingActionExecutor::fillGlobalStatus
void fillGlobalStatus(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
Definition: TrackingActionExecutor.cc:62
dqm::implementation::IGetter
Definition: DQMStore.h:484
TrackingOfflineDQM::TrackingOfflineDQM
TrackingOfflineDQM(const edm::ParameterSet &ps)
Constructor.
Definition: TrackingOfflineDQM.cc:56
TrackingOfflineDQM::outputFileName_
std::string outputFileName_
Definition: TrackingOfflineDQM.h:72
dqm::implementation::IBooker
Definition: DQMStore.h:43
SiStripDetCablingRcd.h
TrackingOfflineDQM::dqmEndLuminosityBlock
void dqmEndLuminosityBlock(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_, edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &eSetup) override
End Luminosity Block.
Definition: TrackingOfflineDQM.cc:126
ParameterSet.h
TrackingActionExecutor
Definition: TrackingActionExecutor.h:24
FEDNumbering::MINSiStripFEDID
Definition: FEDNumbering.h:29