Class Index | Cross Index | Namespace Index |
FrameReaderBase
Contained in: FrameCPP::Version_3_4_5
Derived from:
FrameCPP::Version_3_4_5::Input
Derived by:
FrameCPP::Version_3_4_5::DaqReader
FrameCPP::Version_3_4_5::FrameReader
FrameCPP::Version_3_4_5::GeneralReader
FrameCPP::Version_3_4_5::TOCReader
#include "../../../../../lib/framecpp/src/Version3_4_5/framereaderbase.hh"
public function member index: |
|||
FrameReaderBase | (std::istream& in, bool autoReset = false); | Constructor | |
virtual | ~FrameReaderBase | (); | Destructor |
bool | byteSwapNeeded | (); | See if file input requires byte swapping |
INT_2U | currentInstance | (); | Get current input object's frame structure instance |
INT_4U | getFrameNumber | (); | Read the `number of frames'. |
inline INT_4U | getFrames | () const; | Get the number of frames read. |
inline bool | isAutoReset | () const; | Check if AutoReset is on. |
inline FrameReaderBase& | operator >> | (CHAR& v); | Read a CHAR. |
inline FrameReaderBase& | operator >> | (CHAR_U& v); | Read a CHAR_U |
inline FrameReaderBase& | operator >> | (INT_2S& v); | Read an INT_2S |
inline FrameReaderBase& | operator >> | (INT_2U& v); | Read an INT_2U |
inline FrameReaderBase& | operator >> | (INT_4S& v); | Read an INT_4S |
inline FrameReaderBase& | operator >> | (INT_4U& v); | Read an INT_4U |
inline FrameReaderBase& | operator >> | (INT_8S& v); | Read an INT_8S |
inline FrameReaderBase& | operator >> | (INT_8U& v); | Read an INT_8U |
inline FrameReaderBase& | operator >> | (REAL_4& v); | Read a REAL_4 |
inline FrameReaderBase& | operator >> | (REAL_8& v); | Read a REAL_8 |
inline FrameReaderBase& | operator >> | (std::string& v); | Read a std::string |
inline FrameReaderBase& | operator >> | (Time& t); | Read a Time |
inline FrameReaderBase& | operator >> | (Location& t); | Read a Location |
FrameReaderBase& | operator >> | (Base** v); | Read a pointer to an object. |
FrameReaderBase& | operator >> | (Container< T >& c); | Read a container |
Frame* | readFrame | (); | Read a Frame |
virtual void | readNextNodeReference | (); | Read next Linked-list Node |
void | readType | (T*, unsigned int n); | Read an array |
void | reset | (); | Reset the Reader |
inline void | setAutoReset | (bool autoReset); | Set the AutoReset flag. |
protected function member index: |
|||
bool | readBase | (); | Read a Frame Object |
virtual void | readBaseHook | (Base* base, INT_2U classId); | Read Object Hook |
void | readEndOfFile | (); | Read End-Of-File |
void | reconnect | (bool ignoreErrors = false); | Resolve References |
In a frame file, containers are implemented by using linked-lists. Every object in the file which can be contained by another object has a pointer to the next element in the linked list. This creates a class which is both a linked-list element and a linked-list container. Internally, FrameCPP does not use linked-lists. The "pointer to next" in the frame objects has been removed.
This is the general read procedure:
This is the object component read procedure:
Parameters:
Parameter | Description |
std::istream& in | The stream to read from. |
bool autoReset | True if the reader should automatically reset itself when an end-of-file structure is read. |
Exceptions:
Exception | Description |
None. |
Exceptions:
Exception | Description |
None. |
Return value:
INT_4U- How many frames are there in the frame file.
Exceptions:
Exception | Description |
read_failure | Read failed. |
Return value:
INT_4U- The number of frames read.
Exceptions:
Exception | Description |
None. | |
None. |
Return value:
bool- True is AutoReset is on.
Exceptions:
Exception | Description |
None. | |
None. |
Parameters:
Parameter | Description |
CHAR& v | Target. |
Return value:
FrameReaderBase&- This object.
Exceptions:
Exception | Description |
read_failure | Read failed. |
read_failure | Read failure occured. |
Parameters:
Parameter | Description |
CHAR_U& v | Target. |
Return value:
FrameReaderBase&- This object.
Exceptions:
Exception | Description |
read_failure | Read failed. |
read_failure | Read failure occured. |
Parameters:
Parameter | Description |
INT_2S& v | Target. |
Return value:
FrameReaderBase&- This object.
Exceptions:
Exception | Description |
read_failure | Read failed. |
read_failure | Read failure occured. |
Parameters:
Parameter | Description |
INT_2U& v | Target. |
Return value:
FrameReaderBase&- This object.
Exceptions:
Exception | Description |
read_failure | Read failed. |
read_failure | Read failure occured. |
Parameters:
Parameter | Description |
INT_4S& v | Target. |
Return value:
FrameReaderBase&- This object.
Exceptions:
Exception | Description |
read_failure | Read failed. |
read_failure | Read failure occured. |
Parameters:
Parameter | Description |
INT_4U& v | Target. |
Return value:
FrameReaderBase&- This object.
Exceptions:
Exception | Description |
read_failure | Read failed. |
read_failure | Read failure occured. |
Parameters:
Parameter | Description |
INT_8S& v | Target. |
Return value:
FrameReaderBase&- This object.
Exceptions:
Exception | Description |
read_failure | Read failed. |
read_failure | Read failure occured. |
Parameters:
Parameter | Description |
INT_8U& v | Target. |
Return value:
FrameReaderBase&- This object.
Exceptions:
Exception | Description |
read_failure | Read failed. |
read_failure | Read failure occured. |
Parameters:
Parameter | Description |
REAL_4& v | Target. |
Return value:
FrameReaderBase&- This object.
Exceptions:
Exception | Description |
read_failure | Read failed. |
read_failure | Read failure occured. |
Parameters:
Parameter | Description |
REAL_8& v | Target. |
Return value:
FrameReaderBase&- This object.
Exceptions:
Exception | Description |
read_failure | Read failed. |
read_failure | Read failure occured. |
Parameters:
Parameter | Description |
std::string& v | Target. |
Return value:
FrameReaderBase&- This object.
Exceptions:
Exception | Description |
read_failure | Read failed. |
read_failure | Read failure occured. |
Parameters:
Parameter | Description |
Time& t | Target. |
Return value:
FrameReaderBase&- This object.
Exceptions:
Exception | Description |
read_failure | Read failed. |
read_failure | Read failure occured. |
Parameters:
Parameter | Description |
Location& l | Target. |
Return value:
FrameReaderBase&- This object.
Exceptions:
Exception | Description |
read_failure | Read failed. |
read_failure | Read failure occured. |
Some frame structures have a pointer to another object which is not part of a linked-list. This method reads in those pointers.
Parameters:
Parameter | Description |
Base** v | Target. |
Return value:
FrameReaderBase&- This object.
Exceptions:
Exception | Description |
read_failure | Read failure occured. |
Parameters:
Parameter | Description |
Container< T >& c | The container to read into. |
Return value:
FrameReaderBase&- This object.
Exceptions:
Exception | Description |
read_failure | Read failure occured. |
read_failure | Read failed. |
Return value:
bool- True if the end-of-frame object was read.
Exceptions:
Exception | Description |
std::bad_alloc | Memory allocation failed. |
read_failure | Read failure accured. |
Exceptions:
Exception | Description |
std::bad_alloc | Memory allocation failed. |
This reads the end-of-file structure.
Return value:
Frame*- Newly allocated.
Exceptions:
Exception | Description |
std::bad_alloc | Memory allocation failed. |
read_failure | Read failure accured. |
This method reads in the next node of a linked list. for example, this method is called when reading in the 'next' field in an FrAdcData struct.
Exceptions:
Exception | Description |
read_failure | Read failure occured. |
Parameters:
Parameter | Description |
T* data | Target array. |
unsigned int n | Number of array elements to read. |
Return value:
FrameReaderBase&- This object.
Exceptions:
Exception | Description |
read_failure | Read failure occured. |
This method puts the frame together, resolving the references which were read during the read process.
Exceptions:
Exception | Description |
None. |
If AutoReset is on, then this class will reset itself whenever the end-of-file structure is read.
Parameters:
Parameter | Description |
bool autoReset | True if want to enable autoreset. |
Exceptions:
Exception | Description |
None. | |
None. |