ConsolidateSystMaker.C
Go to the documentation of this file.
1 /// ConsolidateSystMaker by J. Hewes - jhewes15@fnal.gov
2 
3 #include "NuXAna/Analysis/NusSystsMaker.h"
4 
5 using namespace ana;
6 
8  std::string inname, std::string outfile, std::string outname) {
9 
10  std::string ifname = path + "/" + infile;
11  TFile* fin = TFile::Open(ifname.c_str(), "read");
12  TDirectory* indir = fin->GetDirectory(inname.c_str());
13  NusSystematicsMaker* maker = NusSystematicsMaker::LoadFrom(indir, path.c_str()).release();
14 
15  std::string ofname = path + "/" + outfile;
16  TFile* fout = TFile::Open(ofname.c_str(), "recreate");
17  maker->SaveTo(fout, outname.c_str());
18 
19  delete fin;
20  delete fout;
21 
22 }
23 
TString fin
Definition: Style.C:24
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
std::unique_ptr< T > LoadFrom(TDirectory *dir, const std::string &label)
Definition: LoadFromFile.h:17
void ConsolidateSystMaker(std::string path, std::string infile, std::string inname, std::string outfile, std::string outname)
string infile
const std::string path
Definition: plot_BEN.C:43
FILE * outfile
Definition: dump_event.C:13
enum BeamMode string