CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Types | Private Member Functions | Private Attributes
TkHistoMap Class Reference

#include <TkHistoMap.h>

Public Member Functions

void add (uint32_t &detid, float value)
 
void dumpInTkMap (TrackerMap *tkmap, bool dumpEntries=false)
 
void fill (uint32_t &detid, float value)
 
void fillFromAscii (std::string filename)
 
std::vector< MonitorElement * > & getAllMaps ()
 
uint32_t getDetId (std::string title, int ix, int iy)
 
uint32_t getDetId (int layer, int ix, int iy)
 
uint32_t getDetId (MonitorElement *ME, int ix, int iy)
 
float getEntries (uint32_t &detid)
 
std::string getLayerName (std::string title)
 
uint16_t getLayerNum (std::string layerName)
 
MonitorElementgetMap (short layerNumber)
 
float getValue (uint32_t &detid)
 
void loadServices ()
 
void loadTkHistoMap (std::string path, std::string MapName, bool mechanicalView=false)
 
void save (std::string filename)
 
void saveAsCanvas (std::string filename, std::string options="", std::string mode="RECREATE")
 
void setBinContent (uint32_t &detid, float value)
 
 TkHistoMap (std::string path, std::string MapName, float baseline=0, bool mechanicalView=false)
 
 TkHistoMap ()
 
 ~TkHistoMap ()
 

Private Types

typedef std::vector
< MonitorElement * > 
tkHistoMapVect
 

Private Member Functions

void createTkHistoMap (std::string &path, std::string &MapName, float &baseline, bool mechanicalView)
 
std::string folderDefinition (std::string &path, std::string &MapName, int layer, bool mechanicalView, std::string &fullName)
 

Private Attributes

DQMStoredqmStore_
 
int HistoNumber
 
std::string MapName_
 
TkDetMaptkdetmap_
 
std::vector< MonitorElement * > tkHistoMap_
 

Detailed Description

Definition at line 13 of file TkHistoMap.h.

Member Typedef Documentation

typedef std::vector<MonitorElement*> TkHistoMap::tkHistoMapVect
private

Definition at line 15 of file TkHistoMap.h.

Constructor & Destructor Documentation

TkHistoMap::TkHistoMap ( std::string  path,
std::string  MapName,
float  baseline = 0,
bool  mechanicalView = false 
)

Definition at line 13 of file TkHistoMap.cc.

References createTkHistoMap(), loadServices(), LogTrace, and MapName_.

13  :
14  HistoNumber(35),
15  MapName_(MapName)
16 {
17  LogTrace("TkHistoMap") <<"TkHistoMap::constructor with parameters";
18  loadServices();
19  createTkHistoMap(path,MapName_, baseline, mechanicalView);
20 }
void loadServices()
Definition: TkHistoMap.cc:22
int HistoNumber
Definition: TkHistoMap.h:54
std::string MapName_
Definition: TkHistoMap.h:55
void createTkHistoMap(std::string &path, std::string &MapName, float &baseline, bool mechanicalView)
Definition: TkHistoMap.cc:64
#define LogTrace(id)
TkHistoMap::TkHistoMap ( )

Definition at line 6 of file TkHistoMap.cc.

References loadServices(), and LogTrace.

6  :
7  HistoNumber(35){
8  LogTrace("TkHistoMap") <<"TkHistoMap::constructor without parameters";
9  loadServices();
10 }
void loadServices()
Definition: TkHistoMap.cc:22
int HistoNumber
Definition: TkHistoMap.h:54
#define LogTrace(id)
TkHistoMap::~TkHistoMap ( )
inline

Definition at line 20 of file TkHistoMap.h.

20 {};

Member Function Documentation

void TkHistoMap::add ( uint32_t &  detid,
float  value 
)

Definition at line 166 of file TkHistoMap.cc.

References TkDetMap::FindLayer(), getTProfile2D(), TkDetMap::getXY(), TkLayerMap::XYbin::ix, TkLayerMap::XYbin::iy, LogTrace, setBinContent(), tkdetmap_, and tkHistoMap_.

Referenced by DetIdSelectorTest::analyze(), APVShotsAnalyzer::analyze(), SiStripMonitorMuonHLT::analyze(), SiStripMonitorMuonHLT::analyzeOnTrackClusters(), and SiStripMonitorTrack::clusterInfos().

