ucesb status Bastian Lher March 2017 TU Darmstadt G S I H e - - PowerPoint PPT Presentation

ucesb status
SMART_READER_LITE
LIVE PREVIEW

ucesb status Bastian Lher March 2017 TU Darmstadt G S I H e - - PowerPoint PPT Presentation

ucesb status Bastian Lher March 2017 TU Darmstadt G S I H e l m h o l t z z e n t r u m f r S c h w e r i o n e n f o r s c h u n g G m b H Last workshop (July 2015) Unpackers for each


slide-1
SLIDE 1

ucesb status

Bastian Löher March 2017 TU Darmstadt

G S I H e l m h

  • l

t z z e n t r u m f ü r S c h w e r i

  • n

e n f

  • r

s c h u n g G m b H

slide-2
SLIDE 2

Last workshop (July 2015)

  • Unpackers for each detector written by hand
  • Channel mapping (UNPACK

MAPPED/RAW) → implemented individually

  • Maybe remember R3BTofUnpack class
slide-3
SLIDE 3

Last workshop (July 2015)

  • Data fmow without ucesb

DAQ LMD R³BROOT Unpack & Map

  • nline

Reconstruction Calib tools Calib Params ROOT Live Display DAQ WG R³BROOT WG User

slide-4
SLIDE 4

ucesb overview

  • Internal data fmow
slide-5
SLIDE 5

ucesb overview

  • Internal data fmow
  • Use input, unpacking and mapping

stages

slide-6
SLIDE 6

external writer

ucesb overview

  • Internal data fmow
  • Use input, unpacking and mapping

stages

  • Write output to fjle or via network

ucesb hbook writer ntuple writer struct writer

slide-7
SLIDE 7

Last workshop (July 2015)

  • Data fmow without ucesb

DAQ LMD R³BROOT Unpack & Map

  • nline

Reconstruction Calib tools Calib Params ROOT Live Display DAQ WG R³BROOT WG User

slide-8
SLIDE 8

Today

  • Data fmow with ucesb

DAQ LMD R³BROOT Unpack & Map (ucesb)

  • nline

Reconstruction Calib tools Calib Params ROOT Live Display DAQ WG R³BROOT WG User

slide-9
SLIDE 9

Advantages

  • Unpacker has to be written for proper DAQ operation

– Why not reuse?

  • Mapping has to be defjned somewhere

– Why not do it in a consistent manner?

  • Ucesb does extensive checking by default

– Why reinvent the wheel?

  • DAQ WG does most of this work

→ Less R3BROOT code

slide-10
SLIDE 10

R3BROOT + ucesb

  • Data fmow
  • Implementation (in R3BRoot/r3bsource):

– R3BUcesbSource: Start unpacker and establish connection via

ext_data_client

– R3BReader: Base class for extracting data from ucesb event – R3BPtofReader: Derived detector specifjc reader class

external writer ucesb struct writer external client R3BROOT e t h e r n e t p i p e

slide-11
SLIDE 11

The reader class

  • Needs data structure (ext_str_h101_<det>.h):

– Generated via ucesb:

ucesb –ntuple=DET,STRUCT_HH,ext_str_h101_<det>.h

– Needs to be modifjed (currently by hand), see existing

structures in r3bsource directory

  • Methods:

– Init(): Calls EXT_STR_h101_<det>_ITEMS_INFO – Read(): Copies data from ucesb structure into R3Broot data

containers

slide-12
SLIDE 12

In a Macro

  • Defjne full data structure:
  • Create an instance in run() function:

struct { EXT_STR_h101_det1 det1; EXT_STR_h101_det2 det2; } EXT_STR_h101;

See: https://github.com/R3BRootGroup/R3BRoot/blob/dev/macros/r3b/unpack/ucesb/run_empty.C

EXT_STR_h101 event;

slide-13
SLIDE 13

In a Macro

  • R3BUcesbSource Instantiation:

– file: Input fjle name (may use wildcards) – options: additional options to –ntuple option – ucesb: path to unpacker (use $UCESB_DIR variable) – event: full event structure

source = new R3BUcesbSource(file, options, ucesb, &event, sizeof(event));

See: https://github.com/R3BRootGroup/R3BRoot/blob/dev/macros/r3b/unpack/ucesb/run_empty.C

slide-14
SLIDE 14

In a Macro

  • Reader Instantiation:

– Adress of detector data structure inside full event

→ destination address

– Offset of this address with respect to beginning of

structure source address →

det2 = new Det2Reader(&event.det2, offsetof(EXT_STR_h101, det2)); source AddReader(det2); →

See: https://github.com/R3BRootGroup/R3BRoot/blob/dev/macros/r3b/unpack/ucesb/run_empty.C

slide-15
SLIDE 15

Which reader classes exist today?

  • Fiber4
  • Los, rolu
  • Neuland (Tacquila & Tamex)
  • Psp, Pspx
  • Strawtubes
  • Tofd
  • Unpack (event number + trigger)

From: https://github.com/R3BRootGroup/R3BRoot/tree/dev/r3bsource

slide-16
SLIDE 16

Which detectors could use ucesb?

slide-17
SLIDE 17

Which detectors could use ucesb?

slide-18
SLIDE 18

Example used in this workshop

  • Proton ToF detector (Ptof)
  • ucesb unpacker: upexps/jun16/jun16_ptof

– Get it here: git clone /u/land/bloeher/s438b/upexps – Check out: git checkout for_r3broot_workshop

  • data: jun2016/run160*.lmd (time-stitched, Carbon run)

– Get it here: /SAT/nyx/land/jun2016/stitched/… – Or cached: /d/land2/bloeher/nyx_cache/jun2016/… – Contains data from Tofd detector

similar format for Ptof →

slide-19
SLIDE 19

Avoiding Pitfalls

  • $UCESB_DIR must be exported when compiling R3BRoot
  • ucesb and R3Broot must be compiled with same version
  • f root
  • Check that the used ext_str_101_<det>.h matches output
  • f ucesb
  • Double check the arguments when instantiating Reader

class