ROOT logo
ROOT » PROOF » PROOF » TDSet

class TDSet: public TNamed


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.


Function Members (Methods)

public:
TDSet()
TDSet(const TChain& chain, Bool_t withfriends = kTRUE)
TDSet(const char* name, const char* objname = "*", const char* dir = "/", const char* type = 0)
virtual~TDSet()
voidTObject::AbstractMethod(const char* method) const
virtual Bool_tAdd(TDSet* set)
virtual Bool_tAdd(TFileInfo* fileinfo, const char* meta = 0)
virtual Bool_tAdd(TCollection* fileinfo, const char* meta = 0, Bool_t availableOnly = kFALSE, TCollection* badlist = 0)
virtual Bool_tAdd(const char* file, const char* objname = 0, const char* dir = 0, Long64_t first = 0, Long64_t num = -1, const char* msd = 0)
virtual voidAddFriend(TDSet* friendset, const char* alias)
voidAddInput(TObject* obj)
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
static TClass*TNamed::Class()
static TClass*TObject::Class()
virtual const char*TObject::ClassName() const
virtual voidTNamed::Clear(Option_t* option = "")
virtual voidTObject::Clear(Option_t* = "")
voidClearInput()
virtual TObject*TNamed::Clone(const char* newname = "") const
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual Int_tTObject::Compare(const TObject* obj) const
virtual voidTNamed::Copy(TObject& named) const
virtual voidTObject::Copy(TObject& object) const
TDSetElement*Current() const
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidDraw(Option_t* opt)
virtual voidTObject::Draw(Option_t* option = "")
virtual Long64_tDraw(const char* varexp, const char* selection, Option_t* option = "", Long64_t nentries = -1, Long64_t firstentry = 0)MENU
virtual Long64_tDraw(const char* varexp, const TCut& selection, Option_t* option = "", Long64_t nentries = -1, Long64_t firstentry = 0)MENU
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
Bool_tElementsValid()
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
Int_tExportFileList(const char* filepath, Option_t* opt = "")
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual voidTNamed::FillBuffer(char*& buffer)
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
const char*GetDirectory() const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
static Long64_tGetEntries(Bool_t isTree, const char* filename, const char* path, TString& objname)
TObject*GetEntryList() const
virtual const char*TObject::GetIconName() const
TList*GetListOfElements() const
virtual const char*TNamed::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
const char*GetObjName() const
virtual Option_t*TObject::GetOption() const
TObject*GetOutput(const char* name)
TList*GetOutputList()
virtual const char*TNamed::GetTitle() const
virtual const char*TObject::GetTitle() const
virtual TTree*GetTreeHeader(TProof* proof)
const char*GetType() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::Hash() const
virtual ULong_tTObject::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTNamed::IsSortable() const
virtual Bool_tTObject::IsSortable() const
Bool_tIsTree() const
Bool_tIsValid() const
Bool_tTObject::IsZombie() const
voidLookup(Bool_t removeMissing = kFALSE, TList** missingFiles = 0)
virtual voidTNamed::ls(Option_t* option = "") const
virtual voidTObject::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual TDSetElement*Next(Long64_t totalEntries = -1)
virtual Bool_tTObject::Notify()
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
TNamed&TNamed::operator=(const TNamed& rhs)
TObject&TObject::operator=(const TObject& rhs)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidPrint(Option_t* option = "") const
virtual voidTNamed::Print(Option_t* option = "") const
virtual voidTObject::Print(Option_t* option = "") const
virtual Long64_tProcess(const char* selector, Option_t* option = "", Long64_t nentries = -1, Long64_t firstentry = 0, TObject* enl = 0)MENU
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
Int_tRemove(TDSetElement* elem, Bool_t deleteElem = kTRUE)
virtual voidReset()
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
voidSetDirectory(const char* dir)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
virtual voidSetEntryList(TObject* aList)
voidSetLookedUp()
virtual voidTNamed::SetName(const char* name)MENU
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
static voidTObject::SetObjectStat(Bool_t stat)
voidSetObjName(const char* objname)
virtual voidTNamed::SetTitle(const char* title = "")MENU
virtual voidTObject::SetUniqueID(UInt_t uid)
voidSetWriteV3(Bool_t on = kTRUE)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidTNamed::ShowMembers(TMemberInspector& insp, char* parent)
virtual voidTObject::ShowMembers(TMemberInspector& insp, char* parent)
virtual Int_tTNamed::Sizeof() const
virtual voidStartViewer()MENU
virtual voidStreamer(TBuffer& b)
virtual voidTNamed::Streamer(TBuffer& b)
virtual voidTObject::Streamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
voidValidate()
voidValidate(TDSet* dset)
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()
private:
TDSet(const TDSet&)
voidoperator=(const TDSet&)
voidSplitEntryList()

Data Members

private:
enum EStatusBits { kWriteV3
kEmpty
kValidityChecked
kSomeInvalid
};
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
protected:
TDSetElement*fCurrent! current element
TStringTNamed::fNameobject identifier
TStringTNamed::fTitleobject title
private:
TStringfDirname of the directory
THashList*fElements-> list of TDSetElements
TObject*fEntryList! entry (or event) list for processing
Bool_tfIsTreetrue if type is a TTree (or TTree derived)
TIter*fIterator! iterator on fElements
TStringfObjNamename of objects to be analyzed (e.g. TTree name)
TProofChain*fProofChain! for browsing purposes
TStringfTypetype of objects (e.g. TTree);

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TDSetElement * Next(Long64_t totalEntries = -1)
 Returns next TDSetElement.
