#ifndef ROOT_TPacketizerMulti
#define ROOT_TPacketizerMulti
#ifndef ROOT_TVirtualPacketizer
#include "TVirtualPacketizer.h"
#endif
class TIter;
class TList;
class TMap;
class TMessage;
class TProofProgressStatus;
class TSlave;
class TPacketizerMulti : public TVirtualPacketizer {
private:
TList *fPacketizers;
TIter *fPacketizersIter;
TVirtualPacketizer *fCurrent;
TMap *fAssignedPack;
TPacketizerMulti();
TPacketizerMulti(const TPacketizerMulti&);
void operator=(const TPacketizerMulti&);
TVirtualPacketizer *CreatePacketizer(TDSet *dset, TList *wrks, Long64_t first, Long64_t num,
TList *input, TProofProgressStatus *st);
public:
TPacketizerMulti(TDSet *dset, TList *slaves, Long64_t first, Long64_t num,
TList *input, TProofProgressStatus *st);
virtual ~TPacketizerMulti();
TDSetElement *GetNextPacket(TSlave *wrk, TMessage *r);
Int_t GetEstEntriesProcessed(Float_t f, Long64_t &ent, Long64_t &bytes, Long64_t &calls)
{ if (fCurrent) return fCurrent->GetEstEntriesProcessed(f,ent,bytes,calls);
return 1; }
Float_t GetCurrentRate(Bool_t &all) { all = kTRUE;
return (fCurrent? fCurrent->GetCurrentRate(all) : 0.); }
void StopProcess(Bool_t abort, Bool_t stoptimer = kFALSE) {
if (fCurrent) fCurrent->StopProcess(abort, stoptimer);
TVirtualPacketizer::StopProcess(abort, stoptimer); }
void MarkBad(TSlave *wrk, TProofProgressStatus *st, TList **missing)
{ if (fCurrent) fCurrent->MarkBad(wrk, st, missing); return; }
Int_t AddProcessed(TSlave *wrk, TProofProgressStatus *st, Double_t lat, TList **missing)
{ if (fCurrent) return fCurrent->AddProcessed(wrk, st, lat, missing);
return -1; }
Int_t GetActiveWorkers() { if (fCurrent) return fCurrent->GetActiveWorkers(); return 0; }
ClassDef(TPacketizerMulti,0)
};
#endif