166  {
167 #ifdef debug_TkHistoMap
168  LogTrace("TkHistoMap") << "[TkHistoMap::add]";
169 #endif
170  int16_t layer=tkdetmap_->FindLayer(detid);
172  setBinContent(detid,tkHistoMap_[layer]->getTProfile2D()->GetBinContent(tkHistoMap_[layer]->getTProfile2D()->GetBin(xybin.ix,xybin.iy))+value);
173 
174 }
std::vector< MonitorElement * > tkHistoMap_
Definition: TkHistoMap.h:53
TkDetMap * tkdetmap_
Definition: TkHistoMap.h:52
TProfile2D * getTProfile2D(std::string name, std::string process, std::string rootfolder, DQMStore *dbe_, bool verb, bool clone)
#define LogTrace(id)
void setBinContent(uint32_t &detid, float value)
Definition: TkHistoMap.cc:149
int16_t FindLayer(uint32_t &detid)
Definition: TkDetMap.cc:646
const TkLayerMap::XYbin & getXY(uint32_t &)
Definition: TkDetMap.cc:633
void TkHistoMap::createTkHistoMap ( std::string &  path,
std::string &  MapName,
float &  baseline,
bool  mechanicalView 
)
private

Definition at line 64 of file TkHistoMap.cc.

References DQMStore::bookProfile2D(), dqmStore_, MonitorElement::Fill(), folderDefinition(), newFWLiteAna::fullName, TkDetMap::getComponents(), TkDetMap::getDetFromBin(), HistoNumber, LogTrace, AlCaHLTBitMon_QueryRunRegistry::string, tkdetmap_, and tkHistoMap_.

Referenced by TkHistoMap().

64  {
65 
66  int nchX;
67  int nchY;
68  double lowX,highX;
69  double lowY, highY;
70  std::string fullName, folder;
71 
72  tkHistoMap_.resize(HistoNumber);
73  for(int layer=1;layer<HistoNumber;++layer){
74  folder=folderDefinition(path,MapName,layer,mechanicalView,fullName);
75  tkdetmap_->getComponents(layer,nchX,lowX,highX,nchY,lowY,highY);
76  MonitorElement* me = dqmStore_->bookProfile2D(fullName.c_str(),fullName.c_str(),
77  nchX,lowX,highX,
78  nchY,lowY,highY,
79  0.0, 0.0);
80  //initialize bin content for the not assigned bins
81  if(baseline!=0){
82  for(size_t ix = 1; ix <= (unsigned int) nchX; ++ix)
83  for(size_t iy = 1;iy <= (unsigned int) nchY; ++iy)
84  if(!tkdetmap_->getDetFromBin(layer,ix,iy))
85  me->Fill(1.*(lowX+ix-.5),1.*(lowY+iy-.5),baseline);
86  }
87 
88  tkHistoMap_[layer]=me;
89 #ifdef debug_TkHistoMap
90  LogTrace("TkHistoMap") << "[TkHistoMap::createTkHistoMap] folder " << folder << " histoName " << fullName << " layer " << layer << " ptr " << tkHistoMap_[layer];
91 #endif
92  }
93 }
uint32_t getDetFromBin(int layer, int ix, int iy)
Definition: TkDetMap.h:126
int HistoNumber
Definition: TkHistoMap.h:54
DQMStore * dqmStore_
Definition: TkHistoMap.h:51
std::vector< MonitorElement * > tkHistoMap_
Definition: TkHistoMap.h:53
void Fill(long long x)
TkDetMap * tkdetmap_
Definition: TkHistoMap.h:52
#define LogTrace(id)
string fullName
void getComponents(int &layer, int &nchX, double &lowX, double &highX, int &nchY, double &lowY, double &highY)
Definition: TkDetMap.cc:666
std::string folderDefinition(std::string &path, std::string &MapName, int layer, bool mechanicalView, std::string &fullName)
Definition: TkHistoMap.cc:95
MonitorElement * bookProfile2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ, const char *option="s")
Definition: DQMStore.cc:1330
void TkHistoMap::dumpInTkMap ( TrackerMap tkmap,
bool  dumpEntries = false 
)

Definition at line 187 of file TkHistoMap.cc.

References TrackerMap::fill(), TkDetMap::getDetsForLayer(), getEntries(), getValue(), HistoNumber, i, and tkdetmap_.

Referenced by TkVoltageMapCreator::beginRun(), and APVShotsAnalyzer::endJob().