TDSet()
 Default ctor.
TDSet(const char* name, const char* objname = "*", const char* dir = "/", const char* type = 0)
 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.
TDSet(const TChain& chain, Bool_t withfriends = kTRUE)
 Create a named TDSet object from existing TChain 'chain'.
 If 'withfriends' is kTRUE add also friends.
 This constructor substituted the static methods TChain::MakeTDSet
 removing any residual dependence of 'tree' on 'proof'.
~TDSet()
 Cleanup.
Long64_t Process(const char* selector, Option_t* option = "", Long64_t nentries = -1, Long64_t firstentry = 0, TObject* enl = 0)
 Process TDSet on currently active PROOF session.
 The last argument 'enl' specifies an entry- or event-list to be used as
 event selection.
 The return value is -1 in case of error and TSelector::GetStatus() in
 in case of success.
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(Option_t* option = "") 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 = 0, const char* dir = 0, Long64_t first = 0, Long64_t num = -1, const char* msd = 0)
 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.
Bool_t Add(TDSet* set)
 Add specified data set to the this set.
Bool_t Add(TCollection* fileinfo, const char* meta = 0, Bool_t availableOnly = kFALSE, TCollection* badlist = 0)
 Add files passed as list of TFileInfo, TUrl or TObjString objects .
 If TFileInfo, the first entry and the number of entries are also filled.
 The argument 'meta' can be used to specify one of the subsets in the
 file as described in the metadata of TFileInfo. By default the first one
 is taken.
 If 'availableOnly' is true only files available ('staged' and non corrupted)
 are taken: those not satisfying this requirement are added to 'badlist', if
 the latter is defined. By default availableOnly is false.
Bool_t Add(TFileInfo* fileinfo, const char* meta = 0)
 Add file described by 'fi' to list of files to be analyzed.
 The argument 'meta' can be used to specify a subsets in the
 file as described in the metadata of TFileInfo. By default the first one
 is taken.
Int_t ExportFileList(const char* filepath, 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, TString& objname)
 Returns number of entries in tree or objects in file. Returns -1 in
 case of error.
Long64_t Draw(const char *varexp, const TCut &selection, Option_t *option, Long64_t nentries, Long64_t firstentry)
 Draw expression varexp for specified entries.
 Returns -1 in case of error or number of selected events in case of success.
 This function accepts a TCut objects as argument.
 Use the operator+ to concatenate cuts.
 Example:
   dset.Draw("x",cut1+cut2+cut3);
Long64_t Draw(const char *varexp, const char *selection, Option_t *option, Long64_t nentries, Long64_t firstentry)
 Draw expression varexp for specified entries.
 Returns -1 in case of error or number of selected events in case of success.
 For more see TTree::Draw().
void StartViewer()
 Start the TTreeViewer on this TTree.
TTree* GetTreeHeader(TProof* proof)
 Returns a tree header containing the branches' structure of the dataset.
Bool_t ElementsValid()
 Check if all elements are valid.
Int_t Remove(TDSetElement* elem, Bool_t deleteElem = kTRUE)
 Remove TDSetElement 'elem' from the list.
 Return 0 on success, -1 if the element is not in the list
void Validate()
 Validate the TDSet by opening files.
void Lookup(Bool_t removeMissing = kFALSE, TList** missingFiles = 0)
 Resolve the end-point URL for the current elements of this data set
 If the removeMissing option is set to kTRUE, remove the TDSetElements
 that can not be located.
 The method returns the list of removed TDSetElements in *listOfMissingFiles
 if the latter is defined (the list must be created outside).
void SetLookedUp()
 Flag all the elements as looked-up, so to avoid opening the files
 if the functionality is not supported
void Validate(TDSet* dset)
 Validate the TDSet against another TDSet.
 Only validates elements in common from input TDSet.
void Streamer(TBuffer& b)
 Stream an object of class TDSet.
void SetWriteV3(Bool_t on = kTRUE)
 Set/Reset the 'OldStreamer' bit in this instance and its elements.
 Needed for backward compatibility in talking to old client / masters.
void SetEntryList(TObject* aList)
 Set entry (or event) list for this data set
void SplitEntryList()
 Splits the main entry (or event) list into sub-lists for the elements of
 thet data set
TDSetElement& operator=(const TDSet& )
const char * GetObjName() const
{ return GetTitle(); }
const char * GetDirectory() const
TObject * GetEntryList() const
{ return fEntryList; }
TDSet(const TDSet& )
Long64_t Draw(const char *varexp, const char *selection, Option_t *option = "", Long64_t nentries = -1, Long64_t firstentry = 0)
Bool_t IsTree() const
{ return fIsTree; }
Bool_t IsValid() const
{ return !fType.IsNull(); }
const char * GetType() const
{ return fType; }
TList * GetListOfElements() const
{ return (TList *)fElements; }
TDSetElement * Current() const
{ return fCurrent; }