CMS 3D CMS Logo

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 edm::EDConsumerBase

Classes

struct  SubDetMEs
 

Public Member Functions

 SiStripCertificationInfo (const edm::ParameterSet &ps)
 Constructor. More...
 
 ~SiStripCertificationInfo () override
 Destructor. More...
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
 ~EDAnalyzer () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

void analyze (edm::Event const &, edm::EventSetup const &) override
 Analyze. More...
 
void beginJob () override
 BeginJob. More...
 
void beginRun (edm::Run const &run, edm::EventSetup const &eSetup) override
 Begin Run. More...
 
void bookSiStripCertificationMEs ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &iSetup) override
 End Of Luminosity. More...
 
void endRun (edm::Run const &run, edm::EventSetup const &eSetup) override
 EndRun. More...
 
void fillDummySiStripCertification ()
 
void fillSiStripCertificationMEs (edm::EventSetup const &eSetup)
 
void fillSiStripCertificationMEsAtLumi ()
 
void resetSiStripCertificationMEs ()
 

Private Attributes

edm::ESHandle< SiStripDetCablingdetCabling_
 
DQMStoredqmStore_
 
unsigned long long m_cacheID_
 
int nFEDConnected_
 
MonitorElementSiStripCertification
 
bool sistripCertificationBooked_
 
MonitorElementSiStripCertificationMap
 
MonitorElementSiStripCertificationSummaryMap
 
std::map< std::string, SubDetMEsSubDetMEsMap
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- 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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<typename ESProduct , Transition Tr = Transition::Event>
auto esConsumes (eventsetup::EventSetupRecordKey const &, ESInputTag const &tag)
 
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: 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 33 of file SiStripCertificationInfo.cc.

References dqmStore_, Utilities::operator, and sistripCertificationBooked_.

33  :
34  m_cacheID_(0) {
35  // Create MessageSender
36  edm::LogInfo( "SiStripCertificationInfo") << "SiStripCertificationInfo::Deleting SiStripCertificationInfo ";
37  // get back-end interface
40 }
SiStripCertificationInfo::~SiStripCertificationInfo ( )
override

Destructor.

Definition at line 41 of file SiStripCertificationInfo.cc.

41  {
42  edm::LogInfo("SiStripCertificationInfo") << "SiStripCertificationInfo::Deleting SiStripCertificationInfo ";
43 
44 }

Member Function Documentation

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

Analyze.

Implements edm::EDAnalyzer.

Definition at line 170 of file SiStripCertificationInfo.cc.

170  {
171 }
void SiStripCertificationInfo::beginJob ( void  )
overrideprivatevirtual

BeginJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 48 of file SiStripCertificationInfo.cc.

48  {
49 
50 }
void SiStripCertificationInfo::beginRun ( edm::Run const &  run,
edm::EventSetup const &  eSetup 
)
overrideprivatevirtual

Begin Run.

Reimplemented from edm::EDAnalyzer.

Definition at line 54 of file SiStripCertificationInfo.cc.

References bookSiStripCertificationMEs(), detCabling_, fillDummySiStripCertification(), edm::EventSetup::get(), edm::ESHandleBase::isValid(), LogDebug, m_cacheID_, RunInfo::m_fed_in, FEDNumbering::MAXSiStripFEDID, FEDNumbering::MINSiStripFEDID, nFEDConnected_, and edm::EventSetup::tryToGet().

54  {
55 
56  edm::LogInfo ("SiStripCertificationInfo") <<"SiStripCertificationInfo:: Begining of Run";
57  unsigned long long cacheID = eSetup.get<SiStripDetCablingRcd>().cacheIdentifier();
58  if (m_cacheID_ != cacheID) {
59  m_cacheID_ = cacheID;
60  }
61  eSetup.get<SiStripDetCablingRcd>().get(detCabling_);
62 
63  nFEDConnected_ = 0;
64  const int siStripFedIdMin = FEDNumbering::MINSiStripFEDID;
65  const int siStripFedIdMax = FEDNumbering::MAXSiStripFEDID;
66 
67  if(auto runInfoRec = eSetup.tryToGet<RunInfoRcd>()) {
68 
70  runInfoRec->get(sumFED);
71 
72  if ( sumFED.isValid() ) {
73  std::vector<int> FedsInIds= sumFED->m_fed_in;
74  for(unsigned int it = 0; it < FedsInIds.size(); ++it) {
75  int fedID = FedsInIds[it];
76  if(fedID>=siStripFedIdMin && fedID<=siStripFedIdMax) ++nFEDConnected_;
77  }
78  LogDebug ("SiStripDcsInfo") << " SiStripDcsInfo :: Connected FEDs " << nFEDConnected_;
79  }
80  }
81 
84 
85 }
#define LogDebug(id)
std::vector< int > m_fed_in
Definition: RunInfo.h:26
edm::ESHandle< SiStripDetCabling > detCabling_
bool isValid() const
Definition: ESHandle.h:45
void SiStripCertificationInfo::bookSiStripCertificationMEs ( )
private

