From fdfcf78e9401ea5c04c3971d5f4f21a819b6d0a7 Mon Sep 17 00:00:00 2001 From: nemu Date: Mon, 18 Feb 2008 10:13:41 +0000 Subject: [PATCH] some additional checks if the msr-file is already a new msr-file --- src/msr2msr.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/msr2msr.cpp b/src/msr2msr.cpp index 025a3284..d14d2871 100644 --- a/src/msr2msr.cpp +++ b/src/msr2msr.cpp @@ -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(tokens->At(1)); // file name