test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources > edm::one::EDAnalyzerBase edm::EDConsumerBase

Classes

struct  TrackingLSMEs
 
struct  TrackingMEs
 

Public Member Functions

 TrackingCertificationInfo (const edm::ParameterSet &ps)
 Constructor. More...
 
virtual ~TrackingCertificationInfo ()
 Destructor. More...
 
- Public Member Functions inherited from DQMEDHarvester
virtual void analyze (edm::Event const &, edm::EventSetup const &) final
 
virtual void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
 DQMEDHarvester (void)
 
virtual void endJob () final
 
virtual void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
virtual void endRun (edm::Run const &, edm::EventSetup const &)
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
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 & 
itemsToGetFromEvent () 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
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

void beginJob ()
 BeginJob. More...
 
void beginRun (edm::Run const &run, edm::EventSetup const &eSetup)
 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_)
 EndJob. More...
 
void dqmEndLuminosityBlock (DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_, edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &iSetup)
 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,
TrackingLSMEs
TrackingLSMEsMap
 
std::map< std::string,
TrackingMEs
TrackingMEsMap
 
bool verbose_
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- 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 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)
 

Detailed Description

Description:

Usage: <usage>

Definition at line 37 of file TrackingCertificationInfo.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 31 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, TrackingMEsMap, and verbose_.

32  : pSet_(pSet)
35  , nFEDConnected_(0)
36  , allPixelFEDConnected_(true)
37  , m_cacheID_(0)
38 {
39  // Create MessageSender
40  edm::LogInfo( "TrackingCertificationInfo") << "TrackingCertificationInfo::Deleting TrackingCertificationInfo ";
41 
42  verbose_ = pSet_.getUntrackedParameter<bool>("verbose",false);
43  TopFolderName_ = pSet_.getUntrackedParameter<std::string>("TopFolderName","Tracking");
44  if (verbose_) std::cout << "[TrackingCertificationInfo::TrackingCertificationInfo] TopFolderName_: " << TopFolderName_ << 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 = 0;
53  TrackingMEsMap.insert(std::pair<std::string, TrackingMEs>(QTname, tracking_mes));
54  }
55 
56  std::vector<edm::ParameterSet> TrackingGlobalQualityMEs = pSet_.getParameter< std::vector<edm::ParameterSet> >("TrackingGlobalQualityPSets" );
57  for ( auto meQTset : TrackingGlobalQualityMEs ) {
58 
59  std::string QTname = meQTset.getParameter<std::string>("QT");
60  tracking_mes.TrackingFlag = 0;
61 
62  if (verbose_) std::cout<< "[TrackingQualityChecker::TrackingCertificationInfo] inserting " << QTname << " in TrackingMEsMap" << std::endl;
63  TrackingMEsMap.insert(std::pair<std::string, TrackingMEs>(QTname, tracking_mes));
64  }
65 
66  TrackingLSMEs tracking_ls_mes;
67  // load variables for LS certification
68  std::vector<edm::ParameterSet> TrackingLSQualityMEs = pSet_.getParameter< std::vector<edm::ParameterSet> >("TrackingLSQualityMEs" );
69  for ( auto meQTset : TrackingLSQualityMEs ) {
70 
71  std::string QTname = meQTset.getParameter<std::string>("QT");
72  tracking_ls_mes.TrackingFlag = 0;
73 
74  if (verbose_) std::cout<< "[TrackingQualityChecker::TrackingCertificationInfo] inserting " << QTname << " in TrackingMEsMap" << std::endl;
75  TrackingLSMEsMap.insert(std::pair<std::string, TrackingLSMEs>(QTname, tracking_ls_mes));
76  }
77 
78 
79  // define sub-detectors which affect the quality
80  SubDetFolder.push_back("SiStrip");
81  SubDetFolder.push_back("Pixel");
82 
83 }
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
tuple cout
Definition: gather_cfg.py:145
TrackingCertificationInfo::~TrackingCertificationInfo ( )
virtual

