CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_8_patch3/src/QCDAnalysis/UEAnalysis/root/UEAnalysisSelectorRootple.h

Go to the documentation of this file.
00001 
00002 // This class has been automatically generated on
00003 // Mon Apr 21 14:19:27 2008 by ROOT version 5.18/00
00004 // from TTree AnalysisTree/MBUE Analysis Tree 
00005 // found on file: MBUEAnalysisRootFile.root
00007 
00008 #ifndef UEAnalysisSelectorRootple_h
00009 #define UEAnalysisSelectorRootple_h
00010 
00011 #include <TROOT.h>
00012 #include <TChain.h>
00013 #include <TFile.h>
00014 #include <TSelector.h>
00015 
00016 
00017 #include "UEAnalysisUE.h"
00018 #include "UEAnalysisJets.h"
00019 #include "UEAnalysisMPI.h"
00020 
00021 //
00022 #include <TClonesArray.h>
00023 #include <TObjString.h>
00024 //
00025 
00026 class UEAnalysisSelectorRootple : public TSelector {
00027 public :
00028    TTree          *fChain;   
00029 
00030    // Declaration of leaf types
00031    Int_t           EventKind;
00032    TClonesArray    *MonteCarlo;
00033    TClonesArray    *Track;
00034    TClonesArray    *InclusiveJet;
00035    TClonesArray    *ChargedJet;
00036    TClonesArray    *TracksJet;
00037    TClonesArray    *CalorimeterJet;
00038    TClonesArray    *acceptedTriggers;
00039 
00040    // List of branches
00041    TBranch        *b_EventKind;   
00042    TBranch        *b_MonteCarlo;   
00043    TBranch        *b_Track;   
00044    TBranch        *b_InclusiveJet;   
00045    TBranch        *b_ChargedJet;   
00046    TBranch        *b_TracksJet;   
00047    TBranch        *b_CalorimeterJet;   
00048    TBranch        *b_acceptedTriggers;   
00049 
00050    UEAnalysisSelectorRootple(TTree * /*tree*/ =0) { }
00051    virtual ~UEAnalysisSelectorRootple() { }
00052    virtual Int_t   Version() const { return 2; }
00053    virtual void    Begin(TTree *tree);
00054    virtual void    SlaveBegin(TTree *tree);
00055    virtual void    Init(TTree *tree);
00056    virtual Bool_t  Notify();
00057    virtual Bool_t  Process(Long64_t entry);
00058    virtual Int_t   GetEntry(Long64_t entry, Int_t getall = 0) { return fChain ? fChain->GetTree()->GetEntry(entry, getall) : 0; }
00059    virtual void    SetOption(const char *option) { fOption = option; }
00060    virtual void    SetObject(TObject *obj) { fObject = obj; }
00061    virtual void    SetInputList(TList *input) { fInput = input; }
00062    virtual TList  *GetOutputList() const { return fOutput; }
00063    virtual void    SlaveTerminate();
00064    virtual void    Terminate();
00065 
00066    ClassDef(UEAnalysisSelectorRootple,0);
00067 
00068    TFile* hFile;
00069    
00070    float etaRegion;
00071    float ptThreshold;
00072    
00073    UEAnalysisUE * ue;
00074    UEAnalysisJets* jets;
00075    UEAnalysisMPI* mpi;
00076    
00077 };
00078 
00079 #endif
00080 
00081 #ifdef UEAnalysisSelectorRootple_cxx
00082 void UEAnalysisSelectorRootple::Init(TTree *tree)
00083 {
00084    // The Init() function is called when the selector needs to initialize
00085    // a new tree or chain. Typically here the branch addresses and branch
00086    // pointers of the tree will be set.
00087    // It is normally not necessary to make changes to the generated
00088    // code, but the routine can be extended by the user if needed.
00089    // Init() will be called many times when running on PROOF
00090    // (once per file to be processed).
00091 
00092    // Set object pointer
00093    MonteCarlo = 0;
00094    Track = 0;
00095    InclusiveJet = 0;
00096    ChargedJet = 0;
00097    TracksJet = 0;
00098    CalorimeterJet = 0;
00099    acceptedTriggers = 0;
00100    // Set branch addresses and branch pointers
00101    if (!tree) return;
00102    fChain = tree;
00103    fChain->SetMakeClass(1);
00104 
00105    fChain->SetBranchAddress("EventKind", &EventKind, &b_EventKind);
00106    fChain->SetBranchAddress("MonteCarlo", &MonteCarlo, &b_MonteCarlo);
00107    fChain->SetBranchAddress("Track", &Track, &b_Track);
00108    fChain->SetBranchAddress("InclusiveJet", &InclusiveJet, &b_InclusiveJet);
00109    fChain->SetBranchAddress("ChargedJet", &ChargedJet, &b_ChargedJet);
00110    fChain->SetBranchAddress("TracksJet", &TracksJet, &b_TracksJet);
00111    fChain->SetBranchAddress("CalorimeterJet", &CalorimeterJet, &b_CalorimeterJet);
00112    fChain->SetBranchAddress("acceptedTriggers", &acceptedTriggers, &b_acceptedTriggers);
00113 
00114 }
00115 
00116 Bool_t UEAnalysisSelectorRootple::Notify()
00117 {
00118    // The Notify() function is called when a new file is opened. This
00119    // can be either for a new TTree in a TChain or when when a new TTree
00120    // is started when using PROOF. It is normally not necessary to make changes
00121    // to the generated code, but the routine can be extended by the
00122    // user if needed. The return value is currently not used.
00123 
00124    return kTRUE;
00125 }
00126 
00127 #endif // #ifdef UEAnalysisSelectorRootple_cxx