psana/include/PSAna.h

Go to the documentation of this file.
00001 #ifndef PSANA_PSANA_H
00002 #define PSANA_PSANA_H
00003 
00004 //--------------------------------------------------------------------------
00005 // File and Version Information:
00006 //      $Id: PSAna.h 5435 2013-02-13 01:02:07Z salnikov@SLAC.STANFORD.EDU $
00007 //
00008 // Description:
00009 //      Class PSAna.
00010 //
00011 //------------------------------------------------------------------------
00012 
00013 //-----------------
00014 // C/C++ Headers --
00015 //-----------------
00016 #include <string>
00017 #include <map>
00018 #include <vector>
00019 #include <boost/utility.hpp>
00020 
00021 //----------------------
00022 // Base Class Headers --
00023 //----------------------
00024 
00025 
00026 //-------------------------------
00027 // Collaborating Class Headers --
00028 //-------------------------------
00029 #include "psana/Context.h"
00030 #include "psana/DataSource.h"
00031 
00032 //------------------------------------
00033 // Collaborating Class Declarations --
00034 //------------------------------------
00035 
00036 //              ---------------------
00037 //              -- Class Interface --
00038 //              ---------------------
00039 
00040 namespace psana {
00041 
00042 /// @addtogroup psana
00043 
00044 /**
00045  *  @ingroup psana
00046  *
00047  *  @brief PSana framework class.
00048  *
00049  *  This class makes instances of the psana framework. For now there could be
00050  *  just one single instance, attempt to instantiate another instance will
00051  *  likely lead to exception.
00052  *
00053  *  This software was developed for the LCLS project.  If you use all or 
00054  *  part of it, please give an appropriate acknowledgment.
00055  *
00056  *  @version $Id: PSAna.h 5435 2013-02-13 01:02:07Z salnikov@SLAC.STANFORD.EDU $
00057  *
00058  *  @author Andy Salnikov
00059  */
00060 
00061 class PSAna : boost::noncopyable {
00062 public:
00063 
00064   /**
00065    *  @brief Make framework instance.
00066    *
00067    *  Framework constructor takes the name of the configuration file which
00068    *  can be empty and the set of the configuration options. Option provided
00069    *  via mapping, keys have format "section.param", values are strings.
00070    *  If section is not specified then it defaults to "psana".
00071    *  Options provided in constructor override options specified in
00072    *  configuration file.
00073    *
00074    *  @param[in]  config    Name of the configuration file, typically "psana.cfg".
00075    *  @param[in]  options   Other configuration options
00076    *
00077    */
00078   PSAna(const std::string& config, const std::map<std::string, std::string>& options);
00079 
00080   // Destructor
00081   ~PSAna () ;
00082 
00083   /**
00084    *  @brief Get the list of modules.
00085    */
00086   std::vector<std::string> modules();
00087 
00088   /**
00089    *  @brief Create data source instance for the set of input files/datasets.
00090    *
00091    *  This method can be called multiple times with different (or same) set of
00092    *  inputs. If list of inputs is empty then inputs from configuration file
00093    *  are used.
00094    *
00095    *  @param[in] input   List of inputs which can include files names, dataset names, etc.
00096    *  @return Instance of the data source class.
00097    */
00098   DataSource dataSource(const std::vector<std::string>& input);
00099 
00100 protected:
00101 
00102 private:
00103 
00104   Context::context_t m_context;                       ///< context (id) of this framework instance
00105   std::vector<boost::shared_ptr<Module> > m_modules;  ///< list of user modules
00106 
00107 };
00108 
00109 } // namespace psana
00110 
00111 #endif // PSANA_PSANA_H

Generated on 19 Dec 2016 for PSANAclasses by  doxygen 1.4.7