CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Member Functions | Private Attributes
TrackingCertificationInfo Class Reference

#include <DQM/TrackingMonitorClient/interface/TrackingCertificationInfo.h>

Inheritance diagram for TrackingCertificationInfo:
DQMEDHarvester edm::one::EDProducer< edm::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Classes

struct  TrackingLSMEs
 
struct  TrackingMEs
 

Public Member Functions

 TrackingCertificationInfo (const edm::ParameterSet &ps)
 Constructor. More...
 
 ~TrackingCertificationInfo () override
 Destructor. More...
 
- Public Member Functions inherited from DQMEDHarvester
void accumulate (edm::Event const &ev, edm::EventSetup const &es) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void beginRun (edm::Run const &, edm::EventSetup const &) override
 
 DQMEDHarvester ()
 
void endJob () final
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &, edm::EventSetup const &) final
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) override
 
 ~DQMEDHarvester () override=default
 
- Public Member Functions inherited from edm::one::EDProducer< edm::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

void beginJob () override
 BeginJob. More...
 
void beginRun (edm::Run const &run, edm::EventSetup const &eSetup) override
 Begin Run. More...
 
void bookTrackingCertificationMEs (DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
 
void bookTrackingCertificationMEsAtLumi (DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
 
void dqmEndJob (DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_) override
 EndJob. More...
 
void dqmEndLuminosityBlock (DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_, edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &iSetup) override
 End Of Luminosity. More...
 
void fillDummyTrackingCertification (DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
 
void fillDummyTrackingCertificationAtLumi (DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
 
void fillTrackingCertificationMEs (DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
 
void fillTrackingCertificationMEsAtLumi (DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
 
void resetTrackingCertificationMEs (DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
 
void resetTrackingCertificationMEsAtLumi (DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
 

Private Attributes

bool allPixelFEDConnected_
 
bool checkPixelFEDs_
 
edm::ESHandle< SiStripDetCablingdetCabling_
 
unsigned long long m_cacheID_
 
int nFEDConnected_
 
edm::ParameterSet pSet_
 
std::vector< std::string > SubDetFolder
 
std::string TopFolderName_
 
MonitorElementTrackingCertification
 
bool trackingCertificationBooked_
 
MonitorElementTrackingCertificationSummaryMap
 
MonitorElementTrackingLSCertification
 
bool trackingLSCertificationBooked_
 
std::map< std::string, TrackingLSMEsTrackingLSMEsMap
 
std::map< std::string, TrackingMEsTrackingMEsMap
 
bool verbose_
 

Additional Inherited Members

- Public Types inherited from DQMEDHarvester
typedef dqm::harvesting::DQMStore DQMStore
 
typedef dqm::harvesting::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::ProducerBase
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
- Protected Attributes inherited from DQMEDHarvester
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Description:

Usage: <usage>

Definition at line 36 of file TrackingCertificationInfo.h.

Constructor & Destructor Documentation

TrackingCertificationInfo::TrackingCertificationInfo ( const edm::ParameterSet ps)

Constructor.

Definition at line 30 of file TrackingCertificationInfo.cc.

References checkPixelFEDs_, gather_cfg::cout, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), pSet_, AlCaHLTBitMon_QueryRunRegistry::string, SubDetFolder, TopFolderName_, TrackingCertificationInfo::TrackingMEs::TrackingFlag, TrackingCertificationInfo::TrackingLSMEs::TrackingFlag, TrackingLSMEsMap, TrackingCertification_cfi::TrackingLSQualityMEs, TrackingMEsMap, and verbose_.

31  : pSet_(pSet),
34  nFEDConnected_(0),
36  m_cacheID_(0) {
37  // Create MessageSender
38  edm::LogInfo("TrackingCertificationInfo") << "TrackingCertificationInfo::Deleting TrackingCertificationInfo ";
39 
40  verbose_ = pSet_.getUntrackedParameter<bool>("verbose", false);
41  TopFolderName_ = pSet_.getUntrackedParameter<std::string>("TopFolderName", "Tracking");
42  if (verbose_)
43  std::cout << "[TrackingCertificationInfo::TrackingCertificationInfo] TopFolderName_: " << TopFolderName_
44  << std::endl;
45 
46  TrackingMEs tracking_mes;
47  // load variables for Global certification
48 
49  checkPixelFEDs_ = pSet_.getParameter<bool>("checkPixelFEDs");
50  if (checkPixelFEDs_) {
51  std::string QTname = "pixel";
52  tracking_mes.TrackingFlag = nullptr;
53  TrackingMEsMap.insert(std::pair<std::string, TrackingMEs>(QTname, tracking_mes));
54  }
55 
56  std::vector<edm::ParameterSet> TrackingGlobalQualityMEs =
57  pSet_.getParameter<std::vector<edm::ParameterSet> >("TrackingGlobalQualityPSets");
58  for (auto meQTset : TrackingGlobalQualityMEs) {
59  std::string QTname = meQTset.getParameter<std::string>("QT");
60  tracking_mes.TrackingFlag = nullptr;
61 
62  if (verbose_)
63  std::cout << "[TrackingQualityChecker::TrackingCertificationInfo] inserting " << QTname << " in TrackingMEsMap"
64  << std::endl;
65  TrackingMEsMap.insert(std::pair<std::string, TrackingMEs>(QTname, tracking_mes));
66  }
67 
68  TrackingLSMEs tracking_ls_mes;
69  // load variables for LS certification
70  std::vector<edm::ParameterSet> TrackingLSQualityMEs =
71  pSet_.getParameter<std::vector<edm::ParameterSet> >("TrackingLSQualityMEs");
72  for (auto meQTset : TrackingLSQualityMEs) {
73  std::string QTname = meQTset.getParameter<std::string>("QT");
74  tracking_ls_mes.TrackingFlag = nullptr;
75 
76  if (verbose_)
77  std::cout << "[TrackingQualityChecker::TrackingCertificationInfo] inserting " << QTname << " in TrackingMEsMap"
78  << std::endl;
79  TrackingLSMEsMap.insert(std::pair<std::string, TrackingLSMEs>(QTname, tracking_ls_mes));
80  }
81 
82  // define sub-detectors which affect the quality
83  SubDetFolder.push_back("SiStrip");
84  SubDetFolder.push_back("Pixel");
85 }
std::map< std::string, TrackingLSMEs > TrackingLSMEsMap
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::map< std::string, TrackingMEs > TrackingMEsMap
std::vector< std::string > SubDetFolder
TrackingCertificationInfo::~TrackingCertificationInfo ( )
override

Destructor.

Definition at line 87 of file TrackingCertificationInfo.cc.

87  {
88  edm::LogInfo("TrackingCertificationInfo") << "TrackingCertificationInfo::Deleting TrackingCertificationInfo ";
89 }

Member Function Documentation

void TrackingCertificationInfo::beginJob ( void  )
overrideprivatevirtual

BeginJob.

Reimplemented from edm::one::EDProducerBase.

Definition at line 93 of file TrackingCertificationInfo.cc.

93 {}
void TrackingCertificationInfo::beginRun ( edm::Run const &  run,
edm::EventSetup const &  eSetup 
)
overrideprivate

Begin Run.

Definition at line 97 of file TrackingCertificationInfo.cc.

References allPixelFEDConnected_, gather_cfg::cout, detCabling_, edm::EventSetup::get(), edm::ESHandleBase::isValid(), LogDebug, m_cacheID_, RunInfo::m_fed_in, FEDNumbering::MAXSiPixelFEDID, FEDNumbering::MAXSiStripFEDID, FEDNumbering::MINSiPixelFEDID, FEDNumbering::MINSiStripFEDID, nFEDConnected_, edm::EventSetup::tryToGet(), and verbose_.

97  {
98  if (verbose_)
99  std::cout << "[TrackingCertificationInfo::beginRun] starting .." << std::endl;
100 
101  edm::LogInfo("TrackingCertificationInfo") << "TrackingCertificationInfo:: Begining of Run";
102  unsigned long long cacheID = eSetup.get<SiStripDetCablingRcd>().cacheIdentifier();
103  if (m_cacheID_ != cacheID) {
104  m_cacheID_ = cacheID;
105  }
106  eSetup.get<SiStripDetCablingRcd>().get(detCabling_);
107 
108  nFEDConnected_ = 0;
109  int nPixelFEDConnected_ = 0;
110  const int siStripFedIdMin = FEDNumbering::MINSiStripFEDID;
111  const int siStripFedIdMax = FEDNumbering::MAXSiStripFEDID;
112  const int siPixelFedIdMin = FEDNumbering::MINSiPixelFEDID;
113  const int siPixelFedIdMax = FEDNumbering::MAXSiPixelFEDID;
114  const int siPixelFeds = (siPixelFedIdMax - siPixelFedIdMin + 1);
115 
116  if (auto runInfoRec = eSetup.tryToGet<RunInfoRcd>()) {
117  edm::ESHandle<RunInfo> sumFED;
118  runInfoRec->get(sumFED);
119 
120  if (sumFED.isValid()) {
121  std::vector<int> FedsInIds = sumFED->m_fed_in;
122  for (auto fedID : FedsInIds) {
123  if (fedID >= siPixelFedIdMin && fedID <= siPixelFedIdMax) {
124  ++nFEDConnected_;
125  ++nPixelFEDConnected_;
126  } else if (fedID >= siStripFedIdMin && fedID <= siStripFedIdMax)
127  ++nFEDConnected_;
128  }
129  LogDebug("TrackingDcsInfo") << " TrackingDcsInfo :: Connected FEDs " << nFEDConnected_;
130  }
131  }
132 
133  allPixelFEDConnected_ = (nPixelFEDConnected_ == siPixelFeds);
134 }
#define LogDebug(id)
edm::ESHandle< SiStripDetCabling > detCabling_
std::vector< int > m_fed_in
Definition: RunInfo.h:25
bool isValid() const
Definition: ESHandle.h:44
void TrackingCertificationInfo::bookTrackingCertificationMEs ( DQMStore::IBooker ibooker_,
DQMStore::IGetter igetter_ 
)
private

Definition at line 139 of file TrackingCertificationInfo.cc.

References dqm::dqmstoreimpl::DQMStore::IBooker::book2D(), dqm::dqmstoreimpl::DQMStore::IBooker::bookFloat(), dqm::dqmstoreimpl::DQMStore::IBooker::cd(), gather_cfg::cout, TrackingUtility::getTopFolderPath(), dqm::impl::MonitorElement::setAxisTitle(), dqm::impl::MonitorElement::setBinLabel(), dqm::dqmstoreimpl::DQMStore::IBooker::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, TopFolderName_, TrackingCertification, trackingCertificationBooked_, TrackingCertificationSummaryMap, TrackingMEsMap, and verbose_.

Referenced by dqmEndJob(), and resetTrackingCertificationMEs().

139  {
140  if (verbose_)
141  std::cout << "[TrackingCertificationInfo::bookTrackingCertificationMEs] starting .. trackingCertificationBooked_: "
142  << trackingCertificationBooked_ << std::endl;
143 
145  ibooker_.cd();
146  std::string tracking_dir = "";
147  TrackingUtility::getTopFolderPath(ibooker_, igetter_, TopFolderName_, tracking_dir);
148 
149  if (!tracking_dir.empty())
150  ibooker_.setCurrentFolder(tracking_dir + "/EventInfo");
151  else
152  ibooker_.setCurrentFolder(TopFolderName_ + "/EventInfo");
153 
154  TrackingCertification = ibooker_.bookFloat("CertificationSummary");
155 
156  std::string hname, htitle;
157  hname = "CertificationReportMap";
158  htitle = "Tracking Certification Summary Map";
159  size_t nQT = TrackingMEsMap.size();
160  TrackingCertificationSummaryMap = ibooker_.book2D(hname, htitle, nQT, 0.5, float(nQT) + 0.5, 1, 0.5, 1.5);
161  TrackingCertificationSummaryMap->setAxisTitle("Track Quality Type", 1);
163  size_t ibin = 0;
164  for (auto meQTset : TrackingMEsMap) {
165  TrackingCertificationSummaryMap->setBinLabel(ibin + 1, meQTset.first);
166  ibin++;
167  }
168 
169  if (!tracking_dir.empty())
170  ibooker_.setCurrentFolder(TopFolderName_ + "/EventInfo/CertificationContents");
171  else
172  ibooker_.setCurrentFolder(TopFolderName_ + "/EventInfo/CertificationContents");
173 
174  for (std::map<std::string, TrackingMEs>::iterator it = TrackingMEsMap.begin(); it != TrackingMEsMap.end(); it++) {
175  std::string meQTname = it->first;
176  if (verbose_)
177  std::cout << "[TrackingCertificationInfo::bookStatus] meQTname: " << meQTname << std::endl;
178  it->second.TrackingFlag = ibooker_.bookFloat("Track" + meQTname);
179  if (verbose_)
180  std::cout << "[TrackingCertificationInfo::bookStatus] " << it->first << " exists ? " << it->second.TrackingFlag
181  << std::endl;
182  }
183 
185  ibooker_.cd();
186  }
187 
188  if (verbose_)
189  std::cout << "[TrackingCertificationInfo::bookStatus] trackingCertificationBooked_: "
190  << trackingCertificationBooked_ << std::endl;
191 }
std::map< std::string, TrackingMEs > TrackingMEsMap
MonitorElement * TrackingCertificationSummaryMap
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
static void getTopFolderPath(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, std::string top_dir, std::string &path)
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void TrackingCertificationInfo::bookTrackingCertificationMEsAtLumi ( DQMStore::IBooker ibooker_,
DQMStore::IGetter igetter_ 
)
private

Definition at line 196 of file TrackingCertificationInfo.cc.

References dqm::dqmstoreimpl::DQMStore::IBooker::bookFloat(), dqm::dqmstoreimpl::DQMStore::IBooker::cd(), gather_cfg::cout, TrackingUtility::getTopFolderPath(), dqm::dqmstoreimpl::DQMStore::IBooker::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, TopFolderName_, trackingCertificationBooked_, TrackingLSCertification, trackingLSCertificationBooked_, TrackingLSMEsMap, and verbose_.

Referenced by dqmEndLuminosityBlock(), and resetTrackingCertificationMEsAtLumi().

197  {
198  if (verbose_)
199  std::cout << "[TrackingCertificationInfo::bookTrackingCertificationMEs] starting .. trackingCertificationBooked_: "
200  << trackingCertificationBooked_ << std::endl;
201 
203  ibooker_.cd();
204  std::string tracking_dir = "";
205  TrackingUtility::getTopFolderPath(ibooker_, igetter_, TopFolderName_, tracking_dir);
206 
207  if (!tracking_dir.empty())
208  ibooker_.setCurrentFolder(tracking_dir + "/EventInfo");
209  else
210  ibooker_.setCurrentFolder(TopFolderName_ + "/EventInfo");
211 
212  TrackingLSCertification = ibooker_.bookFloat("CertificationSummary");
213 
214  if (!tracking_dir.empty())
215  ibooker_.setCurrentFolder(TopFolderName_ + "/EventInfo/CertificationContents");
216  else
217  ibooker_.setCurrentFolder(TopFolderName_ + "/EventInfo/CertificationContents");
218 
219  for (std::map<std::string, TrackingLSMEs>::iterator it = TrackingLSMEsMap.begin(); it != TrackingLSMEsMap.end();
220  it++) {
221  std::string meQTname = it->first;
222  if (verbose_)
223  std::cout << "[TrackingCertificationInfo::bookStatus] meQTname: " << meQTname << std::endl;
224  it->second.TrackingFlag = ibooker_.bookFloat("Track" + meQTname);
225  if (verbose_)
226  std::cout << "[TrackingCertificationInfo::bookStatus] " << it->first << " exists ? " << it->second.TrackingFlag
227  << std::endl;
228  }
229 
231  ibooker_.cd();
232  }
233 
234  if (verbose_)
235  std::cout << "[TrackingCertificationInfo::bookStatus] trackingCertificationBooked_: "
236  << trackingCertificationBooked_ << std::endl;
237 }
std::map< std::string, TrackingLSMEs > TrackingLSMEsMap
static void getTopFolderPath(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, std::string top_dir, std::string &path)
void TrackingCertificationInfo::dqmEndJob ( DQMStore::IBooker ibooker_,
DQMStore::IGetter igetter_ 
)
overrideprivatevirtual

EndJob.

Implements DQMEDHarvester.

Definition at line 260 of file TrackingCertificationInfo.cc.

References bookTrackingCertificationMEs(), gather_cfg::cout, fillDummyTrackingCertification(), fillTrackingCertificationMEs(), nFEDConnected_, and verbose_.

260  {
261  if (verbose_)
262  std::cout << "[TrackingCertificationInfo::dqmEndJob]" << std::endl;
263 
264  edm::LogInfo("TrackingCertificationInfo") << "TrackingCertificationInfo:: End Run";
265  bookTrackingCertificationMEs(ibooker_, igetter_);
266  fillDummyTrackingCertification(ibooker_, igetter_);
267 
268  if (nFEDConnected_ > 0)
269  fillTrackingCertificationMEs(ibooker_, igetter_);
270  else
271  fillDummyTrackingCertification(ibooker_, igetter_);
272 
273  if (verbose_)
274  std::cout << "[TrackingCertificationInfo::endRun] DONE" << std::endl;
275 }
void fillDummyTrackingCertification(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
void fillTrackingCertificationMEs(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
void bookTrackingCertificationMEs(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
void TrackingCertificationInfo::dqmEndLuminosityBlock ( DQMStore::IBooker ibooker_,
DQMStore::IGetter igetter_,
edm::LuminosityBlock const &  lumiSeg,
edm::EventSetup const &  iSetup 
)
overrideprivatevirtual

End Of Luminosity.

Reimplemented from DQMEDHarvester.

Definition at line 243 of file TrackingCertificationInfo.cc.

References bookTrackingCertificationMEsAtLumi(), fillDummyTrackingCertificationAtLumi(), fillTrackingCertificationMEsAtLumi(), and nFEDConnected_.

246  {
247  edm::LogInfo("TrackingDaqInfo") << "TrackingDaqInfo::endLuminosityBlock";
248  bookTrackingCertificationMEsAtLumi(ibooker_, igetter_);
249  fillDummyTrackingCertificationAtLumi(ibooker_, igetter_);
250 
251  if (nFEDConnected_ > 0)
252  fillTrackingCertificationMEsAtLumi(ibooker_, igetter_);
253  else
254  fillDummyTrackingCertificationAtLumi(ibooker_, igetter_);
255 }
void fillDummyTrackingCertificationAtLumi(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
void fillTrackingCertificationMEsAtLumi(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
void bookTrackingCertificationMEsAtLumi(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
void TrackingCertificationInfo::fillDummyTrackingCertification ( DQMStore::IBooker ibooker_,
DQMStore::IGetter igetter_ 
)
private

Definition at line 395 of file TrackingCertificationInfo.cc.

References dqm::impl::MonitorElement::Fill(), dqm::impl::MonitorElement::getNbinsX(), dqm::impl::MonitorElement::getNbinsY(), resetTrackingCertificationMEs(), TrackingCertification, trackingCertificationBooked_, TrackingCertificationSummaryMap, and TrackingMEsMap.

Referenced by dqmEndJob().

396  {
397  resetTrackingCertificationMEs(ibooker_, igetter_);
400  for (std::map<std::string, TrackingMEs>::const_iterator it = TrackingMEsMap.begin(); it != TrackingMEsMap.end();
401  it++) {
402  it->second.TrackingFlag->Fill(-1.0);
403  }
404 
405  for (int xbin = 1; xbin < TrackingCertificationSummaryMap->getNbinsX() + 1; xbin++)
406  for (int ybin = 1; ybin < TrackingCertificationSummaryMap->getNbinsY() + 1; ybin++)
407  TrackingCertificationSummaryMap->Fill(xbin, ybin, -1);
408  }
409 }
virtual int getNbinsY() const
get # of bins in Y-axis
void resetTrackingCertificationMEs(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
std::map< std::string, TrackingMEs > TrackingMEsMap
void Fill(long long x)
MonitorElement * TrackingCertificationSummaryMap
virtual int getNbinsX() const
get # of bins in X-axis
void TrackingCertificationInfo::fillDummyTrackingCertificationAtLumi ( DQMStore::IBooker ibooker_,
DQMStore::IGetter igetter_ 
)
private

Definition at line 414 of file TrackingCertificationInfo.cc.

References dqm::impl::MonitorElement::Fill(), resetTrackingCertificationMEsAtLumi(), TrackingLSCertification, trackingLSCertificationBooked_, and TrackingLSMEsMap.

Referenced by dqmEndLuminosityBlock().

415  {
416  resetTrackingCertificationMEsAtLumi(ibooker_, igetter_);
419  for (std::map<std::string, TrackingLSMEs>::const_iterator it = TrackingLSMEsMap.begin();
420  it != TrackingLSMEsMap.end();
421  it++) {
422  it->second.TrackingFlag->Fill(-1.0);
423  }
424  }
425 }
std::map< std::string, TrackingLSMEs > TrackingLSMEsMap
void Fill(long long x)
void resetTrackingCertificationMEsAtLumi(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
void TrackingCertificationInfo::fillTrackingCertificationMEs ( DQMStore::IBooker ibooker_,
DQMStore::IGetter igetter_ 
)
private

Definition at line 279 of file TrackingCertificationInfo.cc.

References allPixelFEDConnected_, dqm::dqmstoreimpl::DQMStore::IBooker::cd(), checkPixelFEDs_, gather_cfg::cout, dqm::impl::MonitorElement::Fill(), dqm::dqmstoreimpl::DQMStore::IGetter::getContents(), dqm::impl::MonitorElement::getFloatValue(), dqm::impl::MonitorElement::getName(), dqm::legacy::MonitorElement::getTH2F(), TrackingUtility::getTopFolderPath(), dqm::impl::MonitorElement::kind(), hlt_dqm_clientPB-live_cfg::me, Skims_PA_cff::name, MonitorElementData::REAL, AlCaHLTBitMon_QueryRunRegistry::string, TopFolderName_, TrackingCertification, trackingCertificationBooked_, TrackingCertificationSummaryMap, TrackingMEsMap, heppy_batch::val, and verbose_.

Referenced by dqmEndJob().

279  {
281  // edm::LogError("TrackingCertificationInfo") << " TrackingCertificationInfo::fillTrackingCertificationMEs : MEs missing ";
282  return;
283  }
284 
285  ibooker_.cd();
286  std::string tracking_dir = "";
287  TrackingUtility::getTopFolderPath(ibooker_, igetter_, TopFolderName_, tracking_dir);
288  if (verbose_)
289  std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEs] tracking_dir: " << tracking_dir
290  << std::endl;
291  std::vector<MonitorElement*> all_mes = igetter_.getContents(tracking_dir + "/EventInfo/reportSummaryContents");
292  float fval = 1.0;
293 
294  if (verbose_)
295  std::cout << "all_mes: " << all_mes.size() << std::endl;
296 
297  if (checkPixelFEDs_) {
298  float val = 1.;
300  val = 0.;
301  int xbin = 0;
302  for (std::map<std::string, TrackingMEs>::const_iterator it = TrackingMEsMap.begin(); it != TrackingMEsMap.end();
303  it++) {
304  std::string type = it->first;
305  if (type == "pixel") {
306  it->second.TrackingFlag->Fill(val);
308  if (verbose_)
309  std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEs] xbin: " << xbin << " val: " << val
310  << std::endl;
311  th2d->SetBinContent(xbin + 1, 1, val);
312  }
313  xbin++;
314  }
315  fval = fminf(fval, val);
316  }
317 
318  int xbin = (checkPixelFEDs_ ? 1 : 0);
319  for (std::vector<MonitorElement*>::const_iterator ime = all_mes.begin(); ime != all_mes.end(); ime++) {
320  MonitorElement* me = (*ime);
321  if (!me)
322  continue;
323  if (verbose_)
324  std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEs] me: " << me->getName() << std::endl;
325  if (me->kind() == MonitorElement::Kind::REAL) {
326  const std::string& name = me->getName();
327  float val = me->getFloatValue();
328 
329  for (std::map<std::string, TrackingMEs>::const_iterator it = TrackingMEsMap.begin(); it != TrackingMEsMap.end();
330  it++) {
331  if (verbose_)
332  std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEs] ME: " << it->first << " ["
333  << it->second.TrackingFlag->getFullname() << "] flag: " << it->second.TrackingFlag->getFloatValue()
334  << std::endl;
335 
336  std::string type = it->first;
337  if (name.find(type) != std::string::npos) {
338  if (verbose_)
339  std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEs] type: " << type
340  << " <---> name: " << name << std::endl;
341  it->second.TrackingFlag->Fill(val);
342  if (verbose_)
343  std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEs] xbin: " << xbin << " val: " << val
344  << std::endl;
346  th2d->SetBinContent(xbin + 1, 1, val);
347  xbin++;
348  break;
349  }
350  if (verbose_)
351  std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEs] ME: " << it->first << " ["
352  << it->second.TrackingFlag->getFullname() << "] flag: " << it->second.TrackingFlag->getFloatValue()
353  << std::endl;
354  }
355  fval = fminf(fval, val);
356  }
357  }
358  if (verbose_)
359  std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEs] TrackingCertification: " << fval
360  << std::endl;
362 }
type
Definition: HCALResponse.h:21
virtual TH2F * getTH2F() const
std::map< std::string, TrackingMEs > TrackingMEsMap
Kind kind() const
Get the type of the monitor element.
const std::string & getName() const
get name of ME
void Fill(long long x)
MonitorElement * TrackingCertificationSummaryMap
virtual double getFloatValue() const
static void getTopFolderPath(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, std::string top_dir, std::string &path)
void TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi ( DQMStore::IBooker ibooker_,
DQMStore::IGetter igetter_ 
)
private

Definition at line 430 of file TrackingCertificationInfo.cc.

References dqm::dqmstoreimpl::DQMStore::IBooker::cd(), gather_cfg::cout, DEFINE_FWK_MODULE, dqm::impl::MonitorElement::Fill(), dqm::dqmstoreimpl::DQMStore::IGetter::get(), dqm::dqmstoreimpl::DQMStore::IGetter::getContents(), dqm::impl::MonitorElement::getFloatValue(), dqm::impl::MonitorElement::getName(), TrackingUtility::getTopFolderPath(), dqm::impl::MonitorElement::kind(), hlt_dqm_clientPB-live_cfg::me, Skims_PA_cff::name, MonitorElementData::REAL, dqm::impl::MonitorElement::Reset(), resetTrackingCertificationMEsAtLumi(), AlCaHLTBitMon_QueryRunRegistry::string, TopFolderName_, TrackingLSCertification, trackingLSCertificationBooked_, TrackingLSMEsMap, heppy_batch::val, and verbose_.

Referenced by dqmEndLuminosityBlock().

431  {
432  if (verbose_)
433  std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] starting .." << std::endl;
435  return;
436  }
437  resetTrackingCertificationMEsAtLumi(ibooker_, igetter_);
438 
439  ibooker_.cd();
440  std::string tracking_dir = "";
441  TrackingUtility::getTopFolderPath(ibooker_, igetter_, TopFolderName_, tracking_dir);
442  if (verbose_)
443  std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] tracking_dir: " << tracking_dir
444  << std::endl;
445 
446  if (verbose_)
447  std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] tracking_dir: " << tracking_dir
448  << std::endl;
449  std::vector<MonitorElement*> all_mes = igetter_.getContents(tracking_dir + "/EventInfo/reportSummaryContents");
450 
451  if (verbose_)
452  std::cout << "all_mes: " << all_mes.size() << std::endl;
453 
454  for (std::vector<MonitorElement*>::const_iterator ime = all_mes.begin(); ime != all_mes.end(); ime++) {
455  MonitorElement* me = (*ime);
456  if (!me)
457  continue;
458  if (verbose_)
459  std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] me: " << me->getName() << std::endl;
460  if (me->kind() == MonitorElement::Kind::REAL) {
461  const std::string& name = me->getName();
462  float val = me->getFloatValue();
463  if (verbose_)
464  std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] val: " << val << std::endl;
465 
466  for (std::map<std::string, TrackingLSMEs>::const_iterator it = TrackingLSMEsMap.begin();
467  it != TrackingLSMEsMap.end();
468  it++) {
469  if (verbose_)
470  std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] ME: " << it->first << " ["
471  << it->second.TrackingFlag->getFullname() << "] flag: " << it->second.TrackingFlag->getFloatValue()
472  << std::endl;
473 
474  std::string type = it->first;
475  if (verbose_)
476  std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] type: " << type << std::endl;
477  if (name.find(type) != std::string::npos) {
478  if (verbose_)
479  std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] type: " << type
480  << " <---> name: " << name << std::endl;
481  it->second.TrackingFlag->Fill(val);
482  break;
483  }
484  if (verbose_)
485  std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] ME: " << it->first << " ["
486  << it->second.TrackingFlag->getFullname() << "] flag: " << it->second.TrackingFlag->getFloatValue()
487  << std::endl;
488  }
489  }
490  }
491 
492  float global_dqm_flag = 1.0;
493  std::string full_path = tracking_dir + "/EventInfo/reportSummary";
494  MonitorElement* me_dqm = igetter_.get(full_path);
495  if (me_dqm && me_dqm->kind() == MonitorElement::Kind::REAL)
496  global_dqm_flag = me_dqm->getFloatValue();
497  if (verbose_)
498  std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] global_dqm_flag: " << global_dqm_flag
499  << std::endl;
500 
502  TrackingLSCertification->Fill(global_dqm_flag);
503 }
std::map< std::string, TrackingLSMEs > TrackingLSMEsMap
type
Definition: HCALResponse.h:21
Kind kind() const
Get the type of the monitor element.
const std::string & getName() const
get name of ME
void Fill(long long x)
virtual void Reset()
reset ME (ie. contents, errors, etc)
void resetTrackingCertificationMEsAtLumi(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
virtual double getFloatValue() const
static void getTopFolderPath(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, std::string top_dir, std::string &path)
void TrackingCertificationInfo::resetTrackingCertificationMEs ( DQMStore::IBooker ibooker_,
DQMStore::IGetter igetter_ 
)
private

Definition at line 367 of file TrackingCertificationInfo.cc.

References bookTrackingCertificationMEs(), dqm::impl::MonitorElement::Reset(), TrackingCertification, trackingCertificationBooked_, and TrackingMEsMap.

Referenced by fillDummyTrackingCertification().

368  {
370  bookTrackingCertificationMEs(ibooker_, igetter_);
372  for (std::map<std::string, TrackingMEs>::const_iterator it = TrackingMEsMap.begin(); it != TrackingMEsMap.end();
373  it++) {
374  it->second.TrackingFlag->Reset();
375  }
376 }
std::map< std::string, TrackingMEs > TrackingMEsMap
void bookTrackingCertificationMEs(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
virtual void Reset()
reset ME (ie. contents, errors, etc)
void TrackingCertificationInfo::resetTrackingCertificationMEsAtLumi ( DQMStore::IBooker ibooker_,
DQMStore::IGetter igetter_ 
)
private

Definition at line 381 of file TrackingCertificationInfo.cc.

References bookTrackingCertificationMEsAtLumi(), dqm::impl::MonitorElement::Reset(), TrackingLSCertification, trackingLSCertificationBooked_, and TrackingLSMEsMap.

Referenced by fillDummyTrackingCertificationAtLumi(), and fillTrackingCertificationMEsAtLumi().

382  {
384  bookTrackingCertificationMEsAtLumi(ibooker_, igetter_);
386  for (std::map<std::string, TrackingLSMEs>::const_iterator it = TrackingLSMEsMap.begin(); it != TrackingLSMEsMap.end();
387  it++) {
388  it->second.TrackingFlag->Reset();
389  }
390 }
std::map< std::string, TrackingLSMEs > TrackingLSMEsMap
virtual void Reset()
reset ME (ie. contents, errors, etc)
void bookTrackingCertificationMEsAtLumi(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)

Member Data Documentation

bool TrackingCertificationInfo::allPixelFEDConnected_
private

Definition at line 95 of file TrackingCertificationInfo.h.

Referenced by beginRun(), and fillTrackingCertificationMEs().

bool TrackingCertificationInfo::checkPixelFEDs_
private
edm::ESHandle<SiStripDetCabling> TrackingCertificationInfo::detCabling_
private

Definition at line 89 of file TrackingCertificationInfo.h.

Referenced by beginRun().

unsigned long long TrackingCertificationInfo::m_cacheID_
private

Definition at line 101 of file TrackingCertificationInfo.h.

Referenced by beginRun().

int TrackingCertificationInfo::nFEDConnected_
private

Definition at line 94 of file TrackingCertificationInfo.h.

Referenced by beginRun(), dqmEndJob(), and dqmEndLuminosityBlock().

edm::ParameterSet TrackingCertificationInfo::pSet_
private

Definition at line 90 of file TrackingCertificationInfo.h.

Referenced by TrackingCertificationInfo().

std::vector<std::string> TrackingCertificationInfo::SubDetFolder
private

Definition at line 103 of file TrackingCertificationInfo.h.

Referenced by TrackingCertificationInfo().

std::string TrackingCertificationInfo::TopFolderName_
private
MonitorElement* TrackingCertificationInfo::TrackingCertification
private
bool TrackingCertificationInfo::trackingCertificationBooked_
private
MonitorElement* TrackingCertificationInfo::TrackingCertificationSummaryMap
private
MonitorElement* TrackingCertificationInfo::TrackingLSCertification
private
bool TrackingCertificationInfo::trackingLSCertificationBooked_
private
std::map<std::string, TrackingLSMEs> TrackingCertificationInfo::TrackingLSMEsMap
private
std::map<std::string, TrackingMEs> TrackingCertificationInfo::TrackingMEsMap
private
bool TrackingCertificationInfo::verbose_
private