36 edm::LogInfo(
"SiStripDaqInfo") <<
"SiStripDaqInfo::Deleting SiStripDaqInfo ";
44 edm::LogInfo(
"SiStripDaqInfo") <<
"SiStripDaqInfo::Deleting SiStripDaqInfo ";
72 std::vector<std::string> det_type;
73 det_type.push_back(
"TIB");
74 det_type.push_back(
"TOB");
75 det_type.push_back(
"TIDF");
76 det_type.push_back(
"TIDB");
77 det_type.push_back(
"TECF");
78 det_type.push_back(
"TECB");
80 for ( std::vector<std::string>::iterator it = det_type.begin(); it != det_type.end(); it++) {
85 me_name =
"SiStrip_" + det;
101 it->second.DaqFractionME->Reset();
102 it->second.DaqFractionME->Fill(-1.0);
112 edm::LogInfo (
"SiStripDaqInfo") <<
"SiStripDaqInfo:: Begining of Run";
126 edm::LogInfo (
"SiStripDaqInfo") <<
" SiStripDaqInfo::No FEDs Connected!!!";
130 float nFEDConnected = 0.0;
135 if( eSetup.
find( recordKey ) != 0) {
141 std::vector<int> FedsInIds= sumFED->m_fed_in;
142 for(
unsigned int it = 0; it < FedsInIds.size(); ++it) {
143 int fedID = FedsInIds[it];
145 if(fedID>=siStripFedIdMin && fedID<=siStripFedIdMax) ++nFEDConnected;
148 <<
" Connected FEDs " << nFEDConnected;
149 if (nFEDConnected > 0) {
167 edm::LogInfo(
"SiStripDaqInfo") <<
"SiStripDaqInfo::endLuminosityBlock";
173 edm::LogInfo (
"SiStripDaqInfo") <<
"SiStripDaqInfo::EndRun";
188 for(std::vector<unsigned short>::const_iterator ifed = feds.begin(); ifed != feds.end(); ifed++){
189 auto fedChannels =
fedCabling_->fedConnections( *ifed );
190 for (
auto iconn = fedChannels.begin(); iconn < fedChannels.end(); iconn++){
191 if (!iconn->isConnected())
continue;
192 uint32_t detId = iconn->detId();
193 if (detId == 0 || detId == 0xFFFFFFFF)
continue;
218 std::map<std::string, SubDetMEs>::iterator iPos =
SubDetMEsMap.find(name);
220 iPos->second.ConnectedFeds = 0;
228 std::vector<unsigned short> subdetIds = it->second;
229 std::map<std::string, SubDetMEs>::iterator iPos =
SubDetMEsMap.find(name);
231 iPos->second.ConnectedFeds = 0;
232 for (std::vector<unsigned short>::iterator iv = subdetIds.begin();
233 iv != subdetIds.end(); iv++) {
234 bool fedid_found =
false;
235 for(
unsigned int it = 0; it < fed_ids.size(); ++it) {
236 unsigned short fedID = fed_ids[it];
237 if(fedID < siStripFedIdMin || fedID > siStripFedIdMax)
continue;
238 if ((*iv) == fedID) {
240 iPos->second.ConnectedFeds++;
246 int nFedsConnected = iPos->second.ConnectedFeds;
247 int nFedSubDet = subdetIds.size();
248 if (nFedSubDet > 0) {
249 iPos->second.DaqFractionME->Reset();
250 iPos->second.DaqFractionME->Fill(nFedsConnected*1.0/nFedSubDet);
264 auto fedChannels =
fedCabling_->fedConnections(fed_id);
268 for (std::vector<FedChannelConnection>::const_iterator iconn = fedChannels.begin();
269 iconn < fedChannels.end(); iconn++){
270 if (!iconn->isConnected())
continue;
271 uint32_t detId = iconn->detId();
272 if (detId == 0 || detId == 0xFFFFFFFF)
continue;
280 subdet_folder = mechanical_dir + subdet_folder.substr(subdet_folder.find(mdir)+mdir.size());
282 bad_module_folder = subdet_folder +
"/" +
"BadModuleList";
285 std::ostringstream detid_str;
287 std::string full_path = bad_module_folder +
"/" + detid_str.str();
static void setBadModuleFlag(std::string &hname, uint16_t &flg)
void getSubDetFolder(const uint32_t &detid, const TrackerTopology *tTopo, std::string &folder_name)
void readFedIds(const edm::ESHandle< SiStripFedCabling > &fedcabling, edm::EventSetup const &iSetup)
void endLuminosityBlock(edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &iSetup)
End Of Luminosity.
void cd(void)
go to top directory (ie. root)
#define DEFINE_FWK_MODULE(type)
void endRun(edm::Run const &run, edm::EventSetup const &eSetup)
EndRun.
virtual ~SiStripDaqInfo()
Destructor.
void findExcludedModule(unsigned short fed_id, const TrackerTopology *tTopo)
MonitorElement * bookFloat(const char *name)
Book float.
const eventsetup::EventSetupRecord * find(const eventsetup::EventSetupRecordKey &) const
edm::ESHandle< SiStripFedCabling > fedCabling_
const std::string subdet_tag("SubDet")
SiStripDaqInfo(const edm::ParameterSet &ps)
Constructor.
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
void analyze(edm::Event const &, edm::EventSetup const &)
Analyze.
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
std::map< std::string, SubDetMEs > SubDetMEsMap
bool dirExists(const std::string &path) const
true if directory exists
std::map< std::string, std::vector< unsigned short > > subDetFedMap
int64_t getIntValue(void) const
MonitorElement * DaqFractionME
T const * product() const
void readSubdetFedFractions(std::vector< int > &fed_ids, edm::EventSetup const &iSetup)
void beginRun(edm::Run const &run, edm::EventSetup const &eSetup)
Begin Run.
static void getSubDetectorTag(uint32_t det_id, std::string &subdet_tag, const TrackerTopology *tTopo)
MonitorElement * DaqFraction_
MonitorElement * bookInt(const char *name)
Book int.
unsigned long long m_cacheID_
void Reset(void)
reset ME (ie. contents, errors, etc)
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