EventTree_ProcOpt.h

Go to the documentation of this file.
00001 //////////////////////////////////////////////////////////
00002 // This class has been automatically generated on
00003 // Fri May  7 07:24:11 2004 by ROOT version 4.00/04
00004 // from TTree EventTree/Event Tree
00005 // found on file: event_tree_darkstar.root
00006 //////////////////////////////////////////////////////////
00007 
00008 #ifndef EventTree_ProcOpt_h
00009 #define EventTree_ProcOpt_h
00010 
00011 #include <TROOT.h>
00012 #include <TChain.h>
00013 #include <TFile.h>
00014 #include <TSelector.h>
00015 #include "Event.h"
00016 #include "TH1.h"
00017 
00018 class EventTree_ProcOpt : public TSelector {
00019 public :
00020    TTree          *fChain;   //!pointer to the analyzed TTree or TChain
00021 
00022    // Declaration of leave types
00023    Event           *event;
00024    Char_t          fType[20];
00025    Char_t          *fEventName;
00026    Int_t           fNtrack;
00027    Int_t           fNseg;
00028    Int_t           fNvertex;
00029    UInt_t          fFlag;
00030    Double32_t      fTemperature;
00031    Int_t           fMeasures[10];
00032    Double32_t      fMatrix[4][4];
00033    Double32_t      fClosestDistance[21];   //[fNvertex]
00034    EventHeader     fEvtHdr;
00035    TClonesArray    *fTracks;
00036    TRefArray       *fHighPt;
00037    TRefArray       *fMuons;
00038    TRef            fLastTrack;
00039    TRef            fWebHistogram;
00040    TH1F            *fH;
00041    TBits           fTriggerBits;
00042    Bool_t          fIsValid;
00043 
00044    //Output hist
00045    TH1F* fPtHist;
00046    TH1I* fNTracksHist;
00047 
00048    // List of branches
00049    TBranch        *b_event_fType;   //!
00050    TBranch        *b_fEventName;   //!
00051    TBranch        *b_event_fNtrack;   //!
00052    TBranch        *b_event_fNseg;   //!
00053    TBranch        *b_event_fNvertex;   //!
00054    TBranch        *b_event_fFlag;   //!
00055    TBranch        *b_event_fTemperature;   //!
00056    TBranch        *b_event_fMeasures;   //!
00057    TBranch        *b_event_fMatrix;   //!
00058    TBranch        *b_fClosestDistance;   //!
00059    TBranch        *b_event_fEvtHdr;   //!
00060    TBranch        *b_fTracks;   //!
00061    TBranch        *b_fHighPt;   //!
00062    TBranch        *b_fMuons;   //!
00063    TBranch        *b_event_fLastTrack;   //!
00064    TBranch        *b_event_fWebHistogram;   //!
00065    TBranch        *b_fH;   //!
00066    TBranch        *b_event_fTriggerBits;   //!
00067    TBranch        *b_event_fIsValid;   //!
00068 
00069    EventTree_ProcOpt(TTree *) { }
00070    EventTree_ProcOpt() { }
00071    ~EventTree_ProcOpt() { }
00072    virtual Int_t   Version() const {return 1;}
00073    virtual void    Begin(TTree *);
00074    virtual void    SlaveBegin(TTree *tree);
00075    virtual void    Init(TTree *tree);
00076    virtual Bool_t  Notify();
00077    virtual Bool_t  Process(Long64_t entry);
00078    virtual void    SetOption(const char *option) { fOption = option; }
00079    virtual void    SetObject(TObject *obj) { fObject = obj; }
00080    virtual void    SetInputList(TList *input) {fInput = input;}
00081    virtual TList  *GetOutputList() const { return fOutput; }
00082    virtual void    SlaveTerminate();
00083    virtual void    Terminate();
00084 
00085    ClassDef(EventTree_ProcOpt,0);
00086 };
00087 
00088 #endif
00089 
00090 #ifdef EventTree_ProcOpt_cxx
00091 void EventTree_ProcOpt::Init(TTree *tree)
00092 {
00093    // The Init() function is called when the selector needs to initialize
00094    // a new tree or chain. Typically here the branch addresses of the tree
00095    // will be set. It is normaly not necessary to make changes to the
00096    // generated code, but the routine can be extended by the user if needed.
00097    // Init() will be called many times when running with PROOF.
00098 
00099    // Set branch addresses
00100    fEventName=0;
00101    fTracks=0;
00102    fHighPt=0;
00103    fMuons=0;
00104    if (tree == 0) return;
00105    fChain = tree;
00106    fChain->SetMakeClass(1);
00107 
00108    fChain->SetBranchAddress("fType[20]",fType);
00109    fChain->SetBranchAddress("fEventName",fEventName);
00110    fChain->SetBranchAddress("fNtrack",&fNtrack);
00111    fChain->SetBranchAddress("fNseg",&fNseg);
00112    fChain->SetBranchAddress("fNvertex",&fNvertex);
00113    fChain->SetBranchAddress("fFlag",&fFlag);
00114    fChain->SetBranchAddress("fTemperature",&fTemperature);
00115    fChain->SetBranchAddress("fMeasures[10]",fMeasures);
00116    fChain->SetBranchAddress("fMatrix[4][4]",fMatrix);
00117    fChain->SetBranchAddress("fClosestDistance",fClosestDistance);
00118    fChain->SetBranchAddress("fEvtHdr",&fEvtHdr);
00119    fChain->SetBranchAddress("fTracks",&fTracks);
00120    fChain->SetBranchAddress("fHighPt",&fHighPt);
00121    fChain->SetBranchAddress("fMuons",&fMuons);
00122    fChain->SetBranchAddress("fLastTrack",&fLastTrack);
00123    fChain->SetBranchAddress("fWebHistogram",&fWebHistogram);
00124    fChain->SetBranchAddress("fH",&fH);
00125    fChain->SetBranchAddress("fTriggerBits",&fTriggerBits);
00126    fChain->SetBranchAddress("fIsValid",&fIsValid);
00127 
00128 }
00129 
00130 Bool_t EventTree_ProcOpt::Notify()
00131 {
00132    // The Notify() function is called when a new file is opened. This
00133    // can be either for a new TTree in a TChain or when when a new TTree
00134    // is started when using PROOF. Typically here the branch pointers
00135    // will be retrieved. It is normaly not necessary to make changes
00136    // to the generated code, but the routine can be extended by the
00137    // user if needed.
00138 
00139    // Get branch pointers
00140    b_event_fType = fChain->GetBranch("fType[20]");
00141    b_fEventName = fChain->GetBranch("fEventName");
00142    b_event_fNtrack = fChain->GetBranch("fNtrack");
00143    b_event_fNseg = fChain->GetBranch("fNseg");
00144    b_event_fNvertex = fChain->GetBranch("fNvertex");
00145    b_event_fFlag = fChain->GetBranch("fFlag");
00146    b_event_fTemperature = fChain->GetBranch("fTemperature");
00147    b_event_fMeasures = fChain->GetBranch("fMeasures[10]");
00148    b_event_fMatrix = fChain->GetBranch("fMatrix[4][4]");
00149    b_fClosestDistance = fChain->GetBranch("fClosestDistance");
00150    b_event_fEvtHdr = fChain->GetBranch("fEvtHdr");
00151    b_fTracks = fChain->GetBranch("fTracks");
00152    b_fHighPt = fChain->GetBranch("fHighPt");
00153    b_fMuons = fChain->GetBranch("fMuons");
00154    b_event_fLastTrack = fChain->GetBranch("fLastTrack");
00155    b_event_fWebHistogram = fChain->GetBranch("fWebHistogram");
00156    b_fH = fChain->GetBranch("fH");
00157    b_event_fTriggerBits = fChain->GetBranch("fTriggerBits");
00158    b_event_fIsValid = fChain->GetBranch("fIsValid");
00159 
00160    return kTRUE;
00161 }
00162 
00163 #endif // #ifdef EventTree_ProcOpt_cxx

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