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
 
struct  EvtLibParticle
 
class  EvtLibPXSec
 
struct  EvtLibRecord
 
class  IEvtLibRecordList
 
struct  Key
 
class  OnDemandRecordList
 
class  RecordLoader
 Helper for SimpleRecordList and OnDemandRecordList. More...
 
class  SimpleRecordList
 

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.

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
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
p
Definition: test.py:223
static QCString * s
Definition: config.cpp:1042

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.