GRSISort "v4.0.0.5"
An extension of the ROOT analysis Framework
Loading...
Searching...
No Matches
ExampleFragmentHelper.hh
Go to the documentation of this file.
1#ifndef ExampleFragmentHelper_h
2#define ExampleFragmentHelper_h
3
4// Header file for the classes stored in the TTree if any.
5#include "TFragment.h"
6#include "TGRSIHelper.h"
7
8class ExampleFragmentHelper : public TGRSIHelper, public ROOT::Detail::RDF::RActionImpl<ExampleFragmentHelper> {
9public:
10 explicit ExampleFragmentHelper(TList* list)
11 : TGRSIHelper(list)
12 {
13 Prefix("ExampleFragment");
14 Setup();
15 }
16 ROOT::RDF::RResultPtr<std::map<std::string, TList>> Book(ROOT::RDataFrame* d) override
17 {
18 return d->Book<TFragment>(std::move(*this), {"TFragment"});
19 }
20
21 void CreateHistograms(unsigned int slot) override;
22 void Exec(unsigned int slot, TFragment& frag);
23};
24
25// These are needed functions used by TDataFrameLibrary to create and destroy the instance of this helper
26extern "C" ExampleFragmentHelper* CreateHelper(TList* list) { return new ExampleFragmentHelper(list); } // NOLINT(misc-definitions-in-headers)
27
28extern "C" void DestroyHelper(TGRSIHelper* helper) { delete helper; } // NOLINT(misc-definitions-in-headers)
29
30#endif
ExampleFragmentHelper * CreateHelper(TList *list)
void DestroyHelper(TGRSIHelper *helper)
ROOT::RDF::RResultPtr< std::map< std::string, TList > > Book(ROOT::RDataFrame *d) override
This method will call the Book action on the provided dataframe.
void CreateHistograms(unsigned int slot) override
Virtual helper function that the user uses to create their histograms.
void Exec(unsigned int slot, TFragment &frag)
std::string & Prefix()
Definition TGRSIHelper.h:40
virtual void Setup()