The Gaudi Framework  v33r0 (d5ea422b)
IRndmGen.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2019 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 #ifndef GAUDIKERNEL_IRNDMGEN_H
12 #define GAUDIKERNEL_IRNDMGEN_H
13 
14 // STL include files
15 #include <string>
16 #include <vector>
17 
18 // Framework include files
19 #include "GaudiKernel/IInterface.h"
20 
21 // Declaration of the interface ID ( interface id, major version, minor version)
22 static const InterfaceID IID_IRndmBit( 150, 1, 0 );
23 static const InterfaceID IID_IRndmFlat( 151, 1, 0 );
24 static const InterfaceID IID_IRndmChi2( 152, 1, 0 );
25 static const InterfaceID IID_IRndmGamma( 153, 1, 0 );
26 static const InterfaceID IID_IRndmGauss( 154, 1, 0 );
27 static const InterfaceID IID_IRndmLandau( 155, 1, 0 );
28 static const InterfaceID IID_IRndmPoisson( 156, 1, 0 );
29 static const InterfaceID IID_IRndmStudentT( 157, 1, 0 );
30 static const InterfaceID IID_IRndmBinomial( 158, 1, 0 );
31 static const InterfaceID IID_IRndmExponential( 159, 1, 0 );
32 static const InterfaceID IID_IRndmBreitWigner( 160, 1, 0 );
33 static const InterfaceID IID_IRndmBreitWignerCutOff( 161, 1, 0 );
34 static const InterfaceID IID_IRndmDefinedPdf( 162, 1, 0 );
35 static const InterfaceID IID_IRndmGaussianTail( 163, 1, 0 );
36 
44 class GAUDI_API IRndmGen : virtual public IInterface {
45 public:
48 
49  class Param {
50  protected:
53 
54  public:
56  Param( const InterfaceID& type = IID_IRndmFlat ) : m_type( type ) {}
58  virtual ~Param() = default;
60  virtual const InterfaceID& type() const { return m_type; }
62  virtual Param* clone() const = 0;
63  };
64 
66  virtual StatusCode initialize( const IRndmGen::Param& par ) = 0;
68  virtual StatusCode finalize() = 0;
70  virtual const InterfaceID& type() const = 0;
72  virtual long ID() const = 0;
74  virtual const IRndmGen::Param* parameters() const = 0;
76  virtual double shoot() const = 0;
83  virtual StatusCode shootArray( std::vector<double>& array, long howmany, long start = 0 ) const = 0;
84 
86  virtual ~IRndmGen() = default;
87 };
88 
89 #endif // GAUDIKERNEL_IRNDMGEN_H
virtual const InterfaceID & type() const
Parameter's type.
Definition: IRndmGen.h:60
Definition of a interface for a generic random number generators.
Definition: IRndmGen.h:44
def start
Definition: IOTest.py:108
Interface ID class.
Definition: IInterface.h:39
const InterfaceID m_type
Type of the generator.
Definition: IRndmGen.h:52
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:61
Definition of the basic interface.
Definition: IInterface.h:254
#define DeclareInterfaceID(iface, major, minor)
Macro to declare the interface ID when using the new mechanism of extending and implementing interfac...
Definition: IInterface.h:23
struct GAUDI_API array
Parametrisation class for redirection array - like implementation.
Param(const InterfaceID &type=IID_IRndmFlat)
Standard constructor.
Definition: IRndmGen.h:56
#define GAUDI_API
Definition: Kernel.h:81