rcpicker *results(char *prefix, int seq) { TString resultsfile; TString rootfile; TString logfile; TString sprefix(prefix); if (sprefix == "Si331") { resultsfile.Form("root://nod15.phys.uconn.edu//pnfs/phys.uconn.edu/data/Gluex/beamline/diamonds/chess-4-2011/results/Si331_%3.3d_results.root",seq); rootfile.Form("root://nod15.phys.uconn.edu//pnfs/phys.uconn.edu/data/Gluex/beamline/diamonds/chess-4-2011/results/Si331_%3.3d_rocking_curves.root",seq); logfile = "chess-4-2011/Si331/Si331"; } else if (sprefix == "e6") { resultsfile.Form("root://nod15.phys.uconn.edu//pnfs/phys.uconn.edu/data/Gluex/beamline/diamonds/chess-4-2011/results/e6_%3.3d_results.root",seq); rootfile.Form("root://nod15.phys.uconn.edu//pnfs/phys.uconn.edu/data/Gluex/beamline/diamonds/chess-4-2011/results/e6_%3.3d_rocking_curves.root",seq); logfile="chess-4-2011/e6/e6"; } else if (sprefix == "plate") { resultsfile.Form("root://nod15.phys.uconn.edu//pnfs/phys.uconn.edu/data/Gluex/beamline/diamonds/chess-4-2011/results/plate_%3.3d_results.root",seq); rootfile.Form("root://nod15.phys.uconn.edu//pnfs/phys.uconn.edu/data/Gluex/beamline/diamonds/chess-4-2011/results/plate_%3.3d_rocking_curves.root",seq); logfile="chess-4-2011/plate/plate"; } else if (sprefix == "pristine") { resultsfile.Form("root://nod15.phys.uconn.edu//pnfs/phys.uconn.edu/data/Gluex/beamline/diamonds/chess-4-2011/results/pristine_%3.3d_results.root",seq); rootfile.Form("root://nod15.phys.uconn.edu//pnfs/phys.uconn.edu/data/Gluex/beamline/diamonds/chess-4-2011/results/pristine_%3.3d_rocking_curves.root",seq); logfile="chess-4-2011/pristine/pristine"; } else if (sprefix == "sinmat") { resultsfile.Form("root://nod15.phys.uconn.edu//pnfs/phys.uconn.edu/data/Gluex/beamline/diamonds/chess-4-2011/results/sinmat_%3.3d_results.root",seq); rootfile.Form("root://nod15.phys.uconn.edu//pnfs/phys.uconn.edu/data/Gluex/beamline/diamonds/chess-4-2011/results/sinmat_%3.3d_rocking_curves.root",seq); logfile="chess-4-2011/sinmat/sinmat"; } else { std::cerr << "rcp_setup error - dataset \"" << sprefix << " is not known." << std::endl; return 0; } TFile *resfile = TFile::Open(resultsfile); rcpicker *rcp = new rcpicker(prefix,seq,rootfile.Data(),logfile.Data()); resfile->cd(); return rcp; }