c++ based mathematica stub for mds & analysis contents motivation functional specification...

8
C++ based mathematica stub for MDs & analysis Contents Motivation Functional specification Architecture Example Calls Results KT-day 3.june.2013, Michael Ludwig, Alexandros Verikios, BE-BI 1

Upload: alexander-jones

Post on 21-Jan-2016

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: C++ based mathematica stub for MDs & analysis Contents Motivation Functional specification Architecture Example Calls Results KT-day 3.june.2013, Michael

C++ based mathematica stub for MDs & analysis

Contents• Motivation• Functional specification• Architecture• Example Calls• Results

KT-d

ay 3

.june

.201

3,

Mic

hael

Lud

wig

, Ale

xand

ros

Verik

ios,

BE-

BI

1

Page 2: C++ based mathematica stub for MDs & analysis Contents Motivation Functional specification Architecture Example Calls Results KT-day 3.june.2013, Michael

Motivation

During accelerator MD sessions, new features are discovered from the acquired data. Data from different (control system) devices and different formats, but from the same beam, must be acquired. Fast-to-write on-the-fly analysis code should lead to alive graphs.

And it should be fast and easy to use…

Existing tools:ROSALI: “mathematica inside java”, slow, expert useJava math stub: dependency on java version, functionality ?Existing GUIs: not flexible enough, too much developmentSpreadsheets: only offline data 2

KT-d

ay 3

.june

.201

3,

Mic

hael

Lud

wig

, Ale

xand

ros

Verik

ios,

BE-

BI

Page 3: C++ based mathematica stub for MDs & analysis Contents Motivation Functional specification Architecture Example Calls Results KT-day 3.june.2013, Michael

Functional specification

Depend only on C++ RDA of the control system, this is the “lowest possible interface” with minimal dependencies.

From a mathematica notebook, provide calls GET and SUBSCRIPTION for Fesa and GM devices in a generic way.

Data SET is not needed.

Support data from several devices, synchronized and in parallel

Provide realistic performance to keep up with PPM

Provide good documentation with examples for user community3

KT-d

ay 3

.june

.201

3,

Mic

hael

Lud

wig

, Ale

xand

ros

Verik

ios,

BE-

BI

Page 4: C++ based mathematica stub for MDs & analysis Contents Motivation Functional specification Architecture Example Calls Results KT-day 3.june.2013, Michael

architecture

4

KT-d

ay 3

.june

.201

3,

Mic

hael

Lud

wig

, Ale

xand

ros

Verik

ios,

BE-

BI

The user runs a mathematica notebook…

KT-d

ay 3

.june

.201

3,

Mic

hael

Lud

wig

, Ale

xand

ros

Verik

ios,

BE-

BI

…and calls our stub…

…for i.e. <n> subscriptions…

…which spawn <n> RDA collectors…

…to up to <m> RDA connections…

…data is given back through shared

memory

…of course we can do GETs as well

Page 5: C++ based mathematica stub for MDs & analysis Contents Motivation Functional specification Architecture Example Calls Results KT-day 3.june.2013, Michael

Example calls (1)

bin=“(…)mathStub”;Clear[link];linkLaunch[bin];Device=“MLTest100”Property=“SignalAcquisition”;Field=“signal”;Cycle=“ADE.USER.SEG_2”;Data=getMath[device, property, cycle, field];

5

KT-d

ay 3

.june

.201

3,

Mic

hael

Lud

wig

, Ale

xand

ros

Verik

ios,

BE-

BI

Page 6: C++ based mathematica stub for MDs & analysis Contents Motivation Functional specification Architecture Example Calls Results KT-day 3.june.2013, Michael

Example calls (2)

(…)Id=0;maxDelay=500;Data1=subscribeMath[device1, property1, cycle, field, id1, 0]; Data2=subscribeMath[device2, property2, cycle, field, id2, maxDelay];

(…)For[ (…)

Data1=waitForNextDataMath[id1];Data2=waitForNextDataMath[id2];

(aggregate Data1 and Data2, interpolate, FFT, filtering….)(list manipulations, graphics output…)(…)

];(…)

6

KT-d

ay 3

.june

.201

3,

Mic

hael

Lud

wig

, Ale

xand

ros

Verik

ios,

BE-

BI

Page 7: C++ based mathematica stub for MDs & analysis Contents Motivation Functional specification Architecture Example Calls Results KT-day 3.june.2013, Michael

Example calls (2bis)

The <maxDelay> parameter:

• If already buffered data is younger than <maxDelay> ms then do not block, and give back buffered data immediately

• Call with “0”: always blocking for new data == synchronized

• This permits fine synchronization to several data sources

7

KT-d

ay 3

.june

.201

3,

Mic

hael

Lud

wig

, Ale

xand

ros

Verik

ios,

BE-

BI

Page 8: C++ based mathematica stub for MDs & analysis Contents Motivation Functional specification Architecture Example Calls Results KT-day 3.june.2013, Michael

Results

We treat float arrays right now, more basic types to come soon

Data throughput is OK: 10Hz update with 10000 values at least

We can collect data from several devices in a synchronized way

We depend only on the C++ RDA and nothing else in particular

Should be possible to adapt to “outside controls” data sources

Nice documentation & examples at:https://test-mludwig.web.cern.ch/test-mludwig/

Another generic MD tool for mathematica-users is ready (α)

8

KT-d

ay 3

.june

.201

3,

Mic

hael

Lud

wig

, Ale

xand

ros

Verik

ios,

BE-

BI