Better way to handle DataSource->OpenSource()
Whenever you need to call a DataSource function, you have to first call OpenSource(path)
. Most of the time, the call isn't actually needed, but if you miss calling it in some situation and it turns out the data source hasn't actually been opened yet, it isn't clear that's what the problem is.
Ideally the data source could check itself if it needs to call OpenSource
instead of having to rely on calling that before pretty much every other call to a DataSource function, but it needs a path passed to it (in the case of files, it's the path to a BP file, otherwise it's the name given to ADIOS for the stream). It seems like path could be stored in the DataSource and then whenever a DataSource function is called, it will check to see if ADIOS and the file/stream has been opened, if not then the DataSource will call OpenSource
itself.