CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TkHistoMap.h
Go to the documentation of this file.
1 #ifndef DQM_SiStripCommon_TKHistoMap_h
2 #define DQM_SiStripCommon_TKHistoMap_h
3 
8 
11 #include <string>
12 
13 class TkHistoMap{
14 
15  typedef std::vector<MonitorElement*> tkHistoMapVect;
16 
17  public:
18  TkHistoMap(std::string path, std::string MapName, float baseline=0, bool mechanicalView=false);
19  TkHistoMap();
21 
22  void loadServices();
23 
24  void loadTkHistoMap(std::string path, std::string MapName, bool mechanicalView=false);
25 
27  std::vector<MonitorElement*>& getAllMaps(){return tkHistoMap_;};
28 
29  float getValue(uint32_t& detid);
30  float getEntries(uint32_t& detid);
31  uint32_t getDetId(std::string title, int ix, int iy){return getDetId(getLayerNum(getLayerName(title)),ix,iy);}
32  uint32_t getDetId(int layer, int ix, int iy){return tkdetmap_->getDetFromBin(layer,ix,iy);}
33  uint32_t getDetId(MonitorElement*ME, int ix, int iy){return getDetId(ME->getTitle(),ix,iy);}
34  std::string getLayerName(std::string title){return title.erase(0,MapName_.size()+1);}
35  uint16_t getLayerNum(std::string layerName){return tkdetmap_->getLayerNum(layerName);}
36 
37  void fillFromAscii(std::string filename);
38  void fill(uint32_t& detid,float value);
39  void setBinContent(uint32_t& detid,float value);
40  void add(uint32_t& detid,float value);
41 
42  void dumpInTkMap(TrackerMap* tkmap, bool dumpEntries=false); //dumpEntries==true? (dump entries) : (dump mean values)
43  void save(std::string filename);
44  void saveAsCanvas(std::string filename,std::string options="", std::string mode="RECREATE");
45 
46  private:
47 
48  void createTkHistoMap(std::string& path, std::string& MapName, float& baseline, bool mechanicalView);
49  std::string folderDefinition(std::string& path, std::string& MapName, int layer , bool mechanicalView, std::string& fullName);
50 
53  std::vector<MonitorElement*> tkHistoMap_;
55  std::string MapName_;
56 };
57 
58 #endif
void loadServices()
Definition: TkHistoMap.cc:22
uint32_t getDetId(int layer, int ix, int iy)
Definition: TkHistoMap.h:32
uint32_t getDetFromBin(int layer, int ix, int iy)
Definition: TkDetMap.h:126
std::vector< MonitorElement * > & getAllMaps()
Definition: TkHistoMap.h:27
unsigned int layerNumber(align::ID)
Layer number increases with rho from 1 to 8.
Definition: TIBNameSpace.h:85
uint32_t getDetId(MonitorElement *ME, int ix, int iy)
Definition: TkHistoMap.h:33
int HistoNumber
Definition: TkHistoMap.h:54
std::vector< MonitorElement * > tkHistoMapVect
Definition: TkHistoMap.h:15
DQMStore * dqmStore_
Definition: TkHistoMap.h:51
std::vector< MonitorElement * > tkHistoMap_
Definition: TkHistoMap.h:53
void saveAsCanvas(std::string filename, std::string options="", std::string mode="RECREATE")
Definition: TkHistoMap.cc:202
int getLayerNum(std::string &in)
Definition: TkDetMap.cc:759
std::string getLayerName(std::string title)
Definition: TkHistoMap.h:34
Definition: ME.h:11
float getEntries(uint32_t &detid)
Definition: TkHistoMap.cc:178
std::string MapName_
Definition: TkHistoMap.h:55
void loadTkHistoMap(std::string path, std::string MapName, bool mechanicalView=false)
Definition: TkHistoMap.cc:45
list path
Definition: scaleCards.py:51
void save(std::string filename)
Definition: TkHistoMap.cc:41
void fill(uint32_t &detid, float value)
Definition: TkHistoMap.cc:130
float getValue(uint32_t &detid)
Definition: TkHistoMap.cc:173
std::string getTitle(void) const
get MonitorElement title
TkDetMap * tkdetmap_
Definition: TkHistoMap.h:52
void createTkHistoMap(std::string &path, std::string &MapName, float &baseline, bool mechanicalView)
Definition: TkHistoMap.cc:64
void dumpInTkMap(TrackerMap *tkmap, bool dumpEntries=false)
Definition: TkHistoMap.cc:184
void setBinContent(uint32_t &detid, float value)
Definition: TkHistoMap.cc:146
void fillFromAscii(std::string filename)
Definition: TkHistoMap.cc:118
string fullName
MonitorElement * getMap(short layerNumber)
Definition: TkHistoMap.h:26
uint16_t getLayerNum(std::string layerName)
Definition: TkHistoMap.h:35
tuple filename
Definition: lut2db_cfg.py:20
std::string folderDefinition(std::string &path, std::string &MapName, int layer, bool mechanicalView, std::string &fullName)
Definition: TkHistoMap.cc:95
void add(uint32_t &detid, float value)
Definition: TkHistoMap.cc:163
uint32_t getDetId(std::string title, int ix, int iy)
Definition: TkHistoMap.h:31