Class Index Cross Index Namespace Index

Class FrameCPP::Version_3_4_5::DaqFrame

Data Acquisition Frame
Contained in: FrameCPP::Version_3_4_5
Derived from: FrameCPP::Version_3_4_5::Frame FrameCPP::Version_3_4_5::Input
Derived by: none

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


public function member index:

DaqFrame(); Default Constructor.
DaqFrame(const Frame& frame); Copy Constructor.
virtual ~DaqFrame(); Destructor
void TriggerADC(FrAdcDataBase*, bool activate); (De)activate an ADC
void daqActivateAllADCs(); Start updating all ADCs
void daqCat(std::istream* in); Concatenate active ADCs in this frame with another's from `in'
void daqResetADCs(); Stop updating all ADCs
void daqTriggerADC(AdcData*, bool activate, bool duplicates = false); (De)activate an ADC
void daqTriggerADC(const char* adcName, bool activate); (De)activate an ADC
void daqTriggerADC(unsigned int idx, bool activate); (De)activate an ADC
void daqTriggerADC(unsigned int idx, unsigned int last, bool activate); (De)activate a range of ADCs
void daqUpdate(std::istream* in); Update this frame with another from `in'
inline INT_4U getCatHint(); Get frame concat hint
void printActiveChannels(std::ostream& ost); Print current ADC channel update vector
inline const std::vector<adc_update_struct>& refAdcUpdateVect() const; Get ADC update vector.
void setCatHint(INT_4U hint); Set frame concat hint
void setDaqMaps(std::map<INT_4U, adc_map_info_struct>& omi, std::multimap<INT_2U, INT_2U>& imi);
inline void setFileHeader(FileHeader* fh);
 

private function member index:

mStream();
inline INT_4U adcDataVectorPtr(int offset); Given the offset find the ADC data vector ptr.
inline REAL_4 daqAdcBias(int offset); Get adc bias.
inline INT_4U daqAdcChannel(int offset); Get adc channel number.
inline INT_4U daqAdcCrate(int offset); Get adc crate number.
inline INT_2U daqAdcDataValid(int offset); Get adc data valid word.
inline REAL_8 daqAdcFShift(int offset); Get adc frequency shift.
inline INT_4U daqAdcNBits(int offset); Get adc number of bits.
inline REAL_8 daqAdcSampleRate(int offset); Get adc sampling rate.
inline REAL_4 daqAdcSlope(int offset); get adc slope.
inline INT_4U daqAdcTimeOffsetN(int offset); Get adc time offset nanoseconds.
inline INT_4U daqAdcTimeOffsetS(int offset); Get adc time offset seconds.
inline INT_4U daqFrameDataQuality(); Get frame data quality word.
inline REAL_8 daqFrameDt(); Get fame delta time.
inline INT_4U daqFrameGTimeN(); Get frame start time nanoseconds.
inline INT_4U daqFrameGTimeS(); Get frame start time seconds.
inline INT_4S daqFrameLocalTime(); Get frame local time.
inline INT_4U daqFrameNumber(); Get frame number.
inline INT_4S daqFrameRun(); Get frame run number.
inline INT_2U daqFrameULeapS(); Get frame leap seconds.
inline int daqNameLength(int offset); Get length of name at `offset'.
inline void seekVectorData(int offset); Move to the beginning of vector data.
 

Description:

DAQ frame is a Frame with extensions to update from another frame file. This is done for interfacing with LIGO DAQ (Data Acquisition) to ease repeated frame reading. Only the first frame is read and parsed in full. This first reference frame is DaqFrame object. Subsequent frames are identical to the reference frame in their structure. DaqUpdate() method is used to refresh reference frame with the data from the new frame. Currently frame header attributes and ADC channels are refreshed. Only active ADC channels are refreshed. Activation is done with trigger methods present in DaqFrame class. :FIXME: :TODO: Make daqUpdate() work with version 3 frames


Function Member Descriptions:


FrameCPP::Version_3_4_5::DaqFrame::DaqFrame - Default Constructor.


DaqFrame();

Exceptions:
ExceptionDescription
None.



FrameCPP::Version_3_4_5::DaqFrame::DaqFrame - Copy Constructor.


DaqFrame(const Frame& frame);
This performs a deep copy of owned elements.

Parameters:
ParameterDescription
const Frame& frameObject to be copied.

Exceptions:
ExceptionDescription
std::bad_allocMemory allocation failed.



FrameCPP::Version_3_4_5::DaqFrame::mStream


mStream();



FrameCPP::Version_3_4_5::DaqFrame::~DaqFrame - Destructor


virtual ~DaqFrame();



FrameCPP::Version_3_4_5::DaqFrame::TriggerADC - (De)activate an ADC


