Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-21 10:00:32

0001 /***********************************************************************************\
0002 * (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations *
0003 *                                                                                   *
0004 * This software is distributed under the terms of the Apache version 2 licence,     *
0005 * copied verbatim in the file "LICENSE".                                            *
0006 *                                                                                   *
0007 * In applying this licence, CERN does not waive the privileges and immunities       *
0008 * granted to it by virtue of its status as an Intergovernmental Organization        *
0009 * or submit itself to any jurisdiction.                                             *
0010 \***********************************************************************************/
0011 #ifndef GAUDIKERNEL_IRNDMENGINE_H
0012 #define GAUDIKERNEL_IRNDMENGINE_H
0013 
0014 // STL include files
0015 #include <vector>
0016 
0017 // Framework include files
0018 #include "GaudiKernel/IInterface.h"
0019 
0020 /** @class IRndmEngine IRndmEngine.h GaudiKernel/IRndmEngine.h
0021 
0022     Definition of a interface for a generic random number generator
0023     giving randomly distributed numbers in the range [0...1]
0024     number generators.
0025 
0026     @author  M.Frank
0027     @version 1.0
0028 */
0029 class GAUDI_API IRndmEngine : virtual public IInterface {
0030 public:
0031   /// InterfaceID
0032   DeclareInterfaceID( IRndmEngine, 2, 0 );
0033   /// Single shot returning single random number
0034   virtual double rndm() const = 0;
0035   /** Multiple shots returning vector with flat random numbers.
0036       @param  array    Array containing random numbers
0037       @param  howmany  fill 'howmany' random numbers into array
0038       @param  start    ... starting at position start
0039       @return StatusCode indicating failure or success.
0040   */
0041   virtual StatusCode rndmArray( std::vector<double>& array, long howmany, long start = 0 ) const = 0;
0042   /// Allow to set new seeds
0043   virtual StatusCode setSeeds( const std::vector<long>& seeds ) = 0;
0044   /// Allow to retrieve seeds
0045   virtual StatusCode seeds( std::vector<long>& seeds ) const = 0;
0046 };
0047 
0048 #endif // GAUDI_INTERFACES_IRNDMENGINE_H