Destructor.

Definition at line 85 of file TrackingCertificationInfo.cc.

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

Member Function Documentation

void TrackingCertificationInfo::beginJob ( void  )
privatevirtual

BeginJob.

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 92 of file TrackingCertificationInfo.cc.

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

Begin Run.

Reimplemented from DQMEDHarvester.

Definition at line 98 of file TrackingCertificationInfo.cc.

References allPixelFEDConnected_, gather_cfg::cout, detCabling_, edm::EventSetup::find(), edm::eventsetup::heterocontainer::HCTypeTag::findType(), edm::EventSetup::get(), edm::ESHandleBase::isValid(), LogDebug, m_cacheID_, FEDNumbering::MAXSiPixelFEDID, FEDNumbering::MAXSiStripFEDID, FEDNumbering::MINSiPixelFEDID, FEDNumbering::MINSiStripFEDID, nFEDConnected_, and verbose_.

98  {
99 
100  if (verbose_) std::cout << "[TrackingCertificationInfo::beginRun] starting .." << std::endl;
101 
102  edm::LogInfo ("TrackingCertificationInfo") <<"TrackingCertificationInfo:: Begining of Run";
103  unsigned long long cacheID = eSetup.get<SiStripDetCablingRcd>().cacheIdentifier();
104  if (m_cacheID_ != cacheID) {
105  m_cacheID_ = cacheID;
106  }
107  eSetup.get<SiStripDetCablingRcd>().get(detCabling_);
108 
109  nFEDConnected_ = 0;
110  int nPixelFEDConnected_ = 0;
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  const int siPixelFeds = (siPixelFedIdMax-siPixelFedIdMin+1);
116 
118  if( eSetup.find( recordKey ) != 0) {
119 
120  edm::ESHandle<RunInfo> sumFED;
121  eSetup.get<RunInfoRcd>().get(sumFED);
122 
123  if ( sumFED.isValid() ) {
124 
125  std::vector<int> FedsInIds= sumFED->m_fed_in;
126  for ( auto fedID : FedsInIds ) {
127  if ( fedID >= siPixelFedIdMin && fedID <= siPixelFedIdMax ) {
128  ++nFEDConnected_;
129  ++nPixelFEDConnected_;
130  }
131  else if ( fedID >= siStripFedIdMin && fedID <= siStripFedIdMax )
132  ++nFEDConnected_;
133  }
134  LogDebug ("TrackingDcsInfo") << " TrackingDcsInfo :: Connected FEDs " << nFEDConnected_;
135  }
136  }
137 
138  allPixelFEDConnected_ = ( nPixelFEDConnected_ == siPixelFeds );
139 
140 }
#define LogDebug(id)
edm::ESHandle< SiStripDetCabling > detCabling_
tuple cout
Definition: gather_cfg.py:145
bool isValid() const
Definition: ESHandle.h:47
static HCTypeTag findType(char const *iTypeName)
find a type based on the types name, if not found will return default HCTypeTag
Definition: HCTypeTag.cc:125
void TrackingCertificationInfo::bookTrackingCertificationMEs ( DQMStore::IBooker ibooker_,
DQMStore::IGetter igetter_ 
)
private

Definition at line 145 of file TrackingCertificationInfo.cc.

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

Referenced by dqmEndJob(), and resetTrackingCertificationMEs().

145  {
146 
147  if (verbose_) std::cout << "[TrackingCertificationInfo::bookTrackingCertificationMEs] starting .. trackingCertificationBooked_: " << trackingCertificationBooked_ << std::endl;
148 
150 
151  ibooker_.cd();
152  std::string tracking_dir = "";
153  TrackingUtility::getTopFolderPath(ibooker_,igetter_, TopFolderName_, tracking_dir);
154 
155  if (tracking_dir.size() > 0 ) ibooker_.setCurrentFolder(tracking_dir+"/EventInfo");
156  else ibooker_.setCurrentFolder(TopFolderName_+"/EventInfo");
157 
158  TrackingCertification = ibooker_.bookFloat("CertificationSummary");
159 
160  std::string hname, htitle;
161  hname = "CertificationReportMap";
162  htitle = "Tracking Certification Summary Map";
163  size_t nQT = TrackingMEsMap.size();
164  TrackingCertificationSummaryMap = ibooker_.book2D(hname, htitle, nQT,0.5,float(nQT)+0.5,1,0.5,1.5);
165  TrackingCertificationSummaryMap->setAxisTitle("Track Quality Type", 1);
167  size_t ibin =0;
168  for ( auto meQTset : TrackingMEsMap ) {
169  TrackingCertificationSummaryMap->setBinLabel(ibin+1,meQTset.first);
170  ibin++;
171  }
172 
173 
174  if (tracking_dir.size() > 0 ) ibooker_.setCurrentFolder(TopFolderName_+"/EventInfo/CertificationContents");
175  else ibooker_.setCurrentFolder(TopFolderName_+"/EventInfo/CertificationContents");
176 
177  for (std::map<std::string, TrackingMEs>::iterator it = TrackingMEsMap.begin();
178  it != TrackingMEsMap.end(); it++) {
179  std::string meQTname = it->first;
180  if (verbose_) std::cout << "[TrackingCertificationInfo::bookStatus] meQTname: " << meQTname << std::endl;
181  it->second.TrackingFlag = ibooker_.bookFloat("Track"+meQTname);
182  if (verbose_) std::cout << "[TrackingCertificationInfo::bookStatus] " << it->first << " exists ? " << it->second.TrackingFlag << std::endl;
183  }
184 
186  ibooker_.cd();
187  }
188 
189  if (verbose_) std::cout << "[TrackingCertificationInfo::bookStatus] trackingCertificationBooked_: " << trackingCertificationBooked_ << std::endl;
190 }
void cd(void)
Definition: DQMStore.cc:269
std::map< std::string, TrackingMEs > TrackingMEsMap
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)
MonitorElement * TrackingCertificationSummaryMap
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:277
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
tuple cout
Definition: gather_cfg.py:145
MonitorElement * bookFloat(Args &&...args)
Definition: DQMStore.h:109
static void getTopFolderPath(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, std::string top_dir, std::string &path)
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 195 of file TrackingCertificationInfo.cc.

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

Referenced by dqmEndLuminosityBlock(), and resetTrackingCertificationMEsAtLumi().

195  {
196 
197  if (verbose_) std::cout << "[TrackingCertificationInfo::bookTrackingCertificationMEs] starting .. trackingCertificationBooked_: " << trackingCertificationBooked_ << std::endl;
198 
200 
201  ibooker_.cd();
202  std::string tracking_dir = "";
203  TrackingUtility::getTopFolderPath(ibooker_,igetter_, TopFolderName_, tracking_dir);
204 
205  if (tracking_dir.size() > 0 ) ibooker_.setCurrentFolder(tracking_dir+"/EventInfo");
206  else ibooker_.setCurrentFolder(TopFolderName_+"/EventInfo");
207 
208  TrackingLSCertification = ibooker_.bookFloat("CertificationSummary");
209 
210  if (tracking_dir.size() > 0 ) ibooker_.setCurrentFolder(TopFolderName_+"/EventInfo/CertificationContents");
211  else ibooker_.setCurrentFolder(TopFolderName_+"/EventInfo/CertificationContents");
212 
213  for (std::map<std::string, TrackingLSMEs>::iterator it = TrackingLSMEsMap.begin();
214  it != TrackingLSMEsMap.end(); it++) {
215  std::string meQTname = it->first;
216  if (verbose_) std::cout << "[TrackingCertificationInfo::bookStatus] meQTname: " << meQTname << std::endl;
217  it->second.TrackingFlag = ibooker_.bookFloat("Track"+meQTname);
218  if (verbose_) std::cout << "[TrackingCertificationInfo::bookStatus] " << it->first << " exists ? " << it->second.TrackingFlag << std::endl;
219  }
220 
222  ibooker_.cd();
223  }
224 
225  if (verbose_) std::cout << "[TrackingCertificationInfo::bookStatus] trackingCertificationBooked_: " << trackingCertificationBooked_ << std::endl;
226 }
std::map< std::string, TrackingLSMEs > TrackingLSMEsMap
void cd(void)
Definition: DQMStore.cc:269
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:277
tuple cout
Definition: gather_cfg.py:145
MonitorElement * bookFloat(Args &&...args)
Definition: DQMStore.h:109
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_ 
)
privatevirtual

