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:
edm::EDAnalyzer 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 edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 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
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

void analyze (edm::Event const &, edm::EventSetup const &)
 Analyze. More...
 
void beginJob ()
 BeginJob. More...
 
void beginRun (edm::Run const &run, edm::EventSetup const &eSetup)
 Begin Run. More...
 
void bookTrackingCertificationMEs ()
 
void bookTrackingCertificationMEsAtLumi ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &iSetup)
 End Of Luminosity. More...
 
void endRun (edm::Run const &run, edm::EventSetup const &eSetup)
 EndRun. More...
 
void fillDummyTrackingCertification ()
 
void fillDummyTrackingCertificationAtLumi ()
 
void fillTrackingCertificationMEs (edm::EventSetup const &eSetup)
 
void fillTrackingCertificationMEsAtLumi ()
 
void resetTrackingCertificationMEs ()
 
void resetTrackingCertificationMEsAtLumi ()
 

Private Attributes

bool allPixelFEDConnected_
 
bool checkPixelFEDs_
 
edm::ESHandle< SiStripDetCablingdetCabling_
 
DQMStoredqmStore_
 
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
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- 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 36 of file TrackingCertificationInfo.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 33 of file TrackingCertificationInfo.cc.

References checkPixelFEDs_, dqmStore_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), cppFunctionSkipper::operator, pSet_, AlCaHLTBitMon_QueryRunRegistry::string, SubDetFolder, TopFolderName_, TrackingCertificationInfo::TrackingLSMEs::TrackingFlag, TrackingLSMEsMap, and TrackingMEsMap.

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

Destructor.

Definition at line 88 of file TrackingCertificationInfo.cc.

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

Member Function Documentation

void TrackingCertificationInfo::analyze ( edm::Event const &  event,
edm::EventSetup const &  eSetup 
)
privatevirtual

Analyze.

Implements edm::EDAnalyzer.

Definition at line 239 of file TrackingCertificationInfo.cc.

239  {
240 }
void TrackingCertificationInfo::beginJob ( void  )
privatevirtual

BeginJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 95 of file TrackingCertificationInfo.cc.

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

Begin Run.

Reimplemented from edm::EDAnalyzer.

Definition at line 101 of file TrackingCertificationInfo.cc.

References allPixelFEDConnected_, bookTrackingCertificationMEs(), bookTrackingCertificationMEsAtLumi(), detCabling_, fillDummyTrackingCertification(), fillDummyTrackingCertificationAtLumi(), 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, and nFEDConnected_.

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

Definition at line 154 of file TrackingCertificationInfo.cc.

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

Referenced by beginRun(), and resetTrackingCertificationMEs().

154  {
155 
156  // std::cout << "[TrackingCertificationInfo::bookTrackingCertificationMEs] starting .. trackingCertificationBooked_: " << trackingCertificationBooked_ << std::endl;
157 
159 
160  dqmStore_->cd();
161  std::string tracking_dir = "";
163 
164  if (tracking_dir.size() > 0 ) dqmStore_->setCurrentFolder(tracking_dir+"/EventInfo");
165  else dqmStore_->setCurrentFolder(TopFolderName_+"/EventInfo");
166 
167  TrackingCertification = dqmStore_->bookFloat("CertificationSummary");
168 
169  std::string hname, htitle;
170  hname = "CertificationReportMap";
171  htitle = "Tracking Certification Summary Map";
172  size_t nQT = TrackingMEsMap.size();
173  TrackingCertificationSummaryMap = dqmStore_->book2D(hname, htitle, nQT,0.5,float(nQT)+0.5,1,0.5,1.5);
174  TrackingCertificationSummaryMap->setAxisTitle("Track Quality Type", 1);
176  size_t ibin =0;
177  for ( auto meQTset : TrackingMEsMap ) {
178  TrackingCertificationSummaryMap->setBinLabel(ibin+1,meQTset.first);
179  ibin++;
180  }
181 
182 
183  if (tracking_dir.size() > 0 ) dqmStore_->setCurrentFolder(TopFolderName_+"/EventInfo/CertificationContents");
184  else dqmStore_->setCurrentFolder(TopFolderName_+"/EventInfo/CertificationContents");
185 
186  for (std::map<std::string, TrackingMEs>::iterator it = TrackingMEsMap.begin();
187  it != TrackingMEsMap.end(); it++) {
188  std::string meQTname = it->first;
189  // std::cout << "[TrackingCertificationInfo::bookStatus] meQTname: " << meQTname << std::endl;
190  it->second.TrackingFlag = dqmStore_->bookFloat("Track"+meQTname);
191  // std::cout << "[TrackingCertificationInfo::bookStatus] " << it->first << " exists ? " << it->second.TrackingFlag << std::endl;
192  }
193 
195  dqmStore_->cd();
196  }
197 
198  // std::cout << "[TrackingCertificationInfo::bookStatus] trackingCertificationBooked_: " << trackingCertificationBooked_ << std::endl;
199 }
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:644
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)
static void getTopFolderPath(DQMStore *dqm_store, std::string top_dir, std::string &path)
MonitorElement * bookFloat(const char *name)
Book float.
Definition: DQMStore.cc:891
MonitorElement * TrackingCertificationSummaryMap
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:1082
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:667
void TrackingCertificationInfo::bookTrackingCertificationMEsAtLumi ( )
private

