ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
22 class TFile;
23 class TProofOutputFile;
24 class TTree;
25 class TRandom3;
26 class TH1F;
27 
28 class ProofStdVect : public TSelector {
29 public :
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
virtual Int_t GetEntry(Long64_t, Int_t=0)
Definition: TSelector.h:67
virtual int Version() const
Definition: TSelector.h:60
Random number generator class based on M.
Definition: TRandom3.h:29
TSelectorList * fOutput
Definition: TSelector.h:50
long long Long64_t
Definition: RtypesCore.h:69
virtual Bool_t Notify()
This method must be overridden to handle object notification.
Definition: TSelector.h:64
virtual TList * GetOutputList() const
Definition: TSelector.h:76
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
Definition: TFile.h:45
1-D histogram with a float per channel (see TH1 documentation)}
Definition: TH1.h:570
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
virtual void SetInputList(TList *input)
Definition: TSelector.h:73
#define ClassDef(name, id)
Definition: Rtypes.h:254
virtual void Begin(TTree *)
Definition: TSelector.h:62
A doubly linked list.
Definition: TList.h:47
virtual void SlaveBegin(TTree *)
Definition: TSelector.h:63
Class to steer the merging of files produced on the workers.
virtual void Terminate()
Definition: TSelector.h:78
virtual void SlaveTerminate()
Definition: TSelector.h:77
tuple tree
Definition: tree.py:24
virtual Bool_t Process(Long64_t)
Definition: TSelector.cxx:290
virtual void SetObject(TObject *obj)
Definition: TSelector.h:72
virtual void SetOption(const char *option)
Definition: TSelector.h:71
Mother of all ROOT objects.
Definition: TObject.h:58
A TTree object has a header with a name and a title.
Definition: TTree.h:98
A TTree is a list of TBranches.
Definition: TBranch.h:58
A TSelector object is used by the TTree::Draw, TTree::Scan, TTree::Process to navigate in a TTree and...
Definition: TSelector.h:39
TObject * obj
virtual void Init(TTree *)
Definition: TSelector.h:61