{
  char *pamyodalib = gSystem->ExpandPathName("$PAM_YODALIB");
  char *libYODA;
  libYODA=Form("%s/libyoda.so",pamyodalib);
  gSystem->Load(libYODA);
  char *pamlib = gSystem->ExpandPathName("$PAM_LIB");
  char *paminc = gSystem->ExpandPathName("$PAM_INC");
  char *incload; 
  incload = Form("%s/CaloFunctions.h",paminc);
  gROOT->LoadMacro(incload);
  char *pam_lib=gSystem->Getenv("PAM_LIB");
  stringstream libload;
  libload.str("");
  libload << pam_lib << "/libtrack";
  gSystem->Load(libload.str().c_str());
  libload.str("");
  libload << pam_lib << "/libtrack_C";
  gSystem->Load(libload.str().c_str());
  libload.str("");
  libload << pam_lib << "/libreadb2maps";
  gSystem->Load(libload.str().c_str());
  libload.str("");
  libload << pam_lib << "/libreadb2maps_C";
  gSystem->Load(libload.str().c_str());
  libload.str("");
  libload << pam_lib << "/libFCaloTRKCALOALIG";
  gSystem->Load(libload.str().c_str());
}
