GRSISort "v4.0.0.5"
An extension of the ROOT analysis Framework
Loading...
Searching...
No Matches
GriffinKValueHelper.hh
Go to the documentation of this file.
1#ifndef GriffinKValueHelper_h
2#define GriffinKValueHelper_h
3
4// Header file for the classes stored in the TTree if any.
5#include "TFragment.h"
6#include "TGRSIHelper.h"
7
8// Fixed size dimensions of array or collections stored in the TTree if any.
9
10class GriffinKValueHelper : public TGRSIHelper, public ROOT::Detail::RDF::RActionImpl<GriffinKValueHelper> {
11public:
12 explicit GriffinKValueHelper(TList* list)
13 : TGRSIHelper(list)
14 {
15 if(fUserSettings != nullptr) {
16 fMaxKValue = fUserSettings->GetInt("MaximumKValue", fMaxKValue);
17 }
18 Prefix("GriffinKValue");
19 Setup();
20 }
21 ROOT::RDF::RResultPtr<std::map<std::string, TList>> Book(ROOT::RDataFrame* d) override
22 {
23 return d->Book<TFragment>(std::move(*this), {"TFragment"});
24 }
25 void CreateHistograms(unsigned int slot) override;
26 void Exec(unsigned int sloti, TFragment& frag);
27
28private:
29 int fMaxKValue{720};
30};
31
32// These are needed functions used by TDataFrameLibrary to create and destroy the instance of this helper
33extern "C" GriffinKValueHelper* CreateHelper(TList* list) { return new GriffinKValueHelper(list); } // NOLINT(misc-definitions-in-headers)
34
35extern "C" void DestroyHelper(TGRSIHelper* helper) { delete helper; } // NOLINT(misc-definitions-in-headers)
36
37#endif
void DestroyHelper(TGRSIHelper *helper)
GriffinKValueHelper * CreateHelper(TList *list)
void Exec(unsigned int sloti, TFragment &frag)
void CreateHistograms(unsigned int slot) override
Virtual helper function that the user uses to create their histograms.
ROOT::RDF::RResultPtr< std::map< std::string, TList > > Book(ROOT::RDataFrame *d) override
This method will call the Book action on the provided dataframe.
TUserSettings * fUserSettings
Definition TGRSIHelper.h:54
std::string & Prefix()
Definition TGRSIHelper.h:36
virtual void Setup()
int GetInt(const std::string &parameter, bool quiet=false) const