Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
MySelector.h
Go to the documentation of this file.
1//////////////////////////////////////////////////////////
2// This class has been automatically generated on
3// Fri Apr 17 11:53:41 2015 by ROOT version 6.03/03
4// from TTree cond_data/Example N-Tuple
5// found on file: conductivity_experiment.root
6//////////////////////////////////////////////////////////
7
8#ifndef MySelector_h
9#define MySelector_h
10
11#include <TROOT.h>
12#include <TChain.h>
13#include <TFile.h>
14#include <TSelector.h>
15
16// Header file for the classes stored in the TTree if any.
17
18class MySelector : public TSelector {
19public :
20 TTree *fChain; ///<!pointer to the analyzed TTree or TChain
21
22// Fixed size dimensions of array or collections stored in the TTree if any.
23
24 // Declaration of leaf types
29
30 // List of branches
35
36 MySelector(TTree * /*tree*/ =0) : fChain(0) { }
37 virtual ~MySelector() { }
38 virtual Int_t Version() const { return 2; }
39 virtual void Begin(TTree *tree);
40 virtual void SlaveBegin(TTree *tree);
41 virtual void Init(TTree *tree);
42 virtual Bool_t Notify();
43 virtual Bool_t Process(Long64_t entry);
44 virtual Int_t GetEntry(Long64_t entry, Int_t getall = 0) { return fChain ? fChain->GetTree()->GetEntry(entry, getall) : 0; }
45 virtual void SetOption(const char *option) { fOption = option; }
46 virtual void SetObject(TObject *obj) { fObject = obj; }
47 virtual void SetInputList(TList *input) { fInput = input; }
48 virtual TList *GetOutputList() const { return fOutput; }
49 virtual void SlaveTerminate();
50 virtual void Terminate();
51
53};
54
55#endif
56
57#ifdef MySelector_cxx
59{
60 // The Init() function is called when the selector needs to initialize
61 // a new tree or chain. Typically here the branch addresses and branch
62 // pointers of the tree will be set.
63 // It is normally not necessary to make changes to the generated
64 // code, but the routine can be extended by the user if needed.
65 // Init() will be called many times when running on PROOF
66 // (once per file to be processed).
67
68 // Set branch addresses and branch pointers
69 if (!tree) return;
70 fChain = tree;
72
77}
78
80{
81 // The Notify() function is called when a new file is opened. This
82 // can be either for a new TTree in a TChain or when when a new TTree
83 // is started when using PROOF. It is normally not necessary to make changes
84 // to the generated code, but the routine can be extended by the
85 // user if needed. The return value is currently not used.
86
87 return kTRUE;
88}
89
90#endif // #ifdef MySelector_cxx
int Int_t
Signed integer 4 bytes (int).
Definition RtypesCore.h:59
bool Bool_t
Boolean (0=false, 1=true) (bool).
Definition RtypesCore.h:77
long long Long64_t
Portable signed long integer 8 bytes.
Definition RtypesCore.h:83
float Float_t
Float 4 bytes (float).
Definition RtypesCore.h:71
constexpr Bool_t kTRUE
Definition RtypesCore.h:107
#define ClassDef(name, id)
Definition Rtypes.h:344
TBranch * b_Current
!
Definition MySelector.h:32
virtual void SlaveBegin(TTree *tree)
Definition MySelector.C:41
virtual TList * GetOutputList() const
Definition MySelector.h:48
virtual void SlaveTerminate()
Definition MySelector.C:74
virtual Bool_t Notify()
This method must be overridden to handle object notification (the base implementation is no-op).
virtual void SetOption(const char *option)
Definition MySelector.h:45
TBranch * b_Pressure
!
Definition MySelector.h:34
virtual Int_t GetEntry(Long64_t entry, Int_t getall=0)
Definition MySelector.h:44
virtual void Begin(TTree *tree)
Definition MySelector.C:31
Float_t Temperature
Definition MySelector.h:27
virtual ~MySelector()
Definition MySelector.h:37
virtual void SetInputList(TList *input)
Definition MySelector.h:47
virtual void Init(TTree *tree)
Float_t Pressure
Definition MySelector.h:28
virtual void SetObject(TObject *obj)
Definition MySelector.h:46
virtual Int_t Version() const
Definition MySelector.h:38
MySelector(TTree *=0)
Definition MySelector.h:36
virtual Bool_t Process(Long64_t entry)
The Process() function is called for each entry in the tree to be processed.
Definition MySelector.C:51
Float_t Potential
Definition MySelector.h:25
TBranch * b_Potential
!
Definition MySelector.h:31
virtual void Terminate()
Definition MySelector.C:82
Float_t Current
Definition MySelector.h:26
TBranch * b_Temperature
!
Definition MySelector.h:33
TTree * fChain
!pointer to the analyzed TTree or TChain
Definition MySelector.h:20
A TTree is a list of TBranches.
Definition TBranch.h:93
A doubly linked list.
Definition TList.h:38
TObject()
TObject constructor.
Definition TObject.h:259
TSelector(const TSelector &)
TList * fInput
List of objects available during processing.
Definition TSelector.h:41
TString fOption
Option given to TTree::Process.
Definition TSelector.h:39
TSelectorList * fOutput
! List of objects created during processing
Definition TSelector.h:42
TObject * fObject
! Current object if processing object (vs. TTree)
Definition TSelector.h:40
A TTree represents a columnar dataset.
Definition TTree.h:89
virtual Int_t SetBranchAddress(const char *bname, void *add, TBranch **ptr, TClass *realClass, EDataType datatype, bool isptr, bool suppressMissingBranchError)
Definition TTree.cxx:8676
virtual void SetMakeClass(Int_t make)
Set all the branches in this TTree to be in decomposed object mode (also known as MakeClass mode).
Definition TTree.cxx:9443
TTree * tree