Definition at line 204 of file TrackingCertificationInfo.cc.

References DQMStore::bookFloat(), DQMStore::cd(), dqmStore_, TrackingUtility::getTopFolderPath(), DQMStore::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, TopFolderName_, TrackingLSCertification, trackingLSCertificationBooked_, and TrackingLSMEsMap.

Referenced by beginRun(), and resetTrackingCertificationMEsAtLumi().

204  {
205 
206  // std::cout << "[TrackingCertificationInfo::bookTrackingCertificationMEs] starting .. trackingCertificationBooked_: " << trackingCertificationBooked_ << std::endl;
207 
209 
210  dqmStore_->cd();
211  std::string tracking_dir = "";
213 
214  if (tracking_dir.size() > 0 ) dqmStore_->setCurrentFolder(tracking_dir+"/EventInfo");
215  else dqmStore_->setCurrentFolder(TopFolderName_+"/EventInfo");
216 
217  TrackingLSCertification = dqmStore_->bookFloat("CertificationSummary");
218 
219  if (tracking_dir.size() > 0 ) dqmStore_->setCurrentFolder(TopFolderName_+"/EventInfo/CertificationContents");
220  else dqmStore_->setCurrentFolder(TopFolderName_+"/EventInfo/CertificationContents");
221 
222  for (std::map<std::string, TrackingLSMEs>::iterator it = TrackingLSMEsMap.begin();
223  it != TrackingLSMEsMap.end(); it++) {
224  std::string meQTname = it->first;
225  // std::cout << "[TrackingCertificationInfo::bookStatus] meQTname: " << meQTname << std::endl;
226  it->second.TrackingFlag = dqmStore_->bookFloat("Track"+meQTname);
227  // std::cout << "[TrackingCertificationInfo::bookStatus] " << it->first << " exists ? " << it->second.TrackingFlag << std::endl;
228  }
229 
231  dqmStore_->cd();
232  }
233 
234  // std::cout << "[TrackingCertificationInfo::bookStatus] trackingCertificationBooked_: " << trackingCertificationBooked_ << std::endl;
235 }
std::map< std::string, TrackingLSMEs > TrackingLSMEsMap
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:644
static void getTopFolderPath(DQMStore *dqm_store, std::string top_dir, std::string &path)
MonitorElement * bookFloat(const char *name)
Book float.
Definition: DQMStore.cc:891
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:667
void TrackingCertificationInfo::endLuminosityBlock ( edm::LuminosityBlock const &  lumiSeg,
edm::EventSetup const &  iSetup 
)
privatevirtual

End Of Luminosity.

Reimplemented from edm::EDAnalyzer.

Definition at line 244 of file TrackingCertificationInfo.cc.

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

244  {
245  edm::LogInfo( "TrackingDaqInfo") << "TrackingDaqInfo::endLuminosityBlock";
246 
249 }
void TrackingCertificationInfo::endRun ( edm::Run const &  run,
edm::EventSetup const &  eSetup 
)
privatevirtual

EndRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 254 of file TrackingCertificationInfo.cc.

References fillDummyTrackingCertification(), fillTrackingCertificationMEs(), and nFEDConnected_.

254  {
255 
256  // std::cout << "[TrackingCertificationInfo::endRun]" << std::endl;
257 
258  edm::LogInfo ("TrackingCertificationInfo") <<"TrackingCertificationInfo:: End Run";
259 
260  if ( nFEDConnected_ > 0 ) fillTrackingCertificationMEs(eSetup);
262 
263  // std::cout << "[TrackingCertificationInfo::endRun] DONE" << std::endl;
264 
265 }
void fillTrackingCertificationMEs(edm::EventSetup const &eSetup)
void TrackingCertificationInfo::fillDummyTrackingCertification ( )
private

Definition at line 364 of file TrackingCertificationInfo.cc.

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

Referenced by beginRun(), and endRun().

364  {
368  for (std::map<std::string, TrackingMEs>::const_iterator it = TrackingMEsMap.begin();
369  it != TrackingMEsMap.end(); it++) {
370  it->second.TrackingFlag->Fill(-1.0);
371  }
372 
373  for (int xbin = 1; xbin < TrackingCertificationSummaryMap->getNbinsX()+1; xbin++ )
374  for (int ybin = 1; ybin < TrackingCertificationSummaryMap->getNbinsY()+1; ybin++ )
375  TrackingCertificationSummaryMap->Fill(xbin,ybin,-1);
376 
377 
378  }
379 }
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 ( )
private

Definition at line 384 of file TrackingCertificationInfo.cc.

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

Referenced by beginRun(), and endLuminosityBlock().

384  {
388  for (std::map<std::string, TrackingLSMEs>::const_iterator it = TrackingLSMEsMap.begin();
389  it != TrackingLSMEsMap.end(); it++) {
390  it->second.TrackingFlag->Fill(-1.0);
391  }
392 
393  }
394 }
std::map< std::string, TrackingLSMEs > TrackingLSMEsMap
void Fill(long long x)
void TrackingCertificationInfo::fillTrackingCertificationMEs ( edm::EventSetup const &  eSetup)
private

Definition at line 269 of file TrackingCertificationInfo.cc.

References allPixelFEDConnected_, DQMStore::cd(), checkPixelFEDs_, gather_cfg::cout, MonitorElement::DQM_KIND_REAL, dqmStore_, MonitorElement::Fill(), DQMStore::getContents(), MonitorElement::getFloatValue(), MonitorElement::getName(), MonitorElement::getTH2F(), TrackingUtility::getTopFolderPath(), MonitorElement::kind(), mergeVDriftHistosByStation::name, AlCaHLTBitMon_QueryRunRegistry::string, TopFolderName_, TrackingCertification, trackingCertificationBooked_, TrackingCertificationSummaryMap, and TrackingMEsMap.

Referenced by endRun().

