Mdump

From MidasWiki
Revision as of 17:10, 23 June 2015 by Suz (talk | contribs) (Created page with "== Description == <span style="color:darkcyan;">''mdump''</span> displays event bank contents (online or offline). This application allows the experimenter to "peep" into the...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Description

mdump displays event bank contents (online or offline).

This application allows the experimenter to "peep" into the data flow in order to display a snap-shot of the event. Its use is particularly powerful during experimental setup. In addition mdump has the capability to operate on data save-set files stored on disk or tape. The main restriction is the fact that mdump works only for events formatted in banks (i.e. MIDAS banks - see MIDAS Event Structure).

mdump can be built with zlib.a in order to gain direct access to the data within a file with extension mid.gz or ybs.gz. See Building Option NEED_ZLIB.

Arguments for Online use

                 [-h ] : help for online use.
mdump for online
                 -l #            : display # events (look 1)
                 -f format (auto): data representation ([x]/[d]/[a]scii) def:bank header content
                 -w time         : insert wait in [sec] between each display
                 -m mode         : Display mode either Bank or raw
                 -j              : Display # of banks and bank name list only for all the event
                 -b bank name    : search for bank name (case sensitive)
                 -i evt_id (any) : event id from the FE
                 -k mask (any)   : trigger_mask from FE setting
                 -g type         : sampling mode either SOME or all)
                 -s              : report buffer data rate and fill level
                 -s -d           : for use with -s: also report all buffer clients and requests
                 -t type (auto)  : Bank format (Midas)
                 -x Source       : Data source selection def:online (see -x -h)
                 -y              : Serial number consistency check
>>> in case of -y it is recommended to used -g all
                 -z buffer name  : Midas buffer name default:[SYSTEM]
                 [-h Hostname] [-e Experiment]


Arguments for Offline use

                  [-x -h] : help of offline use.
mdump for replay 
                  -x file name    : file to inspect
                  -m mode         : Display mode either Bank or raw
                  -b bank name    : search for bank name (case sensitive)
                  -i evt_id (any) : event id from the FE
                  -[single]       : Request single bank only (to be used with -b)
                  -y              : Serial number consistency check
                  -j              : Display # of banks and bank name list only for all the event
                  -k mask (any)   : trigger_mask from FE setting
>>> -i and -k are valid for YBOS ONLY if EVID bank is present in the event
                  -w what         : [h]eader, [r]ecord, [l]ength
                                    [e]vent, [j]bank_list (same as -j)
>>> Header & Record are not supported for MIDAS as no physical record structure exists
                  -f format (auto): data representation ([x]/[d]/[a]scii) def:bank header content
                  -r #            : skip event(MIDAS) to #

Usage

mdump can operate on either data stream (online) or on save-set data files. Specific help is available for each mode.

 > mdump -h
 > mdump -x -h

Examples

mdump in offline mode

The example below shows mdump operating on a file of saved data in MIDAS format :

Tue> mdump -x run37496.mid | more
------------------------ Event# 0 --------------------------------
------------------------ Event# 1 --------------------------------
Evid:0001- Mask:0100- Serial:1- Time:0x393c299a- Dsize:72/0x48
#banks:2 - Bank list:-SCLRRATE-
Bank:SCLR Length: 24(I*1)/6(I*4)/6(Type) Type:Integer*4
  1-> 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 
Bank:RATE Length: 24(I*1)/6(I*4)/6(Type) Type:Real*4 (FMT machine dependent)
  1-> 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 
------------------------ Event# 2 --------------------------------
Evid:0001- Mask:0004- Serial:1- Time:0x393c299a- Dsize:56/0x38
#banks:2 - Bank list:-MMESMMOD-
Bank:MMES Length: 24(I*1)/6(I*4)/6(Type) Type:Real*4 (FMT machine dependent)
  1-> 0x3de35788 0x3d0b0e29 0x00000000 0x00000000 0x3f800000 0x00000000 
Bank:MMOD Length: 4(I*1)/1(I*4)/1(Type) Type:Integer*4
  1-> 0x00000001 
------------------------ Event# 3 --------------------------------
Evid:0001- Mask:0008- Serial:1- Time:0x393c299a- Dsize:48/0x30
#banks:1 - Bank list:-BMES-
Bank:BMES Length: 28(I*1)/7(I*4)/7(Type) Type:Real*4 (FMT machine dependent)
  1-> 0x443d7333 0x444cf333 0x44454000 0x4448e000 0x43bca667 0x43ce0000 0x43f98000 
------------------------ Event# 4 --------------------------------
Evid:0001- Mask:0010- Serial:1- Time:0x393c299a- Dsize:168/0xa8
#banks:1 - Bank list:-CMES-
Bank:CMES Length: 148(I*1)/37(I*4)/37(Type) Type:Real*4 (FMT machine dependent)
  1-> 0x3f2f9fe2 0x3ff77fd6 0x3f173fe6 0x3daeffe2 0x410f83e8 0x40ac07e3 0x3f6ebfd8 0x3c47ffde 
  9-> 0x3e60ffda 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x3f800000 
 17-> 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 
 25-> 0x3f800000 0x3f800000 0x3f800000 0x00000000 0x3f800000 0x00000000 0x3f800000 0x3f800000 
 33-> 0x3f800000 0x3f800000 0x3f800000 0x3f800000 0x00000000 
------------------------ Event# 5 --------------------------------
Evid:0001- Mask:0020- Serial:1- Time:0x393c299a- Dsize:32/0x20
#banks:1 - Bank list:-METR-
Bank:METR Length: 12(I*1)/3(I*4)/3(Type) Type:Real*4 (FMT machine dependent)
  1-> 0x00000000 0x39005d87 0x00000000 
...


mdump in online mode

The examples below shows mdump operating in online mode (data is in MIDAS format).
   Example 1 : dump the bankheaders
   > mdump -j
   [pol@isdaq01 pol]$ mdump -j
   -4506 -- Enter <!> to Exit ------- Midas Dump ---
   ------------------------ Event# 1 ------------------------
   Evid:0002- Mask:0001- Serial:2- Time:0x4c9a4c2b- Dsize:832/0x340
   #banks:2 Bank list:-HI00HI01-
   Example 2 : dump the bank CYCI in decimal format
   [pol@isdaq01 pol]$ mdump -b CYCI -l 2 -f d
   -4506 -- Enter <!> to Exit ------- Midas Dump ---
   ------------------------ Event# 1 ------------------------
   Bank -CYCI- not found (2) in #banks:2 Bank list:-HI00HI01-
   ------------------------ Event# 2 ------------------------
   #banks:2 Bank list:-CYCIHSCL-
   Bank:CYCI Length: 36(I*1)/9(I*4)/9(Type) Type:Unsigned Integer*4
      1->       16       16        1        0        4        0        0        0
      9->        0