Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef PixelGlobalDelay25_h
0002 #define PixelGlobalDelay25_h
0003 /**
0004 * \file CalibFormats/SiPixelObjects/interface/PixelGlobalDelay25.h
0005 * \brief This class specifies which delay25 channels are delayed over the entire pixel detector and by how much
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 
0015 namespace pos {
0016   /*!  \ingroup ConfigurationObjects "Configuration Objects"
0017 *    
0018 *  @{
0019 *
0020 *  \class PixelGlobalDelay25 PixelGlobalDelay25.h
0021 *  \brief This class specifies which delay25 channels are delayed over the entire pixel detector and by how much
0022 *
0023 *   A longer explanation will be placed here later
0024 *
0025 */
0026   class PixelGlobalDelay25 : public PixelConfigBase {
0027   public:
0028     PixelGlobalDelay25(std::string filename);                         // create from file
0029     PixelGlobalDelay25(std::vector<std::vector<std::string> > &tab);  // create from DB
0030     ~PixelGlobalDelay25() override;
0031 
0032     unsigned int getDelay(unsigned int offset = 0) const;        // delays in steps of 0.499 ns (Delay25 step)
0033     unsigned int getCyclicDelay(unsigned int offset = 0) const;  // delays in steps of 0.499 ns (Delay25 step)
0034     unsigned int getTTCrxDelay(unsigned int offset) const;       // delays in steps of 0.10396 ns (TTCrx step)
0035     unsigned int getTTCrxDelay() const;                          // delays in steps of 0.10396 ns (TTCrx step)
0036                                                                  // but assumes that the default TTCrx delay is 0 ns
0037     virtual void setDelay(unsigned int delay) { delay_ = delay; }
0038 
0039     void writeASCII(std::string dir) const override;
0040     //    void   writeXML(      pos::PixelConfigKey key, int version, std::string path)                     const ;
0041     void writeXMLHeader(pos::PixelConfigKey key,
0042                         int version,
0043                         std::string path,
0044                         std::ofstream *out,
0045                         std::ofstream *out1 = nullptr,
0046                         std::ofstream *out2 = nullptr) const override;
0047     void writeXML(std::ofstream *out, std::ofstream *out1 = nullptr, std::ofstream *out2 = nullptr) const override;
0048     void writeXMLTrailer(std::ofstream *out,
0049                          std::ofstream *out1 = nullptr,
0050                          std::ofstream *out2 = nullptr) const override;
0051 
0052   private:
0053     unsigned int delay_;
0054   };
0055 }  // namespace pos
0056 /* @} */
0057 #endif