// @(#)root/unuran:$Id: UnuranRng.h 20882 2007-11-19 11:31:26Z rdm $ // Author: L. Moneta Wed Sep 27 11:22:34 2006 /********************************************************************** * * * Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT * * * * * **********************************************************************/ // Header file for class UnuranRng #ifndef ROOT_UnuranRng #define ROOT_UnuranRng /** UnuranRng class for interface ROOT random generators to Unuran */ template struct UnuranRng { public: /// funciton to delete object (not needed) static void Delete(void * /* p */ ) { // Random * r = reinterpret_cast (p); // delete r; } /// function to set the seed in the random static void Seed(void * p, unsigned long seed) { Random * r = reinterpret_cast (p); r->SetSeed(seed); } /// function to sample random generator static double Rndm(void * p) { Random * r = reinterpret_cast (p); return r->Rndm(); } }; #endif /* ROOT_UnuranRng */