// Silly macro that loads the libraries related // to the specific software release that is being // used // The macro returns 0 if successful (files exist), // a number otherwise. /* options commonly used: EngineeringModel-v6r070329p17 BeamtestRelease-v2r0903p0 BeamtestRelease-v3r0907p2 */ Int_t LoadLibraries(char* softrelease="") { TString MainPath2Software = "/nfs/farm/g/glast/u09/builds/rh9_gcc32opt/"; TString ThisSoftRelease(softrelease); // Check softrelease specified. If null use the default one // BeamtestRelease-v3r0907p2 if(ThisSoftRelease.IsNull()) { cout << endl << "WARNING" << endl << "No softrelease was specified as argument of this macro" << endl << "The default softrelease version will be used." << endl << "Default softrelease version: BeamtestRelease-v3r0907p0" << endl << endl; ThisSoftRelease = "BeamtestRelease-v3r0907p2"; } TString SoftType(ThisSoftRelease); SoftType.Remove(ThisSoftRelease.Index("-v",2,0)); MainPath2Software+= SoftType; MainPath2Software+= "/"; MainPath2Software+= ThisSoftRelease; MainPath2Software+= "/lib/"; cout << "GLAST libraries loaded from: " << endl << MainPath2Software << endl; TString libcommonRootData(MainPath2Software); libcommonRootData += "libcommonRootData.so"; TString libmcRootData(MainPath2Software); libmcRootData += "libmcRootData.so"; TString libdigiRootData(MainPath2Software); libdigiRootData += "libdigiRootData.so"; TString libreconRootData (MainPath2Software); libreconRootData += "libreconRootData.so"; // libraries from root // They will be loaded from // $ROOTSYS/lib directory // THEREFORE, IT IS MANDATORY THAT THE ROOT // VERSION IS THE RIGHT ONE... if(gSystem->Load("libPhysics.so") < 0){ cout << "Problems loading libPhysics.so" << endl << "Exiting macro returning -1" << endl; return -1;} // Libraries from glast software package if(gSystem->Load(libcommonRootData.Data()) < 0){ cout << "Problems loading " << libcommonRootData.Data() << endl << "Exiting macro returning -1" << endl; return -1;} if(gSystem->Load(libmcRootData.Data()) < 0){ cout << "Problems loading " << libmcRootData.Data() << endl << "Exiting macro returning -1" << endl; return -1;} if(gSystem->Load(libdigiRootData.Data()) < 0){ cout << "Problems loading " << libdigiRootData.Data() << endl << "Exiting macro returning -1" << endl; return -1;} if(gSystem->Load(libreconRootData.Data()) < 0){ cout << "Problems loading " <