simb::EvtTimeFlat Class Reference

Flat time distribution. More...

#include <EvtTimeFlat.h>

Inheritance diagram for simb::EvtTimeFlat:
simb::EvtTimeDistI

List of all members.

Public Member Functions

 EvtTimeFlat (const std::string &config)
virtual ~EvtTimeFlat ()
virtual void Config (const std::string &config)
virtual double TimeOffset ()
virtual double TimeOffset (std::vector< double > v)
virtual void PrintConfig (bool verbose=true)
 provide a means of printing the configuration
void SetGlobalOffset (double val)
 specific methods for this variant
double GetGlobalOffset () const
void SetDuration (double val)
double GetDuration () const

Private Attributes

double fGlobalOffset
 always displaced by this (in ns)
double fDuration
 duration (in ns)

Detailed Description

Flat time distribution.

Author:
Robert Hatcher <rhatcher fnal.gov> Fermi National Accelerator Laboratory

2015-06-22

Version:
Id
EvtTimeFlat.h,v 1.1 2015/06/30 18:01:24 rhatcher Exp

Definition at line 22 of file EvtTimeFlat.h.


Constructor & Destructor Documentation

simb::EvtTimeFlat::EvtTimeFlat ( const std::string &  config  ) 

Definition at line 20 of file EvtTimeFlat.cxx.

References Config().

00021     : EvtTimeDistI(config)
00022     , fGlobalOffset(0)
00023     , fDuration(6 * 84 * 1e9/53.103e6)
00024   { Config(config); }

simb::EvtTimeFlat::~EvtTimeFlat (  )  [virtual]

Definition at line 26 of file EvtTimeFlat.cxx.

00026 { ; }


Member Function Documentation

void simb::EvtTimeFlat::Config ( const std::string &  config  )  [virtual]

each schema must take a string that configures it it is up to the individual model to parse said string and extract parameters

Implements simb::EvtTimeDistI.

Definition at line 28 of file EvtTimeFlat.cxx.

References PrintConfig().

Referenced by EvtTimeFlat().

00029   {
00030     // parse config string
00031     std::cerr << "!!!!! EvtTimeFlat - not yet up to parsing Config string "
00032               << ", ignoring:"
00033               << std::endl
00034               << "\"" << config << "\""
00035               << std::endl
00036               << "Starting with: "
00037               << std::endl;
00038     PrintConfig();
00039   }

double simb::EvtTimeFlat::GetDuration (  )  const [inline]

Definition at line 51 of file EvtTimeFlat.h.

References fDuration.

00051 { return fDuration; }

double simb::EvtTimeFlat::GetGlobalOffset (  )  const [inline]

Definition at line 49 of file EvtTimeFlat.h.

References fGlobalOffset.

00049 { return fGlobalOffset; }

void simb::EvtTimeFlat::PrintConfig ( bool  verbose = true  )  [virtual]

provide a means of printing the configuration

Implements simb::EvtTimeDistI.

Definition at line 52 of file EvtTimeFlat.cxx.

References fDuration, and fGlobalOffset.

Referenced by Config().

00053   {
00054     std::cout << "EvtTimeFlat config: "
00055               << "  GlobalOffset " << fGlobalOffset << " ns"
00056               << ", Duration " << fDuration << " ns"
00057               << std::endl;
00058   }

void simb::EvtTimeFlat::SetDuration ( double  val  )  [inline]

Definition at line 50 of file EvtTimeFlat.h.

References fDuration.

00050 { fDuration=val; }

void simb::EvtTimeFlat::SetGlobalOffset ( double  val  )  [inline]

specific methods for this variant

Definition at line 48 of file EvtTimeFlat.h.

References fGlobalOffset.

00048 { fGlobalOffset=val; }

double simb::EvtTimeFlat::TimeOffset ( std::vector< double >  v  )  [virtual]

Implements simb::EvtTimeDistI.

Definition at line 46 of file EvtTimeFlat.cxx.

References TimeOffset().

00047   {
00048     // flat ... doesn't need additional parameter so ignore them
00049     return TimeOffset();
00050   }

double simb::EvtTimeFlat::TimeOffset (  )  [virtual]

return time within a 'record' in nanoseconds version taking array might be used for relative batch fractions that vary on a record-by-record basis

Implements simb::EvtTimeDistI.

Definition at line 41 of file EvtTimeFlat.cxx.

References fDuration, and simb::EvtTimeDistI::fRndmGen.

Referenced by TimeOffset().

00042   {
00043     return fRndmGen->Uniform(fDuration);
00044   }


Member Data Documentation

double simb::EvtTimeFlat::fDuration [private]

duration (in ns)

Definition at line 56 of file EvtTimeFlat.h.

Referenced by GetDuration(), PrintConfig(), SetDuration(), and TimeOffset().

always displaced by this (in ns)

Definition at line 55 of file EvtTimeFlat.h.

Referenced by GetGlobalOffset(), PrintConfig(), and SetGlobalOffset().


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

Generated on 16 Apr 2018 for loon by  doxygen 1.6.1