Public Member Functions | Public Attributes | Static Public Attributes | Friends | List of all members
genie::flux::GSimpleNtpMeta Class Reference

#include <GSimpleNtpFlux.h>

Inheritance diagram for genie::flux::GSimpleNtpMeta:

Public Member Functions

 GSimpleNtpMeta ()
 
virtual ~GSimpleNtpMeta ()
 
void Reset ()
 
void AddFlavor (Int_t nupdg)
 
void Print (const Option_t *opt="") const
 

Public Attributes

std::vector< Int_t > pdglist
 list of neutrino flavors More...
 
Double_t maxEnergy
 maximum energy More...
 
Double_t minWgt
 minimum weight More...
 
Double_t maxWgt
 maximum weight More...
 
Double_t protons
 represented number of protons-on-target More...
 
Double_t windowBase [3]
 x,y,z position of window base point More...
 
Double_t windowDir1 [3]
 dx,dy,dz of window direction 1 More...
 
Double_t windowDir2 [3]
 dx,dy,dz of window direction 2 More...
 
std::vector< std::stringauxintname
 tagname of aux ints associated w/ entry More...
 
std::vector< std::stringauxdblname
 tagname of aux doubles associated w/ entry More...
 
std::vector< std::stringinfiles
 list of input files More...
 
Int_t seed
 random seed used in generation More...
 
UInt_t metakey
 index key to tie to individual entries More...
 

Static Public Attributes

static UInt_t mxfileprint
 allow user to limit # of files to print More...
 

Friends

ostream & operator<< (ostream &stream, const GSimpleNtpMeta &info)
 

Detailed Description

GSimpleNtpMeta

A small persistable C-struct -like class that holds metadata about the the SimpleNtpFlux ntple.

Definition at line 158 of file GSimpleNtpFlux.h.

Constructor & Destructor Documentation

GSimpleNtpMeta::GSimpleNtpMeta ( )

Definition at line 898 of file GSimpleNtpFlux.cxx.

899  : TObject() //, nflavors(0), flavor(0)
900 {
901  Reset();
902 }
GSimpleNtpMeta::~GSimpleNtpMeta ( )
virtual

Definition at line 904 of file GSimpleNtpFlux.cxx.

905 {
906  Reset();
907 }

Member Function Documentation

void GSimpleNtpMeta::AddFlavor ( Int_t  nupdg)

Definition at line 935 of file GSimpleNtpFlux.cxx.

936 {
937  bool found = false;
938  for (size_t i=0; i < pdglist.size(); ++i)
939  if ( pdglist[i] == nupdg) found = true;
940  if ( ! found ) pdglist.push_back(nupdg);
941 
942  /* // OLD fashion array
943  bool found = false;
944  for (int i=0; i < nflavors; ++i) if ( flavor[i] == nupdg ) found = true;
945  if ( ! found ) {
946  Int_t* old_list = flavor;
947  flavor = new Int_t[nflavors+1];
948  for (int i=0; i < nflavors; ++i) flavor[i] = old_list[i];
949  flavor[nflavors] = nupdg;
950  nflavors++;
951  delete [] old_list;
952  }
953  */
954 }
std::vector< Int_t > pdglist
list of neutrino flavors
void GSimpleNtpMeta::Print ( const Option_t *  opt = "") const

Definition at line 956 of file GSimpleNtpFlux.cxx.

957 {
958  std::cout << *this << std::endl;
959 }
QTextStream & endl(QTextStream &s)
void GSimpleNtpMeta::Reset ( void  )

Definition at line 909 of file GSimpleNtpFlux.cxx.

910 {
911 
912  pdglist.clear();
913  maxEnergy = 0.;
914  minWgt = 0.;
915  maxWgt = 0.;
916  protons = 0.;
917  windowBase[0] = 0.;
918  windowBase[1] = 0.;
919  windowBase[2] = 0.;
920  windowDir1[0] = 0.;
921  windowDir1[1] = 0.;
922  windowDir1[2] = 0.;
923  windowDir2[0] = 0.;
924  windowDir2[1] = 0.;
925  windowDir2[2] = 0.;
926 
927  auxintname.clear();
928  auxdblname.clear();
929  infiles.clear();
930 
931  seed = 0;
932  metakey = 0;
933 }
Double_t maxEnergy
maximum energy
std::vector< std::string > auxintname
tagname of aux ints associated w/ entry
Double_t windowDir1[3]
dx,dy,dz of window direction 1
Double_t protons
represented number of protons-on-target
Int_t seed
random seed used in generation
Double_t windowDir2[3]
dx,dy,dz of window direction 2
std::vector< Int_t > pdglist
list of neutrino flavors
Double_t windowBase[3]
x,y,z position of window base point
Double_t minWgt
minimum weight
std::vector< std::string > infiles
list of input files
Double_t maxWgt
maximum weight
UInt_t metakey
index key to tie to individual entries
std::vector< std::string > auxdblname
tagname of aux doubles associated w/ entry

Friends And Related Function Documentation

ostream& operator<< ( ostream &  stream,
const GSimpleNtpMeta info 
)
friend

Definition at line 1015 of file GSimpleNtpFlux.cxx.

1017  {
1018  size_t nf = meta.pdglist.size();
1019  stream << "\nGSimpleNtpMeta " << nf << " flavors: ";
1020  for (size_t i=0; i<nf; ++i) stream << " " << meta.pdglist[i];
1021 
1022  //stream << "\nGSimpleNtpMeta " << meta.nflavors
1023  // << " flavors: ";
1024  //for (int i=0; i< meta.nflavors; ++i) stream << " " << meta.flavor[i];
1025 
1026  stream << "\n maxEnergy " << meta.maxEnergy
1027  << " min/maxWgt " << meta.minWgt << "/" << meta.maxWgt
1028  << " protons " << meta.protons
1029  << " metakey " << meta.metakey
1030  << "\n windowBase [" << meta.windowBase[0] << ","
1031  << meta.windowBase[1] << "," << meta.windowBase[2] << "]"
1032  << "\n windowDir1 [" << meta.windowDir1[0] << ","
1033  << meta.windowDir1[1] << "," << meta.windowDir1[2] << "]"
1034  << "\n windowDir2 [" << meta.windowDir2[0] << ","
1035  << meta.windowDir2[1] << "," << meta.windowDir2[2] << "]";
1036 
1037  size_t nInt = meta.auxintname.size();
1038  if ( nInt > 0 ) stream << "\n aux ints: ";
1039  for (size_t ijInt=0; ijInt < nInt; ++ijInt)
1040  stream << " " << meta.auxintname[ijInt];
1041 
1042  size_t nDbl = meta.auxdblname.size();
1043  if ( nDbl > 0 ) stream << "\n aux doubles: ";
1044  for (size_t ijDbl=0; ijDbl < nDbl; ++ijDbl)
1045  stream << " " << meta.auxdblname[ijDbl];
1046 
1047  size_t nfiles = meta.infiles.size();
1048  stream << "\n " << nfiles << " input files: ";
1049  UInt_t nprint = TMath::Min(UInt_t(nfiles),
1051  for (UInt_t ifiles=0; ifiles < nprint; ++ifiles)
1052  stream << "\n " << meta.infiles[ifiles];
1053 
1054  stream << "\n input seed: " << meta.seed;
1055 
1056  return stream;
1057  }
static UInt_t mxfileprint
allow user to limit # of files to print

Member Data Documentation

std::vector<std::string> genie::flux::GSimpleNtpMeta::auxdblname

tagname of aux doubles associated w/ entry

Definition at line 183 of file GSimpleNtpFlux.h.

std::vector<std::string> genie::flux::GSimpleNtpMeta::auxintname

tagname of aux ints associated w/ entry

Definition at line 182 of file GSimpleNtpFlux.h.

std::vector<std::string> genie::flux::GSimpleNtpMeta::infiles

list of input files

Definition at line 184 of file GSimpleNtpFlux.h.

Double_t genie::flux::GSimpleNtpMeta::maxEnergy

maximum energy

Definition at line 173 of file GSimpleNtpFlux.h.

Double_t genie::flux::GSimpleNtpMeta::maxWgt

maximum weight

Definition at line 175 of file GSimpleNtpFlux.h.

UInt_t genie::flux::GSimpleNtpMeta::metakey

index key to tie to individual entries

Definition at line 187 of file GSimpleNtpFlux.h.

Double_t genie::flux::GSimpleNtpMeta::minWgt

minimum weight

Definition at line 174 of file GSimpleNtpFlux.h.

UInt_t genie::flux::GSimpleNtpMeta::mxfileprint
static

allow user to limit # of files to print

Definition at line 189 of file GSimpleNtpFlux.h.

std::vector<Int_t> genie::flux::GSimpleNtpMeta::pdglist

list of neutrino flavors

Definition at line 171 of file GSimpleNtpFlux.h.

Double_t genie::flux::GSimpleNtpMeta::protons

represented number of protons-on-target

Definition at line 176 of file GSimpleNtpFlux.h.

Int_t genie::flux::GSimpleNtpMeta::seed

random seed used in generation

Definition at line 186 of file GSimpleNtpFlux.h.

Double_t genie::flux::GSimpleNtpMeta::windowBase[3]

x,y,z position of window base point

Definition at line 178 of file GSimpleNtpFlux.h.

Double_t genie::flux::GSimpleNtpMeta::windowDir1[3]

dx,dy,dz of window direction 1

Definition at line 179 of file GSimpleNtpFlux.h.

Double_t genie::flux::GSimpleNtpMeta::windowDir2[3]

dx,dy,dz of window direction 2

Definition at line 180 of file GSimpleNtpFlux.h.


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