187  {
188  for(int layer=1;layer<HistoNumber;++layer){
189  std::vector<uint32_t> dets;
190  tkdetmap_->getDetsForLayer(layer,dets);
191  for(size_t i=0;i<dets.size();++i){
192  if(dets[i]>0){
193  if(getEntries(dets[i])>0) {
194  tkmap->fill(dets[i],
195  dumpEntries ? getEntries(dets[i]) : getValue(dets[i])
196  );
197  }
198  }
199  }
200  }
201 }
int i
Definition: DBlmapReader.cc:9
int HistoNumber
Definition: TkHistoMap.h:54
float getEntries(uint32_t &detid)
Definition: TkHistoMap.cc:181
void getDetsForLayer(int layer, std::vector< uint32_t > &output)
Definition: TkDetMap.cc:677
float getValue(uint32_t &detid)
Definition: TkHistoMap.cc:176
TkDetMap * tkdetmap_
Definition: TkHistoMap.h:52
void fill(int layer, int ring, int nmod, float x)
Definition: TrackerMap.cc:2776
void TkHistoMap::fill ( uint32_t &  detid,
float  value 
)

Definition at line 133 of file TkHistoMap.cc.

References TkDetMap::FindLayer(), TkDetMap::getXY(), cuy::ii, TkLayerMap::XYbin::ix, TkLayerMap::XYbin::iy, findQualityFiles::jj, LogTrace, tkdetmap_, tkHistoMap_, TkLayerMap::XYbin::x, and TkLayerMap::XYbin::y.

Referenced by SiStripQualityStatistics::analyze(), SiStripMonitorDigi::analyze(), SiStripMonitorCluster::analyze(), APVShotsAnalyzer::analyze(), SiStripDQMProfileToTkMapConverter::beginRun(), TkVoltageMapCreator::beginRun(), SiStripMonitorTrack::clusterInfos(), SiStripMonitorDigi::FillApvShotsMap(), fillFromAscii(), SiStripNoisesDQM::fillMEsForLayer(), SiStripThresholdDQM::fillMEsForLayer(), SiStripPedestalsDQM::fillMEsForLayer(), SiStripLorentzAngleDQM::fillMEsForLayer(), and SiStripCablingDQM::getActiveDetIds().

133  {
134  int16_t layer=tkdetmap_->FindLayer(detid);
136 #ifdef debug_TkHistoMap
137  LogTrace("TkHistoMap") << "[TkHistoMap::fill] Fill detid " << detid << " Layer " << layer << " value " << value << " ix,iy " << xybin.ix << " " << xybin.iy << " " << xybin.x << " " << xybin.y << " " << tkHistoMap_[layer]->getTProfile2D()->GetName();
138 #endif
139  tkHistoMap_[layer]->getTProfile2D()->Fill(xybin.x,xybin.y,value);
140 
141 #ifdef debug_TkHistoMap
142  LogTrace("TkHistoMap") << "[TkHistoMap::fill] " << tkHistoMap_[layer]->getTProfile2D()->GetBinContent(xybin.ix,xybin.iy);
143  for(size_t ii=0;ii<4;ii++)
144  for(size_t jj=0;jj<11;jj++)
145  LogTrace("TkHistoMap") << "[TkHistoMap::fill] " << ii << " " << jj << " " << tkHistoMap_[layer]->getTProfile2D()->GetBinContent(ii,jj);
146 #endif
147 }
int ii
Definition: cuy.py:588
std::vector< MonitorElement * > tkHistoMap_
Definition: TkHistoMap.h:53
TkDetMap * tkdetmap_
Definition: TkHistoMap.h:52
#define LogTrace(id)
int16_t FindLayer(uint32_t &detid)
Definition: TkDetMap.cc:646
const TkLayerMap::XYbin & getXY(uint32_t &)
Definition: TkDetMap.cc:633
void TkHistoMap::fillFromAscii ( std::string  filename)

Definition at line 121 of file TkHistoMap.cc.

References cond::rpcobgas::detid, mergeVDriftHistosByStation::file, fill(), and relativeConstraints::value.

121  {
122  std::ifstream file;
123  file.open(filename.c_str());
124  float value;
125  uint32_t detid;
126  while (file.good()){
127  file >> detid >> value;
128  fill(detid,value);
129  }
130  file.close();
131 }
void fill(uint32_t &detid, float value)
Definition: TkHistoMap.cc:133
tuple filename
Definition: lut2db_cfg.py:20
std::string TkHistoMap::folderDefinition ( std::string &  path,
std::string &  MapName,
int  layer,
bool  mechanicalView,
std::string &  fullName 
)
private

Definition at line 95 of file TkHistoMap.cc.

References dqmStore_, TkDetMap::getLayerName(), SiStripFolderOrganizer::getSubDetLayerFolderName(), TkDetMap::getSubDetLayerSide(), mergeVDriftHistosByStation::name, getHLTPrescaleColumns::path, DQMStore::setCurrentFolder(), SiStripFolderOrganizer::setSiStripFolderName(), AlCaHLTBitMon_QueryRunRegistry::string, and tkdetmap_.

Referenced by createTkHistoMap(), and loadTkHistoMap().

