Home

MED Data Structure

image

Contents

1. Fig 6 shows different channel layouts For a detailed description see 3 DGF 4C channel format standard DGF 4C channel format user PSA DGF 4C channel format compression 2 DGF 4C channel format compression 3 Figure 6 Subevent format 10 2X DGF 4C list mode formats channel header word count number of 16 bit words written for this channel fast trigger time time of arrival energy converted energy value PSA value result of pulse shape analysis XIA and user GSLT time 48 bit arrival time of global second level trigger realtime time since last reboot or reset high word bits 47 32 trace data array containing trace data depending on format descriptor 2 4 Silena 4418V T data subevent formats 10 31 and 10 32 Formats 10 31 and 10 32 are used to store zero compressed data from Silena 4418V T modules Several modules may be stored in one subevent In case of uncompressed Silena data subevent type 10 11 has to be used instead one module per subevent only 3 0 Silena 4418V T data 16 bit words swapped Silena 4418V T header word Silena 4418V T pattern word peo om IEEE EN Silena 4418V T data word LIEN Figure 7 Subevent format 10 3X Silena 4418V T data we number of words including header and pattern module number module number pattern 8 bit pattern word active channels have bit 1 data 12 bit adc tdc data assigned sequentially during Config C step 2 5 CAEN V7X5 dat
2. srl 001 Jo sdo3s ut yoopo odd dure3s oui T0006 ur eqep 31q ZE POP 4 eaeq aueAeqngqdyl 601 eyep Vq c aut I eaeq aueaeqngqJj 601 Jourejuoo eyep esrzoArum eyep xq 9T Ioys S e3eq aueAeqngeq3yl T6 OT Bd Aue UC 2 SIS 3ueAeqngqJyr es ot Aue oo SIS 3ueAeqngquWl c8 07 sompour XXX SIS 49 Aue Jewo SJS eutSr1o I SIS 3ueAeqngquyWL TS 0T T Aue is uee queAeqngqJyml 7 0T Aue 9G Uueep JuEASqnSqIWL cv 0T so npout G A G8 A NAVO 10 Aue euo NAVO eursrio I wee JUeAeqnSqIWL Iv OT a Aue 5G eUeTTS aueAeqngqzu c 0T so mpour T ASTpp LUIS 10 Aue JRULIO euo prtg pesso1duloo oioZz I eue rg queAeqngquyl T 0T a Aue na 2 ADC JUSASqNSqIWL 201 Aue o6 JDC JUSeASQnSqIWL cc 01 sonpow Oy 45 VIX 197 Aue yewo VIX eursrio T 45d 3ueAeqngqzyWl Tec OT Aue Slopeoy o npour Surpn our T OT se oures CT OT a3ueAeqngqauWI T 0T guoAoqns yQyg ur VIN TesioArun q Aue tuo T popped o1oz szequinu ouueuo o m eyep IT OT jueaeqnsqiWL IT 01 juoAoqns SQW esS1oArun K uo 1equinu ouueqo Aq popoooaid yep posso1duloo 019Z I OI aueAeqngquWlL T 0T juouruioo sdu jeu oureu sse edKaqns ed 4 MBS event header VME event 10 1 MBS subevent header based on CAMAC subevent eo N A N number of 16 bit words Figure 2 Standard MBS headers used in MARgB U event header word count number of 16 bit words for this eventP
3. module serial idis we word count including header words assigned sequentially during Config C step Note In current MINIBALL experiments data from SIS 3801 scalers will be written using format 10 11 rather than this one 11 2 7 Plain data containers subevent formats 10 91 10 92 and 10 93 Formats 10 9X provide containers to store data that are not directly related to a hardware module e g internal DGF scalers There are containers for short 10 91 long 10 92 and float items 10 93 respectively Container for SHORT 16 bit data Container for LONG 32 bit data 31 l 0 3 0 l6bitwordsswapped Container for FLOAT 32 bit data Figure 10 Subevent format 10 9X Plain data containers 3 User Interface to MED data C API This section describes the C user interface which may be used to access MED data without running ROOT It includes function calls to e open med files e read event by event and dispatch over event trigger e decode subevent header e extract subevent data and dispatch over subevent type and or serial number Any prototype for this user interface is defined in file mbsio h So you have to include this file in front of your code To include this package in a C environment add prototype definitions from file mbsio protos h 3 1 Open a med file const char FileName file name extension has to be med const char Connect how to
4. of module channels K even K odd Figure 3 Subevent formats 10 1 and 10 11 universal storage 2 2 Multi module extension subevent format 10 12 Subevent format 10 12 is an extension to format 10 1 zero compressed data preceeded by chan nel numbers are written together with a module header Thus several modules may easily be stored in one subevent module 1 module 2 Figure 4 Subevent format 10 12 data zero compressed any number of modules mid module id mserial module serial sued we word count including header words assigned sequentially during Config C step 2 3 XIA DGF 4C data subevent formats 10 21 10 22 and 10 23 Formats 10 2X are used to store original buffers read from XIA DGF 4C modules 3 DGF 4C buffer format DGF 4C event format Figure 5 Subevent format 10 2X DGF 4C buffer data buffer header buffer wc module number format descriptor buffer time number of 16 bit words in this buffer module serial data format used for channel data 48 bit buffer starting time event header hit pattern event time one bit per active channel 32 bit event starting time assigned sequentially during Config C step Several list mode formats are available to control the DGF 4C data flow Depending on the value of the format descriptor in the buffer header fig B long or short channel headers with or without trace data will be written
5. 1md format no buffering is used during output data are streamed out event by event by the generating program As a consequence there is no event spanning across buffer boundaries making things easier for the reader Note that there is neither a file header nor any buffer header too Each event contains a sequence of subevents all based on MBS subevent 10 1 so called CAMAC Subevent There are several extensions to this subevent type to cover different hardware and software requirements within MAR4GBQYU Fig I shows the overall MED data structure table I gives a list of subevent types used by MARgB U applications 2 event 2 subevent 2 data module 2 last event last subevent data last module Figure 1 Overall structure of MED data 2 Event and subevent formats used by MARgB U Fig 2 shows standard MBS event and subevent headers as used in a MARgB JU environment ATUO quoAoqns Jod eppour T 9103s seidojerjs jnd3no que1egtp AO 0j mq dur uo mgo nszs ejep eures MLY pue Z sjeuloj 930N 03 pepueuruioooi st 3t serymSrqure proAe ol 1opeo1 oY 03 UMOUY eq 0 seq s lnpour jo u nb s oY 3eur10j SITY ur pr e mpour ou st o193 Sy juoAoqns tod s lnpour fg uvIN Aq pesn sed A 3uoAoqng T q T yuoaoqns dur ymezop _ j negjop TIT TIT Jo peos SUIT peop Jo squoquoo ouln peop Z 0006
6. MED Data Structure R Lutter May 20 2005 Abstract This document describes the structure of experimental data taken in MINIBALL exper iments using the MARgB U data acquisition system MED is an abbreviation for MBI Event Data as this format is based on regular MBS data structures 1 A detailed description of MBS data structures used as well as MARABQyU extensions to these structures will be given Contents 1 MED file format 2 Event and subevent formats used by MARgB U 2 1 Universal data storage subevent formats 10 1 and 10 11 2 2 Multi module extension subevent format 10 12 2 3 XIA DGF 4C data subevent formats 10 21 10 22 and 10 23 2 4 Silena 4418V T data subevent formats 10 31 and 10 32 2 5 CAEN V7X5 data subevent formats 10 41 10 42 and 10 43 2 6 SIS 3XXX data subevent formats 10 51 10 52 and 10 53 2 7 Plain data containers subevent formats 10 91 10 92 and 10 93 3 User Interface to MED data C API 3 1 Open a medhfle 2 e AGRAR AERE 3 2 Read event by event and dispatch over event trigger 3 3 Decodesubevent header en 3 4 Extract subevent data dispatch over subevent serial and or type 4 Appendix 4 1 C structure MBSDatalO 1 MED file format A med file contains a stream of MBS events of standard type 10 1 known as VME Event inside MBS In contrast to the MBS file format
7. TRUE if buffer data valid buffer out of phase event type event size bytes ptr to current event in buffer current event number within buffer event number as given by MBS copy of event data original byte swapped if necessary subevent type subevent size bytes ptr to original subevent in evt data current subevent number within event number of subevents current subevent id original subevent type subtype type min number of data words expected number of data words ptr to subevent data unpacked 17 References 1 H Essel et al GOOSY Buffer Structure See http wwwgsivms gsi de goodoc GM BUFFER ps 2 R Lutter O Schaile et al MARABQyU MBS and ROOT Based Online Offline Utility See http www bl physik unimuenchen de marabou html 3 X Ray Instrumentation Associates DGF 4C User s Manual DGF 4C Programmer s Manual 4 CAEN S p A V785 V775 Technical Information Manual See http www caen it nuclear product php mod V785 18
8. a subevent formats 10 41 10 42 and 10 43 Formats 10 4X provide containers for original CAEN list mode data produced by modules CAEN V785 and CAEN V775 respectively Each CAEN buffer may contain up to 32 events In addition as each event is tagged with module number one may store data from several CAEN modules in one subevent To be able to correlate time stamps in DGF and CAEN branches in MINIBALL experiments data have to be stored one module per subevent however A detailed description of this format may be found in 4 CAEN V785 V775 event format Figure 8 Subevent format 10 4X CAEN V7X5 ADC TDC data 0x200 header word including word count and module numberf 0x000 data word channel number and converted data 0x400 trailer word event count crate crate number we number of channel data 32 bit excluding header amp trailer mserial module serial number channel channel number 0 31 data 12 bit adc tdc data 1 bit overflow 1 bit underflow event count number of events since last reset GEO address not used currently unused in MARABQ U assigned sequentially during Config C step 10 2 6 SIS 3XXX data subevent formats 10 51 10 52 and 10 53 Formats 10 5X are designed to store data produced by SIS 3600 or SIS 3801 modules This format is identical to format 10 12 3 module 1 module 2 Figure 9 Subevent format 10 5X SIS 3XXX data mid module id mserial
9. connect to med data stream has to be F File int BufSize buffer size normally 0x4000 16k FILE HdrOut where to output header info set to NULL for no output MBSDataIO MbsHandle file handle to access med data opens a med raw data file for reading and returns a file handle to refer to it mbs close file closes the file pointed to by the file handle 13 3 2 Read event by event and dispatch over event trigger unsigned int mbs next event MBSDataIOU MbsHandle int mbs get event trigger MBSDataIO MbsHandle MBSDatalO0 MbsHandle file handle as returned by mbs open file mbs next event moves on to next event adjusts internal pointers Returns event type subtype type which is always 1 10 User has to check for special return values MBS ETYPE EOF end of file MBS ETYPE ERROR error and MBS_ETYPE_ABORT abort mbs get event trigger returns trigger number of current event Example unsigned int evtType int evtTrigger while 1 1 evtType mbs next event mbsHandle if evtType MBS ETYPE EOF printf End of file n mbs close file mbsHandle else if evtType MBS ETYPE ERROR printf Illegal event skipped n continue else if evtType MBS ETYPE ABORT printf Illegal event aborting n break else evtTrigger mbs_get_event_trigger mbsHandle switch evtTrigger case kMrbTriggerStartAcquisition printf Trigger start acquisition V Nn break kMrbTr
10. e MBSDataIO0 char id 16 FILE input int fileno char device MBS L STR char host MBS L STR unsigned int connection MBSBufferElem buftype int byte order MBSShowElem show elems MBS N BELEMS int bufsiz MBSServerInfo server info int max streams int slow down int nof streams int nof buffers int nof events int cur bufno int cur bufno stream int bufno mbs int buf to be dumped char hdr data MBSBufferPool buf pool MBS N BUFFERS MBSBufferPool poolpt char bufpt int buf valid int buf oo phase MBSBufferElem evttype int evtsiz char evtpt int evtno int evtno mbs char x evt data MBSBufferElem sevttype int sevtsiz char sevtpt int sevtno int nof sevents int sevt id unsigned int sevt otype int sevt minwc int sevt wc char sevt data internal struct id 4MBS RAW DATA input stream descr fopen fread channel number open read name of input dev host name device type MBS_DTYPE_xxxx buffer type byte ordering buffer elements to be shown automatically buffer size info block for server access max number of streams to process number of secs to wait after each stream number of streams processed so far number of buffers number of events buffer number within current stream buffer number as given by MBS if n gt 0 every n buffer will be dumped file header data buffer pool pointer to current buffer in pool pointer to current data
11. iggerStopAcquisition printf Trigger N stop acquisition n break case kMrbTriggerReadout process event mbsHandle evtTrigger case break case break default printf Illegal trigger d n evtTrigger break is 14 3 3 Decode subevent header unsigned int mbs next sheader MBSDataIO MbsHandle unsigned int mbs get sevent subtype MBSDataIO MbsHandle int mbs get sevent serial MBSDatalO0 MbsHandle MBSDatalO0 MbsHandle file handle as returned by mbs open file mbs next sheader moves on to next subevent of current event Decodes header information and returns subevent type subtype type User has to check for special return values MBS STYPE EOE end of event MBS STYPE ERROR error and MBS_STYPE_ABORT abort mbs get sevent subtype returns subtype portion of subevent type LH word of subtype type right shifted mbs get sevent serial returns serial number of current subevent Subevent type and or serial number may then be used to dispatch to different decoding routines 15 3 4 Extract subevent data dispatch over subevent serial and or type unsigned int mbs next sdata MBSDatalO0 MbsHandle int mbs get sevent wc MBSDataIO0 MbsHandle unsigned short mbs get sevent dataptr MBSDataIO0 MbsHandle MBSDatalO0 MbsHandle file handle as returned by mbs open file mbs next sdata moves on to data section of current subevent adjusts pointers Returns subevent type sub
12. subtype event subtype 1 type event type 10 trigger trigger number event count MBS event count subevent header word count number of 16 bit words for this subevent subtype subevent subtype type subevent type crate crate number VME 0 CAMAC 1 2 serial subevent serial number excluding first 2 header words thus event subevent length is N wc 4 16 bit words bsee table 1 assigned sequentially during Config C step Note Data have differently to be swapped on input depending on data type 8 16 32 bits 2 1 Universal data storage subevent formats 10 1 and 10 11 Subevent formats 10 1 and 10 11 are universal formats to store module data in a straightforward way Format 10 1 contains zero compressed data preceeded by channel numbers it is therefore recommended for modules having a large number of channels but only a few hits Format 10 11 contains one data item per channel missing channels are padded with a zero data value Thus this format is more applicable to store module data where most of the channels have converted As there is no module identification inside these formats it is recommended to store only one module per subevent Data have to be aligned to 32 bit boundaries so in case of an odd number of module channels there is a filler OxFFFF at end of data x x M 16 bit words swapped r a for reader s convenience K number
13. type typel User has to check for special return values MBS STYPE ERROR error and MBS STYPE ABORT abort mbs get sevent wc returns word count of current subevent 16 bit words mbs get sevent dataptr returns pointer to first data word Example void process subevent MBSDataIO mbsHandle int sevtSerial unsigned int sevtType unsigned short dataPtr int wc clusterNo caenNo sevtType mbs next sdata mbsHandle if sevtType MBS STYPE ERROR printf Illegal subevent skipped n return else if sevtType MBS STYPE ABORT printf Illegal subevent aborting n exit 1 else wc mbs get sevent wc mbsHandle dataPtr mbs get sevent dataptr mbsHandle switch sevtType case MBS STYPE CAMAC DGF 3 clusterNo sevtSerial kMrbSevtClui 1 process dgf data clusterNo dataPtr wc break case MBS STYPE VME CAEN 3 caenNo sevtSerial kMrbSevtCaeni 1 process caen data caenNo dataPtr wc break User should refer to mbsio h for possible subevent types MBS STYPE XXX and to DgfCommonIndices h for valid serial numbers kMrbSevt lt xxx gt defined for his experiment 16 4 Appendix 4 1 C structure MBSDatalO C structure MBSDataIO holds all information needed to describe an open connection to a med data file In addition to the methods described so far user may access all of its elements by addressing mbsHandle element name A description of all data members of structur

Download Pdf Manuals

image

Related Search

Related Contents

Operating instructions - OPERTIS Produktkatalog  Operating Guide  Canon 4839B002AA All in One Printer User Manual  H81M-PLUS  Embryogenèse somatique chez les gymnospermes, à partir  ワイドバンドセンサー ワイドバンドセンサー FE 14.. 取扱説明書 B jp    Sitram: Speedo Pressure Cooker`s  Téléphone éducatif Cars    

Copyright © All rights reserved.
Failed to retrieve file