Project

General

Profile

Bug #1456 » analyze_data_offline_injson.py

script - InputPyJSON instead of InputCppDAQData - Rajaram, Durga, 17 April 2014 05:10

 
1
#!/usr/bin/env python
2

    
3
"""
4
Reconstruct data from the MICE experiment
5

    
6
Offline analysis to produce reconstructed elements for MICE. TOF is
7
reconstructed through to space points; Ckov is reconstructed through to Digits.
8
"""
9

    
10
import MAUS
11

    
12
def run():
13
    """
14
    Analyze data from the MICE experiment
15
    """
16

    
17
    # Set up the input that reads from DAQ
18
    #my_input = MAUS.InputCppDAQOfflineData()
19
    my_input = MAUS.InputPyJSON()
20

    
21
    # Create an empty array of mappers, then populate it
22
    # with the functionality you want to use.
23
    my_map = MAUS.MapPyGroup()
24

    
25
    # Trigger
26
    my_map.append(MAUS.MapPyReconSetup())
27

    
28
    my_map.append(MAUS.MapCppTOFDigits())
29
    my_map.append(MAUS.MapCppTOFSlabHits())
30
    my_map.append(MAUS.MapCppTOFSpacePoints())
31

    
32
    my_map.append(MAUS.MapPyCkov())
33

    
34
    my_map.append(MAUS.MapCppKLDigits())
35
    my_map.append(MAUS.MapCppKLCellHits())
36

    
37
    my_map.append(MAUS.MapCppEMRPlaneHits())
38

    
39
    # Tracker (commented out as no tracker installed in MICE hall)
40
    #my_map.append(MAUS.MapCppTrackerRecon())
41

    
42
    #  The Go() drives all the components you pass in then put all the output
43
    #  into a file called 'mausput'
44
    MAUS.Go(my_input, my_map, MAUS.ReducePyDoNothing(), MAUS.OutputCppRoot())
45

    
46
if __name__ == '__main__':
47
    run()
48

    
(4-4/5)