95  {
96 
97  std::string folder=path;
98  std::string name=MapName+std::string("_");
99  fullName=name+tkdetmap_->getLayerName(layer);
100  // std::cout << "[TkHistoMap::folderDefinition] fullName: " << fullName << std::endl;
101 
102  if(mechanicalView){
103  std::stringstream ss;
104 
105  SiStripFolderOrganizer folderOrg;
106  folderOrg.setSiStripFolderName(path);
107 
109  uint32_t subdetlayer, side;
110  tkdetmap_->getSubDetLayerSide(layer,subDet,subdetlayer,side);
111  folderOrg.getSubDetLayerFolderName(ss,subDet,subdetlayer,side);
112 
113  folder = ss.str();
114  // std::cout << "[TkHistoMap::folderDefinition] folder: " << folder << std::endl;
115  }
116  dqmStore_->setCurrentFolder(folder);
117  return folder;
118 }
void setSiStripFolderName(std::string name)
DQMStore * dqmStore_
Definition: TkHistoMap.h:51
void getSubDetLayerFolderName(std::stringstream &ss, SiStripDetId::SubDetector subDet, uint32_t layer, uint32_t side=0)
TkDetMap * tkdetmap_
Definition: TkHistoMap.h:52
string fullName
void getSubDetLayerSide(int &in, SiStripDetId::SubDetector &, uint32_t &layer, uint32_t &side)
Definition: TkDetMap.cc:831
std::string getLayerName(int &in)
Definition: TkDetMap.cc:684
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:584
std::vector<MonitorElement*>& TkHistoMap::getAllMaps ( )
inline

Definition at line 27 of file TkHistoMap.h.

References tkHistoMap_.

Referenced by BuildTrackerMapPlugin::subtractMap().

27 {return tkHistoMap_;};
std::vector< MonitorElement * > tkHistoMap_
Definition: TkHistoMap.h:53
uint32_t TkHistoMap::getDetId ( std::string  title,
int  ix,
int  iy 
)
inline

Definition at line 31 of file TkHistoMap.h.

References getDetId(), getLayerName(), and getLayerNum().

Referenced by getDetId().

31 {return getDetId(getLayerNum(getLayerName(title)),ix,iy);}
std::string getLayerName(std::string title)
Definition: TkHistoMap.h:34
uint16_t getLayerNum(std::string layerName)
Definition: TkHistoMap.h:35
uint32_t getDetId(std::string title, int ix, int iy)
Definition: TkHistoMap.h:31
uint32_t TkHistoMap::getDetId ( int  layer,
int  ix,
int  iy 
)
inline

Definition at line 32 of file TkHistoMap.h.

References TkDetMap::getDetFromBin(), and tkdetmap_.

32 {return tkdetmap_->getDetFromBin(layer,ix,iy);}
uint32_t getDetFromBin(int layer, int ix, int iy)
Definition: TkDetMap.h:126
TkDetMap * tkdetmap_
Definition: TkHistoMap.h:52
uint32_t TkHistoMap::getDetId ( MonitorElement ME,
int  ix,
int  iy 
)
inline

Definition at line 33 of file TkHistoMap.h.

References getDetId(), and MonitorElement::getTitle().

Referenced by getDetId().

33 {return getDetId(ME->getTitle(),ix,iy);}
std::string getTitle(void) const
get MonitorElement title
uint32_t getDetId(std::string title, int ix, int iy)
Definition: TkHistoMap.h:31
float TkHistoMap::getEntries ( uint32_t &  detid)

Definition at line 181 of file TkHistoMap.cc.

References TkDetMap::FindLayer(), getTProfile2D(), TkDetMap::getXY(), TkLayerMap::XYbin::ix, TkLayerMap::XYbin::iy, tkdetmap_, and tkHistoMap_.

Referenced by dumpInTkMap().

181  {
182  int16_t layer=tkdetmap_->FindLayer(detid);
184  return tkHistoMap_[layer]->getTProfile2D()->GetBinEntries(tkHistoMap_[layer]->getTProfile2D()->GetBin(xybin.ix,xybin.iy));
185 }
std::vector< MonitorElement * > tkHistoMap_
Definition: TkHistoMap.h:53
TkDetMap * tkdetmap_
Definition: TkHistoMap.h:52
TProfile2D * getTProfile2D(std::string name, std::string process, std::string rootfolder, DQMStore *dbe_, bool verb, bool clone)
int16_t FindLayer(uint32_t &detid)
Definition: TkDetMap.cc:646
const TkLayerMap::XYbin & getXY(uint32_t &)
Definition: TkDetMap.cc:633
std::string TkHistoMap::getLayerName ( std::string  title)
inline

