Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files 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