30 #define TID_FLOAT64 10
31 #define TID_BITFIELD 11
76 TMEvent(
const void* buf,
size_t buf_size);
91 void AddBank(
const char* bank_name,
int tid,
const char* buf,
size_t size);
111 virtual int Read(
void* buf,
int count) = 0;
123 virtual int Write(
const void* buf,
int count) = 0;
uint32_t type
type of bank data, enum of TID_xxx
uint32_t data_size
size of bank data in bytes
size_t data_offset
offset of data for this bank in the event data[] container
std::string name
bank name, 4 characters max
std::string BankListToString() const
print the list of MIDAS banks
void FindAllBanks()
scan the MIDAS event, find all data banks
std::string HeaderToString() const
print the MIDAS event header
TMBank * FindBank(const char *bank_name)
scan the MIDAS event
bool found_all_banks
all the banks in the event data have been discovered
std::vector< TMBank > banks
list of MIDAS banks, fill using FindAllBanks()
void Reset()
reset everything
void PrintBanks(int level=0)
void AddBank(const char *bank_name, int tid, const char *buf, size_t size)
add new MIDAS bank
char * GetEventData()
get pointer to MIDAS event data
void Init(uint16_t event_id, uint16_t trigger_mask=0, uint32_t serial_number=0, uint32_t time_stamp=0, size_t capacity=0)
uint32_t time_stamp
MIDAS event time stamp (unix time in sec)
size_t bank_scan_position
location where scan for MIDAS banks was last stopped
uint32_t bank_header_flags
flags from the MIDAS event bank header
void ParseHeader(const void *buf, size_t buf_size)
parse event header
void ParseEvent()
parse event data
std::vector< char > data
MIDAS event bytes.
size_t event_header_size
size of MIDAS event header
uint32_t serial_number
MIDAS event serial number.
uint32_t data_size
MIDAS event data size.
uint16_t trigger_mask
MIDAS trigger mask.
uint16_t event_id
MIDAS event ID.
char * GetBankData(const TMBank *)
get pointer to MIDAS data bank
bool error
event has an error - incomplete, truncated, inconsistent or corrupted
std::string BankToString(const TMBank *) const
print definition of one MIDAS bank
virtual int Read(void *buf, int count)=0
virtual ~TMReaderInterface()
virtual ~TMWriterInterface()
virtual int Write(const void *buf, int count)=0
void TMWriteEvent(TMWriterInterface *writer, const TMEvent *event)
TMReaderInterface * TMNewReader(const char *source)
TMWriterInterface * TMNewWriter(const char *destination)
TMEvent * TMReadEvent(TMReaderInterface *reader)