TDSet


class description - source file - inheritance tree

class TDSet : public TNamed


    protected:
Int_t GridAdd(const char* file, const char* objname = "0", const char* dir = "0", Long64_t first = 0, Long64_t num = -1) void GridAddElementMsn(TDSetElementPfn* dsepfn) public:
TDSet() TDSet(const char* type, const char* objname = "*", const char* dir = "/") TDSet(const TDSet&) 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) virtual Bool_t Add(TDSet* set) virtual void AddFriend(TDSet* friendset) void AddInput(TObject* obj) virtual Bool_t AddQuery(const char* path, const char* file, const char* conditions = "0") static TClass* Class() void ClearInput() virtual Bool_t Connect() TDSetElement* Current() const virtual void Draw(Option_t*) 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) const char* GetDirectory() const static Long64_t GetEntries(Bool_t isTree, const char* filename, const char* path, const char* objname) TList* GetListOfElements() const TList* GetListOfElementsMsn() const const char* GetObjName() const TObject* GetOutput(const char* name) TList* GetOutputList() const char* GetType() const virtual void GridPack() virtual void GridPrintPackList() virtual TClass* IsA() const Bool_t IsTree() const Bool_t IsValid() const virtual TDSetElement* Next() 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 Bool_t Request() virtual void Reset() void SetDirectory(const char* dir) void SetObjName(const char* objname) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members

    private:
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 TList* fElementsMsn -> list of mass storage names and the located files protected:
TDSetElement* fCurrent ! current element


See also

TDSetProxy

Class Description

                                                                      
 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()
 Default ctor.

TDSet(const char *type, const char *objname, const char *dir)
 Create a TDSet object. The "type" defines the class of which objects
 will be processed. The optional "objname" argument specifies the
 name of the objects of the specified class (the name is mandatory
 if the type inherits from a TTree). If the "objname" is not given 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.

~TDSet()
 Cleanup.

Bool_t Request()
 Request a connection to a GRID based PROOF.

Bool_t Connect()
 Connect to GRID based PROOF.

Int_t Process(const char *selector, Option_t *option, Long64_t nentries, Long64_t first, TEventList *evl)
 Process TDSet on currently active PROOF session.
 Returns -1 in case of error, 0 otherwise.

void AddInput(TObject *obj)
 Add objects that might be needed during the processing of
 the selector (see Process()).

void ClearInput()
 Clear input object list.

TObject* GetOutput(const char *name)
 Get specified object that has been produced during the processing
 (see Process()).

TList* GetOutputList()
 Get list with all object created during processing (see Process()).

void Print(const Option_t *opt) const
 Print TDSet basic or full data. When option="a" print full data.

void SetObjName(const char *objname)
 Set/change object name.

void SetDirectory(const char *dir)
 Set/change directory.

Bool_t Add(const char *file, const char *objname, const char *dir, Long64_t first, Long64_t num)
 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 GridAdd(const char *lfn, const char *objname, const char *dir, Long64_t first, Long64_t num)
 Resolve logical file names using TGrid methods. Returns 1 on success,
 0 if there is no grid, -1 if the grid could not resolve the name.

Bool_t Add(TDSet *set)
 Add specified data set to the this set.

void AddFriend(TDSet *friendset)
 Add friend dataset to this set. Only possible if the TDSet type is
 a TTree or derived class.

void Reset()
 Reset or initialize access to the elements.

TDSetElement* Next()
 Returns next TDSetElement.

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);

Int_t Draw(const char *varexp, const char *selection, Option_t *option, Long64_t nentries, Long64_t firstentry)
 Draw expression varexp for specified entries.
 See TTree::Draw().

Bool_t AddQuery(const char *path, const char *file, const char *conditions)
 Queries the connected GRID catalog for the file.

void GridPack()
 Pack a data set corresponding to the mass storage name for
 PROOF processing on the Grid.

void GridPrintPackList()
 Print list of files per mass storage device.

void GridAddElementMsn(TDSetElementPfn *dsepfn)
 Assign a physical file name to a Msn of the mass storage name list.



Inline Functions


                Int_t Draw(const char* varexp, const TCut& selection, Option_t* option, Long64_t nentries = -1, Long64_t firstentry = 0)
               Bool_t IsTree() const
               Bool_t IsValid() const
          const char* GetType() const
          const char* GetObjName() const
          const char* GetDirectory() const
               TList* GetListOfElements() const
               TList* GetListOfElementsMsn() const
        TDSetElement* Current() const
              TClass* Class()
              TClass* IsA() const
                 void ShowMembers(TMemberInspector& insp, char* parent)
                 void Streamer(TBuffer& b)
                 void StreamerNVirtual(TBuffer& b)
                TDSet TDSet(const TDSet&)


Author: Fons Rademakers 11/01/02
Last update: root/tree:$Name: $:$Id: TDSet.cxx,v 1.10 2003/11/15 19:11:47 rdm Exp $
Copyright (C) 1995-2001, Rene Brun and Fons Rademakers. *


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.