4 from AthenaCommon.Logging
import logging
5 from CLIDComps.clidGenerator
import clidGenerator
6 log = logging.getLogger(
'testEDM')
8 from TriggerEDM
import (TriggerL2List, TriggerEFList, TriggerResultsList, TriggerResultsRun1List,
9 TriggerLvl1List, TriggerIDTruth, TriggerHLTList, _addExtraCollectionsToEDMList, isCLIDDefined)
10 from TriggerEDMRun2
import EDMDetails
11 from TrigEDMConfig.TriggerEDMDefs
import InViews, allowTruncation
16 serializable_names = []
17 serializable_names_no_label = []
18 cgen = clidGenerator(
"",
False)
19 TriggerList = TriggerL2List + TriggerEFList + TriggerResultsList + TriggerResultsRun1List + TriggerLvl1List + TriggerIDTruth + TriggerHLTList
20 TriggerList += TriggerEDMRun1.TriggerL2List + TriggerEDMRun1.TriggerEFList + TriggerEDMRun1.TriggerResultsRun1List
21 for TriggerSerializable
in TriggerList:
23 serializable_name = TriggerSerializable[0]
24 serializable_name_no_label = re.sub(
r"\#.*",
"", serializable_name)
25 if '#' not in serializable_name:
26 log.error(
"ERROR, no label for " + serializable_name)
30 log.error(
"no CLID for " + serializable_name)
32 if serializable_name_no_label
not in EDMDetails.keys():
33 log.error(serializable_name_no_label +
" does not correspond to any name in EDMDetails")
37 if "Aux" in serializable_name
and "Aux." not in serializable_name:
38 log.error(
"no final Aux. in label for " + serializable_name)
40 file_types = TriggerSerializable[1].
split(
" ")
42 allowed_file_types = (
"",
"BS",
"DS",
"ESD",
"AODFULL",
"AODSLIM",
"AODVERYSLIM",
"AODBLSSLIM",
"AODCONV")
44 for file_type
in file_types:
45 if file_type
not in allowed_file_types:
46 log.error(
"unknown file type " + file_type +
" for " + serializable_name)
49 serializable_names.append(serializable_name)
50 serializable_names_no_label.append(serializable_name_no_label)
53 for EDMDetail
in EDMDetails.keys():
54 if EDMDetail
not in serializable_names_no_label:
55 log.warning(
"EDMDetail for " + EDMDetail +
" does not correspond to any name in TriggerList")
59 (
'xAOD::A#HLT_A',
'BS ESD',
'Steer', [InViews(
'SomeView1')]),
60 (
'xAOD::AAuxContainer#HLT_AAux.',
'BS ESD',
'Steer'),
61 (
'xAOD::B#HLT_B',
'BS ESD',
'Steer'),
62 (
'xAOD::BAuxContainer#HLT_BAux.DecOne.',
'BS ESD',
'Steer'),
63 (
'xAOD::B#HLT_C',
'BS ESD',
'Steer'),
64 (
'xAOD::BAuxContainer#HLT_CAux.',
'BS ESD',
'Steer'),
65 (
'xAOD::E#HLT_E',
'BS ESD',
'Steer', [allowTruncation]),
66 (
'xAOD::EAuxContainer#HLT_EAux.',
'BS ESD',
'Steer', [allowTruncation]),
71 (
'xAOD::D#HLT_D',
'BS ESD AODFULL',
'Steer', [InViews(
'SomeView2')]),
72 (
'xAOD::DAuxContainer#HLT_DAux.',
'BS ESD AODFULL',
'Steer'),
74 (
'xAOD::AAuxContainer#HLT_AAux.DecTwo.DecThree',
'BS ESD',
'Steer'),
75 (
'xAOD::B#HLT_B',
'BS ESD AODFULL',
'Steer'),
76 (
'xAOD::BAuxContainer#HLT_BAux.DecFour',
'BS ESD AODFULL',
'Steer'),
78 (
'xAOD::C#HLT_C',
'BS ESD',
'Steer'),
79 (
'xAOD::CAuxContainer#HLT_CAux.',
'BS ESD',
'Steer'),
85 (
'xAOD::A#HLT_A',
'BS ESD',
'Steer', [InViews(
'SomeView1')]),
86 (
'xAOD::AAuxContainer#HLT_AAux.DecTwo.DecThree',
'BS ESD',
'Steer'),
87 (
'xAOD::B#HLT_B',
'BS ESD AODFULL',
'Steer'),
88 (
'xAOD::BAuxContainer#HLT_BAux.DecOne.DecFour',
'BS ESD AODFULL',
'Steer'),
89 (
'xAOD::C#HLT_C',
'BS ESD',
'Steer'),
90 (
'xAOD::CAuxContainer#HLT_CAux.',
'BS ESD',
'Steer'),
91 (
'xAOD::D#HLT_D',
'BS ESD AODFULL',
'Steer', [InViews(
'SomeView2')]),
92 (
'xAOD::DAuxContainer#HLT_DAux.',
'BS ESD AODFULL',
'Steer'),
93 (
'xAOD::E#HLT_E',
'BS ESD',
'Steer', [allowTruncation]),
94 (
'xAOD::EAuxContainer#HLT_EAux.',
'BS ESD',
'Steer', [allowTruncation]),
97 if (dummyEDM != expectedEDM):
98 log.error(
"There is a problem in _addExtraCollectionsToEDMList, expecting:")
99 log.error(expectedEDM)
103 if __name__ ==
"__main__":