All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
IExtrap.cxx
Go to the documentation of this file.
2 
4 
5 #include "TDirectory.h"
6 #include "TObjString.h"
7 
8 #include <iostream>
9 
10 // To implement LoadFrom()
12 
13 namespace ana
14 {
15  //----------------------------------------------------------------------
16  // Definition to satisfy declaration in Core/LoadFromFile.h
17  template<> std::unique_ptr<IExtrap> LoadFrom<IExtrap>(TDirectory* dir)
18  {
19  TObjString* ptag = (TObjString*)dir->Get("type");
20  assert(ptag);
21 
22  const TString tag = ptag->GetString();
23 
24  if(tag == "TrivialExtrap") return TrivialExtrap::LoadFrom(dir);
25 
26  std::cerr << "Unknown Extrap type '" << tag << "'" << std::endl;
27  abort();
28  }
29 
30  //----------------------------------------------------------------------
31  void IExtrap::SaveTo(TDirectory* dir) const
32  {
33  assert(0 && "Not implemented");
34  }
35 }
BEGIN_PROLOG could also be cerr
std::unique_ptr< IExtrap > LoadFrom< IExtrap >(TDirectory *dir)
Definition: IExtrap.cxx:17
process_name opflashCryoW ana
static std::unique_ptr< TrivialExtrap > LoadFrom(TDirectory *dir)
tuple dir
Definition: dropbox.py:28
virtual void SaveTo(TDirectory *dir) const
Definition: IExtrap.cxx:31