bug fix on EventBuilder outfile

This commit is contained in:
splitPoleDAQ 2024-01-24 16:18:20 -05:00
parent 7e3aaf9c83
commit 661241d44f
2 changed files with 8 additions and 6 deletions

View File

@ -47,9 +47,10 @@ int main(int argc, char **argv) {
/// Form outFileName;
TString outFileName = inFileName[0];
int pos = outFileName.Index("_");
pos = outFileName.Index("_", pos+1);
outFileName.Remove(pos);
int pos = outFileName.Last('/');
pos = outFileName.Index("_", pos+1); // find next "_"
pos = outFileName.Index("_", pos+1); // find next "_"
outFileName.Remove(pos); // remove the rest
outFileName += "_" + std::to_string(timeWindow);
outFileName += ".root";
printf("-------> Out file name : %s \n", outFileName.Data());

View File

@ -44,9 +44,10 @@ int main(int argc, char **argv) {
/// Form outFileName;
TString outFileName = inFileName[0];
int pos = outFileName.Index("_");
pos = outFileName.Index("_", pos+1);
outFileName.Remove(pos);
int pos = outFileName.Last('/');
pos = outFileName.Index("_", pos+1); // find next "_"
pos = outFileName.Index("_", pos+1); // find next "_"
outFileName.Remove(pos); // remove the rest
outFileName += "_" + std::to_string(timeWindow) + "_noTrace";
outFileName += ".root";
printf("-------> Out file name : %s \n", outFileName.Data());