ProofFriends.h

Go to the documentation of this file.
00001 //////////////////////////////////////////////////////////
00002 // This class has been automatically generated on
00003 // Thu May 27 19:04:42 2010 by ROOT version 5.27/03
00004 // from TTree Tmain/Main tree for tutorial friends
00005 // found on file: /tmp/user/master-trunk/ganis/data/0.1/pcphsft64-1274979719-4411/tree_0.1.root
00006 //////////////////////////////////////////////////////////
00007 
00008 #ifndef ProofFriends_h
00009 #define ProofFriends_h
00010 
00011 #include "TChain.h"
00012 #include "TSelector.h"
00013 
00014 class TH1F;
00015 class TH2F;
00016 
00017 class ProofFriends : public TSelector {
00018 public :
00019    TTree          *fChain;   //!pointer to the analyzed TTree or TChain
00020 
00021    // Specific members
00022    TH2F            *fXY;
00023    TH1F            *fZ;
00024    TH1F            *fR;
00025    TH2F            *fRZ;
00026 
00027    // Declaration of leaf types
00028    Int_t           Run;
00029    Long64_t        Event;
00030    Float_t         x;
00031    Float_t         y;
00032    Float_t         z;
00033 
00034    Float_t         r;     // The friend
00035 
00036    // List of branches
00037    TBranch        *b_Run;   //!
00038    TBranch        *b_Event;   //!
00039    TBranch        *b_x;   //!
00040    TBranch        *b_y;   //!
00041    TBranch        *b_z;   //!
00042 
00043    TBranch        *b_r;   //! The friend branch
00044 
00045    ProofFriends();
00046    virtual ~ProofFriends() { }
00047    virtual Int_t   Version() const { return 2; }
00048    virtual void    Begin(TTree *tree);
00049    virtual void    SlaveBegin(TTree *tree);
00050    virtual void    Init(TTree *tree);
00051    virtual Bool_t  Notify();
00052    virtual Bool_t  Process(Long64_t entry);
00053    virtual Int_t   GetEntry(Long64_t entry, Int_t getall = 0) { return fChain ? fChain->GetTree()->GetEntry(entry, getall) : 0; }
00054    virtual void    SetOption(const char *option) { fOption = option; }
00055    virtual void    SetObject(TObject *obj) { fObject = obj; }
00056    virtual void    SetInputList(TList *input) { fInput = input; }
00057    virtual TList  *GetOutputList() const { return fOutput; }
00058    virtual void    SlaveTerminate();
00059    virtual void    Terminate();
00060 
00061    ClassDef(ProofFriends,0);
00062 };
00063 
00064 #endif
00065 
00066 #ifdef ProofFriends_cxx
00067 void ProofFriends::Init(TTree *tree)
00068 {
00069    // The Init() function is called when the selector needs to initialize
00070    // a new tree or chain. Typically here the branch addresses and branch
00071    // pointers of the tree will be set.
00072    // It is normally not necessary to make changes to the generated
00073    // code, but the routine can be extended by the user if needed.
00074    // Init() will be called many times when running on PROOF
00075    // (once per file to be processed).
00076 
00077    // Set branch addresses and branch pointers
00078    if (!tree) return;
00079    fChain = tree;
00080    fChain->SetMakeClass(1);
00081 
00082    fChain->SetBranchAddress("Run", &Run, &b_Run);
00083    fChain->SetBranchAddress("Event", &Event, &b_Event);
00084    fChain->SetBranchAddress("x", &x, &b_x);
00085    fChain->SetBranchAddress("y", &y, &b_y);
00086    fChain->SetBranchAddress("z", &z, &b_z);
00087 
00088    fChain->SetBranchAddress("r", &r, &b_r);  // The friend
00089 }
00090 
00091 Bool_t ProofFriends::Notify()
00092 {
00093    // The Notify() function is called when a new file is opened. This
00094    // can be either for a new TTree in a TChain or when when a new TTree
00095    // is started when using PROOF. It is normally not necessary to make changes
00096    // to the generated code, but the routine can be extended by the
00097    // user if needed. The return value is currently not used.
00098 
00099    return kTRUE;
00100 }
00101 
00102 #endif // #ifdef ProofFriends_cxx

Generated on Tue Jul 5 15:44:53 2011 for ROOT_528-00b_version by  doxygen 1.5.1