#ifndef CFTMATERIALGEOMETER_HPP #define CFTMATERIALGEOMETER_HPP // // $Id: CftMaterialGeometer.hpp,v 1.9 2001/01/22 18:03:51 mikeh Exp $ // // File: CftMaterialGeometer.hpp // Purpose: Provides user access to the CFT Material geometry // Created: 14-SEP-1998 Harry L. Melanson // // $Revision: 1.9 $ // // // Include files #include "geometry_system/management/HandleSystem.hpp" #include "geometry_system/management/absRcpGeometer.hpp" #include "cft_util/CFTDetector.hpp" #include "thinshells/CylindricalShell.hpp" // Forward class declarations class CylindricalShell; class BareCylindricalSurface; #ifndef RCP_RCP namespace edm {class RCP;} #endif /** Provides user access to the CFT Material geometry. The {\bf CftMaterialGeometer} is the standard user interface to the CFT Material geometry. I Only one CftMaterialGeometer can exist (it is a "singleton"), and access to it is through the {\bf get\_instance} function. */ class CftMaterialGeometer: public dgs::absRcpGeometer { public: /** Returns a pointer to the CftMaterialGeometer. {\bf get\_instance} supplies access to the (singleton) CftMaterialGeometer. The following illustrates how to use it: {\tt CftMaterialGeometer* cftgm = CftMaterialGeometer::get\_instance();} */ static CftMaterialGeometer* get_instance(); /** Build the material geometry. OBSOLETE. See absRcpGeometer::absRefresh */ void build(edm::RCP* rcp); /// Let the material know that its support surfaces have moved void refresh(); /// Returns specified doublet shell. const CylindricalShell* get_doublet_shell(const CFTDoublet doublet); /// Prints the geometry. void print_geometry(); private: /** Refresh the material geometry. Refreshes the material geometry by updating Handle's pointing to Base Geometry surfaces. This method should be called when new CFT material parameters are needed, or when the Base Geometry has been supplied to the CftGeometer. In the latter case, no RCP is supplied */ bool refresh(const edm::RCP* rcp); /// Private constructor used to manage singleton CftMaterialGeometer(); /// Private destructor used to manage singleton ~CftMaterialGeometer(); /// The actual geometer. static CftMaterialGeometer* d_theGeometer; /// The CFT material positioning surfaces. std::map d_surfaces; /// Cache of surface handles. dgs::HandleCache d_cache; /// The CFT material shells std::map d_shells; }; #endif //CFTMATERIALGEOMETER_HPP