Class Index Cross Index Namespace Index

Class FrameCPP::Version_3_4_5::TOCReader

TOCReader
Contained in: FrameCPP::Version_3_4_5
Derived from: FrameCPP::Version_3_4_5::FrameReaderBase FrameCPP::Version_3_4_5::TOC
Derived by: FrameCPP::Version_3_4_5::FrameAppendWriterTOC FrameCPP::Version_3_4_5::FrameReadPlan

#include "../../../../../lib/framecpp/src/Version3_4_5/tocreader.hh"


public function member index:

TOCReader(std::istream& in, bool buildToc = false); Constructor
virtual ~TOCReader(); Destructor
inline const adcNamePositionMap_type& getAdcNamePositionMap() const; Get ADC std::map
inline const std::vector<REAL_8>& getDt() const; Get frame durations
inline const std::map< std::string, std::vector<eventAttr> >& getEventNamePositionMap() const; Get event data std::map
inline const std::vector<INT_4U>& getFrame() const; Get frame numbers
inline const std::vector<Time>& getGTime() const; Get frame time stamps
inline const std::vector<INT_8U>& getPosition() const; Get frame header positions
inline const std::vector<INT_8U>& getPositionADC() const; Get first ADC structure positions
inline const std::vector<INT_8U>& getPositionMsg() const; Get message structure positions
inline const std::vector<INT_8U>& getPositionSer() const; Get first serial data structure positions
inline const std::vector<INT_8U>& getPositionTable() const; Get first referenced from raw data structure table structure positions
inline const std::map< std::string, std::vector<INT_8U> >& getProcNamePositionMap() const; Get post-processed data std::map
inline const std::vector<INT_4S>& getRuns() const; Get frame run numbers
inline const std::vector<INT_2U>& getSHid() const; Get structure IDs
inline const std::vector<std::string>& getSHname() const; Get structure names
inline const std::map< std::string, std::vector<INT_8U> >& getSerNamePositionMap() const; Get serial data std::map
inline const std::map< std::string, std::vector<eventAttr> >& getSimEventNamePositionMap() const; Get simulated event data std::map
inline const std::map< std::string, std::pair< std::string, std::vector< std::pair< std::vector< INT_4U >, INT_8U > > > >& getStatNamePositionMap() const; Get static data std::map
inline const std::map< std::string, std::vector<INT_8U> >& getSumNamePositionMap() const; Get summary data std::map
inline const INT_2S getULeapS() const; Get leap second from the first frame
inline AdcData* readADC(unsigned long frameNumber, std::string adcName); Get one ADC channel from one frame
inline std::vector<AdcData*> readADC(std::string adcName); Get named ADC channel from all frames
std::vector< Event* > readEvent(); Get all events from the file
std::vector< Event* > readEvent(std::string eventName); Get all named events
std::vector< Event* > readEvent(std::string eventName, Time time); Get all named events with certain time
Frame* readFrame(unsigned long frameNumber); Fully read one frame
Frame* readFrameHeader(unsigned long frameNumber); Read one frame header
inline ProcData* readProc(unsigned long frameNumber, std::string procName); Get one processed data structure from one frame
inline std::vector<ProcData*> readProc(std::string procName); Get named processed data structure from all frames
inline SerData* readSer(unsigned long frameNumber, std::string serName); Get one serial data structure from one frame
inline std::vector<SerData*> readSer(std::string serName); Get named serial data structure from all frames
inline SimData* readSim(unsigned long frameNumber, std::string simName); Get one simulated data structure from one frame
inline std::vector<SimData*> readSim(std::string simName); Get named simulated data structure from all frames
std::vector< SimEvent* > readSimEvent(); Get all simulated events from the file
std::vector< SimEvent* > readSimEvent(std::string simName); Get all named simulated events
std::vector< SimEvent* > readSimEvent(std::string simName, Time time); Get all named simulated events with certain time
std::vector< StatData* > readStat(); Get all statics from the file
StatData* readStat(const std::string& statName, INT_4U time); Get a static from the file for certain time with the highest version number
std::vector< StatData* > readStatName(const std::string& statName); Get all named statics from the file
std::vector< StatData* > readStatTime(const std::string& statName, INT_4U time); Get all named statics from the file for certain time
inline std::vector<Summary*> readSum(std::string sumName); Get named summary data structure from all frames
inline Summary* readSummary(unsigned long frameNumber, std::string sumName); Get one summary data structure from one frame
 

