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
The ROOTDataReaderTEM classes spool through the entire data file in the constructor. I think a byproduct of this is that when the class is constructed the object is left in a state with m_eventCounter equal to the number of events in the file. In this state, the next call to getEvent() will return a null pointer which is the standard behavior when the end of file is reached. It would be more desirable if at the end of the constructor the counter was reset and the source is ready to provide data. I think this involves a call to resetSource() at the end of the constructor.
Many AmpTools functions reset the source prior to doing fitting, etc., but this can be a surprise to someone writing some standalone code that creates a data reader and then tries to read events from the file.
The text was updated successfully, but these errors were encountered:
The ROOTDataReaderTEM classes spool through the entire data file in the constructor. I think a byproduct of this is that when the class is constructed the object is left in a state with m_eventCounter equal to the number of events in the file. In this state, the next call to getEvent() will return a null pointer which is the standard behavior when the end of file is reached. It would be more desirable if at the end of the constructor the counter was reset and the source is ready to provide data. I think this involves a call to resetSource() at the end of the constructor.
Many AmpTools functions reset the source prior to doing fitting, etc., but this can be a surprise to someone writing some standalone code that creates a data reader and then tries to read events from the file.
The text was updated successfully, but these errors were encountered: