CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
SiPixelFolderOrganizer Class Reference

#include <SiPixelFolderOrganizer.h>

Public Types

typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 

Public Member Functions

void getModuleFolder (const uint32_t &rawdetid, std::string &path, bool isUpgrade)
 
bool setFedFolder (const uint32_t FedId)
 Set folder name for a FED (used in the case of errors without detId) More...
 
bool setFedFolder (DQMStore::IBooker &, const uint32_t FedId)
 
bool setModuleFolder (const uint32_t &rawdetid=0, int type=0, bool isUpgrade=false)
 Set folder name for a module or plaquette. More...
 
bool setModuleFolder (DQMStore::IBooker &, const uint32_t &rawdetid=0, int type=0, bool isUpgrade=false)
 
 SiPixelFolderOrganizer (bool getStore=true)
 DQM and Framework services. More...
 
virtual ~SiPixelFolderOrganizer ()
 Destructor. More...
 

Private Attributes

DQMStoredbe_
 
std::string topFolderName
 

Detailed Description

DQM/SiPixelCommon/interface/SiPixelFolderOrganizer.h

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

Usage: <usage>

Definition at line 26 of file SiPixelFolderOrganizer.h.

Member Typedef Documentation

◆ DQMStore

Definition at line 28 of file SiPixelFolderOrganizer.h.

◆ MonitorElement

Definition at line 29 of file SiPixelFolderOrganizer.h.

Constructor & Destructor Documentation

◆ SiPixelFolderOrganizer()

SiPixelFolderOrganizer::SiPixelFolderOrganizer ( bool  getStore = true)

DQM and Framework services.

Constructor - getStore should be called false from multi-thread DQM applications

Data Formats Constructor

Definition at line 17 of file SiPixelFolderOrganizer.cc.

17  : topFolderName("Pixel") {
18  // Not allowed in multithread framework, but can still be called by other
19  // modules not from DQM.
20  if (getStore)
21  dbe_ = edm::Service<DQMStore>().operator->();
22 }

References dbe_.

◆ ~SiPixelFolderOrganizer()

SiPixelFolderOrganizer::~SiPixelFolderOrganizer ( )
virtual

Destructor.

Definition at line 24 of file SiPixelFolderOrganizer.cc.

24 {}

Member Function Documentation

◆ getModuleFolder()

void SiPixelFolderOrganizer::getModuleFolder ( const uint32_t &  rawdetid,
std::string &  path,
bool  isUpgrade 
)

Definition at line 427 of file SiPixelFolderOrganizer.cc.

