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();
179 std::string strip_dir =
"";
194 me_name =
"SiStrip_" + it->first;
209 LogDebug(
"SiStripDcsInfo") <<
"SiStripDcsInfo::readCabling : "
210 <<
" Change in Cache";
213 std::vector<uint32_t> SelectedDetIds;
214 detCabling_->addActiveDetectorsRawIds(SelectedDetIds);
215 LogDebug(
"SiStripDcsInfo") <<
" SiStripDcsInfo::readCabling : "
216 <<
" Total Detectors " << SelectedDetIds.size();
221 it->second.TotalDetectors = 0;
224 for (std::vector<uint32_t>::const_iterator idetid=SelectedDetIds.begin(); idetid != SelectedDetIds.end(); ++idetid){
225 uint32_t detId = *idetid;
226 if (detId == 0 || detId == 0xFFFFFFFF)
continue;
230 std::map<std::string, SubDetMEs>::iterator iPos =
SubDetMEsMap.find(subdet_tag);
232 iPos->second.TotalDetectors++;
243 std::vector <uint32_t> FaultyDetIds;
245 LogDebug(
"SiStripDcsInfo") <<
" SiStripDcsInfo::readStatus : "
246 <<
" Faulty Detectors " << FaultyDetIds.size();
248 for (std::vector<uint32_t>::const_iterator ihvoff=FaultyDetIds.begin(); ihvoff!=FaultyDetIds.end();++ihvoff){
249 uint32_t detId_hvoff = (*ihvoff);
250 if (!
detCabling_->IsConnected(detId_hvoff))
continue;
254 std::map<std::string, SubDetMEs>::iterator iPos =
SubDetMEsMap.find(subdet_tag);
256 std::vector<uint32_t>::iterator ibad =
std::find(iPos->second.FaultyDetectors.begin(), iPos->second.FaultyDetectors.end(), detId_hvoff);
257 if (ibad == iPos->second.FaultyDetectors.end()) iPos->second.FaultyDetectors.push_back( detId_hvoff);
267 float total_det = 0.0;
268 float faulty_det = 0.0;
271 int total_subdet = it->second.TotalDetectors;
272 int faulty_subdet = it->second.FaultyDetectors.size();
274 else fraction = 1.0 - faulty_subdet*1.0/total_subdet;
275 it->second.DcsFractionME->Reset();
276 it->second.DcsFractionME->Fill(fraction);
277 edm::LogInfo(
"SiStripDcsInfo") <<
" SiStripDcsInfo::fillStatus : Sub Detector "
278 << it->first <<
" Total Number " << total_subdet
279 <<
" Faulty ones " << faulty_subdet;
280 total_det += total_subdet;
281 faulty_det += faulty_subdet;
284 else fraction = 1 - faulty_det/total_det;
296 it->second.DcsFractionME->Reset();
297 it->second.DcsFractionME->Fill(-1.0);
309 std::string mdir =
"MechanicalView";
314 std::string
tag =
"DCSError";
317 std::vector<uint32_t> badModules = it->second.FaultyDetectors;
318 for (std::vector<uint32_t>::iterator ibad = badModules.begin();
319 ibad != badModules.end(); ibad++) {
321 std::string bad_module_folder = mechanical_dir +
"/" +
322 it->second.folder_name +
"/"
326 std::ostringstream detid_str;
327 detid_str << (*ibad);
328 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.
static void getSubDetectorTag(uint32_t det_id, std::string &subdet_tag)
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
MonitorElement * DcsFraction_
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)