46 #if defined(R__MACOSX) 80 Info(
"TEventIter",
"fPackets list '%s' created", n.
Data());
82 Warning(
"TEventIter",
"fPackets list could not be created");
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;
348 while (
fElem == 0 || fCurrent == 0) {
353 PDB(kLoop, 2)
Info(
"GetNextEvent",
"bytes written: %lld", bytesWritten);
355 fOldBytesRead = totBytesWritten;
388 Error(
"GetNextEvent",
"data element must be set to kEmtpy");
393 if (!(fCurrent =
fNum)) {
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",
772 if (main && main !=
fTree) {
789 Info(
"GetTrees",
"the tree cache is in learning phase");
792 Warning(
"GetTrees",
"default tree does nto have a file attached: corruption? Tree cache untouched");
808 TString uo(uf.GetOptions()), alias;
810 if ((from = uo.Index(
"friend_alias=")) !=
kNPOS) {
811 from += strlen(
"friend_alias=");
812 if (!uo.Tokenize(alias, from,
"|"))
813 Warning(
"GetTrees",
"empty 'friend_alias' found for tree friend");
820 if (friendTree && main) {
828 if (fe->
GetTree() == friendTree) {
865 Error(
"Load",
"undefined element");
872 if (objname && strlen(objname) > 0) {
877 if (!tn || (tn && strlen(tn) <= 0)) tn =
"*";
880 Info(
"Load",
"loading: fn:'%s' dn:'%s' tn:'%s'", fn, dn, tn);
889 while (names.
Tokenize(name,from,
"|")) {
912 Error(
"Load",
"file '%s' ('%s') could not be open", fn, fname.
Data());
916 #if defined(R__MACOSX) 919 fcntl(f->
GetFd(), F_NOCACHE, 1);
930 Info(
"Load",
"file '%s' already open (local:%d)", fn, localfile);
936 if (!strcmp(tn,
"*"))
949 Error(
"Load",
"Cannot get to: %s", dn);
953 Info(
"Load",
"got directory: %s", dn);
968 while ((k = (
TKey *) nxk())) {
969 if (!strcmp(k->GetClassName(),
"TTree")) {
971 if (kn.Index(re) !=
kNPOS) {
983 Error(
"Load",
"Cannot find tree \"%s\" in %s", tn, fn);
987 PDB(kLoop,2)
Info(
"Load",
"Reading: %s", tn);
993 Error(
"Load",
"Cannot <dynamic_cast> obj to tree \"%s\"", tn);
1001 Info(
"Load",
"TFileTree for '%s' flagged as 'in-use' ...", ft->
GetName());
1036 fOldBytesRead = totBytesRead;
1070 if (newTree !=
fTree) {
1108 Error(
"GetNextPacket",
"first (%lld) higher then number of entries (%lld) in %s",
1116 Error(
"GetNextPacket",
"num (%lld) + first (%lld) larger then number of entries (%lld) in %s",
1132 PDB(kLoop,1)
Info(
"GetNextPacket",
"call Init(%p) and Notify()",
fTree);
1183 Warning(
"PreEventProcess",
"problems setting entry in TTree");
1208 fOldBytesRead = totBytesRead;
1246 if (newTree !=
fTree) {
1281 Error(
"GetNextEvent",
"first (%lld) higher then number of entries (%lld) in %s",
1289 Error(
"GetNextEvent",
"num (%lld) + first (%lld) larger then number of entries (%lld) in %s",
1305 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 const char * GetName() const
Returns name of object.
virtual TList * GetListOfKeys() const
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
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 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)
Set the name of the TNamed.
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.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
virtual TList * GetListOfFriends() const
Regular expression class.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
Long64_t GetFirst() const
virtual void StopProcess(Bool_t abort)
Set flag to stop the process.
virtual TList * GetListOfFriends() const
virtual void InvalidatePacket()
Invalidated the current packet (if any) by setting the TDSetElement::kCorrupted bit.
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.
TEventIterUnit()
Default constructor.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual TObject * FindObject(const char *name) const
Delete a TObjLink object.
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.
TEventIter()
Default constructor.
virtual Int_t GetErrno() const
Method returning errno. Is overriden in TRFIOFile.
Manages an element of a TDSet.
virtual Long64_t GetCacheSize() 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.
virtual Long64_t GetEntry(Int_t index) const
Return value of entry at index in the list.
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 Long64_t GetEntriesToProcess() const
TList * fPackets
current position in the entrylist
static Long64_t GetFileBytesWritten()
Static function returning the total number of bytes written to all files.
virtual Int_t GetN() const
const char * GetDirectory() const
Return directory where to look for object.
int main(int argc, char **argv)
virtual void ResetCache()
This will simply clear the cache.
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 Long64_t GetEntryNumber(Long64_t)
void PreProcessEvent(Long64_t ent)
Actions to be done just before processing entry 'entry'.
TEventIterObj()
Default ctor.
Bool_t fTreeCacheIsLearning
R__ALWAYS_INLINE Bool_t IsZombie() const
const char * GetObjName() 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...
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
TTree * GetTrees(TDSetElement *elem)
Create a Tree for the main TDSetElement and for all the friends.
R__EXTERN TSystem * gSystem
virtual TObject * Remove(TObject *obj)
Remove object from the list.
Int_t fEventListPos
eventList for processing
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
TFile * GetCurrentFile() const
Return pointer to the current file.
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 TObject * After(const TObject *obj) const
Returns the object after object obj.
Int_t GetNextPacket(Long64_t &first, Long64_t &num)
Get loop range.
void SetName(const char *name)
virtual TDirectory * GetDirectory(const char *apath, Bool_t printError=false, const char *funcname="GetDirectory")
Find a directory named "apath".
virtual ~TFileTree()
Default dtor.
virtual Long64_t GetBytesRead() const
static TEventIter * Create(TDSet *dset, TSelector *sel, Long64_t first, Long64_t num)
Create and instance of the appropriate iterator.
TObjArray * Tokenize(const TString &delim) const
This function is used to isolate sequential tokens in a TString.
TObject * GetEntryList() const
TTree * Load(TDSetElement *elem, Bool_t &localfile, const char *objname=0)
Load a tree from s TDSetElement.
virtual TKey * GetKey(const char *, Short_t=9999) const
~TEventIterTree()
Destructor.
void PreProcessEvent(Long64_t)
To be executed before by TProofPlayer calling TSelector::Process.
Describe directory structure in memory.
The TTimeStamp encapsulates seconds and ns since EPOCH.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Int_t LoadDir()
Load directory.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
const char * GetFileName() const
virtual Int_t SetCacheSize(Long64_t cachesize=-1)
Set maximum size of the file cache .
const char * GetType() const
virtual void SetObject(TObject *obj)
virtual Long64_t GetEntries() const
TEventIterTree()
Default ctor.
virtual Bool_t IsLearning() const
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.
Int_t GetNextPacket(Long64_t &first, Long64_t &num)
Get loop range.
TFileCacheRead * GetCacheRead(TObject *tree=0) const
Return a pointer to the current read cache.
A TTree object has a header with a name and a title.
void RestartComputeTime()
Reset the compute time.
virtual Int_t GetSize() const
A TSelector object is used by the TTree::Draw, TTree::Scan, TTree::Process to navigate in a TTree and...
const char * GetObjName() const
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
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.
const char * GetOrdinal() const
virtual EAbort GetAbort() const
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.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
virtual TList * GetOutputList() const
virtual void Init(TTree *)
const char * Data() const