Functions | Variables
loadlibs.C File Reference

Go to the source code of this file.

Functions

gSystem SetDynamicPath (libs.Data())
 
gSystem Load ("libPythia6")
 
gSystem Load ("libPhysics")
 
gSystem Load ("libEG")
 
gSystem Load ("libEGPythia6")
 
gSystem Load ("libGeom")
 
gSystem Load ("libTree")
 
gSystem Load ("libxml2")
 
gSystem Load ("liblog4cpp")
 
TPRegexp re ("-l([\\d\\w]*)")
 
 while (true)
 
gSystem ClosePipe (f)
 

Variables

TString libs = libs0 + ":/usr/lib:/usr/local/lib:/opt/lib:/opt/local/lib"
 
TString command = TString::Format("genie-config --libs")
 
FILE * f = gSystem->OpenPipe(command.Data(),"r")
 

Function Documentation

gSystem ClosePipe ( f  )
gSystem Load ( "libPythia6"  )
gSystem Load ( "libPhysics"  )
gSystem Load ( "libEG"  )
gSystem Load ( "libEGPythia6"  )
gSystem Load ( "libGeom"  )
gSystem Load ( "libTree"  )
gSystem Load ( "libxml2"  )
gSystem Load ( "liblog4cpp"  )
TPRegexp re ( "-l([\\d\\w]*)"  )
gSystem SetDynamicPath ( libs.  Data())
while ( true  )

Definition at line 29 of file loadlibs.C.

29  {
30  TString line;
31  if (!line.Gets(f)) {break;}
32  TObjArray * tokens = line.Tokenize(" ");
33  for (int i = 0 ; i < tokens->GetEntries() ; i++) {
34  TObjString * token_os = static_cast<TObjString*>(tokens->At(i));
35  if (!token_os) {continue;}
36  TObjArray * matches = re.MatchS(token_os->GetString());
37  if (matches->GetEntries()!=2) { continue; }
38  TObjString * libname_os = static_cast<TObjString*>(matches->At(1));
39  if (!libname_os) {continue;}
40  TString full_libname = "lib"+libname_os->GetString();
41  //~ cerr<<full_libname<<endl;
42  gSystem->Load(full_libname.Data());
43  delete matches;
44  }
45  delete tokens;
46  }
size_t i(0)
FILE * f
Definition: loadlibs.C:26
TPRegexp re("-l([\\d\\w]*)")

Variable Documentation

TString command = TString::Format("genie-config --libs")

Definition at line 25 of file loadlibs.C.

FILE* f = gSystem->OpenPipe(command.Data(),"r")

Definition at line 26 of file loadlibs.C.

TString libs = libs0 + ":/usr/lib:/usr/local/lib:/opt/lib:/opt/local/lib"

Definition at line 3 of file loadlibs.C.