//*CMZ : 2.23/12 26/01/2000 09.54.23 by Rene Brun
//*CMZ : 2.23/03 11/09/99 19.37.30 by Rene Brun
//*CMZ : 2.22/01 26/04/99 11.51.22 by Rene Brun
//*CMZ : 1.03/09 03/03/99 14.18.31 by Fons Rademakers
//*-- Author : Rene Brun 05/02/97
//*KEEP,CopyRight,T=C.
/*************************************************************************
* 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. *
*************************************************************************/
//*KEND.
//////////////////////////////////////////////////////////////////////////
// //
// A TSelector object is used by the TTree::Draw, TTree::Scan, //
// TTree::Loop to navigate in a TTree and make selections. //
// //
// The following members functions are called by the TTree functions. //
// Init: to initialize the selector //
// Start: called everytime a loop on the tree starts. //
// a convenient place to create your histograms. //
// Finish: called at the end of a loop on a TTree. //
// a convenient place to draw/fit your histograms. //
// BeginFile: called when a TChain is processed at the begining of //
// of a new file. //
// EndFile: called when a TChain is processed at the end of a file.// //
// Execute: called for each selected entry. //
// //
//////////////////////////////////////////////////////////////////////////
//*KEEP,TSelector,T=C++.
#include "TSelector.h"
//*KEEP,TTree.
#include "TTree.h"
//*KEEP,TFile.
#include "TFile.h"
//*KEND.
ClassImp(TSelector)
//______________________________________________________________________________
TSelector::TSelector(): TNamed()
{
// Default constructor for a Selector.
}
//______________________________________________________________________________
TSelector::TSelector(const char *name, const char *title)
:TNamed(name,title)
{
// Create a Selector.
}
//______________________________________________________________________________
TSelector::~TSelector()
{
// Destructor for a Selector.
}
//______________________________________________________________________________
void TSelector::BeginFile()
{
// Called by TTree::Loop when a new file begins in a TChain.
printf("%s::BeginFile called for file: %sn",GetName(),fTree->GetCurrentFile()->GetName());
}
//______________________________________________________________________________
void TSelector::EndFile()
{
// Called by TTree::Loop when a file ends in a TChain.
printf("%s::EndFile called for file: %sn",GetName(),fTree->GetCurrentFile()->GetName());
}
//______________________________________________________________________________
void TSelector::Execute(TTree *tree, Int_t entry)
{
// Process entry number entry.
tree->GetEntry(entry);
}
//______________________________________________________________________________
void TSelector::Finish(Option_t *)
{
// Called at the end of TTree::Loop.
printf("%s::Finish calledn",GetName());
}
//______________________________________________________________________________
void TSelector::Init(TTree *tree, Option_t *)
{
// Called to initialize/reinitialize the selector.
fTree = tree;
}
//______________________________________________________________________________
void TSelector::Start(Option_t *)
{
// Called at the begining of TTree::Loop.
printf("%s::Start calledn",GetName());
}
ROOT page - Class index - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.