|
|
Go to the documentation of this file.
27 : fedCablingToken_{esConsumes<edm::Transition::BeginRun>()},
28 tTopoToken_{esConsumes<edm::Transition::BeginRun>()},
29 runInfoToken_{esConsumes<edm::Transition::BeginRun>()} {
30 edm::LogInfo(
"SiStripDaqInfo") <<
"SiStripDaqInfo::Deleting SiStripDaqInfo ";
44 if (!strip_dir.empty())
52 if (!strip_dir.empty())
57 std::vector<std::string> det_types;
58 det_types.push_back(
"TIB");
59 det_types.push_back(
"TOB");
60 det_types.push_back(
"TIDF");
61 det_types.push_back(
"TIDB");
62 det_types.push_back(
"TECF");
63 det_types.push_back(
"TECB");
65 for (
auto const& det : det_types) {
83 pr.second.daqFractionME->Reset();
84 pr.second.daqFractionME->Fill(-1.0);
91 edm::LogInfo(
"SiStripDaqInfo") <<
"SiStripDaqInfo:: Begining of Run";
104 edm::LogInfo(
"SiStripDaqInfo") <<
" SiStripDaqInfo::No FEDs Connected!!!";
108 float nFEDConnected = 0.0;
118 auto const& fedsInIds = sumFED->m_fed_in;
119 for (
auto const fedID : fedsInIds) {
120 if (fedID >= siStripFedIdMin && fedID <= siStripFedIdMax)
125 if (nFEDConnected > 0) {
144 for (
auto const fed :
feds) {
146 for (
auto const&
conn : fedChannels) {
147 if (!
conn.isConnected())
149 uint32_t detId =
conn.detId();
150 if (detId == 0 || detId == 0xFFFFFFFF)
163 std::vector<int>
const& fed_ids,
173 auto const&
name =
pr.first;
177 iPos->second.connectedFeds = 0;
185 iPos->second.connectedFeds = 0;
186 for (
auto const subdetId : subdetIds) {
187 bool fedid_found =
false;
188 for (
auto const fedId : fed_ids) {
189 if (fedId < siStripFedIdMin || fedId > siStripFedIdMax)
191 if (subdetId ==
fedId) {
193 iPos->second.connectedFeds++;
200 if (
auto nFedSubDet = subdetIds.size(); nFedSubDet > 0) {
201 iPos->second.daqFractionME->Reset();
202 int const nFedsConnected = iPos->second.connectedFeds;
203 iPos->second.daqFractionME->Fill(nFedsConnected * 1.0 / nFedSubDet);
211 unsigned short const fed_id,
223 for (
auto const&
conn : fedChannels) {
224 if (!
conn.isConnected())
226 uint32_t detId =
conn.detId();
227 if (detId == 0 || detId == 0xFFFFFFFF)
235 if (!dqm_store.
dirExists(subdet_folder)) {
236 subdet_folder = mechanical_dir + subdet_folder.substr(subdet_folder.find(mdir) + mdir.size());
238 bad_module_folder = subdet_folder +
"/" +
"BadModuleList";
241 std::ostringstream detid_str;
243 std::string full_path = bad_module_folder +
"/" + detid_str.str();
bool check(const edm::EventSetup &iSetup)
MonitorElement * bookFloat(TString const &name, FUNC onbooking=NOOP())
void findExcludedModule(DQMStore &dqm_store, unsigned short fed_id, TrackerTopology const *tTopo)
edm::ESGetToken< RunInfo, RunInfoRcd > runInfoToken_
std::map< std::string, std::vector< unsigned short > > subDetFedMap_
Log< level::Info, false > LogInfo
Contains cabling info at the device level, including DetId, APV pair numbers, hardware addresses,...
std::optional< T > tryToGet() const
#define DEFINE_FWK_MODULE(type)
SiStripDaqInfo(edm::ParameterSet const &ps)
MonitorElement * daqFraction_
virtual void Reset()
Remove all data from the ME, keept the empty histogram with all its settings.
void setCurrentFolder(std::string const &fullpath) override
void analyze(edm::Event const &, edm::EventSetup const &) override
void fillDummyStatus(DQMStore &dqm_store)
std::string pwd() override
void getSubDetFolder(const uint32_t &detid, const TrackerTopology *tTopo, std::string &folder_name)
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
void readFedIds(const SiStripFedCabling *fedcabling, edm::EventSetup const &iSetup)
edm::ESWatcher< SiStripFedCablingRcd > fedCablingWatcher_
static bool goToDir(DQMStore &dqm_store, std::string const &name)
MonitorElement * bookInt(TString const &name, FUNC onbooking=NOOP())
const SiStripFedCabling * fedCabling_
edm::ESGetToken< SiStripFedCabling, SiStripFedCablingRcd > fedCablingToken_
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
void readSubdetFedFractions(DQMStore &dqm_store, std::vector< int > const &fed_ids, edm::EventSetup const &iSetup)
static void getSubDetectorTag(uint32_t det_id, std::string &subdet_tag, const TrackerTopology *tTopo)
bool getData(T &iHolder) const
virtual MonitorElement * get(std::string const &fullpath) const
FedsConstIterRange fedIds() const
std::map< std::string, SubDetMEs > subDetMEsMap_
void beginRun(edm::Run const &run, edm::EventSetup const &eSetup) override
const std::string subdet_tag("SubDet")
void bookStatus(DQMStore &dqm_store)
ConnsConstIterRange fedConnections(uint16_t fed_id) const
static void setBadModuleFlag(std::string &hname, uint16_t &flg)
virtual bool dirExists(std::string const &path) const
static void getTopFolderPath(DQMStore &dqm_store, std::string const &top_dir, std::string &path)