psana_examples/src/DumpOrca.cpp

Go to the documentation of this file.
00001 //--------------------------------------------------------------------------
00002 // File and Version Information:
00003 //      $Id: DumpOrca.cpp 5355 2013-02-05 22:07:12Z salnikov@SLAC.STANFORD.EDU $
00004 //
00005 // Description:
00006 //      Class DumpOrca...
00007 //
00008 // Author List:
00009 //      Andy Salnikov
00010 //
00011 //------------------------------------------------------------------------
00012 
00013 //-----------------------
00014 // This Class's Header --
00015 //-----------------------
00016 #include "psana_examples/DumpOrca.h"
00017 
00018 //-----------------
00019 // C/C++ Headers --
00020 //-----------------
00021 
00022 //-------------------------------
00023 // Collaborating Class Headers --
00024 //-------------------------------
00025 #include "MsgLogger/MsgLogger.h"
00026 #include "psddl_psana/orca.ddl.h"
00027 
00028 //-----------------------------------------------------------------------
00029 // Local Macros, Typedefs, Structures, Unions and Forward Declarations --
00030 //-----------------------------------------------------------------------
00031 
00032 // This declares this class as psana module
00033 using namespace psana_examples;
00034 PSANA_MODULE_FACTORY(DumpOrca)
00035 
00036 //              ----------------------------------------
00037 //              -- Public Function Member Definitions --
00038 //              ----------------------------------------
00039 
00040 namespace psana_examples {
00041 
00042 //----------------
00043 // Constructors --
00044 //----------------
00045 DumpOrca::DumpOrca (const std::string& name)
00046   : Module(name)
00047   , m_src()
00048 {
00049   // get the values from configuration or use defaults
00050   m_src = configSrc("source", "DetInfo(:OrcaFl40)");
00051 }
00052 
00053 //--------------
00054 // Destructor --
00055 //--------------
00056 DumpOrca::~DumpOrca ()
00057 {
00058 }
00059 
00060 /// Method which is called at the beginning of the calibration cycle
00061 void 
00062 DumpOrca::beginCalibCycle(Event& evt, Env& env)
00063 {
00064   MsgLog(name(), trace, "in beginCalibCycle()");
00065 
00066   shared_ptr<Psana::Orca::ConfigV1> config1 = env.configStore().get(m_src);
00067   if (config1) {
00068 
00069     WithMsgLog(name(), info, str) {
00070       str << "Orca::ConfigV1:";
00071       str << "\n  mode = " << int(config1->mode());
00072       str << "\n  rows = " << config1->rows();
00073       str << "\n  cooling = " << int(config1->cooling());
00074       str << "\n  defect_pixel_correction_enabled = " << int(config1->defect_pixel_correction_enabled());
00075     }
00076 
00077   }
00078 }
00079 
00080 /// Method which is called with event data, this is the only required 
00081 /// method, all other methods are optional
00082 void 
00083 DumpOrca::event(Event& evt, Env& env)
00084 {
00085 }
00086 
00087 } // namespace psana_examples

Generated on 19 Dec 2016 for PSANAmodules by  doxygen 1.4.7