29 #define CONTROL_FOLDER_NAME "ControlView"
30 #define MECHANICAL_FOLDER_NAME "MechanicalView"
81 std::stringstream lokal_folder;
86 lokal_folder <<
SEP <<
"FecSlot" << slot;
88 lokal_folder <<
SEP <<
"FecRing" <<
ring;
90 lokal_folder <<
SEP <<
"CcuAddr" << addr;
92 lokal_folder <<
SEP <<
"CcuChan" << chan;
135 layer=tTopo->
tidRing(detid) * ( tTopo->
tidSide(detid)==1 ? -1 : +1);
142 layer=tTopo->
tecRing(detid) * ( tTopo->
tecSide(detid)==1 ? -1 : +1);
147 edm::LogWarning(
"SiStripMonitorTrack") <<
"WARNING!!! this detid does not belong to tracker" << std::endl;
149 return std::make_pair(cSubDet,layer);
163 ss <<
SEP <<
"TIB" <<
SEP <<
"layer_" << layer <<
SEP;
165 ss <<
SEP <<
"TID" <<
SEP <<
"side_" << side <<
SEP <<
"wheel_" << layer <<
SEP;
167 ss <<
SEP <<
"TOB" <<
SEP <<
"layer_" << layer <<
SEP;
169 ss <<
SEP <<
"TEC" <<
SEP <<
"side_" << side <<
SEP <<
"wheel_" << layer <<
SEP;
172 edm::LogWarning(
"SiStripTkDQM|WrongInput")<<
"no such SubDet :"<< subDet <<
" no folder set!"<<std::endl;
182 std::stringstream rest;
191 else rest <<
"forward_strings" <<
SEP;
193 else rest <<
"internal_strings" <<
SEP;
194 rest <<
"string_" << tTopo->
tibString(rawdetid) << SEP <<
"module_" << rawdetid;
199 rest<<
"ring_" << tTopo->
tidRing(rawdetid) <<
SEP;
201 if (tTopo->
tidIsStereo(rawdetid)) rest <<
"stereo_modules" <<
SEP;
202 else rest <<
"mono_modules" <<
SEP;
203 rest <<
"module_" << rawdetid;
209 else rest <<
"forward_rods" <<
SEP;
210 rest <<
"rod_" << tTopo->
tobRod(rawdetid) << SEP<<
"module_" << rawdetid;
216 else rest <<
"forward_petals" <<
SEP;
221 if (tTopo->
tecIsStereo(rawdetid)) rest <<
"stereo_modules" << SEP;
222 else rest <<
"mono_modules" <<
SEP;
224 rest <<
"module_" << rawdetid;
227 edm::LogWarning(
"SiStripTkDQM|WrongInput")<<
"no such subdetector type :"<<stripdet.
subDetector() <<
" no folder set!"<<std::endl;
230 lokal_folder += rest.str();
241 std::ostringstream rest;
246 int tib_layer = tTopo->
tibLayer(rawdetid);
247 if (
abs(layer) != tib_layer) {
248 edm::LogWarning(
"SiStripTkDQM|Layer mismatch!!!")<<
" expect "<<
abs(layer) <<
" but getting " << tTopo->
tibLayer(rawdetid) <<std::endl;
255 int tid_ring = tTopo->
tidRing(rawdetid);
257 if(
abs(layer) != tid_ring) {
258 edm::LogWarning(
"SiStripTkDQM|Layer mismatch!!!")<<
" expect "<<
abs(layer) <<
" but getting " << tTopo->
tidRing(rawdetid) <<std::endl;
263 int tid_wheel = tTopo->
tidWheel(rawdetid);
264 if (
abs(layer) != tid_wheel) {
265 edm::LogWarning(
"SiStripTkDQM|Layer mismatch!!!")<<
" expect "<<
abs(layer) <<
" but getting " << tTopo->
tidWheel(rawdetid) <<std::endl;
273 int tob_layer = tTopo->
tobLayer(rawdetid);
274 if (
abs(layer) != tob_layer) {
275 edm::LogWarning(
"SiStripTkDQM|Layer mismatch!!!")<<
" expect "<<
abs(layer) <<
" but getting " << tTopo->
tobLayer(rawdetid) <<std::endl;
283 int tec_ring = tTopo->
tecRing(rawdetid);
284 if (
abs(layer) != tec_ring) {
285 edm::LogWarning(
"SiStripTkDQM|Layer mismatch!!!")<<
" expect "<<
abs(layer) <<
" but getting " << tTopo->
tecRing(rawdetid) <<std::endl;
290 int tec_wheel = tTopo->
tecWheel(rawdetid);
291 if (
abs(layer) != tec_wheel) {
292 edm::LogWarning(
"SiStripTkDQM|Layer mismatch!!!")<<
" expect "<<
abs(layer) <<
" but getting " << tTopo->
tecWheel(rawdetid) <<std::endl;
299 edm::LogWarning(
"SiStripTkDQM|WrongInput")<<
"no such subdetector type :"<<stripdet.
subDetector()<<
" no folder set!"<<std::endl;
303 lokal_folder += rest.str();
310 folder_name = subdet_and_tag.first;
348 edm::LogWarning(
"SiStripTkDQM|WrongInput")<<
"no such subdetector type :"<<stripdet.
subDetector()<<
" no folder set!"<<std::endl;
356 std::pair<std::string, std::string>
result;
362 subdet_folder =
"TIB";
363 result.second = subdet_folder;
366 subdet_folder =
"TOB";
367 result.second = subdet_folder;
370 if (tTopo->
tidSide(detid) == 2) {
371 subdet_folder =
"TID/side_2";
372 result.second =
"TID__side__2";
373 }
else if (tTopo->
tidSide(detid) == 1) {
374 subdet_folder =
"TID/side_1";
375 result.second =
"TID__side__1";
379 if (tTopo->
tecSide(detid) == 2) {
380 subdet_folder =
"TEC/side_2";
381 result.second =
"TEC__side__2";
382 }
else if (tTopo->
tecSide(detid) == 1) {
383 subdet_folder =
"TEC/side_1";
384 result.second =
"TEC__side__1";
389 edm::LogWarning(
"SiStripCommon") <<
"WARNING!!! this detid does not belong to tracker" << std::endl;
393 result.first += subdet_folder;
409 std::stringstream rest;
417 else rest <<
"forward_strings" <<
SEP;
419 else rest <<
"internal_strings" <<
SEP;
420 rest <<
"string_" << tib.
stringNumber() << SEP <<
"module_" << rawdetid;
425 rest<<
"ring_" << tid.
ring() <<
SEP;
427 if (tid.
isStereo()) rest <<
"stereo_modules" <<
SEP;
428 else rest <<
"mono_modules" <<
SEP;
429 rest <<
"module_" << rawdetid;
435 else rest <<
"forward_rods" <<
SEP;
436 rest <<
"rod_" << tob.
rodNumber() << SEP<<
"module_" << rawdetid;
442 else rest <<
"forward_petals" <<
SEP;
447 if (tec.
isStereo()) rest <<
"stereo_modules" << SEP;
448 else rest <<
"mono_modules" <<
SEP;
450 rest <<
"module_" << rawdetid;
453 edm::LogWarning(
"SiStripTkDQM|WrongInput")<<
"no such subdetector type :"<<stripdet.
subDetector() <<
" no folder set!"<<std::endl;
456 lokal_folder += rest.str();
void setSiStripControlFolder(unsigned short slot=all_, unsigned short ring=all_, unsigned short addr=all_, unsigned short chan=all_)
bool isZMinusSide() const
unsigned int rodNumber() const
void setSiStripTopControlFolder()
unsigned int petalNumber() const
unsigned int stringNumber() const
void setSiStripFolderName(std::string name)
unsigned int tibLayer(const DetId &id) const
unsigned int tibString(const DetId &id) const
void getSubDetFolder(const uint32_t &detid, const TrackerTopology *tTopo, std::string &folder_name)
unsigned int tidRing(const DetId &id) const
std::string getSiStripTopControlFolder()
#define CONTROL_FOLDER_NAME
unsigned int tecRing(const DetId &id) const
ring id
void getLayerFolderName(std::stringstream &ss, uint32_t rawdetid, const TrackerTopology *tTopo, bool ring_flag=0)
std::pair< std::string, int32_t > GetSubDetAndLayer(const uint32_t &detid, const TrackerTopology *tTopo, bool ring_flag=0)
unsigned int tidWheel(const DetId &id) const
unsigned int side() const
positive or negative id
bool tidIsStereo(const DetId &id) const
unsigned int layerNumber() const
void setDetectorFolder(uint32_t rawdetid, const TrackerTopology *tTopo)
void getSubDetLayerFolderName(std::stringstream &ss, SiStripDetId::SubDetector subDet, uint32_t layer, uint32_t side=0)
std::string getSiStripControlFolder(unsigned short slot=all_, unsigned short ring=all_, unsigned short addr=all_, unsigned short chan=all_)
bool isExternalString() const
bool tecIsStereo(const DetId &id) const
bool isZMinusSide() const
bool tibIsExternalString(const DetId &id) const
unsigned int tidSide(const DetId &id) const
unsigned int layerNumber() const
bool tibIsZMinusSide(const DetId &id) const
bool tobIsZMinusSide(const DetId &id) const
unsigned int ring() const
ring id
static unsigned short const all_
virtual ~SiStripFolderOrganizer()
std::string TopFolderName
Detector identifier class for the strip tracker.
SubDetector subDetector() const
bool tecIsBackPetal(const DetId &id) const
std::string getSiStripFolder()
void setLayerFolder(uint32_t rawdetid, const TrackerTopology *tTopo, int32_t layer=0, bool ring_flag=0)
unsigned int side() const
positive or negative id
unsigned int wheel() const
wheel id
std::pair< std::string, std::string > getSubDetFolderAndTag(const uint32_t &detid, const TrackerTopology *tTopo)
unsigned int ringNumber() const
void getFolderName(int32_t rawdetid, const TrackerTopology *tTopo, std::string &lokal_folder)
unsigned int tecPetalNumber(const DetId &id) const
unsigned int tobRod(const DetId &id) const
unsigned int tecWheel(const DetId &id) const
void setCurrentFolder(const std::string &fullpath)
unsigned int tobLayer(const DetId &id) const
#define MECHANICAL_FOLDER_NAME
unsigned int tecSide(const DetId &id) const
unsigned int wheel() const
wheel id