00001
00002
00003
00004
00005
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;
00020
00021
00022 TH2F *fXY;
00023 TH1F *fZ;
00024 TH1F *fR;
00025 TH2F *fRZ;
00026
00027
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;
00035
00036
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;
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
00070
00071
00072
00073
00074
00075
00076
00077
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);
00089 }
00090
00091 Bool_t ProofFriends::Notify()
00092 {
00093
00094
00095
00096
00097
00098
00099 return kTRUE;
00100 }
00101
00102 #endif // #ifdef ProofFriends_cxx