TPacketizerFile.h

Go to the documentation of this file.
00001 // @(#)root/proofplayer:$Id: TPacketizerFile.h 36876 2010-11-23 11:45:47Z ganis $
00002 // Author: G. Ganis 2009
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2002, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #ifndef ROOT_TPacketizerFile
00013 #define ROOT_TPacketizerFile
00014 
00015 //////////////////////////////////////////////////////////////////////////
00016 //                                                                      //
00017 // TPacketizerFile                                                      //
00018 //                                                                      //
00019 // This packetizer generates packets which conatin a single file path   //
00020 // to be used in process. Used for tasks generating files, like in      //
00021 // PROOF bench.                                                         //
00022 //                                                                      //
00023 //////////////////////////////////////////////////////////////////////////
00024 
00025 #ifndef ROOT_TVirtualPacketizer
00026 #include "TVirtualPacketizer.h"
00027 #endif
00028 #ifndef ROOT_TMap
00029 #include "TMap.h"
00030 #endif
00031 
00032 
00033 class TMessage;
00034 class TList;
00035 class TStopwatch;
00036 
00037 class TPacketizerFile : public TVirtualPacketizer {
00038 
00039 public:              // This is always needed
00040    class TSlaveStat;
00041    class TIterObj;
00042 
00043 private:
00044    TMap       *fFiles;           // Files to be produced/processed per node
00045    TList      *fNotAssigned;     // List of files not assigned to a specific node
00046    TList      *fIters;           // Iterators on the file lists per node
00047    Long64_t    fAssigned;        // No.files processed or being processed.
00048    Bool_t      fProcNotAssigned; // Whether to process files not asdigned to a worker
00049 
00050    TStopwatch *fStopwatch;       // For measuring the start time of each packet
00051 
00052    TPacketizerFile();
00053    // : fFiles(0), fIters(0), fAssigned(0), fStopwatch(0) { }
00054    TPacketizerFile(const TPacketizerFile&);     // no implementation, will generate
00055    void operator=(const TPacketizerFile&);  // error on accidental usage
00056 
00057 public:
00058    TPacketizerFile(TList *workers, Long64_t, TList *input, TProofProgressStatus *st = 0);
00059    virtual ~TPacketizerFile();
00060 
00061    TDSetElement *GetNextPacket(TSlave *wrk, TMessage *r);
00062 
00063    Double_t      GetCurrentTime();
00064 
00065    Float_t       GetCurrentRate(Bool_t &all);
00066    Int_t         GetActiveWorkers() { return -1; }
00067 
00068    ClassDef(TPacketizerFile,0)  //Generate work packets for parallel processing
00069 };
00070 
00071 //-------------------------------------------------------------------------------
00072 
00073 #endif

Generated on Tue Jul 5 14:27:42 2011 for ROOT_528-00b_version by  doxygen 1.5.1