25#include <AIDA/IHistogram1D.h>
26using AIDA::IHistogram1D;
47 if ( cmd.find(
"genconf" ) != std::string::npos )
return;
49 std::cout <<
"Destructor Called for " <<
name() << std::endl;
56 if ( !status )
return status;
66 std::vector<double> numbers;
67 gen->shootArray( numbers, 5000 ).ignore();
69 for (
unsigned int i = 0; i < numbers.size(); i++ ) his->fill( numbers[i], 1.0 );
71 for (
int j = 0; j < 5000; j++ ) his->fill( gen->shoot(), 1.0 );
80 for (
long j = 0; j < 5000; j++ ) his->fill( exponential(), 1.0 );
90 if ( !status.
isSuccess() ) {
return status; }
97 for (
long j = 0; j < 5000; j++ ) hispoisson->fill(
m_numbers(), 1.0 );
103 if ( gaussiantail ) {
105 for (
long j = 0; j < 50009; j++ ) his->fill( gaussiantail(), 1.0 );
127 static int count = 0;
134 auto scale = []( uint32_t x, uint32_t size ) {
135 const uint32_t denom = boost::integer_traits<uint32_t>::const_max / size;
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
#define DECLARE_COMPONENT(type)
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
SmartIF< IHistogramSvc > & histoSvc() const
The standard histogram service.
Algorithm(std::string name, ISvcLocator *svcloc, std::string version=PACKAGE_VERSION)
Constructor.
StatusCode initialize() override
the default (empty) implementation of IStateful::initialize() method
SmartIF< IRndmGenSvc > & randSvc() const
The standard RandomGen service, Return a pointer to the service if present.
const std::string & name() const override
The identifying name of the algorithm object.
SmartIF< INTupleSvc > & ntupleSvc() const
The standard N tuple service.
virtual AIDA::IHistogram1D * book(const std::string &fullPath, const std::string &title, int binsX, double lowX, double highX)=0
Book histogram and register it with the histogram data store.
virtual NTuple::Tuple * book(const std::string &fullPath, const CLID &type, const std::string &title)=0
Book Ntuple and register it with the data store.
virtual StatusCode generator(const IRndmGen::Param &par, IRndmGen *&refpGen)=0
Add a Generator factory.
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
A small algorithm class using the random number service.
NTuple::Item< float > m_exponential
Rndm::Numbers m_numbers
Allocate wrapper for random number generator.
~RandomNumberAlg() override
Standard Destructor.
StatusCode finalize() override
Customized finalisation.
NTuple::Item< float > m_poisson
uint32_t m_initial
Initial seed to fill deterministic random numbers.
StatusCode initialize() override
Customized initialisation.
NTuple::Item< float > m_gauss
NTuple::Item< int > m_int
N-tuple items.
RandomNumberAlg(const std::string &name, ISvcLocator *pSvcLocator)
Constructor: A constructor of this form must be provided.
NTuple::Item< uint32_t > m_deter
StatusCode execute() override
Event callback.
NTuple::Tuple * m_ntuple
Pointer to N-tuple.
Parameters for the Gauss random number generation.
Parameters for the Gauss random number generation.
Parameters for the Gaussian tail number generation.
Random number accessor This small class encapsulates the use of the random number generator.
Parameters for the Poisson distributed random number generation with a given mean.
This class is used for returning status codes from appropriate routines.
constexpr static const auto SUCCESS
constexpr static const auto FAILURE
GAUDI_API const std::vector< std::string > cmdLineArgs()
Command line arguments including executable name as arg[0] as vector of strings.