#ifndef ABSGEOMETER_HPP #define ABSGEOMETER_HPP // // $Id: absGeometer.hpp,v 1.4 2002/08/25 20:24:28 melanson Exp $ // // File: absGeometer.hpp // Purpose: // Created: 4-APR-2000 John Hobbs // // There are two classes defined here: // absObservedGeometer // absGeometer // Both are needed to implement the full observed, refreshable geometer. // absObservedGeometer provides a non-templated interface for the observer // portion of the job. absGeometer provides the templated sub-detector-specific // refresh function, absRefresh. This simply: (1) calls a virtual refresh for // the sub-class geometer and (2) notifies all observers. // // $Revision: 1.4 $ // // // Include files #include #include "d0om/d0_Ref.hpp" #include "identifiers/EnvID.hpp" #include "geometry_system/management/absObservedGeometer.hpp" // Global definitions namespace dgs { template class absGeometer: public absObservedGeometer { public: absGeometer() {} virtual ~absGeometer () {} /// Notify the geometer and observers that a new geometry should be used. void absRefresh(d0_Ref newdet, const edm::EnvID newid=edm::EnvID()){ refresh(newdet); // The order is crucial. The geometers must be updated _curID = newid; // before observers are notified of the update. notify_observers(); } /// The concrete geometers implement this. It is called when geometry changes virtual void refresh(d0_Ref newdet) = 0; /// Get back the current EnvID for this geoemetry edm::EnvID get_envid() const { return _curID; } private: edm::EnvID _curID; }; } #endif //ABSGEOMETER_HPP