Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
nutools
old
EventGeneratorBase
GENIE
EvtTimeShiftI.cxx
Go to the documentation of this file.
1
////////////////////////////////////////////////////////////////////////
2
/// \file EvtTimeShiftI.cxx
3
/// \brief interface for event time distribution
4
///
5
/// \version $Id: EvtTimeShiftI.cxx,v 1.1 2015/06/30 18:01:24 rhatcher Exp $
6
/// \author Robert Hatcher <rhatcher \at fnal.gov>
7
/// Fermi National Accelerator Laboratory
8
///
9
/// \update 2015-06-22 initial version
10
////////////////////////////////////////////////////////////////////////
11
12
#include "
EvtTimeShiftI.h
"
13
#include "TRandom3.h"
14
15
namespace
evgb
{
16
17
EvtTimeShiftI::EvtTimeShiftI
(
const
std::string
&
config
)
18
: fRndmGen(new TRandom3), fIsOwned(true)
19
{
20
// user should call Config(config) in their constructor
21
}
22
23
EvtTimeShiftI::~EvtTimeShiftI
()
24
{
25
if
(
fIsOwned
)
delete
fRndmGen
;
26
fRndmGen
= 0;
27
}
28
void
EvtTimeShiftI::SetRandomGenerator
(TRandom* gen,
bool
isOwned)
29
{
30
// deal with what we might already have
31
if
(
fIsOwned
) {
delete
fRndmGen
;
fRndmGen
= 0;
fIsOwned
=
false
; }
32
33
fRndmGen
= gen;
34
fIsOwned
= isOwned;
35
}
36
37
}
// namespace evgb
evgb::EvtTimeShiftI::fRndmGen
TRandom * fRndmGen
Definition:
EvtTimeShiftI.h:68
evgb::EvtTimeShiftI::SetRandomGenerator
void SetRandomGenerator(TRandom *gen, bool isOwned)
Definition:
EvtTimeShiftI.cxx:28
string
std::string string
Definition:
nybbler.cc:12
EvtTimeShiftI.h
config
static Config * config
Definition:
config.cpp:1054
evgb::EvtTimeShiftI::fIsOwned
bool fIsOwned
Definition:
EvtTimeShiftI.h:69
evgb::EvtTimeShiftI::~EvtTimeShiftI
virtual ~EvtTimeShiftI()
Definition:
EvtTimeShiftI.cxx:23
evgb::EvtTimeShiftI::EvtTimeShiftI
EvtTimeShiftI(const std::string &config)
Definition:
EvtTimeShiftI.cxx:17
evgb
Physics generators for neutrinos, cosmic rays, and others.
Definition:
CRYHelper.cxx:33
Generated by
1.8.11