#ifndef TCafGroupMonitor_hh #define TCafGroupMonitor_hh #include "TOfflineMonitor.hh" // status =0/1/2/3/4 => Operational/Minor problem/Major problem/Scheduled outage/Known down is read in the corresponding file // // first some useful paramenters // parameters for histograms // // parameters for profile plots (time in minutes) #define NBINS_TIME_DAY 24 #define NBINS_TIME_WEEK 168 #define NBINS_TIME_MONTH 186 #define TMAX_HOUR 60 #define TMIN_DAY 0 #define TMAX_DAY 1440 #define TMIN_WEEK 0 #define TMAX_WEEK 10080 #define TMIN_MONTH 0 #define TMAX_MONTH 44640 #define SECS_HOUR 3600 // end parameters //__________________________________________________________________________ class TCafGroupMonitor: public TOfflineMonitor { public: struct Params_t { float lowAveLoad; float xlowAveLoad; float highPctLoad0; float xhighPctLoad0; float highAssigned; float xhighAssigned; float lowStart; float xlowStart; float highFinPct; float xhighFinPct; }; struct Status_t { Int_t load; Int_t load0; Int_t vms; Int_t assigned; Int_t started; Int_t finished; Int_t sections; Int_t global; TDatime time; }; struct Data_t : public TObject { TDatime fTime; UInt_t fAbsTime; // seconds after Jan 1, 1995 UInt_t fTotalVms; UInt_t fClaimedVms; UInt_t fUsedVms; UInt_t fAssignedVms; UInt_t fLoad0Vms; UInt_t fTotalRunning; UInt_t fElapsTime; UInt_t fFinJobs; UInt_t fFinSec; UInt_t fStartJobs; UInt_t fStartSec; UInt_t fLoad10; // # of VMs with average load avl<=10% UInt_t fLoad20; // # of VMs with average load 1090% UInt_t fNumVmBelow; // # of VMs with average load below "low" threshold UInt_t fNumVmBelowX; // # of VMs with average load below "extra-low" threshold float fAveLoad; TDatime fLastFileTime; bool fNtupExist; UInt_t fNfiles; ClassDef(TCafGroupMonitor::Data_t,1) }; Data_t* fData; Params_t fPars; Status_t fStatus; //_____________________________________________________________________ TCafGroupMonitor(const char* Name = "CafGroupMonitor"); virtual ~TCafGroupMonitor(); virtual int Init(); virtual int UpdateNtuple(); virtual int MakePlots(const char* HtmlFile = 0); virtual int MakeHtml(const char* HtmlFile = 0); ClassDef(TCafGroupMonitor,1) }; #endif