9 LogTrace(
"TkHistoMap") <<
"TkHistoMap::constructor without parameters";
10 load(tkDetMap,
"", 0.0
f,
false,
false,
false);
17 LogTrace(
"TkHistoMap") <<
"TkHistoMap::constructor with parameters";
18 load(tkDetMap, path, baseline, mechanicalView,
false);
29 LogTrace(
"TkHistoMap") <<
"TkHistoMap::constructor with parameters";
30 load(tkDetMap, path, baseline, mechanicalView, isTH2F);
41 LogTrace(
"TkHistoMap") <<
"TkHistoMap::constructor with parameters";
42 load(tkDetMap, path, baseline, mechanicalView,
false);
58 "\n------------------------------------------" 59 "\nUnAvailable Service DQMStore: please insert in the configuration file an instance like" 60 "\n\tprocess.load(\"DQMServices.Core.DQMStore_cfg\")" 61 "\n------------------------------------------";
79 #ifdef debug_TkHistoMap 80 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::loadTkHistoMap] folder " << folder <<
" histoName " << fullName <<
" find " << folder.find_last_of(
"/") <<
" length " << folder.length();
82 if (folder.find_last_of(
"/")!=folder.length()-1)
85 #ifdef debug_TkHistoMap 86 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::loadTkHistoMap] folder " << folder <<
" histoName " << fullName <<
" layer " << layer <<
" ptr " <<
tkHistoMap_[layer] <<
" find " << folder.find_last_of(
"/") <<
" length " << folder.length();
104 folder=
folderDefinition(ibooker, path, MapName,layer,mechanicalView,fullName);
108 me = ibooker.
bookProfile2D(fullName.c_str(),fullName.c_str(),
114 me = ibooker.
book2D(fullName.c_str(),fullName.c_str(),
120 for(
size_t ix = 1; ix <= (
unsigned int) nchX; ++ix)
121 for(
size_t iy = 1;iy <= (
unsigned int) nchY; ++iy)
123 me->
Fill(1.*(lowX+ix-.5),1.*(lowY+iy-.5),baseline);
127 #ifdef debug_TkHistoMap 128 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::createTkHistoMap] folder " << folder <<
" histoName " << fullName <<
" layer " << layer <<
" ptr " <<
tkHistoMap_[layer];
139 std::stringstream ss;
145 uint32_t subdetlayer = 0, side = 0;
157 file.open(filename.c_str());
161 file >> detid >>
value;
170 #ifdef debug_TkHistoMap 171 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::fill] Fill detid " << detid.
rawId() <<
" Layer " << layer <<
" value " << value <<
" ix,iy " << xybin.
ix <<
" " << xybin.
iy <<
" " << xybin.
x <<
" " << xybin.
y <<
" " <<
tkHistoMap_[layer]->getTProfile2D()->GetName();
174 tkHistoMap_[layer]->getTProfile2D()->Fill(xybin.
x,xybin.
y,value);
178 #ifdef debug_TkHistoMap 179 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::fill] " <<
tkHistoMap_[layer]->getTProfile2D()->GetBinContent(xybin.
ix,xybin.
iy);
180 for(
size_t ii=0;
ii<4;
ii++)
181 for(
size_t jj=0;
jj<11;
jj++){
183 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::fill] " <<
ii <<
" " <<
jj <<
" " <<
tkHistoMap_[layer]->getTProfile2D()->GetBinContent(
ii,
jj);
201 #ifdef debug_TkHistoMap 202 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::setbincontent] setBinContent detid " << detid.
rawId() <<
" 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);
204 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::setbincontent] " <<
tkHistoMap_[layer]->getTProfile2D()->GetBinContent(xybin.
ix,xybin.
iy);
205 for(
size_t ii=0;
ii<4;
ii++)
206 for(
size_t jj=0;
jj<11;
jj++){
207 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::setbincontent] " <<
ii <<
" " <<
jj <<
" " <<
tkHistoMap_[layer]->getTProfile2D()->GetBinContent(
ii,
jj);
213 #ifdef debug_TkHistoMap 214 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::add]";
247 for(
size_t i=0;
i<dets.size();++
i){
322 TFile *
f =
new TFile(filename.c_str(),mode.c_str());
void setSiStripFolderName(std::string name)
static std::string getLayerName(int in)
static void getSubDetLayerSide(int in, SiStripDetId::SubDetector &, uint32_t &layer, uint32_t &side)
void setBinContent(DetId detid, float value)
void fillFromAscii(const std::string &filename)
constexpr uint32_t rawId() const
get the raw id
void load(const TkDetMap *tkDetMap, const std::string &path, float baseline, bool mechanicalView, bool isTH2F, bool createTkMap=true)
std::vector< DetId > getDetsForLayer(int layer) const
std::vector< MonitorElement * > tkHistoMap_
static ELmap const & loadMap()
void getSubDetLayerFolderName(std::stringstream &ss, SiStripDetId::SubDetector subDet, uint32_t layer, uint32_t side=0)
void save(const std::string &filename)
void setCurrentFolder(std::string const &fullpath)
void createTkHistoMap(DQMStore::IBooker &ibooker, const std::string &path, const std::string &MapName, float baseline, bool mechanicalView)
MonitorElement * bookProfile2D(Args &&...args)
TkLayerMap::XYbin cached_XYbin
TkHistoMap(const TkDetMap *tkDetMap, DQMStore::IBooker &ibooker, const std::string &path, const std::string &MapName, float baseline=0, bool mechanicalView=false)
void dumpInTkMap(TrackerMap *tkmap, bool dumpEntries=false)
void getComponents(int layer, int &nchX, double &lowX, double &highX, int &nchY, double &lowY, double &highY) const
int16_t findLayer(DetId detid, DetId &cached_detid, int16_t &cached_layer, TkLayerMap::XYbin &cached_XYbin) const
MonitorElement * book2D(Args &&...args)
void fill(DetId detid, float value)
void save(std::string const &filename, std::string const &path="", std::string const &pattern="", std::string const &rewrite="", uint32_t run=0, uint32_t lumi=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, std::string const &fileupdate="RECREATE")
const TkDetMap * tkdetmap_
void saveAsCanvas(const std::string &filename, const std::string &options="", const std::string &mode="RECREATE")
void loadTkHistoMap(const std::string &path, const std::string &MapName, bool mechanicalView=false)
DetId getDetFromBin(int layer, int ix, int iy) const
void add(DetId detid, float value)
const TkLayerMap::XYbin & getXY(DetId detid, DetId &cached_detid, int16_t &cached_layer, TkLayerMap::XYbin &cached_XYbin) const
void meBookerGetter(iFunc f)
float getEntries(DetId detid)
float getValue(DetId detid)
void fill(int layer, int ring, int nmod, float x)
std::string folderDefinition(DQMStore::IBooker &ibooker, std::string folder, const std::string &MapName, int layer, bool mechanicalView, std::string &fullName)