AliPhysics  6cf2591 (6cf2591)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GridWatch.C File Reference

Script to watch master jobs and automatically submit terminate jobs. More...

#include <TString.h>
#include <TGrid.h>
#include <TSystem.h>
#include <TObjArray.h>
#include <iostream>
#include <fstream>
#include <TError.h>
#include <TDatime.h>
#include <TEnv.h>
#include <TArrayI.h>
Include dependency graph for GridWatch.C:

Go to the source code of this file.

Functions

TString CacheFileName (const TString &name, const TString &ext, Bool_t merge=false)
 
Bool_t CheckCacheFile (const TString &name, const TString &ext, Bool_t merge=false)
 
void RemoveCacheFile (const TString &name, const TString &ext, Bool_t merge=false)
 
TObjArrayReadCacheFile (const TString &name, const TString &ext, bool merge=false)
 
TObjArrayReadJobIDs (const TString &name, bool merge=false)
 
TObjArrayReadStages (const TString &name, bool merge=false)
 
Bool_t ParseJobIDs (const TObjArray *jobIds, TArrayI &ret)
 
Bool_t ParseState (const TString &status, TString &out)
 
Bool_t GridPs (TString &tmp)
 
Bool_t GetJobState (Int_t jobId, TString &out)
 
Bool_t GetJobStates (const TArrayI &jobs, TObjArray &states)
 
Bool_t CheckAlienToken ()
 
void RefreshAlienToken (UInt_t now, Bool_t force=false)
 
Bool_t WaitForJobs (TArrayI &jobs, TObjArray *stages, Int_t delay, Bool_t batch)
 
void GridWatch (const TString &name, Bool_t batch=false, UShort_t delay=5 *60)
 

Detailed Description

Script to watch master jobs and automatically submit terminate jobs.

Author
Christian Holm Christensen cholm.nosp@m.@mas.nosp@m.ter.h.nosp@m.ehi..nosp@m.nbi.d.nosp@m.k
Date
Thu Jan 24 23:06:08 2013

Definition in file GridWatch.C.

Function Documentation

Bool_t CheckAlienToken ( )

Check if the AliEn token is valid

Returns
true if it is

Definition at line 360 of file GridWatch.C.

Referenced by GridWatch(), RefreshAlienToken(), and WaitForJobs().

Bool_t GridPs ( TString tmp)

Do a PS on the grid

Parameters
tmpThe file generated
Returns
true on success

Definition at line 228 of file GridWatch.C.

Referenced by GetJobState(), and GetJobStates().

void RefreshAlienToken ( UInt_t  now,
Bool_t  force = false 
)

Refersh the grid token every 6th hour

Parameters
now
force

Definition at line 380 of file GridWatch.C.

Referenced by WaitForJobs().