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();
Collectable string class.
virtual TGridJobStatus * GetJobStatus() const
Queries the job for its status and returns a TGridJobStatus object.
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.
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 TGridJobStatus * GetJobStatus() const
Gets the status of the master job and all its sub jobs.
virtual Bool_t Cd(const char *="", Bool_t=kFALSE)
Iterator abstract base class.
virtual void Sort(Bool_t order=kSortAscending)
Sort linked list.
void Print(Option_t *) const
This method must be overridden when a class wants to print itself.
const char * GetJdlKey(const char *key)
Return the JDL key.
TAlienJobStatus * fMasterJob
virtual Bool_t OutputFile(const char *url, Bool_t force)
Open merger output file.
TIterator * MakeIterator(Bool_t dir=kIterForward) const
Create an iterator for TMap.
const char * GetName() const
Returns name of object.
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.
This class provides file copy and merging services.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Int_t GetNSubJobs() const
const char * GetKey(const char *key)
Return a key.
typedef void((*Func_t)())
virtual TObject * Next()=0
virtual const char * GetFileName(UInt_t) const
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
TObject * GetValue(const char *keyname) const
Returns a pointer to the value associated with keyname as name of the key.
virtual TGridResult * Ls(const char *="", Option_t *="", Bool_t=kFALSE)
const char * Data() const