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)
 
static void prevalidate (ConfigurationDescriptions &)
 
- 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_, 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 207 of file SiStripCertificationInfo.cc.

207  {
208 }
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 int siStripFedIdMin = FEDNumbering::MINSiStripFEDID;
67  const int siStripFedIdMax = FEDNumbering::MAXSiStripFEDID;
68 
70  if( eSetup.find( recordKey ) != 0) {
71 
73  eSetup.get<RunInfoRcd>().get(sumFED);
74 
75  if ( sumFED.isValid() ) {
76  std::vector<int> FedsInIds= sumFED->m_fed_in;
77  for(unsigned int it = 0; it < FedsInIds.size(); ++it) {
78  int fedID = FedsInIds[it];
79  if(fedID>=siStripFedIdMin && fedID<=siStripFedIdMax) ++nFEDConnected_;
80  }
81  LogDebug ("SiStripDcsInfo") << " SiStripDcsInfo :: Connected FEDs " << nFEDConnected_;
82  }
83  }
84 
89 
90 }
#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:129
void SiStripCertificationInfo::bookSiStripCertificationMEs ( )
private

Definition at line 94 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().

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

Definition at line 175 of file SiStripCertificationInfo.cc.

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

Referenced by beginRun(), and resetTrackingCertificationMEs().

175  {
177  std::string tracking_dir = "";
178  SiStripUtility::getTopFolderPath(dqmStore_, "Tracking", tracking_dir);
179  if (tracking_dir.size() > 0) {
180  dqmStore_->setCurrentFolder(tracking_dir+"/EventInfo");
181  TrackingCertification = dqmStore_->bookFloat("CertificationSummary");
182 
183  dqmStore_->setCurrentFolder(tracking_dir+"/EventInfo/CertificationContents");
184 
185  std::string type;
186  MonitorElement* me;
187  type = "Rate";
188  me = dqmStore_->bookFloat("Track"+type);
189  TrackingMEsMap.insert(std::pair<std::string,MonitorElement*>(type,me));
190 
191  type = "Chi2";
192  me = dqmStore_->bookFloat("Track"+type);
193  TrackingMEsMap.insert(std::pair<std::string,MonitorElement*>(type,me));
194 
195  type = "RecHits";
196  me = dqmStore_->bookFloat("Track"+type);
197  TrackingMEsMap.insert(std::pair<std::string,MonitorElement*>(type,me));
198 
200  dqmStore_->cd();
201  }
202  }
203 }
type
Definition: HCALResponse.h:22
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:406
std::map< std::string, MonitorElement * > TrackingMEsMap
MonitorElement * bookFloat(const char *name)
Book float.
Definition: DQMStore.cc:654
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:429
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 212 of file SiStripCertificationInfo.cc.

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

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

EndRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 224 of file SiStripCertificationInfo.cc.

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

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

Definition at line 375 of file SiStripCertificationInfo.cc.

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

Referenced by beginRun().

375  {
378  SiStripCertification->Fill(-1.0);
379  for (std::map<std::string, SubDetMEs>::iterator it = SubDetMEsMap.begin();
380  it != SubDetMEsMap.end(); it++) {
381  it->second.det_fractionME->Reset();
382  it->second.det_fractionME->Fill(-1.0);
383  }
384 
385  for (int xbin = 1; xbin < SiStripCertificationSummaryMap->getNbinsX()+1; xbin++) {
386  for (int ybin = 1; ybin < SiStripCertificationSummaryMap->getNbinsY()+1; ybin++) {
387  SiStripCertificationSummaryMap->Fill(xbin, ybin, -1.0);
388  }
389  }
390  }
391 }
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 395 of file SiStripCertificationInfo.cc.

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

Referenced by beginRun(), and fillTrackingCertificationMEs().

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

Definition at line 272 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().

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

Definition at line 409 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().

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

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

Definition at line 361 of file SiStripCertificationInfo.cc.

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

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

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

Definition at line 348 of file SiStripCertificationInfo.cc.

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

Referenced by fillDummyTrackingCertification().

348  {
352  for (std::map<std::string, MonitorElement*>::const_iterator it = TrackingMEsMap.begin();
353  it != TrackingMEsMap.end(); it++) {
354  it->second->Reset();
355  }
356  }
357 }
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