<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Dear all,<div class="">EPICS data is now correctly reconstructed by the bdxReco software, both for single-thread and multi-thread run. Few details follow.</div><div class=""><br class=""></div><div class=""><ul class=""><li class="">EPICS data is recorded in the same evio file where DAQ events are saved. This happens every ~ 10 s. EPICS data is saved as a special EVIO event, and this operation is asynchronous with respect to DAQ-data saving. Therefore, denoting by “XN” an epics event and by “A” a DAQ event, the sequence of data that will be present in the file will be like:</li><ul class=""><li class="">AAAAAA X1 AAAAAA X2 AAAAA X3 … (where the file can start both with an “A” or with an “X”)</li></ul><li class="">In the reconstruction, EPICS data is associated to <b class="">each </b>DAQ event as follow: all DAQ events after an epics event are associated with the data of that epics event - until a new epics event is found. </li><ul class=""><li class="">In the example before, first event (before X1) do not have any epics information, events between X1 and X2 are associated with X1, events between X3 and X2 are associated with X2, …</li></ul><li class="">Each epicsData is formed by:</li><ul class=""><li class="">A string identifying the data (the name of the EPICS PV the data was obtained from)</li><li class="">A double with the data value</li><li class="">An int with the data time (see later)</li></ul><li class="">EPICS data is saved in the TEvent header (accessible via the getEventHeader() method), as an “epicsData” object, available from the getEpicsData() method. </li><ul class=""><li class="">Relevant methods are “getDataValue(string id)” and “getDataTime(string id)”</li><li class="">If ID is not found, both methods will return “-999"</li><li class="">For example, to get the hallA current (hac_bcm_value):      <b class="">m_Event->getEventHeader->getEpicsData()->getDataValue(“hac_bcm_average”)</b></li></ul><li class="">A small complication is due to the fact that non all EPICS evens have the same data: in the example before, “X1” may have data from hall-A current, and X2 may have data from FPGA scalers (but not from Hall-A current). In this case, all events after X1 will be associated to the hall-A current in X1, until a new epics event with a new value of the hall-A current is found</li><ul class=""><li class="">The “time” associated to the hall-A current, available from “getDataTime(string id)” is the time (unix format) of the epics event the data was obtained from (X1 in this case), to allow further analysis to properly bin the data.</li></ul></ul><div class="">You need to do a: git pull ; scons -c; scons </div><div class="">to get the new modifications. </div><div class=""><br class=""></div><div class="">An example for run 573, showing the hall-A current, as obtained from the method before for each event (x is event number, y is current in uA). The typical rate for the run was ~ 100 Hz.</div><div class=""><br class=""></div><div class=""><img apple-inline="yes" id="80E1AD4B-2028-45AF-A20C-3E68478D576D" src="cid:F3959C4D-32BB-4782-BC11-C704883A812E" class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Bests,</div></div><div class="">Andrea</div></body></html>