18 #include <TProfile2D.h>
30 LogInfo(
"TriggerDQM")<<
"[TriggerDQM]: ending... ";
43 monitorName_ = parameters_.getUntrackedParameter<
string>(
"monitorName",
"");
45 prescaleLS_ = parameters_.getUntrackedParameter<
int>(
"prescaleLS", -1);
47 prescaleEvt_ = parameters_.getUntrackedParameter<
int>(
"prescaleEvt", -1);
49 output_dir_ = parameters_.getUntrackedParameter<
string>(
"output_dir",
"");
51 input_dir_ = parameters_.getUntrackedParameter<
string>(
"input_dir",
"");
54 verbose_ = parameters_.getUntrackedParameter<
bool>(
"verbose",
false);
64 LogInfo(
"TriggerDQM")<<
"[TriggerDQM]: Begin Job";
71 m_deadChannels =
dbe_->
book2D(
"RPCTF_deadchannels",
75 m_noisyChannels =
dbe_->
book2D(
"RPCTF_noisychannels",
76 "RPCTF noisy channels",
94 if (verbose_)
std::cout <<
"L1TRPCTFClient::endLuminosityBlock" << std::endl;
101 =
dbe_->
get( (input_dir_+
"/RPCTF_muons_eta_phi_bx0").c_str() );
106 qreport = me->
getQReport(
"DeadChannels_RPCTF_2D");
108 vector<dqm::me_util::Channel> badChannels = qreport->
getBadChannels();
109 for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin();
110 channel != badChannels.end();
113 m_deadChannels->setBinContent((*channel).getBinX(),
114 (*channel).getBinY(),
119 qreport = me->
getQReport(
"HotChannels_RPCTF_2D");
121 vector<dqm::me_util::Channel> badChannels = qreport->
getBadChannels();
122 for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin();
123 channel != badChannels.end();
127 m_noisyChannels->setBinContent((*channel).getBinX(), 100);
140 for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
142 std::string full_path = input_dir_ +
"/" + (*it);
146 std::vector<QReport *> Qtest_map = me->
getQReports();
148 if (Qtest_map.size() > 0) {
149 std::cout <<
"Test: " << full_path << std::endl;
150 for (std::vector<QReport *>::const_iterator it = Qtest_map.begin();
151 it != Qtest_map.end();
155 <<
" Name "<< (*it)->getQRName()
156 <<
" Status " << (*it)->getStatus()
159 std::vector<dqm::me_util::Channel> badChannels=(*it)->getBadChannels();
161 vector<dqm::me_util::Channel>::iterator badchsit = badChannels.begin();
162 while(badchsit != badChannels.end())
164 int ix = (*badchsit).getBinX();
165 int iy = (*badchsit).getBinY();
166 std::cout <<
"(" << ix <<
","<< iy <<
") ";
181 if (prescaleEvt_<1)
return;
182 if (prescaleEvt_>0 && counterEvt_%prescaleEvt_ != 0)
return;
const QReport * getQReport(const std::string &qtname) const
get QReport corresponding to <qtname> (null pointer if QReport does not exist)
void beginRun(const edm::Run &r, const edm::EventSetup &c)
BeginRun.
L1TRPCTFClient(const edm::ParameterSet &ps)
Constructor.
virtual ~L1TRPCTFClient()
Destructor.
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
void beginJob(void)
BeginJob.
const std::vector< DQMChannel > & getBadChannels(void) const
void analyze(const edm::Event &e, const edm::EventSetup &c)
Fake Analyze.
std::vector< QReport * > getQReports(void) const
get map of QReports
std::vector< std::string > getMEs(void) const
get list of (non-dir) MEs of current directory
void endLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
DQM Client Diagnostic.
void beginLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &context)
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
void endRun(const edm::Run &r, const edm::EventSetup &c)
EndRun.
void setCurrentFolder(const std::string &fullpath)