1#ifndef ExampleTreeHelper_h
2#define ExampleTreeHelper_h
35 ROOT::RDF::RResultPtr<std::map<std::string, TList>>
Book(ROOT::RDataFrame* d)
override
38 std::cout <<
"Using column names";
39 for(
const auto& name : columnNames) {
40 std::cout <<
" \"" << name <<
"\"";
42 std::cout <<
" we get:" << std::endl;
43 if(std::none_of(columnNames.begin(), columnNames.end(), [](
const std::string& name) { return name ==
"TGriffin"; }) ||
44 std::none_of(columnNames.begin(), columnNames.end(), [](
const std::string& name) { return name ==
"TGriffinBgo"; })) {
45 throw std::runtime_error(
"Missing either TGriffin or TGriffinBgo in list of column names?");
47 fZds = std::any_of(columnNames.begin(), columnNames.end(), [](
const std::string& name) { return name ==
"TZeroDegree"; });
48 fSceptar = std::any_of(columnNames.begin(), columnNames.end(), [](
const std::string& name) { return name ==
"TSceptar"; });
49 std::cout <<
"Zds " << (
fZds ?
"present" :
"missing") <<
", and Sceptar " << (
fSceptar ?
"present" :
"missing") << std::endl;
66 Exec(slot, grif, grifBgo, zds, scep);
71 Exec(slot, grif, grifBgo, zds, scep);
77 Exec(slot, grif, grifBgo, zds, scep);
void Exec(unsigned int slot, TGriffin &grif, TGriffinBgo &grifBgo)
ROOT::RDF::RResultPtr< std::map< std::string, TList > > Book(ROOT::RDataFrame *d) override
This method will call the Book action on the provided dataframe.
bool fZds
flag whether ZDS is present in the data
void CreateHistograms(unsigned int slot) override
Virtual helper function that the user uses to create their histograms.
void Exec(unsigned int slot, TGriffin &grif, TGriffinBgo &grifBgo, TZeroDegree &zds)
std::map< unsigned int, int > fGriffinMultiplicity
multiplicity of suppressed addback energies
void Exec(unsigned int slot, TGriffin &grif, TGriffinBgo &grifBgo, TSceptar &scep)
void Exec(unsigned int slot, TGriffin &grif, TGriffinBgo &grifBgo, TZeroDegree &zds, TSceptar &scep)
std::map< unsigned int, std::vector< double > > fBetaGammaTiming
vector of beta-gamma timing
std::map< unsigned int, std::vector< double > > fSuppressedAddback
vector of suppressed addback energies
ExampleTreeHelper(TList *list)
bool fSceptar
flag whether SCEPTAR is present in the data
std::map< unsigned int, double * > fSuppressedAddback2
vector of suppressed addback energies
ROOT::RDF::ColumnNames_t ColumnNames() const
void DestroyHelper(TGRSIHelper *helper)
ExampleTreeHelper * CreateHelper(TList *list)