proper handling of version string

This commit is contained in:
nemu 2011-06-02 15:37:37 +00:00
parent a427157180
commit 72013cfaf0

View File

@ -150,7 +150,16 @@ TPsiRunHeader::~TPsiRunHeader()
*/ */
TString TPsiRunHeader::GetVersion() const TString TPsiRunHeader::GetVersion() const
{ {
return GetInfoString(fVersion); TString str("??");
Int_t idx = fVersion.GetString().First(":");
if ((idx < 0) || (idx+2 > fVersion.GetString().Length()))
return str;
str = fVersion.GetString();
str.Replace(0, idx+2, 0, 0);
return str;
} }
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------