Logo ROOT  
Reference Guide
TPacketizerFile.h
Go to the documentation of this file.
1// @(#)root/proofplayer:$Id$
2// Author: G. Ganis 2009
3
4/*************************************************************************
5 * Copyright (C) 1995-2002, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef ROOT_TPacketizerFile
13#define ROOT_TPacketizerFile
14
15//////////////////////////////////////////////////////////////////////////
16// //
17// TPacketizerFile //
18// //
19// This packetizer generates packets which conatin a single file path //
20// to be used in process. Used for tasks generating files, like in //
21// PROOF bench. //
22// //
23//////////////////////////////////////////////////////////////////////////
24
25#include "TVirtualPacketizer.h"
26#include "TMap.h"
27
28
29class TMessage;
30class TList;
31class TStopwatch;
32
34
35public: // This is always needed
36 class TSlaveStat;
37 class TIterObj;
38
39private:
40 TMap *fFiles; // Files to be produced/processed per node
41 TList *fNotAssigned; // List of files not assigned to a specific node
42 TList *fIters; // Iterators on the file lists per node
43 Long64_t fAssigned; // No.files processed or being processed.
44 Bool_t fProcNotAssigned; // Whether to process files not asdigned to a worker
45 Bool_t fAddFileInfo; // Whether to add the TFileInfo object in the packet
46
47 TStopwatch *fStopwatch; // For measuring the start time of each packet
48
50 // : fFiles(0), fNotAssigned(0), fIters(0), fAssigned(0),
51 // fProcNotAssigned(kTRUE), fAddFileInfo(kFALSE), fStopwatch(0) { }
52 TPacketizerFile(const TPacketizerFile&); // no implementation, will generate
53 void operator=(const TPacketizerFile&); // error on accidental usage
54
55public:
56 TPacketizerFile(TList *workers, Long64_t, TList *input, TProofProgressStatus *st = 0);
57 virtual ~TPacketizerFile();
58
60
62
64 Int_t GetActiveWorkers() { return -1; }
65
66 ClassDef(TPacketizerFile,0) //Generate work packets for parallel processing
67};
68
69//-------------------------------------------------------------------------------
70
71#endif
ROOT::R::TRInterface & r
Definition: Object.C:4
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
double Double_t
Definition: RtypesCore.h:55
long long Long64_t
Definition: RtypesCore.h:69
float Float_t
Definition: RtypesCore.h:53
#define ClassDef(name, id)
Definition: Rtypes.h:326
Manages an element of a TDSet.
Definition: TDSet.h:66
A doubly linked list.
Definition: TList.h:44
TMap implements an associative array of (key,value) pairs using a THashTable for efficient retrieval ...
Definition: TMap.h:40
This packetizer generates packets which contain a single file path to be used in process.
TPacketizerFile(const TPacketizerFile &)
Float_t GetCurrentRate(Bool_t &all)
Get Estimation of the current rate; just summing the current rates of the active workers.
virtual ~TPacketizerFile()
Destructor.
void operator=(const TPacketizerFile &)
TDSetElement * GetNextPacket(TSlave *wrk, TMessage *r)
Get next packet.
Double_t GetCurrentTime()
Get current time.
Int_t GetActiveWorkers()
TStopwatch * fStopwatch
Container class for processing statistics.
Class describing a PROOF worker server.
Definition: TSlave.h:46
Stopwatch class.
Definition: TStopwatch.h:28
The packetizer is a load balancing object created for each query.