1 #include "FairMCEventHeader.h"
2 #include "FairRootManager.h"
3 #include "TClonesArray.h"
11 assert(!in_branches_.empty() && !out_branch_.empty() && out_config_
13 auto* ioman = FairRootManager::Instance();
14 assert(ioman !=
nullptr);
15 cbm_header_ = (FairMCEventHeader*) ioman->GetObject(in_branches_[0].c_str());
18 AnalysisTree::BranchConfig SimEventHeaderBranch(
19 "SimEventHeader", AnalysisTree::DetType::kEventHeader);
20 SimEventHeaderBranch.AddField<
float>(
"psi_RP");
21 SimEventHeaderBranch.AddField<
float>(
"b");
22 out_config_->AddBranchConfig(SimEventHeaderBranch);
32 throw std::runtime_error(
33 "CbmSimEventHeaderConverter::Exec - ERROR! No fHeader!");
42 .GetFieldId(
"psi_RP"));