Page History
...
7. Add analysis module (Freq: once)
This step depends on which specific analysis framework is used:
- For Python-based analysis framework you need to execute following commands:
This will create fileCode Block mkdir my_ana_pkg/src # only if src directory does not exist yet codegen -l pyana-module my_ana_pkg my_ana_mod
my_ana_pkg/src/my_ana_mod.py
which contains boilerplate code for analysis module. The codegen command can also be used to generate other template modules, as explained here.
...
Execute following commands:
Code Block |
---|
mkdir my_ana_pkg/src my_ana_pkg/include # only if src and include directories do not exist yet
codegen -l psana-module my_ana_pkg my_ana_mod
|
This will create files my_ana_pkg/include/my_ana_mod.h
and my_ana_pkg/src/my_ana_mod.cpp
which contain skeleton code for analysis module.
Note |
---|
Like with the package name it's better to use names containing letters, digits, and underscores only. |
...
Use your favorite editor to add or modify code the analysis module. For Python modules see section Writing User Modules in Pyana User Manual for examples. For C++ modules see Psana User Manual for examples.
...
In addition to analysis module the job usually needs a separate configuration file. The name and location of the file could be arbitrary. By default Python-based analysis uses file named pyana.cfg
in current directory so the simplest would be to create it inside the release directory:
...
.
...
C++-based analysis uses file named psana.cfg
in current directory by default, create it with your favorite editor:
...
Chose the data you want to process and start analysis job. For Pyana it would be something like (assuming properly prepared pyana.cfg
in current directory):
Code Block |
---|
pyana /reg/d/psdm/AMO/amo14410/xtc/e23-r0406-*.xtc
|
For C++ framework the command may look like (assuming Assuming properly prepared psana.cfg in current directory), execute:
Code Block |
---|
psana /reg/d/psdm/AMO/amo14410/xtc/e23-r0406-*.xtc |