ROOT  6.06/09
Reference Guide
TGLite.cxx
Go to the documentation of this file.
1 // @(#) root/glite:$Id$
2 // Author: Anar Manafov <A.Manafov@gsi.de> 2006-03-20
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 /************************************************************************/
13 /*! \file TGLite.cxx
14  Implementation of the class which
15  defines interface to gLite GRID services. */ /*
16 
17  version number: $LastChangedRevision: 1688 $
18  created by: Anar Manafov
19  2006-03-20
20  last changed by: $LastChangedBy: manafov $ $LastChangedDate: 2008-01-23 13:42:32 +0100 (Wed, 23 Jan 2008) $
21 
22  Copyright (c) 2006-2008 GSI GridTeam. All rights reserved.
23 *************************************************************************/
24 
25 //*-- Last Update : $LastChangedDate: 2008-01-23 13:42:32 +0100 (Wed, 23 Jan 2008) $ by $LastChangedBy: manafov $
26 //*-- Author : Anar Manafov (A.Manafov@gsi.de) 2006-03-20
27 //*-- Copyright: Copyright (c) 2006-2008 GSI GridTeam. All rights reserved.
28 
29 // glite-api-wrapper
30 #include <glite-api-wrapper/gLiteAPIWrapper.h>
31 // ROOT
32 #include "TMap.h"
33 #include "TObjString.h"
34 // ROOT RGLite
35 #include "TGLiteResult.h"
36 #include "TGLiteJob.h"
37 #include "TGLite.h"
38 
39 ////////////////////////////////////////////////////////////////////////////////
40 /* BEGIN_HTML
41 The TGLite class defines an interface to <A href="http://glite.web.cern.ch/glite/" name="gLite GRID services">gLite GRID services</A>. This class is a part of RGlite plug-in developed at <A href="http://www.gsi.de" name="GSI, Darmstadt">GSI, Darmstadt</A>.<br>
42 The RGLite plug-in uses <A href="https://subversion.gsi.de/trac/dgrid/wiki">glite-api-wrapper library (GAW)</A> to perform Grid operations and provides the following features:
43 <ul>
44 <li>Workload Management System operations:
45 <ul>
46  <li>job submission - normal, DAG and parametric jobs (gLite WMProxy API),</li>
47  <li>smart look-up algorithm for WMP-Endpoints,</li>
48  <li>job status querying (gLite LB API),</li>
49  <li>job output retrieving (Globus GridFTP).</li>
50 </ul>
51 </li>
52 <li>File Catalog operations (gLite/LCG LFC API):
53 <ul>
54  <li>smart session manager,</li>
55  <li>set/query the current working catalog directory,</li>
56  <li>list files, directories and their stats,</li>
57  <li>add/remove files in a catalog namespace,</li>
58  <li>add/remove directories,</li>
59  <li>add/remove replicas from a given file.</li>
60 </ul>
61 </li>
62 <li>An executive logging.</li>
63 <li>Support of an external xml configuration file with according XML schema.</li>
64 </ul>
65 
66 <h3>Content</h3>
67 <ol style="list-style-type: upper-roman;">
68  <li><a href="#requirements">Requirements</a></li>
69  <li><a href="#conf">Configuration</a></li>
70  <li><a href="#usage">Usage</a>
71  <ol>
72  <li><a href="#usage:job_opt">Job operations</a></li>
73  <li><a href="#usage:file_catalog_opt">File Catalog operations</a></li>
74  </ol>
75  </li>
76 </ol>
77 <br>
78 
79 <h3><a name="requirements">Requirements</a></h3>
80 <ol>
81  <li><A href="http://glite.web.cern.ch/glite/packages/userInterface.asp">gLite UI 3.1</A></li>
82  <li><A href="https://subversion.gsi.de/trac/dgrid/wiki">glite-api-wrapper library</A></li>
83  <li>A Grid proxy (in order to perform gLite operations RGLite requires a Grid proxy, users therefore should create the Grid proxy before using the plug-in. One can create the Grid proxy with help of <em>voms-proxy-init</em> command, for example)</li>
84 </ol>
85 
86 <h3><a name="conf">Configuration</a></h3>
87 Since RGLite plug-in is based on <A href="https://subversion.gsi.de/trac/dgrid/wiki">glite-api-wrapper library</A> one should use GAW configuration file for tuning RGLite options up. Please refer to <A href="https://subversion.gsi.de/trac/dgrid/wiki">a GAW Trac</A> for more information.
88 
89 <h3><a name="usage">Usage</a></h3>
90 Be advised that the call of <em>TGrid::Connect("glite")</em> should be the very first one. It initializes RGLite plug-in and assigns a global variable <em>gGrid</em> with a pointer to the RGLite plug-in object. The plug-in on his side will initialize a GAW singleton and the <em>TGrid::Connect("glite")</em> call therefore can be performed only once. If you successfully "connected" to gLite, you can call other methods of TGrid interface. Please see the following examples.
91 <h4><a name="usage:job_opt">Job operations</a></h4>
92 <table width="100%" border="0">
93  <tbody bgcolor="#ffdca8">
94  <tr>
95  <td>
96  <font color="Green">// loading RGLite plug-in</font><br>
97  TGrid::Connect("glite");<br>
98  <font color="Green">// submitting Grid job</font><br>
99  TGridJob *job = gGrid->Submit("JDLs/simple.jdl");<br>
100  <font color="Green">// getting status object</font><br>
101  TGridJobStatus *status = job->GetJobStatus();<br>
102  <font color="Green">// getting status of the job.</font><br>
103  TGridJobStatus::EGridJobStatus st( status->GetStatus() );<br>
104  <font color="Green">// when the st is TGridJobStatus::kDONE you can retrieve job&#039;s output</font><br>
105  job->GetOutputSandbox("/tmp");<br>
106  </td>
107  </tr>
108  </tbody>
109 </table>
110 <h4><a name="usage:file_catalog_opt">File Catalog operations</a></h4>
111 <h5>Cd, Pwd, Ls</h5>
112 <table width="100%">
113  <tbody bgcolor="#ffdca8">
114  <tr>
115  <td>
116  <font color="Green">// loading RGLite plug-in</font><br>
117  TGrid::Connect("glite");<br>
118  <font color="Green">// current Catalog directory</font><br>
119  cout &lt;&lt; &quot;Working Directory is &quot; &lt;&lt; gGrid-&gt;Pwd() &lt;&lt; endl;
120  <br>
121  <font color="Green">// listing the current directory</font><br>
122  TGridResult* result = gGrid->Ls();<br>
123  result->Print("all");<br>
124  <font color="Green">// changing the current directory to "dech"</font><br>
125  gGrid->Cd("dech");<br>
126  <font color="Green">// listing only file names</font><br>
127  TGridResult * res = gGrid->Ls();<br>
128  Int_t i = 0;<br>
129  while ( res-&gt;GetFileName( i ) )
130  <br>
131  &nbsp;&nbsp; cout &lt;&lt; &quot;File: &quot; &lt;&lt; res-&gt;GetFileName( i++ ) &lt;&lt; endl;
132  <br>
133  </td>
134  </tr>
135  </tbody>
136 </table>
137 
138 <h5>Mkdir, Rmdir</h5>
139 
140 <table width="100%">
141  <tbody bgcolor="#ffdca8">
142  <tr>
143  <td>
144  <font color="Green">// loading RGLite plug-in</font><br>
145  TGrid::Connect("glite");<br>
146  <font color="Green">// changing the current directory to "/grid/dech"</font><br>
147  gGrid->Cd("/grid/dech");<br>
148  <font color="Green">// using Mkdir to create a new directory</font><br>
149  Bool_t b = gGrid->Mkdir("root_test2");<br>
150  <font color="Green">// listing the current directory</font><br>
151  TGridResult* result = gGrid->Ls();<br>
152  <font color="Green">// full file information</font><br>
153  result->Print("all");<br>
154  <font color="Green">// removing the directory </font><br>
155  b = gGrid->Rmdir("root_test2");<br>
156  </td>
157  </tr>
158  </tbody>
159 </table>
160 END_HTML */
161 ////////////////////////////////////////////////////////////////////////////////
162 
164 
165 using namespace std;
166 using namespace glite_api_wrapper;
167 using namespace LFCHelper;
168 using namespace MiscCommon;
169 
170 template<class _T>
171 void add_map_element(TMap *_map, const string &_key, const _T &_value)
172 {
173  ostringstream ss;
174  ss << _value;
175  TObjString * key(new TObjString(_key.c_str()));
176  TObjString *value(new TObjString(ss.str().c_str()));
177  _map->Add(dynamic_cast<TObject*>(key), dynamic_cast<TObject*>(value));
178 }
179 
180 struct SAddRepInfo: public binary_function<SLFCRepInfo_t, TMap*, bool> {
181  bool operator()(first_argument_type _rep, second_argument_type m_Map) const {
182  ostringstream strSFN;
183  strSFN << "sfn" << _rep.id;
184  stringstream strHost;
185  strHost << "host" << _rep.id;
186  add_map_element(m_Map, strSFN.str(), _rep.sfn);
187  add_map_element(m_Map, strHost.str(), _rep.host);
188  return true;
189  }
190 };
191 
192 struct SAddMapElementFunc: public binary_function<SLFCFileInfo_t, TGLiteResult*, bool> {
193  bool operator()(first_argument_type _lfc_info, second_argument_type _Result) const {
194  TMap * map = new TMap();
195 
196  add_map_element(map, "fileid", _lfc_info.m_nFileID);
197  add_map_element(map, "name", _lfc_info.m_sName);
198  add_map_element(map, "size", _lfc_info.m_nSize);
199  add_map_element(map, "guid", _lfc_info. m_sGUID);
200  add_map_element(map, "rep_count", _lfc_info.m_LFCRepInfoVector.size());
201 
202  // Add replication info
203  for_each(_lfc_info.m_LFCRepInfoVector.begin(),
204  _lfc_info.m_LFCRepInfoVector.end(),
205  bind2nd(SAddRepInfo(), map));
206 
207  _Result->Add(map);
208  return true;
209  }
210 };
211 
212 ////////////////////////////////////////////////////////////////////////////////
213 /// Initializing the RGLite plug-in and making a connection to gLite UI.
214 /// INPUT:
215 /// _gridurl [in] - must be a "glite" string.
216 /// NOTE:
217 /// The other parameters are unsupported.
218 
219 TGLite::TGLite(const char */*_gridurl*/, const char* /*uid*/, const char* /*passwd*/, const char* /*options*/)
220 {
221  if (!CGLiteAPIWrapper::Instance().Init()) {
222  gGrid = this;
223  fPort = 0; // Will be used in TGLite::IsConnected
224  Info("TGLite", "gLite API Wrapper engine has been successfully initialized.");
225  } else {
226  // failed to connect to gLite
227  fPort = -1;
228  }
229 }
230 
231 
232 ////////////////////////////////////////////////////////////////////////////////
233 /// Destructor
234 
236 {
237 }
238 
239 
240 ////////////////////////////////////////////////////////////////////////////////
241 /// Use this method to find out whether the RGLite plug-in is connected to gLite UI or not.
242 /// RETURN:
243 /// kTRUE if connected and kFALSE otherwise.
244 
246 {
247  return (-1 == fPort ? kFALSE : kTRUE);
248 }
249 
250 
251 ////////////////////////////////////////////////////////////////////////////////
252 /// Not implemented for RGLite
253 
255 {
256  MayNotUse("Shell");
257 }
258 
259 
260 ////////////////////////////////////////////////////////////////////////////////
261 /// Not implemented for RGLite
262 
264 {
265  MayNotUse("Stdout");
266 }
267 
268 
269 ////////////////////////////////////////////////////////////////////////////////
270 /// Not implemented for RGLite
271 
273 {
274  MayNotUse("Stderr");
275 }
276 
277 
278 ////////////////////////////////////////////////////////////////////////////////
279 /// Not implemented for RGLite
280 
281 TGridResult* TGLite::Command(const char* /*command*/, Bool_t /*interactive*/, UInt_t /*stream*/)
282 {
283  MayNotUse("Command");
284  return NULL;
285 }
286 
287 
288 ////////////////////////////////////////////////////////////////////////////////
289 /// A File Catalog method. Querying a File Catalog.
290 /// INPUT:
291 /// _path [in] - a File Catalog directory which query will be executed on.
292 /// _pattern [in] - a POSIX regular expression pattern.
293 /// If a NULL value provided the default pattern will be used,
294 /// which is ".*" - match any.
295 /// NOTE:
296 /// The third and the forth parameters are unsupported.
297 /// RETURN:
298 /// A TGridResult object, which holds the result of the query.
299 
300 TGridResult* TGLite::Query(const char *_path, const char *_pattern /*= NULL*/, const char* /*conditions*/, const char* /*options*/)
301 {
302  if (!_path)
303  return NULL; // TODO: msg me!
304 
305  // Call for a Catalog manager
306  CCatalogManager * pCatalog(&CGLiteAPIWrapper::Instance().GetCatalogManager());
307  if (!pCatalog)
308  return NULL; // TODO: Log me!
309 
310  LFCFileInfoVector_t container;
311  gaw_lfc_ls ls;
312  ls.m_dir = _path;
313  if (_pattern)
314  ls.m_pattern = _pattern;
315  try {
316  pCatalog->Run(ls, &container);
317  } catch (const exception &e) {
318  Error("Query", "Exception: %s", e.what());
319  return NULL;
320  }
321 
322  // Creating ROOT containers to store the resultset
324  for_each(container.begin(), container.end(), bind2nd(SAddMapElementFunc(), result));
325 
326  return result;
327 }
328 
329 
330 ////////////////////////////////////////////////////////////////////////////////
331 /// Not implemented for RGLite
332 
334 {
335  MayNotUse("LocalSites");
336  return NULL;
337 }
338 
339 //______________________________________________________________________________
340 //--- Catalog Interface
341 TGridResult* TGLite::Ls(const char *_ldn, Option_t* /*options*/, Bool_t /*verbose*/)
342 {
343  // A File Catalog method. Listing content of the current working directory.
344  // INPUT:
345  // _ldn [in] - a logical name of the directory to list.
346  // NOTE:
347  // The other parameters are unsupported.
348  // RETURN:
349  // A TGridResult object, which holds the result of the listing.
350  // The method returns NULL in case of if an error occurred.
351 
352  if (!_ldn)
353  return NULL; // TODO: report error
354 
355  // Call for a Catalog manager
356  CCatalogManager * pCatalog(&CGLiteAPIWrapper::Instance().GetCatalogManager());
357  if (!pCatalog)
358  return NULL; // TODO: Log me!
359 
360  LFCFileInfoVector_t container;
361  gaw_lfc_ls ls;
362  ls.m_dir = _ldn;
363  try {
364  pCatalog->Run(ls, &container);
365  } catch (const exception &e) {
366  Error("Ls", "Exception: %s", e.what());
367  return NULL;
368  }
369 
370  // Creating a ROOT container to store the resultset
372  for_each(container.begin(), container.end(), bind2nd(SAddMapElementFunc(), result));
373 
374  return result;
375 }
376 
377 
378 ////////////////////////////////////////////////////////////////////////////////
379 /// A File Catalog method. Retrieving a name of the current working directory.
380 /// NOTE:
381 /// The parameter is unsupported.
382 /// RETURN:
383 /// a logical name of the new current working directory.
384 
385 const char* TGLite::Pwd(Bool_t /*verbose*/)
386 {
387 
388  // Call for a Catalog manager
389  CCatalogManager *pCatalog(&CGLiteAPIWrapper::Instance().GetCatalogManager());
390  if (!pCatalog)
391  return NULL; // TODO: Log me!
392 
393  gaw_lfc_pwd pwd;
394  try {
395  pCatalog->Run(pwd, &fFileCatalog_WrkDir);
396  } catch (const exception &e) {
397  Error("Pwd", "Exception: %s", e.what());
398  return NULL;
399  }
400 
401  return fFileCatalog_WrkDir.c_str();
402 }
403 
404 
405 ////////////////////////////////////////////////////////////////////////////////
406 /// A File Catalog method. Changing the current working directory.
407 /// INPUT:
408 /// _ldn [in] - a logical name of the destination directory
409 /// NOTE:
410 /// The other parameter is unsupported.
411 /// RETURN:
412 /// kTRUE if succeeded and kFALSE otherwise.
413 
414 Bool_t TGLite::Cd(const char *_ldn, Bool_t /*verbose*/)
415 {
416 
417  if (!_ldn)
418  return kFALSE;
419 
420  // Call for a Catalog manager
421  CCatalogManager * pCatalog(&CGLiteAPIWrapper::Instance().GetCatalogManager());
422  if (!pCatalog)
423  return kFALSE; // TODO: Log me!
424 
425  gaw_lfc_cwd cwd;
426  cwd.m_dir = _ldn;
427  try {
428  pCatalog->Run(cwd);
429  } catch (const exception &e) {
430  Error("Cd", "Exception: %s", e.what());
431  return kFALSE;
432  }
433 
434  return kTRUE;
435 }
436 
437 
438 ////////////////////////////////////////////////////////////////////////////////
439 /// A File Catalog method. Create a new directory on the name server.
440 /// INPUT:
441 /// _ldn [in] - a logical name of the directory to create.
442 /// NOTE:
443 /// The other parameters are unsupported.
444 /// RETURN:
445 /// kTRUE if succeeded and kFALSE otherwise.
446 
447 Int_t TGLite::Mkdir(const char *_ldn, Option_t* /*options*/, Bool_t /*verbose*/)
448 {
449  if (!_ldn)
450  return kFALSE;
451 
452  // Call for a Catalog manager
453  // TODO: implement *options* in order to use mkdir with "mode" and "guid"
454  CCatalogManager *pCatalog(&CGLiteAPIWrapper::Instance().GetCatalogManager());
455  if (!pCatalog)
456  return kFALSE; // TODO: Log me!
457 
458  gaw_lfc_mkdir mkdir;
459  mkdir.m_dir = _ldn;
460  try {
461  pCatalog->Run(mkdir);
462  } catch (const exception &e) {
463  Error("Mkdir", "Exception: %s", e.what());
464  return kFALSE;
465  }
466 
467  return kTRUE;
468 }
469 
470 
471 ////////////////////////////////////////////////////////////////////////////////
472 /// A File Catalog method, it removes a directory from the name server if it is an empty one.
473 /// INPUT:
474 /// _ldn [in] - a logical name of the directory to remove.
475 /// NOTE:
476 /// The other parameters are unsupported.
477 /// RETURN:
478 /// kTRUE if succeeded and kFALSE otherwise.
479 
480 Bool_t TGLite::Rmdir(const char *_ldn, Option_t* /*options*/, Bool_t /*verbose*/)
481 {
482  if (!_ldn)
483  return kFALSE;
484 
485  // Call for a Catalog manager
486  CCatalogManager * pCatalog(&CGLiteAPIWrapper::Instance().GetCatalogManager());
487  if (!pCatalog)
488  return kFALSE; // TODO: Log me!
489 
490  gaw_lfc_rmdir rmdir;
491  rmdir.m_dir = _ldn;
492  try {
493  pCatalog->Run(rmdir);
494  } catch (const exception &e) {
495  Error("Rmdir", "Exception: %s", e.what());
496  return kFALSE;
497  }
498 
499  return kTRUE;
500 }
501 
502 
503 ////////////////////////////////////////////////////////////////////////////////
504 /// A File Catalog method, it creates a new LFC file in the name server and registering a replication.
505 /// INPUT:
506 /// _lfn [in] - a logical file name of the file to create.
507 /// _turl [in] - Storage File Name - is either the Site URL or
508 /// the Physical File Name for the replica.
509 /// _se [in] - either the Storage Element fully qualified hostname or the disk server.
510 /// _guid [in] - a GUID for the new file.
511 /// NOTE:
512 /// The other parameters are unsupported.
513 /// RETURN:
514 /// kTRUE if succeeded and kFALSE otherwise.
515 
516 Bool_t TGLite::Register(const char *_lfn, const char *_turl , Long_t /*size*/, const char *_se, const char *_guid, Bool_t /*verbose*/)
517 {
518  // Call for a Catalog manager
519  CCatalogManager *pCatalog(&CGLiteAPIWrapper::Instance().GetCatalogManager());
520  if (!pCatalog)
521  return kFALSE; // TODO: Log me!
522 
523  gaw_lfc_register reg;
524  reg.m_file_name = _lfn;
525  reg.m_guid = _guid;
526  reg.m_SE_server = _se;
527  reg.m_sfn = _turl;
528  try {
529  pCatalog->Run(reg);
530  } catch (const exception &e) {
531  Error("Register", "Exception: %s", e.what());
532  return kFALSE;
533  }
534 
535  return kTRUE;
536 }
537 
538 
539 ////////////////////////////////////////////////////////////////////////////////
540 /// A File Catalog method, it removes an LFC file entry from the name server.
541 /// The methods deletes all replicas from the file.
542 /// INPUT:
543 /// _lfn [in] - a logical name of the file to remove.
544 /// NOTE:
545 /// The other parameters are unsupported.
546 /// RETURN:
547 /// kTRUE if succeeded and kFALSE otherwise.
548 
549 Bool_t TGLite::Rm(const char *_lfn, Option_t* /*option*/, Bool_t /*verbose*/)
550 {
551  if (!_lfn)
552  return kFALSE;
553 
554  // Call for a Catalog manager
555  // TODO: Implement "-f" option, which will force to remove all replicas from the file,
556  // otherwise file will be deleted only if no replicas exist
557  // Currently "-f" is by default. Now Rm deletes all file's replicas and the file itself from catalog namespace.
558  CCatalogManager * pCatalog(&CGLiteAPIWrapper::Instance().GetCatalogManager());
559  if (!pCatalog)
560  return kFALSE; // TODO: Log me!
561 
562  gaw_lfc_rm rm;
563  rm.m_file_name = _lfn;
564  try {
565  pCatalog->Run(rm);
566  } catch (const exception &e) {
567  Error("Rm", "Exception: %s", e.what());
568  return kFALSE;
569  }
570 
571  return kTRUE;
572 }
573 
574 
575 //______________________________________________________________________________
576 //--- Job Submission Interface
577 TGridJob* TGLite::Submit(const char *_jdl)
578 {
579  // A Grid Job operations method, it processes a job submission.
580  // INPUT:
581  // _jdl [in] - a name of the job description file (JDL). The JDL file path can contain environment variables and a "~" (home) symbol.
582  // RETURN:
583  // a TGridJob object, which represents the newly submitted job.
584  // The method returns NULL in case if an error occurred.
585 
586  if (!_jdl)
587  return NULL; // TODO: msg me!
588 
589  try {
590  // Call for a job submission
591  CGLiteAPIWrapper::Instance().GetJobManager().DelegationCredential();
592 
593  string strVer;
594  CGLiteAPIWrapper::Instance().GetJobManager().GetVersion(&strVer);
595  Info("Submit", "GAW Job Manager uses WMProxy version: %s", strVer.c_str());
596 
597  string sJobID;
598  CGLiteAPIWrapper::Instance().GetJobManager().JobSubmit(_jdl, &sJobID);
599  Info("Submit", "Job successfully submitted. Job ID \"%s\"", sJobID.c_str());
600  return dynamic_cast<TGridJob*>(new TGLiteJob(sJobID.c_str()));
601  } catch (const exception &e) {
602  Error("Submit", "Exception: %s", e.what());
603  return NULL;
604  }
605 }
606 
607 
608 ////////////////////////////////////////////////////////////////////////////////
609 /// Not implemented for RGLite.
610 
612 {
613  MayNotUse("GetJDLGenerator");
614  return 0;
615 }
616 
617 
618 ////////////////////////////////////////////////////////////////////////////////
619 /// A Grid Job operations method, it cancels a given gLite job.
620 /// INPUT:
621 /// _gridjob [in] - a TGridJob object.
622 /// RETURN:
623 /// kTRUE if succeeded and kFALSE otherwise.
624 
626 {
627  if (!_gridjob)
628  return kFALSE;
629 
630  return _gridjob->Cancel();
631 }
632 
633 
634 ////////////////////////////////////////////////////////////////////////////////
635 /// A Grid Job operations method, it cancels a gLite job by the given id.
636 /// INPUT:
637 /// _id [in] - a gLite job ID.
638 /// RETURN:
639 /// kTRUE if succeeded and kFALSE otherwise.
640 
642 {
643  TGLiteJob gridjob(_id);
644  return gridjob.Cancel();
645 }
virtual TGridResult * LocateSites()
Not implemented for RGLite.
Definition: TGLite.cxx:333
virtual TGridJob * Submit(const char *_jdl)
Definition: TGLite.cxx:577
Definition: TGLite.h:40
Small helper to implement the function to create,access and destroy iterators.
virtual Bool_t Cancel()
The Cancel() method cancels a gLite job, which was assigned to the class.
Definition: TGLiteJob.cxx:107
Collectable string class.
Definition: TObjString.h:32
const char Option_t
Definition: RtypesCore.h:62
virtual TGridJDL * GetJDLGenerator()
Not implemented for RGLite.
Definition: TGLite.cxx:611
R__EXTERN TGrid * gGrid
Definition: TGrid.h:135
virtual void Stdout()
Not implemented for RGLite.
Definition: TGLite.cxx:263
void MayNotUse(const char *method) const
Use this method to signal that a method (defined in a base class) may not be called in a derived clas...
Definition: TObject.cxx:971
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
Definition: TObject.cxx:892
virtual Bool_t Cancel()=0
virtual Bool_t KillById(TString _id)
A Grid Job operations method, it cancels a gLite job by the given id.
Definition: TGLite.cxx:641
virtual Int_t Mkdir(const char *_ldn="", Option_t *="", Bool_t=kFALSE)
A File Catalog method.
Definition: TGLite.cxx:447
virtual Bool_t Rm(const char *_lfn, Option_t *="", Bool_t=kFALSE)
A File Catalog method, it removes an LFC file entry from the name server.
Definition: TGLite.cxx:549
Basic string class.
Definition: TString.h:137
virtual Bool_t IsConnected() const
Use this method to find out whether the RGLite plug-in is connected to gLite UI or not...
Definition: TGLite.cxx:245
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kFALSE
Definition: Rtypes.h:92
STL namespace.
virtual Bool_t Kill(TGridJob *_gridjob)
A Grid Job operations method, it cancels a given gLite job.
Definition: TGLite.cxx:625
virtual Bool_t Rmdir(const char *_ldn="", Option_t *="", Bool_t=kFALSE)
A File Catalog method, it removes a directory from the name server if it is an empty one...
Definition: TGLite.cxx:480
virtual Bool_t Cd(const char *_ldn="", Bool_t=kFALSE)
A File Catalog method.
Definition: TGLite.cxx:414
virtual void ls(Option_t *option="") const
The ls function lists the contents of a class on stdout.
Definition: TObject.cxx:536
virtual void Stderr()
Not implemented for RGLite.
Definition: TGLite.cxx:272
void Init(TClassEdit::TInterpreterLookupHelper *helper)
Definition: TClassEdit.cxx:118
void add_map_element(TMap *_map, const string &_key, const _T &_value)
Definition: TGLite.cxx:171
virtual ~TGLite()
Destructor.
Definition: TGLite.cxx:235
gLite implementation of TGridJob
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition: TObject.cxx:918
virtual const char * Pwd(Bool_t=kFALSE)
A File Catalog method.
Definition: TGLite.cxx:385
virtual TGridResult * Ls(const char *_ldn="", Option_t *="", Bool_t=kFALSE)
Definition: TGLite.cxx:341
Interface of the class which defines interface to gLite GRID services.
TGLite(const char *_gridurl, const char *=NULL, const char *=NULL, const char *=NULL)
Initializing the RGLite plug-in and making a connection to gLite UI.
Definition: TGLite.cxx:219
unsigned int UInt_t
Definition: RtypesCore.h:42
virtual void Shell()
Not implemented for RGLite.
Definition: TGLite.cxx:254
std::map< Int_t, const RooCatType * > _map
Int_t fPort
Definition: TGrid.h:60
long Long_t
Definition: RtypesCore.h:50
TRObject operator()(const T1 &t1) const
TMap implements an associative array of (key,value) pairs using a THashTable for efficient retrieval ...
Definition: TMap.h:44
std::string fFileCatalog_WrkDir
Definition: TGLite.h:73
virtual Bool_t Register(const char *_lfn, const char *_turl, Long_t=-1, const char *_se=0, const char *_guid=0, Bool_t=kFALSE)
A File Catalog method, it creates a new LFC file in the name server and registering a replication...
Definition: TGLite.cxx:516
virtual TGridResult * Query(const char *_path, const char *_pattern=NULL, const char *="", const char *="")
A File Catalog method.
Definition: TGLite.cxx:300
#define NULL
Definition: Rtypes.h:82
double result[121]
const Bool_t kTRUE
Definition: Rtypes.h:91
float value
Definition: math.cpp:443
virtual TGridResult * Command(const char *, Bool_t=kFALSE, UInt_t=2)
Not implemented for RGLite.
Definition: TGLite.cxx:281
ClassImp(TGLite) using namespace std