Definition at line 89 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, AlCaHLTBitMon_QueryRunRegistry::string, SiStripCertificationInfo::SubDetMEs::subdet_tag, SubDetMEsMap, and GlobalPosition_Frontier_DevDB_cff::tag.

Referenced by beginRun(), and resetSiStripCertificationMEs().

89  {
91  dqmStore_->cd();
92  std::string strip_dir = "";
93  SiStripUtility::getTopFolderPath(dqmStore_, "SiStrip", strip_dir);
94  if (!strip_dir.empty()) dqmStore_->setCurrentFolder(strip_dir+"/EventInfo");
95  else dqmStore_->setCurrentFolder("SiStrip/EventInfo");
96 
97  SiStripCertification = dqmStore_->bookFloat("CertificationSummary");
98 
99  std::string hname = "CertificationReportMap";
100  std::string htitle = "SiStrip Certification for Good Detector Fraction";
101  SiStripCertificationSummaryMap = dqmStore_->book2D(hname, htitle, 6,0.5,6.5,9,0.5,9.5);
102  SiStripCertificationSummaryMap->setAxisTitle("Sub Detector Type", 1);
103  SiStripCertificationSummaryMap->setAxisTitle("Layer/Disc Number", 2);
104  int ibin = 0;
105  for (std::map<std::string, SubDetMEs>::const_iterator it = SubDetMEsMap.begin();
106  it != SubDetMEsMap.end(); it++) {
107  ibin++;
108  std::string det = it->first;
110  }
111 
112  SubDetMEs local_mes;
114  dqmStore_->cd();
115  if (!strip_dir.empty()) dqmStore_->setCurrentFolder(strip_dir+"/EventInfo/CertificationContents");
116  else dqmStore_->setCurrentFolder("SiStrip/EventInfo/CertificationContents");
117  tag = "TIB";
118 
119  local_mes.folder_name = "TIB";
120  local_mes.subdet_tag = "TIB";
121  local_mes.n_layer = 4;
122  local_mes.det_fractionME = dqmStore_->bookFloat("SiStrip_"+tag);
123  SubDetMEsMap.insert(std::pair<std::string, SubDetMEs >(tag, local_mes));
124 
125  tag = "TOB";
126  local_mes.folder_name = "TOB";
127  local_mes.subdet_tag = "TOB";
128  local_mes.n_layer = 6;
129  local_mes.det_fractionME = dqmStore_->bookFloat("SiStrip_"+tag);
130  SubDetMEsMap.insert(std::pair<std::string, SubDetMEs >(tag, local_mes));
131 
132  tag = "TECF";
133  local_mes.folder_name = "TEC/PLUS";
134  local_mes.subdet_tag = "TEC+";
135  local_mes.n_layer = 9;
136  local_mes.det_fractionME = dqmStore_->bookFloat("SiStrip_"+tag);
137  SubDetMEsMap.insert(std::pair<std::string, SubDetMEs >(tag, local_mes));
138 
139  tag = "TECB";
140  local_mes.folder_name = "TEC/MINUS";
141  local_mes.subdet_tag = "TEC-";
142  local_mes.n_layer = 9;
143  local_mes.det_fractionME = dqmStore_->bookFloat("SiStrip_"+tag);
144  SubDetMEsMap.insert(std::pair<std::string, SubDetMEs >(tag, local_mes));
145 
146  tag = "TIDF";
147  local_mes.folder_name = "TID/PLUS";
148  local_mes.subdet_tag = "TID+";
149  local_mes.n_layer = 3;
150  local_mes.det_fractionME = dqmStore_->bookFloat("SiStrip_"+tag);
151  SubDetMEsMap.insert(std::pair<std::string, SubDetMEs >(tag, local_mes));
152 
153  tag = "TIDB";
154  local_mes.folder_name = "TID/MINUS";
155  local_mes.subdet_tag = "TID-";
156  local_mes.n_layer = 3;
157  local_mes.det_fractionME = dqmStore_->bookFloat("SiStrip_"+tag);
158  SubDetMEsMap.insert(std::pair<std::string, SubDetMEs >(tag, local_mes));
159 
160  dqmStore_->cd();
161  if (!strip_dir.empty()) dqmStore_->setCurrentFolder(strip_dir+"/EventInfo");
162 
164  dqmStore_->cd();
165  }
166 }
MonitorElement * book2D(char_string const &name, char_string const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:1161
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(char_string const &name)
Book float.
Definition: DQMStore.cc:1036
std::map< std::string, SubDetMEs > SubDetMEsMap
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:565
void cd()
go to top directory (ie. root)
Definition: DQMStore.cc:540
MonitorElement * SiStripCertificationSummaryMap
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
static void getTopFolderPath(DQMStore *dqm_store, std::string top_dir, std::string &path)
void SiStripCertificationInfo::endLuminosityBlock ( edm::LuminosityBlock const &  lumiSeg,
edm::EventSetup const &  iSetup 
)
overrideprivatevirtual

End Of Luminosity.

Reimplemented from edm::EDAnalyzer.

Definition at line 175 of file SiStripCertificationInfo.cc.

References fillSiStripCertificationMEsAtLumi(), and nFEDConnected_.

175  {
176  edm::LogInfo( "SiStripDaqInfo") << "SiStripDaqInfo::endLuminosityBlock";
177 
178  if (nFEDConnected_ > 0) {
180  }
181 }
void SiStripCertificationInfo::endRun ( edm::Run const &  run,
edm::EventSetup const &  eSetup 
)
overrideprivatevirtual

EndRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 186 of file SiStripCertificationInfo.cc.

References fillSiStripCertificationMEs(), and nFEDConnected_.

186  {
187  edm::LogInfo ("SiStripCertificationInfo") <<"SiStripCertificationInfo:: End Run";
188 
189  if (nFEDConnected_ > 0) {
191  }
192 }
void fillSiStripCertificationMEs(edm::EventSetup const &eSetup)
void SiStripCertificationInfo::fillDummySiStripCertification ( )
private

Definition at line 292 of file SiStripCertificationInfo.cc.

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

Referenced by beginRun().

292  {
295  SiStripCertification->Fill(-1.0);
296  for (std::map<std::string, SubDetMEs>::iterator it = SubDetMEsMap.begin();
297  it != SubDetMEsMap.end(); it++) {
298  it->second.det_fractionME->Reset();
299  it->second.det_fractionME->Fill(-1.0);
300  }
301 
302  for (int xbin = 1; xbin < SiStripCertificationSummaryMap->getNbinsX()+1; xbin++) {
303  for (int ybin = 1; ybin < SiStripCertificationSummaryMap->getNbinsY()+1; ybin++) {
304  SiStripCertificationSummaryMap->Fill(xbin, ybin, -1.0);
305  }
306  }
307  }
308 }
void Fill(long long x)
std::map< std::string, SubDetMEs > SubDetMEsMap
int getNbinsY() const
get # of bins in Y-axis
MonitorElement * SiStripCertificationSummaryMap
int getNbinsX() const
get # of bins in X-axis
void SiStripCertificationInfo::fillSiStripCertificationMEs ( edm::EventSetup const &  eSetup)
private

