@@ -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
importSniper
importCommissioningAlg
# Initial task and algorithm
# ========================================
task=Sniper.TopTask("spmtAna")
alg=task.createAlg("CommissioningAlg")
# ========================================
# Add new tool here
importNoiseAnaTool
# 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.