00001 //-------------------------------------------------------------------------- 00002 // File and Version Information: 00003 // $Id: Run.cpp 5381 2013-02-07 01:50:39Z salnikov@SLAC.STANFORD.EDU $ 00004 // 00005 // Description: 00006 // Class Run... 00007 // 00008 // Author List: 00009 // Andy Salnikov 00010 // 00011 //------------------------------------------------------------------------ 00012 00013 //----------------------- 00014 // This Class's Header -- 00015 //----------------------- 00016 #include "psana/Run.h" 00017 00018 //----------------- 00019 // C/C++ Headers -- 00020 //----------------- 00021 00022 //------------------------------- 00023 // Collaborating Class Headers -- 00024 //------------------------------- 00025 #include "psana/EventLoop.h" 00026 00027 //----------------------------------------------------------------------- 00028 // Local Macros, Typedefs, Structures, Unions and Forward Declarations -- 00029 //----------------------------------------------------------------------- 00030 00031 // ---------------------------------------- 00032 // -- Public Function Member Definitions -- 00033 // ---------------------------------------- 00034 00035 namespace psana { 00036 00037 //---------------- 00038 // Constructors -- 00039 //---------------- 00040 Run::Run () 00041 : m_evtLoop() 00042 , m_run(-1) 00043 { 00044 } 00045 00046 // Constructor takes event loop object 00047 Run::Run(const boost::shared_ptr<EventLoop>& evtLoop, int run) 00048 : m_evtLoop(evtLoop) 00049 , m_run(run) 00050 { 00051 } 00052 00053 //-------------- 00054 // Destructor -- 00055 //-------------- 00056 Run::~Run () 00057 { 00058 } 00059 00060 /// Get environment object, cannot be called for "null" source 00061 PSEnv::Env& 00062 Run::env() const 00063 { 00064 return m_evtLoop->env(); 00065 } 00066 00067 } // namespace psana