The Gaudi Framework
master (bdbe7744)
Toggle main menu visibility
Loading...
Searching...
No Matches
IRndmGenSvc.h
Go to the documentation of this file.
1
/***********************************************************************************\
2
* (c) Copyright 1998-2025 CERN for the benefit of the LHCb and ATLAS collaborations *
3
* *
4
* This software is distributed under the terms of the Apache version 2 licence, *
5
* copied verbatim in the file "LICENSE". *
6
* *
7
* In applying this licence, CERN does not waive the privileges and immunities *
8
* granted to it by virtue of its status as an Intergovernmental Organization *
9
* or submit itself to any jurisdiction. *
10
\***********************************************************************************/
11
#pragma once
12
13
#include <
GaudiKernel/IRndmGen.h
>
14
#include <
GaudiKernel/IService.h
>
15
#include <
GaudiKernel/SmartIF.h
>
16
#include <string>
17
#include <vector>
18
19
class
IRndmGen
;
20
class
StreamBuffer
;
21
class
IRndmEngine
;
22
class
IRndmGenFactory;
23
40
class
GAUDI_API
IRndmGenSvc
:
virtual
public
IService
{
41
public
:
43
DeclareInterfaceID
(
IRndmGenSvc
, 2, 1 );
47
virtual
IRndmEngine
*
engine
() = 0;
48
53
virtual
StatusCode
generator
(
const
IRndmGen::Param
& par,
IRndmGen
*& refpGen ) = 0;
54
55
SmartIF<IRndmGen>
generator
(
const
IRndmGen::Param
& par ) {
56
IRndmGen
* gen =
nullptr
;
57
;
58
generator
( par, gen ).ignore();
59
auto
r =
SmartIF<IRndmGen>
{ gen };
60
if
( gen ) { gen->
release
(); }
61
return
r;
62
}
63
};
IRndmGen.h
IService.h
GAUDI_API
#define GAUDI_API
Definition
Kernel.h:49
SmartIF.h
IInterface::release
virtual unsigned long release() const =0
Release Interface instance.
IRndmEngine
Definition of a interface for a generic random number generator giving randomly distributed numbers i...
Definition
IRndmEngine.h:25
IRndmGen::Param
Definition
IRndmGen.h:45
IRndmGen
Definition of a interface for a generic random number generators.
Definition
IRndmGen.h:40
IRndmGenSvc
Random Generator service interface definition Definition of a interface for a service to access rando...
Definition
IRndmGenSvc.h:40
IRndmGenSvc::generator
SmartIF< IRndmGen > generator(const IRndmGen::Param &par)
Definition
IRndmGenSvc.h:55
IRndmGenSvc::generator
virtual StatusCode generator(const IRndmGen::Param &par, IRndmGen *&refpGen)=0
Add a Generator factory.
IRndmGenSvc::engine
virtual IRndmEngine * engine()=0
Retrieve engine.
IRndmGenSvc::DeclareInterfaceID
DeclareInterfaceID(IRndmGenSvc, 2, 1)
InterfaceID.
IService
General service interface definition.
Definition
IService.h:26
SmartIF
Small smart pointer class with automatic reference counting for IInterface.
Definition
SmartIF.h:28
StatusCode
This class is used for returning status codes from appropriate routines.
Definition
StatusCode.h:64
StreamBuffer
The stream buffer is a small object collecting object data.
Definition
StreamBuffer.h:48
GaudiKernel
include
GaudiKernel
IRndmGenSvc.h
Generated on
for The Gaudi Framework by
1.17.0