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
SiStripCertificationInfo Class Reference

#include <DQM/SiStripMonitorCluster/interface/SiStripCertificationInfo.h>

Inheritance diagram for SiStripCertificationInfo:
edm::EDAnalyzer

Classes

struct  SubDetMEs
 

Public Member Functions

 SiStripCertificationInfo (const edm::ParameterSet &ps)
 Constructor. More...
 
virtual ~SiStripCertificationInfo ()
 Destructor. More...
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

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 bookSiStripCertificationMEs ()
 
void bookTrackingCertificationMEs ()
 
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 fillDummySiStripCertification ()
 
void fillDummyTrackingCertification ()
 
void fillSiStripCertificationMEs ()
 
void fillSiStripCertificationMEsAtLumi ()
 
void fillTrackingCertificationMEs ()
 
void resetSiStripCertificationMEs ()
 
void resetTrackingCertificationMEs ()
 

Private Attributes

edm::ESHandle< SiStripDetCablingdetCabling_
 
DQMStoredqmStore_
 
unsigned long long m_cacheID_
 
int nFEDConnected_
 
MonitorElementSiStripCertification
 
bool sistripCertificationBooked_
 
MonitorElementSiStripCertificationMap
 
MonitorElementSiStripCertificationSummaryMap
 
std::map< std::string, SubDetMEsSubDetMEsMap
 
MonitorElementTrackingCertification
 
bool trackingCertificationBooked_
 
std::map< std::string,
MonitorElement * > 
TrackingMEsMap
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

Detailed Description

Description: Checks the # of SiStrip FEDs from DAQ Usage: <usage>

Definition at line 40 of file SiStripCertificationInfo.h.

Constructor & Destructor Documentation

SiStripCertificationInfo::SiStripCertificationInfo ( const edm::ParameterSet ps)

Constructor.

Definition at line 35 of file SiStripCertificationInfo.cc.

References dqmStore_, cmsCodeRules.cppFunctionSkipper::operator, sistripCertificationBooked_, and trackingCertificationBooked_.

35  {
36  // Create MessageSender
37  edm::LogInfo( "SiStripCertificationInfo") << "SiStripCertificationInfo::Deleting SiStripCertificationInfo ";
38  // get back-end interface
42 }
SiStripCertificationInfo::~SiStripCertificationInfo ( )
virtual

Destructor.

Definition at line 43 of file SiStripCertificationInfo.cc.

43  {
44  edm::LogInfo("SiStripCertificationInfo") << "SiStripCertificationInfo::Deleting SiStripCertificationInfo ";
45 
46 }

Member Function Documentation

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

Analyze.

Implements edm::EDAnalyzer.

Definition at line 208 of file SiStripCertificationInfo.cc.

208  {
209 }
void SiStripCertificationInfo::beginJob ( void  )
privatevirtual

BeginJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 50 of file SiStripCertificationInfo.cc.

50  {
51 
52 }
void SiStripCertificationInfo::beginRun ( edm::Run const &  run,
edm::EventSetup const &  eSetup 
)
privatevirtual

Begin Run.

Reimplemented from edm::EDAnalyzer.

Definition at line 56 of file SiStripCertificationInfo.cc.

References bookSiStripCertificationMEs(), bookTrackingCertificationMEs(), detCabling_, fillDummySiStripCertification(), fillDummyTrackingCertification(), edm::EventSetup::find(), edm::eventsetup::heterocontainer::HCTypeTag::findType(), edm::EventSetup::get(), edm::ESHandleBase::isValid(), LogDebug, m_cacheID_, FEDNumbering::MAXSiStripFEDID, FEDNumbering::MINSiStripFEDID, and nFEDConnected_.

