All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
GaudiCommonConstructors.cpp
Go to the documentation of this file.
1 
2 // ============================================================================
3 /* @file GaudiCommonConstructors.cpp
4  *
5  * Specialised constructors for GaudiCommon
6  *
7  * @author Chris Jones Christopher.Rob.Jones@cern.ch
8  * @date 2005-08-08
9  */
10 // ============================================================================
11 
12 // ============================================================================
13 // GaudiKernel
14 // ============================================================================
15 #include "GaudiKernel/Algorithm.h"
16 #include "GaudiKernel/AlgTool.h"
17 // ============================================================================
18 // GaudiAlg
19 // ============================================================================
20 #include "GaudiAlg/GaudiCommon.h"
21 // ============================================================================
22 
23 //=============================================================================
24 // Null algorithm like constructor for AlgTool
25 // should NEVER be used...
26 //=============================================================================
27 template <>
29  ISvcLocator * /* pSvcLocator */ )
30  : base_class ( "ERROR", "ERROR", nullptr )
31 {
32  throw GaudiException( "Invalid GaudiCommon<AlgTool> constructor",
33  "GaudiCommon", StatusCode::FAILURE );
34 }
35 //=============================================================================
36 
37 //=============================================================================
38 // Null tool like constructor for Algorithm
39 // should NEVER be used...
40 //=============================================================================
41 template <>
43  const std::string& /* name */ ,
44  const IInterface* /* parent */ )
45  : base_class ( "ERROR", nullptr )
46 {
47  throw GaudiException( "Invalid GaudiCommon<Algorithm> constructor",
48  "GaudiCommon", StatusCode::FAILURE );
49 }
50 //=============================================================================
51 
52 //=============================================================================
53 // Standard algorithm constructor, initializes variables
54 //=============================================================================
55 template <>
57  ISvcLocator * pSvcLocator )
58  : base_class ( name, pSvcLocator )
59 {
61 }
62 //=============================================================================
63 
64 //=============================================================================
65 // Standard tool constructor, initializes variables
66 //=============================================================================
67 template <>
69  const std::string& name ,
70  const IInterface* parnt )
71  : base_class ( type , name , parnt )
72 {
74 }
75 //=============================================================================
76 
77 // ============================================================================
78 // The END
79 // ============================================================================
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:25
void initGaudiCommonConstructor(const IInterface *parent=0)
Constructor initializations.
STL class.
Definition of the basic interface.
Definition: IInterface.h:234
PBASE base_class
Definition: GaudiCommon.h:83
GaudiCommon()=delete