CMS 3D CMS Logo

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 33 of file SiStripFolderOrganizer.cc.

References dbe_, Utilities::operator, and TopFolderName.

Referenced by getRingFolderName().

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

Definition at line 41 of file SiStripFolderOrganizer.cc.

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

Member Function Documentation

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

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

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

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

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

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 73 of file SiStripFolderOrganizer.cc.

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

Referenced by setSiStripControlFolder().

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

Definition at line 49 of file SiStripFolderOrganizer.cc.

References TopFolderName.

49  {
50  return TopFolderName;
51 }
std::string SiStripFolderOrganizer::getSiStripTopControlFolder ( )
std::pair< std::string, int32_t > SiStripFolderOrganizer::GetSubDetAndLayer ( const uint32_t &  detid,
const TrackerTopology tTopo,
bool  ring_flag = 0 
)

Definition at line 119 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 SiStripMonitorCluster::analyze(), SiStripRecHitsValid::analyze(), SiStripMonitorTrack::book(), SiStripBaseCondObjDQM::bookSummaryCumulMEs(), SiStripBaseCondObjDQM::bookSummaryMEs(), SiStripBaseCondObjDQM::bookSummaryProfileMEs(), SiStripMonitorDigi::createMEs(), SiStripMonitorCluster::createMEs(), SiStripRecHitsValid::createMEs(), SiStripTrackingRecHitsValid::createMEs(), and SiStripCertificationInfo::fillSiStripCertificationMEs().

119  {
120  std::string cSubDet;
121  int32_t layer=0;
122  switch(StripSubdetector::SubDetector(StripSubdetector(detid).subdetId()))
123  {
125  cSubDet="TIB";
126  layer=tTopo->tibLayer(detid);
127  break;
129  cSubDet="TOB";
130  layer=tTopo->tobLayer(detid);
131  break;
133  cSubDet="TID";
134  if(ring_flag)
135  layer=tTopo->tidRing(detid) * ( tTopo->tidSide(detid)==1 ? -1 : +1);
136  else
137  layer=tTopo->tidWheel(detid) * ( tTopo->tidSide(detid)==1 ? -1 : +1);
138  break;
140  cSubDet="TEC";
141  if(ring_flag)
142  layer=tTopo->tecRing(detid) * ( tTopo->tecSide(detid)==1 ? -1 : +1);
143  else
144  layer=tTopo->tecWheel(detid) * ( tTopo->tecSide(detid)==1 ? -1 : +1);
145  break;
146  default:
147  edm::LogWarning("SiStripMonitorTrack") << "WARNING!!! this detid does not belong to tracker" << std::endl;
148  }
149  return std::make_pair(cSubDet,layer);
150 }
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 152 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().

152  {
153  std::string cSubDet;
154  int32_t layer=0;
155  int32_t ring=0;
156  switch(StripSubdetector::SubDetector(StripSubdetector(detid).subdetId())) {
158  cSubDet="TIB";
159  layer=tTopo->tibLayer(detid);
160  cThickness = "THIN";
161  break;
163  cSubDet="TOB";
164  layer=tTopo->tobLayer(detid);
165  cThickness = "THICK";
166  break;
168  cSubDet="TID";
169  layer=tTopo->tidWheel(detid) * ( tTopo->tidSide(detid)==1 ? -1 : +1);
170  cThickness = "THIN";
171  break;
173  cSubDet="TEC";
174  layer=tTopo->tecWheel(detid) * ( tTopo->tecSide(detid)==1 ? -1 : +1);
175  ring=tTopo->tecRing(detid) * ( tTopo->tecSide(detid)==1 ? -1 : +1);
176  if ( ring >= 1 && ring <= 4) cThickness = "THIN";
177  else cThickness = "THICK";
178  break;
179  default:
180  edm::LogWarning("SiStripMonitorTrack") << "WARNING!!! this detid does not belong to tracker" << std::endl;
181  }
182  return std::make_pair(cSubDet,layer);
183 }
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 185 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.

185  {
186  std::string cSubDet;
187  int32_t ring=0;
188  switch(StripSubdetector::SubDetector(StripSubdetector(detid).subdetId()))
189  {
191  cSubDet="TIB";
192  break;
194  cSubDet="TOB";
195  break;
197  cSubDet="TID";
198  ring=tTopo->tidRing(detid) * ( tTopo->tidSide(detid)==1 ? -1 : +1);
199  break;
201  cSubDet="TEC";
202  ring=tTopo->tecRing(detid) * ( tTopo->tecSide(detid)==1 ? -1 : +1);
203  break;
204  default:
205  edm::LogWarning("SiStripMonitorTrack") << "WARNING!!! this detid does not belong to tracker" << std::endl;
206  }
207  return std::make_pair(cSubDet,ring);
208 }
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 392 of file SiStripFolderOrganizer.cc.

