00001 #ifndef PSANA_EVENTKEYS_H 00002 #define PSANA_EVENTKEYS_H 00003 00004 //-------------------------------------------------------------------------- 00005 // File and Version Information: 00006 // $Id: EventKeys.h 8884 2014-09-11 18:43:40Z dubrovin@SLAC.STANFORD.EDU $ 00007 // 00008 // Description: 00009 // Class EventKeys. 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 { 00035 00036 /** 00037 * @brief Example module class for psana which dumps the list of keys in event 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 * @see AdditionalClass 00043 * 00044 * @version \$Id: EventKeys.h 8884 2014-09-11 18:43:40Z dubrovin@SLAC.STANFORD.EDU $ 00045 * 00046 * @author Andrei Salnikov 00047 */ 00048 00049 class EventKeys : public Module { 00050 public: 00051 00052 // Default constructor 00053 EventKeys (const std::string& name) ; 00054 00055 // Destructor 00056 virtual ~EventKeys () ; 00057 00058 /// Method which is called once at the beginning of the job 00059 virtual void beginJob(Event& evt, Env& env); 00060 00061 /// Method which is called at the beginning of the run 00062 virtual void beginRun(Event& evt, Env& env); 00063 00064 /// Method which is called at the beginning of the calibration cycle 00065 virtual void beginCalibCycle(Event& evt, Env& env); 00066 00067 /// Method which is called with event data 00068 virtual void event(Event& evt, Env& env); 00069 00070 /// Method which is called at the end of the calibration cycle 00071 virtual void endCalibCycle(Event& evt, Env& env); 00072 00073 /// Method which is called at the end of the run 00074 virtual void endRun(Event& evt, Env& env); 00075 00076 /// Method which is called once at the end of the job 00077 virtual void endJob(Event& evt, Env& env); 00078 00079 protected: 00080 00081 private: 00082 00083 /// Flag: true - print in event() info about env.configStore().keys() 00084 bool m_print_cfg_in_evt; 00085 00086 /// Flag: true - print in event() info about env.calibStore().keys() 00087 bool m_print_clb_in_evt; 00088 }; 00089 00090 } // namespace psana 00091 00092 #endif // PSANA_EVENTKEYS_H