All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
GaudiCommonConstructors.cpp
Go to the documentation of this file.
1 // $Id: GaudiCommonConstructors.cpp,v 1.1 2005/09/23 16:14:20 hmd Exp $
2 
3 // ============================================================================
4 /* @file GaudiCommonConstructors.cpp
5  *
6  * Specialised constructors for GaudiCommon
7  *
8  * @author Chris Jones Christopher.Rob.Jones@cern.ch
9  * @date 2005-08-08
10  */
11 // ============================================================================
12 
13 // ============================================================================
14 // GaudiKernel
15 // ============================================================================
16 #include "GaudiKernel/Algorithm.h"
17 #include "GaudiKernel/AlgTool.h"
18 // ============================================================================
19 // GaudiAlg
20 // ============================================================================
21 #include "GaudiAlg/GaudiCommon.h"
22 // ============================================================================
23 
24 //=============================================================================
25 // Null algorithm like constructor for AlgTool
26 // should NEVER be used...
27 //=============================================================================
28 template <>
29 GaudiCommon<AlgTool>::GaudiCommon( const std::string & /* name */,
30  ISvcLocator * /* pSvcLocator */ )
31  : AlgTool ( "ERROR", "ERROR", 0 )
32 {
33  throw GaudiException( "Invalid GaudiCommon<AlgTool> constructor",
34  "GaudiCommon", StatusCode::FAILURE );
35 }
36 //=============================================================================
37 
38 //=============================================================================
39 // Null tool like constructor for Algorithm
40 // should NEVER be used...
41 //=============================================================================
42 template <>
43 GaudiCommon<Algorithm>::GaudiCommon( const std::string& /* type */ ,
44  const std::string& /* name */ ,
45  const IInterface* /* parent */ )
46  : Algorithm ( "ERROR", 0 )
47 {
48  throw GaudiException( "Invalid GaudiCommon<Algorithm> constructor",
49  "GaudiCommon", StatusCode::FAILURE );
50 }
51 //=============================================================================
52 
53 //=============================================================================
54 // Standard algorithm constructor, initializes variables
55 //=============================================================================
56 template <>
57 GaudiCommon<Algorithm>::GaudiCommon( const std::string & name,
58  ISvcLocator * pSvcLocator )
59  : Algorithm ( name, pSvcLocator )
60 {
62 }
63 //=============================================================================
64 
65 //=============================================================================
66 // Standard tool constructor, initializes variables
67 //=============================================================================
68 template <>
70  const std::string& name ,
71  const IInterface* parent )
72  : AlgTool ( type , name , parent )
73 {
75 }
76 //=============================================================================
77 
78 // ============================================================================
79 // The END
80 // ============================================================================
81 
82 
83 
Define general base for Gaudi exception.
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:26
void initGaudiCommonConstructor(const IInterface *parent=0)
Constructor initializations.
string type
Definition: gaudirun.py:126
Definition of the basic interface.
Definition: IInterface.h:160
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:61
Base class from which all the concrete tool classes should be derived.
Definition: AlgTool.h:34