|
lcls2
C++ API: public headers of xtcdata, psalg, psdaq and psana
|
One simulated event: an ArrayIO<float> that loads a float array from a text file; nda() returns it. More...
#include <DataSourceSimulator.hh>
Inherits psalg::ArrayIO< float >.
Public Member Functions | |
| EventSimulator (const std::string &fname="") | |
| Load fname with ArrayIO<float>; if the file cannot be opened the status is UNREADABLE and the array stays empty. | |
| virtual | ~EventSimulator () |
| Destructor; does nothing. | |
| NDArray< float > & | nda () |
| Return the loaded array (ArrayIO::ndarray()). | |
Public Member Functions inherited from psalg::ArrayIO< float > | |
| ArrayIO (const std::string &fname, void *buf=0) | |
| Read fname right away. | |
| ~ArrayIO () | |
| Destructor; only logs a trace message. | |
| const STATUS | status () const |
| Return the load status. | |
| const std::string | str_status () const |
| Return the status name ("LOADED", "DEFAULT", "UNREADABLE" or "UNDEFINED"). | |
| const std::string & | dtype_name () const |
| Return the DATATYPE value read from the file (empty if there was none). | |
| NDArray< float > & | ndarray () |
| Return the loaded array. | |
Additional Inherited Members | |
Public Types inherited from psalg::ArrayIO< float > | |
| enum | STATUS |
| Load status reported by status(). More... | |
| typedef psalg::types::shape_t | shape_t |
| Alias for psalg::types::shape_t (uint32_t). | |
| typedef psalg::types::size_t | size_t |
| Alias for psalg::types::size_t (uint32_t). | |
Public Attributes inherited from psalg::ArrayIO< float > | |
| std::string | STRAUS [4] |
| Names of the STATUS values, used by str_status(). | |
One simulated event: an ArrayIO<float> that loads a float array from a text file; nda() returns it.
|
inline |
Load fname with ArrayIO<float>; if the file cannot be opened the status is UNREADABLE and the array stays empty.
|
inlinevirtual |
Destructor; does nothing.
|
inline |
Return the loaded array (ArrayIO::ndarray()).