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
list path
Definition: scaleCards.py:51
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 163 of file TkHistoMap.cc.

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

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

163  {
164 #ifdef debug_TkHistoMap
165  LogTrace("TkHistoMap") << "[TkHistoMap::add]";
166 #endif
167  int16_t layer=tkdetmap_->FindLayer(detid);
169  setBinContent(detid,tkHistoMap_[layer]->getTProfile2D()->GetBinContent(tkHistoMap_[layer]->getTProfile2D()->GetBin(xybin.ix,xybin.iy))+value);
170 
171 }
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:146
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, 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)
list path
Definition: scaleCards.py:51
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:1175
void TkHistoMap::dumpInTkMap ( TrackerMap tkmap,
bool  dumpEntries = false 
)

Definition at line 184 of file TkHistoMap.cc.

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

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

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

Definition at line 130 of file TkHistoMap.cc.

References TkDetMap::FindLayer(), TkDetMap::getXY(), 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().

130  {
131  int16_t layer=tkdetmap_->FindLayer(detid);
133 #ifdef debug_TkHistoMap
134  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();
135 #endif
136  tkHistoMap_[layer]->getTProfile2D()->Fill(xybin.x,xybin.y,value);
137 
138 #ifdef debug_TkHistoMap
139  LogTrace("TkHistoMap") << "[TkHistoMap::fill] " << tkHistoMap_[layer]->getTProfile2D()->GetBinContent(xybin.ix,xybin.iy);
140  for(size_t ii=0;ii<4;ii++)
141  for(size_t jj=0;jj<11;jj++)
142  LogTrace("TkHistoMap") << "[TkHistoMap::fill] " << ii << " " << jj << " " << tkHistoMap_[layer]->getTProfile2D()->GetBinContent(ii,jj);
143 #endif
144 }
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 118 of file TkHistoMap.cc.

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

118  {
119  ifstream file;
120  file.open(filename.c_str());
121  float value;
122  uint32_t detid;
123  while (file.good()){
124  file >> detid >> value;
125  fill(detid,value);
126  }
127  file.close();
128 }
void fill(uint32_t &detid, float value)
Definition: TkHistoMap.cc:130
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, scaleCards::path, DQMStore::setCurrentFolder(), 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 
101  if(mechanicalView){
102  std::stringstream ss;
103 
104  SiStripFolderOrganizer folderOrg;
105 
107  uint32_t subdetlayer, side;
108  tkdetmap_->getSubDetLayerSide(layer,subDet,subdetlayer,side);
109  folderOrg.getSubDetLayerFolderName(ss,subDet,subdetlayer,side);
110 
111  folder = ss.str();
112  }
113  dqmStore_->setCurrentFolder(folder);
114  return folder;
115 }
DQMStore * dqmStore_
Definition: TkHistoMap.h:51
void getSubDetLayerFolderName(std::stringstream &ss, SiStripDetId::SubDetector subDet, uint32_t layer, uint32_t side=0)
list path
Definition: scaleCards.py:51
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:429
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 178 of file TkHistoMap.cc.

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

Referenced by dumpInTkMap().

178  {
179  int16_t layer=tkdetmap_->FindLayer(detid);
181  return tkHistoMap_[layer]->getTProfile2D()->GetBinEntries(tkHistoMap_[layer]->getTProfile2D()->GetBin(xybin.ix,xybin.iy));
182 }
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];};
unsigned int layerNumber(align::ID)
Layer number increases with rho from 1 to 8.
Definition: TIBNameSpace.h:85
std::vector< MonitorElement * > tkHistoMap_
Definition: TkHistoMap.h:53
float TkHistoMap::getValue ( uint32_t &  detid)

Definition at line 173 of file TkHistoMap.cc.

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

Referenced by dumpInTkMap().

173  {
174  int16_t layer=tkdetmap_->FindLayer(detid);
176  return tkHistoMap_[layer]->getTProfile2D()->GetBinContent(tkHistoMap_[layer]->getTProfile2D()->GetBin(xybin.ix,xybin.iy));
177 }
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_, 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
list path
Definition: scaleCards.py:51
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1468
#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(), and APVShotsAnalyzer::endJob().

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

Definition at line 202 of file TkHistoMap.cc.

References f, i, MapName_, 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().

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

References TkDetMap::FindLayer(), getTProfile2D(), TkDetMap::getXY(), 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().

146  {
147  int16_t layer=tkdetmap_->FindLayer(detid);
149  tkHistoMap_[layer]->getTProfile2D()->SetBinEntries(tkHistoMap_[layer]->getTProfile2D()->GetBin(xybin.ix,xybin.iy),1);
150  tkHistoMap_[layer]->getTProfile2D()->SetBinContent(tkHistoMap_[layer]->getTProfile2D()->GetBin(xybin.ix,xybin.iy),value);
151 
152 #ifdef debug_TkHistoMap
153  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);
154 
155  LogTrace("TkHistoMap") << "[TkHistoMap::setbincontent] " << tkHistoMap_[layer]->getTProfile2D()->GetBinContent(xybin.ix,xybin.iy);
156  for(size_t ii=0;ii<4;ii++)
157  for(size_t jj=0;jj<11;jj++){
158  LogTrace("TkHistoMap") << "[TkHistoMap::setbincontent] " << ii << " " << jj << " " << tkHistoMap_[layer]->getTProfile2D()->GetBinContent(ii,jj);
159  }
160 #endif
161 }
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