DRS4 Forum
  DRS4 Discussion Forum  Not logged in ELOG logo
Entry  Wed Oct 5 22:43:29 2016, Will Flanagan, Timestamp for each DRS4 waveform 
    Reply  Thu Oct 6 11:18:05 2016, Stefan Ritt, Timestamp for each DRS4 waveform 
Message ID: 540     Entry time: Thu Oct 6 11:18:05 2016     In reply to: 539
Author: Stefan Ritt 
Subject: Timestamp for each DRS4 waveform 

In the mentioned read_binary.cpp file you have the line where you read the event header

i = fread(&eh, sizeof(eh), 1, f);

The C structure eh now contains the full timestamp, and you can access it with 

eh.year
eh.month
eh.day
eh.hour
eh.minute
eh.second
eh.millisecond

Cheers,
Stefan

Will Flanagan wrote:

Hi DRS4 Experts,

I have been analyzing DRS4 binary data with scripts based on Stefan's (very helpful!) macro:

https://midas.psi.ch/elogs/DRS4+Forum/361

I would now like to look at the stability of my waveforms over a long period of time. In order to do this, I would need a timestamp encoded with each waveform. Are there timestamps within default DRS4 binary data? If so, does anyone have sample code for extracting them?

Best Regards,

Will

 

ELOG V3.1.5-fe60aaf