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)
 
void getRingFolderName (std::stringstream &ss, uint32_t rawdetid, const TrackerTopology *tTopo)
 
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)
 
std::pair< std::string, int32_t > GetSubDetAndLayerThickness (const uint32_t &detid, const TrackerTopology *tTopo, std::string &cThickness)
 
std::pair< std::string, int32_t > GetSubDetAndRing (const uint32_t &detid, const TrackerTopology *tTopo)
 
void getSubDetFolder (const uint32_t &detid, const TrackerTopology *tTopo, std::string &folder_name)
 
std::pair< const std::string,
const char * > 
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 setRingFolder (uint32_t rawdetid, const TrackerTopology *tTopo, int32_t layer=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 34 of file SiStripFolderOrganizer.cc.

References dbe_, cppFunctionSkipper::operator, and TopFolderName.

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

Definition at line 42 of file SiStripFolderOrganizer.cc.

43 {
44 }
SiStripFolderOrganizer::SiStripFolderOrganizer ( const SiStripFolderOrganizer )
private

Member Function Documentation

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

Definition at line 244 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().

244  {
245  lokal_folder = "";
246  if(rawdetid == 0 ){ // just top MechanicalFolder if rawdetid==0;
247  return;
248  }
249  std::stringstream rest;
250  SiStripDetId stripdet = SiStripDetId(rawdetid);
251 
252  if (stripdet.subDetector() == SiStripDetId::TIB){
253  // --------------------------- TIB --------------------------- //
254 
255  getSubDetLayerFolderName(rest,stripdet.subDetector(),tTopo->tibLayer(rawdetid));
256 
257  if (tTopo->tibIsZMinusSide(rawdetid)) rest << "backward_strings" << SEP;
258  else rest << "forward_strings" << SEP;
259  if (tTopo->tibIsExternalString(rawdetid)) rest << "external_strings" << SEP;
260  else rest << "internal_strings" << SEP;
261  rest << "string_" << tTopo->tibString(rawdetid) << SEP << "module_" << rawdetid;
262  } else if(stripdet.subDetector() == SiStripDetId::TID){
263  // --------------------------- TID --------------------------- //
264 
265  getSubDetLayerFolderName(rest,stripdet.subDetector(),tTopo->tidWheel(rawdetid),tTopo->tidSide(rawdetid));
266  rest<< "ring_" << tTopo->tidRing(rawdetid) << SEP;
267 
268  if (tTopo->tidIsStereo(rawdetid)) rest << "stereo_modules" << SEP;
269  else rest << "mono_modules" << SEP;
270  rest << "module_" << rawdetid;
271  } else if( stripdet.subDetector() == SiStripDetId::TOB){
272  // --------------------------- TOB --------------------------- //
273 
274  getSubDetLayerFolderName(rest,stripdet.subDetector(),tTopo->tobLayer(rawdetid));
275  if (tTopo->tobIsZMinusSide(rawdetid)) rest << "backward_rods" << SEP;
276  else rest << "forward_rods" << SEP;
277  rest << "rod_" << tTopo->tobRod(rawdetid) << SEP<< "module_" << rawdetid;
278  }else if(stripdet.subDetector() == SiStripDetId::TEC){
279  // --------------------------- TEC --------------------------- //
280 
281  getSubDetLayerFolderName(rest,stripdet.subDetector(),tTopo->tecWheel(rawdetid),tTopo->tecSide(rawdetid));
282  if (tTopo->tecIsBackPetal(rawdetid)) rest << "backward_petals" << SEP;
283  else rest << "forward_petals" << SEP;
284 
285  rest << "petal_" << tTopo->tecPetalNumber(rawdetid) << SEP
286  << "ring_"<< tTopo->tecRing(rawdetid) << SEP;
287 
288  if (tTopo->tecIsStereo(rawdetid)) rest << "stereo_modules" << SEP;
289  else rest << "mono_modules" << SEP;
290 
291  rest << "module_" << rawdetid;
292  }else{
293  // --------------------------- ??? --------------------------- //
294  edm::LogWarning("SiStripTkDQM|WrongInput")<<"no such subdetector type :"<<stripdet.subDetector() <<" no folder set!"<<std::endl;
295  return;
296  }
297  lokal_folder += rest.str();
298 
299 }
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 510 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().

510  {
511  lokal_folder = "";
512  if(rawdetid == 0 ){ // just top MechanicalFolder if rawdetid==0;
513  return;
514  }
515  std::stringstream rest;
516  SiStripDetId stripdet = SiStripDetId(rawdetid);
517 
518  if (stripdet.subDetector() == SiStripDetId::TIB){
519  // --------------------------- TIB --------------------------- //
520  TIBDetId tib = TIBDetId(rawdetid);
521  getSubDetLayerFolderName(rest,stripdet.subDetector(),tib.layerNumber());
522  if (tib.isZMinusSide()) rest << "backward_strings" << SEP;
523  else rest << "forward_strings" << SEP;
524  if (tib.isExternalString()) rest << "external_strings" << SEP;
525  else rest << "internal_strings" << SEP;
526  rest << "string_" << tib.stringNumber() << SEP << "module_" << rawdetid;
527  } else if(stripdet.subDetector() == SiStripDetId::TID){
528  // --------------------------- TID --------------------------- //
529  TIDDetId tid = TIDDetId(rawdetid);
530  getSubDetLayerFolderName(rest,stripdet.subDetector(),tid.wheel(),tid.side());
531  rest<< "ring_" << tid.ring() << SEP;
532 
533  if (tid.isStereo()) rest << "stereo_modules" << SEP;
534  else rest << "mono_modules" << SEP;
535  rest << "module_" << rawdetid;
536  } else if( stripdet.subDetector() == SiStripDetId::TOB){
537  // --------------------------- TOB --------------------------- //
538  TOBDetId tob = TOBDetId(rawdetid);
539  getSubDetLayerFolderName(rest,stripdet.subDetector(),tob.layerNumber());
540  if (tob.isZMinusSide()) rest << "backward_rods" << SEP;
541  else rest << "forward_rods" << SEP;
542  rest << "rod_" << tob.rodNumber() << SEP<< "module_" << rawdetid;
543  }else if(stripdet.subDetector() == SiStripDetId::TEC){
544  // --------------------------- TEC --------------------------- //
545  TECDetId tec = TECDetId(rawdetid);
546  getSubDetLayerFolderName(rest,stripdet.subDetector(),tec.wheel(),tec.side());
547  if (tec.isBackPetal()) rest << "backward_petals" << SEP;
548  else rest << "forward_petals" << SEP;
549 
550  rest << "petal_" << tec.petalNumber() << SEP
551  << "ring_"<< tec.ringNumber() << SEP;
552 
553  if (tec.isStereo()) rest << "stereo_modules" << SEP;
554  else rest << "mono_modules" << SEP;
555 
556  rest << "module_" << rawdetid;
557  }else{
558  // --------------------------- ??? --------------------------- //
559  edm::LogWarning("SiStripTkDQM|WrongInput")<<"no such subdetector type :"<<stripdet.subDetector() <<" no folder set!"<<std::endl;
560  return;
561  }
562  lokal_folder += rest.str();
563 }
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 401 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(), and getRingFolderName().

401  {
403  if(rawdetid == 0 ){ // just top MechanicalFolder if rawdetid==0;
404  return;
405  }
406 
407  SiStripDetId stripdet = SiStripDetId(rawdetid);
408  if(stripdet.subDetector() == SiStripDetId::TIB ){
409  // --------------------------- TIB --------------------------- //
410 
411  ss<<SEP<<"TIB"<<SEP<<"layer_"<<tTopo->tibLayer(rawdetid);
412  }else if(stripdet.subDetector() == SiStripDetId::TID){
413  // --------------------------- TID --------------------------- //
414 
415  uint32_t side = tTopo->tidSide(rawdetid);
416  std::stringstream sside;
417  if (side == 1) {
418  sside << "MINUS";
419  } else if (side == 2) {
420  sside << "PLUS";
421  }
422 
423  if(ring_flag){
424  ss<<SEP<<"TID"<<SEP<<sside.str()<<SEP<<"ring_"<<tTopo->tidRing(rawdetid);
425  }else{
426  ss<<SEP<<"TID"<<SEP<<sside.str()<<SEP<<"wheel_"<<tTopo->tidWheel(rawdetid);
427  }
428  }else if(stripdet.subDetector() == SiStripDetId::TOB){
429  // --------------------------- TOB --------------------------- //
430 
431  ss<<SEP<<"TOB"<<SEP<<"layer_"<<tTopo->tobLayer(rawdetid);
432  }else if( stripdet.subDetector() == SiStripDetId::TEC){
433  // --------------------------- TEC --------------------------- //
434 
435  uint32_t side = tTopo->tecSide(rawdetid);
436  std::stringstream sside;
437  if (side == 1) {
438  sside << "MINUS";
439  } else if (side == 2) {
440  sside << "PLUS";
441  }
442 
443  if(ring_flag){
444  ss<<SEP<<"TEC"<<SEP<<sside.str()<<SEP<<"ring_"<<tTopo->tecRing(rawdetid);
445  }else{
446  ss<<SEP<<"TEC"<<SEP<<sside.str()<<SEP<<"wheel_"<<tTopo->tecWheel(rawdetid);
447  }
448  }else{
449  // --------------------------- ??? --------------------------- //
450  edm::LogWarning("SiStripTkDQM|WrongInput")<<"no such subdetector type :"<<stripdet.subDetector()<<" no folder set!"<<std::endl;
451  return;
452  }
453 }
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
void SiStripFolderOrganizer::getRingFolderName ( std::stringstream &  ss,
uint32_t  rawdetid,
const TrackerTopology tTopo 
)
inline

Definition at line 76 of file SiStripFolderOrganizer.h.

References getLayerFolderName().

76 { getLayerFolderName(ss,rawdetid,tTopo,true); }
void getLayerFolderName(std::stringstream &ss, uint32_t rawdetid, const TrackerTopology *tTopo, bool ring_flag=0)
std::string SiStripFolderOrganizer::getSiStripControlFolder ( unsigned short  slot = all_,
unsigned short  ring = all_,
unsigned short  addr = all_,
unsigned short  chan = all_ 
)

Definition at line 74 of file SiStripFolderOrganizer.cc.

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

Referenced by setSiStripControlFolder().

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

Definition at line 50 of file SiStripFolderOrganizer.cc.

References TopFolderName.

50  {
51  return TopFolderName;
52 }
std::string SiStripFolderOrganizer::getSiStripTopControlFolder ( )

Definition at line 61 of file SiStripFolderOrganizer.cc.

References CONTROL_FOLDER_NAME, AlCaHLTBitMon_QueryRunRegistry::string, and TopFolderName.

Referenced by getSiStripControlFolder().

61  {
63  return lokal_folder;
64 }
#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 120 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(), and SiStripCertificationInfo::fillSiStripCertificationMEs().

120  {
121  std::string cSubDet;
122  int32_t layer=0;
124  {
126  cSubDet="TIB";
127  layer=tTopo->tibLayer(detid);
128  break;
130  cSubDet="TOB";
131  layer=tTopo->tobLayer(detid);
132  break;
134  cSubDet="TID";
135  if(ring_flag)
136  layer=tTopo->tidRing(detid) * ( tTopo->tidSide(detid)==1 ? -1 : +1);
137  else
138  layer=tTopo->tidWheel(detid) * ( tTopo->tidSide(detid)==1 ? -1 : +1);
139  break;
141  cSubDet="TEC";
142  if(ring_flag)
143  layer=tTopo->tecRing(detid) * ( tTopo->tecSide(detid)==1 ? -1 : +1);
144  else
145  layer=tTopo->tecWheel(detid) * ( tTopo->tecSide(detid)==1 ? -1 : +1);
146  break;
147  default:
148  edm::LogWarning("SiStripMonitorTrack") << "WARNING!!! this detid does not belong to tracker" << std::endl;
149  }
150  return std::make_pair(cSubDet,layer);
151 }
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
std::pair< std::string, int32_t > SiStripFolderOrganizer::GetSubDetAndLayerThickness ( const uint32_t &  detid,
const TrackerTopology tTopo,
std::string &  cThickness 
)

Definition at line 153 of file SiStripFolderOrganizer.cc.

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

153  {
154  std::string cSubDet;
155  int32_t layer=0;
156  int32_t ring=0;
159  cSubDet="TIB";
160  layer=tTopo->tibLayer(detid);
161  cThickness = "THIN";
162  break;
164  cSubDet="TOB";
165  layer=tTopo->tobLayer(detid);
166  cThickness = "THICK";
167  break;
169  cSubDet="TID";
170  layer=tTopo->tidWheel(detid) * ( tTopo->tidSide(detid)==1 ? -1 : +1);
171  cThickness = "THIN";
172  break;
174  cSubDet="TEC";
175  layer=tTopo->tecWheel(detid) * ( tTopo->tecSide(detid)==1 ? -1 : +1);
176  ring=tTopo->tecRing(detid) * ( tTopo->tecSide(detid)==1 ? -1 : +1);
177  if ( ring >= 1 && ring <= 4) cThickness = "THIN";
178  else cThickness = "THICK";
179  break;
180  default:
181  edm::LogWarning("SiStripMonitorTrack") << "WARNING!!! this detid does not belong to tracker" << std::endl;
182  }
183  return std::make_pair(cSubDet,layer);
184 }
unsigned int tibLayer(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
std::pair< std::string, int32_t > SiStripFolderOrganizer::GetSubDetAndRing ( const uint32_t &  detid,
const TrackerTopology tTopo 
)

Definition at line 186 of file SiStripFolderOrganizer.cc.

References relativeConstraints::ring, AlCaHLTBitMon_QueryRunRegistry::string, StripSubdetector::TEC, TrackerTopology::tecRing(), TrackerTopology::tecSide(), StripSubdetector::TIB, StripSubdetector::TID, TrackerTopology::tidRing(), TrackerTopology::tidSide(), and StripSubdetector::TOB.

186  {
187  std::string cSubDet;
188  int32_t ring=0;
190  {
192  cSubDet="TIB";
193  break;
195  cSubDet="TOB";
196  break;
198  cSubDet="TID";
199  ring=tTopo->tidRing(detid) * ( tTopo->tidSide(detid)==1 ? -1 : +1);
200  break;
202  cSubDet="TEC";
203  ring=tTopo->tecRing(detid) * ( tTopo->tecSide(detid)==1 ? -1 : +1);
204  break;
205  default:
206  edm::LogWarning("SiStripMonitorTrack") << "WARNING!!! this detid does not belong to tracker" << std::endl;
207  }
208  return std::make_pair(cSubDet,ring);
209 }
unsigned int tidRing(const DetId &id) const
unsigned int tecRing(const DetId &id) const
ring id
unsigned int tidSide(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 393 of file SiStripFolderOrganizer.cc.

References getSubDetFolderAndTag().

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

393  {
394 
395  std::pair<std::string, std::string> subdet_and_tag = getSubDetFolderAndTag(detid, tTopo);
396  folder_name = subdet_and_tag.first;
397 }
std::pair< const std::string, const char * > getSubDetFolderAndTag(const uint32_t &detid, const TrackerTopology *tTopo)
std::pair< const std::string, const char * > SiStripFolderOrganizer::getSubDetFolderAndTag ( const uint32_t &  detid,
const TrackerTopology tTopo 
)

Definition at line 457 of file SiStripFolderOrganizer.cc.

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

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

457  {
458 
459  const char *subdet_folder = "";
460  const char *tag = "";
462  {
464  subdet_folder = "TIB";
465  tag = subdet_folder;
466  break;
468  subdet_folder = "TOB";
469  tag = subdet_folder;
470  break;
472  if (tTopo->tidSide(detid) == 2) {
473  subdet_folder = "TID/PLUS";
474  tag = "TID__PLUS";
475  } else if (tTopo->tidSide(detid) == 1) {
476  subdet_folder = "TID/MINUS";
477  tag = "TID__MINUS";
478  }
479  break;
481  if (tTopo->tecSide(detid) == 2) {
482  subdet_folder = "TEC/PLUS";
483  tag = "TEC__PLUS";
484  } else if (tTopo->tecSide(detid) == 1) {
485  subdet_folder = "TEC/MINUS";
486  tag = "TEC__MINUS";
487  }
488  break;
489  default:
490  {
491  edm::LogWarning("SiStripCommon") << "WARNING!!! this detid does not belong to tracker" << std::endl;
492  subdet_folder = "";
493  }
494  }
495 
496  std::string folder;
497  folder.reserve(TopFolderName.size() + strlen(SEP MECHANICAL_FOLDER_NAME SEP) + strlen(subdet_folder) + 1);
498  folder = TopFolderName + SEP MECHANICAL_FOLDER_NAME SEP + subdet_folder;
499 
500  return std::pair<const std::string, const char *>(folder, tag);
501 }
unsigned int tidSide(const DetId &id) const
#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 218 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().

218  {
219  // std::cout << "[SiStripFolderOrganizer::getSubDetLayerFolderName] TopFolderName: " << TopFolderName << std::endl;
221 
222  std::stringstream sside;
223  if (side == 1) {
224  sside << "MINUS";
225  } else if (side == 2) {
226  sside << "PLUS";
227  }
228 
229  if(subDet == SiStripDetId::TIB){
230  ss << SEP << "TIB" << SEP << "layer_" << layer << SEP;
231  } else if(subDet == SiStripDetId::TID){
232  ss << SEP << "TID" << SEP << sside.str() << SEP << "wheel_" << layer << SEP;
233  } else if( subDet == SiStripDetId::TOB){
234  ss << SEP << "TOB" << SEP << "layer_" << layer << SEP;
235  }else if(subDet == SiStripDetId::TEC){
236  ss << SEP << "TEC" << SEP << sside.str() << SEP << "wheel_" << layer << SEP;
237  }else{
238  // --------------------------- ??? --------------------------- //
239  edm::LogWarning("SiStripTkDQM|WrongInput")<<"no such SubDet :"<< subDet <<" no folder set!"<<std::endl;
240  }
241 }
#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 301 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(), SiStripTrackingRecHitsValid::createMEs(), and setRingFolder().

301  {
303  if(rawdetid == 0 ){ // just top MechanicalFolder if rawdetid==0;
304  dbe_->setCurrentFolder(lokal_folder);
305  return;
306  }
307 
308  std::ostringstream rest;
309  SiStripDetId stripdet = SiStripDetId(rawdetid);
310  if(stripdet.subDetector() == SiStripDetId::TIB ){
311  // --------------------------- TIB --------------------------- //
312 
313  int tib_layer = tTopo->tibLayer(rawdetid);
314  if (abs(layer) != tib_layer) {
315  edm::LogWarning("SiStripTkDQM|Layer mismatch!!!")<< " expect "<< abs(layer) << " but getting " << tTopo->tibLayer(rawdetid) <<std::endl;
316  return;
317  }
318  rest<<SEP<<"TIB"<<SEP<<"layer_"<<tTopo->tibLayer(rawdetid);
319  }else if(stripdet.subDetector() == SiStripDetId::TID){
320  // --------------------------- TID --------------------------- //
321 
322  int tid_ring = tTopo->tidRing(rawdetid);
323 
324  // side
325  uint32_t side = tTopo->tidSide(rawdetid);
326  std::stringstream sside;
327  if (side == 1) {
328  sside << "MINUS";
329  } else if (side == 2) {
330  sside << "PLUS";
331  }
332 
333  if(ring_flag){
334  if(abs(layer) != tid_ring) {
335  edm::LogWarning("SiStripTkDQM|Layer mismatch!!!")<< " expect "<< abs(layer) << " but getting " << tTopo->tidRing(rawdetid) <<std::endl;
336  return;
337  }
338  rest<<SEP<<"TID"<<SEP<<sside.str()<<SEP<<"ring_"<<tTopo->tidRing(rawdetid);
339  }else{
340  int tid_wheel = tTopo->tidWheel(rawdetid);
341  if (abs(layer) != tid_wheel) {
342  edm::LogWarning("SiStripTkDQM|Layer mismatch!!!")<< " expect "<< abs(layer) << " but getting " << tTopo->tidWheel(rawdetid) <<std::endl;
343  return;
344  }
345  rest<<SEP<<"TID"<<SEP<<sside.str()<<SEP<<"wheel_"<<tTopo->tidWheel(rawdetid);
346  }
347  }else if(stripdet.subDetector() == SiStripDetId::TOB){
348  // --------------------------- TOB --------------------------- //
349 
350  int tob_layer = tTopo->tobLayer(rawdetid);
351  if (abs(layer) != tob_layer) {
352  edm::LogWarning("SiStripTkDQM|Layer mismatch!!!")<< " expect "<< abs(layer) << " but getting " << tTopo->tobLayer(rawdetid) <<std::endl;
353  return;
354  }
355  rest<<SEP<<"TOB"<<SEP<<"layer_"<<tTopo->tobLayer(rawdetid);
356  }else if( stripdet.subDetector() == SiStripDetId::TEC){
357  // --------------------------- TEC --------------------------- //
358 
359  // side
360  uint32_t side = tTopo->tecSide(rawdetid);
361  std::stringstream sside;
362  if (side == 1) {
363  sside << "MINUS";
364  } else if (side == 2) {
365  sside << "PLUS";
366  }
367 
368  if(ring_flag){
369  int tec_ring = tTopo->tecRing(rawdetid);
370  if (abs(layer) != tec_ring) {
371  edm::LogWarning("SiStripTkDQM|Layer mismatch!!!")<< " expect "<< abs(layer) << " but getting " << tTopo->tecRing(rawdetid) <<std::endl;
372  return;
373  }
374  rest<<SEP<<"TEC"<<SEP<<sside.str()<<SEP<<"ring_"<<tTopo->tecRing(rawdetid);
375  }else{
376  int tec_wheel = tTopo->tecWheel(rawdetid);
377  if (abs(layer) != tec_wheel) {
378  edm::LogWarning("SiStripTkDQM|Layer mismatch!!!")<< " expect "<< abs(layer) << " but getting " << tTopo->tecWheel(rawdetid) <<std::endl;
379  return;
380  }
381  rest<<SEP<<"TEC"<<SEP<<sside.str()<<SEP<<"wheel_"<<tTopo->tecWheel(rawdetid);
382  }
383  }else{
384  // --------------------------- ??? --------------------------- //
385  edm::LogWarning("SiStripTkDQM|WrongInput")<<"no such subdetector type :"<<stripdet.subDetector()<<" no folder set!"<<std::endl;
386  return;
387  }
388 
389  lokal_folder += rest.str();
390  dbe_->setCurrentFolder(lokal_folder);
391 }
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:719
unsigned int tobLayer(const DetId &id) const
#define MECHANICAL_FOLDER_NAME
unsigned int tecSide(const DetId &id) const
void SiStripFolderOrganizer::setRingFolder ( uint32_t  rawdetid,
const TrackerTopology tTopo,
int32_t  layer = 0 
)
inline

Definition at line 75 of file SiStripFolderOrganizer.h.

References setLayerFolder().

75 { setLayerFolder(rawdetid,tTopo,layer,true); }
void setLayerFolder(uint32_t rawdetid, const TrackerTopology *tTopo, int32_t layer=0, bool ring_flag=0)
void SiStripFolderOrganizer::setSiStripControlFolder ( unsigned short  slot = all_,
unsigned short  ring = all_,
unsigned short  addr = all_,
unsigned short  chan = all_ 
)

Definition at line 107 of file SiStripFolderOrganizer.cc.

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

114  {
115  std::string lokal_folder = getSiStripControlFolder(slot, ring, addr, chan);
116  dbe_->setCurrentFolder(lokal_folder);
117  return;
118 }
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:719
void SiStripFolderOrganizer::setSiStripFolder ( )
void SiStripFolderOrganizer::setSiStripFolderName ( std::string  name)
void SiStripFolderOrganizer::setSiStripTopControlFolder ( )

Definition at line 67 of file SiStripFolderOrganizer.cc.

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

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

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