/////////////////////////////////////////////////////////// // Author: J. McIntyre // 8 January 2021 /////////////////////////////////////////////////////////// // This file is used to run PROOF on Radphi dataset /////////////////////////////////////////////////////////// // // // To change this file modify the following: // ----------------------------------------- // PROOF Service Used --> 1099 // /* Jim's 1099 */ // /* Fridah's 1097 */ // Radphi Dataset --> pass-9-2020 // This files name --> proof_TwoG_jan_8_2021 // TSelector Name --> TwoG_jan_8_2021 // // ///////////////// For MC Data /////////////////// // MC reaction(s) of interest --> pi02gp_clean // --> ?? // --> ?? // --> ?? // --> ?? // "If more are needed update lines 69 & 76" // // "Uncomment lines 54, 58, 69, 76" // "Comment out lines 53, 57, 68, 75" // // //////////////// For Real Data ////////////////// // "Uncomment lines 53, 57, 68, 75" // "Comment out lines 54, 58, 69, 76" // // // -------------------------------------------------------- // Associated real data .root file // --> TwoG_jan_8_2021Analysis.root // -------------------------------------------------------- #include #include #include #include #include #include #include #include #include #include #include #include #define DOING_PROOF 1 #define ASYNC_PROOF 1 TString proofserver("proof://stat31.phys.uconn.edu:1099/?N"); TString xrootdpath("root://nod29.phys.uconn.edu/Gluex/radphi/pass-9-2020"); // Real data //TString xrootdpath("root://nod29.phys.uconn.edu/Gluex/radphi/sims_2020"); // MC data //TString xrootdpath("/pnfs/phys.uconn.edu/data/Gluex/radphi/sims_2020"); // Alternate path TString pnfspath("root://nod29.phys.uconn.edu/Gluex/radphi/pass-9-2020"); // Real data //TString pnfspath("root://nod29.phys.uconn.edu/Gluex/radphi/sims_2020"); // MC data //TString pnfspath("/pnfs/phys.uconn.edu/data/Gluex/radphi/pass-9-2020"); // Alternate path TChain *fullchain() { TChain *ch = new TChain("h1"); int filecount = 0; void *datadir = gSystem->OpenDirectory(pnfspath); while (const char *fname = gSystem->GetDirEntry(datadir)) { std::string fnames(fname); if (fnames.find(".root") != fnames.npos) { // For real data //if ((fnames.find("pi02gp_gen") != fnames.npos) && (fnames.find(".root") != fnames.npos)) { // For MC data ch->Add(xrootdpath + "/" + TString(fnames)); filecount += 1; } } std::cout << "\n"; std::cout << "There are ==> " << filecount << " files being processed from: " << xrootdpath << "\n" ; //std::cout << "There are ==> " << filecount << " Monte Carlo files with name(s) - " << "pi02gp_gen" << " - being processed. \n" ; gSystem->FreeDirectory(datadir); return ch; } void proof_TwoG_jan_8_2021(int nevents=2000000000) { TChain *ch=fullchain(); #if DOING_PROOF if (gProof == 0) { TProof::Open(proofserver); gProof->SetParameter("PROOF_LookupOpt", "none"); gProof->SetParameter("PROOF_MaxSlavesPerNode", (Int_t)40); } gProof->Load("TwoG_jan_8_2021.C+O"); ch->SetProof(); #else gROOT->ProcessLine(".L TwoG_jan_8_2021.C+O"); #endif ch->Process("TwoG_jan_8_2021", "", nevents); #if DOING_PROOF if (gProof == 0) { gProof->Close(); } #endif }