2 from ROOT
import Belle2
4 from b2test_utils
import get_object_with_name, get_streamer_checksums
9 'Belle2::EventMetaData': (4, 2999207747),
10 'Belle2::ROIid': (1, 1743241213),
11 'Belle2::ROIpayload': (2, 610869861),
12 'Belle2::RawARICH': (1, 3497179043),
13 'Belle2::RawCDC': (1, 1985095356),
14 'Belle2::RawCOPPER': (3, 3824346631),
15 'Belle2::RawDataBlock': (3, 2371206983),
16 'Belle2::RawECL': (1, 2693252500),
17 'Belle2::RawFTSW': (2, 1181247934),
18 'Belle2::RawKLM': (1, 101994230),
19 'Belle2::RawPXD': (2, 924270514),
20 'Belle2::RawSVD': (1, 1772361339),
21 'Belle2::RawTOP': (1, 1772361339),
22 'Belle2::RawTRG': (1, 1772361339),
23 'Belle2::RelationsInterface<TObject>': (0, 3862127315),
24 'Belle2::SoftwareTrigger::SoftwareTriggerVariables': (1, 638196437),
25 'Belle2::SoftwareTriggerResult': (5, 241059817),
26 'Belle2::TRGSummary': (7, 1658421299),
30 NAME_TO_CPP_REPLACEMENTS = {
31 "SoftwareTriggerVariables":
"SoftwareTrigger::SoftwareTriggerVariables",
33 "RawARICHs":
"RawARICH",
35 "RawCOPPERs":
"RawCOPPER",
37 "RawFTSWs":
"RawFTSW",
46 if __name__ ==
"__main__":
50 objects_names = ALWAYS_SAVE_OBJECTS + RAWDATA_OBJECTS
53 objects_names = [NAME_TO_CPP_REPLACEMENTS.get(name, name)
for name
in objects_names]
56 objects = [get_object_with_name(object_name)()
for object_name
in objects_names]
61 for key, checksum
in get_streamer_checksums(objects).items():
62 if key
not in EXPECTED_CHECKSUMS:
63 problems.append(f
"There is no {key} in the checksum dictionary!")
65 expected_checksum = EXPECTED_CHECKSUMS[key]
67 if expected_checksum != checksum:
68 problems.append(f
"The checksum {checksum[1]} for {key} (version {checksum[0]}) "
69 f
"is not equal to the expected checksum {expected_checksum[1]} (version {expected_checksum[0]}).")
72 print(
"Check finished")
74 problems =
"\n\t" +
"\n\t".join(problems)
75 print(
"Check finished with problems. ",
76 "Either you changed them by accident or you need to adjust the expected checksum list in this test):",