427  {
429  if (rawdetid == 0) {
430  return;
431  } else if ((DetId(rawdetid).subdetId() == static_cast<int>(PixelSubdetector::PixelBarrel)) && (!isUpgrade)) {
432  std::string subDetectorFolder = "Barrel";
433  PixelBarrelName::Shell DBshell = PixelBarrelName(DetId(rawdetid)).shell();
434  int DBlayer = PixelBarrelName(DetId(rawdetid)).layerName();
435  int DBladder = PixelBarrelName(DetId(rawdetid)).ladderName();
436  int DBmodule = PixelBarrelName(DetId(rawdetid)).moduleName();
437 
438  // char sshell[80]; sprintf(sshell, "Shell_%i", DBshell);
439  char slayer[80];
440  sprintf(slayer, "Layer_%i", DBlayer);
441  char sladder[80];
442  sprintf(sladder, "Ladder_%02i", DBladder);
443  char smodule[80];
444  sprintf(smodule, "Module_%i", DBmodule);
445 
446  std::ostringstream sfolder;
447  sfolder << topFolderName << "/" << subDetectorFolder << "/Shell_" << DBshell << "/" << slayer << "/" << sladder;
448  if (PixelBarrelName(DetId(rawdetid)).isHalfModule())
449  sfolder << "H";
450  else
451  sfolder << "F";
452  sfolder << "/" << smodule;
453  path = sfolder.str();
454 
455  // path = path + "/" + subDetectorFolder + "/" + sshell + "/" + slayer + "/"
456  // + sladder; if(PixelBarrelName(DetId(rawdetid)).isHalfModule() )
457  // path = path + "H";
458  // else path = path + "F";
459  // path = path + "/" + smodule;
460 
461  } else if ((DetId(rawdetid).subdetId() == static_cast<int>(PixelSubdetector::PixelBarrel)) && (isUpgrade)) {
462  std::string subDetectorFolder = "Barrel";
464  int DBlayer = PixelBarrelNameUpgrade(DetId(rawdetid)).layerName();
465  int DBladder = PixelBarrelNameUpgrade(DetId(rawdetid)).ladderName();
466  int DBmodule = PixelBarrelNameUpgrade(DetId(rawdetid)).moduleName();
467 
468  // char sshell[80]; sprintf(sshell, "Shell_%i", DBshell);
469  char slayer[80];
470  sprintf(slayer, "Layer_%i", DBlayer);
471  char sladder[80];
472  sprintf(sladder, "Ladder_%02i", DBladder);
473  char smodule[80];
474  sprintf(smodule, "Module_%i", DBmodule);
475 
476  std::ostringstream sfolder;
477  sfolder << topFolderName << "/" << subDetectorFolder << "/Shell_" << DBshell << "/" << slayer << "/" << sladder;
478  if (PixelBarrelNameUpgrade(DetId(rawdetid)).isHalfModule())
479  sfolder << "H";
480  else
481  sfolder << "F";
482  sfolder << "/" << smodule;
483  path = sfolder.str();
484 
485  // path = path + "/" + subDetectorFolder + "/" + sshell + "/" + slayer + "/"
486  // + sladder; if(PixelBarrelNameUpgrade(DetId(rawdetid)).isHalfModule() )
487  // path = path + "H";
488  // else path = path + "F";
489  // path = path + "/" + smodule;
490 
491  } else if ((DetId(rawdetid).subdetId() == static_cast<int>(PixelSubdetector::PixelEndcap)) && (!isUpgrade)) {
492  std::string subDetectorFolder = "Endcap";
494  int disk = PixelEndcapName(DetId(rawdetid)).diskName();
495  int blade = PixelEndcapName(DetId(rawdetid)).bladeName();
496  int panel = PixelEndcapName(DetId(rawdetid)).pannelName();
497  int module = PixelEndcapName(DetId(rawdetid)).plaquetteName();
498 
499  // char shc[80]; sprintf(shc, "HalfCylinder_%i",side);
500  char sdisk[80];
501  sprintf(sdisk, "Disk_%i", disk);
502  char sblade[80];
503  sprintf(sblade, "Blade_%02i", blade);
504  char spanel[80];
505  sprintf(spanel, "Panel_%i", panel);
506  char smodule[80];
507  sprintf(smodule, "Module_%i", module);
508 
509  std::ostringstream sfolder;
510  sfolder << topFolderName << "/" << subDetectorFolder << "/HalfCylinder_" << side << "/" << sdisk << "/" << sblade
511  << "/" << spanel << "/" << smodule;
512  path = sfolder.str();
513 
514  // path = path + "/" + subDetectorFolder + "/" + shc + "/" + sdisk + "/" +
515  // sblade + "/" + spanel + "/" + smodule;
516 
517  } else if ((DetId(rawdetid).subdetId() == static_cast<int>(PixelSubdetector::PixelEndcap)) && (isUpgrade)) {
518  std::string subDetectorFolder = "Endcap";
520  int disk = PixelEndcapNameUpgrade(DetId(rawdetid)).diskName();
521  int blade = PixelEndcapNameUpgrade(DetId(rawdetid)).bladeName();
522  int panel = PixelEndcapNameUpgrade(DetId(rawdetid)).pannelName();
524 
525  // char shc[80]; sprintf(shc, "HalfCylinder_%i",side);
526  char sdisk[80];
527  sprintf(sdisk, "Disk_%i", disk);
528  char sblade[80];
529  sprintf(sblade, "Blade_%02i", blade);
530  char spanel[80];
531  sprintf(spanel, "Panel_%i", panel);
532  char smodule[80];
533  sprintf(smodule, "Module_%i", module);
534 
535  std::ostringstream sfolder;
536  sfolder << topFolderName << "/" << subDetectorFolder << "/HalfCylinder_" << side << "/" << sdisk << "/" << sblade
537  << "/" << spanel << "/" << smodule;
538  path = sfolder.str();
539 
540  // path = path + "/" + subDetectorFolder + "/" + shc + "/" + sdisk + "/" +
541  // sblade + "/" + spanel + "/" + smodule;
542 
543  } else
544  throw cms::Exception("LogicError") << "[SiPixelFolderOrganizer::getModuleFolder] Not a Pixel detector "
545  "DetId ";
546 
547  // std::cout<<"resulting final path name: "<<path<<std::endl;
548 
549  return;
550 }

