41 LogDebug(
"SiStripDcsInfo") <<
"SiStripDcsInfo::Deleting SiStripDcsInfo ";
47 LogDebug(
"SiStripDcsInfo") <<
"SiStripDcsInfo::Deleting SiStripDcsInfo ";
62 SubDetMEsMap.insert(std::pair<std::string, SubDetMEs >(tag, local_mes));
69 SubDetMEsMap.insert(std::pair<std::string, SubDetMEs >(tag, local_mes));
76 SubDetMEsMap.insert(std::pair<std::string, SubDetMEs >(tag, local_mes));
83 SubDetMEsMap.insert(std::pair<std::string, SubDetMEs >(tag, local_mes));
90 SubDetMEsMap.insert(std::pair<std::string, SubDetMEs >(tag, local_mes));
97 SubDetMEsMap.insert(std::pair<std::string, SubDetMEs >(tag, local_mes));
103 LogDebug (
"SiStripDcsInfo") <<
"SiStripDcsInfo:: Begining of Run";
110 if( eSetup.
find( recordKey ) != 0) {
116 std::vector<int> FedsInIds= sumFED->m_fed_in;
117 for(
unsigned int it = 0; it < FedsInIds.size(); ++it) {
118 int fedID = FedsInIds[it];
119 if(fedID>=siStripFedIdMin && fedID<=siStripFedIdMax) ++
nFEDConnected_;
138 LogDebug(
"SiStripDcsInfo") <<
"SiStripDcsInfo::beginLuminosityBlock";
144 it->second.FaultyDetectors.clear();
154 LogDebug(
"SiStripDcsInfo") <<
"SiStripDcsInfo::endLuminosityBlock";
164 LogDebug (
"SiStripDcsInfo") <<
"SiStripDcsInfo::EndRun";
169 it->second.FaultyDetectors.clear();
195 me_name =
"SiStrip_" + it->first;
216 LogDebug(
"SiStripDcsInfo") <<
"SiStripDcsInfo::readCabling : "
217 <<
" Change in Cache";
220 std::vector<uint32_t> SelectedDetIds;
221 detCabling_->addActiveDetectorsRawIds(SelectedDetIds);
222 LogDebug(
"SiStripDcsInfo") <<
" SiStripDcsInfo::readCabling : "
223 <<
" Total Detectors " << SelectedDetIds.size();
228 it->second.TotalDetectors = 0;
231 for (std::vector<uint32_t>::const_iterator idetid=SelectedDetIds.begin(); idetid != SelectedDetIds.end(); ++idetid){
232 uint32_t detId = *idetid;
233 if (detId == 0 || detId == 0xFFFFFFFF)
continue;
237 std::map<std::string, SubDetMEs>::iterator iPos =
SubDetMEsMap.find(subdet_tag);
239 iPos->second.TotalDetectors++;
255 std::vector <uint32_t> FaultyDetIds;
257 LogDebug(
"SiStripDcsInfo") <<
" SiStripDcsInfo::readStatus : "
258 <<
" Faulty Detectors " << FaultyDetIds.size();
260 for (std::vector<uint32_t>::const_iterator ihvoff=FaultyDetIds.begin(); ihvoff!=FaultyDetIds.end();++ihvoff){
261 uint32_t detId_hvoff = (*ihvoff);
262 if (!
detCabling_->IsConnected(detId_hvoff))
continue;
266 std::map<std::string, SubDetMEs>::iterator iPos =
SubDetMEsMap.find(subdet_tag);
268 std::vector<uint32_t>::iterator ibad =
std::find(iPos->second.FaultyDetectors.begin(), iPos->second.FaultyDetectors.end(), detId_hvoff);
269 if (ibad == iPos->second.FaultyDetectors.end()) iPos->second.FaultyDetectors.push_back( detId_hvoff);
279 float total_det = 0.0;
280 float faulty_det = 0.0;
283 int total_subdet = it->second.TotalDetectors;
284 int faulty_subdet = it->second.FaultyDetectors.size();
286 else fraction = 1.0 - faulty_subdet*1.0/total_subdet;
287 it->second.DcsFractionME->Reset();
288 it->second.DcsFractionME->Fill(fraction);
289 edm::LogInfo(
"SiStripDcsInfo") <<
" SiStripDcsInfo::fillStatus : Sub Detector "
290 << it->first <<
" Total Number " << total_subdet
291 <<
" Faulty ones " << faulty_subdet;
292 total_det += total_subdet;
293 faulty_det += faulty_subdet;
296 else fraction = 1 - faulty_det/total_det;
308 it->second.DcsFractionME->Reset();
309 it->second.DcsFractionME->Fill(-1.0);
329 std::vector<uint32_t> badModules = it->second.FaultyDetectors;
330 for (std::vector<uint32_t>::iterator ibad = badModules.begin();
331 ibad != badModules.end(); ibad++) {
333 std::string bad_module_folder = mechanical_dir +
"/" +
334 it->second.folder_name +
"/"
338 std::ostringstream detid_str;
339 detid_str << (*ibad);
340 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
volatile std::atomic< bool > shutdown_flag false
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)
static void getTopFolderPath(DQMStore *dqm_store, std::string top_dir, std::string &path)
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