Project

General

Profile

OnlineReconstruction » History » Version 5

Rajaram, Durga, 15 March 2017 15:34

1 1 Rajaram, Durga
h1. OnlineReconstruction
2
3
----
4
5
h2. Description
6
7 4 Rajaram, Durga
The MICE Online Reconstruction framework provides live data reconstruction functionality, though it can also be run offline.
8
9 1 Rajaram, Durga
The framework is multi-threaded, and based on a consumer-producer model.
10 4 Rajaram, Durga
11 5 Rajaram, Durga
A C++ API  package provides access to the I/O, buffering, and threading functionalities.
12 4 Rajaram, Durga
13 5 Rajaram, Durga
The reconstruction workers are plugged in through the miceOnrec package which interfaces with the MAUS libraries.
14 1 Rajaram, Durga
15
h2. Requirements
16
17 4 Rajaram, Durga
* The RHEL developer toolset <pre>devtoolset-2</pre> is required to provide Boost & additional functionalities.
18 1 Rajaram, Durga
<pre>
19
wget -O /etc/yum.repos.d/slc6-devtoolset.repo http://linuxsoft.cern.ch/cern/devtoolset/slc6-devtoolset.repo
20
yum install devtoolset-2
21
</pre>
22 2 Rajaram, Durga
** This usually installs in <pre>/opt/rh/devtoolset-2</pre> but it may be different on your system.
23 1 Rajaram, Durga
24
* The MAUS Online environment must also be built if running in ONLINE mode reading from the DAQ socket
25
<pre>
26
cd /path/to/MAUS/
27
source env.sh
28
bash third_party/bash/70daq.bash
29
scons -j8
30
</pre>
31
32
33
h2.  Install the API and reconstruction frameworks
34
35
The install requires 2 git packages <pre>mic11api</pre> and <pre>miceOnrec</pre>
36
37
It will be helpful to keep both packages in the same directory.
38
39
e.g. Create a directory to hold the API and the onrec packages
40
<pre> mkdir OnlineReconstruction</pre>  or a name of your choice
41
42
43
h2.  Install the API
44
45
<pre>
46
cd OnlineReconstruction
47
</pre>
48
49
* Fetch from github
50
<pre>
51
git clone https://github.com/durgarajaram/mic11api.git
52
</pre>
53
54
* Source the devtoolset-2 environment
55
<pre>
56
source /opt/rh/devtoolset-2/enable
57
</pre>
58
59
* Build the package
60
<pre>
61
cd mic11api/build
62
./cmake_clean.sh
63
cmake ..
64
make
65
</pre>
66
67
68
h2. Install the Online Reconstruction package
69
70
<pre>
71
cd /path/to/OnlineReconstruction
72
</pre>
73
74
* Fetch from github
75
<pre>
76
git clone https://github.com/durgarajaram/miceOnrec.git
77
</pre>
78
79
80
* source the MAUS environment in order to pick up the MAUS libraries
81
<pre>
82
source /path/to/MAUS/env.sh
83
</pre>
84
85
* Source the devtoolset-2 environment
86
<pre>
87
source /opt/rh/devtoolset-2/enable
88
</pre>
89
90
* Build the Onrec package
91
<pre>
92
cd miceOnrec/build
93
./cmake_clean.sh
94
cmake ..
95
make
96
</pre>
97
98
* Load the MAUS configurations to local file -- required for running the reconstruction jobs
99
<pre>
100
cd /path/to/OnlineReconstruction/miceOnrec/bin
101
python GetJsonConfig.py
102
</pre>
103
104
** This clones MAUS's ConfigurationDefaults.py to config.json.
105
*** If you want to specify a different geometry, you will have to edit ConfigurationDefaults.py and then run <pre>python GetJsonConfig.py</pre> again
106
107
h2. Running
108
109
The miceOnrec package builds two binaries <pre>bin/stexample, bin/mtexample</pre>
110
111
To run the online reconstruction
112
113
* Source the MAUS environment
114
<pre>source /path/to/MAUS/env.sh</pre>
115
116
* Source the DAQ mon environment
117
** Note: If you don't intend to run in ONLINE mode (reading data from the DAQ socket), you can skip this. 
118
<pre>
119
cd /path/to/OnlineReconstruction/miceOnrec
120
source mon_env.sh
121
</pre>
122
123
124
* Run in multi-threaded  OFFLINE mode
125
<pre>bin/mtexample -d <dir-with-daq-files> -f <daq-file or run runmber> </pre>
126
e.g.
127
<pre>bin/mtexample -d /data/raw -f 8161</pre>
128
where /data/raw contains the raw files 8161.000 etc
129
130
h2. Outputs
131
132
The canvas image outputs from onrec are png files. These go to <pre>$MAUS_WEB_MEDIA/reco</pre>