Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ProofStdVect.h
Go to the documentation of this file.
1/// \file
2/// \ingroup tutorial_ProofStdVec
3///
4/// Selector for generic processing with stdlib collections
5///
6/// \macro_code
7///
8/// \author Gerardo Ganis (gerardo.ganis@cern.ch)
9
10#ifndef ProofStdVect_h
11#define ProofStdVect_h
12
13#include <TSelector.h>
14#include <TChain.h>
15
16#include <vector>
17#ifdef __MAKECINT__
18#pragma link C++ class std::vector<std::vector<bool> >+;
19#pragma link C++ class std::vector<std::vector<float> >+;
20#endif
21
22class TFile;
24class TTree;
25class TRandom3;
26class TH1F;
27
28class ProofStdVect : public TSelector {
29public :
30
31 // Specific members
32 Bool_t fCreate; //! True if in create files mode
33
34 // Create mode
35 TTree *fTree; //! The tree filled in create mode
36 TFile *fFile; //! Output file in create mode
37 TProofOutputFile *fProofFile; //! For dataset creation in create mode
38 TRandom3 *fRandom; //! Random generator in create mode
39 TH1F *fHgood; //! Histogram with good hits
40 TH1F *fHbad; //! Histogram with bad hits
41 // Std vector members
42 std::vector<std::vector<bool> > fVb; //! Booleans
43 std::vector<std::vector<float> > fVfx; //! Floats x
44 std::vector<std::vector<float> > fVfy; //! Floats y
45
46 // Read mode
47 TTree *fChain; //!pointer to the analyzed TTree or TChain
48 // Declaration of leaf types
49 std::vector<std::vector<bool> > *fVbr; //!
50 std::vector<std::vector<float> > *fVfxr; //!
51 std::vector<std::vector<float> > *fVfyr; //!
52 // List of branches
53 TBranch *b_Vb; //!
54 TBranch *b_Vfx; //!
55 TBranch *b_Vfy; //!
56
57 ProofStdVect();
58 virtual ~ProofStdVect();
59 virtual Int_t Version() const { return 2; }
60 virtual void Begin(TTree *tree);
61 virtual void SlaveBegin(TTree *tree);
62 void Init(TTree *tree);
63 Bool_t Notify();
64 virtual Bool_t Process(Long64_t entry);
65 virtual Int_t GetEntry(Long64_t entry, Int_t getall = 0) { return fChain ? fChain->GetTree()->GetEntry(entry, getall) : 0; }
66 virtual void SetOption(const char *option) { fOption = option; }
67 virtual void SetObject(TObject *obj) { fObject = obj; }
68 virtual void SetInputList(TList *input) { fInput = input; }
69 virtual TList *GetOutputList() const { return fOutput; }
70 virtual void SlaveTerminate();
71 virtual void Terminate();
72
73 ClassDef(ProofStdVect,0);
74};
75
76#endif
bool Bool_t
Definition RtypesCore.h:63
int Int_t
Definition RtypesCore.h:45
long long Long64_t
Definition RtypesCore.h:80
#define ClassDef(name, id)
Definition Rtypes.h:337
Option_t Option_t option
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void input
A TTree is a list of TBranches.
Definition TBranch.h:89
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
Definition TFile.h:51
1-D histogram with a float per channel (see TH1 documentation)}
Definition TH1.h:577
A doubly linked list.
Definition TList.h:38
Mother of all ROOT objects.
Definition TObject.h:41
Class to steer the merging of files produced on the workers.
Random number generator class based on M.
Definition TRandom3.h:27
A TSelector object is used by the TTree::Draw, TTree::Scan, TTree::Process to navigate in a TTree and...
Definition TSelector.h:31
virtual void SetObject(TObject *obj)
Definition TSelector.h:65
Bool_t Notify() override
This method must be overridden to handle object notification.
Definition TSelector.h:56
virtual void Init(TTree *)
Definition TSelector.h:53
virtual int Version() const
Definition TSelector.h:52
TSelectorList * fOutput
! List of objects created during processing
Definition TSelector.h:42
virtual Bool_t Process(Long64_t)
The Process() function is called for each entry in the tree (or possibly keyed object in the case of ...
virtual void SlaveBegin(TTree *)
Definition TSelector.h:55
virtual Int_t GetEntry(Long64_t, Int_t=0)
Definition TSelector.h:59
virtual void SetOption(const char *option)
Definition TSelector.h:64
virtual void SetInputList(TList *input)
Definition TSelector.h:66
virtual TList * GetOutputList() const
Definition TSelector.h:69
virtual void SlaveTerminate()
Definition TSelector.h:70
virtual void Begin(TTree *)
Definition TSelector.h:54
virtual void Terminate()
Definition TSelector.h:71
A TTree represents a columnar dataset.
Definition TTree.h:79
virtual Int_t GetEntry(Long64_t entry, Int_t getall=0)
Read all branches of entry and return total number of bytes read.
Definition TTree.cxx:5629
virtual TTree * GetTree() const
Definition TTree.h:514
Definition tree.py:1