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
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

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
 
- 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::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- 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 33 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_.

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

Destructor.

Definition at line 86 of file TrackingCertificationInfo.cc.

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

Member Function Documentation

void TrackingCertificationInfo::beginJob ( void  )
privatevirtual

BeginJob.

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 93 of file TrackingCertificationInfo.cc.

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

Begin Run.

Reimplemented from DQMEDHarvester.

Definition at line 99 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_.

99  {
100 
101  if (verbose_) std::cout << "[TrackingCertificationInfo::beginRun] starting .." << std::endl;
102 
103  edm::LogInfo ("TrackingCertificationInfo") <<"TrackingCertificationInfo:: Begining of Run";
104  unsigned long long cacheID = eSetup.get<SiStripDetCablingRcd>().cacheIdentifier();
105  if (m_cacheID_ != cacheID) {
106  m_cacheID_ = cacheID;
107  }
108  eSetup.get<SiStripDetCablingRcd>().get(detCabling_);
109 
110  nFEDConnected_ = 0;
111  int nPixelFEDConnected_ = 0;
112  const int siStripFedIdMin = FEDNumbering::MINSiStripFEDID;
113  const int siStripFedIdMax = FEDNumbering::MAXSiStripFEDID;
114  const int siPixelFedIdMin = FEDNumbering::MINSiPixelFEDID;
115  const int siPixelFedIdMax = FEDNumbering::MAXSiPixelFEDID;
116  const int siPixelFeds = (siPixelFedIdMax-siPixelFedIdMin+1);
117 
119  if( eSetup.find( recordKey ) != 0) {
120 
121  edm::ESHandle<RunInfo> sumFED;
122  eSetup.get<RunInfoRcd>().get(sumFED);
123 
124  if ( sumFED.isValid() ) {
125 
126  std::vector<int> FedsInIds= sumFED->m_fed_in;
127  for ( auto fedID : FedsInIds ) {
128  if ( fedID >= siPixelFedIdMin && fedID <= siPixelFedIdMax ) {
129  ++nFEDConnected_;
130  ++nPixelFEDConnected_;
131  }
132  else if ( fedID >= siStripFedIdMin && fedID <= siStripFedIdMax )
133  ++nFEDConnected_;
134  }
135  LogDebug ("TrackingDcsInfo") << " TrackingDcsInfo :: Connected FEDs " << nFEDConnected_;
136  }
137  }
138 
139  allPixelFEDConnected_ = ( nPixelFEDConnected_ == siPixelFeds );
140 
141 }
#define LogDebug(id)
edm::ESHandle< SiStripDetCabling > detCabling_
tuple cout
Definition: gather_cfg.py:121
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 146 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().

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

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

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

246  {
247 
248  if (verbose_) std::cout << "[TrackingCertificationInfo::dqmEndJob]" << std::endl;
249 
250  edm::LogInfo ("TrackingCertificationInfo") <<"TrackingCertificationInfo:: End Run";
251  bookTrackingCertificationMEs(ibooker_,igetter_);
252  fillDummyTrackingCertification(ibooker_,igetter_);
253 
254  if ( nFEDConnected_ > 0 ) fillTrackingCertificationMEs(ibooker_,igetter_);
255  else fillDummyTrackingCertification(ibooker_,igetter_);
256 
257  if (verbose_) std::cout << "[TrackingCertificationInfo::endRun] DONE" << std::endl;
258 
259 }
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:121
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 233 of file TrackingCertificationInfo.cc.

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

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

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

Referenced by dqmEndJob().

358  {
359  resetTrackingCertificationMEs(ibooker_,igetter_);
362  for (std::map<std::string, TrackingMEs>::const_iterator it = TrackingMEsMap.begin();
363  it != TrackingMEsMap.end(); it++) {
364  it->second.TrackingFlag->Fill(-1.0);
365  }
366 
367  for (int xbin = 1; xbin < TrackingCertificationSummaryMap->getNbinsX()+1; xbin++ )
368  for (int ybin = 1; ybin < TrackingCertificationSummaryMap->getNbinsY()+1; ybin++ )
369  TrackingCertificationSummaryMap->Fill(xbin,ybin,-1);
370 
371 
372  }
373 }
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 378 of file TrackingCertificationInfo.cc.

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

