Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 11:58:13

0001 #ifndef PixelMaskBase_h
0002 #define PixelMaskBase_h
0003 /**
0004 * \file CalibFormats/SiPixelObjects/interface/PixelMaskBase.h
0005 *
0006 *  This class provide a base class for the
0007 *  pixel mask data for the pixel FEC configuration
0008 *  This is a pure interface (abstract class) that
0009 *  needs to have an implementation.
0010 */
0011 
0012 #include "CalibFormats/SiPixelObjects/interface/PixelConfigBase.h"
0013 #include <vector>
0014 #include "CalibFormats/SiPixelObjects/interface/PixelMaskOverrideBase.h"
0015 #include "CalibFormats/SiPixelObjects/interface/PixelROCMaskBits.h"
0016 #include <string>
0017 #include <iostream>
0018 
0019 namespace pos {
0020   /*!  \ingroup ConfigurationObjects "Configuration Objects"
0021 *    
0022 *  @{
0023 *
0024 *  \class PixelMaskBase PixelMaskBase.h
0025 *  \brief This is the documentation about PixelMaskBase...
0026 *
0027 *  This class provide a base class for the
0028 *  pixel mask data for the pixel FEC configuration
0029 *  This is a pure interface (abstract class) that
0030 *  needs to have an implementation.
0031 * 
0032 *  All applications should just use this 
0033 *  interface and not care about the specific
0034 *  implementation
0035 */
0036   class PixelMaskBase : public PixelConfigBase {
0037   public:
0038     PixelMaskBase(std::string description, std::string creator, std::string date);
0039 
0040     ~PixelMaskBase() override;
0041 
0042     void setOverride(PixelMaskOverrideBase *);
0043 
0044     virtual const PixelROCMaskBits &getMaskBits(int ROCId) const = 0;
0045 
0046     virtual PixelROCMaskBits *getMaskBits(PixelROCName name) = 0;
0047 
0048     virtual void writeBinary(std::string filename) const = 0;
0049 
0050     void writeASCII(std::string filename) const override = 0;
0051     void writeXML(pos::PixelConfigKey key, int version, std::string path) const override { ; }
0052     void writeXMLHeader(pos::PixelConfigKey key,
0053                         int version,
0054                         std::string path,
0055                         std::ofstream *out,
0056                         std::ofstream *out1 = nullptr,
0057                         std::ofstream *out2 = nullptr) const override {
0058       ;
0059     }
0060     void writeXML(std::ofstream *out, std::ofstream *out1 = nullptr, std::ofstream *out2 = nullptr) const override { ; }
0061     void writeXMLTrailer(std::ofstream *out,
0062                          std::ofstream *out1 = nullptr,
0063                          std::ofstream *out2 = nullptr) const override {
0064       ;
0065     }
0066 
0067     friend std::ostream &operator<<(std::ostream &s, const PixelMaskBase &mask);
0068 
0069   private:
0070     //Hold pointer to the mask override information.
0071     PixelMaskOverrideBase *maskOverride_;
0072   };
0073 }  // namespace pos
0074 /* @} */
0075 #endif