Definition at line 34 of file TkHistoMap.h.

References MapName_.

Referenced by getDetId().

34 {return title.erase(0,MapName_.size()+1);}
std::string MapName_
Definition: TkHistoMap.h:55
uint16_t TkHistoMap::getLayerNum ( std::string  layerName)
inline

Definition at line 35 of file TkHistoMap.h.

References TkDetMap::getLayerNum(), and tkdetmap_.

Referenced by getDetId().

35 {return tkdetmap_->getLayerNum(layerName);}
int getLayerNum(std::string &in)
Definition: TkDetMap.cc:759
TkDetMap * tkdetmap_
Definition: TkHistoMap.h:52
MonitorElement* TkHistoMap::getMap ( short  layerNumber)
inline

Definition at line 26 of file TkHistoMap.h.

References align::tib::layerNumber(), and tkHistoMap_.

26 {return tkHistoMap_[layerNumber];};
std::vector< MonitorElement * > tkHistoMap_
Definition: TkHistoMap.h:53
unsigned int layerNumber(align::ID, const TrackerTopology *)
Layer number increases with rho from 1 to 8.
Definition: TIBNameSpace.h:86
float TkHistoMap::getValue ( uint32_t &  detid)

Definition at line 176 of file TkHistoMap.cc.

References TkDetMap::FindLayer(), getTProfile2D(), TkDetMap::getXY(), TkLayerMap::XYbin::ix, TkLayerMap::XYbin::iy, tkdetmap_, and tkHistoMap_.

Referenced by dumpInTkMap().

176  {
177  int16_t layer=tkdetmap_->FindLayer(detid);
179  return tkHistoMap_[layer]->getTProfile2D()->GetBinContent(tkHistoMap_[layer]->getTProfile2D()->GetBin(xybin.ix,xybin.iy));
180 }
std::vector< MonitorElement * > tkHistoMap_
Definition: TkHistoMap.h:53
TkDetMap * tkdetmap_
Definition: TkHistoMap.h:52
TProfile2D * getTProfile2D(std::string name, std::string process, std::string rootfolder, DQMStore *dbe_, bool verb, bool clone)
int16_t FindLayer(uint32_t &detid)
Definition: TkDetMap.cc:646
const TkLayerMap::XYbin & getXY(uint32_t &)
Definition: TkDetMap.cc:633
void TkHistoMap::loadServices ( )

Definition at line 22 of file TkHistoMap.cc.

References dqmStore_, cppFunctionSkipper::operator, and tkdetmap_.

Referenced by TkHistoMap().

22  {
23  if(!edm::Service<DQMStore>().isAvailable()){
24  edm::LogError("TkHistoMap") <<
25  "\n------------------------------------------"
26  "\nUnAvailable Service DQMStore: please insert in the configuration file an instance like"
27  "\n\tprocess.load(\"DQMServices.Core.DQMStore_cfg\")"
28  "\n------------------------------------------";
29  }
31  if(!edm::Service<TkDetMap>().isAvailable()){
32  edm::LogError("TkHistoMap") <<
33  "\n------------------------------------------"
34  "\nUnAvailable Service TkHistoMap: please insert in the configuration file an instance like"
35  "\n\tprocess.TkDetMap = cms.Service(\"TkDetMap\")"
36  "\n------------------------------------------";
37  }
39 }
DQMStore * dqmStore_
Definition: TkHistoMap.h:51
TkDetMap * tkdetmap_
Definition: TkHistoMap.h:52
void TkHistoMap::loadTkHistoMap ( std::string  path,
std::string  MapName,
bool  mechanicalView = false 
)

Definition at line 45 of file TkHistoMap.cc.

References dqmStore_, folderDefinition(), newFWLiteAna::fullName, DQMStore::get(), HistoNumber, LogTrace, MapName_, AlCaHLTBitMon_QueryRunRegistry::string, and tkHistoMap_.

