16 if (m_infile && m_infile->IsOpen())
26 if (m_infile ==
nullptr)
29 return StatusCode::FAILURE;
34 m_EventTree = (TTree*) m_infile->Get(
"FPGATrackSimEventTree");
36 if (m_EventTree ==
nullptr || m_EventTree->GetEntries() == -1 ){
38 return StatusCode::FAILURE;
40 ATH_MSG_INFO (
"Input file: " <<
path <<
" has "<< m_EventTree->GetEntries() <<
" event entries" );
42 if(!m_EventTree->GetListOfBranches()->FindObject(
m_branchName.c_str())){
44 return StatusCode::FAILURE;
48 branch->SetAddress(&m_eventHeader);
51 return StatusCode::SUCCESS;
68 return StatusCode::FAILURE;
72 if (
m_rwoption.value()==std::string(
"READ") ) {
75 else if (
m_rwoption.value()==std::string(
"RECREATE") ||
m_rwoption.value()==std::string(
"HEADER")) {
77 m_EventTree =
new TTree(
"FPGATrackSimEventTree",
"data");
84 return StatusCode::FAILURE;
88 return StatusCode::SUCCESS;
94 if (
m_rwoption.value()==std::string(
"RECREATE")){
102 delete m_eventHeader;
103 return StatusCode::SUCCESS;
108 if (
m_rwoption.value()==std::string(
"READ") ){
110 return StatusCode::SUCCESS;
123 return StatusCode::SUCCESS;
128 if (
m_rwoption.value()!=std::string(
"READ") ){
130 return StatusCode::SUCCESS;
136 if (
m_event >= m_EventTree->GetEntries())
142 return StatusCode::SUCCESS;
148 m_EventTree->GetEntry(
m_event++);
154 return StatusCode::SUCCESS;