9from b2test_utils
import get_object_with_name, get_streamer_checksums
14 'Belle2::EventMetaData': (4, 2999207747),
15 'Belle2::ROIid': (1, 1743241213),
16 'Belle2::ROIpayload': (2, 610869861),
17 'Belle2::RawARICH': (1, 3497179043),
18 'Belle2::RawCDC': (1, 1985095356),
19 'Belle2::RawCOPPER': (3, 3824346631),
20 'Belle2::RawDataBlock': (3, 2371206983),
21 'Belle2::RawECL': (1, 2693252500),
22 'Belle2::RawFTSW': (2, 1181247934),
23 'Belle2::RawKLM': (1, 101994230),
24 'Belle2::RawPXD': (2, 924270514),
25 'Belle2::RawSVD': (1, 1772361339),
26 'Belle2::RawTOP': (1, 1772361339),
27 'Belle2::RawTRG': (1, 1772361339),
28 'Belle2::RelationsInterface<TObject>': (0, 3862127315),
29 'Belle2::SoftwareTrigger::SoftwareTriggerVariables': (1, 638196437),
30 'Belle2::SoftwareTriggerResult': (5, 241059817),
31 'Belle2::TRGSummary': (7, 1658421299),
32 'Belle2::OnlineEventT0': (1, 0x42ae59a2),
33 'Belle2::Const::DetectorSet': (1, 0x48dd0c12),
37NAME_TO_CPP_REPLACEMENTS = {
38 "SoftwareTriggerVariables":
"SoftwareTrigger::SoftwareTriggerVariables",
39 "OnlineEventT0s":
"OnlineEventT0",
41 "RawARICHs":
"RawARICH",
43 "RawCOPPERs":
"RawCOPPER",
45 "RawFTSWs":
"RawFTSW",
54if __name__ ==
"__main__":
58 objects_names = ALWAYS_SAVE_OBJECTS + RAWDATA_OBJECTS
61 objects_names = [NAME_TO_CPP_REPLACEMENTS.get(name, name)
for name
in objects_names]
64 objects = [get_object_with_name(object_name)()
for object_name
in objects_names]
69 for key, checksum
in get_streamer_checksums(objects).items():
70 if key
not in EXPECTED_CHECKSUMS:
71 problems.append(f
"There is no {key} in the checksum dictionary!")
73 expected_checksum = EXPECTED_CHECKSUMS[key]
75 if expected_checksum != checksum:
76 problems.append(f
"The checksum {checksum[1]} for {key} (version {checksum[0]}) "
77 f
"is not equal to the expected checksum {expected_checksum[1]} (version {expected_checksum[0]}).")
80 print(
"Check finished")
82 problems =
"\n\t" +
"\n\t".join(problems)
83 print(
"Check finished with problems. ",
84 "Either you changed them by accident or you need to adjust the expected checksum list in this test):",