File indexing completed on 2023-03-17 10:41:58
0001 #ifndef _PixelFEDTestDAC_h_
0002 #define _PixelFEDTestDAC_h_
0003
0004
0005
0006
0007
0008
0009
0010
0011 #include <iostream>
0012 #include <string>
0013 #include <vector>
0014 #include <fstream>
0015 #include <cstdlib>
0016 #include "CalibFormats/SiPixelObjects/interface/PixelCalibBase.h"
0017
0018 namespace pos {
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029 class PixelFEDTestDAC : public PixelCalibBase {
0030 public:
0031 PixelFEDTestDAC(std::string filename);
0032 PixelFEDTestDAC(std::vector<std::vector<std::string> > &);
0033 std::string mode() const override { return mode_; }
0034 std::vector<unsigned int> dacs() { return dacs_; }
0035 void writeXMLHeader(pos::PixelConfigKey key,
0036 int version,
0037 std::string path,
0038 std::ofstream *out,
0039 std::ofstream *out1 = nullptr,
0040 std::ofstream *out2 = nullptr) const override;
0041 void writeXML(std::ofstream *out, std::ofstream *out1 = nullptr, std::ofstream *out2 = nullptr) const override;
0042 void writeXMLTrailer(std::ofstream *out,
0043 std::ofstream *out1 = nullptr,
0044 std::ofstream *out2 = nullptr) const override;
0045
0046 private:
0047 unsigned int levelEncoder(int level);
0048 std::vector<unsigned int> decimalToBaseX(unsigned int a, unsigned int x, unsigned int length);
0049 std::vector<unsigned int> dacs_;
0050 };
0051 }
0052
0053 #endif