Revision 4c80bc6f4da40d4d8e9f91eff0be0549d3ed8cec authored by Fons Rademakers on 25 June 2004, 23:12:51 UTC, committed by Fons Rademakers on 25 June 2004, 23:12:51 UTC
1) TUnixSystem::TempFileName uses TUnixSystem::ConcatFileName. ConcatFileName returns a string which is suppose to be deleted. TempFileName just set a TString equal to it and doesn't delete the returned string. 2) TAuthenticate (non-default) constructor makes the variable "sproto" (with StrDup), eventually setting the TString fProtocol equal to it, but never deletes sproto. 3) TAuthenticate::ReadRootAuthrc defines "char* authrc". There are numerous ways to leave this function without deleting authrc or setting authrc to something else without deleting the previous contents. git-svn-id: http://root.cern.ch/svn/root/trunk@9328 27541ba8-7e3a-0410-8455-c3a389f83636
1 parent 9630762
README.ALIEN
=========================================================================
How to use the TGrid/TAlien class V1.0 - Andreas.Peters@cern.ch
=========================================================================
To connect to Alien you have to connect to a running API service or you
let the system start an API server on your local machine, if you have a
full AliEn client installation.
Creating <gGrid> instance:
1. // connecting to an API service on the local machine
// if there is already one running, it is reused!
TGrid::Connect("alien://localhost");
or
TGrid::Connect("alien://");
2. // connecting to an already running API server
TGrid::Connect("alien://<host>:<port>/#?direct");
3. // asking the factory service to startup an API on a service machine
// (currently not working)
TGrid::Connect("alien://<factoryhost>:<factoryport>");
If you have executed TGrid::Connect(), the gGrid global variable
should be set != 0.
Examples of gGrid usage:
1) List directories of the catalogue:
int handle = gGrid->OpenDir("<aliendir>");
TGridResult *gr = gGrid->CreateGridResult(handle);
gr->Print();
delete gr;
2) Find all files under a directory:
int handle = gGrid->Find("<aliendir>","*","");
TGridResult *gr = gGrid->CreateGridResult(handle);
gr->Print();
delete gr;
3) Inserting Files in the catalogue
if (!gGrid) {
TGrid::Connect("alien://aliens7.cern.ch:15000/?direct","");
}
TString dirname("/alice_mdc/user/a/alimdc/testdir");
if ((gGrid->Mkdir(dirname)) < 0) {
cout << "Error in Mkdir " << dirname << endl;
}
TString fname("/alice_mdc/user/a/alimdc/rootdir/file");
if ((gGrid->AddFile(fname, "castor:///castor/cern.ch/test.root",
100, "Alice::CERN::Castor",
"003cce72-d0b2-1f30-aeff-c20c802abeef")) < 0) {
cout << "Error in AddFile " << fname << endl;
}
4) Tagging Files in the catalogue
// adding a single attribute
if ((gGrid->AddAttribute(fname, "mdc4", "filesize", "1000")) < 0) {
cout << "Error adding attribute to " << fname << endl;
}
// adding multiple attributes
if ((gGrid->AddAttribute(fname, "mdc4", "filesize", "1000", "offset",
"100")) < 0) {
cout << "Error adding attribute to " << fname << endl;
} // one can just continue the list of tags with more values ->
// variable argument list
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...