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);
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);
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",
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");
796 main->SetCacheSize(0);
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) {
836 main->AddFriend(friendTree);
838 main->AddFriend(friendTree, alias);
865 Error(
"Load",
"undefined element");
869 const char *fn =
e->GetFileName();
870 const char *dn =
e->GetDirectory();
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);
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,
"*"))
948 if (dn && !(dd =
f->GetDirectory(dn))) {
949 Error(
"Load",
"Cannot get to: %s", dn);
953 Info(
"Load",
"got directory: %s", dn);
968 while ((k = (
TKey *) nxk())) {
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());
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");
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);
R__EXTERN TProofServ * gProofServ
R__EXTERN TSystem * gSystem
void SetName(const char *name)
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
Manages an element of a TDSet.
const char * GetObjName() const
TObject * GetEntryList() const
virtual TList * GetListOfFriends() const
const char * GetDirectory() const
Return directory where to look for object.
const char * GetFileName() const
Long64_t GetFirst() const
This class implements a data set to be used for PROOF processing.
virtual TDSetElement * Next(Long64_t totalEntries=-1)
Returns next TDSetElement.
const char * GetType() const
const char * GetObjName() const
virtual Bool_t cd(const char *path=0)
Change current directory to "this" directory.
Describe directory structure in memory.
virtual Bool_t cd(const char *path=0)
Change current directory to "this" directory.
virtual TKey * GetKey(const char *, Short_t=9999) const
virtual TList * GetListOfKeys() const
A List of entry numbers in a TTree or TChain.
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,...
virtual Long64_t GetEntriesToProcess() 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().
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
Int_t GetNextPacket(Long64_t &first, Long64_t &num)
Get loop range.
TEventIterObj()
Default ctor.
Long64_t GetNextEvent()
Get next event.
~TEventIterObj()
Destructor.
void PreProcessEvent(Long64_t)
To be executed before by TProofPlayer calling TSelector::Process.
TFileTree(const char *name, TFile *f, Bool_t islocal)
Default ctor.
virtual ~TFileTree()
Default dtor.
Int_t GetNextPacket(Long64_t &first, Long64_t &num)
Get loop range.
Int_t GetLearnEntries()
Return the number of entries in the learning phase.
Long64_t GetCacheSize()
Return the size in bytes of the cache, if any Return -1 if not used.
Long64_t GetNextEvent()
Get next event.
void PreProcessEvent(Long64_t ent)
Actions to be done just before processing entry 'entry'.
TEventIterTree()
Default ctor.
TTree * Load(TDSetElement *elem, Bool_t &localfile, const char *objname=0)
Load a tree from s TDSetElement.
Bool_t fTreeCacheIsLearning
~TEventIterTree()
Destructor.
TTree * GetTrees(TDSetElement *elem)
Create a Tree for the main TDSetElement and for all the friends.
Int_t GetNextPacket(Long64_t &first, Long64_t &num)
Get loop range.
Long64_t GetNextEvent()
Get next event.
TEventIterUnit()
Default constructor.
Special iterator class used in TProofPlayer to iterate over events or objects in the packets.
Long64_t fEntryListPos
entry list for processing
virtual ~TEventIter()
Destructor.
virtual Long64_t GetEntryNumber(Long64_t)
TList * fPackets
current position in the entrylist
virtual void StopProcess(Bool_t abort)
Set flag to stop the process.
Int_t fEventListPos
eventList for processing
static TEventIter * Create(TDSet *dset, TSelector *sel, Long64_t first, Long64_t num)
Create and instance of the appropriate iterator.
Int_t LoadDir()
Load directory.
virtual void InvalidatePacket()
Invalidated the current packet (if any) by setting the TDSetElement::kCorrupted bit.
TEntryList * fEntryList
current position in the eventList
virtual void PreProcessEvent(Long64_t)
TEventIter()
Default constructor.
A TEventList object is a list of selected events (entries) in a TTree.
virtual Long64_t GetEntry(Int_t index) const
Return value of entry at index in the list.
virtual Int_t GetN() const
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
static Long64_t GetFileBytesWritten()
Static function returning the total number of bytes written to all files.
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 GetBytesRead() const
virtual Int_t GetErrno() const
Method returning errno. Is overriden in TRFIOFile.
TFileCacheRead * GetCacheRead(const TObject *tree=0) const
Return a pointer to the current read cache.
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseGeneralPurpose, Int_t netopt=0)
Create / open a file.
virtual void SetCacheRead(TFileCacheRead *cache, TObject *tree=0, ECacheAction action=kDisconnect)
Set a pointer to the read cache.
A TFriendElement TF describes a TTree object TF in a file.
virtual TTree * GetTree()
Return pointer to friend TTree.
Book space in a file, create I/O buffers, to fill them, (un)compress them.
virtual const char * GetClassName() const
virtual TObject * ReadObj()
To read a TObject* from the file.
virtual void Add(TObject *obj)
virtual TObject * Remove(TObject *obj)
Remove object from the list.
virtual TObject * FindObject(const char *name) const
Delete a TObjLink object.
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
The TNamed class is the base class for all named ROOT classes.
virtual void SetName(const char *name)
Set the name of the TNamed.
virtual const char * GetName() const
Returns name of object.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
R__ALWAYS_INLINE Bool_t IsZombie() const
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
const char * GetOrdinal() const
void RestartComputeTime()
Reset the compute time.
Regular expression class.
A TSelector object is used by the TTree::Draw, TTree::Scan, TTree::Process to navigate in a TTree and...
virtual void SetObject(TObject *obj)
virtual EAbort GetAbort() const
virtual void Init(TTree *)
virtual TList * GetOutputList() const
virtual Bool_t Notify()
This method must be overridden to handle object notification.
const char * Data() const
TString & ReplaceAll(const TString &s1, const TString &s2)
TObjArray * Tokenize(const TString &delim) const
This function is used to isolate sequential tokens in a TString.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
virtual const char * BaseName(const char *pathname)
Base name of a file name. Base name of /user/root is root.
The TTimeStamp encapsulates seconds and ns since EPOCH.
static Int_t SetParallelUnzip(TTreeCacheUnzip::EParUnzipMode option=TTreeCacheUnzip::kEnable)
Static function that (de)activates multithreading unzipping.
virtual void UpdateBranches(TTree *tree)
Update pointer to current Tree and recompute pointers to the branches in the cache.
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 Bool_t IsLearning() const
virtual void ResetCache()
This will simply clear the cache.
static Int_t GetLearnEntries()
Static function returning the number of entries used to train the cache see SetLearnEntries.
A TTree object has a header with a name and a title.
TFile * GetCurrentFile() const
Return pointer to the current file.
virtual Long64_t GetEntries() const
virtual Long64_t LoadTree(Long64_t entry)
Set current entry.
This class represents a WWW compatible URL.
const char * GetUrl(Bool_t withDeflt=kFALSE) const
Return full URL.
const char * GetFileAndOptions() const
Return the file and its options (the string specified behind the ?).
void SetOptions(const char *opt)
const char * GetOptions() const
int main(int argc, char **argv)