Referenced by dqmEndLuminosityBlock().

378  {
379  resetTrackingCertificationMEsAtLumi(ibooker_,igetter_);
382  for (std::map<std::string, TrackingLSMEs>::const_iterator it = TrackingLSMEsMap.begin();
383  it != TrackingLSMEsMap.end(); it++) {
384  it->second.TrackingFlag->Fill(-1.0);
385  }
386 
387  }
388 }
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 263 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(), mergeVDriftHistosByStation::name, AlCaHLTBitMon_QueryRunRegistry::string, TopFolderName_, TrackingCertification, trackingCertificationBooked_, TrackingCertificationSummaryMap, TrackingMEsMap, and verbose_.

Referenced by dqmEndJob().

263  {
265  // edm::LogError("TrackingCertificationInfo") << " TrackingCertificationInfo::fillTrackingCertificationMEs : MEs missing ";
266  return;
267  }
268 
269  ibooker_.cd();
270  std::string tracking_dir = "";
271  TrackingUtility::getTopFolderPath(ibooker_,igetter_, TopFolderName_, tracking_dir);
272  if (verbose_) std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEs] tracking_dir: " << tracking_dir << std::endl;
273  std::vector<MonitorElement*> all_mes = igetter_.getContents(tracking_dir+"/EventInfo/reportSummaryContents");
274  float fval = 1.0;
275 
276  if (verbose_) std::cout << "all_mes: " << all_mes.size() << std::endl;
277 
278  if ( checkPixelFEDs_ ) {
279  float val = 1.;
280  if ( allPixelFEDConnected_ ) val = 0.;
281  int xbin = 0;
282  for (std::map<std::string, TrackingMEs>::const_iterator it = TrackingMEsMap.begin();
283  it != TrackingMEsMap.end(); it++) {
284  std::string type = it->first;
285  if ( type == "pixel" ) {
286  it->second.TrackingFlag->Fill(val);
288  if (verbose_) std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEs] xbin: " << xbin << " val: " << val << std::endl;
289  th2d->SetBinContent(xbin+1,1,val);
290  }
291  xbin++;
292  }
293  fval = fminf(fval,val);
294  }
295 
296  int xbin = ( checkPixelFEDs_ ? 1 : 0);
297  for (std::vector<MonitorElement *>::const_iterator ime = all_mes.begin();
298  ime!= all_mes.end(); ime++) {
299  MonitorElement * me = (*ime);
300  if (!me) continue;
301  if (verbose_) std::cout<< "[TrackingCertificationInfo::fillTrackingCertificationMEs] me: " << me->getName() << std::endl;
302  if (me->kind() == MonitorElement::DQM_KIND_REAL) {
303  std::string name = me->getName();
304  float val = me->getFloatValue();
305 
306  for (std::map<std::string, TrackingMEs>::const_iterator it = TrackingMEsMap.begin();
307  it != TrackingMEsMap.end(); it++) {
308 
309  if (verbose_) std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEs] ME: " << it->first << " [" << it->second.TrackingFlag->getFullname() << "] flag: " << it->second.TrackingFlag->getFloatValue() << std::endl;
310 
311  std::string type = it->first;
312  if (name.find(type) != std::string::npos) {
313  if (verbose_) std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEs] type: " << type << " <---> name: " << name << std::endl;
314  it->second.TrackingFlag->Fill(val);
315  if (verbose_) std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEs] xbin: " << xbin << " val: " << val << std::endl;
317  th2d->SetBinContent(xbin+1,1,val);
318  xbin++;
319  break;
320  }
321  if (verbose_) std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEs] ME: " << it->first << " [" << it->second.TrackingFlag->getFullname() << "] flag: " << it->second.TrackingFlag->getFloatValue() << std::endl;
322 
323  }
324  fval = fminf(fval,val);
325  }
326  }
327  if (verbose_) std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEs] TrackingCertification: " << fval << std::endl;
328  TrackingCertification->Fill(fval);
329 }
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:266
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:121
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 393 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(), mergeVDriftHistosByStation::name, MonitorElement::Reset(), resetTrackingCertificationMEsAtLumi(), AlCaHLTBitMon_QueryRunRegistry::string, TopFolderName_, TrackingLSCertification, trackingLSCertificationBooked_, TrackingLSMEsMap, and verbose_.

