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