psana_examples/src/DumpFccd.cpp

Go to the documentation of this file.
00001 //--------------------------------------------------------------------------
00002 // File and Version Information:
00003 //      $Id: DumpFccd.cpp 5898 2013-03-23 07:07:52Z salnikov@SLAC.STANFORD.EDU $
00004 //
00005 // Description:
00006 //      Class DumpFccd...
00007 //
00008 // Author List:
00009 //      Andrei Salnikov
00010 //
00011 //------------------------------------------------------------------------
00012 
00013 //-----------------------
00014 // This Class's Header --
00015 //-----------------------
00016 #include "psana_examples/DumpFccd.h"
00017 
00018 //-----------------
00019 // C/C++ Headers --
00020 //-----------------
00021 
00022 //-------------------------------
00023 // Collaborating Class Headers --
00024 //-------------------------------
00025 #include "MsgLogger/MsgLogger.h"
00026 #include "psddl_psana/fccd.ddl.h"
00027 
00028 //-----------------------------------------------------------------------
00029 // Local Macros, Typedefs, Structures, Unions and Forward Declarations --
00030 //-----------------------------------------------------------------------
00031 
00032 using namespace psana_examples;
00033 PSANA_MODULE_FACTORY(DumpFccd)
00034 
00035 //              ----------------------------------------
00036 //              -- Public Function Member Definitions --
00037 //              ----------------------------------------
00038 
00039 namespace psana_examples {
00040 
00041 //----------------
00042 // Constructors --
00043 //----------------
00044 DumpFccd::DumpFccd (const std::string& name)
00045   : Module(name)
00046 {
00047   m_src = configSrc("source", "DetInfo(:Fccd)");
00048 }
00049 
00050 //--------------
00051 // Destructor --
00052 //--------------
00053 DumpFccd::~DumpFccd ()
00054 {
00055 }
00056 
00057 // Method which is called at the beginning of the calibration cycle
00058 void 
00059 DumpFccd::beginCalibCycle(Event& evt, Env& env)
00060 {
00061   MsgLog(name(), trace, "in beginCalibCycle()");
00062 
00063   shared_ptr<Psana::FCCD::FccdConfigV1> config1 = env.configStore().get(m_src);
00064   if (config1) {
00065     
00066     WithMsgLog(name(), info, str) {
00067       str << "FCCD::FccdConfigV1:";
00068       str << "\n  outputMode = " << config1->outputMode();
00069       str << "\n  width = " << config1->width();
00070       str << "\n  height = " << config1->height();
00071       str << "\n  trimmedWidth = " << config1->trimmedWidth();
00072       str << "\n  trimmedHeight = " << config1->trimmedHeight();
00073     }
00074     
00075   }
00076 
00077   shared_ptr<Psana::FCCD::FccdConfigV2> config2 = env.configStore().get(m_src);
00078   if (config2) {
00079     
00080     WithMsgLog(name(), info, str) {
00081       str << "FCCD::FccdConfigV2:";
00082       str << "\n  outputMode = " << config2->outputMode();
00083       str << "\n  ccdEnable = " << int(config2->ccdEnable());
00084       str << "\n  focusMode = " << int(config2->focusMode());
00085       str << "\n  exposureTime = " << config2->exposureTime();
00086       str << "\n  dacVoltages = " << config2->dacVoltages();
00087       str << "\n  waveforms = " << config2->waveforms();
00088       str << "\n  width = " << config2->width();
00089       str << "\n  height = " << config2->height();
00090       str << "\n  trimmedWidth = " << config2->trimmedWidth();
00091       str << "\n  trimmedHeight = " << config2->trimmedHeight();
00092     }
00093     
00094   }
00095 }
00096 
00097 // Method which is called with event data
00098 void 
00099 DumpFccd::event(Event& evt, Env& env)
00100 {
00101 }
00102   
00103 } // namespace psana_examples

Generated on 19 Dec 2016 for PSANAmodules by  doxygen 1.4.7