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 29 of file SiStripFolderOrganizer.h.

Constructor & Destructor Documentation

SiStripFolderOrganizer::SiStripFolderOrganizer ( )

Definition at line 33 of file SiStripFolderOrganizer.cc.

References dbe_, cppFunctionSkipper::operator, and TopFolderName.

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 177 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 SiStripInformationExtractor::getCondDBHistos(), SiStripInformationExtractor::getSingleModuleHistos(), SiStripInformationExtractor::getTrackerMapHistos(), and setDetectorFolder().

177  {
178  lokal_folder = "";
179  if(rawdetid == 0 ){ // just top MechanicalFolder if rawdetid==0;
180  return;
181  }
182  std::stringstream rest;
183  SiStripDetId stripdet = SiStripDetId(rawdetid);
184 
185  if (stripdet.subDetector() == SiStripDetId::TIB){
186  // --------------------------- TIB --------------------------- //
187 
188  getSubDetLayerFolderName(rest,stripdet.subDetector(),tTopo->tibLayer(rawdetid));
189 
190  if (tTopo->tibIsZMinusSide(rawdetid)) rest << "backward_strings" << SEP;
191  else rest << "forward_strings" << SEP;
192  if (tTopo->tibIsExternalString(rawdetid)) rest << "external_strings" << SEP;
193  else rest << "internal_strings" << SEP;
194  rest << "string_" << tTopo->tibString(rawdetid) << SEP << "module_" << rawdetid;
195  } else if(stripdet.subDetector() == SiStripDetId::TID){
196  // --------------------------- TID --------------------------- //
197 
198  getSubDetLayerFolderName(rest,stripdet.subDetector(),tTopo->tidWheel(rawdetid),tTopo->tidSide(rawdetid));
199  rest<< "ring_" << tTopo->tidRing(rawdetid) << SEP;
200 
201  if (tTopo->tidIsStereo(rawdetid)) rest << "stereo_modules" << SEP;
202  else rest << "mono_modules" << SEP;
203  rest << "module_" << rawdetid;
204  } else if( stripdet.subDetector() == SiStripDetId::TOB){
205  // --------------------------- TOB --------------------------- //
206 
207  getSubDetLayerFolderName(rest,stripdet.subDetector(),tTopo->tobLayer(rawdetid));
208  if (tTopo->tobIsZMinusSide(rawdetid)) rest << "backward_rods" << SEP;
209  else rest << "forward_rods" << SEP;
210  rest << "rod_" << tTopo->tobRod(rawdetid) << SEP<< "module_" << rawdetid;
211  }else if(stripdet.subDetector() == SiStripDetId::TEC){
212  // --------------------------- TEC --------------------------- //
213 
214  getSubDetLayerFolderName(rest,stripdet.subDetector(),tTopo->tecWheel(rawdetid),tTopo->tecSide(rawdetid));
215  if (tTopo->tecIsBackPetal(rawdetid)) rest << "backward_petals" << SEP;
216  else rest << "forward_petals" << SEP;
217 
218  rest << "petal_" << tTopo->tecPetalNumber(rawdetid) << SEP
219  << "ring_"<< tTopo->tecRing(rawdetid) << SEP;
220 
221  if (tTopo->tecIsStereo(rawdetid)) rest << "stereo_modules" << SEP;
222  else rest << "mono_modules" << SEP;
223 
224  rest << "module_" << rawdetid;
225  }else{
226  // --------------------------- ??? --------------------------- //
227  edm::LogWarning("SiStripTkDQM|WrongInput")<<"no such subdetector type :"<<stripdet.subDetector() <<" no folder set!"<<std::endl;
228  return;
229  }
230  lokal_folder += rest.str();
231 
232 }
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 404 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().

