Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef PixelLowVoltageMap_h
0002 #define PixelLowVoltageMap_h
0003 /**
0004 *   \file CalibFormats/SiPixelObjects/interface/PixelLowVoltageMap.h
0005 *   \brief This class implements..
0006 *
0007 *   A longer explanation will be placed here later
0008 */
0009 
0010 #include <vector>
0011 #include <set>
0012 #include <map>
0013 #include <utility>
0014 #include <string>
0015 #include "CalibFormats/SiPixelObjects/interface/PixelConfigBase.h"
0016 #include "CalibFormats/SiPixelObjects/interface/PixelModuleName.h"
0017 #include "CalibFormats/SiPixelObjects/interface/PixelHdwAddress.h"
0018 #include "CalibFormats/SiPixelObjects/interface/PixelNameTranslation.h"
0019 #include "CalibFormats/SiPixelObjects/interface/PixelROCStatus.h"
0020 
0021 namespace pos {
0022   /*!  \ingroup ConfigurationObjects "Configuration Objects"
0023 *    
0024 *  @{
0025 *
0026 *  \class PixelLowVoltageMap PixelLowVoltageMap.h
0027 *  \brief This is the documentation about PixelLowVoltageMap...
0028 *
0029 *   A longer explanation will be placed here later
0030 */
0031   class PixelLowVoltageMap : public PixelConfigBase {
0032   public:
0033     PixelLowVoltageMap(std::vector<std::vector<std::string> > &tableMat);
0034     PixelLowVoltageMap(std::string filename);
0035 
0036     void writeASCII(std::string dir = "") const override;
0037     void writeXML(pos::PixelConfigKey key, int version, std::string path) const override { ; }
0038     void writeXMLHeader(pos::PixelConfigKey key,
0039                         int version,
0040                         std::string path,
0041                         std::ofstream *out,
0042                         std::ofstream *out1 = nullptr,
0043                         std::ofstream *out2 = nullptr) const override;
0044     void writeXML(std::ofstream *out, std::ofstream *out1 = nullptr, std::ofstream *out2 = nullptr) const override;
0045     void writeXMLTrailer(std::ofstream *out,
0046                          std::ofstream *out1 = nullptr,
0047                          std::ofstream *out2 = nullptr) const override;
0048 
0049     std::string dpNameIana(const PixelModuleName &module) const;
0050     std::string dpNameIdigi(const PixelModuleName &module) const;
0051 
0052     std::set<unsigned int> getFEDs(PixelNameTranslation *translation) const;
0053     std::map<unsigned int, std::set<unsigned int> > getFEDsAndChannels(PixelNameTranslation *translation) const;
0054 
0055   private:
0056     //ugly... FIXME
0057     std::map<PixelModuleName, std::pair<std::string, std::pair<std::string, std::string> > > dpNameMap_;
0058     //                                    base                    Iana          Idigi
0059   };
0060 }  // namespace pos
0061 /* @} */
0062 #endif