CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC4_patch1/src/DQM/SiStripCommon/interface/SiStripFolderOrganizer.h

Go to the documentation of this file.
00001 #ifndef SiStripCommon_SiStripFolderOrganizer_h
00002 #define SiStripCommon_SiStripFolderOrganizer_h
00003 // -*- C++ -*-
00004 //
00005 // Package:     SiStripCommon
00006 // Class  :     SiStripFolderOrganizer
00007 // 
00016 //
00017 // Original Author:  dkcira
00018 //         Created:  Thu Jan 26 23:49:46 CET 2006
00019 
00020 // $Id: SiStripFolderOrganizer.h,v 1.15 2011/05/31 10:38:46 eulisse Exp $
00021 
00022 //
00023 #include "DataFormats/SiStripDetId/interface/SiStripDetId.h"
00024 
00025 #include <string>
00026 
00027 class DQMStore;
00028 
00029 class SiStripFolderOrganizer
00030 {
00031 
00032    public:
00033       static unsigned short const all_ = 65535;
00034 
00035       SiStripFolderOrganizer();
00036       virtual ~SiStripFolderOrganizer();
00037 
00038       // top folder
00039       void setSiStripFolderName(std::string name);
00040       std::string getSiStripFolder();
00041       void setSiStripFolder();
00042 
00043       // control folder
00044       std::string getSiStripTopControlFolder();
00045       void setSiStripTopControlFolder();
00046       std::string getSiStripControlFolder(
00047               // unsigned short crate,
00048               unsigned short slot = all_,
00049               unsigned short ring = all_,
00050               unsigned short addr = all_,
00051               unsigned short chan = all_
00052               // unsigned short i2c
00053       );
00054       void setSiStripControlFolder(
00055               // unsigned short crate,
00056               unsigned short slot = all_,
00057               unsigned short ring = all_,
00058               unsigned short addr = all_,
00059               unsigned short chan = all_
00060               // unsigned short i2c
00061       );
00062 
00063       std::pair<std::string,int32_t> GetSubDetAndLayer(const uint32_t& detid, bool ring_flag = 0);
00064       // detector folders
00065       void setDetectorFolder(uint32_t rawdetid=0);
00066       void getFolderName(int32_t rawdetid, std::string& lokal_folder);
00067 
00068       // layer folders
00069       void setLayerFolder(uint32_t rawdetid=0,int32_t layer=0,bool ring_flag = 0);
00070       void getLayerFolderName(std::stringstream& ss, uint32_t rawdetid,bool ring_flag = 0);
00071       void getSubDetLayerFolderName(std::stringstream& ss, SiStripDetId::SubDetector subDet, uint32_t layer, uint32_t side=0);
00072       // SubDetector Folder
00073       void getSubDetFolder(const uint32_t& detid, std::string& folder_name);
00074       std::pair<std::string, std::string> getSubDetFolderAndTag(const uint32_t& detid);
00075    private:
00076       SiStripFolderOrganizer(const SiStripFolderOrganizer&); // stop default
00077       const SiStripFolderOrganizer& operator=(const SiStripFolderOrganizer&); // stop default
00078 
00079    private:
00080       std::string TopFolderName;
00081       DQMStore* dbe_;
00082 };
00083 #endif