Project

General

Profile

OnlineReconstruction » History » Version 3

Rajaram, Durga, 15 March 2017 15:28

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