11 LogTrace(
"TkHistoMap") <<
"TkHistoMap::constructor without parameters";
22 LogTrace(
"TkHistoMap") <<
"TkHistoMap::constructor with parameters";
33 LogTrace(
"TkHistoMap") <<
"TkHistoMap::constructor with parameters";
41 "\n------------------------------------------"
42 "\nUnAvailable Service DQMStore: please insert in the configuration file an instance like"
43 "\n\tprocess.load(\"DQMServices.Core.DQMStore_cfg\")"
44 "\n------------------------------------------";
49 "\n------------------------------------------"
50 "\nUnAvailable Service TkHistoMap: please insert in the configuration file an instance like"
51 "\n\tprocess.TkDetMap = cms.Service(\"TkDetMap\")"
52 "\n------------------------------------------";
68 #ifdef debug_TkHistoMap
69 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::loadTkHistoMap] folder " << folder <<
" histoName " << fullName <<
" find " << folder.find_last_of(
"/") <<
" length " << folder.length();
71 if(folder.find_last_of(
"/")!=folder.length()-1)
74 #ifdef debug_TkHistoMap
75 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::loadTkHistoMap] folder " << folder <<
" histoName " << fullName <<
" layer " << layer <<
" ptr " <<
tkHistoMap_[layer] <<
" find " << folder.find_last_of(
"/") <<
" length " << folder.length();
98 for(
size_t ix = 1; ix <= (
unsigned int) nchX; ++ix)
99 for(
size_t iy = 1;iy <= (
unsigned int) nchY; ++iy)
101 me->
Fill(1.*(lowX+ix-.5),1.*(lowY+iy-.5),baseline);
105 #ifdef debug_TkHistoMap
106 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::createTkHistoMap] folder " << folder <<
" histoName " << fullName <<
" layer " << layer <<
" ptr " <<
tkHistoMap_[layer];
129 for(
size_t ix = 1; ix <= (
unsigned int) nchX; ++ix)
130 for(
size_t iy = 1;iy <= (
unsigned int) nchY; ++iy)
132 me->
Fill(1.*(lowX+ix-.5),1.*(lowY+iy-.5),baseline);
136 #ifdef debug_TkHistoMap
137 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::createTkHistoMap] folder " << folder <<
" histoName " << fullName <<
" layer " << layer <<
" ptr " <<
tkHistoMap_[layer];
150 std::stringstream
ss;
156 uint32_t subdetlayer = 0, side = 0;
170 file.open(filename.c_str());
174 file >> detid >>
value;
183 #ifdef debug_TkHistoMap
184 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();
186 tkHistoMap_[layer]->getTProfile2D()->Fill(xybin.
x,xybin.
y,value);
188 #ifdef debug_TkHistoMap
189 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::fill] " <<
tkHistoMap_[layer]->getTProfile2D()->GetBinContent(xybin.
ix,xybin.
iy);
190 for(
size_t ii=0;
ii<4;
ii++)
191 for(
size_t jj=0;
jj<11;
jj++)
192 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::fill] " <<
ii <<
" " <<
jj <<
" " <<
tkHistoMap_[layer]->getTProfile2D()->GetBinContent(
ii,
jj);
202 #ifdef debug_TkHistoMap
203 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);
205 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::setbincontent] " <<
tkHistoMap_[layer]->getTProfile2D()->GetBinContent(xybin.
ix,xybin.
iy);
206 for(
size_t ii=0;
ii<4;
ii++)
207 for(
size_t jj=0;
jj<11;
jj++){
208 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::setbincontent] " <<
ii <<
" " <<
jj <<
" " <<
tkHistoMap_[layer]->getTProfile2D()->GetBinContent(
ii,
jj);
214 #ifdef debug_TkHistoMap
215 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::add]";
236 std::vector<uint32_t> dets;
238 for(
size_t i=0;
i<dets.size();++
i){
315 TFile *
f =
new TFile(filename.c_str(),mode.c_str());
void setSiStripFolderName(std::string name)
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)
uint32_t getDetFromBin(int layer, int ix, int iy) const
float getEntries(uint32_t &detid)
void loadTkHistoMap(std::string path, std::string MapName, bool mechanicalView=false)
void save(std::string filename)
tuple path
else: Piece not in the list, fine.
void getSubDetLayerSide(int &in, SiStripDetId::SubDetector &, uint32_t &layer, uint32_t &side) const
std::string getLayerName(int &in) const
MonitorElement * bookProfile2D(Args &&...args)
void fill(uint32_t &detid, float value)
TkLayerMap::XYbin cached_XYbin
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 getDetsForLayer(int layer, std::vector< uint32_t > &output) const
void dumpInTkMap(TrackerMap *tkmap, bool dumpEntries=false)
void setBinContent(uint32_t &detid, float value)
void getComponents(int layer, int &nchX, double &lowX, double &highX, int &nchY, double &lowY, double &highY) const
void fillFromAscii(std::string filename)
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", const uint32_t run=0, const uint32_t lumi=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE", const bool resetMEsAfterWriting=false)
int16_t FindLayer(uint32_t &detid, uint32_t &cached_detid, int16_t &cached_layer, TkLayerMap::XYbin &cached_XYbin) const
std::string folderDefinition(std::string &path, std::string &MapName, int layer, bool mechanicalView, std::string &fullName)
const TkLayerMap::XYbin & getXY(uint32_t &, uint32_t &cached_detid, int16_t &cached_layer, TkLayerMap::XYbin &cached_XYbin) const
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")