Page History
...
Short | Long | Config File | Option type | Default | Description | ||
---|---|---|---|---|---|---|---|
-v | --verbose | verbose | integer | 0 | Command line options do not need any values but can be repeated multiple times, configuration file option accepts single integer number. | ||
-c file | --config=file |
| path | pyana.cfg | Name of the configuration file. | ||
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="836301be10ce97e3-f564daf6-47544cb9-9e18b6b5-9782ddd8d4398dbecc85a112"><ac:plain-text-body><![CDATA[ | -C name | --config-name=name |
| string |
| If non-empty string is given then configuration will be read from section | ]]></ac:plain-text-body></ac:structured-macro> |
-l file | --file-list=file | file-list | path |
| The list of input data files will be read form a given file which must contain one file name per line. | ||
-n number | --num-events=number | num-events | integer | 0 | Maximum number of events to process, this counter will include damaged events too. | ||
-j name | --job-name=name | job-name | string |
| Sets job name which is accessible to user code via environment method. Default name is based on the input file names. | ||
-m name | --module=name | modules | string |
| User analysis module(s). Command line options can be repeated several times, configuration file option accepts space-separated list of names. | ||
-p number | --num-cpu=number | num-cpu | integer | 1 | Number of processes to run, if greater than 1 then multi-processing mode will be used. |
...
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
[pyana] modules = mypackage.myana mypackage.myana:wide [mypackage.myana] lower = 0 upper = 100 name = default [mypackage.myana:wide] ; 'lower' option will be reused from [mypackage.myana] section bins = 1000 ; this overrides default module value ; two options below will override [mypackage.myana] values upper = 1000 name = wide |
Anchor | ||||
---|---|---|---|---|
|
Methods
As mentioned above the class in the user module defines number of methods. These methods are called by the Pyana framework at the appropriate moments during data analysis. Here is the explanation when these methods are called and what arguments they accept.
beginjob(evt, env)
– this method is called for at a Configure transition. Typically this is the place to initialize various things that may depend on the data being processed. Configuration objects which are part of the Configure transition are accessed through theenv
object.evt
object provides interface to the datagram data and can be used to extract all contained data too, but preferred way to access configuration data objects is through the environment object. This method is usually called once per job, but in case when pyana is instructed to process multiple runs it can be called several times if there is more than one Configure transition happened during those runs.
endjob(env)
– this method is called at Unconfigure transition. Typically used to process collected statistics, close output files, etc. Likebeginjob()
it can be called multiple times if there is more that one Configure transition happes during the run range being processed.
beginrun(evt, env)
– this method is called for at a BeginRun transition. There is usually no data associated with this transition soevt
object would be empty, butenv
object contains all configuration objects. This method is called once for every run and is a good place to prepare for the processing of the next run.
endrun(env)
– this method is called for at a EndRun transition. Typically used to process statistics collected during the run.
begincalibcycle(evt, env)
– this method is called for at a BeginCalibCycle transition. This method is called once for every calibration cycle.
endcalibcycle(env)
– this method is called for at a EndCalibCycle transition. Typically used to process statistics collected during the calibration cycle.
Methods beginrun()
, endrun()
, begincalibcycle()
, and endcalibcycle()
are optional, analysis module does not have to define them and they are called only if defined.
Anchor | ||||
---|---|---|---|---|
|
...