some additional checks if the msr-file is already a new msr-file

This commit is contained in:
nemu 2008-02-18 10:13:41 +00:00
parent 3bbd235a11
commit fdfcf78e94

View File

@ -75,6 +75,11 @@ bool msr2msr_run(char *str)
// for filtering
run.ToUpper();
// remove run comment, i.e. (name ...
Ssiz_t idx = line.Index("(");
if (idx > 0)
line.Remove(idx);
// tokenize run
tokens = line.Tokenize(" \t");
if (tokens->GetEntries() < 4) {
@ -85,6 +90,10 @@ bool msr2msr_run(char *str)
return false;
}
if (tokens->GetEntries() == 5) { // alread new msr file, do only add the proper run comment
sprintf(str, "%s (name beamline institute data-file-format)", line.Data());
return true;
}
if (run.Contains("NEMU")) {
ostr[0] = dynamic_cast<TObjString*>(tokens->At(1)); // file name