Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:11:11

0001 #ifndef SiPixelUtility_H
0002 #define SiPixelUtility_H
0003 
0004 /** \class SiPixelUtility
0005  * *
0006  *  Class that handles the SiPixel Quality Tests
0007  *
0008  *  \author Petra Merkel
0009  */
0010 
0011 #include "DQMServices/Core/interface/DQMStore.h"
0012 #include "TH1.h"
0013 #include "TPaveText.h"
0014 #include <fstream>
0015 #include <map>
0016 #include <string>
0017 #include <vector>
0018 
0019 class SiPixelUtility {
0020 public:
0021   typedef dqm::legacy::MonitorElement MonitorElement;
0022   typedef dqm::legacy::DQMStore DQMStore;
0023 
0024   static int getMEList(std::string name, std::vector<std::string> &values);
0025   static bool checkME(std::string element, std::string name, std::string &full_path);
0026   static int getMEList(std::string name, std::string &dir_path, std::vector<std::string> &me_names);
0027 
0028   static void split(const std::string &str, std::vector<std::string> &tokens, const std::string &delimiters = " ");
0029   static void getStatusColor(int status, int &rval, int &gval, int &bval);
0030   static void getStatusColor(int status, int &icol, std::string &tag);
0031   static void getStatusColor(double status, int &rval, int &gval, int &bval);
0032   static int getStatus(MonitorElement *me);
0033 
0034   static int computeHistoBin(std::string &module_path);
0035   static int computeErrorCode(int status);
0036   static void fillPaveText(TPaveText *pave, const std::map<std::string, std::pair<int, double>> &messages);
0037   static void createStatusLegendMessages(std::map<std::string, std::pair<int, double>> &messages);
0038   static std::map<std::string, std::string> sourceCodeMap();
0039   static void setDrawingOption(TH1 *hist, float xlow = -1., float xhigh = -1.);
0040   static std::vector<std::string> getQTestNameList(MonitorElement *me);
0041 };
0042 
0043 #endif