00001 #ifndef PSSHMEMINPUT_SHMEMINPUTMODULE_H 00002 #define PSSHMEMINPUT_SHMEMINPUTMODULE_H 00003 00004 //-------------------------------------------------------------------------- 00005 // File and Version Information: 00006 // $Id: ShmemInputModule.h 7698 2014-02-27 00:47:58Z salnikov@SLAC.STANFORD.EDU $ 00007 // 00008 // Description: 00009 // Class ShmemInputModule. 00010 // 00011 //------------------------------------------------------------------------ 00012 00013 //----------------- 00014 // C/C++ Headers -- 00015 //----------------- 00016 #include <string> 00017 00018 //---------------------- 00019 // Base Class Headers -- 00020 //---------------------- 00021 #include "PSXtcInput/XtcInputModuleBase.h" 00022 00023 //------------------------------- 00024 // Collaborating Class Headers -- 00025 //------------------------------- 00026 00027 //------------------------------------ 00028 // Collaborating Class Declarations -- 00029 //------------------------------------ 00030 00031 // --------------------- 00032 // -- Class Interface -- 00033 // --------------------- 00034 00035 namespace PSShmemInput { 00036 00037 /// @addtogroup PSShmemInput 00038 00039 /** 00040 * @ingroup PSShmemInput 00041 * 00042 * @brief Psana input module for shared memory. 00043 * 00044 * This class implements psana input module which reads XTC data from 00045 * shared memory. Psana uses this module instead of regular XTC (or HDF5) 00046 * input module when it encounters @e shmem keyword in the input dataset: 00047 * 00048 * @code 00049 * % psana -c config.cfg shmem=name.0 00050 * @endcode 00051 * 00052 * Required value for @e shmem keyword consists of the shared memory tag 00053 * name and a client index (number) separated by dot, the meaning of these 00054 * parameters is defined by the DAQ shared memory server and should be 00055 * known to people who setup the infrastructure. 00056 * 00057 * In addition to @e shmem keyword dataset specification can optionally 00058 * contain @e stop keyword with a value that specifies stop condition. 00059 * Possible values for this keyword are: 00060 * - @e unmap - psana stops when @c UnMap transition occurs 00061 * - @e unconfigure - psana stops when @c UnConfigure transition occurs 00062 * - @e endrun - psana stops when @c EndRun transition occurs 00063 * - @e endcalibcycle - psana stops when @c EndCalibCycle transition occurs 00064 * - @e none - psana runs forever until killed 00065 * - @e no - same as @e none 00066 * 00067 * By default if @e stop keyword is not specified then it is equivalent to 00068 * @e stop=endrun and psana will stop at the end of run. 00069 * 00070 * Example of starting non-stopping job: 00071 * 00072 * @code 00073 * % psana -c config.cfg shmem=name.0:stop=none 00074 * @endcode 00075 * 00076 * @note This software was developed for the LCLS project. If you use all or 00077 * part of it, please give an appropriate acknowledgment. 00078 * 00079 * @version $Id: ShmemInputModule.h 7698 2014-02-27 00:47:58Z salnikov@SLAC.STANFORD.EDU $ 00080 * 00081 * @author Andy Salnikov 00082 */ 00083 00084 class ShmemInputModule : public PSXtcInput::XtcInputModuleBase { 00085 public: 00086 00087 /// Constructor takes the name of the module. 00088 ShmemInputModule (const std::string& name) ; 00089 00090 // Destructor 00091 virtual ~ShmemInputModule(); 00092 00093 protected: 00094 00095 private: 00096 00097 }; 00098 00099 } // namespace PSShmemInput 00100 00101 #endif // PSSHMEMINPUT_SHMEMINPUTMODULE_H