CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes
SiStripFolderOrganizer Class Reference

#include <DQM/SiStripCommon/interface/SiStripFolderOrganizer.h>

Public Member Functions

void getFolderName (int32_t rawdetid, const TrackerTopology *tTopo, std::string &lokal_folder)
 
void getFolderName (int32_t rawdetid, std::string &lokal_folder)
 
void getLayerFolderName (std::stringstream &ss, uint32_t rawdetid, const TrackerTopology *tTopo, bool ring_flag=0)
 
std::string getSiStripControlFolder (unsigned short slot=all_, unsigned short ring=all_, unsigned short addr=all_, unsigned short chan=all_)
 
std::string getSiStripFolder ()
 
std::string getSiStripTopControlFolder ()
 
std::pair< std::string, int32_t > GetSubDetAndLayer (const uint32_t &detid, const TrackerTopology *tTopo, bool ring_flag=0)
 
void getSubDetFolder (const uint32_t &detid, const TrackerTopology *tTopo, std::string &folder_name)
 
std::pair< std::string,
std::string > 
getSubDetFolderAndTag (const uint32_t &detid, const TrackerTopology *tTopo)
 
void getSubDetLayerFolderName (std::stringstream &ss, SiStripDetId::SubDetector subDet, uint32_t layer, uint32_t side=0)
 
void setDetectorFolder (uint32_t rawdetid, const TrackerTopology *tTopo)
 
void setLayerFolder (uint32_t rawdetid, const TrackerTopology *tTopo, int32_t layer=0, bool ring_flag=0)
 
void setSiStripControlFolder (unsigned short slot=all_, unsigned short ring=all_, unsigned short addr=all_, unsigned short chan=all_)
 
void setSiStripFolder ()
 
void setSiStripFolderName (std::string name)
 
void setSiStripTopControlFolder ()
 
 SiStripFolderOrganizer ()
 
virtual ~SiStripFolderOrganizer ()
 

Static Public Attributes

static unsigned short const all_ = 65535
 

Private Member Functions

const SiStripFolderOrganizeroperator= (const SiStripFolderOrganizer &)
 
 SiStripFolderOrganizer (const SiStripFolderOrganizer &)
 

Private Attributes

DQMStoredbe_
 
std::string TopFolderName
 

Detailed Description

Description: <Organizes the folders for the monitoring elements of the SiStrip Tracker. Its methods return strings with names of folders to be created and used.>

Usage: <usage>

Definition at line 28 of file SiStripFolderOrganizer.h.

Constructor & Destructor Documentation

SiStripFolderOrganizer::SiStripFolderOrganizer ( )

Definition at line 32 of file SiStripFolderOrganizer.cc.

References dbe_, cppFunctionSkipper::operator, and TopFolderName.

33 {
34  TopFolderName="SiStrip";
35  // get a pointer to DQMStore
37 }
SiStripFolderOrganizer::~SiStripFolderOrganizer ( )
virtual

Definition at line 40 of file SiStripFolderOrganizer.cc.

41 {
42 }
SiStripFolderOrganizer::SiStripFolderOrganizer ( const SiStripFolderOrganizer )
private

Member Function Documentation

void SiStripFolderOrganizer::getFolderName ( int32_t  rawdetid,
const TrackerTopology tTopo,
std::string &  lokal_folder 
)

Definition at line 184 of file SiStripFolderOrganizer.cc.

References getSubDetLayerFolderName(), SEP, SiStripDetId::subDetector(), SiStripDetId::TEC, TrackerTopology::tecIsBackPetal(), TrackerTopology::tecIsStereo(), TrackerTopology::tecPetalNumber(), TrackerTopology::tecRing(), TrackerTopology::tecSide(), TrackerTopology::tecWheel(), SiStripDetId::TIB, TrackerTopology::tibIsExternalString(), TrackerTopology::tibIsZMinusSide(), TrackerTopology::tibLayer(), TrackerTopology::tibString(), SiStripDetId::TID, TrackerTopology::tidIsStereo(), TrackerTopology::tidRing(), TrackerTopology::tidSide(), TrackerTopology::tidWheel(), SiStripDetId::TOB, TrackerTopology::tobIsZMinusSide(), TrackerTopology::tobLayer(), and TrackerTopology::tobRod().

Referenced by setDetectorFolder().