269  {
271  // edm::LogError("TrackingCertificationInfo") << " TrackingCertificationInfo::fillTrackingCertificationMEs : MEs missing ";
272  return;
273  }
274 
275  dqmStore_->cd();
276  std::string tracking_dir = "";
278  // std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEs] tracking_dir: " << tracking_dir << std::endl;
279  std::vector<MonitorElement*> all_mes = dqmStore_->getContents(tracking_dir+"/EventInfo/reportSummaryContents");
280  float fval = 1.0;
281 
282  // std::cout << "all_mes: " << all_mes.size() << std::endl;
283 
284  if ( checkPixelFEDs_ ) {
285  float val = 1.;
286  if ( allPixelFEDConnected_ ) val = 0.;
287  int xbin = 0;
288  for (std::map<std::string, TrackingMEs>::const_iterator it = TrackingMEsMap.begin();
289  it != TrackingMEsMap.end(); it++) {
290  std::string type = it->first;
291  if ( type == "pixel" ) {
292  it->second.TrackingFlag->Fill(val);
294  std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEs] xbin: " << xbin << " val: " << val << std::endl;
295  th2d->SetBinContent(xbin+1,1,val);
296  }
297  xbin++;
298  }
299  fval = fminf(fval,val);
300  }
301 
302  int xbin = ( checkPixelFEDs_ ? 1 : 0);
303  for (std::vector<MonitorElement *>::const_iterator ime = all_mes.begin();
304  ime!= all_mes.end(); ime++) {
305  MonitorElement * me = (*ime);
306  if (!me) continue;
307  // std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEs] me: " << me->getName() << std::endl;
308  if (me->kind() == MonitorElement::DQM_KIND_REAL) {
309  std::string name = me->getName();
310  float val = me->getFloatValue();
311 
312  for (std::map<std::string, TrackingMEs>::const_iterator it = TrackingMEsMap.begin();
313  it != TrackingMEsMap.end(); it++) {
314 
315  // std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEs] ME: " << it->first << " [" << it->second.TrackingFlag->getFullname() << "] flag: " << it->second.TrackingFlag->getFloatValue() << std::endl;
316 
317  std::string type = it->first;
318  if (name.find(type) != std::string::npos) {
319  // std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEs] type: " << type << " <---> name: " << name << std::endl;
320  it->second.TrackingFlag->Fill(val);
321  std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEs] xbin: " << xbin << " val: " << val << std::endl;
323  th2d->SetBinContent(xbin+1,1,val);
324  xbin++;
325  break;
326  }
327  // std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEs] ME: " << it->first << " [" << it->second.TrackingFlag->getFullname() << "] flag: " << it->second.TrackingFlag->getFloatValue() << std::endl;
328 
329  }
330  fval = fminf(fval,val);
331  }
332  }
333  // std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEs] TrackingCertification: " << fval << std::endl;
334  TrackingCertification->Fill(fval);
335 }
type
Definition: HCALResponse.h:21
const std::string & getName(void) const
get name of ME
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:644
std::map< std::string, TrackingMEs > TrackingMEsMap
static void getTopFolderPath(DQMStore *dqm_store, std::string top_dir, std::string &path)
void Fill(long long x)
MonitorElement * TrackingCertificationSummaryMap
double getFloatValue(void) const
Kind kind(void) const
Get the type of the monitor element.
std::vector< MonitorElement * > getContents(const std::string &path) const
Definition: DQMStore.cc:1737
tuple cout
Definition: gather_cfg.py:121
TH2F * getTH2F(void) const
void TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi ( )
private

Definition at line 399 of file TrackingCertificationInfo.cc.

References DQMStore::cd(), MonitorElement::DQM_KIND_REAL, dqmStore_, MonitorElement::Fill(), DQMStore::get(), DQMStore::getContents(), MonitorElement::getFloatValue(), MonitorElement::getName(), TrackingUtility::getTopFolderPath(), MonitorElement::kind(), mergeVDriftHistosByStation::name, MonitorElement::Reset(), resetTrackingCertificationMEsAtLumi(), AlCaHLTBitMon_QueryRunRegistry::string, TopFolderName_, TrackingLSCertification, trackingLSCertificationBooked_, and TrackingLSMEsMap.

Referenced by endLuminosityBlock().