56  {
57 
58  edm::LogInfo ("SiStripCertificationInfo") <<"SiStripCertificationInfo:: Begining of Run";
59  unsigned long long cacheID = eSetup.get<SiStripDetCablingRcd>().cacheIdentifier();
60  if (m_cacheID_ != cacheID) {
61  m_cacheID_ = cacheID;
62  }
63  eSetup.get<SiStripDetCablingRcd>().get(detCabling_);
64 
65  nFEDConnected_ = 0;
66  const FEDNumbering numbering;
67  const int siStripFedIdMin = numbering.MINSiStripFEDID;
68  const int siStripFedIdMax = numbering.MAXSiStripFEDID;
69 
71  if( eSetup.find( recordKey ) != 0) {
72 
74  eSetup.get<RunInfoRcd>().get(sumFED);
75 
76  if ( sumFED.isValid() ) {
77  std::vector<int> FedsInIds= sumFED->m_fed_in;
78  for(unsigned int it = 0; it < FedsInIds.size(); ++it) {
79  int fedID = FedsInIds[it];
80  if(fedID>=siStripFedIdMin && fedID<=siStripFedIdMax) ++nFEDConnected_;
81  }
82  LogDebug ("SiStripDcsInfo") << " SiStripDcsInfo :: Connected FEDs " << nFEDConnected_;
83  }
84  }
85 
90 
91 }
#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:126
void SiStripCertificationInfo::bookSiStripCertificationMEs ( )
private

Definition at line 95 of file SiStripCertificationInfo.cc.

References DQMStore::book2D(), DQMStore::bookFloat(), DQMStore::cd(), SiStripCertificationInfo::SubDetMEs::det_fractionME, dqmStore_, SiStripCertificationInfo::SubDetMEs::folder_name, SiStripUtility::getTopFolderPath(), SiStripCertificationInfo::SubDetMEs::n_layer, MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), DQMStore::setCurrentFolder(), SiStripCertification, sistripCertificationBooked_, SiStripCertificationSummaryMap, SiStripCertificationInfo::SubDetMEs::subdet_tag, SubDetMEsMap, and GlobalPosition_Frontier_DevDB_cff::tag.

Referenced by beginRun(), and resetSiStripCertificationMEs().

95  {
97  dqmStore_->cd();
98  std::string strip_dir = "";
99  SiStripUtility::getTopFolderPath(dqmStore_, "SiStrip", strip_dir);
100  if (strip_dir.size() > 0) dqmStore_->setCurrentFolder(strip_dir+"/EventInfo");
101  else dqmStore_->setCurrentFolder("SiStrip/EventInfo");
102 
103  SiStripCertification = dqmStore_->bookFloat("CertificationSummary");
104 
105  std::string hname = "CertificationReportMap";
106  std::string htitle = "SiStrip Certification for Good Detector Fraction";
107  SiStripCertificationSummaryMap = dqmStore_->book2D(hname, htitle, 6,0.5,6.5,9,0.5,9.5);
108  SiStripCertificationSummaryMap->setAxisTitle("Sub Detector Type", 1);
109  SiStripCertificationSummaryMap->setAxisTitle("Layer/Disc Number", 2);
110  int ibin = 0;
111  for (std::map<std::string, SubDetMEs>::const_iterator it = SubDetMEsMap.begin();
112  it != SubDetMEsMap.end(); it++) {
113  ibin++;
114  std::string det = it->first;
116  }
117 
118  SubDetMEs local_mes;
119  std::string tag;
120  dqmStore_->cd();
121  if (strip_dir.size() > 0) dqmStore_->setCurrentFolder(strip_dir+"/EventInfo/CertificationContents");
122  else dqmStore_->setCurrentFolder("SiStrip/EventInfo/CertificationContents");
123  tag = "TIB";
124 
125  local_mes.folder_name = "TIB";
126  local_mes.subdet_tag = "TIB";
127  local_mes.n_layer = 4;
128  local_mes.det_fractionME = dqmStore_->bookFloat("SiStrip_"+tag);
129  SubDetMEsMap.insert(std::pair<std::string, SubDetMEs >(tag, local_mes));
130 
131  tag = "TOB";
132  local_mes.folder_name = "TOB";
133  local_mes.subdet_tag = "TOB";
134  local_mes.n_layer = 6;
135  local_mes.det_fractionME = dqmStore_->bookFloat("SiStrip_"+tag);
136  SubDetMEsMap.insert(std::pair<std::string, SubDetMEs >(tag, local_mes));
137 
138  tag = "TECF";
139  local_mes.folder_name = "TEC/side_2";
140  local_mes.subdet_tag = "TEC+";
141  local_mes.n_layer = 9;
142  local_mes.det_fractionME = dqmStore_->bookFloat("SiStrip_"+tag);
143  SubDetMEsMap.insert(std::pair<std::string, SubDetMEs >(tag, local_mes));
144 
145  tag = "TECB";
146  local_mes.folder_name = "TEC/side_1";
147  local_mes.subdet_tag = "TEC-";
148  local_mes.n_layer = 9;
149  local_mes.det_fractionME = dqmStore_->bookFloat("SiStrip_"+tag);
150  SubDetMEsMap.insert(std::pair<std::string, SubDetMEs >(tag, local_mes));
151 
152  tag = "TIDF";
153  local_mes.folder_name = "TID/side_2";
154  local_mes.subdet_tag = "TID+";
155  local_mes.n_layer = 3;
156  local_mes.det_fractionME = dqmStore_->bookFloat("SiStrip_"+tag);
157  SubDetMEsMap.insert(std::pair<std::string, SubDetMEs >(tag, local_mes));
158 
159  tag = "TIDB";
160  local_mes.folder_name = "TID/side_1";
161  local_mes.subdet_tag = "TID-";
162  local_mes.n_layer = 3;
163  local_mes.det_fractionME = dqmStore_->bookFloat("SiStrip_"+tag);
164  SubDetMEsMap.insert(std::pair<std::string, SubDetMEs >(tag, local_mes));
165 
166  dqmStore_->cd();
167  if (strip_dir.size() > 0) dqmStore_->setCurrentFolder(strip_dir+"/EventInfo");
168 
170  dqmStore_->cd();
171  }
172 }
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:209
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 * bookFloat(const char *name)
Book float.
Definition: DQMStore.cc:451
std::map< std::string, SubDetMEs > SubDetMEsMap
MonitorElement * SiStripCertificationSummaryMap
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:642
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:232
static void getTopFolderPath(DQMStore *dqm_store, std::string type, std::string &path)
void SiStripCertificationInfo::bookTrackingCertificationMEs ( )
private

