ICP  1
Static Public Member Functions | Static Private Member Functions | List of all members
DAEEventList Class Reference

#include <dae_events.h>

Static Public Member Functions

static void checkEventHeader (const DAEEventHeader *head)
 
static int checkEventHeader (const DAEEventHeader *head, std::string &error_message)
 
static void checkEvents (const isisU32_t *buffer, uint32_t maxlen, DAEstatus &status)
 checks that buffer corresponds to a copmplete set of event frames More...
 
static bool isEndRunHeader (const DAEEventHeader *head, DAEstatus &status)
 check whether an event frame header is a special enf of frame header More...
 
static int findValidEventHeaderOffset (const isisU32_t *buffer, uint32_t len, DAEstatus &status)
 returns index of start of a valid event header, -1 on error More...
 
static void printEventHeader (const DAEEventHeader *head, std::ostream &os)
 
static void printDetectorEvents (const DetectorEvent32 *events, int n, std::ostream &os)
 
static void DAETimeToSystemTime (const DAEEventHeader::DAETime &daetime, SYSTEMTIME &systime)
 
static void SystemTimeToDAETime (const SYSTEMTIME &systime, DAEEventHeader::DAETime &daetime)
 
static void DAETimeToFILETIME (const DAEEventHeader::DAETime &daetime, FILETIME &filetime)
 
template<typename T >
static void DAETimeToOffset (const DAEEventHeader::DAETime &daetime, time_t base, T &offset)
 
static void OffsetToDAETime (time_t base, double offset, DAEEventHeader::DAETime &daetime)
 
static void FILETIMEToDAETime (const FILETIME &filetime, DAEEventHeader::DAETime &daetime)
 
static std::string DAETimeAsString (const DAEEventHeader::DAETime &daetime)
 return as ISO8601 format string More...
 

Static Private Member Functions

static uint32_t checkEventsFrame (const isisU32_t *buffer, uint32_t maxlen, DAEstatus &status)
 
static uint32_t getCompleteFramesLen (const isisU32_t *buffer, uint32_t len, DAEstatus &status)
 
static void getEventHeaderErrorMessage (const DAEEventHeader *head, unsigned code, std::string &error_message)
 
static int checkEventHeaderImpl (const DAEEventHeader *head)
 return 0x20 if dummy header present More...
 

Detailed Description

Definition at line 104 of file dae_events.h.

Member Function Documentation

void DAEEventList::checkEventHeader ( const DAEEventHeader head)
static
int DAEEventList::checkEventHeader ( const DAEEventHeader head,
std::string &  error_message 
)
static

Definition at line 33 of file dae_events.cpp.

References checkEventHeaderImpl(), and getEventHeaderErrorMessage().

int DAEEventList::checkEventHeaderImpl ( const DAEEventHeader head)
staticprivate
void DAEEventList::checkEvents ( const isisU32_t buffer,
uint32_t  maxlen,
DAEstatus status 
)
static

checks that buffer corresponds to a copmplete set of event frames

Definition at line 6 of file dae_events.cpp.

References checkEventsFrame().

uint32_t DAEEventList::checkEventsFrame ( const isisU32_t buffer,
uint32_t  len,
DAEstatus status 
)
staticprivate

assumes buffer points to start of one or more frames of events checks header and returns length in words of first frame header + its detector events len in words, returns number of words words

Definition at line 155 of file dae_events.cpp.

References checkEventHeader(), DAE_EVENT_HEADER_WORDS, DAEEventHeaderInfo::header_length, DAEEventHeader::info, and DAEEventHeader::num_events.

Referenced by checkEvents().

std::string DAEEventList::DAETimeAsString ( const DAEEventHeader::DAETime daetime)
static

return as ISO8601 format string

Definition at line 266 of file dae_events.cpp.

References DAETimeToSystemTime().

Referenced by printEventHeader(), and EnvPeriodCard< EnvPeriodPolicy >::syncFrameTimer().

void DAEEventList::DAETimeToFILETIME ( const DAEEventHeader::DAETime daetime,
FILETIME &  filetime 
)
static
template<typename T >
template void DAEEventList::DAETimeToOffset ( const DAEEventHeader::DAETime daetime,
time_t  base,
T &  offset 
)
static
void DAEEventList::DAETimeToSystemTime ( const DAEEventHeader::DAETime daetime,
SYSTEMTIME &  systime 
)
static

Definition at line 192 of file dae_events.cpp.

References DAETimeToFILETIME().

Referenced by DAETimeAsString(), and DAETimeToOffset().

void DAEEventList::FILETIMEToDAETime ( const FILETIME &  filetime,
DAEEventHeader::DAETime daetime 
)
static
int DAEEventList::findValidEventHeaderOffset ( const isisU32_t buffer,
uint32_t  len,
DAEstatus status 
)
static

returns index of start of a valid event header, -1 on error

Definition at line 111 of file dae_events.cpp.

References checkEventHeader(), DAE_EVENT_HEADER_WORDS, and DAEEventHeaderFixedMarker.

Referenced by EventStoreCard::checkAndHistogramEvents().

uint32_t DAEEventList::getCompleteFramesLen ( const isisU32_t buffer,
uint32_t  len,
DAEstatus status 
)
staticprivate

return the portion of buffer that corresponds to complete frames i.e. all events for the specific header

Todo:
need to adjust for 64bit events len in words, returns words

<

Todo:
need to adjust for 64bit events

Definition at line 135 of file dae_events.cpp.

References checkEventHeader(), DAE_EVENT_HEADER_WORDS, and DAEEventHeader::num_events.

void DAEEventList::getEventHeaderErrorMessage ( const DAEEventHeader head,
unsigned  code,
std::string &  error_message 
)
staticprivate
bool DAEEventList::isEndRunHeader ( const DAEEventHeader head,
DAEstatus status 
)
static

check whether an event frame header is a special enf of frame header

Definition at line 179 of file dae_events.cpp.

References checkEventHeader(), EndOfRunMarker, and DAEEventHeader::marker1.

Referenced by EventStoreCard::checkAndHistogramEvents(), and DetectorCard< DetCardPolicy >::getNewEvents().

void DAEEventList::OffsetToDAETime ( time_t  base,
double  offset,
DAEEventHeader::DAETime daetime 
)
static

Definition at line 238 of file dae_events.cpp.

References SystemTimeToDAETime().

Referenced by ISISRAWEventSource::sendHeader().

void DAEEventList::printDetectorEvents ( const DetectorEvent32 events,
int  n,
std::ostream &  os 
)
static

Definition at line 291 of file dae_events.cpp.

References DetectorEvent32::spectrum, and DetectorEvent32::time_channel.

void DAEEventList::printEventHeader ( const DAEEventHeader head,
std::ostream &  os 
)
static
void DAEEventList::SystemTimeToDAETime ( const SYSTEMTIME &  systime,
DAEEventHeader::DAETime daetime 
)
static

The documentation for this class was generated from the following files: