Class Index | Cross Index | Namespace Index |
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. |
Exceptions:
Exception | Description |
None. |
This performs a deep copy of owned elements.
Parameters:
Parameter | Description |
const Frame& frame | Object to be copied. |
Exceptions:
Exception | Description |
std::bad_alloc | Memory allocation failed. |
Single ADC channel (de)activated referenced by its name
Parameters:
Parameter | Description |
char* adcName | ADC channel name |
bool activate | true to activate, false to deactivate |
bool duplicates | allow duplicate update vector elements |
Exceptions:
Exception | Description |
not_found_error | ADC channel not found |
std::bad_alloc | Memory allocation failed |
Activates all ADC present in the frame for update in daqUpdate()
Exceptions:
Exception | Description |
std::bad_alloc | Memory allocation failed |
not_found_error | ADC channel not found. |
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:
Parameter | Description |
std::istream* in | frame file, random access |
Exceptions:
Exception | Description |
read_failure | Read failed. |
cannot_update | Frame configuration changed. |
cannot_cat | Data is not contiguous in time. |
Deactivate all ADC present in the frame. No ADCs wil be updated by daqUpdate()
Exceptions:
Exception | Description |
None. |
Single ADC channel (de)activated referenced by its name
Parameters:
Parameter | Description |
char* adcName | ADC channel name |
bool activate | true to activate, false to deactivate |
bool duplicates | allow duplicate update vector elements |
Exceptions:
Exception | Description |
not_found_error | ADC channel not found |
std::bad_alloc | Memory allocation failed |
Single ADC channel (de)activated referenced by its name
Parameters:
Parameter | Description |
const char* adcName | ADC channel name |
bool activate | true to activate, false to deactivate |
Exceptions:
Exception | Description |
not_found_error | ADC channel not found |
std::bad_alloc | Memory allocation failed |
Single ADC channel (de)activated referenced by its index
Parameters:
Parameter | Description |
unsigned int idx | ADC channel index |
bool activate | true to activate, false to deactivate |
Exceptions:
Exception | Description |
not_found_error | ADC channel not found |
std::bad_alloc | Memory allocation failed |
Range if ADC channels (de)activated
Parameters:
Parameter | Description |
unsigned int idx | first ADC index |
unsigned int last | last ADC index |
bool activate | true to activate, false to deactivate |
Exceptions:
Exception | Description |
not_found_error | ADC channel not found |
std::bad_alloc | Memory allocation failed |
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:
Parameter | Description |
std::istream* in | frame file, random access |
Exceptions:
Exception | Description |
read_failure | Read failed. |
cannot_update | Frame configuration changed. |
Exceptions:
Exception | Description |
None. |
Given the offset to the start of the vector structure, move the input strstream position to the beginning of the data.
Exceptions:
Exception | Description |
cannot_update | Frame configuration changed. |