From 7531c9c4c472b262adcf76a9f583441481234105 Mon Sep 17 00:00:00 2001 From: "Ryan@SOLARIS_testStation" Date: Tue, 13 Aug 2024 14:41:27 -0400 Subject: [PATCH] fix outfile name --- Bin2Root.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Bin2Root.cpp b/Bin2Root.cpp index 0c7bb7e..f257c61 100644 --- a/Bin2Root.cpp +++ b/Bin2Root.cpp @@ -62,8 +62,9 @@ int main(int argc, char **argv) { }else{ TString temp = inFileName[0]; temp.Remove(0, pos+1); - temp.Remove(3); - outFileName = "run" + temp; + int pos = temp.Last('.'); + temp.Remove(pos); + outFileName = Form("run%03d", atoi(temp)); if( timeWindow < 0 ) { outFileName +="_single.root"; }else{