References PixelEndcapNameUpgrade::bladeName(), PixelEndcapName::bladeName(), PixelEndcapNameUpgrade::diskName(), PixelEndcapName::diskName(), Exception, PixelEndcapNameUpgrade::halfCylinder(), PixelEndcapName::halfCylinder(), SiPixelOfflineDQM_client_cff::isUpgrade, PixelBarrelNameUpgrade::ladderName(), PixelBarrelName::ladderName(), PixelBarrelNameUpgrade::layerName(), PixelBarrelName::layerName(), callgraph::module, PixelBarrelNameUpgrade::moduleName(), PixelBarrelName::moduleName(), PixelEndcapNameUpgrade::pannelName(), PixelEndcapName::pannelName(), castor_dqm_sourceclient_file_cfg::path, PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, PixelEndcapNameUpgrade::plaquetteName(), PixelEndcapName::plaquetteName(), PixelBarrelNameUpgrade::shell(), PixelBarrelName::shell(), AlCaHLTBitMon_QueryRunRegistry::string, and topFolderName.

◆ setFedFolder() [1/2]

bool SiPixelFolderOrganizer::setFedFolder ( const uint32_t  FedId)

Set folder name for a FED (used in the case of errors without detId)

Definition at line 402 of file SiPixelFolderOrganizer.cc.

402  {
403  std::string subDetectorFolder = "AdditionalPixelErrors";
404  char sFed[80];
405  sprintf(sFed, "FED_%i", FedId);
406  std::ostringstream sfolder;
407 
408  sfolder << topFolderName << "/" << subDetectorFolder << "/" << sFed;
409  dbe_->setCurrentFolder(sfolder.str());
410 
411  return true;
412 }

References dbe_, bmtfStage2Raw_cfi::FedId, dqm::implementation::DQMStore::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, and topFolderName.

Referenced by SiPixelRawDataErrorSource::bookMEs().

◆ setFedFolder() [2/2]

bool SiPixelFolderOrganizer::setFedFolder ( DQMStore::IBooker iBooker,
const uint32_t  FedId 
)

Definition at line 415 of file SiPixelFolderOrganizer.cc.

415  {
416  std::string subDetectorFolder = "AdditionalPixelErrors";
417  char sFed[80];
418  sprintf(sFed, "FED_%i", FedId);
419  std::ostringstream sfolder;
420 
421  sfolder << topFolderName << "/" << subDetectorFolder << "/" << sFed;
422  iBooker.setCurrentFolder(sfolder.str());
423 
424  return true;
425 }

References bmtfStage2Raw_cfi::FedId, dqm::implementation::NavigatorBase::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, and topFolderName.

◆ setModuleFolder() [1/2]

bool SiPixelFolderOrganizer::setModuleFolder ( const uint32_t &  rawdetid = 0,
int  type = 0,
bool  isUpgrade = false 
)

Set folder name for a module or plaquette.

Pixel Barrel

Pixel Endcap

Definition at line 27 of file SiPixelFolderOrganizer.cc.