45  {
46  MapName_=MapName;
47  std::string fullName, folder;
48  tkHistoMap_.resize(HistoNumber);
49  for(int layer=1;layer<HistoNumber;++layer){
50  folder=folderDefinition(path,MapName_,layer,mechanicalView,fullName);
51 
52 #ifdef debug_TkHistoMap
53  LogTrace("TkHistoMap") << "[TkHistoMap::loadTkHistoMap] folder " << folder << " histoName " << fullName << " find " << folder.find_last_of("/") << " length " << folder.length();
54 #endif
55  if(folder.find_last_of("/")!=folder.length()-1)
56  folder+="/";
57  tkHistoMap_[layer]=dqmStore_->get(folder+fullName);
58 #ifdef debug_TkHistoMap
59  LogTrace("TkHistoMap") << "[TkHistoMap::loadTkHistoMap] folder " << folder << " histoName " << fullName << " layer " << layer << " ptr " << tkHistoMap_[layer] << " find " << folder.find_last_of("/") << " length " << folder.length();
60 #endif
61  }
62 }
int HistoNumber
Definition: TkHistoMap.h:54
DQMStore * dqmStore_
Definition: TkHistoMap.h:51
std::vector< MonitorElement * > tkHistoMap_
Definition: TkHistoMap.h:53
std::string MapName_
Definition: TkHistoMap.h:55
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1623
#define LogTrace(id)
string fullName
std::string folderDefinition(std::string &path, std::string &MapName, int layer, bool mechanicalView, std::string &fullName)
Definition: TkHistoMap.cc:95
void TkHistoMap::save ( std::string  filename)

Definition at line 41 of file TkHistoMap.cc.

References dqmStore_, and DQMStore::save().

Referenced by Vispa.Main.TabController.TabController::allowClose(), TkVoltageMapCreator::beginRun(), Vispa.Main.TabController.TabController::checkModificationTimestamp(), SiStripQualityStatistics::endJob(), SiStripDQMProfileToTkMapConverter::endJob(), DetIdSelectorTest::endJob(), and APVShotsAnalyzer::endJob().

41  {
43 }
DQMStore * dqmStore_
Definition: TkHistoMap.h:51
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", const uint32_t run=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
Definition: DQMStore.cc:2296
tuple filename
Definition: lut2db_cfg.py:20
void TkHistoMap::saveAsCanvas ( std::string  filename,
std::string  options = "",
std::string  mode = "RECREATE" 
)

Definition at line 205 of file TkHistoMap.cc.

References f, i, MapName_, AlCaHLTBitMon_QueryRunRegistry::string, TkLayerMap::TECM_W1, TkLayerMap::TECM_W2, TkLayerMap::TECM_W3, TkLayerMap::TECM_W4, TkLayerMap::TECM_W5, TkLayerMap::TECM_W6, TkLayerMap::TECM_W7, TkLayerMap::TECM_W8, TkLayerMap::TECM_W9, TkLayerMap::TECP_W1, TkLayerMap::TECP_W2, TkLayerMap::TECP_W3, TkLayerMap::TECP_W4, TkLayerMap::TECP_W5, TkLayerMap::TECP_W6, TkLayerMap::TECP_W7, TkLayerMap::TECP_W8, TkLayerMap::TECP_W9, TkLayerMap::TIB_L1, TkLayerMap::TIB_L2, TkLayerMap::TIB_L3, TkLayerMap::TIB_L4, TkLayerMap::TIDM_D1, TkLayerMap::TIDM_D2, TkLayerMap::TIDM_D3, TkLayerMap::TIDP_D1, TkLayerMap::TIDP_D2, TkLayerMap::TIDP_D3, tkHistoMap_, TkLayerMap::TOB_L1, TkLayerMap::TOB_L2, TkLayerMap::TOB_L3, TkLayerMap::TOB_L4, TkLayerMap::TOB_L5, and TkLayerMap::TOB_L6.

Referenced by SiStripQualityStatistics::endJob(), and SiStripDQMProfileToTkMapConverter::endJob().

