// $Id: TemplatedAlg.cpp,v 1.1 2008/10/09 21:00:37 marcocle Exp $ // Include files #include "GaudiKernel/MsgStream.h" #include "GaudiKernel/AlgFactory.h" #include "GaudiKernel/DataObject.h" #include "GaudiKernel/IDataProviderSvc.h" #include "GaudiKernel/IEventProcessor.h" #include "TemplatedAlg.h" #include // Static Factory declaration typedef TemplatedAlg > t1; typedef TemplatedAlg t2; DECLARE_ALGORITHM_FACTORY(t1) DECLARE_NAMED_ALGORITHM_FACTORY(t1,TAlgIS) DECLARE_ALGORITHM_FACTORY(t2) DECLARE_NAMED_ALGORITHM_FACTORY(t2,TAlgDB) template TemplatedAlg::TemplatedAlg(const std::string& name, ISvcLocator* ploc) : GaudiAlgorithm(name, ploc), m_t(), m_r() { //------------------------------------------------------------------------------ declareProperty("TProperty", m_t); declareProperty("RProperty", m_r); } //------------------------------------------------------------------------------ template StatusCode TemplatedAlg::initialize() { //------------------------------------------------------------------------------ MsgStream log( msgSvc(), name() ); log << MSG::INFO << "Initializing TemplatedAlg instance " << name() << " of type " << typeid(*this).name() << endmsg; return StatusCode::SUCCESS; } //------------------------------------------------------------------------------ template StatusCode TemplatedAlg::execute() { //------------------------------------------------------------------------------ return StatusCode::SUCCESS; } //------------------------------------------------------------------------------ template StatusCode TemplatedAlg::finalize() { //------------------------------------------------------------------------------ return StatusCode::SUCCESS; }