void TriggerADC(FrAdcDataBase*, bool activate);
Single ADC channel (de)activated referenced by its name

Parameters:
ParameterDescription
char* adcNameADC channel name
bool activatetrue to activate, false to deactivate
bool duplicatesallow duplicate update vector elements

Exceptions:
ExceptionDescription
not_found_errorADC channel not found
std::bad_allocMemory allocation failed



FrameCPP::Version_3_4_5::DaqFrame::adcDataVectorPtr - Given the offset find the ADC data vector ptr.


inline INT_4U adcDataVectorPtr(int offset);



FrameCPP::Version_3_4_5::DaqFrame::daqActivateAllADCs - Start updating all ADCs


void daqActivateAllADCs();
Activates all ADC present in the frame for update in daqUpdate()

Exceptions:
ExceptionDescription
std::bad_allocMemory allocation failed
not_found_errorADC channel not found.



FrameCPP::Version_3_4_5::DaqFrame::daqAdcBias - Get adc bias.


inline REAL_4 daqAdcBias(int offset);



FrameCPP::Version_3_4_5::DaqFrame::daqAdcChannel - Get adc channel number.


inline INT_4U daqAdcChannel(int offset);



FrameCPP::Version_3_4_5::DaqFrame::daqAdcCrate - Get adc crate number.


inline INT_4U daqAdcCrate(int offset);



FrameCPP::Version_3_4_5::DaqFrame::daqAdcDataValid - Get adc data valid word.


inline INT_2U daqAdcDataValid(int offset);



FrameCPP::Version_3_4_5::DaqFrame::daqAdcFShift - Get adc frequency shift.


inline REAL_8 daqAdcFShift(int offset);



FrameCPP::Version_3_4_5::DaqFrame::daqAdcNBits - Get adc number of bits.


inline INT_4U daqAdcNBits(int offset);



FrameCPP::Version_3_4_5::DaqFrame::daqAdcSampleRate - Get adc sampling rate.


inline REAL_8 daqAdcSampleRate(int offset);



FrameCPP::Version_3_4_5::DaqFrame::daqAdcSlope - get adc slope.


inline REAL_4 daqAdcSlope(int offset);



FrameCPP::Version_3_4_5::DaqFrame::daqAdcTimeOffsetN - Get adc time offset nanoseconds.


inline INT_4U daqAdcTimeOffsetN(int offset);



FrameCPP::Version_3_4_5::DaqFrame::daqAdcTimeOffsetS - Get adc time offset seconds.


inline INT_4U daqAdcTimeOffsetS(int offset);



FrameCPP::Version_3_4_5::DaqFrame::daqCat - Concatenate active ADCs in this frame with another's from `in'


void daqCat(std::istream* in);
For use with the DAQ system. Cats active ADC channels with data from the `in' stream. Input stream is checked to be a frame file with the same configuration as this one. This is done by checking the run number, which is incremented when the DAQ system is reconfigured. :TODO: should check if input file size changed and throw "cannot_update" exception if it did

Parameters:
ParameterDescription
std::istream* inframe file, random access

Exceptions:
ExceptionDescription
read_failureRead failed.
cannot_updateFrame configuration changed.
cannot_catData is not contiguous in time.



FrameCPP::Version_3_4_5::DaqFrame::daqFrameDataQuality - Get frame data quality word.


inline INT_4U daqFrameDataQuality();



FrameCPP::Version_3_4_5::DaqFrame::daqFrameDt - Get fame delta time.


inline REAL_8 daqFrameDt();



FrameCPP::Version_3_4_5::DaqFrame::daqFrameGTimeN - Get frame start time nanoseconds.


inline INT_4U daqFrameGTimeN();



FrameCPP::Version_3_4_5::DaqFrame::daqFrameGTimeS - Get frame start time seconds.


inline INT_4U daqFrameGTimeS();



FrameCPP::Version_3_4_5::DaqFrame::daqFrameLocalTime - Get frame local time.


inline INT_4S daqFrameLocalTime();



FrameCPP::Version_3_4_5::DaqFrame::daqFrameNumber - Get frame number.


inline INT_4U daqFrameNumber();



FrameCPP::Version_3_4_5::DaqFrame::daqFrameRun - Get frame run number.


inline INT_4S daqFrameRun();



FrameCPP::Version_3_4_5::DaqFrame::daqFrameULeapS - Get frame leap seconds.


inline INT_2U daqFrameULeapS();



FrameCPP::Version_3_4_5::DaqFrame::daqNameLength - Get length of name at `offset'.


inline int daqNameLength(int offset);



FrameCPP::Version_3_4_5::DaqFrame::daqResetADCs - Stop updating all ADCs