EndJob.

Implements DQMEDHarvester.

Definition at line 245 of file TrackingCertificationInfo.cc.

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

245  {
246 
247  if (verbose_) std::cout << "[TrackingCertificationInfo::dqmEndJob]" << std::endl;
248 
249  edm::LogInfo ("TrackingCertificationInfo") <<"TrackingCertificationInfo:: End Run";
250  bookTrackingCertificationMEs(ibooker_,igetter_);
251  fillDummyTrackingCertification(ibooker_,igetter_);
252 
253  if ( nFEDConnected_ > 0 ) fillTrackingCertificationMEs(ibooker_,igetter_);
254  else fillDummyTrackingCertification(ibooker_,igetter_);
255 
256  if (verbose_) std::cout << "[TrackingCertificationInfo::endRun] DONE" << std::endl;
257 
258 }
void fillDummyTrackingCertification(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
void fillTrackingCertificationMEs(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
void bookTrackingCertificationMEs(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
tuple cout
Definition: gather_cfg.py:145
void TrackingCertificationInfo::dqmEndLuminosityBlock ( DQMStore::IBooker ibooker_,
DQMStore::IGetter igetter_,
edm::LuminosityBlock const &  lumiSeg,
edm::EventSetup const &  iSetup 
)
privatevirtual

End Of Luminosity.

Reimplemented from DQMEDHarvester.

Definition at line 232 of file TrackingCertificationInfo.cc.

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

232  {
233 
234  edm::LogInfo( "TrackingDaqInfo") << "TrackingDaqInfo::endLuminosityBlock";
235  bookTrackingCertificationMEsAtLumi(ibooker_,igetter_);
236  fillDummyTrackingCertificationAtLumi(ibooker_,igetter_);
237 
238  if ( nFEDConnected_ > 0 ) fillTrackingCertificationMEsAtLumi(ibooker_,igetter_);
239  else fillDummyTrackingCertificationAtLumi(ibooker_,igetter_);
240 }
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 357 of file TrackingCertificationInfo.cc.

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

Referenced by dqmEndJob().

357  {
358  resetTrackingCertificationMEs(ibooker_,igetter_);
361  for (std::map<std::string, TrackingMEs>::const_iterator it = TrackingMEsMap.begin();
362  it != TrackingMEsMap.end(); it++) {
363  it->second.TrackingFlag->Fill(-1.0);
364  }
365 
366  for (int xbin = 1; xbin < TrackingCertificationSummaryMap->getNbinsX()+1; xbin++ )
367  for (int ybin = 1; ybin < TrackingCertificationSummaryMap->getNbinsY()+1; ybin++ )
368  TrackingCertificationSummaryMap->Fill(xbin,ybin,-1);
369 
370 
371  }
372 }
void resetTrackingCertificationMEs(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
std::map< std::string, TrackingMEs > TrackingMEsMap
int getNbinsY(void) const
get # of bins in Y-axis
void Fill(long long x)
MonitorElement * TrackingCertificationSummaryMap
int getNbinsX(void) const
get # of bins in X-axis
void TrackingCertificationInfo::fillDummyTrackingCertificationAtLumi ( DQMStore::IBooker ibooker_,
DQMStore::IGetter igetter_ 
)
private

Definition at line 377 of file TrackingCertificationInfo.cc.

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

Referenced by dqmEndLuminosityBlock().

377  {
378  resetTrackingCertificationMEsAtLumi(ibooker_,igetter_);
381  for (std::map<std::string, TrackingLSMEs>::const_iterator it = TrackingLSMEsMap.begin();
382  it != TrackingLSMEsMap.end(); it++) {
383  it->second.TrackingFlag->Fill(-1.0);
384  }
385 
386  }
387 }
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 262 of file TrackingCertificationInfo.cc.

References allPixelFEDConnected_, DQMStore::IBooker::cd(), checkPixelFEDs_, gather_cfg::cout, MonitorElement::DQM_KIND_REAL, MonitorElement::Fill(), DQMStore::IGetter::getContents(), MonitorElement::getFloatValue(), MonitorElement::getName(), MonitorElement::getTH2F(), TrackingUtility::getTopFolderPath(), MonitorElement::kind(), hlt_dqm_clientPB-live_cfg::me, mergeVDriftHistosByStation::name, AlCaHLTBitMon_QueryRunRegistry::string, TopFolderName_, TrackingCertification, trackingCertificationBooked_, TrackingCertificationSummaryMap, TrackingMEsMap, SpecificationBuilder_cfi::val(), and verbose_.

Referenced by dqmEndJob().

262  {
264  // edm::LogError("TrackingCertificationInfo") << " TrackingCertificationInfo::fillTrackingCertificationMEs : MEs missing ";
265  return;
266  }
267 
268  ibooker_.cd();
269  std::string tracking_dir = "";
270  TrackingUtility::getTopFolderPath(ibooker_,igetter_, TopFolderName_, tracking_dir);
271  if (verbose_) std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEs] tracking_dir: " << tracking_dir << std::endl;
272  std::vector<MonitorElement*> all_mes = igetter_.getContents(tracking_dir+"/EventInfo/reportSummaryContents");
273  float fval = 1.0;
274 
275  if (verbose_) std::cout << "all_mes: " << all_mes.size() << std::endl;
276 
277  if ( checkPixelFEDs_ ) {
278  float val = 1.;
279  if ( allPixelFEDConnected_ ) val = 0.;
280  int xbin = 0;
281  for (std::map<std::string, TrackingMEs>::const_iterator it = TrackingMEsMap.begin();
282  it != TrackingMEsMap.end(); it++) {
283  std::string type = it->first;
284  if ( type == "pixel" ) {
285  it->second.TrackingFlag->Fill(val);
287  if (verbose_) std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEs] xbin: " << xbin << " val: " << val << std::endl;
288  th2d->SetBinContent(xbin+1,1,val);
289  }
290  xbin++;
291  }
292  fval = fminf(fval,val);
293  }
294 
295  int xbin = ( checkPixelFEDs_ ? 1 : 0);
296  for (std::vector<MonitorElement *>::const_iterator ime = all_mes.begin();
297  ime!= all_mes.end(); ime++) {
298  MonitorElement * me = (*ime);
299  if (!me) continue;
300  if (verbose_) std::cout<< "[TrackingCertificationInfo::fillTrackingCertificationMEs] me: " << me->getName() << std::endl;
301  if (me->kind() == MonitorElement::DQM_KIND_REAL) {
302  std::string name = me->getName();
303  float val = me->getFloatValue();
304 
305  for (std::map<std::string, TrackingMEs>::const_iterator it = TrackingMEsMap.begin();
306  it != TrackingMEsMap.end(); it++) {
307 
308  if (verbose_) std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEs] ME: " << it->first << " [" << it->second.TrackingFlag->getFullname() << "] flag: " << it->second.TrackingFlag->getFloatValue() << std::endl;
309 
310  std::string type = it->first;
311  if (name.find(type) != std::string::npos) {
312  if (verbose_) std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEs] type: " << type << " <---> name: " << name << std::endl;
313  it->second.TrackingFlag->Fill(val);
314  if (verbose_) std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEs] xbin: " << xbin << " val: " << val << std::endl;
316  th2d->SetBinContent(xbin+1,1,val);
317  xbin++;
318  break;
319  }
320  if (verbose_) std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEs] ME: " << it->first << " [" << it->second.TrackingFlag->getFullname() << "] flag: " << it->second.TrackingFlag->getFloatValue() << std::endl;
321 
322  }
323  fval = fminf(fval,val);
324  }
325  }
326  if (verbose_) std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEs] TrackingCertification: " << fval << std::endl;
327  TrackingCertification->Fill(fval);
328 }
type
Definition: HCALResponse.h:21
std::vector< MonitorElement * > getContents(Args &&...args)
Definition: DQMStore.h:197
const std::string & getName(void) const
get name of ME
void cd(void)
Definition: DQMStore.cc:269
std::map< std::string, TrackingMEs > TrackingMEsMap
void Fill(long long x)
MonitorElement * TrackingCertificationSummaryMap
double getFloatValue(void) const
Kind kind(void) const
Get the type of the monitor element.
tuple cout
Definition: gather_cfg.py:145
TH2F * getTH2F(void) 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 392 of file TrackingCertificationInfo.cc.