399  {
400  // std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] starting .." << std::endl;
402  return;
403  }
405 
406  dqmStore_->cd();
407  std::string tracking_dir = "";
409  // std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] tracking_dir: " << tracking_dir << std::endl;
410 
411 
412  // std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] tracking_dir: " << tracking_dir << std::endl;
413  std::vector<MonitorElement*> all_mes = dqmStore_->getContents(tracking_dir+"/EventInfo/reportSummaryContents");
414 
415  // std::cout << "all_mes: " << all_mes.size() << std::endl;
416 
417  for (std::vector<MonitorElement *>::const_iterator ime = all_mes.begin();
418  ime!= all_mes.end(); ime++) {
419  MonitorElement * me = (*ime);
420  if (!me) continue;
421  // std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] me: " << me->getName() << std::endl;
422  if (me->kind() == MonitorElement::DQM_KIND_REAL) {
423  std::string name = me->getName();
424  float val = me->getFloatValue();
425  // std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] val: " << val << std::endl;
426 
427  for (std::map<std::string, TrackingLSMEs>::const_iterator it = TrackingLSMEsMap.begin();
428  it != TrackingLSMEsMap.end(); it++) {
429 
430  // std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] ME: " << it->first << " [" << it->second.TrackingFlag->getFullname() << "] flag: " << it->second.TrackingFlag->getFloatValue() << std::endl;
431 
432  std::string type = it->first;
433  // std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] type: " << type << std::endl;
434  if (name.find(type) != std::string::npos) {
435  // std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] type: " << type << " <---> name: " << name << std::endl;
436  it->second.TrackingFlag->Fill(val);
437  break;
438  }
439  // std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] ME: " << it->first << " [" << it->second.TrackingFlag->getFullname() << "] flag: " << it->second.TrackingFlag->getFloatValue() << std::endl;
440  }
441  }
442  }
443 
444  float global_dqm_flag = 1.0;
445  std::string full_path = tracking_dir + "/EventInfo/reportSummary";
446  MonitorElement* me_dqm = dqmStore_->get(full_path);
447  if (me_dqm && me_dqm->kind() == MonitorElement::DQM_KIND_REAL) global_dqm_flag = me_dqm->getFloatValue();
448  // std::cout << "[TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi] global_dqm_flag: " << global_dqm_flag << std::endl;
449 
451  TrackingLSCertification->Fill(global_dqm_flag);
452 }
std::map< std::string, TrackingLSMEs > TrackingLSMEsMap
type
Definition: HCALResponse.h:21
const std::string & getName(void) const
get name of ME
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:644
static void getTopFolderPath(DQMStore *dqm_store, std::string top_dir, std::string &path)
void Fill(long long x)
double getFloatValue(void) const
Kind kind(void) const
Get the type of the monitor element.
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1708
std::vector< MonitorElement * > getContents(const std::string &path) const
Definition: DQMStore.cc:1737
void Reset(void)
reset ME (ie. contents, errors, etc)
void TrackingCertificationInfo::resetTrackingCertificationMEs ( )
private

Definition at line 340 of file TrackingCertificationInfo.cc.

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

Referenced by fillDummyTrackingCertification().

340  {
343  for (std::map<std::string, TrackingMEs>::const_iterator it = TrackingMEsMap.begin();
344  it != TrackingMEsMap.end(); it++) {
345  it->second.TrackingFlag->Reset();
346  }
347 }
std::map< std::string, TrackingMEs > TrackingMEsMap
void Reset(void)
reset ME (ie. contents, errors, etc)
void TrackingCertificationInfo::resetTrackingCertificationMEsAtLumi ( )
private

Definition at line 352 of file TrackingCertificationInfo.cc.

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

Referenced by fillDummyTrackingCertificationAtLumi(), and fillTrackingCertificationMEsAtLumi().

352  {
355  for (std::map<std::string, TrackingLSMEs>::const_iterator it = TrackingLSMEsMap.begin();
356  it != TrackingLSMEsMap.end(); it++) {
357  it->second.TrackingFlag->Reset();
358  }
359 }
std::map< std::string, TrackingLSMEs > TrackingLSMEsMap
void Reset(void)
reset ME (ie. contents, errors, etc)

Member Data Documentation

bool TrackingCertificationInfo::allPixelFEDConnected_
private

Definition at line 104 of file TrackingCertificationInfo.h.

Referenced by beginRun(), and fillTrackingCertificationMEs().

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

Definition at line 98 of file TrackingCertificationInfo.h.

Referenced by beginRun().

DQMStore* TrackingCertificationInfo::dqmStore_
private
unsigned long long TrackingCertificationInfo::m_cacheID_
private

Definition at line 109 of file TrackingCertificationInfo.h.

Referenced by beginRun().

int TrackingCertificationInfo::nFEDConnected_
private

Definition at line 103 of file TrackingCertificationInfo.h.

Referenced by beginRun(), endLuminosityBlock(), and endRun().

edm::ParameterSet TrackingCertificationInfo::pSet_
private

Definition at line 99 of file TrackingCertificationInfo.h.

Referenced by TrackingCertificationInfo().

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

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