Project

General

Profile

OnlineReconstruction » History » Version 2

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