Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PIDStudySelector.h
Go to the documentation of this file.
1 //////////////////////////////////////////////////////////
2 // This class has been automatically generated on
3 // Sun Oct 2 15:04:24 2011 by ROOT version 5.30/00
4 // from TTree dPluginTree_MCReconstructionStatuses/MC Reconstruction Statuses
5 // found on file: cluster_run/hd_root_pidstudies_proton.root
6 //////////////////////////////////////////////////////////
7 
8 #ifndef PIDStudySelector_h
9 #define PIDStudySelector_h
10 
11 #include <TROOT.h>
12 #include <TChain.h>
13 #include <TFile.h>
14 #include <TSelector.h>
15 //#include <../../../../../libraries/include/DLorentzVector.h>
16 #include <include/DLorentzVector.h>
17 #include <TH2F.h>
18 #include <TH1F.h>
19 
20 class PIDStudySelector : public TSelector {
21 public :
22  TTree *fChain; //!pointer to the analyzed TTree or TChain
23 
24  // Declaration of leaf types
25  //MCReconstructionStatuses *dPluginBranch_MCReconstructionStatuses;
26  UInt_t fUniqueID;
27  UInt_t fBits;
28  vector<MCReconstructionStatus*> dMCReconstructionStatusVector;
29 
30  TFile *dOutputFile;
31 
32  // List of branches
36 
37  PIDStudySelector(TTree * /*tree*/ =0) { }
38  virtual ~PIDStudySelector() { }
39  virtual Int_t Version() const { return 2; }
40  virtual void Begin(TTree *tree);
41  virtual void SlaveBegin(TTree *tree);
42  virtual void Init(TTree *tree);
43  virtual Bool_t Notify();
44  virtual Bool_t Process(Long64_t entry);
45  virtual Int_t GetEntry(Long64_t entry, Int_t getall = 0) { return fChain ? fChain->GetTree()->GetEntry(entry, getall) : 0; }
46  virtual void SetOption(const char *option) { fOption = option; }
47  virtual void SetObject(TObject *obj) { fObject = obj; }
48  virtual void SetInputList(TList *input) { fInput = input; }
49  virtual TList *GetOutputList() const { return fOutput; }
50  virtual void SlaveTerminate();
51  virtual void Terminate();
52 
54 };
55 
56 #endif
57 
58 #ifdef PIDStudySelector_cxx
59 void PIDStudySelector::Init(TTree *tree)
60 {
61  // The Init() function is called when the selector needs to initialize
62  // a new tree or chain. Typically here the branch addresses and branch
63  // pointers of the tree will be set.
64  // It is normally not necessary to make changes to the generated
65  // code, but the routine can be extended by the user if needed.
66  // Init() will be called many times when running on PROOF
67  // (once per file to be processed).
68 
69  // Set branch addresses and branch pointers
70  if (!tree) return;
71  fChain = tree;
72  fChain->SetMakeClass(1);
73 
74  fChain->SetBranchAddress("fUniqueID", &fUniqueID, &b_dPluginBranch_MCReconstructionStatuses_fUniqueID);
75  fChain->SetBranchAddress("fBits", &fBits, &b_dPluginBranch_MCReconstructionStatuses_fBits);
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 PIDStudySelector_cxx
TBranch * b_dPluginBranch_MCReconstructionStatuses_fBits
virtual void SetInputList(TList *input)
virtual Int_t GetEntry(Long64_t entry, Int_t getall=0)
TBranch * b_dPluginBranch_MCReconstructionStatuses_dMCReconstructionStatusVector
TBranch * b_dPluginBranch_MCReconstructionStatuses_fUniqueID
virtual void SlaveTerminate()
virtual ~PIDStudySelector()
ClassDef(PIDStudySelector, 0)
virtual TList * GetOutputList() const
virtual void SetOption(const char *option)
vector< MCReconstructionStatus * > dMCReconstructionStatusVector
PIDStudySelector(TTree *=0)
virtual void Begin(TTree *tree)
virtual void SlaveBegin(TTree *tree)
virtual void Init(TTree *tree)
virtual void Terminate()
UInt_t fUniqueID
pointer to the analyzed TTree or TChain
virtual Bool_t Process(Long64_t entry)
virtual void SetObject(TObject *obj)
virtual Int_t Version() const
virtual Bool_t Notify()