[3436] | 1 | ====== SOPHYA/piapp demo scripts and programs ======
|
---|
| 2 | ===============================================================
|
---|
[4073] | 3 | (C) LAL / Univ. Paris Sud, CNRS/IN2P3 1998-2012
|
---|
| 4 | (C) IRFU-SPP/CEA 1998-2012
|
---|
[3436] | 5 | ===============================================================
|
---|
| 6 |
|
---|
| 7 | See http://www.sophya.org and the SOPHYA overview manual and piapp
|
---|
| 8 | user's guide for more information.
|
---|
| 9 |
|
---|
| 10 | 1/ script demo.pic and associated demo.ppf data file
|
---|
| 11 | demo script showing general piapp features
|
---|
| 12 | csh> spiapp -exec demo
|
---|
| 13 | OR
|
---|
| 14 | csh> spiapp
|
---|
| 15 | # Execute the piapp command :
|
---|
| 16 | piapp> exec demo.pic
|
---|
| 17 |
|
---|
| 18 | 2/ script tarc.pic
|
---|
| 19 | Drawing text, arcs and arrows ...
|
---|
| 20 | piapp> exec demo.pic
|
---|
| 21 |
|
---|
| 22 | 3/ fft2d.pic and fft2.cc
|
---|
| 23 | c++ execution in piapp
|
---|
| 24 | piapp> exec fft2d.pic
|
---|
| 25 |
|
---|
| 26 | 4/ multicurve.pic
|
---|
| 27 | Drawing example, superposition of several functions
|
---|
| 28 | piapp> exec multicurve
|
---|
| 29 | OR exec multicurve.pic
|
---|
| 30 |
|
---|
| 31 | 5/ axel.pic : Some options for axes
|
---|
| 32 |
|
---|
| 33 | 6/ addelts.pic : How to add some graphic objects (circles, rectangles, text)
|
---|
| 34 | to a plot, in this case a function plot
|
---|
| 35 |
|
---|
| 36 | 7/ pnbpays.pic : How to make and draw a bargraph
|
---|
| 37 |
|
---|
[4073] | 38 | 8/ polarplot.pic : Example for creating and filling an NTuple
|
---|
| 39 | with suitable data for plot in polar coordinates using the interpreter
|
---|
| 40 | and examples of plot in polar coordinates
|
---|
| 41 | piapp> exec polarplot
|
---|
| 42 |
|
---|
| 43 | 9/ resonance.pic : How to make complex plots/drawings , in this case
|
---|
[3436] | 44 | the resonance curve of an harmonic oscillator, using the piapp
|
---|
| 45 | scripting capabilities
|
---|
| 46 |
|
---|
[4073] | 47 | 10/ oh_xva_spring.pic : An other example of complex drawing ...
|
---|
[3436] | 48 |
|
---|
[4073] | 49 | 11/ user.cc : example of function which can be called from piapp
|
---|
| 50 | 11.a/ Create the shared/loadable object user.so
|
---|
[3436] | 51 | csh> make user.so
|
---|
[4073] | 52 | 11.b/ in piapp, link the module and call the function
|
---|
[3436] | 53 | piapp> link user.so user
|
---|
| 54 | piapp> call user
|
---|
| 55 | # --> creates NTuple usernt
|
---|
| 56 | # Can be called again [with different arguments]
|
---|
| 57 | piapp> call user aaa 1 2 bbb
|
---|
| 58 |
|
---|
| 59 |
|
---|
| 60 |
|
---|
| 61 | Loadable modules
|
---|
| 62 | ----------------
|
---|
| 63 | piapp capabilities can be extended using loadable modules
|
---|
| 64 |
|
---|
[4073] | 65 | 12/ exmod.pic , exmodule.cc
|
---|
| 66 | 12.a/ Create the loadable module exmodule.so
|
---|
[3436] | 67 | csh> make exmodule.so
|
---|
[4073] | 68 | 12.b/ Execute the script exmod.pic
|
---|
[3436] | 69 | ---> new commands are added to piapp
|
---|
| 70 |
|
---|
[4073] | 71 | 13/ exmoddrw.pic exmoddrw.cc
|
---|
[3436] | 72 | csh> make exmoddrw.so
|
---|
| 73 | in piapp> exec exmoddrw.pic
|
---|
| 74 | ---> extends piapp graphic capability by a new drawer
|
---|
| 75 |
|
---|
| 76 |
|
---|
| 77 |
|
---|