00001 #ifndef PixelGlobalDelay25_h 00002 #define PixelGlobalDelay25_h 00003 00010 #include <iostream> 00011 #include <vector> 00012 #include <string> 00013 #include "CalibFormats/SiPixelObjects/interface/PixelConfigBase.h" 00014 00015 namespace pos{ 00026 class PixelGlobalDelay25: public PixelConfigBase { 00027 00028 public: 00029 00030 PixelGlobalDelay25(std::string filename); // create from file 00031 PixelGlobalDelay25(std::vector<std::vector<std::string> > & tab); // create from DB 00032 virtual ~PixelGlobalDelay25(); 00033 00034 unsigned int getDelay( unsigned int offset=0) const; // delays in steps of 0.499 ns (Delay25 step) 00035 unsigned int getCyclicDelay(unsigned int offset=0) const; // delays in steps of 0.499 ns (Delay25 step) 00036 unsigned int getTTCrxDelay( unsigned int offset ) const; // delays in steps of 0.10396 ns (TTCrx step) 00037 unsigned int getTTCrxDelay( ) const; // delays in steps of 0.10396 ns (TTCrx step) 00038 // but assumes that the default TTCrx delay is 0 ns 00039 virtual void setDelay( unsigned int delay) {delay_ = delay ;} 00040 00041 virtual void writeASCII(std::string dir) const; 00042 // void writeXML( pos::PixelConfigKey key, int version, std::string path) const ; 00043 virtual void writeXMLHeader( pos::PixelConfigKey key, 00044 int version, 00045 std::string path, 00046 std::ofstream *out, 00047 std::ofstream *out1 = NULL, 00048 std::ofstream *out2 = NULL 00049 ) const ; 00050 virtual void writeXML( std::ofstream *out, 00051 std::ofstream *out1 = NULL , 00052 std::ofstream *out2 = NULL ) const ; 00053 virtual void writeXMLTrailer( std::ofstream *out, 00054 std::ofstream *out1 = NULL, 00055 std::ofstream *out2 = NULL 00056 ) const ; 00057 00058 private: 00059 unsigned int delay_; 00060 00061 }; 00062 } 00063 /* @} */ 00064 #endif