27  {
28  bool flag = false;
29 
30  if (rawdetid == 0) {
32  flag = true;
33  }
37  else if (DetId(rawdetid).subdetId() == static_cast<int>(PixelSubdetector::PixelBarrel)) {
38  if (!isUpgrade) {
39  // for endcap types there is nothing to do:
40  if (type > 3 && type != 7)
41  return true;
42 
43  std::string subDetectorFolder = "Barrel";
44  PixelBarrelName::Shell DBshell = PixelBarrelName(DetId(rawdetid)).shell();
45  int DBlayer = PixelBarrelName(DetId(rawdetid)).layerName();
46  int DBladder = PixelBarrelName(DetId(rawdetid)).ladderName();
47  int DBmodule = PixelBarrelName(DetId(rawdetid)).moduleName();
48 
49  char slayer[80];
50  sprintf(slayer, "Layer_%i", DBlayer);
51  char sladder[80];
52  sprintf(sladder, "Ladder_%02i", DBladder);
53  char smodule[80];
54  sprintf(smodule, "Module_%i", DBmodule);
55 
56  std::ostringstream sfolder;
57 
58  sfolder << topFolderName << "/" << subDetectorFolder;
59  if (type < 4) {
60  sfolder << "/Shell_" << DBshell << "/" << slayer;
61  }
62  if (type < 2) {
63  sfolder << "/" << sladder;
64  if (PixelBarrelName(DetId(rawdetid)).isHalfModule())
65  sfolder << "H";
66  else
67  sfolder << "F";
68  }
69  if (type == 0)
70  sfolder << "/" << smodule;
71  // if(type==3) sfolder << "/all_" << smodule;
72 
73  // std::cout<<"set barrel folder: "<<rawdetid<<" :
74  // "<<sfolder.str().c_str()<<std::endl;
75 
76  dbe_->setCurrentFolder(sfolder.str());
77  flag = true;
78  } else if (isUpgrade) {
79  // for endcap types there is nothing to do:
80  if (type > 3 && type != 7)
81  return true;
82 
83  std::string subDetectorFolder = "Barrel";
85  int DBlayer = PixelBarrelNameUpgrade(DetId(rawdetid)).layerName();
86  int DBladder = PixelBarrelNameUpgrade(DetId(rawdetid)).ladderName();
87  int DBmodule = PixelBarrelNameUpgrade(DetId(rawdetid)).moduleName();
88 
89  char slayer[80];
90  sprintf(slayer, "Layer_%i", DBlayer);
91  char sladder[80];
92  sprintf(sladder, "Ladder_%02i", DBladder);
93  char smodule[80];
94  sprintf(smodule, "Module_%i", DBmodule);
95 
96  std::ostringstream sfolder;
97 
98  sfolder << topFolderName << "/" << subDetectorFolder;
99  if (type < 4) {
100  sfolder << "/Shell_" << DBshell << "/" << slayer;
101  }
102  if (type < 2) {
103  sfolder << "/" << sladder;
104  if (PixelBarrelNameUpgrade(DetId(rawdetid)).isHalfModule())
105  sfolder << "H";
106  else
107  sfolder << "F";
108  }
109  if (type == 0)
110  sfolder << "/" << smodule;
111  // if(type==3) sfolder << "/all_" << smodule;
112 
113  // std::cout<<"set barrel folder: "<<rawdetid<<" :
114  // "<<sfolder.str().c_str()<<std::endl;
115 
116  dbe_->setCurrentFolder(sfolder.str());
117  flag = true;
118  } // endif(isUpgrade)
119  }
120 
124  else if (DetId(rawdetid).subdetId() == static_cast<int>(PixelSubdetector::PixelEndcap)) {
125  if (!isUpgrade) {
126  // for barrel types there is nothing to do:
127  if (type > 0 && type < 4)
128  return true;
129 
130  std::string subDetectorFolder = "Endcap";
132  int disk = PixelEndcapName(DetId(rawdetid)).diskName();
133  int blade = PixelEndcapName(DetId(rawdetid)).bladeName();
134  int panel = PixelEndcapName(DetId(rawdetid)).pannelName();
135  int module = PixelEndcapName(DetId(rawdetid)).plaquetteName();
136 
137  char sdisk[80];
138  sprintf(sdisk, "Disk_%i", disk);
139  char sblade[80];
140  sprintf(sblade, "Blade_%02i", blade);
141  char spanel[80];
142  sprintf(spanel, "Panel_%i", panel);
143  char smodule[80];
144  sprintf(smodule, "Module_%i", module);
145 
146  std::ostringstream sfolder;
147 
148  sfolder << topFolderName << "/" << subDetectorFolder << "/HalfCylinder_" << side << "/" << sdisk;
149  if (type == 0 || type == 4) {
150  sfolder << "/" << sblade;
151  }
152  if (type == 0) {
153  sfolder << "/" << spanel << "/" << smodule;
154  }
155  // if(type==6){
156  // sfolder << "/" << spanel << "_all_" << smodule;
157  // }
158 
159  // std::cout<<"set endcap folder: "<<rawdetid<<" :
160  // "<<sfolder.str().c_str()<<std::endl;
161 
162  dbe_->setCurrentFolder(sfolder.str());
163  flag = true;
164 
165  } else if (isUpgrade) {
166  // for barrel types there is nothing to do:
167  if (type > 0 && type < 4)
168  return true;
169 
170  std::string subDetectorFolder = "Endcap";
172  int disk = PixelEndcapNameUpgrade(DetId(rawdetid)).diskName();
173  int blade = PixelEndcapNameUpgrade(DetId(rawdetid)).bladeName();
174  int panel = PixelEndcapNameUpgrade(DetId(rawdetid)).pannelName();
176 
177  char sdisk[80];
178  sprintf(sdisk, "Disk_%i", disk);
179  char sblade[80];
180  sprintf(sblade, "Blade_%02i", blade);
181  char spanel[80];
182  sprintf(spanel, "Panel_%i", panel);
183  char smodule[80];
184  sprintf(smodule, "Module_%i", module);
185 
186  std::ostringstream sfolder;
187 
188  sfolder << topFolderName << "/" << subDetectorFolder << "/HalfCylinder_" << side << "/" << sdisk;
189  if (type == 0 || type == 4) {
190  sfolder << "/" << sblade;
191  }
192  if (type == 0) {
193  sfolder << "/" << spanel << "/" << smodule;
194  }
195  // if(type==6){
196  // sfolder << "/" << spanel << "_all_" << smodule;
197  // }
198 
199  // std::cout<<"set endcap folder: "<<rawdetid<<" :
200  // "<<sfolder.str().c_str()<<std::endl;
201 
202  dbe_->setCurrentFolder(sfolder.str());
203  flag = true;
204  } // endifendcap&&isUpgrade
205  } else
206  throw cms::Exception("LogicError") << "[SiPixelFolderOrganizer::setModuleFolder] Not a Pixel detector "
207  "DetId ";
208 
209  return flag;
210 }