184  {
185  lokal_folder = "";
186  if(rawdetid == 0 ){ // just top MechanicalFolder if rawdetid==0;
187  return;
188  }
189  std::stringstream rest;
190  SiStripDetId stripdet = SiStripDetId(rawdetid);
191 
192  if (stripdet.subDetector() == SiStripDetId::TIB){
193  // --------------------------- TIB --------------------------- //
194 
195  getSubDetLayerFolderName(rest,stripdet.subDetector(),tTopo->tibLayer(rawdetid));
196 
197  if (tTopo->tibIsZMinusSide(rawdetid)) rest << "backward_strings" << SEP;
198  else rest << "forward_strings" << SEP;
199  if (tTopo->tibIsExternalString(rawdetid)) rest << "external_strings" << SEP;
200  else rest << "internal_strings" << SEP;
201  rest << "string_" << tTopo->tibString(rawdetid) << SEP << "module_" << rawdetid;
202  } else if(stripdet.subDetector() == SiStripDetId::TID){
203  // --------------------------- TID --------------------------- //
204 
205  getSubDetLayerFolderName(rest,stripdet.subDetector(),tTopo->tidWheel(rawdetid),tTopo->tidSide(rawdetid));
206  rest<< "ring_" << tTopo->tidRing(rawdetid) << SEP;
207 
208  if (tTopo->tidIsStereo(rawdetid)) rest << "stereo_modules" << SEP;
209  else rest << "mono_modules" << SEP;
210  rest << "module_" << rawdetid;
211  } else if( stripdet.subDetector() == SiStripDetId::TOB){
212  // --------------------------- TOB --------------------------- //
213 
214  getSubDetLayerFolderName(rest,stripdet.subDetector(),tTopo->tobLayer(rawdetid));
215  if (tTopo->tobIsZMinusSide(rawdetid)) rest << "backward_rods" << SEP;
216  else rest << "forward_rods" << SEP;
217  rest << "rod_" << tTopo->tobRod(rawdetid) << SEP<< "module_" << rawdetid;
218  }else if(stripdet.subDetector() == SiStripDetId::TEC){
219  // --------------------------- TEC --------------------------- //
220 
221  getSubDetLayerFolderName(rest,stripdet.subDetector(),tTopo->tecWheel(rawdetid),tTopo->tecSide(rawdetid));
222  if (tTopo->tecIsBackPetal(rawdetid)) rest << "backward_petals" << SEP;
223  else rest << "forward_petals" << SEP;
224 
225  rest << "petal_" << tTopo->tecPetalNumber(rawdetid) << SEP
226  << "ring_"<< tTopo->tecRing(rawdetid) << SEP;
227 
228  if (tTopo->tecIsStereo(rawdetid)) rest << "stereo_modules" << SEP;
229  else rest << "mono_modules" << SEP;
230 
231  rest << "module_" << rawdetid;
232  }else{
233  // --------------------------- ??? --------------------------- //
234  edm::LogWarning("SiStripTkDQM|WrongInput")<<"no such subdetector type :"<<stripdet.subDetector() <<" no folder set!"<<std::endl;
235  return;
236  }
237  lokal_folder += rest.str();
238 
239 }
unsigned int tibLayer(const DetId &id) const
unsigned int tibString(const DetId &id) const
unsigned int tidRing(const DetId &id) const
unsigned int tecRing(const DetId &id) const
ring id
unsigned int tidWheel(const DetId &id) const
bool tidIsStereo(const DetId &id) const
void getSubDetLayerFolderName(std::stringstream &ss, SiStripDetId::SubDetector subDet, uint32_t layer, uint32_t side=0)
bool tecIsStereo(const DetId &id) const
bool tibIsExternalString(const DetId &id) const
unsigned int tidSide(const DetId &id) const
bool tibIsZMinusSide(const DetId &id) const
bool tobIsZMinusSide(const DetId &id) const
Detector identifier class for the strip tracker.
Definition: SiStripDetId.h:17
SubDetector subDetector() const
Definition: SiStripDetId.h:114
bool tecIsBackPetal(const DetId &id) const
#define SEP
unsigned int tecPetalNumber(const DetId &id) const
unsigned int tobRod(const DetId &id) const
unsigned int tecWheel(const DetId &id) const
unsigned int tobLayer(const DetId &id) const
unsigned int tecSide(const DetId &id) const
void SiStripFolderOrganizer::getFolderName ( int32_t  rawdetid,
std::string &  lokal_folder 
)

Definition at line 446 of file SiStripFolderOrganizer.cc.

