13 #include "TPaveText.h" 14 #include "TImageDump.h" 17 #include "TPaveLabel.h" 26 edm::LogInfo(
"SiStripHistoPlotter") <<
" Creating SiStripHistoPlotter " 33 edm::LogInfo(
"SiStripHistoPlotter") <<
" Deleting SiStripHistoPlotter " 80 TH1F* tproject =
nullptr;
81 if (dopt ==
"projection") {
92 histo->SetStats(kFALSE);
94 if (
name.find(
"Summary_Mean") != std::string::npos) {
95 histo->SetStats(kFALSE);
97 histo->SetFillColor(1);
100 histo->Draw(dopt.c_str());
104 tTitle.SetTextFont(64);
105 tTitle.SetTextSizePixels(20);
110 tt.SetTextSize(0.12);
111 tt.SetTextColor(icol);
112 tt.DrawTextNDC(0.5, 0.5,
tag.c_str());
123 std::map<std::string, std::string>::iterator cPos;
124 if (
path ==
"dummy_path") {
125 std::cout <<
" Sending Dummy Image for : " <<
path << std::endl;
127 image = cPos->second;
131 image = cPos->second;
135 std::cout <<
" Sending Dummy Image for : " <<
path << std::endl;
137 image = cPos->second;
157 TImageDump imgdump(
"tmp.png", 114);
162 TImage* image = imgdump.GetImage();
164 if (image ==
nullptr) {
170 image->GetImageBuffer(&
buf, &sz);
172 std::ostringstream local_str;
173 for (
int i = 0;
i < sz;
i++)
209 std::ostringstream local_str;
213 if (imagefile->is_open()) {
214 while (getline(*imagefile,
line)) {
215 local_str <<
line << std::endl;
219 image = local_str.str();
227 TAxis* xa =
hist->GetXaxis();
228 TAxis* ya =
hist->GetYaxis();
230 xa->SetTitleOffset(0.7);
231 xa->SetTitleSize(0.05);
232 xa->SetLabelSize(0.04);
234 ya->SetTitleOffset(0.7);
235 ya->SetTitleSize(0.05);
236 ya->SetLabelSize(0.04);
242 ptit +=
"-Yprojection";
245 TH2F* hist2 =
me->getTH2F();
247 ptit.c_str(), ptit.c_str(), hist2->GetNbinsY(), hist2->GetYaxis()->GetXmin(), hist2->GetYaxis()->GetXmax());
248 tp->GetXaxis()->SetTitle(ptit.c_str());
249 for (
int j = 1;
j < hist2->GetNbinsY() + 1;
j++) {
250 float tot_count = 0.0;
251 for (
int i = 1;
i < hist2->GetNbinsX() + 1;
i++) {
252 tot_count += hist2->GetBinContent(
i,
j);
254 tp->SetBinContent(
j, tot_count);
257 TProfile* prof =
me->getTProfile();
258 tp =
new TH1F(ptit.c_str(), ptit.c_str(), 100, 0.0, prof->GetMaximum() * 1.2);
259 tp->GetXaxis()->SetTitle(ptit.c_str());
260 for (
int i = 1;
i < prof->GetNbinsX() + 1;
i++) {
261 tp->Fill(prof->GetBinContent(
i));
264 TH1F* hist1 =
me->getTH1F();
265 tp =
new TH1F(ptit.c_str(), ptit.c_str(), 100, 0.0, hist1->GetMaximum() * 1.2);
266 tp->GetXaxis()->SetTitle(ptit.c_str());
267 for (
int i = 1;
i < hist1->GetNbinsX() + 1;
i++) {
268 tp->Fill(hist1->GetBinContent(
i));
303 std::vector<std::string> htypes;
308 std::vector<MonitorElement*> all_mes = dqm_store->
getContents(par.
Path);
310 for (std::vector<std::string>::const_iterator ih = htypes.begin(); ih != htypes.end(); ih++) {
315 for (std::vector<MonitorElement*>::const_iterator
it = all_mes.begin();
it != all_mes.end();
it++) {
320 if (hname.find(
type) != std::string::npos) {
std::map< std::string, std::string > namedPictureBuffer_
bool hasNamedImage(const std::string &name)
void createPlots(DQMStore *dqm_store)
void setDrawingOption(TH1 *hist)
void free(void *ptr) noexcept
void setNewPlot(std::string const &path, std::string const &option, int width, int height)
std::vector< PlotParameter > condDBPlotList_
void getNamedImageBuffer(const std::string &path, std::string &image)
void createCondDBPlots(DQMStore *dqm_store)
void makePlot(DQMStore const *dqm_store, const PlotParameter &par)
void setNewCondDBPlot(std::string const &path, std::string const &option, int width, int height)
void makeCondDBPlots(DQMStore *dqm_store, const PlotParameter &par)
Log< level::Info, false > LogInfo
static void getMEStatusColor(int status, int &rval, int &gval, int &bval)
static void split(std::string const &str, std::vector< std::string > &tokens, std::string const &delimiters=" ")
virtual MonitorElement * get(std::string const &fullpath) const
void getProjection(MonitorElement *me, TH1F *tp)
void fillNamedImageBuffer(TCanvas *c1, const std::string &name)
(Documentation under construction).
void createDummyImage(const std::string &name)
std::vector< PlotParameter > plotList_
static int getMEStatus(MonitorElement const *me)
void getDummyImage(std::string &image)
virtual std::vector< dqm::harvesting::MonitorElement * > getContents(std::string const &path) const