////////////////////////////////////////////////////////// // This class has been automatically generated on // Sat Jan 21 16:04:20 2006 by ROOT version 4.00/08 // from TTree h22/semiout // found on file: zcorr.root ////////////////////////////////////////////////////////// #ifndef znevzat_h #define znevzat_h #include #include #include class znevzat { public : TTree *fChain; //!pointer to the analyzed TTree or TChain Int_t fCurrent; //!current Tree number in a TChain // Declaration of leave types Int_t npro; Int_t istat; Float_t prm; Float_t prt; Float_t prf; Float_t prz; Float_t gprm; Float_t gprt; Float_t gprf; Float_t gprz; Float_t rprm; Float_t rprt; Float_t rprf; Float_t rprz; // List of branches TBranch *b_npro; //! TBranch *b_istat; //! TBranch *b_prm; //! TBranch *b_prt; //! TBranch *b_prf; //! TBranch *b_prz; //! TBranch *b_gprm; //! TBranch *b_gprt; //! TBranch *b_gprf; //! TBranch *b_gprz; //! TBranch *b_rprm; //! TBranch *b_rprt; //! TBranch *b_rprf; //! TBranch *b_rprz; //! znevzat(TTree *tree=0); ~znevzat(); Int_t Cut(Int_t entry); Int_t GetEntry(Int_t entry); Int_t LoadTree(Int_t entry); void Init(TTree *tree); void Loop(); Bool_t Notify(); void Show(Int_t entry = -1); }; #endif #ifdef znevzat_cxx znevzat::znevzat(TTree *tree) { // if parameter tree is not specified (or zero), connect the file // used to generate this class and read the Tree. if (tree == 0) { TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("zcorr.root"); if (!f) { f = new TFile("zcorr.root"); } tree = (TTree*)gDirectory->Get("h22"); } Init(tree); } znevzat::~znevzat() { if (!fChain) return; delete fChain->GetCurrentFile(); } Int_t znevzat::GetEntry(Int_t entry) { // Read contents of entry. if (!fChain) return 0; return fChain->GetEntry(entry); } Int_t znevzat::LoadTree(Int_t entry) { // Set the environment to read one entry if (!fChain) return -5; Int_t centry = fChain->LoadTree(entry); if (centry < 0) return centry; if (fChain->IsA() != TChain::Class()) return centry; TChain *chain = (TChain*)fChain; if (chain->GetTreeNumber() != fCurrent) { fCurrent = chain->GetTreeNumber(); Notify(); } return centry; } void znevzat::Init(TTree *tree) { // The Init() function is called when the selector needs to initialize // a new tree or chain. Typically here the branch addresses of the tree // will be set. It is normaly not necessary to make changes to the // generated code, but the routine can be extended by the user if needed. // Init() will be called many times when running with PROOF. // Set branch addresses if (tree == 0) return; fChain = tree; fCurrent = -1; fChain->SetMakeClass(1); fChain->SetBranchAddress("npro",&npro); fChain->SetBranchAddress("istat",&istat); fChain->SetBranchAddress("prm",&prm); fChain->SetBranchAddress("prt",&prt); fChain->SetBranchAddress("prf",&prf); fChain->SetBranchAddress("prz",&prz); fChain->SetBranchAddress("gprm",&gprm); fChain->SetBranchAddress("gprt",&gprt); fChain->SetBranchAddress("gprf",&gprf); fChain->SetBranchAddress("gprz",&gprz); fChain->SetBranchAddress("rprm",&rprm); fChain->SetBranchAddress("rprt",&rprt); fChain->SetBranchAddress("rprf",&rprf); fChain->SetBranchAddress("rprz",&rprz); Notify(); } Bool_t znevzat::Notify() { // The Notify() function is called when a new file is opened. This // can be either for a new TTree in a TChain or when when a new TTree // is started when using PROOF. Typically here the branch pointers // will be retrieved. It is normaly not necessary to make changes // to the generated code, but the routine can be extended by the // user if needed. // Get branch pointers b_npro = fChain->GetBranch("npro"); b_istat = fChain->GetBranch("istat"); b_prm = fChain->GetBranch("prm"); b_prt = fChain->GetBranch("prt"); b_prf = fChain->GetBranch("prf"); b_prz = fChain->GetBranch("prz"); b_gprm = fChain->GetBranch("gprm"); b_gprt = fChain->GetBranch("gprt"); b_gprf = fChain->GetBranch("gprf"); b_gprz = fChain->GetBranch("gprz"); b_rprm = fChain->GetBranch("rprm"); b_rprt = fChain->GetBranch("rprt"); b_rprf = fChain->GetBranch("rprf"); b_rprz = fChain->GetBranch("rprz"); return kTRUE; } void znevzat::Show(Int_t entry) { // Print contents of entry. // If entry is not specified, print current entry if (!fChain) return; fChain->Show(entry); } Int_t znevzat::Cut(Int_t entry) { // This function may be called from Loop. // returns 1 if entry is accepted. // returns -1 otherwise. return 1; } #endif // #ifdef znevzat_cxx