Definition at line 176 of file SiStripCertificationInfo.cc.

References DQMStore::bookFloat(), DQMStore::cd(), dqmStore_, SiStripUtility::getTopFolderPath(), DQMStore::setCurrentFolder(), TrackingCertification, trackingCertificationBooked_, and TrackingMEsMap.

Referenced by beginRun(), and resetTrackingCertificationMEs().

176  {
178  std::string tracking_dir = "";
179  SiStripUtility::getTopFolderPath(dqmStore_, "Tracking", tracking_dir);
180  if (tracking_dir.size() > 0) {
181  dqmStore_->setCurrentFolder(tracking_dir+"/EventInfo");
182  TrackingCertification = dqmStore_->bookFloat("CertificationSummary");
183 
184  dqmStore_->setCurrentFolder(tracking_dir+"/EventInfo/CertificationContents");
185 
186  std::string type;
187  MonitorElement* me;
188  type = "Rate";
189  me = dqmStore_->bookFloat("Track"+type);
190  TrackingMEsMap.insert(std::pair<std::string,MonitorElement*>(type,me));
191 
192  type = "Chi2";
193  me = dqmStore_->bookFloat("Track"+type);
194  TrackingMEsMap.insert(std::pair<std::string,MonitorElement*>(type,me));
195 
196  type = "RecHits";
197  me = dqmStore_->bookFloat("Track"+type);
198  TrackingMEsMap.insert(std::pair<std::string,MonitorElement*>(type,me));
199 
201  dqmStore_->cd();
202  }
203  }
204 }
type
Definition: HCALResponse.h:22
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:209
std::map< std::string, MonitorElement * > TrackingMEsMap
MonitorElement * bookFloat(const char *name)
Book float.
Definition: DQMStore.cc:451
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:232
static void getTopFolderPath(DQMStore *dqm_store, std::string type, std::string &path)
void SiStripCertificationInfo::endLuminosityBlock ( edm::LuminosityBlock const &  lumiSeg,
edm::EventSetup const &  iSetup 
)
privatevirtual

End Of Luminosity.

Reimplemented from edm::EDAnalyzer.

Definition at line 213 of file SiStripCertificationInfo.cc.

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