protected function member index:

virtual void readBaseHook(Base* base, INT_2U classId);
Base* readStructure(bool pick = true);
 

private function member index:

std::vector<Base*> read(INT_2U structureClassId, std::string name);
Base* read(unsigned long frameNumber, INT_2U structureClassId, std::string name);
 

Description:

This class is used to access a frame file with table of contents.


Function Member Descriptions:


FrameCPP::Version_3_4_5::TOCReader::TOCReader - Constructor


TOCReader(std::istream& in, bool buildToc = false);

Exceptions:
ExceptionDescription
read_failureRead failed.



FrameCPP::Version_3_4_5::TOCReader::~TOCReader - Destructor


virtual ~TOCReader();



FrameCPP::Version_3_4_5::TOCReader::getAdcNamePositionMap - Get ADC std::map


inline const adcNamePositionMap_type& getAdcNamePositionMap() const;

Exceptions:
ExceptionDescription
None.



FrameCPP::Version_3_4_5::TOCReader::getDt - Get frame durations


inline const std::vector<REAL_8>& getDt() const;

Exceptions:
ExceptionDescription
None.



FrameCPP::Version_3_4_5::TOCReader::getEventNamePositionMap - Get event data std::map


inline const std::map< std::string, std::vector<eventAttr> >& getEventNamePositionMap() const;

Exceptions:
ExceptionDescription
None.



FrameCPP::Version_3_4_5::TOCReader::getFrame - Get frame numbers


inline const std::vector<INT_4U>& getFrame() const;

Exceptions:
ExceptionDescription
None.



FrameCPP::Version_3_4_5::TOCReader::getGTime - Get frame time stamps


inline const std::vector<Time>& getGTime() const;

Exceptions:
ExceptionDescription
None.



FrameCPP::Version_3_4_5::TOCReader::getPosition - Get frame header positions


inline const std::vector<INT_8U>& getPosition() const;

Exceptions:
ExceptionDescription
None.



FrameCPP::Version_3_4_5::TOCReader::getPositionADC - Get first ADC structure positions


inline const std::vector<INT_8U>& getPositionADC() const;

Exceptions:
ExceptionDescription
None.



FrameCPP::Version_3_4_5::TOCReader::getPositionMsg - Get message structure positions


inline const std::vector<INT_8U>& getPositionMsg() const;

Exceptions:
ExceptionDescription
None.



FrameCPP::Version_3_4_5::TOCReader::getPositionSer - Get first serial data structure positions


inline const std::vector<INT_8U>& getPositionSer() const;

Exceptions:
ExceptionDescription
None.



FrameCPP::Version_3_4_5::TOCReader::getPositionTable - Get first referenced from raw data structure table structure positions


inline const std::vector<INT_8U>& getPositionTable() const;

Exceptions:
ExceptionDescription
None.



FrameCPP::Version_3_4_5::TOCReader::getProcNamePositionMap - Get post-processed data std::map


inline const std::map< std::string, std::vector<INT_8U> >& getProcNamePositionMap() const;

Exceptions:
ExceptionDescription
None.



FrameCPP::Version_3_4_5::TOCReader::getRuns - Get frame run numbers


inline const std::vector<INT_4S>& getRuns() const;

Exceptions:
ExceptionDescription
None.



FrameCPP::Version_3_4_5::TOCReader::getSHid - Get structure IDs


inline const std::vector<INT_2U>& getSHid() const;

Exceptions:
ExceptionDescription
None.



FrameCPP::Version_3_4_5::TOCReader::getSHname - Get structure names


inline const std::vector<std::string>& getSHname() const;

Exceptions:
ExceptionDescription
None.



FrameCPP::Version_3_4_5::TOCReader::getSerNamePositionMap - Get serial data std::map


