A++ » INCLUDE » TMPWorker

class TMPWorker

Function Members (Methods)

public:
virtual~TMPWorker()
static TClass*Class()
unsigned intGetNWorker() const
pid_tGetPid()
TSocket*GetSocket()
virtual voidInit(int fd, unsigned int workerN)
virtual TClass*IsA() const
TMPWorker&operator=(const TMPWorker&)
voidRun()
virtual voidShowMembers(TMemberInspector& insp) const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
TMPWorker()
TMPWorker(const TMPWorker&)
TMPWorker(TTree* tree, unsigned int nWorkers, ULong64_t maxEntries)
TMPWorker(const vector<string>& fileNames, const string& treeName, unsigned int nWorkers, ULong64_t maxEntries)
protected:
voidCloseFile()
TFile*OpenFile(const string& fileName)
TTree*RetrieveTree(TFile* fp)
voidSendError(const string& errmsg, unsigned int code = MPCode::kError)
voidSetup()
voidSetupTreeCache(TTree* tree)
private:
virtual voidHandleInput(MPCodeBufPair& msg)

Data Members

protected:
TFile*fFilelast open file
vector<string>fFileNamesthe files to be processed by all workers
stringfIdidentifier string in the form W<nwrk>|P<proc id>
ULong64_tfMaxNEntriesthe maximum number of entries to be processed by this worker
unsigned intfNWorkersthe number of workers spawned
ULong64_tfProcessedEntriesthe number of entries processed by this worker so far
TTree*fTreepointer to the tree to be processed. It is only used if the tree is directly passed to TProcessExecutor::Process as argument
stringfTreeNamethe name of the tree to be processed
private:
Long64_tfCacheSizeCache size
unsigned intfNWorkerthe ordinal number of this worker (0 to nWorkers-1)
pid_tfPidthe PID of the process in which this worker is running
unique_ptr<TSocket>fSThis worker's socket. The unique_ptr makes sure resources are released.
TTreeCache*fTreeCacheinstance of the tree cache for the tree
Bool_tfTreeCacheIsLearningWhether cache is in learning phase
Bool_tfUseTreeCacheControl usage of the tree cache

Class Charts

Inheritance Chart:
TMPWorker

Function documentation

TMPWorker()
 \endcond
TMPWorker(const vector<string>& fileNames, const string& treeName, unsigned int nWorkers, ULong64_t maxEntries)
TMPWorker(TTree* tree, unsigned int nWorkers, ULong64_t maxEntries)
virtual ~TMPWorker()
it doesn't make sense to copy a TMPWorker (each one has a uniq_ptr to its socket)
TMPWorker(const TMPWorker& )
TMPWorker & operator=(const TMPWorker& )
void Init(int fd, unsigned int workerN)
void Run()
TSocket * GetSocket()
{ return fS.get(); }
pid_t GetPid()
{ return fPid; }
unsigned GetNWorker() const
{ return fNWorker; }
void CloseFile()
TFile * OpenFile(const string& fileName)
TTree * RetrieveTree(TFile* fp)
void SendError(const string& errmsg, unsigned int code = MPCode::kError)
void Setup()
void SetupTreeCache(TTree* tree)
void HandleInput(MPCodeBufPair& msg)