98 PDB(kPacketizer,1)
Info(
"TPacketizerFile",
"enter");
106 Error(
"TPacketizerFile",
"input file is undefined or empty!");
112 Int_t procnotass = 1;
114 if (procnotass == 0) {
115 Info(
"TPacketizerFile",
"files not assigned to workers will not be processed");
121 Int_t addfileinfo = 0;
123 if (addfileinfo == 1) {
124 Info(
"TPacketizerFile",
125 "TFileInfo object will be included in the packet as associated object");
131 if (!(
fFiles =
dynamic_cast<TMap *
>(
input->FindObject(
"PROOF_FilesToProcess")))) {
132 Error(
"TPacketizerFile",
"map of files to be processed/created not found");
148 Info(
"TPacketizerFile",
"worker: %s", wrkname.
Data());
162 while ((key = nxl()) != 0) {
166 if (fc) wrklist = fc->
GetList();
175 Info(
"TPacketizerFile",
"%d files of '%s' (fqdn: '%s') assigned to '%s'",
185 Info(
"TPacketizerFile",
"%d files of '%s' (fqdn: '%s') not assigned",
197 Error(
"TPacketizerFile",
"no file path in the map!");
209 PDB(kPacketizer,1)
Info(
"TPacketizerFile",
"return");
249 while ((key = nxw()) != 0) {
274 Error(
"GetNextPacket",
"could not find stat object for worker '%s'!", wrk->
GetName());
282 Double_t latency = 0., proctime = 0., proccpu = 0.;
303 totev = status->GetEntries();
309 Error(
"GetNextPacket",
"no status came in the kPROOF_GETPACKET message");
312 (*r) >> latency >> proctime >> proccpu;
315 if (
r->BufferSize() >
r->Length()) (*r) >> bytesRead;
316 if (
r->BufferSize() >
r->Length()) (*r) >> totalEntries;
317 if (
r->BufferSize() >
r->Length()) (*r) >> totev;
328 Info(
"GetNextPacket",
"worker-%s (%s): %lld %7.3lf %7.3lf %7.3lf %lld",
330 numev, latency, proctime, proccpu, bytesRead);
334 latency, proctime, proccpu, bytesRead);
350 Info(
"GetNextPacket",
"worker-%s (%s): getting next files ... ", wrk->
GetOrdinal(),
376 if (!nextfile)
return elem;
382 if ((os =
dynamic_cast<TObjString *
>(nextfile))) {
385 if ((fi =
dynamic_cast<TFileInfo *
>(nextfile)))
390 Warning(
"GetNextPacket",
"found unsupported object of type '%s' in list: it must"
391 " be 'TObjString' or 'TFileInfo'", nextfile->
ClassName());
396 Info(
"GetNextPacket",
"worker-%s: assigning: '%s' (remaining %lld files)",
420 fSpeed(0), fTimeInstant(0), fCircLvl(5)
446 Int_t ne = fCircNtp->GetEntries();
449 fCircNtp->Fill(0., 0);
454 fCircNtp->GetEntry(ne-1);
459 fCircNtp->GetEntry(0);
460 Double_t dtime = (ttot > ar[0]) ? ttot - ar[0] : ne+1 ;
462 fSpeed = nevts / dtime;
464 Info(
"UpdatePerformance",
"time:%f, dtime:%f, nevts:%lld, speed: %f",
465 time, dtime, nevts, fSpeed);
479 fStatus->SetLastProcTime(0.);
487 Error(
"AddProcessed",
"status arg undefined");
498 ((GetIter() && GetIter()->GetCollection()) ? GetIter()->GetCollection()->GetSize()
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void input
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
void Printf(const char *fmt,...)
Formats a string in a circular formatting buffer and prints the string.
void SetName(const char *name)
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
void Print(Option_t *option="") const override
Default print for collections, calls Print(option, 1).
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
Manages an element of a TDSet.
void AddAssocObj(TObject *assocobj)
Add an associated object to the list.
Class that contains a list of TFileInfo's and accumulated meta data information about its entries.
Class describing a generic file including meta information.
TUrl * GetCurrentUrl() const
Return the current url.
void Print(Option_t *options="") const override
Print information about this object.
THashList implements a hybrid collection class consisting of a hash table and a list to store TObject...
TObject * FindObject(const char *name) const override
Find an object in this list using its name.
void Add(TObject *obj) override
TMap implements an associative array of (key,value) pairs using a THashTable for efficient retrieval ...
void Add(TObject *obj) override
This function may not be used (but we need to provide it since it is a pure virtual in TCollection).
TObject * GetValue(const char *keyname) const
Returns a pointer to the value associated with keyname as name of the key.
A simple TTree restricted to a list of double variables only.
Collectable string class.
const char * GetName() const override
Returns name of object.
Mother of all ROOT objects.
virtual const char * GetName() const
Returns name of object.
virtual const char * ClassName() const
Returns name of class to which the object belongs.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
@ kInvalidObject
if object ctor succeeded but object should not be used
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
void Print(Option_t *option="") const override
Printf info.
const char * GetName() const override
Returns name of object.
TIterObj(const char *n, TIter *iter)
void UpdatePerformance(Double_t time)
Update the circular ntple.
TSlaveStat(TSlave *sl, TList *input)
Main constructor.
TProofProgressStatus * AddProcessed(TProofProgressStatus *st) override
Update the status info to the 'st'.
~TSlaveStat() override
Destructor.
This packetizer generates packets which contain a single file path to be used in process.
Float_t GetCurrentRate(Bool_t &all) override
Get Estimation of the current rate; just summing the current rates of the active workers.
TDSetElement * GetNextPacket(TSlave *wrk, TMessage *r) override
Get next packet.
Double_t GetCurrentTime()
Get current time.
~TPacketizerFile() override
Destructor.
Container class for processing statistics.
void SetLastUpdate(Double_t updtTime=0)
Update time stamp either with the passed value (if > 0) or with the current time.
Double_t GetProcTime() const
Long64_t GetEntries() const
Double_t GetCurrentRate() const
Get current rate. Rteunr the average rate if the current is not defined.
void SetLastEntries(Long64_t entries)
Double_t GetCPUTime() const
void IncEntries(Long64_t entries=1)
Long64_t GetBytesRead() const
TObject * GetParameter(const char *par) const
Get specified parameter.
Class describing a PROOF worker server.
const char * GetName() const override
Returns name of object.
Int_t GetProtocol() const
const char * GetOrdinal() const
Double_t RealTime()
Stop the stopwatch (if it is running) and return the realtime (in seconds) passed between the start a...
void Start(Bool_t reset=kTRUE)
Start the stopwatch.
void Continue()
Resume a stopped stopwatch.
const char * Data() const
virtual void SetCircular(Long64_t maxEntries)
Enable/Disable circularity for this tree.
This class represents a WWW compatible URL.
const char * GetUrl(Bool_t withDeflt=kFALSE) const
Return full URL.
const char * GetHostFQDN() const
Return fully qualified domain name of url host.
Long64_t GetEntriesProcessed() const
TProofProgressStatus * fStatus
TProofProgressStatus * GetProgressStatus()
The packetizer is a load balancing object created for each query.
TProofProgressStatus * fProgressStatus
Long64_t GetEntriesProcessed() const
Bool_t HandleTimer(TTimer *timer) override
Send progress message to client.