fixed a bug with double vectors in TMusrRunHeader

This commit is contained in:
suter_a 2015-10-29 16:03:36 +01:00
parent f44a9e94cf
commit c6f5c1205e
2 changed files with 7 additions and 3 deletions

View File

@ -4,6 +4,10 @@
changes since 0.15.0 changes since 0.15.0
=================================== ===================================
FIXED 2015-10-29 TMusrRunHeader didn't map a double vector properly into a
string. The last element was a copy of the 2nd last instead
if the proper last. This is now fixed. Fixed also some
comment typo.
changes since 0.14.0 changes since 0.14.0
=================================== ===================================

View File

@ -1437,14 +1437,14 @@ bool TMusrRunHeader::UpdateFolder(TObject *treeObj, TString path)
// remove the first path element // remove the first path element
if (!RemoveFirst(path, '/')) { if (!RemoveFirst(path, '/')) {
cerr << endl << ">> TMusrRunHeader::FillFolder(): **ERROR** couldn't tokenize path!!" << endl; cerr << endl << ">> TMusrRunHeader::UpdateFolder(): **ERROR** couldn't tokenize path!!" << endl;
return false; return false;
} }
if (!obj) { // required object not present, create it if (!obj) { // required object not present, create it
TObjArray *oarray = new TObjArray(); TObjArray *oarray = new TObjArray();
if (!oarray) { if (!oarray) {
cerr << endl << ">> TMusrRunHeader::FillFolder(): **ERROR** couldn't create header structure!!" << endl; cerr << endl << ">> TMusrRunHeader::UpdateFolder(): **ERROR** couldn't create header structure!!" << endl;
return false; return false;
} }
// set the name of the new TObjArray // set the name of the new TObjArray
@ -1636,7 +1636,7 @@ TObjString TMusrRunHeader::GetHeaderString(UInt_t idx)
str += subStr; str += subStr;
str += "; "; str += "; ";
} }
subStr.Form(fmt, dvec.size()-1); subStr.Form(fmt, dvec[dvec.size()-1]);
str += subStr; str += subStr;
str += " -@"; str += " -@";
str += MRH_DOUBLE_VECTOR; str += MRH_DOUBLE_VECTOR;