#ifndef D0STANDALONEGEOMETRY_HPP #define D0STANDALONEGEOMETRY_HPP // // $Id: d0StandaloneGeometry.hpp,v 1.1 2001/02/04 14:54:55 hobbs Exp $ // // File: StandaloneGeometry.hpp // Purpose: Parse command line arguments giving instructions to find an // d0 geometry. The geometry can either be read from a file or created in // memory using RCP. // Created: 1-FEB-2001 John D. Hobbs // // $Revision: 1.1 $ // // // Include files #include #include #include "d0om/d0_Ref.hpp" #include "d0_geometry/base/BaseGeometry.hpp" // Global definitions class d0StandaloneGeometry { public: /// Initialize given the standard command-line style arguments d0StandaloneGeometry(const int argc, char **argv); /// Get back the initialization arguments with those used by this class removed void get_modified_args(std::vector &argv) const; /// Fetch the geometry specified in the arguements d0_Ref get_geometry() const; /// Get the file name used to build the geometry const std::string get_file_name() const { return _fname; } /// See if it was built by reading a file bool is_file() const { return _file; } /// See if it was built from RCP bool is_rcp() const { return !is_file(); } /// Print a list of the known options friend std::ostream& operator <<(std::ostream& os, const d0StandaloneGeometry& me); private: /// Keep around the initializing arguements std::vector _argv; /// Keep around a list of the ones I've actually used std::vector _used_args; /// The geometry I have mutable d0_Ref _d0det; // Defer creation, so mutable /// The possible geometry sources. Default is Rcp = "SiBaseGeometry" bool _file; // Is it to be read from a file? std::string _ftype; // Is it EVPACK (Default) or DSPACK? std::string _fname; // File or rcp file name? /// Construct a geometry using RCP void build_default() const; /// Read the geometry from a file void read_geometry() const; }; #endif //D0STANDALONEGEOMETRY_HPP