28 #include "gapi_job_operations.h"
43 b->Add(GetJobStatus());
56 GAPI_JOBARRAY*
gjobarray = gapi_queryjobs(
"-",
"%",
"-",
"-", jobID.
Data(),
62 if (gjobarray->size() == 0) {
72 std::vector<GAPI_JOB>::const_iterator jobIter = gjobarray->begin();
73 for (; jobIter != gjobarray->end(); ++jobIter) {
75 GAPI_JOB
gjob = *jobIter;
79 std::map<std::string, std::string>::const_iterator
iter = gjob.gapi_jobmap.begin();
80 for (; iter != gjob.gapi_jobmap.end(); ++
iter) {
82 if (strcmp(iter->first.c_str(),
"queueId") == 0)
99 std::cout <<
" ------------------------------------------------ " << std::endl;
100 std::cout <<
" Master Job ID : " <<
fJobID << std::endl;
101 std::cout <<
" ------------------------------------------------ " << std::endl;
104 Error(
"Print",
"Cannot get the information for this masterjob");
108 std::cout <<
" N of Subjobs : " << status->
GetNSubJobs() << std::endl;
109 std::cout <<
" % finished : " << status->
PercentFinished()*100 << std::endl;
110 std::cout <<
" ------------------------------------------------ " << std::endl;
116 printf(
" SubJob: [%-7s] %-10s %20s@%s RunTime: %s\n",substatus->
GetKey(
"queueId"),substatus->
GetKey(
"status"),substatus->
GetKey(
"node"),substatus->
GetKey(
"site"),substatus->
GetKey(
"runtime"));
118 std::cout <<
" ------------------------------------------------ " << std::endl;
120 if ( strchr(options,
'l') ) {
124 const char* outputdir = substatus->
GetJdlKey(
"OutputDir");
133 printf(
" Sandbox [%-7s] %s \n", substatus->
GetKey(
"queueId"),sandbox.
Data());
134 std::cout <<
" ================================================ " << std::endl;
153 std::cout <<
" ----------LITE_JOB_OPERATIONS-------------------------------------- " << std::endl;
177 const char* outputdir = substatus->
GetJdlKey(
"OutputDir");
178 printf(
" Sandbox [%-7s] %s \n", substatus->
GetKey(
"queueId"),sandbox.
Data());
179 std::cout <<
" ================================================ " << std::endl;
192 return merger.
Merge();
const char * GetName() const
Returns name of object.
ClassImp(TAlienJob) TGridJobStatus *TAlienJob jobID
Queries the job for its status and returns a TGridJobStatus object.
Collectable string class.
Float_t PercentFinished()
Returns the percentage of finished subjobs, only DONE is considered as finished.
virtual Bool_t Merge(Bool_t=kTRUE)
Merge the files.
virtual const char * GetFileName(UInt_t) const
void Add(TObject *obj)
This function may not be used (but we need to provide it since it is a pure virtual in TCollection)...
virtual Bool_t Cd(const char *="", Bool_t=kFALSE)
Iterator abstract base class.
void Print(Option_t *) const
This method must be overridden when a class wants to print itself.
virtual void Sort(Bool_t order=kSortAscending)
Sort linked list.
const char * Data() const
const char * GetJdlKey(const char *key)
Return the JDL key.
virtual TGridJobStatus * GetJobStatus() const
Gets the status of the master job and all its sub jobs.
std::map< std::string, std::string >::const_iterator iter
TAlienJobStatus * fMasterJob
TObject * GetValue(const char *keyname) const
Returns a pointer to the value associated with keyname as name of the key.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual Bool_t OutputFile(const char *url, Bool_t force)
Open merger output file.
virtual Bool_t AddFile(TFile *source, Bool_t own, Bool_t cpProgress)
Add the TFile to this file merger and give ownership of the TFile to this object (unless kFALSE is re...
Using a TBrowser one can browse all ROOT objects.
ClassImp(TAlienMasterJob) void TAlienMasterJob
Browser interface.
This class provides file copy and merging services.
TIterator * MakeIterator(Bool_t dir=kIterForward) const
Create an iterator for TMap.
ClassImp(TMCParticle) void TMCParticle printf(": p=(%7.3f,%7.3f,%9.3f) ;", fPx, fPy, fPz)
const char * GetKey(const char *key)
Return a key.
typedef void((*Func_t)())
virtual TObject * Next()=0
virtual TGridResult * Ls(const char *="", Option_t *="", Bool_t=kFALSE)
Int_t GetNSubJobs() const
GAPI_JOBARRAY * gjobarray
virtual TGridJobStatus * GetJobStatus() const