213  {
214  edm::LogInfo( "SiStripDaqInfo") << "SiStripDaqInfo::endLuminosityBlock";
215 
216  if (nFEDConnected_ > 0) {
219  }
220 }
void SiStripCertificationInfo::endRun ( edm::Run const &  run,
edm::EventSetup const &  eSetup 
)
privatevirtual

EndRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 225 of file SiStripCertificationInfo.cc.

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

225  {
226  edm::LogInfo ("SiStripCertificationInfo") <<"SiStripCertificationInfo:: End Run";
227 
228  if (nFEDConnected_ > 0) {
231  }
232 }
void SiStripCertificationInfo::fillDummySiStripCertification ( )
private

Definition at line 376 of file SiStripCertificationInfo.cc.

References MonitorElement::Fill(), MonitorElement::getNbinsX(), MonitorElement::getNbinsY(), resetSiStripCertificationMEs(), SiStripCertification, sistripCertificationBooked_, SiStripCertificationSummaryMap, and SubDetMEsMap.

Referenced by beginRun().

376  {
379  SiStripCertification->Fill(-1.0);
380  for (std::map<std::string, SubDetMEs>::iterator it = SubDetMEsMap.begin();
381  it != SubDetMEsMap.end(); it++) {
382  it->second.det_fractionME->Reset();
383  it->second.det_fractionME->Fill(-1.0);
384  }
385 
386  for (int xbin = 1; xbin < SiStripCertificationSummaryMap->getNbinsX()+1; xbin++) {
387  for (int ybin = 1; ybin < SiStripCertificationSummaryMap->getNbinsY()+1; ybin++) {
388  SiStripCertificationSummaryMap->Fill(xbin, ybin, -1.0);
389  }
390  }
391  }
392 }
int getNbinsY(void) const
get # of bins in Y-axis
void Fill(long long x)
std::map< std::string, SubDetMEs > SubDetMEsMap
MonitorElement * SiStripCertificationSummaryMap
int getNbinsX(void) const
get # of bins in X-axis
void SiStripCertificationInfo::fillDummyTrackingCertification ( )
private

Definition at line 396 of file SiStripCertificationInfo.cc.

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

Referenced by beginRun(), and fillTrackingCertificationMEs().

396  {
400  for (std::map<std::string, MonitorElement*>::const_iterator it = TrackingMEsMap.begin();
401  it != TrackingMEsMap.end(); it++) {
402  it->second->Fill(-1.0);
403  }
404 
405  }
406 }
std::map< std::string, MonitorElement * > TrackingMEsMap
void Fill(long long x)
void SiStripCertificationInfo::fillSiStripCertificationMEs ( )
private

Definition at line 273 of file SiStripCertificationInfo.cc.

References abs, DQMStore::cd(), detCabling_, MonitorElement::DQM_KIND_INT, MonitorElement::DQM_KIND_REAL, dqmStore_, MonitorElement::Fill(), DQMStore::get(), DQMStore::getContents(), MonitorElement::getFloatValue(), MonitorElement::getNbinsY(), SiStripFolderOrganizer::GetSubDetAndLayer(), SiStripUtility::goToDir(), gen::k, MonitorElement::kind(), mergeVDriftHistosByStation::name, DQMStore::pwd(), MonitorElement::Reset(), resetSiStripCertificationMEs(), SiStripCertification, sistripCertificationBooked_, SiStripCertificationSummaryMap, SubDetMEsMap, and GlobalPosition_Frontier_DevDB_cff::tag.

Referenced by endRun().