References getSubDetLayerFolderName(), TECDetId::isBackPetal(), TIBDetId::isExternalString(), TIDDetId::isStereo(), TECDetId::isStereo(), TOBDetId::isZMinusSide(), TIBDetId::isZMinusSide(), TOBDetId::layerNumber(), TIBDetId::layerNumber(), TECDetId::petalNumber(), TIDDetId::ring(), TECDetId::ringNumber(), TOBDetId::rodNumber(), SEP, TIDDetId::side(), TECDetId::side(), TIBDetId::stringNumber(), SiStripDetId::subDetector(), SiStripDetId::TEC, SiStripDetId::TIB, SiStripDetId::TID, SiStripDetId::TOB, TIDDetId::wheel(), and TECDetId::wheel().

446  {
447  lokal_folder = "";
448  if(rawdetid == 0 ){ // just top MechanicalFolder if rawdetid==0;
449  return;
450  }
451  std::stringstream rest;
452  SiStripDetId stripdet = SiStripDetId(rawdetid);
453 
454  if (stripdet.subDetector() == SiStripDetId::TIB){
455  // --------------------------- TIB --------------------------- //
456  TIBDetId tib = TIBDetId(rawdetid);
457  getSubDetLayerFolderName(rest,stripdet.subDetector(),tib.layerNumber());
458  if (tib.isZMinusSide()) rest << "backward_strings" << SEP;
459  else rest << "forward_strings" << SEP;
460  if (tib.isExternalString()) rest << "external_strings" << SEP;
461  else rest << "internal_strings" << SEP;
462  rest << "string_" << tib.stringNumber() << SEP << "module_" << rawdetid;
463  } else if(stripdet.subDetector() == SiStripDetId::TID){
464  // --------------------------- TID --------------------------- //
465  TIDDetId tid = TIDDetId(rawdetid);
466  getSubDetLayerFolderName(rest,stripdet.subDetector(),tid.wheel(),tid.side());
467  rest<< "ring_" << tid.ring() << SEP;
468 
469  if (tid.isStereo()) rest << "stereo_modules" << SEP;
470  else rest << "mono_modules" << SEP;
471  rest << "module_" << rawdetid;
472  } else if( stripdet.subDetector() == SiStripDetId::TOB){
473  // --------------------------- TOB --------------------------- //
474  TOBDetId tob = TOBDetId(rawdetid);
475  getSubDetLayerFolderName(rest,stripdet.subDetector(),tob.layerNumber());
476  if (tob.isZMinusSide()) rest << "backward_rods" << SEP;
477  else rest << "forward_rods" << SEP;
478  rest << "rod_" << tob.rodNumber() << SEP<< "module_" << rawdetid;
479  }else if(stripdet.subDetector() == SiStripDetId::TEC){
480  // --------------------------- TEC --------------------------- //
481  TECDetId tec = TECDetId(rawdetid);
482  getSubDetLayerFolderName(rest,stripdet.subDetector(),tec.wheel(),tec.side());
483  if (tec.isBackPetal()) rest << "backward_petals" << SEP;
484  else rest << "forward_petals" << SEP;
485 
486  rest << "petal_" << tec.petalNumber() << SEP
487  << "ring_"<< tec.ringNumber() << SEP;
488 
489  if (tec.isStereo()) rest << "stereo_modules" << SEP;
490  else rest << "mono_modules" << SEP;
491 
492  rest << "module_" << rawdetid;
493  }else{
494  // --------------------------- ??? --------------------------- //
495  edm::LogWarning("SiStripTkDQM|WrongInput")<<"no such subdetector type :"<<stripdet.subDetector() <<" no folder set!"<<std::endl;
496  return;
497  }
498  lokal_folder += rest.str();
499 }
bool isZMinusSide() const
Definition: TIBDetId.h:79
unsigned int rodNumber() const
Definition: TOBDetId.h:77
unsigned int petalNumber() const
Definition: TECDetId.h:94
unsigned int stringNumber() const
Definition: TIBDetId.h:87
bool isStereo()
Definition: TIDDetId.h:109
unsigned int side() const
positive or negative id
Definition: TECDetId.h:47
unsigned int layerNumber() const
Definition: TIBDetId.h:83
void getSubDetLayerFolderName(std::stringstream &ss, SiStripDetId::SubDetector subDet, uint32_t layer, uint32_t side=0)
bool isExternalString() const
Definition: TIBDetId.h:99
bool isZMinusSide() const
Definition: TOBDetId.h:69
unsigned int layerNumber() const
Definition: TOBDetId.h:73
bool isStereo()
Definition: TECDetId.h:118
unsigned int ring() const
ring id
Definition: TIDDetId.h:55
Detector identifier class for the strip tracker.
Definition: SiStripDetId.h:17
SubDetector subDetector() const
Definition: SiStripDetId.h:114
#define SEP
bool isBackPetal() const
Definition: TECDetId.h:106
unsigned int side() const
positive or negative id
Definition: TIDDetId.h:45
unsigned int wheel() const
wheel id
Definition: TECDetId.h:52
unsigned int ringNumber() const
Definition: TECDetId.h:98
unsigned int wheel() const
wheel id
Definition: TIDDetId.h:50
void SiStripFolderOrganizer::getLayerFolderName ( std::stringstream &  ss,
uint32_t  rawdetid,
const TrackerTopology tTopo,
bool  ring_flag = 0 
)

