The Gaudi Framework  master (b9786168)
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
15#include <GaudiKernel/SmartIF.h>
16#include <string>
17#include <vector>
18
19class IRndmGen;
20class StreamBuffer;
21class IRndmEngine;
22class IRndmGenFactory;
23
40class GAUDI_API IRndmGenSvc : virtual public IService {
41public:
47 virtual IRndmEngine* engine() = 0;
48
53 virtual StatusCode generator( const IRndmGen::Param& par, IRndmGen*& refpGen ) = 0;
54
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};
#define GAUDI_API
Definition Kernel.h:49
virtual unsigned long release() const =0
Release Interface instance.
Definition of a interface for a generic random number generator giving randomly distributed numbers i...
Definition IRndmEngine.h:25
Definition of a interface for a generic random number generators.
Definition IRndmGen.h:40
Random Generator service interface definition Definition of a interface for a service to access rando...
Definition IRndmGenSvc.h:40
SmartIF< IRndmGen > generator(const IRndmGen::Param &par)
Definition IRndmGenSvc.h:55
virtual StatusCode generator(const IRndmGen::Param &par, IRndmGen *&refpGen)=0
Add a Generator factory.
virtual IRndmEngine * engine()=0
Retrieve engine.
DeclareInterfaceID(IRndmGenSvc, 2, 1)
InterfaceID.
General service interface definition.
Definition IService.h:26
Small smart pointer class with automatic reference counting for IInterface.
Definition SmartIF.h:28
This class is used for returning status codes from appropriate routines.
Definition StatusCode.h:64
The stream buffer is a small object collecting object data.