273  {
275  edm::LogError("SiStripCertificationInfo") << " SiStripCertificationInfo::fillSiStripCertificationMEs : MEs missing ";
276  return;
277  }
279  std::string mdir = "MechanicalView";
280  dqmStore_->cd();
281  if (!SiStripUtility::goToDir(dqmStore_, mdir)) return;
282  std::string mechanical_dir = dqmStore_->pwd();
283  uint16_t nDetTot = 0;
284  uint16_t nFaultyTot = 0;
285  uint16_t nSToNTot = 0;
286  float sToNTot = 0.0;
287  SiStripFolderOrganizer folder_organizer;
288  int xbin = 0;
289  for (std::map<std::string, SubDetMEs>::iterator it = SubDetMEsMap.begin();
290  it != SubDetMEsMap.end(); it++) {
291  xbin++;
292  std::string name = it->first;
293  std::string tag = it->second.subdet_tag;
294  MonitorElement* me = it->second.det_fractionME;
295  if (!me) continue;
296  std::string bad_module_folder = mechanical_dir+"/"+it->second.folder_name+"/"+"BadModuleList";
297  std::vector<MonitorElement *> faulty_detMEs = dqmStore_->getContents(bad_module_folder);
298 
299  uint16_t ndet_subdet = 0;
300  uint16_t nfaulty_subdet = 0;
301  int nlayer = it->second.n_layer;
302  int ybin = 0;
303  for (int ilayer = 0; ilayer < nlayer; ilayer++) {
304  uint16_t ndet_layer = detCabling_->connectedNumber(tag, ilayer+1);
305  ndet_subdet += ndet_layer;
306  ybin++;
307  uint16_t nfaulty_layer = 0;
308  for (std::vector<MonitorElement *>::iterator im = faulty_detMEs.begin(); im != faulty_detMEs.end(); im++) {
309  if ((*im)->kind() != MonitorElement::DQM_KIND_INT ) continue;
310  if ((*im)->getIntValue() == 0) continue;
311  uint32_t detId = atoi((*im)->getName().c_str());
312  std::pair<std::string,int32_t> det_layer_pair = folder_organizer.GetSubDetAndLayer(detId, false);
313  if (abs(det_layer_pair.second) == ilayer+1) nfaulty_layer++;
314  }
315 
316  nfaulty_subdet += nfaulty_layer;
317  float fraction_layer = -1.0;
318  if ( ndet_layer > 0) fraction_layer = 1 - ((nfaulty_layer*1.0)/ndet_layer);
319  if (SiStripCertificationSummaryMap) SiStripCertificationSummaryMap->Fill(xbin, ilayer+1,fraction_layer);
320  }
321  if (ybin <= SiStripCertificationSummaryMap->getNbinsY()) {
322  for (int k = ybin+1; k <= SiStripCertificationSummaryMap->getNbinsY(); k++) SiStripCertificationSummaryMap->Fill(xbin, k, -1.0);
323  }
324  float fraction_subdet = -1.0;
325  if (ndet_subdet > 0) fraction_subdet = 1 - ((nfaulty_subdet*1.0)/ndet_subdet);
326  // Check S/N status flag and use the minimum between the two
327  std::string full_path = mechanical_dir.substr(0, mechanical_dir.find_last_of("/"))
328  + "/EventInfo/reportSummaryContents/SiStrip_SToNFlag_"+name;
329  MonitorElement* me_ston = dqmStore_->get(full_path);
330  me->Reset();
331  if (me_ston && me_ston->kind()==MonitorElement::DQM_KIND_REAL) {
332  float ston_flg = me_ston->getFloatValue();
333  sToNTot += ston_flg;
334  nSToNTot++;
335  me->Fill(fminf(fraction_subdet,ston_flg));
336  } else me->Fill(fraction_subdet);
337  nDetTot += ndet_subdet ;
338  nFaultyTot += nfaulty_subdet;
339  }
340  float fraction_global = -1.0;
341  if (nDetTot > 0) fraction_global = 1.0 - ((nFaultyTot*1.0)/nDetTot);
342  float ston_frac_global = 1.0;
343  if (nSToNTot > 0) ston_frac_global = sToNTot/nSToNTot;
344  SiStripCertification->Fill(fminf(fraction_global,ston_frac_global));
345 }
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:209
#define abs(x)
Definition: mlp_lapack.h:159
int getNbinsY(void) const
get # of bins in Y-axis
void Fill(long long x)
std::map< std::string, SubDetMEs > SubDetMEsMap
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:1265
std::vector< MonitorElement * > getContents(const std::string &path) const
Definition: DQMStore.cc:1294
int k[5][pyjets_maxn]
MonitorElement * SiStripCertificationSummaryMap
std::pair< std::string, int32_t > GetSubDetAndLayer(const uint32_t &detid, bool ring_flag=0)
edm::ESHandle< SiStripDetCabling > detCabling_
void Reset(void)
reset ME (ie. contents, errors, etc)
static bool goToDir(DQMStore *dqm_store, std::string name)
const std::string & pwd(void) const
Definition: DQMStore.cc:204
void SiStripCertificationInfo::fillSiStripCertificationMEsAtLumi ( )
private

