diff --git a/neuland/application/R3BNeulandAnalysisApp.cxx b/neuland/application/R3BNeulandAnalysisApp.cxx index 2076c7757..08e349b3d 100644 --- a/neuland/application/R3BNeulandAnalysisApp.cxx +++ b/neuland/application/R3BNeulandAnalysisApp.cxx @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include @@ -77,7 +78,10 @@ namespace R3B::Neuland UseChannel(pileup_strategy, tamex_par, cal_to_hit_par)); } }, { { "neuland", "tacquila" }, - [cal_to_hit_par]() { return Digitizing::CreateEngine(UsePaddle(cal_to_hit_par), UseChannel()); } }, + [cal_to_hit_par]() { + return Digitizing::CreateEngine(UsePaddle(cal_to_hit_par), + UseChannel()); + } }, { { "mock", "tamex" }, [&tamex_par, pileup_strategy, cal_to_hit_par]() { @@ -85,7 +89,9 @@ namespace R3B::Neuland UseChannel(pileup_strategy, tamex_par, cal_to_hit_par)); } }, { { "neuland", "mock" }, - [cal_to_hit_par]() { return Digitizing::CreateEngine(UsePaddle(cal_to_hit_par), UseChannel()); } }, + [cal_to_hit_par]() { + return Digitizing::CreateEngine(UsePaddle(cal_to_hit_par), UseChannel()); + } }, { { "mock", "mock" }, []() { return Digitizing::CreateEngine(UsePaddle(), UseChannel()); } } }; @@ -115,6 +121,7 @@ namespace R3B::Neuland void AnalysisApplication::pre_init(FairRun* run) { auto task_option = options_.tasks; + run->SetEventHeader(std::make_unique().release()); const auto& digi_options = task_option.digi; if (digi_options.enable) { diff --git a/neuland/digitizing/R3BNeulandSimCalToCal.cxx b/neuland/digitizing/R3BNeulandSimCalToCal.cxx index f9c01fba1..a402415da 100644 --- a/neuland/digitizing/R3BNeulandSimCalToCal.cxx +++ b/neuland/digitizing/R3BNeulandSimCalToCal.cxx @@ -10,6 +10,14 @@ namespace R3B::Neuland { void convert_event_header(FairMCEventHeader* mc_header, R3BEventHeader* header) { + if (mc_header == nullptr) + { + throw R3B::runtime_error("MCEventHeader is nullptr!"); + } + if (header == nullptr) + { + throw R3B::runtime_error("EventHeader is nullptr!"); + } header->SetRunId(mc_header->GetRunID()); header->SetEventno(mc_header->GetEventID()); }