Public Member Functions | Protected Attributes | List of all members
genie::supernova::RandomSampler Class Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-12-03/GenieSNova/src/Sampler.h"

Public Member Functions

 RandomSampler ()
 
 ~RandomSampler ()
 
void Init (TH1 *hist)
 
double GenerateNext ()
 

Protected Attributes

TH1 * fHist
 

Detailed Description

Definition at line 10 of file Sampler.h.

Constructor & Destructor Documentation

RandomSampler::RandomSampler ( )

Definition at line 12 of file Sampler.cxx.

12 : fHist(0) {}
RandomSampler::~RandomSampler ( )

Definition at line 16 of file Sampler.cxx.

16 {}

Member Function Documentation

double RandomSampler::GenerateNext ( void  )

Definition at line 31 of file Sampler.cxx.

References fHist, LOG, and pDEBUG.

32 {
33  LOG("Sampler", pDEBUG) << "get random from hist=" << fHist
34  << "(name=" << fHist->GetName()
35  << "), int=" << fHist->Integral();
36 
37  return fHist->GetRandom();
38 }
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:97
#define pDEBUG
Definition: Messenger.h:64
void RandomSampler::Init ( TH1 *  hist)

Definition at line 20 of file Sampler.cxx.

References fHist, LOG, and pDEBUG.

21 {
22  fHist = (TH1*)hist->Clone();
23  fHist->SetDirectory(0);
24 
25  LOG("Sampler", pDEBUG) << "init from hist \"" << fHist->GetName()
26  << "\", int=" << fHist->Integral();
27 }
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:97
#define pDEBUG
Definition: Messenger.h:64

Member Data Documentation

TH1* genie::supernova::RandomSampler::fHist
protected

Definition at line 19 of file Sampler.h.

Referenced by GenerateNext(), and Init().


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