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 
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 
FEDNumbering.h
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
TrackingOfflineDQM::~TrackingOfflineDQM
~TrackingOfflineDQM() override
Destructor.
Definition: TrackingOfflineDQM.cc:71
MessageLogger.h
SiStripFolderOrganizer.h
RunSummaryRcd.h
TrackingOfflineDQM::beginJob
void beginJob() override
BeginJob.
Definition: TrackingOfflineDQM.cc:79
TrackingOfflineDQM::beginRun
void beginRun(edm::Run const &run, edm::EventSetup const &eSetup) override
BeginRun.
Definition: TrackingOfflineDQM.cc:89
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:79
LuminosityBlock.h
edm
HLT enums.
Definition: AlignableModifier.h:19
TrackingOfflineDQM::runInfoToken_
edm::ESGetToken< RunInfo, RunInfoRcd > runInfoToken_
Definition: TrackingOfflineDQM.h:80
TrackingActionExecutor::createGlobalStatus
void createGlobalStatus(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
Definition: TrackingActionExecutor.cc:40
TrackingOfflineDQM::inputFileName_
std::string inputFileName_
Definition: TrackingOfflineDQM.h:72
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:74
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
FileInPath.h
MakerMacros.h
TrackingActionExecutor::fillDummyGlobalStatus
void fillDummyGlobalStatus()
Definition: TrackingActionExecutor.cc:55
RunInfo
Definition: RunInfo.h:18
SiStripDetCabling.h
TrackingOfflineDQM::actionExecutor_
TrackingActionExecutor * actionExecutor_
Definition: TrackingOfflineDQM.h:71
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
TrackingOfflineDQM::allpixelFEDsFound_
bool allpixelFEDsFound_
Definition: TrackingOfflineDQM.h:77
TrackingOfflineDQM::usedWithEDMtoMEConverter_
bool usedWithEDMtoMEConverter_
Definition: TrackingOfflineDQM.h:75
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
TrackingOfflineDQM::sumFED_
const RunInfo * sumFED_
Definition: TrackingOfflineDQM.h:81
FEDNumbering::MAXSiStripFEDID
Definition: FEDNumbering.h:30
edm::ParameterSet
Definition: ParameterSet.h:47
edm::Transition
Transition
Definition: Transition.h:12
TrackingOfflineDQM::dqmEndJob
void dqmEndJob(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_) override
Endjob.
Definition: TrackingOfflineDQM.cc:146
edm::EventSetup::getHandle
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:155
edm::EventSetup
Definition: EventSetup.h:58
TrackingOfflineDQM
Definition: TrackingOfflineDQM.h:44
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:76
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:73
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:125
ParameterSet.h
DeDxTools::esConsumes
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
TrackingActionExecutor
Definition: TrackingActionExecutor.h:24
FEDNumbering::MINSiStripFEDID
Definition: FEDNumbering.h:29