40 LogDebug(
"SiStripDcsInfo") <<
"SiStripDcsInfo::Deleting SiStripDcsInfo ";
46 LogDebug(
"SiStripDcsInfo") <<
"SiStripDcsInfo::Deleting SiStripDcsInfo ";
61 SubDetMEsMap.insert(std::pair<std::string, SubDetMEs >(tag, local_mes));
68 SubDetMEsMap.insert(std::pair<std::string, SubDetMEs >(tag, local_mes));
75 SubDetMEsMap.insert(std::pair<std::string, SubDetMEs >(tag, local_mes));
82 SubDetMEsMap.insert(std::pair<std::string, SubDetMEs >(tag, local_mes));
89 SubDetMEsMap.insert(std::pair<std::string, SubDetMEs >(tag, local_mes));
96 SubDetMEsMap.insert(std::pair<std::string, SubDetMEs >(tag, local_mes));
102 LogDebug (
"SiStripDcsInfo") <<
"SiStripDcsInfo:: Begining of Run";
109 if( eSetup.
find( recordKey ) != 0) {
115 std::vector<int> FedsInIds= sumFED->m_fed_in;
116 for(
unsigned int it = 0; it < FedsInIds.size(); ++it) {
117 int fedID = FedsInIds[it];
118 if(fedID>=siStripFedIdMin && fedID<=siStripFedIdMax) ++
nFEDConnected_;
137 LogDebug(
"SiStripDcsInfo") <<
"SiStripDcsInfo::beginLuminosityBlock";
143 it->second.FaultyDetectors.clear();
153 LogDebug(
"SiStripDcsInfo") <<
"SiStripDcsInfo::endLuminosityBlock";
163 LogDebug (
"SiStripDcsInfo") <<
"SiStripDcsInfo::EndRun";
168 it->second.FaultyDetectors.clear();
194 me_name =
"SiStrip_" + it->first;
215 LogDebug(
"SiStripDcsInfo") <<
"SiStripDcsInfo::readCabling : "
216 <<
" Change in Cache";
219 std::vector<uint32_t> SelectedDetIds;
220 detCabling_->addActiveDetectorsRawIds(SelectedDetIds);
221 LogDebug(
"SiStripDcsInfo") <<
" SiStripDcsInfo::readCabling : "
222 <<
" Total Detectors " << SelectedDetIds.size();
227 it->second.TotalDetectors = 0;
230 for (std::vector<uint32_t>::const_iterator idetid=SelectedDetIds.begin(); idetid != SelectedDetIds.end(); ++idetid){
231 uint32_t detId = *idetid;
232 if (detId == 0 || detId == 0xFFFFFFFF)
continue;
236 std::map<std::string, SubDetMEs>::iterator iPos =
SubDetMEsMap.find(subdet_tag);
238 iPos->second.TotalDetectors++;
254 std::vector <uint32_t> FaultyDetIds;
256 LogDebug(
"SiStripDcsInfo") <<
" SiStripDcsInfo::readStatus : "
257 <<
" Faulty Detectors " << FaultyDetIds.size();
259 for (std::vector<uint32_t>::const_iterator ihvoff=FaultyDetIds.begin(); ihvoff!=FaultyDetIds.end();++ihvoff){
260 uint32_t detId_hvoff = (*ihvoff);
261 if (!
detCabling_->IsConnected(detId_hvoff))
continue;
265 std::map<std::string, SubDetMEs>::iterator iPos =
SubDetMEsMap.find(subdet_tag);
267 std::vector<uint32_t>::iterator ibad =
std::find(iPos->second.FaultyDetectors.begin(), iPos->second.FaultyDetectors.end(), detId_hvoff);
268 if (ibad == iPos->second.FaultyDetectors.end()) iPos->second.FaultyDetectors.push_back( detId_hvoff);
278 float total_det = 0.0;
279 float faulty_det = 0.0;
282 int total_subdet = it->second.TotalDetectors;
283 int faulty_subdet = it->second.FaultyDetectors.size();
285 else fraction = 1.0 - faulty_subdet*1.0/total_subdet;
286 it->second.DcsFractionME->Reset();
287 it->second.DcsFractionME->Fill(fraction);
288 edm::LogInfo(
"SiStripDcsInfo") <<
" SiStripDcsInfo::fillStatus : Sub Detector "
289 << it->first <<
" Total Number " << total_subdet
290 <<
" Faulty ones " << faulty_subdet;
291 total_det += total_subdet;
292 faulty_det += faulty_subdet;
295 else fraction = 1 - faulty_det/total_det;
307 it->second.DcsFractionME->Reset();
308 it->second.DcsFractionME->Fill(-1.0);
328 std::vector<uint32_t> badModules = it->second.FaultyDetectors;
329 for (std::vector<uint32_t>::iterator ibad = badModules.begin();
330 ibad != badModules.end(); ibad++) {
332 std::string bad_module_folder = mechanical_dir +
"/" +
333 it->second.folder_name +
"/"
337 std::ostringstream detid_str;
338 detid_str << (*ibad);
339 std::string full_path = bad_module_folder +
"/" + detid_str.str();
static void setBadModuleFlag(std::string &hname, uint16_t &flg)
void beginLuminosityBlock(edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &eSetup)
Begin Luminosity Block.
void beginRun(edm::Run const &run, edm::EventSetup const &eSetup)
Begin Run.
SiStripDcsInfo(const edm::ParameterSet &ps)
Constructor.
void cd(void)
go to top directory (ie. root)
#define DEFINE_FWK_MODULE(type)
void endLuminosityBlock(edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &iSetup)
End Of Luminosity.
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
void analyze(edm::Event const &, edm::EventSetup const &)
Analyze.
MonitorElement * bookFloat(const char *name)
Book float.
const eventsetup::EventSetupRecord * find(const eventsetup::EventSetupRecordKey &) const
std::map< std::string, SubDetMEs > SubDetMEsMap
virtual ~SiStripDcsInfo()
Destructor.
const std::string subdet_tag("SubDet")
void endRun(edm::Run const &run, edm::EventSetup const &eSetup)
EndRun.
MonitorElement * DcsFractionME
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
edm::ESHandle< SiStripDetVOff > siStripDetVOff_
void readCabling(edm::EventSetup const &)
int64_t getIntValue(void) const
T const * product() const
MonitorElement * DcsFraction_
static void getSubDetectorTag(uint32_t det_id, std::string &subdet_tag, const TrackerTopology *tTopo)
edm::ESHandle< SiStripDetCabling > detCabling_
unsigned long long m_cacheIDCabling_
std::vector< uint32_t > FaultyDetectors
void setLumiFlag(void)
this ME is meant to be stored for each luminosity section
MonitorElement * bookInt(const char *name)
Book int.
void Reset(void)
reset ME (ie. contents, errors, etc)
void readStatus(edm::EventSetup const &)
static bool goToDir(DQMStore *dqm_store, std::string name)
void setCurrentFolder(const std::string &fullpath)
static HCTypeTag findType(char const *iTypeName)
find a type based on the types name, if not found will return default HCTypeTag
const std::string & pwd(void) const
static void getTopFolderPath(DQMStore *dqm_store, std::string type, std::string &path)