Definition at line 341 of file SiStripFolderOrganizer.cc.

References MECHANICAL_FOLDER_NAME, SEP, SiStripDetId::subDetector(), SiStripDetId::TEC, TrackerTopology::tecRing(), TrackerTopology::tecSide(), TrackerTopology::tecWheel(), SiStripDetId::TIB, TrackerTopology::tibLayer(), SiStripDetId::TID, TrackerTopology::tidRing(), TrackerTopology::tidSide(), TrackerTopology::tidWheel(), SiStripDetId::TOB, TrackerTopology::tobLayer(), and TopFolderName.

Referenced by SiStripMonitorDigi::createMEs().

341  {
343  if(rawdetid == 0 ){ // just top MechanicalFolder if rawdetid==0;
344  return;
345  }
346 
347  SiStripDetId stripdet = SiStripDetId(rawdetid);
348  if(stripdet.subDetector() == SiStripDetId::TIB ){
349  // --------------------------- TIB --------------------------- //
350 
351  ss<<SEP<<"TIB"<<SEP<<"layer_"<<tTopo->tibLayer(rawdetid);
352  }else if(stripdet.subDetector() == SiStripDetId::TID){
353  // --------------------------- TID --------------------------- //
354 
355  uint32_t side = tTopo->tidSide(rawdetid);
356  std::stringstream sside;
357  if (side == 1) {
358  sside << "MINUS";
359  } else if (side == 2) {
360  sside << "PLUS";
361  }
362 
363  if(ring_flag){
364  ss<<SEP<<"TID"<<SEP<<sside.str()<<SEP<<"ring_"<<tTopo->tidRing(rawdetid);
365  }else{
366  ss<<SEP<<"TID"<<SEP<<sside.str()<<SEP<<"wheel_"<<tTopo->tidWheel(rawdetid);
367  }
368  }else if(stripdet.subDetector() == SiStripDetId::TOB){
369  // --------------------------- TOB --------------------------- //
370 
371  ss<<SEP<<"TOB"<<SEP<<"layer_"<<tTopo->tobLayer(rawdetid);
372  }else if( stripdet.subDetector() == SiStripDetId::TEC){
373  // --------------------------- TEC --------------------------- //
374 
375  uint32_t side = tTopo->tecSide(rawdetid);
376  std::stringstream sside;
377  if (side == 1) {
378  sside << "MINUS";
379  } else if (side == 2) {
380  sside << "PLUS";
381  }
382 
383  if(ring_flag){
384  ss<<SEP<<"TEC"<<SEP<<sside.str()<<SEP<<"ring_"<<tTopo->tecRing(rawdetid);
385  }else{
386  ss<<SEP<<"TEC"<<SEP<<sside.str()<<SEP<<"wheel_"<<tTopo->tecWheel(rawdetid);
387  }
388  }else{
389  // --------------------------- ??? --------------------------- //
390  edm::LogWarning("SiStripTkDQM|WrongInput")<<"no such subdetector type :"<<stripdet.subDetector()<<" no folder set!"<<std::endl;
391  return;
392  }
393 }
unsigned int tibLayer(const DetId &id) const
unsigned int tidRing(const DetId &id) const
unsigned int tecRing(const DetId &id) const
ring id
unsigned int tidWheel(const DetId &id) const
unsigned int tidSide(const DetId &id) const
Detector identifier class for the strip tracker.
Definition: SiStripDetId.h:17
SubDetector subDetector() const
Definition: SiStripDetId.h:114
#define SEP
unsigned int tecWheel(const DetId &id) const
unsigned int tobLayer(const DetId &id) const
#define MECHANICAL_FOLDER_NAME
unsigned int tecSide(const DetId &id) const
std::string SiStripFolderOrganizer::getSiStripControlFolder ( unsigned short  slot = all_,
unsigned short  ring = all_,
unsigned short  addr = all_,
unsigned short  chan = all_ 
)

Definition at line 72 of file SiStripFolderOrganizer.cc.