References DQMStore::IBooker::cd(), gather_cfg::cout, MonitorElement::DQM_KIND_REAL, MonitorElement::Fill(), DQMStore::IGetter::get(), DQMStore::IGetter::getContents(), MonitorElement::getFloatValue(), MonitorElement::getName(), TrackingUtility::getTopFolderPath(), MonitorElement::kind(), hlt_dqm_clientPB-live_cfg::me, mergeVDriftHistosByStation::name, MonitorElement::Reset(), resetTrackingCertificationMEsAtLumi(), AlCaHLTBitMon_QueryRunRegistry::string, TopFolderName_, TrackingLSCertification, trackingLSCertificationBooked_, TrackingLSMEsMap, SpecificationBuilder_cfi::val(), and verbose_.

Referenced by dqmEndLuminosityBlock().

392  {
393  if (verbose_) std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] starting .." << std::endl;
395  return;
396  }
397  resetTrackingCertificationMEsAtLumi(ibooker_,igetter_);
398 
399  ibooker_.cd();
400  std::string tracking_dir = "";
401  TrackingUtility::getTopFolderPath(ibooker_,igetter_, TopFolderName_, tracking_dir);
402  if (verbose_) std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] tracking_dir: " << tracking_dir << std::endl;
403 
404 
405  if (verbose_) std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] tracking_dir: " << tracking_dir << std::endl;
406  std::vector<MonitorElement*> all_mes = igetter_.getContents(tracking_dir+"/EventInfo/reportSummaryContents");
407 
408  if (verbose_) std::cout << "all_mes: " << all_mes.size() << std::endl;
409 
410  for (std::vector<MonitorElement *>::const_iterator ime = all_mes.begin();
411  ime!= all_mes.end(); ime++) {
412  MonitorElement * me = (*ime);
413  if (!me) continue;
414  if (verbose_) std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] me: " << me->getName() << std::endl;
415  if (me->kind() == MonitorElement::DQM_KIND_REAL) {
416  std::string name = me->getName();
417  float val = me->getFloatValue();
418  if (verbose_) std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] val: " << val << std::endl;
419 
420  for (std::map<std::string, TrackingLSMEs>::const_iterator it = TrackingLSMEsMap.begin();
421  it != TrackingLSMEsMap.end(); it++) {
422 
423  if (verbose_) std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] ME: " << it->first << " [" << it->second.TrackingFlag->getFullname() << "] flag: " << it->second.TrackingFlag->getFloatValue() << std::endl;
424 
425  std::string type = it->first;
426  if (verbose_) std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] type: " << type << std::endl;
427  if (name.find(type) != std::string::npos) {
428  if (verbose_) std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] type: " << type << " <---> name: " << name << std::endl;
429  it->second.TrackingFlag->Fill(val);
430  break;
431  }
432  if (verbose_) std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] ME: " << it->first << " [" << it->second.TrackingFlag->getFullname() << "] flag: " << it->second.TrackingFlag->getFloatValue() << std::endl;
433  }
434  }
435  }
436 
437  float global_dqm_flag = 1.0;
438  std::string full_path = tracking_dir + "/EventInfo/reportSummary";
439  MonitorElement* me_dqm = igetter_.get(full_path);
440  if (me_dqm && me_dqm->kind() == MonitorElement::DQM_KIND_REAL) global_dqm_flag = me_dqm->getFloatValue();
441  if (verbose_) std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] global_dqm_flag: " << global_dqm_flag << std::endl;
442 
444  TrackingLSCertification->Fill(global_dqm_flag);
445 }
std::map< std::string, TrackingLSMEs > TrackingLSMEsMap
type
Definition: HCALResponse.h:21
std::vector< MonitorElement * > getContents(Args &&...args)
Definition: DQMStore.h:197
const std::string & getName(void) const
get name of ME
void cd(void)
Definition: DQMStore.cc:269
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:305
void Fill(long long x)
double getFloatValue(void) const
Kind kind(void) const
Get the type of the monitor element.
void resetTrackingCertificationMEsAtLumi(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
tuple cout
Definition: gather_cfg.py:145
static void getTopFolderPath(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, std::string top_dir, std::string &path)
void Reset(void)
reset ME (ie. contents, errors, etc)
void TrackingCertificationInfo::resetTrackingCertificationMEs ( DQMStore::IBooker ibooker_,
DQMStore::IGetter igetter_ 
)
private

Definition at line 333 of file TrackingCertificationInfo.cc.

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

Referenced by fillDummyTrackingCertification().

333  {
336  for (std::map<std::string, TrackingMEs>::const_iterator it = TrackingMEsMap.begin();
337  it != TrackingMEsMap.end(); it++) {
338  it->second.TrackingFlag->Reset();
339  }
340 }
std::map< std::string, TrackingMEs > TrackingMEsMap
void bookTrackingCertificationMEs(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
void Reset(void)
reset ME (ie. contents, errors, etc)
void TrackingCertificationInfo::resetTrackingCertificationMEsAtLumi ( DQMStore::IBooker ibooker_,
DQMStore::IGetter igetter_ 
)
private

Definition at line 345 of file TrackingCertificationInfo.cc.

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

Referenced by fillDummyTrackingCertificationAtLumi(), and fillTrackingCertificationMEsAtLumi().

345  {
348  for (std::map<std::string, TrackingLSMEs>::const_iterator it = TrackingLSMEsMap.begin();
349  it != TrackingLSMEsMap.end(); it++) {
350  it->second.TrackingFlag->Reset();
351  }
352 }
std::map< std::string, TrackingLSMEs > TrackingLSMEsMap
void Reset(void)
reset ME (ie. contents, errors, etc)
void bookTrackingCertificationMEsAtLumi(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)

Member Data Documentation

bool TrackingCertificationInfo::allPixelFEDConnected_
private

Definition at line 99 of file TrackingCertificationInfo.h.

Referenced by beginRun(), and fillTrackingCertificationMEs().

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

Definition at line 93 of file TrackingCertificationInfo.h.

Referenced by beginRun().

unsigned long long TrackingCertificationInfo::m_cacheID_
private

Definition at line 105 of file TrackingCertificationInfo.h.

Referenced by beginRun().

int TrackingCertificationInfo::nFEDConnected_
private

Definition at line 98 of file TrackingCertificationInfo.h.

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

edm::ParameterSet TrackingCertificationInfo::pSet_
private

Definition at line 94 of file TrackingCertificationInfo.h.

Referenced by TrackingCertificationInfo().

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

Definition at line 107 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