Gaudi Framework, version v25r2

Home   Generated: Wed Jun 4 2014
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RndmGenerators.cpp
Go to the documentation of this file.
1 // $Id: RndmGenerators.cpp,v 1.7 2006/09/13 15:25:15 hmd Exp $
2 #define GAUDI_RNDMGENSVC_RNDMGENGENERATORS_CPP
3 
4 // Framework include files
5 #include "GaudiKernel/SmartIF.h"
6 #include "GaudiKernel/IRndmGen.h"
10 
11 // Standard constructor
13 : m_generator(0)
14 {
15 }
16 
17 // Copy constructor
19 : m_generator(copy.m_generator) {
20  if ( 0 != m_generator ) {
22  }
23 }
24 
25 // Construct and initialize the generator
27 : m_generator(0)
28 {
29  StatusCode status = initialize(svc, par);
30  if (!status.isSuccess()) {
31  throw GaudiException ("Initialization failed !", "Rndm::Numbers", status);
32  }
33 }
34 
35 // Standard destructor
37  finalize().ignore();
38 }
39 
40 // Initialize the generator
42  const IRndmGen::Param& par) {
43  if ( svc.isValid() && 0 == m_generator ) {
46  return const_cast<IRndmGenSvc*>(svc.get())->generator( par, m_generator );
47  }
48  return StatusCode::FAILURE;
49 }
50 
51 // Initialize the generator
53  if ( 0 != m_generator ) {
54  m_generator->finalize().ignore();
55  m_generator->release();
56  m_generator = 0;
57  }
58  return StatusCode::SUCCESS;
59 }
60 
61 #if !defined(GAUDI_V22_API) || defined(G22_NEW_SVCLOCATOR)
62 // Construct and initialize the generator
64 : m_generator(0)
65 {
66  StatusCode status = initialize(svc, par);
67  if (!status.isSuccess()) {
68  throw GaudiException ("Initialization failed !", "Rndm::Numbers", status);
69  }
70 }
71 
72 // Initialize the generator
74  return initialize(SmartIF<IRndmGenSvc>(svc), par);
75 }
76 #endif

Generated at Wed Jun 4 2014 14:48:57 for Gaudi Framework, version v25r2 by Doxygen version 1.8.2 written by Dimitri van Heesch, © 1997-2004