File indexing completed on 2023-10-25 09:33:52
0001 #ifndef PixelFEDConfig_h
0002 #define PixelFEDConfig_h
0003
0004
0005
0006
0007
0008
0009
0010
0011 #include <vector>
0012 #include <string>
0013 #include "CalibFormats/SiPixelObjects/interface/PixelConfigBase.h"
0014 #include "CalibFormats/SiPixelObjects/interface/PixelFEDParameters.h"
0015
0016 namespace pos {
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027 class PixelFEDConfig : public PixelConfigBase {
0028 public:
0029 PixelFEDConfig(
0030 std::string
0031 filename);
0032
0033 PixelFEDConfig(std::vector<std::vector<std::string> > &tableMat);
0034
0035 ~PixelFEDConfig() override;
0036
0037 unsigned int getNFEDBoards() const;
0038
0039 unsigned int getFEDNumber(unsigned int i) const;
0040 unsigned int getCrate(unsigned int i) const;
0041 unsigned int getVMEBaseAddress(unsigned int i) const;
0042 unsigned int crateFromFEDNumber(unsigned int fednumber) const;
0043 unsigned int VMEBaseAddressFromFEDNumber(unsigned int fednumber) const;
0044
0045 unsigned int FEDNumberFromCrateAndVMEBaseAddress(unsigned int crate, unsigned int vmebaseaddress) const;
0046
0047 void writeASCII(std::string dir) const override;
0048 void writeXML(pos::PixelConfigKey key, int version, std::string path) const override { ; }
0049 void writeXMLHeader(pos::PixelConfigKey key,
0050 int version,
0051 std::string path,
0052 std::ofstream *out,
0053 std::ofstream *out1 = nullptr,
0054 std::ofstream *out2 = nullptr) const override;
0055 void writeXML(std::ofstream *out, std::ofstream *out1 = nullptr, std::ofstream *out2 = nullptr) const override;
0056 void writeXMLTrailer(std::ofstream *out,
0057 std::ofstream *out1 = nullptr,
0058 std::ofstream *out2 = nullptr) const override;
0059
0060
0061
0062 private:
0063
0064
0065
0066
0067
0068
0069 std::vector<PixelFEDParameters> fedconfig_;
0070 };
0071 }
0072
0073 #endif