Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:47:23

0001 #ifndef PixelTKFECConfig_h
0002 #define PixelTKFECConfig_h
0003 /**
0004 * \file CalibFormats/SiPixelObjects/interface/PixelTKFECConfig.h
0005 * \brief This class specifies which TKFEC boards are used and how they are addressed
0006 *
0007 *   A longer explanation will be placed here later
0008 *
0009 */
0010 #include <iostream>
0011 #include <vector>
0012 #include <string>
0013 #include "CalibFormats/SiPixelObjects/interface/PixelConfigBase.h"
0014 #include "CalibFormats/SiPixelObjects/interface/PixelTKFECParameters.h"
0015 
0016 namespace pos {
0017   /*!  \ingroup ConfigurationObjects "Configuration Objects"
0018 *    
0019 *  @{
0020 *
0021 *  \class PixelTKFECConfig PixelTKFECConfig.h
0022 *  \brief This class specifies which TKFEC boards are used and how they are addressed
0023 *
0024 *   A longer explanation will be placed here later
0025 *
0026 */
0027   class PixelTKFECConfig : public PixelConfigBase {
0028   public:
0029     PixelTKFECConfig(
0030         std::string
0031             filename);  //  <---- Modified for the conversion from parallel vectors to object that contain the configuration
0032 
0033     PixelTKFECConfig(std::vector<std::vector<std::string> > &tableMat);
0034 
0035     ~PixelTKFECConfig() override;
0036 
0037     unsigned int getNTKFECBoards() const;
0038 
0039     std::string getTKFECID(unsigned int i) const;
0040     unsigned int getCrate(unsigned int i) const;
0041     std::string getType(unsigned int i) const;
0042     unsigned int getAddress(unsigned int i) const;
0043     unsigned int crateFromTKFECID(std::string TKFECID) const;
0044     std::string typeFromTKFECID(std::string TKFECID) const;
0045     unsigned int addressFromTKFECID(std::string TKFECID) 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   private:
0061     std::vector<PixelTKFECParameters> TKFECconfig_;
0062   };
0063 }  // namespace pos
0064 /* @} */
0065 #endif