28#include "gapi_job_operations.h"
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 * GetJdlKey(const char *key)
Return the JDL key.
const char * GetKey(const char *key)
Return a key.
virtual TGridJobStatus * GetJobStatus() const
Queries the job for its status and returns a TGridJobStatus object.
Int_t GetNSubJobs() const
Float_t PercentFinished()
Returns the percentage of finished subjobs, only DONE is considered as finished.
TAlienJobStatus * fMasterJob
void Print(Option_t *) const
This method must be overridden when a class wants to print itself.
virtual TGridJobStatus * GetJobStatus() const
Gets the status of the master job and all its sub jobs.
void Browse(TBrowser *b)
Browser interface.
Using a TBrowser one can browse all ROOT objects.
This class provides file copy and merging services.
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...
virtual Bool_t Merge(Bool_t=kTRUE)
Merge the files.
virtual const char * GetFileName(UInt_t) const
virtual TGridResult * Ls(const char *="", Option_t *="", Bool_t=kFALSE)
virtual Bool_t Cd(const char *="", Bool_t=kFALSE)
Iterator abstract base class.
virtual TObject * Next()=0
virtual void Sort(Bool_t order=kSortAscending)
Sort linked list.
TIterator * MakeIterator(Bool_t dir=kIterForward) const
Create an iterator for TMap.
void Add(TObject *obj)
This function may not be used (but we need to provide it since it is a pure virtual in TCollection).
TObject * GetValue(const char *keyname) const
Returns a pointer to the value associated with keyname as name of the key.
Collectable string class.
const char * GetName() const
Returns name of object.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
const char * Data() const