Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
genie::flux::GFluxExposureI Class Referenceabstract

GENIE interface for uniform flux exposure iterface. More...

#include "/cvmfs/nova.opensciencegrid.org/externals/genie/v3_00_06_p01/Linux64bit+2.6-2.12-e17-debug/GENIE-Generator/src/Tools/Flux/GFluxExposureI.h"

Inheritance diagram for genie::flux::GFluxExposureI:
genie::flux::GDk2NuFlux genie::flux::GDk2NuFlux genie::flux::GNuMIFlux genie::flux::GSimpleNtpFlux

Public Member Functions

 GFluxExposureI (genie::flux::Exposure_t etype)
 
virtual ~GFluxExposureI ()
 
const char * GetExposureUnits () const
 what units are returned by GetTotalExposure? More...
 
genie::flux::Exposure_t GetExposureType () const
 
virtual double GetTotalExposure () const =0
 
virtual long int NFluxNeutrinos () const =0
 

of rays generated

More...
 

Static Public Member Functions

static const char * AsString (genie::flux::Exposure_t etype)
 
static genie::flux::Exposure_t StringToEnum (const char *chars, int maxChar=0)
 

Private Attributes

genie::flux::Exposure_t fEType
 

Detailed Description

GENIE interface for uniform flux exposure iterface.

Unified flux exposure interface to be used by flux drivers that can support such.

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

2015-03-17 initial version

Version
Id

Definition at line 32 of file GFluxExposureI.h.

Constructor & Destructor Documentation

genie::flux::GFluxExposureI::GFluxExposureI ( genie::flux::Exposure_t  etype)

Definition at line 51 of file GFluxExposureI.cxx.

References fEType.

52  { fEType = etype; }
genie::flux::Exposure_t fEType
genie::flux::GFluxExposureI::~GFluxExposureI ( )
virtual

Definition at line 54 of file GFluxExposureI.cxx.

54 { ; }

Member Function Documentation

const char * genie::flux::GFluxExposureI::AsString ( genie::flux::Exposure_t  etype)
static

Definition at line 20 of file GFluxExposureI.cxx.

References genie::flux::kPOTs, genie::flux::kSeconds, and genie::flux::kUnknown.

Referenced by GetExposureUnits().

21  {
22  switch (etype) {
23  case kUnknown: return "UnknownExposureUnits"; break;
24  case kPOTs: return "POT"; break;
25  case kSeconds: return "Seconds"; break;
26  default: return "?UnknownExposureUnits?"; break;
27  }
28  }
genie::flux::Exposure_t genie::flux::GFluxExposureI::GetExposureType ( ) const

Definition at line 56 of file GFluxExposureI.cxx.

References fEType.

57  { return fEType; }
genie::flux::Exposure_t fEType
const char * genie::flux::GFluxExposureI::GetExposureUnits ( ) const

what units are returned by GetTotalExposure?

Definition at line 59 of file GFluxExposureI.cxx.

References AsString(), and fEType.

Referenced by main().

static const char * AsString(genie::flux::Exposure_t etype)
genie::flux::Exposure_t fEType
virtual double genie::flux::GFluxExposureI::GetTotalExposure ( ) const
pure virtual
virtual long int genie::flux::GFluxExposureI::NFluxNeutrinos ( ) const
pure virtual
genie::flux::Exposure_t genie::flux::GFluxExposureI::StringToEnum ( const char *  chars,
int  maxChar = 0 
)
static

Definition at line 31 of file GFluxExposureI.cxx.

References MECModelEnuComparisons::i, genie::flux::kPOTs, genie::flux::kSeconds, and genie::flux::kUnknown.

32  {
33  int len = strlen(chars);
34  if (maxChar == 0 ) maxChar = len;
35  if (maxChar > len) maxChar = len;
36  if (maxChar <= 0 ) return genie::flux::kUnknown;
37 
38  char* lowchars = new char [maxChar];
39  for (int i=0; i<maxChar; ++i) lowchars[i] = tolower(chars[i]);
40 
42  if ( 0 == strncmp(lowchars,"pot",TMath::Min(maxChar,3))) {
43  etype = genie::flux::kPOTs;
44  } else if ( 0 == strncmp(lowchars,"sec",TMath::Min(maxChar,3))) {
45  etype = genie::flux::kSeconds;
46  }
47  delete [] lowchars;
48  return etype;
49  }
const XML_Char int len
Definition: expat.h:262
enum genie::flux::EExposure Exposure_t

Member Data Documentation

genie::flux::Exposure_t genie::flux::GFluxExposureI::fEType
private

Definition at line 57 of file GFluxExposureI.h.

Referenced by GetExposureType(), GetExposureUnits(), and GFluxExposureI().


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