From 2c3d6b6d72a45fd6a1db0e0591d60253ca2d95da Mon Sep 17 00:00:00 2001 From: Philippe Canal <pcanal@fnal.gov> Date: Mon, 18 Sep 2006 15:13:51 +0000 Subject: [PATCH] Remove warnings following the introduction of TTree::GetEntries(const char*). Fix code conventions violations git-svn-id: http://root.cern.ch/svn/root/trunk@16290 27541ba8-7e3a-0410-8455-c3a389f83636 --- tree/inc/TChain.h | 3 ++- tree/inc/TChainProof.h | 3 ++- tree/inc/TTreeSQL.h | 3 ++- tree/src/TChainProof.cxx | 10 +++++++- treeplayer/src/TSelectorEntries.cxx | 39 +++++++++++++++++++++++------ 5 files changed, 47 insertions(+), 11 deletions(-) diff --git a/tree/inc/TChain.h b/tree/inc/TChain.h index 84291167f50..f0c672afa07 100644 --- a/tree/inc/TChain.h +++ b/tree/inc/TChain.h @@ -1,4 +1,4 @@ -// @(#)root/tree:$Name: $:$Id: TChain.h,v 1.56 2006/07/13 05:41:37 pcanal Exp $ +// @(#)root/tree:$Name: $:$Id: TChain.h,v 1.57 2006/07/26 13:36:43 rdm Exp $ // Author: Rene Brun 03/02/97 /************************************************************************* @@ -88,6 +88,7 @@ public: virtual Long64_t GetChainEntryNumber(Long64_t entry) const; Int_t GetNtrees() const { return fNtrees; } virtual Long64_t GetEntries() const; + virtual Long64_t GetEntries(const char *sel) { return TTree::GetEntries(sel); } virtual Int_t GetEntry(Long64_t entry=0, Int_t getall=0); virtual Int_t GetEntryWithIndex(Int_t major, Int_t minor=0); TFile *GetFile() const; diff --git a/tree/inc/TChainProof.h b/tree/inc/TChainProof.h index ca42da355c1..1dfbdf7d17e 100644 --- a/tree/inc/TChainProof.h +++ b/tree/inc/TChainProof.h @@ -1,4 +1,4 @@ -// @(#)root/tree:$Name: $:$Id: TChainProof.h,v 1.6 2006/07/04 10:23:52 rdm Exp $ +// @(#)root/tree:$Name: $:$Id: TChainProof.h,v 1.7 2006/07/04 23:45:50 rdm Exp $ // Author: Marek Biskup 10/12/2004 /************************************************************************* @@ -103,6 +103,7 @@ public: Long64_t GetDebugMin() const {return fDebugMin;} TDirectory *GetDirectory() const {return fDirectory;} virtual Long64_t GetEntries() const; + virtual Long64_t GetEntries(const char *sel); virtual Long64_t GetEntriesFast() const {return fEntries;} virtual Long64_t GetEntriesFriend() const; virtual Long64_t GetEstimate() const { return fEstimate; } diff --git a/tree/inc/TTreeSQL.h b/tree/inc/TTreeSQL.h index fb95c1dcb0a..879ff0b9bf0 100644 --- a/tree/inc/TTreeSQL.h +++ b/tree/inc/TTreeSQL.h @@ -1,4 +1,4 @@ -// @(#)root/tree:$Name: $:$Id: TTreeSQL.h,v 1.3 2005/11/11 22:16:04 pcanal Exp $ +// @(#)root/tree:$Name: $:$Id: TTreeSQL.h,v 1.4 2006/05/13 19:21:52 brun Exp $ // Author: Rene Brun 12/01/96 /************************************************************************* @@ -85,6 +85,7 @@ public: virtual Int_t Fill(); virtual Int_t GetEntry(Long64_t entry=0, Int_t getall=0); virtual Long64_t GetEntries() const; + virtual Long64_t GetEntries(const char *sel) { return TTree::GetEntries(sel); } virtual Long64_t GetEntriesFast()const; TString GetTableName(){ return fTable; } virtual Long64_t LoadTree(Long64_t entry); diff --git a/tree/src/TChainProof.cxx b/tree/src/TChainProof.cxx index 4c7f9f82856..9cd969afd8f 100644 --- a/tree/src/TChainProof.cxx +++ b/tree/src/TChainProof.cxx @@ -1,4 +1,4 @@ -// @(#)root/tree:$Name: $:$Id: TChainProof.cxx,v 1.7 2006/07/05 17:24:57 brun Exp $ +// @(#)root/tree:$Name: $:$Id: TChainProof.cxx,v 1.8 2006/08/06 07:15:00 rdm Exp $ // Author: Marek Biskup 10/3/2005 /************************************************************************* @@ -875,6 +875,14 @@ Long64_t TChainProof::GetEntries() const return (fTree ? fTree->GetMaxEntryLoop() : (Long64_t)(-1)); // this was used for holding the total number of entries } +//______________________________________________________________________________ +Long64_t TChainProof::GetEntries(const char *sel) +{ + // See TTree::GetEntries(const char *selection) + + return (fTree ? fTree->GetEntries(sel) : (Long64_t)(-1)); +} + //______________________________________________________________________________ void TChainProof::Progress(Long64_t total, Long64_t processed) { diff --git a/treeplayer/src/TSelectorEntries.cxx b/treeplayer/src/TSelectorEntries.cxx index 3cf1b0b5451..a1c78383b86 100644 --- a/treeplayer/src/TSelectorEntries.cxx +++ b/treeplayer/src/TSelectorEntries.cxx @@ -1,8 +1,24 @@ -#define TSelectorEntries_cxx -// The class definition in TSelectorEntries.h has been generated automatically -// by the ROOT utility TTree::MakeSelector(). This class is derived -// from the ROOT class TSelector. For more information on the TSelector -// framework see $ROOTSYS/README/README.SELECTOR or the ROOT User Manual. +// @(#)root/treeplayer:$Name: $:$Id: TSelectorDraw.cxx,v 1.63 2006/08/06 07:15:01 rdm Exp $ +// Author: Philippe Canal 09/06/2006 + +/************************************************************************* + * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * + * All rights reserved. * + * * + * For the licensing terms see $ROOTSYS/LICENSE. * + * For the list of contributors see $ROOTSYS/README/CREDITS. * + *************************************************************************/ + +////////////////////////////////////////////////////////////////////////// +// // +// TSelectorEntries // +// // +// // +////////////////////////////////////////////////////////////////////////// + +// The class is derived from the ROOT class TSelector. For more +// information on the TSelector framework see +// $ROOTSYS/README/README.SELECTOR or the ROOT User Manual. // The following methods are defined in this file: // Begin(): called everytime a loop on the tree starts, @@ -27,6 +43,7 @@ #include "TTreeFormula.h" #include "TSelectorScalar.h" +//______________________________________________________________________________ TSelectorEntries::TSelectorEntries(TTree *tree, const char *selection) : fChain(tree), fSelect(0), fSelectedRows(0), fSelectMultiple(kFALSE) { @@ -37,6 +54,7 @@ TSelectorEntries::TSelectorEntries(TTree *tree, const char *selection) : } } +//______________________________________________________________________________ TSelectorEntries::TSelectorEntries(const char *selection) : fSelect(0), fSelectedRows(0), fSelectMultiple(kFALSE) { @@ -45,6 +63,7 @@ TSelectorEntries::TSelectorEntries(const char *selection) : TSelectorEntries::SetSelection(selection); } +//______________________________________________________________________________ TSelectorEntries::~TSelectorEntries() { // Destructor. @@ -52,6 +71,7 @@ TSelectorEntries::~TSelectorEntries() delete fSelect; fSelect = 0; } +//______________________________________________________________________________ void TSelectorEntries::Begin(TTree *tree) { // The Begin() function is called at the start of the query. @@ -62,6 +82,7 @@ void TSelectorEntries::Begin(TTree *tree) fChain = tree; } +//______________________________________________________________________________ void TSelectorEntries::SlaveBegin(TTree *tree) { // The SlaveBegin() function is called after the Begin() function. @@ -86,7 +107,7 @@ void TSelectorEntries::SlaveBegin(TTree *tree) } //______________________________________________________________________________ -void TSelectorEntries::Init(TTree *tree) +void TSelectorEntries::Init(TTree * /* tree */) { // The Init() function is called when the selector needs to initialize // a new tree or chain. Typically here the branch addresses and branch @@ -107,7 +128,8 @@ Bool_t TSelectorEntries::Notify() return kTRUE; } -Bool_t TSelectorEntries::Process(Long64_t entry) +//______________________________________________________________________________ +Bool_t TSelectorEntries::Process(Long64_t /* entry */) { // The Process() function is called for each entry in the tree (or possibly // keyed object in the case of PROOF) to be processed. The entry argument @@ -161,6 +183,7 @@ Bool_t TSelectorEntries::Process(Long64_t entry) return kTRUE; } +//______________________________________________________________________________ void TSelectorEntries::SetSelection(const char *selection) { if (!fInput) { @@ -174,6 +197,7 @@ void TSelectorEntries::SetSelection(const char *selection) cselection->SetTitle(selection); } +//______________________________________________________________________________ void TSelectorEntries::SlaveTerminate() { // The SlaveTerminate() function is called after all entries or objects @@ -183,6 +207,7 @@ void TSelectorEntries::SlaveTerminate() fOutput->Add(new TSelectorScalar("fSelectedRows",fSelectedRows)); } +//______________________________________________________________________________ void TSelectorEntries::Terminate() { // The Terminate() function is the last function to be called during -- GitLab