1 const char* GetARversion(){
3 // Returns AliRoot version extracted from what is found in the
4 // $ALICE_ROOT/CVS/ directory
7 const char* vFile = gSystem->ExpandPathName("$ALICE_ROOT/CVS/Tag");
8 if(gSystem->AccessPathName(vFile)){
11 TFile *fv= TFile::Open("$ALICE_ROOT/CVS/Tag?filetype=raw","READ");
12 Int_t size = fv->GetSize();
13 char *buf = new Char_t[size];
14 memset(buf, '\0', size);
16 if ( fv->ReadBuffer(buf, size) ) {
17 Warning("GetARversion.C","Error reading AliRoot version from file to buffer!");
21 if(vAli.Contains('\n')) vAli.Remove(vAli.First('\n'));
22 if(vAli.Contains('v')) vAli.Remove(0,vAli.First('v'));