25 return StatusCode::FAILURE;
28 if (
m_rwoption.value() == std::string(
"READ")) {
33 return StatusCode::FAILURE;
41 return StatusCode::SUCCESS;
54 if (
m_rwoption.value() != std::string(
"READ")) {
55 ATH_MSG_FATAL(
"Called configureReadBranches() when ROOT file was not opened in READ mode.");
56 return StatusCode::FAILURE;
63 if (!
m_EventTree->GetListOfBranches()->FindObject(branchName.c_str())) {
64 ATH_MSG_FATAL(
"Configured input branch: " << branchName <<
" not found!");
65 return StatusCode::FAILURE;
67 TBranch *branchIn =
m_EventTree->GetBranch(branchName.c_str());
69 m_EventTree->SetBranchStatus(branchName.c_str(), 1);
75 if (!
m_EventTree->GetListOfBranches()->FindObject(branchName.c_str())) {
76 ATH_MSG_FATAL(
"Configured output branch: " << branchName <<
" not found!");
77 return StatusCode::FAILURE;
79 TBranch *branchIn =
m_EventTree->GetBranch(branchName.c_str());
81 m_EventTree->SetBranchStatus(branchName.c_str(), 1);
84 return StatusCode::SUCCESS;
98 return StatusCode::FAILURE;
103 if (
m_rwoption.value() == std::string(
"READ")) {
105 }
else if (
m_rwoption.value()==std::string(
"RECREATE") ||
m_rwoption.value()==std::string(
"HEADER")) {
111 if (
m_rwoption.value() == std::string(
"HEADER")) {
117 return StatusCode::FAILURE;
122 return StatusCode::SUCCESS;
132 m_EventTree->Branch(branchName.c_str(),
"FPGATrackSimLogicalEventInputHeader", inputHeader);
142 m_EventTree->Branch(branchName.c_str(),
"FPGATrackSimLogicalEventOutputHeader", outputHeader);
152 if (
m_rwoption.value() == std::string(
"RECREATE")) {
158 if (
m_rwoption.value() != std::string(
"HEADER")) {
166 return StatusCode::SUCCESS;
174 if (
m_rwoption.value() == std::string(
"READ")) {
176 return StatusCode::SUCCESS;
201 ATH_MSG_ERROR(
"Tried to fill output ROOT file with no configured input or output headers.");
202 return StatusCode::FAILURE;
207 return StatusCode::SUCCESS;
215 if (
m_rwoption.value() != std::string(
"READ")) {
217 return StatusCode::SUCCESS;
238 return StatusCode::SUCCESS;
245 if (statIn <= 0)
ATH_MSG_WARNING(
"Error in reading from branch " << branchName);
250 if (statOut <= 0)
ATH_MSG_WARNING(
"Error in reading from branch " << branchName);
257 return StatusCode::SUCCESS;