00001 #ifndef DQM_HCALCLIENTUTILS_H
00002 #define DQM_HCALCLIENTUTILS_H
00003
00004 #include "TH1F.h"
00005 #include "TH1.h"
00006 #include "TH2F.h"
00007 #include "TCanvas.h"
00008 #include <string>
00009 #include "DQMServices/Core/interface/DQMStore.h"
00010 #include "DQMServices/Core/interface/MonitorElement.h"
00011 #include "DQMServices/Core/interface/DQMOldReceiver.h"
00012 #include "DQMServices/Core/interface/QTest.h"
00013 #include "DQMServices/Core/interface/QReport.h"
00014
00015 #include "TROOT.h"
00016 #include "TGaxis.h"
00017 #include <iostream>
00018 #include <fstream>
00019 #include <vector>
00020 #include <string>
00021
00022 using namespace std;
00023
00024 void resetME(const char* name, DQMStore* dbe);
00025
00026 bool isValidGeom(std::string type, int depth);
00027 bool isValidGeom(int subdet, int iEta, int iPhi, int depth);
00028
00029 TH2F* getHisto2(string name, string process, DQMStore* dbe_, bool verb=false, bool clone=false);
00030 TH1F* getHisto(string name, string process, DQMStore* dbe_, bool verb=false, bool clone=false);
00031
00032 TH2F* getHisto2(const MonitorElement* me, bool verb=false, bool clone=false);
00033 TH1F* getHisto(const MonitorElement* me, bool verb=false, bool clone=false);
00034
00035 string getIMG(int runNo,TH1F* hist, int size, string htmlDir, const char* xlab, const char* ylab);
00036 string getIMG2(int runNo,TH2F* hist, int size, string htmlDir, const char* xlab, const char* ylab, bool color=false);
00037
00038 void histoHTML(int runNo,TH1F* hist, const char* xlab, const char* ylab, int width, ofstream& htmlFile, string htmlDir);
00039 void histoHTML2(int runNo,TH2F* hist, const char* xlab, const char* ylab, int width, ofstream& htmlFile, string htmlDir, bool color=false);
00040
00041 void htmlErrors(int runNo,string htmlDir, string client, string process, DQMStore* dbe, map<string, vector<QReport*> > mapE, map<string, vector<QReport*> > mapW, map<string, vector<QReport*> > mapO);
00042
00043 void createXRangeTest(DQMStore* dbe, vector<string>& params);
00044 void createYRangeTest(DQMStore* dbe, vector<string>& params);
00045 void createMeanValueTest(DQMStore* dbe, vector<string>& params);
00046 void createH2CompTest(DQMStore* dbe, vector<string>& params, TH2F* ref);
00047 void createH2ContentTest(DQMStore* dbe, vector<string>& params);
00048
00049 void dumpHisto(TH1F* hist, vector<string> &names,
00050 vector<double> &meanX, vector<double> &meanY,
00051 vector<double> &rmsX, vector<double> &rmsY);
00052 void dumpHisto2(TH2F* hist, vector<string> &names,
00053 vector<double> &meanX, vector<double> &meanY,
00054 vector<double> &rmsX, vector<double> &rmsY);
00055
00056
00057
00058
00059 TProfile* getHistoTProfile(string name, string process, DQMStore* dbe_, bool verb=false, bool clone=false);
00060 TProfile* getHistoTProfile(const MonitorElement* me, bool verb=false, bool clone=false);
00061
00062
00063 string getIMGTProfile(int runNo,TProfile* hist, int size, string htmlDir, const char* xlab, const char* ylab,string opts="NONE");
00064 void histoHTMLTProfile(int runNo,TProfile* hist, const char* xlab, const char* ylab, int width, ofstream& htmlFile, string htmlDir, string opts="NONE");
00065
00066
00067
00068 TProfile2D* getHistoTProfile2D(string name, string process, DQMStore* dbe_, bool verb=false, bool clone=false);
00069 TProfile2D* getHistoTProfile2D(const MonitorElement* me, bool verb=false, bool clone=false);
00070 TH3F* getHistoTH3F(string name, string process, DQMStore* dbe_, bool verb=false, bool clone=false);
00071 TH3F* getHistoTH3F(const MonitorElement* me, bool verb=false, bool clone=false);
00072
00073
00074
00075
00076 #endif
00077