PSCalib/src/CalibPars.cpp

Go to the documentation of this file.
00001 //--------------------------------------------------------------------------
00002 // File and Version Information:
00003 //      $Id: CalibPars.cpp 10156 2015-05-23 00:00:36Z dubrovin@SLAC.STANFORD.EDU $
00004 //
00005 // Description:
00006 //      Class CalibPars...
00007 //
00008 // Author List:
00009 //      Mikhail S. Dubrovin
00010 //
00011 //------------------------------------------------------------------------
00012 
00013 //-----------------------
00014 // This Class's Header --
00015 //-----------------------
00016 #include "PSCalib/CalibPars.h"
00017 
00018 //-----------------
00019 // C/C++ Headers --
00020 //-----------------
00021 //#include <iostream>
00022 //#include <iomanip>  // for std::setw
00023 
00024 //-------------------------------
00025 // Collaborating Class Headers --
00026 //-------------------------------
00027 #include "MsgLogger/MsgLogger.h"
00028 
00029 //-----------------------------------------------------------------------
00030 // Local Macros, Typedefs, Structures, Unions and Forward Declarations --
00031 //-----------------------------------------------------------------------
00032 using namespace std;
00033 
00034 namespace PSCalib {
00035 
00036 //----------------------------------------
00037 //-- Public Function Member Definitions --
00038 //----------------------------------------
00039 
00040 //-----------------------------
00041 const size_t 
00042 CalibPars::ndim(const CALIB_TYPE& calibtype)
00043 {
00044   default_msg("ndim()");
00045   return 0;
00046 }
00047 
00048 //-----------------------------
00049 const size_t 
00050 CalibPars::size(const CALIB_TYPE& calibtype)
00051 {
00052   default_msg("size()");
00053   return 0;
00054 }
00055 
00056 //-----------------------------
00057 const unsigned* 
00058 CalibPars::shape(const CALIB_TYPE& calibtype) 
00059 {
00060   default_msg("shape()");
00061   return 0;
00062 }
00063 
00064 //-----------------------------
00065 const CalibPars::pedestals_t* 
00066 CalibPars::pedestals()
00067 { 
00068   default_msg("pedestals()");
00069   return 0;
00070 }
00071 
00072 //-----------------------------
00073 const CalibPars::pixel_status_t* 
00074 CalibPars::pixel_status()
00075 { 
00076   default_msg("pixel_status()");
00077   return 0;
00078 }
00079 
00080 //-----------------------------
00081 const CalibPars::pixel_gain_t* 
00082 CalibPars::pixel_gain()
00083 { 
00084   default_msg("pixel_gain()");
00085   return 0;
00086 }
00087 
00088 //-----------------------------
00089 const CalibPars::pixel_rms_t* 
00090 CalibPars::pixel_rms()
00091 { 
00092   default_msg("pixel_rms()");
00093   return 0;
00094 }
00095 
00096 //-----------------------------
00097 const CalibPars::pixel_mask_t* 
00098 CalibPars::pixel_mask()
00099 { 
00100   default_msg("pixel_mask()");
00101   return 0;
00102 }
00103 
00104 //-----------------------------
00105 const CalibPars::pixel_bkgd_t* 
00106 CalibPars::pixel_bkgd()
00107 { 
00108   default_msg("pixel_bkgd()");
00109   return 0;
00110 }
00111 
00112 //-----------------------------
00113 const CalibPars::common_mode_t* 
00114 CalibPars::common_mode()
00115 { 
00116   default_msg("common_mode()");
00117   return 0;
00118 }
00119 
00120 //-----------------------------
00121 const int CalibPars::status(const CALIB_TYPE& calibtype)  // calibtype = PEDESTALS
00122 { 
00123   default_msg("status(CALIB_TYPE&)");
00124 
00125   if( calibtype == PEDESTALS    ) return 0;
00126   if( calibtype == PIXEL_STATUS ) return 0;
00127   if( calibtype == PIXEL_RMS    ) return 0;
00128   if( calibtype == PIXEL_GAIN   ) return 0;
00129   if( calibtype == PIXEL_MASK   ) return 0;
00130   if( calibtype == PIXEL_BKGD   ) return 0;
00131   if( calibtype == COMMON_MODE  ) return 0;
00132   return 0;
00133 }
00134 
00135 //-----------------------------
00136 void 
00137 CalibPars::printCalibPars()
00138 {
00139   default_msg("printCalibPars()");
00140 }
00141 
00142 //-----------------------------
00143 void 
00144 CalibPars::default_msg(const std::string& msg) 
00145 {
00146   MsgLog("PSCalib", warning, "DEFAULT METHOD "<< msg << " SHOULD BE RE-IMPLEMENTED IN DERIVED CLASS.");
00147 }
00148 
00149 //-----------------------------
00150 void 
00151 CalibPars::fill_map_type2str() 
00152 {
00153   map_type2str[PEDESTALS]    = std::string("pedestals");
00154   map_type2str[PIXEL_STATUS] = std::string("pixel_status");
00155   map_type2str[PIXEL_RMS]    = std::string("pixel_rms");
00156   map_type2str[PIXEL_GAIN]   = std::string("pixel_gain");
00157   map_type2str[PIXEL_MASK]   = std::string("pixel_mask");
00158   map_type2str[PIXEL_BKGD]   = std::string("pixel_bkgd");
00159   map_type2str[COMMON_MODE]  = std::string("common_mode");
00160 }
00161 
00162 
00163 //-----------------------------
00164 void 
00165 CalibPars::printCalibTypes() 
00166 {
00167     WithMsgLog("PSCalib", info, str) {
00168       str << "print_calib_types():\n  Map map_type2str of known enumerated data types:\n" ;
00169       for (std::map<CALIB_TYPE, std::string>::iterator it=map_type2str.begin(); it!=map_type2str.end(); ++it)
00170           str << "    " << it->first << " : " << it->second << '\n';
00171     }
00172 }
00173 
00174 //-----------------------------
00175 } // namespace PSCalib
00176 //-----------------------------

Generated on 19 Dec 2016 for PSANAmodules by  doxygen 1.4.7