34 edm::LogInfo(
"SiStripDaqInfo") <<
"SiStripDaqInfo::Deleting SiStripDaqInfo ";
42 edm::LogInfo(
"SiStripDaqInfo") <<
"SiStripDaqInfo::Deleting SiStripDaqInfo ";
58 std::string strip_dir =
"";
70 std::vector<std::string> det_type;
71 det_type.push_back(
"TIB");
72 det_type.push_back(
"TOB");
73 det_type.push_back(
"TIDF");
74 det_type.push_back(
"TIDB");
75 det_type.push_back(
"TECF");
76 det_type.push_back(
"TECB");
78 for ( std::vector<std::string>::iterator it = det_type.begin(); it != det_type.end(); it++) {
79 std::string det = (*it);
83 me_name =
"SiStrip_" + det;
99 it->second.DaqFractionME->Reset();
100 it->second.DaqFractionME->Fill(-1.0);
110 edm::LogInfo (
"SiStripDaqInfo") <<
"SiStripDaqInfo:: Begining of Run";
124 edm::LogInfo (
"SiStripDaqInfo") <<
" SiStripDaqInfo::No FEDs Connected!!!";
128 float nFEDConnected = 0.0;
133 if( eSetup.
find( recordKey ) != 0) {
139 std::vector<int> FedsInIds= sumFED->m_fed_in;
140 for(
unsigned int it = 0; it < FedsInIds.size(); ++it) {
141 int fedID = FedsInIds[it];
143 if(fedID>=siStripFedIdMin && fedID<=siStripFedIdMax) ++nFEDConnected;
146 <<
" Connected FEDs " << nFEDConnected;
147 if (nFEDConnected > 0) {
165 edm::LogInfo(
"SiStripDaqInfo") <<
"SiStripDaqInfo::endLuminosityBlock";
171 edm::LogInfo (
"SiStripDaqInfo") <<
"SiStripDaqInfo::EndRun";
177 const std::vector<uint16_t>& feds =
fedCabling_->feds();
180 for(std::vector<unsigned short>::const_iterator ifed = feds.begin(); ifed != feds.end(); ifed++){
181 const std::vector<FedChannelConnection> fedChannels =
fedCabling_->connections( *ifed );
182 for (std::vector<FedChannelConnection>::const_iterator iconn = fedChannels.begin(); iconn < fedChannels.end(); iconn++){
183 if (!iconn->isConnected())
continue;
184 uint32_t detId = iconn->detId();
185 if (detId == 0 || detId == 0xFFFFFFFF)
continue;
202 for (
std::map<std::string, std::vector<unsigned short> >::const_iterator it =
subDetFedMap.begin();
204 std::string
name = it->first;
205 std::map<std::string, SubDetMEs>::iterator iPos =
SubDetMEsMap.find(name);
207 iPos->second.ConnectedFeds = 0;
212 for (
std::map<std::string, std::vector<unsigned short> >::const_iterator it =
subDetFedMap.begin();
214 std::string
name = it->first;
215 std::vector<unsigned short> subdetIds = it->second;
216 std::map<std::string, SubDetMEs>::iterator iPos =
SubDetMEsMap.find(name);
218 iPos->second.ConnectedFeds = 0;
219 for (std::vector<unsigned short>::iterator iv = subdetIds.begin();
220 iv != subdetIds.end(); iv++) {
221 bool fedid_found =
false;
222 for(
unsigned int it = 0; it < fed_ids.size(); ++it) {
223 unsigned short fedID = fed_ids[it];
224 if(fedID < siStripFedIdMin || fedID > siStripFedIdMax)
continue;
225 if ((*iv) == fedID) {
227 iPos->second.ConnectedFeds++;
233 int nFedsConnected = iPos->second.ConnectedFeds;
234 int nFedSubDet = subdetIds.size();
235 if (nFedSubDet > 0) {
236 iPos->second.DaqFractionME->Reset();
237 iPos->second.DaqFractionME->Fill(nFedsConnected*1.0/nFedSubDet);
246 std::string mdir =
"MechanicalView";
251 const std::vector<FedChannelConnection> fedChannels =
fedCabling_->connections(fed_id);
253 std::string
tag =
"ExcludedFedChannel";
254 std::string bad_module_folder;
255 for (std::vector<FedChannelConnection>::const_iterator iconn = fedChannels.begin();
256 iconn < fedChannels.end(); iconn++){
257 if (!iconn->isConnected())
continue;
258 uint32_t detId = iconn->detId();
259 if (detId == 0 || detId == 0xFFFFFFFF)
continue;
263 std::string subdet_folder ;
267 subdet_folder = mechanical_dir + subdet_folder.substr(subdet_folder.find(mdir)+mdir.size());
269 bad_module_folder = subdet_folder +
"/" +
"BadModuleList";
272 std::ostringstream detid_str;
274 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, std::string &folder_name)
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 readFedIds(const edm::ESHandle< SiStripFedCabling > &fedcabling)
void endRun(edm::Run const &run, edm::EventSetup const &eSetup)
EndRun.
virtual ~SiStripDaqInfo()
Destructor.
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
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
void readSubdetFedFractions(std::vector< int > &fed_ids)
std::map< std::string, std::vector< unsigned short > > subDetFedMap
int64_t getIntValue(void) const
MonitorElement * DaqFractionME
void beginRun(edm::Run const &run, edm::EventSetup const &eSetup)
Begin Run.
void findExcludedModule(unsigned short fed_id)
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)
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)