References PixelEndcapNameUpgrade::bladeName(), PixelEndcapName::bladeName(), dbe_, PixelEndcapNameUpgrade::diskName(), PixelEndcapName::diskName(), Exception, RemoveAddSevLevel::flag, PixelEndcapNameUpgrade::halfCylinder(), PixelEndcapName::halfCylinder(), SiPixelOfflineDQM_client_cff::isUpgrade, PixelBarrelNameUpgrade::ladderName(), PixelBarrelName::ladderName(), PixelBarrelNameUpgrade::layerName(), PixelBarrelName::layerName(), callgraph::module, PixelBarrelNameUpgrade::moduleName(), PixelBarrelName::moduleName(), PixelEndcapNameUpgrade::pannelName(), PixelEndcapName::pannelName(), PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, PixelEndcapNameUpgrade::plaquetteName(), PixelEndcapName::plaquetteName(), dqm::implementation::DQMStore::setCurrentFolder(), PixelBarrelNameUpgrade::shell(), PixelBarrelName::shell(), AlCaHLTBitMon_QueryRunRegistry::string, DetId::subdetId(), and topFolderName.

Referenced by SiPixelTrackResidualSource::bookHistograms(), SiPixelHitEfficiencySource::bookHistograms(), SiPixelDigiSource::bookMEs(), SiPixelClusterSource::bookMEs(), SiPixelRawDataErrorSource::bookMEs(), SiPixelRecHitSource::bookMEs(), SiPixelErrorsDigisToCalibDigis::setDQMDirectory(), and SiPixelOfflineCalibAnalysisBase::setDQMDirectory().

◆ setModuleFolder() [2/2]

bool SiPixelFolderOrganizer::setModuleFolder ( DQMStore::IBooker iBooker,
const uint32_t &  rawdetid = 0,
int  type = 0,
bool  isUpgrade = false 
)

Pixel Barrel

Pixel Endcap

Definition at line 213 of file SiPixelFolderOrganizer.cc.

216  {
217  bool flag = false;
218 
219  if (rawdetid == 0) {
221  flag = true;
222  }
226  else if (DetId(rawdetid).subdetId() == static_cast<int>(PixelSubdetector::PixelBarrel)) {
227  if (!isUpgrade) {
228  // for endcap types there is nothing to do:
229  if (type > 3 && type != 7)
230  return true;
231 
232  std::string subDetectorFolder = "Barrel";
233  PixelBarrelName::Shell DBshell = PixelBarrelName(DetId(rawdetid)).shell();
234  int DBlayer = PixelBarrelName(DetId(rawdetid)).layerName();
235  int DBladder = PixelBarrelName(DetId(rawdetid)).ladderName();
236  int DBmodule = PixelBarrelName(DetId(rawdetid)).moduleName();
237 
238  char slayer[80];
239  sprintf(slayer, "Layer_%i", DBlayer);
240  char sladder[80];
241  sprintf(sladder, "Ladder_%02i", DBladder);
242  char smodule[80];
243  sprintf(smodule, "Module_%i", DBmodule);
244 
245  std::ostringstream sfolder;
246 
247  sfolder << topFolderName << "/" << subDetectorFolder;
248  if (type < 4) {
249  sfolder << "/Shell_" << DBshell << "/" << slayer;
250  }
251  if (type < 2) {
252  sfolder << "/" << sladder;
253  if (PixelBarrelName(DetId(rawdetid)).isHalfModule())
254  sfolder << "H";
255  else
256  sfolder << "F";
257  }
258  if (type == 0)
259  sfolder << "/" << smodule;
260  // if(type==3) sfolder << "/all_" << smodule;
261 
262  // std::cout<<"set barrel folder: "<<rawdetid<<" :
263  // "<<sfolder.str().c_str()<<std::endl;
264 
265  iBooker.setCurrentFolder(sfolder.str());
266  flag = true;
267  } else if (isUpgrade) {
268  // for endcap types there is nothing to do:
269  if (type > 3 && type != 7)
270  return true;
271 
272  std::string subDetectorFolder = "Barrel";
274  int DBlayer = PixelBarrelNameUpgrade(DetId(rawdetid)).layerName();
275  int DBladder = PixelBarrelNameUpgrade(DetId(rawdetid)).ladderName();
276  int DBmodule = PixelBarrelNameUpgrade(DetId(rawdetid)).moduleName();
277 
278  char slayer[80];
279  sprintf(slayer, "Layer_%i", DBlayer);
280  char sladder[80];
281  sprintf(sladder, "Ladder_%02i", DBladder);
282  char smodule[80];
283  sprintf(smodule, "Module_%i", DBmodule);
284 
285  std::ostringstream sfolder;
286 
287  sfolder << topFolderName << "/" << subDetectorFolder;
288  if (type < 4) {
289  sfolder << "/Shell_" << DBshell << "/" << slayer;
290  }
291  if (type < 2) {
292  sfolder << "/" << sladder;
293  if (PixelBarrelNameUpgrade(DetId(rawdetid)).isHalfModule())
294  sfolder << "H";
295  else
296  sfolder << "F";
297  }
298  if (type == 0)
299  sfolder << "/" << smodule;
300  // if(type==3) sfolder << "/all_" << smodule;
301 
302  // std::cout<<"set barrel folder: "<<rawdetid<<" :
303  // "<<sfolder.str().c_str()<<std::endl;
304 
305  iBooker.setCurrentFolder(sfolder.str());
306  flag = true;
307  } // endif(isUpgrade)
308  }
309 
313  else if (DetId(rawdetid).subdetId() == static_cast<int>(PixelSubdetector::PixelEndcap)) {
314  if (!isUpgrade) {
315  // for barrel types there is nothing to do:
316  if (type > 0 && type < 4)
317  return true;
318 
319  std::string subDetectorFolder = "Endcap";
321  int disk = PixelEndcapName(DetId(rawdetid)).diskName();
322  int blade = PixelEndcapName(DetId(rawdetid)).bladeName();
323  int panel = PixelEndcapName(DetId(rawdetid)).pannelName();
324  int module = PixelEndcapName(DetId(rawdetid)).plaquetteName();
325 
326  char sdisk[80];
327  sprintf(sdisk, "Disk_%i", disk);
328  char sblade[80];
329  sprintf(sblade, "Blade_%02i", blade);
330  char spanel[80];
331  sprintf(spanel, "Panel_%i", panel);
332  char smodule[80];
333  sprintf(smodule, "Module_%i", module);
334 
335  std::ostringstream sfolder;
336 
337  sfolder << topFolderName << "/" << subDetectorFolder << "/HalfCylinder_" << side << "/" << sdisk;
338  if (type == 0 || type == 4) {
339  sfolder << "/" << sblade;
340  }
341  if (type == 0) {
342  sfolder << "/" << spanel << "/" << smodule;
343  }
344  // if(type==6){
345  // sfolder << "/" << spanel << "_all_" << smodule;
346  // }
347 
348  // std::cout<<"set endcap folder: "<<rawdetid<<" :
349  // "<<sfolder.str().c_str()<<std::endl;
350 
351  iBooker.setCurrentFolder(sfolder.str());
352  flag = true;
353 
354  } else if (isUpgrade) {
355  // for barrel types there is nothing to do:
356  if (type > 0 && type < 4)
357  return true;
358 
359  std::string subDetectorFolder = "Endcap";
361  int disk = PixelEndcapNameUpgrade(DetId(rawdetid)).diskName();
362  int blade = PixelEndcapNameUpgrade(DetId(rawdetid)).bladeName();
363  int panel = PixelEndcapNameUpgrade(DetId(rawdetid)).pannelName();
365 
366  char sdisk[80];
367  sprintf(sdisk, "Disk_%i", disk);
368  char sblade[80];
369  sprintf(sblade, "Blade_%02i", blade);
370  char spanel[80];
371  sprintf(spanel, "Panel_%i", panel);
372  char smodule[80];
373  sprintf(smodule, "Module_%i", module);
374 
375  std::ostringstream sfolder;
376 
377  sfolder << topFolderName << "/" << subDetectorFolder << "/HalfCylinder_" << side << "/" << sdisk;
378  if (type == 0 || type == 4) {
379  sfolder << "/" << sblade;
380  }
381  if (type == 0) {
382  sfolder << "/" << spanel << "/" << smodule;
383  }
384  // if(type==6){
385  // sfolder << "/" << spanel << "_all_" << smodule;
386  // }
387 
388  // std::cout<<"set endcap folder: "<<rawdetid<<" :
389  // "<<sfolder.str().c_str()<<std::endl;
390 
391  iBooker.setCurrentFolder(sfolder.str());
392  flag = true;
393  } // endifendcap&&isUpgrade
394  } else
395  throw cms::Exception("LogicError") << "[SiPixelFolderOrganizer::setModuleFolder] Not a Pixel detector "
396  "DetId ";
397 
398  return flag;
399 }

