Skip to content

Commit

Permalink
set run id from file source
Browse files Browse the repository at this point in the history
  • Loading branch information
YanzhaoW committed Oct 25, 2024
1 parent fca8612 commit e5a61a3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions neuland/executables/neulandAna.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,15 @@ auto main(int argc, const char** argv) -> int
FairLogger::GetLogger()->SetLogScreenLevel(logLevel->value().c_str());

auto run = std::make_unique<FairRunAna>();
auto fairroot_input_files = R3B::GetFilesFromRegex(simuFileName->value());
auto tree_input_files = R3B::GetFilesFromRegex(simuTreeFileName->value());
auto filesource = std::make_unique<R3BFileSource2>();
if (run_id->value() >= 0)
{
run->SetRunId(run_id->value());
R3BLOG(info, fmt::format("Set to run id {}", run_id->value()));
filesource->SetRunId(run_id->value());
R3BLOG(info, fmt::format("Filesource2: Set to run id {}", run_id->value()));
}

auto fairroot_input_files = R3B::GetFilesFromRegex(simuFileName->value());
auto tree_input_files = R3B::GetFilesFromRegex(simuTreeFileName->value());
auto filesource = std::make_unique<R3BFileSource2>();
filesource->AddFile(std::move(tree_input_files), true);
filesource->AddFile(std::move(fairroot_input_files), false);

Expand Down
2 changes: 1 addition & 1 deletion r3bbase/R3BFileSource2.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ void R3BFileSource2::FillEventHeader(FairEventHeader* evtHeader)
if (init_runID != GetRunId())
{
R3BLOG(
error,
warn,
fmt::format("runID {} being set is different from the runID {} in the data file!", GetRunId(), init_runID));
}
SetRunId(init_runID); // NOLINT
Expand Down

0 comments on commit e5a61a3

Please sign in to comment.