You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When reading from more than one file the reading of the meta data breaks after the first file has been read. The read-multiple test doesn't actually cover this so it has gone undetected until now.
auto evt_metadatatree = static_cast<TTree*>(m_chain->GetFile()->Get("evt_metadata"));
evt_metadatatree->SetBranchAddress("evtMD",&emd);
evt_metadatatree->GetEntry(m_eventNumber);
the call to m_chain->GetFile() possibly still returns the "old" file and has not necessarily switched to the "new" file yet. For this to happen a call to m_chain->LoadTree(m_eventNumber) needs to happen, which is happening only in readCollection:
This issue is easily solved for meta data that is expected to change with every event / run. However, it is a bit harder, also from a conceptual point of view, for meta data that are read at the beginning of the file which is done in openFiles, but only for the first file. It is possible that the stored meta data in the next file are different, but currently this is not taken into account when switching files.
The text was updated successfully, but these errors were encountered:
When reading from more than one file the reading of the meta data breaks after the first file has been read. The
read-multiple
test doesn't actually cover this so it has gone undetected until now.The reason seems to be that in
podio/src/ROOTReader.cc
Lines 18 to 20 in 6a1e506
the call to
m_chain->GetFile()
possibly still returns the "old" file and has not necessarily switched to the "new" file yet. For this to happen a call tom_chain->LoadTree(m_eventNumber)
needs to happen, which is happening only inreadCollection
:podio/src/ROOTReader.cc
Line 84 in 6a1e506
This issue is easily solved for meta data that is expected to change with every event / run. However, it is a bit harder, also from a conceptual point of view, for meta data that are read at the beginning of the file which is done in
openFiles
, but only for the first file. It is possible that the stored meta data in the next file are different, but currently this is not taken into account when switching files.The text was updated successfully, but these errors were encountered: