| # Gaudi Framework, version v22r0 |

Home |  | Generated: 9 Feb 2011

# HepRndm::Generator< Rndm::DefinedPdf > Class Template Reference

List of all members.

## 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.
## Protected Attributes
RandGeneral * | m_generator
HepRandomEngine * | m_hepEngine

## 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.

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

virtual HepRndm::Generator< Rndm::DefinedPdf >::~Generator | ( |  | ) | `[inline, virtual]`

Standard Destructor.

Definition at line 349 of file HepRndmGenerators.cpp.

    00349                          {
    00350     }

## Member Function Documentation

virtual StatusCode HepRndm::Generator< Rndm::DefinedPdf >::finalize | ( |  | ) | `[inline, virtual]`

Finalize the generator.

Definition at line 376 of file HepRndmGenerators.cpp.

    00376                                     {
    00377       if ( m_generator ) delete m_generator;
    00378       m_generator = 0;
    00379       return RndmGen::finalize();
    00380     }

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

Initialize the generator.

Definition at line 352 of file HepRndmGenerators.cpp.

    00352                                                               {
    00353       StatusCode status = RndmGen::initialize(par);
    00354       if ( status.isSuccess() )   {
    00355         try   {
    00356           Rndm::DefinedPdf* specs = dynamic_cast<Rndm::DefinedPdf*>(m_params);
    00357           if ( 0 != specs )  {
    00358             m_generator = new RandGeneral( &specs->pdf()[0],
    00359                                            specs->pdf().size(),
    00360                                            specs->interpolation());
    00361             BaseEngine* engine = dynamic_cast<BaseEngine*>(m_engine);
    00362             if ( 0 != engine )    {
    00363               m_hepEngine = engine->hepEngine();
    00364               if ( 0 != m_hepEngine )   {
    00365                 return StatusCode::SUCCESS;
    00366               }
    00367             }
    00368           }
    00369         }
    00370         catch (...)   {
    00371         }
    00372       }
    00373       return StatusCode::FAILURE;
    00374     }

virtual double HepRndm::Generator< Rndm::DefinedPdf >::shoot | ( |  | ) | const`[inline, virtual]`

Single shot.

Definition at line 382 of file HepRndmGenerators.cpp.

    00382                                     {
    00383       return m_generator->shoot(m_hepEngine);
    00384     }

## 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_v22r0/GaudiSvc/src/RndmGenSvc/HepRndmGenerators.cpp

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines