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";
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();
180 std::string strip_dir =
"";
195 me_name =
"SiStrip_" + it->first;
210 LogDebug(
"SiStripDcsInfo") <<
"SiStripDcsInfo::readCabling : "
211 <<
" Change in Cache";
214 std::vector<uint32_t> SelectedDetIds;
215 detCabling_->addActiveDetectorsRawIds(SelectedDetIds);
216 LogDebug(
"SiStripDcsInfo") <<
" SiStripDcsInfo::readCabling : "
217 <<
" Total Detectors " << SelectedDetIds.size();
222 it->second.TotalDetectors = 0;
225 for (std::vector<uint32_t>::const_iterator idetid=SelectedDetIds.begin(); idetid != SelectedDetIds.end(); ++idetid){
226 uint32_t detId = *idetid;
227 if (detId == 0 || detId == 0xFFFFFFFF)
continue;
231 std::map<std::string, SubDetMEs>::iterator iPos =
SubDetMEsMap.find(subdet_tag);
233 iPos->second.TotalDetectors++;
244 std::vector <uint32_t> FaultyDetIds;
246 LogDebug(
"SiStripDcsInfo") <<
" SiStripDcsInfo::readStatus : "
247 <<
" Faulty Detectors " << FaultyDetIds.size();
249 for (std::vector<uint32_t>::const_iterator ihvoff=FaultyDetIds.begin(); ihvoff!=FaultyDetIds.end();++ihvoff){
250 uint32_t detId_hvoff = (*ihvoff);
251 if (!
detCabling_->IsConnected(detId_hvoff))
continue;
255 std::map<std::string, SubDetMEs>::iterator iPos =
SubDetMEsMap.find(subdet_tag);
257 std::vector<uint32_t>::iterator ibad =
std::find(iPos->second.FaultyDetectors.begin(), iPos->second.FaultyDetectors.end(), detId_hvoff);
258 if (ibad == iPos->second.FaultyDetectors.end()) iPos->second.FaultyDetectors.push_back( detId_hvoff);
268 float total_det = 0.0;
269 float faulty_det = 0.0;
272 int total_subdet = it->second.TotalDetectors;
273 int faulty_subdet = it->second.FaultyDetectors.size();
275 else fraction = 1.0 - faulty_subdet*1.0/total_subdet;
276 it->second.DcsFractionME->Reset();
277 it->second.DcsFractionME->Fill(fraction);
278 edm::LogInfo(
"SiStripDcsInfo") <<
" SiStripDcsInfo::fillStatus : Sub Detector "
279 << it->first <<
" Total Number " << total_subdet
280 <<
" Faulty ones " << faulty_subdet;
281 total_det += total_subdet;
282 faulty_det += faulty_subdet;
285 else fraction = 1 - faulty_det/total_det;
297 it->second.DcsFractionME->Reset();
298 it->second.DcsFractionME->Fill(-1.0);
310 std::string mdir =
"MechanicalView";
315 std::string
tag =
"DCSError";
318 std::vector<uint32_t> badModules = it->second.FaultyDetectors;
319 for (std::vector<uint32_t>::iterator ibad = badModules.begin();
320 ibad != badModules.end(); ibad++) {
322 std::string bad_module_folder = mechanical_dir +
"/" +
323 it->second.folder_name +
"/"
327 std::ostringstream detid_str;
328 detid_str << (*ibad);
329 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)