404  {
405  lokal_folder = "";
406  if(rawdetid == 0 ){ // just top MechanicalFolder if rawdetid==0;
407  return;
408  }
409  std::stringstream rest;
410  SiStripDetId stripdet = SiStripDetId(rawdetid);
411 
412  if (stripdet.subDetector() == SiStripDetId::TIB){
413  // --------------------------- TIB --------------------------- //
414  TIBDetId tib = TIBDetId(rawdetid);
415  getSubDetLayerFolderName(rest,stripdet.subDetector(),tib.layerNumber());
416  if (tib.isZMinusSide()) rest << "backward_strings" << SEP;
417  else rest << "forward_strings" << SEP;
418  if (tib.isExternalString()) rest << "external_strings" << SEP;
419  else rest << "internal_strings" << SEP;
420  rest << "string_" << tib.stringNumber() << SEP << "module_" << rawdetid;
421  } else if(stripdet.subDetector() == SiStripDetId::TID){
422  // --------------------------- TID --------------------------- //
423  TIDDetId tid = TIDDetId(rawdetid);
424  getSubDetLayerFolderName(rest,stripdet.subDetector(),tid.wheel(),tid.side());
425  rest<< "ring_" << tid.ring() << SEP;
426 
427  if (tid.isStereo()) rest << "stereo_modules" << SEP;
428  else rest << "mono_modules" << SEP;
429  rest << "module_" << rawdetid;
430  } else if( stripdet.subDetector() == SiStripDetId::TOB){
431  // --------------------------- TOB --------------------------- //
432  TOBDetId tob = TOBDetId(rawdetid);
433  getSubDetLayerFolderName(rest,stripdet.subDetector(),tob.layerNumber());
434  if (tob.isZMinusSide()) rest << "backward_rods" << SEP;
435  else rest << "forward_rods" << SEP;
436  rest << "rod_" << tob.rodNumber() << SEP<< "module_" << rawdetid;
437  }else if(stripdet.subDetector() == SiStripDetId::TEC){
438  // --------------------------- TEC --------------------------- //
439  TECDetId tec = TECDetId(rawdetid);
440  getSubDetLayerFolderName(rest,stripdet.subDetector(),tec.wheel(),tec.side());
441  if (tec.isBackPetal()) rest << "backward_petals" << SEP;
442  else rest << "forward_petals" << SEP;
443 
444  rest << "petal_" << tec.petalNumber() << SEP
445  << "ring_"<< tec.ringNumber() << SEP;
446 
447  if (tec.isStereo()) rest << "stereo_modules" << SEP;
448  else rest << "mono_modules" << SEP;
449 
450  rest << "module_" << rawdetid;
451  }else{
452  // --------------------------- ??? --------------------------- //
453  edm::LogWarning("SiStripTkDQM|WrongInput")<<"no such subdetector type :"<<stripdet.subDetector() <<" no folder set!"<<std::endl;
454  return;
455  }
456  lokal_folder += rest.str();
457 }
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 315 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().

315  {
317  if(rawdetid == 0 ){ // just top MechanicalFolder if rawdetid==0;
318  return;
319  }
320 
321  SiStripDetId stripdet = SiStripDetId(rawdetid);
322  if(stripdet.subDetector() == SiStripDetId::TIB ){
323  // --------------------------- TIB --------------------------- //
324 
325  ss<<SEP<<"TIB"<<SEP<<"layer_"<<tTopo->tibLayer(rawdetid);
326  }else if(stripdet.subDetector() == SiStripDetId::TID){
327  // --------------------------- TID --------------------------- //
328 
329  if(ring_flag){
330  ss<<SEP<<"TID"<<SEP<<"side_"<<tTopo->tidSide(rawdetid)<<SEP<<"ring_"<<tTopo->tidRing(rawdetid);
331  }else{
332  ss<<SEP<<"TID"<<SEP<<"side_"<<tTopo->tidSide(rawdetid)<<SEP<<"wheel_"<<tTopo->tidWheel(rawdetid);
333  }
334  }else if(stripdet.subDetector() == SiStripDetId::TOB){
335  // --------------------------- TOB --------------------------- //
336 
337  ss<<SEP<<"TOB"<<SEP<<"layer_"<<tTopo->tobLayer(rawdetid);
338  }else if( stripdet.subDetector() == SiStripDetId::TEC){
339  // --------------------------- TEC --------------------------- //
340 
341  if(ring_flag){
342  ss<<SEP<<"TEC"<<SEP<<"side_"<<tTopo->tecSide(rawdetid)<<SEP<<"ring_"<<tTopo->tecRing(rawdetid);
343  }else{
344  ss<<SEP<<"TEC"<<SEP<<"side_"<<tTopo->tecSide(rawdetid)<<SEP<<"wheel_"<<tTopo->tecWheel(rawdetid);
345  }
346  }else{
347  // --------------------------- ??? --------------------------- //
348  edm::LogWarning("SiStripTkDQM|WrongInput")<<"no such subdetector type :"<<stripdet.subDetector()<<" no folder set!"<<std::endl;
349  return;
350  }
351 }
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 73 of file SiStripFolderOrganizer.cc.

References all_, 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
std::string SiStripFolderOrganizer::getSiStripFolder ( )

Definition at line 49 of file SiStripFolderOrganizer.cc.

References TopFolderName.

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

Definition at line 60 of file SiStripFolderOrganizer.cc.

References CONTROL_FOLDER_NAME, AlCaHLTBitMon_QueryRunRegistry::string, and TopFolderName.

Referenced by getSiStripControlFolder().

60  {
62  return lokal_folder;
63 }
#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 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 MonitorTrackResiduals::analyze(), MonitorTrackResiduals::beginRun(), SiStripMonitorTrack::book(), SiStripBaseCondObjDQM::bookSummaryCumulMEs(), SiStripBaseCondObjDQM::bookSummaryMEs(), SiStripBaseCondObjDQM::bookSummaryProfileMEs(), MonitorTrackResiduals::createMEs(), SiStripMonitorDigi::createMEs(), SiStripMonitorCluster::createMEs(), SiStripMonitorTrack::fillMEs(), and SiStripCertificationInfo::fillSiStripCertificationMEs().

119  {
120  std::string cSubDet;
121  int32_t layer=0;
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
void SiStripFolderOrganizer::getSubDetFolder ( const uint32_t &  detid,
const TrackerTopology tTopo,
std::string &  folder_name 
)

Definition at line 307 of file SiStripFolderOrganizer.cc.

References getSubDetFolderAndTag().

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

307  {
308 
309  std::pair<std::string, std::string> subdet_and_tag = getSubDetFolderAndTag(detid, tTopo);
310  folder_name = subdet_and_tag.first;
311 }
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 355 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(), SiStripMonitorTrack::fillMEs(), and getSubDetFolder().

355  {
356  std::pair<std::string, std::string> result;
357  result.first = TopFolderName + SEP MECHANICAL_FOLDER_NAME SEP;
358  std::string subdet_folder;
360  {
362  subdet_folder = "TIB";
363  result.second = subdet_folder;
364  break;
366  subdet_folder = "TOB";
367  result.second = subdet_folder;
368  break;
370  if (tTopo->tidSide(detid) == 2) {
371  subdet_folder = "TID/side_2";
372  result.second = "TID__side__2";
373  } else if (tTopo->tidSide(detid) == 1) {
374  subdet_folder = "TID/side_1";
375  result.second = "TID__side__1";
376  }
377  break;
379  if (tTopo->tecSide(detid) == 2) {
380  subdet_folder = "TEC/side_2";
381  result.second = "TEC__side__2";
382  } else if (tTopo->tecSide(detid) == 1) {
383  subdet_folder = "TEC/side_1";
384  result.second = "TEC__side__1";
385  }
386  break;
387  default:
388  {
389  edm::LogWarning("SiStripCommon") << "WARNING!!! this detid does not belong to tracker" << std::endl;
390  subdet_folder = "";
391  }
392  }
393  result.first += subdet_folder;
394  return result;
395 }
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 159 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().

159  {
161 
162  if(subDet == SiStripDetId::TIB){
163  ss << SEP << "TIB" << SEP << "layer_" << layer << SEP;
164  } else if(subDet == SiStripDetId::TID){
165  ss << SEP << "TID" << SEP << "side_" << side << SEP << "wheel_" << layer << SEP;
166  } else if( subDet == SiStripDetId::TOB){
167  ss << SEP << "TOB" << SEP << "layer_" << layer << SEP;
168  }else if(subDet == SiStripDetId::TEC){
169  ss << SEP << "TEC" << SEP << "side_" << side << SEP << "wheel_" << layer << SEP;
170  }else{
171  // --------------------------- ??? --------------------------- //
172  edm::LogWarning("SiStripTkDQM|WrongInput")<<"no such SubDet :"<< subDet <<" no folder set!"<<std::endl;
173  }
174 }
#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 234 of file SiStripFolderOrganizer.cc.

References 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(), and SiStripMonitorCluster::createMEs().

234  {
236  if(rawdetid == 0 ){ // just top MechanicalFolder if rawdetid==0;
237  dbe_->setCurrentFolder(lokal_folder);
238  return;
239  }
240 
241  std::ostringstream rest;
242  SiStripDetId stripdet = SiStripDetId(rawdetid);
243  if(stripdet.subDetector() == SiStripDetId::TIB ){
244  // --------------------------- TIB --------------------------- //
245 
246  int tib_layer = tTopo->tibLayer(rawdetid);
247  if (abs(layer) != tib_layer) {
248  edm::LogWarning("SiStripTkDQM|Layer mismatch!!!")<< " expect "<< abs(layer) << " but getting " << tTopo->tibLayer(rawdetid) <<std::endl;
249  return;
250  }
251  rest<<SEP<<"TIB"<<SEP<<"layer_"<<tTopo->tibLayer(rawdetid);
252  }else if(stripdet.subDetector() == SiStripDetId::TID){
253  // --------------------------- TID --------------------------- //
254 
255  int tid_ring = tTopo->tidRing(rawdetid);
256  if(ring_flag){
257  if(abs(layer) != tid_ring) {
258  edm::LogWarning("SiStripTkDQM|Layer mismatch!!!")<< " expect "<< abs(layer) << " but getting " << tTopo->tidRing(rawdetid) <<std::endl;
259  return;
260  }
261  rest<<SEP<<"TID"<<SEP<<"side_"<<tTopo->tidSide(rawdetid)<<SEP<<"ring_"<<tTopo->tidRing(rawdetid);
262  }else{
263  int tid_wheel = tTopo->tidWheel(rawdetid);
264  if (abs(layer) != tid_wheel) {
265  edm::LogWarning("SiStripTkDQM|Layer mismatch!!!")<< " expect "<< abs(layer) << " but getting " << tTopo->tidWheel(rawdetid) <<std::endl;
266  return;
267  }
268  rest<<SEP<<"TID"<<SEP<<"side_"<<tTopo->tidSide(rawdetid)<<SEP<<"wheel_"<<tTopo->tidWheel(rawdetid);
269  }
270  }else if(stripdet.subDetector() == SiStripDetId::TOB){
271  // --------------------------- TOB --------------------------- //
272 
273  int tob_layer = tTopo->tobLayer(rawdetid);
274  if (abs(layer) != tob_layer) {
275  edm::LogWarning("SiStripTkDQM|Layer mismatch!!!")<< " expect "<< abs(layer) << " but getting " << tTopo->tobLayer(rawdetid) <<std::endl;
276  return;
277  }
278  rest<<SEP<<"TOB"<<SEP<<"layer_"<<tTopo->tobLayer(rawdetid);
279  }else if( stripdet.subDetector() == SiStripDetId::TEC){
280  // --------------------------- TEC --------------------------- //
281 
282  if(ring_flag){
283  int tec_ring = tTopo->tecRing(rawdetid);
284  if (abs(layer) != tec_ring) {
285  edm::LogWarning("SiStripTkDQM|Layer mismatch!!!")<< " expect "<< abs(layer) << " but getting " << tTopo->tecRing(rawdetid) <<std::endl;
286  return;
287  }
288  rest<<SEP<<"TEC"<<SEP<<"side_"<<tTopo->tecSide(rawdetid)<<SEP<<"ring_"<<tTopo->tecRing(rawdetid);
289  }else{
290  int tec_wheel = tTopo->tecWheel(rawdetid);
291  if (abs(layer) != tec_wheel) {
292  edm::LogWarning("SiStripTkDQM|Layer mismatch!!!")<< " expect "<< abs(layer) << " but getting " << tTopo->tecWheel(rawdetid) <<std::endl;
293  return;
294  }
295  rest<<SEP<<"TEC"<<SEP<<"side_"<<tTopo->tecSide(rawdetid)<<SEP<<"wheel_"<<tTopo->tecWheel(rawdetid);
296  }
297  }else{
298  // --------------------------- ??? --------------------------- //
299  edm::LogWarning("SiStripTkDQM|WrongInput")<<"no such subdetector type :"<<stripdet.subDetector()<<" no folder set!"<<std::endl;
300  return;
301  }
302 
303  lokal_folder += rest.str();
304  dbe_->setCurrentFolder(lokal_folder);
305 }
unsigned int tibLayer(const DetId &id) const
unsigned int tidRing(const DetId &id) const
unsigned int tecRing(const DetId &id) const
ring id
#define abs(x)
Definition: mlp_lapack.h:159
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
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434
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 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_)
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434
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:434

Member Data Documentation

unsigned short const SiStripFolderOrganizer::all_ = 65535
static

Definition at line 33 of file SiStripFolderOrganizer.h.

Referenced by getSiStripControlFolder().

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