46 #if defined(R__MACOSX)
80 Info(
"TEventIter",
"fPackets list '%s' created", n.
Data());
82 Warning(
"TEventIter",
"fPackets list could not be created");
90 : fDSet(dset), fSel(sel)
113 Info(
"TEventIter",
"fPackets list '%s' created", n.
Data());
115 Warning(
"TEventIter",
"fPackets list could not be created");
154 }
else if (dset->
IsTree()) {
194 if (dirsave) dirsave->
cd();
198 Error(
"Process",
"Cannot open file: %s (%s)",
201 Error(
"Process",
"Cannot open file: %s (errno unavailable)",
216 Error(
"Process",
"Cannot cd to: %s",
222 if (dirsave) dirsave->
cd();
290 PDB(kLoop, 2)
Info(
"GetNextPacket",
"bytes written: %lld", bytesWritten);
292 fOldBytesRead = totBytesWritten;
325 Error(
"GetNextPacket",
"data element must be set to kEmtpy");
331 if (num == 0)
return -1;
353 PDB(kLoop, 2)
Info(
"GetNextEvent",
"bytes written: %lld", bytesWritten);
355 fOldBytesRead = totBytesWritten;
388 Error(
"GetNextEvent",
"data element must be set to kEmtpy");
470 Error(
"GetNextPacket",
"entry- or event-list not available");
488 }
else if ( r == 1 ) {
511 Error(
"GetNextPacket",
"First (%lld) higher then number of keys (%lld) in %s",
520 Error(
"GetNextPacket",
"Num (%lld) + First (%lld) larger then number of keys (%lld) in %s",
553 if (dirsave) dirsave->
cd();
585 Error(
"GetNextEvent",
"Entry- or event-list not available");
603 }
else if ( r == 1 ) {
626 Error(
"GetNextEvent",
"First (%lld) higher then number of keys (%lld) in %s",
635 Error(
"GetNextEvent",
"Num (%lld) + First (%lld) larger then number of keys (%lld) in %s",
666 :
TNamed(name,
""), fUsed(
kFALSE), fIsLocal(islocal), fFile(f)
680 tree = (
TTree *)fTrees->After(tree);
772 if (main && main !=
fTree) {
788 Info(
"GetTrees",
"the tree cache is in learning phase");
791 Warning(
"GetTrees",
"default tree does nto have a file attached: corruption? Tree cache untouched");
807 TString uo(uf.GetOptions()), alias;
809 if ((from = uo.Index(
"friend_alias=")) !=
kNPOS) {
810 from += strlen(
"friend_alias=");
811 if (!uo.Tokenize(alias, from,
"|"))
812 Warning(
"GetTrees",
"empty 'friend_alias' found for tree friend");
819 if (friendTree && main) {
827 if (fe->
GetTree() == friendTree) {
864 Error(
"Load",
"undefined element");
871 if (objname && strlen(objname) > 0) {
876 if (!tn || (tn && strlen(tn) <= 0)) tn =
"*";
879 Info(
"Load",
"loading: fn:'%s' dn:'%s' tn:'%s'", fn, dn, tn);
888 while (names.
Tokenize(name,from,
"|")) {
911 Error(
"Load",
"file '%s' ('%s') could not be open", fn, fname.
Data());
915 #if defined(R__MACOSX)
918 fcntl(f->
GetFd(), F_NOCACHE, 1);
929 Info(
"Load",
"file '%s' already open (local:%d)", fn, localfile);
935 if (!strcmp(tn,
"*"))
948 Error(
"Load",
"Cannot get to: %s", dn);
952 Info(
"Load",
"got directory: %s", dn);
967 while ((k = (
TKey *) nxk())) {
968 if (!strcmp(k->GetClassName(),
"TTree")) {
970 if (kn.Index(re) !=
kNPOS) {
982 Error(
"Load",
"Cannot find tree \"%s\" in %s", tn, fn);
986 PDB(kLoop,2)
Info(
"Load",
"Reading: %s", tn);
992 Error(
"Load",
"Cannot <dynamic_cast> obj to tree \"%s\"", tn);
1000 Info(
"Load",
"TFileTree for '%s' flagged as 'in-use' ...", ft->
GetName());
1035 fOldBytesRead = totBytesRead;
1069 if (newTree !=
fTree) {
1107 Error(
"GetNextPacket",
"first (%lld) higher then number of entries (%lld) in %s",
1115 Error(
"GetNextPacket",
"num (%lld) + first (%lld) larger then number of entries (%lld) in %s",
1131 PDB(kLoop,1)
Info(
"GetNextPacket",
"call Init(%p) and Notify()",
fTree);
1182 Warning(
"PreEventProcess",
"problems setting entry in TTree");
1207 fOldBytesRead = totBytesRead;
1245 if (newTree !=
fTree) {
1280 Error(
"GetNextEvent",
"first (%lld) higher then number of entries (%lld) in %s",
1288 Error(
"GetNextEvent",
"num (%lld) + first (%lld) larger then number of entries (%lld) in %s",
1304 PDB(kLoop,1)
Info(
"GetNextEvent",
"call Init(%p) and Notify()",
fTree);
virtual Bool_t cd(const char *path=0)
Change current directory to "this" directory.
virtual const char * BaseName(const char *pathname)
Base name of a file name. Base name of /user/root is root.
virtual TTree * GetTree()
Return pointer to friend TTree.
~TEventIterObj()
Destructor.
virtual TDSetElement * Next(Long64_t totalEntries=-1)
Returns next TDSetElement.
Long64_t GetCacheSize()
Return the size in bytes of the cache, if any Return -1 if not used.
Long64_t GetNextEvent()
Get next event.
virtual Bool_t Notify()
This method must be overridden to handle object notification.
virtual Int_t GetErrno() const
Method returning errno. Is overriden in TRFIOFile.
virtual TList * GetListOfKeys() const
ClassImp(TSeqCollection) Int_t TSeqCollection TIter next(this)
Return index of object in collection.
virtual TList * GetOutputList() const
const char * GetObjName() const
virtual void SetCacheRead(TFileCacheRead *cache, TObject *tree=0, ECacheAction action=kDisconnect)
Set a pointer to the read cache.
This class represents a WWW compatible URL.
TString & ReplaceAll(const TString &s1, const TString &s2)
This class implements a data set to be used for PROOF processing.
virtual void SetName(const char *name)
Change (i.e.
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
A specialized TFileCacheRead object for a TTree.
static Int_t SetParallelUnzip(TTreeCacheUnzip::EParUnzipMode option=TTreeCacheUnzip::kEnable)
Static function that (de)activates multithreading unzipping.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
Regular expression class.
ClassImp(TEventIter) TEventIter
Default constructor.
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
virtual void StopProcess(Bool_t abort)
Set flag to stop the process.
virtual void InvalidatePacket()
Invalidated the current packet (if any) by setting the TDSetElement::kCorrupted bit.
TFile * GetCurrentFile() const
Return pointer to the current file.
virtual void SetTree(const TTree *tree)
If a list for a tree with such name and filename exists, sets it as the current sublist If not...
Long64_t GetNextEvent()
Get next event.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual ~TEventIter()
Destructor.
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=1, Int_t netopt=0)
Create / open a file.
const char * GetObjName() const
virtual Int_t GetN() const
virtual TList * GetListOfFriends() const
const char * Data() const
virtual TKey * GetKey(const char *, Short_t=9999) const
TFileCacheRead * GetCacheRead(TObject *tree=0) const
Return a pointer to the current read cache.
Manages an element of a TDSet.
virtual Long64_t GetEntriesToProcess() const
Long64_t GetNextEvent()
Get next event.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString...
The TNamed class is the base class for all named ROOT classes.
Long64_t fEntryListPos
entry list for processing
virtual Long64_t LoadTree(Long64_t entry)
Set current entry.
static EFileType GetType(const char *name, Option_t *option="", TString *prefix=0)
Resolve the file type as a function of the protocol field in 'name'.
virtual Bool_t IsLearning() const
TList * fPackets
current position in the entrylist
static Long64_t GetFileBytesWritten()
Static function returning the total number of bytes written to all files.
void Info(const char *location, const char *msgfmt,...)
virtual void PreProcessEvent(Long64_t)
virtual TFriendElement * AddFriend(const char *treename, const char *filename="")
Add a TFriendElement to the list of friends.
Book space in a file, create I/O buffers, to fill them, (un)compress them.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual Long64_t GetEntryNumber(Long64_t)
void PreProcessEvent(Long64_t ent)
Actions to be done just before processing entry 'entry'.
Bool_t fTreeCacheIsLearning
Long64_t GetFirst() const
virtual Long64_t GetEntry(Int_t index) const
Return value of entry at index in the list.
virtual TList * GetListOfFriends() const
virtual void SetEntryRange(Long64_t emin, Long64_t emax)
Set the minimum and maximum entry number to be processed this information helps to optimize the numbe...
const char * GetFileName() const
TTree * GetTrees(TDSetElement *elem)
Create a Tree for the main TDSetElement and for all the friends.
R__EXTERN TSystem * gSystem
virtual Long64_t GetCacheSize() const
virtual Int_t GetValue(const char *name, Int_t dflt)
Returns the integer value for a resource.
virtual TObject * Remove(TObject *obj)
Remove object from the list.
Int_t fEventListPos
eventList for processing
Bool_t TestBit(UInt_t f) const
TObject * GetEntryList() const
virtual Long64_t GetEntry(Int_t index)
Return the number of the entry #index of this TEntryList in the TTree or TChain See also Next()...
A TEventList object is a list of selected events (entries) in a TTree.
Special iterator class used in TProofPlayer to iterate over events or objects in the packets...
virtual const char * GetName() const
Returns name of object.
Int_t GetNextPacket(Long64_t &first, Long64_t &num)
Get loop range.
void SetName(const char *name)
void Warning(const char *location, const char *msgfmt,...)
virtual TDirectory * GetDirectory(const char *apath, Bool_t printError=false, const char *funcname="GetDirectory")
Find a directory named "apath".
virtual ~TFileTree()
Default dtor.
TObjArray * Tokenize(const TString &delim) const
This function is used to isolate sequential tokens in a TString.
static TEventIter * Create(TDSet *dset, TSelector *sel, Long64_t first, Long64_t num)
Create and instance of the appropriate iterator.
virtual Long64_t GetBytesRead() const
virtual Int_t GetSize() const
TTree * Load(TDSetElement *elem, Bool_t &localfile, const char *objname=0)
Load a tree from s TDSetElement.
~TEventIterTree()
Destructor.
virtual EAbort GetAbort() const
void PreProcessEvent(Long64_t)
To be executed before by TProofPlayer calling TSelector::Process.
Describe directory structure in memory.
const char * GetOrdinal() const
The TTimeStamp encapsulates seconds and ns since EPOCH.
Int_t LoadDir()
Load directory.
virtual Int_t SetCacheSize(Long64_t cachesize=-1)
Set maximum size of the file cache .
virtual void SetObject(TObject *obj)
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
virtual TObject * ReadObj()
To read a TObject* from the file.
TEntryList * fEntryList
current position in the eventList
Int_t GetNextPacket(Long64_t &first, Long64_t &num)
Get loop range.
virtual Bool_t cd(const char *path=0)
Change current directory to "this" directory.
R__EXTERN TProofServ * gProofServ
virtual void Add(TObject *obj)
Int_t GetLearnEntries()
Return the number of entries in the learning phase.
A TFriendElement TF describes a TTree object TF in a file.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Int_t GetNextPacket(Long64_t &first, Long64_t &num)
Get loop range.
const char * GetType() const
virtual Long64_t GetEntries() const
A TTree object has a header with a name and a title.
void RestartComputeTime()
Reset the compute time.
A TSelector object is used by the TTree::Draw, TTree::Scan, TTree::Process to navigate in a TTree and...
A List of entry numbers in a TTree or TChain.
virtual void UpdateBranches(TTree *tree)
Update pointer to current Tree and recompute pointers to the branches in the cache.
static Int_t GetLearnEntries()
Static function returning the number of entries used to train the cache see SetLearnEntries.
TFileTree(const char *name, TFile *f, Bool_t islocal)
Default ctor.
const char * GetDirectory() const
Return directory where to look for object.
virtual void Init(TTree *)
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.