00001 //-------------------------------------------------------------------------- 00002 // File and Version Information: 00003 // $Id: PnccdPixelGainV1.cpp 2014-01-24 11:00:00Z dubrovin@SLAC.STANFORD.EDU $ 00004 // 00005 // Description: 00006 // Class PnccdPixelGainV1... 00007 // 00008 // Author List: 00009 // Mikhail Dubrovin 00010 // 00011 //------------------------------------------------------------------------ 00012 00013 //----------------------- 00014 // This Class's Header -- 00015 //----------------------- 00016 #include "pdscalibdata/PnccdPixelGainV1.h" 00017 #include "pdscalibdata/GlobalMethods.h" 00018 00019 //----------------- 00020 // C/C++ Headers -- 00021 //----------------- 00022 #include <algorithm> 00023 #include <stdexcept> 00024 #include <fstream> 00025 00026 //------------------------------- 00027 // Collaborating Class Headers -- 00028 //------------------------------- 00029 #include "MsgLogger/MsgLogger.h" 00030 00031 //----------------------------------------------------------------------- 00032 // Local Macros, Typedefs, Structures, Unions and Forward Declarations -- 00033 //----------------------------------------------------------------------- 00034 00035 // ---------------------------------------- 00036 // -- Public Function Member Definitions -- 00037 // ---------------------------------------- 00038 00039 namespace pdscalibdata { 00040 00041 //---------------- 00042 // Constructors -- 00043 //---------------- 00044 PnccdPixelGainV1::PnccdPixelGainV1() 00045 : PnccdBaseV1 () 00046 { 00047 std::fill_n(m_pars, int(Size), pars_t(1)); // All pixels have unit gain by default 00048 // std::fill_n(m_pars, int(Size), pars_t(0.5)); // For test purpose only! 00049 } 00050 00051 00052 PnccdPixelGainV1::PnccdPixelGainV1 (const std::string& fname) 00053 : PnccdBaseV1 () 00054 { 00055 load_pars_from_file <pars_t> (fname, "pixel_gain", Size, m_pars); 00056 } 00057 00058 00059 void PnccdPixelGainV1::print() 00060 { 00061 MsgLog("PnccdPixelGainV1", info, "pixel_gain:\n" << pixel_gain()); 00062 } 00063 00064 } // namespace pdscalibdata