IBkgdEstimator.cxx
Go to the documentation of this file.
3 
6 
7 #include <cassert>
8 #include <iostream>
9 
10 #include "TDirectory.h"
11 #include "TObjString.h"
12 
13 namespace ana
14 {
15  template<> std::unique_ptr<IBkgdEstimator>
17  {
18  TObjString *ptag = (TObjString*)dir->Get((name+"/type").c_str());
19  assert(ptag);
20 
21  const TString tag = ptag->GetString();
22  delete ptag;
23 
24  if (tag == "TrivialBkgdEstimator")
26  if (tag == "FitInAnaBinsBkgdEstimator")
28 
29  std::cout << "Unknown BkgdEstimator type '" << tag << "'" << std::endl;
30  abort();
31  }
32 }
const XML_Char * name
Definition: expat.h:151
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
static std::unique_ptr< TrivialBkgdEstimator > LoadFrom(TDirectory *dir, const std::string &name)
OStream cout
Definition: OStream.cxx:6
TDirectory * dir
Definition: macro.C:5
static std::unique_ptr< FitInAnaBinsBkgdEstimator > LoadFrom(TDirectory *dir, const std::string &name)
assert(nhit_max >=nhit_nbins)
std::unique_ptr< IBkgdEstimator > LoadFrom< IBkgdEstimator >(TDirectory *dir, const std::string &label)
enum BeamMode string