File indexing completed on 2024-04-06 12:08:38
0001 #ifndef SiStripCommon_SiStripFolderOrganizer_h
0002 #define SiStripCommon_SiStripFolderOrganizer_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021 #include "DataFormats/SiStripDetId/interface/SiStripDetId.h"
0022 #include "DQMServices/Core/interface/DQMStore.h"
0023
0024 #include <string>
0025
0026 class TrackerTopology;
0027 class SiStripFolderOrganizer {
0028 public:
0029 typedef dqm::legacy::DQMStore DQMStore;
0030
0031 static unsigned short const all_ = 65535;
0032
0033 SiStripFolderOrganizer();
0034 virtual ~SiStripFolderOrganizer();
0035
0036
0037 void setSiStripFolderName(std::string name);
0038 std::string getSiStripFolder();
0039 void setSiStripFolder();
0040
0041
0042 std::string getSiStripTopControlFolder();
0043 void setSiStripTopControlFolder();
0044 std::string getSiStripControlFolder(
0045
0046 unsigned short slot = all_,
0047 unsigned short ring = all_,
0048 unsigned short addr = all_,
0049 unsigned short chan = all_
0050
0051 );
0052 void setSiStripControlFolder(
0053
0054 unsigned short slot = all_,
0055 unsigned short ring = all_,
0056 unsigned short addr = all_,
0057 unsigned short chan = all_
0058
0059 );
0060
0061 std::pair<std::string, int32_t> GetSubDetAndLayer(const uint32_t& detid,
0062 const TrackerTopology* tTopo,
0063 bool ring_flag = false);
0064 std::pair<std::string, int32_t> GetSubDetAndLayerThickness(const uint32_t& detid,
0065 const TrackerTopology* tTopo,
0066 std::string& cThickness);
0067 std::pair<std::string, int32_t> GetSubDetAndRing(const uint32_t& detid, const TrackerTopology* tTopo);
0068
0069 void setDetectorFolder(uint32_t rawdetid, const TrackerTopology* tTopo);
0070 void getFolderName(int32_t rawdetid, const TrackerTopology* tTopo, std::string& lokal_folder);
0071
0072
0073 void setLayerFolder(uint32_t rawdetid, const TrackerTopology* tTopo, int32_t layer = 0, bool ring_flag = false);
0074 void getLayerFolderName(std::stringstream& ss,
0075 uint32_t rawdetid,
0076 const TrackerTopology* tTopo,
0077 bool ring_flag = false);
0078 void getSubDetLayerFolderName(std::stringstream& ss,
0079 SiStripDetId::SubDetector subDet,
0080 uint32_t layer,
0081 uint32_t side = 0);
0082
0083 void setRingFolder(uint32_t rawdetid, const TrackerTopology* tTopo, int32_t layer = 0) {
0084 setLayerFolder(rawdetid, tTopo, layer, true);
0085 }
0086 void getRingFolderName(std::stringstream& ss, uint32_t rawdetid, const TrackerTopology* tTopo) {
0087 getLayerFolderName(ss, rawdetid, tTopo, true);
0088 }
0089
0090 void getSubDetFolder(const uint32_t& detid, const TrackerTopology* tTopo, std::string& folder_name);
0091 std::pair<const std::string, const char*> getSubDetFolderAndTag(const uint32_t& detid, const TrackerTopology* tTopo);
0092
0093 SiStripFolderOrganizer(const SiStripFolderOrganizer&) = delete;
0094 const SiStripFolderOrganizer& operator=(const SiStripFolderOrganizer&) = delete;
0095
0096 private:
0097 std::string TopFolderName;
0098 DQMStore* dbe_;
0099 };
0100 #endif