8 LogTrace(
"TkHistoMap") <<
"TkHistoMap::constructor without parameters";
17 LogTrace(
"TkHistoMap") <<
"TkHistoMap::constructor with parameters";
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------------------------------------------";
33 "\n------------------------------------------"
34 "\nUnAvailable Service TkHistoMap: please insert in the configuration file an instance like"
35 "\n\tprocess.TkDetMap = cms.Service(\"TkDetMap\")"
36 "\n------------------------------------------";
52 #ifdef debug_TkHistoMap
53 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::loadTkHistoMap] folder " << folder <<
" histoName " << fullName <<
" find " << folder.find_last_of(
"/") <<
" length " << folder.length();
55 if(folder.find_last_of(
"/")!=folder.length()-1)
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();
82 for(
size_t ix = 1; ix <= (
unsigned int) nchX; ++ix)
83 for(
size_t iy = 1;iy <= (
unsigned int) nchY; ++iy)
85 me->
Fill(1.*(lowX+ix-.5),1.*(lowY+iy-.5),baseline);
89 #ifdef debug_TkHistoMap
90 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::createTkHistoMap] folder " << folder <<
" histoName " << fullName <<
" layer " << layer <<
" ptr " <<
tkHistoMap_[layer];
97 std::string folder=
path;
98 std::string
name=MapName+std::string(
"_");
102 std::stringstream ss;
107 uint32_t subdetlayer, side;
120 file.open(filename.c_str());
124 file >> detid >>
value;
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();
136 tkHistoMap_[layer]->getTProfile2D()->Fill(xybin.
x,xybin.
y,value);
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);
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);
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);
164 #ifdef debug_TkHistoMap
165 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::add]";
186 std::vector<uint32_t> dets;
188 for(
size_t i=0;
i<dets.size();++
i){
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());
265 TFile *
f =
new TFile(filename.c_str(),mode.c_str());
uint32_t getDetFromBin(int layer, int ix, int iy)
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")
std::vector< MonitorElement * > tkHistoMap_
void saveAsCanvas(std::string filename, std::string options="", std::string mode="RECREATE")
void getSubDetLayerFolderName(std::stringstream &ss, SiStripDetId::SubDetector subDet, uint32_t layer, uint32_t side=0)
float getEntries(uint32_t &detid)
void loadTkHistoMap(std::string path, std::string MapName, bool mechanicalView=false)
void save(std::string filename)
void getDetsForLayer(int layer, std::vector< uint32_t > &output)
void fill(uint32_t &detid, float value)
float getValue(uint32_t &detid)
void createTkHistoMap(std::string &path, std::string &MapName, float &baseline, bool mechanicalView)
TProfile2D * getTProfile2D(std::string name, std::string process, std::string rootfolder, DQMStore *dbe_, bool verb, bool clone)
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
void dumpInTkMap(TrackerMap *tkmap, bool dumpEntries=false)
void setBinContent(uint32_t &detid, float value)
void fillFromAscii(std::string filename)
int16_t FindLayer(uint32_t &detid)
void getSubDetLayerSide(int &in, SiStripDetId::SubDetector &, uint32_t &layer, uint32_t &side)
void getComponents(int &layer, int &nchX, double &lowX, double &highX, int &nchY, double &lowY, double &highY)
const TkLayerMap::XYbin & getXY(uint32_t &)
std::string getLayerName(int &in)
std::string folderDefinition(std::string &path, std::string &MapName, int layer, bool mechanicalView, std::string &fullName)
void add(uint32_t &detid, float value)
void setCurrentFolder(const std::string &fullpath)
void fill(int layer, int ring, int nmod, float x)
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")