47 #if defined(R__MACOSX)
81 Info(
"TEventIter",
"fPackets list '%s' created", n.
Data());
83 Warning(
"TEventIter",
"fPackets list could not be created");
91 : fDSet(dset), fSel(sel)
114 Info(
"TEventIter",
"fPackets list '%s' created", n.
Data());
116 Warning(
"TEventIter",
"fPackets list could not be created");
155 }
else if (dset->
IsTree()) {
195 if (dirsave) dirsave->
cd();
199 Error(
"Process",
"Cannot open file: %s (%s)",
202 Error(
"Process",
"Cannot open file: %s (errno unavailable)",
217 Error(
"Process",
"Cannot cd to: %s",
223 if (dirsave) dirsave->
cd();
291 PDB(kLoop, 2)
Info(
"GetNextPacket",
"bytes written: %lld", bytesWritten);
293 fOldBytesRead = totBytesWritten;
326 Error(
"GetNextPacket",
"data element must be set to kEmtpy");
332 if (num == 0)
return -1;
354 PDB(kLoop, 2)
Info(
"GetNextEvent",
"bytes written: %lld", bytesWritten);
356 fOldBytesRead = totBytesWritten;
389 Error(
"GetNextEvent",
"data element must be set to kEmtpy");
471 Error(
"GetNextPacket",
"entry- or event-list not available");
489 }
else if ( r == 1 ) {
512 Error(
"GetNextPacket",
"First (%lld) higher then number of keys (%lld) in %s",
521 Error(
"GetNextPacket",
"Num (%lld) + First (%lld) larger then number of keys (%lld) in %s",
554 if (dirsave) dirsave->
cd();
586 Error(
"GetNextEvent",
"Entry- or event-list not available");
604 }
else if ( r == 1 ) {
627 Error(
"GetNextEvent",
"First (%lld) higher then number of keys (%lld) in %s",
636 Error(
"GetNextEvent",
"Num (%lld) + First (%lld) larger then number of keys (%lld) in %s",
667 :
TNamed(name,
""), fUsed(
kFALSE), fIsLocal(islocal), fFile(f)
681 tree = (
TTree *)fTrees->After(tree);
773 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 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)
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.
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.
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
int main(int argc, char *argv[])
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.