References all_, getSiStripTopControlFolder(), relativeConstraints::ring, SEP, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by setSiStripControlFolder().

79  {
80  std::stringstream lokal_folder;
81  lokal_folder << getSiStripTopControlFolder();
82  // if ( crate != all_ ) {// if ==all_ then remain in top control folder
83  // lokal_folder << SEP << "FecCrate" << crate;
84  if ( slot != all_ ) {
85  lokal_folder << SEP << "FecSlot" << slot;
86  if ( ring != all_ ) {
87  lokal_folder << SEP << "FecRing" << ring;
88  if ( addr != all_ ) {
89  lokal_folder << SEP << "CcuAddr" << addr;
90  if ( chan != all_ ) {
91  lokal_folder << SEP << "CcuChan" << chan;
92  // if ( i2c != all_ ) {
93  // lokal_folder << SEP << "I2cAddr" << i2c;
94  // }
95  }
96  }
97  }
98  }
99  // }
100  std::string folder_name = lokal_folder.str();
101  return folder_name;
102 }
std::string getSiStripTopControlFolder()
static unsigned short const all_
#define SEP
std::string SiStripFolderOrganizer::getSiStripFolder ( )

Definition at line 48 of file SiStripFolderOrganizer.cc.

References TopFolderName.

48  {
49  return TopFolderName;
50 }
std::string SiStripFolderOrganizer::getSiStripTopControlFolder ( )

Definition at line 59 of file SiStripFolderOrganizer.cc.

References CONTROL_FOLDER_NAME, AlCaHLTBitMon_QueryRunRegistry::string, and TopFolderName.

Referenced by getSiStripControlFolder().

59  {
61  return lokal_folder;
62 }
#define CONTROL_FOLDER_NAME
std::pair< std::string, int32_t > SiStripFolderOrganizer::GetSubDetAndLayer ( const uint32_t &  detid,
const TrackerTopology tTopo,
bool  ring_flag = 0 
)

Definition at line 118 of file SiStripFolderOrganizer.cc.

References AlCaHLTBitMon_QueryRunRegistry::string, StripSubdetector::TEC, TrackerTopology::tecRing(), TrackerTopology::tecSide(), TrackerTopology::tecWheel(), StripSubdetector::TIB, TrackerTopology::tibLayer(), StripSubdetector::TID, TrackerTopology::tidRing(), TrackerTopology::tidSide(), TrackerTopology::tidWheel(), StripSubdetector::TOB, and TrackerTopology::tobLayer().

Referenced by MonitorTrackResiduals::analyze(), SiStripRecHitsValid::analyze(), SiStripMonitorTrack::book(), SiStripBaseCondObjDQM::bookSummaryCumulMEs(), SiStripBaseCondObjDQM::bookSummaryMEs(), SiStripBaseCondObjDQM::bookSummaryProfileMEs(), MonitorTrackResiduals::createMEs(), SiStripMonitorDigi::createMEs(), SiStripMonitorCluster::createMEs(), SiStripRecHitsValid::createMEs(), SiStripTrackingRecHitsValid::createMEs(), SiStripMonitorTrack::fillMEs(), and SiStripCertificationInfo::fillSiStripCertificationMEs().

118  {
119  std::string cSubDet;
120  int32_t layer=0;
122  {
124  cSubDet="TIB";
125  layer=tTopo->tibLayer(detid);
126  break;
128  cSubDet="TOB";
129  layer=tTopo->tobLayer(detid);
130  break;
132  cSubDet="TID";
133  if(ring_flag)
134  layer=tTopo->tidRing(detid) * ( tTopo->tidSide(detid)==1 ? -1 : +1);
135  else
136  layer=tTopo->tidWheel(detid) * ( tTopo->tidSide(detid)==1 ? -1 : +1);
137  break;
139  cSubDet="TEC";
140  if(ring_flag)
141  layer=tTopo->tecRing(detid) * ( tTopo->tecSide(detid)==1 ? -1 : +1);
142  else
143  layer=tTopo->tecWheel(detid) * ( tTopo->tecSide(detid)==1 ? -1 : +1);
144  break;
145  default:
146  edm::LogWarning("SiStripMonitorTrack") << "WARNING!!! this detid does not belong to tracker" << std::endl;
147  }
148  return std::make_pair(cSubDet,layer);
149 }
unsigned int tibLayer(const DetId &id) const
unsigned int tidRing(const DetId &id) const
unsigned int tecRing(const DetId &id) const
ring id
unsigned int tidWheel(const DetId &id) const
unsigned int tidSide(const DetId &id) const
unsigned int tecWheel(const DetId &id) const
unsigned int tobLayer(const DetId &id) const
unsigned int tecSide(const DetId &id) const
void SiStripFolderOrganizer::getSubDetFolder ( const uint32_t &  detid,
const TrackerTopology tTopo,
std::string &  folder_name 
)

