| # Gaudi Framework, version v25r0 |

Home |  | Generated: Mon Feb 17 2014

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
HepRndm::Generator< Rndm::DefinedPdf > Class Template Reference
Inheritance diagram for HepRndm::Generator< Rndm::DefinedPdf >:
[legend]
Collaboration diagram for HepRndm::Generator< Rndm::DefinedPdf >:
[legend]

## Public Member Functions
| Generator (IInterface *engine)
| Standard Constructor.
virtual | ~Generator ()
| Standard Destructor.
virtual StatusCode | initialize (const IRndmGen::Param &par)
| Initialize the generator.
virtual StatusCode | finalize ()
| Finalize the generator.
virtual double | shoot () const
| Single shot.
Public Member Functions inherited from RndmGen
virtual const InterfaceID & | type () const
| Random number generator type.
virtual long | ID () const
| Random number generator ID.
virtual const IRndmGen::Param * | parameters () const
| Access to random number generator parameters.
virtual StatusCode | shootArray (std::vector< double > &array, long howmany, long start) const
| Multiple shots returning vector with random number according to specified distribution.

## Protected Attributes
RandGeneral * | m_generator
HepRandomEngine * | m_hepEngine
Protected Attributes inherited from RndmGen
IRndmGen::Param * | m_params
| Generation parameters.
IRndmEngine * | m_engine
| Hosting service: Access must always be possible.

## Additional Inherited Members
Public Types inherited from implements1< IRndmGen >
typedef implements1 | base_class
| Typedef to this class.
typedef extend_interfaces1 < IRndmGen > | extend_interfaces_base
| Typedef to the base of this class.
typedef extend_interfaces_base::ext_iids | interfaces
| MPL set of all the implemented interfaces.
Static Public Member Functions inherited from IInterface
static const InterfaceID & | interfaceID ()
| Return an instance of InterfaceID identifying the interface.
Protected Member Functions inherited from RndmGen
| RndmGen (IInterface *engine)
| Standard Constructor.
virtual | ~RndmGen ()
| Standard Destructor.

## Detailed Description

### template<>
class HepRndm::Generator< Rndm::DefinedPdf >

Definition at line 339 of file HepRndmGenerators.cpp.

## Constructor & Destructor Documentation

HepRndm::Generator< Rndm::DefinedPdf >::Generator | ( | IInterface * | engine | ) |
| inline

Standard Constructor.

Definition at line 345 of file HepRndmGenerators.cpp.

: RndmGen (engine), m_generator(0), m_hepEngine(0) {
}

virtual HepRndm::Generator< Rndm::DefinedPdf >::~Generator | ( |  | ) |
| inline virtual

Standard Destructor.

Definition at line 349 of file HepRndmGenerators.cpp.

{
}

## Member Function Documentation

virtual StatusCode HepRndm::Generator< Rndm::DefinedPdf >::finalize | ( |  | ) |
| inline virtual

Finalize the generator.

Reimplemented from RndmGen.

Definition at line 376 of file HepRndmGenerators.cpp.

{
if ( m_generator ) delete m_generator;
m_generator = 0;
return RndmGen::finalize();
}

virtual StatusCode HepRndm::Generator< Rndm::DefinedPdf >::initialize | ( | const IRndmGen::Param & | par | ) |
| inline virtual

Initialize the generator.

Reimplemented from RndmGen.

Definition at line 352 of file HepRndmGenerators.cpp.

{
StatusCode status = RndmGen::initialize(par);
if ( status.isSuccess() ) {
try {
Rndm::DefinedPdf* specs = dynamic_cast<Rndm::DefinedPdf*>(m_params);
if ( 0 != specs ) {
m_generator = new RandGeneral( &specs->pdf()[0],
specs->pdf().size(),
specs->interpolation());
BaseEngine* engine = dynamic_cast<BaseEngine*>(m_engine);
if ( 0 != engine ) {
m_hepEngine = engine->hepEngine();
if ( 0 != m_hepEngine ) {
return StatusCode::SUCCESS;
}
}
}
}
catch (...) {
}
}
return StatusCode::FAILURE;
}

virtual double HepRndm::Generator< Rndm::DefinedPdf >::shoot | ( |  | ) | const
| inline virtual

Single shot.

Reimplemented from RndmGen.

Definition at line 382 of file HepRndmGenerators.cpp.

{
return m_generator->shoot(m_hepEngine);
}

## Member Data Documentation

RandGeneral* HepRndm::Generator< Rndm::DefinedPdf >::m_generator
| protected

Definition at line 341 of file HepRndmGenerators.cpp.

HepRandomEngine* HepRndm::Generator< Rndm::DefinedPdf >::m_hepEngine
| protected

Definition at line 342 of file HepRndmGenerators.cpp.

The documentation for this class was generated from the following file:

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v25r0/GaudiSvc/src/RndmGenSvc/HepRndmGenerators.cpp