00001 #ifndef PSANA_EXAMPLES_DUMPEPICS_H 00002 #define PSANA_EXAMPLES_DUMPEPICS_H 00003 00004 //-------------------------------------------------------------------------- 00005 // File and Version Information: 00006 // $Id: DumpEpics.h 10250 2015-06-09 21:29:07Z davidsch@SLAC.STANFORD.EDU $ 00007 // 00008 // Description: 00009 // Class DumpEpics. 00010 // 00011 //------------------------------------------------------------------------ 00012 00013 //----------------- 00014 // C/C++ Headers -- 00015 //----------------- 00016 00017 //---------------------- 00018 // Base Class Headers -- 00019 //---------------------- 00020 #include "psana/Module.h" 00021 00022 //------------------------------- 00023 // Collaborating Class Headers -- 00024 //------------------------------- 00025 00026 //------------------------------------ 00027 // Collaborating Class Declarations -- 00028 //------------------------------------ 00029 00030 // --------------------- 00031 // -- Class Interface -- 00032 // --------------------- 00033 00034 namespace psana_examples { 00035 00036 /** 00037 * @brief Example module for accessing EPICS data from psana 00038 * 00039 * This software was developed for the LCLS project. If you use all or 00040 * part of it, please give an appropriate acknowledgment. 00041 * 00042 * @version $Id: DumpEpics.h 10250 2015-06-09 21:29:07Z davidsch@SLAC.STANFORD.EDU $ 00043 * 00044 * @author Andrei Salnikov 00045 */ 00046 00047 class DumpEpics : public Module { 00048 public: 00049 00050 // Default constructor 00051 DumpEpics (const std::string& name) ; 00052 00053 // Destructor 00054 virtual ~DumpEpics () ; 00055 00056 /// Method which is called at the beginning of the calibration cycle 00057 virtual void beginCalibCycle(Event& evt, Env& env); 00058 00059 /// Method which is called with event data 00060 virtual void event(Event& evt, Env& env); 00061 00062 protected: 00063 00064 // demo getting pv data array, useful for waveform pv's 00065 std::string dumpPvDataArray(const PSEnv::EpicsStore &estore, const std::string &pvName); 00066 00067 private: 00068 // Data members 00069 00070 }; 00071 00072 } // namespace psana_examples 00073 00074 #endif // PSANA_EXAMPLES_DUMPEPICS_H