GRSISort "v4.0.0.5"
An extension of the ROOT analysis Framework
Loading...
Searching...
No Matches
TGRSIHelper Class Reference

Detailed Description

Base class for all helpers used in grsiframe. It provides some general members that are set from the input list, like TPPG, run info, and user settings. It also loads settings from the input list into general GRSISort variables, like the analysis options, g-value files, cut files, or calibration files.

Definition at line 38 of file TGRSIHelper.h.

Public Types

using Result_t = std::map<std::string, TList>
 

Public Member Functions

 TGRSIHelper (const TGRSIHelper &)=delete
 
 TGRSIHelper (TGRSIHelper &&)=default
 
 TGRSIHelper (TList *input)
 
 ~TGRSIHelper ()=default
 
virtual ROOT::RDF::RResultPtr< std::map< std::string, TList > > Book (ROOT::RDataFrame *)
 
virtual void CreateHistograms (unsigned int)
 
virtual void EndOfSort (std::shared_ptr< std::map< std::string, TList > > &)
 
void Finalize ()
 
std::string GetActionName () const
 
std::shared_ptr< std::map< std::string, TList > > GetResultPtr () const
 
void Initialize ()
 
void InitTask (TTreeReader *, unsigned int)
 
TGRSIHelperoperator= (const TGRSIHelper &)=delete
 
TGRSIHelperoperator= (TGRSIHelper &&)=default
 
std::string & Prefix ()
 
std::string Prefix () const
 
void Prefix (const std::string &val)
 
virtual void Setup ()
 

Protected Member Functions

TPPGPpg ()
 
TRunInfoRunInfo ()
 
TUserSettingsUserSettings ()
 

Protected Attributes

std::vector< TGRSIMap< std::string, GCube * > > fCube
 
std::map< std::string, TCutG * > fCuts
 
std::vector< TGRSIMap< std::string, TH1 * > > fH1
 
std::vector< TGRSIMap< std::string, TH2 * > > fH2
 
std::vector< TGRSIMap< std::string, TH3 * > > fH3
 
std::vector< std::shared_ptr< std::map< std::string, TList > > > fLists
 
std::vector< TGRSIMap< std::string, TObject * > > fObject
 
TPPGfPpg {nullptr}
 
std::string fPrefix {"TGRSIHelper"}
 
TRunInfofRunInfo {nullptr}
 
std::vector< TGRSIMap< std::string, GHSym * > > fSym
 
std::vector< TGRSIMap< std::string, TTree * > > fTree
 
TUserSettingsfUserSettings {nullptr}
 

Private Member Functions

void CheckSizes (unsigned int slot, const char *usage)
 

Static Private Attributes

static constexpr int fSizeLimit = 1073741822
 
+ Inheritance diagram for TGRSIHelper:
+ Collaboration diagram for TGRSIHelper:

Member Typedef Documentation

◆ Result_t

using TGRSIHelper::Result_t = std::map<std::string, TList>

This type is a requirement for every helper.

Definition at line 67 of file TGRSIHelper.h.

Constructor & Destructor Documentation

◆ TGRSIHelper() [1/3]

TGRSIHelper::TGRSIHelper ( TList * input)
explicit

◆ TGRSIHelper() [2/3]

TGRSIHelper::TGRSIHelper ( const TGRSIHelper & )
delete

◆ TGRSIHelper() [3/3]

TGRSIHelper::TGRSIHelper ( TGRSIHelper && )
default

◆ ~TGRSIHelper()

TGRSIHelper::~TGRSIHelper ( )
default

Member Function Documentation

◆ Book()

virtual ROOT::RDF::RResultPtr< std::map< std::string, TList > > TGRSIHelper::Book ( ROOT::RDataFrame * )
inlinevirtual

This method will call the Book action on the provided dataframe.

Reimplemented in AlphanumericHelper, AngularCorrelationHelper, ComptonPolarimetryHelper, CrossTalkHelper, DirectoryHelper, EfficiencyHelper, ExampleEventHelper, ExampleFragmentHelper, ExampleTreeHelper, GriffinKValueHelper, and TimeWalkHelper.

Definition at line 81 of file TGRSIHelper.h.

References Prefix().

◆ CheckSizes()

void TGRSIHelper::CheckSizes ( unsigned int slot,
const char * usage )
private

check size of each object in the output list

Definition at line 215 of file TGRSIHelper.cxx.

References DRED, fLists, fSizeLimit, and RESET_COLOR.

Referenced by Finalize(), and Setup().

◆ CreateHistograms()

virtual void TGRSIHelper::CreateHistograms ( unsigned int )
inlinevirtual

Virtual helper function that the user uses to create their histograms.

Reimplemented in AlphanumericHelper, AngularCorrelationHelper, ComptonPolarimetryHelper, CrossTalkHelper, DirectoryHelper, EfficiencyHelper, ExampleEventHelper, ExampleFragmentHelper, ExampleTreeHelper, GriffinKValueHelper, and TimeWalkHelper.

Definition at line 76 of file TGRSIHelper.h.

References Prefix().

Referenced by Setup().

◆ EndOfSort()

