GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 <GFluxExposureI.h>

Inheritance diagram for genie::flux::GFluxExposureI:
Inheritance graph
[legend]

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
Created:
2015-03-17
License:
Copyright (c) 2003-2024, The GENIE Collaboration for the full text of the license visit http://copyright.genie-mc.org

Definition at line 37 of file GFluxExposureI.h.

Constructor & Destructor Documentation

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

Definition at line 50 of file GFluxExposureI.cxx.

References fEType.

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

Definition at line 53 of file GFluxExposureI.cxx.

53 { ; }

Member Function Documentation

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

Definition at line 19 of file GFluxExposureI.cxx.

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

Referenced by GetExposureUnits().

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

Definition at line 55 of file GFluxExposureI.cxx.

References fEType.

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

what units are returned by GetTotalExposure?

Definition at line 58 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

Implemented in genie::flux::GNuMIFlux, and genie::flux::GSimpleNtpFlux.

Referenced by main().

virtual long int genie::flux::GFluxExposureI::NFluxNeutrinos ( ) const
pure virtual

of rays generated

Implemented in genie::flux::GNuMIFlux, and genie::flux::GSimpleNtpFlux.

Referenced by main().

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

Definition at line 30 of file GFluxExposureI.cxx.

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

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

Member Data Documentation

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

Definition at line 62 of file GFluxExposureI.h.

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


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