| # Gaudi Framework, version v21r7 |

Home |  | Generated: 22 Jan 2010

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

Inheritance diagram for HepRndm::Generator< Rndm::DefinedPdf >:

[legend]
Collaboration diagram for HepRndm::Generator< Rndm::DefinedPdf >:

[legend]

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 324 of file HepRndmGenerators.cpp.

## Constructor & Destructor Documentation

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

Standard Constructor.

Definition at line 330 of file HepRndmGenerators.cpp.

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

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

Standard Destructor.

Definition at line 334 of file HepRndmGenerators.cpp.

    00334                          {
    00335     }

## Member Function Documentation

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

Initialize the generator.

Reimplemented from RndmGen.

Definition at line 337 of file HepRndmGenerators.cpp.

    00337                                                               {
    00338       StatusCode status = RndmGen::initialize(par);
    00339       if ( status.isSuccess() )   {
    00340         try   {
    00341           Rndm::DefinedPdf* specs = dynamic_cast<Rndm::DefinedPdf*>(m_params);
    00342           if ( 0 != specs )  {
    00343             m_generator = new RandGeneral( &specs->pdf()[0],
    00344                                            specs->pdf().size(),
    00345                                            specs->interpolation());
    00346             BaseEngine* engine = dynamic_cast<BaseEngine*>(m_engine);
    00347             if ( 0 != engine )    {
    00348               m_hepEngine = engine->hepEngine();
    00349               if ( 0 != m_hepEngine )   {
    00350                 return StatusCode::SUCCESS;
    00351               }
    00352             }
    00353           }
    00354         }
    00355         catch (...)   {
    00356         }
    00357       }
    00358       return StatusCode::FAILURE;
    00359     }

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

Finalize the generator.

Reimplemented from RndmGen.

Definition at line 361 of file HepRndmGenerators.cpp.

    00361                                     {
    00362       if ( m_generator ) delete m_generator;
    00363       m_generator = 0;
    00364       return RndmGen::finalize();
    00365     }

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

Single shot.

Reimplemented from RndmGen.

Definition at line 367 of file HepRndmGenerators.cpp.

    00367                                     {
    00368       return m_generator->shoot(m_hepEngine);
    00369     }

## Member Data Documentation

RandGeneral* HepRndm::Generator< Rndm::DefinedPdf >::m_generator`[protected]`

Definition at line 326 of file HepRndmGenerators.cpp.

HepRandomEngine* HepRndm::Generator< Rndm::DefinedPdf >::m_hepEngine`[protected]`

Definition at line 327 of file HepRndmGenerators.cpp.

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

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