References PixelEndcapNameUpgrade::bladeName(), PixelEndcapName::bladeName(), PixelEndcapNameUpgrade::diskName(), PixelEndcapName::diskName(), Exception, RemoveAddSevLevel::flag, PixelEndcapNameUpgrade::halfCylinder(), PixelEndcapName::halfCylinder(), SiPixelOfflineDQM_client_cff::isUpgrade, PixelBarrelNameUpgrade::ladderName(), PixelBarrelName::ladderName(), PixelBarrelNameUpgrade::layerName(), PixelBarrelName::layerName(), callgraph::module, PixelBarrelNameUpgrade::moduleName(), PixelBarrelName::moduleName(), PixelEndcapNameUpgrade::pannelName(), PixelEndcapName::pannelName(), PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, PixelEndcapNameUpgrade::plaquetteName(), PixelEndcapName::plaquetteName(), dqm::implementation::NavigatorBase::setCurrentFolder(), PixelBarrelNameUpgrade::shell(), PixelBarrelName::shell(), AlCaHLTBitMon_QueryRunRegistry::string, DetId::subdetId(), and topFolderName.

Member Data Documentation

◆ dbe_

DQMStore* SiPixelFolderOrganizer::dbe_
private

Definition at line 51 of file SiPixelFolderOrganizer.h.

Referenced by setFedFolder(), setModuleFolder(), and SiPixelFolderOrganizer().

◆ topFolderName

std::string SiPixelFolderOrganizer::topFolderName
private

Definition at line 50 of file SiPixelFolderOrganizer.h.

Referenced by getModuleFolder(), setFedFolder(), and setModuleFolder().

