7 LogTrace(
"TkHistoMap") <<
"TkHistoMap::constructor without parameters";
8 load(tkDetMap,
"", 0.0
f,
false,
false,
false);
13 : HistoNumber(35), MapName_(
MapName) {
14 LogTrace(
"TkHistoMap") <<
"TkHistoMap::constructor with parameters";
15 load(tkDetMap,
path, baseline, mechanicalView,
false);
27 : HistoNumber(35), MapName_(
MapName) {
28 LogTrace(
"TkHistoMap") <<
"TkHistoMap::constructor with parameters";
29 load(tkDetMap,
path, baseline, mechanicalView, isTH2F);
42 : HistoNumber(35), MapName_(
MapName) {
43 LogTrace(
"TkHistoMap") <<
"TkHistoMap::constructor with parameters";
44 load(tkDetMap,
path, baseline, mechanicalView, isTH2F);
55 if (tkDetMap ==
nullptr) {
56 throw cms::Exception(
"LogicError") <<
" expected pointer to TkDetMap is null!\n";
69 <<
"\n------------------------------------------" 70 "\nUnAvailable Service DQMStore: please insert in the configuration file an instance like" 71 "\n\tprocess.load(\"DQMServices.Core.DQMStore_cfg\")" 72 "\n------------------------------------------";
89 #ifdef debug_TkHistoMap 91 <<
" find " <<
folder.find_last_of(
"/") <<
" length " <<
folder.length();
96 #ifdef debug_TkHistoMap 99 <<
folder.find_last_of(
"/") <<
" length " <<
folder.length();
110 bool mechanicalView) {
123 if (bookTH2F ==
false) {
130 for (
size_t ix = 1; ix <= (
unsigned int)nchX; ++ix)
131 for (
size_t iy = 1; iy <= (
unsigned int)nchY; ++iy)
133 me->Fill(1. * (lowX + ix - .5), 1. * (lowY + iy - .5), baseline);
137 #ifdef debug_TkHistoMap 153 if (mechanicalView) {
154 std::stringstream
ss;
160 uint32_t subdetlayer = 0, side = 0;
175 throw cms::Exception(
"LogicError") <<
"failed to open input file" << std::endl;
180 while (
file.good()) {
190 edm::LogError(
"TkHistoMap") <<
" could not fill for detid " << detid.
rawId() <<
", as the layer is invalid";
195 #ifdef debug_TkHistoMap 196 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::fill] Fill detid " << detid.
rawId() <<
" Layer " <<
layer <<
" value " 197 <<
value <<
" ix,iy " << xybin.
ix <<
" " << xybin.
iy <<
" " << xybin.
x <<
" " << xybin.
y <<
" " 204 #ifdef debug_TkHistoMap 205 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::fill] " 207 for (
size_t ii = 0;
ii < 4;
ii++)
208 for (
size_t jj = 0;
jj < 11;
jj++) {
210 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::fill] " <<
ii <<
" " <<
jj <<
" " 213 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::fill] " <<
ii <<
" " <<
jj <<
" " 223 <<
", as the layer is invalid";
237 #ifdef debug_TkHistoMap 238 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::setbincontent] setBinContent detid " << detid.
rawId() <<
" Layer " <<
layer 239 <<
" value " <<
value <<
" ix,iy " << xybin.
ix <<
" " << xybin.
iy <<
" " << xybin.
x <<
" " 243 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::setbincontent] " 245 for (
size_t ii = 0;
ii < 4;
ii++)
246 for (
size_t jj = 0;
jj < 11;
jj++) {
247 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::setbincontent] " <<
ii <<
" " <<
jj <<
" " 254 #ifdef debug_TkHistoMap 255 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::add]";
259 edm::LogError(
"TkHistoMap") <<
" could not add for detid " << detid.
rawId() <<
", as the layer is invalid";
278 edm::LogError(
"TkHistoMap") <<
" could not getValue for detid " << detid.
rawId() <<
", as the layer is invalid";
293 edm::LogError(
"TkHistoMap") <<
" could not getValue for detid " << detid.
rawId() <<
", as the layer is invalid";
311 for (
size_t i = 0;
i < dets.size(); ++
i) {
MonitorElement * bookProfile2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, double lowZ, double highZ, char const *option="s", FUNC onbooking=NOOP())
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)
virtual void setCurrentFolder(std::string const &fullpath)
void fillFromAscii(const std::string &filename)
void load(const TkDetMap *tkDetMap, const std::string &path, float baseline, bool mechanicalView, bool isTH2F, bool createTkMap=true)
Log< level::Error, false > LogError
std::vector< MonitorElement * > tkHistoMap_
std::vector< DetId > getDetsForLayer(int layer) const
void getSubDetLayerFolderName(std::stringstream &ss, SiStripDetId::SubDetector subDet, uint32_t layer, uint32_t side=0)
void save(const std::string &filename)
const TkLayerMap::XYbin & getXY(DetId detid, DetId &cached_detid, int16_t &cached_layer, TkLayerMap::XYbin &cached_XYbin) const
int16_t findLayer(DetId detid, DetId &cached_detid, int16_t &cached_layer, TkLayerMap::XYbin &cached_XYbin) const
void createTkHistoMap(DQMStore::IBooker &ibooker, const std::string &path, const std::string &MapName, float baseline, bool mechanicalView)
TkLayerMap::XYbin cached_XYbin
void meBookerGetter(iFunc f)
DetId getDetFromBin(int layer, int ix, int iy) const
void dumpInTkMap(TrackerMap *tkmap, bool dumpEntries=false)
void getComponents(int layer, int &nchX, double &lowX, double &highX, int &nchY, double &lowY, double &highY) const
constexpr uint32_t rawId() const
get the raw id
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
void fill(DetId detid, float value)
const TkDetMap * tkdetmap_
void saveAsCanvas(const std::string &filename, const std::string &options="", const std::string &mode="RECREATE")
TkHistoMap(const TkDetMap *tkDetMap, DQMStore::IBooker &ibooker, const std::string &path, const std::string &MapName, float baseline=0, bool mechanicalView=false, bool isTH2F=false)
DQM_DEPRECATED void save(std::string const &filename, std::string const &path="")
void loadTkHistoMap(const std::string &path, const std::string &MapName, bool mechanicalView=false)
void add(DetId detid, float value)
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)