void daqResetADCs();
Deactivate all ADC present in the frame. No ADCs wil be updated by daqUpdate()

Exceptions:
ExceptionDescription
None.



FrameCPP::Version_3_4_5::DaqFrame::daqTriggerADC - (De)activate an ADC


void daqTriggerADC(AdcData*, bool activate, bool duplicates = false);
Single ADC channel (de)activated referenced by its name

Parameters:
ParameterDescription
char* adcNameADC channel name
bool activatetrue to activate, false to deactivate
bool duplicatesallow duplicate update vector elements

Exceptions:
ExceptionDescription
not_found_errorADC channel not found
std::bad_allocMemory allocation failed



FrameCPP::Version_3_4_5::DaqFrame::daqTriggerADC - (De)activate an ADC


void daqTriggerADC(const char* adcName, bool activate);
Single ADC channel (de)activated referenced by its name

Parameters:
ParameterDescription
const char* adcNameADC channel name
bool activatetrue to activate, false to deactivate

Exceptions:
ExceptionDescription
not_found_errorADC channel not found
std::bad_allocMemory allocation failed



FrameCPP::Version_3_4_5::DaqFrame::daqTriggerADC - (De)activate an ADC


void daqTriggerADC(unsigned int idx, bool activate);
Single ADC channel (de)activated referenced by its index

Parameters:
ParameterDescription
unsigned int idxADC channel index
bool activatetrue to activate, false to deactivate

Exceptions:
ExceptionDescription
not_found_errorADC channel not found
std::bad_allocMemory allocation failed



FrameCPP::Version_3_4_5::DaqFrame::daqTriggerADC - (De)activate a range of ADCs


void daqTriggerADC(unsigned int idx, unsigned int last, bool activate);
Range if ADC channels (de)activated

Parameters:
ParameterDescription
unsigned int idxfirst ADC index
unsigned int lastlast ADC index
bool activatetrue to activate, false to deactivate

Exceptions:
ExceptionDescription
not_found_errorADC channel not found
std::bad_allocMemory allocation failed



FrameCPP::Version_3_4_5::DaqFrame::daqUpdate - Update this frame with another from `in'


void daqUpdate(std::istream* in);
For use with the DAQ system. Updates active ADC channels and all the rest of required data attributes of this frame with data from the `in' stream. Input stream is checked to be a frame file with the same configuration as this one. This is done by checking the run number, which is incremented when the DAQ system is reconfigured. :TODO: should check if input file size changed and throw "cannot_update" exception if it did

Parameters:
ParameterDescription
std::istream* inframe file, random access

Exceptions:
ExceptionDescription
read_failureRead failed.
cannot_updateFrame configuration changed.



FrameCPP::Version_3_4_5::DaqFrame::getCatHint - Get frame concat hint


inline INT_4U getCatHint();



FrameCPP::Version_3_4_5::DaqFrame::printActiveChannels - Print current ADC channel update vector


void printActiveChannels(std::ostream& ost);



FrameCPP::Version_3_4_5::DaqFrame::refAdcUpdateVect - Get ADC update vector.


inline const std::vector<adc_update_struct>& refAdcUpdateVect() const;

Exceptions:
ExceptionDescription
None.



FrameCPP::Version_3_4_5::DaqFrame::seekVectorData - Move to the beginning of vector data.


inline void seekVectorData(int offset);
Given the offset to the start of the vector structure, move the input strstream position to the beginning of the data.




FrameCPP::Version_3_4_5::DaqFrame::setCatHint - Set frame concat hint


void setCatHint(INT_4U hint);



FrameCPP::Version_3_4_5::DaqFrame::setDaqMaps


void setDaqMaps(std::map<INT_4U, adc_map_info_struct>& omi, std::multimap<INT_2U, INT_2U>& imi);

Exceptions:
ExceptionDescription
cannot_updateFrame configuration changed.



FrameCPP::Version_3_4_5::DaqFrame::setFileHeader


inline void setFileHeader(FileHeader* fh);



Variable Member Descriptions:


FrameCPP::Version_3_4_5::DaqFrame::adcUpdateVect - Adc update vector.

std::vector<adc_update_struct> adcUpdateVect;

FrameCPP::Version_3_4_5::DaqFrame::catHint - Hint on how many frames will be concatenated.

INT_4U catHint;

FrameCPP::Version_3_4_5::DaqFrame::classInstanceMultimap -

std::multimap<INT_2U, INT_2U> classInstanceMultimap;

FrameCPP::Version_3_4_5::DaqFrame::frame_offset - Offset to the start of frame.

INT_4U frame_offset;

FrameCPP::Version_3_4_5::DaqFrame::instanceOffsetMap -

std::map<INT_4U, adc_map_info_struct> instanceOffsetMap;