Definition at line 196 of file SiStripCertificationInfo.cc.

References funct::abs(), DQMStore::cd(), SiStripDetCabling::connectedNumber(), detCabling_, MonitorElement::DQM_KIND_INT, MonitorElement::DQM_KIND_REAL, dqmStore_, MonitorElement::Fill(), edm::EventSetup::get(), DQMStore::get(), DQMStore::getContents(), MonitorElement::getFloatValue(), MonitorElement::getNbinsY(), SiStripFolderOrganizer::GetSubDetAndLayer(), SiStripUtility::goToDir(), gen::k, MonitorElement::kind(), dataset::name, edm::ESHandle< T >::product(), DQMStore::pwd(), MonitorElement::Reset(), resetSiStripCertificationMEs(), SiStripCertification, sistripCertificationBooked_, SiStripCertificationSummaryMap, AlCaHLTBitMon_QueryRunRegistry::string, SubDetMEsMap, and GlobalPosition_Frontier_DevDB_cff::tag.

Referenced by endRun().

196  {
198  edm::LogError("SiStripCertificationInfo") << " SiStripCertificationInfo::fillSiStripCertificationMEs : MEs missing ";
199  return;
200  }
201 
202  //Retrieve tracker topology from geometry
203  edm::ESHandle<TrackerTopology> tTopoHandle;
204  eSetup.get<TrackerTopologyRcd>().get(tTopoHandle);
205  const TrackerTopology* const tTopo = tTopoHandle.product();
206 
208  std::string mdir = "MechanicalView";
209  dqmStore_->cd();
210  if (!SiStripUtility::goToDir(dqmStore_, mdir)) return;
211  std::string mechanical_dir = dqmStore_->pwd();
212  uint16_t nDetTot = 0;
213  uint16_t nFaultyTot = 0;
214  uint16_t nSToNTot = 0;
215  float sToNTot = 0.0;
216  SiStripFolderOrganizer folder_organizer;
217  int xbin = 0;
218  for (std::map<std::string, SubDetMEs>::iterator it = SubDetMEsMap.begin();
219  it != SubDetMEsMap.end(); it++) {
220  xbin++;
221  std::string name = it->first;
222  std::string tag = it->second.subdet_tag;
223  MonitorElement* me = it->second.det_fractionME;
224  if (!me) continue;
225  std::string bad_module_folder = mechanical_dir+"/"+it->second.folder_name+"/"+"BadModuleList";
226  std::vector<MonitorElement *> faulty_detMEs = dqmStore_->getContents(bad_module_folder);
227 
228  uint16_t ndet_subdet = 0;
229  uint16_t nfaulty_subdet = 0;
230  int nlayer = it->second.n_layer;
231  int ybin = 0;
232  for (int ilayer = 0; ilayer < nlayer; ilayer++) {
233  uint16_t ndet_layer = detCabling_->connectedNumber(tag, ilayer+1);
234  ndet_subdet += ndet_layer;
235  ybin++;
236  uint16_t nfaulty_layer = 0;
237  for (std::vector<MonitorElement *>::iterator im = faulty_detMEs.begin(); im != faulty_detMEs.end(); im++) {
238  if ((*im)->kind() != MonitorElement::DQM_KIND_INT ) continue;
239  if ((*im)->getIntValue() == 0) continue;
240  uint32_t detId = atoi((*im)->getName().c_str());
241  std::pair<std::string,int32_t> det_layer_pair = folder_organizer.GetSubDetAndLayer(detId, tTopo, false);
242  if (abs(det_layer_pair.second) == ilayer+1) nfaulty_layer++;
243  }
244 
245  nfaulty_subdet += nfaulty_layer;
246  float fraction_layer = -1.0;
247  if ( ndet_layer > 0) fraction_layer = 1 - ((nfaulty_layer*1.0)/ndet_layer);
248  if (SiStripCertificationSummaryMap) SiStripCertificationSummaryMap->Fill(xbin, ilayer+1,fraction_layer);
249  }
250  if (ybin <= SiStripCertificationSummaryMap->getNbinsY()) {
251  for (int k = ybin+1; k <= SiStripCertificationSummaryMap->getNbinsY(); k++) SiStripCertificationSummaryMap->Fill(xbin, k, -1.0);
252  }
253  float fraction_subdet = -1.0;
254  if (ndet_subdet > 0) fraction_subdet = 1 - ((nfaulty_subdet*1.0)/ndet_subdet);
255  // Check S/N status flag and use the minimum between the two
256  std::string full_path = mechanical_dir.substr(0, mechanical_dir.find_last_of("/"))
257  + "/EventInfo/reportSummaryContents/SiStrip_SToNFlag_"+name;
258  MonitorElement* me_ston = dqmStore_->get(full_path);
259  me->Reset();
260  if (me_ston && me_ston->kind()==MonitorElement::DQM_KIND_REAL) {
261  float ston_flg = me_ston->getFloatValue();
262  sToNTot += ston_flg;
263  nSToNTot++;
264  me->Fill(fminf(fraction_subdet,ston_flg));
265  } else me->Fill(fraction_subdet);
266  nDetTot += ndet_subdet ;
267  nFaultyTot += nfaulty_subdet;
268  }
269  float fraction_global = -1.0;
270  if (nDetTot > 0) fraction_global = 1.0 - ((nFaultyTot*1.0)/nDetTot);
271  float ston_frac_global = 1.0;
272  if (nSToNTot > 0) ston_frac_global = sToNTot/nSToNTot;
273  SiStripCertification->Fill(fminf(fraction_global,ston_frac_global));
274 }
std::vector< MonitorElement * > getContents(std::string const &path) const
Definition: DQMStore.cc:1628
double getFloatValue() const
uint32_t connectedNumber(const std::string &subDet, const uint16_t layer) const
void Fill(long long x)
std::map< std::string, SubDetMEs > SubDetMEsMap
MonitorElement * get(std::string const &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
Definition: DQMStore.cc:1601
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
void Reset()
reset ME (ie. contents, errors, etc)
std::string const & pwd() const
Definition: DQMStore.cc:533
int k[5][pyjets_maxn]
void cd()
go to top directory (ie. root)
Definition: DQMStore.cc:540
int getNbinsY() const
get # of bins in Y-axis
std::pair< std::string, int32_t > GetSubDetAndLayer(const uint32_t &detid, const TrackerTopology *tTopo, bool ring_flag=false)
MonitorElement * SiStripCertificationSummaryMap
edm::ESHandle< SiStripDetCabling > detCabling_
static bool goToDir(DQMStore *dqm_store, std::string name)
T const * product() const
Definition: ESHandle.h:84
Kind kind() const
Get the type of the monitor element.
void SiStripCertificationInfo::fillSiStripCertificationMEsAtLumi ( )
private

Definition at line 312 of file SiStripCertificationInfo.cc.

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

Referenced by endLuminosityBlock().

312  {
314  edm::LogError("SiStripCertificationInfo") << " SiStripCertificationInfo::fillSiStripCertificationMEsAtLumi : MEs missing ";
315  return;
316  }
318  dqmStore_->cd();
319  std::string strip_dir = "";
320  SiStripUtility::getTopFolderPath(dqmStore_, "SiStrip", strip_dir);
321  if (strip_dir.empty()) strip_dir = "SiStrip";
322 
323  std::string full_path;
324  float dcs_flag = 1.0;
325  float dqm_flag = 1.0;
326  for (std::map<std::string, SubDetMEs>::iterator it = SubDetMEsMap.begin();
327  it != SubDetMEsMap.end(); it++) {
328  std::string type = it->first;
329  full_path = strip_dir + "/EventInfo/DCSContents/SiStrip_" + type;
330  MonitorElement* me_dcs = dqmStore_->get(full_path);
331  if (me_dcs && me_dcs->kind() == MonitorElement::DQM_KIND_REAL) dcs_flag = me_dcs->getFloatValue();
332  full_path = strip_dir + "/EventInfo/reportSummaryContents/SiStrip_" + type;
333  MonitorElement* me_dqm = dqmStore_->get(full_path);
334  if (me_dqm && me_dqm->kind() == MonitorElement::DQM_KIND_REAL) dqm_flag = me_dqm->getFloatValue();
335  it->second.det_fractionME->Reset();
336  it->second.det_fractionME->Fill(fminf(dqm_flag,dcs_flag));
337  }
338  dcs_flag = 1.0;
339  dqm_flag = 1.0;
340  full_path = strip_dir + "/EventInfo/reportSummary";
341  MonitorElement* me_dqm = dqmStore_->get(full_path);
342  if (me_dqm && me_dqm->kind() == MonitorElement::DQM_KIND_REAL) dqm_flag = me_dqm->getFloatValue();
343  full_path = strip_dir + "/EventInfo/DCSSummary";
344  MonitorElement* me_dcs = dqmStore_->get(full_path);
345  if (me_dcs && me_dcs->kind() == MonitorElement::DQM_KIND_REAL) dcs_flag = me_dcs->getFloatValue();
347  SiStripCertification->Fill(fminf(dqm_flag,dcs_flag));
348 }
type
Definition: HCALResponse.h:21
double getFloatValue() const
void Fill(long long x)
std::map< std::string, SubDetMEs > SubDetMEsMap
MonitorElement * get(std::string const &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
Definition: DQMStore.cc:1601
void Reset()
reset ME (ie. contents, errors, etc)
void cd()
go to top directory (ie. root)
Definition: DQMStore.cc:540
Kind kind() const
Get the type of the monitor element.
static void getTopFolderPath(DQMStore *dqm_store, std::string top_dir, std::string &path)
void SiStripCertificationInfo::resetSiStripCertificationMEs ( )
private

Definition at line 278 of file SiStripCertificationInfo.cc.

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

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

278  {
282  for (std::map<std::string, SubDetMEs>::iterator it = SubDetMEsMap.begin();
283  it != SubDetMEsMap.end(); it++) {
284  it->second.det_fractionME->Reset();
285  }
287  }
288 }
std::map< std::string, SubDetMEs > SubDetMEsMap
void Reset()
reset ME (ie. contents, errors, etc)
MonitorElement * SiStripCertificationSummaryMap

Member Data Documentation

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

Definition at line 98 of file SiStripCertificationInfo.h.

Referenced by beginRun(), and fillSiStripCertificationMEs().

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

Definition at line 96 of file SiStripCertificationInfo.h.

Referenced by beginRun().

int SiStripCertificationInfo::nFEDConnected_
private

Definition at line 100 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 91 of file SiStripCertificationInfo.h.

MonitorElement* SiStripCertificationInfo::SiStripCertificationSummaryMap
private
std::map<std::string, SubDetMEs> SiStripCertificationInfo::SubDetMEsMap
private