////////////////////////////////////////////////////////////////////
/// \class GLG4PosGen
///
/// \brief  Base class of Position Generators
///
/// \author Phil G Jones <p.g.jones@qmul.ac.uk> -- contact person
///
/// REVISION HISTORY:\n
///     11 Jun 2012 : P.Jones - Refactor of GLG4PosGen.
///
///  \details  Base class for generating positions
///
////////////////////////////////////////////////////////////////////
#ifndef __GLG4PosGen__
#define __GLG4PosGen__

#include <G4ThreeVector.hh>

#include <string>

class GLG4PosGen
{
public:
  /// Constructor sets teh default db name
  GLG4PosGen( const std::string& dbname = std::string( "pos" ) ) : fDbName( dbname ) { };
  /// Empty destructor
  virtual ~GLG4PosGen() { };
  /// Abstract interface for generating the position
  virtual void GeneratePosition( G4ThreeVector& argResult ) = 0;
  /// Abstract interface for setting the state
  virtual void SetState( G4String newValues ) = 0;
  /// Abstract interface for getting the state
  virtual G4String GetState() const = 0;
  virtual void BeginOfRun() { };
  virtual void EndOfRun() { };

protected:
  std::string fDbName; ///< GLG4param key prefix
  std::string _dbname; ///< GLG4param key prefix
};

#endif