Definition at line 333 of file SiStripFolderOrganizer.cc.

References getSubDetFolderAndTag().

Referenced by SiStripQualityChecker::fillFaultyModuleStatus(), SiStripDaqInfo::findExcludedModule(), and SiStripTrackerMapCreator::getDetectorFlagAndComment().

333  {
334 
335  std::pair<std::string, std::string> subdet_and_tag = getSubDetFolderAndTag(detid, tTopo);
336  folder_name = subdet_and_tag.first;
337 }
std::pair< std::string, std::string > getSubDetFolderAndTag(const uint32_t &detid, const TrackerTopology *tTopo)
std::pair< std::string, std::string > SiStripFolderOrganizer::getSubDetFolderAndTag ( const uint32_t &  detid,
const TrackerTopology tTopo 
)

Definition at line 397 of file SiStripFolderOrganizer.cc.

References MECHANICAL_FOLDER_NAME, query::result, SEP, AlCaHLTBitMon_QueryRunRegistry::string, StripSubdetector::TEC, TrackerTopology::tecSide(), StripSubdetector::TIB, StripSubdetector::TID, TrackerTopology::tidSide(), StripSubdetector::TOB, and TopFolderName.

Referenced by SiStripMonitorDigi::analyze(), SiStripMonitorCluster::analyze(), SiStripMonitorTrack::book(), SiStripMonitorTrack::clusterInfos(), SiStripMonitorDigi::createMEs(), SiStripMonitorCluster::createMEs(), SiStripRecHitsValid::createMEs(), SiStripMonitorTrack::fillMEs(), and getSubDetFolder().

397  {
398  std::pair<std::string, std::string> result;
399  result.first = TopFolderName + SEP MECHANICAL_FOLDER_NAME SEP;
400  std::string subdet_folder;
402  {
404  subdet_folder = "TIB";
405  result.second = subdet_folder;
406  break;
408  subdet_folder = "TOB";
409  result.second = subdet_folder;
410  break;
412  if (tTopo->tidSide(detid) == 2) {
413  subdet_folder = "TID/PLUS";
414  result.second = "TID__PLUS";
415  } else if (tTopo->tidSide(detid) == 1) {
416  subdet_folder = "TID/MINUS";
417  result.second = "TID__MINUS";
418  }
419  break;
421  if (tTopo->tecSide(detid) == 2) {
422  subdet_folder = "TEC/PLUS";
423  result.second = "TEC__PLUS";
424  } else if (tTopo->tecSide(detid) == 1) {
425  subdet_folder = "TEC/MINUS";
426  result.second = "TEC__MINUS";
427  }
428  break;
429  default:
430  {
431  edm::LogWarning("SiStripCommon") << "WARNING!!! this detid does not belong to tracker" << std::endl;
432  subdet_folder = "";
433  }
434  }
435  result.first += subdet_folder;
436  return result;
437 }
unsigned int tidSide(const DetId &id) const
tuple result
Definition: query.py:137
#define SEP
#define MECHANICAL_FOLDER_NAME
unsigned int tecSide(const DetId &id) const
void SiStripFolderOrganizer::getSubDetLayerFolderName ( std::stringstream &  ss,
SiStripDetId::SubDetector  subDet,
uint32_t  layer,
uint32_t  side = 0 
)

Definition at line 158 of file SiStripFolderOrganizer.cc.

References MECHANICAL_FOLDER_NAME, SEP, SiStripDetId::TEC, SiStripDetId::TIB, SiStripDetId::TID, SiStripDetId::TOB, and TopFolderName.

Referenced by SiStripMonitorMuonHLT::createMEs(), TkHistoMap::folderDefinition(), and getFolderName().