205  {
206  // TCanvas C(MapName_,MapName_,200,10,900,700);
207  TCanvas* CTIB=new TCanvas(std::string("Canvas_"+MapName_+"TIB").c_str(),std::string("Canvas_"+MapName_+"TIB").c_str());
208  TCanvas* CTOB=new TCanvas(std::string("Canvas_"+MapName_+"TOB").c_str(),std::string("Canvas_"+MapName_+"TOB").c_str());
209  TCanvas* CTIDP=new TCanvas(std::string("Canvas_"+MapName_+"TIDP").c_str(),std::string("Canvas_"+MapName_+"TIDP").c_str());
210  TCanvas* CTIDM=new TCanvas(std::string("Canvas_"+MapName_+"TIDM").c_str(),std::string("Canvas_"+MapName_+"TIDM").c_str());
211  TCanvas* CTECP=new TCanvas(std::string("Canvas_"+MapName_+"TECP").c_str(),std::string("Canvas_"+MapName_+"TECP").c_str());
212  TCanvas* CTECM=new TCanvas(std::string("Canvas_"+MapName_+"TECM").c_str(),std::string("Canvas_"+MapName_+"TECM").c_str());
213  CTIB->Divide(2,2);
214  CTOB->Divide(2,3);
215  CTIDP->Divide(1,3);
216  CTIDM->Divide(1,3);
217  CTECP->Divide(3,3);
218  CTECM->Divide(3,3);
219 
220 
221  int i;
222  i=0;
223  CTIB->cd(++i);tkHistoMap_[TkLayerMap::TIB_L1]->getTProfile2D()->Draw(options.c_str());
224  CTIB->cd(++i);tkHistoMap_[TkLayerMap::TIB_L2]->getTProfile2D()->Draw(options.c_str());
225  CTIB->cd(++i);tkHistoMap_[TkLayerMap::TIB_L3]->getTProfile2D()->Draw(options.c_str());
226  CTIB->cd(++i);tkHistoMap_[TkLayerMap::TIB_L4]->getTProfile2D()->Draw(options.c_str());
227 
228  i=0;
229  CTIDP->cd(++i);tkHistoMap_[TkLayerMap::TIDP_D1]->getTProfile2D()->Draw(options.c_str());
230  CTIDP->cd(++i);tkHistoMap_[TkLayerMap::TIDP_D2]->getTProfile2D()->Draw(options.c_str());
231  CTIDP->cd(++i);tkHistoMap_[TkLayerMap::TIDP_D3]->getTProfile2D()->Draw(options.c_str());
232 
233  i=0;
234  CTIDM->cd(++i);tkHistoMap_[TkLayerMap::TIDM_D1]->getTProfile2D()->Draw(options.c_str());
235  CTIDM->cd(++i);tkHistoMap_[TkLayerMap::TIDM_D2]->getTProfile2D()->Draw(options.c_str());
236  CTIDM->cd(++i);tkHistoMap_[TkLayerMap::TIDM_D3]->getTProfile2D()->Draw(options.c_str());
237 
238  i=0;
239  CTOB->cd(++i);tkHistoMap_[TkLayerMap::TOB_L1]->getTProfile2D()->Draw(options.c_str());
240  CTOB->cd(++i);tkHistoMap_[TkLayerMap::TOB_L2]->getTProfile2D()->Draw(options.c_str());
241  CTOB->cd(++i);tkHistoMap_[TkLayerMap::TOB_L3]->getTProfile2D()->Draw(options.c_str());
242  CTOB->cd(++i);tkHistoMap_[TkLayerMap::TOB_L4]->getTProfile2D()->Draw(options.c_str());
243  CTOB->cd(++i);tkHistoMap_[TkLayerMap::TOB_L5]->getTProfile2D()->Draw(options.c_str());
244  CTOB->cd(++i);tkHistoMap_[TkLayerMap::TOB_L6]->getTProfile2D()->Draw(options.c_str());
245 
246  i=0;
247  CTECP->cd(++i);tkHistoMap_[TkLayerMap::TECP_W1]->getTProfile2D()->Draw(options.c_str());
248  CTECP->cd(++i);tkHistoMap_[TkLayerMap::TECP_W2]->getTProfile2D()->Draw(options.c_str());
249  CTECP->cd(++i);tkHistoMap_[TkLayerMap::TECP_W3]->getTProfile2D()->Draw(options.c_str());
250  CTECP->cd(++i);tkHistoMap_[TkLayerMap::TECP_W4]->getTProfile2D()->Draw(options.c_str());
251  CTECP->cd(++i);tkHistoMap_[TkLayerMap::TECP_W5]->getTProfile2D()->Draw(options.c_str());
252  CTECP->cd(++i);tkHistoMap_[TkLayerMap::TECP_W6]->getTProfile2D()->Draw(options.c_str());
253  CTECP->cd(++i);tkHistoMap_[TkLayerMap::TECP_W7]->getTProfile2D()->Draw(options.c_str());
254  CTECP->cd(++i);tkHistoMap_[TkLayerMap::TECP_W8]->getTProfile2D()->Draw(options.c_str());
255  CTECP->cd(++i);tkHistoMap_[TkLayerMap::TECP_W9]->getTProfile2D()->Draw(options.c_str());
256 
257  i=0;
258  CTECM->cd(++i);tkHistoMap_[TkLayerMap::TECM_W1]->getTProfile2D()->Draw(options.c_str());
259  CTECM->cd(++i);tkHistoMap_[TkLayerMap::TECM_W2]->getTProfile2D()->Draw(options.c_str());
260  CTECM->cd(++i);tkHistoMap_[TkLayerMap::TECM_W3]->getTProfile2D()->Draw(options.c_str());
261  CTECM->cd(++i);tkHistoMap_[TkLayerMap::TECM_W4]->getTProfile2D()->Draw(options.c_str());
262  CTECM->cd(++i);tkHistoMap_[TkLayerMap::TECM_W5]->getTProfile2D()->Draw(options.c_str());
263  CTECM->cd(++i);tkHistoMap_[TkLayerMap::TECM_W6]->getTProfile2D()->Draw(options.c_str());
264  CTECM->cd(++i);tkHistoMap_[TkLayerMap::TECM_W7]->getTProfile2D()->Draw(options.c_str());
265  CTECM->cd(++i);tkHistoMap_[TkLayerMap::TECM_W8]->getTProfile2D()->Draw(options.c_str());
266  CTECM->cd(++i);tkHistoMap_[TkLayerMap::TECM_W9]->getTProfile2D()->Draw(options.c_str());
267 
268  TFile *f = new TFile(filename.c_str(),mode.c_str());
269  CTIB->Write();
270  CTIDP->Write();
271  CTIDM->Write();
272  CTOB->Write();
273  CTECP->Write();
274  CTECM->Write();
275  f->Close();
276  delete f;
277 }
int i
Definition: DBlmapReader.cc:9
std::vector< MonitorElement * > tkHistoMap_
Definition: TkHistoMap.h:53
std::string MapName_
Definition: TkHistoMap.h:55
double f[11][100]
tuple filename
Definition: lut2db_cfg.py:20
void TkHistoMap::setBinContent ( uint32_t &  detid,
float  value 
)