virtual void TGRSIHelper::EndOfSort ( std::shared_ptr< std::map< std::string, TList > > & )
inlinevirtual

This method gets called at the end of Finalize()

Reimplemented in DirectoryHelper, EfficiencyHelper, and ExampleEventHelper.

Definition at line 100 of file TGRSIHelper.h.

Referenced by Finalize().

◆ Finalize()

void TGRSIHelper::Finalize ( )

This required method is called at the end of the event loop. It is used to merge all the internal TLists which were used in each of the data processing slots.

This function merges all maps of lists into the map of the first slot (slot 0)

Definition at line 154 of file TGRSIHelper.cxx.

References CheckSizes(), EndOfSort(), and fLists.

◆ GetActionName()

std::string TGRSIHelper::GetActionName ( ) const
inline

Definition at line 104 of file TGRSIHelper.h.

References Prefix().

◆ GetResultPtr()

std::shared_ptr< std::map< std::string, TList > > TGRSIHelper::GetResultPtr ( ) const
inline

Definition at line 92 of file TGRSIHelper.h.

References fLists.

◆ Initialize()

void TGRSIHelper::Initialize ( )
inline

Definition at line 94 of file TGRSIHelper.h.

◆ InitTask()

void TGRSIHelper::InitTask ( TTreeReader * ,
unsigned int  )
inline

Definition at line 93 of file TGRSIHelper.h.

◆ operator=() [1/2]

TGRSIHelper & TGRSIHelper::operator= ( const TGRSIHelper & )
delete

◆ operator=() [2/2]

TGRSIHelper & TGRSIHelper::operator= ( TGRSIHelper && )
default

◆ Ppg()

TPPG * TGRSIHelper::Ppg ( )
inlineprotected

Definition at line 43 of file TGRSIHelper.h.

References fPpg.

Referenced by ExampleEventHelper::CreateHistograms().

◆ Prefix() [1/3]

◆ Prefix() [2/3]

std::string TGRSIHelper::Prefix ( ) const
inline

Definition at line 102 of file TGRSIHelper.h.

References fPrefix.

◆ Prefix() [3/3]

void TGRSIHelper::Prefix ( const std::string & val)
inline

Definition at line 103 of file TGRSIHelper.h.

References fPrefix.

◆ RunInfo()

TRunInfo * TGRSIHelper::RunInfo ( )
inlineprotected

Definition at line 44 of file TGRSIHelper.h.

References fRunInfo.

◆ Setup()

void TGRSIHelper::Setup ( )
virtual

◆ UserSettings()

TUserSettings * TGRSIHelper::UserSettings ( )
inlineprotected

Definition at line 45 of file TGRSIHelper.h.

References fUserSettings.

Member Data Documentation

◆ fCube

std::vector<TGRSIMap<std::string, GCube*> > TGRSIHelper::fCube
protected

Definition at line 52 of file TGRSIHelper.h.

Referenced by Setup().

◆ fCuts

std::map<std::string, TCutG*> TGRSIHelper::fCuts
protected

Definition at line 55 of file TGRSIHelper.h.

Referenced by TGRSIHelper().

◆ fH1

◆ fH2

◆ fH3

std::vector<TGRSIMap<std::string, TH3*> > TGRSIHelper::fH3
protected

Definition at line 50 of file TGRSIHelper.h.

Referenced by TimeWalkHelper::CreateHistograms(), TimeWalkHelper::Exec(), and Setup().

◆ fLists

std::vector<std::shared_ptr<std::map<std::string, TList> > > TGRSIHelper::fLists
protected

Definition at line 47 of file TGRSIHelper.h.

Referenced by CheckSizes(), Finalize(), GetResultPtr(), and Setup().

◆ fObject

std::vector<TGRSIMap<std::string, TObject*> > TGRSIHelper::fObject
protected

Definition at line 54 of file TGRSIHelper.h.

Referenced by AngularCorrelationHelper::CreateHistograms(), and Setup().

◆ fPpg

TPPG* TGRSIHelper::fPpg {nullptr}
protected

Definition at line 56 of file TGRSIHelper.h.

Referenced by Ppg().

◆ fPrefix

std::string TGRSIHelper::fPrefix {"TGRSIHelper"}
protected

Definition at line 59 of file TGRSIHelper.h.

Referenced by Prefix(), Prefix(), and Prefix().

◆ fRunInfo

TRunInfo* TGRSIHelper::fRunInfo {nullptr}
protected

Definition at line 57 of file TGRSIHelper.h.

Referenced by RunInfo().

◆ fSizeLimit

int TGRSIHelper::fSizeLimit = 1073741822
staticconstexprprivate

! 1 GiB size limit for objects in ROOT

Definition at line 62 of file TGRSIHelper.h.

Referenced by CheckSizes().

◆ fSym

std::vector<TGRSIMap<std::string, GHSym*> > TGRSIHelper::fSym
protected

Definition at line 51 of file TGRSIHelper.h.

Referenced by Setup().

◆ fTree

std::vector<TGRSIMap<std::string, TTree*> > TGRSIHelper::fTree
protected

◆ fUserSettings

TUserSettings* TGRSIHelper::fUserSettings {nullptr}
protected