psana/include/ExpNameFromConfig.h

Go to the documentation of this file.
00001 #ifndef PSANA_EXPNAMEFROMCONFIG_H
00002 #define PSANA_EXPNAMEFROMCONFIG_H
00003 
00004 //--------------------------------------------------------------------------
00005 // File and Version Information:
00006 //      $Id: ExpNameFromConfig.h 3038 2012-03-08 22:12:17Z salnikov@SLAC.STANFORD.EDU $
00007 //
00008 // Description:
00009 //      Class ExpNameFromConfig.
00010 //
00011 //------------------------------------------------------------------------
00012 
00013 //-----------------
00014 // C/C++ Headers --
00015 //-----------------
00016 
00017 //----------------------
00018 // Base Class Headers --
00019 //----------------------
00020 #include "PSEnv/IExpNameProvider.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  *  @ingroup 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  *  @see AdditionalClass
00043  *
00044  *  @version $Id: ExpNameFromConfig.h 3038 2012-03-08 22:12:17Z salnikov@SLAC.STANFORD.EDU $
00045  *
00046  *  @author Andy Salnikov
00047  */
00048 
00049 class ExpNameFromConfig : public PSEnv::IExpNameProvider {
00050 public:
00051 
00052   /**
00053    *  Create provider instance
00054    *
00055    *  @param[in] instr   Instrument name
00056    *  @param[in] exp     Experiemnt name
00057    */
00058   ExpNameFromConfig(const std::string& instr, const std::string& exp) ;
00059 
00060   // Destructor
00061   virtual ~ExpNameFromConfig () ;
00062 
00063   /// Returns instrument name
00064   virtual const std::string& instrument() const { return m_instr; }
00065 
00066   /// Returns experiment name
00067   virtual const std::string& experiment() const { return m_exp; }
00068 
00069   /// Returns experiment number or 0
00070   virtual unsigned expNum() const { return m_expNum; }
00071 
00072 protected:
00073 
00074 private:
00075 
00076   std::string m_instr;  ///< Name of instrument
00077   std::string m_exp;    ///< Name of experiment
00078   unsigned m_expNum;    ///< Experiment number
00079 
00080 };
00081 
00082 } // namespace psana
00083 
00084 #endif // PSANA_EXPNAMEFROMCONFIG_H

Generated on 19 Dec 2016 for PSANAclasses by  doxygen 1.4.7