Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-05-31 22:35:50

0001 /** \class RPCBookFolderStructure
0002  *
0003  * \author Anna Cimmino (INFN Napoli)
0004  *
0005  * Create folder structure for DQM histo saving
0006  */
0007 #ifndef RPCBookFolderStructure_H
0008 #define RPCBookFolderStructure_H
0009 
0010 #include <DataFormats/MuonDetId/interface/RPCDetId.h>
0011 #include <string>
0012 #include <fmt/format.h>
0013 
0014 struct RPCBookFolderStructure {
0015   static std::string folderStructure(const RPCDetId& detId) {
0016     if (detId.region() == 0)
0017       return fmt::format("Barrel/Wheel_{}/sector_{}/station_{}", detId.ring(), detId.sector(), detId.station());
0018     else if (detId.region() == -1)
0019       return fmt::format("Endcap-/Disk_-{}/ring_{}/sector_{}", detId.station(), detId.ring(), detId.sector());
0020     else if (detId.region() == 1)
0021       return fmt::format("Endcap+/Disk_{}/ring_{}/sector_{}", detId.station(), detId.ring(), detId.sector());
0022     return "Error/Folder/Creation";
0023   }
0024 };
0025 
0026 #endif