References getSubDetFolderAndTag().

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

392  {
393 
394  std::pair<std::string, std::string> subdet_and_tag = getSubDetFolderAndTag(detid, tTopo);
395  folder_name = subdet_and_tag.first;
396 }
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 456 of file SiStripFolderOrganizer.cc.

References PFMuonValidation_cff::folder, 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(), getRingFolderName(), and getSubDetFolder().

456  {
457 
458  const char *subdet_folder = "";
459  const char *tag = "";
460  switch(StripSubdetector::SubDetector(StripSubdetector(detid).subdetId()))
461  {
463  subdet_folder = "TIB";
464  tag = subdet_folder;
465  break;
467  subdet_folder = "TOB";
468  tag = subdet_folder;
469  break;
471  if (tTopo->tidSide(detid) == 2) {
472  subdet_folder = "TID/PLUS";
473  tag = "TID__PLUS";
474  } else if (tTopo->tidSide(detid) == 1) {
475  subdet_folder = "TID/MINUS";
476  tag = "TID__MINUS";
477  }
478  break;
480  if (tTopo->tecSide(detid) == 2) {
481  subdet_folder = "TEC/PLUS";
482  tag = "TEC__PLUS";
483  } else if (tTopo->tecSide(detid) == 1) {
484  subdet_folder = "TEC/MINUS";
485  tag = "TEC__MINUS";
486  }
487  break;
488  default:
489  {
490  edm::LogWarning("SiStripCommon") << "WARNING!!! this detid does not belong to tracker" << std::endl;
491  subdet_folder = "";
492  }
493  }
494 
496  folder.reserve(TopFolderName.size() + strlen(SEP MECHANICAL_FOLDER_NAME SEP) + strlen(subdet_folder) + 1);
497  folder = TopFolderName + SEP MECHANICAL_FOLDER_NAME SEP + subdet_folder;
498 
499  return std::pair<const std::string, const char *>(folder, tag);
500 }
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 217 of file SiStripFolderOrganizer.cc.

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

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

217  {
218  // std::cout << "[SiStripFolderOrganizer::getSubDetLayerFolderName] TopFolderName: " << TopFolderName << std::endl;
220 
221  std::stringstream sside;
222  if (side == 1) {
223  sside << "MINUS";
224  } else if (side == 2) {
225  sside << "PLUS";
226  }
227 
228  if(subDet == SiStripDetId::TIB){
229  ss << SEP << "TIB" << SEP << "layer_" << layer << SEP;
230  } else if(subDet == SiStripDetId::TID){
231  ss << SEP << "TID" << SEP << sside.str() << SEP << "wheel_" << layer << SEP;
232  } else if( subDet == SiStripDetId::TOB){
233  ss << SEP << "TOB" << SEP << "layer_" << layer << SEP;
234  }else if(subDet == SiStripDetId::TEC){
235  ss << SEP << "TEC" << SEP << sside.str() << SEP << "wheel_" << layer << SEP;
236  }else{
237  // --------------------------- ??? --------------------------- //
238  edm::LogWarning("SiStripTkDQM|WrongInput")<<"no such SubDet :"<< subDet <<" no folder set!"<<std::endl;
239  }
240 }
#define SEP
#define MECHANICAL_FOLDER_NAME
const SiStripFolderOrganizer& SiStripFolderOrganizer::operator= ( const SiStripFolderOrganizer )
private

Referenced by getRingFolderName().

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 300 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(), MonitorTrackResidualsBase< pixel_or_strip >::createMEs(), SiStripMonitorDigi::createMEs(), SiStripMonitorCluster::createMEs(), SiStripRecHitsValid::createMEs(), SiStripTrackingRecHitsValid::createMEs(), and setRingFolder().

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

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

113  {
114  std::string lokal_folder = getSiStripControlFolder(slot, ring, addr, chan);
115  dbe_->setCurrentFolder(lokal_folder);
116  return;
117 }
std::string getSiStripControlFolder(unsigned short slot=all_, unsigned short ring=all_, unsigned short addr=all_, unsigned short chan=all_)
chan
lumi = TPaveText(lowX+0.38, lowY+0.061, lowX+0.45, lowY+0.161, "NDC") lumi.SetBorderSize( 0 ) lumi...
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:740
void SiStripFolderOrganizer::setSiStripFolder ( )
void SiStripFolderOrganizer::setSiStripFolderName ( std::string  name)
void SiStripFolderOrganizer::setSiStripTopControlFolder ( )

Definition at line 66 of file SiStripFolderOrganizer.cc.

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

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

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