CMS 3D CMS Logo

PixelDetectorConfig.h

Go to the documentation of this file.
00001 #ifndef PixelDetectorConfig_h
00002 #define PixelDetectorConfig_h
00003 
00011 //
00012 // This class specifies which detector
00013 // components are used in the configuration
00014 // (and eventually should specify which 
00015 // xdaq process controlls which components).
00016 // 
00017 //
00018 //
00019 //
00020 
00021 #include <vector>
00022 #include <set>
00023 #include <map>
00024 #include <string>
00025 #include "CalibFormats/SiPixelObjects/interface/PixelConfigBase.h"
00026 #include "CalibFormats/SiPixelObjects/interface/PixelModuleName.h"
00027 #include "CalibFormats/SiPixelObjects/interface/PixelHdwAddress.h"
00028 #include "CalibFormats/SiPixelObjects/interface/PixelNameTranslation.h"
00029 #include "CalibFormats/SiPixelObjects/interface/PixelROCStatus.h"
00030 
00031 namespace pos{
00039   class PixelDetectorConfig: public PixelConfigBase {
00040 
00041   public:
00042 
00043     PixelDetectorConfig(std::vector< std::vector < std::string> > &tableMat);
00044     PixelDetectorConfig(std::string filename);
00045 
00046     unsigned int getNModules() const;
00047 
00048     PixelModuleName getModule(unsigned int i) const;
00049 
00050     const std::vector <PixelModuleName>& getModuleList() const { return modules_; }
00051 
00052     void addROC(   PixelROCName &, std::string statusLabel)                             ; // modified by MR on 14-05-2008 11:32:48
00053     void addROC(   PixelROCName &)                                                      ; // Added by Dario (March 3, 2008)
00054     void removeROC(PixelROCName &)                                                      ; // Added by Dario (March 3, 2008)
00055     const std::map<PixelROCName, PixelROCStatus>& getROCsList() const { return rocs_; } ; // Added by Dario (March 3, 2008)
00056 
00057     void writeASCII(std::string dir="") const;
00058     void         writeXML(      pos::PixelConfigKey key, int version, std::string path)                     const  ;
00059     virtual void writeXMLHeader(pos::PixelConfigKey key, int version, std::string path, std::ofstream *out) const {;}
00060     virtual void writeXML(                                                              std::ofstream *out) const {;}
00061     virtual void writeXMLTrailer(                                                       std::ofstream *out) const {;}
00062 
00063     bool containsModule(const PixelModuleName& moduleToFind) const;
00064 
00065     std::set <unsigned int> getFEDs(PixelNameTranslation* translation) const;
00066     std::map <unsigned int, std::set<unsigned int> > getFEDsAndChannels(PixelNameTranslation* translation) const;
00067 
00068     //friend std::ostream& operator<<(std::ostream& s, const PixelDetectorconfig& config);
00069 
00070   private:
00071 
00072     std::vector<PixelModuleName> modules_;   
00073 
00074     std::map<PixelROCName, PixelROCStatus> rocs_;
00075  
00076   };
00077 }
00078 /* @} */
00079 #endif

Generated on Tue Jun 9 17:25:24 2009 for CMSSW by  doxygen 1.5.4