Definition at line 410 of file SiStripCertificationInfo.cc.

References DQMStore::cd(), MonitorElement::DQM_KIND_REAL, dqmStore_, MonitorElement::Fill(), DQMStore::get(), MonitorElement::getFloatValue(), SiStripUtility::getTopFolderPath(), MonitorElement::kind(), MonitorElement::Reset(), resetSiStripCertificationMEs(), SiStripCertification, sistripCertificationBooked_, and SubDetMEsMap.

Referenced by endLuminosityBlock().

410  {
412  edm::LogError("SiStripCertificationInfo") << " SiStripCertificationInfo::fillSiStripCertificationMEsAtLumi : MEs missing ";
413  return;
414  }
416  dqmStore_->cd();
417  std::string strip_dir = "";
418  SiStripUtility::getTopFolderPath(dqmStore_, "SiStrip", strip_dir);
419  if (strip_dir.size() == 0) strip_dir = "SiStrip";
420 
421  std::string full_path;
422  float dcs_flag = 1.0;
423  float dqm_flag = 1.0;
424  for (std::map<std::string, SubDetMEs>::iterator it = SubDetMEsMap.begin();
425  it != SubDetMEsMap.end(); it++) {
426  std::string type = it->first;
427  full_path = strip_dir + "/EventInfo/DCSContents/SiStrip_" + type;
428  MonitorElement* me_dcs = dqmStore_->get(full_path);
429  if (me_dcs && me_dcs->kind() == MonitorElement::DQM_KIND_REAL) dcs_flag = me_dcs->getFloatValue();
430  full_path = strip_dir + "/EventInfo/reportSummaryContents/SiStrip_" + type;
431  MonitorElement* me_dqm = dqmStore_->get(full_path);
432  if (me_dqm && me_dqm->kind() == MonitorElement::DQM_KIND_REAL) dqm_flag = me_dqm->getFloatValue();
433  it->second.det_fractionME->Reset();
434  it->second.det_fractionME->Fill(fminf(dqm_flag,dcs_flag));
435  }
436  dcs_flag = 1.0;
437  dqm_flag = 1.0;
438  full_path = strip_dir + "/EventInfo/reportSummary";
439  MonitorElement* me_dqm = dqmStore_->get(full_path);
440  if (me_dqm && me_dqm->kind() == MonitorElement::DQM_KIND_REAL) dqm_flag = me_dqm->getFloatValue();
441  full_path = strip_dir + "/EventInfo/DCSSummary";
442  MonitorElement* me_dcs = dqmStore_->get(full_path);
443  if (me_dcs && me_dcs->kind() == MonitorElement::DQM_KIND_REAL) dcs_flag = me_dcs->getFloatValue();
445  SiStripCertification->Fill(fminf(dqm_flag,dcs_flag));
446 }
type
Definition: HCALResponse.h:22
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:209
void Fill(long long x)
std::map< std::string, SubDetMEs > SubDetMEsMap
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:1265
void Reset(void)
reset ME (ie. contents, errors, etc)
static void getTopFolderPath(DQMStore *dqm_store, std::string type, std::string &path)
void SiStripCertificationInfo::fillTrackingCertificationMEs ( )
private

Definition at line 236 of file SiStripCertificationInfo.cc.

References MonitorElement::DQM_KIND_REAL, dqmStore_, MonitorElement::Fill(), fillDummyTrackingCertification(), DQMStore::getContents(), MonitorElement::getFloatValue(), MonitorElement::getName(), SiStripUtility::getTopFolderPath(), MonitorElement::kind(), mergeVDriftHistosByStation::name, TrackingCertification, trackingCertificationBooked_, and TrackingMEsMap.

Referenced by endLuminosityBlock(), and endRun().

