00001 // @(#)root/alien:$Id: TAlienMasterJobStatus.h 20882 2007-11-19 11:31:26Z rdm $ 00002 // Author: Jan Fiete Grosse-Oetringhaus 28/10/2004 00003 00004 /************************************************************************* 00005 * Copyright (C) 1995-2004, 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_TAlienMasterJobStatus 00013 #define ROOT_TAlienMasterJobStatus 00014 00015 ////////////////////////////////////////////////////////////////////////// 00016 // // 00017 // TAlienMasterJobStatus // 00018 // // 00019 // Status of a MasterJob. // 00020 // // 00021 ////////////////////////////////////////////////////////////////////////// 00022 00023 #ifndef ROOT_TGridJobStatus 00024 #include "TGridJobStatus.h" 00025 #endif 00026 #ifndef ROOT_TMap 00027 #include "TMap.h" 00028 #endif 00029 00030 class TAlienJobStatus; 00031 class TAlienMasterJob; 00032 00033 00034 class TAlienMasterJobStatus : public TGridJobStatus { 00035 00036 friend class TAlienMasterJob; 00037 00038 private: 00039 TAlienJobStatus *fMasterJob; // Status of the master job 00040 TMap fJobs; // Map which contains the sub jobs, 00041 // key is the job ID, values are 00042 // TAlienJobStatus objects 00043 00044 public: 00045 TAlienMasterJobStatus(const char* jobid) : fMasterJob(0) 00046 { TString name; name = jobid; SetName(name); SetTitle(name); } 00047 virtual ~TAlienMasterJobStatus(); 00048 00049 EGridJobStatus GetStatus() const; 00050 void Print(Option_t *) const; 00051 00052 Float_t PercentFinished(); 00053 00054 Bool_t IsFolder() const { return kTRUE; } 00055 void Browse(TBrowser *b); 00056 TMap *GetJobs() { return &fJobs; } 00057 Int_t GetNSubJobs() const { return fJobs.GetSize(); } 00058 00059 ClassDef(TAlienMasterJobStatus,1) // Status of Alien master job 00060 }; 00061 00062 #endif