inline const std::map< std::string, std::vector<INT_8U> >& getSerNamePositionMap() const;

Exceptions:
ExceptionDescription
None.



FrameCPP::Version_3_4_5::TOCReader::getSimEventNamePositionMap - Get simulated event data std::map


inline const std::map< std::string, std::vector<eventAttr> >& getSimEventNamePositionMap() const;

Exceptions:
ExceptionDescription
None.



FrameCPP::Version_3_4_5::TOCReader::getStatNamePositionMap - Get static data std::map


inline const std::map< std::string, std::pair< std::string, std::vector< std::pair< std::vector< INT_4U >, INT_8U > > > >& getStatNamePositionMap() const;

Exceptions:
ExceptionDescription
None.



FrameCPP::Version_3_4_5::TOCReader::getSumNamePositionMap - Get summary data std::map


inline const std::map< std::string, std::vector<INT_8U> >& getSumNamePositionMap() const;

Exceptions:
ExceptionDescription
None.



FrameCPP::Version_3_4_5::TOCReader::getULeapS - Get leap second from the first frame


inline const INT_2S getULeapS() const;

Exceptions:
ExceptionDescription
None.



FrameCPP::Version_3_4_5::TOCReader::read


std::vector<Base*> read(INT_2U structureClassId, std::string name);
Read single channel from all frames in the file Makes it possible to get a std::vector of structures of particular type. For instance, it is usefull to be able to get a std::vector of FrAdcData structures, where each structure is an instance of an ADC channel from corresponding frame and all ADC structures have the same name. In other words, it will get the data for one ADC channel from all frame in the file. Supports AdcData, ProcData, SimData, SerData and Summary.

Exceptions:
ExceptionDescription
std::bad_alloc, read_failure, not_found_error



FrameCPP::Version_3_4_5::TOCReader::read


Base* read(unsigned long frameNumber, INT_2U structureClassId, std::string name);
Read single data structure from the specified frame. Supports AdcData, ProcData, SimData, SerData and Summary.

Exceptions:
ExceptionDescription
std::bad_alloc, read_failure, not_found_error



FrameCPP::Version_3_4_5::TOCReader::readADC - Get one ADC channel from one frame


inline AdcData* readADC(unsigned long frameNumber, std::string adcName);

Exceptions:
ExceptionDescription
std::bad_alloc, read_failure, not_found_error



FrameCPP::Version_3_4_5::TOCReader::readADC - Get named ADC channel from all frames


inline std::vector<AdcData*> readADC(std::string adcName);

Exceptions:
ExceptionDescription
std::bad_alloc, read_failure, not_found_error



FrameCPP::Version_3_4_5::TOCReader::readBaseHook


virtual void readBaseHook(Base* base, INT_2U classId);

Exceptions:
ExceptionDescription
std::bad_allocMemory allocation failed.



FrameCPP::Version_3_4_5::TOCReader::readEvent - Get all events from the file


std::vector< Event* > readEvent();

Exceptions:
ExceptionDescription
std::bad_alloc, read_failure, not_found_error



FrameCPP::Version_3_4_5::TOCReader::readEvent - Get all named events


std::vector< Event* > readEvent(std::string eventName);

Exceptions:
ExceptionDescription
std::bad_alloc, read_failure, not_found_error



FrameCPP::Version_3_4_5::TOCReader::readEvent - Get all named events with certain time


std::vector< Event* > readEvent(std::string eventName, Time time);

Exceptions:
ExceptionDescription
std::bad_alloc, read_failure, not_found_error



FrameCPP::Version_3_4_5::TOCReader::readFrame - Fully read one frame


Frame* readFrame(unsigned long frameNumber);

Exceptions:
ExceptionDescription
std::bad_alloc, read_failure, not_found_error



FrameCPP::Version_3_4_5::TOCReader::readFrameHeader - Read one frame header


Frame* readFrameHeader(unsigned long frameNumber);

Exceptions:
ExceptionDescription
std::bad_alloc, read_failure, not_found_error



FrameCPP::Version_3_4_5::TOCReader::readProc - Get one processed data structure from one frame


