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, std::string &lokal_folder)
 
void getLayerFolderName (std::stringstream &ss, uint32_t rawdetid, 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, bool ring_flag=0)
 
void getSubDetFolder (const uint32_t &detid, std::string &folder_name)
 
std::pair< std::string,
std::string > 
getSubDetFolderAndTag (const uint32_t &detid)
 
void getSubDetLayerFolderName (std::stringstream &ss, SiStripDetId::SubDetector subDet, uint32_t layer, uint32_t side=0)
 
void setDetectorFolder (uint32_t rawdetid=0)
 
void setLayerFolder (uint32_t rawdetid=0, 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 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,
std::string &  lokal_folder 
)

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

Referenced by SiStripInformationExtractor::getCondDBHistos(), SiStripInformationExtractor::getSingleModuleHistos(), SiStripInformationExtractor::getTrackerMapHistos(), and setDetectorFolder().

178  {
179  lokal_folder = "";
180  if(rawdetid == 0 ){ // just top MechanicalFolder if rawdetid==0;
181  return;
182  }
183  std::stringstream rest;
184  SiStripDetId stripdet = SiStripDetId(rawdetid);
185 
186  if (stripdet.subDetector() == SiStripDetId::TIB){
187  // --------------------------- TIB --------------------------- //
188  TIBDetId tib = TIBDetId(rawdetid);
189  getSubDetLayerFolderName(rest,stripdet.subDetector(),tib.layerNumber());
190  if (tib.isZMinusSide()) rest << "backward_strings" << SEP;
191  else rest << "forward_strings" << SEP;
192  if (tib.isExternalString()) rest << "external_strings" << SEP;
193  else rest << "internal_strings" << SEP;
194  rest << "string_" << tib.stringNumber() << SEP << "module_" << rawdetid;
195  } else if(stripdet.subDetector() == SiStripDetId::TID){
196  // --------------------------- TID --------------------------- //
197  TIDDetId tid = TIDDetId(rawdetid);
198  getSubDetLayerFolderName(rest,stripdet.subDetector(),tid.wheel(),tid.side());
199  rest<< "ring_" << tid.ring() << SEP;
200 
201  if (tid.isStereo()) rest << "stereo_modules" << SEP;
202  else rest << "mono_modules" << SEP;
203  rest << "module_" << rawdetid;
204  } else if( stripdet.subDetector() == SiStripDetId::TOB){
205  // --------------------------- TOB --------------------------- //
206  TOBDetId tob = TOBDetId(rawdetid);
207  getSubDetLayerFolderName(rest,stripdet.subDetector(),tob.layerNumber());
208  if (tob.isZMinusSide()) rest << "backward_rods" << SEP;
209  else rest << "forward_rods" << SEP;
210  rest << "rod_" << tob.rodNumber() << SEP<< "module_" << rawdetid;
211  }else if(stripdet.subDetector() == SiStripDetId::TEC){
212  // --------------------------- TEC --------------------------- //
213  TECDetId tec = TECDetId(rawdetid);
214  getSubDetLayerFolderName(rest,stripdet.subDetector(),tec.wheel(),tec.side());
215  if (tec.isBackPetal()) rest << "backward_petals" << SEP;
216  else rest << "forward_petals" << SEP;
217 
218  rest << "petal_" << tec.petalNumber() << SEP
219  << "ring_"<< tec.ringNumber() << SEP;
220 
221  if (tec.isStereo()) 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 }
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,
bool  ring_flag = 0 
)

Definition at line 315 of file SiStripFolderOrganizer.cc.

