library: libTree #include "TDSet.h" |
TDSet
class description - header file - source file - inheritance tree (.pdf)
private:
TDSet(const TDSet&)
void operator=(const TDSet&)
public:
TDSet()
TDSet(const char* name, const char* objname = "*", const char* dir = "/", const char* type = "0")
virtual ~TDSet()
virtual Bool_t Add(const char* file, const char* objname = "0", const char* dir = "0", Long64_t first = 0, Long64_t num = -1, const char* msd = "0")
virtual Bool_t Add(TDSet* set)
virtual Bool_t Add(TList* fileinfo)
virtual void AddFriend(TDSet* friendset, const char* alias)
void AddInput(TObject* obj)
static TClass* Class()
void ClearInput()
TDSetElement* Current() const
virtual Int_t Draw(const char* varexp, const char* selection, Option_t* option = "", Long64_t nentries = -1, Long64_t firstentry = 0)
virtual Int_t Draw(const char* varexp, const TCut& selection, Option_t* option = "", Long64_t nentries = -1, Long64_t firstentry = 0)
virtual void Draw(Option_t* opt)
Bool_t ElementsValid() const
Int_t ExportFileList(const char* filepath, Option_t* opt = "")
const char* GetDirectory() const
static Long64_t GetEntries(Bool_t isTree, const char* filename, const char* path, const char* objname)
TEventList* GetEventList() const
TList* GetListOfElements() const
const char* GetObjName() const
TObject* GetOutput(const char* name)
TList* GetOutputList()
virtual TTree* GetTreeHeader(TVirtualProof* proof)
const char* GetType() const
virtual TClass* IsA() const
Bool_t IsTree() const
Bool_t IsValid() const
virtual TDSetElement* Next(Long64_t totalEntries = -1)
virtual void Print(Option_t* option = "") const
virtual Int_t Process(const char* selector, Option_t* option = "", Long64_t nentries = -1, Long64_t firstentry = 0, TEventList* evl = 0)
virtual void Reset()
void SetDirectory(const char* dir)
virtual void SetEventList(TEventList* evl)
void SetObjName(const char* objname)
virtual void ShowMembers(TMemberInspector& insp, char* parent)
virtual void StartViewer()
virtual void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
void Validate()
void Validate(TDSet* dset)
private:
TString fDir name of the directory
TString fType type of objects (e.g. TTree);
TString fObjName name of objects to be analyzed (e.g. TTree name)
TList* fElements -> list of TDSetElements
Bool_t fIsTree true if type is a TTree (or TTree derived)
TIter* fIterator ! iterator on fElements
TEventList* fEventList ! event list for processing
protected:
TDSetElement* fCurrent ! current element
TDSet
This class implements a data set to be used for PROOF processing.
The TDSet defines the class of which objects will be processed,
the directory in the file where the objects of that type can be
found and the list of files to be processed. The files can be
specified as logical file names (LFN's) or as physical file names
(PFN's). In case of LFN's the resolution to PFN's will be done
according to the currently active GRID interface.
Examples:
TDSet treeset("TTree", "AOD");
treeset.Add("lfn:/alien.cern.ch/alice/prod2002/file1");
...
treeset.AddFriend(friendset);
or
TDSet objset("MyEvent", "*", "/events");
objset.Add("root://cms.cern.ch/user/prod2002/hprod_1.root");
...
objset.Add(set2003);
Validity of file names will only be checked at processing time
(typically on the PROOF master server), not at creation time.
TDSet(const char *name, const char *objname, const char *dir, const char *type)
Create a named TDSet object. The "type" defines the class of which objects
will be processed (default 'TTree'). The optional "objname" argument
specifies the name of the objects of the specified class.
If the "objname" is not given the behaviour depends on the 'type':
for 'TTree' the first TTree is analyzed; for other types, all objects of
the class found in the specified directory are processed.
The "dir" argument specifies in which directory the objects are
to be found, the top level directory ("/") is the default.
Directories can be specified using wildcards, e.g. "*" or "/*"
means to look in all top level directories, "/dir/*" in all
directories under "/dir", and "/*/*" to look in all directories
two levels deep.
For backward compatibility the type can also be passed via 'name',
in which case 'type' is ignored.
TObject * GetOutput(const char *name)
Get specified object that has been produced during the processing
(see Process()).
void SetObjName(const char *objname)
Set/change object name.
Bool_t Add(const char *file, const char *objname, const char *dir, Long64_t first, Long64_t num, const char *msd)
Add file to list of files to be analyzed. Optionally with the
objname and dir arguments the default, TDSet wide, objname and
dir can be overridden.
Int_t ExportFileList(const char *fpath, Option_t *opt)
Export TDSetElements files as list of TFileInfo objects in file
'fpath'. If the file exists already the action fails, unless
'opt == "F"'.
Return 0 on success, -1 otherwise
void AddFriend(TDSet *friendset, const char* alias)
Add friend dataset to this set. Only possible if the TDSet type is
a TTree or derived class. The friendset will be owned by this class
and deleted in its destructor.
void Reset()
Reset or initialize access to the elements.
Long64_t GetEntries(Bool_t isTree, const char *filename, const char *path, const char *objname)
Returns number of entries in tree or objects in file. Returns -1 in
case of error.
Int_t Draw(const char *varexp, const TCut &selection, Option_t *option, Long64_t nentries, Long64_t firstentry)
Draw expression varexp for specified entries.
This function accepts a TCut objects as argument.
Use the operator+ to concatenate cuts.
Example:
dset.Draw("x",cut1+cut2+cut3);
Author: Fons Rademakers 11/01/02
Last update: root/tree:$Name: $:$Id: TDSet.cxx,v 1.33 2006/06/27 14:56:57 brun Exp $
Copyright (C) 1995-2001, Rene Brun and Fons Rademakers. *
ROOT page - Class index - Class Hierarchy - 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.