236  {
238  edm::LogError("SiStripCertificationInfo") << " SiStripCertificationInfo::fillTrackingCertificationMEs : MEs missing ";
239  return;
240  }
241  std::string tk_dir = "";
242  SiStripUtility::getTopFolderPath(dqmStore_, "Tracking", tk_dir);
243  if (tk_dir.size() == 0) {
245  return;
246  }
247 
248  std::vector<MonitorElement*> all_mes = dqmStore_->getContents(tk_dir+"/EventInfo/reportSummaryContents");
249  float fval = 1.0;
250  for (std::vector<MonitorElement *>::const_iterator it = all_mes.begin();
251  it!= all_mes.end(); it++) {
252  MonitorElement * me = (*it);
253  if (!me) continue;
254  if (me->kind() == MonitorElement::DQM_KIND_REAL) {
255  std::string name = me->getName();
256  float val = me->getFloatValue();
257  for (std::map<std::string, MonitorElement*>::const_iterator it = TrackingMEsMap.begin();
258  it != TrackingMEsMap.end(); it++) {
259  std::string type = it->first;
260  if (name.find(type) != std::string::npos) {
261  it->second->Fill(val);
262  break;
263  }
264  }
265  fval *= val;
266  }
267  }
268  TrackingCertification->Fill(fval);
269 }
type
Definition: HCALResponse.h:22
const std::string & getName(void) const
get name of ME
std::map< std::string, MonitorElement * > TrackingMEsMap
void Fill(long long x)
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:1294
static void getTopFolderPath(DQMStore *dqm_store, std::string type, std::string &path)
void SiStripCertificationInfo::resetSiStripCertificationMEs ( )
private

Definition at line 362 of file SiStripCertificationInfo.cc.

References bookSiStripCertificationMEs(), MonitorElement::Reset(), SiStripCertification, sistripCertificationBooked_, SiStripCertificationSummaryMap, and SubDetMEsMap.

Referenced by fillDummySiStripCertification(), fillSiStripCertificationMEs(), and fillSiStripCertificationMEsAtLumi().

362  {
366  for (std::map<std::string, SubDetMEs>::iterator it = SubDetMEsMap.begin();
367  it != SubDetMEsMap.end(); it++) {
368  it->second.det_fractionME->Reset();
369  }
371  }
372 }
std::map< std::string, SubDetMEs > SubDetMEsMap
MonitorElement * SiStripCertificationSummaryMap
void Reset(void)
reset ME (ie. contents, errors, etc)
void SiStripCertificationInfo::resetTrackingCertificationMEs ( )
private

Definition at line 349 of file SiStripCertificationInfo.cc.

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

Referenced by fillDummyTrackingCertification().

349  {
353  for (std::map<std::string, MonitorElement*>::const_iterator it = TrackingMEsMap.begin();
354  it != TrackingMEsMap.end(); it++) {
355  it->second->Reset();
356  }
357  }
358 }
std::map< std::string, MonitorElement * > TrackingMEsMap
void Reset(void)
reset ME (ie. contents, errors, etc)

Member Data Documentation

edm::ESHandle< SiStripDetCabling > SiStripCertificationInfo::detCabling_
private

Definition at line 107 of file SiStripCertificationInfo.h.

Referenced by beginRun(), and fillSiStripCertificationMEs().

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

Definition at line 105 of file SiStripCertificationInfo.h.

Referenced by beginRun().

int SiStripCertificationInfo::nFEDConnected_
private

Definition at line 109 of file SiStripCertificationInfo.h.

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

MonitorElement* SiStripCertificationInfo::SiStripCertification
private
bool SiStripCertificationInfo::sistripCertificationBooked_
private
MonitorElement* SiStripCertificationInfo::SiStripCertificationMap
private

Definition at line 96 of file SiStripCertificationInfo.h.

MonitorElement* SiStripCertificationInfo::SiStripCertificationSummaryMap
private
std::map<std::string, SubDetMEs> SiStripCertificationInfo::SubDetMEsMap
private
MonitorElement* SiStripCertificationInfo::TrackingCertification
private
bool SiStripCertificationInfo::trackingCertificationBooked_
private
std::map<std::string, MonitorElement*> SiStripCertificationInfo::TrackingMEsMap
private