14 template<
class T>
class _IOscCalc;
22 template<
class T> std::unique_ptr<T>
LoadFrom(TDirectory*
dir)
40 class ModularExtrapComponent;
41 template<> std::unique_ptr<ModularExtrapComponent>
48 template<> std::unique_ptr<osc::IOscCalc> LoadFrom<osc::IOscCalc>(TDirectory*
dir);
52 template<
class T>
void SaveTo(
const T&
x, TDirectory*
dir)
62 const std::string& label)
64 TFile fin(fname.c_str());
65 assert(!fin.IsZombie());
66 TDirectory*
dir = fin.GetDirectory(label.c_str());
68 std::cerr <<
"Didn't find '" << label <<
"' in " << fname << std::endl;
71 return LoadFrom<T>(
dir);
76 const std::string&
fname,
77 const std::string& label)
79 TFile
fout(fname.c_str(),
"RECREATE");
80 x.SaveTo(
fout.mkdir(label.c_str()));
process_name opflash particleana ie x
BEGIN_PROLOG could also be cerr
void SaveToFile(const T &x, const std::string &fname, const std::string &label)
std::unique_ptr< IExtrap > LoadFrom< IExtrap >(TDirectory *dir)
std::unique_ptr< IDecomp > LoadFrom< IDecomp >(TDirectory *dir)
process_name opflashCryoW ana
_IOscCalc< double > IOscCalc
std::unique_ptr< IBkgdEstimator > LoadFrom< IBkgdEstimator >(TDirectory *dir)
std::unique_ptr< ModularExtrapComponent > LoadFrom< ModularExtrapComponent >(TDirectory *dir)
std::unique_ptr< IPrediction > LoadFrom< IPrediction >(TDirectory *dir)
std::unique_ptr< T > LoadFrom(TDirectory *dir)
std::unique_ptr< IExperiment > LoadFrom< IExperiment >(TDirectory *dir)
std::unique_ptr< T > LoadFromFile(const std::string &fname, const std::string &label)
void SaveTo(const osc::IOscCalc &x, TDirectory *dir)