Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:11:10

0001 /// DQM and Framework services
0002 #include "DQM/SiPixelCommon/interface/SiPixelFolderOrganizer.h"
0003 //#include "DQMServices/Core/interface/DQMStore.h"
0004 #include "FWCore/ServiceRegistry/interface/Service.h"
0005 #include "FWCore/Utilities/interface/Exception.h"
0006 /// Data Formats
0007 #include "DataFormats/DetId/interface/DetId.h"
0008 #include "DataFormats/TrackerCommon/interface/PixelBarrelName.h"
0009 #include "DataFormats/SiPixelDetId/interface/PixelBarrelNameUpgrade.h"
0010 #include "DataFormats/TrackerCommon/interface/PixelEndcapName.h"
0011 #include "DataFormats/SiPixelDetId/interface/PixelEndcapNameUpgrade.h"
0012 #include "DataFormats/SiPixelDetId/interface/PixelSubdetector.h"
0013 #include <cstdio>
0014 #include <sstream>
0015 
0016 /// Constructor
0017 SiPixelFolderOrganizer::SiPixelFolderOrganizer(bool getStore) : topFolderName("Pixel") {
0018   // Not allowed in multithread framework, but can still be called by other
0019   // modules not from DQM.
0020   if (getStore)
0021     dbe_ = edm::Service<DQMStore>().operator->();
0022 }
0023 
0024 SiPixelFolderOrganizer::~SiPixelFolderOrganizer() {}
0025 
0026 // Overloaded function for calling outside of DQM framework
0027 bool SiPixelFolderOrganizer::setModuleFolder(const uint32_t &rawdetid, int type, bool isUpgrade) {
0028   bool flag = false;
0029 
0030   if (rawdetid == 0) {
0031     dbe_->setCurrentFolder(topFolderName);
0032     flag = true;
0033   }
0034   ///
0035   /// Pixel Barrel
0036   ///
0037   else if (DetId(rawdetid).subdetId() == static_cast<int>(PixelSubdetector::PixelBarrel)) {
0038     if (!isUpgrade) {
0039       // for endcap types there is nothing to do:
0040       if (type > 3 && type != 7)
0041         return true;
0042 
0043       std::string subDetectorFolder = "Barrel";
0044       PixelBarrelName::Shell DBshell = PixelBarrelName(DetId(rawdetid)).shell();
0045       int DBlayer = PixelBarrelName(DetId(rawdetid)).layerName();
0046       int DBladder = PixelBarrelName(DetId(rawdetid)).ladderName();
0047       int DBmodule = PixelBarrelName(DetId(rawdetid)).moduleName();
0048 
0049       char slayer[80];
0050       sprintf(slayer, "Layer_%i", DBlayer);
0051       char sladder[80];
0052       sprintf(sladder, "Ladder_%02i", DBladder);
0053       char smodule[80];
0054       sprintf(smodule, "Module_%i", DBmodule);
0055 
0056       std::ostringstream sfolder;
0057 
0058       sfolder << topFolderName << "/" << subDetectorFolder;
0059       if (type < 4) {
0060         sfolder << "/Shell_" << DBshell << "/" << slayer;
0061       }
0062       if (type < 2) {
0063         sfolder << "/" << sladder;
0064         if (PixelBarrelName(DetId(rawdetid)).isHalfModule())
0065           sfolder << "H";
0066         else
0067           sfolder << "F";
0068       }
0069       if (type == 0)
0070         sfolder << "/" << smodule;
0071       // if(type==3) sfolder << "/all_" << smodule;
0072 
0073       // std::cout<<"set barrel folder: "<<rawdetid<<" :
0074       // "<<sfolder.str().c_str()<<std::endl;
0075 
0076       dbe_->setCurrentFolder(sfolder.str());
0077       flag = true;
0078     } else if (isUpgrade) {
0079       // for endcap types there is nothing to do:
0080       if (type > 3 && type != 7)
0081         return true;
0082 
0083       std::string subDetectorFolder = "Barrel";
0084       PixelBarrelNameUpgrade::Shell DBshell = PixelBarrelNameUpgrade(DetId(rawdetid)).shell();
0085       int DBlayer = PixelBarrelNameUpgrade(DetId(rawdetid)).layerName();
0086       int DBladder = PixelBarrelNameUpgrade(DetId(rawdetid)).ladderName();
0087       int DBmodule = PixelBarrelNameUpgrade(DetId(rawdetid)).moduleName();
0088 
0089       char slayer[80];
0090       sprintf(slayer, "Layer_%i", DBlayer);
0091       char sladder[80];
0092       sprintf(sladder, "Ladder_%02i", DBladder);
0093       char smodule[80];
0094       sprintf(smodule, "Module_%i", DBmodule);
0095 
0096       std::ostringstream sfolder;
0097 
0098       sfolder << topFolderName << "/" << subDetectorFolder;
0099       if (type < 4) {
0100         sfolder << "/Shell_" << DBshell << "/" << slayer;
0101       }
0102       if (type < 2) {
0103         sfolder << "/" << sladder;
0104         if (PixelBarrelNameUpgrade(DetId(rawdetid)).isHalfModule())
0105           sfolder << "H";
0106         else
0107           sfolder << "F";
0108       }
0109       if (type == 0)
0110         sfolder << "/" << smodule;
0111       // if(type==3) sfolder << "/all_" << smodule;
0112 
0113       // std::cout<<"set barrel folder: "<<rawdetid<<" :
0114       // "<<sfolder.str().c_str()<<std::endl;
0115 
0116       dbe_->setCurrentFolder(sfolder.str());
0117       flag = true;
0118     }  // endif(isUpgrade)
0119   }
0120 
0121   ///
0122   /// Pixel Endcap
0123   ///
0124   else if (DetId(rawdetid).subdetId() == static_cast<int>(PixelSubdetector::PixelEndcap)) {
0125     if (!isUpgrade) {
0126       // for barrel types there is nothing to do:
0127       if (type > 0 && type < 4)
0128         return true;
0129 
0130       std::string subDetectorFolder = "Endcap";
0131       PixelEndcapName::HalfCylinder side = PixelEndcapName(DetId(rawdetid)).halfCylinder();
0132       int disk = PixelEndcapName(DetId(rawdetid)).diskName();
0133       int blade = PixelEndcapName(DetId(rawdetid)).bladeName();
0134       int panel = PixelEndcapName(DetId(rawdetid)).pannelName();
0135       int module = PixelEndcapName(DetId(rawdetid)).plaquetteName();
0136 
0137       char sdisk[80];
0138       sprintf(sdisk, "Disk_%i", disk);
0139       char sblade[80];
0140       sprintf(sblade, "Blade_%02i", blade);
0141       char spanel[80];
0142       sprintf(spanel, "Panel_%i", panel);
0143       char smodule[80];
0144       sprintf(smodule, "Module_%i", module);
0145 
0146       std::ostringstream sfolder;
0147 
0148       sfolder << topFolderName << "/" << subDetectorFolder << "/HalfCylinder_" << side << "/" << sdisk;
0149       if (type == 0 || type == 4) {
0150         sfolder << "/" << sblade;
0151       }
0152       if (type == 0) {
0153         sfolder << "/" << spanel << "/" << smodule;
0154       }
0155       //       if(type==6){
0156       //    sfolder << "/" << spanel << "_all_" << smodule;
0157       //       }
0158 
0159       // std::cout<<"set endcap folder: "<<rawdetid<<" :
0160       // "<<sfolder.str().c_str()<<std::endl;
0161 
0162       dbe_->setCurrentFolder(sfolder.str());
0163       flag = true;
0164 
0165     } else if (isUpgrade) {
0166       // for barrel types there is nothing to do:
0167       if (type > 0 && type < 4)
0168         return true;
0169 
0170       std::string subDetectorFolder = "Endcap";
0171       PixelEndcapNameUpgrade::HalfCylinder side = PixelEndcapNameUpgrade(DetId(rawdetid)).halfCylinder();
0172       int disk = PixelEndcapNameUpgrade(DetId(rawdetid)).diskName();
0173       int blade = PixelEndcapNameUpgrade(DetId(rawdetid)).bladeName();
0174       int panel = PixelEndcapNameUpgrade(DetId(rawdetid)).pannelName();
0175       int module = PixelEndcapNameUpgrade(DetId(rawdetid)).plaquetteName();
0176 
0177       char sdisk[80];
0178       sprintf(sdisk, "Disk_%i", disk);
0179       char sblade[80];
0180       sprintf(sblade, "Blade_%02i", blade);
0181       char spanel[80];
0182       sprintf(spanel, "Panel_%i", panel);
0183       char smodule[80];
0184       sprintf(smodule, "Module_%i", module);
0185 
0186       std::ostringstream sfolder;
0187 
0188       sfolder << topFolderName << "/" << subDetectorFolder << "/HalfCylinder_" << side << "/" << sdisk;
0189       if (type == 0 || type == 4) {
0190         sfolder << "/" << sblade;
0191       }
0192       if (type == 0) {
0193         sfolder << "/" << spanel << "/" << smodule;
0194       }
0195       //        if(type==6){
0196       //          sfolder << "/" << spanel << "_all_" << smodule;
0197       //        }
0198 
0199       // std::cout<<"set endcap folder: "<<rawdetid<<" :
0200       // "<<sfolder.str().c_str()<<std::endl;
0201 
0202       dbe_->setCurrentFolder(sfolder.str());
0203       flag = true;
0204     }  // endifendcap&&isUpgrade
0205   } else
0206     throw cms::Exception("LogicError") << "[SiPixelFolderOrganizer::setModuleFolder] Not a Pixel detector "
0207                                           "DetId ";
0208 
0209   return flag;
0210 }
0211 
0212 // Overloaded setModuleFolder for multithread safe operation
0213 bool SiPixelFolderOrganizer::setModuleFolder(DQMStore::IBooker &iBooker,
0214                                              const uint32_t &rawdetid,
0215                                              int type,
0216                                              bool isUpgrade) {
0217   bool flag = false;
0218 
0219   if (rawdetid == 0) {
0220     iBooker.setCurrentFolder(topFolderName);
0221     flag = true;
0222   }
0223   ///
0224   /// Pixel Barrel
0225   ///
0226   else if (DetId(rawdetid).subdetId() == static_cast<int>(PixelSubdetector::PixelBarrel)) {
0227     if (!isUpgrade) {
0228       // for endcap types there is nothing to do:
0229       if (type > 3 && type != 7)
0230         return true;
0231 
0232       std::string subDetectorFolder = "Barrel";
0233       PixelBarrelName::Shell DBshell = PixelBarrelName(DetId(rawdetid)).shell();
0234       int DBlayer = PixelBarrelName(DetId(rawdetid)).layerName();
0235       int DBladder = PixelBarrelName(DetId(rawdetid)).ladderName();
0236       int DBmodule = PixelBarrelName(DetId(rawdetid)).moduleName();
0237 
0238       char slayer[80];
0239       sprintf(slayer, "Layer_%i", DBlayer);
0240       char sladder[80];
0241       sprintf(sladder, "Ladder_%02i", DBladder);
0242       char smodule[80];
0243       sprintf(smodule, "Module_%i", DBmodule);
0244 
0245       std::ostringstream sfolder;
0246 
0247       sfolder << topFolderName << "/" << subDetectorFolder;
0248       if (type < 4) {
0249         sfolder << "/Shell_" << DBshell << "/" << slayer;
0250       }
0251       if (type < 2) {
0252         sfolder << "/" << sladder;
0253         if (PixelBarrelName(DetId(rawdetid)).isHalfModule())
0254           sfolder << "H";
0255         else
0256           sfolder << "F";
0257       }
0258       if (type == 0)
0259         sfolder << "/" << smodule;
0260       // if(type==3) sfolder << "/all_" << smodule;
0261 
0262       // std::cout<<"set barrel folder: "<<rawdetid<<" :
0263       // "<<sfolder.str().c_str()<<std::endl;
0264 
0265       iBooker.setCurrentFolder(sfolder.str());
0266       flag = true;
0267     } else if (isUpgrade) {
0268       // for endcap types there is nothing to do:
0269       if (type > 3 && type != 7)
0270         return true;
0271 
0272       std::string subDetectorFolder = "Barrel";
0273       PixelBarrelNameUpgrade::Shell DBshell = PixelBarrelNameUpgrade(DetId(rawdetid)).shell();
0274       int DBlayer = PixelBarrelNameUpgrade(DetId(rawdetid)).layerName();
0275       int DBladder = PixelBarrelNameUpgrade(DetId(rawdetid)).ladderName();
0276       int DBmodule = PixelBarrelNameUpgrade(DetId(rawdetid)).moduleName();
0277 
0278       char slayer[80];
0279       sprintf(slayer, "Layer_%i", DBlayer);
0280       char sladder[80];
0281       sprintf(sladder, "Ladder_%02i", DBladder);
0282       char smodule[80];
0283       sprintf(smodule, "Module_%i", DBmodule);
0284 
0285       std::ostringstream sfolder;
0286 
0287       sfolder << topFolderName << "/" << subDetectorFolder;
0288       if (type < 4) {
0289         sfolder << "/Shell_" << DBshell << "/" << slayer;
0290       }
0291       if (type < 2) {
0292         sfolder << "/" << sladder;
0293         if (PixelBarrelNameUpgrade(DetId(rawdetid)).isHalfModule())
0294           sfolder << "H";
0295         else
0296           sfolder << "F";
0297       }
0298       if (type == 0)
0299         sfolder << "/" << smodule;
0300       // if(type==3) sfolder << "/all_" << smodule;
0301 
0302       // std::cout<<"set barrel folder: "<<rawdetid<<" :
0303       // "<<sfolder.str().c_str()<<std::endl;
0304 
0305       iBooker.setCurrentFolder(sfolder.str());
0306       flag = true;
0307     }  // endif(isUpgrade)
0308   }
0309 
0310   ///
0311   /// Pixel Endcap
0312   ///
0313   else if (DetId(rawdetid).subdetId() == static_cast<int>(PixelSubdetector::PixelEndcap)) {
0314     if (!isUpgrade) {
0315       // for barrel types there is nothing to do:
0316       if (type > 0 && type < 4)
0317         return true;
0318 
0319       std::string subDetectorFolder = "Endcap";
0320       PixelEndcapName::HalfCylinder side = PixelEndcapName(DetId(rawdetid)).halfCylinder();
0321       int disk = PixelEndcapName(DetId(rawdetid)).diskName();
0322       int blade = PixelEndcapName(DetId(rawdetid)).bladeName();
0323       int panel = PixelEndcapName(DetId(rawdetid)).pannelName();
0324       int module = PixelEndcapName(DetId(rawdetid)).plaquetteName();
0325 
0326       char sdisk[80];
0327       sprintf(sdisk, "Disk_%i", disk);
0328       char sblade[80];
0329       sprintf(sblade, "Blade_%02i", blade);
0330       char spanel[80];
0331       sprintf(spanel, "Panel_%i", panel);
0332       char smodule[80];
0333       sprintf(smodule, "Module_%i", module);
0334 
0335       std::ostringstream sfolder;
0336 
0337       sfolder << topFolderName << "/" << subDetectorFolder << "/HalfCylinder_" << side << "/" << sdisk;
0338       if (type == 0 || type == 4) {
0339         sfolder << "/" << sblade;
0340       }
0341       if (type == 0) {
0342         sfolder << "/" << spanel << "/" << smodule;
0343       }
0344       //       if(type==6){
0345       //    sfolder << "/" << spanel << "_all_" << smodule;
0346       //       }
0347 
0348       // std::cout<<"set endcap folder: "<<rawdetid<<" :
0349       // "<<sfolder.str().c_str()<<std::endl;
0350 
0351       iBooker.setCurrentFolder(sfolder.str());
0352       flag = true;
0353 
0354     } else if (isUpgrade) {
0355       // for barrel types there is nothing to do:
0356       if (type > 0 && type < 4)
0357         return true;
0358 
0359       std::string subDetectorFolder = "Endcap";
0360       PixelEndcapNameUpgrade::HalfCylinder side = PixelEndcapNameUpgrade(DetId(rawdetid)).halfCylinder();
0361       int disk = PixelEndcapNameUpgrade(DetId(rawdetid)).diskName();
0362       int blade = PixelEndcapNameUpgrade(DetId(rawdetid)).bladeName();
0363       int panel = PixelEndcapNameUpgrade(DetId(rawdetid)).pannelName();
0364       int module = PixelEndcapNameUpgrade(DetId(rawdetid)).plaquetteName();
0365 
0366       char sdisk[80];
0367       sprintf(sdisk, "Disk_%i", disk);
0368       char sblade[80];
0369       sprintf(sblade, "Blade_%02i", blade);
0370       char spanel[80];
0371       sprintf(spanel, "Panel_%i", panel);
0372       char smodule[80];
0373       sprintf(smodule, "Module_%i", module);
0374 
0375       std::ostringstream sfolder;
0376 
0377       sfolder << topFolderName << "/" << subDetectorFolder << "/HalfCylinder_" << side << "/" << sdisk;
0378       if (type == 0 || type == 4) {
0379         sfolder << "/" << sblade;
0380       }
0381       if (type == 0) {
0382         sfolder << "/" << spanel << "/" << smodule;
0383       }
0384       //        if(type==6){
0385       //          sfolder << "/" << spanel << "_all_" << smodule;
0386       //        }
0387 
0388       // std::cout<<"set endcap folder: "<<rawdetid<<" :
0389       // "<<sfolder.str().c_str()<<std::endl;
0390 
0391       iBooker.setCurrentFolder(sfolder.str());
0392       flag = true;
0393     }  // endifendcap&&isUpgrade
0394   } else
0395     throw cms::Exception("LogicError") << "[SiPixelFolderOrganizer::setModuleFolder] Not a Pixel detector "
0396                                           "DetId ";
0397 
0398   return flag;
0399 }
0400 
0401 // Overloaded setFedFolder for use outside of DQM framework
0402 bool SiPixelFolderOrganizer::setFedFolder(const uint32_t FedId) {
0403   std::string subDetectorFolder = "AdditionalPixelErrors";
0404   char sFed[80];
0405   sprintf(sFed, "FED_%i", FedId);
0406   std::ostringstream sfolder;
0407 
0408   sfolder << topFolderName << "/" << subDetectorFolder << "/" << sFed;
0409   dbe_->setCurrentFolder(sfolder.str());
0410 
0411   return true;
0412 }
0413 
0414 // Overloaded setFedFolder to avoid accessing DQMStore directly.
0415 bool SiPixelFolderOrganizer::setFedFolder(DQMStore::IBooker &iBooker, const uint32_t FedId) {
0416   std::string subDetectorFolder = "AdditionalPixelErrors";
0417   char sFed[80];
0418   sprintf(sFed, "FED_%i", FedId);
0419   std::ostringstream sfolder;
0420 
0421   sfolder << topFolderName << "/" << subDetectorFolder << "/" << sFed;
0422   iBooker.setCurrentFolder(sfolder.str());
0423 
0424   return true;
0425 }
0426 
0427 void SiPixelFolderOrganizer::getModuleFolder(const uint32_t &rawdetid, std::string &path, bool isUpgrade) {
0428   path = topFolderName;
0429   if (rawdetid == 0) {
0430     return;
0431   } else if ((DetId(rawdetid).subdetId() == static_cast<int>(PixelSubdetector::PixelBarrel)) && (!isUpgrade)) {
0432     std::string subDetectorFolder = "Barrel";
0433     PixelBarrelName::Shell DBshell = PixelBarrelName(DetId(rawdetid)).shell();
0434     int DBlayer = PixelBarrelName(DetId(rawdetid)).layerName();
0435     int DBladder = PixelBarrelName(DetId(rawdetid)).ladderName();
0436     int DBmodule = PixelBarrelName(DetId(rawdetid)).moduleName();
0437 
0438     // char sshell[80];  sprintf(sshell, "Shell_%i",   DBshell);
0439     char slayer[80];
0440     sprintf(slayer, "Layer_%i", DBlayer);
0441     char sladder[80];
0442     sprintf(sladder, "Ladder_%02i", DBladder);
0443     char smodule[80];
0444     sprintf(smodule, "Module_%i", DBmodule);
0445 
0446     std::ostringstream sfolder;
0447     sfolder << topFolderName << "/" << subDetectorFolder << "/Shell_" << DBshell << "/" << slayer << "/" << sladder;
0448     if (PixelBarrelName(DetId(rawdetid)).isHalfModule())
0449       sfolder << "H";
0450     else
0451       sfolder << "F";
0452     sfolder << "/" << smodule;
0453     path = sfolder.str();
0454 
0455     // path = path + "/" + subDetectorFolder + "/" + sshell + "/" + slayer + "/"
0456     // + sladder; if(PixelBarrelName(DetId(rawdetid)).isHalfModule() )
0457     //  path = path + "H";
0458     // else path = path + "F";
0459     // path = path + "/" + smodule;
0460 
0461   } else if ((DetId(rawdetid).subdetId() == static_cast<int>(PixelSubdetector::PixelBarrel)) && (isUpgrade)) {
0462     std::string subDetectorFolder = "Barrel";
0463     PixelBarrelNameUpgrade::Shell DBshell = PixelBarrelNameUpgrade(DetId(rawdetid)).shell();
0464     int DBlayer = PixelBarrelNameUpgrade(DetId(rawdetid)).layerName();
0465     int DBladder = PixelBarrelNameUpgrade(DetId(rawdetid)).ladderName();
0466     int DBmodule = PixelBarrelNameUpgrade(DetId(rawdetid)).moduleName();
0467 
0468     // char sshell[80];  sprintf(sshell, "Shell_%i",   DBshell);
0469     char slayer[80];
0470     sprintf(slayer, "Layer_%i", DBlayer);
0471     char sladder[80];
0472     sprintf(sladder, "Ladder_%02i", DBladder);
0473     char smodule[80];
0474     sprintf(smodule, "Module_%i", DBmodule);
0475 
0476     std::ostringstream sfolder;
0477     sfolder << topFolderName << "/" << subDetectorFolder << "/Shell_" << DBshell << "/" << slayer << "/" << sladder;
0478     if (PixelBarrelNameUpgrade(DetId(rawdetid)).isHalfModule())
0479       sfolder << "H";
0480     else
0481       sfolder << "F";
0482     sfolder << "/" << smodule;
0483     path = sfolder.str();
0484 
0485     // path = path + "/" + subDetectorFolder + "/" + sshell + "/" + slayer + "/"
0486     // + sladder; if(PixelBarrelNameUpgrade(DetId(rawdetid)).isHalfModule() )
0487     //  path = path + "H";
0488     // else path = path + "F";
0489     // path = path + "/" + smodule;
0490 
0491   } else if ((DetId(rawdetid).subdetId() == static_cast<int>(PixelSubdetector::PixelEndcap)) && (!isUpgrade)) {
0492     std::string subDetectorFolder = "Endcap";
0493     PixelEndcapName::HalfCylinder side = PixelEndcapName(DetId(rawdetid)).halfCylinder();
0494     int disk = PixelEndcapName(DetId(rawdetid)).diskName();
0495     int blade = PixelEndcapName(DetId(rawdetid)).bladeName();
0496     int panel = PixelEndcapName(DetId(rawdetid)).pannelName();
0497     int module = PixelEndcapName(DetId(rawdetid)).plaquetteName();
0498 
0499     // char shc[80];  sprintf(shc,  "HalfCylinder_%i",side);
0500     char sdisk[80];
0501     sprintf(sdisk, "Disk_%i", disk);
0502     char sblade[80];
0503     sprintf(sblade, "Blade_%02i", blade);
0504     char spanel[80];
0505     sprintf(spanel, "Panel_%i", panel);
0506     char smodule[80];
0507     sprintf(smodule, "Module_%i", module);
0508 
0509     std::ostringstream sfolder;
0510     sfolder << topFolderName << "/" << subDetectorFolder << "/HalfCylinder_" << side << "/" << sdisk << "/" << sblade
0511             << "/" << spanel << "/" << smodule;
0512     path = sfolder.str();
0513 
0514     // path = path + "/" + subDetectorFolder + "/" + shc + "/" + sdisk + "/" +
0515     // sblade + "/" + spanel + "/" + smodule;
0516 
0517   } else if ((DetId(rawdetid).subdetId() == static_cast<int>(PixelSubdetector::PixelEndcap)) && (isUpgrade)) {
0518     std::string subDetectorFolder = "Endcap";
0519     PixelEndcapNameUpgrade::HalfCylinder side = PixelEndcapNameUpgrade(DetId(rawdetid)).halfCylinder();
0520     int disk = PixelEndcapNameUpgrade(DetId(rawdetid)).diskName();
0521     int blade = PixelEndcapNameUpgrade(DetId(rawdetid)).bladeName();
0522     int panel = PixelEndcapNameUpgrade(DetId(rawdetid)).pannelName();
0523     int module = PixelEndcapNameUpgrade(DetId(rawdetid)).plaquetteName();
0524 
0525     // char shc[80];  sprintf(shc,  "HalfCylinder_%i",side);
0526     char sdisk[80];
0527     sprintf(sdisk, "Disk_%i", disk);
0528     char sblade[80];
0529     sprintf(sblade, "Blade_%02i", blade);
0530     char spanel[80];
0531     sprintf(spanel, "Panel_%i", panel);
0532     char smodule[80];
0533     sprintf(smodule, "Module_%i", module);
0534 
0535     std::ostringstream sfolder;
0536     sfolder << topFolderName << "/" << subDetectorFolder << "/HalfCylinder_" << side << "/" << sdisk << "/" << sblade
0537             << "/" << spanel << "/" << smodule;
0538     path = sfolder.str();
0539 
0540     // path = path + "/" + subDetectorFolder + "/" + shc + "/" + sdisk + "/" +
0541     // sblade + "/" + spanel + "/" + smodule;
0542 
0543   } else
0544     throw cms::Exception("LogicError") << "[SiPixelFolderOrganizer::getModuleFolder] Not a Pixel detector "
0545                                           "DetId ";
0546 
0547   // std::cout<<"resulting final path name: "<<path<<std::endl;
0548 
0549   return;
0550 }