Skip to content
Snippets Groups Projects
Commit bc1608c3 authored by wudr@ihep.ac.cn's avatar wudr@ihep.ac.cn
Browse files

update README

parent 44c1f24e
No related branches found
No related tags found
No related merge requests found
......@@ -123,3 +123,36 @@ If the algorithm named `ExampleAlg` was created in `./Analysis`, the folder's na
add_subdirectory(ExampleAlg)
```
## How to run
There is an example of python script name `run.py` in `./share/`. When you want to run a new tool or algorithm, you can add them into a copy of run.py like
```python
import Sniper
import CommissioningAlg
# Initial task and algorithm
# ========================================
task = Sniper.TopTask("spmtAna")
alg = task.createAlg("CommissioningAlg")
# ========================================
# Add new tool here
import NoiseAnaTool
# Add new tool here
alg.createTool("NoiseAnaTool")
# Set arguments
# ========================================
alg.property("inputList").set(args.input)
alg.property("outputDir").set(args.output)
alg.property("evtMax").set(args.evtmax)
alg.property("toolNameList").set(args.toollist)
```
```bash
python run.py --input [list of input] --output [output directory] --evtmax [the number of event will be processed for every ROOT file, -1 means all] --toollist [list of tool]
```
## Suggestions
1. The `CommissioningAlg` can read in the current version of ROOT file, only tools are needed for different tasks.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment