GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Functions | Variables
genie::evtlib Namespace Reference

Classes

class  EventLibraryInterface
 Reads pre-generated events produced by an external generator. On an event-by-event basis, it can accept GENIE input specifying the neutrino and target IDs and neutrino energy and, therefore, it can re-use the upstream GENIE flux and geometry tools. More...
 
class  EvtLibInteractionListGenerator
 
class  EvtLibPXSec
 
struct  EvtLibParticle
 
struct  EvtLibRecord
 
class  IEvtLibRecordList
 
class  RecordLoader
 Helper for. More...
 
class  SimpleRecordList
 
class  OnDemandRecordList
 
struct  Key
 

Functions

void Expand (std::string &s)
 Expand env vars/homedirs/wildcards in s. More...
 

Variables

const int kEvtLibMaxParts = 1024
 Maximum number of particles supported in a single library event record. More...
 

Function Documentation

void genie::evtlib::Expand ( std::string &  s)

Expand env vars/homedirs/wildcards in s.

It is a fatal error if there is not exactly one result of the expansion

Definition at line 8 of file Utils.cxx.

References LOG, and pFATAL.

Referenced by genie::GHepVirtualList::GHepVirtualList(), genie::evtlib::EventLibraryInterface::LoadRecords(), and genie::evtlib::EvtLibPXSec::LoadXSecs().

9 {
10  wordexp_t p;
11  const int status = wordexp(s.c_str(), &p, WRDE_SHOWERR | WRDE_UNDEF);
12  if(status != 0){
13  LOG("EvtLib", pFATAL) << "String '" << s
14  << "' returned error " << status << " from wordexp().";
15  exit(1);
16  }
17 
18  if(p.we_wordc == 0){
19  LOG("EvtLib", pFATAL) << "String '" << s
20  << "' didn't expand to anything.";
21  exit(1);
22  }
23 
24  if(p.we_wordc > 1){
25  LOG("EvtLib", pFATAL) << "String '" << s
26  << "' expanded to " << p.we_wordc << " locations.";
27  exit(1);
28  }
29 
30  s = p.we_wordv[0];
31 
32  wordfree(&p);
33 }
#define pFATAL
Definition: Messenger.h:56
static constexpr double s
Definition: Units.h:95
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96

Variable Documentation

const int genie::evtlib::kEvtLibMaxParts = 1024

Maximum number of particles supported in a single library event record.

Definition at line 48 of file EvtLibRecordList.h.

Referenced by genie::evtlib::RecordLoader::GetRecord().