References TOBDetId::layer(), TIBDetId::layer(), MECHANICAL_FOLDER_NAME, TIDDetId::ring(), TECDetId::ring(), SEP, TIDDetId::side(), TECDetId::side(), SiStripDetId::subDetector(), SiStripDetId::TEC, SiStripDetId::TIB, SiStripDetId::TID, SiStripDetId::TOB, TopFolderName, TIDDetId::wheel(), and TECDetId::wheel().

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  TIBDetId tib1 = TIBDetId(rawdetid);
325  ss<<SEP<<"TIB"<<SEP<<"layer_"<<tib1.layer();
326  }else if(stripdet.subDetector() == SiStripDetId::TID){
327  // --------------------------- TID --------------------------- //
328  TIDDetId tid1 = TIDDetId(rawdetid);
329  if(ring_flag){
330  ss<<SEP<<"TID"<<SEP<<"side_"<<tid1.side()<<SEP<<"ring_"<<tid1.ring();
331  }else{
332  ss<<SEP<<"TID"<<SEP<<"side_"<<tid1.side()<<SEP<<"wheel_"<<tid1.wheel();
333  }
334  }else if(stripdet.subDetector() == SiStripDetId::TOB){
335  // --------------------------- TOB --------------------------- //
336  TOBDetId tob1 = TOBDetId(rawdetid);
337  ss<<SEP<<"TOB"<<SEP<<"layer_"<<tob1.layer();
338  }else if( stripdet.subDetector() == SiStripDetId::TEC){
339  // --------------------------- TEC --------------------------- //
340  TECDetId tec1 = TECDetId(rawdetid);
341  if(ring_flag){
342  ss<<SEP<<"TEC"<<SEP<<"side_"<<tec1.side()<<SEP<<"ring_"<<tec1.ring();
343  }else{
344  ss<<SEP<<"TEC"<<SEP<<"side_"<<tec1.side()<<SEP<<"wheel_"<<tec1.wheel();
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 layer() const
layer id
Definition: TOBDetId.h:39
unsigned int side() const
positive or negative id
Definition: TECDetId.h:47
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
unsigned int side() const
positive or negative id
Definition: TIDDetId.h:45
unsigned int wheel() const
wheel id
Definition: TECDetId.h:52
unsigned int layer() const
layer id
Definition: TIBDetId.h:41
unsigned int ring() const
ring id
Definition: TECDetId.h:71
#define MECHANICAL_FOLDER_NAME
unsigned int wheel() const
wheel id
Definition: TIDDetId.h:50
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, and SEP.

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, and TopFolderName.

Referenced by getSiStripControlFolder().

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

Definition at line 120 of file SiStripFolderOrganizer.cc.

References TOBDetId::layer(), TIBDetId::layer(), TIDDetId::ring(), TECDetId::ring(), TIDDetId::side(), TECDetId::side(), StripSubdetector::TEC, StripSubdetector::TIB, StripSubdetector::TID, StripSubdetector::TOB, TIDDetId::wheel(), and TECDetId::wheel().

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().

120  {
121  std::string cSubDet;
122  int32_t layer=0;
124  {
126  cSubDet="TIB";
127  layer=TIBDetId(detid).layer();
128  break;
130  cSubDet="TOB";
131  layer=TOBDetId(detid).layer();
132  break;
134  cSubDet="TID";
135  if(ring_flag)
136  layer=TIDDetId(detid).ring() * ( TIDDetId(detid).side()==1 ? -1 : +1);
137  else
138  layer=TIDDetId(detid).wheel() * ( TIDDetId(detid).side()==1 ? -1 : +1);
139  break;
141  cSubDet="TEC";
142  if(ring_flag)
143  layer=TECDetId(detid).ring() * ( TECDetId(detid).side()==1 ? -1 : +1);
144  else
145  layer=TECDetId(detid).wheel() * ( TECDetId(detid).side()==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 layer() const
layer id
Definition: TOBDetId.h:39
unsigned int side() const
positive or negative id
Definition: TECDetId.h:47
unsigned int ring() const
ring id
Definition: TIDDetId.h:55
unsigned int side() const
positive or negative id
Definition: TIDDetId.h:45
unsigned int wheel() const
wheel id
Definition: TECDetId.h:52
unsigned int layer() const
layer id
Definition: TIBDetId.h:41
unsigned int ring() const
ring id
Definition: TECDetId.h:71
unsigned int wheel() const
wheel id
Definition: TIDDetId.h:50
void SiStripFolderOrganizer::getSubDetFolder ( const uint32_t &  detid,
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);
310  folder_name = subdet_and_tag.first;
311 }
std::pair< std::string, std::string > getSubDetFolderAndTag(const uint32_t &detid)
std::pair< std::string, std::string > SiStripFolderOrganizer::getSubDetFolderAndTag ( const uint32_t &  detid)

Definition at line 355 of file SiStripFolderOrganizer.cc.

References MECHANICAL_FOLDER_NAME, query::result, SEP, StripSubdetector::TEC, StripSubdetector::TIB, StripSubdetector::TID, 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 (TIDDetId(detid).side() == 2) {
371  subdet_folder = "TID/side_2";
372  result.second = "TID__side__2";
373  } else if (TIDDetId(detid).side() == 1) {
374  subdet_folder = "TID/side_1";
375  result.second = "TID__side__1";
376  }
377  break;
379  if (TECDetId(detid).side() == 2) {
380  subdet_folder = "TEC/side_2";
381  result.second = "TEC__side__2";
382  } else if (TECDetId(detid).side() == 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 }
tuple result
Definition: query.py:137
#define SEP
#define MECHANICAL_FOLDER_NAME
void SiStripFolderOrganizer::getSubDetLayerFolderName ( std::stringstream &  ss,
SiStripDetId::SubDetector  subDet,
uint32_t  layer,
uint32_t  side = 0 
)

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

160  {
162 
163  if(subDet == SiStripDetId::TIB){
164  ss << SEP << "TIB" << SEP << "layer_" << layer << SEP;
165  } else if(subDet == SiStripDetId::TID){
166  ss << SEP << "TID" << SEP << "side_" << side << SEP << "wheel_" << layer << SEP;
167  } else if( subDet == SiStripDetId::TOB){
168  ss << SEP << "TOB" << SEP << "layer_" << layer << SEP;
169  }else if(subDet == SiStripDetId::TEC){
170  ss << SEP << "TEC" << SEP << "side_" << side << SEP << "wheel_" << layer << SEP;
171  }else{
172  // --------------------------- ??? --------------------------- //
173  edm::LogWarning("SiStripTkDQM|WrongInput")<<"no such SubDet :"<< subDet <<" no folder set!"<<std::endl;
174  }
175 }
#define SEP
#define MECHANICAL_FOLDER_NAME
const SiStripFolderOrganizer& SiStripFolderOrganizer::operator= ( const SiStripFolderOrganizer )
private
void SiStripFolderOrganizer::setDetectorFolder ( uint32_t  rawdetid = 0)
void SiStripFolderOrganizer::setLayerFolder ( uint32_t  rawdetid = 0,
int32_t  layer = 0,
bool  ring_flag = 0 
)

Definition at line 234 of file SiStripFolderOrganizer.cc.

References abs, dbe_, TOBDetId::layer(), TIBDetId::layer(), MECHANICAL_FOLDER_NAME, TIDDetId::ring(), TECDetId::ring(), SEP, DQMStore::setCurrentFolder(), TIDDetId::side(), TECDetId::side(), SiStripDetId::subDetector(), SiStripDetId::TEC, SiStripDetId::TIB, SiStripDetId::TID, SiStripDetId::TOB, TopFolderName, TIDDetId::wheel(), and TECDetId::wheel().

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

234  {
235  std::string lokal_folder = TopFolderName + SEP + MECHANICAL_FOLDER_NAME;
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  TIBDetId tib1 = TIBDetId(rawdetid);
246  int tib_layer = tib1.layer();
247  if (abs(layer) != tib_layer) {
248  edm::LogWarning("SiStripTkDQM|Layer mismatch!!!")<< " expect "<< abs(layer) << " but getting " << tib1.layer() <<std::endl;
249  return;
250  }
251  rest<<SEP<<"TIB"<<SEP<<"layer_"<<tib1.layer();
252  }else if(stripdet.subDetector() == SiStripDetId::TID){
253  // --------------------------- TID --------------------------- //
254  TIDDetId tid1 = TIDDetId(rawdetid);
255  int tid_ring = tid1.ring();
256  if(ring_flag){
257  if(abs(layer) != tid_ring) {
258  edm::LogWarning("SiStripTkDQM|Layer mismatch!!!")<< " expect "<< abs(layer) << " but getting " << tid1.ring() <<std::endl;
259  return;
260  }
261  rest<<SEP<<"TID"<<SEP<<"side_"<<tid1.side()<<SEP<<"ring_"<<tid1.ring();
262  }else{
263  int tid_wheel = tid1.wheel();
264  if (abs(layer) != tid_wheel) {
265  edm::LogWarning("SiStripTkDQM|Layer mismatch!!!")<< " expect "<< abs(layer) << " but getting " << tid1.wheel() <<std::endl;
266  return;
267  }
268  rest<<SEP<<"TID"<<SEP<<"side_"<<tid1.side()<<SEP<<"wheel_"<<tid1.wheel();
269  }
270  }else if(stripdet.subDetector() == SiStripDetId::TOB){
271  // --------------------------- TOB --------------------------- //
272  TOBDetId tob1 = TOBDetId(rawdetid);
273  int tob_layer = tob1.layer();
274  if (abs(layer) != tob_layer) {
275  edm::LogWarning("SiStripTkDQM|Layer mismatch!!!")<< " expect "<< abs(layer) << " but getting " << tob1.layer() <<std::endl;
276  return;
277  }
278  rest<<SEP<<"TOB"<<SEP<<"layer_"<<tob1.layer();
279  }else if( stripdet.subDetector() == SiStripDetId::TEC){
280  // --------------------------- TEC --------------------------- //
281  TECDetId tec1 = TECDetId(rawdetid);
282  if(ring_flag){
283  int tec_ring = tec1.ring();
284  if (abs(layer) != tec_ring) {
285  edm::LogWarning("SiStripTkDQM|Layer mismatch!!!")<< " expect "<< abs(layer) << " but getting " << tec1.ring() <<std::endl;
286  return;
287  }
288  rest<<SEP<<"TEC"<<SEP<<"side_"<<tec1.side()<<SEP<<"ring_"<<tec1.ring();
289  }else{
290  int tec_wheel = tec1.wheel();
291  if (abs(layer) != tec_wheel) {
292  edm::LogWarning("SiStripTkDQM|Layer mismatch!!!")<< " expect "<< abs(layer) << " but getting " << tec1.wheel() <<std::endl;
293  return;
294  }
295  rest<<SEP<<"TEC"<<SEP<<"side_"<<tec1.side()<<SEP<<"wheel_"<<tec1.wheel();
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 layer() const
layer id
Definition: TOBDetId.h:39
#define abs(x)
Definition: mlp_lapack.h:159
unsigned int side() const
positive or negative id
Definition: TECDetId.h:47
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
unsigned int side() const
positive or negative id
Definition: TIDDetId.h:45
unsigned int wheel() const
wheel id
Definition: TECDetId.h:52
unsigned int layer() const
layer id
Definition: TIBDetId.h:41
unsigned int ring() const
ring id
Definition: TECDetId.h:71
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:429
#define MECHANICAL_FOLDER_NAME
unsigned int wheel() const
wheel id
Definition: TIDDetId.h:50
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(), and DQMStore::setCurrentFolder().

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:429
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(), and TopFolderName.

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

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