158  {
159  // std::cout << "[SiStripFolderOrganizer::getSubDetLayerFolderName] TopFolderName: " << TopFolderName << std::endl;
161 
162  std::stringstream sside;
163  if (side == 1) {
164  sside << "MINUS";
165  } else if (side == 2) {
166  sside << "PLUS";
167  }
168 
169  if(subDet == SiStripDetId::TIB){
170  ss << SEP << "TIB" << SEP << "layer_" << layer << SEP;
171  } else if(subDet == SiStripDetId::TID){
172  ss << SEP << "TID" << SEP << sside.str() << SEP << "wheel_" << layer << SEP;
173  } else if( subDet == SiStripDetId::TOB){
174  ss << SEP << "TOB" << SEP << "layer_" << layer << SEP;
175  }else if(subDet == SiStripDetId::TEC){
176  ss << SEP << "TEC" << SEP << sside.str() << SEP << "wheel_" << layer << SEP;
177  }else{
178  // --------------------------- ??? --------------------------- //
179  edm::LogWarning("SiStripTkDQM|WrongInput")<<"no such SubDet :"<< subDet <<" no folder set!"<<std::endl;
180  }
181 }
#define SEP
#define MECHANICAL_FOLDER_NAME
const SiStripFolderOrganizer& SiStripFolderOrganizer::operator= ( const SiStripFolderOrganizer )
private
void SiStripFolderOrganizer::setDetectorFolder ( uint32_t  rawdetid,
const TrackerTopology tTopo 
)
void SiStripFolderOrganizer::setLayerFolder ( uint32_t  rawdetid,
const TrackerTopology tTopo,
int32_t  layer = 0,
bool  ring_flag = 0 
)

Definition at line 241 of file SiStripFolderOrganizer.cc.

References funct::abs(), dbe_, MECHANICAL_FOLDER_NAME, SEP, DQMStore::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, SiStripDetId::subDetector(), SiStripDetId::TEC, TrackerTopology::tecRing(), TrackerTopology::tecSide(), TrackerTopology::tecWheel(), SiStripDetId::TIB, TrackerTopology::tibLayer(), SiStripDetId::TID, TrackerTopology::tidRing(), TrackerTopology::tidSide(), TrackerTopology::tidWheel(), SiStripDetId::TOB, TrackerTopology::tobLayer(), and TopFolderName.

Referenced by SiStripMonitorTrack::book(), SiStripBaseCondObjDQM::bookSummaryCumulMEs(), SiStripBaseCondObjDQM::bookSummaryMEs(), SiStripBaseCondObjDQM::bookSummaryProfileMEs(), MonitorTrackResiduals::createMEs(), SiStripMonitorDigi::createMEs(), SiStripMonitorCluster::createMEs(), SiStripRecHitsValid::createMEs(), and SiStripTrackingRecHitsValid::createMEs().

