CMS 3D CMS Logo

PixelFEDConfig.h
Go to the documentation of this file.
1 #ifndef PixelFEDConfig_h
2 #define PixelFEDConfig_h
3 
11 #include <vector>
12 #include <string>
15 
16 namespace pos {
28  public:
31  filename); // <---- Modified for the conversion from parallel vectors to object that contain the configuration
32 
33  PixelFEDConfig(std::vector<std::vector<std::string> > &tableMat);
34 
35  ~PixelFEDConfig() override;
36 
37  unsigned int getNFEDBoards() const;
38 
39  unsigned int getFEDNumber(unsigned int i) const;
40  unsigned int getCrate(unsigned int i) const;
41  unsigned int getVMEBaseAddress(unsigned int i) const;
42  unsigned int crateFromFEDNumber(unsigned int fednumber) const;
43  unsigned int VMEBaseAddressFromFEDNumber(unsigned int fednumber) const;
44 
45  unsigned int FEDNumberFromCrateAndVMEBaseAddress(unsigned int crate, unsigned int vmebaseaddress) const;
46 
47  void writeASCII(std::string dir) const override;
48  void writeXML(pos::PixelConfigKey key, int version, std::string path) const override { ; }
50  int version,
52  std::ofstream *out,
53  std::ofstream *out1 = nullptr,
54  std::ofstream *out2 = nullptr) const override;
55  void writeXML(std::ofstream *out, std::ofstream *out1 = nullptr, std::ofstream *out2 = nullptr) const override;
56  void writeXMLTrailer(std::ofstream *out,
57  std::ofstream *out1 = nullptr,
58  std::ofstream *out2 = nullptr) const override;
59 
60  //friend std::ostream& operator<<(std::ostream& s, const PixelDetectorconfig& config);
61 
62  private:
63  //Already fixed from parallel vectors to vector of objects .... the object that contains the FED config is PixelFEDParameters
64 
65  // std::vector<unsigned int> fednumber_;
66  // std::vector<unsigned int> crate_;
67  // std::vector<unsigned int> vmebaseaddress_;
68 
69  std::vector<PixelFEDParameters> fedconfig_;
70  };
71 } // namespace pos
72 /* @} */
73 #endif
unsigned int VMEBaseAddressFromFEDNumber(unsigned int fednumber) const
unsigned int FEDNumberFromCrateAndVMEBaseAddress(unsigned int crate, unsigned int vmebaseaddress) const
This file contains the base class for "pixel configuration data" management.
void writeXML(pos::PixelConfigKey key, int version, std::string path) const override
unsigned int getCrate(unsigned int i) const
unsigned int getNFEDBoards() const
void writeASCII(std::string dir) const override
unsigned int getVMEBaseAddress(unsigned int i) const
This file contains the base class for "pixel configuration data" management.
~PixelFEDConfig() override
void writeXMLHeader(pos::PixelConfigKey key, int version, std::string path, std::ofstream *out, std::ofstream *out1=nullptr, std::ofstream *out2=nullptr) const override
This class implements..
This class implements..
unsigned int getFEDNumber(unsigned int i) const
This is the documentation about PixelFEDConfig...
PixelFEDConfig(std::string filename)
void writeXMLTrailer(std::ofstream *out, std::ofstream *out1=nullptr, std::ofstream *out2=nullptr) const override
std::vector< PixelFEDParameters > fedconfig_
unsigned int crateFromFEDNumber(unsigned int fednumber) const