File indexing completed on 2024-04-06 11:58:13
0001 #ifndef PixelTrimBase_h
0002 #define PixelTrimBase_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 #include <string>
0019 #include "CalibFormats/SiPixelObjects/interface/PixelTrimOverrideBase.h"
0020 #include "CalibFormats/SiPixelObjects/interface/PixelTrimBase.h"
0021 #include "CalibFormats/SiPixelObjects/interface/PixelROCTrimBits.h"
0022 #include "CalibFormats/SiPixelObjects/interface/PixelROCName.h"
0023 #include "CalibFormats/SiPixelObjects/interface/PixelNameTranslation.h"
0024 #include "CalibFormats/SiPixelObjects/interface/PixelFECConfigInterface.h"
0025
0026 namespace pos {
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045 class PixelTrimBase : public PixelConfigBase {
0046 public:
0047 PixelTrimBase(std::string description, std::string creator, std::string date);
0048
0049 ~PixelTrimBase() override;
0050
0051 void setOverride(PixelTrimOverrideBase* trimOverride);
0052
0053
0054
0055
0056 virtual void generateConfiguration(PixelFECConfigInterface* pixelFEC,
0057 PixelNameTranslation* trans,
0058 const PixelMaskBase& pixelMask) const = 0;
0059 virtual void writeBinary(std::string filename) const = 0;
0060
0061 void writeASCII(std::string filename) const override = 0;
0062 void writeXML(pos::PixelConfigKey key, int version, std::string path) const override { ; }
0063 void writeXMLHeader(pos::PixelConfigKey key,
0064 int version,
0065 std::string path,
0066 std::ofstream* out,
0067 std::ofstream* out1 = nullptr,
0068 std::ofstream* out2 = nullptr) const override {
0069 ;
0070 }
0071 void writeXML(std::ofstream* out, std::ofstream* out1 = nullptr, std::ofstream* out2 = nullptr) const override { ; }
0072 void writeXMLTrailer(std::ofstream* out,
0073 std::ofstream* out1 = nullptr,
0074 std::ofstream* out2 = nullptr) const override {
0075 ;
0076 }
0077
0078 virtual PixelROCTrimBits getTrimBits(int ROCId) const = 0;
0079
0080 virtual PixelROCTrimBits* getTrimBits(PixelROCName name) = 0;
0081
0082 friend std::ostream& operator<<(std::ostream& s, const PixelTrimBase& mask);
0083
0084 private:
0085 PixelTrimOverrideBase* trimOverride_;
0086 };
0087 }
0088
0089 #endif