GRSISort "v4.0.0.5"
An extension of the ROOT analysis Framework
Loading...
Searching...
No Matches
TGRSISelector.h
Go to the documentation of this file.
1//////////////////////////////////////////////////////////
2// This class has been automatically generated on
3// Tue Oct 25 13:18:27 2016 by ROOT version 5.34/24
4// from TTree FragmentTree/FragmentTree
5// found on file: fragment07844_000.root
6//////////////////////////////////////////////////////////
7
8#ifndef TGRSISelector_h
9#define TGRSISelector_h
10
11#include "TSelector.h"
12#include "TH1.h"
13#include "TH2.h"
14#include "THnSparse.h"
15#include "TCutG.h"
16
17#include "GHSym.h"
18#include "GCube.h"
19#include "TAnalysisOptions.h"
20#include "TPPG.h"
21#include "TRunInfo.h"
22#include "TGRSIMap.h"
23
24#include <string>
25
26// Fixed size dimensions of array or collections stored in the TTree if any.
27
28class TGRSISelector : public TSelector {
29public:
30 // Methods are purposely not virtual so that TGRSISelector has control
31 explicit TGRSISelector(TTree* /*tree*/ = nullptr) { SetOutputPrefix(ClassName()); }
32 TGRSISelector(const TGRSISelector&) = delete;
33 TGRSISelector(TGRSISelector&&) noexcept = delete;
34 TGRSISelector& operator=(const TGRSISelector&) = delete;
35 TGRSISelector& operator=(TGRSISelector&&) noexcept = delete;
36 ~TGRSISelector() = default;
37 Int_t Version() const override { return 2; }
38 void Begin(TTree* tree) override;
39 void SlaveBegin(TTree* tree) override;
40 void Init(TTree* tree) override;
41 Bool_t Notify() override;
42 Bool_t Process(Long64_t entry) override;
43 Int_t GetEntry(Long64_t entry, Int_t getall = 0) override
44 {
45 return ((fChain != nullptr) ? fChain->GetTree()->GetEntry(entry, getall) : 0);
46 }
47 void SetOption(const char* option) override { fOption = option; }
48 void SetObject(TObject* obj) override { fObject = obj; }
49 // void SetInputList(TList *input) { fInput = input; }
50 TList* GetOutputList() const override { return fOutput; } ///< this does the same as TSelector::GetOutputList()
51 void SlaveTerminate() override;
52 void Terminate() override;
53
54 virtual void CreateHistograms() = 0;
55 virtual void FillHistograms() = 0;
56 virtual void InitializeBranches(TTree* tree) = 0;
57 virtual void EndOfSort() {};
58 void SetOutputPrefix(const char* prefix) { fOutputPrefix = prefix; }
59 std::string GetOutputPrefix() const { return fOutputPrefix; }
60
61protected:
62 TGRSIMap<std::string, TH1*> fH1; // NOLINT //!<! map for 1-D histograms
63 TGRSIMap<std::string, TH2*> fH2; // NOLINT //!<! map for 2-D histograms
64 TGRSIMap<std::string, TH3*> fH3; // NOLINT //!<! map for 3-D histograms
65 TGRSIMap<std::string, GHSym*> fSym; // NOLINT //!<! map for GRSISort's symmetric 2-D histograms
66 TGRSIMap<std::string, GCube*> fCube; // NOLINT //!<! map for GRSISort's 3-D histograms
67 TGRSIMap<std::string, THnSparseF*> fHSparse; // NOLINT //!<! map for sparse n-D histograms
68 TGRSIMap<std::string, TTree*> fTree; // NOLINT //!<! map for trees
69 std::map<std::string, TCutG*> fCuts; // NOLINT //!<! map of cuts
70 TPPG* fPpg{nullptr}; // NOLINT //!<! pointer to the PPG
71 TRunInfo* fRunInfo{nullptr}; // NOLINT //!<! pointer to the run info
72 int64_t fEntry{0}; // NOLINT //!<! entry number currently being processed
73
74private:
75 static constexpr int fSizeLimit = 1073741822; //!<! 1 GB size limit for objects in ROOT
76
77 TTree* fChain{nullptr}; //!<! pointer to the analyzed TTree or TChain
78
79 void CheckSizes(const char* usage); ///< Function to check size of objects in output list
80 std::string fOutputPrefix; //!<! pre-fix for output files
81 TAnalysisOptions* fAnalysisOptions{nullptr}; //!<! pointer to analysis options
82 Int_t fFirstRunNumber{-1}; //!<! run number of first file
83 Int_t fFirstSubRunNumber{-1}; //!<! sub-run number of first file
84
85 /// \cond CLASSIMP
86 ClassDefOverride(TGRSISelector, 3) // NOLINT(readability-else-after-return)
87 /// \endcond
88};
89
90#endif
Int_t fFirstSubRunNumber
! sub-run number of first file
TGRSISelector(const TGRSISelector &)=delete
TGRSIMap< std::string, GHSym * > fSym
TGRSISelector(TGRSISelector &&) noexcept=delete
void SlaveBegin(TTree *tree) override
TGRSIMap< std::string, TH1 * > fH1
void SetOption(const char *option) override
Bool_t Notify() override
virtual void FillHistograms()=0
Int_t fFirstRunNumber
! run number of first file
void CheckSizes(const char *usage)
Function to check size of objects in output list.
void SlaveTerminate() override
TTree * fChain
! pointer to the analyzed TTree or TChain
static constexpr int fSizeLimit
! 1 GB size limit for objects in ROOT
TRunInfo * fRunInfo
virtual void InitializeBranches(TTree *tree)=0
Bool_t Process(Long64_t entry) override
TGRSIMap< std::string, TH2 * > fH2
virtual void CreateHistograms()=0
TGRSIMap< std::string, THnSparseF * > fHSparse
void SetOutputPrefix(const char *prefix)
TList * GetOutputList() const override
this does the same as TSelector::GetOutputList()
void SetObject(TObject *obj) override
std::string fOutputPrefix
! pre-fix for output files
std::string GetOutputPrefix() const
std::map< std::string, TCutG * > fCuts
TGRSIMap< std::string, TTree * > fTree
Int_t Version() const override
TGRSIMap< std::string, TH3 * > fH3
void Terminate() override
void Begin(TTree *tree) override
Int_t GetEntry(Long64_t entry, Int_t getall=0) override
void Init(TTree *tree) override
virtual void EndOfSort()
TGRSISelector(TTree *=nullptr)
TAnalysisOptions * fAnalysisOptions
! pointer to analysis options
TGRSIMap< std::string, GCube * > fCube
Definition TPPG.h:130