Definition at line 149 of file TkHistoMap.cc.

References TkDetMap::FindLayer(), getTProfile2D(), TkDetMap::getXY(), cuy::ii, TkLayerMap::XYbin::ix, TkLayerMap::XYbin::iy, findQualityFiles::jj, LogTrace, tkdetmap_, tkHistoMap_, TkLayerMap::XYbin::x, and TkLayerMap::XYbin::y.

Referenced by add(), SiStripApvGainsDQM::fillMEsForLayer(), and SiStripQualityDQM::fillMEsForLayer().

149  {
150  int16_t layer=tkdetmap_->FindLayer(detid);
152  tkHistoMap_[layer]->getTProfile2D()->SetBinEntries(tkHistoMap_[layer]->getTProfile2D()->GetBin(xybin.ix,xybin.iy),1);
153  tkHistoMap_[layer]->getTProfile2D()->SetBinContent(tkHistoMap_[layer]->getTProfile2D()->GetBin(xybin.ix,xybin.iy),value);
154 
155 #ifdef debug_TkHistoMap
156  LogTrace("TkHistoMap") << "[TkHistoMap::setbincontent] setBinContent detid " << detid << " Layer " << layer << " value " << value << " ix,iy " << xybin.ix << " " << xybin.iy << " " << xybin.x << " " << xybin.y << " " << tkHistoMap_[layer]->getTProfile2D()->GetName() << " bin " << tkHistoMap_[layer]->getTProfile2D()->GetBin(xybin.ix,xybin.iy);
157 
158  LogTrace("TkHistoMap") << "[TkHistoMap::setbincontent] " << tkHistoMap_[layer]->getTProfile2D()->GetBinContent(xybin.ix,xybin.iy);
159  for(size_t ii=0;ii<4;ii++)
160  for(size_t jj=0;jj<11;jj++){
161  LogTrace("TkHistoMap") << "[TkHistoMap::setbincontent] " << ii << " " << jj << " " << tkHistoMap_[layer]->getTProfile2D()->GetBinContent(ii,jj);
162  }
163 #endif
164 }
int ii
Definition: cuy.py:588
std::vector< MonitorElement * > tkHistoMap_
Definition: TkHistoMap.h:53
TkDetMap * tkdetmap_
Definition: TkHistoMap.h:52
TProfile2D * getTProfile2D(std::string name, std::string process, std::string rootfolder, DQMStore *dbe_, bool verb, bool clone)
#define LogTrace(id)
int16_t FindLayer(uint32_t &detid)
Definition: TkDetMap.cc:646
const TkLayerMap::XYbin & getXY(uint32_t &)
Definition: TkDetMap.cc:633

Member Data Documentation

DQMStore* TkHistoMap::dqmStore_
private

Definition at line 51 of file TkHistoMap.h.

Referenced by createTkHistoMap(), folderDefinition(), loadServices(), loadTkHistoMap(), and save().

int TkHistoMap::HistoNumber
private

Definition at line 54 of file TkHistoMap.h.

Referenced by createTkHistoMap(), dumpInTkMap(), and loadTkHistoMap().

std::string TkHistoMap::MapName_
private

Definition at line 55 of file TkHistoMap.h.

Referenced by getLayerName(), loadTkHistoMap(), saveAsCanvas(), and TkHistoMap().

TkDetMap* TkHistoMap::tkdetmap_
private
std::vector<MonitorElement*> TkHistoMap::tkHistoMap_
private