inline ProcData* readProc(unsigned long frameNumber, std::string procName);

Exceptions:
ExceptionDescription
std::bad_alloc, read_failure, not_found_error



FrameCPP::Version_3_4_5::TOCReader::readProc - Get named processed data structure from all frames


inline std::vector<ProcData*> readProc(std::string procName);

Exceptions:
ExceptionDescription
std::bad_alloc, read_failure, not_found_error



FrameCPP::Version_3_4_5::TOCReader::readSer - Get one serial data structure from one frame


inline SerData* readSer(unsigned long frameNumber, std::string serName);

Exceptions:
ExceptionDescription
std::bad_alloc, read_failure, not_found_error



FrameCPP::Version_3_4_5::TOCReader::readSer - Get named serial data structure from all frames


inline std::vector<SerData*> readSer(std::string serName);

Exceptions:
ExceptionDescription
std::bad_alloc, read_failure, not_found_error



FrameCPP::Version_3_4_5::TOCReader::readSim - Get one simulated data structure from one frame


inline SimData* readSim(unsigned long frameNumber, std::string simName);

Exceptions:
ExceptionDescription
std::bad_alloc, read_failure, not_found_error



FrameCPP::Version_3_4_5::TOCReader::readSim - Get named simulated data structure from all frames


inline std::vector<SimData*> readSim(std::string simName);

Exceptions:
ExceptionDescription
std::bad_alloc, read_failure, not_found_error



FrameCPP::Version_3_4_5::TOCReader::readSimEvent - Get all simulated events from the file


std::vector< SimEvent* > readSimEvent();

Exceptions:
ExceptionDescription
std::bad_alloc, read_failure, not_found_error



FrameCPP::Version_3_4_5::TOCReader::readSimEvent - Get all named simulated events


std::vector< SimEvent* > readSimEvent(std::string simName);

Exceptions:
ExceptionDescription
std::bad_alloc, read_failure, not_found_error



FrameCPP::Version_3_4_5::TOCReader::readSimEvent - Get all named simulated events with certain time


std::vector< SimEvent* > readSimEvent(std::string simName, Time time);

Exceptions:
ExceptionDescription
std::bad_alloc, read_failure, not_found_error



FrameCPP::Version_3_4_5::TOCReader::readStat - Get all statics from the file


std::vector< StatData* > readStat();

Exceptions:
ExceptionDescription
std::bad_alloc, read_failure, not_found_error



FrameCPP::Version_3_4_5::TOCReader::readStat - Get a static from the file for certain time with the highest version number


StatData* readStat(const std::string& statName, INT_4U time);

Exceptions:
ExceptionDescription
std::bad_alloc, read_failure, not_found_error



FrameCPP::Version_3_4_5::TOCReader::readStatName - Get all named statics from the file


std::vector< StatData* > readStatName(const std::string& statName);

Exceptions:
ExceptionDescription
std::bad_alloc, read_failure, not_found_error



FrameCPP::Version_3_4_5::TOCReader::readStatTime - Get all named statics from the file for certain time


std::vector< StatData* > readStatTime(const std::string& statName, INT_4U time);

Exceptions:
ExceptionDescription
std::bad_alloc, read_failure, not_found_error



FrameCPP::Version_3_4_5::TOCReader::readStructure


Base* readStructure(bool pick = true);
Read any structure. Read all referenced Table and Vector structures, if `pick' is true.

Exceptions:
ExceptionDescription
std::bad_alloc, read_failure



FrameCPP::Version_3_4_5::TOCReader::readSum - Get named summary data structure from all frames


inline std::vector<Summary*> readSum(std::string sumName);

Exceptions:
ExceptionDescription
std::bad_alloc, read_failure, not_found_error



FrameCPP::Version_3_4_5::TOCReader::readSummary - Get one summary data structure from one frame


inline Summary* readSummary(unsigned long frameNumber, std::string sumName);

Exceptions:
ExceptionDescription
std::bad_alloc, read_failure, not_found_error



Variable Member Descriptions:


FrameCPP::Version_3_4_5::TOCReader::mHasToc - Whether this reader is using the TOC on frame files

bool mHasToc;