PixelEndcapNameUpgrade::diskName
int diskName() const
disk id
Definition: PixelEndcapNameUpgrade.h:38
PixelBarrelNameUpgrade::shell
Shell shell() const
Definition: PixelBarrelNameUpgrade.h:33
PixelEndcapNameUpgrade::HalfCylinder
HalfCylinder
Definition: PixelEndcapNameUpgrade.h:18
PixelSubdetector::PixelEndcap
Definition: PixelSubdetector.h:11
PixelSubdetector::PixelBarrel
Definition: PixelSubdetector.h:11
PixelBarrelNameUpgrade::moduleName
int moduleName() const
module id (index in z)
Definition: PixelBarrelNameUpgrade.h:39
PixelBarrelName
Definition: PixelBarrelName.h:16
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
PixelBarrelNameUpgrade
Definition: PixelBarrelNameUpgrade.h:14
PixelEndcapNameUpgrade::bladeName
int bladeName() const
blade id
Definition: PixelEndcapNameUpgrade.h:41
bmtfStage2Raw_cfi.FedId
FedId
Definition: bmtfStage2Raw_cfi.py:10
SiPixelFolderOrganizer::dbe_
DQMStore * dbe_
Definition: SiPixelFolderOrganizer.h:51
PixelEndcapNameUpgrade
Definition: PixelEndcapNameUpgrade.h:16
PixelEndcapName::halfCylinder
HalfCylinder halfCylinder() const
Definition: PixelEndcapName.h:42
PixelBarrelName::layerName
int layerName() const
layer id
Definition: PixelBarrelName.h:43
PixelEndcapName::pannelName
int pannelName() const
pannel id
Definition: PixelEndcapName.h:51
PixelEndcapName::bladeName
int bladeName() const
blade id
Definition: PixelEndcapName.h:48
SiPixelFolderOrganizer::topFolderName
std::string topFolderName
Definition: SiPixelFolderOrganizer.h:50
DetId
Definition: DetId.h:17
PixelEndcapName
Definition: PixelEndcapName.h:16
dqm::implementation::DQMStore::setCurrentFolder
void setCurrentFolder(std::string const &fullpath) override
Definition: DQMStore.h:569
PixelBarrelName::ladderName
int ladderName() const
ladder id (index in phi)
Definition: PixelBarrelName.h:49
DetId::subdetId
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
Definition: DetId.h:48
PixelEndcapNameUpgrade::pannelName
int pannelName() const
pannel id
Definition: PixelEndcapNameUpgrade.h:44
PixelBarrelName::shell
Shell shell() const
Definition: PixelBarrelName.h:40
type
type
Definition: SiPixelVCal_PayloadInspector.cc:39
PixelEndcapNameUpgrade::halfCylinder
HalfCylinder halfCylinder() const
Definition: PixelEndcapNameUpgrade.h:35
PixelBarrelNameUpgrade::Shell
Shell
Definition: PixelBarrelNameUpgrade.h:16
edm::Service
Definition: Service.h:30
PixelBarrelName::Shell
Shell
Definition: PixelBarrelName.h:18
PixelBarrelName::moduleName
int moduleName() const
module id (index in z)
Definition: PixelBarrelName.h:46
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
callgraph.module
module
Definition: callgraph.py:61
PixelEndcapName::HalfCylinder
HalfCylinder
Definition: PixelEndcapName.h:18
PixelEndcapName::diskName
int diskName() const
disk id
Definition: PixelEndcapName.h:45
PixelBarrelNameUpgrade::layerName
int layerName() const
layer id
Definition: PixelBarrelNameUpgrade.h:36
Exception
Definition: hltDiff.cc:245
PixelEndcapNameUpgrade::plaquetteName
int plaquetteName() const
plaquetteId (in pannel)
Definition: PixelEndcapNameUpgrade.h:47
PixelBarrelNameUpgrade::ladderName
int ladderName() const
ladder id (index in phi)
Definition: PixelBarrelNameUpgrade.h:42
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
PixelEndcapName::plaquetteName
int plaquetteName() const
plaquetteId (in pannel)
Definition: PixelEndcapName.h:54
SiPixelOfflineDQM_client_cff.isUpgrade
isUpgrade
Definition: SiPixelOfflineDQM_client_cff.py:19
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:117