~m-a-uchida/maus/RKdEdxDevel

« back to all changes in this revision

Viewing changes to src/input/InputCppDAQOfflineData/test_InputCppDAQOfflineData.py

  • Committer: Durga Rajaram
  • Date: 2015-03-20 08:30:19 UTC
  • mfrom: (659.1.105 release-candidate)
  • Revision ID: durga@fnal.gov-20150320083019-6wbtnk33gvpmm2zx
Tags: MAUS-v0.9.4
MAUS-v0.9.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
        # It would be nicer to test with a smaller data file!
37
37
        self._datapath = '%s/src/input/InputCppDAQData' % \
38
38
                            os.environ.get("MAUS_ROOT_DIR")
 
39
        # setup data files for StepI and StepIV
 
40
        # set the checksum and event count accordingly
39
41
        self._datafile = '05466'
 
42
        self._numevents = 12
 
43
        self._checksum = 'f699f0d81aee1f64a2f1cec7968b9289'
 
44
        # note that the StepIV file is garbage data as of now
 
45
        # this will have to be updated - DR, March 13, 2015
 
46
        if os.environ['MAUS_UNPACKER_VERSION'] == "StepIV":
 
47
            self._datafile = '06008'
 
48
            self._numevents = 22
 
49
            self._checksum = '155b3b02e36ea80c0b0dcfad3be7027d'
40
50
        config = Configuration().getConfigJSON()
41
51
        config_json = json.loads(config)
42
52
        config_json["daq_data_path"] = self._datapath
84
94
        print event_count
85
95
        # We should now have processed 26 events
86
96
        #self.assertEqual(event_count, 26)
87
 
        self.assertEqual(event_count, 12)
 
97
        self.assertEqual(event_count, self._numevents)
88
98
 
89
99
        # Check the md5 sum matches the expected value
90
100
        # changed checksum to reflect the run_num addition
95
105
        #self.assertEqual(digester.hexdigest(), \
96
106
        #                 '2ca9328c6bf981fb242b3d985d226125')
97
107
        self.assertEqual(digester.hexdigest(), \
98
 
                         'f699f0d81aee1f64a2f1cec7968b9289')
 
108
                         self._checksum)
99
109
 
100
110
        self.mapper.death()
101
111