From bc1608c309b1265f49d5c22cf01578460f5f78a8 Mon Sep 17 00:00:00 2001
From: Wudr-1995 <wudr@ihep.ac.cn>
Date: Thu, 17 Aug 2023 15:31:45 +0800
Subject: [PATCH] update README

---
 README.md | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/README.md b/README.md
index 7033c64..dda45ec 100644
--- a/README.md
+++ b/README.md
@@ -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.
-- 
GitLab