30 std::ostringstream compid;
31 compid << component_id;
33 if (pos1 == std::string::npos && pos2 == std::string::npos) {
34 if (id_type ==
"fed" || id_type ==
"det" || id_type ==
"fec") {
35 local_histo_id =
description +
"__" + id_type +
"__" + compid.str();
37 local_histo_id =
description +
"__dummy__" + compid.str();
38 edm::LogError(
"SiStripHistoId") <<
" SiStripHistoId::WrongInput "
39 <<
" no such type of component accepted: " << id_type
40 <<
" id_type can be: fed, det, or fec.";
43 local_histo_id =
description +
"_dummy___" + id_type +
"__" + compid.str();
44 edm::LogError(
"SiStripHistoId") <<
" SiStripHistoId::WrongInput "
45 <<
" histogram description cannot contain: __ or: __"
48 return local_histo_id;
58 if (pos1 == std::string::npos && pos2 == std::string::npos) {
59 if (id_type ==
"fed" || id_type ==
"det" || id_type ==
"fec" || id_type ==
"layer" ||
65 LogTrace(
"SiStripHistoId") <<
"Local_histo_ID " << local_histo_id << std::endl;
68 edm::LogError(
"SiStripHistoId") <<
" SiStripHistoId::WrongInput "
69 <<
" no such type of component accepted: " << id_type
70 <<
" id_type can be: fed, det, fec or layer ";
75 <<
" histogram description cannot contain: __ or: __"
78 return local_histo_id;
83 const int buf_len = 50;
84 char temp_str[buf_len];
90 snprintf(temp_str, buf_len,
"TIB__layer__%i", tTopo->
tibLayer(
id));
94 const char *side =
"";
97 else if (tTopo->
tidSide(
id) == 2)
101 snprintf(temp_str, buf_len,
"TID__%s__ring__%i", side, tTopo->
tidRing(
id));
103 snprintf(temp_str, buf_len,
"TID__%s__wheel__%i", side, tTopo->
tidWheel(
id));
108 snprintf(temp_str, buf_len,
"TOB__layer__%i", tTopo->
tobLayer(
id));
112 const char *side =
"";
115 else if (tTopo->
tecSide(
id) == 2)
119 snprintf(temp_str, buf_len,
"TEC__%s__ring__%i", side, tTopo->
tecRing(
id));
131 snprintf(temp_str, buf_len,
"TEC__%s__wheel__%i", side, tTopo->
tecWheel(
id));
136 <<
"no such subdetector type :" << subdet.
subdetId() <<
" no folder set!" << std::endl;
137 snprintf(temp_str, 0,
"%s",
"");
144 uint32_t local_component_id;
146 input >> local_component_id;
147 return local_component_id;
153 size_t length1 = histoid.find(
"__", 0);
154 if (length1 == std::string::npos) {
155 edm::LogWarning(
"SiStripTkDQM|UnregularInput") <<
"no regular histoid. Returning 0";
162 size_t length2 = remain1.find(
"__", 0);
163 if (length2 == std::string::npos) {
164 edm::LogWarning(
"SiStripTkDQM|UnregularInput") <<
"no regular histoid. Returning 0";
173 edm::LogWarning(
"SiStripTkDQM|UnregularInput") <<
"no such whichpart=" << whichpart <<
" returning 0";