CMS 3D CMS Logo

PixelDACSettings.h
Go to the documentation of this file.
1 #ifndef PixelDACSettings_h
2 #define PixelDACSettings_h
3 
10 //
11 // This class provide a base class for the
12 // pixel ROC dac data for the pixel FEC configuration
13 // This is a pure interface (abstract class) that
14 // needs to have an implementation.
15 //
16 //
17 //
18 
19 #include <vector>
20 #include <string>
27 
28 
29 namespace pos{
62 
63  public:
64 
66  //Added by Umesh
67  PixelDACSettings(std::vector<std::vector<std::string> >& tableMat);
68  // modified by MR on 10-01-2008 14:47:47
70  // modified by MR on 24-01-2008 14:28:14
71  void addROC(PixelROCDACSettings &rocname);
72 
73  PixelROCDACSettings getDACSettings(int ROCId) const;
75 
76  unsigned int numROCs() {return dacsettings_.size();}
77 
78  //Generate the DAC settings
80  PixelNameTranslation* trans, PixelDetectorConfig* detconfig, bool HVon=true) const;
81  void setVcthrDisable(PixelFECConfigInterface* pixelFEC, PixelNameTranslation* trans) const;
82  void setVcthrEnable(PixelFECConfigInterface* pixelFEC, PixelNameTranslation* trans, PixelDetectorConfig* detconfig) const;
83 
84  void writeBinary(std::string filename) const;
85 
86  void writeASCII(std::string dir) const override;
87  void writeXML( pos::PixelConfigKey key, int version, std::string path) const override {;}
89  int version,
91  std::ofstream *out,
92  std::ofstream *out1 = nullptr,
93  std::ofstream *out2 = nullptr
94  ) const override ;
95  void writeXML( std::ofstream *out,
96  std::ofstream *out1 = nullptr ,
97  std::ofstream *out2 = nullptr ) const override ;
98  void writeXMLTrailer( std::ofstream *out,
99  std::ofstream *out1 = nullptr,
100  std::ofstream *out2 = nullptr
101  ) const override ;
102 
103  friend std::ostream& operator<<(std::ostream& s, const PixelDACSettings& mask);
104 
105  private:
106 
107  std::vector<PixelROCDACSettings> dacsettings_;
108 
109  bool rocIsDisabled(const PixelDetectorConfig* detconfig, const PixelROCName rocname) const;
110 
111  };
112 }
113 
114 /* @} */
115 #endif
PixelROCDACSettings getDACSettings(int ROCId) const
This class specifies which detector components are used in the configuration (and eventually should s...
void addROC(PixelROCDACSettings &rocname)
void writeXMLHeader(pos::PixelConfigKey key, int version, std::string path, std::ofstream *out, std::ofstream *out1=nullptr, std::ofstream *out2=nullptr) const override
This file contains the base class for "pixel configuration data" management.
bool rocIsDisabled(const PixelDetectorConfig *detconfig, const PixelROCName rocname) const
void writeXML(pos::PixelConfigKey key, int version, std::string path) const override
unsigned int numROCs()
This class provides a translation from the naming documents standard to specify the ROC to the corres...
This class provide the data structure for the ROC DAC parameters.
void writeBinary(std::string filename) const
This class is responsible for manipulating the DACsettings of a ROC.
This file contains the base class for "pixel configuration data" management.
This class intends to define an abstract interface for the commands to talk to the PixelFEC...
This is the documentation about PixelDetectorConfig...
std::vector< PixelROCDACSettings > dacsettings_
friend std::ostream & operator<<(std::ostream &s, const PixelDACSettings &mask)
PixelDACSettings(std::string filename)
This class implements..
void writeASCII(std::string dir) const override
This is the documentation about PixelNameTranslation...
This class implements..
Definition: PixelROCName.h:23
void generateConfiguration(PixelFECConfigInterface *pixelFEC, PixelNameTranslation *trans, PixelDetectorConfig *detconfig, bool HVon=true) const
This class implements..
void setVcthrDisable(PixelFECConfigInterface *pixelFEC, PixelNameTranslation *trans) const
dbl *** dir
Definition: mlp_gen.cc:35
void setVcthrEnable(PixelFECConfigInterface *pixelFEC, PixelNameTranslation *trans, PixelDetectorConfig *detconfig) const
void writeXMLTrailer(std::ofstream *out, std::ofstream *out1=nullptr, std::ofstream *out2=nullptr) const override
This class stores the name and related hardware mappings for a ROC.