rcpicker *results(char *prefix, int seq) { TString resultsfile; TString rootfile; TString logfile; TString sprefix(prefix); if (sprefix == "setup1") { resultsfile.Form("root://nod15.phys.uconn.edu//pnfs/phys.uconn.edu/data/Gluex/beamline/diamonds/chess-6-2012/results/setup1_%3.3d_results.root",seq); rootfile.Form("root://nod15.phys.uconn.edu//pnfs/phys.uconn.edu/data/Gluex/beamline/diamonds/chess-6-2012/results/setup1_%3.3d_rocking_curves.root",seq); logfile = "chess-6-2012/setup1/setup1"; } else if (sprefix == "sinmat100") { resultsfile.Form("root://nod15.phys.uconn.edu//pnfs/phys.uconn.edu/data/Gluex/beamline/diamonds/chess-6-2012/results/sinmat100_%3.3d_results.root",seq); rootfile.Form("root://nod15.phys.uconn.edu//pnfs/phys.uconn.edu/data/Gluex/beamline/diamonds/chess-6-2012/results/sinmat100_%3.3d_rocking_curves.root",seq); logfile = "chess-6-2012/sinmat100/sinmat100"; } else if (sprefix == "sinmat50") { resultsfile.Form("root://nod15.phys.uconn.edu//pnfs/phys.uconn.edu/data/Gluex/beamline/diamonds/chess-6-2012/results/sinmat50_%3.3d_results.root",seq); rootfile.Form("root://nod15.phys.uconn.edu//pnfs/phys.uconn.edu/data/Gluex/beamline/diamonds/chess-6-2012/results/sinmat50_%3.3d_rocking_curves.root",seq); logfile = "chess-6-2012/sinmat50/sinmat50"; } else if (sprefix == "sinmat25") { resultsfile.Form("root://nod15.phys.uconn.edu//pnfs/phys.uconn.edu/data/Gluex/beamline/diamonds/chess-6-2012/results/sinmat25_%3.3d_results.root",seq); rootfile.Form("root://nod15.phys.uconn.edu//pnfs/phys.uconn.edu/data/Gluex/beamline/diamonds/chess-6-2012/results/sinmat25_%3.3d_rocking_curves.root",seq); logfile = "chess-6-2012/sinmat25/sinmat25"; } else if (sprefix == "sinmat25P") { resultsfile.Form("root://nod15.phys.uconn.edu//pnfs/phys.uconn.edu/data/Gluex/beamline/diamonds/chess-6-2012/results/sinmat25P_%3.3d_results.root",seq); rootfile.Form("root://nod15.phys.uconn.edu//pnfs/phys.uconn.edu/data/Gluex/beamline/diamonds/chess-6-2012/results/sinmat25P_%3.3d_rocking_curves.root",seq); logfile = "chess-6-2012/sinmat25P/sinmat25P"; } 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; }