Referenced by dqmEndLuminosityBlock().

393  {
394  if (verbose_) std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] starting .." << std::endl;
396  return;
397  }
398  resetTrackingCertificationMEsAtLumi(ibooker_,igetter_);
399 
400  ibooker_.cd();
401  std::string tracking_dir = "";
402  TrackingUtility::getTopFolderPath(ibooker_,igetter_, TopFolderName_, tracking_dir);
403  if (verbose_) std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] tracking_dir: " << tracking_dir << std::endl;
404 
405 
406  if (verbose_) std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] tracking_dir: " << tracking_dir << std::endl;
407  std::vector<MonitorElement*> all_mes = igetter_.getContents(tracking_dir+"/EventInfo/reportSummaryContents");
408 
409  if (verbose_) std::cout << "all_mes: " << all_mes.size() << std::endl;
410 
411  for (std::vector<MonitorElement *>::const_iterator ime = all_mes.begin();
412  ime!= all_mes.end(); ime++) {
413  MonitorElement * me = (*ime);
414  if (!me) continue;
415  if (verbose_) std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] me: " << me->getName() << std::endl;
416  if (me->kind() == MonitorElement::DQM_KIND_REAL) {
417  std::string name = me->getName();
418  float val = me->getFloatValue();
419  if (verbose_) std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] val: " << val << std::endl;
420 
421  for (std::map<std::string, TrackingLSMEs>::const_iterator it = TrackingLSMEsMap.begin();
422  it != TrackingLSMEsMap.end(); it++) {
423 
424  if (verbose_) std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] ME: " << it->first << " [" << it->second.TrackingFlag->getFullname() << "] flag: " << it->second.TrackingFlag->getFloatValue() << std::endl;
425 
426  std::string type = it->first;
427  if (verbose_) std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] type: " << type << std::endl;
428  if (name.find(type) != std::string::npos) {
429  if (verbose_) std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] type: " << type << " <---> name: " << name << std::endl;
430  it->second.TrackingFlag->Fill(val);
431  break;
432  }
433  if (verbose_) std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] ME: " << it->first << " [" << it->second.TrackingFlag->getFullname() << "] flag: " << it->second.TrackingFlag->getFloatValue() << std::endl;
434  }
435  }
436  }
437 
438  float global_dqm_flag = 1.0;
439  std::string full_path = tracking_dir + "/EventInfo/reportSummary";
440  MonitorElement* me_dqm = igetter_.get(full_path);
441  if (me_dqm && me_dqm->kind() == MonitorElement::DQM_KIND_REAL) global_dqm_flag = me_dqm->getFloatValue();
442  if (verbose_) std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] global_dqm_flag: " << global_dqm_flag << std::endl;
443 
445  TrackingLSCertification->Fill(global_dqm_flag);
446 }
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:266
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:302
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:121
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 334 of file TrackingCertificationInfo.cc.

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

Referenced by fillDummyTrackingCertification().

334  {
337  for (std::map<std::string, TrackingMEs>::const_iterator it = TrackingMEsMap.begin();
338  it != TrackingMEsMap.end(); it++) {
339  it->second.TrackingFlag->Reset();
340  }
341 }
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 346 of file TrackingCertificationInfo.cc.

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

Referenced by fillDummyTrackingCertificationAtLumi(), and fillTrackingCertificationMEsAtLumi().

346  {
349  for (std::map<std::string, TrackingLSMEs>::const_iterator it = TrackingLSMEsMap.begin();
350  it != TrackingLSMEsMap.end(); it++) {
351  it->second.TrackingFlag->Reset();
352  }
353 }
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