241  {
243  if(rawdetid == 0 ){ // just top MechanicalFolder if rawdetid==0;
244  dbe_->setCurrentFolder(lokal_folder);
245  return;
246  }
247 
248  std::ostringstream rest;
249  SiStripDetId stripdet = SiStripDetId(rawdetid);
250  if(stripdet.subDetector() == SiStripDetId::TIB ){
251  // --------------------------- TIB --------------------------- //
252 
253  int tib_layer = tTopo->tibLayer(rawdetid);
254  if (abs(layer) != tib_layer) {
255  edm::LogWarning("SiStripTkDQM|Layer mismatch!!!")<< " expect "<< abs(layer) << " but getting " << tTopo->tibLayer(rawdetid) <<std::endl;
256  return;
257  }
258  rest<<SEP<<"TIB"<<SEP<<"layer_"<<tTopo->tibLayer(rawdetid);
259  }else if(stripdet.subDetector() == SiStripDetId::TID){
260  // --------------------------- TID --------------------------- //
261 
262  int tid_ring = tTopo->tidRing(rawdetid);
263 
264  // side
265  uint32_t side = tTopo->tidSide(rawdetid);
266  std::stringstream sside;
267  if (side == 1) {
268  sside << "MINUS";
269  } else if (side == 2) {
270  sside << "PLUS";
271  }
272 
273  if(ring_flag){
274  if(abs(layer) != tid_ring) {
275  edm::LogWarning("SiStripTkDQM|Layer mismatch!!!")<< " expect "<< abs(layer) << " but getting " << tTopo->tidRing(rawdetid) <<std::endl;
276  return;
277  }
278  rest<<SEP<<"TID"<<SEP<<sside.str()<<SEP<<"ring_"<<tTopo->tidRing(rawdetid);
279  }else{
280  int tid_wheel = tTopo->tidWheel(rawdetid);
281  if (abs(layer) != tid_wheel) {
282  edm::LogWarning("SiStripTkDQM|Layer mismatch!!!")<< " expect "<< abs(layer) << " but getting " << tTopo->tidWheel(rawdetid) <<std::endl;
283  return;
284  }
285  rest<<SEP<<"TID"<<SEP<<sside.str()<<SEP<<"wheel_"<<tTopo->tidWheel(rawdetid);
286  }
287  }else if(stripdet.subDetector() == SiStripDetId::TOB){
288  // --------------------------- TOB --------------------------- //
289 
290  int tob_layer = tTopo->tobLayer(rawdetid);
291  if (abs(layer) != tob_layer) {
292  edm::LogWarning("SiStripTkDQM|Layer mismatch!!!")<< " expect "<< abs(layer) << " but getting " << tTopo->tobLayer(rawdetid) <<std::endl;
293  return;
294  }
295  rest<<SEP<<"TOB"<<SEP<<"layer_"<<tTopo->tobLayer(rawdetid);
296  }else if( stripdet.subDetector() == SiStripDetId::TEC){
297  // --------------------------- TEC --------------------------- //
298 
299  // side
300  uint32_t side = tTopo->tecSide(rawdetid);
301  std::stringstream sside;
302  if (side == 1) {
303  sside << "MINUS";
304  } else if (side == 2) {
305  sside << "PLUS";
306  }
307 
308  if(ring_flag){
309  int tec_ring = tTopo->tecRing(rawdetid);
310  if (abs(layer) != tec_ring) {
311  edm::LogWarning("SiStripTkDQM|Layer mismatch!!!")<< " expect "<< abs(layer) << " but getting " << tTopo->tecRing(rawdetid) <<std::endl;
312  return;
313  }
314  rest<<SEP<<"TEC"<<SEP<<sside.str()<<SEP<<"ring_"<<tTopo->tecRing(rawdetid);
315  }else{
316  int tec_wheel = tTopo->tecWheel(rawdetid);
317  if (abs(layer) != tec_wheel) {
318  edm::LogWarning("SiStripTkDQM|Layer mismatch!!!")<< " expect "<< abs(layer) << " but getting " << tTopo->tecWheel(rawdetid) <<std::endl;
319  return;
320  }
321  rest<<SEP<<"TEC"<<SEP<<sside.str()<<SEP<<"wheel_"<<tTopo->tecWheel(rawdetid);
322  }
323  }else{
324  // --------------------------- ??? --------------------------- //
325  edm::LogWarning("SiStripTkDQM|WrongInput")<<"no such subdetector type :"<<stripdet.subDetector()<<" no folder set!"<<std::endl;
326  return;
327  }
328 
329  lokal_folder += rest.str();
330  dbe_->setCurrentFolder(lokal_folder);
331 }
unsigned int tibLayer(const DetId &id) const
unsigned int tidRing(const DetId &id) const
unsigned int tecRing(const DetId &id) const
ring id
unsigned int tidWheel(const DetId &id) const
unsigned int tidSide(const DetId &id) const
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
Detector identifier class for the strip tracker.
Definition: SiStripDetId.h:17
SubDetector subDetector() const
Definition: SiStripDetId.h:114
#define SEP
unsigned int tecWheel(const DetId &id) const
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:684
unsigned int tobLayer(const DetId &id) const
#define MECHANICAL_FOLDER_NAME
unsigned int tecSide(const DetId &id) const
void SiStripFolderOrganizer::setSiStripControlFolder ( unsigned short  slot = all_,
unsigned short  ring = all_,
unsigned short  addr = all_,
unsigned short  chan = all_ 
)

Definition at line 105 of file SiStripFolderOrganizer.cc.

References dbe_, getSiStripControlFolder(), DQMStore::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

112  {
113  std::string lokal_folder = getSiStripControlFolder(slot, ring, addr, chan);
114  dbe_->setCurrentFolder(lokal_folder);
115  return;
116 }
std::string getSiStripControlFolder(unsigned short slot=all_, unsigned short ring=all_, unsigned short addr=all_, unsigned short chan=all_)
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:684
void SiStripFolderOrganizer::setSiStripFolder ( )
void SiStripFolderOrganizer::setSiStripFolderName ( std::string  name)
void SiStripFolderOrganizer::setSiStripTopControlFolder ( )

Definition at line 65 of file SiStripFolderOrganizer.cc.

References CONTROL_FOLDER_NAME, dbe_, DQMStore::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, and TopFolderName.

65  {
67  dbe_->setCurrentFolder(lokal_folder);
68  return;
69 }
#define CONTROL_FOLDER_NAME
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:684

Member Data Documentation

unsigned short const SiStripFolderOrganizer::all_ = 65535
static

Definition at line 32 of file SiStripFolderOrganizer.h.

Referenced by getSiStripControlFolder().

DQMStore* SiStripFolderOrganizer::dbe_
private
std::string SiStripFolderOrganizer::TopFolderName
private