Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set the eventheader for ana executable #27

Merged
merged 1 commit into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions neuland/application/R3BNeulandAnalysisApp.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <R3BDigitizingPaddleMock.h>
#include <R3BDigitizingPaddleNeuland.h>
#include <R3BDigitizingTacQuila.h>
#include <R3BEventHeader.h>
#include <R3BException.h>
#include <R3BFileSource2.h>
#include <R3BLogger.h>
Expand Down Expand Up @@ -77,15 +78,20 @@ namespace R3B::Neuland
UseChannel<TamexChannel>(pileup_strategy, tamex_par, cal_to_hit_par));
} },
{ { "neuland", "tacquila" },
[cal_to_hit_par]() { return Digitizing::CreateEngine(UsePaddle<NeulandPaddle>(cal_to_hit_par), UseChannel<TacquilaChannel>()); } },
[cal_to_hit_par]() {
return Digitizing::CreateEngine(UsePaddle<NeulandPaddle>(cal_to_hit_par),
UseChannel<TacquilaChannel>());
} },
{ { "mock", "tamex" },
[&tamex_par, pileup_strategy, cal_to_hit_par]()
{
return Digitizing::CreateEngine(UsePaddle<MockPaddle>(),
UseChannel<TamexChannel>(pileup_strategy, tamex_par, cal_to_hit_par));
} },
{ { "neuland", "mock" },
[cal_to_hit_par]() { return Digitizing::CreateEngine(UsePaddle<NeulandPaddle>(cal_to_hit_par), UseChannel<MockChannel>()); } },
[cal_to_hit_par]() {
return Digitizing::CreateEngine(UsePaddle<NeulandPaddle>(cal_to_hit_par), UseChannel<MockChannel>());
} },
{ { "mock", "mock" },
[]() { return Digitizing::CreateEngine(UsePaddle<MockPaddle>(), UseChannel<MockChannel>()); } }
};
Expand Down Expand Up @@ -115,6 +121,7 @@ namespace R3B::Neuland
void AnalysisApplication::pre_init(FairRun* run)
{
auto task_option = options_.tasks;
run->SetEventHeader(std::make_unique<R3BEventHeader>().release());
const auto& digi_options = task_option.digi;
if (digi_options.enable)
{
Expand Down
8 changes: 8 additions & 0 deletions neuland/digitizing/R3BNeulandSimCalToCal.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@
{
void convert_event_header(FairMCEventHeader* mc_header, R3BEventHeader* header)
{
if (mc_header == nullptr)
{
throw R3B::runtime_error("MCEventHeader is nullptr!");

Check warning on line 15 in neuland/digitizing/R3BNeulandSimCalToCal.cxx

View workflow job for this annotation

GitHub Actions / clang-lint (default, ubuntu-latest)

neuland/digitizing/R3BNeulandSimCalToCal.cxx:15:28 [misc-include-cleaner]

no header providing "R3B::runtime_error" is directly included
}
if (header == nullptr)
{
throw R3B::runtime_error("EventHeader is nullptr!");
}
header->SetRunId(mc_header->GetRunID());
header->SetEventno(mc_header->GetEventID());
}
Expand Down
Loading