diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/CMakeLists.txt b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/CMakeLists.txt index 4a22498ac83ca4a9c1e96c2ab30cdef3b41da1e1..c0869686e13d8d77691068c47db1548bc47eb3cc 100644 --- a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/CMakeLists.txt +++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/CMakeLists.txt @@ -61,6 +61,9 @@ athenapoolmultitest_run_test( AthenaPoolMultiTestBuildInput SplittableData_jo athenapoolmultitest_run_test( AthenaPoolMultiTestEventSplit EventSplit_jo post_check_es DEPENDS AthenaPoolMultiTestBuildInput ) +athenapoolmultitest_run_test( AthenaPoolMultiTestEventSplitDecision EventSplitDecision_jo + post_check_es + DEPENDS AthenaPoolMultiTestBuildInput ) athenapoolmultitest_run_test( AthenaPoolMultiTestEventNoSplit EventNoSplit_jo post_check_es DEPENDS AthenaPoolMultiTestBuildInput ) diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/AthenaPoolMultiTestCheckOutput.ref b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/AthenaPoolMultiTestCheckOutput.ref index b00c829ec72d8586347e08871a22cc04ca1f8c7e..ce3a59300823147a3cb873e2f0d7a8f008c48cd3 100644 --- a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/AthenaPoolMultiTestCheckOutput.ref +++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/AthenaPoolMultiTestCheckOutput.ref @@ -1,7 +1,491 @@ ReadData INFO in initialize() EventSelector INFO reinitialization... EventSelector INFO EventSelection with query -EventSelector INFO No Events found in any Input Collections AthenaEventLoopMgr INFO Setup EventSelector service EventSelector -EventSelector INFO No Events found in any Input Collections +AthenaPoolConve... INFO massageEventInfo: unable to get OverrideRunNumberFromInput property from EventSelector +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 38853911, key = EventInfoAux. +ReadData INFO CLID = 45903698, key = EventInfo +ReadData INFO CLID = 222376821, key = Stream1 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 0 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 1.2 y = -2.3 z = 226.6 detector = DummyHitDetector +ReadData INFO Hit x = 4.4 y = -8.0 z = 94.7 detector = DummyHitDetector +ReadData INFO Hit x = 7.6 y = -13.7 z = 70.2 detector = DummyHitDetector +ReadData INFO Hit x = 10.8 y = -19.3 z = 59.9 detector = DummyHitDetector +ReadData INFO Hit x = 14.0 y = -25.0 z = 54.2 detector = DummyHitDetector +ReadData INFO Hit x = 17.2 y = -30.7 z = 50.6 detector = DummyHitDetector +ReadData INFO Hit x = 20.4 y = -36.4 z = 48.1 detector = DummyHitDetector +ReadData INFO Hit x = 23.7 y = -42.0 z = 46.3 detector = DummyHitDetector +ReadData INFO Hit x = 26.9 y = -47.7 z = 44.9 detector = DummyHitDetector +ReadData INFO Hit x = 30.1 y = -53.4 z = 43.8 detector = DummyHitDetector +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 38853911, key = EventInfoAux. +ReadData INFO CLID = 45903698, key = EventInfo +ReadData INFO CLID = 222376821, key = Stream1 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 6 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 601.2 y = -2.3 z = -373.3 detector = DummyHitDetector +ReadData INFO Hit x = 604.4 y = -8.0 z = -505.2 detector = DummyHitDetector +ReadData INFO Hit x = 607.6 y = -13.7 z = -529.7 detector = DummyHitDetector +ReadData INFO Hit x = 610.8 y = -19.3 z = -540.0 detector = DummyHitDetector +ReadData INFO Hit x = 614.0 y = -25.0 z = -545.7 detector = DummyHitDetector +ReadData INFO Hit x = 617.2 y = -30.7 z = -549.3 detector = DummyHitDetector +ReadData INFO Hit x = 620.4 y = -36.4 z = -551.8 detector = DummyHitDetector +ReadData INFO Hit x = 623.7 y = -42.0 z = -553.6 detector = DummyHitDetector +ReadData INFO Hit x = 626.9 y = -47.7 z = -555.0 detector = DummyHitDetector +ReadData INFO Hit x = 630.1 y = -53.4 z = -556.1 detector = DummyHitDetector +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 38853911, key = EventInfoAux. +ReadData INFO CLID = 45903698, key = EventInfo +ReadData INFO CLID = 222376821, key = Stream1 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 9 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 901.2 y = -2.3 z = -673.3 detector = DummyHitDetector +ReadData INFO Hit x = 904.4 y = -8.0 z = -805.2 detector = DummyHitDetector +ReadData INFO Hit x = 907.6 y = -13.7 z = -829.7 detector = DummyHitDetector +ReadData INFO Hit x = 910.8 y = -19.3 z = -840.0 detector = DummyHitDetector +ReadData INFO Hit x = 914.0 y = -25.0 z = -845.7 detector = DummyHitDetector +ReadData INFO Hit x = 917.2 y = -30.7 z = -849.3 detector = DummyHitDetector +ReadData INFO Hit x = 920.4 y = -36.4 z = -851.8 detector = DummyHitDetector +ReadData INFO Hit x = 923.7 y = -42.0 z = -853.6 detector = DummyHitDetector +ReadData INFO Hit x = 926.9 y = -47.7 z = -855.0 detector = DummyHitDetector +ReadData INFO Hit x = 930.1 y = -53.4 z = -856.1 detector = DummyHitDetector +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 38853911, key = EventInfoAux. +ReadData INFO CLID = 45903698, key = EventInfo +ReadData INFO CLID = 222376821, key = Stream1 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 12 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 1201.2 y = -2.3 z = -973.3 detector = DummyHitDetector +ReadData INFO Hit x = 1204.4 y = -8.0 z = -1105.2 detector = DummyHitDetector +ReadData INFO Hit x = 1207.6 y = -13.7 z = -1129.7 detector = DummyHitDetector +ReadData INFO Hit x = 1210.8 y = -19.3 z = -1140.0 detector = DummyHitDetector +ReadData INFO Hit x = 1214.0 y = -25.0 z = -1145.7 detector = DummyHitDetector +ReadData INFO Hit x = 1217.2 y = -30.7 z = -1149.3 detector = DummyHitDetector +ReadData INFO Hit x = 1220.4 y = -36.4 z = -1151.8 detector = DummyHitDetector +ReadData INFO Hit x = 1223.7 y = -42.0 z = -1153.6 detector = DummyHitDetector +ReadData INFO Hit x = 1226.9 y = -47.7 z = -1155.0 detector = DummyHitDetector +ReadData INFO Hit x = 1230.1 y = -53.4 z = -1156.1 detector = DummyHitDetector +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 38853911, key = EventInfoAux. +ReadData INFO CLID = 45903698, key = EventInfo +ReadData INFO CLID = 222376821, key = Stream1 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 15 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 1501.2 y = -2.3 z = -1273.3 detector = DummyHitDetector +ReadData INFO Hit x = 1504.4 y = -8.0 z = -1405.2 detector = DummyHitDetector +ReadData INFO Hit x = 1507.6 y = -13.7 z = -1429.7 detector = DummyHitDetector +ReadData INFO Hit x = 1510.8 y = -19.3 z = -1440.0 detector = DummyHitDetector +ReadData INFO Hit x = 1514.0 y = -25.0 z = -1445.7 detector = DummyHitDetector +ReadData INFO Hit x = 1517.2 y = -30.7 z = -1449.3 detector = DummyHitDetector +ReadData INFO Hit x = 1520.4 y = -36.4 z = -1451.8 detector = DummyHitDetector +ReadData INFO Hit x = 1523.7 y = -42.0 z = -1453.6 detector = DummyHitDetector +ReadData INFO Hit x = 1526.9 y = -47.7 z = -1455.0 detector = DummyHitDetector +ReadData INFO Hit x = 1530.1 y = -53.4 z = -1456.1 detector = DummyHitDetector +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 38853911, key = EventInfoAux. +ReadData INFO CLID = 45903698, key = EventInfo +ReadData INFO CLID = 222376821, key = Stream1 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 16 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 1601.2 y = -2.3 z = -1373.3 detector = DummyHitDetector +ReadData INFO Hit x = 1604.4 y = -8.0 z = -1505.2 detector = DummyHitDetector +ReadData INFO Hit x = 1607.6 y = -13.7 z = -1529.7 detector = DummyHitDetector +ReadData INFO Hit x = 1610.8 y = -19.3 z = -1540.0 detector = DummyHitDetector +ReadData INFO Hit x = 1614.0 y = -25.0 z = -1545.7 detector = DummyHitDetector +ReadData INFO Hit x = 1617.2 y = -30.7 z = -1549.3 detector = DummyHitDetector +ReadData INFO Hit x = 1620.4 y = -36.4 z = -1551.8 detector = DummyHitDetector +ReadData INFO Hit x = 1623.7 y = -42.0 z = -1553.6 detector = DummyHitDetector +ReadData INFO Hit x = 1626.9 y = -47.7 z = -1555.0 detector = DummyHitDetector +ReadData INFO Hit x = 1630.1 y = -53.4 z = -1556.1 detector = DummyHitDetector +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 38853911, key = EventInfoAux. +ReadData INFO CLID = 45903698, key = EventInfo +ReadData INFO CLID = 222376821, key = Stream1 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 18 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 1801.2 y = -2.3 z = -1573.3 detector = DummyHitDetector +ReadData INFO Hit x = 1804.4 y = -8.0 z = -1705.2 detector = DummyHitDetector +ReadData INFO Hit x = 1807.6 y = -13.7 z = -1729.7 detector = DummyHitDetector +ReadData INFO Hit x = 1810.8 y = -19.3 z = -1740.0 detector = DummyHitDetector +ReadData INFO Hit x = 1814.0 y = -25.0 z = -1745.7 detector = DummyHitDetector +ReadData INFO Hit x = 1817.2 y = -30.7 z = -1749.3 detector = DummyHitDetector +ReadData INFO Hit x = 1820.4 y = -36.4 z = -1751.8 detector = DummyHitDetector +ReadData INFO Hit x = 1823.7 y = -42.0 z = -1753.6 detector = DummyHitDetector +ReadData INFO Hit x = 1826.9 y = -47.7 z = -1755.0 detector = DummyHitDetector +ReadData INFO Hit x = 1830.1 y = -53.4 z = -1756.1 detector = DummyHitDetector +EventSelector INFO Disconnecting input sourceID: 64AE69C5-92AE-0947-B00E-80138A37EE89 +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 38853911, key = EventInfoAux. +ReadData INFO CLID = 45903698, key = EventInfo +ReadData INFO CLID = 222376821, key = Stream2 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 1 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 101.2 y = -2.3 z = 126.6 detector = DummyHitDetector +ReadData INFO Hit x = 104.4 y = -8.0 z = -5.2 detector = DummyHitDetector +ReadData INFO Hit x = 107.6 y = -13.7 z = -29.7 detector = DummyHitDetector +ReadData INFO Hit x = 110.8 y = -19.3 z = -40.0 detector = DummyHitDetector +ReadData INFO Hit x = 114.0 y = -25.0 z = -45.7 detector = DummyHitDetector +ReadData INFO Hit x = 117.2 y = -30.7 z = -49.3 detector = DummyHitDetector +ReadData INFO Hit x = 120.4 y = -36.4 z = -51.8 detector = DummyHitDetector +ReadData INFO Hit x = 123.7 y = -42.0 z = -53.6 detector = DummyHitDetector +ReadData INFO Hit x = 126.9 y = -47.7 z = -55.0 detector = DummyHitDetector +ReadData INFO Hit x = 130.1 y = -53.4 z = -56.1 detector = DummyHitDetector +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 38853911, key = EventInfoAux. +ReadData INFO CLID = 45903698, key = EventInfo +ReadData INFO CLID = 222376821, key = Stream2 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 4 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 401.2 y = -2.3 z = -173.3 detector = DummyHitDetector +ReadData INFO Hit x = 404.4 y = -8.0 z = -305.2 detector = DummyHitDetector +ReadData INFO Hit x = 407.6 y = -13.7 z = -329.7 detector = DummyHitDetector +ReadData INFO Hit x = 410.8 y = -19.3 z = -340.0 detector = DummyHitDetector +ReadData INFO Hit x = 414.0 y = -25.0 z = -345.7 detector = DummyHitDetector +ReadData INFO Hit x = 417.2 y = -30.7 z = -349.3 detector = DummyHitDetector +ReadData INFO Hit x = 420.4 y = -36.4 z = -351.8 detector = DummyHitDetector +ReadData INFO Hit x = 423.7 y = -42.0 z = -353.6 detector = DummyHitDetector +ReadData INFO Hit x = 426.9 y = -47.7 z = -355.0 detector = DummyHitDetector +ReadData INFO Hit x = 430.1 y = -53.4 z = -356.1 detector = DummyHitDetector +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 38853911, key = EventInfoAux. +ReadData INFO CLID = 45903698, key = EventInfo +ReadData INFO CLID = 222376821, key = Stream2 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 7 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 701.2 y = -2.3 z = -473.3 detector = DummyHitDetector +ReadData INFO Hit x = 704.4 y = -8.0 z = -605.2 detector = DummyHitDetector +ReadData INFO Hit x = 707.6 y = -13.7 z = -629.7 detector = DummyHitDetector +ReadData INFO Hit x = 710.8 y = -19.3 z = -640.0 detector = DummyHitDetector +ReadData INFO Hit x = 714.0 y = -25.0 z = -645.7 detector = DummyHitDetector +ReadData INFO Hit x = 717.2 y = -30.7 z = -649.3 detector = DummyHitDetector +ReadData INFO Hit x = 720.4 y = -36.4 z = -651.8 detector = DummyHitDetector +ReadData INFO Hit x = 723.7 y = -42.0 z = -653.6 detector = DummyHitDetector +ReadData INFO Hit x = 726.9 y = -47.7 z = -655.0 detector = DummyHitDetector +ReadData INFO Hit x = 730.1 y = -53.4 z = -656.1 detector = DummyHitDetector +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 38853911, key = EventInfoAux. +ReadData INFO CLID = 45903698, key = EventInfo +ReadData INFO CLID = 222376821, key = Stream2 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 10 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 1001.2 y = -2.3 z = -773.3 detector = DummyHitDetector +ReadData INFO Hit x = 1004.4 y = -8.0 z = -905.2 detector = DummyHitDetector +ReadData INFO Hit x = 1007.6 y = -13.7 z = -929.7 detector = DummyHitDetector +ReadData INFO Hit x = 1010.8 y = -19.3 z = -940.0 detector = DummyHitDetector +ReadData INFO Hit x = 1014.0 y = -25.0 z = -945.7 detector = DummyHitDetector +ReadData INFO Hit x = 1017.2 y = -30.7 z = -949.3 detector = DummyHitDetector +ReadData INFO Hit x = 1020.4 y = -36.4 z = -951.8 detector = DummyHitDetector +ReadData INFO Hit x = 1023.7 y = -42.0 z = -953.6 detector = DummyHitDetector +ReadData INFO Hit x = 1026.9 y = -47.7 z = -955.0 detector = DummyHitDetector +ReadData INFO Hit x = 1030.1 y = -53.4 z = -956.1 detector = DummyHitDetector +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 38853911, key = EventInfoAux. +ReadData INFO CLID = 45903698, key = EventInfo +ReadData INFO CLID = 222376821, key = Stream2 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 13 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 1301.2 y = -2.3 z = -1073.3 detector = DummyHitDetector +ReadData INFO Hit x = 1304.4 y = -8.0 z = -1205.2 detector = DummyHitDetector +ReadData INFO Hit x = 1307.6 y = -13.7 z = -1229.7 detector = DummyHitDetector +ReadData INFO Hit x = 1310.8 y = -19.3 z = -1240.0 detector = DummyHitDetector +ReadData INFO Hit x = 1314.0 y = -25.0 z = -1245.7 detector = DummyHitDetector +ReadData INFO Hit x = 1317.2 y = -30.7 z = -1249.3 detector = DummyHitDetector +ReadData INFO Hit x = 1320.4 y = -36.4 z = -1251.8 detector = DummyHitDetector +ReadData INFO Hit x = 1323.7 y = -42.0 z = -1253.6 detector = DummyHitDetector +ReadData INFO Hit x = 1326.9 y = -47.7 z = -1255.0 detector = DummyHitDetector +ReadData INFO Hit x = 1330.1 y = -53.4 z = -1256.1 detector = DummyHitDetector +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 38853911, key = EventInfoAux. +ReadData INFO CLID = 45903698, key = EventInfo +ReadData INFO CLID = 222376821, key = Stream2 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 17 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 1701.2 y = -2.3 z = -1473.3 detector = DummyHitDetector +ReadData INFO Hit x = 1704.4 y = -8.0 z = -1605.2 detector = DummyHitDetector +ReadData INFO Hit x = 1707.6 y = -13.7 z = -1629.7 detector = DummyHitDetector +ReadData INFO Hit x = 1710.8 y = -19.3 z = -1640.0 detector = DummyHitDetector +ReadData INFO Hit x = 1714.0 y = -25.0 z = -1645.7 detector = DummyHitDetector +ReadData INFO Hit x = 1717.2 y = -30.7 z = -1649.3 detector = DummyHitDetector +ReadData INFO Hit x = 1720.4 y = -36.4 z = -1651.8 detector = DummyHitDetector +ReadData INFO Hit x = 1723.7 y = -42.0 z = -1653.6 detector = DummyHitDetector +ReadData INFO Hit x = 1726.9 y = -47.7 z = -1655.0 detector = DummyHitDetector +ReadData INFO Hit x = 1730.1 y = -53.4 z = -1656.1 detector = DummyHitDetector +ReadData INFO EventStreamInfo: Number of events = 7 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 38853911, key = EventInfoAux. +ReadData INFO CLID = 45903698, key = EventInfo +ReadData INFO CLID = 222376821, key = Stream2 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 19 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 1901.2 y = -2.3 z = -1673.3 detector = DummyHitDetector +ReadData INFO Hit x = 1904.4 y = -8.0 z = -1805.2 detector = DummyHitDetector +ReadData INFO Hit x = 1907.6 y = -13.7 z = -1829.7 detector = DummyHitDetector +ReadData INFO Hit x = 1910.8 y = -19.3 z = -1840.0 detector = DummyHitDetector +ReadData INFO Hit x = 1914.0 y = -25.0 z = -1845.7 detector = DummyHitDetector +ReadData INFO Hit x = 1917.2 y = -30.7 z = -1849.3 detector = DummyHitDetector +ReadData INFO Hit x = 1920.4 y = -36.4 z = -1851.8 detector = DummyHitDetector +ReadData INFO Hit x = 1923.7 y = -42.0 z = -1853.6 detector = DummyHitDetector +ReadData INFO Hit x = 1926.9 y = -47.7 z = -1855.0 detector = DummyHitDetector +ReadData INFO Hit x = 1930.1 y = -53.4 z = -1856.1 detector = DummyHitDetector +EventSelector INFO Disconnecting input sourceID: 2C513419-B861-324B-BA1E-7AC5D0466920 +ReadData INFO EventStreamInfo: Number of events = 5 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 38853911, key = EventInfoAux. +ReadData INFO CLID = 45903698, key = EventInfo +ReadData INFO CLID = 222376821, key = Stream3 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 2 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 201.2 y = -2.3 z = 26.6 detector = DummyHitDetector +ReadData INFO Hit x = 204.4 y = -8.0 z = -105.2 detector = DummyHitDetector +ReadData INFO Hit x = 207.6 y = -13.7 z = -129.7 detector = DummyHitDetector +ReadData INFO Hit x = 210.8 y = -19.3 z = -140.0 detector = DummyHitDetector +ReadData INFO Hit x = 214.0 y = -25.0 z = -145.7 detector = DummyHitDetector +ReadData INFO Hit x = 217.2 y = -30.7 z = -149.3 detector = DummyHitDetector +ReadData INFO Hit x = 220.4 y = -36.4 z = -151.8 detector = DummyHitDetector +ReadData INFO Hit x = 223.7 y = -42.0 z = -153.6 detector = DummyHitDetector +ReadData INFO Hit x = 226.9 y = -47.7 z = -155.0 detector = DummyHitDetector +ReadData INFO Hit x = 230.1 y = -53.4 z = -156.1 detector = DummyHitDetector +ReadData INFO EventStreamInfo: Number of events = 5 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 38853911, key = EventInfoAux. +ReadData INFO CLID = 45903698, key = EventInfo +ReadData INFO CLID = 222376821, key = Stream3 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 5 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 501.2 y = -2.3 z = -273.3 detector = DummyHitDetector +ReadData INFO Hit x = 504.4 y = -8.0 z = -405.2 detector = DummyHitDetector +ReadData INFO Hit x = 507.6 y = -13.7 z = -429.7 detector = DummyHitDetector +ReadData INFO Hit x = 510.8 y = -19.3 z = -440.0 detector = DummyHitDetector +ReadData INFO Hit x = 514.0 y = -25.0 z = -445.7 detector = DummyHitDetector +ReadData INFO Hit x = 517.2 y = -30.7 z = -449.3 detector = DummyHitDetector +ReadData INFO Hit x = 520.4 y = -36.4 z = -451.8 detector = DummyHitDetector +ReadData INFO Hit x = 523.7 y = -42.0 z = -453.6 detector = DummyHitDetector +ReadData INFO Hit x = 526.9 y = -47.7 z = -455.0 detector = DummyHitDetector +ReadData INFO Hit x = 530.1 y = -53.4 z = -456.1 detector = DummyHitDetector +ReadData INFO EventStreamInfo: Number of events = 5 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 38853911, key = EventInfoAux. +ReadData INFO CLID = 45903698, key = EventInfo +ReadData INFO CLID = 222376821, key = Stream3 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 8 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 801.2 y = -2.3 z = -573.3 detector = DummyHitDetector +ReadData INFO Hit x = 804.4 y = -8.0 z = -705.2 detector = DummyHitDetector +ReadData INFO Hit x = 807.6 y = -13.7 z = -729.7 detector = DummyHitDetector +ReadData INFO Hit x = 810.8 y = -19.3 z = -740.0 detector = DummyHitDetector +ReadData INFO Hit x = 814.0 y = -25.0 z = -745.7 detector = DummyHitDetector +ReadData INFO Hit x = 817.2 y = -30.7 z = -749.3 detector = DummyHitDetector +ReadData INFO Hit x = 820.4 y = -36.4 z = -751.8 detector = DummyHitDetector +ReadData INFO Hit x = 823.7 y = -42.0 z = -753.6 detector = DummyHitDetector +ReadData INFO Hit x = 826.9 y = -47.7 z = -755.0 detector = DummyHitDetector +ReadData INFO Hit x = 830.1 y = -53.4 z = -756.1 detector = DummyHitDetector +ReadData INFO EventStreamInfo: Number of events = 5 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 38853911, key = EventInfoAux. +ReadData INFO CLID = 45903698, key = EventInfo +ReadData INFO CLID = 222376821, key = Stream3 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 11 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 1101.2 y = -2.3 z = -873.3 detector = DummyHitDetector +ReadData INFO Hit x = 1104.4 y = -8.0 z = -1005.2 detector = DummyHitDetector +ReadData INFO Hit x = 1107.6 y = -13.7 z = -1029.7 detector = DummyHitDetector +ReadData INFO Hit x = 1110.8 y = -19.3 z = -1040.0 detector = DummyHitDetector +ReadData INFO Hit x = 1114.0 y = -25.0 z = -1045.7 detector = DummyHitDetector +ReadData INFO Hit x = 1117.2 y = -30.7 z = -1049.3 detector = DummyHitDetector +ReadData INFO Hit x = 1120.4 y = -36.4 z = -1051.8 detector = DummyHitDetector +ReadData INFO Hit x = 1123.7 y = -42.0 z = -1053.6 detector = DummyHitDetector +ReadData INFO Hit x = 1126.9 y = -47.7 z = -1055.0 detector = DummyHitDetector +ReadData INFO Hit x = 1130.1 y = -53.4 z = -1056.1 detector = DummyHitDetector +ReadData INFO EventStreamInfo: Number of events = 5 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = ExcludeTestTrigMap +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 38853911, key = EventInfoAux. +ReadData INFO CLID = 45903698, key = EventInfo +ReadData INFO CLID = 222376821, key = Stream3 +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 14 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 1401.2 y = -2.3 z = -1173.3 detector = DummyHitDetector +ReadData INFO Hit x = 1404.4 y = -8.0 z = -1305.2 detector = DummyHitDetector +ReadData INFO Hit x = 1407.6 y = -13.7 z = -1329.7 detector = DummyHitDetector +ReadData INFO Hit x = 1410.8 y = -19.3 z = -1340.0 detector = DummyHitDetector +ReadData INFO Hit x = 1414.0 y = -25.0 z = -1345.7 detector = DummyHitDetector +ReadData INFO Hit x = 1417.2 y = -30.7 z = -1349.3 detector = DummyHitDetector +ReadData INFO Hit x = 1420.4 y = -36.4 z = -1351.8 detector = DummyHitDetector +ReadData INFO Hit x = 1423.7 y = -42.0 z = -1353.6 detector = DummyHitDetector +ReadData INFO Hit x = 1426.9 y = -47.7 z = -1355.0 detector = DummyHitDetector +ReadData INFO Hit x = 1430.1 y = -53.4 z = -1356.1 detector = DummyHitDetector +EventSelector INFO Disconnecting input sourceID: 24FE039A-0006-0845-8842-06B43B990690 +ReadData INFO EventStreamInfo: Number of events = 0 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO EventStreamInfo: Number of events = 1 +ReadData INFO EventStreamInfo: ItemList: +ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 1287802, key = MultiTestTrigMap +ReadData INFO CLID = 38853911, key = EventInfoAux. +ReadData INFO CLID = 45903698, key = EventInfo +ReadData INFO CLID = 222376821, key = Others +ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics +ReadData INFO TagInfo: +ReadData INFO EventInfo event: 3 run: 0 +ReadData INFO Get Smart data ptr 1 +ReadData INFO Could not find ExampleTrackContainer/MyTracks +ReadData INFO Hit x = 301.2 y = -2.3 z = -73.3 detector = DummyHitDetector +ReadData INFO Hit x = 304.4 y = -8.0 z = -205.2 detector = DummyHitDetector +ReadData INFO Hit x = 307.6 y = -13.7 z = -229.7 detector = DummyHitDetector +ReadData INFO Hit x = 310.8 y = -19.3 z = -240.0 detector = DummyHitDetector +ReadData INFO Hit x = 314.0 y = -25.0 z = -245.7 detector = DummyHitDetector +ReadData INFO Hit x = 317.2 y = -30.7 z = -249.3 detector = DummyHitDetector +ReadData INFO Hit x = 320.4 y = -36.4 z = -251.8 detector = DummyHitDetector +ReadData INFO Hit x = 323.7 y = -42.0 z = -253.6 detector = DummyHitDetector +ReadData INFO Hit x = 326.9 y = -47.7 z = -255.0 detector = DummyHitDetector +ReadData INFO Hit x = 330.1 y = -53.4 z = -256.1 detector = DummyHitDetector +EventSelector INFO Disconnecting input sourceID: A09FEA71-37EF-3646-B018-297E85D568FE ReadData INFO in finalize() diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/AthenaPoolMultiTestEventNoSplit.ref b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/AthenaPoolMultiTestEventNoSplit.ref index ac90afb7c081731e2b6807d84397fa0328e85019..ebec9ab64dbd9d12114de0795d3767ecc826446b 100644 --- a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/AthenaPoolMultiTestEventNoSplit.ref +++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/AthenaPoolMultiTestEventNoSplit.ref @@ -2,13 +2,13 @@ Py:Athena INFO including file "AthenaPoolMultiTest/ExampleStreamConfi PoolSvc INFO Setting up APR FileCatalog and Streams Splitter1 DEBUG Property update for OutputLevel : new value = 2 Splitter1 INFO in initialize() -Splitter1 DEBUG input handles: 0 +Splitter1 DEBUG input handles: 3 Splitter1 DEBUG output handles: 0 Splitter1 DEBUG Data Deps for Splitter1 Splitter2 INFO in initialize() Splitter3 DEBUG Property update for OutputLevel : new value = 2 Splitter3 INFO in initialize() -Splitter3 DEBUG input handles: 0 +Splitter3 DEBUG input handles: 3 Splitter3 DEBUG output handles: 0 Splitter3 DEBUG Data Deps for Splitter3 Triggered INFO in initialize() @@ -50,7 +50,7 @@ Splitter3 INFO L1 failed Triggered INFO EventInfo event: 0 run: 0 Triggered INFO L1 passed Domain[ROOT_All] INFO AthenaPoolMultiTest_StreamAll.root -RootDatabase.open INFO AthenaPoolMultiTest_StreamAll.root File version:61408 +RootDatabase.open INFO AthenaPoolMultiTest_StreamAll.root File version:61600 Splitter1 DEBUG in execute() Splitter1 INFO EventInfo event: 1 run: 0 Splitter1 DEBUG Trigmask = 2 diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/AthenaPoolMultiTestEventSplit.ref b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/AthenaPoolMultiTestEventSplit.ref index ec05ffbaf9a142851d3f6fe7972fa1898c83026a..eed3760f5f5aa4ba41b4e6b084e1f12e66957201 100644 --- a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/AthenaPoolMultiTestEventSplit.ref +++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/AthenaPoolMultiTestEventSplit.ref @@ -2,13 +2,13 @@ Py:Athena INFO including file "AthenaPoolMultiTest/ExampleStreamConfi PoolSvc INFO Setting up APR FileCatalog and Streams Splitter1 DEBUG Property update for OutputLevel : new value = 2 Splitter1 INFO in initialize() -Splitter1 DEBUG input handles: 0 +Splitter1 DEBUG input handles: 3 Splitter1 DEBUG output handles: 0 Splitter1 DEBUG Data Deps for Splitter1 Splitter2 INFO in initialize() Splitter3 DEBUG Property update for OutputLevel : new value = 2 Splitter3 INFO in initialize() -Splitter3 DEBUG input handles: 0 +Splitter3 DEBUG input handles: 3 Splitter3 DEBUG output handles: 0 Splitter3 DEBUG Data Deps for Splitter3 Triggered INFO in initialize() diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/AthenaPoolMultiTestEventSplitDecision.ref b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/AthenaPoolMultiTestEventSplitDecision.ref new file mode 100644 index 0000000000000000000000000000000000000000..69a5e6b5c1196219e53909cff0b7f49b1aa00d08 --- /dev/null +++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/AthenaPoolMultiTestEventSplitDecision.ref @@ -0,0 +1,232 @@ +Py:Athena INFO including file "AthenaPoolMultiTest/ExampleStreamConfig.py" +PoolSvc INFO Setting up APR FileCatalog and Streams +Splitter1 DEBUG Property update for OutputLevel : new value = 2 +Splitter1 INFO in initialize() +Splitter1 DEBUG input handles: 3 +Splitter1 DEBUG output handles: 0 +Splitter1 DEBUG Data Deps for Splitter1 +Splitter2 INFO in initialize() +Splitter3 DEBUG Property update for OutputLevel : new value = 2 +Splitter3 INFO in initialize() +Splitter3 DEBUG input handles: 3 +Splitter3 DEBUG output handles: 0 +Splitter3 DEBUG Data Deps for Splitter3 +DecisionSvc INFO Inserting stream: Stream1 with no Algs +DecisionSvc INFO Inserting stream: Stream2 with no Algs +DecisionSvc INFO Inserting stream: Stream3 with no Algs +DecisionSvc INFO Inserting stream: StreamAll2 with no Algs +OutputStreamSeq... INFO Initializing OutputStreamSequencerSvc - package version AthenaServices-00-00-00 +StreamAll2.Stre... INFO Initializing StreamAll2.StreamAll2Tool - package version AthenaServices-00-00-00 +StreamAll2.Stre... INFO Initializing StreamAll2.StreamAll2_MakeEventStreamInfo - package version OutputStreamAthenaPool-00-00-00 +StreamAll2 INFO Found HelperTools = PrivateToolHandleArray(['MakeEventStreamInfo/StreamAll2_MakeEventStreamInfo']) +StreamAll2 INFO Data output: AthenaPoolMultiTest_StreamAll2.root +StreamAll2 INFO I/O reinitialization... +Splitter1 DEBUG in execute() +Splitter1 INFO EventInfo event: 0 run: 0 +Splitter1 DEBUG Trigmask = 1 +Splitter1 INFO L1 passed +Splitter2 INFO EventInfo event: 0 run: 0 +Splitter2 INFO L1 failed +Splitter3 DEBUG in execute() +Splitter3 INFO EventInfo event: 0 run: 0 +Splitter3 DEBUG Trigmask = 1 +Splitter3 INFO L1 failed +Domain[ROOT_All] INFO AthenaPoolMultiTest_StreamAll2.root +RootDatabase.open INFO AthenaPoolMultiTest_StreamAll2.root File version:61600 +Splitter1 DEBUG in execute() +Splitter1 INFO EventInfo event: 1 run: 0 +Splitter1 DEBUG Trigmask = 2 +Splitter1 INFO L1 failed +Splitter2 INFO EventInfo event: 1 run: 0 +Splitter2 INFO L1 passed +Splitter3 DEBUG in execute() +Splitter3 INFO EventInfo event: 1 run: 0 +Splitter3 DEBUG Trigmask = 2 +Splitter3 INFO L1 failed +Splitter1 DEBUG in execute() +Splitter1 INFO EventInfo event: 2 run: 0 +Splitter1 DEBUG Trigmask = 4 +Splitter1 INFO L1 failed +Splitter2 INFO EventInfo event: 2 run: 0 +Splitter2 INFO L1 failed +Splitter3 DEBUG in execute() +Splitter3 INFO EventInfo event: 2 run: 0 +Splitter3 DEBUG Trigmask = 4 +Splitter3 INFO L1 passed +Splitter1 DEBUG in execute() +Splitter1 INFO EventInfo event: 3 run: 0 +Splitter1 DEBUG Trigmask = 256 +Splitter1 INFO L1 failed +Splitter2 INFO EventInfo event: 3 run: 0 +Splitter2 INFO L1 failed +Splitter3 DEBUG in execute() +Splitter3 INFO EventInfo event: 3 run: 0 +Splitter3 DEBUG Trigmask = 256 +Splitter3 INFO L1 failed +Splitter1 DEBUG in execute() +Splitter1 INFO EventInfo event: 4 run: 0 +Splitter1 DEBUG Trigmask = 18 +Splitter1 INFO L1 failed +Splitter2 INFO EventInfo event: 4 run: 0 +Splitter2 INFO L1 passed +Splitter3 DEBUG in execute() +Splitter3 INFO EventInfo event: 4 run: 0 +Splitter3 DEBUG Trigmask = 18 +Splitter3 INFO L1 failed +Splitter1 DEBUG in execute() +Splitter1 INFO EventInfo event: 5 run: 0 +Splitter1 DEBUG Trigmask = 36 +Splitter1 INFO L1 failed +Splitter2 INFO EventInfo event: 5 run: 0 +Splitter2 INFO L1 failed +Splitter3 DEBUG in execute() +Splitter3 INFO EventInfo event: 5 run: 0 +Splitter3 DEBUG Trigmask = 36 +Splitter3 INFO L1 passed +Splitter1 DEBUG in execute() +Splitter1 INFO EventInfo event: 6 run: 0 +Splitter1 DEBUG Trigmask = 65 +Splitter1 INFO L1 passed +Splitter2 INFO EventInfo event: 6 run: 0 +Splitter2 INFO L1 failed +Splitter3 DEBUG in execute() +Splitter3 INFO EventInfo event: 6 run: 0 +Splitter3 DEBUG Trigmask = 65 +Splitter3 INFO L1 failed +Splitter1 DEBUG in execute() +Splitter1 INFO EventInfo event: 7 run: 0 +Splitter1 DEBUG Trigmask = 130 +Splitter1 INFO L1 failed +Splitter2 INFO EventInfo event: 7 run: 0 +Splitter2 INFO L1 passed +Splitter3 DEBUG in execute() +Splitter3 INFO EventInfo event: 7 run: 0 +Splitter3 DEBUG Trigmask = 130 +Splitter3 INFO L1 failed +Splitter1 DEBUG in execute() +Splitter1 INFO EventInfo event: 8 run: 0 +Splitter1 DEBUG Trigmask = 260 +Splitter1 INFO L1 failed +Splitter2 INFO EventInfo event: 8 run: 0 +Splitter2 INFO L1 failed +Splitter3 DEBUG in execute() +Splitter3 INFO EventInfo event: 8 run: 0 +Splitter3 DEBUG Trigmask = 260 +Splitter3 INFO L1 passed +Splitter1 DEBUG in execute() +Splitter1 INFO EventInfo event: 9 run: 0 +Splitter1 DEBUG Trigmask = 513 +Splitter1 INFO L1 passed +Splitter2 INFO EventInfo event: 9 run: 0 +Splitter2 INFO L1 failed +Splitter3 DEBUG in execute() +Splitter3 INFO EventInfo event: 9 run: 0 +Splitter3 DEBUG Trigmask = 513 +Splitter3 INFO L1 failed +Splitter1 DEBUG in execute() +Splitter1 INFO EventInfo event: 10 run: 0 +Splitter1 DEBUG Trigmask = 1026 +Splitter1 INFO L1 failed +Splitter2 INFO EventInfo event: 10 run: 0 +Splitter2 INFO L1 passed +Splitter3 DEBUG in execute() +Splitter3 INFO EventInfo event: 10 run: 0 +Splitter3 DEBUG Trigmask = 1026 +Splitter3 INFO L1 failed +Splitter1 DEBUG in execute() +Splitter1 INFO EventInfo event: 11 run: 0 +Splitter1 DEBUG Trigmask = 2052 +Splitter1 INFO L1 failed +Splitter2 INFO EventInfo event: 11 run: 0 +Splitter2 INFO L1 failed +Splitter3 DEBUG in execute() +Splitter3 INFO EventInfo event: 11 run: 0 +Splitter3 DEBUG Trigmask = 2052 +Splitter3 INFO L1 passed +Splitter1 DEBUG in execute() +Splitter1 INFO EventInfo event: 12 run: 0 +Splitter1 DEBUG Trigmask = 4097 +Splitter1 INFO L1 passed +Splitter2 INFO EventInfo event: 12 run: 0 +Splitter2 INFO L1 failed +Splitter3 DEBUG in execute() +Splitter3 INFO EventInfo event: 12 run: 0 +Splitter3 DEBUG Trigmask = 4097 +Splitter3 INFO L1 failed +Splitter1 DEBUG in execute() +Splitter1 INFO EventInfo event: 13 run: 0 +Splitter1 DEBUG Trigmask = 8194 +Splitter1 INFO L1 failed +Splitter2 INFO EventInfo event: 13 run: 0 +Splitter2 INFO L1 passed +Splitter3 DEBUG in execute() +Splitter3 INFO EventInfo event: 13 run: 0 +Splitter3 DEBUG Trigmask = 8194 +Splitter3 INFO L1 failed +Splitter1 DEBUG in execute() +Splitter1 INFO EventInfo event: 14 run: 0 +Splitter1 DEBUG Trigmask = 16388 +Splitter1 INFO L1 failed +Splitter2 INFO EventInfo event: 14 run: 0 +Splitter2 INFO L1 failed +Splitter3 DEBUG in execute() +Splitter3 INFO EventInfo event: 14 run: 0 +Splitter3 DEBUG Trigmask = 16388 +Splitter3 INFO L1 passed +Splitter1 DEBUG in execute() +Splitter1 INFO EventInfo event: 15 run: 0 +Splitter1 DEBUG Trigmask = 32769 +Splitter1 INFO L1 passed +Splitter2 INFO EventInfo event: 15 run: 0 +Splitter2 INFO L1 failed +Splitter3 DEBUG in execute() +Splitter3 INFO EventInfo event: 15 run: 0 +Splitter3 DEBUG Trigmask = 32769 +Splitter3 INFO L1 failed +Splitter1 DEBUG in execute() +Splitter1 INFO EventInfo event: 16 run: 0 +Splitter1 DEBUG Trigmask = 3 +Splitter1 INFO L1 passed +Splitter2 INFO EventInfo event: 16 run: 0 +Splitter2 INFO L1 passed +Splitter3 DEBUG in execute() +Splitter3 INFO EventInfo event: 16 run: 0 +Splitter3 DEBUG Trigmask = 3 +Splitter3 INFO L1 failed +Splitter1 DEBUG in execute() +Splitter1 INFO EventInfo event: 17 run: 0 +Splitter1 DEBUG Trigmask = 6 +Splitter1 INFO L1 failed +Splitter2 INFO EventInfo event: 17 run: 0 +Splitter2 INFO L1 passed +Splitter3 DEBUG in execute() +Splitter3 INFO EventInfo event: 17 run: 0 +Splitter3 DEBUG Trigmask = 6 +Splitter3 INFO L1 passed +Splitter1 DEBUG in execute() +Splitter1 INFO EventInfo event: 18 run: 0 +Splitter1 DEBUG Trigmask = 5 +Splitter1 INFO L1 passed +Splitter2 INFO EventInfo event: 18 run: 0 +Splitter2 INFO L1 failed +Splitter3 DEBUG in execute() +Splitter3 INFO EventInfo event: 18 run: 0 +Splitter3 DEBUG Trigmask = 5 +Splitter3 INFO L1 passed +Splitter1 DEBUG in execute() +Splitter1 INFO EventInfo event: 19 run: 0 +Splitter1 DEBUG Trigmask = 10 +Splitter1 INFO L1 failed +Splitter2 INFO EventInfo event: 19 run: 0 +Splitter2 INFO L1 passed +Splitter3 DEBUG in execute() +Splitter3 INFO EventInfo event: 19 run: 0 +Splitter3 DEBUG Trigmask = 10 +Splitter3 INFO L1 failed +StorageSvc INFO EventStreamInfo_p3 [11DF1B8C-0DEE-4687-80D7-E74B520ACBB4] +StreamAll2 INFO Records written: 21 +Splitter1 INFO in finalize() +Splitter2 INFO in finalize() +Splitter3 INFO in finalize() +ItemListSvc DEBUG STREAM StreamAll2 has (8) items +ItemListSvc DEBUG - EventStreamInfo_StreamAll2 diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/AthenaPoolMultiTestStreamSelect.ref b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/AthenaPoolMultiTestStreamSelect.ref index 57b8875aa69131f5c7eaf633fb3992f26a2ffc7f..a88cd75fffceeee9c16f3f7083041a342629946c 100644 --- a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/AthenaPoolMultiTestStreamSelect.ref +++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/AthenaPoolMultiTestStreamSelect.ref @@ -397,5 +397,5 @@ EventSelector.S... INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> EventSelector.S... DEBUG Found attribute list EventSelector.S... ERROR Stream decision for StreamX does not exist in input EventSelector INFO skipping event 20 -EventSelector INFO Disconnecting input sourceID: 1493FAFB-462F-434F-9DE6-5F15E2EDEC31 +EventSelector INFO Disconnecting input sourceID: EC48B5A6-FBBA-994F-B8BD-88D3E055817A ReadData INFO in finalize() diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/EventSplitDecision_jo.py b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/EventSplitDecision_jo.py new file mode 100755 index 0000000000000000000000000000000000000000..4e0910ba9d50b5eebdec5c5f86e1ce8247009445 --- /dev/null +++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/EventSplitDecision_jo.py @@ -0,0 +1,121 @@ +##################################################################### +# +## @file EventSplitDecision_jo.py +## @brief +## Second part of AthenaPoolMultiTest gmake check +##<br><br> +## @author JackCranshaw (Jack.Cranshaw@cern.ch) +## $Id: EventNoSplit_jo.py,v 1.27 2009-05-20 13:34:21 cranshaw Exp $ +#==================================================================== + +#-------------------------------------------------------------- +# Event related parameters +#-------------------------------------------------------------- +from AthenaCommon.AlgSequence import AthSequencer +topSequence = AthSequencer("AthAlgSeq") +athOutSeq = AthSequencer("AthOutSeq") + +from xAODEventInfoCnv.xAODEventInfoCnvConf import xAODMaker__EventInfoCnvAlg +alg = xAODMaker__EventInfoCnvAlg() +topSequence += alg + + +from AthenaCommon.AppMgr import theApp +theApp.EvtMax = 200000 + +#-------------------------------------------------------------- +# Load POOL support +#-------------------------------------------------------------- +import AthenaPoolCnvSvc.ReadAthenaPool + +from AthenaCommon.AppMgr import ServiceMgr as svcMgr + +# If you need to change or add input file catalogs +from PoolSvc.PoolSvcConf import PoolSvc +svcMgr += PoolSvc() +svcMgr.PoolSvc.ReadCatalog = [ "XMLFileCatalog_file:SplittableData.xml" ] +# Or if you need to change the name of the output file catalog +svcMgr.PoolSvc.WriteCatalog = "XMLFileCatalog_file:EventSplit.xml" + +svcMgr.EventSelector.InputCollections = ["AthenaPoolMultiTest_Splittable0.root"] +svcMgr.AthenaPoolAddressProviderSvc.DataHeaderIterator = False + +#-------------------------------------------------------------- +# Private Application Configuration options +#-------------------------------------------------------------- +# include stream transform +include( "AthenaPoolMultiTest/ExampleStreamConfig.py" ) + +#-------------------------------------------------------------- +# Configure the filters +#-------------------------------------------------------------- +#theApp.TopAlg += [ "ReadData" ] # print out some data to chk its there +from AthenaPoolMultiTest.AthenaPoolMultiTestConf import EventSplit + +Splitter1 = EventSplit("Splitter1") # Accept bit 1 +Splitter1.L1bitmask = 1 +Splitter1.OutputLevel = DEBUG +Splitter2 = EventSplit("Splitter2") # Accept bit 2 +Splitter2.L1bitmask = 2 +Splitter2.OutputLevel = INFO +Splitter3 = EventSplit("Splitter3") # Accept bit 3 +Splitter3.L1bitmask = 4 +Splitter3.OutputLevel = DEBUG + +topSequence+=Splitter1 +topSequence+=Splitter2 +topSequence+=Splitter3 + +#-------------------------------------------------------------- +#--- Set up the streams for the filters +# Note that this uses a cascading exclusive stream model +# for the outstreams and uses inclusive only for the collections. +# Cascading means that the first stream in the list for which an +# event qualifies gets it. Another exclusive model that has been +# explored puts all multistream events in a single overlap stream. +#-------------------------------------------------------------- + +ToolSvc = Service( "ToolSvc" ) + +from AthenaServices.AthenaServicesConf import DecisionAlg + +Stream1 = DecisionAlg( "Stream1" ) +Stream1.AcceptAlgs = ["Splitter1"] +Stream2 = DecisionAlg( "Stream2" ) +Stream2.AcceptAlgs = ["Splitter2"] +Stream2.VetoAlgs = ["Splitter1"] +Stream3 = DecisionAlg( "Stream3" ) +Stream3.AcceptAlgs = ["Splitter3"] +Stream3.VetoAlgs = ["Splitter2"] + +topSequence += Stream1 +topSequence += Stream2 +topSequence += Stream3 + +from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream +# Unfiltered stream +StreamAll = AthenaPoolOutputStream( "StreamAll2", "AthenaPoolMultiTest_StreamAll2.root", False, noTag=False ) +StreamAll.CheckNumberOfWrites = False +StreamAll.WritingTool.AttributeListKey="SimpleTagDecisions" +StreamAll.TakeItemsFromInput = True +StreamAll.ForceRead=TRUE + +# Add the outputstreams to the execution sequence +#athOutSeq+=StreamAll + +#-------------------------------------------------------------- +# Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL) +#-------------------------------------------------------------- +svcMgr.MessageSvc.OutputLevel = INFO +svcMgr.MessageSvc.debugLimit = 5000 +import AthenaCommon.CfgMgr as CfgMgr +if not hasattr(svcMgr, 'DecisionSvc'): svcMgr += CfgMgr.DecisionSvc() +svcMgr.DecisionSvc.CalcStats = True +svcMgr.DecisionSvc.SaveDecisions = True +if not hasattr(svcMgr, 'ItemListSvc'): svcMgr += CfgMgr.ItemListSvc() +svcMgr.ItemListSvc.OutputLevel = DEBUG +#============================================================== +# +# End of job options file +# +############################################################### diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/AddTrigMap.cxx b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/AddTrigMap.cxx index 963ce7ee5fbe25f4504e1ac3662f19df9b87e2d0..ab2ae6d4080d268a44d13d88ac6fb6c04d67072a 100755 --- a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/AddTrigMap.cxx +++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/AddTrigMap.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /** @@ -17,10 +17,7 @@ AddTrigMap::AddTrigMap(const std::string& name, ISvcLocator* pSvcLocator) : - AthAlgorithm(name, pSvcLocator), - m_evt("EventInfo"), - m_wftm("MultiTestTrigMap"), - m_wftm2("ExcludeTestTrigMap") + AthAlgorithm(name, pSvcLocator) {} AddTrigMap::~AddTrigMap() diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/AddTrigMap.h b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/AddTrigMap.h index c8ede031e51f23e4d79d4c730d0e5322ac382c33..65fe68392fe808389471dd3f2bf82dc4c60395a6 100755 --- a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/AddTrigMap.h +++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/AddTrigMap.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // AddTrigMap.h @@ -42,14 +42,17 @@ public: AddTrigMap(const std::string& name, ISvcLocator* pSvcLocator); virtual ~AddTrigMap(); - virtual StatusCode initialize(); - virtual StatusCode execute(); - virtual StatusCode finalize(); + virtual StatusCode initialize() override; + virtual StatusCode execute() override; + virtual StatusCode finalize() override; private: - SG::ReadHandleKey<xAOD::EventInfo> m_evt; - SG::WriteHandleKey<FauxTriggerMap> m_wftm; - SG::WriteHandleKey<FauxTriggerMap> m_wftm2; + SG::ReadHandleKey<xAOD::EventInfo> m_evt + { this, "EventInfo", "EventInfo", "" }; + SG::WriteHandleKey<FauxTriggerMap> m_wftm + { this, "MultiTestTrigMap", "MultiTestTrigMap", "" }; + SG::WriteHandleKey<FauxTriggerMap> m_wftm2 + { this, "ExcludeTestTrigMap", "ExcludeTestTrigMap", "" }; }; #endif diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/DummyLumirangeTool.cxx b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/DummyLumirangeTool.cxx index 91cd3ff46e66e9ae176a8fcad5fde39da8861df9..c28eccf120178fc130de996a00ffef61856feeb7 100755 --- a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/DummyLumirangeTool.cxx +++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/DummyLumirangeTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /** @@ -52,9 +52,9 @@ DummyLumirangeTool::DummyLumirangeTool(const std::string& name, m_firstrun(0), m_rangesize(40), m_blocksperrun(200), - m_lumitot(1000), - m_wcmd(name) + m_lumitot(1000) { + m_wcmd = name; declareProperty("StoreName", m_storeName, "Store to find input metadata during finalize"); declareProperty("Granularity", m_lumigran, "skip size"); declareProperty("FirstRun", m_firstrun, "beginning run number"); diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/DummyLumirangeTool.h b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/DummyLumirangeTool.h index d76695b0b2182e1a1b8f43677bf70afae27a9205..83f641dc1a9a830bbae0da96efe3ad018b599a9b 100755 --- a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/DummyLumirangeTool.h +++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/DummyLumirangeTool.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef ATHENAPOOLMULTITEST_DUMMYLUMIRANGETOOL_H @@ -50,11 +50,11 @@ public: ISvcLocator* pSvcLocator); /// Initialize DummyLumirangeTool - virtual StatusCode initialize(); - virtual StatusCode execute(); + virtual StatusCode initialize() override; + virtual StatusCode execute() override; /// Terminate DummyLumirangeTool - virtual StatusCode finalize(); + virtual StatusCode finalize() override; protected: @@ -64,7 +64,8 @@ protected: IntegerProperty m_rangesize, m_blocksperrun, m_lumitot; private: - SG::WriteHandleKey<CollectionMetadataContainer> m_wcmd; + SG::WriteHandleKey<CollectionMetadataContainer> m_wcmd + { this, "WCmd", "", "" }; }; diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/EventSplit.cxx b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/EventSplit.cxx index a548b3fc0ebc4c144588dd0b8c40431d6d05d30c..ce63682ddc8a0f35c488b45ccaf2e69623dd5b7a 100755 --- a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/EventSplit.cxx +++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/EventSplit.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /** @@ -25,9 +25,7 @@ EventSplit::EventSplit(const std::string& name, ISvcLocator* pSvcLocator) : AthFilterAlgorithm(name, pSvcLocator), m_l1bits(0), - m_l2bits(0), - m_evt("EventInfo"), - m_rftm("MultiTestTrigMap") + m_l2bits(0) { // Declare the properties declareProperty("L1bitmask", m_l1bits); diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/EventSplit.h b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/EventSplit.h index f8c40cd7b4f4011a35061170f1c8085d45393204..faf6f58275fd23b3951e77ca93381d7f481cb159 100755 --- a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/EventSplit.h +++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/EventSplit.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // EventSplit.h @@ -38,14 +38,16 @@ public: EventSplit(const std::string& name, ISvcLocator* pSvcLocator); virtual ~EventSplit(); - virtual StatusCode initialize(); - virtual StatusCode execute(); - virtual StatusCode finalize(); + virtual StatusCode initialize() override; + virtual StatusCode execute() override; + virtual StatusCode finalize() override; private: unsigned int m_l1bits; /// level 1 bit mask unsigned int m_l2bits; /// level 2 bit mask - SG::ReadHandleKey<xAOD::EventInfo> m_evt; - SG::ReadHandleKey<FauxTriggerMap> m_rftm; + SG::ReadHandleKey<xAOD::EventInfo> m_evt + { this, "EventInfo", "EventInfo", "" }; + SG::ReadHandleKey<FauxTriggerMap> m_rftm + { this, "MultiTestTrigMap", "MultiTestTrigMap", "" }; }; #endif diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/EventTagWriter.cxx b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/EventTagWriter.cxx index 154e76db42f4f2f0b285e5d21d9c7796bcd6782e..4f8fc693a139a0de357de6ecb794f7f5400107b2 100755 --- a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/EventTagWriter.cxx +++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/EventTagWriter.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /** @@ -27,7 +27,6 @@ EventTagWriter::EventTagWriter(const std::string& name, ISvcLocator* pSvcLocator) : AthAlgorithm(name, pSvcLocator), - m_evt("EventInfo"), m_attribListSpec(0), m_maxNum(5) { diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/EventTagWriter.h b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/EventTagWriter.h index 47628c812c9c5e34309eef5e1757cfd4acd3a85a..092411d89285b87b5c96e4323fafaa4ba1a99483 100755 --- a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/EventTagWriter.h +++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/EventTagWriter.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef ATHENAPOOLMULTITEST_EVENTTAGWRITER_H @@ -50,22 +50,23 @@ class EventTagWriter : public AthAlgorithm * @brief Defines event tag metadata schema * @return Status of method execution success */ - virtual StatusCode initialize(); + virtual StatusCode initialize() override; /** * @brief Stores dummy event tag metadata in attribute list object * @return Status of method execution success */ - virtual StatusCode execute(); + virtual StatusCode execute() override; /** * @brief Prints confirmation message * @return Status of method execution success */ - virtual StatusCode finalize(); + virtual StatusCode finalize() override; private: - SG::ReadHandleKey<xAOD::EventInfo> m_evt; + SG::ReadHandleKey<xAOD::EventInfo> m_evt + { this, "EventInfo", "EventInfo", "" }; /// Specification of event tag metadata schema coral::AttributeListSpecification* m_attribListSpec; diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/RunEventTagWriter.cxx b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/RunEventTagWriter.cxx index d6ce95284a6cb821e726b1fb66bab0f4b51afe12..ad7600a61dd984d8f23d43092fe32e7879b8a973 100755 --- a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/RunEventTagWriter.cxx +++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/RunEventTagWriter.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /** @@ -25,8 +25,6 @@ RunEventTagWriter::RunEventTagWriter(const std::string& name, ISvcLocator* pSvcLocator) : AthAlgorithm(name, pSvcLocator), - m_evt("EventInfo"), - m_attribList("RunEventTag"), m_attribListSpec(0) {} diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/RunEventTagWriter.h b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/RunEventTagWriter.h index 20e9e51ff3e65926fad5a3ad8391a7e26dedb6e6..36f76214358743175be29f4cc4af616bf5ef407d 100755 --- a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/RunEventTagWriter.h +++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/RunEventTagWriter.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef ATHENAPOOLMULTITEST_RUNEVENTTAGWRITER_H @@ -59,26 +59,28 @@ class RunEventTagWriter : public AthAlgorithm * @brief Defines attribute list specification object * @return Status of method execution success */ - virtual StatusCode initialize(); + virtual StatusCode initialize() override; /** * @brief Stores dummy event tag metadata in attribute list object * @return Status of method execution success */ - virtual StatusCode execute(); + virtual StatusCode execute() override; /** * @brief Prints confirmation message * @return Status of method execution success */ - virtual StatusCode finalize(); + virtual StatusCode finalize() override; private: StatusCode fillTag(const xAOD::EventInfo*, AthenaAttributeList*); - SG::ReadHandleKey<xAOD::EventInfo> m_evt; - SG::WriteHandleKey<AthenaAttributeList> m_attribList; + SG::ReadHandleKey<xAOD::EventInfo> m_evt + { this, "EventInfo", "EventInfo", "" }; + SG::WriteHandleKey<AthenaAttributeList> m_attribList + { this, "RunEventTag", "RunEventTag", "" }; /// Specification of the event tag metadata schema coral::AttributeListSpecification* m_attribListSpec; diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/TagEventTagWriter.cxx b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/TagEventTagWriter.cxx index 0e0e502190b4cbe1a9e3f572c011bb22df3ad571..403e07ada3432733d77d6eb34a37e7624893f737 100755 --- a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/TagEventTagWriter.cxx +++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/TagEventTagWriter.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /** @@ -31,7 +31,6 @@ TagEventTagWriter::TagEventTagWriter(const std::string& name, ISvcLocator* pSvcLocator) : AthAlgorithm(name, pSvcLocator), - m_evt("EventInfo"), m_attribListSpec(0), m_maxNum(5) { diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/TagEventTagWriter.h b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/TagEventTagWriter.h index 2ba35f2e39619b6a096d64d617e48e189fae766a..9f59cade7857a1c4466a8203fb877784f161f0e2 100755 --- a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/TagEventTagWriter.h +++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/src/TagEventTagWriter.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef ATHENAPOOLMULTITEST_TAGEVENTTAGWRITER_H @@ -49,22 +49,23 @@ class TagEventTagWriter : public AthAlgorithm * @brief Defines event tag metadata schema * @return Status of method execution success */ - virtual StatusCode initialize(); + virtual StatusCode initialize() override; /** * @brief Stores dummy event tag metadata in attribute list object * @return Status of method execution success */ - virtual StatusCode execute(); + virtual StatusCode execute() override; /** * @brief Prints confirmation message * @return Status of method execution success */ - virtual StatusCode finalize(); + virtual StatusCode finalize() override; private: - SG::ReadHandleKey<xAOD::EventInfo> m_evt; + SG::ReadHandleKey<xAOD::EventInfo> m_evt + { this, "EventInfo", "EventInfo", "" }; /// Specification of event tag metadata schema AthenaAttributeListSpecification* m_attribListSpec; diff --git a/AtlasTest/DatabaseTest/AthenaPoolTest/CMakeLists.txt b/AtlasTest/DatabaseTest/AthenaPoolTest/CMakeLists.txt index 74c8699ad22c24744a5a884949c767050eaadafe..ad3606cf6f44b4dc4dd064ef207c09d91c88c921 100644 --- a/AtlasTest/DatabaseTest/AthenaPoolTest/CMakeLists.txt +++ b/AtlasTest/DatabaseTest/AthenaPoolTest/CMakeLists.txt @@ -75,7 +75,7 @@ function (athenapooltest_run_test testName jo pattern) @ONLY ) atlas_add_test( ${testName} SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/athenapooltest_${testName}.sh - ENVIRONMENT "ATLAS_REFERENCE_TAG=AthenaPoolTest/AthenaPoolTest-01-00-04" + ENVIRONMENT "ATLAS_REFERENCE_TAG=AthenaPoolTest/AthenaPoolTest-01-00-05" POST_EXEC_SCRIPT "${CMAKE_CURRENT_SOURCE_DIR}/test/post_check_with_select.sh ${testName} ${pattern}" PROPERTIES TIMEOUT 900 ) diff --git a/AtlasTest/TestTools/share/post.sh b/AtlasTest/TestTools/share/post.sh index 66f8ff73048f7fdb6ea060503bbfec44f0706add..71a10cc92ea5a60e7bdd75111b239c210ee59734 100755 --- a/AtlasTest/TestTools/share/post.sh +++ b/AtlasTest/TestTools/share/post.sh @@ -117,6 +117,7 @@ PP="$PP"'|Service factory for type [^ ]+ already declared' PP="$PP"'|Converter for class:[^ ]+ already exists' # Number of configurables read can vary from build to build. PP="$PP"'|INFO Read module info for|confDb modules in' +PP="$PP"'|INFO Read module info for|configurables from' # ignore ApplicationMgr header. PP="$PP"'|^ApplicationMgr *SUCCESS *$' PP="$PP"'|^=+$' @@ -161,6 +162,9 @@ PP="$PP"'|^EventInfoMgtInit: Got release version' PP="$PP"'|^Py:Athena +INFO using release' PP="$PP"'|servers found for host' PP="$PP"'|^(Sun|Mon|Tue|Wed|Thu|Fri|Sat) ' +PP="$PP"'|INFO Database being retired|^Domain.*INFO' +PP="$PP"'|SZ=' +PP="$PP"'|using job opts' # Outputs dependent on whether or not a file catalog already exists. PP="$PP"'|XMLFileCatalog|File is not in Catalog|Failed to open container to check POOL collection|Open DbSession|Access DbDomain|Access DbDatabase|^RootDatabase.open|Deaccess DbDatabase' diff --git a/AtlasTest/TestTools/src/ParallelCallTest.cxx b/AtlasTest/TestTools/src/ParallelCallTest.cxx index b1d27fd9c5b13d21908885b39b1a8b89d6bcffef..0c4af6aba07ece3dd7c5659a731800164fd5aa0a 100644 --- a/AtlasTest/TestTools/src/ParallelCallTest.cxx +++ b/AtlasTest/TestTools/src/ParallelCallTest.cxx @@ -1,9 +1,18 @@ /* -Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include <vector> +// tbb/machine/gcc_generic.h has spurious trailing semicolons after +// the clz() functiosn (as of TBB 2019 U1). +#if defined(__GNUC__) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wpedantic" +#endif #include "tbb/parallel_reduce.h" #include "tbb/blocked_range.h" +#if defined(__GNUC__) +# pragma GCC diagnostic pop +#endif #include "TestTools/ParallelCallTest.h" #include <unistd.h> #include <fcntl.h> diff --git a/AtlasTest/TestTools/src/initGaudi.cxx b/AtlasTest/TestTools/src/initGaudi.cxx index bc58fa6ee8e5600ae084da3b7e9943cbb10ca1d1..630e662261a4057465082c8eda4c2bd35efcb555 100644 --- a/AtlasTest/TestTools/src/initGaudi.cxx +++ b/AtlasTest/TestTools/src/initGaudi.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /*************************************************************************** @@ -33,6 +33,23 @@ namespace Athena_test { string jobOptsPath = jobOptsFile; if (access (jobOptsPath.c_str(), R_OK) != 0) jobOptsPath = "../share/"+jobOptsFile; + if (access (jobOptsPath.c_str(), R_OK) != 0) { + const char* jopath = getenv ("JOBOPTSEARCHPATH"); + if (jopath) { + char* savepath = new char[strlen(jopath)+1]; + strcpy (savepath, jopath); + char* saveptr = nullptr; + char* str = savepath; + while (char* tok = strtok_r (str, ":", &saveptr)) { + str = nullptr; + jobOptsPath = std::string(tok) + "/" + jobOptsFile; + if (access (jobOptsPath.c_str(), R_OK) == 0) { + break; + } + } + delete [] savepath; + } + } bool noJobOpts(jobOptsFile.empty()); if (!noJobOpts) { cout << "\n\nInitializing Gaudi ApplicationMgr using job opts " << jobOptsPath << endl; diff --git a/Calorimeter/CaloCnv/CaloDetMgrDetDescrCnv/CaloDetMgrDetDescrCnv/CaloCellVolumes.h b/Calorimeter/CaloCnv/CaloDetMgrDetDescrCnv/CaloDetMgrDetDescrCnv/CaloCellVolumes.h index 1baa3124e40bfd15c9ef0af3f1aa868069d46604..a21145ebcd4caa8390c6d3662c1d0cf8d6e74c32 100755 --- a/Calorimeter/CaloCnv/CaloDetMgrDetDescrCnv/CaloDetMgrDetDescrCnv/CaloCellVolumes.h +++ b/Calorimeter/CaloCnv/CaloDetMgrDetDescrCnv/CaloDetMgrDetDescrCnv/CaloCellVolumes.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef CALOCELLVOLUMES_H @@ -31,7 +31,8 @@ class CaloCellVolumes public: // Constructors: - CaloCellVolumes(ISvcLocator* svcLocator); + CaloCellVolumes(ISvcLocator* svcLocator, + const CaloCell_ID* calocell_id); virtual ~CaloCellVolumes(); double CellVolume(Identifier cell_id); diff --git a/Calorimeter/CaloCnv/CaloDetMgrDetDescrCnv/src/CaloCellVolumes.cxx b/Calorimeter/CaloCnv/CaloDetMgrDetDescrCnv/src/CaloCellVolumes.cxx index bf72afb45c06d5f8a02a8483f162d8bcd5a4a6af..e0ae16125cdc3f62642b78bbb6902a934ac9a2ad 100755 --- a/Calorimeter/CaloCnv/CaloDetMgrDetDescrCnv/src/CaloCellVolumes.cxx +++ b/Calorimeter/CaloCnv/CaloDetMgrDetDescrCnv/src/CaloCellVolumes.cxx @@ -1,11 +1,10 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "CaloDetMgrDetDescrCnv/CaloCellVolumes.h" #include "Identifier/Identifier.h" -#include "CaloIdentifier/CaloIdManager.h" #include "CaloIdentifier/CaloCell_ID.h" #include "GaudiKernel/ISvcLocator.h" @@ -30,17 +29,16 @@ struct CaloCellVolume_Compare }; -CaloCellVolumes::CaloCellVolumes(ISvcLocator* svcLocator): - m_svcLocator(svcLocator) +CaloCellVolumes::CaloCellVolumes(ISvcLocator* svcLocator, + const CaloCell_ID* calocell_id) + : m_calocell_id (calocell_id), + m_svcLocator(svcLocator) { // default values for tube spacings m_fcalTubeSpacings[1] = 7.5; m_fcalTubeSpacings[2] = 8.179; m_fcalTubeSpacings[3] = 9.; - // Get Id Helper - m_calocell_id = CaloIdManager::instance()->getCaloCell_ID(); - //Get pointers to the IGeoModelSvc and IRDBAccessSvc IGeoModelSvc* geoModelSvc = 0; IRDBAccessSvc* rdbAccessSvc = 0; diff --git a/Calorimeter/CaloCnv/CaloDetMgrDetDescrCnv/src/CaloMgrDetDescrCnv.cxx b/Calorimeter/CaloCnv/CaloDetMgrDetDescrCnv/src/CaloMgrDetDescrCnv.cxx index d556ce6f2e1c70a8d94a559991eab7d30ce2d2c1..3687f86f0ec1cee8428c59ad8c6a4432fb595611 100755 --- a/Calorimeter/CaloCnv/CaloDetMgrDetDescrCnv/src/CaloMgrDetDescrCnv.cxx +++ b/Calorimeter/CaloCnv/CaloDetMgrDetDescrCnv/src/CaloMgrDetDescrCnv.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "CaloDetMgrDetDescrCnv/CaloMgrDetDescrCnv.h" @@ -134,7 +134,7 @@ StatusCode CaloMgrDetDescrCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pOb // --- --- Create CaloDetDescrManager object --- --- // Cell volumes - CaloCellVolumes cellVol (serviceLocator()); + CaloCellVolumes cellVol (serviceLocator(), cell_id); // geometry layout caloMgr->set_lar_geometry(cellVol.layout()); diff --git a/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/BadLArRetriever.h b/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/BadLArRetriever.h index 66e9a46fc55155c23430356f74fef9cddf2a04fa..d2b37ef42b1c511043d3ffccf1458177e15241b8 100644 --- a/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/BadLArRetriever.h +++ b/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/BadLArRetriever.h @@ -19,7 +19,6 @@ class IToolSvc; -class CaloIdManager; class Identifier; class CaloCellContainer; @@ -64,7 +63,6 @@ namespace JiveXML{ ///The data type that is generated by this retriever const std::string m_typeName; - const CaloIdManager* m_calo_id_man; const CaloCell_ID* m_calocell_id; SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey{this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"}; diff --git a/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/BadTileRetriever.h b/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/BadTileRetriever.h index 84e8273c18a3e9ab316b0d885c8135086467b0be..0ed4ad4476e96932f77035c1dc7c9753b1400a64 100644 --- a/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/BadTileRetriever.h +++ b/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/BadTileRetriever.h @@ -18,7 +18,6 @@ class IToolSvc; -class CaloIdManager; class Identifier; class CaloCellContainer; @@ -63,7 +62,6 @@ namespace JiveXML{ const std::string m_typeName; void calcTILELayerSub(Identifier&); - const CaloIdManager* m_calo_id_man; const CaloCell_ID* m_calocell_id; std::string m_sgKey; diff --git a/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/CaloFCalRetriever.h b/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/CaloFCalRetriever.h index 62fe4e698fb23db7823fa2b5bbc9c5994bdb4375..f84a02d3136afa09a0c16a7d39b576f2b478941d 100644 --- a/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/CaloFCalRetriever.h +++ b/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/CaloFCalRetriever.h @@ -19,7 +19,6 @@ class IToolSvc; -class CaloIdManager; class Identifier; class CaloCellContainer; @@ -68,7 +67,6 @@ namespace JiveXML{ ///The data type that is generated by this retriever const std::string m_typeName; - const CaloIdManager* m_calo_id_man; const CaloCell_ID* m_calocell_id; SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey{this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"}; diff --git a/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/CaloHECRetriever.h b/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/CaloHECRetriever.h index d06633e4995fe2638c4f2f842a9fe66937783d57..e2e7fdf32c7e067b5059c6d4f877db484386699b 100644 --- a/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/CaloHECRetriever.h +++ b/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/CaloHECRetriever.h @@ -19,7 +19,6 @@ class IToolSvc; -class CaloIdManager; class Identifier; class CaloCellContainer; @@ -68,7 +67,6 @@ namespace JiveXML{ ///The data type that is generated by this retriever const std::string m_typeName; - const CaloIdManager* m_calo_id_man; const CaloCell_ID* m_calocell_id; SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey{this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"}; diff --git a/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/CaloLArRetriever.h b/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/CaloLArRetriever.h index cc7157d011d850942ae7d7c3f536118ccc755a43..0b584dd0cdc8c858fe67ad58bb8fb77bedeb5c9b 100644 --- a/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/CaloLArRetriever.h +++ b/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/CaloLArRetriever.h @@ -19,7 +19,6 @@ class IToolSvc; -class CaloIdManager; class Identifier; class CaloCellContainer; @@ -68,7 +67,6 @@ namespace JiveXML{ ///The data type that is generated by this retriever const std::string m_typeName; - const CaloIdManager* m_calo_id_man; const CaloCell_ID* m_calocell_id; SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey{this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"}; diff --git a/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/CaloTileRetriever.h b/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/CaloTileRetriever.h index 17aa9a9e89adecce65acf85633a56a4b611689fd..5506bd8ddb72bc7f92b9ba9452450a0a6e7a0b1e 100644 --- a/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/CaloTileRetriever.h +++ b/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/CaloTileRetriever.h @@ -22,7 +22,6 @@ class IToolSvc; -class CaloIdManager; class Identifier; class CaloCellContainer; @@ -78,7 +77,6 @@ namespace JiveXML{ "TileBadChanTool", "TileBadChanTool", "Tile bad channel tool"}; void calcTILELayerSub(Identifier&); - const CaloIdManager* m_calo_id_man; const CaloCell_ID* m_calocell_id; std::string m_sgKey; diff --git a/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/LArDigitRetriever.h b/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/LArDigitRetriever.h index 69a7c5b9c86f1d7d105f5b82de58d40f5b216ca2..2f49b5f89585b22de9183388c7a46ca0b5b88e94 100644 --- a/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/LArDigitRetriever.h +++ b/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/LArDigitRetriever.h @@ -19,7 +19,6 @@ class IToolSvc; -class CaloIdManager; class Identifier; class CaloCellContainer; @@ -77,7 +76,6 @@ namespace JiveXML{ std::string m_sgKeyLArDigit[2]; SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey{this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"}; - const CaloIdManager* m_calo_id_man; const CaloCell_ID* m_calocell_id; bool m_lar; diff --git a/Calorimeter/CaloCnv/CaloJiveXML/src/BadLArRetriever.cxx b/Calorimeter/CaloCnv/CaloJiveXML/src/BadLArRetriever.cxx index a07815054c089c2e930805e8ef31058e84cd5e45..728dc4b6087cf760951de5d608a0db826c28106b 100644 --- a/Calorimeter/CaloCnv/CaloJiveXML/src/BadLArRetriever.cxx +++ b/Calorimeter/CaloCnv/CaloJiveXML/src/BadLArRetriever.cxx @@ -9,7 +9,6 @@ #include "EventContainers/SelectAllObject.h" #include "CaloEvent/CaloCellContainer.h" -#include "CaloIdentifier/CaloIdManager.h" #include "CaloDetDescr/CaloDetDescrElement.h" #include "LArElecCalib/ILArPedestal.h" #include "LArElecCalib/ILArADC2MeVTool.h" @@ -31,14 +30,13 @@ namespace JiveXML { **/ BadLArRetriever::BadLArRetriever(const std::string& type,const std::string& name,const IInterface* parent): AthAlgTool(type,name,parent), - m_typeName("BadLAr") + m_typeName("BadLAr"), + m_calocell_id(nullptr) { //Only declare the interface declareInterface<IDataRetriever>(this); - - m_calo_id_man = CaloIdManager::instance(); - m_calocell_id = m_calo_id_man->getCaloCell_ID(); + m_sgKey = "AllCalo"; declareInterface<IDataRetriever>(this); @@ -57,7 +55,8 @@ namespace JiveXML { StatusCode BadLArRetriever::initialize() { - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Initialising Tool" << endmsg; + ATH_MSG_DEBUG( "Initialising Tool" ); + ATH_CHECK( detStore()->retrieve (m_calocell_id, "CaloCell_ID") ); ATH_CHECK( m_cablingKey.initialize() ); @@ -69,22 +68,19 @@ namespace JiveXML { */ StatusCode BadLArRetriever::retrieve(ToolHandle<IFormatTool> &FormatTool) { - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "in retrieve()" << endmsg; + ATH_MSG_DEBUG( "in retrieve()" ); const CaloCellContainer* cellContainer; if ( !evtStore()->retrieve(cellContainer,m_sgKey)) { - if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "Could not retrieve Calorimeter Cells " << endmsg; + ATH_MSG_WARNING( "Could not retrieve Calorimeter Cells " ); return StatusCode::FAILURE; } if(m_lar){ DataMap data = getBadLArData(cellContainer); - if ( FormatTool->AddToEvent(dataTypeName(), m_sgKey, &data).isFailure()){ - return StatusCode::FAILURE; - } else { - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Bad cell retrieved" << endmsg; - } + ATH_CHECK( FormatTool->AddToEvent(dataTypeName(), m_sgKey, &data) ); + ATH_MSG_DEBUG( "Bad cell retrieved" ); } //LAr cells retrieved okay return StatusCode::SUCCESS; @@ -97,7 +93,7 @@ namespace JiveXML { */ const DataMap BadLArRetriever::getBadLArData(const CaloCellContainer* cellContainer) { - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "getBadLArData()" << endmsg; + ATH_MSG_DEBUG( "getBadLArData()" ); DataMap DataMap; @@ -118,16 +114,16 @@ namespace JiveXML { SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl{m_cablingKey}; const LArOnOffIdMapping* cabling{*cablingHdl}; - const LArOnlineID* onlineId; + const LArOnlineID* onlineId = nullptr; if ( detStore()->retrieve(onlineId, "LArOnlineID").isFailure()) { - if (msgLvl(MSG::ERROR)) msg(MSG::ERROR) << "in getBadLArData(),Could not get LArOnlineID!" << endmsg; + ATH_MSG_ERROR( "in getBadLArData(),Could not get LArOnlineID!" ); } if (m_doBadLAr && cabling) { double energyGeV; - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Start iterator loop over cells" << endmsg; + ATH_MSG_DEBUG( "Start iterator loop over cells" ); for(;it1!=it2;it1++){ @@ -163,10 +159,8 @@ namespace JiveXML { DataMap["feedThrough"] = feedThrough; DataMap["slot"] = slot; //Be verbose - if (msgLvl(MSG::DEBUG)) { - msg(MSG::DEBUG) << dataTypeName() << " , collection: " << dataTypeName(); - msg(MSG::DEBUG) << " retrieved with " << phi.size() << " entries"<< endmsg; - } + ATH_MSG_DEBUG( dataTypeName() << " , collection: " << dataTypeName() + << " retrieved with " << phi.size() << " entries" ); //All collections retrieved okay return DataMap; diff --git a/Calorimeter/CaloCnv/CaloJiveXML/src/BadTileRetriever.cxx b/Calorimeter/CaloCnv/CaloJiveXML/src/BadTileRetriever.cxx index fac3afa68323083e050a3a433bb4e94db8bc0bbb..500224dd4fd18f24631a9b76b0a4003854ca70fa 100644 --- a/Calorimeter/CaloCnv/CaloJiveXML/src/BadTileRetriever.cxx +++ b/Calorimeter/CaloCnv/CaloJiveXML/src/BadTileRetriever.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "CaloJiveXML/BadTileRetriever.h" @@ -9,7 +9,6 @@ #include "EventContainers/SelectAllObject.h" #include "CaloEvent/CaloCellContainer.h" -#include "CaloIdentifier/CaloIdManager.h" #include "CaloIdentifier/CaloCell_ID.h" #include "CaloDetDescr/CaloDetDescrElement.h" #include "TileEvent/TileCell.h" @@ -38,13 +37,13 @@ namespace JiveXML { **/ BadTileRetriever::BadTileRetriever(const std::string& type,const std::string& name,const IInterface* parent): AthAlgTool(type,name,parent), - m_typeName("BadTILE"){ + m_typeName("BadTILE"), + m_calocell_id(nullptr) + { //Only declare the interface declareInterface<IDataRetriever>(this); - m_calo_id_man = CaloIdManager::instance(); - m_calocell_id = m_calo_id_man->getCaloCell_ID(); m_sgKey = "AllCalo"; declareProperty("StoreGateKey" , m_sgKey); @@ -61,7 +60,8 @@ namespace JiveXML { StatusCode BadTileRetriever::initialize() { - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Initialising Tool" << endmsg; + ATH_MSG_DEBUG( "Initialising Tool" ); + ATH_CHECK( detStore()->retrieve (m_calocell_id, "CaloCell_ID") ); return StatusCode::SUCCESS; } @@ -71,24 +71,19 @@ namespace JiveXML { */ StatusCode BadTileRetriever::retrieve(ToolHandle<IFormatTool> &FormatTool) { - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "in retrieve()" << endmsg; + ATH_MSG_DEBUG( "in retrieve()" ); const CaloCellContainer* cellContainer = nullptr; if (!evtStore()->retrieve(cellContainer,m_sgKey)) { - if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << - "Could not retrieve Calorimeter Cells for Tile " << endmsg; + ATH_MSG_WARNING( "Could not retrieve Calorimeter Cells for Tile " ); // return StatusCode::SUCCESS; } if(m_tile){ DataMap data = getBadTileData(cellContainer); - if ( FormatTool->AddToEvent(dataTypeName(), m_sgKey, &data).isFailure()){ - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Error reading Tile data" << endmsg; -// return StatusCode::SUCCESS; - } else { - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Tile retrieved" << endmsg; - } + ATH_CHECK( FormatTool->AddToEvent(dataTypeName(), m_sgKey, &data) ); + ATH_MSG_DEBUG( "Tile retrieved" ); } //Tile cells retrieved okay return StatusCode::SUCCESS; @@ -101,7 +96,7 @@ namespace JiveXML { */ const DataMap BadTileRetriever::getBadTileData(const CaloCellContainer* cellContainer) { - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "getBadTileData()" << endmsg; + ATH_MSG_DEBUG( "getBadTileData()" ); char rndStr[30]; DataMap DataMap; @@ -112,7 +107,6 @@ namespace JiveXML { // m_sub; m_sub.reserve(cellContainer->size()); m_sub.clear(); -// msg(MSG::INFO) << "Size of CellC = " << cellContainer->size() << endmsg; //Loop Over CaloCellContainer to retrieve TileCell information @@ -124,7 +118,7 @@ namespace JiveXML { double energyGeV; //int cellInd; - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Start iterator loop over cells" << endmsg; + ATH_MSG_DEBUG( "Start iterator loop over cells" ); for(;it1!=it2;it1++){ @@ -154,9 +148,7 @@ namespace JiveXML { DataMap["energy"] = energyVec; //Be verbose - if (msgLvl(MSG::DEBUG)) { - msg(MSG::DEBUG) << dataTypeName() << " retrieved with " << phi.size() << " entries"<< endmsg; - } + ATH_MSG_DEBUG( dataTypeName() << " retrieved with " << phi.size() << " entries" ); //All collections retrieved okay return DataMap; diff --git a/Calorimeter/CaloCnv/CaloJiveXML/src/CaloClusterRetriever.cxx b/Calorimeter/CaloCnv/CaloJiveXML/src/CaloClusterRetriever.cxx index 9e29cfb5a6d4110cda8f6b5ce8a0649114816db2..67c661158b3f9cc879347d6b5a409206b805be00 100755 --- a/Calorimeter/CaloCnv/CaloJiveXML/src/CaloClusterRetriever.cxx +++ b/Calorimeter/CaloCnv/CaloJiveXML/src/CaloClusterRetriever.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "CaloJiveXML/CaloClusterRetriever.h" @@ -41,30 +41,29 @@ namespace JiveXML { */ StatusCode CaloClusterRetriever::retrieve(ToolHandle<IFormatTool> &FormatTool) { - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "in retrieveAll()" << endmsg; + ATH_MSG_DEBUG( "in retrieveAll()" ); const DataHandle<CaloClusterContainer> iterator, end; const CaloClusterContainer* ccc; //obtain the default collection first - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Trying to retrieve " << dataTypeName() << " (" << m_sgKeyFavourite << ")" << endmsg; + ATH_MSG_DEBUG( "Trying to retrieve " << dataTypeName() << " (" << m_sgKeyFavourite << ")" ); if ( evtStore()->retrieve(ccc, m_sgKeyFavourite).isFailure() ) { - if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "Favourite Collection " << m_sgKeyFavourite << " not found in SG " << endmsg; + ATH_MSG_WARNING( "Favourite Collection " << m_sgKeyFavourite << " not found in SG " ); }else{ DataMap data = getData(ccc); if ( FormatTool->AddToEvent(dataTypeName(), m_sgKeyFavourite+"_ESD", &data).isFailure()){ - if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "Favourite Collection " << m_sgKeyFavourite << " not found in SG " << endmsg; + ATH_MSG_WARNING( "Favourite Collection " << m_sgKeyFavourite << " not found in SG " ); }else{ - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << dataTypeName() << " (" << m_sgKeyFavourite << ") CaloCluster retrieved" << endmsg; + ATH_MSG_DEBUG( dataTypeName() << " (" << m_sgKeyFavourite << ") CaloCluster retrieved" ); } } if ( m_otherKeys.empty() ) { //obtain all other collections from StoreGate if (( evtStore()->retrieve(iterator, end)).isFailure()){ - if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << - "Unable to retrieve iterator for CaloCluster collection" << endmsg; + ATH_MSG_WARNING( "Unable to retrieve iterator for CaloCluster collection" ); // return false; } @@ -73,16 +72,14 @@ namespace JiveXML { std::string::size_type position = iterator.key().find("HLTAutoKey",0); if ( m_doWriteHLT ){ position = 99; } // override SG key find -// if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << " CaloCluster: HLTAutoKey in " << iterator.key() << " at position " -// << position << endmsg; if ( position != 0 ){ // SG key doesn't contain HLTAutoKey if (iterator.key()!=m_sgKeyFavourite) { - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Trying to retrieve all " << dataTypeName() << " (" << iterator.key() << ")" << endmsg; + ATH_MSG_DEBUG( "Trying to retrieve all " << dataTypeName() << " (" << iterator.key() << ")" ); DataMap data = getData(iterator); if ( FormatTool->AddToEvent(dataTypeName(), iterator.key()+"_ESD", &data).isFailure()){ - if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "Collection " << iterator.key() << " not found in SG " << endmsg; + ATH_MSG_WARNING( "Collection " << iterator.key() << " not found in SG " ); }else{ - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << dataTypeName() << " (" << iterator.key() << ") CaloCluster retrieved" << endmsg; + ATH_MSG_DEBUG( dataTypeName() << " (" << iterator.key() << ") CaloCluster retrieved" ); } } } @@ -93,12 +90,12 @@ namespace JiveXML { for ( keyIter=m_otherKeys.begin(); keyIter!=m_otherKeys.end(); ++keyIter ){ if ( evtStore()->contains<CaloClusterContainer>(*keyIter) ){ // to avoid some SG dumps if ( !evtStore()->retrieve( ccc, (*keyIter) ).isFailure()) { - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Trying to retrieve selected " << dataTypeName() << " (" << (*keyIter) << ")" << endmsg; + ATH_MSG_DEBUG( "Trying to retrieve selected " << dataTypeName() << " (" << (*keyIter) << ")" ); DataMap data = getData(ccc); if ( FormatTool->AddToEvent(dataTypeName(), (*keyIter)+"_ESD", &data).isFailure()){ - if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "Collection " << (*keyIter) << " not found in SG " << endmsg; + ATH_MSG_WARNING( "Collection " << (*keyIter) << " not found in SG " ); }else{ - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << dataTypeName() << " (" << (*keyIter) << ") retrieved" << endmsg; + ATH_MSG_DEBUG( dataTypeName() << " (" << (*keyIter) << ") retrieved" ); } } } @@ -117,7 +114,7 @@ namespace JiveXML { */ const DataMap CaloClusterRetriever::getData(const CaloClusterContainer* ccc) { - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "getData()" << endmsg; + ATH_MSG_DEBUG( "getData()" ); DataMap DataMap; @@ -170,10 +167,8 @@ namespace JiveXML { DataMap["id"] = idVec; //Be verbose - if (msgLvl(MSG::DEBUG)) { - msg(MSG::DEBUG) << dataTypeName() << " , collection: " << dataTypeName(); - msg(MSG::DEBUG) << " retrieved with " << phi.size() << " entries"<< endmsg; - } + ATH_MSG_DEBUG( dataTypeName() << " , collection: " << dataTypeName() + << " retrieved with " << phi.size() << " entries" ); //All collections retrieved okay return DataMap; diff --git a/Calorimeter/CaloCnv/CaloJiveXML/src/CaloFCalRetriever.cxx b/Calorimeter/CaloCnv/CaloJiveXML/src/CaloFCalRetriever.cxx index feaacd0c3b055b3d280929a99e4be5c7d0061c1a..46c91572dc8428484f5e55ab2d872446e2b43a86 100644 --- a/Calorimeter/CaloCnv/CaloJiveXML/src/CaloFCalRetriever.cxx +++ b/Calorimeter/CaloCnv/CaloJiveXML/src/CaloFCalRetriever.cxx @@ -9,7 +9,6 @@ #include "EventContainers/SelectAllObject.h" #include "CaloEvent/CaloCellContainer.h" -#include "CaloIdentifier/CaloIdManager.h" #include "CaloDetDescr/CaloDetDescrElement.h" #include "LArElecCalib/ILArPedestal.h" #include "LArElecCalib/ILArADC2MeVTool.h" @@ -31,14 +30,13 @@ namespace JiveXML { **/ CaloFCalRetriever::CaloFCalRetriever(const std::string& type,const std::string& name,const IInterface* parent): AthAlgTool(type,name,parent), - m_typeName("FCAL") + m_typeName("FCAL"), + m_calocell_id(nullptr) { //Only declare the interface declareInterface<IDataRetriever>(this); - m_calo_id_man = CaloIdManager::instance(); - m_calocell_id = m_calo_id_man->getCaloCell_ID(); m_sgKey = "AllCalo"; declareInterface<IDataRetriever>(this); @@ -61,7 +59,8 @@ namespace JiveXML { StatusCode CaloFCalRetriever::initialize() { - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Initialising Tool" << endmsg; + ATH_MSG_DEBUG( "Initialising Tool" ); + ATH_CHECK( detStore()->retrieve (m_calocell_id, "CaloCell_ID") ); ATH_CHECK( m_cablingKey.initialize() ); @@ -73,22 +72,19 @@ namespace JiveXML { */ StatusCode CaloFCalRetriever::retrieve(ToolHandle<IFormatTool> &FormatTool) { - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "in retrieve()" << endmsg; + ATH_MSG_DEBUG( "in retrieve()" ); const CaloCellContainer* cellContainer; if ( !evtStore()->retrieve(cellContainer,m_sgKey)) { - if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "Could not retrieve Calorimeter Cells " << endmsg; + ATH_MSG_WARNING( "Could not retrieve Calorimeter Cells " ); return StatusCode::FAILURE; } if(m_fcal){ DataMap data = getFCalData(cellContainer); - if ( FormatTool->AddToEvent(dataTypeName(), m_sgKey, &data).isFailure()){ - return StatusCode::FAILURE; - } else { - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "FCal retrieved" << endmsg; - } + ATH_CHECK( FormatTool->AddToEvent(dataTypeName(), m_sgKey, &data) ); + ATH_MSG_DEBUG( "FCal retrieved" ); } //FCal cells retrieved okay return StatusCode::SUCCESS; @@ -101,7 +97,7 @@ namespace JiveXML { */ const DataMap CaloFCalRetriever::getFCalData(const CaloCellContainer* cellContainer) { - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "getFCalData()" << endmsg; + ATH_MSG_DEBUG( "getFCalData()" ); DataMap DataMap; @@ -139,20 +135,20 @@ namespace JiveXML { const ILArPedestal* larPedestal = nullptr; if(m_doFCalCellDetails){ if( detStore()->retrieve(larPedestal).isFailure() ){ - if (msgLvl(MSG::ERROR)) msg(MSG::ERROR) << "in getFCalData(), Could not retrieve LAr Pedestal" << endmsg; + ATH_MSG_ERROR( "in getFCalData(), Could not retrieve LAr Pedestal" ); } } const LArOnlineID* onlineId; if ( detStore()->retrieve(onlineId, "LArOnlineID").isFailure()) { - if (msgLvl(MSG::ERROR)) msg(MSG::ERROR) << "in getFCalData(),Could not get LArOnlineID!" << endmsg; + ATH_MSG_ERROR( "in getFCalData(),Could not get LArOnlineID!" ); } IAlgTool* algtool; ILArADC2MeVTool* adc2mevTool=0; if(m_doFCalCellDetails){ if( toolSvc()->retrieveTool("LArADC2MeVTool", algtool).isFailure()){ - if (msgLvl(MSG::ERROR)) msg(MSG::ERROR) << "in getFCalData(), Could not retrieve LAr ADC2MeV Tool" <<endmsg; + ATH_MSG_ERROR( "in getFCalData(), Could not retrieve LAr ADC2MeV Tool" ); } else { adc2mevTool=dynamic_cast<ILArADC2MeVTool*>(algtool); } @@ -216,8 +212,7 @@ namespace JiveXML { else{ adc2Mev.push_back(DataType((*polynom_adc2mev)[1])); } }else{ adc2Mev.push_back(DataType(-1)); // write placeholder - if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) - << "LArADC2MeVTool dynamic cast failed" << endmsg; + ATH_MSG_WARNING( "LArADC2MeVTool dynamic cast failed" ); } } @@ -234,7 +229,7 @@ namespace JiveXML { sub.push_back(DataType(0)); } - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << " Total energy in FCAL (LAr) in GeV : " << energyAllLArFcal << endmsg; + ATH_MSG_DEBUG( " Total energy in FCAL (LAr) in GeV : " << energyAllLArFcal ); // write values into DataMap DataMap["x"] = x; @@ -259,9 +254,7 @@ namespace JiveXML { DataMap["adc2Mev"] = adc2Mev; } //Be verbose - if (msgLvl(MSG::DEBUG)) { - msg(MSG::DEBUG) << dataTypeName() << " retrieved with " << x.size() << " entries"<< endmsg; - } + ATH_MSG_DEBUG( dataTypeName() << " retrieved with " << x.size() << " entries" ); //All collections retrieved okay return DataMap; diff --git a/Calorimeter/CaloCnv/CaloJiveXML/src/CaloHECRetriever.cxx b/Calorimeter/CaloCnv/CaloJiveXML/src/CaloHECRetriever.cxx index 1b783e66fd2dc1a46d7b54dfccec23fdb55bd0b6..3a778abc13b4c9ba059a749ff5951e9decaa6959 100644 --- a/Calorimeter/CaloCnv/CaloJiveXML/src/CaloHECRetriever.cxx +++ b/Calorimeter/CaloCnv/CaloJiveXML/src/CaloHECRetriever.cxx @@ -9,7 +9,6 @@ #include "EventContainers/SelectAllObject.h" #include "CaloEvent/CaloCellContainer.h" -#include "CaloIdentifier/CaloIdManager.h" #include "CaloDetDescr/CaloDetDescrElement.h" #include "LArElecCalib/ILArPedestal.h" #include "LArElecCalib/ILArADC2MeVTool.h" @@ -31,14 +30,13 @@ namespace JiveXML { **/ CaloHECRetriever::CaloHECRetriever(const std::string& type,const std::string& name,const IInterface* parent): AthAlgTool(type,name,parent), - m_typeName("HEC") + m_typeName("HEC"), + m_calocell_id(nullptr) { //Only declare the interface declareInterface<IDataRetriever>(this); - m_calo_id_man = CaloIdManager::instance(); - m_calocell_id = m_calo_id_man->getCaloCell_ID(); m_sgKey = "AllCalo"; declareInterface<IDataRetriever>(this); @@ -61,7 +59,8 @@ namespace JiveXML { StatusCode CaloHECRetriever::initialize() { - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Initialising Tool" << endmsg; + ATH_MSG_DEBUG( "Initialising Tool" ); + ATH_CHECK( detStore()->retrieve (m_calocell_id, "CaloCell_ID") ); ATH_CHECK( m_cablingKey.initialize() ); @@ -73,22 +72,19 @@ namespace JiveXML { */ StatusCode CaloHECRetriever::retrieve(ToolHandle<IFormatTool> &FormatTool) { - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "in retrieve()" << endmsg; + ATH_MSG_DEBUG( "in retrieve()" ); const CaloCellContainer* cellContainer; if ( !evtStore()->retrieve(cellContainer,m_sgKey)) { - if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "Could not retrieve Calorimeter Cells " << endmsg; + ATH_MSG_WARNING( "Could not retrieve Calorimeter Cells " ); return StatusCode::FAILURE; } if(m_hec){ DataMap data = getHECData(cellContainer); - if ( FormatTool->AddToEvent(dataTypeName(), m_sgKey, &data).isFailure()){ - return StatusCode::FAILURE; - } else { - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "HEC retrieved" << endmsg; - } + ATH_CHECK( FormatTool->AddToEvent(dataTypeName(), m_sgKey, &data) ); + ATH_MSG_DEBUG( "HEC retrieved" ); } //HEC cells retrieved okay return StatusCode::SUCCESS; @@ -101,7 +97,7 @@ namespace JiveXML { */ const DataMap CaloHECRetriever::getHECData(const CaloCellContainer* cellContainer) { - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "getHECData()" << endmsg; + ATH_MSG_DEBUG( "getHECData()" ); DataMap DataMap; @@ -134,21 +130,21 @@ namespace JiveXML { const ILArPedestal* larPedestal = nullptr; if(m_doHECCellDetails){ - if( detStore()->retrieve(larPedestal).isFailure() ){ - if (msgLvl(MSG::ERROR)) msg(MSG::ERROR) << "in getHECData(), Could not retrieve LAr Pedestal" << endmsg; - } + if( detStore()->retrieve(larPedestal).isFailure() ){ + ATH_MSG_ERROR( "in getHECData(), Could not retrieve LAr Pedestal" ); } + } const LArOnlineID* onlineId = nullptr; if ( detStore()->retrieve(onlineId, "LArOnlineID").isFailure()) { - if (msgLvl(MSG::ERROR)) msg(MSG::ERROR) << "in getHECData(),Could not get LArOnlineID!" << endmsg; - } + ATH_MSG_ERROR( "in getHECData(),Could not get LArOnlineID!" ); + } IAlgTool* algtool; ILArADC2MeVTool* adc2mevTool=0; if(m_doHECCellDetails){ if( toolSvc()->retrieveTool("LArADC2MeVTool", algtool).isFailure()){ - if (msgLvl(MSG::ERROR)) msg(MSG::ERROR) << "in getHECData(), Could not retrieve LAr ADC2MeV Tool" <<endmsg; + ATH_MSG_ERROR( "in getHECData(), Could not retrieve LAr ADC2MeV Tool" ); } else { adc2mevTool=dynamic_cast<ILArADC2MeVTool*>(algtool); } @@ -213,7 +209,7 @@ namespace JiveXML { } } - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << " Total energy in HEC (LAr) in GeV : " << energyAllLArHEC << endmsg; + ATH_MSG_DEBUG( " Total energy in HEC (LAr) in GeV : " << energyAllLArHEC ); // write values into DataMap DataMap["phi"] = phi; @@ -235,10 +231,9 @@ namespace JiveXML { DataMap["adc2Mev"] = adc2Mev; } //Be verbose - if (msgLvl(MSG::DEBUG)) { - msg(MSG::DEBUG) << dataTypeName() << " , collection: " << dataTypeName(); - msg(MSG::DEBUG) << " retrieved with " << phi.size() << " entries"<< endmsg; - } + ATH_MSG_DEBUG( dataTypeName() << " , collection: " << dataTypeName() + << " retrieved with " << phi.size() << " entries" ); + //All collections retrieved okay return DataMap; diff --git a/Calorimeter/CaloCnv/CaloJiveXML/src/CaloLArRetriever.cxx b/Calorimeter/CaloCnv/CaloJiveXML/src/CaloLArRetriever.cxx index 0691e794f085f7e36a47894311c3608f105484b2..e7ac5110578d25b534fd4423e3a9e80af81589b1 100644 --- a/Calorimeter/CaloCnv/CaloJiveXML/src/CaloLArRetriever.cxx +++ b/Calorimeter/CaloCnv/CaloJiveXML/src/CaloLArRetriever.cxx @@ -9,7 +9,6 @@ #include "EventContainers/SelectAllObject.h" #include "CaloEvent/CaloCellContainer.h" -#include "CaloIdentifier/CaloIdManager.h" #include "CaloDetDescr/CaloDetDescrElement.h" #include "LArElecCalib/ILArPedestal.h" #include "LArElecCalib/ILArADC2MeVTool.h" @@ -31,14 +30,13 @@ namespace JiveXML { **/ CaloLArRetriever::CaloLArRetriever(const std::string& type,const std::string& name,const IInterface* parent): AthAlgTool(type,name,parent), - m_typeName("LAr") + m_typeName("LAr"), + m_calocell_id(nullptr) { //Only declare the interface declareInterface<IDataRetriever>(this); - m_calo_id_man = CaloIdManager::instance(); - m_calocell_id = m_calo_id_man->getCaloCell_ID(); m_sgKey = "AllCalo"; declareInterface<IDataRetriever>(this); @@ -61,7 +59,8 @@ namespace JiveXML { StatusCode CaloLArRetriever::initialize() { - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Initialising Tool" << endmsg; + ATH_MSG_DEBUG( "Initialising Tool" ); + ATH_CHECK( detStore()->retrieve (m_calocell_id, "CaloCell_ID") ); ATH_CHECK( m_cablingKey.initialize() ); @@ -73,22 +72,19 @@ namespace JiveXML { */ StatusCode CaloLArRetriever::retrieve(ToolHandle<IFormatTool> &FormatTool) { - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "in retrieve()" << endmsg; + ATH_MSG_DEBUG( "in retrieve()" ); const CaloCellContainer* cellContainer; if ( !evtStore()->retrieve(cellContainer,m_sgKey)) { - if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "Could not retrieve Calorimeter Cells " << endmsg; + ATH_MSG_WARNING( "Could not retrieve Calorimeter Cells " ); return StatusCode::FAILURE; } if(m_lar){ DataMap data = getLArData(cellContainer); - if ( FormatTool->AddToEvent(dataTypeName(), m_sgKey, &data).isFailure()){ - return StatusCode::FAILURE; - } else { - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "LAr retrieved" << endmsg; - } + ATH_CHECK( FormatTool->AddToEvent(dataTypeName(), m_sgKey, &data) ); + ATH_MSG_DEBUG( "LAr retrieved" ); } //LAr cells retrieved okay return StatusCode::SUCCESS; @@ -101,7 +97,7 @@ namespace JiveXML { */ const DataMap CaloLArRetriever::getLArData(const CaloCellContainer* cellContainer) { - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "getLArData()" << endmsg; + ATH_MSG_DEBUG( "getLArData()" ); DataMap DataMap; @@ -127,21 +123,21 @@ namespace JiveXML { const ILArPedestal* larPedestal = nullptr; if(m_doLArCellDetails){ - if( detStore()->retrieve(larPedestal).isFailure() ){ - if (msgLvl(MSG::ERROR)) msg(MSG::ERROR) << "in getLArData(), Could not retrieve LAr Pedestal" << endmsg; - } + if( detStore()->retrieve(larPedestal).isFailure() ){ + ATH_MSG_ERROR( "in getLArData(), Could not retrieve LAr Pedestal" ); } + } const LArOnlineID* onlineId = nullptr; if ( detStore()->retrieve(onlineId, "LArOnlineID").isFailure()) { - if (msgLvl(MSG::ERROR)) msg(MSG::ERROR) << "in getLArData(),Could not get LArOnlineID!" << endmsg; - } - + ATH_MSG_ERROR( "in getLArData(),Could not get LArOnlineID!" ); + } + IAlgTool* algtool; ILArADC2MeVTool* adc2mevTool=0; if(m_doLArCellDetails){ if( toolSvc()->retrieveTool("LArADC2MeVTool", algtool).isFailure()){ - if (msgLvl(MSG::ERROR)) msg(MSG::ERROR) << "in getLArData(), Could not retrieve LAr ADC2MeV Tool" <<endmsg; + ATH_MSG_ERROR( "in getLArData(), Could not retrieve LAr ADC2MeV Tool" ); } else { adc2mevTool=dynamic_cast<ILArADC2MeVTool*>(algtool); } @@ -150,7 +146,7 @@ namespace JiveXML { double energyGeV,cellTime; double energyAllLArBarrel = 0.; - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Start iterator loop over cells" << endmsg; + ATH_MSG_DEBUG( "Start iterator loop over cells" ); SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl{m_cablingKey}; const LArOnOffIdMapping* cabling{*cablingHdl}; @@ -194,9 +190,6 @@ namespace JiveXML { feedThrough.push_back(DataType(onlineId->feedthrough(LArhwid))); slot.push_back(DataType(onlineId->slot(LArhwid))); - //if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Cell with ID " << (Identifier::value_type)(*it1)->ID().get_compact() << - // " retrieved" << endmsg; - if ( m_doLArCellDetails){ cellTime = (*it1)->time(); cellTimeVec.push_back(DataType( gcvt( cellTime, m_cellTimePrec, rndStr) ) ); @@ -219,7 +212,7 @@ namespace JiveXML { } } - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << " Total energy in LAr barrel in GeV : " << energyAllLArBarrel << endmsg; + ATH_MSG_DEBUG( " Total energy in LAr barrel in GeV : " << energyAllLArBarrel ); // write values into DataMap DataMap["phi"] = phi; @@ -243,10 +236,8 @@ namespace JiveXML { DataMap["adc2Mev"] = adc2Mev; } //Be verbose - if (msgLvl(MSG::DEBUG)) { - msg(MSG::DEBUG) << dataTypeName() << " , collection: " << dataTypeName(); - msg(MSG::DEBUG) << " retrieved with " << phi.size() << " entries"<< endmsg; - } + ATH_MSG_DEBUG( dataTypeName() << " , collection: " << dataTypeName() + << " retrieved with " << phi.size() << " entries" ); //All collections retrieved okay return DataMap; diff --git a/Calorimeter/CaloCnv/CaloJiveXML/src/CaloMBTSRetriever.cxx b/Calorimeter/CaloCnv/CaloJiveXML/src/CaloMBTSRetriever.cxx index efe067e3733cc6ee976ffdc41f876648c8da8cf7..10625ad22ccab7fac4b22b6d343feb7dbd9e4b23 100644 --- a/Calorimeter/CaloCnv/CaloJiveXML/src/CaloMBTSRetriever.cxx +++ b/Calorimeter/CaloCnv/CaloJiveXML/src/CaloMBTSRetriever.cxx @@ -9,7 +9,6 @@ #include "EventContainers/SelectAllObject.h" #include "CaloEvent/CaloCellContainer.h" -#include "CaloIdentifier/CaloIdManager.h" #include "CaloDetDescr/CaloDetDescrElement.h" #include "TileEvent/TileCell.h" #include "TileEvent/TileRawChannelContainer.h" @@ -72,22 +71,19 @@ namespace JiveXML { */ StatusCode CaloMBTSRetriever::retrieve(ToolHandle<IFormatTool> &FormatTool) { - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "in retrieve()" << endmsg; + ATH_MSG_DEBUG( "in retrieve()" ); const TileCellContainer* cellContainerMBTS; if ( !evtStore()->retrieve(cellContainerMBTS,m_sgKeyMBTS)) { - if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "Could not retrieve Calorimeter Cells " << endmsg; + ATH_MSG_WARNING( "Could not retrieve Calorimeter Cells " ); return StatusCode::FAILURE; } if (m_mbts) { DataMap data = getMBTSData(cellContainerMBTS); - if ( FormatTool->AddToEvent(dataTypeName(), m_sgKeyMBTS, &data).isFailure()) { - return StatusCode::FAILURE; - } else { - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "MBTS retrieved" << endmsg; - } + ATH_CHECK( FormatTool->AddToEvent(dataTypeName(), m_sgKeyMBTS, &data) ); + ATH_MSG_DEBUG( "MBTS retrieved" ); } //MBTS cells retrieved okay return StatusCode::SUCCESS; @@ -100,7 +96,7 @@ namespace JiveXML { */ const DataMap CaloMBTSRetriever::getMBTSData(const TileCellContainer* tileMBTSCellContainer) { - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "getMBTSData()" << endmsg; + ATH_MSG_DEBUG( "getMBTSData()" ); DataMap DataMap; @@ -124,23 +120,24 @@ namespace JiveXML { StatusCode scTileRawChannel = StatusCode::FAILURE; const TileDigitsContainer *tileDigits = nullptr; const TileRawChannelContainer* RawChannelCnt = nullptr; - const TileHWID* tileHWID; - const TileInfo* tileInfo; + const TileHWID* tileHWID = nullptr; + const TileInfo* tileInfo = nullptr; const TileCablingService* cabling=nullptr; TileRawChannelUnit::UNIT RChUnit = TileRawChannelUnit::ADCcounts; //!< Unit for TileRawChannels (ADC, pCb, etc.) cabling = TileCablingService::getInstance(); bool offlineRch = false; - if ( detStore()->retrieve(m_tileTBID).isFailure() ) - if (msgLvl(MSG::ERROR)) msg(MSG::ERROR)<< "in getMBTSData(), Could not retrieve m_tileTBID" <<endmsg; - - if ( detStore()->retrieve(tileHWID).isFailure() ) - if (msgLvl(MSG::ERROR)) msg(MSG::ERROR)<< "in getMBTSData(), Could not retrieve TileHWID" <<endmsg; + if ( detStore()->retrieve(m_tileTBID).isFailure() ) { + ATH_MSG_ERROR( "in getMBTSData(), Could not retrieve m_tileTBID" ); + } - //=== get TileInfo - if ( detStore()->retrieve(tileInfo, "TileInfo").isFailure() ) - if (msgLvl(MSG::ERROR)) msg(MSG::ERROR) << "in getMBTSData(), Could not retrieve TileInfo"<< endmsg; + if ( detStore()->retrieve(tileHWID).isFailure() ) { + ATH_MSG_ERROR( "in getMBTSData(), Could not retrieve TileHWID" ); + } + if ( detStore()->retrieve(tileInfo, "TileInfo").isFailure() ) { + ATH_MSG_ERROR( "in getMBTSData(), Could not retrieve TileInfo" ); + } std::string RchName[7] = {"TileRawChannelOpt2","TileRawChannelOpt","TileRawChannelFixed", "TileRawChannelFitCool","TileRawChannelFit", @@ -159,7 +156,7 @@ namespace JiveXML { } if (scTileRawChannel.isFailure()) - if (msgLvl(MSG::WARNING)) msg(MSG::WARNING)<< "in getMBTSData(), Could not retrieve TileRawchannel" << endmsg; + ATH_MSG_WARNING( "in getMBTSData(), Could not retrieve TileRawchannel" ); std::string DigiName[2] = {"TileDigitsCnt","TileDigitsFlt"}; int icntd=2; @@ -171,7 +168,7 @@ namespace JiveXML { } if (scTileDigit.isFailure()) { - if (msgLvl(MSG::WARNING)) msg(MSG::WARNING)<< "in getMBTSData(), Could not retrieve TileDigits" << endmsg; + ATH_MSG_WARNING( "in getMBTSData(), Could not retrieve TileDigits" ); } // from: TileCalorimeter/TileRec/src/TileCellToNtuple.cxx @@ -319,10 +316,6 @@ namespace JiveXML { cellRawAmplitude.push_back(DataType( theMbtsrawamp[id.get_identifier32().get_compact()] )); myCellRawTimeStr = DataType(theMbtsrawtime[id.get_identifier32().get_compact()]).toString(); - //if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << " Capture nan for cellRawTime: " - // << theMbtsrawtime[id.get_identifier32().get_compact()] - // << " " << myCellRawTimeStr << " " << myCellRawTimeStr.find("n") << endmsg; - if ( myCellRawTimeStr.find("n") == 1 ) myCellRawTimeStr="0."; cellRawTime.push_back( myCellRawTimeStr ); @@ -382,8 +375,8 @@ namespace JiveXML { } - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "MBTS no: " << nchan << ", type_chan_mod: " << MBTS_ID - << ", energy MeV pC: " << energyMeV << endmsg; + ATH_MSG_DEBUG( "MBTS no: " << nchan << ", type_chan_mod: " << MBTS_ID + << ", energy MeV pC: " << energyMeV ); nchan++; @@ -412,9 +405,7 @@ namespace JiveXML { DataMap[adcCountsStr] = adcCounts; //Be verbose - if (msgLvl(MSG::DEBUG)) { - msg(MSG::DEBUG) << dataTypeName() << " retrieved with " << phi.size() << " entries"<< endmsg; - } + ATH_MSG_DEBUG( dataTypeName() << " retrieved with " << phi.size() << " entries" ); //All collections retrieved okay return DataMap; diff --git a/Calorimeter/CaloCnv/CaloJiveXML/src/CaloTileRetriever.cxx b/Calorimeter/CaloCnv/CaloJiveXML/src/CaloTileRetriever.cxx index 92662bb334665278bcbab5b5754cd5d320ecf483..9817bf1c4148d241e13e353345aa39eb45003138 100644 --- a/Calorimeter/CaloCnv/CaloJiveXML/src/CaloTileRetriever.cxx +++ b/Calorimeter/CaloCnv/CaloJiveXML/src/CaloTileRetriever.cxx @@ -9,7 +9,6 @@ #include "EventContainers/SelectAllObject.h" #include "CaloEvent/CaloCellContainer.h" -#include "CaloIdentifier/CaloIdManager.h" #include "CaloIdentifier/CaloCell_ID.h" #include "CaloDetDescr/CaloDetDescrElement.h" #include "TileEvent/TileCell.h" @@ -36,13 +35,13 @@ namespace JiveXML { **/ CaloTileRetriever::CaloTileRetriever(const std::string& type,const std::string& name,const IInterface* parent): AthAlgTool(type,name,parent), - m_typeName("TileDigit") { + m_typeName("TileDigit"), + m_calocell_id(nullptr) + { //Only declare the interface declareInterface<IDataRetriever>(this); - m_calo_id_man = CaloIdManager::instance(); - m_calocell_id = m_calo_id_man->getCaloCell_ID(); m_sgKey = "AllCalo"; declareProperty("StoreGateKey" , m_sgKey); @@ -62,6 +61,7 @@ namespace JiveXML { StatusCode CaloTileRetriever::initialize() { ATH_MSG_DEBUG( "Initialising Tool" ); + ATH_CHECK( detStore()->retrieve (m_calocell_id, "CaloCell_ID") ); //=== get TileCondToolTiming ATH_CHECK( m_tileToolTiming.retrieve() ); @@ -80,23 +80,18 @@ namespace JiveXML { */ StatusCode CaloTileRetriever::retrieve(ToolHandle<IFormatTool> &FormatTool) { - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "in retrieve()" << endmsg; + ATH_MSG_DEBUG( "in retrieve()" ); const CaloCellContainer* cellContainer; if (!evtStore()->retrieve(cellContainer,m_sgKey)) { - if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << - "Could not retrieve Calorimeter Cells for Tile " << endmsg; + ATH_MSG_WARNING( "Could not retrieve Calorimeter Cells for Tile " ); return StatusCode::SUCCESS; } if (m_tile) { DataMap data = getCaloTileData(cellContainer); - if ( FormatTool->AddToEvent("TILE", m_sgKey, &data).isFailure()) { - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Error reading Tile data" << endmsg; - return StatusCode::SUCCESS; - } else { - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Tile retrieved" << endmsg; - } + ATH_CHECK( FormatTool->AddToEvent("TILE", m_sgKey, &data) ); + ATH_MSG_DEBUG( "Tile retrieved" ); } //Tile cells retrieved okay return StatusCode::SUCCESS; @@ -109,7 +104,7 @@ namespace JiveXML { */ const DataMap CaloTileRetriever::getCaloTileData(const CaloCellContainer* cellContainer) { - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "getTileData()" << endmsg; + ATH_MSG_DEBUG( "getTileData()" ); char rndStr[30]; DataMap DataMap; @@ -143,16 +138,15 @@ namespace JiveXML { // m_sub; m_sub.reserve(cellContainer->size()); m_sub.clear(); -// msg(MSG::INFO) << "Size of CellC = " << cellContainer->size() << endmsg; std::string adcCounts1Str = "adcCounts1 multiple=\"0\""; std::string adcCounts2Str = "adcCounts2 multiple=\"0\""; StatusCode scTileDigit = StatusCode::FAILURE; StatusCode scTileRawChannel = StatusCode::FAILURE; - const TileID* tileID; - const TileHWID* tileHWID; - const TileInfo* tileInfo; + const TileID* tileID = nullptr; + const TileHWID* tileHWID = nullptr; + const TileInfo* tileInfo = nullptr; const TileCablingService* cabling=nullptr; const TileDigitsContainer *tileDigits = nullptr; const TileRawChannelContainer* RawChannelCnt; @@ -178,19 +172,18 @@ namespace JiveXML { //===== retrieving everything which is needed for Tile - StatusCode sc = detStore()->retrieve(tileID); - if ( sc.isFailure() ) - if (msgLvl(MSG::ERROR)) msg(MSG::ERROR) << "in getCaloTileData(), Could not retrieve TileID" <<endmsg; + if (detStore()->retrieve(tileID).isFailure()) { + ATH_MSG_ERROR( "in getCaloTileData(), Could not retrieve TileID" ); - sc = detStore()->retrieve(tileHWID); - if ( sc.isFailure() ) - if (msgLvl(MSG::ERROR)) msg(MSG::ERROR) << "in getCaloTileData(), Could not retrieve TileHWID" <<endmsg; + } - //=== get TileInfo - sc = detStore()->retrieve(tileInfo, "TileInfo"); - if (sc.isFailure()) - if (msgLvl(MSG::ERROR)) msg(MSG::ERROR) << "in getCaloTileData(), Could not retrieve TileInfo"<< endmsg; + if (detStore()->retrieve(tileHWID).isFailure()) { + ATH_MSG_ERROR( "in getCaloTileData(), Could not retrieve TileHWID" ); + } + if (detStore()->retrieve(tileInfo, "TileInfo").isFailure()) { + ATH_MSG_ERROR( "in getCaloTileData(), Could not retrieve TileInfo" ); + } if (m_doTileDigit) { @@ -204,7 +197,7 @@ namespace JiveXML { } if (scTileDigit.isFailure()) - if (msgLvl(MSG::ERROR)) msg(MSG::ERROR) << "in getTileData(), Could not retrieve TileDigits" << endmsg; + ATH_MSG_ERROR( "in getTileData(), Could not retrieve TileDigits" ); } @@ -227,7 +220,7 @@ namespace JiveXML { } if (scTileRawChannel.isFailure()) - if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "in getTileData(), Could not retrieve TileRawchannel" << endmsg; + ATH_MSG_WARNING( "in getTileData(), Could not retrieve TileRawchannel" ); } @@ -516,7 +509,7 @@ namespace JiveXML { } //if (m_doTileCellDetails) } // end cell iterator - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << " Total energy in Tile in GeV : " << energyAllTile<< endmsg; + ATH_MSG_DEBUG( " Total energy in Tile in GeV : " << energyAllTile ); if ( !pmt1digit.empty() ) pmt1digit.clear(); if ( !pmt2digit.empty() ) pmt2digit.clear(); @@ -562,9 +555,7 @@ namespace JiveXML { DataMap[adcCounts2Str] = adcCounts2Vec; //Be verbose - if (msgLvl(MSG::DEBUG)) { - msg(MSG::DEBUG) << dataTypeName() << " retrieved with " << phi.size() << " entries"<< endmsg; - } + ATH_MSG_DEBUG( dataTypeName() << " retrieved with " << phi.size() << " entries" ); //All collections retrieved okay return DataMap; diff --git a/Calorimeter/CaloCnv/CaloJiveXML/src/LArDigitRetriever.cxx b/Calorimeter/CaloCnv/CaloJiveXML/src/LArDigitRetriever.cxx index 5dcaf68e7c1a1064360d21475874da464f2364ae..96f13624db5448e365876659b7202bc7798b5b8c 100644 --- a/Calorimeter/CaloCnv/CaloJiveXML/src/LArDigitRetriever.cxx +++ b/Calorimeter/CaloCnv/CaloJiveXML/src/LArDigitRetriever.cxx @@ -9,7 +9,6 @@ #include "EventContainers/SelectAllObject.h" #include "CaloEvent/CaloCellContainer.h" -#include "CaloIdentifier/CaloIdManager.h" #include "CaloDetDescr/CaloDetDescrElement.h" #include "LArElecCalib/ILArPedestal.h" #include "LArElecCalib/ILArADC2MeVTool.h" @@ -32,14 +31,13 @@ namespace JiveXML { **/ LArDigitRetriever::LArDigitRetriever(const std::string& type,const std::string& name,const IInterface* parent): AthAlgTool(type,name,parent), - m_typeName("LArDigit") + m_typeName("LArDigit"), + m_calocell_id(nullptr) { //Only declare the interface declareInterface<IDataRetriever>(this); - m_calo_id_man = CaloIdManager::instance(); - m_calocell_id = m_calo_id_man->getCaloCell_ID(); m_sgKey = "AllCalo"; m_sgKeyLArDigit[0] = "FREE"; // can also be: "HIGH" (for raw data) m_sgKeyLArDigit[1] = "LArDigitContainer_Thinned"; // used for DPD/ESD @@ -70,7 +68,8 @@ namespace JiveXML { StatusCode LArDigitRetriever::initialize() { - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Initialising Tool" << endmsg; + ATH_MSG_DEBUG( "Initialising Tool" ); + ATH_CHECK( detStore()->retrieve (m_calocell_id, "CaloCell_ID") ); ATH_CHECK( m_cablingKey.initialize() ); @@ -82,7 +81,7 @@ namespace JiveXML { */ StatusCode LArDigitRetriever::retrieve(ToolHandle<IFormatTool> &FormatTool) { - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "in retrieve()" << endmsg; + ATH_MSG_DEBUG( "in retrieve()" ); if (m_doLArDigit || m_doHECDigit || m_doFCalDigit){ m_doDigit = true; @@ -91,39 +90,26 @@ namespace JiveXML { const CaloCellContainer* cellContainer = nullptr; if (!evtStore()->retrieve(cellContainer,m_sgKey)) { - if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << - "Could not retrieve Calorimeter Cells" << endmsg; + ATH_MSG_WARNING( "Could not retrieve Calorimeter Cells" ); // return StatusCode::SUCCESS; } if(m_fcal){ DataMap data = getLArDigitData(cellContainer,"FCAL",CaloCell_ID::LARFCAL); - if ( FormatTool->AddToEvent("FCAL", m_sgKey, &data).isFailure()){ - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Error reading FCAL data" << endmsg; -// return StatusCode::SUCCESS; - } else { - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "FCAL retrieved" << endmsg; - } + ATH_CHECK( FormatTool->AddToEvent("FCAL", m_sgKey, &data) ); + ATH_MSG_DEBUG( "FCAL retrieved" ); } if(m_lar){ DataMap data = getLArDigitData(cellContainer,"LAr",CaloCell_ID::LAREM); - if ( FormatTool->AddToEvent("LAr", m_sgKey, &data).isFailure()){ - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Error reading LAr data" << endmsg; -// return StatusCode::SUCCESS; - } else { - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "LAr retrieved" << endmsg; - } + ATH_CHECK( FormatTool->AddToEvent("LAr", m_sgKey, &data) ); + ATH_MSG_DEBUG( "LAr retrieved" ); } if(m_hec){ DataMap data = getLArDigitData(cellContainer,"HEC",CaloCell_ID::LARHEC); - if ( FormatTool->AddToEvent("HEC", m_sgKey, &data).isFailure()){ - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Error reading HEC data" << endmsg; -// return StatusCode::SUCCESS; - } else { - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "HEC retrieved" << endmsg; - } + ATH_CHECK( FormatTool->AddToEvent("HEC", m_sgKey, &data) ); + ATH_MSG_DEBUG( "HEC retrieved" ); } //Tile cells retrieved okay @@ -141,7 +127,7 @@ namespace JiveXML { { //be verbose - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "getLArDigitData()" << endmsg; + ATH_MSG_DEBUG( "getLArDigitData()" ); char rndStr[30]; DataMap DataMap; @@ -180,25 +166,25 @@ namespace JiveXML { } if (scLArDigit.isFailure()){ - if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "Could not retrieve LArDigits" << endmsg; + ATH_MSG_WARNING( "Could not retrieve LArDigits" ); } - const ILArPedestal* larPedestal; + const ILArPedestal* larPedestal = nullptr; if ( detStore()->retrieve(larPedestal).isFailure()){ - if (msgLvl(MSG::ERROR)) msg(MSG::ERROR) << "in getLArDigitData(), Could not retrieve LAr Pedestal" << endmsg; + ATH_MSG_ERROR( "in getLArDigitData(), Could not retrieve LAr Pedestal" ); } - const LArOnlineID* onlineId; + const LArOnlineID* onlineId = nullptr; if ( detStore()->retrieve(onlineId, "LArOnlineID").isFailure()) { - if (msgLvl(MSG::ERROR)) msg(MSG::ERROR) << "in getLArDigitData(),Could not get LArOnlineID!" << endmsg; + ATH_MSG_ERROR( "in getLArDigitData(),Could not get LArOnlineID!" ); } - IAlgTool* algtool; + IAlgTool* algtool = nullptr; ILArADC2MeVTool* adc2mevTool=0; if ( toolSvc()->retrieveTool("LArADC2MeVTool", algtool).isFailure()){ - if (msgLvl(MSG::ERROR)) msg(MSG::ERROR) << "in getLArDigitData(), Could not retrieve LAr ADC2MeV Tool" <<endmsg; + ATH_MSG_ERROR( "in getLArDigitData(), Could not retrieve LAr ADC2MeV Tool" ); } else { adc2mevTool=dynamic_cast<ILArADC2MeVTool*>(algtool); } @@ -253,7 +239,7 @@ namespace JiveXML { if ( adc2mevTool ){ polynom_adc2mev = &(adc2mevTool->ADC2MEV(LArId,largain)); }else{ - if (msgLvl(MSG::ERROR)) msg(MSG::ERROR) << "in getLArDigitData(), Could not access LAr ADC2MeV Tool" <<endmsg; + ATH_MSG_ERROR( "in getLArDigitData(), Could not access LAr ADC2MeV Tool" ); } if ( Index >= 0 ){ // can be -1 @@ -501,9 +487,7 @@ namespace JiveXML { DataMap[LArSampleIndexStr] = LArSampleIndexVec; // adcCounts //Be verbose - if (msgLvl(MSG::DEBUG)) { - msg(MSG::DEBUG) << dataTypeName() << " retrieved with " << phi.size() << " entries"<< endmsg; - } + ATH_MSG_DEBUG( dataTypeName() << " retrieved with " << phi.size() << " entries" ); //All collections retrieved okay return DataMap; diff --git a/Calorimeter/CaloCnv/CaloTPCnv/test/CaloCompactCellTool_test.cxx b/Calorimeter/CaloCnv/CaloTPCnv/test/CaloCompactCellTool_test.cxx index c6c1f832e22002cfe19d575896349fa221b359bb..d35dc1417a6d5613f8b625590317167ba9ca8856 100644 --- a/Calorimeter/CaloCnv/CaloTPCnv/test/CaloCompactCellTool_test.cxx +++ b/Calorimeter/CaloCnv/CaloTPCnv/test/CaloCompactCellTool_test.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // $Id: CaloCompactCellTool_test.cxx,v 1.12 2009-03-31 19:04:04 ssnyder Exp $ @@ -1115,6 +1115,8 @@ std::vector<CaloCell*> init (IdDictParser* parser) CHECK( detstore->record (mgr, "CaloMgr") ); CHECK( detstore->record (scmgr, "CaloSuperCellMgr") ); CHECK( detstore->record (idmgr, "CaloIdManager") ); + CHECK( detstore->record (helper, "CaloCell_ID") ); + CHECK( detstore->record (schelper, "CaloCell_SuperCell_ID") ); arena = new SG::Arena ("arena"); diff --git a/Calorimeter/CaloDetDescr/CaloDetDescr/CaloSubdetNames.h b/Calorimeter/CaloDetDescr/CaloDetDescr/CaloSubdetNames.h index 17627c341bc4889e9aaba6d3af28153a88776fed..bcc29bc32b4a4b47f0be747d226bc72d8db09e43 100755 --- a/Calorimeter/CaloDetDescr/CaloDetDescr/CaloSubdetNames.h +++ b/Calorimeter/CaloDetDescr/CaloDetDescr/CaloSubdetNames.h @@ -15,7 +15,6 @@ #ifndef CALODETDESCR_CALOSUBDETNAMES_H # define CALODETDESCR_CALOSUBDETNAMES_H -class CaloCell_ID; #include <vector> #include "Identifier/Identifier.h" @@ -60,12 +59,6 @@ class CaloSubdetNames */ CaloSubdetNames::ALIGNVOL alignVolEnum(std::string reconame); - /** @brief Matching between the reconstruction region descriptors and names - */ - std::string alignVolName(Identifier regId); - /** @brief Matching between the reconstruction region descriptors and enum - */ - CaloSubdetNames::ALIGNVOL alignVolEnum(Identifier regId); private: /** @brief match names and enum @@ -78,15 +71,6 @@ class CaloSubdetNames /** @brief vector of ALIGNVOL enum values */ std::vector <CaloSubdetNames::ALIGNVOL> m_alvol; - - /** @brief Matching between Readout reagions and ALIGNVOL : array indexed by calo-hash-id - */ - std::vector <std::string> m_regReconame; - - /** @brief Calo Cell ID helper - */ - const CaloCell_ID* m_calocell_id; - }; #endif // CALODETDESCR_CALOSUBDETNAMES_H diff --git a/Calorimeter/CaloDetDescr/src/CaloAlignTool.cxx b/Calorimeter/CaloDetDescr/src/CaloAlignTool.cxx index ba207dc6194fd266071f92a29cbcbf9962384a04..823e5c7429c18976c89ad0201a189920835b2446 100755 --- a/Calorimeter/CaloDetDescr/src/CaloAlignTool.cxx +++ b/Calorimeter/CaloDetDescr/src/CaloAlignTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "CaloDetDescr/CaloAlignTool.h" @@ -30,7 +30,6 @@ #include "LArReadoutGeometry/FCALDetectorManager.h" #include "CaloIdentifier/CaloCell_ID.h" -#include "CaloIdentifier/CaloIdManager.h" #include "CaloConditions/CaloCellPositionShift.h" @@ -126,12 +125,10 @@ StatusCode CaloAlignTool::align(IOVSVC_CALLBACK_ARGS) else log << MSG::DEBUG << "Successfully retrieved CaloCellPositionShift from the DetectorStore" << endmsg; - const CaloIdManager* caloId_mgr = caloMgr->getCalo_Mgr(); - - const CaloCell_ID* cell_id = caloId_mgr->getCaloCell_ID(); - const LArEM_ID* em_id = caloId_mgr->getEM_ID(); - const LArHEC_ID* hec_id = caloId_mgr->getHEC_ID(); - const LArFCAL_ID* fcal_id = caloId_mgr->getFCAL_ID(); + const CaloCell_ID* cell_id = caloMgr->getCaloCell_ID(); + const LArEM_ID* em_id = cell_id->em_idHelper(); + const LArHEC_ID* hec_id = cell_id->hec_idHelper(); + const LArFCAL_ID* fcal_id = cell_id->fcal_idHelper(); // Get minimal value for Hash ID - needed to retrieve sagging information IdentifierHash emmin,emmax; diff --git a/Calorimeter/CaloDetDescr/src/CaloSubdetNames.cxx b/Calorimeter/CaloDetDescr/src/CaloSubdetNames.cxx index 4595e0f1ea8387a95958f169fdf82e4751aec90d..f1ac9a277f7ed7f3035273bc56a8fd16c437fcd0 100755 --- a/Calorimeter/CaloDetDescr/src/CaloSubdetNames.cxx +++ b/Calorimeter/CaloDetDescr/src/CaloSubdetNames.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /*************************************************************************** @@ -9,11 +9,6 @@ //<<<<<< INCLUDES >>>>>> #include "CaloDetDescr/CaloSubdetNames.h" -#include "CaloIdentifier/CaloCell_ID.h" -#include "CaloIdentifier/CaloIdManager.h" - -#include <iostream> -#include <iomanip> CaloSubdetNames::~CaloSubdetNames() @@ -21,8 +16,6 @@ CaloSubdetNames::~CaloSubdetNames() CaloSubdetNames::CaloSubdetNames() { - - m_calocell_id = CaloIdManager::instance()->getCaloCell_ID(); match_names(); } @@ -32,87 +25,6 @@ CaloSubdetNames::match_names() int alignsize = (int) CaloSubdetNames::UNKNOWN; m_reconame.resize( alignsize, "unknown" ); m_alvol.resize( alignsize, CaloSubdetNames::UNKNOWN); - int matchsize = (int) m_calocell_id->calo_region_hash_max(); - m_regReconame.resize( matchsize, "unknown"); - - for ( unsigned int i=0; i < m_calocell_id->calo_region_hash_max(); i++ ) { - - Identifier regId = m_calocell_id->region_id (i); - int samp = m_calocell_id->sampling(regId); - //int region = m_calocell_id->region(regId); - int pos_neg = m_calocell_id->pos_neg(regId); - int barrel_ec = std::abs(pos_neg); - - if ( m_calocell_id->is_em(regId) ) { - // EM - - if ( barrel_ec == 1 ) { - if ( pos_neg < 0) - m_regReconame [i] = "EMB_NEG"; - else - m_regReconame [i] = "EMB_POS"; - - if ( samp == 0) { - if ( pos_neg < 0) - m_regReconame [i] = "PRESAMPLER_B_NEG"; - else - m_regReconame [i] = "PRESAMPLER_B_POS"; - } - } - if ( barrel_ec == 2 || barrel_ec == 3 ) { - if ( pos_neg < 0) - m_regReconame [i] = "EMEC_NEG"; - else - m_regReconame [i] = "EMEC_POS"; - - if ( samp == 0) { - if ( pos_neg < 0) - m_regReconame [i] = "PRESAMPLER_EC_NEG"; - else - m_regReconame [i] = "PRESAMPLER_EC_POS"; - } - } - - } else if ( m_calocell_id->is_hec(regId) ) { - // HEC - - if ( samp == 0 || samp == 1 ) { - if ( pos_neg < 0) - m_regReconame [i] = "HEC1_NEG"; - else - m_regReconame [i] = "HEC1_POS"; - } - - if ( samp == 2 || samp == 3 ) { - if ( pos_neg < 0) - m_regReconame [i] = "HEC2_NEG"; - else - m_regReconame [i] = "HEC2_POS"; - } - - } else if ( m_calocell_id->is_fcal(regId) ) { - // FCAL - - if ( samp == 1 ) { - if ( pos_neg < 0) - m_regReconame [i] = "FCAL1_NEG"; - else - m_regReconame [i] = "FCAL1_POS"; - } - if ( samp == 2 ) { - if ( pos_neg < 0) - m_regReconame [i] = "FCAL2_NEG"; - else - m_regReconame [i] = "FCAL2_POS"; - } - if ( samp == 3 ) { - if ( pos_neg < 0) - m_regReconame [i] = "FCAL3_NEG"; - else - m_regReconame [i] = "FCAL3_POS"; - } - } - } m_alvol [ (int)CaloSubdetNames::LARCRYO_B ] = CaloSubdetNames::LARCRYO_B; m_reconame [ (int)CaloSubdetNames::LARCRYO_B ] = "LARCRYO_B"; @@ -183,19 +95,3 @@ CaloSubdetNames::alignVolEnum(std::string reconame) return CaloSubdetNames::UNKNOWN; } -std::string -CaloSubdetNames::alignVolName (Identifier regId) -{ - return m_regReconame[ (int )m_calocell_id->calo_region_hash(regId) ]; -} - -CaloSubdetNames::ALIGNVOL -CaloSubdetNames::alignVolEnum(Identifier regId) -{ - std::string recnam = this->alignVolName(regId); - - for ( unsigned int i=0; i<m_reconame.size(); i++ ) - if ( m_reconame[i] == recnam ) return m_alvol[i]; - return CaloSubdetNames::UNKNOWN; - -} diff --git a/Calorimeter/CaloDetDescr/src/CaloSuperCellIDTool.cxx b/Calorimeter/CaloDetDescr/src/CaloSuperCellIDTool.cxx index 263628c3cc8e5a9024b2792c06c37a5c06202d68..a27ec942148d89166bf582bb2371364d6c36ae70 100644 --- a/Calorimeter/CaloDetDescr/src/CaloSuperCellIDTool.cxx +++ b/Calorimeter/CaloDetDescr/src/CaloSuperCellIDTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // $Id$ @@ -15,7 +15,6 @@ #include "CaloIdentifier/CaloCell_Base_ID.h" #include "CaloIdentifier/CaloCell_SuperCell_ID.h" #include "CaloIdentifier/CaloCell_ID.h" -#include "CaloIdentifier/CaloIdManager.h" #include "AthenaKernel/errorcheck.h" #include "boost/format.hpp" @@ -56,7 +55,8 @@ CaloSuperCellIDTool::CaloSuperCellIDTool (const std::string& type, const std::string& name, const IInterface* parent) : base_class (type, name, parent), - m_calo_id_manager (0) + m_cell_helper(nullptr), + m_sc_helper(nullptr) { } @@ -67,7 +67,8 @@ CaloSuperCellIDTool::CaloSuperCellIDTool (const std::string& type, StatusCode CaloSuperCellIDTool::initialize() { CHECK( base_class::initialize() ); - CHECK( detStore()->retrieve (m_calo_id_manager, "CaloIdManager") ); + CHECK( detStore()->retrieve (m_cell_helper, "CaloCell_ID") ); + CHECK( detStore()->retrieve (m_sc_helper, "CaloCell_SuperCell_ID") ); initIDMap (); @@ -80,33 +81,30 @@ StatusCode CaloSuperCellIDTool::initialize() */ void CaloSuperCellIDTool::initIDMap () { - const CaloCell_Base_ID* cell_helper = m_calo_id_manager->getCaloCell_ID(); - const CaloCell_Base_ID* sc_helper = m_calo_id_manager->getCaloCell_SuperCell_ID(); - m_offlineIndex.clear(); m_superCellIndex.clear(); m_superCellIndexEnd.clear(); m_idmap.clear(); // One entry in the index tables for each region hash; -1 means no entry. - m_offlineIndex.resize (cell_helper->calo_region_hash_max(), -1); - m_superCellIndex.resize (sc_helper->calo_region_hash_max(), -1); - m_superCellIndexEnd.resize (sc_helper->calo_region_hash_max(), -1); + m_offlineIndex.resize (m_cell_helper->calo_region_hash_max(), -1); + m_superCellIndex.resize (m_sc_helper->calo_region_hash_max(), -1); + m_superCellIndexEnd.resize (m_sc_helper->calo_region_hash_max(), -1); // Loop over all offline regions. - for (const Identifier& cell_reg : cell_helper->reg_range()) { - if (cell_helper->is_em(cell_reg) || - cell_helper->is_hec(cell_reg) || - cell_helper->is_fcal(cell_reg)) + for (const Identifier& cell_reg : m_cell_helper->reg_range()) { + if (m_cell_helper->is_em(cell_reg) || + m_cell_helper->is_hec(cell_reg) || + m_cell_helper->is_fcal(cell_reg)) { - int sub_calo = cell_helper->sub_calo (cell_reg); - int pos_neg = cell_helper->pos_neg (cell_reg); - int sampling = cell_helper->sampling (cell_reg); - int cell_ietamin = cell_helper->eta_min (cell_reg); - int cell_ietamax = cell_helper->eta_max (cell_reg); - float cell_etasize = cell_helper->etaGranularity(cell_reg); - float cell_phisize = cell_helper->phiGranularity(cell_reg); - float cell_etamin = cell_helper->eta0 (cell_reg); + int sub_calo = m_cell_helper->sub_calo (cell_reg); + int pos_neg = m_cell_helper->pos_neg (cell_reg); + int sampling = m_cell_helper->sampling (cell_reg); + int cell_ietamin = m_cell_helper->eta_min (cell_reg); + int cell_ietamax = m_cell_helper->eta_max (cell_reg); + float cell_etasize = m_cell_helper->etaGranularity(cell_reg); + float cell_phisize = m_cell_helper->phiGranularity(cell_reg); + float cell_etamin = m_cell_helper->eta0 (cell_reg); float cell_etamax = cell_etamin + cell_etasize*(cell_ietamax - cell_ietamin + 1); @@ -116,17 +114,17 @@ void CaloSuperCellIDTool::initIDMap () // Find all overlapping supercell regions in the same sampling // and make table entries. HEC supercells are summed // over samplings, so don't make sampling requirements there. - for (const Identifier& sc_reg : sc_helper->reg_range()) { - if (sc_helper->sub_calo (sc_reg) == sub_calo && - sc_helper->pos_neg (sc_reg) == pos_neg && + for (const Identifier& sc_reg : m_sc_helper->reg_range()) { + if (m_sc_helper->sub_calo (sc_reg) == sub_calo && + m_sc_helper->pos_neg (sc_reg) == pos_neg && (sub_calo == CaloCell_ID::LARHEC || - sc_helper->sampling (sc_reg) == sampling)) + m_sc_helper->sampling (sc_reg) == sampling)) { - int sc_ietamin = sc_helper->eta_min (sc_reg); - int sc_ietamax = sc_helper->eta_max (sc_reg); - float sc_etasize = sc_helper->etaGranularity(sc_reg); - float sc_phisize = sc_helper->phiGranularity(sc_reg); - float sc_etamin = sc_helper->eta0 (sc_reg); + int sc_ietamin = m_sc_helper->eta_min (sc_reg); + int sc_ietamax = m_sc_helper->eta_max (sc_reg); + float sc_etasize = m_sc_helper->etaGranularity(sc_reg); + float sc_phisize = m_sc_helper->phiGranularity(sc_reg); + float sc_etamin = m_sc_helper->eta0 (sc_reg); float sc_etamax= sc_etamin + sc_etasize*(sc_ietamax - sc_ietamin + 1); // Find the overlap between the offline and supercell regions. @@ -136,8 +134,8 @@ void CaloSuperCellIDTool::initIDMap () if (etamin < etamax - 1e-4) { // There's overlap --- make a table entry. IDMapElt elt; - elt.m_cell_reg = cell_helper->calo_region_hash (cell_reg); - elt.m_sc_reg = sc_helper->calo_region_hash (sc_reg); + elt.m_cell_reg = m_cell_helper->calo_region_hash (cell_reg); + elt.m_sc_reg = m_sc_helper->calo_region_hash (sc_reg); elt.m_etadiv = int (sc_etasize * inv_cell_etasize + 0.1); elt.m_phidiv = int (sc_phisize * inv_cell_phisize + 0.1); @@ -166,25 +164,25 @@ void CaloSuperCellIDTool::initIDMap () } } } - else if (cell_helper->is_tile(cell_reg)) { - int section = cell_helper->section (cell_reg); + else if (m_cell_helper->is_tile(cell_reg)) { + int section = m_cell_helper->section (cell_reg); if (section != TileID::BARREL && section != TileID::EXTBAR) continue; - int sub_calo = cell_helper->sub_calo (cell_reg); - int side = cell_helper->side (cell_reg); - Identifier sc_reg = sc_helper->region_id (sub_calo, section, side, 0); + int sub_calo = m_cell_helper->sub_calo (cell_reg); + int side = m_cell_helper->side (cell_reg); + Identifier sc_reg = m_sc_helper->region_id (sub_calo, section, side, 0); IDMapElt elt; - elt.m_cell_reg = cell_helper->calo_region_hash (cell_reg); - elt.m_sc_reg = sc_helper->calo_region_hash (sc_reg); + elt.m_cell_reg = m_cell_helper->calo_region_hash (cell_reg); + elt.m_sc_reg = m_sc_helper->calo_region_hash (sc_reg); elt.m_etadiv = 1; elt.m_phidiv = 1; elt.m_cell_ieta_adj = 0; elt.m_sc_ieta_adj = 0; - elt.m_cell_ietamin = cell_helper->eta_min (cell_reg); - elt.m_cell_ietamax = cell_helper->eta_max (cell_reg); - elt.m_sc_ietamin = sc_helper->eta_min (sc_reg); - elt.m_sc_ietamax = sc_helper->eta_max (sc_reg); + elt.m_cell_ietamin = m_cell_helper->eta_min (cell_reg); + elt.m_cell_ietamax = m_cell_helper->eta_max (cell_reg); + elt.m_sc_ietamin = m_sc_helper->eta_min (sc_reg); + elt.m_sc_ietamax = m_sc_helper->eta_max (sc_reg); addMapEntry (elt); } } @@ -195,21 +193,21 @@ void CaloSuperCellIDTool::initIDMap () msg(MSG::DEBUG) << "CaloSuperCellIDTool mapping table:\n"; msg(MSG::DEBUG) << "LArEM ----------------------------\n"; for (const IDMapElt& elt : m_idmap) { - Identifier cell_reg = cell_helper->region_id (elt.m_cell_reg); - Identifier sc_reg = sc_helper->region_id (elt.m_sc_reg); + Identifier cell_reg = m_cell_helper->region_id (elt.m_cell_reg); + Identifier sc_reg = m_sc_helper->region_id (elt.m_sc_reg); msg(MSG::DEBUG) << boost::format (" %3d %d/%2d/%2d/%d %3d %d/%2d/%2d/%d %d %d %3d %3d %3d %3d %3d %3d\n") % (int)elt.m_cell_reg % - cell_helper->sub_calo(cell_reg) % - posneg_or_section (cell_helper, cell_reg) % - sampling_or_side (cell_helper, cell_reg) % - cell_helper->region(cell_reg) % + m_cell_helper->sub_calo(cell_reg) % + posneg_or_section (m_cell_helper, cell_reg) % + sampling_or_side (m_cell_helper, cell_reg) % + m_cell_helper->region(cell_reg) % (int)elt.m_sc_reg % - sc_helper->sub_calo(sc_reg) % - posneg_or_section (sc_helper, sc_reg) % - sampling_or_side (sc_helper, sc_reg) % - sc_helper->region(sc_reg) % + m_sc_helper->sub_calo(sc_reg) % + posneg_or_section (m_sc_helper, sc_reg) % + sampling_or_side (m_sc_helper, sc_reg) % + m_sc_helper->region(sc_reg) % elt.m_etadiv % elt.m_phidiv % elt.m_cell_ietamin % elt.m_cell_ietamax % @@ -249,8 +247,8 @@ void CaloSuperCellIDTool::addMapEntry (const IDMapElt& elt) */ void CaloSuperCellIDTool::initFCALIDMap () { - const LArFCAL_Base_ID* sfcal_helper = m_calo_id_manager->getFCAL_SuperCell_ID(); - const LArFCAL_Base_ID* fcal_helper = m_calo_id_manager->getFCAL_ID(); + const LArFCAL_Base_ID* sfcal_helper = m_sc_helper->fcal_idHelper(); + const LArFCAL_Base_ID* fcal_helper = m_cell_helper->fcal_idHelper(); m_fcal_fromCell.clear(); m_fcal_fromSuperCell.clear(); @@ -313,14 +311,10 @@ void CaloSuperCellIDTool::initFCALIDMap () Identifier CaloSuperCellIDTool::offlineToSuperCellID (const Identifier& id) const { - const CaloCell_Base_ID* cell_helper = m_calo_id_manager->getCaloCell_ID(); - - if (cell_helper->is_em(id) || cell_helper->is_hec(id)) { + if (m_cell_helper->is_em(id) || m_cell_helper->is_hec(id)) { // Look for the first entry in the mapping table for this offline region. - const CaloCell_Base_ID* sc_helper = m_calo_id_manager->getCaloCell_SuperCell_ID(); - - Identifier reg_id = cell_helper->region_id (id); - IdentifierHash rhash = cell_helper->calo_region_hash (reg_id); + Identifier reg_id = m_cell_helper->region_id (id); + IdentifierHash rhash = m_cell_helper->calo_region_hash (reg_id); assert (rhash < m_offlineIndex.size()); int ndx = m_offlineIndex[rhash]; if (ndx < 0) @@ -328,7 +322,7 @@ CaloSuperCellIDTool::offlineToSuperCellID (const Identifier& id) const // Now search through all entries for this offline region to find one // that includes this cell. - int ieta = cell_helper->eta (id); + int ieta = m_cell_helper->eta (id); do { const IDMapElt& elt = m_idmap[ndx]; @@ -340,24 +334,24 @@ CaloSuperCellIDTool::offlineToSuperCellID (const Identifier& id) const elt.m_etadiv) + elt.m_sc_ietamin - elt.m_sc_ieta_adj; - return sc_helper->cell_id (sc_helper->region_id (elt.m_sc_reg), + return m_sc_helper->cell_id (m_sc_helper->region_id (elt.m_sc_reg), ieta_sc, - cell_helper->phi(id) / elt.m_phidiv); + m_cell_helper->phi(id) / elt.m_phidiv); } ++ndx; } while (ndx < (int)m_idmap.size() && m_idmap[ndx].m_cell_reg == rhash); } - else if (cell_helper->is_fcal(id)) { - const LArFCAL_ID* fcal_helper = m_calo_id_manager->getFCAL_ID(); + else if (m_cell_helper->is_fcal(id)) { + const LArFCAL_ID* fcal_helper = m_cell_helper->fcal_idHelper(); IdentifierHash cell_hash = fcal_helper->channel_hash(id); return m_fcal_fromCell[ cell_hash ]; } - else if (cell_helper->is_tile(id)) { - int section = cell_helper->section (id); - int sample_offline = cell_helper->sample(id); - int tower = cell_helper->tower(id); + else if (m_cell_helper->is_tile(id)) { + int section = m_cell_helper->section (id); + int sample_offline = m_cell_helper->sample(id); + int tower = m_cell_helper->tower(id); // A couple special cases in the transition region. // cf. http://hep.uchicago.edu/atlas/tilecal/level1/geometry.html @@ -392,13 +386,10 @@ CaloSuperCellIDTool::offlineToSuperCellID (const Identifier& id) const int sample_sc = sample_offline; if (sample_sc != TileID::SAMP_D) sample_sc = TileID::SAMP_A; - const CaloCell_Base_ID* sc_helper = - m_calo_id_manager->getCaloCell_SuperCell_ID(); - - return sc_helper->cell_id (cell_helper->sub_calo(id), + return m_sc_helper->cell_id (m_cell_helper->sub_calo(id), section, - cell_helper->side(id), - cell_helper->module(id), + m_cell_helper->side(id), + m_cell_helper->module(id), tower, sample_sc); } @@ -415,14 +406,11 @@ std::vector<Identifier> CaloSuperCellIDTool::superCellToOfflineID (const Identifier& id) const { std::vector<Identifier> out; - const CaloCell_SuperCell_ID* sc_helper = m_calo_id_manager->getCaloCell_SuperCell_ID(); // Look for the first entry in the mapping table for this supercell region. - if (sc_helper->is_em (id) || sc_helper->is_hec (id)) { - const CaloCell_Base_ID* cell_helper = m_calo_id_manager->getCaloCell_ID(); - - Identifier reg_id = sc_helper->region_id (id); - IdentifierHash rhash = sc_helper->calo_region_hash (reg_id); + if (m_sc_helper->is_em (id) || m_sc_helper->is_hec (id)) { + Identifier reg_id = m_sc_helper->region_id (id); + IdentifierHash rhash = m_sc_helper->calo_region_hash (reg_id); assert (rhash < m_superCellIndex.size()); int ndx = m_superCellIndex[rhash]; if (ndx < 0) @@ -433,7 +421,7 @@ CaloSuperCellIDTool::superCellToOfflineID (const Identifier& id) const // Now search through all entries for this supercell region to find one // that includes this supercell. - int ieta = sc_helper->eta (id); + int ieta = m_sc_helper->eta (id); for (; ndx < end; ++ndx) { const IDMapElt& elt = m_idmap[ndx]; @@ -446,37 +434,36 @@ CaloSuperCellIDTool::superCellToOfflineID (const Identifier& id) const int ieta0 = (ieta - elt.m_sc_ietamin + elt.m_sc_ieta_adj) * elt.m_etadiv + elt.m_cell_ietamin - elt.m_cell_ieta_adj; - Identifier cell_reg_id = cell_helper->region_id (elt.m_cell_reg); + Identifier cell_reg_id = m_cell_helper->region_id (elt.m_cell_reg); int ieta = std::max (ieta0, elt.m_cell_ietamin); int ietamax = std::min (ieta0 + elt.m_etadiv - 1, elt.m_cell_ietamax); // Add all matching cells to the output list. - int iphi0 = sc_helper->phi (id) * elt.m_phidiv; + int iphi0 = m_sc_helper->phi (id) * elt.m_phidiv; for (; ieta <= ietamax; ++ieta) { for (int ip = 0; ip < elt.m_phidiv; ip++) { - out.push_back(cell_helper->cell_id (cell_reg_id, ieta, iphi0+ip)); + out.push_back(m_cell_helper->cell_id (cell_reg_id, ieta, iphi0+ip)); } } } } } - else if ( sc_helper->is_fcal( id ) ) { - const LArFCAL_Base_ID* sfcal_helper = sc_helper->fcal_idHelper(); + else if ( m_sc_helper->is_fcal( id ) ) { + const LArFCAL_Base_ID* sfcal_helper = m_sc_helper->fcal_idHelper(); IdentifierHash sc_hash = sfcal_helper->channel_hash( id ); out = m_fcal_fromSuperCell[ sc_hash ]; } - else if (sc_helper->is_tile (id)) { - int module = sc_helper->module(id); - int tower = sc_helper->tower(id); - int sample = sc_helper->sample(id); + else if (m_sc_helper->is_tile (id)) { + int module = m_sc_helper->module(id); + int tower = m_sc_helper->tower(id); + int sample = m_sc_helper->sample(id); - const CaloCell_Base_ID* cell_helper = m_calo_id_manager->getCaloCell_ID(); - const Tile_Base_ID* tile_helper = cell_helper->tile_idHelper(); + const Tile_Base_ID* tile_helper = m_cell_helper->tile_idHelper(); - Identifier reg_id = tile_helper->region_id (sc_helper->section(id), - sc_helper->side(id)); + Identifier reg_id = tile_helper->region_id (m_sc_helper->section(id), + m_sc_helper->side(id)); Identifier cell_id; @@ -487,7 +474,7 @@ CaloSuperCellIDTool::superCellToOfflineID (const Identifier& id) const } if (tower == 9) { Identifier greg_id = tile_helper->region_id (TileID::GAPDET, - sc_helper->side(id)); + m_sc_helper->side(id)); if (tile_helper->cell_id (greg_id, module, 8, TileID::SAMP_D, cell_id)) out.push_back (cell_id); if (sample == TileID::SAMP_A) { @@ -523,21 +510,17 @@ CaloSuperCellIDTool::superCellToOfflineID (const Identifier& id) const std::vector<Identifier> CaloSuperCellIDTool::offlineToSuperCellRegion (const Identifier& reg_id) const { - const CaloCell_Base_ID* cell_helper = m_calo_id_manager->getCaloCell_ID(); - const CaloCell_Base_ID* sc_helper = - m_calo_id_manager->getCaloCell_SuperCell_ID(); - std::vector<Identifier> out; // Look for the first entry in the mapping table for this offline region. - IdentifierHash rhash = cell_helper->calo_region_hash (reg_id); + IdentifierHash rhash = m_cell_helper->calo_region_hash (reg_id); assert (rhash < m_offlineIndex.size()); int ndx = m_offlineIndex[rhash]; while (ndx >= 0 && ndx < (int)m_idmap.size() && m_idmap[ndx].m_cell_reg == rhash) { - out.push_back (sc_helper->region_id (m_idmap[ndx].m_sc_reg)); + out.push_back (m_sc_helper->region_id (m_idmap[ndx].m_sc_reg)); ++ndx; } @@ -555,20 +538,16 @@ CaloSuperCellIDTool::offlineToSuperCellRegion (const Identifier& reg_id) const std::vector<Identifier> CaloSuperCellIDTool::superCellToOfflineRegion (const Identifier& reg_id) const { - const CaloCell_Base_ID* cell_helper = m_calo_id_manager->getCaloCell_ID(); - const CaloCell_Base_ID* sc_helper = - m_calo_id_manager->getCaloCell_SuperCell_ID(); - std::vector<Identifier> out; // Look for the first entry in the mapping table for this offline region. - IdentifierHash rhash = sc_helper->calo_region_hash (reg_id); + IdentifierHash rhash = m_sc_helper->calo_region_hash (reg_id); assert (rhash < m_superCellIndex.size()); int ndx = m_superCellIndex[rhash]; int end = m_superCellIndexEnd[rhash]; for (; ndx < end; ++ndx) { if (m_idmap[ndx].m_sc_reg == rhash) - out.push_back (cell_helper->region_id (m_idmap[ndx].m_cell_reg)); + out.push_back (m_cell_helper->region_id (m_idmap[ndx].m_cell_reg)); } return out; diff --git a/Calorimeter/CaloDetDescr/src/CaloSuperCellIDTool.h b/Calorimeter/CaloDetDescr/src/CaloSuperCellIDTool.h index a9a4142d2ba49a3e75bb53c9a0bf3ac0ec67ff92..fb0a3f40e92f8fc62401e4a56f0ff3c2571f7d8a 100644 --- a/Calorimeter/CaloDetDescr/src/CaloSuperCellIDTool.h +++ b/Calorimeter/CaloDetDescr/src/CaloSuperCellIDTool.h @@ -1,7 +1,7 @@ // This file's extension implies that it's C, but it's really -*- C++ -*-. /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // $Id$ @@ -23,7 +23,8 @@ #include "GaudiKernel/ToolHandle.h" -class CaloIdManager; +class CaloCell_ID; +class CaloCell_SuperCell_ID; class CaloSuperCellIDTool : public extends1<AthAlgTool, ICaloSuperCellIDTool> @@ -154,7 +155,8 @@ private: std::vector< std::vector<Identifier> > m_fcal_fromSuperCell; /// Entry point for calorimeter ID helpers. - const CaloIdManager* m_calo_id_manager; + const CaloCell_ID* m_cell_helper; + const CaloCell_SuperCell_ID* m_sc_helper; }; diff --git a/Calorimeter/CaloIdentifier/CaloIdentifier/CaloCell_Base_ID.h b/Calorimeter/CaloIdentifier/CaloIdentifier/CaloCell_Base_ID.h index 0b5331ccacf7d4df26d22c8bea449843030f385c..09686c48e5880c4c1c7d9530e6ecdc0aaf249457 100644 --- a/Calorimeter/CaloIdentifier/CaloIdentifier/CaloCell_Base_ID.h +++ b/Calorimeter/CaloIdentifier/CaloIdentifier/CaloCell_Base_ID.h @@ -1,7 +1,7 @@ // This file's extension implies that it's C, but it's really -*- C++ -*-. /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // $Id$ @@ -17,6 +17,7 @@ #define CALOIDENTIFIER_CALOCELL_BASE_ID_H +#include "AthenaKernel/CLASS_DEF.h" #include "AtlasDetDescr/AtlasDetectorID.h" #include "CaloIdentifier/CaloID.h" #include "CaloIdentifier/LArNeighbours.h" @@ -72,12 +73,8 @@ public: int GetSubCaloName( const std::string SubCaloName ) const; - bool do_checks(void) const; - - void set_do_checks(bool do_checks) const; - /// Initialization from the identifier dictionary - virtual int initialize_from_dictionary(const IdDictMgr& dict_mgr); + virtual int initialize_from_dictionary(const IdDictMgr& dict_mgr) override; /** Make a region ID from constituting fields and subCalo index; for (Mini)FCAL and Tiles, the last argument is not used @@ -86,6 +83,11 @@ public: const int barec_or_posneg, const int sampling_or_fcalmodule, const int region_or_dummy ) const; + Identifier region_id (const int subCalo, + const int barec_or_posneg, + const int sampling_or_fcalmodule, + const int region_or_dummy, + bool checks) const; /** Make a cell (== channel) ID from constituting fields and subCalo index; for (Mini)FCAL, 'region_or_dummy' argument is not used @@ -97,6 +99,13 @@ public: const int region_or_dummy, const int eta, const int phi ) const; + Identifier cell_id (const int subCalo, + const int barec_or_posneg, + const int sampling_or_fcalmodule, + const int region_or_dummy, + const int eta, + const int phi, + bool checks) const; /** Make a region ID from a cell ID */ Identifier region_id (const Identifier cellId ) const; @@ -106,6 +115,10 @@ public: Identifier cell_id( const Identifier regionId, const int eta, const int phi, int depth = 0) const ; + Identifier cell_id( const Identifier regionId, + const int eta, const int phi, + int depth, + bool checks) const ; /** create region id from 'global'(==full calo) hash id*/ Identifier region_id (const IdentifierHash caloRegionHash) const; @@ -398,5 +411,7 @@ private: #include "CaloIdentifier/CaloCell_Base_ID.icc" +CLASS_DEF( CaloCell_Base_ID , 257140327 , 1 ) + #endif // not CALOIDENTIFIER_CALOCELL_BASE_ID_H diff --git a/Calorimeter/CaloIdentifier/CaloIdentifier/CaloCell_Base_ID.icc b/Calorimeter/CaloIdentifier/CaloIdentifier/CaloCell_Base_ID.icc index 99cae44d6ca57d89ef089fface8badf08248e7be..dfee1d461ae3af7a0e835eb7e9bf2ae8d054abc0 100644 --- a/Calorimeter/CaloIdentifier/CaloIdentifier/CaloCell_Base_ID.icc +++ b/Calorimeter/CaloIdentifier/CaloIdentifier/CaloCell_Base_ID.icc @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // $Id$ @@ -20,29 +20,40 @@ inline Identifier CaloCell_Base_ID::region_id (const int subCalo, const int barec_or_posneg, const int sampling_or_fcalmodule, - const int region_or_dummy ) const + const int region_or_dummy, + bool checks) const { Identifier result(0); // this returns a pixel identifier [2.1.-2.0.0] if( subCalo == LAREM ) { - return m_emHelper->region_id(barec_or_posneg, sampling_or_fcalmodule, region_or_dummy); + return m_emHelper->region_id(barec_or_posneg, sampling_or_fcalmodule, region_or_dummy, checks); } else if( subCalo == LARHEC ) { - return m_hecHelper->region_id(barec_or_posneg, sampling_or_fcalmodule, region_or_dummy); + return m_hecHelper->region_id(barec_or_posneg, sampling_or_fcalmodule, region_or_dummy, checks); } else if( subCalo == LARFCAL ) { - return m_fcalHelper->module_id(barec_or_posneg, sampling_or_fcalmodule); + return m_fcalHelper->module_id(barec_or_posneg, sampling_or_fcalmodule, checks); } else if( subCalo == LARMINIFCAL ) { - return m_minifcalHelper->module_id(barec_or_posneg, sampling_or_fcalmodule); + return m_minifcalHelper->module_id(barec_or_posneg, sampling_or_fcalmodule, checks); } else if( subCalo == TILE ) { - return m_tileHelper->region_id(barec_or_posneg, sampling_or_fcalmodule); + return m_tileHelper->region_id(barec_or_posneg, sampling_or_fcalmodule, checks); } else { return(result); } } +inline Identifier +CaloCell_Base_ID::region_id (const int subCalo, + const int barec_or_posneg, + const int sampling_or_fcalmodule, + const int region_or_dummy ) const +{ + return region_id (subCalo, barec_or_posneg, sampling_or_fcalmodule, + region_or_dummy, do_checks()); +} + //---------------------------------------------------------------------------- inline Identifier CaloCell_Base_ID::cell_id (const int subCalo, @@ -50,29 +61,42 @@ CaloCell_Base_ID::cell_id (const int subCalo, const int sampling_or_fcalmodule, const int region_or_dummy, const int eta, - const int phi) const + const int phi, + bool checks) const { Identifier result(0); if( subCalo == LAREM ) { - return m_emHelper->channel_id(barec_or_posneg, sampling_or_fcalmodule, region_or_dummy, eta, phi); + return m_emHelper->channel_id(barec_or_posneg, sampling_or_fcalmodule, region_or_dummy, eta, phi, checks); } else if( subCalo == LARHEC ) { - return m_hecHelper->channel_id(barec_or_posneg, sampling_or_fcalmodule, region_or_dummy, eta, phi); + return m_hecHelper->channel_id(barec_or_posneg, sampling_or_fcalmodule, region_or_dummy, eta, phi, checks); } else if( subCalo == LARFCAL ) { - return m_fcalHelper->channel_id(barec_or_posneg, sampling_or_fcalmodule, eta, phi); + return m_fcalHelper->channel_id(barec_or_posneg, sampling_or_fcalmodule, eta, phi, checks); } else if( subCalo == LARMINIFCAL ) { - return m_minifcalHelper->channel_id(barec_or_posneg, sampling_or_fcalmodule, region_or_dummy, eta, phi); + return m_minifcalHelper->channel_id(barec_or_posneg, sampling_or_fcalmodule, region_or_dummy, eta, phi, checks); } else if( subCalo == TILE ) { - return m_tileHelper->cell_id(barec_or_posneg, sampling_or_fcalmodule, region_or_dummy, eta, phi); + return m_tileHelper->cell_id(barec_or_posneg, sampling_or_fcalmodule, region_or_dummy, eta, phi, checks); } else { return(result); } } +inline Identifier +CaloCell_Base_ID::cell_id (const int subCalo, + const int barec_or_posneg, + const int sampling_or_fcalmodule, + const int region_or_dummy, + const int eta, + const int phi) const +{ + return cell_id (subCalo, barec_or_posneg, sampling_or_fcalmodule, + region_or_dummy, eta, phi, do_checks()); +} + //---------------------------------------------------------------------------- inline Identifier CaloCell_Base_ID::region_id ( const Identifier cellId ) const @@ -104,27 +128,37 @@ inline Identifier CaloCell_Base_ID::cell_id (const Identifier regionId, const int eta, const int phi, - int depth) const + int depth, + bool checks) const { Identifier result(0); if(m_emHelper->is_lar_em(regionId)) { - return m_emHelper->channel_id(regionId,eta,phi); + return m_emHelper->channel_id(regionId,eta,phi,checks); } else if(m_emHelper->is_lar_hec(regionId)) { - return m_hecHelper->channel_id(regionId,eta,phi); + return m_hecHelper->channel_id(regionId,eta,phi,checks); } else if(m_emHelper->is_lar_minifcal(regionId)) { // must do minifcal before fcal because miniFCAL IS FCAL - return m_minifcalHelper->channel_id(regionId, depth,eta,phi); + return m_minifcalHelper->channel_id(regionId, depth,eta,phi,checks); } else if(m_emHelper->is_lar_fcal(regionId)) { - return m_fcalHelper->channel_id(regionId,eta,phi); + return m_fcalHelper->channel_id(regionId,eta,phi,checks); } else { return(result); } } +inline Identifier +CaloCell_Base_ID::cell_id (const Identifier regionId, + const int eta, + const int phi, + int depth) const +{ + return cell_id (regionId, eta, phi, depth, do_checks()); +} + //---------------------------------------------------------------------------- inline Identifier CaloCell_Base_ID::region_id (const IdentifierHash caloRegionHash) const diff --git a/Calorimeter/CaloIdentifier/CaloIdentifier/CaloDM_ID.h b/Calorimeter/CaloIdentifier/CaloIdentifier/CaloDM_ID.h index 10518512911c4c80afa82dde2e904f8fc789445c..63e108ba0f5edb7fc59d34759c8c0683193960b8 100755 --- a/Calorimeter/CaloIdentifier/CaloIdentifier/CaloDM_ID.h +++ b/Calorimeter/CaloIdentifier/CaloIdentifier/CaloDM_ID.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef CALODM_ID_H @@ -111,6 +111,7 @@ public: /** build a region identifier valid for both LAr and Tiles */ Identifier region_id ( int pos_neg_z, int dmat, int sampling, int region ) const; + Identifier region_id ( int pos_neg_z, int dmat, int sampling, int region, bool checks) const; /** build a region identifier valid for both LAr and Tiles */ Identifier region_id (const Identifier& zoneId ) const; @@ -118,10 +119,14 @@ public: /** build a zone identifier valid for both LAr and Tiles */ Identifier zone_id (int pos_neg_z, int dat, int sampling, int region, int eta, int phi ) const; + Identifier zone_id (int pos_neg_z, int dat, int sampling, int region, + int eta, int phi, bool checks ) const; /** build a zone identifier valid for both LAr and Tiles */ Identifier zone_id (const Identifier& regionId, int eta, int phi ) const ; + Identifier zone_id (const Identifier& regionId, + int eta, int phi, bool checks ) const ; /** to disentangle between LAr and Tile dead material */ bool is_lar (const Identifier& zoneId) const; @@ -378,7 +383,8 @@ CLASS_DEF( CaloDM_ID , 167756483 , 1 ) //---------------------------------------------------------------------------- -inline Identifier CaloDM_ID::region_id (int pos_neg_z, int dmat, int sampling, int region) const +inline Identifier CaloDM_ID::region_id (int pos_neg_z, int dmat, int sampling, int region, + bool checks) const { Identifier result(0); // Pack fields independently @@ -389,7 +395,7 @@ inline Identifier CaloDM_ID::region_id (int pos_neg_z, int dmat, int sampling, i m_region_impl.pack (region, result); // Do checks - if(m_do_checks) { + if(checks) { if(abs(pos_neg_z) == 4) { lar_region_id_checks( pos_neg_z, dmat, sampling, region); } else @@ -406,6 +412,11 @@ inline Identifier CaloDM_ID::region_id (int pos_neg_z, int dmat, int sampling, i return result; } +inline Identifier CaloDM_ID::region_id (int pos_neg_z, int dmat, int sampling, int region) const +{ + return region_id (pos_neg_z, dmat, sampling, region, do_checks()); +} + //---------------------------------------------------------------------------- inline Identifier CaloDM_ID::region_id ( const Identifier& zoneId ) const @@ -419,7 +430,8 @@ CaloDM_ID::region_id ( const Identifier& zoneId ) const //---------------------------------------------------------------------------- inline Identifier CaloDM_ID::zone_id ( int pos_neg_z, int dmat, int sampling, int region, - int eta, int phi ) const + int eta, int phi, + bool checks) const { Identifier result(0); // Pack fields independently @@ -432,7 +444,7 @@ inline Identifier CaloDM_ID::zone_id ( int pos_neg_z, int dmat, int sampling, m_phi_impl.pack (phi, result); // Do checks - if(m_do_checks) { + if(checks) { if(abs(pos_neg_z) == 4) { lar_zone_id_checks( pos_neg_z, dmat, sampling, region, eta, phi ); } @@ -447,10 +459,16 @@ inline Identifier CaloDM_ID::zone_id ( int pos_neg_z, int dmat, int sampling, return result; } - + +inline Identifier CaloDM_ID::zone_id ( int pos_neg_z, int dmat, int sampling, int region, + int eta, int phi ) const +{ + return zone_id (pos_neg_z, dmat, sampling, region, eta, phi, do_checks()); +} + //---------------------------------------------------------------------------- inline Identifier CaloDM_ID::zone_id ( const Identifier& regionId, - int eta, int phi ) const + int eta, int phi, bool checks ) const { Identifier result(regionId); @@ -461,13 +479,19 @@ inline Identifier CaloDM_ID::zone_id ( const Identifier& regionId, m_phi_impl.pack (phi, result); // Do checks - if(m_do_checks) { + if(checks) { zone_id_checks( regionId, eta, phi ); } return result; } +inline Identifier CaloDM_ID::zone_id ( const Identifier& regionId, + int eta, int phi ) const +{ + return zone_id (regionId, eta, phi, do_checks()); +} + //---------------------------------------------------------------------------- inline bool CaloDM_ID::is_lar(const Identifier& zoneId) const { diff --git a/Calorimeter/CaloIdentifier/CaloIdentifier/CaloLVL1_ID.h b/Calorimeter/CaloIdentifier/CaloIdentifier/CaloLVL1_ID.h index 13e6c8a57aa3c3a21a12f199bb46c763bb967058..b521ac039df0cebb580997b2f939f96e3e8a7fee 100755 --- a/Calorimeter/CaloIdentifier/CaloIdentifier/CaloLVL1_ID.h +++ b/Calorimeter/CaloIdentifier/CaloIdentifier/CaloLVL1_ID.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef CALOLVL1_ID_H @@ -76,16 +76,21 @@ public: /** build a tower identifier */ Identifier tower_id (int pos_neg_z, int sampling, int region, int eta, int phi ) const ; + Identifier tower_id (int pos_neg_z, int sampling, int region, + int eta, int phi, bool checks ) const ; /** build a tower identifier */ Identifier tower_id (const Identifier regionId, int eta, int phi ) const ; + Identifier tower_id (const Identifier regionId, + int eta, int phi, bool checks ) const ; /** build a tower identifier */ Identifier tower_id (const Identifier layerId) const; /** build a region (of towers) identifier */ Identifier region_id ( int pos_neg_z, int sampling, int region ) const; + Identifier region_id ( int pos_neg_z, int sampling, int region, bool checks) const; /** build a region (of towers) identifier */ Identifier region_id ( const Identifier tower_or_layerId ) const; @@ -94,9 +99,13 @@ public: /** build a layer identifier */ Identifier layer_id ( int pos_neg_z, int sampling, int region, int eta, int phi, int layer ) const; + Identifier layer_id ( int pos_neg_z, int sampling, int region, + int eta, int phi, int layer, + bool checks) const; /** build a layer identifier */ Identifier layer_id ( const Identifier towerId, int layer ) const; + Identifier layer_id ( const Identifier towerId, int layer, bool checks ) const; /** access to IdContext's which define which levels of fields are contained in the id */ @@ -398,7 +407,7 @@ CLASS_DEF( CaloLVL1_ID , 108133391 , 1 ) //---------------------------------------------------------------------------- inline Identifier CaloLVL1_ID::tower_id ( int pos_neg_z, int sampling, int region, - int eta, int phi ) const + int eta, int phi, bool checks ) const { Identifier result(0); // Pack fields independently @@ -410,16 +419,23 @@ inline Identifier CaloLVL1_ID::tower_id ( int pos_neg_z, int sampling, int reg m_phi_impl.pack (phi, result); // Do checks - if(m_do_checks) { + if(checks) { tower_id_checks( pos_neg_z, sampling, region, eta, phi ); } return result; } +inline Identifier CaloLVL1_ID::tower_id ( int pos_neg_z, int sampling, int region, + int eta, int phi ) const +{ + return tower_id (pos_neg_z, sampling, region, eta, phi, do_checks()); +} + + //---------------------------------------------------------------------------- inline Identifier CaloLVL1_ID::tower_id ( const Identifier regionId, - int eta, int phi ) const + int eta, int phi, bool checks ) const { Identifier result(regionId); @@ -430,13 +446,20 @@ inline Identifier CaloLVL1_ID::tower_id ( const Identifier regionId, m_phi_impl.pack (phi, result); // Do checks - if(m_do_checks) { + if(checks) { tower_id_checks( regionId, eta, phi ); } return result; } +inline Identifier CaloLVL1_ID::tower_id ( const Identifier regionId, + int eta, int phi ) const +{ + return tower_id (regionId, eta, phi, do_checks()); +} + + //---------------------------------------------------------------------------- inline Identifier CaloLVL1_ID::region_id ( const Identifier tower_or_layerId ) const { @@ -458,7 +481,8 @@ inline Identifier CaloLVL1_ID::tower_id ( const Identifier layerId ) const } //---------------------------------------------------------------------------- -inline Identifier CaloLVL1_ID::region_id (int pos_neg_z, int sampling, int region)const +inline Identifier CaloLVL1_ID::region_id (int pos_neg_z, int sampling, int region, + bool checks)const { Identifier result(0); // Pack fields independently @@ -468,16 +492,22 @@ inline Identifier CaloLVL1_ID::region_id (int pos_neg_z, int sampling, int regio m_region_impl.pack (region, result); // Do checks - if(m_do_checks) { + if(checks) { region_id_checks( pos_neg_z, sampling, region); } return result; } +inline Identifier CaloLVL1_ID::region_id (int pos_neg_z, int sampling, int region)const +{ + return region_id (pos_neg_z, sampling, region, do_checks()); +} + //---------------------------------------------------------------------------- inline Identifier CaloLVL1_ID::layer_id ( int pos_neg_z, int sampling, int region, - int eta, int phi, int layer ) const + int eta, int phi, int layer, + bool checks) const { Identifier result(0); // Pack fields independently @@ -490,16 +520,22 @@ inline Identifier CaloLVL1_ID::layer_id ( int pos_neg_z, int sampling, int reg m_layer_impl.pack (layer, result); // Do checks - if(m_do_checks) { + if(checks) { layer_id_checks( pos_neg_z, sampling, region, eta, phi, layer ); } return result; } +inline Identifier CaloLVL1_ID::layer_id ( int pos_neg_z, int sampling, int region, + int eta, int phi, int layer ) const +{ + return layer_id (pos_neg_z, sampling, region, eta, phi, layer, do_checks()); +} + //---------------------------------------------------------------------------- inline Identifier CaloLVL1_ID::layer_id ( const Identifier towerId, - int layer ) const + int layer, bool checks ) const { Identifier result(towerId); @@ -507,13 +543,19 @@ inline Identifier CaloLVL1_ID::layer_id ( const Identifier towerId, m_layer_impl.reset (result); m_layer_impl.pack (layer, result); // Do checks - if(m_do_checks) { + if(checks) { layer_id_checks( towerId, layer ); } return result; } +inline Identifier CaloLVL1_ID::layer_id ( const Identifier towerId, + int layer ) const +{ + return layer_id (towerId, layer, do_checks()); +} + //---------------------------------------------------------------------------- inline CaloLVL1_ID::size_type CaloLVL1_ID::tower_hash_max (void) const { diff --git a/Calorimeter/CaloIdentifier/CaloIdentifier/JGTowerBase_ID.h b/Calorimeter/CaloIdentifier/CaloIdentifier/JGTowerBase_ID.h index 17a5a8c6c160266c685fbf76c3119563e6da43fb..b75d8c37e702c7de7c8a8b078e5cfcaa16305620 100644 --- a/Calorimeter/CaloIdentifier/CaloIdentifier/JGTowerBase_ID.h +++ b/Calorimeter/CaloIdentifier/CaloIdentifier/JGTowerBase_ID.h @@ -1,7 +1,7 @@ // This file's extension implies that it's C, but it's really -*- C++ -*-. /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // $Id$ @@ -42,14 +42,19 @@ public: /** build a tower identifier */ Identifier tower_id (int pos_neg, int sampling, int region, - int eta, int phi ) const ; + int eta, int phi ) const ; + Identifier tower_id (int pos_neg, int sampling, int region, + int eta, int phi, bool checks ) const ; /** build a tower identifier */ Identifier tower_id (const Identifier regionId, - int eta, int phi ) const ; + int eta, int phi ) const ; + Identifier tower_id (const Identifier regionId, + int eta, int phi, bool checks ) const ; /** build a region (of towers) identifier */ Identifier region_id ( int pos_neg, int sampling, int region ) const; + Identifier region_id ( int pos_neg, int sampling, int region, bool checks ) const; /** access to IdContext's which define which levels of fields are contained in the id */ /** id for towers ("reduced" id) */ @@ -359,7 +364,7 @@ private: CLASS_DEF( JGTowerBase_ID , 131336095, 1 ) inline Identifier JGTowerBase_ID::tower_id ( int pos_neg, int sampling, int region, - int eta, int phi ) const + int eta, int phi, bool checks ) const { Identifier result(0); // Pack fields independently @@ -371,15 +376,22 @@ inline Identifier JGTowerBase_ID::tower_id ( int pos_neg, int sampling, int re m_phi_impl.pack (phi, result); // Do checks - if(m_do_checks) { + if(checks) { tower_id_checks( pos_neg, sampling, region, eta, phi ); } return result; } + +inline Identifier JGTowerBase_ID::tower_id ( int pos_neg, int sampling, int region, + int eta, int phi ) const +{ + return tower_id (pos_neg, sampling, region, eta, phi, do_checks()); +} + //---------------------------------------------------------------------------- inline Identifier JGTowerBase_ID::tower_id ( const Identifier regionId, - int eta, int phi ) const + int eta, int phi, bool checks ) const { Identifier result(regionId); @@ -390,13 +402,19 @@ inline Identifier JGTowerBase_ID::tower_id ( const Identifier regionId, m_phi_impl.pack (phi, result); // Do checks - if(m_do_checks) { + if(checks) { tower_id_checks( regionId, eta, phi ); } return result; } +inline Identifier JGTowerBase_ID::tower_id ( const Identifier regionId, + int eta, int phi ) const +{ + return tower_id (regionId, eta, phi, do_checks()); +} + //---------------------------------------------------------------------------- inline JGTowerBase_ID::size_type JGTowerBase_ID::tower_hash_max (void) const @@ -536,7 +554,8 @@ inline Identifier JGTowerBase_ID::region_id ( const Identifier tower_Id ) cons } //---------------------------------------------------------------------------- -inline Identifier JGTowerBase_ID::region_id (int pos_neg, int sampling, int region)const +inline Identifier JGTowerBase_ID::region_id (int pos_neg, int sampling, int region, + bool checks) const { Identifier result(0); // Pack fields independently @@ -546,13 +565,19 @@ inline Identifier JGTowerBase_ID::region_id (int pos_neg, int sampling, int regi m_region_impl.pack (region, result); // Do checks - if(m_do_checks) { + if(checks) { region_id_checks( pos_neg, sampling, region); } return result; } +inline Identifier JGTowerBase_ID::region_id (int pos_neg, int sampling, int region)const +{ + return region_id (pos_neg, sampling, region, do_checks()); +} + + //---------------------------------------------------------------------------- inline Identifier JGTowerBase_ID::tower_id (IdentifierHash tower_hash_id) const { diff --git a/Calorimeter/CaloIdentifier/CaloIdentifier/LArEM_Base_ID.h b/Calorimeter/CaloIdentifier/CaloIdentifier/LArEM_Base_ID.h index 45574bcc888d726e54bf0fe792b823d3e7f5fd34..23dcfaa995d2a21709ad2d40398833e372523ce3 100644 --- a/Calorimeter/CaloIdentifier/CaloIdentifier/LArEM_Base_ID.h +++ b/Calorimeter/CaloIdentifier/CaloIdentifier/LArEM_Base_ID.h @@ -1,7 +1,7 @@ // This file's extension implies that it's C, but it's really -*- C++ -*-. /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // $Id$ @@ -52,10 +52,13 @@ public: /** build a region identifier */ Identifier region_id (int barrel_ec, int sampling, int region ) const; + Identifier region_id (int barrel_ec, int sampling, int region, bool checks ) const; /** build a cell identifier */ Identifier channel_id (int barrel_ec, int sampling, int region, int eta, int phi ) const; + Identifier channel_id (int barrel_ec, int sampling, int region, + int eta, int phi, bool checks ) const; /** allows to know in which region is a channel/cell -- valid for both kinds of channels */ @@ -65,6 +68,8 @@ public: -- valid for both kinds of channels */ Identifier channel_id (const Identifier regionId, int eta, int phi ) const; + Identifier channel_id (const Identifier regionId, + int eta, int phi, bool checks ) const; /** create hash id from channel id */ IdentifierHash channel_hash (Identifier channelId) const; diff --git a/Calorimeter/CaloIdentifier/CaloIdentifier/LArEM_Base_ID.icc b/Calorimeter/CaloIdentifier/CaloIdentifier/LArEM_Base_ID.icc index ca6d994671fbeae5db010e190b45c0766808e48a..91a10295d9ffdb14aa4e3d12157a223b02937c8e 100644 --- a/Calorimeter/CaloIdentifier/CaloIdentifier/LArEM_Base_ID.icc +++ b/Calorimeter/CaloIdentifier/CaloIdentifier/LArEM_Base_ID.icc @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // $Id$ @@ -37,11 +37,11 @@ LArEM_Base_ID::channel_id ( const ExpandedIdentifier& exp_id) const //---------------------------------------------------------------------------- inline Identifier -LArEM_Base_ID::region_id (int barrel_ec, int sampling, int region) const +LArEM_Base_ID::region_id (int barrel_ec, int sampling, int region, bool checks) const { // Do checks - if(m_do_checks) { + if(checks) { region_id_checks ( barrel_ec, sampling, region ); } @@ -58,14 +58,20 @@ LArEM_Base_ID::region_id (int barrel_ec, int sampling, int region) const return result; } +inline Identifier +LArEM_Base_ID::region_id (int barrel_ec, int sampling, int region) const +{ + return region_id (barrel_ec, sampling, region, do_checks()); +} + //---------------------------------------------------------------------------- inline Identifier LArEM_Base_ID::channel_id ( int barrel_ec, int sampling, int region, - int eta, int phi ) const + int eta, int phi, bool checks ) const { // Do checks - if(m_do_checks) { + if(checks) { channel_id_checks( barrel_ec, sampling, region, eta, phi ); } @@ -83,6 +89,13 @@ LArEM_Base_ID::channel_id ( int barrel_ec, int sampling, int region, return result; } +inline Identifier +LArEM_Base_ID::channel_id ( int barrel_ec, int sampling, int region, + int eta, int phi ) const +{ + return channel_id (barrel_ec, sampling, region, eta, phi, do_checks()); +} + //---------------------------------------------------------------------------- inline Identifier @@ -99,10 +112,10 @@ LArEM_Base_ID::region_id ( const Identifier channelId ) const //---------------------------------------------------------------------------- inline Identifier LArEM_Base_ID::channel_id ( const Identifier regionId, - int eta, int phi ) const + int eta, int phi, bool checks ) const { // Do checks - if(m_do_checks) { + if(checks) { channel_id_checks( regionId, eta, phi ); } @@ -118,6 +131,13 @@ LArEM_Base_ID::channel_id ( const Identifier regionId, return result; } +inline Identifier +LArEM_Base_ID::channel_id ( const Identifier regionId, + int eta, int phi ) const +{ + return channel_id (regionId, eta, phi, do_checks()); +} + //---------------------------------------------------------------------------- inline IdentifierHash LArEM_Base_ID::channel_hash (Identifier channelId) const { diff --git a/Calorimeter/CaloIdentifier/CaloIdentifier/LArFCAL_Base_ID.h b/Calorimeter/CaloIdentifier/CaloIdentifier/LArFCAL_Base_ID.h index 8a5fc4dd415b3eeba8ae74870f5458e140c24723..ea7cdf5f1c161563302ec8a04fe002ffbb82e3f3 100755 --- a/Calorimeter/CaloIdentifier/CaloIdentifier/LArFCAL_Base_ID.h +++ b/Calorimeter/CaloIdentifier/CaloIdentifier/LArFCAL_Base_ID.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef CALOIDENTIFIER_LARFCAL_BASE_ID_H @@ -31,10 +31,13 @@ public: /** build a module identifier for a channel */ Identifier module_id ( int pos_neg, int module ) const ; + Identifier module_id ( int pos_neg, int module, bool checks ) const ; /** build a cell identifier for a channel */ Identifier channel_id( int pos_neg, int module, int eta, int phi ) const ; + Identifier channel_id( int pos_neg, int module, + int eta, int phi, bool checks ) const ; /** allows to know in which region is a channel/cell -- valid for both kinds of channels */ @@ -44,6 +47,8 @@ public: -- valid for both kinds of channels */ Identifier channel_id( const Identifier moduleId, int eta, int phi) const ; + Identifier channel_id( const Identifier moduleId, + int eta, int phi, bool checks) const ; /** create module id from hash id*/ Identifier module_id (IdentifierHash module_hash_id) const; diff --git a/Calorimeter/CaloIdentifier/CaloIdentifier/LArFCAL_Base_ID.icc b/Calorimeter/CaloIdentifier/CaloIdentifier/LArFCAL_Base_ID.icc index d633c157694704792b77dad82828e54a2d086465..dccad8e3537ad544d21b1672d084858c70a9da71 100644 --- a/Calorimeter/CaloIdentifier/CaloIdentifier/LArFCAL_Base_ID.icc +++ b/Calorimeter/CaloIdentifier/CaloIdentifier/LArFCAL_Base_ID.icc @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // $Id$ @@ -35,10 +35,10 @@ LArFCAL_Base_ID::channel_id (const ExpandedIdentifier& exp_id) const //---------------------------------------------------------------------------- inline Identifier -LArFCAL_Base_ID::module_id (int pos_neg, int module) const +LArFCAL_Base_ID::module_id (int pos_neg, int module, bool checks) const { // Do checks - if(m_do_checks) { + if(checks) { module_id_checks ( pos_neg, module ); } @@ -54,13 +54,19 @@ LArFCAL_Base_ID::module_id (int pos_neg, int module) const return result; } +inline Identifier +LArFCAL_Base_ID::module_id (int pos_neg, int module) const +{ + return module_id (pos_neg, module, do_checks()); +} + //---------------------------------------------------------------------------- inline Identifier LArFCAL_Base_ID::channel_id ( int pos_neg, int module, - int eta, int phi ) const -{ + int eta, int phi, bool checks ) const +{ // Do checks - if(m_do_checks) { + if(checks) { channel_id_checks( pos_neg, module, eta, phi ); } @@ -77,6 +83,13 @@ LArFCAL_Base_ID::channel_id ( int pos_neg, int module, return result; } +inline Identifier +LArFCAL_Base_ID::channel_id ( int pos_neg, int module, + int eta, int phi ) const +{ + return channel_id (pos_neg, module, eta, phi, do_checks()); +} + //---------------------------------------------------------------------------- inline Identifier @@ -94,10 +107,10 @@ LArFCAL_Base_ID::module_id ( const Identifier channelId ) const //---------------------------------------------------------------------------- inline Identifier LArFCAL_Base_ID::channel_id ( const Identifier module_id, - int eta, int phi ) const + int eta, int phi, bool checks ) const { // Do checks - if(m_do_checks) { + if(checks) { channel_id_checks( module_id, eta, phi ); } @@ -113,6 +126,13 @@ LArFCAL_Base_ID::channel_id ( const Identifier module_id, return result; } +inline Identifier +LArFCAL_Base_ID::channel_id ( const Identifier module_id, + int eta, int phi ) const +{ + return channel_id (module_id, eta, phi, do_checks()); +} + //---------------------------------------------------------------------------- inline Identifier LArFCAL_Base_ID::module_id (IdentifierHash module_hash_id) const { diff --git a/Calorimeter/CaloIdentifier/CaloIdentifier/LArHEC_Base_ID.h b/Calorimeter/CaloIdentifier/CaloIdentifier/LArHEC_Base_ID.h index d2b03232e5f5a90471a6f807c63b4bbff96f7b81..5181a298826f47da1001f949ed7e498016aad0aa 100755 --- a/Calorimeter/CaloIdentifier/CaloIdentifier/LArHEC_Base_ID.h +++ b/Calorimeter/CaloIdentifier/CaloIdentifier/LArHEC_Base_ID.h @@ -1,7 +1,7 @@ // This file's extension implies that it's C, but it's really -*- C++ -*-. /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // $Id$ @@ -57,10 +57,13 @@ public: /** build a region identifier for a channel */ Identifier region_id (int pos_neg, int sampling, int region ) const ; + Identifier region_id (int pos_neg, int sampling, int region, bool checks) const; /** build a cell identifier for a channel */ Identifier channel_id (int pos_neg, int sampling, int region, - int eta, int phi ) const ; + int eta, int phi ) const; + Identifier channel_id (int pos_neg, int sampling, int region, + int eta, int phi, bool checks) const; /** build a cell identifier for a channel <br> eta counting includes regions */ @@ -88,6 +91,8 @@ public: -- valid for both kinds of channels */ Identifier channel_id (const Identifier regionId, int eta, int phi ) const ; + Identifier channel_id (const Identifier regionId, + int eta, int phi, bool checks) const; /** Test if the identifier represents a supercell. */ bool is_supercell (const Identifier id)const; diff --git a/Calorimeter/CaloIdentifier/CaloIdentifier/LArHEC_Base_ID.icc b/Calorimeter/CaloIdentifier/CaloIdentifier/LArHEC_Base_ID.icc index bb1391e3a6705587bcd70b6b43eaef1a0681c9ec..54a6ea24ccac272ed685909d3ce4d15910197f19 100644 --- a/Calorimeter/CaloIdentifier/CaloIdentifier/LArHEC_Base_ID.icc +++ b/Calorimeter/CaloIdentifier/CaloIdentifier/LArHEC_Base_ID.icc @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // $Id$ @@ -36,10 +36,10 @@ LArHEC_Base_ID::channel_id (const ExpandedIdentifier& exp_id) const //---------------------------------------------------------------------------- inline Identifier -LArHEC_Base_ID::region_id (int pos_neg, int sampling, int region) const +LArHEC_Base_ID::region_id (int pos_neg, int sampling, int region, bool checks) const { // Do checks - if(m_do_checks) { + if(checks) { region_id_checks ( pos_neg, sampling, region ); } @@ -56,13 +56,20 @@ LArHEC_Base_ID::region_id (int pos_neg, int sampling, int region) const return result; } +inline Identifier +LArHEC_Base_ID::region_id (int pos_neg, int sampling, int region) const +{ + return region_id (pos_neg, sampling, region, do_checks()); +} + //---------------------------------------------------------------------------- inline Identifier LArHEC_Base_ID::channel_id ( int pos_neg, int sampling, int region, - int eta, int phi ) const + int eta, int phi, + bool checks) const { // Do checks - if(m_do_checks) { + if(checks) { channel_id_checks( pos_neg, sampling, region, eta, phi ); } @@ -79,6 +86,12 @@ LArHEC_Base_ID::channel_id ( int pos_neg, int sampling, int region, return result; } +inline Identifier +LArHEC_Base_ID::channel_id ( int pos_neg, int sampling, int region, + int eta, int phi ) const +{ + return channel_id (pos_neg, sampling, region, eta, phi, do_checks()); +} //---------------------------------------------------------------------------- inline Identifier @@ -96,10 +109,11 @@ LArHEC_Base_ID::region_id ( const Identifier channelId ) const //---------------------------------------------------------------------------- inline Identifier LArHEC_Base_ID::channel_id ( const Identifier regionId, - int eta, int phi ) const + int eta, int phi, + bool checks) const { // Do checks - if(m_do_checks) { + if(checks) { channel_id_checks( regionId, eta, phi ); } @@ -115,6 +129,13 @@ LArHEC_Base_ID::channel_id ( const Identifier regionId, return result; } +inline Identifier +LArHEC_Base_ID::channel_id ( const Identifier regionId, + int eta, int phi ) const +{ + return channel_id (regionId, eta, phi, do_checks()); +} + //---------------------------------------------------------------------------- inline IdentifierHash LArHEC_Base_ID::channel_hash (Identifier channelId) const { diff --git a/Calorimeter/CaloIdentifier/CaloIdentifier/LArMiniFCAL_ID.h b/Calorimeter/CaloIdentifier/CaloIdentifier/LArMiniFCAL_ID.h index f6328a9af76fb9de246580a2810e10fc8e6597db..b3dc8a743352d18fd3147a3d610cf5ffa969109f 100644 --- a/Calorimeter/CaloIdentifier/CaloIdentifier/LArMiniFCAL_ID.h +++ b/Calorimeter/CaloIdentifier/CaloIdentifier/LArMiniFCAL_ID.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef LARMiniFCAL_ID_H @@ -75,10 +75,13 @@ public: /** build a module identifier for a channel */ Identifier module_id ( int pos_neg, int module ) const ; + Identifier module_id ( int pos_neg, int module, bool checks ) const ; /** build a cell identifier for a channel */ Identifier channel_id( int pos_neg, int module, int depth, int eta, int phi ) const ; + Identifier channel_id( int pos_neg, int module, int depth, + int eta, int phi, bool checks ) const ; /** allows to know in which region is a channel/cell -- valid for both kinds of channels */ @@ -88,6 +91,8 @@ public: -- valid for both kinds of channels */ Identifier channel_id( const Identifier moduleId, int depth, int eta, int phi) const ; + Identifier channel_id( const Identifier moduleId, int depth, + int eta, int phi, bool checks) const ; bool is_supercell (const Identifier channelId) const; @@ -308,13 +313,13 @@ LArMiniFCAL_ID::channel_id (const ExpandedIdentifier& exp_id) const //---------------------------------------------------------------------------- inline Identifier -LArMiniFCAL_ID::module_id (int pos_neg, int module) const +LArMiniFCAL_ID::module_id (int pos_neg, int module, bool checks) const { Identifier result(0); // Do checks - if(m_do_checks) { + if(checks) { module_id_checks ( pos_neg, module ); } @@ -327,14 +332,21 @@ LArMiniFCAL_ID::module_id (int pos_neg, int module) const return result; } +inline Identifier +LArMiniFCAL_ID::module_id (int pos_neg, int module) const +{ + return module_id (pos_neg, module, do_checks()); +} + //---------------------------------------------------------------------------- inline Identifier LArMiniFCAL_ID::channel_id ( int pos_neg, int module, int depth, - int eta, int phi ) const + int eta, int phi, + bool checks ) const { // Do checks - if(m_do_checks) { + if(checks) { channel_id_checks( pos_neg, module, depth, eta, phi ); } @@ -351,6 +363,13 @@ LArMiniFCAL_ID::channel_id ( int pos_neg, int module, int depth, return result; } +inline Identifier +LArMiniFCAL_ID::channel_id ( int pos_neg, int module, int depth, + int eta, int phi ) const +{ + return channel_id (pos_neg, module, depth, eta, phi, do_checks()); +} + //---------------------------------------------------------------------------- inline Identifier LArMiniFCAL_ID::module_id ( const Identifier channelId ) const @@ -367,10 +386,11 @@ LArMiniFCAL_ID::module_id ( const Identifier channelId ) const //---------------------------------------------------------------------------- inline Identifier LArMiniFCAL_ID::channel_id ( const Identifier module_id, int depth, - int eta, int phi ) const + int eta, int phi, + bool checks) const { // Do checks - if(m_do_checks) { + if(checks) { channel_id_checks( module_id, depth, eta, phi ); } @@ -387,6 +407,13 @@ LArMiniFCAL_ID::channel_id ( const Identifier module_id, int depth, return result; } +inline Identifier +LArMiniFCAL_ID::channel_id ( const Identifier module_id, int depth, + int eta, int phi) const +{ + return channel_id (module_id, depth, eta, phi, do_checks()); +} + //---------------------------------------------------------------------------- inline Identifier LArMiniFCAL_ID::module_id (IdentifierHash module_hash_id) const { diff --git a/Calorimeter/CaloIdentifier/CaloIdentifier/TTOnlineID.h b/Calorimeter/CaloIdentifier/CaloIdentifier/TTOnlineID.h index 1a23595a0e27d4f41e08aace70fdc73e10c6e169..71349afa2cab84032a8948511ab9ffa7421fffca 100755 --- a/Calorimeter/CaloIdentifier/CaloIdentifier/TTOnlineID.h +++ b/Calorimeter/CaloIdentifier/CaloIdentifier/TTOnlineID.h @@ -1,465 +1,488 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ -#ifndef CALOIDENTIFIER_TTONLINEID_H -#define CALOIDENTIFIER_TTONLINEID_H - -#include "AthenaKernel/CLASS_DEF.h" -#include "GaudiKernel/MsgStream.h" -#include "AtlasDetDescr/AtlasDetectorID.h" -#include "Identifier/HWIdentifier.h" -#include "Identifier/IdentifierHash.h" -#include "Identifier/Range.h" -#include "IdDict/IdDictFieldImplementation.h" -#include "IdDict/IdDictDefs.h" -#include "CaloIdentifier/CaloID_Exception.h" -#include <vector> -#include <iostream> -#include <algorithm> -#include <map> - -//using namespace std; - -class IdentifierHash; -class Range; - -/** -* -* @class TTOnlineID -* @brief Helper class for Calo TT online identifiers -* -* This class provides an interface to decode and generate online identifiers -* for the Calorimeter Trigger Towers. <p> -* -*/ -class TTOnlineID : public AtlasDetectorID -{ - public: - - typedef Identifier::size_type size_type; - - TTOnlineID(void); - ~TTOnlineID(void); - - - /* build towerId HWIdentifier */ - /*=========================== */ - /** (1) create towerId from fields */ - HWIdentifier crateId( int crate ) const; - /** (2) create towerId from hash */ - HWIdentifier crateId( IdentifierHash crate_hash ) const; - /** (3) create towerId from hash */ - IdentifierHash crateHash( HWIdentifier crate_id ) const; - /** (4) iterator over towerId */ - std::vector<HWIdentifier>::const_iterator crate_begin(void) const; - std::vector<HWIdentifier>::const_iterator crate_end(void) const; - - /* build moduleId HWIdentifier */ - /*=========================== */ - /** (1) create towerId from fields */ - HWIdentifier moduleId( int crate, int module) const; - /** (2) create towerId from hash */ - HWIdentifier moduleId( IdentifierHash crate_hash ) const; - /** (3) create towerId from hash */ - IdentifierHash moduleHash( HWIdentifier crate_id ) const; - /** (4) iterator over towerId */ - std::vector<HWIdentifier>::const_iterator module_begin(void) const; - std::vector<HWIdentifier>::const_iterator module_end(void) const; - - /* build submoduleId HWIdentifier */ - /*=========================== */ - /** (1) create towerId from fields */ - HWIdentifier submoduleId( int crate, int module, int submodule) const; - /** (2) create towerId from hash */ - HWIdentifier submoduleId( IdentifierHash crate_hash ) const; - /** (3) create towerId from hash */ - IdentifierHash submoduleHash( HWIdentifier crate_id ) const; - /** (4) iterator over towerId */ - std::vector<HWIdentifier>::const_iterator submodule_begin(void) const; - std::vector<HWIdentifier>::const_iterator submodule_end(void) const; - - /* build moduleId HWIdentifier */ - /*=========================== */ - /** (1) create towerId from fields */ - HWIdentifier channelId( int crate, int module, int submodule, int channel) const; - /** (2) create towerId from hash */ - HWIdentifier channelId( IdentifierHash crate_hash ) const; - /** (3) create towerId from hash */ - IdentifierHash channelHash( HWIdentifier crate_id ) const; - /** (4) iterator over towerId */ - std::vector<HWIdentifier>::const_iterator channel_begin(void) const; - std::vector<HWIdentifier>::const_iterator channel_end(void) const; - - - - /* hash tables max size */ - /*====================== */ - size_type crateHashMax (void) const; - size_type moduleHashMax (void) const; - size_type submoduleHashMax (void) const; - size_type channelHashMax (void) const; - - - /** Initialization from the identifier dictionary*/ - virtual int initialize_from_dictionary (const IdDictMgr& dict_mgr); - - - // HWIdentifier Fields for TTOnlineID - // ======================================== - int crate( const HWIdentifier id )const; - int module( const HWIdentifier id )const; - int submodule( const HWIdentifier id )const; - int channel( const HWIdentifier id )const; - - - /** context for feedthroughs, feb & channels */ - - IdContext crateContext(void) const; - IdContext moduleContext(void) const; - IdContext submoduleContext(void) const; - IdContext channelContext(void) const; - - -private: - - enum {NOT_VALID_HASH = 256000}; - - IdentifierHash channel_hash_binary_search(HWIdentifier channelId) const; - - // Check methods - void channel_Id_checks(int crate, int module, int submodule, int channel ) const; - void channel_Id_checks(const HWIdentifier crateId, int module, int submodule, int channel ) const; - void channel_Id_checks(const HWIdentifier moduleId, int submodule, int channel ) const; - void channel_Id_checks(const HWIdentifier submoduleId, int channel ) const; - - void submodule_Id_checks(int crate, int module, int submodule ) const; - void module_Id_checks(int crate, int module ) const; - void crate_Id_checks( int crate ) const; - - /** create expanded HWIdentifier from HWIdentifier (return == 0 for OK) */ - int get_expanded_id (const HWIdentifier& id, ExpandedIdentifier& exp_id, - const IdContext* context) const; - - /** return the value of the detzside field (initialized in initialize_from_dictionary())*/ - int detzside_field_value() const; - - /** init() hashes */ - int initLevelsFromDict(void) ; - int init_hashes(void); - - /** Member Data index */ - size_type m_calo_index; - size_type m_detzside_index; - size_type m_l1online_regions_index; - size_type m_crate_index; - size_type m_module_index; - size_type m_submodule_index; - size_type m_channel_index; - - const IdDictDictionary* m_dict; - MultiRange m_full_crate_range; - MultiRange m_full_module_range; - MultiRange m_full_submodule_range; - MultiRange m_full_channel_range; - - size_type m_crateHashMax; - size_type m_moduleHashMax; - size_type m_submoduleHashMax; - size_type m_channelHashMax; - - std::vector<HWIdentifier> m_crate_vec; - std::vector<HWIdentifier> m_module_vec; - std::vector<HWIdentifier> m_submodule_vec; - std::vector<HWIdentifier> m_channel_vec; - - int m_iDetZSideFieldValue; - - /** - @brief small class holding the starting hash value, the min eta and the number of phi bins of each region <br> - used to CPU-optimize the conversion from an identifier to a hash index - */ - class HashCalc - { - public: - HashCalc() : - m_hash(0), - m_channelmin(0) {} - IdentifierHash m_hash; - size_type m_channelmin; - }; - std::vector<HashCalc> m_hash_calcs; - - - /** Field Implementation */ - IdDictFieldImplementation m_calo_impl; - IdDictFieldImplementation m_calo_detzside_impl; - IdDictFieldImplementation m_crate_impl; - IdDictFieldImplementation m_module_impl; - IdDictFieldImplementation m_submodule_impl; - IdDictFieldImplementation m_channel_impl; -}; - - -//using the macro below we can assign an identifier (and a version) -//This is required and checked at compile time when you try to record/retrieve -CLASS_DEF( TTOnlineID , 38321944 , 1 ) - - -//===================== -// Inline Definitions -//===================== - -/* Crates */ - -//========================================================================================================== -inline HWIdentifier TTOnlineID::crateId( int crate ) const -//========================================================================================================== -{ - HWIdentifier result(0); - m_calo_impl.pack (10 , result); - m_calo_detzside_impl.pack (0 , result); - m_crate_impl.pack (crate , result); - - /* Do checks */ - if(m_do_checks) { - crate_Id_checks( crate ); - } - return result; -} - -//============================================================================== */ -inline HWIdentifier TTOnlineID::crateId(IdentifierHash cratehash_id) const -//===============================================================================*/ -{ - return(m_crate_vec[cratehash_id]); -} - -//============================================================================= -inline IdentifierHash TTOnlineID::crateHash (HWIdentifier crate_id) const{ -//============================================================================= - std::vector<HWIdentifier>::const_iterator it = std::lower_bound(m_crate_vec.begin(),m_crate_vec.end(),crate_id); - if ( it != m_crate_vec.end() ){ - return (it - m_crate_vec.begin()); - } - return (0); -} - -//============================================================================= -inline std::vector<HWIdentifier>::const_iterator TTOnlineID::crate_begin(void) const { -//============================================================================= - return(m_crate_vec.begin()); -} - -//============================================================================= -inline std::vector<HWIdentifier>::const_iterator TTOnlineID::crate_end(void) const { -//============================================================================= - return(m_crate_vec.end()); -} - -/* Modules */ - -//========================================================================================================== -inline HWIdentifier TTOnlineID::moduleId( int crate, int module ) const -//========================================================================================================== -{ - HWIdentifier result(0); - m_calo_impl.pack (10 , result); - m_calo_detzside_impl.pack (0 , result); - m_crate_impl.pack (crate , result); - m_module_impl.pack (module , result); - - /* Do checks */ - if(m_do_checks) { - module_Id_checks( crate, module ); - } - return result; -} - -//============================================================================== */ -inline HWIdentifier TTOnlineID::moduleId(IdentifierHash modulehash_id) const -//===============================================================================*/ -{ - return(m_module_vec[modulehash_id]); -} - -//============================================================================= -inline IdentifierHash TTOnlineID::moduleHash (HWIdentifier module_id) const{ -//============================================================================= - std::vector<HWIdentifier>::const_iterator it = std::lower_bound(m_module_vec.begin(),m_module_vec.end(),module_id); - if ( it != m_module_vec.end() ){ - return (it - m_module_vec.begin()); - } - return (0); -} - -//============================================================================= -inline std::vector<HWIdentifier>::const_iterator TTOnlineID::module_begin(void) const { -//============================================================================= - return(m_module_vec.begin()); -} - -//============================================================================= -inline std::vector<HWIdentifier>::const_iterator TTOnlineID::module_end(void) const { -//============================================================================= - return(m_module_vec.end()); -} - - -/* SubModules */ - -//========================================================================================================== -inline HWIdentifier TTOnlineID::submoduleId( int crate, int module, int submodule ) const -//========================================================================================================== -{ - HWIdentifier result(0); - m_calo_impl.pack (10 , result); - m_calo_detzside_impl.pack (0 , result); - m_crate_impl.pack (crate , result); - m_module_impl.pack (module , result); - m_submodule_impl.pack (submodule , result); - - /* Do checks */ - if(m_do_checks) { - submodule_Id_checks( crate, module, submodule ); - } - return result; -} - -//============================================================================== */ -inline HWIdentifier TTOnlineID::submoduleId(IdentifierHash submodulehash_id) const -//===============================================================================*/ -{ - return(m_submodule_vec[submodulehash_id]); -} - -//============================================================================= -inline IdentifierHash TTOnlineID::submoduleHash (HWIdentifier submodule_id) const{ -//============================================================================= - std::vector<HWIdentifier>::const_iterator it = std::lower_bound(m_submodule_vec.begin(),m_submodule_vec.end(),submodule_id); - if ( it != m_submodule_vec.end() ){ - return (it - m_submodule_vec.begin()); - } - return (0); -} - -//============================================================================= -inline std::vector<HWIdentifier>::const_iterator TTOnlineID::submodule_begin(void) const { -//============================================================================= - return(m_submodule_vec.begin()); -} - -//============================================================================= -inline std::vector<HWIdentifier>::const_iterator TTOnlineID::submodule_end(void) const { -//============================================================================= - return(m_submodule_vec.end()); -} - - -/* Channels */ - -//========================================================================================================== -inline HWIdentifier TTOnlineID::channelId( int crate, int module, int submodule, int channel ) const -//========================================================================================================== -{ - HWIdentifier result(0); - m_calo_impl.pack (10 , result); - m_calo_detzside_impl.pack (0 , result); - m_crate_impl.pack (crate , result); - m_module_impl.pack (module , result); - m_submodule_impl.pack (submodule , result); - m_channel_impl.pack (channel , result); - - /* Do checks */ - if(m_do_checks) { - channel_Id_checks( crate, module, submodule, channel ); - } - return result; -} - -//============================================================================== */ -inline HWIdentifier TTOnlineID::channelId(IdentifierHash channelhash_id) const -//===============================================================================*/ -{ - return(m_channel_vec[channelhash_id]); -} - -//============================================================================= -inline IdentifierHash TTOnlineID::channelHash (HWIdentifier channel_id) const{ -//============================================================================= - std::vector<HWIdentifier>::const_iterator it = std::lower_bound(m_channel_vec.begin(),m_channel_vec.end(),channel_id); - if ( it != m_channel_vec.end() ){ - return (it - m_channel_vec.begin()); - } - return (0); -} - -//============================================================================= -inline std::vector<HWIdentifier>::const_iterator TTOnlineID::channel_begin(void) const { -//============================================================================= - return(m_channel_vec.begin()); -} - -//============================================================================= -inline std::vector<HWIdentifier>::const_iterator TTOnlineID::channel_end(void) const { -//============================================================================= - return(m_channel_vec.end()); -} - - -/* Hash indices */ - -inline TTOnlineID::size_type TTOnlineID::crateHashMax (void) const -/*====================================================================*/ -{ - return m_crateHashMax; -} - -inline TTOnlineID::size_type TTOnlineID::moduleHashMax (void) const -/*====================================================================*/ -{ - return m_moduleHashMax; -} - -inline TTOnlineID::size_type TTOnlineID::submoduleHashMax (void) const -/*====================================================================*/ -{ - return m_submoduleHashMax; -} - -inline TTOnlineID::size_type TTOnlineID::channelHashMax (void) const -/*====================================================================*/ -{ - return m_channelHashMax; -} - -inline int TTOnlineID::crate(const HWIdentifier id)const -/*===========================================================*/ -{ - return (m_crate_impl.unpack(id)); -} - -inline int TTOnlineID::module(const HWIdentifier id)const -/*===========================================================*/ -{ - return (m_module_impl.unpack(id)); -} - -inline int TTOnlineID::submodule(const HWIdentifier id)const -/*===========================================================*/ -{ - return (m_submodule_impl.unpack(id)); -} - -inline int TTOnlineID::channel(const HWIdentifier id)const -/*===========================================================*/ -{ - return (m_channel_impl.unpack(id)); -} - -inline int TTOnlineID::detzside_field_value() const -{ - return m_iDetZSideFieldValue; -} - -#endif // TTOnlineID_H +#ifndef CALOIDENTIFIER_TTONLINEID_H +#define CALOIDENTIFIER_TTONLINEID_H + +#include "AthenaKernel/CLASS_DEF.h" +#include "GaudiKernel/MsgStream.h" +#include "AtlasDetDescr/AtlasDetectorID.h" +#include "Identifier/HWIdentifier.h" +#include "Identifier/IdentifierHash.h" +#include "Identifier/Range.h" +#include "IdDict/IdDictFieldImplementation.h" +#include "IdDict/IdDictDefs.h" +#include "CaloIdentifier/CaloID_Exception.h" +#include <vector> +#include <iostream> +#include <algorithm> +#include <map> + +//using namespace std; + +class IdentifierHash; +class Range; + +/** +* +* @class TTOnlineID +* @brief Helper class for Calo TT online identifiers +* +* This class provides an interface to decode and generate online identifiers +* for the Calorimeter Trigger Towers. <p> +* +*/ +class TTOnlineID : public AtlasDetectorID +{ + public: + + typedef Identifier::size_type size_type; + + TTOnlineID(void); + ~TTOnlineID(void); + + + /* build towerId HWIdentifier */ + /*=========================== */ + /** (1) create towerId from fields */ + HWIdentifier crateId( int crate ) const; + HWIdentifier crateId( int crate, bool checks ) const; + /** (2) create towerId from hash */ + HWIdentifier crateId( IdentifierHash crate_hash ) const; + /** (3) create towerId from hash */ + IdentifierHash crateHash( HWIdentifier crate_id ) const; + /** (4) iterator over towerId */ + std::vector<HWIdentifier>::const_iterator crate_begin(void) const; + std::vector<HWIdentifier>::const_iterator crate_end(void) const; + + /* build moduleId HWIdentifier */ + /*=========================== */ + /** (1) create towerId from fields */ + HWIdentifier moduleId( int crate, int module) const; + HWIdentifier moduleId( int crate, int module, bool checks) const; + /** (2) create towerId from hash */ + HWIdentifier moduleId( IdentifierHash crate_hash ) const; + /** (3) create towerId from hash */ + IdentifierHash moduleHash( HWIdentifier crate_id ) const; + /** (4) iterator over towerId */ + std::vector<HWIdentifier>::const_iterator module_begin(void) const; + std::vector<HWIdentifier>::const_iterator module_end(void) const; + + /* build submoduleId HWIdentifier */ + /*=========================== */ + /** (1) create towerId from fields */ + HWIdentifier submoduleId( int crate, int module, int submodule) const; + HWIdentifier submoduleId( int crate, int module, int submodule, bool checks) const; + /** (2) create towerId from hash */ + HWIdentifier submoduleId( IdentifierHash crate_hash ) const; + /** (3) create towerId from hash */ + IdentifierHash submoduleHash( HWIdentifier crate_id ) const; + /** (4) iterator over towerId */ + std::vector<HWIdentifier>::const_iterator submodule_begin(void) const; + std::vector<HWIdentifier>::const_iterator submodule_end(void) const; + + /* build moduleId HWIdentifier */ + /*=========================== */ + /** (1) create towerId from fields */ + HWIdentifier channelId( int crate, int module, int submodule, int channel) const; + HWIdentifier channelId( int crate, int module, int submodule, int channel, bool checks) const; + /** (2) create towerId from hash */ + HWIdentifier channelId( IdentifierHash crate_hash ) const; + /** (3) create towerId from hash */ + IdentifierHash channelHash( HWIdentifier crate_id ) const; + /** (4) iterator over towerId */ + std::vector<HWIdentifier>::const_iterator channel_begin(void) const; + std::vector<HWIdentifier>::const_iterator channel_end(void) const; + + + + /* hash tables max size */ + /*====================== */ + size_type crateHashMax (void) const; + size_type moduleHashMax (void) const; + size_type submoduleHashMax (void) const; + size_type channelHashMax (void) const; + + + /** Initialization from the identifier dictionary*/ + virtual int initialize_from_dictionary (const IdDictMgr& dict_mgr); + + + // HWIdentifier Fields for TTOnlineID + // ======================================== + int crate( const HWIdentifier id )const; + int module( const HWIdentifier id )const; + int submodule( const HWIdentifier id )const; + int channel( const HWIdentifier id )const; + + + /** context for feedthroughs, feb & channels */ + + IdContext crateContext(void) const; + IdContext moduleContext(void) const; + IdContext submoduleContext(void) const; + IdContext channelContext(void) const; + + +private: + + enum {NOT_VALID_HASH = 256000}; + + IdentifierHash channel_hash_binary_search(HWIdentifier channelId) const; + + // Check methods + void channel_Id_checks(int crate, int module, int submodule, int channel ) const; + void channel_Id_checks(const HWIdentifier crateId, int module, int submodule, int channel ) const; + void channel_Id_checks(const HWIdentifier moduleId, int submodule, int channel ) const; + void channel_Id_checks(const HWIdentifier submoduleId, int channel ) const; + + void submodule_Id_checks(int crate, int module, int submodule ) const; + void module_Id_checks(int crate, int module ) const; + void crate_Id_checks( int crate ) const; + + /** create expanded HWIdentifier from HWIdentifier (return == 0 for OK) */ + int get_expanded_id (const HWIdentifier& id, ExpandedIdentifier& exp_id, + const IdContext* context) const; + + /** return the value of the detzside field (initialized in initialize_from_dictionary())*/ + int detzside_field_value() const; + + /** init() hashes */ + int initLevelsFromDict(void) ; + int init_hashes(void); + + /** Member Data index */ + size_type m_calo_index; + size_type m_detzside_index; + size_type m_l1online_regions_index; + size_type m_crate_index; + size_type m_module_index; + size_type m_submodule_index; + size_type m_channel_index; + + const IdDictDictionary* m_dict; + MultiRange m_full_crate_range; + MultiRange m_full_module_range; + MultiRange m_full_submodule_range; + MultiRange m_full_channel_range; + + size_type m_crateHashMax; + size_type m_moduleHashMax; + size_type m_submoduleHashMax; + size_type m_channelHashMax; + + std::vector<HWIdentifier> m_crate_vec; + std::vector<HWIdentifier> m_module_vec; + std::vector<HWIdentifier> m_submodule_vec; + std::vector<HWIdentifier> m_channel_vec; + + int m_iDetZSideFieldValue; + + /** + @brief small class holding the starting hash value, the min eta and the number of phi bins of each region <br> + used to CPU-optimize the conversion from an identifier to a hash index + */ + class HashCalc + { + public: + HashCalc() : + m_hash(0), + m_channelmin(0) {} + IdentifierHash m_hash; + size_type m_channelmin; + }; + std::vector<HashCalc> m_hash_calcs; + + + /** Field Implementation */ + IdDictFieldImplementation m_calo_impl; + IdDictFieldImplementation m_calo_detzside_impl; + IdDictFieldImplementation m_crate_impl; + IdDictFieldImplementation m_module_impl; + IdDictFieldImplementation m_submodule_impl; + IdDictFieldImplementation m_channel_impl; +}; + + +//using the macro below we can assign an identifier (and a version) +//This is required and checked at compile time when you try to record/retrieve +CLASS_DEF( TTOnlineID , 38321944 , 1 ) + + +//===================== +// Inline Definitions +//===================== + +/* Crates */ + +//========================================================================================================== +inline HWIdentifier TTOnlineID::crateId( int crate, bool checks ) const +//========================================================================================================== +{ + HWIdentifier result(0); + m_calo_impl.pack (10 , result); + m_calo_detzside_impl.pack (0 , result); + m_crate_impl.pack (crate , result); + + /* Do checks */ + if(checks) { + crate_Id_checks( crate ); + } + return result; +} +inline HWIdentifier TTOnlineID::crateId( int crate ) const +{ + return crateId (crate, do_checks()); +} + +//============================================================================== */ +inline HWIdentifier TTOnlineID::crateId(IdentifierHash cratehash_id) const +//===============================================================================*/ +{ + return(m_crate_vec[cratehash_id]); +} + +//============================================================================= +inline IdentifierHash TTOnlineID::crateHash (HWIdentifier crate_id) const{ +//============================================================================= + std::vector<HWIdentifier>::const_iterator it = std::lower_bound(m_crate_vec.begin(),m_crate_vec.end(),crate_id); + if ( it != m_crate_vec.end() ){ + return (it - m_crate_vec.begin()); + } + return (0); +} + +//============================================================================= +inline std::vector<HWIdentifier>::const_iterator TTOnlineID::crate_begin(void) const { +//============================================================================= + return(m_crate_vec.begin()); +} + +//============================================================================= +inline std::vector<HWIdentifier>::const_iterator TTOnlineID::crate_end(void) const { +//============================================================================= + return(m_crate_vec.end()); +} + +/* Modules */ + +//========================================================================================================== +inline HWIdentifier TTOnlineID::moduleId( int crate, int module, bool checks ) const +//========================================================================================================== +{ + HWIdentifier result(0); + m_calo_impl.pack (10 , result); + m_calo_detzside_impl.pack (0 , result); + m_crate_impl.pack (crate , result); + m_module_impl.pack (module , result); + + /* Do checks */ + if(checks) { + module_Id_checks( crate, module ); + } + return result; +} + +inline HWIdentifier TTOnlineID::moduleId( int crate, int module ) const +{ + return moduleId (crate, module, do_checks()); +} + +//============================================================================== */ +inline HWIdentifier TTOnlineID::moduleId(IdentifierHash modulehash_id) const +//===============================================================================*/ +{ + return(m_module_vec[modulehash_id]); +} + +//============================================================================= +inline IdentifierHash TTOnlineID::moduleHash (HWIdentifier module_id) const{ +//============================================================================= + std::vector<HWIdentifier>::const_iterator it = std::lower_bound(m_module_vec.begin(),m_module_vec.end(),module_id); + if ( it != m_module_vec.end() ){ + return (it - m_module_vec.begin()); + } + return (0); +} + +//============================================================================= +inline std::vector<HWIdentifier>::const_iterator TTOnlineID::module_begin(void) const { +//============================================================================= + return(m_module_vec.begin()); +} + +//============================================================================= +inline std::vector<HWIdentifier>::const_iterator TTOnlineID::module_end(void) const { +//============================================================================= + return(m_module_vec.end()); +} + + +/* SubModules */ + +//========================================================================================================== +inline HWIdentifier TTOnlineID::submoduleId( int crate, int module, int submodule, bool checks ) const +//========================================================================================================== +{ + HWIdentifier result(0); + m_calo_impl.pack (10 , result); + m_calo_detzside_impl.pack (0 , result); + m_crate_impl.pack (crate , result); + m_module_impl.pack (module , result); + m_submodule_impl.pack (submodule , result); + + /* Do checks */ + if(checks) { + submodule_Id_checks( crate, module, submodule ); + } + return result; +} +inline HWIdentifier TTOnlineID::submoduleId( int crate, int module, int submodule ) const +{ + return submoduleId (crate, module, submodule, do_checks()); +} + + +//============================================================================== */ +inline HWIdentifier TTOnlineID::submoduleId(IdentifierHash submodulehash_id) const +//===============================================================================*/ +{ + return(m_submodule_vec[submodulehash_id]); +} + +//============================================================================= +inline IdentifierHash TTOnlineID::submoduleHash (HWIdentifier submodule_id) const{ +//============================================================================= + std::vector<HWIdentifier>::const_iterator it = std::lower_bound(m_submodule_vec.begin(),m_submodule_vec.end(),submodule_id); + if ( it != m_submodule_vec.end() ){ + return (it - m_submodule_vec.begin()); + } + return (0); +} + +//============================================================================= +inline std::vector<HWIdentifier>::const_iterator TTOnlineID::submodule_begin(void) const { +//============================================================================= + return(m_submodule_vec.begin()); +} + +//============================================================================= +inline std::vector<HWIdentifier>::const_iterator TTOnlineID::submodule_end(void) const { +//============================================================================= + return(m_submodule_vec.end()); +} + + +/* Channels */ + +//========================================================================================================== +inline HWIdentifier TTOnlineID::channelId( int crate, int module, int submodule, int channel, bool checks ) const +//========================================================================================================== +{ + HWIdentifier result(0); + m_calo_impl.pack (10 , result); + m_calo_detzside_impl.pack (0 , result); + m_crate_impl.pack (crate , result); + m_module_impl.pack (module , result); + m_submodule_impl.pack (submodule , result); + m_channel_impl.pack (channel , result); + + /* Do checks */ + if(checks) { + channel_Id_checks( crate, module, submodule, channel ); + } + return result; +} + +inline HWIdentifier TTOnlineID::channelId( int crate, int module, int submodule, int channel ) const +{ + return channelId (crate, module, submodule, channel, do_checks()); +} + +//============================================================================== */ +inline HWIdentifier TTOnlineID::channelId(IdentifierHash channelhash_id) const +//===============================================================================*/ +{ + return(m_channel_vec[channelhash_id]); +} + +//============================================================================= +inline IdentifierHash TTOnlineID::channelHash (HWIdentifier channel_id) const{ +//============================================================================= + std::vector<HWIdentifier>::const_iterator it = std::lower_bound(m_channel_vec.begin(),m_channel_vec.end(),channel_id); + if ( it != m_channel_vec.end() ){ + return (it - m_channel_vec.begin()); + } + return (0); +} + +//============================================================================= +inline std::vector<HWIdentifier>::const_iterator TTOnlineID::channel_begin(void) const { +//============================================================================= + return(m_channel_vec.begin()); +} + +//============================================================================= +inline std::vector<HWIdentifier>::const_iterator TTOnlineID::channel_end(void) const { +//============================================================================= + return(m_channel_vec.end()); +} + + +/* Hash indices */ + +inline TTOnlineID::size_type TTOnlineID::crateHashMax (void) const +/*====================================================================*/ +{ + return m_crateHashMax; +} + +inline TTOnlineID::size_type TTOnlineID::moduleHashMax (void) const +/*====================================================================*/ +{ + return m_moduleHashMax; +} + +inline TTOnlineID::size_type TTOnlineID::submoduleHashMax (void) const +/*====================================================================*/ +{ + return m_submoduleHashMax; +} + +inline TTOnlineID::size_type TTOnlineID::channelHashMax (void) const +/*====================================================================*/ +{ + return m_channelHashMax; +} + +inline int TTOnlineID::crate(const HWIdentifier id)const +/*===========================================================*/ +{ + return (m_crate_impl.unpack(id)); +} + +inline int TTOnlineID::module(const HWIdentifier id)const +/*===========================================================*/ +{ + return (m_module_impl.unpack(id)); +} + +inline int TTOnlineID::submodule(const HWIdentifier id)const +/*===========================================================*/ +{ + return (m_submodule_impl.unpack(id)); +} + +inline int TTOnlineID::channel(const HWIdentifier id)const +/*===========================================================*/ +{ + return (m_channel_impl.unpack(id)); +} + +inline int TTOnlineID::detzside_field_value() const +{ + return m_iDetZSideFieldValue; +} + +#endif // TTOnlineID_H diff --git a/Calorimeter/CaloIdentifier/CaloIdentifier/TileTBID.h b/Calorimeter/CaloIdentifier/CaloIdentifier/TileTBID.h index 8317f038f3fad352c4c330411b5de2f43f8e07aa..d53e62bd9a29f9e3f573b5ae0afc23f3a3296408 100755 --- a/Calorimeter/CaloIdentifier/CaloIdentifier/TileTBID.h +++ b/Calorimeter/CaloIdentifier/CaloIdentifier/TileTBID.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /*************************************************************************** @@ -102,15 +102,20 @@ public: * @brief identifer for Tile testbeam detectors of a give type */ Identifier type_id ( int type) const; + Identifier type_id ( int type, bool checks ) const; /** * @brief identifer for one module of a Tile testbeam detector */ Identifier module_id ( int type, int module ) const; + Identifier module_id ( int type, int module, bool checks ) const; /** * @brief identifer for one channel of a Tile testbeam detector */ Identifier channel_id ( int type, int module, int channel ) const; + Identifier channel_id ( int type, int module, + int channel, + bool checks) const; /** * @brief extract module ID from channel ID diff --git a/Calorimeter/CaloIdentifier/CaloIdentifier/Tile_Base_ID.h b/Calorimeter/CaloIdentifier/CaloIdentifier/Tile_Base_ID.h index 00d1395013237b77afb393c324c9cdc3e62eea32..c4da3d4591e8246a946ea19dea45a68c6037362e 100755 --- a/Calorimeter/CaloIdentifier/CaloIdentifier/Tile_Base_ID.h +++ b/Calorimeter/CaloIdentifier/CaloIdentifier/Tile_Base_ID.h @@ -1,7 +1,7 @@ // This file's extension implies that it's C, but it's really -*- C++ -*-. /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // $Id$ @@ -71,36 +71,61 @@ public: /** build identifier for any Tilecal section */ Identifier tile_det ( int section) const; + Identifier tile_det ( int section, bool checks) const; /** build single region, module, tower, cell, pmt, adc identifiers */ Identifier region_id ( int index) const; Identifier region_id ( int section, int side) const; + Identifier region_id ( int section, int side, bool checks) const; Identifier region_id ( const Identifier& any_id) const; Identifier module_id ( int section, int side, int module) const; + Identifier module_id ( int section, int side, + int module, bool checks) const; Identifier module_id ( const Identifier& any_id) const; Identifier tower_id ( int section, int side, int module, int tower) const; - Identifier tower_id ( const Identifier& any_id) const; + Identifier tower_id ( int section, int side, + int module, int tower, + bool checks) const; + Identifier tower_id ( const Identifier& any_id) const; Identifier cell_id ( const Identifier & any_id ) const; Identifier cell_id ( int section, int side, int module, int tower, int sample ) const; + Identifier cell_id ( int section, int side, + int module, int tower, + int sample, bool checks ) const; Identifier pmt_id ( const Identifier & any_id ) const; Identifier pmt_id ( const Identifier & cell_id, int pmt ) const; + Identifier pmt_id ( const Identifier & cell_id, + int pmt, bool checks ) const; Identifier pmt_id ( int section, int side, int module, int tower, int sample, int pmt ) const; + Identifier pmt_id ( int section, int side, + int module, int tower, + int sample, int pmt, + bool checks) const; Identifier adc_id ( const Identifier & cell_id, int pmt, int adc ) const; + Identifier adc_id ( const Identifier & cell_id, + int pmt, int adc, + bool checks ) const; Identifier adc_id ( const Identifier & pmt_id, int adc ) const; + Identifier adc_id ( const Identifier & pmt_id, + int adc, bool checks ) const; Identifier adc_id ( int section, int side, int module, int tower, int sample, int pmt, int adc ) const; + Identifier adc_id ( int section, int side, + int module, int tower, + int sample, int pmt, + int adc, bool checks ) const; /** fast conversion from hash to ID for cells */ Identifier cell_id (const IdentifierHash& hash_id) const; diff --git a/Calorimeter/CaloIdentifier/src/CaloCell_Base_ID.cxx b/Calorimeter/CaloIdentifier/src/CaloCell_Base_ID.cxx index d4320b30aebc12e80e17afcc22d2e1b293887892..67b87dc821266ef7398e9128ad7ce9f6fdb6a7ba 100644 --- a/Calorimeter/CaloIdentifier/src/CaloCell_Base_ID.cxx +++ b/Calorimeter/CaloIdentifier/src/CaloCell_Base_ID.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // $Id$ @@ -138,21 +138,6 @@ int CaloCell_Base_ID::initialize_from_dictionary (const IdDictMgr& dict_mgr) } -bool -CaloCell_Base_ID::do_checks(void) const -{ - return(m_emHelper->do_checks()) ; -} - - -void -CaloCell_Base_ID::set_do_checks (bool do_checks) const -{ - for (int i=0; i < NSUBCALO; i++) - m_helpers[i]->set_do_checks(do_checks); -} - - int CaloCell_Base_ID::calo_sample (const Identifier id) const { int calo_sampl = (int) Unknown; diff --git a/Calorimeter/CaloIdentifier/src/TileTBID.cxx b/Calorimeter/CaloIdentifier/src/TileTBID.cxx index 8e2399fd62289e0f2501f62a787bedff60c0bd97..cd1681279931237a7bcfaaef7f33f47e48be02eb 100755 --- a/Calorimeter/CaloIdentifier/src/TileTBID.cxx +++ b/Calorimeter/CaloIdentifier/src/TileTBID.cxx @@ -106,10 +106,9 @@ TileTBID::tiletb_id () const // Build type & module id // Identifier -TileTBID::type_id ( int type ) const +TileTBID::type_id ( int type, bool checks ) const { -#ifndef NDEBUG - if(m_do_checks) { + if(checks) { // Check that id is within allowed range @@ -123,19 +122,23 @@ TileTBID::type_id ( int type ) const throw TileID_Exception(errorMessage , 2); } } -#endif Identifier compactID(m_base_tile_type); m_type_impl.pack (type,compactID); return (compactID); } +Identifier +TileTBID::type_id ( int type ) const +{ + return type_id (type, do_checks()); +} + Identifier -TileTBID::module_id ( int type, int module ) const +TileTBID::module_id ( int type, int module, bool checks ) const { -#ifndef NDEBUG - if(m_do_checks) { + if(checks) { // Check that id is within allowed range @@ -149,7 +152,6 @@ TileTBID::module_id ( int type, int module ) const throw TileID_Exception(errorMessage , 1); } } -#endif Identifier compactID(m_base_tile_type); m_type_impl.pack (type,compactID); @@ -157,15 +159,19 @@ TileTBID::module_id ( int type, int module ) const return (compactID); } +Identifier +TileTBID::module_id ( int type, int module ) const +{ + return module_id (type, module, do_checks()); +} // // Build channel id // Identifier -TileTBID::channel_id ( int type, int module, int channel ) const +TileTBID::channel_id ( int type, int module, int channel, bool checks ) const { -#ifndef NDEBUG - if(m_do_checks) { + if(checks) { // Check that id is within allowed range @@ -179,7 +185,6 @@ TileTBID::channel_id ( int type, int module, int channel ) const throw TileID_Exception(errorMessage , 1); } } -#endif Identifier compactID(m_base_tile_type); m_type_impl.pack (type,compactID); @@ -188,6 +193,11 @@ TileTBID::channel_id ( int type, int module, int channel ) const return (compactID); } +Identifier +TileTBID::channel_id ( int type, int module, int channel ) const +{ + return channel_id (type, module, channel, do_checks()); +} Identifier TileTBID::module_id ( const Identifier & any_id ) const @@ -205,7 +215,6 @@ TileTBID::channel_id ( const Identifier & module_id, Identifier compactId(module_id); m_channel_impl.pack(channel,compactId); -#ifndef NDEBUG if(m_do_checks) { // Check that id is within allowed range @@ -230,7 +239,6 @@ TileTBID::channel_id ( const Identifier & module_id, throw TileID_Exception(errorMessage , 1); } } -#endif return compactId; } diff --git a/Calorimeter/CaloIdentifier/src/Tile_Base_ID.cxx b/Calorimeter/CaloIdentifier/src/Tile_Base_ID.cxx index e00dc9071116e62dbefed464c9144c5f15512410..d4eb14fb3e47588bcf448aff969c9762deee8537 100755 --- a/Calorimeter/CaloIdentifier/src/Tile_Base_ID.cxx +++ b/Calorimeter/CaloIdentifier/src/Tile_Base_ID.cxx @@ -371,9 +371,9 @@ Tile_Base_ID::tile_gap () const // For any Tilecal section Identifier -Tile_Base_ID::tile_det ( int section ) const +Tile_Base_ID::tile_det ( int section, bool checks ) const { - if(m_do_checks) { + if(checks) { // Check that id is within allowed range // Fill expanded id ExpandedIdentifier expId(tile_exp()); @@ -394,6 +394,12 @@ Tile_Base_ID::tile_det ( int section ) const return result; } +Identifier +Tile_Base_ID::tile_det ( int section ) const +{ + return tile_det (section, do_checks()); +} + // single region, module, tower, cell, pmt, adc identifiers Identifier Tile_Base_ID::region_id ( int index ) const @@ -408,9 +414,9 @@ Tile_Base_ID::region_id ( int index ) const } Identifier -Tile_Base_ID::region_id ( int section, int side ) const +Tile_Base_ID::region_id ( int section, int side, bool checks ) const { - if(m_do_checks) { + if(checks) { // Check that id is within allowed range @@ -440,6 +446,13 @@ Tile_Base_ID::region_id ( int section, int side ) const return result; } +Identifier +Tile_Base_ID::region_id ( int section, int side ) const +{ + return region_id (section, side, do_checks()); +} + + Identifier Tile_Base_ID::region_id ( const Identifier& any_id ) const { @@ -454,9 +467,10 @@ Tile_Base_ID::region_id ( const Identifier& any_id ) const Identifier Tile_Base_ID::module_id ( int section, int side, - int module ) const + int module, + bool checks ) const { - if(m_do_checks) { + if(checks) { // Check that id is within allowed range @@ -487,6 +501,14 @@ Tile_Base_ID::module_id ( int section, int side, return result; } +Identifier +Tile_Base_ID::module_id ( int section, int side, + int module ) const +{ + return module_id (section, side, module, do_checks()); +} + + Identifier Tile_Base_ID::module_id ( const Identifier& any_id ) const { @@ -501,9 +523,10 @@ Tile_Base_ID::module_id ( const Identifier& any_id ) const Identifier Tile_Base_ID::tower_id ( int section, int side, - int module, int tower ) const + int module, int tower, + bool checks) const { - if(m_do_checks) { + if(checks) { // Check that id is within allowed range @@ -535,6 +558,13 @@ Tile_Base_ID::tower_id ( int section, int side, return result; } +Identifier +Tile_Base_ID::tower_id ( int section, int side, + int module, int tower) const +{ + return tower_id (section, side, module, tower, do_checks()); +} + Identifier Tile_Base_ID::tower_id ( const Identifier& any_id ) const { @@ -562,9 +592,10 @@ Tile_Base_ID::cell_id ( const Identifier & any_id ) const Identifier Tile_Base_ID::cell_id ( int section, int side, int module, int tower, - int sample ) const + int sample, + bool checks ) const { - if(m_do_checks) { + if(checks) { // Check that id is within allowed range @@ -597,6 +628,14 @@ Tile_Base_ID::cell_id ( int section, int side, return result; } +Identifier +Tile_Base_ID::cell_id ( int section, int side, + int module, int tower, + int sample ) const +{ + return cell_id (section, side, module, tower, sample, do_checks()); +} + Identifier Tile_Base_ID::pmt_id ( const Identifier & any_id ) const { @@ -611,7 +650,7 @@ Tile_Base_ID::pmt_id ( const Identifier & any_id ) const Identifier Tile_Base_ID::pmt_id ( const Identifier & cell_id, - int pmt ) const + int pmt, bool checks ) const { Identifier result; @@ -628,7 +667,7 @@ Tile_Base_ID::pmt_id ( const Identifier & cell_id, throw TileID_Exception(errorMessage , 1); } - if(m_do_checks) { + if(checks) { // Check that id is within allowed range @@ -656,12 +695,20 @@ Tile_Base_ID::pmt_id ( const Identifier & cell_id, return result; } +Identifier +Tile_Base_ID::pmt_id ( const Identifier & cell_id, + int pmt ) const +{ + return pmt_id (cell_id, pmt, do_checks()); +} + Identifier Tile_Base_ID::pmt_id ( int section, int side, int module, int tower, - int sample, int pmt ) const + int sample, int pmt, + bool checks) const { - if(m_do_checks) { + if(checks) { // Check that id is within allowed range @@ -695,9 +742,17 @@ Tile_Base_ID::pmt_id ( int section, int side, return result; } +Identifier +Tile_Base_ID::pmt_id ( int section, int side, + int module, int tower, + int sample, int pmt) const +{ + return pmt_id (section, side, module, tower, sample, pmt, do_checks()); +} + Identifier Tile_Base_ID::adc_id ( const Identifier & cell_id, - int pmt, int adc ) const + int pmt, int adc, bool checks ) const { Identifier result; @@ -715,7 +770,7 @@ Tile_Base_ID::adc_id ( const Identifier & cell_id, throw TileID_Exception(errorMessage , 1); } - if(m_do_checks) { + if(checks) { // Check that id is within allowed range @@ -743,9 +798,16 @@ Tile_Base_ID::adc_id ( const Identifier & cell_id, return result; } +Identifier +Tile_Base_ID::adc_id ( const Identifier & cell_id, + int pmt, int adc ) const +{ + return adc_id (cell_id, pmt, adc, do_checks()); +} + Identifier Tile_Base_ID::adc_id ( const Identifier & pmt_id, - int adc ) const + int adc, bool checks ) const { Identifier result; @@ -762,7 +824,7 @@ Tile_Base_ID::adc_id ( const Identifier & pmt_id, throw TileID_Exception(errorMessage , 1); } - if(m_do_checks) { + if(checks) { // Check that id is within allowed range @@ -790,12 +852,20 @@ Tile_Base_ID::adc_id ( const Identifier & pmt_id, return result; } +Identifier +Tile_Base_ID::adc_id ( const Identifier & pmt_id, + int adc ) const +{ + return adc_id (pmt_id, adc, do_checks()); +} + Identifier Tile_Base_ID::adc_id ( int section, int side, int module, int tower, int sample, - int pmt, int adc ) const + int pmt, int adc, + bool checks) const { - if(m_do_checks) { + if(checks) { // Check that id is within allowed range @@ -830,6 +900,14 @@ Tile_Base_ID::adc_id ( int section, int side, return result; } +Identifier +Tile_Base_ID::adc_id ( int section, int side, + int module, int tower, int sample, + int pmt, int adc) const +{ + return adc_id (section, side, module, tower, sample, pmt, adc, do_checks()); +} + bool Tile_Base_ID::module_id ( const Identifier& region_id, int module, Identifier& module_id ) const { diff --git a/Calorimeter/CaloIdentifier/test/calocell_id_test_common.cxx b/Calorimeter/CaloIdentifier/test/calocell_id_test_common.cxx index 50b83f5316ba2d032b1749e3d05950cb7c682f39..468c7fd94847725745c4868a4ee3d3648fb0a6d4 100644 --- a/Calorimeter/CaloIdentifier/test/calocell_id_test_common.cxx +++ b/Calorimeter/CaloIdentifier/test/calocell_id_test_common.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // $Id$ @@ -225,10 +225,6 @@ std::unique_ptr<CALOCELL_ID_T> make_calo_id_t (bool do_neighbours = false) tile_id.release()); assert (calo_id->initialize_from_dictionary (idd) == 0); - assert (!calo_id->do_checks()); - calo_id->set_do_checks (true); - assert (calo_id->do_checks()); - //assert (calo_id->em_idHelper() == em_id); //assert (calo_id->hec_idHelper() == hec_id); //assert (calo_id->fcal_idHelper() == fcal_id); @@ -732,7 +728,7 @@ void test_exceptions (const CaloCell_Base_ID& calo_id) bool caught = false; try { - /*Identifier wrongChanId =*/ calo_id.cell_id (0, 99, 0, 0, 0, 0); + /*Identifier wrongChanId =*/ calo_id.cell_id (0, 99, 0, 0, 0, 0, true); } catch(LArID_Exception & except){ caught = true; diff --git a/Calorimeter/CaloIdentifier/test/test_calo_dm_id.cxx b/Calorimeter/CaloIdentifier/test/test_calo_dm_id.cxx index b56f53163a4172c5906f0704b9e595a744536679..7794b2e50ce166a06b4f4043e89c0965c84107a4 100755 --- a/Calorimeter/CaloIdentifier/test/test_calo_dm_id.cxx +++ b/Calorimeter/CaloIdentifier/test/test_calo_dm_id.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // $Header: /build/atlas/cvs/atlas/offline/Calorimeter/CaloIdentifier/test/test_calo_dm_id.cxx,v 1.6 2006-05-18 11:38:04 fledroit Exp $ @@ -24,10 +24,10 @@ check_lar_dm_id_decoding(IdDictMgr& idd) } const CaloDM_ID* dm_p = &dm_id; - bool verif = dm_p->do_checks(); + bool verif = dm_id.do_checks(); std::cout << "verif0 = " << verif << std::endl; - dm_p->set_do_checks(true); - verif = dm_p->do_checks(); + dm_id.set_do_checks(true); + verif = dm_id.do_checks(); std::cout << "verif1 = " << verif << std::endl; @@ -160,10 +160,10 @@ check_tile_dm_id_decoding(IdDictMgr& idd) } const CaloDM_ID* dm_p = &dm_id; - bool verif = dm_p->do_checks(); + bool verif = dm_id.do_checks(); std::cout << "verif0 = " << verif << std::endl; - dm_p->set_do_checks(true); - verif = dm_p->do_checks(); + dm_id.set_do_checks(true); + verif = dm_id.do_checks(); std::cout << "verif1 = " << verif << std::endl; diff --git a/Calorimeter/CaloIdentifier/test/test_lvl1_id.cxx b/Calorimeter/CaloIdentifier/test/test_lvl1_id.cxx index abb50a89cfe8b574f4337c5e8bf98d383bd8d7e8..ca09d684f21e193881f33718b0f5977b7114efa6 100755 --- a/Calorimeter/CaloIdentifier/test/test_lvl1_id.cxx +++ b/Calorimeter/CaloIdentifier/test/test_lvl1_id.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ @@ -146,10 +146,10 @@ check_lvl1_helper(IdDictMgr& idd) const CaloLVL1_ID* lvl1_id = &lvl1Id; - bool verif = lvl1_id->do_checks(); + bool verif = lvl1Id.do_checks(); std::cout << "verif0 = " << verif << std::endl; - lvl1_id->set_do_checks(true); - verif = lvl1_id->do_checks(); + lvl1Id.set_do_checks(true); + verif = lvl1Id.do_checks(); std::cout << "verif1 = " << verif << std::endl; diff --git a/Calorimeter/CaloUtils/CMakeLists.txt b/Calorimeter/CaloUtils/CMakeLists.txt index 727022bffb2abc354a5cbc23318211e44458206e..2713af340551bd00b578993be5641b0a1c72ce51 100644 --- a/Calorimeter/CaloUtils/CMakeLists.txt +++ b/Calorimeter/CaloUtils/CMakeLists.txt @@ -88,7 +88,7 @@ atlas_add_test( CaloTowerStore_test atlas_add_test( CaloTowerBuilderTool_test SCRIPT test/CaloTowerBuilderTool_test.sh - EXTRA_PATTERNS "[0-9] [A-Z]+ 20[123][0-9]|Reading file|^CORAL/Services/ConnectionService (Info|Warning)|^RelationalDatabase Info|^Data source lookup|^DetDescrCnvSvc +INFO|^CORAL/RelationalPlugins/frontier Info|^PluginManager Info|^RalSessionMgr Warning|^DBReplicaSvc +INFO|IOVDbSvc +INFO|^Py:Athena +INFO|^EventInfoMgtInit: Got release|^TEnvRec::ChangeValue|^PoolSvc +INFO|^PoolSvc +WARNING Unable to locate catalog|being retired|including file|Deaccess DbDatabase|^IoComponentMgr +INFO|File version|Global positioning|^Domain|duplicate entry|already loaded|RootDbase: all good|frontier.c|^Py:ConfigurableDb +(WARNING|INFO)|ApplicationMgr +INFO|INFO [sS]top|^CaloIdMgrDetDes.*INFO|^TTOnlineIDDetDe.*INFO|^CaloIDHelper_ID.*INFO|^AtlasDetectorID +INFO|^AthenaEventLoopMgrWARNING|^CaloDM_IDDetDes.*INFO|^CaloLVL1_IDDetD.*INFO|^LArFCAL_ID +INFO|^LArMiniFCAL_IDD.*INFO|^LArHEC_ID +INFO|^LArMiniFCAL_ID +INFO|TileTBIdDetDesc.*INFO|^TileIDDetDescrCnv +INFO|CaloCell_IDDetD.*INFO|TileID +INFO|^LArFCAL_IDDetDe.*INFO|^TileTBIDDetDesc.*INFO|^LArEM_ID +INFO|^LArHEC_IDDetDes.*INFO|^LArEM_IDDetDesc.*INFO|^EndcapDMConstru.*INFO|^GeoModelSvc +INFO|USHAPE|U-shape|Cs Tube|XMLFileCatalog Info|No IOVSvcTool associated|^RalSessionMgr Info|RDBMS technology|INFO Found unknown streamer checksum|^GUID: Class pool::DbString has GUID|^AthenaRootStrea.* INFO|INFO TileDddbManager|oracle Info" + EXTRA_PATTERNS "[0-9] [A-Z]+ 20[123][0-9]|Reading file|^CORAL/Services/ConnectionService (Info|Warning)|^RelationalDatabase Info|^Data source lookup|^DetDescrCnvSvc +INFO|^CORAL/RelationalPlugins/frontier Info|^PluginManager Info|^RalSessionMgr Warning|^DBReplicaSvc +INFO|IOVDbSvc +INFO|^Py:Athena +INFO|^EventInfoMgtInit: Got release|^TEnvRec::ChangeValue|^PoolSvc +INFO|^PoolSvc +WARNING Unable to locate catalog|being retired|including file|Deaccess DbDatabase|^IoComponentMgr +INFO|File version|Global positioning|^Domain|duplicate entry|already loaded|RootDbase: all good|frontier.c|^Py:ConfigurableDb +(WARNING|INFO)|ApplicationMgr +INFO|INFO [sS]top|^CaloIdMgrDetDes.*INFO|^TTOnlineIDDetDe.*INFO|^CaloIDHelper_ID.*INFO|^AtlasDetectorID +INFO|^AthenaEventLoopMgrWARNING|^CaloDM_IDDetDes.*INFO|^CaloLVL1_IDDetD.*INFO|^LArFCAL_ID +INFO|^LArMiniFCAL_IDD.*INFO|^LArHEC_ID +INFO|^LArMiniFCAL_ID +INFO|TileTBIdDetDesc.*INFO|^TileIDDetDescrCnv +INFO|CaloCell_IDDetD.*INFO|TileID +INFO|^LArFCAL_IDDetDe.*INFO|^TileTBIDDetDesc.*INFO|^LArEM_ID +INFO|^LArHEC_IDDetDes.*INFO|^LArEM_IDDetDesc.*INFO|^EndcapDMConstru.*INFO|^GeoModelSvc +INFO|USHAPE|U-shape|Cs Tube|XMLFileCatalog Info|No IOVSvcTool associated|^RalSessionMgr Info|RDBMS technology|INFO Found unknown streamer checksum|^GUID: Class pool::DbString has GUID|^AthenaRootStrea.* INFO|INFO TileDddbManager|oracle Info|initialize_from_dictionary|Calo Detector Manager" ENVIRONMENT "ATLAS_REFERENCE_TAG=CaloUtils/CaloUtils-01-00-09" PROPERTIES TIMEOUT 500 ) diff --git a/Calorimeter/CaloUtils/CaloUtils/CaloLCClassificationTool.h b/Calorimeter/CaloUtils/CaloUtils/CaloLCClassificationTool.h index 6e65e5344e5c65aa462a182527eac7430ad8f222..b0b7c8fed7c5b224cfb023ab412fc75a4b3728b2 100644 --- a/Calorimeter/CaloUtils/CaloUtils/CaloLCClassificationTool.h +++ b/Calorimeter/CaloUtils/CaloUtils/CaloLCClassificationTool.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef CALOUTILS_CALOLCCLASSIFICATIONTOOL_H @@ -21,7 +21,6 @@ #include "CaloInterface/IClusterClassificationTool.h" #include "CaloConditions/CaloLocalHadCoeff.h" #include "CaloConditions/CaloLocalHadDefs.h" -#include "StoreGate/DataHandle.h" #include "StoreGate/ReadCondHandleKey.h" #include "AthenaBaseComps/AthAlgTool.h" diff --git a/Calorimeter/CaloUtils/CaloUtils/CaloLCWeightTool.h b/Calorimeter/CaloUtils/CaloUtils/CaloLCWeightTool.h index ceb28383620043dc2a1a67bbf89e3c09f9bf5b96..37d4113848791e54f3cb40f41beaed465b5eb9e8 100644 --- a/Calorimeter/CaloUtils/CaloUtils/CaloLCWeightTool.h +++ b/Calorimeter/CaloUtils/CaloUtils/CaloLCWeightTool.h @@ -68,12 +68,11 @@ class CaloLCWeightTool : public AthAlgTool, virtual public IClusterCellWeightToo /** - * @brief map to indices inside the data for individual samplings + * @brief vector of names of individual samplings * - * Since not all samplings might have weighting coefficients this map - * holds the index (for valid) or -1 (for invalid) for each sampling. */ + * needed to not call many times CaloSamplingHelper::getSamplingName */ - std::vector<int> m_isampmap; + std::vector<std::string> m_sampnames; /** * @brief interpolate correction coefficients */ diff --git a/Calorimeter/CaloUtils/CaloUtils/CaloTowerBuilderTool.h b/Calorimeter/CaloUtils/CaloUtils/CaloTowerBuilderTool.h index 69ed6ef27b4fadba0297c633f4d553355d54ab04..7dfa8d11030bbbff951f3f3ec08cac6d33df0069 100644 --- a/Calorimeter/CaloUtils/CaloUtils/CaloTowerBuilderTool.h +++ b/Calorimeter/CaloUtils/CaloUtils/CaloTowerBuilderTool.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef CALOREC_CALOTOWERBUILDERTOOL_H @@ -25,6 +25,7 @@ class CaloTower; class CaloTowerStore; class CaloTowerContainer; +class CaloDetDescrManager; class StoreGateSvc; class MsgStream; @@ -103,6 +104,7 @@ private: // Specific Initialization // ///////////////////////////// + const CaloDetDescrManager* m_caloDDM; CaloTowerStore m_cellStore; virtual StatusCode checkSetup(MsgStream& log); diff --git a/Calorimeter/CaloUtils/CaloUtils/CaloTowerStore.h b/Calorimeter/CaloUtils/CaloUtils/CaloTowerStore.h index a705ae3044598618237e9912a22d9338ee852dfe..7114bd354676fdf41f6122d9bf84e176bfc4ee90 100644 --- a/Calorimeter/CaloUtils/CaloUtils/CaloTowerStore.h +++ b/Calorimeter/CaloUtils/CaloUtils/CaloTowerStore.h @@ -1,7 +1,7 @@ // This file's extension implies that it's C, but it's really -*- C++ -*-. /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef CALOTOWERSTORE_H @@ -150,6 +150,9 @@ Updated: Jul 2009, sss #include <utility> +class CaloDetDescrManager; + + class CaloTowerStore { private: @@ -351,8 +354,9 @@ private: size_t size() const { return m_towers.size(); } /// \brief setup trigger - bool buildLookUp(const CaloTowerSeg& theTowerSeg, - std::vector<CaloCell_ID::SUBCALO> theCalos); + bool buildLookUp(const CaloDetDescrManager& theManager, + const CaloTowerSeg& theTowerSeg, + const std::vector<CaloCell_ID::SUBCALO>& theCalos); private: friend class tower_iterator; diff --git a/Calorimeter/CaloUtils/share/CaloTowerStore_test.ref b/Calorimeter/CaloUtils/share/CaloTowerStore_test.ref index 03fb65f0d62587aed7bb2e9eadb24a62626a3da3..92c93ec666dc6b6dfd038f7923aa81ebc78c51da 100644 --- a/Calorimeter/CaloUtils/share/CaloTowerStore_test.ref +++ b/Calorimeter/CaloUtils/share/CaloTowerStore_test.ref @@ -1,16 +1,15 @@ -Thu Dec 6 05:00:07 CET 2018 -Preloading tcmalloc_minimal.so +Thu Feb 28 11:57:59 EST 2019 Py:Athena INFO including file "AthenaCommon/Preparation.py" -Py:Athena INFO using release [AthenaWorkDir-22.0.1] [x86_64-slc6-gcc8-opt] [atlas-work3/fa0fd6d0989] -- built on [2018-12-06T0456] +Py:Athena INFO using release [?-21.0.0] [i686-slc5-gcc43-dbg] [?/?] -- built on [?] Py:Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" Py:Athena INFO executing ROOT6Setup Py:Athena INFO including file "AthenaCommon/Execution.py" Py:Athena INFO including file "CaloUtils/CaloTowerStore_test.py" -SetGeometryVersion.py obtained major release version 22 +SetGeometryVersion.py obtained major release version 21 Py:Athena INFO including file "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.py" -Py:ConfigurableDb INFO Read module info for 5472 configurables from 61 genConfDb files +Py:ConfigurableDb INFO Read module info for 4799 configurables from 2 genConfDb files Py:ConfigurableDb INFO No duplicates have been found: that's good ! -EventInfoMgtInit: Got release version Athena-22.0.1 +EventInfoMgtInit: Got release version sss-rel_0 Py:IOVDbSvc.CondDB INFO Setting up conditions DB access to instance OFLP200 Py:Athena INFO including file "CaloIdCnv/CaloIdCnv_joboptions.py" Py:Athena INFO including file "CaloConditions/CaloConditions_jobOptions.py" @@ -18,12 +17,13 @@ Py:Athena INFO including file "CaloConditions/LArTTCellMap_ATLAS_jobO Py:Athena INFO including file "CaloConditions/CaloTTIdMap_ATLAS_jobOptions.py" Py:Athena INFO including file "TileIdCnv/TileIdCnv_jobOptions.py" Py:Athena INFO including file "AthenaCommon/runbatch.py" -[?1034hApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 +# setting LC_ALL to "C" +ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 ApplicationMgr SUCCESS ==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v30r5) - running on lxplus093.cern.ch on Thu Dec 6 05:00:29 2018 + Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99) + running on karma on Thu Feb 28 11:58:02 2019 ==================================================================================================================================== ApplicationMgr INFO Successfully loaded modules : AthenaServices ApplicationMgr INFO Application Manager Configured successfully @@ -31,7 +31,7 @@ ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to leve StatusCodeSvc INFO initialize AthDictLoaderSvc INFO in initialize... AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO getRegistryEntries: read 3219 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 3642 CLIDRegistry entries for module ALL CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) CoreDumpSvc INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) MetaDataSvc INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00 @@ -39,20 +39,20 @@ AthenaPoolCnvSvc INFO Initializing AthenaPoolCnvSvc - package version Athena PoolSvc INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.xml) [ok] PoolSvc INFO Set connectionsvc retry/timeout/IDLE timeout to 'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled PoolSvc INFO Frontier compression level set to 5 -DBReplicaSvc INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-12-04T2353/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus093.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] +DBReplicaSvc INFO Read replica configuration from /home/sss/atlas/rootaccess/build/share/dbreplica.config +DBReplicaSvc INFO No specific match for domain found - use default fallback +DBReplicaSvc INFO Total of 1 servers found for host karma [atlas_dd ] PoolSvc INFO Successfully setup replica sorting algorithm PoolSvc INFO Setting up APR FileCatalog and Streams -PoolSvc WARNING Unable to locate catalog for prfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables -PoolSvc WARNING Unable to locate catalog for apcfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables -PoolSvc INFO Resolved path (via ATLAS_POOLCOND_PATH) is /cvmfs/atlas-condb.cern.ch/repo/conditions/poolcond/PoolFileCatalog.xml +PoolSvc INFO Resolved path (via DATAPATH) is /home/sss/atlas/DBRelease/current/poolcond/PoolCat_oflcond.xml +PoolSvc INFO Resolved path (via DATAPATH) is /home/sss/atlas/DBRelease/current/poolcond/PoolCat_oflcond.xml +PoolSvc INFO Resolved path (via ATLAS_POOLCOND_PATH) is /home/sss/atlas/DBRelease/poolcond/PoolFileCatalog.xml PoolSvc INFO POOL WriteCatalog is xmlcatalog_file:PoolFileCatalog.xml DbSession INFO Open DbSession Domain[ROOT_All] INFO > Access DbDomain READ [ROOT_All] +MetaDataSvc INFO Found MetaDataTools = PublicToolHandleArray([]) IOVDbSvc INFO Opened read transaction for POOL PersistencySvc IOVDbSvc INFO Only 5 POOL conditions files will be open at once -IOVDbSvc INFO Cache alignment will be done in 3 slices IOVDbSvc INFO Global tag: OFLCOND-SDR-BS14T-IBL-06 set from joboptions IOVDbFolder INFO Read from meta data only for folder /TagInfo IOVDbSvc INFO Initialised with 3 connections and 7 folders @@ -70,7 +70,7 @@ IOVDbSvc INFO Added taginfo remove for /CALO/Ofl/Identifier/CaloTTOn IOVDbSvc INFO Added taginfo remove for /CALO/Ofl/Identifier/CaloTTPpmRxIdMapAtlas IOVDbSvc INFO Added taginfo remove for /LAR/LArCellPositionShift IOVDbSvc INFO Added taginfo remove for /LAR/Identifier/LArTTCellMapAtlas -ClassIDSvc INFO getRegistryEntries: read 2134 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 1866 CLIDRegistry entries for module ALL ClassIDSvc INFO getRegistryEntries: read 17 CLIDRegistry entries for module ALL ClassIDSvc INFO getRegistryEntries: read 18 CLIDRegistry entries for module ALL DetDescrCnvSvc INFO initializing @@ -125,7 +125,7 @@ BarrelConstruction INFO Use sagging in geometry ? 0 multi-layered version of absorbers activated, mlabs == 1 ================================================ EventPersistenc... INFO Added successfully Conversion service:DetDescrCnvSvc -ClassIDSvc INFO getRegistryEntries: read 5819 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 5707 CLIDRegistry entries for module ALL CaloIDHelper_ID... INFO in createObj: creating a TileTBID helper object in the detector store IdDictDetDescrCnv INFO in initialize IdDictDetDescrCnv INFO in createObj: creating a IdDictManager object in the detector store @@ -164,7 +164,7 @@ TileDddbManager INFO n_tileSwitches = 1 ClassIDSvc INFO getRegistryEntries: read 213 CLIDRegistry entries for module ALL CaloIDHelper_ID... INFO in createObj: creating a TileID helper object in the detector store AtlasDetectorID INFO initialize_from_dictionary - OK -TileNeighbour INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-12-04T2353/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/TileNeighbour_reduced.txt +TileNeighbour INFO Reading file /home/sss/atlas/rootaccess/build/share/TileNeighbour_reduced.txt TileHWIDDetDesc... INFO in createObj: creating a TileHWID helper object in the detector store TileHWID INFO initialize_from_dictionary AtlasDetectorID INFO initialize_from_dictionary - OK @@ -176,37 +176,22 @@ CaloIDHelper_ID... INFO in createObj: creating a LArHEC_ID helper object in th AtlasDetectorID INFO initialize_from_dictionary - OK CaloIDHelper_ID... INFO in createObj: creating a LArFCAL_ID helper object in the detector store AtlasDetectorID INFO initialize_from_dictionary - OK -LArFCAL_Base_ID INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-12-04T2353/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCal2DNeighbors-April2011.txt -LArFCAL_Base_ID INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-12-04T2353/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt -LArFCAL_Base_ID INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-12-04T2353/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt +LArFCAL_Base_ID INFO Reading file /home/sss/atlas/rootaccess/build/share/FCal2DNeighbors-April2011.txt +LArFCAL_Base_ID INFO Reading file /home/sss/atlas/rootaccess/build/share/FCal3DNeighborsNext-April2011.txt +LArFCAL_Base_ID INFO Reading file /home/sss/atlas/rootaccess/build/share/FCal3DNeighborsPrev-April2011.txt CaloIDHelper_ID... INFO in createObj: creating a LArMiniFCAL_ID helper object in the detector store AtlasDetectorID INFO initialize_from_dictionary - OK LArMiniFCAL_ID INFO initialize_from_dict - LArCalorimeter dictionary does NOT contain miniFCAL description. Unable to initialize LArMiniFCAL_ID. AtlasDetectorID INFO initialize_from_dictionary - OK TileDetDescrMan... INFO Entering create_elements() -ClassIDSvc INFO getRegistryEntries: read 65 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 66 CLIDRegistry entries for module ALL AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00 CondInputLoader INFO Initializing CondInputLoader... CondInputLoader INFO Adding base classes: CondInputLoader INFO Will create WriteCondHandle dependencies for the following DataObjects: -HistogramPersis...WARNING Histograms saving not required. -ApplicationMgr INFO Application Manager Initialized successfully -ApplicationMgr INFO Application Manager Started successfully -AthenaEventLoopMgr INFO ===>>> start of run 1 <<<=== -EventPersistenc... INFO Added successfully Conversion service:AthenaPoolCnvSvc -EventPersistenc... INFO Added successfully Conversion service:TagInfoMgr -ClassIDSvc INFO getRegistryEntries: read 2366 CLIDRegistry entries for module ALL -IOVDbSvc INFO Opening COOL connection for COOLOFL_LAR/OFLP200 -IOVDbFolder INFO HVS tag OFLCOND-SDR-BS14T-IBL-06 resolved to LARAlign-mc11-00 for folder /LAR/Align -IOVDbFolder INFO HVS tag OFLCOND-SDR-BS14T-IBL-06 resolved to LArCellPositionShift-ideal for folder /LAR/LArCellPositionShift -IOVDbFolder INFO HVS tag OFLCOND-SDR-BS14T-IBL-06 resolved to LARIdentifierLArTTCellMapAtlas-HadFcalFix2 for folder /LAR/Identifier/LArTTCellMapAtlas -IOVDbSvc INFO Disconnecting from COOLOFL_LAR/OFLP200 -Domain[ROOT_All] INFO -> Access DbDatabase READ [ROOT_All] 06C9EAE8-6F5B-E011-BAAA-003048F0E7AC -Domain[ROOT_All] INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000029.gen.COND/cond09_mc.000029.gen.COND._0002.pool.root -RootDatabase.open INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000029.gen.COND/cond09_mc.000029.gen.COND._0002.pool.root File version:52200 CaloMgrDetDescrCnv INFO in createObj: creating a Calo Detector Manager object in the detector store CaloIdMgrDetDes... INFO in createObj: creating a CaloDescrManager object in the detector store -ClassIDSvc INFO getRegistryEntries: read 193 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 4721 CLIDRegistry entries for module ALL CaloIDHelper_ID... INFO in createObj: creating a CaloDM_ID helper object in the detector store CaloDM_ID INFO initialize_from_dictionary AtlasDetectorID INFO initialize_from_dictionary - OK @@ -223,24 +208,39 @@ CaloIDHelper_ID... INFO in createObj: creating a LArHEC_SuperCell_ID helper ob AtlasDetectorID INFO initialize_from_dictionary - OK CaloIDHelper_ID... INFO in createObj: creating a LArFCAL_SuperCell_ID helper object in the detector store AtlasDetectorID INFO initialize_from_dictionary - OK -LArFCAL_Base_ID INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-12-04T2353/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt -LArFCAL_Base_ID INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-12-04T2353/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt -LArFCAL_Base_ID INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-12-04T2353/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt +LArFCAL_Base_ID INFO Reading file /home/sss/atlas/rootaccess/build/share/FCalSuperCells2DNeighborsNew-April2014.txt +LArFCAL_Base_ID INFO Reading file /home/sss/atlas/rootaccess/build/share/FCalSuperCells3DNeighborsNextNew-April2014.txt +LArFCAL_Base_ID INFO Reading file /home/sss/atlas/rootaccess/build/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt CaloIDHelper_ID... INFO in createObj: creating a Tile_SuperCell_ID helper object in the detector store AtlasDetectorID INFO initialize_from_dictionary - OK -TileNeighbour INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-12-04T2353/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/TileSuperCellNeighbour.txt +TileNeighbour INFO Reading file /home/sss/atlas/rootaccess/build/share/TileSuperCellNeighbour.txt AtlasDetectorID INFO initialize_from_dictionary - OK CaloIdMgrDetDes... INFO Finished CaloIdMgrDetDes... INFO Initializing CaloIdMgr from values in CaloIdMgrDetDescrCnv +HistogramPersis...WARNING Histograms saving not required. +ApplicationMgr INFO Application Manager Initialized successfully +ApplicationMgr INFO Application Manager Started successfully +AthenaEventLoopMgr INFO ===>>> start of run 1 <<<=== +EventPersistenc... INFO Added successfully Conversion service:AthenaPoolCnvSvc +EventPersistenc... INFO Added successfully Conversion service:TagInfoMgr +ClassIDSvc INFO getRegistryEntries: read 109 CLIDRegistry entries for module ALL +IOVDbSvc INFO Opening COOL connection for COOLOFL_LAR/OFLP200 +IOVDbFolder INFO HVS tag OFLCOND-SDR-BS14T-IBL-06 resolved to LARAlign-mc11-00 for folder /LAR/Align +IOVDbFolder INFO HVS tag OFLCOND-SDR-BS14T-IBL-06 resolved to LArCellPositionShift-ideal for folder /LAR/LArCellPositionShift +IOVDbFolder INFO HVS tag OFLCOND-SDR-BS14T-IBL-06 resolved to LARIdentifierLArTTCellMapAtlas-HadFcalFix2 for folder /LAR/Identifier/LArTTCellMapAtlas +IOVDbSvc INFO Disconnecting from COOLOFL_LAR/OFLP200 +Domain[ROOT_All] INFO -> Access DbDatabase READ [ROOT_All] 06C9EAE8-6F5B-E011-BAAA-003048F0E7AC +Domain[ROOT_All] INFO /home/sss/atlas/DBRelease/current/poolcond/cond09_mc.000029.gen.COND/cond09_mc.000029.gen.COND._0002.pool.root +RootDatabase.open INFO /home/sss/atlas/DBRelease/current/poolcond/cond09_mc.000029.gen.COND/cond09_mc.000029.gen.COND._0002.pool.root File version:52200 Domain[ROOT_All] INFO -> Access DbDatabase READ [ROOT_All] 8667C6F2-1559-DE11-A611-000423D9A21A -Domain[ROOT_All] INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond08/cond08_mc.000003.gen.COND/cond08_mc.000003.gen.COND._0064.pool.root -RootDatabase.open INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond08/cond08_mc.000003.gen.COND/cond08_mc.000003.gen.COND._0064.pool.root File version:52200 +Domain[ROOT_All] INFO /home/sss/atlas/DBRelease/current/poolcond/cond08_mc.000003.gen.COND/cond08_mc.000003.gen.COND._0064.pool.root +RootDatabase.open INFO /home/sss/atlas/DBRelease/current/poolcond/cond08_mc.000003.gen.COND/cond08_mc.000003.gen.COND._0064.pool.root File version:52200 AthenaEventLoopMgr INFO ===>>> start processing event #1, run #1 0 events processed so far <<<=== test1 AthenaEventLoopMgr INFO ===>>> done processing event #1, run #1 1 events processed so far <<<=== -/cvmfs/atlas-co... INFO Database being retired... +/home/sss/atlas... INFO Database being retired... Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] 06C9EAE8-6F5B-E011-BAAA-003048F0E7AC -/cvmfs/atlas-co... INFO Database being retired... +/home/sss/atlas... INFO Database being retired... Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] 8667C6F2-1559-DE11-A611-000423D9A21A Domain[ROOT_All] INFO > Deaccess DbDomain READ [ROOT_All] ApplicationMgr INFO Application Manager Stopped successfully @@ -248,25 +248,25 @@ IncidentProcAlg1 INFO Finalize CondInputLoader INFO Finalizing CondInputLoader... IncidentProcAlg2 INFO Finalize IdDictDetDescrCnv INFO in finalize -IOVDbFolder INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 (( 0.20 ))s +IOVDbFolder INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/340 (( 0.08 ))s IOVDbFolder INFO Folder /CALO/Ofl/Identifier/CaloTTOnAttrIdMapAtlas (PoolRef) db-read 0/0 objs/chan/bytes 0/1/0 (( 0.00 ))s IOVDbFolder INFO Folder /CALO/Ofl/Identifier/CaloTTOnOffIdMapAtlas (PoolRef) db-read 0/0 objs/chan/bytes 0/1/0 (( 0.00 ))s IOVDbFolder INFO Folder /CALO/Ofl/Identifier/CaloTTPpmRxIdMapAtlas (PoolRef) db-read 0/0 objs/chan/bytes 0/1/0 (( 0.00 ))s -IOVDbFolder INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 (( 0.02 ))s -IOVDbFolder INFO Folder /LAR/Identifier/LArTTCellMapAtlas (PoolRef) db-read 1/0 objs/chan/bytes 1/1/173 (( 0.02 ))s +IOVDbFolder INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/390 (( 0.00 ))s +IOVDbFolder INFO Folder /LAR/Identifier/LArTTCellMapAtlas (PoolRef) db-read 1/0 objs/chan/bytes 1/1/346 (( 0.00 ))s IOVDbFolder WARNING Folder /LAR/Identifier/LArTTCellMapAtlas is requested but no data retrieved -IOVDbSvc INFO bytes in (( 0.23 ))s +IOVDbSvc INFO bytes in (( 0.09 ))s IOVDbSvc INFO Connection sqlite://;schema=mycool.db;dbname=OFLP200 : nConnect: 0 nFolders: 0 ReadTime: (( 0.00 ))s -IOVDbSvc INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 3 ReadTime: (( 0.23 ))s +IOVDbSvc INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 3 ReadTime: (( 0.09 ))s IOVDbSvc INFO Connection COOLOFL_CALO/OFLP200 : nConnect: 1 nFolders: 3 ReadTime: (( 0.00 ))s AthDictLoaderSvc INFO in finalize... ToolSvc INFO Removing all tools created by ToolSvc *****Chrono***** INFO **************************************************************************************************** *****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) *****Chrono***** INFO **************************************************************************************************** -cObjR_ALL INFO Time User : Tot= 0.58 [s] Ave/Min/Max= 0.29(+- 0.28)/ 0.01/ 0.57 [s] #= 2 -cObj_ALL INFO Time User : Tot= 0.72 [s] Ave/Min/Max= 0.36(+- 0.27)/ 0.09/ 0.63 [s] #= 2 -ChronoStatSvc INFO Time User : Tot= 3.59 [s] #= 1 +cObjR_ALL INFO Time User : Tot= 270 [ms] Ave/Min/Max= 135(+- 135)/ 0/ 270 [ms] #= 2 +cObj_ALL INFO Time User : Tot= 440 [ms] Ave/Min/Max= 220(+- 180)/ 40/ 400 [ms] #= 2 +ChronoStatSvc INFO Time User : Tot= 2.91 [s] #= 1 *****Chrono***** INFO **************************************************************************************************** ChronoStatSvc.f... INFO Service finalized successfully ApplicationMgr INFO Application Manager Finalized successfully diff --git a/Calorimeter/CaloUtils/src/CaloLCWeightTool.cxx b/Calorimeter/CaloUtils/src/CaloLCWeightTool.cxx index c2adee22cdf68fb356b6cf0aa270dff5198f7188..00414661d88ecc5fa39394d46c1b767c733c6477 100644 --- a/Calorimeter/CaloUtils/src/CaloLCWeightTool.cxx +++ b/Calorimeter/CaloUtils/src/CaloLCWeightTool.cxx @@ -88,7 +88,7 @@ StatusCode CaloLCWeightTool::initialize() ATH_CHECK( m_key.initialize() ); // pointer to detector manager: - m_calo_dd_man = CaloDetDescrManager::instance(); + ATH_CHECK( detStore()->retrieve (m_calo_dd_man, "CaloMgr") ); m_calo_id = m_calo_dd_man->getCaloCell_ID(); //---- retrieve the noisetool ---------------- @@ -99,6 +99,11 @@ StatusCode CaloLCWeightTool::initialize() ATH_MSG_INFO( "Noise Tool retrieved" ); } + m_sampnames.reserve(CaloSampling::Unknown); + for (int iSamp=0;iSamp<CaloSampling::Unknown;iSamp++) { + m_sampnames.push_back(CaloSamplingHelper::getSamplingName((CaloSampling::CaloSample)iSamp)); + } + return StatusCode::SUCCESS; } @@ -115,7 +120,7 @@ StatusCode CaloLCWeightTool::weight(xAOD::CaloCluster *theCluster) const std::vector<int> isAmpMap(CaloSampling::Unknown,-1); for (int iArea=0;iArea<data->getSizeAreaSet();iArea++) { for (int iSamp=0;iSamp<CaloSampling::Unknown;iSamp++) { - if ( CaloSamplingHelper::getSamplingName((CaloSampling::CaloSample)iSamp) == data->getArea(iArea)->getTitle() ) { + if ( m_sampnames[iSamp] == data->getArea(iArea)->getTitle() ) { ATH_MSG_DEBUG("Found Area for Sampling " << CaloSamplingHelper::getSamplingName((CaloSampling::CaloSample)iSamp)); isAmpMap[iSamp] = iArea; break; diff --git a/Calorimeter/CaloUtils/src/CaloTopoTowerBuilderTool.cxx b/Calorimeter/CaloUtils/src/CaloTopoTowerBuilderTool.cxx index 1cea69a190bacdcb1ade38dc84ee97cfb9f2019d..399f602cf0e9f1a0bf78d55518e6ebe5574db0e4 100644 --- a/Calorimeter/CaloUtils/src/CaloTopoTowerBuilderTool.cxx +++ b/Calorimeter/CaloUtils/src/CaloTopoTowerBuilderTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ @@ -59,7 +59,7 @@ StatusCode CaloTopoTowerBuilderTool::initializeTool() { ATH_MSG_INFO( "Initializing CaloTopoTowerAlg" ); - m_calo_dd_man = CaloDetDescrManager::instance(); + ATH_CHECK( detStore()->retrieve (m_calo_dd_man, "CaloMgr") ); m_calo_id = m_calo_dd_man->getCaloCell_ID(); return StatusCode::SUCCESS; diff --git a/Calorimeter/CaloUtils/src/CaloTowerBuilderTool.cxx b/Calorimeter/CaloUtils/src/CaloTowerBuilderTool.cxx index ca6119428275b28a66ea5236f79e1cc75e56a8b9..f55cf88b789af4963969ad7dd3db3f05d0ca71a5 100644 --- a/Calorimeter/CaloUtils/src/CaloTowerBuilderTool.cxx +++ b/Calorimeter/CaloUtils/src/CaloTowerBuilderTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ @@ -13,7 +13,7 @@ #include "StoreGate/StoreGateSvc.h" -#include "CaloIdentifier/CaloCell_ID.h" +#include "CaloDetDescr/CaloDetDescrManager.h" #include "CaloGeoHelpers/CaloPhiRange.h" #include "CaloEvent/CaloCell.h" #include "CaloEvent/CaloCellContainer.h" @@ -28,7 +28,8 @@ CaloTowerBuilderTool::CaloTowerBuilderTool(const std::string& name, const std::string& type, const IInterface* parent) - : CaloTowerBuilderToolBase(name,type,parent) + : CaloTowerBuilderToolBase(name,type,parent), + m_caloDDM(nullptr) // , m_errorCounter(0) { declareInterface<ICaloTowerBuilderToolBase>(this); @@ -51,6 +52,7 @@ CaloTowerBuilderTool::~CaloTowerBuilderTool() // protected! StatusCode CaloTowerBuilderTool::initializeTool() { + ATH_CHECK( detStore()->retrieve (m_caloDDM, "CaloMgr") ); m_caloIndices = parseCalos (m_includedCalos); return this->checkSetup(msg()); } @@ -302,7 +304,7 @@ CaloTowerBuilderTool::parseCalos StatusCode CaloTowerBuilderTool::rebuildLookup() { if (towerSeg().neta() != 0 && towerSeg().nphi() != 0) { - if (m_cellStore.buildLookUp(towerSeg(), m_caloIndices)) { + if (m_cellStore.buildLookUp(*m_caloDDM, towerSeg(), m_caloIndices)) { return StatusCode::SUCCESS; } } diff --git a/Calorimeter/CaloUtils/src/CaloTowerStore.cxx b/Calorimeter/CaloUtils/src/CaloTowerStore.cxx index c33c096f952cb67704491c7698d70f1a4dd4f159..3e9a63467b607b590c6bd8b4caac4a892a08b420 100644 --- a/Calorimeter/CaloUtils/src/CaloTowerStore.cxx +++ b/Calorimeter/CaloUtils/src/CaloTowerStore.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /******************************************************************** @@ -29,8 +29,6 @@ Updated: Ilija Vukotic August 2008. // include header files #include "Identifier/IdentifierHash.h" -#include "CaloIdentifier/CaloIdManager.h" - #include "CaloDetDescr/CaloDetDescrManager.h" #include "CaloDetDescr/CaloDetDescrElement.h" #include "CaloGeoHelpers/CaloPhiRange.h" @@ -73,8 +71,9 @@ CaloTowerStore::towers (const CaloTowerSeg::SubSeg& subseg) const } -bool CaloTowerStore::buildLookUp(const CaloTowerSeg& theTowerSeg, - std::vector<CaloCell_ID::SUBCALO> theCalos) +bool CaloTowerStore::buildLookUp(const CaloDetDescrManager& theManager, + const CaloTowerSeg& theTowerSeg, + const std::vector<CaloCell_ID::SUBCALO>& theCalos) { m_seg = theTowerSeg; m_entries.clear(); @@ -95,15 +94,12 @@ bool CaloTowerStore::buildLookUp(const CaloTowerSeg& theTowerSeg, } MsgStream msg(theMsgSvc,"CaloTowerStore"); - // get cell id helper - const CaloCell_ID* cellIdHelper = (CaloIdManager::instance())->getCaloCell_ID(); - // get cell description manager - const CaloDetDescrManager* theManager = CaloDetDescrManager::instance(); - if ( ! theManager->isInitialized() ){ + if ( ! theManager.isInitialized() ){ msg << MSG::ERROR<< "CaloDetDescrManager is not initialized, module unusable!"<< endmsg; return false; } + const CaloCell_ID& cellIdHelper = *theManager.getCaloCell_ID(); // Get list of Calos to be considered size_t sizeCalos = theCalos.size(); @@ -119,7 +115,7 @@ bool CaloTowerStore::buildLookUp(const CaloTowerSeg& theTowerSeg, // find numerical ranges IdentifierHash firstIndex, lastIndex; - cellIdHelper->calo_cell_hash_range((int)theCalos[iCalo], firstIndex, lastIndex); + cellIdHelper.calo_cell_hash_range((int)theCalos[iCalo], firstIndex, lastIndex); msg << MSG::DEBUG << " firstInder,lastIndex " << firstIndex << " " << lastIndex << endmsg; @@ -129,7 +125,7 @@ bool CaloTowerStore::buildLookUp(const CaloTowerSeg& theTowerSeg, for( size_t cellIndex = firstIndex; cellIndex < lastIndex; cellIndex++){ // Cell Loop // - const CaloDetDescrElement* theDDE = theManager->get_element(cellIndex); + const CaloDetDescrElement* theDDE = theManager.get_element(cellIndex); if(theDDE==0) { msg << MSG::ERROR<< " CellIndex = "<< cellIndex<< " has a DDE pointer NULL " << endmsg; diff --git a/Calorimeter/CaloUtils/src/CaloTowerStoreTestAlg.cxx b/Calorimeter/CaloUtils/src/CaloTowerStoreTestAlg.cxx index 5c2e75e39f0f2bd634c99b14c5790edaf5fe15d4..2a98f0cd9e61d86a4a1877904f68378fe2354b77 100644 --- a/Calorimeter/CaloUtils/src/CaloTowerStoreTestAlg.cxx +++ b/Calorimeter/CaloUtils/src/CaloTowerStoreTestAlg.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // $Id$ @@ -14,6 +14,7 @@ #include "CaloTowerStoreTestAlg.h" #include "CaloUtils/CaloTowerStore.h" +#include "CaloDetDescr/CaloDetDescrManager.h" #include <iostream> #include <cmath> #include <cassert> @@ -24,11 +25,22 @@ */ CaloTowerStoreTestAlg::CaloTowerStoreTestAlg (const std::string& name, ISvcLocator* pSvcLocator) - : AthAlgorithm (name, pSvcLocator) + : AthAlgorithm (name, pSvcLocator), + m_caloDDM (nullptr) { } +/** + * @brief Standard Gaudi initialize method. + */ +StatusCode CaloTowerStoreTestAlg::initialize() +{ + ATH_CHECK( detStore()->retrieve (m_caloDDM, "CaloMgr") ); + return StatusCode::SUCCESS; +} + + void CaloTowerStoreTestAlg::iterate_full (const CaloTowerStore& store, test_tows_t& tows) @@ -82,7 +94,7 @@ CaloTowerStoreTestAlg::test_subseg_iter (const CaloTowerStore& store1, { CaloTowerSeg seg = subseg.segmentation(); CaloTowerStore store2; - assert (store2.buildLookUp (seg, calos)); + assert (store2.buildLookUp (*m_caloDDM, seg, calos)); assert (subseg.size() == store2.size()); @@ -105,7 +117,7 @@ void CaloTowerStoreTestAlg::test1() calos.push_back (CaloCell_ID::LARHEC); calos.push_back (CaloCell_ID::TILE); CaloTowerStore store; - assert (store.buildLookUp (seg, calos)); + assert (store.buildLookUp (*m_caloDDM, seg, calos)); CaloTowerSeg::SubSeg subseg1 = seg.subseg (0.7, 0.3, -0.2, 0.4); test_subseg_iter (store, calos, subseg1); diff --git a/Calorimeter/CaloUtils/src/CaloTowerStoreTestAlg.h b/Calorimeter/CaloUtils/src/CaloTowerStoreTestAlg.h index 39fcabe59d3fa7280af28cd9408f5a7fde79fad2..817e9137a9250aa509b917ebf8c12022d1920fc5 100644 --- a/Calorimeter/CaloUtils/src/CaloTowerStoreTestAlg.h +++ b/Calorimeter/CaloUtils/src/CaloTowerStoreTestAlg.h @@ -1,7 +1,7 @@ // This file's extension implies that it's C, but it's really -*- C++ -*-. /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // $Id$ @@ -19,6 +19,7 @@ #include "AthenaBaseComps/AthAlgorithm.h" #include "CaloUtils/CaloTowerStore.h" +class CaloDetDescrManager; class CaloTowerStoreTestAlg @@ -32,10 +33,16 @@ public: ISvcLocator* pSvcLocator); + /** + * @brief Standard Gaudi initialize method. + */ + virtual StatusCode initialize() override; + + /** * @brief Standard Gaudi execute method. */ - virtual StatusCode execute(); + virtual StatusCode execute() override; typedef std::vector<std::pair<unsigned, double> > test_tow_t; @@ -43,6 +50,8 @@ public: void dump_tows (const test_tows_t& t); private: + const CaloDetDescrManager* m_caloDDM; + void iterate_full (const CaloTowerStore& store, test_tows_t& tows); void iterate_subseg (const CaloTowerStore& store, diff --git a/Calorimeter/CaloUtils/src/LocalNoiseSuppressionTool.cxx b/Calorimeter/CaloUtils/src/LocalNoiseSuppressionTool.cxx index 1d3debf94b98672b971d1a6c2a87b6986ec2ed44..1ee8cdd68c6b8de9e33d78da43b4af669855ba1e 100644 --- a/Calorimeter/CaloUtils/src/LocalNoiseSuppressionTool.cxx +++ b/Calorimeter/CaloUtils/src/LocalNoiseSuppressionTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /******************************************************************** @@ -89,7 +89,7 @@ StatusCode LocalNoiseSuppressionTool::initialize() { ATH_MSG_INFO( "Noise Tool retrieved" ); // pointer to detector manager: - m_calo_dd_man = CaloDetDescrManager::instance(); + ATH_CHECK( detStore()->retrieve (m_calo_dd_man, "CaloMgr") ); m_calo_id = m_calo_dd_man->getCaloCell_ID(); diff --git a/Control/AthAnalysisBaseComps/AthAnalysisBaseComps/AthAnalysisHelper.h b/Control/AthAnalysisBaseComps/AthAnalysisBaseComps/AthAnalysisHelper.h index a4ccad68cecdc6788a8d751beaa3c7cad7a61813..18ee0c47274d38efa8e4c3b5b5fa94101cc2d528 100644 --- a/Control/AthAnalysisBaseComps/AthAnalysisBaseComps/AthAnalysisHelper.h +++ b/Control/AthAnalysisBaseComps/AthAnalysisBaseComps/AthAnalysisHelper.h @@ -1,7 +1,7 @@ ///////////////////////// -*- C++ -*- ///////////////////////////// /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // AthAnalysisHelper.h @@ -229,6 +229,12 @@ public: ///evt = ROOT.POOL.TEvent() ///... ///ROOT.AAH.retrieveMetadata("/Folder","key",evt.inputMetaStore()) + static std::string retrieveMetadata(const std::string& folder, const std::string& key, const ServiceHandle<StoreGateSvc>& inputMetaStore) { + std::string out(""); + StatusCode result = retrieveMetadata(folder,key,out,inputMetaStore); + if(result.isFailure()) { std::cout << "ERROR: Could not retrieve IOVMetadata with folder " << folder << " and key " << key << std::endl; } + return out; + } static std::string retrieveMetadata(const std::string& folder, const std::string& key, ServiceHandle<StoreGateSvc>& inputMetaStore) { std::string out(""); StatusCode result = retrieveMetadata(folder,key,out,inputMetaStore); @@ -250,7 +256,7 @@ public: ///implemenation where you pass it a particular store instead - template<typename T> static StatusCode retrieveMetadata(const std::string& folder, const std::string& key, T& out, ServiceHandle<StoreGateSvc>& inputMetaStore) { + template<typename T> static StatusCode retrieveMetadata(const std::string& folder, const std::string& key, T& out, const ServiceHandle<StoreGateSvc>& inputMetaStore) { const IOVMetaDataContainer* cont = 0; if( inputMetaStore->retrieve(cont,folder).isFailure()) return StatusCode::FAILURE; @@ -280,7 +286,7 @@ public: ///retrieve metadata, for a specified IOVTime and a specific channel, unless the channel is -1, in which case we take the first available channel ///channels have to be unsigned int, so can use -1 to signal 'take whatever first channel is (it isn't always 0)' - template<typename T> static StatusCode retrieveMetadata(const std::string& folder, const std::string& key, T& out, ServiceHandle<StoreGateSvc>& inputMetaStore, const IOVTime& time, int channel=-1) { + template<typename T> static StatusCode retrieveMetadata(const std::string& folder, const std::string& key, T& out, const ServiceHandle<StoreGateSvc>& inputMetaStore, const IOVTime& time, int channel=-1) { const IOVMetaDataContainer* cont = 0; if( inputMetaStore->retrieve(cont,folder).isFailure()) return StatusCode::FAILURE; diff --git a/Control/AthToolSupport/AsgTools/AsgTools/ATLAS_CHECK_THREAD_SAFETY b/Control/AthToolSupport/AsgTools/AsgTools/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..3def713b5a35baa27600de630306ffa317bc365f --- /dev/null +++ b/Control/AthToolSupport/AsgTools/AsgTools/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Control/AthToolSupport/AsgTools diff --git a/Control/AthToolSupport/AsgTools/AsgTools/AnaToolHandle.icc b/Control/AthToolSupport/AsgTools/AsgTools/AnaToolHandle.icc index 2760c2fb82864a4d40e917daaa09df1484205b29..357c09f377640dbabf53990ce3e032d6dcfaffe4 100644 --- a/Control/AthToolSupport/AsgTools/AsgTools/AnaToolHandle.icc +++ b/Control/AthToolSupport/AsgTools/AsgTools/AnaToolHandle.icc @@ -6,6 +6,7 @@ #define ASGTOOLS_ANATOOLHANDLE_ICC #include <AsgTools/MessageCheck.h> +#include "CxxUtils/checker_macros.h" #include <assert.h> #include <cstdlib> @@ -169,6 +170,8 @@ namespace asg /// \brief the shares we manage private: std::map<std::string,std::weak_ptr<AnaToolShare> > m_shared; + mutable std::recursive_mutex m_mutex; + typedef std::lock_guard<std::recursive_mutex> lock_t; }; @@ -977,7 +980,8 @@ namespace asg AnaToolHandle<T> :: get () const { - return const_cast<AnaToolHandle<T>*>(this)->get(); + AnaToolHandle<T>* this_nc ATLAS_THREAD_SAFE = const_cast<AnaToolHandle<T>*>(this); + return this_nc->get(); } diff --git a/Control/AthToolSupport/AsgTools/AsgTools/AsgMetadataTool.h b/Control/AthToolSupport/AsgTools/AsgTools/AsgMetadataTool.h index 8ef2deb2421f489a7e9451f8f80ca2d707144927..d533b11c69727142659275cc97f984507adf111f 100644 --- a/Control/AthToolSupport/AsgTools/AsgTools/AsgMetadataTool.h +++ b/Control/AthToolSupport/AsgTools/AsgTools/AsgMetadataTool.h @@ -65,7 +65,7 @@ namespace asg { /// Type of the metadata store object in Athena typedef ServiceHandle< StoreGateSvc > MetaStore_t; /// Type of the metadata store pointer in standalone mode - typedef ServiceHandle< StoreGateSvc >& MetaStorePtr_t; + typedef const ServiceHandle< StoreGateSvc >& MetaStorePtr_t; #else # error "What environment are we in?!?" #endif // Environment selection @@ -124,10 +124,17 @@ namespace asg { /// @} private: +#ifdef ASGTOOL_STANDALONE /// Object accessing the input metadata store mutable MetaStore_t m_inputMetaStore; /// Object accessing the output metadata store mutable MetaStore_t m_outputMetaStore; +#else + /// Object accessing the input metadata store + MetaStore_t m_inputMetaStore; + /// Object accessing the output metadata store + MetaStore_t m_outputMetaStore; +#endif /// Flag helping to discover when the tool misses the opening of the first /// input file diff --git a/Control/AthToolSupport/AsgTools/AsgTools/MessageCheck.h b/Control/AthToolSupport/AsgTools/AsgTools/MessageCheck.h index 9eb440917b2d8504fd2255e7fcd7c92712f22f3b..a46b8d4bed5c561e9c465caadb4b47e8ec6909ef 100644 --- a/Control/AthToolSupport/AsgTools/AsgTools/MessageCheck.h +++ b/Control/AthToolSupport/AsgTools/AsgTools/MessageCheck.h @@ -6,8 +6,8 @@ -#ifndef ASG_TOOLS__MESSAGE_CHECK_H -#define ASG_TOOLS__MESSAGE_CHECK_H +#ifndef ASGTOOLS_MESSAGE_CHECK_H +#define ASGTOOLS_MESSAGE_CHECK_H /// \file MessageCheck.h /// \brief macros for messaging and checking status codes @@ -83,6 +83,9 @@ #include "AthenaBaseComps/AthMessaging.h" #endif +#include "CxxUtils/checker_macros.h" +#include <atomic> + /// \brief for standalone code this creates a new message category /// /// The idea is that this provides a way to use the "standard" @@ -121,7 +124,7 @@ static MsgStream NAME (TITLE); #else #define ASG_TOOLS_MSG_STREAM(NAME,TITLE) \ - static MsgStream NAME (::asg::detail::getMessageSvcAthena(), TITLE); + static thread_local MsgStream NAME (::asg::detail::getMessageSvcAthena(), TITLE); #endif /// \brief the source code part of \ref ANA_MSG_SOURCE @@ -134,9 +137,9 @@ { \ namespace \ { \ - MSG::Level& msgLevel () \ + std::atomic<MSG::Level>& msgLevel () \ { \ - static MSG::Level level = MSG::INFO; \ + static std::atomic<MSG::Level> level ATLAS_THREAD_SAFE = MSG::INFO; \ return level; \ } \ } \ diff --git a/Control/AthToolSupport/AsgTools/Root/AnaToolHandle.cxx b/Control/AthToolSupport/AsgTools/Root/AnaToolHandle.cxx index dd65ee6ebd9807a411c9992b561dcf33aeb449c8..9ff58a0e8b3a2ff85e833aacec2c400b11d442a1 100644 --- a/Control/AthToolSupport/AsgTools/Root/AnaToolHandle.cxx +++ b/Control/AthToolSupport/AsgTools/Root/AnaToolHandle.cxx @@ -11,6 +11,8 @@ // #include <AsgTools/AnaToolHandle.h> +#include "CxxUtils/checker_macros.h" +#include <mutex> #include "AsgTools/ToolStore.h" @@ -55,7 +57,7 @@ namespace asg AnaToolShareList& AnaToolShareList :: singleton () noexcept { - static AnaToolShareList result; + static AnaToolShareList result ATLAS_THREAD_SAFE; return result; } @@ -64,6 +66,7 @@ namespace asg std::shared_ptr<AnaToolShare> AnaToolShareList :: getShare (const std::string& name) const { + lock_t lock (m_mutex); auto iter = m_shared.find (name); if (iter == m_shared.end()) return std::shared_ptr<AnaToolShare> (); @@ -76,6 +79,7 @@ namespace asg setShare (const std::string& name, std::unique_ptr<AnaToolShare> val_share) { + lock_t lock (m_mutex); std::shared_ptr<AnaToolShare> result = getShare (name); if (result != nullptr) return result; @@ -91,6 +95,7 @@ namespace asg const AnaToolConfig& config, std::shared_ptr<AnaToolShare>& result) { + lock_t lock (m_mutex); using namespace msgToolHandle; auto& share = m_shared[name]; @@ -500,6 +505,7 @@ namespace asg #ifdef XAOD_STANDALONE interfaceType_t *baseToolPtr = nullptr; AnaToolCleanup baseCleanup; + // cppcheck-suppress nullPointer ANA_CHECK (makeToolRootCore (toolName, baseToolPtr, baseCleanup)); th = ToolHandle<interfaceType_t> (baseToolPtr); cleanup.swap (baseCleanup); diff --git a/Control/AthToolSupport/AsgTools/Root/MessageCheck.cxx b/Control/AthToolSupport/AsgTools/Root/MessageCheck.cxx index 1ff7cfcb59564fdd51e2c3518a0ed7ed7d2bff38..09385aaf7c6049ebda855ed6c641af7996fb18e5 100644 --- a/Control/AthToolSupport/AsgTools/Root/MessageCheck.cxx +++ b/Control/AthToolSupport/AsgTools/Root/MessageCheck.cxx @@ -35,7 +35,7 @@ namespace asg // Get the Athena message service IMessageSvc* getMessageSvcAthena() { - static IMessageSvc* msgSvc + static IMessageSvc* const msgSvc = Gaudi::svcLocator()->service<IMessageSvc>("MessageSvc"); return msgSvc; } diff --git a/Control/AthToolSupport/AsgTools/Root/ToolStore.cxx b/Control/AthToolSupport/AsgTools/Root/ToolStore.cxx index a351eee15ee93c25ce6f62cf041ff3494941db99..a78482ea7a8b3f9f0d4a990bbad0a7137133572d 100644 --- a/Control/AthToolSupport/AsgTools/Root/ToolStore.cxx +++ b/Control/AthToolSupport/AsgTools/Root/ToolStore.cxx @@ -27,12 +27,9 @@ typedef std::map< std::string, asg::IAsgTool* > ToolMap_t; namespace { - /// Helper function providing the application-wide tool registry - ToolMap_t& tools() { - - static ToolMap_t s_tools; - return s_tools; - } + /// The application-wide tool registry + static ToolMap_t s_tools ATLAS_THREAD_SAFE; + std::mutex s_toolMutex; } // private namespace @@ -55,15 +52,16 @@ namespace asg { return StatusCode::FAILURE; } + std::lock_guard<std::mutex> lock (s_toolMutex); // Check whether we already have a tool with this name: - if( tools().find( name ) != tools().end() ) { + if( s_tools.find( name ) != s_tools.end() ) { std::cout << "asg::ToolStore::put WARNING Tool with name \"" << name << "\" already registered" << std::endl; return StatusCode::FAILURE; } // Remember the tool: - tools()[ name ] = ptool; + s_tools[ name ] = ptool; return StatusCode::SUCCESS; } @@ -93,8 +91,9 @@ namespace asg { IAsgTool* ToolStore::get( const std::string& name, bool silent ) { - ToolMap_t::const_iterator itool = tools().find( name ); - if( itool == tools().end() ) { + std::lock_guard<std::mutex> lock (s_toolMutex); + ToolMap_t::const_iterator itool = s_tools.find( name ); + if( itool == s_tools.end() ) { if( ! silent ) { std::cout << "asg::ToolStore::get WARNING Tool with name \"" << name << "\" not found" << std::endl; @@ -112,8 +111,9 @@ namespace asg { StatusCode ToolStore::remove( const std::string& name ) { + std::lock_guard<std::mutex> lock (s_toolMutex); // Remove the tool, not checking if the call was successful or not: - tools().erase( name ); + s_tools.erase( name ); return StatusCode::SUCCESS; } @@ -126,7 +126,8 @@ namespace asg { // messages don't interleave the property values std::map<std::string,std::map<std::string,std::string> > properties; - for (auto& tool : tools()) + std::lock_guard<std::mutex> lock (s_toolMutex); + for (auto& tool : s_tools) { auto& myproperties = properties[tool.first]; myproperties[""] = std::string (typeid(*tool.second).name()) + "/" + tool.first; diff --git a/Control/AthenaBaseComps/AthenaBaseComps/AthFilterAlgorithm.h b/Control/AthenaBaseComps/AthenaBaseComps/AthFilterAlgorithm.h index cdacea9352d19a93e1aeea606df058a73feb1e48..f36a3a2964b067719cc8f98baacc0ab7863688e0 100644 --- a/Control/AthenaBaseComps/AthenaBaseComps/AthFilterAlgorithm.h +++ b/Control/AthenaBaseComps/AthenaBaseComps/AthFilterAlgorithm.h @@ -1,7 +1,7 @@ ///////////////////////// -*- C++ -*- ///////////////////////////// /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // AthFilterAlgorithm.h @@ -18,6 +18,8 @@ #include "GaudiKernel/ServiceHandle.h" #include "AthenaKernel/ICutFlowSvc.h" #include "AthenaBaseComps/AthAlgorithm.h" +#include "xAODEventInfo/EventInfo.h" +#include "StoreGate/ReadHandleKey.h" class AthFilterAlgorithm : public ::AthAlgorithm @@ -48,7 +50,7 @@ class AthFilterAlgorithm * It will in turn invoke the initialize() method of the derived algorithm, * and of any sub-algorithms which it creates. */ - virtual StatusCode sysInitialize(); + virtual StatusCode sysInitialize() override; /// Set the filter passed flag to the specified state virtual void setFilterPassed( bool state ) const; @@ -64,6 +66,9 @@ class AthFilterAlgorithm /// return the @c CutIdentifier corresponding to the top-level cut of this filter algorithm CutIdentifier cutID(); + /// EventInfo key for use in derived classes. + const SG::ReadHandleKey<xAOD::EventInfo>& eventInfoKey() const; + /////////////////////////////////////////////////////////////////// // Private data: @@ -88,6 +93,8 @@ class AthFilterAlgorithm bool m_resetSelfDescription; void doNotResetSelfDescription( Property& ); + SG::ReadHandleKey<xAOD::EventInfo> m_eventInfoKey + { this, "EventInfoKey", "EventInfo", "" }; }; // I/O operators diff --git a/Control/AthenaBaseComps/src/AthFilterAlgorithm.cxx b/Control/AthenaBaseComps/src/AthFilterAlgorithm.cxx index 22a696bf8a30a562b127bf43f50b2d25e3e76850..78746db210c617e5652671bdffd4ef1b51881c53 100644 --- a/Control/AthenaBaseComps/src/AthFilterAlgorithm.cxx +++ b/Control/AthenaBaseComps/src/AthFilterAlgorithm.cxx @@ -1,7 +1,7 @@ ///////////////////////// -*- C++ -*- ///////////////////////////// /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // AthFilterAlgorithm.cxx @@ -12,6 +12,7 @@ // AthenaBaseComps includes #include "AthenaBaseComps/AthFilterAlgorithm.h" #include "xAODEventInfo/EventInfo.h" +#include "StoreGate/ReadHandle.h" // STL includes @@ -91,6 +92,8 @@ AthFilterAlgorithm::sysInitialize() } } + ATH_CHECK( m_eventInfoKey.initialize() ); + // re-direct to base class... return AthAlgorithm::sysInitialize(); } @@ -104,16 +107,11 @@ AthFilterAlgorithm::setFilterPassed( bool state ) const if (state) { double evtWeight=1.0; - const xAOD::EventInfo* evtInfo = nullptr; - StatusCode sc = evtStore()->retrieve(evtInfo); - if ( sc.isFailure() || NULL == evtInfo ) { - ATH_MSG_ERROR("Could not retrieve xAOD::EventInfo from StoreGate "); - evtWeight=-1000.; - } else { - // Only try to access the mcEventWeight if we are running on Monte Carlo, duhhh! - if ( evtInfo->eventType(xAOD::EventInfo::IS_SIMULATION) ) { - evtWeight = evtInfo->mcEventWeight(); - } + const EventContext& ctx = Gaudi::Hive::currentContext(); + SG::ReadHandle<xAOD::EventInfo> evtInfo (m_eventInfoKey, ctx); + // Only try to access the mcEventWeight if we are running on Monte Carlo, duhhh! + if ( evtInfo->eventType(xAOD::EventInfo::IS_SIMULATION) ) { + evtWeight = evtInfo->mcEventWeight(); } m_cutFlowSvc->addEvent(m_cutID,evtWeight); } @@ -136,3 +134,10 @@ AthFilterAlgorithm::setFilterDescription(const std::string& descr) return; } + +const SG::ReadHandleKey<xAOD::EventInfo>& +AthFilterAlgorithm::eventInfoKey() const +{ + return m_eventInfoKey; +} + diff --git a/Control/AthenaCommon/share/bootstrap.pkl b/Control/AthenaCommon/share/bootstrap.pkl index 4dad90511ccdac190b18fdf3733412da7261292a..be2acce6a709ad88d000474b5ad69c28fc6cc197 100644 --- a/Control/AthenaCommon/share/bootstrap.pkl +++ b/Control/AthenaCommon/share/bootstrap.pkl @@ -168,7 +168,7 @@ sS'DetStore' p88 S'StoreGateSvc/DetectorStore' p89 -ssS'AthFilterSeq' +ssS'AthMasterSeq' p90 (dp91 S'ExtraOutputs' @@ -183,79 +183,79 @@ sS'ExtraInputs' p96 S'[]' p97 -sS'Members' +sS'Sequential' p98 -S"['AthSequencer/AthAlgEvtSeq']" +S'True' p99 -sS'NeededResources' +sS'Members' p100 -S'[]' +S"['AthSequencer/AthAlgEvtSeq', 'AthSequencer/AthOutSeq', 'AthSequencer/AthRegSeq']" p101 -sS'DetStore' +sS'NeededResources' p102 -S'StoreGateSvc/DetectorStore' +S'[]' p103 -ssS'AthMasterSeq' +sS'DetStore' p104 -(dp105 -S'ExtraOutputs' +S'StoreGateSvc/DetectorStore' +p105 +ssS'AthAlgEvtSeq' p106 -S'[]' -p107 -sS'EvtStore' +(dp107 +S'ExtraOutputs' p108 -S'StoreGateSvc' +S'[]' p109 -sS'ExtraInputs' +sS'EvtStore' p110 -S'[]' +S'StoreGateSvc' p111 -sS'Sequential' +sS'ExtraInputs' p112 -S'True' +S'[]' p113 -sS'StopOverride' +sS'Sequential' p114 S'True' p115 -sS'Members' +sS'StopOverride' p116 -S"['AthSequencer/AthFilterSeq', 'AthSequencer/AthOutSeq', 'AthSequencer/AthRegSeq']" +S'True' p117 -sS'NeededResources' +sS'Members' p118 -S'[]' +S"['AthSequencer/AthBeginSeq', 'AthSequencer/AthAllAlgSeq', 'AthSequencer/AthEndSeq']" p119 -sS'DetStore' +sS'NeededResources' p120 -S'StoreGateSvc/DetectorStore' +S'[]' p121 -ssS'AthAlgEvtSeq' +sS'DetStore' p122 -(dp123 -S'ExtraOutputs' +S'StoreGateSvc/DetectorStore' +p123 +ssS'AthEndSeq' p124 -S'[]' -p125 -sS'EvtStore' +(dp125 +S'ExtraOutputs' p126 -S'StoreGateSvc' +S'[]' p127 -sS'ExtraInputs' +sS'EvtStore' p128 -S'[]' +S'StoreGateSvc' p129 -sS'Sequential' +sS'ExtraInputs' p130 -S'True' +S'[]' p131 -sS'StopOverride' +sS'Sequential' p132 S'True' p133 sS'Members' p134 -S"['AthSequencer/AthBeginSeq', 'AthSequencer/AthAllAlgSeq', 'AthSequencer/AthEndSeq']" +S"['AthIncFirerAlg/EndIncFiringAlg', 'IncidentProcAlg/IncidentProcAlg2']" p135 sS'NeededResources' p136 @@ -265,7 +265,7 @@ sS'DetStore' p138 S'StoreGateSvc/DetectorStore' p139 -ssS'AthEndSeq' +ssS'AthRegSeq' p140 (dp141 S'ExtraOutputs' @@ -280,40 +280,40 @@ sS'ExtraInputs' p146 S'[]' p147 -sS'Sequential' +sS'Members' p148 -S'True' +S'[]' p149 -sS'Members' +sS'NeededResources' p150 -S"['AthIncFirerAlg/EndIncFiringAlg', 'IncidentProcAlg/IncidentProcAlg2']" +S'[]' p151 -sS'NeededResources' +sS'DetStore' p152 -S'[]' +S'StoreGateSvc/DetectorStore' p153 -sS'DetStore' +ssS'EndIncFiringAlg' p154 -S'StoreGateSvc/DetectorStore' -p155 -ssS'AthRegSeq' -p156 -(dp157 +(dp155 S'ExtraOutputs' -p158 +p156 S'[]' -p159 +p157 sS'EvtStore' -p160 +p158 S'StoreGateSvc' -p161 +p159 sS'ExtraInputs' -p162 +p160 S'[]' +p161 +sS'FireSerial' +p162 +S'False' p163 -sS'Members' +sS'Incidents' p164 -S'[]' +S"['EndEvent']" p165 sS'NeededResources' p166 @@ -323,7 +323,7 @@ sS'DetStore' p168 S'StoreGateSvc/DetectorStore' p169 -ssS'EndIncFiringAlg' +ssS'Streams' p170 (dp171 S'ExtraOutputs' @@ -338,93 +338,93 @@ sS'ExtraInputs' p176 S'[]' p177 -sS'FireSerial' +sS'Members' p178 -S'False' +S'[]' p179 -sS'Incidents' +sS'NeededResources' p180 -S"['EndEvent']" +S'[]' p181 -sS'NeededResources' +sS'DetStore' p182 -S'[]' +S'StoreGateSvc/DetectorStore' p183 -sS'DetStore' +ssS'NTupleSvc' p184 -S'StoreGateSvc/DetectorStore' -p185 -ssS'Streams' +(dp185 +S'InhibitPathes' p186 -(dp187 -S'ExtraOutputs' +S'[]' +p187 +sS'Input' p188 S'[]' p189 -sS'EvtStore' +sS'Output' p190 -S'StoreGateSvc' +S'[]' p191 -sS'ExtraInputs' +ssS'EventPersistencySvc' p192 -S'[]' -p193 -sS'Members' +(dp193 +S'CnvServices' p194 S'[]' p195 -sS'NeededResources' +ssS'AthAlgSeq' p196 -S'[]' -p197 -sS'DetStore' +(dp197 +S'ExtraOutputs' p198 -S'StoreGateSvc/DetectorStore' +S'[]' p199 -ssS'NTupleSvc' +sS'IgnoreFilterPassed' p200 -(dp201 -S'InhibitPathes' +S'True' +p201 +sS'EvtStore' p202 -S'[]' +S'StoreGateSvc' p203 -sS'Input' +sS'ExtraInputs' p204 S'[]' p205 -sS'Output' +sS'StopOverride' p206 -S'[]' +S'True' p207 -ssS'EventPersistencySvc' +sS'Members' p208 -(dp209 -S'CnvServices' +S'[]' +p209 +sS'NeededResources' p210 S'[]' p211 -ssS'AthAlgSeq' +sS'DetStore' p212 -(dp213 -S'ExtraOutputs' +S'StoreGateSvc/DetectorStore' +p213 +ssS'AthAllAlgSeq' p214 -S'[]' -p215 -sS'EvtStore' +(dp215 +S'ExtraOutputs' p216 -S'StoreGateSvc' +S'[]' p217 -sS'ExtraInputs' +sS'EvtStore' p218 -S'[]' +S'StoreGateSvc' p219 -sS'StopOverride' +sS'ExtraInputs' p220 -S'True' +S'[]' p221 sS'Members' p222 -S'[]' +S"['AthSequencer/AthCondSeq', 'AthSequencer/AthAlgSeq']" p223 sS'NeededResources' p224 @@ -434,49 +434,48 @@ sS'DetStore' p226 S'StoreGateSvc/DetectorStore' p227 -ssS'AthAllAlgSeq' +ssS'AthenaSealSvc' p228 (dp229 -S'ExtraOutputs' +S'DictNames' p230 S'[]' p231 -sS'EvtStore' +sS'IgnoreDicts' p232 -S'StoreGateSvc' +S"['libSealCLHEPDict']" p233 -sS'ExtraInputs' +sS'IgnoreNames' p234 -S'[]' +S"['Gaudi', 'GaudiPython::Interface', 'GaudiPython::Helper', 'FactoryTable', 'IInterface', 'IFactory', 'IAlgFactory', 'ISvcFactory', 'IToolFactory', 'InterfaceID', 'StatusCode', 'IAppMgrUI', 'IProperty', 'Property', 'std::vector<Property*>', 'std::vector<const Property*>', 'std::list<IAlgorithm*>', 'std::list<IService*>', 'std::list<const IFactory*>', 'std::vector<IRegistry*>', 'SimpleProperty', 'SimplePropertyRef', 'IService', 'IAlgorithm', 'ISvcManager', 'IAlgManager', 'IJobOptionsSvc', 'ISvcLocator', 'IEventProcessor', 'IDataProviderSvc', 'IDataManagerSvc', 'IRegistry', 'ContainedObject', 'std::vector<const ContainedObject*>', 'DataObject', 'IHistogramSvc', 'AIDA::I', 'Algorithm', 'Service', 'GaudiPython::PyAlgorithm', 'GaudiPython::PyAlgorithmWrap', 'IParticlePropertySvc', 'ParticleProperty', 'StoreGateSvc', 'IStoragePolicy', 'CharDbArray', 'DoubleDbArray', 'FloatDbArray', 'IntDbArray', 'LongDbArray', 'ShortDbArray', 'AthenaEventLoopMgr', 'MinimalEventLoopMgr', 'PyAthenaEventLoopMgr', 'NTuple::Directory', 'NTuple::File ', 'NTuple::Tuple', 'INTuple', 'NTuple::Tuple', 'greater<int>', 'allocator<', 'string']" p235 -sS'Members' +ssS'IncidentProcAlg2' p236 -S"['AthSequencer/AthCondSeq', 'AthSequencer/AthAlgSeq']" -p237 -sS'NeededResources' +(dp237 +S'ExtraOutputs' p238 S'[]' p239 -sS'DetStore' +sS'NeededResources' p240 -S'StoreGateSvc/DetectorStore' +S'[]' p241 -ssS'AthenaSealSvc' +sS'ExtraInputs' p242 -(dp243 -S'DictNames' -p244 S'[]' -p245 -sS'IgnoreDicts' +p243 +ssS'DetectorStore' +p244 +(dp245 +S'IncidentSvc' p246 -S"['libSealCLHEPDict']" +S'IncidentSvc' p247 -sS'IgnoreNames' +sS'ProxyProviderSvc' p248 -S"['Gaudi', 'GaudiPython::Interface', 'GaudiPython::Helper', 'FactoryTable', 'IInterface', 'IFactory', 'IAlgFactory', 'ISvcFactory', 'IToolFactory', 'InterfaceID', 'StatusCode', 'IAppMgrUI', 'IProperty', 'Property', 'std::vector<Property*>', 'std::vector<const Property*>', 'std::list<IAlgorithm*>', 'std::list<IService*>', 'std::list<const IFactory*>', 'std::vector<IRegistry*>', 'SimpleProperty', 'SimplePropertyRef', 'IService', 'IAlgorithm', 'ISvcManager', 'IAlgManager', 'IJobOptionsSvc', 'ISvcLocator', 'IEventProcessor', 'IDataProviderSvc', 'IDataManagerSvc', 'IRegistry', 'ContainedObject', 'std::vector<const ContainedObject*>', 'DataObject', 'IHistogramSvc', 'AIDA::I', 'Algorithm', 'Service', 'GaudiPython::PyAlgorithm', 'GaudiPython::PyAlgorithmWrap', 'IParticlePropertySvc', 'ParticleProperty', 'StoreGateSvc', 'IStoragePolicy', 'CharDbArray', 'DoubleDbArray', 'FloatDbArray', 'IntDbArray', 'LongDbArray', 'ShortDbArray', 'AthenaEventLoopMgr', 'MinimalEventLoopMgr', 'PyAthenaEventLoopMgr', 'NTuple::Directory', 'NTuple::File ', 'NTuple::Tuple', 'INTuple', 'NTuple::Tuple', 'greater<int>', 'allocator<', 'string']" +S'ProxyProviderSvc' p249 -ssS'IncidentProcAlg2' +ssS'IncidentProcAlg1' p250 (dp251 S'ExtraOutputs' @@ -491,54 +490,28 @@ sS'ExtraInputs' p256 S'[]' p257 -ssS'DetectorStore' +ssS'HistogramDataSvc' p258 (dp259 -S'IncidentSvc' +S'Input' p260 -S'IncidentSvc' +S'[]' p261 -sS'ProxyProviderSvc' +sS'InhibitPathes' p262 -S'ProxyProviderSvc' +S'[]' p263 -ssS'IncidentProcAlg1' +ssS'HistoryStore' p264 (dp265 -S'ExtraOutputs' -p266 -S'[]' -p267 -sS'NeededResources' -p268 -S'[]' -p269 -sS'ExtraInputs' -p270 -S'[]' -p271 -ssS'HistogramDataSvc' -p272 -(dp273 -S'Input' -p274 -S'[]' -p275 -sS'InhibitPathes' -p276 -S'[]' -p277 -ssS'HistoryStore' -p278 -(dp279 S'IncidentSvc' -p280 +p266 S'IncidentSvc' -p281 +p267 sS'ProxyProviderSvc' -p282 +p268 S'ProxyProviderSvc' -p283 +p269 ss.ccollections defaultdict p1 @@ -797,7 +770,7 @@ p112 g7 sS'SEARCHPATH' p113 -S'.:/cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-02-20T2138/Athena/22.0.1/InstallArea/x86_64-centos7-gcc8-opt/jobOptions:/cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-02-20T2138/AthenaExternals/22.0.1/InstallArea/x86_64-centos7-gcc8-opt/jobOptions:/cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-02-20T2138/GAUDI/22.0.1/InstallArea/x86_64-centos7-gcc8-opt/jobOptions' +S'.:/afs/cern.ch/work/s/smh/MR_21423/bld/x86_64-centos7-gcc8-opt/jobOptions:/cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-03T2138/GAUDI/22.0.1/InstallArea/x86_64-centos7-gcc8-opt/jobOptions:/afs/cern.ch/work/s/smh/MR_21423/bld:/cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-03T2138/Athena/22.0.1/InstallArea/x86_64-centos7-gcc8-opt/jobOptions:/cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-03T2138/AthenaExternals/22.0.1/InstallArea/x86_64-centos7-gcc8-opt/jobOptions' p114 sS'AuditInitialize' p115 diff --git a/Control/AthenaCommon/share/bootstrap_threaded.pkl b/Control/AthenaCommon/share/bootstrap_threaded.pkl index 8c0a42c81d0acdd45c5318ce11d32a2c3d3d5ba9..23052604a7839bd6f13d92d823f568d3215fc5ef 100644 --- a/Control/AthenaCommon/share/bootstrap_threaded.pkl +++ b/Control/AthenaCommon/share/bootstrap_threaded.pkl @@ -259,7 +259,7 @@ sS'AbortOnError' p134 S'False' p135 -ssS'AthFilterSeq' +ssS'AthMasterSeq' p136 (dp137 S'ExtraOutputs' @@ -274,79 +274,79 @@ sS'ExtraInputs' p142 S'[]' p143 -sS'Members' +sS'Sequential' p144 -S"['AthSequencer/AthAlgEvtSeq']" +S'True' p145 -sS'NeededResources' +sS'Members' p146 -S'[]' +S"['AthSequencer/AthAlgEvtSeq', 'AthSequencer/AthOutSeq', 'AthSequencer/AthRegSeq']" p147 -sS'DetStore' +sS'NeededResources' p148 -S'StoreGateSvc/DetectorStore' +S'[]' p149 -ssS'AthMasterSeq' +sS'DetStore' p150 -(dp151 -S'ExtraOutputs' +S'StoreGateSvc/DetectorStore' +p151 +ssS'AthAlgEvtSeq' p152 -S'[]' -p153 -sS'EvtStore' +(dp153 +S'ExtraOutputs' p154 -S'StoreGateSvc' +S'[]' p155 -sS'ExtraInputs' +sS'EvtStore' p156 -S'[]' +S'StoreGateSvc' p157 -sS'Sequential' +sS'ExtraInputs' p158 -S'True' +S'[]' p159 -sS'StopOverride' +sS'Sequential' p160 S'True' p161 -sS'Members' +sS'StopOverride' p162 -S"['AthSequencer/AthFilterSeq', 'AthSequencer/AthOutSeq', 'AthSequencer/AthRegSeq']" +S'True' p163 -sS'NeededResources' +sS'Members' p164 -S'[]' +S"['AthSequencer/AthBeginSeq', 'AthSequencer/AthAllAlgSeq', 'AthSequencer/AthEndSeq']" p165 -sS'DetStore' +sS'NeededResources' p166 -S'StoreGateSvc/DetectorStore' +S'[]' p167 -ssS'AthAlgEvtSeq' +sS'DetStore' p168 -(dp169 -S'ExtraOutputs' +S'StoreGateSvc/DetectorStore' +p169 +ssS'AthEndSeq' p170 -S'[]' -p171 -sS'EvtStore' +(dp171 +S'ExtraOutputs' p172 -S'StoreGateSvc' +S'[]' p173 -sS'ExtraInputs' +sS'EvtStore' p174 -S'[]' +S'StoreGateSvc' p175 -sS'Sequential' +sS'ExtraInputs' p176 -S'True' +S'[]' p177 -sS'StopOverride' +sS'Sequential' p178 S'True' p179 sS'Members' p180 -S"['AthSequencer/AthBeginSeq', 'AthSequencer/AthAllAlgSeq', 'AthSequencer/AthEndSeq']" +S"['AthIncFirerAlg/EndIncFiringAlg', 'IncidentProcAlg/IncidentProcAlg2']" p181 sS'NeededResources' p182 @@ -356,65 +356,65 @@ sS'DetStore' p184 S'StoreGateSvc/DetectorStore' p185 -ssS'AthEndSeq' +ssS'AlgResourcePool' p186 (dp187 -S'ExtraOutputs' +S'OutputLevel' p188 -S'[]' +S'3' +sS'TopAlg' p189 -sS'EvtStore' +S"['AthMasterSeq']" p190 -S'StoreGateSvc' +ssS'AthRegSeq' p191 -sS'ExtraInputs' -p192 -S'[]' +(dp192 +S'ExtraOutputs' p193 -sS'Sequential' +S'[]' p194 -S'True' +sS'EvtStore' p195 -sS'Members' +S'StoreGateSvc' p196 -S"['AthIncFirerAlg/EndIncFiringAlg', 'IncidentProcAlg/IncidentProcAlg2']" +sS'ExtraInputs' p197 -sS'NeededResources' -p198 S'[]' +p198 +sS'Members' p199 -sS'DetStore' +S'[]' p200 -S'StoreGateSvc/DetectorStore' +sS'NeededResources' p201 -ssS'AlgResourcePool' +S'[]' p202 -(dp203 -S'OutputLevel' +sS'DetStore' +p203 +S'StoreGateSvc/DetectorStore' p204 -S'3' -sS'TopAlg' +ssS'EndIncFiringAlg' p205 -S"['AthMasterSeq']" -p206 -ssS'AthRegSeq' -p207 -(dp208 +(dp206 S'ExtraOutputs' -p209 +p207 S'[]' -p210 +p208 sS'EvtStore' -p211 +p209 S'StoreGateSvc' -p212 +p210 sS'ExtraInputs' -p213 +p211 S'[]' +p212 +sS'FireSerial' +p213 +S'False' p214 -sS'Members' +sS'Incidents' p215 -S'[]' +S"['EndEvent']" p216 sS'NeededResources' p217 @@ -424,7 +424,7 @@ sS'DetStore' p219 S'StoreGateSvc/DetectorStore' p220 -ssS'EndIncFiringAlg' +ssS'Streams' p221 (dp222 S'ExtraOutputs' @@ -439,93 +439,93 @@ sS'ExtraInputs' p227 S'[]' p228 -sS'FireSerial' +sS'Members' p229 -S'False' +S'[]' p230 -sS'Incidents' +sS'NeededResources' p231 -S"['EndEvent']" +S'[]' p232 -sS'NeededResources' +sS'DetStore' p233 -S'[]' +S'StoreGateSvc/DetectorStore' p234 -sS'DetStore' +ssS'NTupleSvc' p235 -S'StoreGateSvc/DetectorStore' -p236 -ssS'Streams' +(dp236 +S'InhibitPathes' p237 -(dp238 -S'ExtraOutputs' +S'[]' +p238 +sS'Input' p239 S'[]' p240 -sS'EvtStore' +sS'Output' p241 -S'StoreGateSvc' +S'[]' p242 -sS'ExtraInputs' +ssS'EventPersistencySvc' p243 -S'[]' -p244 -sS'Members' +(dp244 +S'CnvServices' p245 S'[]' p246 -sS'NeededResources' +ssS'AthAlgSeq' p247 -S'[]' -p248 -sS'DetStore' +(dp248 +S'ExtraOutputs' p249 -S'StoreGateSvc/DetectorStore' +S'[]' p250 -ssS'NTupleSvc' +sS'IgnoreFilterPassed' p251 -(dp252 -S'InhibitPathes' +S'True' +p252 +sS'EvtStore' p253 -S'[]' +S'StoreGateSvc' p254 -sS'Input' +sS'ExtraInputs' p255 S'[]' p256 -sS'Output' +sS'StopOverride' p257 -S'[]' +S'True' p258 -ssS'EventPersistencySvc' +sS'Members' p259 -(dp260 -S'CnvServices' +S"['SGInputLoader/SGInputLoader']" +p260 +sS'NeededResources' p261 S'[]' p262 -ssS'AthAlgSeq' +sS'DetStore' p263 -(dp264 -S'ExtraOutputs' +S'StoreGateSvc/DetectorStore' +p264 +ssS'AthAllAlgSeq' p265 -S'[]' -p266 -sS'EvtStore' +(dp266 +S'ExtraOutputs' p267 -S'StoreGateSvc' +S'[]' p268 -sS'ExtraInputs' +sS'EvtStore' p269 -S'[]' +S'StoreGateSvc' p270 -sS'StopOverride' +sS'ExtraInputs' p271 -S'True' +S'[]' p272 sS'Members' p273 -S"['SGInputLoader/SGInputLoader']" +S"['AthSequencer/AthAlgSeq', 'AthSequencer/AthCondSeq']" p274 sS'NeededResources' p275 @@ -535,122 +535,95 @@ sS'DetStore' p277 S'StoreGateSvc/DetectorStore' p278 -ssS'AthAllAlgSeq' +ssS'AthenaSealSvc' p279 (dp280 -S'ExtraOutputs' +S'DictNames' p281 S'[]' p282 -sS'EvtStore' +sS'IgnoreDicts' p283 -S'StoreGateSvc' +S"['libSealCLHEPDict']" p284 -sS'ExtraInputs' +sS'IgnoreNames' p285 -S'[]' +S"['Gaudi', 'GaudiPython::Interface', 'GaudiPython::Helper', 'FactoryTable', 'IInterface', 'IFactory', 'IAlgFactory', 'ISvcFactory', 'IToolFactory', 'InterfaceID', 'StatusCode', 'IAppMgrUI', 'IProperty', 'Property', 'std::vector<Property*>', 'std::vector<const Property*>', 'std::list<IAlgorithm*>', 'std::list<IService*>', 'std::list<const IFactory*>', 'std::vector<IRegistry*>', 'SimpleProperty', 'SimplePropertyRef', 'IService', 'IAlgorithm', 'ISvcManager', 'IAlgManager', 'IJobOptionsSvc', 'ISvcLocator', 'IEventProcessor', 'IDataProviderSvc', 'IDataManagerSvc', 'IRegistry', 'ContainedObject', 'std::vector<const ContainedObject*>', 'DataObject', 'IHistogramSvc', 'AIDA::I', 'Algorithm', 'Service', 'GaudiPython::PyAlgorithm', 'GaudiPython::PyAlgorithmWrap', 'IParticlePropertySvc', 'ParticleProperty', 'StoreGateSvc', 'IStoragePolicy', 'CharDbArray', 'DoubleDbArray', 'FloatDbArray', 'IntDbArray', 'LongDbArray', 'ShortDbArray', 'AthenaEventLoopMgr', 'MinimalEventLoopMgr', 'PyAthenaEventLoopMgr', 'NTuple::Directory', 'NTuple::File ', 'NTuple::Tuple', 'INTuple', 'NTuple::Tuple', 'greater<int>', 'allocator<', 'string']" p286 -sS'Members' +ssS'IncidentProcAlg2' p287 -S"['AthSequencer/AthAlgSeq', 'AthSequencer/AthCondSeq']" -p288 -sS'NeededResources' +(dp288 +S'ExtraOutputs' p289 S'[]' p290 -sS'DetStore' +sS'NeededResources' p291 -S'StoreGateSvc/DetectorStore' +S'[]' p292 -ssS'AthenaSealSvc' +sS'ExtraInputs' p293 -(dp294 -S'DictNames' -p295 S'[]' -p296 -sS'IgnoreDicts' +p294 +ssS'DetectorStore' +p295 +(dp296 +S'IncidentSvc' p297 -S"['libSealCLHEPDict']" +S'IncidentSvc' p298 -sS'IgnoreNames' +sS'ProxyProviderSvc' p299 -S"['Gaudi', 'GaudiPython::Interface', 'GaudiPython::Helper', 'FactoryTable', 'IInterface', 'IFactory', 'IAlgFactory', 'ISvcFactory', 'IToolFactory', 'InterfaceID', 'StatusCode', 'IAppMgrUI', 'IProperty', 'Property', 'std::vector<Property*>', 'std::vector<const Property*>', 'std::list<IAlgorithm*>', 'std::list<IService*>', 'std::list<const IFactory*>', 'std::vector<IRegistry*>', 'SimpleProperty', 'SimplePropertyRef', 'IService', 'IAlgorithm', 'ISvcManager', 'IAlgManager', 'IJobOptionsSvc', 'ISvcLocator', 'IEventProcessor', 'IDataProviderSvc', 'IDataManagerSvc', 'IRegistry', 'ContainedObject', 'std::vector<const ContainedObject*>', 'DataObject', 'IHistogramSvc', 'AIDA::I', 'Algorithm', 'Service', 'GaudiPython::PyAlgorithm', 'GaudiPython::PyAlgorithmWrap', 'IParticlePropertySvc', 'ParticleProperty', 'StoreGateSvc', 'IStoragePolicy', 'CharDbArray', 'DoubleDbArray', 'FloatDbArray', 'IntDbArray', 'LongDbArray', 'ShortDbArray', 'AthenaEventLoopMgr', 'MinimalEventLoopMgr', 'PyAthenaEventLoopMgr', 'NTuple::Directory', 'NTuple::File ', 'NTuple::Tuple', 'INTuple', 'NTuple::Tuple', 'greater<int>', 'allocator<', 'string']" +S'ProxyProviderSvc' p300 -ssS'IncidentProcAlg2' +ssS'ConditionStore' p301 (dp302 -S'ExtraOutputs' +S'IncidentSvc' p303 -S'[]' +S'IncidentSvc' p304 -sS'NeededResources' +sS'ProxyProviderSvc' p305 -S'[]' +S'ProxyProviderSvc' p306 -sS'ExtraInputs' +ssS'IncidentProcAlg1' p307 -S'[]' -p308 -ssS'DetectorStore' +(dp308 +S'ExtraOutputs' p309 -(dp310 -S'IncidentSvc' +S'[]' +p310 +sS'NeededResources' p311 -S'IncidentSvc' +S'[]' p312 -sS'ProxyProviderSvc' +sS'ExtraInputs' p313 -S'ProxyProviderSvc' +S'[]' p314 -ssS'ConditionStore' +ssS'HistogramDataSvc' p315 (dp316 -S'IncidentSvc' +S'Input' p317 -S'IncidentSvc' +S'[]' p318 -sS'ProxyProviderSvc' +sS'InhibitPathes' p319 -S'ProxyProviderSvc' +S'[]' p320 -ssS'IncidentProcAlg1' +ssS'HistoryStore' p321 (dp322 -S'ExtraOutputs' -p323 -S'[]' -p324 -sS'NeededResources' -p325 -S'[]' -p326 -sS'ExtraInputs' -p327 -S'[]' -p328 -ssS'HistogramDataSvc' -p329 -(dp330 -S'Input' -p331 -S'[]' -p332 -sS'InhibitPathes' -p333 -S'[]' -p334 -ssS'HistoryStore' -p335 -(dp336 S'IncidentSvc' -p337 +p323 S'IncidentSvc' -p338 +p324 sS'ProxyProviderSvc' -p339 +p325 S'ProxyProviderSvc' -p340 +p326 ss.ccollections defaultdict p1 @@ -902,7 +875,7 @@ p105 g7 sS'SEARCHPATH' p106 -S'.:/cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-02-20T2138/Athena/22.0.1/InstallArea/x86_64-centos7-gcc8-opt/jobOptions:/cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-02-20T2138/AthenaExternals/22.0.1/InstallArea/x86_64-centos7-gcc8-opt/jobOptions:/cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-02-20T2138/GAUDI/22.0.1/InstallArea/x86_64-centos7-gcc8-opt/jobOptions' +S'.:/afs/cern.ch/work/s/smh/MR_21423/bld/x86_64-centos7-gcc8-opt/jobOptions:/cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-03T2138/GAUDI/22.0.1/InstallArea/x86_64-centos7-gcc8-opt/jobOptions:/afs/cern.ch/work/s/smh/MR_21423/bld:/cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-03T2138/Athena/22.0.1/InstallArea/x86_64-centos7-gcc8-opt/jobOptions:/cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-03T2138/AthenaExternals/22.0.1/InstallArea/x86_64-centos7-gcc8-opt/jobOptions' p107 sS'AuditInitialize' p108 diff --git a/Control/AthenaConfiguration/python/AllConfigFlags.py b/Control/AthenaConfiguration/python/AllConfigFlags.py index 99e1eb37643d12fb7fdabf8365c814a76773eca2..cbcef7a4e36e3102c365909f8881a12c8fdf9334 100644 --- a/Control/AthenaConfiguration/python/AllConfigFlags.py +++ b/Control/AthenaConfiguration/python/AllConfigFlags.py @@ -19,9 +19,9 @@ def _createCfgFlags(): acf.addFlag('Concurrency.NumConcurrentEvents', 0) acf.addFlag('Scheduler.CheckDependencies', True) - acf.addFlag('Scheduler.ShowDataDeps', False) - acf.addFlag('Scheduler.ShowDataFlow', False) - acf.addFlag('Scheduler.ShowControlFlow', False) + acf.addFlag('Scheduler.ShowDataDeps', True) + acf.addFlag('Scheduler.ShowDataFlow', True) + acf.addFlag('Scheduler.ShowControlFlow', True) acf.addFlag('Common.isOnline', False ) # Job runs in an online environment (access only to resources available at P1) # former global.isOnline @@ -101,11 +101,15 @@ def _createCfgFlags(): return createMuonConfigFlags() acf.addFlagsCategory( "Muon", __muon ) + def __egamma(): + from egammaConfig.egammaConfigFlags import createEgammaConfigFlags + return createEgammaConfigFlags() + acf.addFlagsCategory( "Egamma", __egamma ) def __dq(): from AthenaMonitoring.DQConfigFlags import createDQConfigFlags, createComplexDQConfigFlags dqf = createDQConfigFlags() - createComplexDQConfigFlags(acf) # TODO try to use the same style? + dqf.join( createComplexDQConfigFlags() ) return dqf acf.addFlagsCategory("DQ", __dq ) diff --git a/Control/AthenaConfiguration/python/ComponentAccumulator.py b/Control/AthenaConfiguration/python/ComponentAccumulator.py index 06287a25bc2663cc35fa39f2ba59e7821ca85a56..e3df021c15aa7f0006b160fba9abe336b24c3f19 100644 --- a/Control/AthenaConfiguration/python/ComponentAccumulator.py +++ b/Control/AthenaConfiguration/python/ComponentAccumulator.py @@ -26,7 +26,7 @@ class ComponentAccumulator(object): def __init__(self,sequenceName='AthAlgSeq'): self._msg=logging.getLogger('ComponentAccumulator') - self._sequence=AthSequencer(sequenceName) #(Nested) sequence of event processing algorithms per sequence + their private tools + self._sequence=AthSequencer(sequenceName,Sequential=True) #(Nested) sequence of event processing algorithms per sequence + their private tools self._conditionsAlgs=[] #Unordered list of conditions algorithms + their private tools self._services=[] #List of service, not yet sure if the order matters here in the MT age self._eventInputs=set() #List of items (as strings) to be read from the input (required at least for BS-reading). @@ -577,7 +577,6 @@ class ComponentAccumulator(object): elif isinstance(v,GaudiHandles.GaudiHandleArray): self._jocat[name][k]=str([ v1.getFullName() for v1 in v ]) else: - print name,k,v if name not in self._jocat: self._jocat[name] = {} self._jocat[name][k]=str(v) @@ -592,66 +591,69 @@ class ComponentAccumulator(object): from AthenaCommon.Utils.unixtools import find_datafile import pickle if useBootStrapFile: - import glob - # first load basics from the bootstrap-pickle - # a better solution to be discussed - # prefer local file - localbs = glob.glob("bootstrap.pkl") - if len( localbs ) == 0: - # if local bootstrap is missing, use one from the release - bsfilename=find_datafile("bootstrap.pkl") - else: - bsfilename = "./"+localbs[0] - - bsfile=open(bsfilename) - self._jocat=pickle.load(bsfile) - self._jocfg=pickle.load(bsfile) - self._pycomps=pickle.load(bsfile) - bsfile.close() + import glob + # first load basics from the bootstrap-pickle + # a better solution to be discussed + # prefer local file + localbs = glob.glob("bootstrap.pkl") + if len( localbs ) == 0: + # if local bootstrap is missing, use one from the release + bsfilename=find_datafile("bootstrap.pkl") + else: + bsfilename = "./"+localbs[0] + + bsfile=open(bsfilename) + self._jocat=pickle.load(bsfile) + self._jocfg=pickle.load(bsfile) + self._pycomps=pickle.load(bsfile) + bsfile.close() else: - from AthenaConfiguration.MainServicesConfig import MainServicesThreadedCfg, MainServicesSerialCfg - if threaded: - from AthenaConfiguration.AllConfigFlags import ConfigFlags - flags = ConfigFlags.clone() - flags.Concurrency.NumThreads = 1 - flags.Concurrency.NumConcurrentEvents = 1 - basecfg = MainServicesThreadedCfg(flags) - basecfg.merge(self) - self = basecfg - else: #Serial - basecfg = MainServicesSerialCfg() - basecfg.merge(self) - self = basecfg - self.printConfig() - self._jocat={} - self._jocfg={} - self._pycomps={} - self._jocfg["ApplicationMgr"]={} - self._jocfg["ApplicationMgr"]["ExtSvc"] = "['ToolSvc/ToolSvc', \ - 'AuditorSvc/AuditorSvc', \ - 'MessageSvc/MessageSvc', \ - 'IncidentSvc/IncidentSvc',\ - 'EvtPersistencySvc/EventPersistencySvc',\ - 'HistogramSvc/HistogramDataSvc',\ - 'NTupleSvc/NTupleSvc',\ - 'RndmGenSvc/RndmGenSvc',\ - 'ChronoStatSvc/ChronoStatSvc',\ - 'StatusCodeSvc/StatusCodeSvc',\ - 'StoreGateSvc/StoreGateSvc',\ - 'StoreGateSvc/DetectorStore',\ - 'StoreGateSvc/HistoryStore',\ - 'ClassIDSvc/ClassIDSvc',\ - 'AthDictLoaderSvc/AthDictLoaderSvc',\ - 'AthenaSealSvc/AthenaSealSvc',\ - 'CoreDumpSvc/CoreDumpSvc',\ - 'JobOptionsSvc/JobOptionsSvc']" - - for seqName, algoList in flatSequencers( self._sequence ).iteritems(): - self._jocat[seqName] = {} - self._jocat[seqName]["Members"] = "[]" - for alg in algoList: - self._jocat[alg.name()] = {} + from AthenaConfiguration.MainServicesConfig import MainServicesThreadedCfg, MainServicesSerialCfg + if threaded: + from AthenaConfiguration.AllConfigFlags import ConfigFlags + flags = ConfigFlags.clone() + flags.Concurrency.NumThreads = 1 + flags.Concurrency.NumConcurrentEvents = 1 + basecfg = MainServicesThreadedCfg(flags) + basecfg.printConfig() + basecfg.merge(self) + self = basecfg + self.printConfig() + else: #Serial + basecfg = MainServicesSerialCfg() + basecfg.merge(self) + self = basecfg + self._jocat={} + self._jocfg={} + self._pycomps={} + self._jocfg["ApplicationMgr"]={} + self._jocfg["ApplicationMgr"]["ExtSvc"] = "['ToolSvc/ToolSvc', \ + 'AuditorSvc/AuditorSvc', \ + 'MessageSvc/MessageSvc', \ + 'IncidentSvc/IncidentSvc',\ + 'EvtPersistencySvc/EventPersistencySvc',\ + 'HistogramSvc/HistogramDataSvc',\ + 'NTupleSvc/NTupleSvc',\ + 'RndmGenSvc/RndmGenSvc',\ + 'ChronoStatSvc/ChronoStatSvc',\ + 'StatusCodeSvc/StatusCodeSvc',\ + 'StoreGateSvc/StoreGateSvc',\ + 'StoreGateSvc/DetectorStore',\ + 'StoreGateSvc/HistoryStore',\ + 'ClassIDSvc/ClassIDSvc',\ + 'AthDictLoaderSvc/AthDictLoaderSvc',\ + 'AthenaSealSvc/AthenaSealSvc',\ + 'CoreDumpSvc/CoreDumpSvc',\ + 'JobOptionsSvc/JobOptionsSvc']" + + #Code seems to be wrong here + for seqName, algoList in flatSequencers( self._sequence ).iteritems(): + self._jocat[seqName] = {} + for alg in algoList: + self._jocat[alg.name()] = {} + for k, v in self._sequence.getValuedProperties().items(): + self._jocat[self._sequence.getName()][k]=str(v) #EventAlgorithms for seqName, algoList in flatSequencers( self._sequence ).iteritems(): @@ -661,10 +663,13 @@ class ComponentAccumulator(object): evtalgseq.append( alg.getFullName() ) + print self._sequence for seqName, algoList in flatSequencers( self._sequence ).iteritems(): # part of the sequence may come from the bootstrap, we need to retain the content, that is done here - mergedSequence = ast.literal_eval(self._jocat[seqName]["Members"]) + [alg.getFullName() for alg in algoList] - self._jocat[seqName]["Members"] = str( mergedSequence ) + for prop in self._jocat[seqName]: + if prop == "Members": + mergedSequence = ast.literal_eval(self._jocat[seqName]["Members"]) + [alg.getFullName() for alg in algoList] + self._jocat[seqName]["Members"] = str( mergedSequence ) #Conditions Algorithms: diff --git a/Control/AthenaConfiguration/python/MainServicesConfig.py b/Control/AthenaConfiguration/python/MainServicesConfig.py index 0fa5ebe164962ab5d29c20b365b36b2bcefe1e27..e230efaf380c9bc0372131d7797a80100e89d1d5 100644 --- a/Control/AthenaConfiguration/python/MainServicesConfig.py +++ b/Control/AthenaConfiguration/python/MainServicesConfig.py @@ -23,25 +23,24 @@ def MainServicesSerialCfg(LoopMgr='AthenaEventLoopMgr'): #Build standard sequences: - #cfg.addSequence(AthSequencer("AthMasterSeq")) - cfg.addSequence(AthSequencer('AthAlgEvtSeq'),parentName="AthMasterSeq") - cfg.addSequence(AthSequencer('AthOutSeq'),parentName="AthMasterSeq") + cfg.addSequence(AthSequencer('AthAlgEvtSeq',Sequential=True, StopOverride=True),parentName="AthMasterSeq") + cfg.addSequence(AthSequencer('AthOutSeq',StopOverride=True),parentName="AthMasterSeq") cfg.addSequence(AthSequencer('AthRegSeq'),parentName="AthMasterSeq") - cfg.addSequence(AthSequencer('AthBeginSeq'),parentName='AthAlgEvtSeq') + cfg.addSequence(AthSequencer('AthBeginSeq',Sequential=True),parentName='AthAlgEvtSeq') cfg.addSequence(AthSequencer('AthAllAlgSeq'),parentName='AthAlgEvtSeq') - cfg.addSequence(AthSequencer('AthEndSeq'),parentName='AthAlgEvtSeq') + cfg.addSequence(AthSequencer('AthAlgSeq',IgnoreFilterPassed=True,StopOverride=True),parentName='AthAllAlgSeq') + cfg.addSequence(AthSequencer('AthEndSeq',Sequential=True),parentName='AthAlgEvtSeq') cfg.addSequence(AthSequencer('AthCondSeq'),parentName='AthAllAlgSeq') - cfg.addSequence(AthSequencer('AthAlgSeq'),parentName='AthAllAlgSeq') #Set up incident firing: from AthenaServices.AthenaServicesConf import AthIncFirerAlg from GaudiCoreSvc.GaudiCoreSvcConf import IncidentProcAlg - cfg.addEventAlgo(AthIncFirerAlg("BeginIncFiringAlg",Incidents=['BeginEvent']),sequenceName='AthBeginSeq') + cfg.addEventAlgo(AthIncFirerAlg("BeginIncFiringAlg",FireSerial=False,Incidents=['BeginEvent']),sequenceName='AthBeginSeq') cfg.addEventAlgo(IncidentProcAlg('IncidentProcAlg1'),sequenceName='AthBeginSeq') - cfg.addEventAlgo(AthIncFirerAlg('EndIncFiringAlg',Incidents=['EndEvent']), sequenceName="AthEndSeq") + cfg.addEventAlgo(AthIncFirerAlg('EndIncFiringAlg',FireSerial=False,Incidents=['EndEvent']), sequenceName="AthEndSeq") cfg.addEventAlgo(IncidentProcAlg('IncidentProcAlg2'),sequenceName="AthEndSeq") #Basic services: @@ -52,7 +51,7 @@ def MainServicesSerialCfg(LoopMgr='AthenaEventLoopMgr'): from StoreGate.StoreGateConf import StoreGateSvc cfg.addService(StoreGateSvc()) cfg.addService(StoreGateSvc("DetectorStore")) - cfg.addService(StoreGateSvc("ConditionStore")) + cfg.addService(StoreGateSvc("HistoryStore")) cfg.setAppProperty('InitializationLoopCheck',False) return cfg @@ -78,7 +77,8 @@ def MainServicesThreadedCfg(cfgFlags): msgsvc = MessageSvc() msgsvc.defaultLimit = 0 - msgFmt = "% F%40W%S%4W%e%s%7W%R%T %0W%M" + #msgFmt = "% F%40W%S%4W%e%s%7W%R%T %0W%M" + msgFmt = "% F%18W%S%7W%R%T %0W%M" msgsvc.Format = msgFmt cfg.addService(msgsvc) @@ -92,8 +92,8 @@ def MainServicesThreadedCfg(cfgFlags): hivesvc.NSlots = cfgFlags.Concurrency.NumConcurrentEvents cfg.addService( hivesvc ) - import StoreGate.StoreGateConf as StoreGateConf - cfg.addService( StoreGateConf.StoreGateSvc("ConditionStore") ) + from StoreGate.StoreGateConf import StoreGateSvc + cfg.addService( StoreGateSvc("ConditionStore") ) from GaudiHive.GaudiHiveConf import AlgResourcePool from AthenaCommon.Constants import INFO @@ -115,7 +115,7 @@ def MainServicesThreadedCfg(cfgFlags): # dependencies are not found in the store. It should probably be changed # to True eventually. inputloader = SGInputLoader (FailIfNoProxy = False) - cfg.addEventAlgo( inputloader ) + cfg.addEventAlgo( inputloader, "AthAlgSeq" ) scheduler.DataLoaderAlg = inputloader.getName() from AthenaServices.AthenaServicesConf import AthenaHiveEventLoopMgr diff --git a/Control/AthenaConfiguration/python/testEmpty.py b/Control/AthenaConfiguration/python/testEmpty.py new file mode 100644 index 0000000000000000000000000000000000000000..e3a40667340f4a08d0f9edfe4c59137fce521a5e --- /dev/null +++ b/Control/AthenaConfiguration/python/testEmpty.py @@ -0,0 +1,14 @@ +#Generate CA pickle files from athena and CA +from AthenaCommon.Configurable import Configurable +Configurable.configurableRun3Behavior=1 +from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator +acc = ComponentAccumulator() +print "bootstrap_test.pkl" +with file("bootstrap_test.pkl", "w") as p: + acc.store( p, nEvents=10, useBootStrapFile=True, threaded=False ) + p.close() + +print "bootstrap_CA_test.pkl" +with file("bootstrap_CA_test.pkl", "w") as p: + acc.store( p, nEvents=10, useBootStrapFile=False, threaded=False ) + p.close() diff --git a/Control/AthenaExamples/AthExHelloWorld/CMakeLists.txt b/Control/AthenaExamples/AthExHelloWorld/CMakeLists.txt index 552f735fab9aad73278af27e670052ee0b111581..3cbee671209ff1f1d6ae569c9f07c973d00eb002 100644 --- a/Control/AthenaExamples/AthExHelloWorld/CMakeLists.txt +++ b/Control/AthenaExamples/AthExHelloWorld/CMakeLists.txt @@ -37,7 +37,7 @@ atlas_add_test( AthExHelloWorldMT_1 atlas_add_test( AthExHelloWorldMT_2 ENVIRONMENT THREADS=2 SCRIPT test/test_AthExHelloWorld.sh - EXTRA_PATTERNS "AthenaHiveEventLoopMgr.* processing event|^HelloWorld .*(INFO|WARNING A WARNING|ERROR An ERROR|FATAL A FATAL" #processing order can change + EXTRA_PATTERNS "AthenaHiveEventLoopMgr.* processing event|^HelloWorld .*(INFO|WARNING A WARNING|ERROR An ERROR|FATAL A FATAL)" #processing order can change ) atlas_add_test( AthExHelloWorld_CfgTest SCRIPT python -m AthExHelloWorld.HelloWorldConfig POST_EXEC_SCRIPT nopost.sh ) diff --git a/Control/AthenaExamples/AthExHelloWorld/share/AthExHelloWorldMT_2.ref b/Control/AthenaExamples/AthExHelloWorld/share/AthExHelloWorldMT_2.ref index 9daa60400639e3937ba402d0287469cbf9132810..f949b94b920af2db2c44a004ba43413e277e2495 100644 --- a/Control/AthenaExamples/AthExHelloWorld/share/AthExHelloWorldMT_2.ref +++ b/Control/AthenaExamples/AthExHelloWorld/share/AthExHelloWorldMT_2.ref @@ -1,7 +1,7 @@ -Sun Jan 20 03:15:09 CET 2019 +Wed Feb 27 04:49:09 CET 2019 Preloading tcmalloc_minimal.so Py:Athena INFO including file "AthenaCommon/Preparation.py" -Py:Athena INFO using release [WorkDir-22.0.1] [x86_64-slc6-gcc8-opt] [atlas-work3/7fb5304f19] -- built on [2019-01-19T2316] +Py:Athena INFO using release [WorkDir-22.0.1] [x86_64-centos7-gcc8-opt] [atlas-work3/aba582d739d] -- built on [2019-02-27T0219] Py:Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" Py:Athena INFO executing ROOT6Setup Py:Athena INFO configuring AthenaHive with [2] concurrent threads and [2] concurrent events @@ -9,25 +9,32 @@ Py:AlgScheduler INFO setting up AvalancheSchedulerSvc/AvalancheSchedulerSvc Py:Athena INFO including file "AthenaCommon/Execution.py" Py:Athena INFO including file "AthExHelloWorld/HelloWorldOptions.py" Py:Athena INFO including file "AthenaCommon/runbatch.py" -Py:ConfigurableDb INFO Read module info for 5455 configurables from 55 genConfDb files +Py:ConfigurableDb INFO Read module info for 5463 configurables from 45 genConfDb files Py:ConfigurableDb INFO No duplicates have been found: that's good ! -[?1034hApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 +ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 MessageSvc INFO Activating in a separate thread ApplicationMgr SUCCESS ==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v30r5) - running on lxplus076.cern.ch on Sun Jan 20 03:15:30 2019 + Welcome to ApplicationMgr (GaudiCoreSvc v31r0) + running on lxplus057.cern.ch on Wed Feb 27 04:49:23 2019 ==================================================================================================================================== -ApplicationMgr INFO Successfully loaded modules : AthenaServices ApplicationMgr INFO Application Manager Configured successfully ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 AthDictLoaderSvc INFO in initialize... AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO getRegistryEntries: read 3685 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 3750 CLIDRegistry entries for module ALL CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) CoreDumpSvc INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) AthenaHiveEventLoopMgr INFO Initializing AthenaHiveEventLoopMgr - package version AthenaServices-00-00-00 +ClassIDSvc 0 INFO getRegistryEntries: read 1193 CLIDRegistry entries for module ALL +xAODMaker::EventInfoCnvAlg 0 INFO Initializing - Package version: xAODEventInfoCnv-00-00-00 +xAODMaker::EventInfoCnvAlg.EventInfoC... 0 INFO Initializing - Package version: xAODEventInfoCnv-00-00-00 +xAODMaker::EventInfoCnvAlg.EventInfoC... 0 WARNING Beam conditions service not available +xAODMaker::EventInfoCnvAlg.EventInfoC... 0 WARNING Will not fill beam spot information into xAOD::EventInfo +xAODMaker::EventInfoCnvAlg.EventInfoC... 0 INFO Luminosity information not available +xAODMaker::EventInfoCnvAlg.EventInfoC... 0 INFO Will take information from the EventInfo object +ClassIDSvc 0 INFO getRegistryEntries: read 159 CLIDRegistry entries for module ALL HelloWorld 0 INFO initialize() HelloWorld 0 INFO MyInt = 42 HelloWorld 0 INFO MyBool = 1 @@ -57,8 +64,10 @@ HelloWorld 0 INFO MyPrivateHelloTool: Retr HelloWorld 0 INFO MyPublicHelloTool: Retrieved tool HelloTool ThreadPoolSvc 0 INFO no thread init tools attached AvalancheSchedulerSvc 0 INFO Activating scheduler in a separate thread -AvalancheSchedulerSvc 0 INFO Found 6 algorithms -AvalancheSchedulerSvc 0 INFO No unmet INPUT data dependencies were found +AvalancheSchedulerSvc 0 INFO Found 7 algorithms +AvalancheSchedulerSvc 0 INFO Will attribute the following unmet INPUT dependencies to "SGInputLoader/SGInputLoader" Algorithm + o ( 'EventInfo' , 'StoreGateSvc+McEventInfo' ) required by Algorithm: + * xAODMaker::EventInfoCnvAlg PrecedenceSvc 0 INFO Assembling CF and DF task precedence rules PrecedenceSvc 0 INFO PrecedenceSvc initialized successfully AvalancheSchedulerSvc 0 INFO Concurrency level information: @@ -84,6 +93,7 @@ HelloWorld 0 0 INFO Let the tool MyPublicHel ToolSvc.PublicHello 0 0 INFO my message to the world: A Public Message! HelloWorld 0 0 INFO Let the tool MyPrivateHelloTool say something: HelloWorld.HelloTool 0 0 INFO my message to the world: A Private Message! +ClassIDSvc 0 0 INFO getRegistryEntries: read 108 CLIDRegistry entries for module ALL HelloWorld 1 1 INFO execute() HelloWorld 1 1 INFO An INFO message HelloWorld 1 1 WARNING A WARNING message @@ -183,8 +193,8 @@ ToolSvc.PublicHello 9 1 INFO my message to the world: HelloWorld 9 1 INFO Let the tool MyPrivateHelloTool say something: HelloWorld.HelloTool 9 1 INFO my message to the world: A Private Message! AthenaHiveEventLoopMgr INFO ===>>> done processing event #9, run #0 on slot 1, 10 events processed so far <<<=== -AthenaHiveEventLoopMgr INFO ---> Loop Finished (seconds): 0.145294 -HelloWorld INFO stop() +AthenaHiveEventLoopMgr INFO ---> Loop Finished (seconds): 0.0229208 +HelloWorld 9 1 INFO stop() ApplicationMgr INFO Application Manager Stopped successfully IncidentProcAlg1 INFO Finalize SGInputLoader INFO Finalizing SGInputLoader... @@ -196,9 +206,10 @@ EventDataSvc INFO Finalizing EventDataSvc AthDictLoaderSvc INFO in finalize... ToolSvc INFO Removing all tools created by ToolSvc *****Chrono***** INFO **************************************************************************************************** +*****Chrono***** INFO WARNING: MT job; statistics are unreliable *****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) *****Chrono***** INFO **************************************************************************************************** -ChronoStatSvc INFO Time User : Tot= 130 [ms] #= 1 +ChronoStatSvc INFO Time User : Tot= 120 [ms] #= 1 *****Chrono***** INFO **************************************************************************************************** ChronoStatSvc.finalize() INFO Service finalized successfully ApplicationMgr INFO Application Manager Finalized successfully diff --git a/Control/AthenaKernel/AthenaKernel/GenericMetadataTool.h b/Control/AthenaKernel/AthenaKernel/GenericMetadataTool.h new file mode 100644 index 0000000000000000000000000000000000000000..f2ce54871dd79ca9873db3487a911ae10a04abe5 --- /dev/null +++ b/Control/AthenaKernel/AthenaKernel/GenericMetadataTool.h @@ -0,0 +1,118 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef GENERICMETADATATOOL_H +#define GENERICMETADATATOOL_H + +/** @file GenericMetadataTool.h + * @brief This file contains the class definition for the GenericMetadataTool class. + * @author Jack Cranshaw <cranshaw@anl.gov> + * $Id: $ + **/ + +#include "AthenaBaseComps/AthAlgTool.h" +#include "AthenaKernel/IMetaDataTool.h" +#include "GaudiKernel/IIncidentListener.h" +#include "GaudiKernel/ServiceHandle.h" + +#include <string> + +/** @class GenericMetadataTool + * @brief This class provides the basic functionality for processing metadata in the athena framework. The derived class must simply implement merge functionality in the updateContainer method. + **/ + +template <typename T, typename U> +class GenericMetadataTool : public AthAlgTool, public virtual ::IMetaDataTool +{ +public: // Constructor and Destructor + /// Standard Service Constructor + GenericMetadataTool(const std::string& type, + const std::string& name, + const IInterface* parent); + /// Destructor + virtual ~GenericMetadataTool(); + +public: + /// IMetaDataTool interface method + virtual StatusCode metaDataStop() override; + /// IMetaDataTool interface method + virtual StatusCode beginInputFile(const SG::SourceID& sid = "Serial") override; + /// IMetaDataTool interface method + virtual StatusCode endInputFile(const SG::SourceID& sid = "Serial") override; + + /// AthAlgTool methods + virtual StatusCode initialize() override; + virtual StatusCode finalize() override; + +protected: + /// Method to retrieve handle to input metadata store + // Note that these tools operate outside an event context + ServiceHandle<StoreGateSvc> inputMetaStore() const; + /// Method to retrieve handle to output metadata store + ServiceHandle<StoreGateSvc> outputMetaStore() const; + + // Utility methods to implement the general logic of a metadata tool + /// Helper class to update a container with information from another one + // i.e. this is the 'merge' method + virtual StatusCode updateContainer( T* contToUpdate, + const T* otherCont ) = 0; + + // Utility methods to implement the general logic of a metadata tool + // + // Initialize container in output store, link aux to interface + StatusCode initOutputContainer(const std::string& sgkey); + /// Put input metadata in a MetaCont[sid] + // so that it can be accessed by event context aware handles + StatusCode buildAthenaInterface(const std::string& inputName, + const std::string& outputName, + const SG::SourceID& sid); + + /// Add any information which has been collected during processing + // Metadata to be added must be placed in the output metadata store + // and the appropriate key declared to the tool. Otherwise the + // additional metadata can be created however needed. + StatusCode addProcessMetadata(); + + /// Cached handles to the metadata stores + ServiceHandle<StoreGateSvc> m_inputMetaStore; + ServiceHandle<StoreGateSvc> m_outputMetaStore; + + /// The name of the output Container + std::string m_outputCollName; + /// The name of the input Container + std::string m_inputCollName; + /// The name of the process Container + std::string m_procMetaName; + + /// Flag for internal use to avoid writing process metadata twice + bool m_processMetadataTaken; + /// Flag settable by property on whether to do Filekeeping + bool m_markIncomplete; + + // List of source ids for doing garbage collection + // + /// List of source ids which have reached end file + std::set<SG::SourceID> m_fullreads; + /// List of source ids which have been opened + std::set<SG::SourceID> m_read; + /// List of source ids which have been written + std::set<SG::SourceID> m_written; + +}; + +template <typename T, typename U> +inline ServiceHandle<StoreGateSvc> GenericMetadataTool<T,U>::inputMetaStore() const +{ + return m_inputMetaStore; +} + +template <typename T, typename U> +inline ServiceHandle<StoreGateSvc> GenericMetadataTool<T,U>::outputMetaStore() const +{ + return m_outputMetaStore; +} + +#include "GenericMetadataTool.icc" +#endif + diff --git a/Control/AthenaKernel/AthenaKernel/GenericMetadataTool.icc b/Control/AthenaKernel/AthenaKernel/GenericMetadataTool.icc new file mode 100644 index 0000000000000000000000000000000000000000..7faa6a77381c9047b944ee755b38e623b426d68f --- /dev/null +++ b/Control/AthenaKernel/AthenaKernel/GenericMetadataTool.icc @@ -0,0 +1,384 @@ +///////////////////////// -*- C++ -*- ///////////////////////////// + +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +// Implementation file for class GenericMetadataTool +// Authors: Jack Cranshaw <Jack.Cranshaw@cern.ch> +/////////////////////////////////////////////////////////////////// + +// STL include +#include <algorithm> + +#include "GaudiKernel/Incident.h" +#include "GaudiKernel/FileIncident.h" +#include "GaudiKernel/IIncidentSvc.h" +#include "AthenaKernel/MetaCont.h" +#include "AthenaKernel/ClassID_traits.h" +#include "AthenaKernel/errorcheck.h" +#include "StoreGate/WriteMetaHandle.h" +#include "AthenaBaseComps/AthCheckMacros.h" +#include "AthContainersInterfaces/IConstAuxStoreMeta.h" + +template <typename T, typename U> +GenericMetadataTool<T,U>::GenericMetadataTool(const std::string& type, + const std::string& name, + const IInterface* parent) + : AthAlgTool(type,name,parent), + m_inputMetaStore( "StoreGateSvc/InputMetaDataStore", name ), + m_outputMetaStore( "StoreGateSvc/MetaDataStore", name ), + m_processMetadataTaken(false), + m_markIncomplete(true) +{ + declareProperty("OutputCollName", m_outputCollName="GenericMetadataOutput", + "The default name of the container for output files"); + declareProperty("InputCollName", m_inputCollName = "GenericMetadataInput", + "The default name of the container for input files"); + declareProperty("ProcessMetadataCollName", m_procMetaName = "ProcessMetadata", + "The default name of the container for process meta"); + declareProperty("MarkIncomplete", m_markIncomplete = true, + "Defaults to filling both complete and incomplete bookkeepers"); + declareInterface< ::IMetaDataTool >( this ); +} + + + +template <typename T, typename U> +GenericMetadataTool<T,U>::~GenericMetadataTool() +{ +} + + + +template <typename T, typename U> +StatusCode +GenericMetadataTool<T,U>::initialize() +{ + ATH_MSG_DEBUG( "Initializing " << name() << " - package version " << PACKAGE_VERSION ); + + ATH_MSG_DEBUG("InputCollName = " << m_inputCollName); + ATH_MSG_DEBUG("OutputCollName = " << m_outputCollName); + ATH_MSG_DEBUG("ProcessMetadataCollName = " << m_procMetaName); + + return StatusCode::SUCCESS; +} + + + +template <typename T, typename U> +StatusCode GenericMetadataTool<T,U>::beginInputFile(const SG::SourceID& sid) +{ + ATH_MSG_DEBUG("beginInputFile " << this->name() << "\n" << outputMetaStore()->dump()); + //OPENING NEW INPUT FILE + //Things to do: + // 1) note that a file is currently opened + // 2) Load metadata T from input file + // 2a) if incomplete from input, directly propagate to output + // 2b) if complete from input, wait for EndInputFile to decide what to do in output + + const std::string storename("MetaDataStore+"); + if (m_inputCollName != "") { // are there inputs + // IF NO METACONT IN OUTPUT STORE YET + // Initialize MetaCont for incomplete and tmp containers in output store + // + std::string tmp_name = storename+m_outputCollName+"tmp"; + ATH_CHECK(buildAthenaInterface(m_inputCollName,tmp_name,sid)); + + // Do the following if we want incomplete processings marked + if (m_markIncomplete) { + std::string inc_name = storename+"Incomplete"+m_outputCollName; + std::string input_inc_name = "Incomplete"+m_inputCollName; + ATH_CHECK(buildAthenaInterface(input_inc_name,inc_name,sid)); + } + } // inputCollName if + else { + ATH_MSG_INFO("No input name"); + } + + // reset process metadata taken marker for new input + m_processMetadataTaken = false; + + // mark that a new source id has been opened + m_read.insert(sid); + + return StatusCode::SUCCESS; +} + + +template <typename T, typename U> +StatusCode GenericMetadataTool<T,U>::endInputFile(const SG::SourceID& sid) +{ + // Add the sid to the list of complete sids + if (m_inputCollName != "") { // are there inputs + m_fullreads.insert(sid); + } + + return StatusCode::SUCCESS; +} + +template <typename T, typename U> +StatusCode GenericMetadataTool<T,U>::metaDataStop() +{ + const std::string storename("MetaDataStore+"); + if (m_inputCollName != "") { // are there inputs + //TERMINATING THE JOB (EndRun) + //Things to do: + // 1) Create new incomplete metadata T if relevant + // 2) Print cut flow summary + // 3) Write root file if requested + // Now retrieve pointers for the MetaConts + std::string tmp_name = storename+m_outputCollName+"tmpCont"; + const MetaCont<T>* tmp; + ATH_CHECK(outputMetaStore()->retrieve(tmp,tmp_name)); + T* outcom = new T(); + U* outcom_aux = new U(); // AUX PART + outcom->setStore(outcom_aux); // AUX PART + + if (m_markIncomplete) { + std::string inc_name = storename+"Incomplete"+m_outputCollName+"Cont"; + // Build incomplete container to fill + T* outinc = new T(); + U* outinc_aux = new U(); // AUX PART + outinc->setStore(outinc_aux); // AUX PART + // Check if there were any incomplete inputs + const MetaCont<T>* inc; + if(outputMetaStore()->retrieve(inc,inc_name).isSuccess()) { + + // Incomplete inputs can just be merged + auto sids_inc = inc->sources(); + T* contptr(nullptr); + for (auto it = sids_inc.begin(); it != sids_inc.end(); ++it) { + if (!inc->find(*it,contptr)) { + ATH_MSG_ERROR("Container sid list did not match contents"); + } else { + ATH_CHECK(updateContainer(outinc,contptr)); + } + contptr = nullptr; + } + } else { + ATH_MSG_INFO("Did not find MetaCont for " << inc_name << ", assuming input had no incomplete bookkeepers"); + } + + // Loop over containers and mark based on end files seen + auto sids_tmp = tmp->sources(); + T* contptr(nullptr); + for (auto it = sids_tmp.begin(); it != sids_tmp.end(); ++it) { + if (!tmp->find(*it,contptr)) { + ATH_MSG_ERROR("Container sid list did not match contents"); + } else { + bool complete = std::find(m_fullreads.begin(), + m_fullreads.end(), + *it) != m_fullreads.end(); + bool not_written = std::find(m_written.begin(), + m_written.end(), + *it) == m_written.end(); + if (complete && not_written) { + ATH_CHECK(updateContainer(outcom,contptr)); + } else { + ATH_CHECK(updateContainer(outinc,contptr)); + } + } + } + + std::string incout_name = "Incomplete"+m_outputCollName; + // Do any cleanup + if (outputMetaStore()->contains(ClassID_traits<T>::ID(),incout_name) ) { + ATH_MSG_INFO("Cleaning up class for " << incout_name); + const T* tmpBook(nullptr); + if ( outputMetaStore()->retrieve(tmpBook,incout_name).isSuccess() ) { + const SG::IConstAuxStore* tmpBookAux = tmpBook->getConstStore(); // AUX PART + ATH_CHECK(outputMetaStore()->removeDataAndProxy(tmpBook)); + ATH_CHECK(outputMetaStore()->removeDataAndProxy(tmpBookAux)); // AUX PART + } + else ATH_MSG_INFO("StoreGate failed retrieve"); + } + ATH_CHECK(outputMetaStore()->record(outinc,incout_name)); + ATH_CHECK(outputMetaStore()->record(outinc_aux,incout_name+"Aux.")); // AUX PART + } // markIncomplete + else { + auto sids_tmp = tmp->sources(); + T* contptr(nullptr); + // just merge complete inputs into complete/output container + for (auto it = sids_tmp.begin(); it != sids_tmp.end(); ++it) { + if (!tmp->find(*it,contptr)) { + ATH_MSG_ERROR("Container sid list did not match contents"); + } else { + // default to not worrying about marking + ATH_CHECK(updateContainer(outcom,contptr)); + } + } + } + + // Record container objects directly in store for output + if (outputMetaStore()->contains(ClassID_traits<T>::ID(),m_outputCollName)) { + ATH_MSG_INFO("Cleaning up class for " << m_outputCollName); + const T* tmpBook(nullptr); + if ( outputMetaStore()->retrieve(tmpBook,m_outputCollName).isSuccess() ) { + const SG::IConstAuxStore* tmpBookAux = tmpBook->getConstStore(); // AUX PART + ATH_CHECK(outputMetaStore()->removeDataAndProxy(tmpBook)); + ATH_CHECK(outputMetaStore()->removeDataAndProxy(tmpBookAux)); // AUX PART + } + else ATH_MSG_ERROR("StoreGate failed retrieve"); + } + ATH_CHECK(outputMetaStore()->record(outcom,m_outputCollName)); + ATH_CHECK(outputMetaStore()->record(outcom_aux,m_outputCollName+"Aux.")); // AUX PART + } // inputCollName if + + if (!m_processMetadataTaken) { + if (addProcessMetadata().isFailure()) { + ATH_MSG_ERROR("Could not add process metadata"); + } + } + else { + ATH_MSG_DEBUG("Process metadata written into container before metaDataStop"); + } + + // Reset after metadata stop + m_processMetadataTaken = false; + + if (m_inputCollName != "") { // are there inputs + // Copy read files into written files + for (auto it = m_read.begin(); it != m_read.end(); ++it) { + m_written.insert(*it); + } + // Remove completes from read + for (auto it = m_fullreads.begin(); it != m_fullreads.end(); ++it) { + m_read.erase(*it); + } + m_fullreads.clear(); + } // inputCollName if + + return StatusCode::SUCCESS; +} + + +template <typename T, typename U> +StatusCode +GenericMetadataTool<T,U>::finalize() +{ + ATH_MSG_DEBUG( "Finalizing " << name() << " - package version " << PACKAGE_VERSION ); + return StatusCode::SUCCESS; +} + + +template <typename T, typename U> +StatusCode GenericMetadataTool<T,U>::initOutputContainer( const std::string& sgkey) +{ + std::string key = sgkey; + // Create the primary container + // Put it in a MetaCont + MetaCont<T>* mcont = new MetaCont<T>(DataObjID(ClassID_traits<T>::ID(),key)); + // Do the same for the auxiliary container + std::string auxkey(key+"Aux."); // AUX PART + DataObjID obj(ClassID_traits<SG::IConstAuxStore>::ID(),auxkey); // AUX PART + MetaCont<SG::IConstAuxStore>* acont = new MetaCont<SG::IConstAuxStore>(obj); // AUX PART + ATH_CHECK(outputMetaStore()->record(std::move(mcont),key)); + ATH_CHECK(outputMetaStore()->record(std::move(acont),auxkey)); // AUX PART + // Create a symlink + // so that proxy references to <Aux>#auxkey find it in MetaCont<Aux>#auxkey + try { + StatusCode sc = outputMetaStore()->symLink + ( + ClassID_traits<MetaCont<SG::IConstAuxStore> >::ID(), + auxkey, + ClassID_traits<SG::IConstAuxStore>::ID() + ); + if (sc.isFailure()) { + ATH_MSG_ERROR("Unable to symlink " << auxkey); + } + } + catch (std::exception& e) { + ATH_MSG_INFO("SYMLINK EXCEPTION " << e.what()); + } + + return StatusCode::SUCCESS; +} + +//--------------------------------------------------------// +// MetaConts are only needed when reading in Athena +// This builds them and populates them with bookeepers from the input store +//--------------------------------------------------------// +template <typename T, typename U> +StatusCode GenericMetadataTool<T,U>::buildAthenaInterface(const std::string& inputName, + const std::string& outputName, + const SG::SourceID& sid) +{ + ATH_MSG_DEBUG("buildAthenaInterface " << inputName << " " << outputName); + // Make sure the MetaCont is ready in the output store for outputName + // If not, then create it + std::string name = outputName+"Cont"; + if( !(outputMetaStore()->contains(ClassID_traits<MetaCont<T> >::ID(),name)) ) { + ATH_CHECK(this->initOutputContainer(name)); + } + else { + ATH_MSG_WARNING("incomplete collection already exists"); + } + + // Retrieve pointer for the MetaCont + MetaCont<T>* mc; + ATH_CHECK(outputMetaStore()->retrieve(mc,name)); + + // Make sure sid does not already exist in the MetaCont + for (auto it = mc->sources().begin(); it != mc->sources().end(); ++it) { + if (*it==sid) { + ATH_MSG_ERROR("Metadata already exists for sid " << sid); + return StatusCode::FAILURE; // Fail if sid already exists + } + } + + // Get the input bookkeeper of the input metadata store + const T* cbc; + if (inputMetaStore()->contains(ClassID_traits<T>::ID(),inputName) ) { + StatusCode ssc = inputMetaStore()->retrieve( cbc, inputName ); + if (ssc.isSuccess()) { + // Insert input bookkeeper into MetaCont for this sid + T* tostore = new T(*cbc); + if ( !mc->insert(sid,tostore) ) { + ATH_MSG_ERROR("Unable to insert " << inputName << " for " << sid << " with key " << name); + return StatusCode::FAILURE; // Fail if insert to mc fails + } + } + else { + ATH_MSG_ERROR("Could not retrieve class with name " << inputName << " in input store"); + return StatusCode::FAILURE; // Fail if store contains, but not retrieves + } + } + else { + ATH_MSG_WARNING("No " << inputName << " data in this file "); + } + + return StatusCode::SUCCESS; +} + +template <typename T, typename U> +StatusCode GenericMetadataTool<T,U>::addProcessMetadata() +{ + // Add the information from the current processing to the complete output + // --> same paradigm as original CutFlowSvc + // Get the complete bookkeeper collection of the output meta-data store + T* completeBook(nullptr); + if( !(outputMetaStore()->retrieve( completeBook, m_outputCollName) ).isSuccess() ) { + ATH_MSG_ERROR( "Could not get output container from output MetaDataStore" ); + return StatusCode::FAILURE; + } + + // Get the bookkeeper from the current processing + T* fileCompleteBook(nullptr); + if( outputMetaStore()->contains(ClassID_traits<T>::ID(),m_procMetaName) ) { + if( !(outputMetaStore()->retrieve( fileCompleteBook, m_procMetaName) ).isSuccess() ) { + ATH_MSG_WARNING( "Could not get process metadata from output MetaDataStore" ); + } + else { + // update the complete output with the complete input + ATH_CHECK(this->updateContainer(completeBook,fileCompleteBook)); + } + } + else { + ATH_MSG_INFO("No process container " << m_procMetaName); + } + + return StatusCode::SUCCESS; +} + + diff --git a/Control/AthenaKernel/AthenaKernel/GenericMetadataToolNoAux.h b/Control/AthenaKernel/AthenaKernel/GenericMetadataToolNoAux.h new file mode 100644 index 0000000000000000000000000000000000000000..afbceff94469f61a8eb86a6aeef4036cfe358161 --- /dev/null +++ b/Control/AthenaKernel/AthenaKernel/GenericMetadataToolNoAux.h @@ -0,0 +1,118 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef GENERICMETADATATOOLNOAUX_H +#define GENERICMETADATATOOLNOAUX_H + +/** @file GenericMetadataToolNoAux.h + * @brief This file contains the class definition for the GenericMetadataToolNoAux class. + * @author Jack Cranshaw <cranshaw@anl.gov> + * $Id: $ + **/ + +#include "AthenaBaseComps/AthAlgTool.h" +#include "AthenaKernel/IMetaDataTool.h" +#include "GaudiKernel/IIncidentListener.h" +#include "GaudiKernel/ServiceHandle.h" + +#include <string> + +/** @class GenericMetadataToolNoAux + * @brief This class provides the basic functionality for processing metadata in the athena framework. The derived class must simply implement merge functionality in the updateContainer method. + **/ + +template <typename T> +class GenericMetadataToolNoAux : public AthAlgTool, public virtual ::IMetaDataTool +{ +public: // Constructor and Destructor + /// Standard Service Constructor + GenericMetadataToolNoAux(const std::string& type, + const std::string& name, + const IInterface* parent); + /// Destructor + virtual ~GenericMetadataToolNoAux(); + +public: + /// IMetaDataTool interface method + virtual StatusCode metaDataStop() override; + /// IMetaDataTool interface method + virtual StatusCode beginInputFile(const SG::SourceID& sid = "Serial") override; + /// IMetaDataTool interface method + virtual StatusCode endInputFile(const SG::SourceID& sid = "Serial") override; + + /// AthAlgTool methods + virtual StatusCode initialize() override; + virtual StatusCode finalize() override; + +protected: + /// Method to retrieve handle to input metadata store + // Note that these tools operate outside an event context + ServiceHandle<StoreGateSvc> inputMetaStore() const; + /// Method to retrieve handle to output metadata store + ServiceHandle<StoreGateSvc> outputMetaStore() const; + + // Utility methods to implement the general logic of a metadata tool + /// Helper class to update a container with information from another one + // i.e. this is the 'merge' method + virtual StatusCode updateContainer( T* contToUpdate, + const T* otherCont ) = 0; + + // Utility methods to implement the general logic of a metadata tool + // + // Initialize container in output store + StatusCode initOutputContainer(const std::string& sgkey); + /// Put input metadata in a MetaCont[sid] + // so that it can be accessed by event context aware handles + StatusCode buildAthenaInterface(const std::string& inputName, + const std::string& outputName, + const SG::SourceID& sid); + + /// Add any information which has been collected during processing + // Metadata to be added must be placed in the output metadata store + // and the appropriate key declared to the tool. Otherwise the + // additional metadata can be created however needed. + StatusCode addProcessMetadata(); + + /// Cached handles to the metadata stores + ServiceHandle<StoreGateSvc> m_inputMetaStore; + ServiceHandle<StoreGateSvc> m_outputMetaStore; + + /// The name of the output Container + std::string m_outputCollName; + /// The name of the input Container + std::string m_inputCollName; + /// The name of the process Container + std::string m_procMetaName; + + /// Flag for internal use to avoid writing process metadata twice + bool m_processMetadataTaken; + /// Flag settable by property on whether to do Filekeeping + bool m_markIncomplete; + + // List of source ids for doing garbage collection + // + /// List of source ids which have reached end file + std::set<SG::SourceID> m_fullreads; + /// List of source ids which have been opened + std::set<SG::SourceID> m_read; + /// List of source ids which have been written + std::set<SG::SourceID> m_written; + +}; + +template <typename T> +inline ServiceHandle<StoreGateSvc> GenericMetadataToolNoAux<T>::inputMetaStore() const +{ + return m_inputMetaStore; +} + +template <typename T> +inline ServiceHandle<StoreGateSvc> GenericMetadataToolNoAux<T>::outputMetaStore() const +{ + return m_outputMetaStore; +} + +#include "GenericMetadataToolNoAux.icc" +#endif + diff --git a/Control/AthenaKernel/AthenaKernel/GenericMetadataToolNoAux.icc b/Control/AthenaKernel/AthenaKernel/GenericMetadataToolNoAux.icc new file mode 100644 index 0000000000000000000000000000000000000000..0ac316e42a298fc51cab3be733bdf146b2b110a3 --- /dev/null +++ b/Control/AthenaKernel/AthenaKernel/GenericMetadataToolNoAux.icc @@ -0,0 +1,352 @@ +///////////////////////// -*- C++ -*- ///////////////////////////// + +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +// Implementation file for class GenericMetadataToolNoAux +// Authors: Jack Cranshaw <Jack.Cranshaw@cern.ch> +/////////////////////////////////////////////////////////////////// + +// STL include +#include <algorithm> + +#include "GaudiKernel/Incident.h" +#include "GaudiKernel/FileIncident.h" +#include "GaudiKernel/IIncidentSvc.h" +#include "AthenaKernel/MetaCont.h" +#include "AthenaKernel/ClassID_traits.h" +#include "AthenaKernel/errorcheck.h" +#include "StoreGate/WriteMetaHandle.h" +#include "AthenaBaseComps/AthCheckMacros.h" +#include "AthContainersInterfaces/IConstAuxStoreMeta.h" + +template <typename T> +GenericMetadataToolNoAux<T>::GenericMetadataToolNoAux(const std::string& type, + const std::string& name, + const IInterface* parent) + : AthAlgTool(type,name,parent), + m_inputMetaStore( "StoreGateSvc/InputMetaDataStore", name ), + m_outputMetaStore( "StoreGateSvc/MetaDataStore", name ), + m_processMetadataTaken(false), + m_markIncomplete(true) +{ + declareProperty("OutputCollName", m_outputCollName="GenericMetadataOutput", + "The default name of the container for output files"); + declareProperty("InputCollName", m_inputCollName = "GenericMetadataInput", + "The default name of the container for input files"); + declareProperty("ProcessMetadataCollName", m_procMetaName = "ProcessMetadata", + "The default name of the container for process meta"); + declareProperty("MarkIncomplete", m_markIncomplete = true, + "Defaults to filling both complete and incomplete bookkeepers"); + declareInterface< ::IMetaDataTool >( this ); +} + + + +template <typename T> +GenericMetadataToolNoAux<T>::~GenericMetadataToolNoAux() +{ +} + + + +template <typename T> +StatusCode +GenericMetadataToolNoAux<T>::initialize() +{ + ATH_MSG_DEBUG( "Initializing " << name() << " - package version " << PACKAGE_VERSION ); + + ATH_MSG_DEBUG("InputCollName = " << m_inputCollName); + ATH_MSG_DEBUG("OutputCollName = " << m_outputCollName); + ATH_MSG_DEBUG("ProcessMetadataCollName = " << m_procMetaName); + + return StatusCode::SUCCESS; +} + + + +template <typename T> +StatusCode GenericMetadataToolNoAux<T>::beginInputFile(const SG::SourceID& sid) +{ + ATH_MSG_DEBUG("beginInputFile " << this->name() << "\n" << outputMetaStore()->dump()); + //OPENING NEW INPUT FILE + //Things to do: + // 1) note that a file is currently opened + // 2) Load metadata T from input file + // 2a) if incomplete from input, directly propagate to output + // 2b) if complete from input, wait for EndInputFile to decide what to do in output + + const std::string storename("MetaDataStore+"); + if (m_inputCollName != "") { // are there inputs + // IF NO METACONT IN OUTPUT STORE YET + // Initialize MetaCont for incomplete and tmp containers in output store + // + std::string tmp_name = storename+m_outputCollName+"tmp"; + ATH_CHECK(buildAthenaInterface(m_inputCollName,tmp_name,sid)); + + // Do the following if we want incomplete processings marked + if (m_markIncomplete) { + std::string inc_name = storename+"Incomplete"+m_outputCollName; + std::string input_inc_name = "Incomplete"+m_inputCollName; + ATH_CHECK(buildAthenaInterface(input_inc_name,inc_name,sid)); + } + } // inputCollName if + else { + ATH_MSG_INFO("No input name"); + } + + // reset process metadata taken marker for new input + m_processMetadataTaken = false; + + // mark that a new source id has been opened + m_read.insert(sid); + + return StatusCode::SUCCESS; +} + + +template <typename T> +StatusCode GenericMetadataToolNoAux<T>::endInputFile(const SG::SourceID& sid) +{ + // Add the sid to the list of complete sids + if (m_inputCollName != "") { // are there inputs + m_fullreads.insert(sid); + } + + return StatusCode::SUCCESS; +} + +template <typename T> +StatusCode GenericMetadataToolNoAux<T>::metaDataStop() +{ + const std::string storename("MetaDataStore+"); + if (m_inputCollName != "") { // are there inputs + //TERMINATING THE JOB (EndRun) + //Things to do: + // 1) Create new incomplete metadata T if relevant + // 2) Print cut flow summary + // 3) Write root file if requested + // Now retrieve pointers for the MetaConts + std::string tmp_name = storename+m_outputCollName+"tmpCont"; + const MetaCont<T>* tmp; + ATH_CHECK(outputMetaStore()->retrieve(tmp,tmp_name)); + T* outcom = new T(); + + if (m_markIncomplete) { + std::string inc_name = storename+"Incomplete"+m_outputCollName+"Cont"; + // Build incomplete container to fill + T* outinc = new T(); + // Check if there were any incomplete inputs + const MetaCont<T>* inc; + if(outputMetaStore()->retrieve(inc,inc_name).isSuccess()) { + + // Incomplete inputs can just be merged + auto sids_inc = inc->sources(); + T* contptr(nullptr); + for (auto it = sids_inc.begin(); it != sids_inc.end(); ++it) { + if (!inc->find(*it,contptr)) { + ATH_MSG_ERROR("Container sid list did not match contents"); + } else { + ATH_CHECK(updateContainer(outinc,contptr)); + } + contptr = nullptr; + } + } else { + ATH_MSG_INFO("Did not find MetaCont for " << inc_name << ", assuming input had no incomplete bookkeepers"); + } + + // Loop over containers and mark based on end files seen + auto sids_tmp = tmp->sources(); + T* contptr(nullptr); + for (auto it = sids_tmp.begin(); it != sids_tmp.end(); ++it) { + if (!tmp->find(*it,contptr)) { + ATH_MSG_ERROR("Container sid list did not match contents"); + } else { + bool complete = std::find(m_fullreads.begin(), + m_fullreads.end(), + *it) != m_fullreads.end(); + bool not_written = std::find(m_written.begin(), + m_written.end(), + *it) == m_written.end(); + if (complete && not_written) { + ATH_CHECK(updateContainer(outcom,contptr)); + } else { + ATH_CHECK(updateContainer(outinc,contptr)); + } + } + } + + std::string incout_name = "Incomplete"+m_outputCollName; + // Do any cleanup + if (outputMetaStore()->contains(ClassID_traits<T>::ID(),incout_name) ) { + ATH_MSG_INFO("Cleaning up class for " << incout_name); + const T* tmpBook(nullptr); + if ( outputMetaStore()->retrieve(tmpBook,incout_name).isSuccess() ) { + ATH_CHECK(outputMetaStore()->removeDataAndProxy(tmpBook)); + } + else ATH_MSG_INFO("StoreGate failed retrieve"); + } + ATH_CHECK(outputMetaStore()->record(outinc,incout_name)); + } // markIncomplete + else { + auto sids_tmp = tmp->sources(); + T* contptr(nullptr); + // just merge complete inputs into complete/output container + for (auto it = sids_tmp.begin(); it != sids_tmp.end(); ++it) { + if (!tmp->find(*it,contptr)) { + ATH_MSG_ERROR("Container sid list did not match contents"); + } else { + // default to not worrying about marking + ATH_CHECK(updateContainer(outcom,contptr)); + } + } + } + + // Record container objects directly in store for output + if (outputMetaStore()->contains(ClassID_traits<T>::ID(),m_outputCollName)) { + ATH_MSG_INFO("Cleaning up class for " << m_outputCollName); + const T* tmpBook(nullptr); + if ( outputMetaStore()->retrieve(tmpBook,m_outputCollName).isSuccess() ) { + ATH_CHECK(outputMetaStore()->removeDataAndProxy(tmpBook)); + } + else ATH_MSG_ERROR("StoreGate failed retrieve"); + } + ATH_CHECK(outputMetaStore()->record(outcom,m_outputCollName)); + } // inputCollName if + + if (!m_processMetadataTaken) { + if (addProcessMetadata().isFailure()) { + ATH_MSG_ERROR("Could not add CutFlow information"); + } + } + else { + ATH_MSG_DEBUG("Process metadata written into container before metaDataStop"); + } + + // Reset after metadata stop + m_processMetadataTaken = false; + + if (m_inputCollName != "") { // are there inputs + // Copy read files into written files + for (auto it = m_read.begin(); it != m_read.end(); ++it) { + m_written.insert(*it); + } + // Remove completes from read + for (auto it = m_fullreads.begin(); it != m_fullreads.end(); ++it) { + m_read.erase(*it); + } + m_fullreads.clear(); + } // inputCollName if + + return StatusCode::SUCCESS; +} + + +template <typename T> +StatusCode +GenericMetadataToolNoAux<T>::finalize() +{ + ATH_MSG_DEBUG( "Finalizing " << name() << " - package version " << PACKAGE_VERSION ); + return StatusCode::SUCCESS; +} + + +template <typename T> +StatusCode GenericMetadataToolNoAux<T>::initOutputContainer( const std::string& sgkey) +{ + std::string key = sgkey; + // Create the primary container + // Put it in a MetaCont + MetaCont<T>* mcont = new MetaCont<T>(DataObjID(ClassID_traits<T>::ID(),key)); + ATH_CHECK(outputMetaStore()->record(std::move(mcont),key)); + + return StatusCode::SUCCESS; +} + +//--------------------------------------------------------// +// MetaConts are only needed when reading in Athena +// This builds them and populates them with bookeepers from the input store +//--------------------------------------------------------// +template <typename T> +StatusCode GenericMetadataToolNoAux<T>::buildAthenaInterface(const std::string& inputName, + const std::string& outputName, + const SG::SourceID& sid) +{ + // Make sure the MetaCont is ready in the output store for outputName + // If not, then create it + std::string name = outputName+"Cont"; + if( !(outputMetaStore()->contains(ClassID_traits<MetaCont<T> >::ID(),name)) ) { + ATH_CHECK(this->initOutputContainer(name)); + } + else { + ATH_MSG_WARNING("incomplete collection already exists"); + } + + // Retrieve pointer for the MetaCont + MetaCont<T>* mc; + ATH_CHECK(outputMetaStore()->retrieve(mc,name)); + + // Make sure sid does not already exist in the MetaCont + for (auto it = mc->sources().begin(); it != mc->sources().end(); ++it) { + if (*it==sid) { + ATH_MSG_ERROR("Metadata already exists for sid " << sid); + return StatusCode::FAILURE; // Fail if sid already exists + } + } + + // Get the input bookkeeper of the input metadata store + const T* cbc; + if (inputMetaStore()->contains(ClassID_traits<T>::ID(),inputName) ) { + StatusCode ssc = inputMetaStore()->retrieve( cbc, inputName ); + if (ssc.isSuccess()) { + // Insert input bookkeeper into MetaCont for this sid + T* tostore = new T(*cbc); + if ( !mc->insert(sid,tostore) ) { + ATH_MSG_ERROR("Unable to insert " << inputName << " for " << sid << " with key " << name); + return StatusCode::FAILURE; // Fail if insert to mc fails + } + } + else { + ATH_MSG_ERROR("Could not retrieve class with name " << inputName << " in input store"); + return StatusCode::FAILURE; // Fail if store contains, but not retrieves + } + } + else { + ATH_MSG_WARNING("No " << inputName << " data in this file "); + } + + return StatusCode::SUCCESS; +} + +template <typename T> +StatusCode GenericMetadataToolNoAux<T>::addProcessMetadata() +{ + // Add the information from the current processing to the complete output + // --> same paradigm as original CutFlowSvc + // Get the complete bookkeeper collection of the output meta-data store + T* completeBook(nullptr); + if( !(outputMetaStore()->retrieve( completeBook, m_outputCollName) ).isSuccess() ) { + ATH_MSG_ERROR( "Could not get output container from output MetaDataStore" ); + return StatusCode::FAILURE; + } + + // Get the bookkeeper from the current processing + T* fileCompleteBook(nullptr); + if( outputMetaStore()->contains(ClassID_traits<T>::ID(),m_procMetaName) ) { + if( !(outputMetaStore()->retrieve( fileCompleteBook, m_procMetaName) ).isSuccess() ) { + ATH_MSG_WARNING( "Could not get process metadata from output MetaDataStore" ); + } + else { + // update the complete output with the complete input + ATH_CHECK(this->updateContainer(completeBook,fileCompleteBook)); + } + } + else { + ATH_MSG_INFO("No process container " << m_procMetaName); + } + + return StatusCode::SUCCESS; +} + + diff --git a/Control/AthenaKernel/AthenaKernel/IMetaDataTool.h b/Control/AthenaKernel/AthenaKernel/IMetaDataTool.h index d119cbeb652a0961832ca8f9adf7f85f996edc0f..2558e16bda4971e9b69fac1c0bb89061c94e45f7 100755 --- a/Control/AthenaKernel/AthenaKernel/IMetaDataTool.h +++ b/Control/AthenaKernel/AthenaKernel/IMetaDataTool.h @@ -28,8 +28,8 @@ public: // Non-static members /// processed virtual StatusCode endInputFile(const SG::SourceID& sid = "Serial") = 0; - /// Function called when the tool should write out its metadata - virtual StatusCode metaDataStop(const SG::SourceID& sid = "Serial") = 0; + /// Function called when the tool should prepare to write its metadata + virtual StatusCode metaDataStop() = 0; /// Gaudi boilerplate static const InterfaceID& interfaceID(); diff --git a/Control/AthenaKernel/AthenaKernel/RecyclableDataObject.h b/Control/AthenaKernel/AthenaKernel/RecyclableDataObject.h index 0bdb0b2aa3ac7dedca1b0a775005d90781911af1..31e36244307a990a68cfefbafbf1b042feec9f54 100644 --- a/Control/AthenaKernel/AthenaKernel/RecyclableDataObject.h +++ b/Control/AthenaKernel/AthenaKernel/RecyclableDataObject.h @@ -1,6 +1,6 @@ // This file's extension implies that it's C, but it's really -*- C++ -*-. /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /* */ @@ -16,16 +16,17 @@ #define ATHENAKERNEL_RECYCLABLEDATAOBJECT_H -// Work around a warning in tbb, found by gcc8. -// Fixed in TBB 2018 U5. -#if defined(__GNUC__) && __GNUC__ >= 8 +// tbb/machine/gcc_generic.h has spurious trailing semicolons after +// the clz() functiosn (as of TBB 2019 U1). +#if defined(__GNUC__) # pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wclass-memaccess" +# pragma GCC diagnostic ignored "-Wpedantic" #endif #include "tbb/concurrent_queue.h" -#if defined(__GNUC__) && __GNUC__ >= 8 +#if defined(__GNUC__) # pragma GCC diagnostic pop #endif +#include <memory> namespace Athena { @@ -34,21 +35,23 @@ namespace Athena { /** * @brief Helper for recycling objects from event to event. * - * In some cases, one wants to reuse already-allocated objects from event to event, - * rather than deleting and recreating them each time. This has typically been done - * for complicated objects, such as classes deriving from IdentfiableContainer. + * In some cases, one wants to reuse already-allocated objects + * from event to event, rather than deleting and recreating them each time. + * This has typically been done for complicated objects, + * such as classes deriving from IdentfiableContainer. * - * Some care is obviously needed for this to work in a MT job. Rather than holding - * a pointer to a specific object from a class member, we instead maintain - * a concurrent_queue of pointers to objects. When we want an object, we get - * one from the queue; if the queue is empty, then we allocate a new one. + * Some care is obviously needed for this to work in a MT job. + * Rather than holding a pointer to a specific object from a class member, + * we instead maintain a concurrent_queue of pointers to objects. + * When we want an object, we get one from the queue; if the queue is empty, + * then we allocate a new one. * - * The object used should derive from @c DataObject. We bump the reference count - * by 1 when the object is allocated so that it won't get deleted by StoreGate. - * We also override @c release() so that when the reference count goes back - * to 1 it is `recycled'. When this happens, we call the @c recycle() method - * on the object (which should probably be protected) and put the object - * back on the queue to be allocated again. + * The object used should derive from @c DataObject. We bump the reference + * count by 1 when the object is allocated so that it won't get deleted + * by StoreGate. We also override @c release() so that when the reference + * count goes back to 1 it is `recycled'. When this happens, + * we call the @c recycle() method on the object (which should probably + * be protected) and put the object back on the queue to be allocated again. * * Example use: *@code @@ -68,7 +71,17 @@ namespace Athena { * MyDataObj* obj = m_queue.get (true); @endcode * - * @c DOBJ should derive from @c DataObject and should provide a member @c recycle(). + * @c DOBJ should derive from @c DataObject and should provide + * a member @c recycle(). + * + * Implementation note: one needs to be careful about the order in which + * objects are deleted during finalization. In particular, it is possible + * for a Gaudi component that holds a @c RecyclableDataQueue as a member + * to be deleted while there are still associated data objects registered + * in the event store. To be robust against this, we allocate the + * actual queue object separately from @c RecyclableDataQueue and + * manage it with @c shared_ptr; @c RecyclableDataObject then references + * the queue with a @c shared_ptr. */ template <class DOBJ> class RecyclableDataObject : public DOBJ @@ -84,7 +97,7 @@ public: * @param args... Additional arguments to pass to the @c DOBJ constructor. */ template <typename... ARGS> - RecyclableDataObject (queue_t& queue, ARGS&&... args); + RecyclableDataObject (std::shared_ptr<queue_t> queue, ARGS&&... args); /** @@ -99,7 +112,7 @@ public: private: /// The queue on which this object will be placed when it is recycled. - queue_t& m_queue; + std::shared_ptr<queue_t> m_queue; }; @@ -110,11 +123,16 @@ private: */ template <class DOBJ> class RecyclableDataQueue - : public RecyclableDataObject<DOBJ>::queue_t { public: /// Underlying queue type holding these objects. - using RecyclableDataObject<DOBJ>::queue_t::queue_t; + typedef typename RecyclableDataObject<DOBJ>::queue_t queue_t; + + + /** + * @brief Constructor. + */ + RecyclableDataQueue(); /** @@ -131,6 +149,12 @@ public: * Free all objects in the queue. */ ~RecyclableDataQueue(); + + +private: + /// Shared reference to the actual queue. + /// Each data object also has a reference to the queue. + std::shared_ptr<queue_t> m_queue; }; diff --git a/Control/AthenaKernel/AthenaKernel/RecyclableDataObject.icc b/Control/AthenaKernel/AthenaKernel/RecyclableDataObject.icc index e59c827a560d25fd2104075bb24ccc18bdcff4ef..8802209bc7ee13d5877caf42d0e729f0a46d4df7 100644 --- a/Control/AthenaKernel/AthenaKernel/RecyclableDataObject.icc +++ b/Control/AthenaKernel/AthenaKernel/RecyclableDataObject.icc @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // $Id$ /* @@ -22,7 +22,7 @@ namespace Athena { */ template <class DOBJ> template <typename... ARGS> -RecyclableDataObject<DOBJ>::RecyclableDataObject (queue_t& queue, ARGS&&... args) +RecyclableDataObject<DOBJ>::RecyclableDataObject (std::shared_ptr<queue_t> queue, ARGS&&... args) : DOBJ (std::forward<ARGS>(args)...), m_queue (queue) { @@ -44,12 +44,22 @@ unsigned long RecyclableDataObject<DOBJ>::release() unsigned long cnt = DOBJ::release(); if (cnt == 1) { this->recycle(); - m_queue.push (this); + m_queue->push (this); } return cnt; } +/** + * @brief Constructor. + */ +template <class DOBJ> +RecyclableDataQueue<DOBJ>::RecyclableDataQueue() + : m_queue (std::make_shared<queue_t>()) +{ +} + + /** * @brief Get an object, either a new one or one recycled from a previous event. * @param args... Arguments to pass to the @c DOBJ constructor if we make a new one. @@ -59,10 +69,10 @@ template <typename... ARGS> DOBJ* RecyclableDataQueue<DOBJ>::get (ARGS&&... args) { DOBJ* obj = nullptr; - if (this->try_pop (obj)) { + if (m_queue->try_pop (obj)) { return obj; } - return new RecyclableDataObject<DOBJ> (*this, std::forward<ARGS>(args)...); + return new RecyclableDataObject<DOBJ> (m_queue, std::forward<ARGS>(args)...); } @@ -75,7 +85,7 @@ template <class DOBJ> RecyclableDataQueue<DOBJ>::~RecyclableDataQueue() { DOBJ* obj = nullptr; - while (this->try_pop (obj)) { + while (m_queue->try_pop (obj)) { delete obj; } } diff --git a/Control/AthenaKernel/AthenaKernel/getMessageSvc.h b/Control/AthenaKernel/AthenaKernel/getMessageSvc.h index 26ac444c955f245c2876cf29fca43c838fc25c32..d94ad9f01e8fcb13d87be9839fd482d6003b2c7f 100644 --- a/Control/AthenaKernel/AthenaKernel/getMessageSvc.h +++ b/Control/AthenaKernel/AthenaKernel/getMessageSvc.h @@ -1,7 +1,7 @@ // This file's extension implies that it's C, but it's really -*- C++ -*-. /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef ATHENAKERNEL_GETMESSAGESVC_H @@ -9,7 +9,6 @@ /** @file getMessageSvc.h * @brief singleton-like access to IMessageSvc via open function and helper * - * $Id: getMessageSvc.h,v 1.6 2008-07-14 22:10:14 calaf Exp $ * @author Paolo Calafiura - Atlas collaboration */ #include <cassert> @@ -31,8 +30,8 @@ namespace Athena { * The default is to be lazy and don't create anything. * @param quiet : do not print warning if MessagesSvc cannot be found (default false) * - * Also used via weak-linking from DetCommon code (see e.g. TrigConf::MsgStream in DetCommon) - * DO NOT MODIFY THE SIGNATURE OF THESE METHODS WITHOUT UPDATING THE DETCOMMON SIDE !!! + * Also used via weak-linking from TrigConf code (see e.g. TrigConfBase/Root/MsgStream.cxx) + * DO NOT MODIFY THE SIGNATURE OF THESE METHODS WITHOUT UPDATING THE TRIGCONF SIDE !!! */ IMessageSvc* getMessageSvc( bool quiet=false ); IMessageSvc* getMessageSvc( const Options::CreateOptions o, bool quiet=false ); @@ -44,12 +43,12 @@ namespace Athena { //@{ /** Wrappers for some of the IMessageSvc methods * These can be used from libraries without explicit Gaudi dependency via weak linking. - * (see e.g. TrigConf::MsgStream in DetCommon) + * (see e.g. TrigConf::MsgStream in TrigConfBase) * - * DO NOT MODIFY THE SIGNATURE OF THESE METHODS WITHOUT UPDATING THE DETCOMMON SIDE !!! + * DO NOT MODIFY THE SIGNATURE OF THESE METHODS WITHOUT UPDATING THE TRIGCONF SIDE !!! */ void reportMessage(IMessageSvc* ims, const std::string &source, int type, const std::string &message); - int outputLevel(IMessageSvc* ims, const std::string &source); + int outputLevel(const IMessageSvc* ims, const std::string &source); void setOutputLevel(IMessageSvc* ims, const std::string &source, int level); //@} diff --git a/Control/AthenaKernel/src/getMessageSvc.cxx b/Control/AthenaKernel/src/getMessageSvc.cxx index fd45a8b835c472bef82d43ffc5d3b580586b862d..fa34ba958b8d291ec229cf2a034090000b79174f 100644 --- a/Control/AthenaKernel/src/getMessageSvc.cxx +++ b/Control/AthenaKernel/src/getMessageSvc.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include <iostream> @@ -33,7 +33,7 @@ void Athena::reportMessage (IMessageSvc* ims, const std::string &source, int typ if (ims) ims->reportMessage(source, type, message); } -int Athena::outputLevel(IMessageSvc* ims, const std::string &source) { +int Athena::outputLevel(const IMessageSvc* ims, const std::string &source) { if (ims) return ims->outputLevel(source); else return MSG::INFO; } diff --git a/Control/AthenaMonitoring/AthenaMonitoring/ATLAS_CHECK_THREAD_SAFETY b/Control/AthenaMonitoring/AthenaMonitoring/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..a70125eccc7cfe68a96e06de313f59c7ed995d9a --- /dev/null +++ b/Control/AthenaMonitoring/AthenaMonitoring/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Control/AthenaMonitoring diff --git a/Control/AthenaMonitoring/AthenaMonitoring/AthenaMonManager.h b/Control/AthenaMonitoring/AthenaMonitoring/AthenaMonManager.h index 52f71189a3c5ac463e8805c6eeff334f1120747b..12d12e9a590459f2417e9feb3e51b667257f8455 100755 --- a/Control/AthenaMonitoring/AthenaMonitoring/AthenaMonManager.h +++ b/Control/AthenaMonitoring/AthenaMonitoring/AthenaMonManager.h @@ -14,6 +14,9 @@ #include "xAODEventInfo/EventInfo.h" #include "StoreGate/ReadHandleKey.h" +#include "CxxUtils/checker_macros.h" +ATLAS_NO_CHECK_FILE_THREAD_SAFETY; // legacy (serial) DQ monitoring framework + class ISvcLocator; class ITHistSvc; class ManagedMonitorToolBase; @@ -27,7 +30,6 @@ class LWHist; * configuration variables and organizing the output data. It provides * all the functionality and behaviour of AthenaMon. * - * $Id: AthenaMonManager.h,v 1.21 2009-05-08 09:50:22 sschaetz Exp $ * * @author Michael Wilson, CERN, January 2007 */ diff --git a/Control/AthenaMonitoring/AthenaMonitoring/ManagedMonitorToolBase.h b/Control/AthenaMonitoring/AthenaMonitoring/ManagedMonitorToolBase.h index a7450e304b4eb54a090aa025c4ae968d2327145d..f5c2a2be4bef58f2222e457414baf75f71f359f0 100755 --- a/Control/AthenaMonitoring/AthenaMonitoring/ManagedMonitorToolBase.h +++ b/Control/AthenaMonitoring/AthenaMonitoring/ManagedMonitorToolBase.h @@ -57,6 +57,9 @@ class IDQFilterTool; #include "AthenaMonitoring/IDQFilterTool.h" #include "GaudiKernel/ITHistSvc.h" +#include "CxxUtils/checker_macros.h" +ATLAS_NO_CHECK_FILE_THREAD_SAFETY; // legacy (serial) DQ monitoring framework + /** * Provides functionality for users to implement * and save histograms, ntuples, and summary data, while allowing a central diff --git a/Control/AthenaMonitoring/AthenaMonitoring/MonitoredTimer.h b/Control/AthenaMonitoring/AthenaMonitoring/MonitoredTimer.h index d9c30b7118c67add57e2cc4a0d8f344d2fb31afd..8a739d6df953bc9ecfa5925eaab633b77e32164d 100644 --- a/Control/AthenaMonitoring/AthenaMonitoring/MonitoredTimer.h +++ b/Control/AthenaMonitoring/AthenaMonitoring/MonitoredTimer.h @@ -30,9 +30,9 @@ namespace Monitored { Timer(Timer const&) = delete; void start(); //<! (re)starts the timer - void stop() const; //<! stops the timer + void stop(); //<! stops the timer - operator double() const; //!< duration between start and stop in microseconds + operator double() const; //!< duration between start and stop (or current time) in microseconds const std::vector<double> getVectorRepresentation() const override { return {double(*this)}; } @@ -41,7 +41,7 @@ namespace Monitored { typedef std::chrono::high_resolution_clock clock_type; clock_type::time_point m_startTime; - mutable clock_type::time_point m_stopTime; + clock_type::time_point m_stopTime; Timer& operator=(Timer const&) = delete; }; diff --git a/Control/AthenaMonitoring/python/DQConfigFlags.py b/Control/AthenaMonitoring/python/DQConfigFlags.py index 1d19f8c680309e6ee073930798d4f22701bb4e26..1cd308251abf25e7d92e00be238182907b002831 100644 --- a/Control/AthenaMonitoring/python/DQConfigFlags.py +++ b/Control/AthenaMonitoring/python/DQConfigFlags.py @@ -13,9 +13,11 @@ def createDQConfigFlags(): acf.addFlag('DQ.FileKey', 'CombinedMonitoring') return acf -def createComplexDQConfigFlags( acf ): +def createComplexDQConfigFlags(): + acf=AthConfigFlags() acf.addFlag('DQ.Environment', getEnvironment ) acf.addFlag('DQ.DataType', getDataType ) + return acf def getDataType(flags): if flags.Input.isMC: diff --git a/Control/AthenaMonitoring/src/AthenaMonManager.cxx b/Control/AthenaMonitoring/src/AthenaMonManager.cxx index 371be6a14345efaed29c697339dda48b40d219d1..ac74febd0c4af6973a2f234c9ce6dfca0784b1f1 100755 --- a/Control/AthenaMonitoring/src/AthenaMonManager.cxx +++ b/Control/AthenaMonitoring/src/AthenaMonManager.cxx @@ -34,6 +34,8 @@ #include <limits.h> #include <vector> +ATLAS_NO_CHECK_FILE_THREAD_SAFETY; // legacy (serial) DQ monitoring framework + class AthenaMonManager::Imp { public: Imp(AthenaMonManager*man,const std::string& name) : m_theManager(man), diff --git a/Control/AthenaMonitoring/src/ManagedMonitorToolBase.cxx b/Control/AthenaMonitoring/src/ManagedMonitorToolBase.cxx index b5f70828d8bfa271c0780e54b773386189fee695..ab73e8a71ae54a545212ddacba8f47b807389c05 100755 --- a/Control/AthenaMonitoring/src/ManagedMonitorToolBase.cxx +++ b/Control/AthenaMonitoring/src/ManagedMonitorToolBase.cxx @@ -32,6 +32,8 @@ #include "AthenaMonitoring/IDQFilterTool.h" #include "GaudiKernel/ITHistSvc.h" +ATLAS_NO_CHECK_FILE_THREAD_SAFETY; // legacy (serial) DQ monitoring framework + //____________________________________________________________________ class ManagedMonitorToolBase::Imp { public: diff --git a/Control/AthenaMonitoring/src/MonitoredTimer.cxx b/Control/AthenaMonitoring/src/MonitoredTimer.cxx index e5fe2222fe93e4bb9cf63eda57e3ee42bc6f005d..76c0d18b36d7254c4e2593914614085b134c8fe3 100644 --- a/Control/AthenaMonitoring/src/MonitoredTimer.cxx +++ b/Control/AthenaMonitoring/src/MonitoredTimer.cxx @@ -21,12 +21,13 @@ namespace Monitored { void Timer::start() { m_startTime = clock_type::now(); } - void Timer::stop() const { m_stopTime = clock_type::now(); } + void Timer::stop() { m_stopTime = clock_type::now(); } Timer::operator double() const { - if (m_stopTime == clock_type::time_point()) // never stoppped - stop(); - auto d = std::chrono::duration_cast<std::chrono::microseconds>(m_stopTime - m_startTime); + clock_type::time_point stopTime = m_stopTime; + if (stopTime == clock_type::time_point()) // never stopped + stopTime = clock_type::now(); + auto d = std::chrono::duration_cast<std::chrono::microseconds>(stopTime - m_startTime); return d.count(); } diff --git a/Control/AthenaServices/src/AthenaEventLoopMgr.cxx b/Control/AthenaServices/src/AthenaEventLoopMgr.cxx index 8e08151e23d8506679d39e82034f935bda5c38fe..ece6bb68f8a69a03d613deaa3762e30789cf4023 100644 --- a/Control/AthenaServices/src/AthenaEventLoopMgr.cxx +++ b/Control/AthenaServices/src/AthenaEventLoopMgr.cxx @@ -674,10 +674,17 @@ StatusCode AthenaEventLoopMgr::executeEvent(void* /*par*/) eventStore()->tryConstRetrieve<xAOD::EventInfo>(); if (xAODEvent==nullptr) { error() << "Failed to get EventID from input. Tried old-style and xAOD::EventInfo" <<endmsg; - //std::cout << eventStore()->dump(); return StatusCode::FAILURE; } - eventID=eventIDFromxAOD(xAODEvent); + // Record the old-style object for those clients that still need it + pEventPtr = CxxUtils::make_unique<EventInfo>(new EventID(eventIDFromxAOD(xAODEvent)), new EventType(eventTypeFromxAOD(xAODEvent))); + pEvent = pEventPtr.get(); + eventID=*(pEvent->event_ID()); + StatusCode sc = eventStore()->record(std::move(pEventPtr),""); + if( !sc.isSuccess() ) { + error() << "Error declaring event data object" << endmsg; + return StatusCode::FAILURE; + } } } } @@ -1088,7 +1095,6 @@ void AthenaEventLoopMgr::handle(const Incident& inc) const xAOD::EventInfo* xAODEvent=eventStore()->tryConstRetrieve<xAOD::EventInfo>(); if (xAODEvent==nullptr) { error() << "Failed to get EventID from input. Tried old-style and xAOD::EventInfo" <<endmsg; - std::cout << eventStore()->dump(); return; } eventID=eventIDFromxAOD(xAODEvent); diff --git a/Control/AthenaServices/src/AthenaHiveEventLoopMgr.cxx b/Control/AthenaServices/src/AthenaHiveEventLoopMgr.cxx index ff44dbfdfa834a8182b745050cdf4fe32fa1e5c9..9ee4df119fb5c343a14a72b7e02df1a6facaf293 100644 --- a/Control/AthenaServices/src/AthenaHiveEventLoopMgr.cxx +++ b/Control/AthenaServices/src/AthenaHiveEventLoopMgr.cxx @@ -42,6 +42,8 @@ #include "EventInfo/EventInfo.h" #include "EventInfo/EventID.h" #include "EventInfo/EventType.h" +#include "xAODEventInfo/EventInfo.h" +#include "EventInfoUtils/EventInfoFromxAOD.h" #include "AthenaHiveEventLoopMgr.h" @@ -1109,8 +1111,22 @@ int AthenaHiveEventLoopMgr::declareEventRootAddress(const EventContext& ctx){ // Retrieve the Event object sc = eventStore()->retrieve(pEvent); if( !sc.isSuccess() ) { - error() << "Unable to retrieve Event root object" << endmsg; - return -1; + // Try to get the xAOD::EventInfo + const xAOD::EventInfo* pXEvent{nullptr}; + sc = eventStore()->retrieve(pXEvent); + if( !sc.isSuccess() ) { + error() << "Unable to retrieve Event root object" << endmsg; + return -1; + } + // Build the old-style Event Info object for those clients that still need it + std::unique_ptr<EventInfo> pEventPtr = CxxUtils::make_unique<EventInfo>(new EventID(eventIDFromxAOD(pXEvent)) + , new EventType(eventTypeFromxAOD(pXEvent))); + pEvent = pEventPtr.get(); + sc = eventStore()->record(std::move(pEventPtr),""); + if( !sc.isSuccess() ) { + error() << "Error declaring event data object" << endmsg; + return -1; + } } m_pEvent = pEvent; diff --git a/Control/AthenaServices/src/AthenaOutputStream.cxx b/Control/AthenaServices/src/AthenaOutputStream.cxx index 5e5ecb043297ee3bb9078e9744e0f50df12df732..f0667db1e094ce76dba91a1d9028c8842f0588ac 100644 --- a/Control/AthenaServices/src/AthenaOutputStream.cxx +++ b/Control/AthenaServices/src/AthenaOutputStream.cxx @@ -319,59 +319,6 @@ StatusCode AthenaOutputStream::initialize() { StatusCode AthenaOutputStream::stop() { ATH_MSG_DEBUG("AthenaOutputStream " << this->name() << " ::stop()"); -/* - for (std::vector<ToolHandle<IAthenaOutputTool> >::iterator iter = m_helperTools.begin(); - iter != m_helperTools.end(); iter++) { - if (!(*iter)->preFinalize().isSuccess()) { - ATH_MSG_ERROR("Cannot finalize helper tool"); - } - } - ServiceHandle<MetaDataSvc> mdsvc("MetaDataSvc", name()); - if (mdsvc.retrieve().isFailure()) { - ATH_MSG_ERROR("Could not retrieve MetaDataSvc for stop actions"); - } - else { - ATH_CHECK(mdsvc->prepareOutput()); - } - // Always force a final commit in stop - mainly applies to AthenaPool - if (m_writeOnFinalize) { - if (write().isFailure()) { // true mean write AND commit - ATH_MSG_ERROR("Cannot write on finalize"); - } - ATH_MSG_INFO("Records written: " << m_events); - } - - if (!m_metadataItemList.value().empty()) { - m_currentStore = &m_metadataStore; - StatusCode status = m_streamer->connectServices(m_metadataStore.type(), m_persName, false); - if (status.isFailure()) { - throw GaudiException("Unable to connect metadata services", name(), StatusCode::FAILURE); - } - m_checkNumberOfWrites = false; - m_outputAttributes = "[OutputCollection=MetaDataHdr][PoolContainerPrefix=MetaData][AttributeListKey=][DataHeaderSatellites=]"; - m_p2BWritten->clear(); - IProperty *pAsIProp(nullptr); - if ((m_p2BWritten.retrieve()).isFailure() || - nullptr == (pAsIProp = dynamic_cast<IProperty*>(&*m_p2BWritten)) || - (pAsIProp->setProperty("ItemList", m_metadataItemList.toString())).isFailure()) { - throw GaudiException("Folder property [metadataItemList] not found", name(), StatusCode::FAILURE); - } - if (write().isFailure()) { // true mean write AND commit - ATH_MSG_ERROR("Cannot write metadata"); - } - m_outputAttributes.clear(); - m_currentStore = &m_dataStore; - status = m_streamer->connectServices(m_dataStore.type(), m_persName, m_extendProvenanceRecord); - if (status.isFailure()) { - throw GaudiException("Unable to re-connect services", name(), StatusCode::FAILURE); - } - m_p2BWritten->clear(); - if ((pAsIProp->setProperty(m_itemList)).isFailure()) { - throw GaudiException("Folder property [itemList] not found", name(), StatusCode::FAILURE); - } - ATH_MSG_INFO("Records written: " << m_events); - } -*/ return StatusCode::SUCCESS; } @@ -658,7 +605,6 @@ void AthenaOutputStream::addItemObjects(const SG::FolderItem& item) ATH_MSG_VERBOSE("Calling tokenizeAtStep( " << keyTokens << ", " << item_key << ", " << wildCard << ")" ); this->tokenizeAtSep( keyTokens, item_key, wildCard ); ATH_MSG_VERBOSE("Done calling tokenizeAtStep( " << keyTokens << ", " << item_key << ", " << wildCard << ")" ); - //std::pair<std::string, std::string> key = breakAtSep(item_key, wildCard); // Now loop over any found proxies for (; iter != end; ++iter) { SG::DataProxy* itemProxy(iter->second); diff --git a/Control/AthenaServices/src/DecisionAlg.cxx b/Control/AthenaServices/src/DecisionAlg.cxx new file mode 100644 index 0000000000000000000000000000000000000000..6d7d98992fea22f67cb4ce16d641dcb122043609 --- /dev/null +++ b/Control/AthenaServices/src/DecisionAlg.cxx @@ -0,0 +1,21 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#include "DecisionAlg.h" + + +//**************************************************************************** + + +// Standard Constructor +DecisionAlg::DecisionAlg(const std::string& name, ISvcLocator* pSvcLocator) + : FilteredAlgorithm(name, pSvcLocator) +{ + assert(pSvcLocator); +} + +// Standard Destructor +DecisionAlg::~DecisionAlg() { +} + diff --git a/Control/AthenaServices/src/DecisionAlg.h b/Control/AthenaServices/src/DecisionAlg.h new file mode 100644 index 0000000000000000000000000000000000000000..7660fb071f85ecaa923cbe4e3db9df4ab66d5cac --- /dev/null +++ b/Control/AthenaServices/src/DecisionAlg.h @@ -0,0 +1,27 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef ATHENASERVICES_DECISIONALG_H +#define ATHENASERVICES_DECISIONALG_H + +#include "AthenaBaseComps/FilteredAlgorithm.h" + +/** @class DecisionAlg + * @brief Call through interface to FilteredAlgorithm + * + * @author cranshaw@anl.gov + * $Id: DecisionAlg.h,v 1.12 2008-12-15 19:14:58 binet Exp $ + */ +class DecisionAlg : public FilteredAlgorithm +{ +public: + + /// Standard algorithm Constructor + DecisionAlg(const std::string& name, ISvcLocator* pSvcLocator); + /// Standard Destructor + virtual ~DecisionAlg(); + +}; + +#endif // ATHENASERVICES_DECISIONALG_H diff --git a/Control/AthenaServices/src/MetaDataSvc.cxx b/Control/AthenaServices/src/MetaDataSvc.cxx index 90767e2bc18a530445930adc72251686b6d2ce61..4f8034ec30dfcbb3fc246373256c0f78292e1126 100644 --- a/Control/AthenaServices/src/MetaDataSvc.cxx +++ b/Control/AthenaServices/src/MetaDataSvc.cxx @@ -123,8 +123,8 @@ StatusCode MetaDataSvc::initialize() { } ATH_MSG_INFO("Found " << m_metaDataTools); - m_incSvc->addListener(this, "FirstInputFile", 90); - m_incSvc->addListener(this, "BeginInputFile", 90); + m_incSvc->addListener(this, "FirstInputFile", 80); + m_incSvc->addListener(this, "BeginInputFile", 80); m_incSvc->addListener(this, "EndInputFile", 10); m_incSvc->addListener(this, "LastInputFile", 10); m_incSvc->addListener(this, "ShmProxy", 90); @@ -323,7 +323,6 @@ StatusCode MetaDataSvc::retireMetadataSource(const Incident& inc) StatusCode MetaDataSvc::prepareOutput() { - ATH_MSG_DEBUG("prepareOutput"); StatusCode rc(StatusCode::SUCCESS); for (auto it = m_metaDataTools.begin(); it != m_metaDataTools.end(); ++it) { ATH_MSG_DEBUG(" calling metaDataStop for " << (*it)->name()); @@ -403,12 +402,12 @@ StatusCode MetaDataSvc::transitionMetaDataFile(bool ignoreInputFile) { return(StatusCode::FAILURE); } - Incident metaDataStopIncident(name(), "MetaDataStop"); - m_incSvc->fireIncident(metaDataStopIncident); - // Set to be listener for end of event ATH_CHECK(this->prepareOutput()); + Incident metaDataStopIncident(name(), "MetaDataStop"); + m_incSvc->fireIncident(metaDataStopIncident); + AthCnvSvc* cnvSvc = dynamic_cast<AthCnvSvc*>(m_addrCrtr.operator->()); if (cnvSvc) { if (!cnvSvc->disconnectOutput().isSuccess()) { diff --git a/Control/AthenaServices/src/components/AthenaServices_entries.cxx b/Control/AthenaServices/src/components/AthenaServices_entries.cxx index 532c89025e0b6c46c3139d0ee11d20ab224c69a9..494766df6ee4bf238c83da6415d7ecfabcafb534 100644 --- a/Control/AthenaServices/src/components/AthenaServices_entries.cxx +++ b/Control/AthenaServices/src/components/AthenaServices_entries.cxx @@ -34,6 +34,7 @@ #include "../ToyNextPassFilterTool.h" #include "../ConditionsCleanerSvc.h" #include "../DelayedConditionsCleanerSvc.h" +#include "../DecisionAlg.h" DECLARE_COMPONENT( AthenaOutputStream ) DECLARE_COMPONENT( AthenaConditionStream ) @@ -71,3 +72,4 @@ DECLARE_COMPONENT( ToyNextPassFilterAlg ) DECLARE_COMPONENT( ToyNextPassFilterTool ) DECLARE_COMPONENT( Athena::ConditionsCleanerSvc ) DECLARE_COMPONENT( Athena::DelayedConditionsCleanerSvc ) +DECLARE_COMPONENT( DecisionAlg ) diff --git a/Control/CxxUtils/CMakeLists.txt b/Control/CxxUtils/CMakeLists.txt index e27276167d7d8aa1614b0481988ab88880ed6dd6..a6607bec17365ec01e70de1a94d10918aeb9b1f0 100644 --- a/Control/CxxUtils/CMakeLists.txt +++ b/Control/CxxUtils/CMakeLists.txt @@ -107,7 +107,8 @@ foreach( test sincos_test copyif_test ArrayScanner_test Arrayrep_test fpcompare_test StrFormat_test prefetch_test ClassName_test make_unique_test ones_test exctrace1_test bitscan_test ConcurrentRangeMap_test - CachedValue_test CachedPointer_test atomic_fetch_minmax_test + CachedValue_test CachedPointer_test CachedUniquePtr_test + atomic_fetch_minmax_test MurmurHash2_test bitmask_test crc64_test Ring_test ) atlas_add_test( ${test} SOURCES test/${test}.cxx diff --git a/Control/CxxUtils/CxxUtils/CachedPointer.h b/Control/CxxUtils/CxxUtils/CachedPointer.h index a0e29b666a60105c50c38ed22e0f545c229d6a6e..220cf6edbcfc8637ebe8ff65ed0f772c9bae354f 100644 --- a/Control/CxxUtils/CxxUtils/CachedPointer.h +++ b/Control/CxxUtils/CxxUtils/CachedPointer.h @@ -1,6 +1,6 @@ // This file's extension implies that it's C, but it's really -*- C++ -*-. /* - * Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration. + * Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration. */ // $Id$ /** @@ -81,7 +81,7 @@ public: /// Store a new value to the element. - void store (pointer_t elt) const; + void store (pointer_t elt); /// Return the current value of the element. diff --git a/Control/CxxUtils/CxxUtils/CachedPointer.icc b/Control/CxxUtils/CxxUtils/CachedPointer.icc index 325d0ddb1a8a912c5082816cee2c5d1a6b09d781..2ad3b16436690a26d6b29cb2e349db34188907fe 100644 --- a/Control/CxxUtils/CxxUtils/CachedPointer.icc +++ b/Control/CxxUtils/CxxUtils/CachedPointer.icc @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // $Id$ /** @@ -88,7 +88,7 @@ void CachedPointer::set (pointer_t elt) const * @brief Store a new value to the element. */ inline -void CachedPointer::store (pointer_t elt) const +void CachedPointer::store (pointer_t elt) { m_a.store (elt, std::memory_order_relaxed); } diff --git a/Control/CxxUtils/CxxUtils/CachedUniquePtr.h b/Control/CxxUtils/CxxUtils/CachedUniquePtr.h new file mode 100644 index 0000000000000000000000000000000000000000..0c83de06ac5c01972454cff0aa88d5fc34e2244e --- /dev/null +++ b/Control/CxxUtils/CxxUtils/CachedUniquePtr.h @@ -0,0 +1,122 @@ +// This file's extension implies that it's C, but it's really -*- C++ -*-. +/* + * Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration. + */ +/** + * @file CxxUtils/CachedUniquePtr.h + * @author scott snyder <snyder@bnl.gov> + * @date Mar, 2019 + * @brief Cached unique_ptr with atomic update. + */ + + +#ifndef CXXUTILS_CACHEDUNIQUEPTR_H +#define CXXUTILS_CACHEDUNIQUEPTR_H + + +#include <atomic> +#include <memory> + + +namespace CxxUtils { + + +/** + * @brief Cached pointer with atomic update. + * + * This acts as a @c unique_ptr that may be set atomically through + * a const method. If the pointer is already set, then the new value + * is deleted. The intended use case is where one maintains some + * cached object that is computed lazily. So one can do, for example, + *@code + * CxxUtils::CachedUniquePtr<Payload> m_payload; + * ... + * const Payload* ...::get() const + * { + * if (!m_payload) { + * m_payload.set (std::make_unique<Payload> (...)); + * } + * return m_payload.get()); + * } + @endcode + * + * This only makes sense if the objects passed to set() are equivalent + * in all threads. This is generally the case for a lazily-computed value, + * but this class has no way of enforcing this. + * + * It is recommended to generally use the template @c CachedUniquePtr, which + * is specialized for const types. + * The more general template @c CachedUniquePtrT can be used with a non-const + * type (but you don't want to do that for the lazy-cache use case). + */ +template <class T> +class CachedUniquePtrT +{ +public: + /// Default constructor. Sets the element to null. + CachedUniquePtrT(); + + + /// Constructor from an element. + CachedUniquePtrT (std::unique_ptr<T> elt); + + + /// Move constructor. + CachedUniquePtrT (CachedUniquePtrT&& other); + + + /// Move. + CachedUniquePtrT& operator= (CachedUniquePtrT&& other); + + + // Destructor. + ~CachedUniquePtrT(); + + + /// Atomically set the element. If already set, then @c elt is discarded. + void set (std::unique_ptr<T> elt) const; + + + /// Store a new value to the element. + /// Not compatible with other concurrent access. + void store (std::unique_ptr<T> elt); + + + /// Return the current value of the element. + T* get() const; + + + /// Dereference the element. + T& operator*() const; + + + /// Dereference the element. + T* operator->() const; + + + /// Test if the element is null. + explicit operator bool() const; + + + /// Transfer ownership from the element: return the current value as a + /// unique_ptr, leaving the element null. + std::unique_ptr<T> release(); + + +private: + /// The cached element. + mutable std::atomic<T*> m_ptr; +}; + + +template <class T> +using CachedUniquePtr = CachedUniquePtrT<const T>; + + +} // namespace CxxUtils + + +#include "CxxUtils/CachedUniquePtr.icc" + + +#endif // not CXXUTILS_CACHEDUNIQUEPTR_H diff --git a/Control/CxxUtils/CxxUtils/CachedUniquePtr.icc b/Control/CxxUtils/CxxUtils/CachedUniquePtr.icc new file mode 100644 index 0000000000000000000000000000000000000000..f86b4c6293c802935d8669567d1570e4094c0174 --- /dev/null +++ b/Control/CxxUtils/CxxUtils/CachedUniquePtr.icc @@ -0,0 +1,172 @@ +// This file's extension implies that it's C, but it's really -*- C++ -*-. +/* + * Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration. + */ +// $Id$ +/** + * @file CxxUtils/CachedUniquePtr.icc + * @author scott snyder <snyder@bnl.gov> + * @date Mar, 2019 + * @brief Cached unique_ptr with atomic update. + */ + + +namespace CxxUtils { + + +/** + * @brief Default constructor. Sets the element to null. + */ +template <class T> +inline +CachedUniquePtrT<T>::CachedUniquePtrT() + : m_ptr (nullptr) +{ +} + + +/** + * @brief Constructor from an element. + */ +template <class T> +inline +CachedUniquePtrT<T>::CachedUniquePtrT (std::unique_ptr<T> elt) + : m_ptr (elt.release()) +{ +} + + +/** + * @brief Move constructor. + */ +template <class T> +inline +CachedUniquePtrT<T>::CachedUniquePtrT (CachedUniquePtrT&& other) + : m_ptr (other.release().release()) +{ +} + + +/** + * @brief Move. + */ +template <class T> +inline +CachedUniquePtrT<T>& +CachedUniquePtrT<T>::operator= (CachedUniquePtrT&& other) +{ + if (this != &other) { + store (other.release()); + } + return *this; +} + + +/** + * @brief Destructor. + */ +template <class T> +inline +CachedUniquePtrT<T>::~CachedUniquePtrT() +{ + delete m_ptr; +} + + +/** + * @brief Atomically set the element. If already set, then @c elt is discarded. + * @param elt The new value for the element. + * + * If the current value of the element is null, then set it to @c elt. + * Otherwise, delete @c elt. + * This is done atomically. + */ +template <class T> +inline +void CachedUniquePtrT<T>::set (std::unique_ptr<T> elt) const +{ + // Set the element to ELT if it is currently null. + T* ptr = elt.release(); + T* null = nullptr; + if (!m_ptr.compare_exchange_strong (null, ptr)) { + // Was already set. Delete the new value. + delete ptr; + } +} + + +/** + * @brief Store a new value to the element. + * Not compatible with other concurrent access. + */ +template <class T> +inline +void CachedUniquePtrT<T>::store (std::unique_ptr<T> elt) +{ + T* old = m_ptr.exchange (elt.release()); + delete old; +} + + +/** + * @brief Return the current value of the element. + */ +template <class T> +inline +T* +CachedUniquePtrT<T>::get() const +{ + return m_ptr.load(); +} + + +/** + * @brief Dereference the element. + */ +template <class T> +inline +T& +CachedUniquePtrT<T>::operator*() const +{ + return *get(); +} + + +/** + * @brief Dereference the element. + */ +template <class T> +inline +T* +CachedUniquePtrT<T>::operator->() const +{ + return get(); +} + + +/** + * @brief Test if the element is null. + */ +template <class T> +inline +CachedUniquePtrT<T>::operator bool() const +{ + return get() != nullptr; +} + + +/** + * @brief Transfer ownership from the element: return the current value as a + * unique_ptr, leaving the element null. + */ +template <class T> +inline +std::unique_ptr<T> +CachedUniquePtrT<T>::release() +{ + T* old = m_ptr.exchange (nullptr); + return std::unique_ptr<T> (old); +} + + +} // namespace CxxUtils diff --git a/Control/CxxUtils/share/CachedUniquePtr_test.ref b/Control/CxxUtils/share/CachedUniquePtr_test.ref new file mode 100644 index 0000000000000000000000000000000000000000..f0c0fd55135d7b4ad32733a58f0c8e26d11d9799 --- /dev/null +++ b/Control/CxxUtils/share/CachedUniquePtr_test.ref @@ -0,0 +1,3 @@ +CachedUniquePtr_test +test1 +test2 diff --git a/Control/CxxUtils/share/ubsan.supp b/Control/CxxUtils/share/ubsan.supp index 77dc9ed56a865116f1d1452d5a39f82ce5267520..e0ba8742c058c367d432764deccfbb5c5bd8d588 100644 --- a/Control/CxxUtils/share/ubsan.supp +++ b/Control/CxxUtils/share/ubsan.supp @@ -9,3 +9,6 @@ vptr_check:PrepRawDataCollection # Suppress false positives caused by ToolHandle calls from code # generated by cling. vptr_check:ToolHandle + +# Suppress downcast warnings from boost::any. +vptr_check:holder diff --git a/Control/CxxUtils/test/CachedUniquePtr_test.cxx b/Control/CxxUtils/test/CachedUniquePtr_test.cxx new file mode 100644 index 0000000000000000000000000000000000000000..d47894580230d9628af460116af808c9d59510d7 --- /dev/null +++ b/Control/CxxUtils/test/CachedUniquePtr_test.cxx @@ -0,0 +1,195 @@ +/* + * Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration. + */ + +// $Id$ +/** + * @file CxxUtils/test/CachedUniquePtr_test.cxx + * @author scott snyder <snyder@bnl.gov> + * @date mar, 2019 + * @brief Unit tests for CachedUniquePtr + */ + + +#undef NDEBUG +#include "CxxUtils/CachedUniquePtr.h" +#include <atomic> +#include <iostream> +#include <cassert> +#include <thread> +#include <shared_mutex> + + +struct P +{ + P(int x) : m_x(x) { ++s_count; } + ~P() { --s_count; } + + int m_x; + static std::atomic<int> s_count; +}; + +std::atomic<int> P::s_count = 0; + + +// Basic tests. +void test1() +{ + std::cout << "test1\n"; + //int x1 = 0; + //int x2 = 0; + //int x4 = 0; + + CxxUtils::CachedUniquePtr<P> cp1; + assert (!cp1.get()); + assert (!cp1); + assert (P::s_count == 0); + cp1.store (std::make_unique<P>(1)); + assert (P::s_count == 1); + assert (cp1.get()->m_x == 1); + assert (cp1); + assert (cp1->m_x == 1); + assert ((*cp1).m_x == 1); + cp1.store (nullptr); + assert (!cp1.get()); + assert (P::s_count == 0); + + CxxUtils::CachedUniquePtr<P> cp2 (std::make_unique<P>(2)); + assert (cp2->m_x == 2); + assert (P::s_count == 1); + + cp1 = std::move(cp2); + assert (cp1->m_x == 2); + assert (!cp2); + assert (P::s_count == 1); + + { + const CxxUtils::CachedUniquePtr<P> cp3 (std::move (cp1)); + assert (cp3->m_x == 2); + assert (!cp1); + assert (P::s_count == 1); + } + assert (P::s_count == 0); + + cp1.set (std::make_unique<P>(3)); + assert (cp1->m_x == 3); + assert (P::s_count == 1); + + cp1.set (std::make_unique<P>(4)); + assert (cp1->m_x == 3); + assert (P::s_count == 1); + + std::unique_ptr<const P> up = cp1.release(); + assert (!cp1); + assert (up->m_x == 3); + assert (P::s_count == 1); +} + + +class ThreadingTest +{ +public: + static const int NVAL = 10; + CxxUtils::CachedUniquePtr<P> m_vals[10]; + std::shared_timed_mutex m_sm; + int m_x[NVAL] = {0}; + + void threadedTest(); + + struct writerThread + { + writerThread (ThreadingTest& test, int iworker) + : m_test (test), m_iworker (iworker) {} + void operator()(); + ThreadingTest& m_test; + int m_iworker; + }; + + + struct readerThread + { + readerThread (ThreadingTest& test, int iworker) + : m_test (test), m_iworker (iworker) {} + void operator()(); + ThreadingTest& m_test; + int m_iworker; + }; +}; + + +void ThreadingTest::writerThread::operator()() +{ + int i = m_iworker; + do { + m_test.m_vals[i].set (std::make_unique<const P>(i)); + i++; + if (i >= NVAL) i = 0; + } while (i != m_iworker); +} + + +void ThreadingTest::readerThread::operator()() +{ + bool checked[NVAL] = {false}; + int nchecked = 0; + while (nchecked < NVAL) { + int i = m_iworker; + do { + if (!checked[i] && m_test.m_vals[i]) { + assert (m_test.m_vals[i]->m_x == i); + checked[i] = true; + ++nchecked; + } + i++; + if (i >= NVAL) i = 0; + } while (i != m_iworker); + } +} + + +void ThreadingTest::threadedTest() +{ + for (int i=0; i < NVAL; i++) { + m_vals[i].store (nullptr); + } + + const int nthread = 10; + std::thread threads[nthread]; + m_sm.lock(); + + for (int i=0; i < nthread; i++) { + if (i < 3) { + threads[i] = std::thread (writerThread (*this, i)); + } + else { + threads[i] = std::thread (readerThread (*this, i)); + } + } + + // Try to get the threads starting as much at the same time as possible. + m_sm.unlock(); + for (int i=0; i < nthread; i++) + threads[i].join(); +} + + +// Threading test. +void test2() +{ + std::cout << "test2\n"; + + ThreadingTest test; +#if 0 + for (int i=0; i < 20; i++) + test.threadedTest(); +#endif +} + + +int main() +{ + std::cout << "CachedUniquePtr_test\n"; + test1(); + test2(); + return 0; +} diff --git a/Control/CxxUtils/test/ConcurrentBitset_test.cxx b/Control/CxxUtils/test/ConcurrentBitset_test.cxx index 3b5e985a608f6be69c7eb8fd297bec5f273fe312..8590fc000c5bc31073c7bab2d378de921e804328 100644 --- a/Control/CxxUtils/test/ConcurrentBitset_test.cxx +++ b/Control/CxxUtils/test/ConcurrentBitset_test.cxx @@ -17,14 +17,14 @@ #include "CxxUtils/ConcurrentBitset.h" #include "CxxUtils/checker_macros.h" #include "TestTools/random.h" -// Work around a warning in tbb, found by gcc8. -// Fixed in TBB 2018 U5. -#if defined(__GNUC__) && __GNUC__ >= 8 +// tbb/machine/gcc_generic.h has spurious trailing semicolons after +// the clz() functiosn (as of TBB 2019 U1). +#if defined(__GNUC__) # pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wclass-memaccess" +# pragma GCC diagnostic ignored "-Wpedantic" #endif #include "tbb/concurrent_unordered_set.h" -#if defined(__GNUC__) && __GNUC__ >= 8 +#if defined(__GNUC__) # pragma GCC diagnostic pop #endif #include "boost/timer/timer.hpp" diff --git a/Control/DataModelTest/DataModelRunTests/CMakeLists.txt b/Control/DataModelTest/DataModelRunTests/CMakeLists.txt index 5ca21f23ced80636a14402957aa492f1a0cf7e1f..47d1fa11d17978a44cd9b19ed8a25491b50a46f0 100644 --- a/Control/DataModelTest/DataModelRunTests/CMakeLists.txt +++ b/Control/DataModelTest/DataModelRunTests/CMakeLists.txt @@ -56,16 +56,12 @@ datamodel_run_test (xAODTestRead DEPENDS xAODTestWrite) #i:xaoddata.root o:xaodd datamodel_run_test (xAODTestRead2 DEPENDS xAODTestRead) #i:xaoddata2.root o:xaoddata2x.root datamodel_run_test (xAODTestTypelessRead DEPENDS xAODTestWrite) datamodel_run_test (xAODTestRead3 DEPENDS xAODTestTypelessRead) -datamodel_run_test (xAODTestReadRename DEPENDS xaAODTestWrite) +datamodel_run_test (xAODTestReadRename DEPENDS xAODTestWrite) datamodel_run_test (xAODTestReadRenameMT COMMAND "athena.py --thread=1" DEPENDS xAODTestWrite) datamodel_run_test (xAODTestReadFilter DEPENDS xAODTestWrite) datamodel_run_test (xAODTestReadFilterRead DEPENDS xAODTestReadFilter) -datamodel_run_test (xAODTestReadARA - COMMAND python - ARG ${CMAKE_CURRENT_SOURCE_DIR}/share/xAODTestReadARA_t.py - DEPENDS xAODTestWrite) datamodel_run_test (xAODRootTestRead COMMAND python ARG ${CMAKE_CURRENT_SOURCE_DIR}/share/xAODRootTestRead_t.py @@ -145,9 +141,6 @@ datamodel_run_test (CondReadWrite) # xAODTestReadFilterRead # reads xaoddata_filt.root # -# xAODTestReadARA -# reads xaoddata.root -# # xAODRootTestRead # reads xaoddata.root # writes xaodroot.root diff --git a/Control/DataModelTest/DataModelRunTests/share/xAODTestReadARA_t.py b/Control/DataModelTest/DataModelRunTests/share/xAODTestReadARA_t.py deleted file mode 100644 index db0704d15668a9526f1e75d644e71b4e8199d70e..0000000000000000000000000000000000000000 --- a/Control/DataModelTest/DataModelRunTests/share/xAODTestReadARA_t.py +++ /dev/null @@ -1,40 +0,0 @@ -from __future__ import print_function -import ROOT -import cppyy -import AthenaROOTAccess.transientTree - -cppyy.loadDictionary("libDataModelTestDataCommonDict") -cppyy.loadDictionary("libDataModelTestDataReadDict") -ROOT.DMTest.B -ROOT.DMTest.setPluginLibrary ('_PERS_DMTest::HAuxContainer_v1', - 'libDataModelTestDataReadCnvPoolCnv.so') -ROOT.DMTest.setPluginLibrary ('_PERS_DMTest::HVec_v1', - 'libDataModelTestDataReadCnvPoolCnv.so') -ROOT.DMTest.setPluginLibrary ('_PERS_DMTest__HAuxContainer_v1', - 'libDataModelTestDataReadCnvPoolCnv.so') -ROOT.DMTest.setPluginLibrary ('_PERS_DataVector<DMTest::H_v1>', - 'libDataModelTestDataReadCnvPoolCnv.so') - -f = ROOT.TFile.Open ('xaoddata.root') -assert f.IsOpen() - - -from AthenaCommon.Include import Include -include = Include(show = False) -include('DataModelRunTests/xAODRootTest.py') - - -tt = AthenaROOTAccess.transientTree.makeTree(f) -reader = xAODTestRead() -for i in range(tt.GetEntries()): - tt.GetEntry(i) - print ('\nEntry', i) - reader.execute(tt) - print ('gvec') - vec = getattr (tt, 'gvec') - for g in vec: - dump_auxdata (g) - print('') - print() - - diff --git a/Control/DataModelTest/DataModelRunTests/test/post.sh b/Control/DataModelTest/DataModelRunTests/test/post.sh index 7c177930a9fa98efcaa673c25523c23d0a231815..cc91e52a5e29546440861a9ef1ed38dd89dfd776 100755 --- a/Control/DataModelTest/DataModelRunTests/test/post.sh +++ b/Control/DataModelTest/DataModelRunTests/test/post.sh @@ -183,6 +183,7 @@ PP="$PP"'|^GUID: Class|^AthenaRootStr.* INFO|^Warning in .* found in .* is alrea PP="$PP"'|no dictionary for class|INFO eformat version|INFO event storage' PP="$PP"'|^RootDatabase.open *I[nN][fF][oO]' PP="$PP"'|Unable to locate catalog' +PP="$PP"'|CLIDRegistry entries for module' # StoreGate INFO messages changed to VERBOSE PP="$PP"'|^(StoreGateSvc|DetectorStore|MetaDataStore|InputMetaDataStore|TagMetaDataStore) +(INFO|VERBOSE) (Stop|stop|Start)' @@ -225,6 +226,7 @@ PP="$PP"'|INFO Found MetaDataTools' PP="$PP"'|INFO AthenaOutputStream' PP="$PP"'|^DbSession.*INFO' PP="$PP"'|^IOVDb(Svc|Folder).*INFO (Folder|Connection|Total payload|.*bytes in)' +PP="$PP"'|Resolved path' # xAODMaker::EventInfoCnvAlg PP="$PP"'|^xAODMaker::Even.*(WARNING|INFO)' diff --git a/Control/PileUpComps/CMakeLists.txt b/Control/PileUpComps/CMakeLists.txt index 0447977975ae4d11ff038be44197cb0b6af768d4..18d80ceba95eac0a698a3a1ff458fe904cb988ac 100644 --- a/Control/PileUpComps/CMakeLists.txt +++ b/Control/PileUpComps/CMakeLists.txt @@ -15,7 +15,6 @@ atlas_depends_on_subdirs( PRIVATE Event/EventInfoUtils Event/xAOD/xAODEventInfo Event/xAOD/xAODCnvInterfaces - Event/xAOD/xAODEventInfoCnv GaudiKernel ) # External dependencies: @@ -30,6 +29,6 @@ atlas_add_component( PileUpComps LINK_LIBRARIES ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} AthenaBaseComps AthenaKernel PileUpToolsLib StoreGateLib SGtests EventInfo - EventInfoUtils xAODEventInfo xAODEventInfoCnv GaudiKernel ) + EventInfoUtils xAODEventInfo GaudiKernel ) diff --git a/Control/PileUpTools/PileUpTools/PileUpMergeSvc.icc b/Control/PileUpTools/PileUpTools/PileUpMergeSvc.icc index 4da2d1a66afc9085f01f701fc7e8ac92a46dedd5..2346a7cd8a1676932c05455d15c9093bd92fe976 100755 --- a/Control/PileUpTools/PileUpTools/PileUpMergeSvc.icc +++ b/Control/PileUpTools/PileUpTools/PileUpMergeSvc.icc @@ -29,6 +29,33 @@ namespace { template <class DATALINK> void fillLink(DATALINK&, const NoKey&, IProxyDict*) { /*leave it in default state*/ } + + PileUpTimeEventIndex::PileUpType getOldPileUpType(const xAOD::EventInfo_v1::PileUpType &newType) { + PileUpTimeEventIndex::PileUpType oldType = PileUpTimeEventIndex::Unknown; + switch(newType) { + case xAOD::EventInfo_v1::Signal : + oldType = PileUpTimeEventIndex::Signal; + break; + case xAOD::EventInfo_v1::MinimumBias: + oldType = PileUpTimeEventIndex::MinimumBias; + break; + case xAOD::EventInfo_v1::Cavern: + oldType = PileUpTimeEventIndex::Cavern; + break; + case xAOD::EventInfo_v1::HaloGas: + oldType = PileUpTimeEventIndex::HaloGas; + break; + case xAOD::EventInfo_v1::HighPtMinimumBias: + oldType = PileUpTimeEventIndex::HighPtMinimumBias; + break; + case xAOD::EventInfo_v1::ZeroBias: + oldType = PileUpTimeEventIndex::ZeroBias; + break; + default: + break; + } + return oldType; + } } ///retrieve keyed DATA obj for the original event @@ -87,7 +114,7 @@ PileUpMergeSvc::retrieveSubEvtsData(const KEY& dataKey, //orig evt key if (!m_pITriggerTime.empty()) sigTime-= m_pITriggerTime->time(); evtIndex = subEv.index(); } - value_type tData(PileUpTimeEventIndex(int(sigTime),evtIndex), dLink); + value_type tData(PileUpTimeEventIndex(int(sigTime),evtIndex,getOldPileUpType(subEv.type())), dLink); numberOfSimHits+=tData.second->size(); timedData.push_back(tData); ATH_MSG_DEBUG ( "added entry from store " << pSubEvtSG->name() @@ -237,7 +264,7 @@ PileUpMergeSvc::retrieveSubEvtsData(const KEY& dataKey, //orig evt key if (!m_pITriggerTime.empty()) sigTime-= m_pITriggerTime->time(); evtIndex = subEv.index(); } - value_type tData(PileUpTimeEventIndex(int(sigTime),evtIndex), dLink); + value_type tData(PileUpTimeEventIndex(int(sigTime),evtIndex,getOldPileUpType(subEv.type())), dLink); timedData.push_back(tData); ATH_MSG_DEBUG ( "added entry from store " << pSubEvtSG->name() << " for object of type " << System::typeinfoName(typeid(data_t)) diff --git a/Control/PileUpTools/PileUpTools/PileUpTypeHelper.h b/Control/PileUpTools/PileUpTools/PileUpTypeHelper.h new file mode 100644 index 0000000000000000000000000000000000000000..68b231054d5942739b8f75cdf301a3ec2b971eb8 --- /dev/null +++ b/Control/PileUpTools/PileUpTools/PileUpTypeHelper.h @@ -0,0 +1,36 @@ +#ifndef PILEUPTOOLS_PILEUPTYPEHELPER_H +#define PILEUPTOOLS_PILEUPTYPEHELPER_H + +#include "EventInfo/PileUpEventInfo.h" +#include "xAODEventInfo/EventInfo.h" +#include <map> + +namespace { + PileUpEventInfo::SubEvent::pileup_type pileupTypeMapper(xAOD::EventInfo::PileUpType inType) { + + // A map translating between the AOD and xAOD pileup event types: + static std::map< xAOD::EventInfo::PileUpType, + PileUpEventInfo::SubEvent::pileup_type > pileupTypeMap; + if( ! pileupTypeMap.size() ) { +#define DECLARE_SE_TYPE( TYPE ) \ + pileupTypeMap[ xAOD::EventInfo::TYPE ] = PileUpEventInfo::SubEvent::pileup_type::TYPE + + DECLARE_SE_TYPE( Unknown ); + DECLARE_SE_TYPE( Signal ); + DECLARE_SE_TYPE( MinimumBias ); + DECLARE_SE_TYPE( Cavern ); + DECLARE_SE_TYPE( HaloGas ); + DECLARE_SE_TYPE( HighPtMinimumBias ); + DECLARE_SE_TYPE( ZeroBias ); +#undef DECLARE_SE_TYPE + } + // And now add a sub-event to the temporary list: + auto typeItr = pileupTypeMap.find( inType ); + PileUpEventInfo::SubEvent::pileup_type type = PileUpEventInfo::SubEvent::pileup_type::Unknown; + if( typeItr != pileupTypeMap.end() ) { + type = typeItr->second; + } + return type; + } +} +#endif //PILEUPTOOLS_PILEUPTYPEHELPER_H diff --git a/DataQuality/DQDefects/test/DQDefects_test.sh b/DataQuality/DQDefects/test/DQDefects_test.sh index c536ff179b0bc1e4c2ade3b9edd8168eff9dac00..b5225956c2595a549d91b089553149cab262eae8 100755 --- a/DataQuality/DQDefects/test/DQDefects_test.sh +++ b/DataQuality/DQDefects/test/DQDefects_test.sh @@ -1,3 +1,4 @@ #!/bin/bash -nosetests -v DQDefects \ No newline at end of file +NOSEPATH=`python -c 'import nose; f=nose.__file__; i=f.find("/lib/"); print f[0:i]'` +$NOSEPATH/bin/nosetests -v DQDefects \ No newline at end of file diff --git a/DataQuality/DataQualityTools/DataQualityTools/DQTNonCollBkg_ZDC.h b/DataQuality/DataQualityTools/DataQualityTools/DQTNonCollBkg_ZDC.h index 01b593516219b7fffd3a0af1796bb023a27974d7..2f0222d474ee0f4ad21d3cb466c9e127773117cd 100644 --- a/DataQuality/DataQualityTools/DataQualityTools/DQTNonCollBkg_ZDC.h +++ b/DataQuality/DataQualityTools/DataQualityTools/DQTNonCollBkg_ZDC.h @@ -68,11 +68,6 @@ #include "GaudiKernel/ITHistSvc.h" #include "GaudiKernel/ToolHandle.h" -/* -#include "EventInfo/EventInfo.h" -#include "EventInfo/EventID.h" -#include "EventInfo/TriggerInfo.h" -*/ #include "TrigDecisionTool/TrigDecisionTool.h" #include "ZdcIdentifier/ZdcID.h" diff --git a/Database/APR/RootStorageSvc/src/RootTreeIndexContainer.cpp b/Database/APR/RootStorageSvc/src/RootTreeIndexContainer.cpp index dedcc116ab9074d7cb07386f4023b1e0f0f0032f..e8ddfc328571736faf26dbbc0aaeb92874877ff8 100644 --- a/Database/APR/RootStorageSvc/src/RootTreeIndexContainer.cpp +++ b/Database/APR/RootStorageSvc/src/RootTreeIndexContainer.cpp @@ -56,7 +56,7 @@ DbStatus RootTreeIndexContainer::writeObject(TransactionStack::value_type& ent) if (m_index_ref != nullptr && s >= m_index_ref->GetEntries()) { *m_index = this->nextRecordId(); m_index_ref->SetAddress(m_index); - if (this->isBranchContainer()) m_index_ref->Fill(); + if( isBranchContainer() && !m_treeFillMode ) m_index_ref->Fill(); } if( isBranchContainer() && !m_treeFillMode ) m_tree->SetEntries(s); DbStatus status = RootTreeContainer::writeObject(ent); diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/CMakeLists.txt b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/CMakeLists.txt index 5e26a1e8edd5a082c42804ce218a27406c5bed2c..853aefdb5d3dc0bdeb7accddf32ca6150fc0b299 100644 --- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/CMakeLists.txt +++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/CMakeLists.txt @@ -72,7 +72,7 @@ function( _add_test testName toExecute ) endfunction( _add_test ) # Test(s) in the package: -# Write 'Hits', with multistreamand TAGs +# Write 'Hits', with multistreamand _add_test( AthenaPoolExample_Write "athena.py AthenaPoolExampleAlgorithms/AthenaPoolExample_WriteJobOptions.py" EXTRA_PATTERNS "Warning in <TFile::Init>: no StreamerInfo found|BYTES_READ|READ_CALLS|DEBUG lookupPFN|DEBUG registered PFN|XMLCatalog +INFO|Found address:" @@ -102,26 +102,16 @@ _add_test( AthenaPoolExample_ReWriteNext "athena.py AthenaPoolExampleAlgorithms/AthenaPoolExample_ReWriteNextJobOptions.py" DEPENDS AthenaPoolExampleAlgorithms_AthenaPoolExample_ReWriteAgain_ctest EXTRA_PATTERNS "Warning in <TFile::Init>: no StreamerInfo found|BYTES_READ|READ_CALLS|DEBUG lookupPFN|DEBUG registered PFN|XMLCatalog +INFO|Found address:" ) -# Read via TAGs and use query to filter events -_add_test( AthenaPoolExample_Filter - "athena.py AthenaPoolExampleAlgorithms/AthenaPoolExample_FilterJobOptions.py" - DEPENDS AthenaPoolExampleAlgorithms_AthenaPoolExample_ReWriteNext_ctest - EXTRA_PATTERNS "Warning in <TFile::Init>: no StreamerInfo found|BYTES_READ|READ_CALLS|DEBUG lookupPFN|DEBUG registered PFN|XMLCatalog +INFO|Found address:" ) -_add_test( AthenaPoolExample_RFilter - "athena.py AthenaPoolExampleAlgorithms/AthenaPoolExample_RFilterJobOptions.py" - DEPENDS AthenaPoolExampleAlgorithms_AthenaPoolExample_Filter_ctest - EXTRA_PATTERNS "Warning in <TFile::Init>: no StreamerInfo found|BYTES_READ|READ_CALLS|DEBUG lookupPFN|DEBUG registered PFN|XMLCatalog +INFO|Found address:" ) -# Read all (including bad files, skipped for now expected failure) +# Read all _add_test( AthenaPoolExample_ReadAgain "athena.py AthenaPoolExampleAlgorithms/AthenaPoolExample_ReadAgainJobOptions.py" - DEPENDS AthenaPoolExampleAlgorithms_AthenaPoolExample_RFilter_ctest + DEPENDS AthenaPoolExampleAlgorithms_AthenaPoolExample_ReWriteNext_ctest EXTRA_PATTERNS "Warning in <TFile::Init>: no StreamerInfo found|BYTES_READ|READ_CALLS|DEBUG lookupPFN|DEBUG registered PFN|XMLCatalog +INFO|Found address:" ) # Concatenate jobs write 'Hits' and 'Tracks' to different streams _add_test( AthenaPoolExample_Concat "athena.py AthenaPoolExampleAlgorithms/AthenaPoolExample_ConcatJobOptions.py" - DEPENDS AthenaPoolExampleAlgorithms_AthenaPoolExample_RFilter_ctest - AthenaPoolExampleAlgorithms_AthenaPoolExample_ReadAgain_ctest + DEPENDS AthenaPoolExampleAlgorithms_AthenaPoolExample_ReadAgain_ctest EXTRA_PATTERNS "Warning in <TFile::Init>: no StreamerInfo found|BYTES_READ|READ_CALLS|DEBUG lookupPFN|DEBUG registered PFN|XMLCatalog +INFO|Found address:" PRE_EXEC test/pre_check.sh ) _add_test( AthenaPoolExample_ReadConcat diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Concat.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Concat.ref index 2c8a05fd7e166114e1f85161d781236249dff98f..fc45b15a66694f8bad7fec4cccfcf206bf9a6668 100644 --- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Concat.ref +++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Concat.ref @@ -1,12 +1,11 @@ -Warning in <TInterpreter::ReadRootmapFile>: class InDet::IInDetTrackSelectionTool found in libInDetTrackSelectionToolDict.so is already in libInDetSecVtxTrackSelectionToolDict.so -Mon Feb 18 13:00:57 CST 2019 +Wed Mar 6 20:40:23 CET 2019 Preloading tcmalloc_minimal.so Athena INFO including file "AthenaCommon/Preparation.py" Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" Athena INFO executing ROOT6Setup Athena INFO including file "AthenaCommon/Execution.py" Athena INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_ConcatJobOptions.py" -Py:ConfigurableDb INFO Read module info for 5458 configurables from 155 genConfDb files +Py:ConfigurableDb INFO Read module info for 5461 configurables from 48 genConfDb files Py:ConfigurableDb INFO No duplicates have been found: that's good ! Athena INFO including file "AthenaCommon/runbatch.py" ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 @@ -14,19 +13,19 @@ ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to leve ApplicationMgr SUCCESS ==================================================================================================================================== Welcome to ApplicationMgr (GaudiCoreSvc v31r0) - running on hepd-0004 on Mon Feb 18 13:01:03 2019 + running on lxplus084.cern.ch on Wed Mar 6 20:40:34 2019 ==================================================================================================================================== -ApplicationMgr INFO Successfully loaded modules : AthenaServices ApplicationMgr INFO Application Manager Configured successfully ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 StatusCodeSvc INFO initialize AthDictLoaderSvc INFO in initialize... AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO getRegistryEntries: read 3045 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 3167 CLIDRegistry entries for module ALL CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00 ClassIDSvc INFO getRegistryEntries: read 770 CLIDRegistry entries for module ALL ClassIDSvc INFO getRegistryEntries: read 571 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 345 CLIDRegistry entries for module ALL xAODMaker::Even... INFO Initializing - Package version: xAODEventInfoCnv-00-00-00 xAODMaker::Even... INFO Initializing - Package version: xAODEventInfoCnv-00-00-00 MetaDataSvc INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00 @@ -37,9 +36,9 @@ PoolSvc DEBUG Service base class initialized successfully PoolSvc INFO io_register[PoolSvc](xmlcatalog_file:Catalog1.xml) [ok] PoolSvc INFO Set connectionsvc retry/timeout/IDLE timeout to 'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled PoolSvc INFO Frontier compression level set to 5 -DBReplicaSvc INFO Frontier server at (serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://frontier-atlas.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /home/gemmeren/workarea/build/x86_64-centos7-gcc8-opt/share/dbreplica.config -DBReplicaSvc INFO Total of 1 servers found for host hepd-0004.lcrc.anl.gov [ATLF ] +DBReplicaSvc INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data +DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-05T2139/Athena/22.0.1/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config +DBReplicaSvc INFO Total of 10 servers found for host lxplus084.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] PoolSvc INFO Successfully setup replica sorting algorithm PoolSvc DEBUG OutputLevel is PoolSvc INFO Setting up APR FileCatalog and Streams @@ -66,7 +65,6 @@ ReWriteData DEBUG output handles: 1 ReWriteData DEBUG Data Deps for ReWriteData + INPUT ( 'ExampleHitContainer' , 'StoreGateSvc+MyHits' ) + OUTPUT ( 'ExampleTrackContainer' , 'StoreGateSvc+MyTracks' ) -ClassIDSvc INFO getRegistryEntries: read 396 CLIDRegistry entries for module ALL Stream1 DEBUG Property update for OutputLevel : new value = 2 Stream1.Stream1... DEBUG Property update for OutputLevel : new value = 2 Stream1 DEBUG In initialize @@ -92,7 +90,7 @@ Stream1 DEBUG Registering all Tools in ToolHandleArray HelperTools Stream1 DEBUG Adding private ToolHandle tool Stream1.Stream1_MakeEventStreamInfo (MakeEventStreamInfo) from ToolHandleArray HelperTools Stream1 DEBUG Adding private ToolHandle tool Stream1.Stream1Tool (AthenaOutputStreamTool) Stream1 DEBUG Data Deps for Stream1 - + INPUT IGNORED ( 'AthenaAttributeList' , '' ) + + INPUT ( 'AthenaAttributeList' , 'StoreGateSvc+SimpleTag' ) MakeInputDataHe... INFO Initializing MakeInputDataHeader - package version OutputStreamAthenaPool-00-00-00 MakeInputDataHe... INFO Name of Stream to be made Input: Stream1 Stream2 DEBUG Property update for OutputLevel : new value = 2 @@ -191,7 +189,11 @@ Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"My*") called Stream1 DEBUG Key:My* Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 1 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 1 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 1 StorageSvc INFO Building shape according to reflection information using shape ID for: @@ -242,6 +244,122 @@ SimplePoolFile1... DEBUG ---->ClassID:???? SimplePoolFile1... DEBUG --->Adding Shape[3 , ????]: [1 Column(s)] SimplePoolFile1... DEBUG ---->Class:DataHeader_p5 SimplePoolFile1... DEBUG ---->[0]:DataHeader_p5 Typ:DataHeader_p5 [21] Size:0 Offset:0 #Elements:1 +StorageSvc INFO Building shape according to reflection information using shape ID for: +StorageSvc INFO Token [????] +SimplePoolFile1... DEBUG --> Access DbContainer CREA/UPDA [ROOT_Tree] POOLCollectionTree(Token) +POOLCollectionT... DEBUG Opening +POOLCollectionT... DEBUG attributes# = 1 +POOLCollectionT... DEBUG Branch container 'Token' +POOLCollectionT... DEBUG Opened container POOLCollectionTree(Token) of type ROOT_Tree +SimplePoolFile1... DEBUG --->Adding Assoc :????/POOLCollectionTree(Token) [20?] (7 , ffffffff) +SimplePoolFile1... DEBUG ---->ClassID:???? +SimplePoolFile1... DEBUG --->Adding Shape[4 , ????]: [1 Column(s)] +SimplePoolFile1... DEBUG ---->Class:Token +SimplePoolFile1... DEBUG ---->[0]:Token Typ:Token [18] Size:0 Offset:0 #Elements:1 +StorageSvc INFO Building shape according to reflection information using shape ID for: +StorageSvc INFO bool [????] +SimplePoolFile1... DEBUG --> Access DbContainer CREA/UPDA [ROOT_Tree] POOLCollectionTree(IsSimulation) +POOLCollectionT... DEBUG Opening +POOLCollectionT... DEBUG attributes# = 1 +POOLCollectionT... DEBUG Branch container 'IsSimulation' +POOLCollectionT... DEBUG Opened container POOLCollectionTree(IsSimulation) of type ROOT_Tree +SimplePoolFile1... DEBUG --->Adding Assoc :????/POOLCollectionTree(IsSimulation) [20?] (8 , ffffffff) +SimplePoolFile1... DEBUG ---->ClassID:???? +SimplePoolFile1... DEBUG --->Adding Shape[5 , ????]: [1 Column(s)] +SimplePoolFile1... DEBUG ---->Class:bool +SimplePoolFile1... DEBUG ---->[0]:bool Typ:bool [9] Size:0 Offset:0 #Elements:1 +SimplePoolFile1... DEBUG --> Access DbContainer CREA/UPDA [ROOT_Tree] POOLCollectionTree(IsCalibration) +POOLCollectionT... DEBUG Opening +POOLCollectionT... DEBUG attributes# = 1 +POOLCollectionT... DEBUG Branch container 'IsCalibration' +POOLCollectionT... DEBUG Opened container POOLCollectionTree(IsCalibration) of type ROOT_Tree +SimplePoolFile1... DEBUG --->Adding Assoc :????/POOLCollectionTree(IsCalibration) [20?] (9 , ffffffff) +SimplePoolFile1... DEBUG ---->ClassID:???? +SimplePoolFile1... DEBUG --> Access DbContainer CREA/UPDA [ROOT_Tree] POOLCollectionTree(IsTestBeam) +POOLCollectionT... DEBUG Opening +POOLCollectionT... DEBUG attributes# = 1 +POOLCollectionT... DEBUG Branch container 'IsTestBeam' +POOLCollectionT... DEBUG Opened container POOLCollectionTree(IsTestBeam) of type ROOT_Tree +SimplePoolFile1... DEBUG --->Adding Assoc :????/POOLCollectionTree(IsTestBeam) [20?] (a , ffffffff) +SimplePoolFile1... DEBUG ---->ClassID:???? +StorageSvc INFO Building shape according to reflection information using shape ID for: +StorageSvc INFO unsigned int [????] +SimplePoolFile1... DEBUG --> Access DbContainer CREA/UPDA [ROOT_Tree] POOLCollectionTree(McChannel) +POOLCollectionT... DEBUG Opening +POOLCollectionT... DEBUG attributes# = 1 +POOLCollectionT... DEBUG Branch container 'McChannel' +POOLCollectionT... DEBUG Opened container POOLCollectionTree(McChannel) of type ROOT_Tree +SimplePoolFile1... DEBUG --->Adding Assoc :????/POOLCollectionTree(McChannel) [20?] (b , ffffffff) +SimplePoolFile1... DEBUG ---->ClassID:???? +SimplePoolFile1... DEBUG --->Adding Shape[6 , ????]: [1 Column(s)] +SimplePoolFile1... DEBUG ---->Class:unsigned int +SimplePoolFile1... DEBUG ---->[0]:unsigned int Typ:unsigned int [3] Size:0 Offset:0 #Elements:1 +SimplePoolFile1... DEBUG --> Access DbContainer CREA/UPDA [ROOT_Tree] POOLCollectionTree(RunNumber) +POOLCollectionT... DEBUG Opening +POOLCollectionT... DEBUG attributes# = 1 +POOLCollectionT... DEBUG Branch container 'RunNumber' +POOLCollectionT... DEBUG Opened container POOLCollectionTree(RunNumber) of type ROOT_Tree +SimplePoolFile1... DEBUG --->Adding Assoc :????/POOLCollectionTree(RunNumber) [20?] (c , ffffffff) +SimplePoolFile1... DEBUG ---->ClassID:???? +StorageSvc INFO Building shape according to reflection information using shape ID for: +StorageSvc INFO unsigned long long [????] +SimplePoolFile1... DEBUG --> Access DbContainer CREA/UPDA [ROOT_Tree] POOLCollectionTree(EventNumber) +POOLCollectionT... DEBUG Opening +POOLCollectionT... DEBUG attributes# = 1 +POOLCollectionT... DEBUG Branch container 'EventNumber' +POOLCollectionT... DEBUG Opened container POOLCollectionTree(EventNumber) of type ROOT_Tree +SimplePoolFile1... DEBUG --->Adding Assoc :????/POOLCollectionTree(EventNumber) [20?] (d , ffffffff) +SimplePoolFile1... DEBUG ---->ClassID:???? +SimplePoolFile1... DEBUG --->Adding Shape[7 , ????]: [1 Column(s)] +SimplePoolFile1... DEBUG ---->Class:unsigned long long +SimplePoolFile1... DEBUG ---->[0]:unsigned long long Typ:unsigned long long [23] Size:0 Offset:0 #Elements:1 +SimplePoolFile1... DEBUG --> Access DbContainer CREA/UPDA [ROOT_Tree] POOLCollectionTree(LumiBlockN) +POOLCollectionT... DEBUG Opening +POOLCollectionT... DEBUG attributes# = 1 +POOLCollectionT... DEBUG Branch container 'LumiBlockN' +POOLCollectionT... DEBUG Opened container POOLCollectionTree(LumiBlockN) of type ROOT_Tree +SimplePoolFile1... DEBUG --->Adding Assoc :????/POOLCollectionTree(LumiBlockN) [20?] (e , ffffffff) +SimplePoolFile1... DEBUG ---->ClassID:???? +SimplePoolFile1... DEBUG --> Access DbContainer CREA/UPDA [ROOT_Tree] POOLCollectionTree(ConditionsRun) +POOLCollectionT... DEBUG Opening +POOLCollectionT... DEBUG attributes# = 1 +POOLCollectionT... DEBUG Branch container 'ConditionsRun' +POOLCollectionT... DEBUG Opened container POOLCollectionTree(ConditionsRun) of type ROOT_Tree +SimplePoolFile1... DEBUG --->Adding Assoc :????/POOLCollectionTree(ConditionsRun) [20?] (f , ffffffff) +SimplePoolFile1... DEBUG ---->ClassID:???? +SimplePoolFile1... DEBUG --> Access DbContainer CREA/UPDA [ROOT_Tree] POOLCollectionTree(EventTime) +POOLCollectionT... DEBUG Opening +POOLCollectionT... DEBUG attributes# = 1 +POOLCollectionT... DEBUG Branch container 'EventTime' +POOLCollectionT... DEBUG Opened container POOLCollectionTree(EventTime) of type ROOT_Tree +SimplePoolFile1... DEBUG --->Adding Assoc :????/POOLCollectionTree(EventTime) [20?] (10 , ffffffff) +SimplePoolFile1... DEBUG ---->ClassID:???? +SimplePoolFile1... DEBUG --> Access DbContainer CREA/UPDA [ROOT_Tree] POOLCollectionTree(EventTimeNanoSec) +POOLCollectionT... DEBUG Opening +POOLCollectionT... DEBUG attributes# = 1 +POOLCollectionT... DEBUG Branch container 'EventTimeNanoSec' +POOLCollectionT... DEBUG Opened container POOLCollectionTree(EventTimeNanoSec) of type ROOT_Tree +SimplePoolFile1... DEBUG --->Adding Assoc :????/POOLCollectionTree(EventTimeNanoSec) [20?] (11 , ffffffff) +SimplePoolFile1... DEBUG ---->ClassID:???? +SimplePoolFile1... DEBUG --> Access DbContainer CREA/UPDA [ROOT_Tree] POOLCollectionTree(BunchId) +POOLCollectionT... DEBUG Opening +POOLCollectionT... DEBUG attributes# = 1 +POOLCollectionT... DEBUG Branch container 'BunchId' +POOLCollectionT... DEBUG Opened container POOLCollectionTree(BunchId) of type ROOT_Tree +SimplePoolFile1... DEBUG --->Adding Assoc :????/POOLCollectionTree(BunchId) [20?] (12 , ffffffff) +SimplePoolFile1... DEBUG ---->ClassID:???? +StorageSvc INFO Building shape according to reflection information using shape ID for: +StorageSvc INFO float [????] +SimplePoolFile1... DEBUG --> Access DbContainer CREA/UPDA [ROOT_Tree] POOLCollectionTree(EventWeight) +POOLCollectionT... DEBUG Opening +POOLCollectionT... DEBUG attributes# = 1 +POOLCollectionT... DEBUG Branch container 'EventWeight' +POOLCollectionT... DEBUG Opened container POOLCollectionTree(EventWeight) of type ROOT_Tree +SimplePoolFile1... DEBUG --->Adding Assoc :????/POOLCollectionTree(EventWeight) [20?] (13 , ffffffff) +SimplePoolFile1... DEBUG ---->ClassID:???? +SimplePoolFile1... DEBUG --->Adding Shape[8 , ????]: [1 Column(s)] +SimplePoolFile1... DEBUG ---->Class:float +SimplePoolFile1... DEBUG ---->[0]:float Typ:float [10] Size:0 Offset:0 #Elements:1 AthenaPoolCnvSvc DEBUG setAttribute BRANCH_BASKET_SIZE to 256000 for db: SimplePoolFile1.root and cont: POOLContainer(DataHeader) AthenaPoolCnvSvc DEBUG setAttribute BRANCH_BASKET_SIZE to 1024000 for db: SimplePoolFile1.root and cont: POOLContainerForm(DataHeaderForm) PersistencySvc:... DEBUG lookupPFN: SimplePoolFile3.root returned FID: '????' tech=ROOT_All @@ -265,14 +383,18 @@ SimplePoolFile3... DEBUG --->Adding Assoc :????/##Params [200] (2 , ffffffff) SimplePoolFile3... DEBUG ---->ClassID:???? ##Params DEBUG No objects passing selection criteria... Container has 0 Entries in total. AthenaPoolCnvSvc DEBUG setAttribute CONTAINER_SPLITLEVEL to 99 for db: SimplePoolFile3.root and cont: TTree=POOLContainerForm(DataHeaderForm) -ClassIDSvc INFO getRegistryEntries: read 75 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 78 CLIDRegistry entries for module ALL Stream2 DEBUG addItemObjects(2101,"*") called Stream2 DEBUG Key:* Stream2 DEBUG Added object 2101,"McEventInfo" Stream2 DEBUG addItemObjects(9103,"*Tracks") called Stream2 DEBUG Key:*Tracks Stream2 DEBUG Added object 9103,"MyTracks" +Stream2 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream2 DEBUG Key:SimpleTag +Stream2 DEBUG Added object 40774348,"SimpleTag" Stream2 DEBUG Collected objects: +Stream2 DEBUG Object/count: AthenaAttributeList_SimpleTag, 1 Stream2 DEBUG Object/count: EventInfo_McEventInfo, 1 Stream2 DEBUG Object/count: ExampleTrackContainer_MyTracks, 1 SimplePoolFile3... DEBUG --> Access DbContainer CREA/UPDA [ROOT_Tree] CollectionTree(EventInfo_p4/McEventInfo) @@ -356,7 +478,11 @@ Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"My*") called Stream1 DEBUG Key:My* Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 2 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 2 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 2 Stream2 DEBUG addItemObjects(2101,"*") called @@ -365,7 +491,11 @@ Stream2 DEBUG Added object 2101,"McEventInfo" Stream2 DEBUG addItemObjects(9103,"*Tracks") called Stream2 DEBUG Key:*Tracks Stream2 DEBUG Added object 9103,"MyTracks" +Stream2 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream2 DEBUG Key:SimpleTag +Stream2 DEBUG Added object 40774348,"SimpleTag" Stream2 DEBUG Collected objects: +Stream2 DEBUG Object/count: AthenaAttributeList_SimpleTag, 2 Stream2 DEBUG Object/count: EventInfo_McEventInfo, 2 Stream2 DEBUG Object/count: ExampleTrackContainer_MyTracks, 2 AthenaEventLoopMgr INFO ===>>> done processing event #1, run #1 2 events processed so far <<<=== @@ -405,7 +535,11 @@ Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"My*") called Stream1 DEBUG Key:My* Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 3 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 3 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 3 Stream2 DEBUG addItemObjects(2101,"*") called @@ -414,7 +548,11 @@ Stream2 DEBUG Added object 2101,"McEventInfo" Stream2 DEBUG addItemObjects(9103,"*Tracks") called Stream2 DEBUG Key:*Tracks Stream2 DEBUG Added object 9103,"MyTracks" +Stream2 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream2 DEBUG Key:SimpleTag +Stream2 DEBUG Added object 40774348,"SimpleTag" Stream2 DEBUG Collected objects: +Stream2 DEBUG Object/count: AthenaAttributeList_SimpleTag, 3 Stream2 DEBUG Object/count: EventInfo_McEventInfo, 3 Stream2 DEBUG Object/count: ExampleTrackContainer_MyTracks, 3 AthenaEventLoopMgr INFO ===>>> done processing event #2, run #1 3 events processed so far <<<=== @@ -454,7 +592,11 @@ Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"My*") called Stream1 DEBUG Key:My* Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 4 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 4 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 4 Stream2 DEBUG addItemObjects(2101,"*") called @@ -463,7 +605,11 @@ Stream2 DEBUG Added object 2101,"McEventInfo" Stream2 DEBUG addItemObjects(9103,"*Tracks") called Stream2 DEBUG Key:*Tracks Stream2 DEBUG Added object 9103,"MyTracks" +Stream2 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream2 DEBUG Key:SimpleTag +Stream2 DEBUG Added object 40774348,"SimpleTag" Stream2 DEBUG Collected objects: +Stream2 DEBUG Object/count: AthenaAttributeList_SimpleTag, 4 Stream2 DEBUG Object/count: EventInfo_McEventInfo, 4 Stream2 DEBUG Object/count: ExampleTrackContainer_MyTracks, 4 AthenaEventLoopMgr INFO ===>>> done processing event #3, run #1 4 events processed so far <<<=== @@ -503,7 +649,11 @@ Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"My*") called Stream1 DEBUG Key:My* Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 5 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 5 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 5 Stream2 DEBUG addItemObjects(2101,"*") called @@ -512,7 +662,11 @@ Stream2 DEBUG Added object 2101,"McEventInfo" Stream2 DEBUG addItemObjects(9103,"*Tracks") called Stream2 DEBUG Key:*Tracks Stream2 DEBUG Added object 9103,"MyTracks" +Stream2 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream2 DEBUG Key:SimpleTag +Stream2 DEBUG Added object 40774348,"SimpleTag" Stream2 DEBUG Collected objects: +Stream2 DEBUG Object/count: AthenaAttributeList_SimpleTag, 5 Stream2 DEBUG Object/count: EventInfo_McEventInfo, 5 Stream2 DEBUG Object/count: ExampleTrackContainer_MyTracks, 5 AthenaEventLoopMgr INFO ===>>> done processing event #4, run #1 5 events processed so far <<<=== @@ -552,7 +706,11 @@ Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"My*") called Stream1 DEBUG Key:My* Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 6 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 6 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 6 Stream2 DEBUG addItemObjects(2101,"*") called @@ -561,7 +719,11 @@ Stream2 DEBUG Added object 2101,"McEventInfo" Stream2 DEBUG addItemObjects(9103,"*Tracks") called Stream2 DEBUG Key:*Tracks Stream2 DEBUG Added object 9103,"MyTracks" +Stream2 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream2 DEBUG Key:SimpleTag +Stream2 DEBUG Added object 40774348,"SimpleTag" Stream2 DEBUG Collected objects: +Stream2 DEBUG Object/count: AthenaAttributeList_SimpleTag, 6 Stream2 DEBUG Object/count: EventInfo_McEventInfo, 6 Stream2 DEBUG Object/count: ExampleTrackContainer_MyTracks, 6 AthenaEventLoopMgr INFO ===>>> done processing event #5, run #1 6 events processed so far <<<=== @@ -601,7 +763,11 @@ Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"My*") called Stream1 DEBUG Key:My* Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 7 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 7 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 7 Stream2 DEBUG addItemObjects(2101,"*") called @@ -610,7 +776,11 @@ Stream2 DEBUG Added object 2101,"McEventInfo" Stream2 DEBUG addItemObjects(9103,"*Tracks") called Stream2 DEBUG Key:*Tracks Stream2 DEBUG Added object 9103,"MyTracks" +Stream2 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream2 DEBUG Key:SimpleTag +Stream2 DEBUG Added object 40774348,"SimpleTag" Stream2 DEBUG Collected objects: +Stream2 DEBUG Object/count: AthenaAttributeList_SimpleTag, 7 Stream2 DEBUG Object/count: EventInfo_McEventInfo, 7 Stream2 DEBUG Object/count: ExampleTrackContainer_MyTracks, 7 AthenaEventLoopMgr INFO ===>>> done processing event #6, run #1 7 events processed so far <<<=== @@ -650,7 +820,11 @@ Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"My*") called Stream1 DEBUG Key:My* Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 8 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 8 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 8 Stream2 DEBUG addItemObjects(2101,"*") called @@ -659,7 +833,11 @@ Stream2 DEBUG Added object 2101,"McEventInfo" Stream2 DEBUG addItemObjects(9103,"*Tracks") called Stream2 DEBUG Key:*Tracks Stream2 DEBUG Added object 9103,"MyTracks" +Stream2 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream2 DEBUG Key:SimpleTag +Stream2 DEBUG Added object 40774348,"SimpleTag" Stream2 DEBUG Collected objects: +Stream2 DEBUG Object/count: AthenaAttributeList_SimpleTag, 8 Stream2 DEBUG Object/count: EventInfo_McEventInfo, 8 Stream2 DEBUG Object/count: ExampleTrackContainer_MyTracks, 8 AthenaEventLoopMgr INFO ===>>> done processing event #7, run #1 8 events processed so far <<<=== @@ -699,7 +877,11 @@ Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"My*") called Stream1 DEBUG Key:My* Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 9 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 9 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 9 Stream2 DEBUG addItemObjects(2101,"*") called @@ -708,7 +890,11 @@ Stream2 DEBUG Added object 2101,"McEventInfo" Stream2 DEBUG addItemObjects(9103,"*Tracks") called Stream2 DEBUG Key:*Tracks Stream2 DEBUG Added object 9103,"MyTracks" +Stream2 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream2 DEBUG Key:SimpleTag +Stream2 DEBUG Added object 40774348,"SimpleTag" Stream2 DEBUG Collected objects: +Stream2 DEBUG Object/count: AthenaAttributeList_SimpleTag, 9 Stream2 DEBUG Object/count: EventInfo_McEventInfo, 9 Stream2 DEBUG Object/count: ExampleTrackContainer_MyTracks, 9 AthenaEventLoopMgr INFO ===>>> done processing event #8, run #1 9 events processed so far <<<=== @@ -748,7 +934,11 @@ Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"My*") called Stream1 DEBUG Key:My* Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 10 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 10 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 10 Stream2 DEBUG addItemObjects(2101,"*") called @@ -757,7 +947,11 @@ Stream2 DEBUG Added object 2101,"McEventInfo" Stream2 DEBUG addItemObjects(9103,"*Tracks") called Stream2 DEBUG Key:*Tracks Stream2 DEBUG Added object 9103,"MyTracks" +Stream2 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream2 DEBUG Key:SimpleTag +Stream2 DEBUG Added object 40774348,"SimpleTag" Stream2 DEBUG Collected objects: +Stream2 DEBUG Object/count: AthenaAttributeList_SimpleTag, 10 Stream2 DEBUG Object/count: EventInfo_McEventInfo, 10 Stream2 DEBUG Object/count: ExampleTrackContainer_MyTracks, 10 AthenaEventLoopMgr INFO ===>>> done processing event #9, run #1 10 events processed so far <<<=== @@ -797,7 +991,11 @@ Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"My*") called Stream1 DEBUG Key:My* Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 11 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 11 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 11 Stream2 DEBUG addItemObjects(2101,"*") called @@ -806,7 +1004,11 @@ Stream2 DEBUG Added object 2101,"McEventInfo" Stream2 DEBUG addItemObjects(9103,"*Tracks") called Stream2 DEBUG Key:*Tracks Stream2 DEBUG Added object 9103,"MyTracks" +Stream2 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream2 DEBUG Key:SimpleTag +Stream2 DEBUG Added object 40774348,"SimpleTag" Stream2 DEBUG Collected objects: +Stream2 DEBUG Object/count: AthenaAttributeList_SimpleTag, 11 Stream2 DEBUG Object/count: EventInfo_McEventInfo, 11 Stream2 DEBUG Object/count: ExampleTrackContainer_MyTracks, 11 AthenaEventLoopMgr INFO ===>>> done processing event #10, run #1 11 events processed so far <<<=== @@ -846,7 +1048,11 @@ Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"My*") called Stream1 DEBUG Key:My* Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 12 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 12 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 12 Stream2 DEBUG addItemObjects(2101,"*") called @@ -855,7 +1061,11 @@ Stream2 DEBUG Added object 2101,"McEventInfo" Stream2 DEBUG addItemObjects(9103,"*Tracks") called Stream2 DEBUG Key:*Tracks Stream2 DEBUG Added object 9103,"MyTracks" +Stream2 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream2 DEBUG Key:SimpleTag +Stream2 DEBUG Added object 40774348,"SimpleTag" Stream2 DEBUG Collected objects: +Stream2 DEBUG Object/count: AthenaAttributeList_SimpleTag, 12 Stream2 DEBUG Object/count: EventInfo_McEventInfo, 12 Stream2 DEBUG Object/count: ExampleTrackContainer_MyTracks, 12 AthenaEventLoopMgr INFO ===>>> done processing event #11, run #1 12 events processed so far <<<=== @@ -895,7 +1105,11 @@ Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"My*") called Stream1 DEBUG Key:My* Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 13 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 13 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 13 Stream2 DEBUG addItemObjects(2101,"*") called @@ -904,7 +1118,11 @@ Stream2 DEBUG Added object 2101,"McEventInfo" Stream2 DEBUG addItemObjects(9103,"*Tracks") called Stream2 DEBUG Key:*Tracks Stream2 DEBUG Added object 9103,"MyTracks" +Stream2 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream2 DEBUG Key:SimpleTag +Stream2 DEBUG Added object 40774348,"SimpleTag" Stream2 DEBUG Collected objects: +Stream2 DEBUG Object/count: AthenaAttributeList_SimpleTag, 13 Stream2 DEBUG Object/count: EventInfo_McEventInfo, 13 Stream2 DEBUG Object/count: ExampleTrackContainer_MyTracks, 13 AthenaEventLoopMgr INFO ===>>> done processing event #12, run #1 13 events processed so far <<<=== @@ -944,7 +1162,11 @@ Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"My*") called Stream1 DEBUG Key:My* Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 14 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 14 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 14 Stream2 DEBUG addItemObjects(2101,"*") called @@ -953,7 +1175,11 @@ Stream2 DEBUG Added object 2101,"McEventInfo" Stream2 DEBUG addItemObjects(9103,"*Tracks") called Stream2 DEBUG Key:*Tracks Stream2 DEBUG Added object 9103,"MyTracks" +Stream2 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream2 DEBUG Key:SimpleTag +Stream2 DEBUG Added object 40774348,"SimpleTag" Stream2 DEBUG Collected objects: +Stream2 DEBUG Object/count: AthenaAttributeList_SimpleTag, 14 Stream2 DEBUG Object/count: EventInfo_McEventInfo, 14 Stream2 DEBUG Object/count: ExampleTrackContainer_MyTracks, 14 AthenaEventLoopMgr INFO ===>>> done processing event #13, run #1 14 events processed so far <<<=== @@ -994,7 +1220,11 @@ Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"My*") called Stream1 DEBUG Key:My* Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 15 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 15 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 15 Stream2 DEBUG addItemObjects(2101,"*") called @@ -1003,7 +1233,11 @@ Stream2 DEBUG Added object 2101,"McEventInfo" Stream2 DEBUG addItemObjects(9103,"*Tracks") called Stream2 DEBUG Key:*Tracks Stream2 DEBUG Added object 9103,"MyTracks" +Stream2 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream2 DEBUG Key:SimpleTag +Stream2 DEBUG Added object 40774348,"SimpleTag" Stream2 DEBUG Collected objects: +Stream2 DEBUG Object/count: AthenaAttributeList_SimpleTag, 15 Stream2 DEBUG Object/count: EventInfo_McEventInfo, 15 Stream2 DEBUG Object/count: ExampleTrackContainer_MyTracks, 15 AthenaEventLoopMgr INFO ===>>> done processing event #14, run #1 15 events processed so far <<<=== @@ -1043,7 +1277,11 @@ Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"My*") called Stream1 DEBUG Key:My* Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 16 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 16 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 16 Stream2 DEBUG addItemObjects(2101,"*") called @@ -1052,7 +1290,11 @@ Stream2 DEBUG Added object 2101,"McEventInfo" Stream2 DEBUG addItemObjects(9103,"*Tracks") called Stream2 DEBUG Key:*Tracks Stream2 DEBUG Added object 9103,"MyTracks" +Stream2 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream2 DEBUG Key:SimpleTag +Stream2 DEBUG Added object 40774348,"SimpleTag" Stream2 DEBUG Collected objects: +Stream2 DEBUG Object/count: AthenaAttributeList_SimpleTag, 16 Stream2 DEBUG Object/count: EventInfo_McEventInfo, 16 Stream2 DEBUG Object/count: ExampleTrackContainer_MyTracks, 16 AthenaEventLoopMgr INFO ===>>> done processing event #15, run #1 16 events processed so far <<<=== @@ -1092,7 +1334,11 @@ Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"My*") called Stream1 DEBUG Key:My* Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 17 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 17 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 17 Stream2 DEBUG addItemObjects(2101,"*") called @@ -1101,7 +1347,11 @@ Stream2 DEBUG Added object 2101,"McEventInfo" Stream2 DEBUG addItemObjects(9103,"*Tracks") called Stream2 DEBUG Key:*Tracks Stream2 DEBUG Added object 9103,"MyTracks" +Stream2 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream2 DEBUG Key:SimpleTag +Stream2 DEBUG Added object 40774348,"SimpleTag" Stream2 DEBUG Collected objects: +Stream2 DEBUG Object/count: AthenaAttributeList_SimpleTag, 17 Stream2 DEBUG Object/count: EventInfo_McEventInfo, 17 Stream2 DEBUG Object/count: ExampleTrackContainer_MyTracks, 17 AthenaEventLoopMgr INFO ===>>> done processing event #16, run #1 17 events processed so far <<<=== @@ -1141,7 +1391,11 @@ Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"My*") called Stream1 DEBUG Key:My* Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 18 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 18 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 18 Stream2 DEBUG addItemObjects(2101,"*") called @@ -1150,7 +1404,11 @@ Stream2 DEBUG Added object 2101,"McEventInfo" Stream2 DEBUG addItemObjects(9103,"*Tracks") called Stream2 DEBUG Key:*Tracks Stream2 DEBUG Added object 9103,"MyTracks" +Stream2 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream2 DEBUG Key:SimpleTag +Stream2 DEBUG Added object 40774348,"SimpleTag" Stream2 DEBUG Collected objects: +Stream2 DEBUG Object/count: AthenaAttributeList_SimpleTag, 18 Stream2 DEBUG Object/count: EventInfo_McEventInfo, 18 Stream2 DEBUG Object/count: ExampleTrackContainer_MyTracks, 18 AthenaEventLoopMgr INFO ===>>> done processing event #17, run #1 18 events processed so far <<<=== @@ -1190,7 +1448,11 @@ Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"My*") called Stream1 DEBUG Key:My* Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 19 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 19 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 19 Stream2 DEBUG addItemObjects(2101,"*") called @@ -1199,7 +1461,11 @@ Stream2 DEBUG Added object 2101,"McEventInfo" Stream2 DEBUG addItemObjects(9103,"*Tracks") called Stream2 DEBUG Key:*Tracks Stream2 DEBUG Added object 9103,"MyTracks" +Stream2 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream2 DEBUG Key:SimpleTag +Stream2 DEBUG Added object 40774348,"SimpleTag" Stream2 DEBUG Collected objects: +Stream2 DEBUG Object/count: AthenaAttributeList_SimpleTag, 19 Stream2 DEBUG Object/count: EventInfo_McEventInfo, 19 Stream2 DEBUG Object/count: ExampleTrackContainer_MyTracks, 19 AthenaEventLoopMgr INFO ===>>> done processing event #18, run #1 19 events processed so far <<<=== @@ -1239,7 +1505,11 @@ Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"My*") called Stream1 DEBUG Key:My* Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 20 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 20 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 20 Stream2 DEBUG addItemObjects(2101,"*") called @@ -1248,7 +1518,11 @@ Stream2 DEBUG Added object 2101,"McEventInfo" Stream2 DEBUG addItemObjects(9103,"*Tracks") called Stream2 DEBUG Key:*Tracks Stream2 DEBUG Added object 9103,"MyTracks" +Stream2 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream2 DEBUG Key:SimpleTag +Stream2 DEBUG Added object 40774348,"SimpleTag" Stream2 DEBUG Collected objects: +Stream2 DEBUG Object/count: AthenaAttributeList_SimpleTag, 20 Stream2 DEBUG Object/count: EventInfo_McEventInfo, 20 Stream2 DEBUG Object/count: ExampleTrackContainer_MyTracks, 20 AthenaEventLoopMgr INFO ===>>> done processing event #19, run #1 20 events processed so far <<<=== @@ -1267,9 +1541,9 @@ MetaData(EventS... DEBUG Opening MetaData(EventS... DEBUG attributes# = 1 MetaData(EventS... DEBUG Branch container 'EventStreamInfo_p3_Stream1' MetaData(EventS... DEBUG Opened container MetaData(EventStreamInfo_p3/Stream1) of type ROOT_Tree -SimplePoolFile1... DEBUG --->Adding Assoc :????/MetaData(EventStreamInfo_p3/Stream1) [20?] (7 , ffffffff) +SimplePoolFile1... DEBUG --->Adding Assoc :????/MetaData(EventStreamInfo_p3/Stream1) [20?] (14 , ffffffff) SimplePoolFile1... DEBUG ---->ClassID:???? -SimplePoolFile1... DEBUG --->Adding Shape[4 , ????]: [1 Column(s)] +SimplePoolFile1... DEBUG --->Adding Shape[9 , ????]: [1 Column(s)] SimplePoolFile1... DEBUG ---->Class:EventStreamInfo_p3 SimplePoolFile1... DEBUG ---->[0]:EventStreamInfo_p3 Typ:EventStreamInfo_p3 [21] Size:0 Offset:0 #Elements:1 SimplePoolFile1... DEBUG --> Access DbContainer CREA/UPDA [ROOT_Tree] MetaDataHdrForm(DataHeaderForm) @@ -1277,14 +1551,14 @@ MetaDataHdrForm... DEBUG Opening MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree -SimplePoolFile1... DEBUG --->Adding Assoc :????/MetaDataHdrForm(DataHeaderForm) [20?] (8 , ffffffff) +SimplePoolFile1... DEBUG --->Adding Assoc :????/MetaDataHdrForm(DataHeaderForm) [20?] (15 , ffffffff) SimplePoolFile1... DEBUG ---->ClassID:???? SimplePoolFile1... DEBUG --> Access DbContainer CREA/UPDA [ROOT_Tree] MetaDataHdr(DataHeader) MetaDataHdr(Dat... DEBUG Opening MetaDataHdr(Dat... DEBUG attributes# = 1 MetaDataHdr(Dat... DEBUG Branch container 'DataHeader' MetaDataHdr(Dat... DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree -SimplePoolFile1... DEBUG --->Adding Assoc :????/MetaDataHdr(DataHeader) [20?] (9 , ffffffff) +SimplePoolFile1... DEBUG --->Adding Assoc :????/MetaDataHdr(DataHeader) [20?] (16 , ffffffff) SimplePoolFile1... DEBUG ---->ClassID:???? ClassIDSvc INFO getRegistryEntries: read 7 CLIDRegistry entries for module ALL Stream1 INFO Records written: 21 @@ -1344,11 +1618,11 @@ ToolSvc INFO Removing all tools created by ToolSvc *****Chrono***** INFO **************************************************************************************************** *****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) *****Chrono***** INFO **************************************************************************************************** -commitOutput INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 42 -cRep_ALL INFO Time User : Tot= 20 [ms] Ave/Min/Max=0.161(+- 1.26)/ 0/ 10 [ms] #=124 -fRep_ALL INFO Time User : Tot= 30 [ms] Ave/Min/Max=0.242(+- 1.54)/ 0/ 10 [ms] #=124 -cRepR_ALL INFO Time User : Tot= 30 [ms] Ave/Min/Max=0.181(+- 1.33)/ 0/ 10 [ms] #=166 -ChronoStatSvc INFO Time User : Tot= 390 [ms] #= 1 +commitOutput INFO Time User : Tot= 10 [ms] Ave/Min/Max=0.238(+- 1.52)/ 0/ 10 [ms] #= 42 +cRep_ALL INFO Time User : Tot= 20 [ms] Ave/Min/Max=0.122(+- 1.1)/ 0/ 10 [ms] #=164 +cRepR_ALL INFO Time User : Tot= 10 [ms] Ave/Min/Max=0.0235(+-0.484)/ 0/ 10 [ms] #=426 +fRep_ALL INFO Time User : Tot= 40 [ms] Ave/Min/Max=0.244(+- 1.9)/ 0/ 20 [ms] #=164 +ChronoStatSvc INFO Time User : Tot= 0.58 [s] #= 1 *****Chrono***** INFO **************************************************************************************************** ChronoStatSvc.f... INFO Service finalized successfully ApplicationMgr INFO Application Manager Finalized successfully diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Copy.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Copy.ref index 68520454e9da5fe7a3fd304d4594145d71ef4c9a..a87525ad4a859a6abe98e55b98fbc2cb02ab7eea 100644 --- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Copy.ref +++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Copy.ref @@ -1,12 +1,11 @@ -Warning in <TInterpreter::ReadRootmapFile>: class InDet::IInDetTrackSelectionTool found in libInDetTrackSelectionToolDict.so is already in libInDetSecVtxTrackSelectionToolDict.so -Mon Feb 18 13:00:12 CST 2019 +Wed Mar 6 21:26:57 CET 2019 Preloading tcmalloc_minimal.so Athena INFO including file "AthenaCommon/Preparation.py" Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" Athena INFO executing ROOT6Setup Athena INFO including file "AthenaCommon/Execution.py" Athena INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_CopyJobOptions.py" -Py:ConfigurableDb INFO Read module info for 5458 configurables from 155 genConfDb files +Py:ConfigurableDb INFO Read module info for 5461 configurables from 48 genConfDb files Py:ConfigurableDb INFO No duplicates have been found: that's good ! Athena INFO including file "AthenaCommon/runbatch.py" ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 @@ -14,21 +13,17 @@ ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to leve ApplicationMgr SUCCESS ==================================================================================================================================== Welcome to ApplicationMgr (GaudiCoreSvc v31r0) - running on hepd-0004 on Mon Feb 18 13:00:17 2019 + running on lxplus084.cern.ch on Wed Mar 6 21:27:10 2019 ==================================================================================================================================== -ApplicationMgr INFO Successfully loaded modules : AthenaServices ApplicationMgr INFO Application Manager Configured successfully ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 StatusCodeSvc INFO initialize AthDictLoaderSvc INFO in initialize... AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO getRegistryEntries: read 3045 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 3167 CLIDRegistry entries for module ALL CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00 -Stream1 DEBUG Property update for OutputLevel : new value = 2 -Stream1.Stream1... DEBUG Property update for OutputLevel : new value = 2 -ClassIDSvc INFO getRegistryEntries: read 637 CLIDRegistry entries for module ALL -Stream1 DEBUG In initialize +ClassIDSvc INFO getRegistryEntries: read 610 CLIDRegistry entries for module ALL MetaDataSvc INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00 AthenaPoolCnvSvc DEBUG Property update for OutputLevel : new value = 2 AthenaPoolCnvSvc INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00 @@ -37,9 +32,9 @@ PoolSvc DEBUG Service base class initialized successfully PoolSvc INFO io_register[PoolSvc](xmlcatalog_file:Catalog1.xml) [ok] PoolSvc INFO Set connectionsvc retry/timeout/IDLE timeout to 'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled PoolSvc INFO Frontier compression level set to 5 -DBReplicaSvc INFO Frontier server at (serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://frontier-atlas.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /home/gemmeren/workarea/build/x86_64-centos7-gcc8-opt/share/dbreplica.config -DBReplicaSvc INFO Total of 1 servers found for host hepd-0004.lcrc.anl.gov [ATLF ] +DBReplicaSvc INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data +DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-05T2139/Athena/22.0.1/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config +DBReplicaSvc INFO Total of 10 servers found for host lxplus084.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] PoolSvc INFO Successfully setup replica sorting algorithm PoolSvc DEBUG OutputLevel is PoolSvc INFO Setting up APR FileCatalog and Streams @@ -117,7 +112,7 @@ MetaDataHdr(Dat... DEBUG Opening MetaDataHdr(Dat... DEBUG attributes# = 1 MetaDataHdr(Dat... DEBUG Branch container 'DataHeader' MetaDataHdr(Dat... DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree -ClassIDSvc INFO getRegistryEntries: read 1653 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 2078 CLIDRegistry entries for module ALL EventPersistenc... INFO Added successfully Conversion service:AthenaPoolCnvSvc SimplePoolFile1... DEBUG --> Access DbContainer READ [ROOT_Tree] MetaDataHdrForm(DataHeaderForm) MetaDataHdrForm... DEBUG Opening @@ -126,6 +121,10 @@ MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree AthenaPoolAddre... DEBUG Property update for OutputLevel : new value = 2 AthenaPoolAddre... DEBUG Service base class initialized successfully +Stream1 DEBUG Property update for OutputLevel : new value = 2 +Stream1.Stream1... DEBUG Property update for OutputLevel : new value = 2 +ClassIDSvc INFO getRegistryEntries: read 2 CLIDRegistry entries for module ALL +Stream1 DEBUG In initialize Stream1 DEBUG Found IDecisionSvc. DecisionSvc INFO Inserting stream: Stream1 with no Algs Stream1 DEBUG End initialize @@ -134,7 +133,6 @@ Stream1 DEBUG Found StoreGateSvc store. Stream1 DEBUG Found MetaDataStore store. OutputStreamSeq... INFO Initializing OutputStreamSequencerSvc - package version AthenaServices-00-00-00 Stream1.Stream1... DEBUG Property update for OutputLevel : new value = 2 -ClassIDSvc INFO getRegistryEntries: read 2 CLIDRegistry entries for module ALL Stream1.Stream1... INFO Initializing Stream1.Stream1Tool - package version AthenaServices-00-00-00 AthenaPoolAddre... DEBUG Cannot find DataHeader in DetectorStore. Stream1.Stream1... DEBUG Property update for OutputLevel : new value = 2 @@ -150,7 +148,7 @@ Stream1 DEBUG Registering all Tools in ToolHandleArray HelperTools Stream1 DEBUG Adding private ToolHandle tool Stream1.Stream1_MakeEventStreamInfo (MakeEventStreamInfo) from ToolHandleArray HelperTools Stream1 DEBUG Adding private ToolHandle tool Stream1.Stream1Tool (AthenaOutputStreamTool) Stream1 DEBUG Data Deps for Stream1 - + INPUT IGNORED ( 'AthenaAttributeList' , '' ) + + INPUT ( 'AthenaAttributeList' , 'StoreGateSvc+SimpleTag' ) HistogramPersis...WARNING Histograms saving not required. AthenaEventLoopMgr INFO Setup EventSelector service EventSelector ApplicationMgr INFO Application Manager Initialized successfully @@ -161,7 +159,6 @@ RootDatabase.se... DEBUG File name SimplePoolFile1.root RootDatabase.se... DEBUG Got tree CollectionTree read entry -1 RootDatabase.se... DEBUG Using Tree cache. Size: -1 Nevents to learn with: -1 AthenaPoolCnvSvc DEBUG setAttribute TREE_CACHE to -1 for db: SimplePoolFile1.root and cont: CollectionTree -ClassIDSvc INFO getRegistryEntries: read 396 CLIDRegistry entries for module ALL EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000000]. @@ -177,9 +174,10 @@ POOLContainerFo... DEBUG Opening POOLContainerFo... DEBUG attributes# = 1 POOLContainerFo... DEBUG Branch container 'DataHeaderForm' POOLContainerFo... DEBUG Opened container POOLContainerForm(DataHeaderForm) of type ROOT_Tree -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AlgResourcePool INFO TopAlg list empty. Recovering the one of Application Manager SimplePoolFile1... DEBUG --> Access DbContainer READ [ROOT_Tree] CollectionTree(EventInfo_p4/McEventInfo) CollectionTree(... DEBUG Opening @@ -189,6 +187,7 @@ CollectionTree(... DEBUG Opened container CollectionTree(EventInfo_p4/McEventIn AthenaPoolConve... INFO massageEventInfo: unable to get OverrideRunNumberFromInput property from EventSelector AthenaEventLoopMgr INFO ===>>> start of run 1 <<<=== AthenaEventLoopMgr INFO ===>>> start processing event #0, run #1 0 events processed so far <<<=== +EventInfoTagBui...WARNING Did not find xAOD::EventInfo DbSession INFO Open DbSession Domain[ROOT_All] INFO > Access DbDomain UPDATE [ROOT_All] AthenaPoolCnvSvc DEBUG setAttribute TREE_MAX_SIZE to 1099511627776L @@ -217,6 +216,7 @@ SimplePoolRepli... DEBUG --->Adding Assoc :????/##Params [200] (2 , ffffffff) SimplePoolRepli... DEBUG ---->ClassID:???? ##Params DEBUG No objects passing selection criteria... Container has 0 Entries in total. AthenaPoolCnvSvc DEBUG setAttribute CONTAINER_SPLITLEVEL to 99 for db: SimplePoolReplica1.root and cont: TTree=POOLContainerForm(DataHeaderForm) +Stream1.Stream1...WARNING Unable to retrieve AttributeList with key SimpleTag ClassIDSvc INFO getRegistryEntries: read 20 CLIDRegistry entries for module ALL Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* @@ -230,6 +230,9 @@ CollectionTree(... DEBUG Branch container 'ExampleHitContainer_p1_MyHits' CollectionTree(... DEBUG Opened container CollectionTree(ExampleHitContainer_p1/MyHits) of type ROOT_Tree Stream1 DEBUG Added object 9102,"MyHits" ClassIDSvc INFO getRegistryEntries: read 10 CLIDRegistry entries for module ALL +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 1 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 1 @@ -281,16 +284,22 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000001]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000001]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000001] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #1, run #1 1 events processed so far <<<=== +EventInfoTagBui...WARNING Did not find xAOD::EventInfo +Stream1.Stream1...WARNING Unable to retrieve AttributeList with key SimpleTag Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"MyHits") called Stream1 DEBUG Key:MyHits Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 2 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 2 @@ -300,16 +309,22 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000002]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000002]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000002] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #2, run #1 2 events processed so far <<<=== +EventInfoTagBui...WARNING Did not find xAOD::EventInfo +Stream1.Stream1...WARNING Unable to retrieve AttributeList with key SimpleTag Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"MyHits") called Stream1 DEBUG Key:MyHits Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 3 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 3 @@ -319,16 +334,22 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000003]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000003]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000003] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #3, run #1 3 events processed so far <<<=== +EventInfoTagBui...WARNING Did not find xAOD::EventInfo +Stream1.Stream1...WARNING Unable to retrieve AttributeList with key SimpleTag Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"MyHits") called Stream1 DEBUG Key:MyHits Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 4 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 4 @@ -338,16 +359,22 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000004]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000004]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000004] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #4, run #1 4 events processed so far <<<=== +EventInfoTagBui...WARNING Did not find xAOD::EventInfo +Stream1.Stream1...WARNING Unable to retrieve AttributeList with key SimpleTag Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"MyHits") called Stream1 DEBUG Key:MyHits Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 5 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 5 @@ -357,16 +384,22 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000005]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000005]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000005] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #5, run #1 5 events processed so far <<<=== +EventInfoTagBui...WARNING Did not find xAOD::EventInfo +Stream1.Stream1...WARNING Unable to retrieve AttributeList with key SimpleTag Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"MyHits") called Stream1 DEBUG Key:MyHits Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 6 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 6 @@ -376,16 +409,22 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000006]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000006]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000006] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #6, run #1 6 events processed so far <<<=== +EventInfoTagBui...WARNING Did not find xAOD::EventInfo +Stream1.Stream1...WARNING Unable to retrieve AttributeList with key SimpleTag Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"MyHits") called Stream1 DEBUG Key:MyHits Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 7 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 7 @@ -395,16 +434,22 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000007]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000007]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000007] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #7, run #1 7 events processed so far <<<=== +EventInfoTagBui...WARNING Did not find xAOD::EventInfo +Stream1.Stream1...WARNING Unable to retrieve AttributeList with key SimpleTag Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"MyHits") called Stream1 DEBUG Key:MyHits Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 8 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 8 @@ -414,16 +459,22 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000008]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000008]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000008] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #8, run #1 8 events processed so far <<<=== +EventInfoTagBui...WARNING Did not find xAOD::EventInfo +Stream1.Stream1...WARNING Unable to retrieve AttributeList with key SimpleTag Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"MyHits") called Stream1 DEBUG Key:MyHits Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 9 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 9 @@ -433,16 +484,22 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000009]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000009]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000009] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #9, run #1 9 events processed so far <<<=== +EventInfoTagBui...WARNING Did not find xAOD::EventInfo +Stream1.Stream1...WARNING Unable to retrieve AttributeList with key SimpleTag Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"MyHits") called Stream1 DEBUG Key:MyHits Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 10 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 10 @@ -452,16 +509,22 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000A]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000A]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000A] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #10, run #1 10 events processed so far <<<=== +EventInfoTagBui...WARNING Did not find xAOD::EventInfo +Stream1.Stream1...WARNING Unable to retrieve AttributeList with key SimpleTag Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"MyHits") called Stream1 DEBUG Key:MyHits Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 11 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 11 @@ -471,16 +534,22 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000B]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000B]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000B] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #11, run #1 11 events processed so far <<<=== +EventInfoTagBui...WARNING Did not find xAOD::EventInfo +Stream1.Stream1...WARNING Unable to retrieve AttributeList with key SimpleTag Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"MyHits") called Stream1 DEBUG Key:MyHits Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 12 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 12 @@ -490,16 +559,22 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000C]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000C]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000C] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #12, run #1 12 events processed so far <<<=== +EventInfoTagBui...WARNING Did not find xAOD::EventInfo +Stream1.Stream1...WARNING Unable to retrieve AttributeList with key SimpleTag Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"MyHits") called Stream1 DEBUG Key:MyHits Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 13 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 13 @@ -509,16 +584,22 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000D]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000D]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000D] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #13, run #1 13 events processed so far <<<=== +EventInfoTagBui...WARNING Did not find xAOD::EventInfo +Stream1.Stream1...WARNING Unable to retrieve AttributeList with key SimpleTag Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"MyHits") called Stream1 DEBUG Key:MyHits Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 14 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 14 @@ -528,16 +609,22 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000E]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000E]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000E] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #14, run #1 14 events processed so far <<<=== +EventInfoTagBui...WARNING Did not find xAOD::EventInfo +Stream1.Stream1...WARNING Unable to retrieve AttributeList with key SimpleTag Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"MyHits") called Stream1 DEBUG Key:MyHits Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 15 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 15 @@ -547,16 +634,22 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000F]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000F]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000F] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #15, run #1 15 events processed so far <<<=== +EventInfoTagBui...WARNING Did not find xAOD::EventInfo +Stream1.Stream1...WARNING Unable to retrieve AttributeList with key SimpleTag Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"MyHits") called Stream1 DEBUG Key:MyHits Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 16 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 16 @@ -566,16 +659,22 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000010]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000010]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000010] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #16, run #1 16 events processed so far <<<=== +EventInfoTagBui...WARNING Did not find xAOD::EventInfo +Stream1.Stream1...WARNING Unable to retrieve AttributeList with key SimpleTag Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"MyHits") called Stream1 DEBUG Key:MyHits Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 17 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 17 @@ -585,16 +684,22 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000011]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000011]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000011] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #17, run #1 17 events processed so far <<<=== +EventInfoTagBui...WARNING Did not find xAOD::EventInfo +Stream1.Stream1...WARNING Unable to retrieve AttributeList with key SimpleTag Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"MyHits") called Stream1 DEBUG Key:MyHits Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 18 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 18 @@ -604,16 +709,22 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000012]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000012]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000012] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #18, run #1 18 events processed so far <<<=== +EventInfoTagBui...WARNING Did not find xAOD::EventInfo +Stream1.Stream1...WARNING Unable to retrieve AttributeList with key SimpleTag Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"MyHits") called Stream1 DEBUG Key:MyHits Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 19 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 19 @@ -623,16 +734,22 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000013]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000013]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000013] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #19, run #1 19 events processed so far <<<=== +EventInfoTagBui...WARNING Did not find xAOD::EventInfo +Stream1.Stream1...WARNING Unable to retrieve AttributeList with key SimpleTag Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"MyHits") called Stream1 DEBUG Key:MyHits Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 20 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 20 @@ -690,13 +807,13 @@ ToolSvc INFO Removing all tools created by ToolSvc *****Chrono***** INFO **************************************************************************************************** *****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) *****Chrono***** INFO **************************************************************************************************** -commitOutput INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 21 -cRep_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 62 fRep_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 62 cRepR_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 83 -cObjR_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 65 -cObj_ALL INFO Time User : Tot= 10 [ms] Ave/Min/Max=0.161(+- 1.26)/ 0/ 10 [ms] #= 62 -ChronoStatSvc INFO Time User : Tot= 390 [ms] #= 1 +commitOutput INFO Time User : Tot= 10 [ms] Ave/Min/Max=0.476(+- 2.13)/ 0/ 10 [ms] #= 21 +cRep_ALL INFO Time User : Tot= 10 [ms] Ave/Min/Max=0.161(+- 1.26)/ 0/ 10 [ms] #= 62 +cObjR_ALL INFO Time User : Tot= 10 [ms] Ave/Min/Max=0.154(+- 1.23)/ 0/ 10 [ms] #= 65 +cObj_ALL INFO Time User : Tot= 30 [ms] Ave/Min/Max=0.484(+- 2.8)/ 0/ 20 [ms] #= 62 +ChronoStatSvc INFO Time User : Tot= 0.59 [s] #= 1 *****Chrono***** INFO **************************************************************************************************** ChronoStatSvc.f... INFO Service finalized successfully ApplicationMgr INFO Application Manager Finalized successfully diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Filter.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Filter.ref deleted file mode 100644 index dbf879abcb461b3a8c4f6dcd98fb0a6a45ce50e0..0000000000000000000000000000000000000000 --- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Filter.ref +++ /dev/null @@ -1,837 +0,0 @@ -Tue Feb 12 15:15:37 CST 2019 -Preloading tcmalloc_minimal.so -Athena INFO including file "AthenaCommon/Preparation.py" -Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" -Athena INFO executing ROOT6Setup -Athena INFO including file "AthenaCommon/Execution.py" -Athena INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_FilterJobOptions.py" -Py:ConfigurableDb INFO Read module info for 5451 configurables from 155 genConfDb files -Py:ConfigurableDb INFO No duplicates have been found: that's good ! -Athena INFO including file "AthenaCommon/runbatch.py" -ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 -ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 -ApplicationMgr SUCCESS -==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v30r5) - running on hepd-0004 on Tue Feb 12 15:15:46 2019 -==================================================================================================================================== -ApplicationMgr INFO Successfully loaded modules : AthenaServices -ApplicationMgr INFO Application Manager Configured successfully -ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 -StatusCodeSvc INFO initialize -AthDictLoaderSvc INFO in initialize... -AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO getRegistryEntries: read 3045 CLIDRegistry entries for module ALL -CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) -AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00 -ClassIDSvc INFO getRegistryEntries: read 836 CLIDRegistry entries for module ALL -ReadData DEBUG Property update for OutputLevel : new value = 2 -ReadData INFO in initialize() -MetaDataSvc DEBUG Property update for OutputLevel : new value = 2 -MetaDataSvc INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00 -MetaDataSvc DEBUG Service base class initialized successfully -AthenaPoolCnvSvc INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00 -PoolSvc DEBUG Property update for OutputLevel : new value = 2 -PoolSvc DEBUG Service base class initialized successfully -PoolSvc INFO Set connectionsvc retry/timeout/IDLE timeout to 'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled -PoolSvc INFO Frontier compression level set to 5 -DBReplicaSvc INFO Frontier server at (serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://frontier-atlas.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /home/gemmeren/workarea/build/x86_64-centos7-gcc8-opt/share/dbreplica.config -DBReplicaSvc INFO Total of 1 servers found for host hepd-0004.lcrc.anl.gov [ATLF ] -PoolSvc INFO Successfully setup replica sorting algorithm -PoolSvc DEBUG OutputLevel is -PoolSvc INFO Setting up APR FileCatalog and Streams -PoolSvc DEBUG POOL ReadCatalog is file:Catalog.xml -PoolSvc INFO POOL WriteCatalog is file:Catalog1.xml -DbSession INFO Open DbSession -Domain[ROOT_All] INFO > Access DbDomain READ [ROOT_All] -MetaDataSvc INFO Found MetaDataTools = PublicToolHandleArray(['IOVDbMetaDataTool']) -EventSelector DEBUG Property update for OutputLevel : new value = 2 -EventSelector INFO Initializing EventSelector - package version EventSelectorAthenaPool-00-00-00 -EventSelector DEBUG Service base class initialized successfully -EventSelector.Q... DEBUG Property update for OutputLevel : new value = 2 -ClassIDSvc INFO getRegistryEntries: read 1967 CLIDRegistry entries for module ALL -EventSelector.Q... INFO in initialize() -EventSelector INFO reinitialization... -EventSelector INFO EventSelection with query EventNumber > 5 -EventSelector DEBUG Try item: "SimplePoolCollection3.root" from the collection list. -EventSelector INFO Using standard collection ref -MetaDataSvc DEBUG handle() FirstInputFile for FID:???? -MetaDataSvc DEBUG initInputMetaDataStore: file name FID:???? -Domain[ROOT_All] INFO -> Access DbDatabase READ [ROOT_All] ???? -Domain[ROOT_All] INFO SimplePoolFile3.root -SimplePoolFile3... DEBUG --> Access DbContainer READ [ROOT_All] ##Shapes -##Shapes DEBUG Opening -##Shapes DEBUG attributes# = 1 -##Shapes DEBUG Opened container ##Shapes of type ROOT_Tree -SimplePoolFile3... DEBUG --->Reading Shape[0 , ????]: [1 Column(s)] -SimplePoolFile3... DEBUG ---->[0]:EventInfo_p4 Typ:EventInfo_p4 [21] Size:0 Offset:0 #Elements:1 -SimplePoolFile3... DEBUG --->Reading Shape[1 , ????]: [1 Column(s)] -SimplePoolFile3... DEBUG ---->[0]:ExampleTrackContainer_p1 Typ:ExampleTrackContainer_p1 [21] Size:0 Offset:0 #Elements:1 -SimplePoolFile3... DEBUG --->Reading Shape[2 , ????]: [1 Column(s)] -SimplePoolFile3... DEBUG ---->[0]:DataHeaderForm_p5 Typ:DataHeaderForm_p5 [21] Size:0 Offset:0 #Elements:1 -SimplePoolFile3... DEBUG --->Reading Shape[3 , ????]: [1 Column(s)] -SimplePoolFile3... DEBUG ---->[0]:DataHeader_p5 Typ:DataHeader_p5 [21] Size:0 Offset:0 #Elements:1 -SimplePoolFile3... DEBUG --->Reading Shape[4 , ????]: [1 Column(s)] -SimplePoolFile3... DEBUG ---->[0]:Token Typ:Token [18] Size:0 Offset:0 #Elements:1 -SimplePoolFile3... DEBUG --->Reading Shape[5 , ????]: [1 Column(s)] -SimplePoolFile3... DEBUG ---->[0]:unsigned int Typ:unsigned int [3] Size:0 Offset:0 #Elements:1 -SimplePoolFile3... DEBUG --->Reading Shape[6 , ????]: [1 Column(s)] -SimplePoolFile3... DEBUG ---->[0]:EventStreamInfo_p3 Typ:EventStreamInfo_p3 [21] Size:0 Offset:0 #Elements:1 -##Shapes DEBUG No objects passing selection criteria... Container has 7 Entries in total. -SimplePoolFile3... DEBUG --> Access DbContainer READ [ROOT_All] ##Links -##Links DEBUG Opening -##Links DEBUG attributes# = 1 -##Links DEBUG Opened container ##Links of type ROOT_Tree -SimplePoolFile3... DEBUG --->Reading Assoc:????/##Params [200] (2 , ffffffff) -SimplePoolFile3... DEBUG ---->ClassID:???? -SimplePoolFile3... DEBUG --->Reading Assoc:????/CollectionTree(EventInfo_p4/McEventInfo) [20?] (3 , ffffffff) -SimplePoolFile3... DEBUG ---->ClassID:???? -SimplePoolFile3... DEBUG --->Reading Assoc:????/CollectionTree(ExampleTrackContainer_p1/MyTracks) [20?] (4 , ffffffff) -SimplePoolFile3... DEBUG ---->ClassID:???? -SimplePoolFile3... DEBUG --->Reading Assoc:????/POOLContainerForm(DataHeaderForm) [20?] (5 , ffffffff) -SimplePoolFile3... DEBUG ---->ClassID:???? -SimplePoolFile3... DEBUG --->Reading Assoc:????/POOLContainer(DataHeader) [20?] (6 , ffffffff) -SimplePoolFile3... DEBUG ---->ClassID:???? -SimplePoolFile3... DEBUG --->Reading Assoc:????/POOLCollectionTree(Token) [20?] (7 , ffffffff) -SimplePoolFile3... DEBUG ---->ClassID:???? -SimplePoolFile3... DEBUG --->Reading Assoc:????/POOLCollectionTree(RunNumber) [20?] (8 , ffffffff) -SimplePoolFile3... DEBUG ---->ClassID:???? -SimplePoolFile3... DEBUG --->Reading Assoc:????/POOLCollectionTree(EventNumber) [20?] (9 , ffffffff) -SimplePoolFile3... DEBUG ---->ClassID:???? -SimplePoolFile3... DEBUG --->Reading Assoc:????/POOLCollectionTree(MagicNumber) [20?] (a , ffffffff) -SimplePoolFile3... DEBUG ---->ClassID:???? -SimplePoolFile3... DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream1) [20?] (b , ffffffff) -SimplePoolFile3... DEBUG ---->ClassID:???? -SimplePoolFile3... DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?] (c , ffffffff) -SimplePoolFile3... DEBUG ---->ClassID:???? -SimplePoolFile3... DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?] (d , ffffffff) -SimplePoolFile3... DEBUG ---->ClassID:???? -##Links DEBUG No objects passing selection criteria... Container has 12 Entries in total. -SimplePoolFile3... DEBUG --> Access DbContainer READ [ROOT_All] ##Params -##Params DEBUG Opening -##Params DEBUG attributes# = 1 -##Params DEBUG Opened container ##Params of type ROOT_Tree -SimplePoolFile3... DEBUG --->Reading Param:FID=[????] -SimplePoolFile3... DEBUG --->Reading Param:PFN=[SimplePoolFile3.root] -SimplePoolFile3... DEBUG --->Reading Param:POOL_VSN=[1.1] -SimplePoolFile3... DEBUG --->Reading Param:FORMAT_VSN=[1.1] -##Params DEBUG No objects passing selection criteria... Container has 4 Entries in total. -SimplePoolFile3... DEBUG --> Access DbContainer READ [ROOT_Tree] MetaDataHdr(DataHeader) -MetaDataHdr(Dat... DEBUG Opening -MetaDataHdr(Dat... DEBUG attributes# = 1 -MetaDataHdr(Dat... DEBUG Branch container 'DataHeader' -MetaDataHdr(Dat... DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree -ClassIDSvc INFO getRegistryEntries: read 58 CLIDRegistry entries for module ALL -EventPersistenc... INFO Added successfully Conversion service:AthenaPoolCnvSvc -SimplePoolFile3... DEBUG --> Access DbContainer READ [ROOT_Tree] MetaDataHdrForm(DataHeaderForm) -MetaDataHdrForm... DEBUG Opening -MetaDataHdrForm... DEBUG attributes# = 1 -MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' -MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree -MetaDataSvc DEBUG Loaded input meta data store proxies -AthenaPoolAddre... DEBUG Property update for OutputLevel : new value = 2 -AthenaPoolAddre... DEBUG Service base class initialized successfully -ReadData DEBUG input handles: 2 -ReadData DEBUG output handles: 0 -ReadData DEBUG Data Deps for ReadData - + INPUT ( 'ExampleHitContainer' , 'StoreGateSvc+MyHits' ) - + INPUT ( 'ExampleTrackContainer' , 'StoreGateSvc+MyTracks' ) -WriteTag INFO in initialize() -Stream1 DEBUG Property update for OutputLevel : new value = 2 -Stream1.Stream1... DEBUG Property update for OutputLevel : new value = 2 -ClassIDSvc INFO getRegistryEntries: read 2 CLIDRegistry entries for module ALL -Stream1 DEBUG In initialize -Stream1 DEBUG Found IDecisionSvc. -DecisionSvc INFO Inserting stream: Stream1 with no Algs -Stream1 DEBUG End initialize -Stream1 DEBUG In initialize -Stream1 DEBUG Found StoreGateSvc store. -Stream1 DEBUG Found MetaDataStore store. -OutputStreamSeq... INFO Initializing OutputStreamSequencerSvc - package version AthenaServices-00-00-00 -Stream1.Stream1... DEBUG Property update for OutputLevel : new value = 2 -Stream1.Stream1... INFO Initializing Stream1.Stream1Tool - package version AthenaServices-00-00-00 -AthenaPoolAddre... DEBUG Cannot find DataHeader in DetectorStore. -Stream1.Stream1... DEBUG Property update for OutputLevel : new value = 2 -Stream1.Stream1... INFO Initializing Stream1.Stream1_MakeEventStreamInfo - package version OutputStreamAthenaPool-00-00-00 -Stream1 INFO Found HelperTools = PrivateToolHandleArray(['MakeEventStreamInfo/Stream1_MakeEventStreamInfo']) -Stream1 INFO Data output: SimplePoolFile5.root -Stream1 INFO I/O reinitialization... -Stream1.Stream1... DEBUG Property update for OutputLevel : new value = 2 -Stream1 DEBUG End initialize -Stream1 DEBUG input handles: 0 -Stream1 DEBUG output handles: 0 -Stream1 DEBUG Registering all Tools in ToolHandleArray HelperTools -Stream1 DEBUG Adding private ToolHandle tool Stream1.Stream1_MakeEventStreamInfo (MakeEventStreamInfo) from ToolHandleArray HelperTools -Stream1 DEBUG Adding private ToolHandle tool Stream1.Stream1Tool (AthenaOutputStreamTool) -Stream1 DEBUG Data Deps for Stream1 - + INPUT IGNORED ( 'AthenaAttributeList' , '' ) -RegStream1 DEBUG Property update for OutputLevel : new value = 2 -RegStream1.RegS... DEBUG Property update for OutputLevel : new value = 2 -ClassIDSvc INFO getRegistryEntries: read 665 CLIDRegistry entries for module ALL -RegStream1 DEBUG In initialize -RegStream1 DEBUG Found IDecisionSvc. -DecisionSvc INFO Inserting stream: RegStream1 with no Algs -RegStream1 DEBUG End initialize -RegStream1 DEBUG In initialize -RegStream1 DEBUG Found 'StoreName':StoreGateSvc store. -RegStream1.TagTool DEBUG Property update for OutputLevel : new value = 2 -RegStream1 DEBUG Tool initialized -RegStream1 DEBUG Not class requested by Tool, skipping (40774349,"RunEventTag") -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"*") -RegStream1 DEBUG End initialize -RegStream1 DEBUG input handles: 0 -RegStream1 DEBUG output handles: 0 -RegStream1 DEBUG Adding private ToolHandle tool RegStream1.TagTool (RegistrationStreamTagTool) -RegStream1 DEBUG Data Deps for RegStream1 -HistogramPersis...WARNING Histograms saving not required. -AthenaEventLoopMgr INFO Setup EventSelector service EventSelector -ApplicationMgr INFO Application Manager Initialized successfully -EventSelector DEBUG Try item: "SimplePoolCollection3.root" from the collection list. -ApplicationMgr INFO Application Manager Started successfully -MetaDataSvc DEBUG handle() BeginInputFile for FID:???? -MetaDataSvc DEBUG initInputMetaDataStore: file name FID:???? -MetaDataSvc DEBUG Loaded input meta data store proxies -MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool -EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 3 -EventSelector DEBUG record AthenaAttribute, name = Stream1_ref = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000006]. -EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000006]. -EventSelector INFO Request skipping event from: EventSelector.QueryTag -EventSelector INFO skipping event 1 -EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 3 -EventSelector DEBUG record AthenaAttribute, name = Stream1_ref = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000007]. -EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000007]. -EventSelector INFO Request skipping event from: EventSelector.QueryTag -EventSelector INFO skipping event 2 -EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 3 -EventSelector DEBUG record AthenaAttribute, name = Stream1_ref = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000008]. -EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000008]. -EventSelector INFO Request skipping event from: EventSelector.QueryTag -EventSelector INFO skipping event 3 -EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 3 -EventSelector DEBUG record AthenaAttribute, name = Stream1_ref = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000009]. -EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000009]. -EventSelector INFO Request skipping event from: EventSelector.QueryTag -EventSelector INFO skipping event 4 -EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 3 -EventSelector DEBUG record AthenaAttribute, name = Stream1_ref = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000A]. -EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000A]. -EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000A] -SimplePoolFile3... DEBUG --> Access DbContainer READ [ROOT_Tree] POOLContainer(DataHeader) -POOLContainer(D... DEBUG Opening -POOLContainer(D... DEBUG attributes# = 1 -POOLContainer(D... DEBUG Branch container 'DataHeader' -POOLContainer(D... DEBUG Opened container POOLContainer(DataHeader) of type ROOT_Tree -SimplePoolFile3... DEBUG --> Access DbContainer READ [ROOT_Tree] POOLContainerForm(DataHeaderForm) -POOLContainerFo... DEBUG Opening -POOLContainerFo... DEBUG attributes# = 1 -POOLContainerFo... DEBUG Branch container 'DataHeaderForm' -POOLContainerFo... DEBUG Opened container POOLContainerForm(DataHeaderForm) of type ROOT_Tree -AthenaPoolAddre... DEBUG The current Event contains: 3 objects -AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo -AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks -AlgResourcePool INFO TopAlg list empty. Recovering the one of Application Manager -SimplePoolFile3... DEBUG --> Access DbContainer READ [ROOT_Tree] CollectionTree(EventInfo_p4/McEventInfo) -CollectionTree(... DEBUG Opening -CollectionTree(... DEBUG attributes# = 1 -CollectionTree(... DEBUG Branch container 'EventInfo_p4_McEventInfo' -CollectionTree(... DEBUG Opened container CollectionTree(EventInfo_p4/McEventInfo) of type ROOT_Tree -AthenaPoolConve... INFO massageEventInfo: unable to get OverrideRunNumberFromInput property from EventSelector -AthenaEventLoopMgr INFO ===>>> start of run 1 <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #10, run #1 0 events processed so far <<<=== -ReadData DEBUG in execute() -SimplePoolFile3... DEBUG --> Access DbContainer READ [ROOT_Tree] MetaData(EventStreamInfo_p3/Stream1) -MetaData(EventS... DEBUG Opening -MetaData(EventS... DEBUG attributes# = 1 -MetaData(EventS... DEBUG Branch container 'EventStreamInfo_p3_Stream1' -MetaData(EventS... DEBUG Opened container MetaData(EventStreamInfo_p3/Stream1) of type ROOT_Tree -ReadData INFO EventStreamInfo: Number of events = 20 -ReadData INFO EventStreamInfo: ItemList: -ReadData INFO CLID = 2101, key = McEventInfo -ReadData INFO CLID = 9103, key = MyTracks -ReadData INFO CLID = 222376821, key = StreamX -ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics -ReadData INFO TagInfo: -ReadData INFO EventInfo event: 10 run: 1 -ReadData INFO Get Smart data ptr 1 -SimplePoolFile3... DEBUG --> Access DbContainer READ [ROOT_Tree] CollectionTree(ExampleTrackContainer_p1/MyTracks) -CollectionTree(... DEBUG Opening -CollectionTree(... DEBUG attributes# = 1 -CollectionTree(... DEBUG Branch container 'ExampleTrackContainer_p1_MyTracks' -CollectionTree(... DEBUG Opened container CollectionTree(ExampleTrackContainer_p1/MyTracks) of type ROOT_Tree -ReadData INFO Track pt = 1018.38 eta = -11.0052 phi = 149.134 detector = Track made in: DummyHitDetector -ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits -ReadData INFO Could not find ExampleHitContainer/MyHits -WriteTag INFO EventInfo event: 10 run: 1 -WriteTag INFO registered all data -DbSession INFO Open DbSession -Domain[ROOT_All] INFO > Access DbDomain UPDATE [ROOT_All] -PersistencySvc:... DEBUG lookupPFN: SimplePoolFile5.root returned FID: '' tech= -PersistencySvc:... DEBUG registered PFN: SimplePoolFile5.root with FID:???? -Domain[ROOT_All] INFO -> Access DbDatabase CREATE [ROOT_All] ???? -Domain[ROOT_All] INFO SimplePoolFile5.root -SimplePoolFile5... DEBUG --> Access DbContainer CREATE [ROOT_All] ##Shapes -##Shapes DEBUG Opening -##Shapes DEBUG attributes# = 1 -##Shapes DEBUG Opened container ##Shapes of type ROOT_Tree -##Shapes DEBUG No objects passing selection criteria... Container has 0 Entries in total. -SimplePoolFile5... DEBUG --> Access DbContainer CREATE [ROOT_All] ##Links -##Links DEBUG Opening -##Links DEBUG attributes# = 1 -##Links DEBUG Opened container ##Links of type ROOT_Tree -##Links DEBUG No objects passing selection criteria... Container has 0 Entries in total. -SimplePoolFile5... DEBUG --> Access DbContainer CREATE [ROOT_All] ##Params -##Params DEBUG Opening -##Params DEBUG attributes# = 1 -##Params DEBUG Opened container ##Params of type ROOT_Tree -SimplePoolFile5... DEBUG --->Adding Assoc :????/##Params [200] (2 , ffffffff) -SimplePoolFile5... DEBUG ---->ClassID:???? -##Params DEBUG No objects passing selection criteria... Container has 0 Entries in total. -ClassIDSvc INFO getRegistryEntries: read 25 CLIDRegistry entries for module ALL -Stream1 DEBUG addItemObjects(2101,"*") called -Stream1 DEBUG Key:* -Stream1 DEBUG Added object 2101,"McEventInfo" -Stream1 DEBUG addItemObjects(9103,"MyTracks") called -Stream1 DEBUG Key:MyTracks -Stream1 DEBUG Added object 9103,"MyTracks" -Stream1 DEBUG Collected objects: -Stream1 DEBUG Object/count: EventInfo_McEventInfo, 1 -Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 1 -SimplePoolFile5... DEBUG --> Access DbContainer CREA/UPDA [ROOT_Tree] CollectionTree(EventInfo_p4/McEventInfo) -CollectionTree(... DEBUG Opening -CollectionTree(... DEBUG attributes# = 1 -CollectionTree(... DEBUG Branch container 'EventInfo_p4_McEventInfo' -CollectionTree(... DEBUG Opened container CollectionTree(EventInfo_p4/McEventInfo) of type ROOT_Tree -SimplePoolFile5... DEBUG --->Adding Assoc :????/CollectionTree(EventInfo_p4/McEventInfo) [20?] (3 , ffffffff) -SimplePoolFile5... DEBUG ---->ClassID:???? -SimplePoolFile5... DEBUG --->Adding Shape[0 , ????]: [1 Column(s)] -SimplePoolFile5... DEBUG ---->Class:EventInfo_p4 -SimplePoolFile5... DEBUG ---->[0]:EventInfo_p4 Typ:EventInfo_p4 [21] Size:0 Offset:0 #Elements:1 -SimplePoolFile5... DEBUG --> Access DbContainer CREA/UPDA [ROOT_Tree] CollectionTree(ExampleTrackContainer_p1/MyTracks) -CollectionTree(... DEBUG Opening -CollectionTree(... DEBUG attributes# = 1 -CollectionTree(... DEBUG Branch container 'ExampleTrackContainer_p1_MyTracks' -CollectionTree(... DEBUG Opened container CollectionTree(ExampleTrackContainer_p1/MyTracks) of type ROOT_Tree -SimplePoolFile5... DEBUG --->Adding Assoc :????/CollectionTree(ExampleTrackContainer_p1/MyTracks) [20?] (4 , ffffffff) -SimplePoolFile5... DEBUG ---->ClassID:???? -SimplePoolFile5... DEBUG --->Adding Shape[1 , ????]: [1 Column(s)] -SimplePoolFile5... DEBUG ---->Class:ExampleTrackContainer_p1 -SimplePoolFile5... DEBUG ---->[0]:ExampleTrackContainer_p1 Typ:ExampleTrackContainer_p1 [21] Size:0 Offset:0 #Elements:1 -SimplePoolFile5... DEBUG --> Access DbContainer CREA/UPDA [ROOT_Tree] POOLContainerForm(DataHeaderForm) -POOLContainerFo... DEBUG Opening -POOLContainerFo... DEBUG attributes# = 1 -POOLContainerFo... DEBUG Branch container 'DataHeaderForm' -POOLContainerFo... DEBUG Opened container POOLContainerForm(DataHeaderForm) of type ROOT_Tree -SimplePoolFile5... DEBUG --->Adding Assoc :????/POOLContainerForm(DataHeaderForm) [20?] (5 , ffffffff) -SimplePoolFile5... DEBUG ---->ClassID:???? -SimplePoolFile5... DEBUG --->Adding Shape[2 , ????]: [1 Column(s)] -SimplePoolFile5... DEBUG ---->Class:DataHeaderForm_p5 -SimplePoolFile5... DEBUG ---->[0]:DataHeaderForm_p5 Typ:DataHeaderForm_p5 [21] Size:0 Offset:0 #Elements:1 -SimplePoolFile5... DEBUG --> Access DbContainer CREA/UPDA [ROOT_Tree] POOLContainer(DataHeader) -POOLContainer(D... DEBUG Opening -POOLContainer(D... DEBUG attributes# = 1 -POOLContainer(D... DEBUG Branch container 'DataHeader' -POOLContainer(D... DEBUG Opened container POOLContainer(DataHeader) of type ROOT_Tree -SimplePoolFile5... DEBUG --->Adding Assoc :????/POOLContainer(DataHeader) [20?] (6 , ffffffff) -SimplePoolFile5... DEBUG ---->ClassID:???? -SimplePoolFile5... DEBUG --->Adding Shape[3 , ????]: [1 Column(s)] -SimplePoolFile5... DEBUG ---->Class:DataHeader_p5 -SimplePoolFile5... DEBUG ---->[0]:DataHeader_p5 Typ:DataHeader_p5 [21] Size:0 Offset:0 #Elements:1 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"RunEventTag") -RegStream1 DEBUG get ref for (222376821,"*") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 for requested key=* -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000000] for Stream1_derived -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000A] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=][CLID=????][TECH=0000020?][OID=00000006-0000000A] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to RunEventTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"*") -PoolSvc INFO Writing ExplicitROOT Collection - do not pass session pointer -RegStream1.TagTool INFO No Primary Key defined -AthenaEventLoopMgr INFO ===>>> done processing event #10, run #1 1 events processed so far <<<=== -EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 3 -EventSelector DEBUG record AthenaAttribute, name = Stream1_ref = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000B]. -EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000B]. -EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000B] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects -AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo -AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks -AthenaEventLoopMgr INFO ===>>> start processing event #11, run #1 1 events processed so far <<<=== -ReadData DEBUG in execute() -ReadData INFO EventStreamInfo: Number of events = 20 -ReadData INFO EventStreamInfo: ItemList: -ReadData INFO CLID = 2101, key = McEventInfo -ReadData INFO CLID = 9103, key = MyTracks -ReadData INFO CLID = 222376821, key = StreamX -ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics -ReadData INFO TagInfo: -ReadData INFO EventInfo event: 11 run: 1 -ReadData INFO Get Smart data ptr 1 -ReadData INFO Track pt = 1118.13 eta = -10.9031 phi = 163.786 detector = Track made in: DummyHitDetector -ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits -ReadData INFO Could not find ExampleHitContainer/MyHits -WriteTag INFO EventInfo event: 11 run: 1 -WriteTag INFO registered all data -Stream1 DEBUG addItemObjects(2101,"*") called -Stream1 DEBUG Key:* -Stream1 DEBUG Added object 2101,"McEventInfo" -Stream1 DEBUG addItemObjects(9103,"MyTracks") called -Stream1 DEBUG Key:MyTracks -Stream1 DEBUG Added object 9103,"MyTracks" -Stream1 DEBUG Collected objects: -Stream1 DEBUG Object/count: EventInfo_McEventInfo, 2 -Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 2 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"RunEventTag") -RegStream1 DEBUG get ref for (222376821,"*") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 for requested key=* -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000001] for Stream1_derived -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000B] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=][CLID=????][TECH=0000020?][OID=00000006-0000000B] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to RunEventTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"*") -AthenaEventLoopMgr INFO ===>>> done processing event #11, run #1 2 events processed so far <<<=== -EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 3 -EventSelector DEBUG record AthenaAttribute, name = Stream1_ref = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000C]. -EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000C]. -EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000C] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects -AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo -AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks -AthenaEventLoopMgr INFO ===>>> start processing event #12, run #1 2 events processed so far <<<=== -ReadData DEBUG in execute() -ReadData INFO EventStreamInfo: Number of events = 20 -ReadData INFO EventStreamInfo: ItemList: -ReadData INFO CLID = 2101, key = McEventInfo -ReadData INFO CLID = 9103, key = MyTracks -ReadData INFO CLID = 222376821, key = StreamX -ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics -ReadData INFO TagInfo: -ReadData INFO EventInfo event: 12 run: 1 -ReadData INFO Get Smart data ptr 1 -ReadData INFO Track pt = 1217.93 eta = -10.82 phi = 178.438 detector = Track made in: DummyHitDetector -ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits -ReadData INFO Could not find ExampleHitContainer/MyHits -WriteTag INFO EventInfo event: 12 run: 1 -WriteTag INFO registered all data -Stream1 DEBUG addItemObjects(2101,"*") called -Stream1 DEBUG Key:* -Stream1 DEBUG Added object 2101,"McEventInfo" -Stream1 DEBUG addItemObjects(9103,"MyTracks") called -Stream1 DEBUG Key:MyTracks -Stream1 DEBUG Added object 9103,"MyTracks" -Stream1 DEBUG Collected objects: -Stream1 DEBUG Object/count: EventInfo_McEventInfo, 3 -Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 3 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"RunEventTag") -RegStream1 DEBUG get ref for (222376821,"*") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 for requested key=* -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000002] for Stream1_derived -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000C] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=][CLID=????][TECH=0000020?][OID=00000006-0000000C] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to RunEventTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"*") -AthenaEventLoopMgr INFO ===>>> done processing event #12, run #1 3 events processed so far <<<=== -EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 3 -EventSelector DEBUG record AthenaAttribute, name = Stream1_ref = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000D]. -EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000D]. -EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000D] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects -AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo -AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks -AthenaEventLoopMgr INFO ===>>> start processing event #13, run #1 3 events processed so far <<<=== -ReadData DEBUG in execute() -ReadData INFO EventStreamInfo: Number of events = 20 -ReadData INFO EventStreamInfo: ItemList: -ReadData INFO CLID = 2101, key = McEventInfo -ReadData INFO CLID = 9103, key = MyTracks -ReadData INFO CLID = 222376821, key = StreamX -ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics -ReadData INFO TagInfo: -ReadData INFO EventInfo event: 13 run: 1 -ReadData INFO Get Smart data ptr 1 -ReadData INFO Track pt = 1317.76 eta = -10.751 phi = 193.09 detector = Track made in: DummyHitDetector -ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits -ReadData INFO Could not find ExampleHitContainer/MyHits -WriteTag INFO EventInfo event: 13 run: 1 -WriteTag INFO registered all data -Stream1 DEBUG addItemObjects(2101,"*") called -Stream1 DEBUG Key:* -Stream1 DEBUG Added object 2101,"McEventInfo" -Stream1 DEBUG addItemObjects(9103,"MyTracks") called -Stream1 DEBUG Key:MyTracks -Stream1 DEBUG Added object 9103,"MyTracks" -Stream1 DEBUG Collected objects: -Stream1 DEBUG Object/count: EventInfo_McEventInfo, 4 -Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 4 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"RunEventTag") -RegStream1 DEBUG get ref for (222376821,"*") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 for requested key=* -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000003] for Stream1_derived -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000D] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=][CLID=????][TECH=0000020?][OID=00000006-0000000D] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to RunEventTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"*") -AthenaEventLoopMgr INFO ===>>> done processing event #13, run #1 4 events processed so far <<<=== -EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 3 -EventSelector DEBUG record AthenaAttribute, name = Stream1_ref = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000E]. -EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000E]. -EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000E] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects -AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo -AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks -AthenaEventLoopMgr INFO ===>>> start processing event #14, run #1 4 events processed so far <<<=== -ReadData DEBUG in execute() -ReadData INFO EventStreamInfo: Number of events = 20 -ReadData INFO EventStreamInfo: ItemList: -ReadData INFO CLID = 2101, key = McEventInfo -ReadData INFO CLID = 9103, key = MyTracks -ReadData INFO CLID = 222376821, key = StreamX -ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics -ReadData INFO TagInfo: -ReadData INFO EventInfo event: 14 run: 1 -ReadData INFO Get Smart data ptr 1 -ReadData INFO Track pt = 1417.61 eta = -10.6927 phi = 207.741 detector = Track made in: DummyHitDetector -ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits -ReadData INFO Could not find ExampleHitContainer/MyHits -WriteTag INFO EventInfo event: 14 run: 1 -WriteTag INFO registered all data -Stream1 DEBUG addItemObjects(2101,"*") called -Stream1 DEBUG Key:* -Stream1 DEBUG Added object 2101,"McEventInfo" -Stream1 DEBUG addItemObjects(9103,"MyTracks") called -Stream1 DEBUG Key:MyTracks -Stream1 DEBUG Added object 9103,"MyTracks" -Stream1 DEBUG Collected objects: -Stream1 DEBUG Object/count: EventInfo_McEventInfo, 5 -Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 5 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"RunEventTag") -RegStream1 DEBUG get ref for (222376821,"*") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 for requested key=* -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000004] for Stream1_derived -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000E] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=][CLID=????][TECH=0000020?][OID=00000006-0000000E] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to RunEventTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"*") -AthenaEventLoopMgr INFO ===>>> done processing event #14, run #1 5 events processed so far <<<=== -EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 3 -EventSelector DEBUG record AthenaAttribute, name = Stream1_ref = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000F]. -EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000F]. -EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000F] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects -AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo -AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks -AthenaEventLoopMgr INFO ===>>> start processing event #15, run #1 5 events processed so far <<<=== -ReadData DEBUG in execute() -ReadData INFO EventStreamInfo: Number of events = 20 -ReadData INFO EventStreamInfo: ItemList: -ReadData INFO CLID = 2101, key = McEventInfo -ReadData INFO CLID = 9103, key = MyTracks -ReadData INFO CLID = 222376821, key = StreamX -ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics -ReadData INFO TagInfo: -ReadData INFO EventInfo event: 15 run: 1 -ReadData INFO Get Smart data ptr 1 -ReadData INFO Track pt = 1517.49 eta = -10.6429 phi = 222.393 detector = Track made in: DummyHitDetector -ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits -ReadData INFO Could not find ExampleHitContainer/MyHits -WriteTag INFO EventInfo event: 15 run: 1 -WriteTag INFO registered all data -Stream1 DEBUG addItemObjects(2101,"*") called -Stream1 DEBUG Key:* -Stream1 DEBUG Added object 2101,"McEventInfo" -Stream1 DEBUG addItemObjects(9103,"MyTracks") called -Stream1 DEBUG Key:MyTracks -Stream1 DEBUG Added object 9103,"MyTracks" -Stream1 DEBUG Collected objects: -Stream1 DEBUG Object/count: EventInfo_McEventInfo, 6 -Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 6 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"RunEventTag") -RegStream1 DEBUG get ref for (222376821,"*") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 for requested key=* -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000005] for Stream1_derived -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000F] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=][CLID=????][TECH=0000020?][OID=00000006-0000000F] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to RunEventTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"*") -AthenaEventLoopMgr INFO ===>>> done processing event #15, run #1 6 events processed so far <<<=== -EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 3 -EventSelector DEBUG record AthenaAttribute, name = Stream1_ref = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000010]. -EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000010]. -EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000010] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects -AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo -AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks -AthenaEventLoopMgr INFO ===>>> start processing event #16, run #1 6 events processed so far <<<=== -ReadData DEBUG in execute() -ReadData INFO EventStreamInfo: Number of events = 20 -ReadData INFO EventStreamInfo: ItemList: -ReadData INFO CLID = 2101, key = McEventInfo -ReadData INFO CLID = 9103, key = MyTracks -ReadData INFO CLID = 222376821, key = StreamX -ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics -ReadData INFO TagInfo: -ReadData INFO EventInfo event: 16 run: 1 -ReadData INFO Get Smart data ptr 1 -ReadData INFO Track pt = 1617.37 eta = -10.5997 phi = 237.045 detector = Track made in: DummyHitDetector -ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits -ReadData INFO Could not find ExampleHitContainer/MyHits -WriteTag INFO EventInfo event: 16 run: 1 -WriteTag INFO registered all data -Stream1 DEBUG addItemObjects(2101,"*") called -Stream1 DEBUG Key:* -Stream1 DEBUG Added object 2101,"McEventInfo" -Stream1 DEBUG addItemObjects(9103,"MyTracks") called -Stream1 DEBUG Key:MyTracks -Stream1 DEBUG Added object 9103,"MyTracks" -Stream1 DEBUG Collected objects: -Stream1 DEBUG Object/count: EventInfo_McEventInfo, 7 -Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 7 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"RunEventTag") -RegStream1 DEBUG get ref for (222376821,"*") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 for requested key=* -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000006] for Stream1_derived -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000010] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=][CLID=????][TECH=0000020?][OID=00000006-00000010] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to RunEventTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"*") -AthenaEventLoopMgr INFO ===>>> done processing event #16, run #1 7 events processed so far <<<=== -EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 3 -EventSelector DEBUG record AthenaAttribute, name = Stream1_ref = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000011]. -EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000011]. -EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000011] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects -AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo -AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks -AthenaEventLoopMgr INFO ===>>> start processing event #17, run #1 7 events processed so far <<<=== -ReadData DEBUG in execute() -ReadData INFO EventStreamInfo: Number of events = 20 -ReadData INFO EventStreamInfo: ItemList: -ReadData INFO CLID = 2101, key = McEventInfo -ReadData INFO CLID = 9103, key = MyTracks -ReadData INFO CLID = 222376821, key = StreamX -ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics -ReadData INFO TagInfo: -ReadData INFO EventInfo event: 17 run: 1 -ReadData INFO Get Smart data ptr 1 -ReadData INFO Track pt = 1717.27 eta = -10.562 phi = 251.697 detector = Track made in: DummyHitDetector -ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits -ReadData INFO Could not find ExampleHitContainer/MyHits -WriteTag INFO EventInfo event: 17 run: 1 -WriteTag INFO registered all data -Stream1 DEBUG addItemObjects(2101,"*") called -Stream1 DEBUG Key:* -Stream1 DEBUG Added object 2101,"McEventInfo" -Stream1 DEBUG addItemObjects(9103,"MyTracks") called -Stream1 DEBUG Key:MyTracks -Stream1 DEBUG Added object 9103,"MyTracks" -Stream1 DEBUG Collected objects: -Stream1 DEBUG Object/count: EventInfo_McEventInfo, 8 -Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 8 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"RunEventTag") -RegStream1 DEBUG get ref for (222376821,"*") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 for requested key=* -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000007] for Stream1_derived -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000011] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=][CLID=????][TECH=0000020?][OID=00000006-00000011] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to RunEventTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"*") -AthenaEventLoopMgr INFO ===>>> done processing event #17, run #1 8 events processed so far <<<=== -EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 3 -EventSelector DEBUG record AthenaAttribute, name = Stream1_ref = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000012]. -EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000012]. -EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000012] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects -AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo -AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks -AthenaEventLoopMgr INFO ===>>> start processing event #18, run #1 8 events processed so far <<<=== -ReadData DEBUG in execute() -ReadData INFO EventStreamInfo: Number of events = 20 -ReadData INFO EventStreamInfo: ItemList: -ReadData INFO CLID = 2101, key = McEventInfo -ReadData INFO CLID = 9103, key = MyTracks -ReadData INFO CLID = 222376821, key = StreamX -ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics -ReadData INFO TagInfo: -ReadData INFO EventInfo event: 18 run: 1 -ReadData INFO Get Smart data ptr 1 -ReadData INFO Track pt = 1817.19 eta = -10.5288 phi = 266.349 detector = Track made in: DummyHitDetector -ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits -ReadData INFO Could not find ExampleHitContainer/MyHits -WriteTag INFO EventInfo event: 18 run: 1 -WriteTag INFO registered all data -Stream1 DEBUG addItemObjects(2101,"*") called -Stream1 DEBUG Key:* -Stream1 DEBUG Added object 2101,"McEventInfo" -Stream1 DEBUG addItemObjects(9103,"MyTracks") called -Stream1 DEBUG Key:MyTracks -Stream1 DEBUG Added object 9103,"MyTracks" -Stream1 DEBUG Collected objects: -Stream1 DEBUG Object/count: EventInfo_McEventInfo, 9 -Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 9 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"RunEventTag") -RegStream1 DEBUG get ref for (222376821,"*") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 for requested key=* -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000008] for Stream1_derived -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000012] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=][CLID=????][TECH=0000020?][OID=00000006-00000012] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to RunEventTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"*") -AthenaEventLoopMgr INFO ===>>> done processing event #18, run #1 9 events processed so far <<<=== -EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 3 -EventSelector DEBUG record AthenaAttribute, name = Stream1_ref = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000013]. -EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000013]. -EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000013] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects -AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo -AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks -AthenaEventLoopMgr INFO ===>>> start processing event #19, run #1 9 events processed so far <<<=== -ReadData DEBUG in execute() -ReadData INFO EventStreamInfo: Number of events = 20 -ReadData INFO EventStreamInfo: ItemList: -ReadData INFO CLID = 2101, key = McEventInfo -ReadData INFO CLID = 9103, key = MyTracks -ReadData INFO CLID = 222376821, key = StreamX -ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics -ReadData INFO TagInfo: -ReadData INFO EventInfo event: 19 run: 1 -ReadData INFO Get Smart data ptr 1 -ReadData INFO Track pt = 1917.11 eta = -10.4993 phi = 281 detector = Track made in: DummyHitDetector -ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits -ReadData INFO Could not find ExampleHitContainer/MyHits -WriteTag INFO EventInfo event: 19 run: 1 -WriteTag INFO registered all data -Stream1 DEBUG addItemObjects(2101,"*") called -Stream1 DEBUG Key:* -Stream1 DEBUG Added object 2101,"McEventInfo" -Stream1 DEBUG addItemObjects(9103,"MyTracks") called -Stream1 DEBUG Key:MyTracks -Stream1 DEBUG Added object 9103,"MyTracks" -Stream1 DEBUG Collected objects: -Stream1 DEBUG Object/count: EventInfo_McEventInfo, 10 -Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 10 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"RunEventTag") -RegStream1 DEBUG get ref for (222376821,"*") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 for requested key=* -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000009] for Stream1_derived -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000013] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=][CLID=????][TECH=0000020?][OID=00000006-00000013] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to RunEventTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"*") -AthenaEventLoopMgr INFO ===>>> done processing event #19, run #1 10 events processed so far <<<=== -MetaDataSvc DEBUG handle() EndInputFile for FID:???? -EventSelector INFO Disconnecting input sourceID: ???? -Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? -Domain[ROOT_All] INFO > Deaccess DbDomain READ [ROOT_All] -MetaDataSvc DEBUG handle() LastInputFile for end -AthenaEventLoopMgr INFO No more events in event selection -Stream1 DEBUG AthenaOutputStream Stream1 ::stop() -RegStream1.TagTool INFO Collection Events output: 10 -MetaDataSvc DEBUG MetaDataSvc::stop() -Stream1 DEBUG handle() incident type: MetaDataStop -MetaDataSvc DEBUG prepareOutput -MetaDataSvc DEBUG calling metaDataStop for ToolSvc.IOVDbMetaDataTool -Stream1 DEBUG addItemObjects(167728019,"Stream1") called -Stream1 DEBUG Key:Stream1 -Stream1 DEBUG Added object 167728019,"Stream1" -Stream1 DEBUG addItemObjects(1316383046,"*") called -Stream1 DEBUG Key:* -StorageSvc INFO Building shape according to reflection information using shape ID for: -StorageSvc INFO EventStreamInfo_p3 [????] -SimplePoolFile5... DEBUG --> Access DbContainer CREA/UPDA [ROOT_Tree] MetaData(EventStreamInfo_p3/Stream1) -MetaData(EventS... DEBUG Opening -MetaData(EventS... DEBUG attributes# = 1 -MetaData(EventS... DEBUG Branch container 'EventStreamInfo_p3_Stream1' -MetaData(EventS... DEBUG Opened container MetaData(EventStreamInfo_p3/Stream1) of type ROOT_Tree -SimplePoolFile5... DEBUG --->Adding Assoc :????/MetaData(EventStreamInfo_p3/Stream1) [20?] (7 , ffffffff) -SimplePoolFile5... DEBUG ---->ClassID:???? -SimplePoolFile5... DEBUG --->Adding Shape[4 , ????]: [1 Column(s)] -SimplePoolFile5... DEBUG ---->Class:EventStreamInfo_p3 -SimplePoolFile5... DEBUG ---->[0]:EventStreamInfo_p3 Typ:EventStreamInfo_p3 [21] Size:0 Offset:0 #Elements:1 -SimplePoolFile5... DEBUG --> Access DbContainer CREA/UPDA [ROOT_Tree] MetaDataHdrForm(DataHeaderForm) -MetaDataHdrForm... DEBUG Opening -MetaDataHdrForm... DEBUG attributes# = 1 -MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' -MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree -SimplePoolFile5... DEBUG --->Adding Assoc :????/MetaDataHdrForm(DataHeaderForm) [20?] (8 , ffffffff) -SimplePoolFile5... DEBUG ---->ClassID:???? -SimplePoolFile5... DEBUG --> Access DbContainer CREA/UPDA [ROOT_Tree] MetaDataHdr(DataHeader) -MetaDataHdr(Dat... DEBUG Opening -MetaDataHdr(Dat... DEBUG attributes# = 1 -MetaDataHdr(Dat... DEBUG Branch container 'DataHeader' -MetaDataHdr(Dat... DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree -SimplePoolFile5... DEBUG --->Adding Assoc :????/MetaDataHdr(DataHeader) [20?] (9 , ffffffff) -SimplePoolFile5... DEBUG ---->ClassID:???? -Stream1 INFO Records written: 11 -Stream1 DEBUG Leaving handle -Domain[ROOT_All] INFO -> Deaccess DbDatabase CREATE [ROOT_All] ???? -Domain[ROOT_All] INFO > Deaccess DbDomain UPDATE [ROOT_All] -ApplicationMgr INFO Application Manager Stopped successfully -IncidentProcAlg1 INFO Finalize -ReadData INFO in finalize() -WriteTag INFO in finalize() -IncidentProcAlg2 INFO Finalize -Stream1 DEBUG finalize: Optimize output -Stream1 DEBUG finalize: end optimize output -RegStream1 DEBUG In finalize -DecisionSvc INFO Finalized successfully. -AthDictLoaderSvc INFO in finalize... -ToolSvc INFO Removing all tools created by ToolSvc -EventSelector.Q... INFO in finalize() -*****Chrono***** INFO **************************************************************************************************** -*****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) -*****Chrono***** INFO **************************************************************************************************** -commitOutput INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 11 -cRep_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 32 -cObjR_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 35 -fRep_ALL INFO Time User : Tot= 20 [ms] Ave/Min/Max=0.625(+- 2.42)/ 0/ 10 [ms] #= 32 -cObj_ALL INFO Time User : Tot= 20 [ms] Ave/Min/Max=0.606(+- 2.39)/ 0/ 10 [ms] #= 33 -cRepR_ALL INFO Time User : Tot= 20 [ms] Ave/Min/Max=0.465(+- 2.11)/ 0/ 10 [ms] #= 43 -ChronoStatSvc INFO Time User : Tot= 0.66 [s] #= 1 -*****Chrono***** INFO **************************************************************************************************** -ChronoStatSvc.f... INFO Service finalized successfully -ApplicationMgr INFO Application Manager Finalized successfully -ApplicationMgr INFO Application Manager Terminated successfully -Athena INFO leaving with code 0: "successful run" diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_FilterJobOptions.py b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_FilterJobOptions.py deleted file mode 100755 index 4c32e95b3acb051d2fbdae26ac14275c3e85665c..0000000000000000000000000000000000000000 --- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_FilterJobOptions.py +++ /dev/null @@ -1,128 +0,0 @@ -## @file AthenaPoolExample_RWJobOptions.py -## @brief Example job options file to illustrate how to read/write data from/to Pool. -## @author Peter van Gemmeren <gemmeren@anl.gov> -## $Id: AthenaPoolExample_RWJobOptions.py,v 1.34 2009-03-20 15:30:21 gemmeren Exp $ -############################################################### -# -# This Job option: -# ---------------- -# 1. Reads the data (EventInfo, ExampleHits) from the SimplePoolFile1.root file -# that has been written with the AthneaPoolExample_WriteJobOptions.py -# 2. Writes SimplePoolFile3.root file with ExampleTracks using ReWriteData algorithm -# ------------------------------------------------------------ -# Expected output file (20 events): -# -rw-r--r-- 1 gemmeren zp 11395 Aug 5 17:34 SimplePoolCollection3.root -# -rw-r--r-- 1 gemmeren zp 27536 Aug 5 17:34 SimplePoolFile3.root -# ------------------------------------------------------------ -# File:SimplePoolFile3.root -# Size: 26.891 kb -# Nbr Events: 20 -# -# ================================================================================ -# Mem Size Disk Size Size/Evt MissZip/Mem items (X) Container Name (X=Tree|Branch) -# ================================================================================ -# 12.317 kb 1.429 kb 0.071 kb 0.000 20 (T) DataHeader -# -------------------------------------------------------------------------------- -# 3.846 kb 0.313 kb 0.016 kb 0.288 20 (B) EventInfo_p3_McEventInfo -# 3.001 kb 0.428 kb 0.021 kb 0.535 1 (T) MetaDataHdrDataHeaderForm -# 11.894 kb 0.794 kb 0.040 kb 0.135 20 (T) POOLContainer_DataHeaderForm -# 10.578 kb 0.903 kb 0.045 kb 0.379 1 (T) MetaDataHdrDataHeader -# 18.453 kb 1.200 kb 0.060 kb 0.383 1 (B) EventStreamInfo_p2_Stream1 -# 49.426 kb 3.881 kb 0.194 kb 0.261 20 (B) ExampleTrackContainer_p1_MyTracks -# ================================================================================ -# 109.515 kb 8.948 kb 0.447 kb 0.000 20 TOTAL (POOL containers) -# ================================================================================ -# -#============================================================== - -## basic job configuration -import AthenaCommon.AtlasUnixStandardJob - -## get a handle on the default top-level algorithm sequence -from AthenaCommon.AlgSequence import AlgSequence -topSequence = AlgSequence() -from AthenaCommon.AlgSequence import AthSequencer -regSequence = AthSequencer("AthRegSeq") - -## get a handle on the ServiceManager -from AthenaCommon.AppMgr import ServiceMgr as svcMgr - -#-------------------------------------------------------------- -# Event related parameters -#-------------------------------------------------------------- -from AthenaCommon.AppMgr import theApp -theApp.EvtMax = 200000 - -#-------------------------------------------------------------- -#--- Read portion ----- -#-------------------------------------------------------------- -import AthenaPoolCnvSvc.ReadAthenaPool - -svcMgr.EventSelector.InputCollections = [ "SimplePoolCollection3.root" ]; # ** mandatory parameter ** // The input file name -svcMgr.EventSelector.CollectionType = "ExplicitROOT" -svcMgr.AthenaPoolAddressProviderSvc.DataHeaderIterator = False - -svcMgr.EventSelector.Query = "EventNumber > 5" - -#Explicitly specify the output file catalog -svcMgr.PoolSvc.ReadCatalog = [ "file:Catalog.xml" ] -svcMgr.PoolSvc.WriteCatalog = "file:Catalog1.xml" - -from AthenaPoolExampleAlgorithms.AthenaPoolExampleAlgorithmsConf import AthPoolEx__QueryTag -QueryTag = AthPoolEx__QueryTag("QueryTag") -svcMgr.EventSelector.HelperTools = [ QueryTag ] - -#-------------------------------------------------------------- -# Private Application Configuration options -#-------------------------------------------------------------- -# Load "user algorithm" top algorithms to be run, and the libraries that house them -from AthenaPoolExampleAlgorithms.AthenaPoolExampleAlgorithmsConf import AthPoolEx__ReadData,AthPoolEx__ReWriteData -topSequence += AthPoolEx__ReadData("ReadData") - -#-------------------------------------------------------------- -#--- Secondary Write portion ----- Don't change it !!! -#-------------------------------------------------------------- -from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream -Stream1 = AthenaPoolOutputStream( "Stream1" , "SimplePoolFile5.root" ) -Stream1.ItemList += [ "ExampleTrackContainer#MyTracks" ] -Stream1.WritingTool.ProcessingTag = "Stream1_derived" - -#-------------------------------------------------------------- -# Event Collection Registration -#-------------------------------------------------------------- -from AthenaPoolExampleAlgorithms.AthenaPoolExampleAlgorithmsConf import AthPoolEx__WriteTag -topSequence += AthPoolEx__WriteTag( "WriteTag" ) - -from RegistrationServices.RegistrationServicesConf import RegistrationStreamTagTool -TagTool = RegistrationStreamTagTool("TagTool") - -from RegistrationServices.RegistrationServicesConf import RegistrationStream -RegStream1 = RegistrationStream( "RegStream1" , CollectionType="ExplicitROOT" , Tool=TagTool ) -RegStream1.WriteInputDataHeader = False -RegStream1.OutputCollection = "SimplePoolCollection5.root" -RegStream1.ItemList += [ "DataHeader#*" ] -RegStream1.ItemList += [ "TagAthenaAttributeList#RunEventTag" ] -regSequence += RegStream1 - -#-------------------------------------------------------------- -# Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL) -#-------------------------------------------------------------- -svcMgr.MessageSvc.OutputLevel = 3 -svcMgr.MessageSvc.defaultLimit = 100000 - -svcMgr.MetaDataSvc.OutputLevel = 2 -svcMgr.EventSelector.OutputLevel = 2 -svcMgr.EventSelector.HelperTools[0].OutputLevel = 3 -svcMgr.AthenaPoolAddressProviderSvc.OutputLevel = 2 -svcMgr.PoolSvc.OutputLevel = 2 -topSequence.ReadData.OutputLevel = 2 -Stream1.OutputLevel = 2 -Stream1.WritingTool.OutputLevel = 3 -Stream1.HelperTools[0].OutputLevel = 3 -RegStream1.OutputLevel = 2 -RegStream1.Tool.OutputLevel = 3 - -# -# End of job options file -# -############################################################### diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RCond.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RCond.ref index 30f640c092f5e8d4030e919f036feadc4b6c6fd7..96ba3d0902ae863fd8ad30341da5069b8fa386ab 100644 --- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RCond.ref +++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RCond.ref @@ -1,27 +1,26 @@ -Tue Feb 5 19:11:44 CET 2019 +Wed Mar 6 20:23:41 CET 2019 Preloading tcmalloc_minimal.so Athena INFO including file "AthenaCommon/Preparation.py" Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" Athena INFO executing ROOT6Setup Athena INFO including file "AthenaCommon/Execution.py" Athena INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_RCondJobOptions.py" -Py:ConfigurableDb INFO Read module info for 5456 configurables from 56 genConfDb files +Py:ConfigurableDb INFO Read module info for 5461 configurables from 48 genConfDb files Py:ConfigurableDb INFO No duplicates have been found: that's good ! Athena INFO including file "AthenaCommon/runbatch.py" -[?1034hApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 +ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 ApplicationMgr SUCCESS ==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v30r5) - running on lxplus115.cern.ch on Tue Feb 5 19:12:06 2019 + Welcome to ApplicationMgr (GaudiCoreSvc v31r0) + running on lxplus084.cern.ch on Wed Mar 6 20:23:55 2019 ==================================================================================================================================== -ApplicationMgr INFO Successfully loaded modules : AthenaServices ApplicationMgr INFO Application Manager Configured successfully ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 StatusCodeSvc INFO initialize AthDictLoaderSvc INFO in initialize... AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO getRegistryEntries: read 7037 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 3167 CLIDRegistry entries for module ALL CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00 ClassIDSvc INFO getRegistryEntries: read 836 CLIDRegistry entries for module ALL @@ -41,8 +40,8 @@ PoolSvc DEBUG Service base class initialized successfully PoolSvc INFO Set connectionsvc retry/timeout/IDLE timeout to 'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled PoolSvc INFO Frontier compression level set to 5 DBReplicaSvc INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-02-04T2257/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus115.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] +DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-05T2139/Athena/22.0.1/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config +DBReplicaSvc INFO Total of 10 servers found for host lxplus084.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] PoolSvc INFO Successfully setup replica sorting algorithm PoolSvc DEBUG OutputLevel is PoolSvc INFO Setting up APR FileCatalog and Streams @@ -58,7 +57,8 @@ EventSelector DEBUG Service base class initialized successfully EventSelector INFO reinitialization... EventSelector INFO EventSelection with query EventSelector DEBUG Try item: "SimplePoolFile1.root" from the collection list. -PersistencySvc:... DEBUG lookupPFN: SimplePoolFile1.root returned FID: '????' tech=ROOT_All +MetaDataSvc DEBUG handle() FirstInputFile for FID:???? +MetaDataSvc DEBUG initInputMetaDataStore: file name FID:???? Domain[ROOT_All] INFO -> Access DbDatabase READ [ROOT_All] ???? Domain[ROOT_All] INFO SimplePoolFile1.root SimplePoolFile1... DEBUG --> Access DbContainer READ [ROOT_All] ##Shapes @@ -74,8 +74,18 @@ SimplePoolFile1... DEBUG ---->[0]:DataHeaderForm_p5 Typ:DataHeaderForm_p5 [21] SimplePoolFile1... DEBUG --->Reading Shape[3 , ????]: [1 Column(s)] SimplePoolFile1... DEBUG ---->[0]:DataHeader_p5 Typ:DataHeader_p5 [21] Size:0 Offset:0 #Elements:1 SimplePoolFile1... DEBUG --->Reading Shape[4 , ????]: [1 Column(s)] +SimplePoolFile1... DEBUG ---->[0]:Token Typ:Token [18] Size:0 Offset:0 #Elements:1 +SimplePoolFile1... DEBUG --->Reading Shape[5 , ????]: [1 Column(s)] +SimplePoolFile1... DEBUG ---->[0]:bool Typ:bool [9] Size:0 Offset:0 #Elements:1 +SimplePoolFile1... DEBUG --->Reading Shape[6 , ????]: [1 Column(s)] +SimplePoolFile1... DEBUG ---->[0]:unsigned int Typ:unsigned int [3] Size:0 Offset:0 #Elements:1 +SimplePoolFile1... DEBUG --->Reading Shape[7 , ????]: [1 Column(s)] +SimplePoolFile1... DEBUG ---->[0]:unsigned long long Typ:unsigned long long [23] Size:0 Offset:0 #Elements:1 +SimplePoolFile1... DEBUG --->Reading Shape[8 , ????]: [1 Column(s)] +SimplePoolFile1... DEBUG ---->[0]:float Typ:float [10] Size:0 Offset:0 #Elements:1 +SimplePoolFile1... DEBUG --->Reading Shape[9 , ????]: [1 Column(s)] SimplePoolFile1... DEBUG ---->[0]:EventStreamInfo_p3 Typ:EventStreamInfo_p3 [21] Size:0 Offset:0 #Elements:1 -##Shapes DEBUG No objects passing selection criteria... Container has 5 Entries in total. +##Shapes DEBUG No objects passing selection criteria... Container has 10 Entries in total. SimplePoolFile1... DEBUG --> Access DbContainer READ [ROOT_All] ##Links ##Links DEBUG Opening ##Links DEBUG attributes# = 1 @@ -90,13 +100,39 @@ SimplePoolFile1... DEBUG --->Reading Assoc:????/POOLContainerForm(DataHeaderFor SimplePoolFile1... DEBUG ---->ClassID:???? SimplePoolFile1... DEBUG --->Reading Assoc:????/POOLContainer(DataHeader) [20?] (6 , ffffffff) SimplePoolFile1... DEBUG ---->ClassID:???? -SimplePoolFile1... DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream1) [20?] (7 , ffffffff) +SimplePoolFile1... DEBUG --->Reading Assoc:????/POOLCollectionTree(Token) [20?] (7 , ffffffff) +SimplePoolFile1... DEBUG ---->ClassID:???? +SimplePoolFile1... DEBUG --->Reading Assoc:????/POOLCollectionTree(IsSimulation) [20?] (8 , ffffffff) +SimplePoolFile1... DEBUG ---->ClassID:???? +SimplePoolFile1... DEBUG --->Reading Assoc:????/POOLCollectionTree(IsCalibration) [20?] (9 , ffffffff) +SimplePoolFile1... DEBUG ---->ClassID:???? +SimplePoolFile1... DEBUG --->Reading Assoc:????/POOLCollectionTree(IsTestBeam) [20?] (a , ffffffff) +SimplePoolFile1... DEBUG ---->ClassID:???? +SimplePoolFile1... DEBUG --->Reading Assoc:????/POOLCollectionTree(McChannel) [20?] (b , ffffffff) +SimplePoolFile1... DEBUG ---->ClassID:???? +SimplePoolFile1... DEBUG --->Reading Assoc:????/POOLCollectionTree(RunNumber) [20?] (c , ffffffff) +SimplePoolFile1... DEBUG ---->ClassID:???? +SimplePoolFile1... DEBUG --->Reading Assoc:????/POOLCollectionTree(EventNumber) [20?] (d , ffffffff) +SimplePoolFile1... DEBUG ---->ClassID:???? +SimplePoolFile1... DEBUG --->Reading Assoc:????/POOLCollectionTree(LumiBlockN) [20?] (e , ffffffff) +SimplePoolFile1... DEBUG ---->ClassID:???? +SimplePoolFile1... DEBUG --->Reading Assoc:????/POOLCollectionTree(ConditionsRun) [20?] (f , ffffffff) SimplePoolFile1... DEBUG ---->ClassID:???? -SimplePoolFile1... DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?] (8 , ffffffff) +SimplePoolFile1... DEBUG --->Reading Assoc:????/POOLCollectionTree(EventTime) [20?] (10 , ffffffff) SimplePoolFile1... DEBUG ---->ClassID:???? -SimplePoolFile1... DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?] (9 , ffffffff) +SimplePoolFile1... DEBUG --->Reading Assoc:????/POOLCollectionTree(EventTimeNanoSec) [20?] (11 , ffffffff) SimplePoolFile1... DEBUG ---->ClassID:???? -##Links DEBUG No objects passing selection criteria... Container has 8 Entries in total. +SimplePoolFile1... DEBUG --->Reading Assoc:????/POOLCollectionTree(BunchId) [20?] (12 , ffffffff) +SimplePoolFile1... DEBUG ---->ClassID:???? +SimplePoolFile1... DEBUG --->Reading Assoc:????/POOLCollectionTree(EventWeight) [20?] (13 , ffffffff) +SimplePoolFile1... DEBUG ---->ClassID:???? +SimplePoolFile1... DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream1) [20?] (14 , ffffffff) +SimplePoolFile1... DEBUG ---->ClassID:???? +SimplePoolFile1... DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?] (15 , ffffffff) +SimplePoolFile1... DEBUG ---->ClassID:???? +SimplePoolFile1... DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?] (16 , ffffffff) +SimplePoolFile1... DEBUG ---->ClassID:???? +##Links DEBUG No objects passing selection criteria... Container has 21 Entries in total. SimplePoolFile1... DEBUG --> Access DbContainer READ [ROOT_All] ##Params ##Params DEBUG Opening ##Params DEBUG attributes# = 1 @@ -106,19 +142,12 @@ SimplePoolFile1... DEBUG --->Reading Param:PFN=[SimplePoolFile1.root] SimplePoolFile1... DEBUG --->Reading Param:POOL_VSN=[1.1] SimplePoolFile1... DEBUG --->Reading Param:FORMAT_VSN=[1.1] ##Params DEBUG No objects passing selection criteria... Container has 4 Entries in total. -SimplePoolFile1... DEBUG --> Access DbContainer READ [ROOT_Tree] POOLContainer(DataHeader) -POOLContainer(D... DEBUG Opening -POOLContainer(D... DEBUG attributes# = 1 -POOLContainer(D... DEBUG Branch container 'DataHeader' -POOLContainer(D... DEBUG Opened container POOLContainer(DataHeader) of type ROOT_Tree -MetaDataSvc DEBUG handle() FirstInputFile for FID:???? -MetaDataSvc DEBUG initInputMetaDataStore: file name FID:???? SimplePoolFile1... DEBUG --> Access DbContainer READ [ROOT_Tree] MetaDataHdr(DataHeader) MetaDataHdr(Dat... DEBUG Opening MetaDataHdr(Dat... DEBUG attributes# = 1 MetaDataHdr(Dat... DEBUG Branch container 'DataHeader' MetaDataHdr(Dat... DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree -ClassIDSvc INFO getRegistryEntries: read 1798 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 2078 CLIDRegistry entries for module ALL EventPersistenc... INFO Added successfully Conversion service:AthenaPoolCnvSvc SimplePoolFile1... DEBUG --> Access DbContainer READ [ROOT_Tree] MetaDataHdrForm(DataHeaderForm) MetaDataHdrForm... DEBUG Opening @@ -176,61 +205,7 @@ ReadData DEBUG Data Deps for ReadData HistogramPersis...WARNING Histograms saving not required. AthenaEventLoopMgr INFO Setup EventSelector service EventSelector ApplicationMgr INFO Application Manager Initialized successfully -Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? EventSelector DEBUG Try item: "SimplePoolFile1.root" from the collection list. -PersistencySvc:... DEBUG lookupPFN: SimplePoolFile1.root returned FID: '????' tech=ROOT_All -Domain[ROOT_All] INFO -> Access DbDatabase READ [ROOT_All] ???? -Domain[ROOT_All] INFO SimplePoolFile1.root -SimplePoolFile1... DEBUG --> Access DbContainer READ [ROOT_All] ##Shapes -##Shapes DEBUG Opening -##Shapes DEBUG attributes# = 1 -##Shapes DEBUG Opened container ##Shapes of type ROOT_Tree -SimplePoolFile1... DEBUG --->Reading Shape[0 , ????]: [1 Column(s)] -SimplePoolFile1... DEBUG ---->[0]:EventInfo_p4 Typ:EventInfo_p4 [21] Size:0 Offset:0 #Elements:1 -SimplePoolFile1... DEBUG --->Reading Shape[1 , ????]: [1 Column(s)] -SimplePoolFile1... DEBUG ---->[0]:ExampleHitContainer_p1 Typ:ExampleHitContainer_p1 [21] Size:0 Offset:0 #Elements:1 -SimplePoolFile1... DEBUG --->Reading Shape[2 , ????]: [1 Column(s)] -SimplePoolFile1... DEBUG ---->[0]:DataHeaderForm_p5 Typ:DataHeaderForm_p5 [21] Size:0 Offset:0 #Elements:1 -SimplePoolFile1... DEBUG --->Reading Shape[3 , ????]: [1 Column(s)] -SimplePoolFile1... DEBUG ---->[0]:DataHeader_p5 Typ:DataHeader_p5 [21] Size:0 Offset:0 #Elements:1 -SimplePoolFile1... DEBUG --->Reading Shape[4 , ????]: [1 Column(s)] -SimplePoolFile1... DEBUG ---->[0]:EventStreamInfo_p3 Typ:EventStreamInfo_p3 [21] Size:0 Offset:0 #Elements:1 -##Shapes DEBUG No objects passing selection criteria... Container has 5 Entries in total. -SimplePoolFile1... DEBUG --> Access DbContainer READ [ROOT_All] ##Links -##Links DEBUG Opening -##Links DEBUG attributes# = 1 -##Links DEBUG Opened container ##Links of type ROOT_Tree -SimplePoolFile1... DEBUG --->Reading Assoc:????/##Params [200] (2 , ffffffff) -SimplePoolFile1... DEBUG ---->ClassID:???? -SimplePoolFile1... DEBUG --->Reading Assoc:????/CollectionTree(EventInfo_p4/McEventInfo) [20?] (3 , ffffffff) -SimplePoolFile1... DEBUG ---->ClassID:???? -SimplePoolFile1... DEBUG --->Reading Assoc:????/CollectionTree(ExampleHitContainer_p1/MyHits) [20?] (4 , ffffffff) -SimplePoolFile1... DEBUG ---->ClassID:???? -SimplePoolFile1... DEBUG --->Reading Assoc:????/POOLContainerForm(DataHeaderForm) [20?] (5 , ffffffff) -SimplePoolFile1... DEBUG ---->ClassID:???? -SimplePoolFile1... DEBUG --->Reading Assoc:????/POOLContainer(DataHeader) [20?] (6 , ffffffff) -SimplePoolFile1... DEBUG ---->ClassID:???? -SimplePoolFile1... DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream1) [20?] (7 , ffffffff) -SimplePoolFile1... DEBUG ---->ClassID:???? -SimplePoolFile1... DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?] (8 , ffffffff) -SimplePoolFile1... DEBUG ---->ClassID:???? -SimplePoolFile1... DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?] (9 , ffffffff) -SimplePoolFile1... DEBUG ---->ClassID:???? -##Links DEBUG No objects passing selection criteria... Container has 8 Entries in total. -SimplePoolFile1... DEBUG --> Access DbContainer READ [ROOT_All] ##Params -##Params DEBUG Opening -##Params DEBUG attributes# = 1 -##Params DEBUG Opened container ##Params of type ROOT_Tree -SimplePoolFile1... DEBUG --->Reading Param:FID=[????] -SimplePoolFile1... DEBUG --->Reading Param:PFN=[SimplePoolFile1.root] -SimplePoolFile1... DEBUG --->Reading Param:POOL_VSN=[1.1] -SimplePoolFile1... DEBUG --->Reading Param:FORMAT_VSN=[1.1] -##Params DEBUG No objects passing selection criteria... Container has 4 Entries in total. -SimplePoolFile1... DEBUG --> Access DbContainer READ [ROOT_Tree] POOLContainer(DataHeader) -POOLContainer(D... DEBUG Opening -POOLContainer(D... DEBUG attributes# = 1 -POOLContainer(D... DEBUG Branch container 'DataHeader' -POOLContainer(D... DEBUG Opened container POOLContainer(DataHeader) of type ROOT_Tree ApplicationMgr INFO Application Manager Started successfully RootDatabase.se... DEBUG Request tree cache RootDatabase.se... DEBUG File name SimplePoolFile1.root @@ -238,27 +213,28 @@ RootDatabase.se... DEBUG Got tree CollectionTree read entry -1 RootDatabase.se... DEBUG Using Tree cache. Size: -1 Nevents to learn with: -1 MetaDataSvc DEBUG handle() BeginInputFile for SimplePoolFile1.root MetaDataSvc DEBUG initInputMetaDataStore: file name SimplePoolFile1.root -SimplePoolFile1... DEBUG --> Access DbContainer READ [ROOT_Tree] MetaDataHdr(DataHeader) -MetaDataHdr(Dat... DEBUG Opening -MetaDataHdr(Dat... DEBUG attributes# = 1 -MetaDataHdr(Dat... DEBUG Branch container 'DataHeader' -MetaDataHdr(Dat... DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree ClassIDSvc INFO getRegistryEntries: read 2 CLIDRegistry entries for module ALL MetaDataSvc DEBUG Loaded input meta data store proxies MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000000]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000000]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000000] +SimplePoolFile1... DEBUG --> Access DbContainer READ [ROOT_Tree] POOLContainer(DataHeader) +POOLContainer(D... DEBUG Opening +POOLContainer(D... DEBUG attributes# = 1 +POOLContainer(D... DEBUG Branch container 'DataHeader' +POOLContainer(D... DEBUG Opened container POOLContainer(DataHeader) of type ROOT_Tree SimplePoolFile1... DEBUG --> Access DbContainer READ [ROOT_Tree] POOLContainerForm(DataHeaderForm) POOLContainerFo... DEBUG Opening POOLContainerFo... DEBUG attributes# = 1 POOLContainerFo... DEBUG Branch container 'DataHeaderForm' POOLContainerFo... DEBUG Opened container POOLContainerForm(DataHeaderForm) of type ROOT_Tree -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AlgResourcePool INFO TopAlg list empty. Recovering the one of Application Manager SimplePoolFile1... DEBUG --> Access DbContainer READ [ROOT_Tree] CollectionTree(EventInfo_p4/McEventInfo) CollectionTree(... DEBUG Opening @@ -298,6 +274,7 @@ ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -321,13 +298,14 @@ ReadData INFO Hit x = 26.9145 y = 52.2238 z = 44.9265 detector = Dum ReadData INFO Hit x = 30.1245 y = 46.5449 z = 43.831 detector = DummyHitDetector AthenaEventLoopMgr INFO ===>>> done processing event #0, run #1 1 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000001]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000001]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000001] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #1, run #1 1 events processed so far <<<=== ReadCond DEBUG in execute() ReadCond INFO Pedestal x = 193136 y = 14420 z = -175208 string = <..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o> @@ -336,6 +314,7 @@ ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -354,13 +333,14 @@ ReadData INFO Hit x = 126.915 y = 52.2238 z = -55.0735 detector = Du ReadData INFO Hit x = 130.125 y = 46.5449 z = -56.169 detector = DummyHitDetector AthenaEventLoopMgr INFO ===>>> done processing event #1, run #1 2 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000002]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000002]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000002] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #2, run #1 2 events processed so far <<<=== ReadCond DEBUG in execute() ReadCond INFO Pedestal x = 193136 y = 14420 z = -175208 string = <..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o> @@ -369,6 +349,7 @@ ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -387,13 +368,14 @@ ReadData INFO Hit x = 226.915 y = 52.2238 z = -155.073 detector = Du ReadData INFO Hit x = 230.125 y = 46.5449 z = -156.169 detector = DummyHitDetector AthenaEventLoopMgr INFO ===>>> done processing event #2, run #1 3 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000003]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000003]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000003] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #3, run #1 3 events processed so far <<<=== ReadCond DEBUG in execute() ReadCond INFO Pedestal x = 193136 y = 14420 z = -175208 string = <..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o> @@ -402,6 +384,7 @@ ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -420,13 +403,14 @@ ReadData INFO Hit x = 326.915 y = 52.2238 z = -255.073 detector = Du ReadData INFO Hit x = 330.125 y = 46.5449 z = -256.169 detector = DummyHitDetector AthenaEventLoopMgr INFO ===>>> done processing event #3, run #1 4 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000004]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000004]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000004] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #4, run #1 4 events processed so far <<<=== ReadCond DEBUG in execute() ReadCond INFO Pedestal x = 193136 y = 14420 z = -175208 string = <..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o> @@ -435,6 +419,7 @@ ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -453,13 +438,14 @@ ReadData INFO Hit x = 426.915 y = 52.2238 z = -355.073 detector = Du ReadData INFO Hit x = 430.125 y = 46.5449 z = -356.169 detector = DummyHitDetector AthenaEventLoopMgr INFO ===>>> done processing event #4, run #1 5 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000005]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000005]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000005] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #5, run #1 5 events processed so far <<<=== ReadCond DEBUG in execute() ReadCond INFO Pedestal x = 193136 y = 14420 z = -175208 string = <..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o> @@ -468,6 +454,7 @@ ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -486,13 +473,14 @@ ReadData INFO Hit x = 526.914 y = 52.2238 z = -455.073 detector = Du ReadData INFO Hit x = 530.125 y = 46.5449 z = -456.169 detector = DummyHitDetector AthenaEventLoopMgr INFO ===>>> done processing event #5, run #1 6 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000006]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000006]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000006] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #6, run #1 6 events processed so far <<<=== ReadCond DEBUG in execute() ReadCond INFO Pedestal x = 193136 y = 14420 z = -175208 string = <..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o> @@ -501,6 +489,7 @@ ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -519,13 +508,14 @@ ReadData INFO Hit x = 626.914 y = 52.2238 z = -555.073 detector = Du ReadData INFO Hit x = 630.125 y = 46.5449 z = -556.169 detector = DummyHitDetector AthenaEventLoopMgr INFO ===>>> done processing event #6, run #1 7 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000007]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000007]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000007] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #7, run #1 7 events processed so far <<<=== ReadCond DEBUG in execute() ReadCond INFO Pedestal x = 193136 y = 14420 z = -175208 string = <..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o> @@ -534,6 +524,7 @@ ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -552,13 +543,14 @@ ReadData INFO Hit x = 726.914 y = 52.2238 z = -655.073 detector = Du ReadData INFO Hit x = 730.125 y = 46.5449 z = -656.169 detector = DummyHitDetector AthenaEventLoopMgr INFO ===>>> done processing event #7, run #1 8 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000008]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000008]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000008] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #8, run #1 8 events processed so far <<<=== ReadCond DEBUG in execute() ReadCond INFO Pedestal x = 193136 y = 14420 z = -175208 string = <..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o> @@ -567,6 +559,7 @@ ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -585,13 +578,14 @@ ReadData INFO Hit x = 826.914 y = 52.2238 z = -755.073 detector = Du ReadData INFO Hit x = 830.125 y = 46.5449 z = -756.169 detector = DummyHitDetector AthenaEventLoopMgr INFO ===>>> done processing event #8, run #1 9 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000009]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000009]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000009] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #9, run #1 9 events processed so far <<<=== ReadCond DEBUG in execute() ReadCond INFO Pedestal x = 193136 y = 14420 z = -175208 string = <..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o> @@ -600,6 +594,7 @@ ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -618,13 +613,14 @@ ReadData INFO Hit x = 926.914 y = 52.2238 z = -855.073 detector = Du ReadData INFO Hit x = 930.125 y = 46.5449 z = -856.169 detector = DummyHitDetector AthenaEventLoopMgr INFO ===>>> done processing event #9, run #1 10 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000A]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000A]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000A] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #10, run #1 10 events processed so far <<<=== ReadCond DEBUG in execute() ReadCond INFO Pedestal x = 193136 y = 14420 z = -175208 string = <..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o> @@ -633,6 +629,7 @@ ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -651,13 +648,14 @@ ReadData INFO Hit x = 1026.91 y = 52.2238 z = -955.073 detector = Du ReadData INFO Hit x = 1030.12 y = 46.5449 z = -956.169 detector = DummyHitDetector AthenaEventLoopMgr INFO ===>>> done processing event #10, run #1 11 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000B]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000B]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000B] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #11, run #1 11 events processed so far <<<=== ReadCond DEBUG in execute() ReadCond INFO Pedestal x = 193136 y = 14420 z = -175208 string = <..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o> @@ -666,6 +664,7 @@ ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -684,13 +683,14 @@ ReadData INFO Hit x = 1126.91 y = 52.2238 z = -1055.07 detector = Du ReadData INFO Hit x = 1130.12 y = 46.5449 z = -1056.17 detector = DummyHitDetector AthenaEventLoopMgr INFO ===>>> done processing event #11, run #1 12 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000C]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000C]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000C] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #12, run #1 12 events processed so far <<<=== ReadCond DEBUG in execute() ReadCond INFO Pedestal x = 193136 y = 14420 z = -175208 string = <..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o> @@ -699,6 +699,7 @@ ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -717,13 +718,14 @@ ReadData INFO Hit x = 1226.91 y = 52.2238 z = -1155.07 detector = Du ReadData INFO Hit x = 1230.12 y = 46.5449 z = -1156.17 detector = DummyHitDetector AthenaEventLoopMgr INFO ===>>> done processing event #12, run #1 13 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000D]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000D]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000D] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #13, run #1 13 events processed so far <<<=== ReadCond DEBUG in execute() ReadCond INFO Pedestal x = 193136 y = 14420 z = -175208 string = <..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o> @@ -732,6 +734,7 @@ ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -750,13 +753,14 @@ ReadData INFO Hit x = 1326.91 y = 52.2238 z = -1255.07 detector = Du ReadData INFO Hit x = 1330.12 y = 46.5449 z = -1256.17 detector = DummyHitDetector AthenaEventLoopMgr INFO ===>>> done processing event #13, run #1 14 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000E]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000E]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000E] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #14, run #1 14 events processed so far <<<=== ReadCond DEBUG in execute() ReadCond INFO Pedestal x = 193136 y = 14420 z = -175208 string = <..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o> @@ -765,6 +769,7 @@ ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -783,13 +788,14 @@ ReadData INFO Hit x = 1426.91 y = 52.2238 z = -1355.07 detector = Du ReadData INFO Hit x = 1430.12 y = 46.5449 z = -1356.17 detector = DummyHitDetector AthenaEventLoopMgr INFO ===>>> done processing event #14, run #1 15 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000F]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000F]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000F] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #15, run #1 15 events processed so far <<<=== ReadCond DEBUG in execute() ReadCond INFO Pedestal x = 193136 y = 14420 z = -175208 string = <..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o> @@ -798,6 +804,7 @@ ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -816,13 +823,14 @@ ReadData INFO Hit x = 1526.91 y = 52.2238 z = -1455.07 detector = Du ReadData INFO Hit x = 1530.12 y = 46.5449 z = -1456.17 detector = DummyHitDetector AthenaEventLoopMgr INFO ===>>> done processing event #15, run #1 16 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000010]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000010]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000010] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #16, run #1 16 events processed so far <<<=== ReadCond DEBUG in execute() ReadCond INFO Pedestal x = 193136 y = 14420 z = -175208 string = <..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o> @@ -831,6 +839,7 @@ ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -849,13 +858,14 @@ ReadData INFO Hit x = 1626.91 y = 52.2238 z = -1555.07 detector = Du ReadData INFO Hit x = 1630.12 y = 46.5449 z = -1556.17 detector = DummyHitDetector AthenaEventLoopMgr INFO ===>>> done processing event #16, run #1 17 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000011]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000011]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000011] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #17, run #1 17 events processed so far <<<=== ReadCond DEBUG in execute() ReadCond INFO Pedestal x = 193136 y = 14420 z = -175208 string = <..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o> @@ -864,6 +874,7 @@ ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -882,13 +893,14 @@ ReadData INFO Hit x = 1726.91 y = 52.2238 z = -1655.07 detector = Du ReadData INFO Hit x = 1730.12 y = 46.5449 z = -1656.17 detector = DummyHitDetector AthenaEventLoopMgr INFO ===>>> done processing event #17, run #1 18 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000012]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000012]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000012] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #18, run #1 18 events processed so far <<<=== ReadCond DEBUG in execute() ReadCond INFO Pedestal x = 193136 y = 14420 z = -175208 string = <..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o> @@ -897,6 +909,7 @@ ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -915,13 +928,14 @@ ReadData INFO Hit x = 1826.91 y = 52.2238 z = -1755.07 detector = Du ReadData INFO Hit x = 1830.12 y = 46.5449 z = -1756.17 detector = DummyHitDetector AthenaEventLoopMgr INFO ===>>> done processing event #18, run #1 19 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000013]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000013]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000013] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #19, run #1 19 events processed so far <<<=== ReadCond DEBUG in execute() ReadCond INFO Pedestal x = 193136 y = 14420 z = -175208 string = <..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o> @@ -930,6 +944,7 @@ ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -947,9 +962,9 @@ ReadData INFO Hit x = 1923.7 y = 57.9027 z = -1853.68 detector = Dum ReadData INFO Hit x = 1926.91 y = 52.2238 z = -1855.07 detector = DummyHitDetector ReadData INFO Hit x = 1930.12 y = 46.5449 z = -1856.17 detector = DummyHitDetector AthenaEventLoopMgr INFO ===>>> done processing event #19, run #1 20 events processed so far <<<=== -Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? MetaDataSvc DEBUG handle() EndInputFile for FID:???? EventSelector INFO Disconnecting input sourceID: ???? +Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? MetaDataSvc DEBUG handle() LastInputFile for end AthenaEventLoopMgr INFO No more events in event selection MetaDataSvc DEBUG MetaDataSvc::stop() @@ -966,9 +981,9 @@ ToolSvc INFO Removing all tools created by ToolSvc *****Chrono***** INFO **************************************************************************************************** *****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) *****Chrono***** INFO **************************************************************************************************** -cObjR_ALL INFO Time User : Tot= 10 [ms] Ave/Min/Max=0.204(+- 1.41)/ 0/ 10 [ms] #= 49 -cObj_ALL INFO Time User : Tot= 40 [ms] Ave/Min/Max= 0.87(+- 3.51)/ 0/ 20 [ms] #= 46 -ChronoStatSvc INFO Time User : Tot= 0.95 [s] #= 1 +cObjR_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 49 +cObj_ALL INFO Time User : Tot= 30 [ms] Ave/Min/Max=0.652(+- 2.47)/ 0/ 10 [ms] #= 46 +ChronoStatSvc INFO Time User : Tot= 0.54 [s] #= 1 *****Chrono***** INFO **************************************************************************************************** ChronoStatSvc.f... INFO Service finalized successfully ApplicationMgr INFO Application Manager Finalized successfully diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RFilter.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RFilter.ref deleted file mode 100644 index ef70f13f8c9685dc2501d1655ccb78d7994d4860..0000000000000000000000000000000000000000 --- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RFilter.ref +++ /dev/null @@ -1,343 +0,0 @@ -Tue Feb 5 19:07:43 CET 2019 -Preloading tcmalloc_minimal.so -Athena INFO including file "AthenaCommon/Preparation.py" -Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" -Athena INFO executing ROOT6Setup -Athena INFO including file "AthenaCommon/Execution.py" -Athena INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_RFilterJobOptions.py" -Py:ConfigurableDb INFO Read module info for 5456 configurables from 56 genConfDb files -Py:ConfigurableDb INFO No duplicates have been found: that's good ! -Athena INFO including file "AthenaCommon/runbatch.py" -[?1034hApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 -ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 -ApplicationMgr SUCCESS -==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v30r5) - running on lxplus115.cern.ch on Tue Feb 5 19:08:23 2019 -==================================================================================================================================== -ApplicationMgr INFO Successfully loaded modules : AthenaServices -ApplicationMgr INFO Application Manager Configured successfully -ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 -StatusCodeSvc INFO initialize -AthDictLoaderSvc INFO in initialize... -AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO getRegistryEntries: read 7037 CLIDRegistry entries for module ALL -CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) -AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00 -ClassIDSvc INFO getRegistryEntries: read 836 CLIDRegistry entries for module ALL -ReadData DEBUG Property update for OutputLevel : new value = 2 -ReadData INFO in initialize() -MetaDataSvc DEBUG Property update for OutputLevel : new value = 2 -MetaDataSvc INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00 -MetaDataSvc DEBUG Service base class initialized successfully -AthenaPoolCnvSvc INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00 -PoolSvc DEBUG Property update for OutputLevel : new value = 2 -PoolSvc DEBUG Service base class initialized successfully -PoolSvc INFO Set connectionsvc retry/timeout/IDLE timeout to 'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled -PoolSvc INFO Frontier compression level set to 5 -DBReplicaSvc INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-02-04T2257/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus115.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] -PoolSvc INFO Successfully setup replica sorting algorithm -PoolSvc DEBUG OutputLevel is -PoolSvc INFO Setting up APR FileCatalog and Streams -PoolSvc DEBUG POOL ReadCatalog is file:Catalog.xml -PoolSvc DEBUG POOL ReadCatalog is file:Catalog1.xml -PoolSvc INFO POOL WriteCatalog is file:Catalog2.xml -DbSession INFO Open DbSession -Domain[ROOT_All] INFO > Access DbDomain READ [ROOT_All] -MetaDataSvc INFO Found MetaDataTools = PublicToolHandleArray(['IOVDbMetaDataTool']) -EventSelector DEBUG Property update for OutputLevel : new value = 2 -EventSelector INFO Initializing EventSelector - package version EventSelectorAthenaPool-00-00-00 -EventSelector DEBUG Service base class initialized successfully -EventSelector INFO reinitialization... -EventSelector INFO EventSelection with query EventNumber > 9 -EventSelector DEBUG Try item: "SimplePoolCollection5.root" from the collection list. -EventSelector INFO Using standard collection ref -AthenaPoolAddre... DEBUG Property update for OutputLevel : new value = 2 -AthenaPoolAddre... DEBUG Service base class initialized successfully -ReadData DEBUG input handles: 2 -ReadData DEBUG output handles: 0 -ReadData DEBUG Data Deps for ReadData - + INPUT ( 'ExampleHitContainer' , 'StoreGateSvc+MyHits' ) - + INPUT ( 'ExampleTrackContainer' , 'StoreGateSvc+MyTracks' ) -HistogramPersis...WARNING Histograms saving not required. -AthenaEventLoopMgr INFO Setup EventSelector service EventSelector -ApplicationMgr INFO Application Manager Initialized successfully -EventSelector DEBUG Try item: "SimplePoolCollection5.root" from the collection list. -ApplicationMgr INFO Application Manager Started successfully -EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 2 -EventSelector DEBUG record AthenaAttribute, name = Stream1_derived_ref = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000000]. -EventSelector DEBUG record AthenaAttribute, name = Stream1_ref = [DB=????][CNT=][CLID=????][TECH=0000020?][OID=00000006-0000000A]. -EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000000]. -EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000000] -EventPersistenc... INFO Added successfully Conversion service:AthenaPoolCnvSvc -Domain[ROOT_All] INFO -> Access DbDatabase READ [ROOT_All] ???? -Domain[ROOT_All] INFO SimplePoolFile5.root -SimplePoolFile5... DEBUG --> Access DbContainer READ [ROOT_All] ##Shapes -##Shapes DEBUG Opening -##Shapes DEBUG attributes# = 1 -##Shapes DEBUG Opened container ##Shapes of type ROOT_Tree -SimplePoolFile5... DEBUG --->Reading Shape[0 , ????]: [1 Column(s)] -SimplePoolFile5... DEBUG ---->[0]:EventInfo_p4 Typ:EventInfo_p4 [21] Size:0 Offset:0 #Elements:1 -SimplePoolFile5... DEBUG --->Reading Shape[1 , ????]: [1 Column(s)] -SimplePoolFile5... DEBUG ---->[0]:ExampleTrackContainer_p1 Typ:ExampleTrackContainer_p1 [21] Size:0 Offset:0 #Elements:1 -SimplePoolFile5... DEBUG --->Reading Shape[2 , ????]: [1 Column(s)] -SimplePoolFile5... DEBUG ---->[0]:DataHeaderForm_p5 Typ:DataHeaderForm_p5 [21] Size:0 Offset:0 #Elements:1 -SimplePoolFile5... DEBUG --->Reading Shape[3 , ????]: [1 Column(s)] -SimplePoolFile5... DEBUG ---->[0]:DataHeader_p5 Typ:DataHeader_p5 [21] Size:0 Offset:0 #Elements:1 -SimplePoolFile5... DEBUG --->Reading Shape[4 , ????]: [1 Column(s)] -SimplePoolFile5... DEBUG ---->[0]:EventStreamInfo_p3 Typ:EventStreamInfo_p3 [21] Size:0 Offset:0 #Elements:1 -##Shapes DEBUG No objects passing selection criteria... Container has 5 Entries in total. -SimplePoolFile5... DEBUG --> Access DbContainer READ [ROOT_All] ##Links -##Links DEBUG Opening -##Links DEBUG attributes# = 1 -##Links DEBUG Opened container ##Links of type ROOT_Tree -SimplePoolFile5... DEBUG --->Reading Assoc:????/##Params [200] (2 , ffffffff) -SimplePoolFile5... DEBUG ---->ClassID:???? -SimplePoolFile5... DEBUG --->Reading Assoc:????/CollectionTree(EventInfo_p4/McEventInfo) [20?] (3 , ffffffff) -SimplePoolFile5... DEBUG ---->ClassID:???? -SimplePoolFile5... DEBUG --->Reading Assoc:????/CollectionTree(ExampleTrackContainer_p1/MyTracks) [20?] (4 , ffffffff) -SimplePoolFile5... DEBUG ---->ClassID:???? -SimplePoolFile5... DEBUG --->Reading Assoc:????/POOLContainerForm(DataHeaderForm) [20?] (5 , ffffffff) -SimplePoolFile5... DEBUG ---->ClassID:???? -SimplePoolFile5... DEBUG --->Reading Assoc:????/POOLContainer(DataHeader) [20?] (6 , ffffffff) -SimplePoolFile5... DEBUG ---->ClassID:???? -SimplePoolFile5... DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream1) [20?] (7 , ffffffff) -SimplePoolFile5... DEBUG ---->ClassID:???? -SimplePoolFile5... DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?] (8 , ffffffff) -SimplePoolFile5... DEBUG ---->ClassID:???? -SimplePoolFile5... DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?] (9 , ffffffff) -SimplePoolFile5... DEBUG ---->ClassID:???? -##Links DEBUG No objects passing selection criteria... Container has 8 Entries in total. -SimplePoolFile5... DEBUG --> Access DbContainer READ [ROOT_All] ##Params -##Params DEBUG Opening -##Params DEBUG attributes# = 1 -##Params DEBUG Opened container ##Params of type ROOT_Tree -SimplePoolFile5... DEBUG --->Reading Param:FID=[????] -SimplePoolFile5... DEBUG --->Reading Param:PFN=[SimplePoolFile5.root] -SimplePoolFile5... DEBUG --->Reading Param:POOL_VSN=[1.1] -SimplePoolFile5... DEBUG --->Reading Param:FORMAT_VSN=[1.1] -##Params DEBUG No objects passing selection criteria... Container has 4 Entries in total. -SimplePoolFile5... DEBUG --> Access DbContainer READ [ROOT_Tree] POOLContainer(DataHeader) -POOLContainer(D... DEBUG Opening -POOLContainer(D... DEBUG attributes# = 1 -POOLContainer(D... DEBUG Branch container 'DataHeader' -POOLContainer(D... DEBUG Opened container POOLContainer(DataHeader) of type ROOT_Tree -SimplePoolFile5... DEBUG --> Access DbContainer READ [ROOT_Tree] POOLContainerForm(DataHeaderForm) -POOLContainerFo... DEBUG Opening -POOLContainerFo... DEBUG attributes# = 1 -POOLContainerFo... DEBUG Branch container 'DataHeaderForm' -POOLContainerFo... DEBUG Opened container POOLContainerForm(DataHeaderForm) of type ROOT_Tree -AthenaPoolAddre... DEBUG The current Event contains: 3 objects -AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo -AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks -AlgResourcePool INFO TopAlg list empty. Recovering the one of Application Manager -SimplePoolFile5... DEBUG --> Access DbContainer READ [ROOT_Tree] CollectionTree(EventInfo_p4/McEventInfo) -CollectionTree(... DEBUG Opening -CollectionTree(... DEBUG attributes# = 1 -CollectionTree(... DEBUG Branch container 'EventInfo_p4_McEventInfo' -CollectionTree(... DEBUG Opened container CollectionTree(EventInfo_p4/McEventInfo) of type ROOT_Tree -AthenaPoolConve... INFO massageEventInfo: unable to get OverrideRunNumberFromInput property from EventSelector -AthenaEventLoopMgr INFO ===>>> start of run 1 <<<=== -AthenaEventLoopMgr INFO ===>>> start processing event #10, run #1 0 events processed so far <<<=== -ReadData DEBUG in execute() -ClassIDSvc INFO getRegistryEntries: read 1815 CLIDRegistry entries for module ALL -ReadData WARNING Could not find EventStreamInfo -ReadData INFO EventInfo event: 10 run: 1 -ReadData INFO Get Smart data ptr 1 -SimplePoolFile5... DEBUG --> Access DbContainer READ [ROOT_Tree] CollectionTree(ExampleTrackContainer_p1/MyTracks) -CollectionTree(... DEBUG Opening -CollectionTree(... DEBUG attributes# = 1 -CollectionTree(... DEBUG Branch container 'ExampleTrackContainer_p1_MyTracks' -CollectionTree(... DEBUG Opened container CollectionTree(ExampleTrackContainer_p1/MyTracks) of type ROOT_Tree -ReadData INFO Track pt = 1018.38 eta = -11.0052 phi = 149.134 detector = Track made in: DummyHitDetector -ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits -ReadData INFO Could not find ExampleHitContainer/MyHits -AthenaEventLoopMgr INFO ===>>> done processing event #10, run #1 1 events processed so far <<<=== -EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 2 -EventSelector DEBUG record AthenaAttribute, name = Stream1_derived_ref = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000001]. -EventSelector DEBUG record AthenaAttribute, name = Stream1_ref = [DB=????][CNT=][CLID=????][TECH=0000020?][OID=00000006-0000000B]. -EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000001]. -EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000001] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects -AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo -AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks -AthenaEventLoopMgr INFO ===>>> start processing event #11, run #1 1 events processed so far <<<=== -ReadData DEBUG in execute() -ClassIDSvc INFO getRegistryEntries: read 10 CLIDRegistry entries for module ALL -ReadData WARNING Could not find EventStreamInfo -ReadData INFO EventInfo event: 11 run: 1 -ReadData INFO Get Smart data ptr 1 -ReadData INFO Track pt = 1118.13 eta = -10.9031 phi = 163.786 detector = Track made in: DummyHitDetector -ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits -ReadData INFO Could not find ExampleHitContainer/MyHits -AthenaEventLoopMgr INFO ===>>> done processing event #11, run #1 2 events processed so far <<<=== -EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 2 -EventSelector DEBUG record AthenaAttribute, name = Stream1_derived_ref = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000002]. -EventSelector DEBUG record AthenaAttribute, name = Stream1_ref = [DB=????][CNT=][CLID=????][TECH=0000020?][OID=00000006-0000000C]. -EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000002]. -EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000002] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects -AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo -AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks -AthenaEventLoopMgr INFO ===>>> start processing event #12, run #1 2 events processed so far <<<=== -ReadData DEBUG in execute() -ReadData WARNING Could not find EventStreamInfo -ReadData INFO EventInfo event: 12 run: 1 -ReadData INFO Get Smart data ptr 1 -ReadData INFO Track pt = 1217.93 eta = -10.82 phi = 178.438 detector = Track made in: DummyHitDetector -ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits -ReadData INFO Could not find ExampleHitContainer/MyHits -AthenaEventLoopMgr INFO ===>>> done processing event #12, run #1 3 events processed so far <<<=== -EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 2 -EventSelector DEBUG record AthenaAttribute, name = Stream1_derived_ref = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000003]. -EventSelector DEBUG record AthenaAttribute, name = Stream1_ref = [DB=????][CNT=][CLID=????][TECH=0000020?][OID=00000006-0000000D]. -EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000003]. -EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000003] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects -AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo -AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks -AthenaEventLoopMgr INFO ===>>> start processing event #13, run #1 3 events processed so far <<<=== -ReadData DEBUG in execute() -ReadData WARNING Could not find EventStreamInfo -ReadData INFO EventInfo event: 13 run: 1 -ReadData INFO Get Smart data ptr 1 -ReadData INFO Track pt = 1317.76 eta = -10.751 phi = 193.09 detector = Track made in: DummyHitDetector -ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits -ReadData INFO Could not find ExampleHitContainer/MyHits -AthenaEventLoopMgr INFO ===>>> done processing event #13, run #1 4 events processed so far <<<=== -EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 2 -EventSelector DEBUG record AthenaAttribute, name = Stream1_derived_ref = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000004]. -EventSelector DEBUG record AthenaAttribute, name = Stream1_ref = [DB=????][CNT=][CLID=????][TECH=0000020?][OID=00000006-0000000E]. -EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000004]. -EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000004] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects -AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo -AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks -AthenaEventLoopMgr INFO ===>>> start processing event #14, run #1 4 events processed so far <<<=== -ReadData DEBUG in execute() -ReadData WARNING Could not find EventStreamInfo -ReadData INFO EventInfo event: 14 run: 1 -ReadData INFO Get Smart data ptr 1 -ReadData INFO Track pt = 1417.61 eta = -10.6927 phi = 207.741 detector = Track made in: DummyHitDetector -ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits -ReadData INFO Could not find ExampleHitContainer/MyHits -AthenaEventLoopMgr INFO ===>>> done processing event #14, run #1 5 events processed so far <<<=== -EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 2 -EventSelector DEBUG record AthenaAttribute, name = Stream1_derived_ref = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000005]. -EventSelector DEBUG record AthenaAttribute, name = Stream1_ref = [DB=????][CNT=][CLID=????][TECH=0000020?][OID=00000006-0000000F]. -EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000005]. -EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000005] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects -AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo -AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks -AthenaEventLoopMgr INFO ===>>> start processing event #15, run #1 5 events processed so far <<<=== -ReadData DEBUG in execute() -ReadData WARNING Could not find EventStreamInfo -ReadData INFO EventInfo event: 15 run: 1 -ReadData INFO Get Smart data ptr 1 -ReadData INFO Track pt = 1517.49 eta = -10.6429 phi = 222.393 detector = Track made in: DummyHitDetector -ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits -ReadData INFO Could not find ExampleHitContainer/MyHits -AthenaEventLoopMgr INFO ===>>> done processing event #15, run #1 6 events processed so far <<<=== -EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 2 -EventSelector DEBUG record AthenaAttribute, name = Stream1_derived_ref = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000006]. -EventSelector DEBUG record AthenaAttribute, name = Stream1_ref = [DB=????][CNT=][CLID=????][TECH=0000020?][OID=00000006-00000010]. -EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000006]. -EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000006] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects -AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo -AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks -AthenaEventLoopMgr INFO ===>>> start processing event #16, run #1 6 events processed so far <<<=== -ReadData DEBUG in execute() -ReadData WARNING Could not find EventStreamInfo -ReadData INFO EventInfo event: 16 run: 1 -ReadData INFO Get Smart data ptr 1 -ReadData INFO Track pt = 1617.37 eta = -10.5997 phi = 237.045 detector = Track made in: DummyHitDetector -ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits -ReadData INFO Could not find ExampleHitContainer/MyHits -AthenaEventLoopMgr INFO ===>>> done processing event #16, run #1 7 events processed so far <<<=== -EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 2 -EventSelector DEBUG record AthenaAttribute, name = Stream1_derived_ref = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000007]. -EventSelector DEBUG record AthenaAttribute, name = Stream1_ref = [DB=????][CNT=][CLID=????][TECH=0000020?][OID=00000006-00000011]. -EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000007]. -EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000007] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects -AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo -AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks -AthenaEventLoopMgr INFO ===>>> start processing event #17, run #1 7 events processed so far <<<=== -ReadData DEBUG in execute() -ReadData WARNING Could not find EventStreamInfo -ReadData INFO EventInfo event: 17 run: 1 -ReadData INFO Get Smart data ptr 1 -ReadData INFO Track pt = 1717.27 eta = -10.562 phi = 251.697 detector = Track made in: DummyHitDetector -ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits -ReadData INFO Could not find ExampleHitContainer/MyHits -AthenaEventLoopMgr INFO ===>>> done processing event #17, run #1 8 events processed so far <<<=== -EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 2 -EventSelector DEBUG record AthenaAttribute, name = Stream1_derived_ref = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000008]. -EventSelector DEBUG record AthenaAttribute, name = Stream1_ref = [DB=????][CNT=][CLID=????][TECH=0000020?][OID=00000006-00000012]. -EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000008]. -EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000008] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects -AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo -AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks -AthenaEventLoopMgr INFO ===>>> start processing event #18, run #1 8 events processed so far <<<=== -ReadData DEBUG in execute() -ReadData WARNING Could not find EventStreamInfo -ReadData INFO EventInfo event: 18 run: 1 -ReadData INFO Get Smart data ptr 1 -ReadData INFO Track pt = 1817.19 eta = -10.5288 phi = 266.349 detector = Track made in: DummyHitDetector -ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits -ReadData INFO Could not find ExampleHitContainer/MyHits -AthenaEventLoopMgr INFO ===>>> done processing event #18, run #1 9 events processed so far <<<=== -EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 2 -EventSelector DEBUG record AthenaAttribute, name = Stream1_derived_ref = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000009]. -EventSelector DEBUG record AthenaAttribute, name = Stream1_ref = [DB=????][CNT=][CLID=????][TECH=0000020?][OID=00000006-00000013]. -EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000009]. -EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000009] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects -AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo -AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks -AthenaEventLoopMgr INFO ===>>> start processing event #19, run #1 9 events processed so far <<<=== -ReadData DEBUG in execute() -ReadData WARNING Could not find EventStreamInfo -ReadData INFO EventInfo event: 19 run: 1 -ReadData INFO Get Smart data ptr 1 -ReadData INFO Track pt = 1917.11 eta = -10.4993 phi = 281 detector = Track made in: DummyHitDetector -ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits -ReadData INFO Could not find ExampleHitContainer/MyHits -AthenaEventLoopMgr INFO ===>>> done processing event #19, run #1 10 events processed so far <<<=== -EventSelector INFO Disconnecting input sourceID: ???? -Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? -Domain[ROOT_All] INFO > Deaccess DbDomain READ [ROOT_All] -AthenaEventLoopMgr INFO No more events in event selection -MetaDataSvc DEBUG MetaDataSvc::stop() -ApplicationMgr INFO Application Manager Stopped successfully -IncidentProcAlg1 INFO Finalize -ReadData INFO in finalize() -IncidentProcAlg2 INFO Finalize -AthDictLoaderSvc INFO in finalize... -ToolSvc INFO Removing all tools created by ToolSvc -*****Chrono***** INFO **************************************************************************************************** -*****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) -*****Chrono***** INFO **************************************************************************************************** -cObjR_ALL INFO Time User : Tot= 90 [ms] Ave/Min/Max= 4.09(+- 18.7)/ 0/ 90 [ms] #= 22 -cObj_ALL INFO Time User : Tot= 130 [ms] Ave/Min/Max= 6.19(+- 21.5)/ 0/ 100 [ms] #= 21 -ChronoStatSvc INFO Time User : Tot= 1.04 [s] #= 1 -*****Chrono***** INFO **************************************************************************************************** -ChronoStatSvc.f... INFO Service finalized successfully -ApplicationMgr INFO Application Manager Finalized successfully -ApplicationMgr INFO Application Manager Terminated successfully -Athena INFO leaving with code 0: "successful run" diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RFilterJobOptions.py b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RFilterJobOptions.py deleted file mode 100755 index cf2c6a6adb91148d35380dbeef4a7b58bd08a199..0000000000000000000000000000000000000000 --- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RFilterJobOptions.py +++ /dev/null @@ -1,99 +0,0 @@ -## @file AthenaPoolExample_RWJobOptions.py -## @brief Example job options file to illustrate how to read/write data from/to Pool. -## @author Peter van Gemmeren <gemmeren@anl.gov> -## $Id: AthenaPoolExample_RWJobOptions.py,v 1.34 2009-03-20 15:30:21 gemmeren Exp $ -############################################################### -# -# This Job option: -# ---------------- -# 1. Reads the data (EventInfo, ExampleHits) from the SimplePoolFile1.root file -# that has been written with the AthneaPoolExample_WriteJobOptions.py -# 2. Writes SimplePoolFile3.root file with ExampleTracks using ReWriteData algorithm -# ------------------------------------------------------------ -# Expected output file (20 events): -# -rw-r--r-- 1 gemmeren zp 11395 Aug 5 17:34 SimplePoolCollection3.root -# -rw-r--r-- 1 gemmeren zp 27536 Aug 5 17:34 SimplePoolFile3.root -# ------------------------------------------------------------ -# File:SimplePoolFile3.root -# Size: 26.891 kb -# Nbr Events: 20 -# -# ================================================================================ -# Mem Size Disk Size Size/Evt MissZip/Mem items (X) Container Name (X=Tree|Branch) -# ================================================================================ -# 12.317 kb 1.429 kb 0.071 kb 0.000 20 (T) DataHeader -# -------------------------------------------------------------------------------- -# 3.846 kb 0.313 kb 0.016 kb 0.288 20 (B) EventInfo_p3_McEventInfo -# 3.001 kb 0.428 kb 0.021 kb 0.535 1 (T) MetaDataHdrDataHeaderForm -# 11.894 kb 0.794 kb 0.040 kb 0.135 20 (T) POOLContainer_DataHeaderForm -# 10.578 kb 0.903 kb 0.045 kb 0.379 1 (T) MetaDataHdrDataHeader -# 18.453 kb 1.200 kb 0.060 kb 0.383 1 (B) EventStreamInfo_p2_Stream1 -# 49.426 kb 3.881 kb 0.194 kb 0.261 20 (B) ExampleTrackContainer_p1_MyTracks -# ================================================================================ -# 109.515 kb 8.948 kb 0.447 kb 0.000 20 TOTAL (POOL containers) -# ================================================================================ -# -#============================================================== - -## basic job configuration -import AthenaCommon.AtlasUnixStandardJob - -## get a handle on the default top-level algorithm sequence -from AthenaCommon.AlgSequence import AlgSequence -topSequence = AlgSequence() - -## get a handle on the ServiceManager -from AthenaCommon.AppMgr import ServiceMgr as svcMgr - -#-------------------------------------------------------------- -# Event related parameters -#-------------------------------------------------------------- -from AthenaCommon.AppMgr import theApp -theApp.EvtMax = 200000 - -#-------------------------------------------------------------- -#--- Read portion ----- -#-------------------------------------------------------------- -import AthenaPoolCnvSvc.ReadAthenaPool - -svcMgr.EventSelector.InputCollections = [ "SimplePoolCollection5.root" ]; # ** mandatory parameter ** // The input file name -svcMgr.EventSelector.CollectionType = "ExplicitROOT" -#svcMgr.EventSelector.DerivedRefName = "Stream1_derived" - -svcMgr.EventSelector.Query = "EventNumber > 9" -svcMgr.EventSelector.ProcessMetadata = False - -#Explicitly specify the output file catalog -svcMgr.PoolSvc.ReadCatalog = [ "file:Catalog.xml" ] -svcMgr.PoolSvc.ReadCatalog += [ "file:Catalog1.xml" ] -svcMgr.PoolSvc.WriteCatalog = "file:Catalog2.xml" - -#from EventSelectorAthenaPool.EventSelectorAthenaPoolConf import TagRemappingTool -#TagRemappingTool = TagRemappingTool("TagRemappingTool") -#TagRemappingTool.JoinListKey = "Stream1_ref" -#TagRemappingTool.TargetTagFile = "SimplePoolCollection5.root" -#svcMgr.EventSelector.HelperTools = [ TagRemappingTool ] - -#-------------------------------------------------------------- -# Private Application Configuration options -#-------------------------------------------------------------- -# Load "user algorithm" top algorithms to be run, and the libraries that house them -from AthenaPoolExampleAlgorithms.AthenaPoolExampleAlgorithmsConf import AthPoolEx__ReadData,AthPoolEx__ReWriteData -topSequence += AthPoolEx__ReadData("ReadData") - -#-------------------------------------------------------------- -# Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL) -#-------------------------------------------------------------- -svcMgr.MessageSvc.OutputLevel = 3 -svcMgr.MessageSvc.defaultLimit = 100000 - -svcMgr.MetaDataSvc.OutputLevel = 2 -svcMgr.EventSelector.OutputLevel = 2 -svcMgr.AthenaPoolAddressProviderSvc.OutputLevel = 2 -svcMgr.PoolSvc.OutputLevel = 2 -topSequence.ReadData.OutputLevel = 2 - -# -# End of job options file -# -############################################################### diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RMeta.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RMeta.ref index 27cca5d130f9f2007d21da0ed078e296f4932003..c73bae045a3111d27ee251ac24a2a7c02b6ef700 100644 --- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RMeta.ref +++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RMeta.ref @@ -1,27 +1,26 @@ -Tue Feb 5 18:44:02 CET 2019 +Wed Mar 6 20:06:52 CET 2019 Preloading tcmalloc_minimal.so Athena INFO including file "AthenaCommon/Preparation.py" Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" Athena INFO executing ROOT6Setup Athena INFO including file "AthenaCommon/Execution.py" Athena INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_RMetaJobOptions.py" -Py:ConfigurableDb INFO Read module info for 5456 configurables from 56 genConfDb files +Py:ConfigurableDb INFO Read module info for 5461 configurables from 48 genConfDb files Py:ConfigurableDb INFO No duplicates have been found: that's good ! Athena INFO including file "AthenaCommon/runbatch.py" -[?1034hApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 +ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 ApplicationMgr SUCCESS ==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v30r5) - running on lxplus115.cern.ch on Tue Feb 5 18:44:16 2019 + Welcome to ApplicationMgr (GaudiCoreSvc v31r0) + running on lxplus084.cern.ch on Wed Mar 6 20:07:03 2019 ==================================================================================================================================== -ApplicationMgr INFO Successfully loaded modules : AthenaServices ApplicationMgr INFO Application Manager Configured successfully ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 StatusCodeSvc INFO initialize AthDictLoaderSvc INFO in initialize... AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO getRegistryEntries: read 7037 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 3167 CLIDRegistry entries for module ALL CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00 ClassIDSvc INFO getRegistryEntries: read 836 CLIDRegistry entries for module ALL @@ -38,8 +37,8 @@ PoolSvc INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.x PoolSvc INFO Set connectionsvc retry/timeout/IDLE timeout to 'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled PoolSvc INFO Frontier compression level set to 5 DBReplicaSvc INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-02-04T2257/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus115.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] +DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-05T2139/Athena/22.0.1/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config +DBReplicaSvc INFO Total of 10 servers found for host lxplus084.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] PoolSvc INFO Successfully setup replica sorting algorithm PoolSvc DEBUG OutputLevel is PoolSvc INFO Setting up APR FileCatalog and Streams @@ -55,7 +54,8 @@ EventSelector DEBUG Service base class initialized successfully EventSelector INFO reinitialization... EventSelector INFO EventSelection with query EventSelector DEBUG Try item: "SimplePoolFile5.root" from the collection list. -PersistencySvc:... DEBUG lookupPFN: SimplePoolFile5.root returned FID: '????' tech=ROOT_All +MetaDataSvc DEBUG handle() FirstInputFile for FID:???? +MetaDataSvc DEBUG initInputMetaDataStore: file name FID:???? Domain[ROOT_All] INFO -> Access DbDatabase READ [ROOT_All] ???? Domain[ROOT_All] INFO SimplePoolFile5.root SimplePoolFile5... DEBUG --> Access DbContainer READ [ROOT_All] ##Shapes @@ -71,8 +71,18 @@ SimplePoolFile5... DEBUG ---->[0]:DataHeaderForm_p5 Typ:DataHeaderForm_p5 [21] SimplePoolFile5... DEBUG --->Reading Shape[3 , ????]: [1 Column(s)] SimplePoolFile5... DEBUG ---->[0]:DataHeader_p5 Typ:DataHeader_p5 [21] Size:0 Offset:0 #Elements:1 SimplePoolFile5... DEBUG --->Reading Shape[4 , ????]: [1 Column(s)] +SimplePoolFile5... DEBUG ---->[0]:Token Typ:Token [18] Size:0 Offset:0 #Elements:1 +SimplePoolFile5... DEBUG --->Reading Shape[5 , ????]: [1 Column(s)] +SimplePoolFile5... DEBUG ---->[0]:bool Typ:bool [9] Size:0 Offset:0 #Elements:1 +SimplePoolFile5... DEBUG --->Reading Shape[6 , ????]: [1 Column(s)] +SimplePoolFile5... DEBUG ---->[0]:unsigned int Typ:unsigned int [3] Size:0 Offset:0 #Elements:1 +SimplePoolFile5... DEBUG --->Reading Shape[7 , ????]: [1 Column(s)] +SimplePoolFile5... DEBUG ---->[0]:unsigned long long Typ:unsigned long long [23] Size:0 Offset:0 #Elements:1 +SimplePoolFile5... DEBUG --->Reading Shape[8 , ????]: [1 Column(s)] +SimplePoolFile5... DEBUG ---->[0]:float Typ:float [10] Size:0 Offset:0 #Elements:1 +SimplePoolFile5... DEBUG --->Reading Shape[9 , ????]: [1 Column(s)] SimplePoolFile5... DEBUG ---->[0]:EventStreamInfo_p3 Typ:EventStreamInfo_p3 [21] Size:0 Offset:0 #Elements:1 -##Shapes DEBUG No objects passing selection criteria... Container has 5 Entries in total. +##Shapes DEBUG No objects passing selection criteria... Container has 10 Entries in total. SimplePoolFile5... DEBUG --> Access DbContainer READ [ROOT_All] ##Links ##Links DEBUG Opening ##Links DEBUG attributes# = 1 @@ -87,15 +97,41 @@ SimplePoolFile5... DEBUG --->Reading Assoc:????/POOLContainerForm(DataHeaderFor SimplePoolFile5... DEBUG ---->ClassID:???? SimplePoolFile5... DEBUG --->Reading Assoc:????/POOLContainer(DataHeader) [20?] (6 , ffffffff) SimplePoolFile5... DEBUG ---->ClassID:???? -SimplePoolFile5... DEBUG --->Reading Assoc:????/MetaData(ExampleHitContainer_p1/PedestalWriteData) [20?] (7 , ffffffff) +SimplePoolFile5... DEBUG --->Reading Assoc:????/POOLCollectionTree(Token) [20?] (7 , ffffffff) +SimplePoolFile5... DEBUG ---->ClassID:???? +SimplePoolFile5... DEBUG --->Reading Assoc:????/POOLCollectionTree(IsSimulation) [20?] (8 , ffffffff) +SimplePoolFile5... DEBUG ---->ClassID:???? +SimplePoolFile5... DEBUG --->Reading Assoc:????/POOLCollectionTree(IsCalibration) [20?] (9 , ffffffff) +SimplePoolFile5... DEBUG ---->ClassID:???? +SimplePoolFile5... DEBUG --->Reading Assoc:????/POOLCollectionTree(IsTestBeam) [20?] (a , ffffffff) +SimplePoolFile5... DEBUG ---->ClassID:???? +SimplePoolFile5... DEBUG --->Reading Assoc:????/POOLCollectionTree(McChannel) [20?] (b , ffffffff) +SimplePoolFile5... DEBUG ---->ClassID:???? +SimplePoolFile5... DEBUG --->Reading Assoc:????/POOLCollectionTree(RunNumber) [20?] (c , ffffffff) +SimplePoolFile5... DEBUG ---->ClassID:???? +SimplePoolFile5... DEBUG --->Reading Assoc:????/POOLCollectionTree(EventNumber) [20?] (d , ffffffff) +SimplePoolFile5... DEBUG ---->ClassID:???? +SimplePoolFile5... DEBUG --->Reading Assoc:????/POOLCollectionTree(LumiBlockN) [20?] (e , ffffffff) +SimplePoolFile5... DEBUG ---->ClassID:???? +SimplePoolFile5... DEBUG --->Reading Assoc:????/POOLCollectionTree(ConditionsRun) [20?] (f , ffffffff) +SimplePoolFile5... DEBUG ---->ClassID:???? +SimplePoolFile5... DEBUG --->Reading Assoc:????/POOLCollectionTree(EventTime) [20?] (10 , ffffffff) SimplePoolFile5... DEBUG ---->ClassID:???? -SimplePoolFile5... DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream1) [20?] (8 , ffffffff) +SimplePoolFile5... DEBUG --->Reading Assoc:????/POOLCollectionTree(EventTimeNanoSec) [20?] (11 , ffffffff) SimplePoolFile5... DEBUG ---->ClassID:???? -SimplePoolFile5... DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?] (9 , ffffffff) +SimplePoolFile5... DEBUG --->Reading Assoc:????/POOLCollectionTree(BunchId) [20?] (12 , ffffffff) SimplePoolFile5... DEBUG ---->ClassID:???? -SimplePoolFile5... DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?] (a , ffffffff) +SimplePoolFile5... DEBUG --->Reading Assoc:????/POOLCollectionTree(EventWeight) [20?] (13 , ffffffff) SimplePoolFile5... DEBUG ---->ClassID:???? -##Links DEBUG No objects passing selection criteria... Container has 9 Entries in total. +SimplePoolFile5... DEBUG --->Reading Assoc:????/MetaData(ExampleHitContainer_p1/PedestalWriteData) [20?] (14 , ffffffff) +SimplePoolFile5... DEBUG ---->ClassID:???? +SimplePoolFile5... DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream1) [20?] (15 , ffffffff) +SimplePoolFile5... DEBUG ---->ClassID:???? +SimplePoolFile5... DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?] (16 , ffffffff) +SimplePoolFile5... DEBUG ---->ClassID:???? +SimplePoolFile5... DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?] (17 , ffffffff) +SimplePoolFile5... DEBUG ---->ClassID:???? +##Links DEBUG No objects passing selection criteria... Container has 22 Entries in total. SimplePoolFile5... DEBUG --> Access DbContainer READ [ROOT_All] ##Params ##Params DEBUG Opening ##Params DEBUG attributes# = 1 @@ -105,19 +141,12 @@ SimplePoolFile5... DEBUG --->Reading Param:PFN=[SimplePoolFile5.root] SimplePoolFile5... DEBUG --->Reading Param:POOL_VSN=[1.1] SimplePoolFile5... DEBUG --->Reading Param:FORMAT_VSN=[1.1] ##Params DEBUG No objects passing selection criteria... Container has 4 Entries in total. -SimplePoolFile5... DEBUG --> Access DbContainer READ [ROOT_Tree] POOLContainer(DataHeader) -POOLContainer(D... DEBUG Opening -POOLContainer(D... DEBUG attributes# = 1 -POOLContainer(D... DEBUG Branch container 'DataHeader' -POOLContainer(D... DEBUG Opened container POOLContainer(DataHeader) of type ROOT_Tree -MetaDataSvc DEBUG handle() FirstInputFile for FID:???? -MetaDataSvc DEBUG initInputMetaDataStore: file name FID:???? SimplePoolFile5... DEBUG --> Access DbContainer READ [ROOT_Tree] MetaDataHdr(DataHeader) MetaDataHdr(Dat... DEBUG Opening MetaDataHdr(Dat... DEBUG attributes# = 1 MetaDataHdr(Dat... DEBUG Branch container 'DataHeader' MetaDataHdr(Dat... DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree -ClassIDSvc INFO getRegistryEntries: read 1798 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 2078 CLIDRegistry entries for module ALL EventPersistenc... INFO Added successfully Conversion service:AthenaPoolCnvSvc SimplePoolFile5... DEBUG --> Access DbContainer READ [ROOT_Tree] MetaDataHdrForm(DataHeaderForm) MetaDataHdrForm... DEBUG Opening @@ -135,66 +164,7 @@ ReadData DEBUG Data Deps for ReadData HistogramPersis...WARNING Histograms saving not required. AthenaEventLoopMgr INFO Setup EventSelector service EventSelector ApplicationMgr INFO Application Manager Initialized successfully -Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? -Domain[ROOT_All] INFO > Deaccess DbDomain READ [ROOT_All] EventSelector DEBUG Try item: "SimplePoolFile5.root" from the collection list. -PersistencySvc:... DEBUG lookupPFN: SimplePoolFile5.root returned FID: '????' tech=ROOT_All -DbSession INFO Open DbSession -Domain[ROOT_All] INFO > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] INFO -> Access DbDatabase READ [ROOT_All] ???? -Domain[ROOT_All] INFO SimplePoolFile5.root -SimplePoolFile5... DEBUG --> Access DbContainer READ [ROOT_All] ##Shapes -##Shapes DEBUG Opening -##Shapes DEBUG attributes# = 1 -##Shapes DEBUG Opened container ##Shapes of type ROOT_Tree -SimplePoolFile5... DEBUG --->Reading Shape[0 , ????]: [1 Column(s)] -SimplePoolFile5... DEBUG ---->[0]:EventInfo_p4 Typ:EventInfo_p4 [21] Size:0 Offset:0 #Elements:1 -SimplePoolFile5... DEBUG --->Reading Shape[1 , ????]: [1 Column(s)] -SimplePoolFile5... DEBUG ---->[0]:ExampleHitContainer_p1 Typ:ExampleHitContainer_p1 [21] Size:0 Offset:0 #Elements:1 -SimplePoolFile5... DEBUG --->Reading Shape[2 , ????]: [1 Column(s)] -SimplePoolFile5... DEBUG ---->[0]:DataHeaderForm_p5 Typ:DataHeaderForm_p5 [21] Size:0 Offset:0 #Elements:1 -SimplePoolFile5... DEBUG --->Reading Shape[3 , ????]: [1 Column(s)] -SimplePoolFile5... DEBUG ---->[0]:DataHeader_p5 Typ:DataHeader_p5 [21] Size:0 Offset:0 #Elements:1 -SimplePoolFile5... DEBUG --->Reading Shape[4 , ????]: [1 Column(s)] -SimplePoolFile5... DEBUG ---->[0]:EventStreamInfo_p3 Typ:EventStreamInfo_p3 [21] Size:0 Offset:0 #Elements:1 -##Shapes DEBUG No objects passing selection criteria... Container has 5 Entries in total. -SimplePoolFile5... DEBUG --> Access DbContainer READ [ROOT_All] ##Links -##Links DEBUG Opening -##Links DEBUG attributes# = 1 -##Links DEBUG Opened container ##Links of type ROOT_Tree -SimplePoolFile5... DEBUG --->Reading Assoc:????/##Params [200] (2 , ffffffff) -SimplePoolFile5... DEBUG ---->ClassID:???? -SimplePoolFile5... DEBUG --->Reading Assoc:????/CollectionTree(EventInfo_p4/McEventInfo) [20?] (3 , ffffffff) -SimplePoolFile5... DEBUG ---->ClassID:???? -SimplePoolFile5... DEBUG --->Reading Assoc:????/CollectionTree(ExampleHitContainer_p1/MyHits) [20?] (4 , ffffffff) -SimplePoolFile5... DEBUG ---->ClassID:???? -SimplePoolFile5... DEBUG --->Reading Assoc:????/POOLContainerForm(DataHeaderForm) [20?] (5 , ffffffff) -SimplePoolFile5... DEBUG ---->ClassID:???? -SimplePoolFile5... DEBUG --->Reading Assoc:????/POOLContainer(DataHeader) [20?] (6 , ffffffff) -SimplePoolFile5... DEBUG ---->ClassID:???? -SimplePoolFile5... DEBUG --->Reading Assoc:????/MetaData(ExampleHitContainer_p1/PedestalWriteData) [20?] (7 , ffffffff) -SimplePoolFile5... DEBUG ---->ClassID:???? -SimplePoolFile5... DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream1) [20?] (8 , ffffffff) -SimplePoolFile5... DEBUG ---->ClassID:???? -SimplePoolFile5... DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?] (9 , ffffffff) -SimplePoolFile5... DEBUG ---->ClassID:???? -SimplePoolFile5... DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?] (a , ffffffff) -SimplePoolFile5... DEBUG ---->ClassID:???? -##Links DEBUG No objects passing selection criteria... Container has 9 Entries in total. -SimplePoolFile5... DEBUG --> Access DbContainer READ [ROOT_All] ##Params -##Params DEBUG Opening -##Params DEBUG attributes# = 1 -##Params DEBUG Opened container ##Params of type ROOT_Tree -SimplePoolFile5... DEBUG --->Reading Param:FID=[????] -SimplePoolFile5... DEBUG --->Reading Param:PFN=[SimplePoolFile5.root] -SimplePoolFile5... DEBUG --->Reading Param:POOL_VSN=[1.1] -SimplePoolFile5... DEBUG --->Reading Param:FORMAT_VSN=[1.1] -##Params DEBUG No objects passing selection criteria... Container has 4 Entries in total. -SimplePoolFile5... DEBUG --> Access DbContainer READ [ROOT_Tree] POOLContainer(DataHeader) -POOLContainer(D... DEBUG Opening -POOLContainer(D... DEBUG attributes# = 1 -POOLContainer(D... DEBUG Branch container 'DataHeader' -POOLContainer(D... DEBUG Opened container POOLContainer(DataHeader) of type ROOT_Tree ApplicationMgr INFO Application Manager Started successfully RootDatabase.se... DEBUG Request tree cache RootDatabase.se... DEBUG File name SimplePoolFile5.root @@ -202,11 +172,6 @@ RootDatabase.se... DEBUG Got tree CollectionTree read entry -1 RootDatabase.se... DEBUG Using Tree cache. Size: -1 Nevents to learn with: -1 MetaDataSvc DEBUG handle() BeginInputFile for SimplePoolFile5.root MetaDataSvc DEBUG initInputMetaDataStore: file name SimplePoolFile5.root -SimplePoolFile5... DEBUG --> Access DbContainer READ [ROOT_Tree] MetaDataHdr(DataHeader) -MetaDataHdr(Dat... DEBUG Opening -MetaDataHdr(Dat... DEBUG attributes# = 1 -MetaDataHdr(Dat... DEBUG Branch container 'DataHeader' -MetaDataHdr(Dat... DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree ClassIDSvc INFO getRegistryEntries: read 2 CLIDRegistry entries for module ALL MetaDataSvc DEBUG Loaded input meta data store proxies MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool @@ -218,18 +183,24 @@ MetaData(Exampl... DEBUG Branch container 'ExampleHitContainer_p1_PedestalWrite MetaData(Exampl... DEBUG Opened container MetaData(ExampleHitContainer_p1/PedestalWriteData) of type ROOT_Tree ToolSvc.AthPool... INFO Pedestal x = 193136 y = -5580.01 z = -175208 string = <..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o..........o> EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000000]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000000]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000000] +SimplePoolFile5... DEBUG --> Access DbContainer READ [ROOT_Tree] POOLContainer(DataHeader) +POOLContainer(D... DEBUG Opening +POOLContainer(D... DEBUG attributes# = 1 +POOLContainer(D... DEBUG Branch container 'DataHeader' +POOLContainer(D... DEBUG Opened container POOLContainer(DataHeader) of type ROOT_Tree SimplePoolFile5... DEBUG --> Access DbContainer READ [ROOT_Tree] POOLContainerForm(DataHeaderForm) POOLContainerFo... DEBUG Opening POOLContainerFo... DEBUG attributes# = 1 POOLContainerFo... DEBUG Branch container 'DataHeaderForm' POOLContainerFo... DEBUG Opened container POOLContainerForm(DataHeaderForm) of type ROOT_Tree -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AlgResourcePool INFO TopAlg list empty. Recovering the one of Application Manager SimplePoolFile5... DEBUG --> Access DbContainer READ [ROOT_Tree] CollectionTree(EventInfo_p4/McEventInfo) CollectionTree(... DEBUG Opening @@ -249,6 +220,7 @@ ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -272,19 +244,21 @@ ReadData INFO Hit x = 26.9145 y = -47.7762 z = 44.9265 detector = Du ReadData INFO Hit x = 30.1245 y = -53.4551 z = 43.831 detector = DummyHitDetector AthenaEventLoopMgr INFO ===>>> done processing event #0, run #0 1 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000001]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000001]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000001] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #1, run #0 1 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -303,19 +277,21 @@ ReadData INFO Hit x = 126.915 y = -47.7762 z = -55.0735 detector = D ReadData INFO Hit x = 130.125 y = -53.4551 z = -56.169 detector = DummyHitDetector AthenaEventLoopMgr INFO ===>>> done processing event #1, run #0 2 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000002]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000002]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000002] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #2, run #0 2 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -334,19 +310,21 @@ ReadData INFO Hit x = 226.915 y = -47.7762 z = -155.073 detector = D ReadData INFO Hit x = 230.125 y = -53.4551 z = -156.169 detector = DummyHitDetector AthenaEventLoopMgr INFO ===>>> done processing event #2, run #0 3 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000003]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000003]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000003] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #3, run #0 3 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -365,19 +343,21 @@ ReadData INFO Hit x = 326.915 y = -47.7762 z = -255.073 detector = D ReadData INFO Hit x = 330.125 y = -53.4551 z = -256.169 detector = DummyHitDetector AthenaEventLoopMgr INFO ===>>> done processing event #3, run #0 4 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000004]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000004]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000004] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #4, run #0 4 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -396,19 +376,21 @@ ReadData INFO Hit x = 426.915 y = -47.7762 z = -355.073 detector = D ReadData INFO Hit x = 430.125 y = -53.4551 z = -356.169 detector = DummyHitDetector AthenaEventLoopMgr INFO ===>>> done processing event #4, run #0 5 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000005]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000005]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000005] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #5, run #0 5 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -427,19 +409,21 @@ ReadData INFO Hit x = 526.914 y = -47.7762 z = -455.073 detector = D ReadData INFO Hit x = 530.125 y = -53.4551 z = -456.169 detector = DummyHitDetector AthenaEventLoopMgr INFO ===>>> done processing event #5, run #0 6 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000006]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000006]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000006] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #6, run #0 6 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -458,19 +442,21 @@ ReadData INFO Hit x = 626.914 y = -47.7762 z = -555.073 detector = D ReadData INFO Hit x = 630.125 y = -53.4551 z = -556.169 detector = DummyHitDetector AthenaEventLoopMgr INFO ===>>> done processing event #6, run #0 7 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000007]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000007]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000007] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #7, run #0 7 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -489,19 +475,21 @@ ReadData INFO Hit x = 726.914 y = -47.7762 z = -655.073 detector = D ReadData INFO Hit x = 730.125 y = -53.4551 z = -656.169 detector = DummyHitDetector AthenaEventLoopMgr INFO ===>>> done processing event #7, run #0 8 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000008]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000008]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000008] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #8, run #0 8 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -520,19 +508,21 @@ ReadData INFO Hit x = 826.914 y = -47.7762 z = -755.073 detector = D ReadData INFO Hit x = 830.125 y = -53.4551 z = -756.169 detector = DummyHitDetector AthenaEventLoopMgr INFO ===>>> done processing event #8, run #0 9 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000009]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000009]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000009] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #9, run #0 9 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -551,19 +541,21 @@ ReadData INFO Hit x = 926.914 y = -47.7762 z = -855.073 detector = D ReadData INFO Hit x = 930.125 y = -53.4551 z = -856.169 detector = DummyHitDetector AthenaEventLoopMgr INFO ===>>> done processing event #9, run #0 10 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000A]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000A]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000A] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #10, run #0 10 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -582,19 +574,21 @@ ReadData INFO Hit x = 1026.91 y = -47.7762 z = -955.073 detector = D ReadData INFO Hit x = 1030.12 y = -53.4551 z = -956.169 detector = DummyHitDetector AthenaEventLoopMgr INFO ===>>> done processing event #10, run #0 11 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000B]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000B]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000B] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #11, run #0 11 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -613,19 +607,21 @@ ReadData INFO Hit x = 1126.91 y = -47.7762 z = -1055.07 detector = D ReadData INFO Hit x = 1130.12 y = -53.4551 z = -1056.17 detector = DummyHitDetector AthenaEventLoopMgr INFO ===>>> done processing event #11, run #0 12 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000C]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000C]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000C] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #12, run #0 12 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -644,19 +640,21 @@ ReadData INFO Hit x = 1226.91 y = -47.7762 z = -1155.07 detector = D ReadData INFO Hit x = 1230.12 y = -53.4551 z = -1156.17 detector = DummyHitDetector AthenaEventLoopMgr INFO ===>>> done processing event #12, run #0 13 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000D]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000D]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000D] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #13, run #0 13 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -675,19 +673,21 @@ ReadData INFO Hit x = 1326.91 y = -47.7762 z = -1255.07 detector = D ReadData INFO Hit x = 1330.12 y = -53.4551 z = -1256.17 detector = DummyHitDetector AthenaEventLoopMgr INFO ===>>> done processing event #13, run #0 14 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000E]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000E]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000E] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #14, run #0 14 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -706,19 +706,21 @@ ReadData INFO Hit x = 1426.91 y = -47.7762 z = -1355.07 detector = D ReadData INFO Hit x = 1430.12 y = -53.4551 z = -1356.17 detector = DummyHitDetector AthenaEventLoopMgr INFO ===>>> done processing event #14, run #0 15 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000F]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000F]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000F] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #15, run #0 15 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -737,19 +739,21 @@ ReadData INFO Hit x = 1526.91 y = -47.7762 z = -1455.07 detector = D ReadData INFO Hit x = 1530.12 y = -53.4551 z = -1456.17 detector = DummyHitDetector AthenaEventLoopMgr INFO ===>>> done processing event #15, run #0 16 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000010]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000010]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000010] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #16, run #0 16 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -768,19 +772,21 @@ ReadData INFO Hit x = 1626.91 y = -47.7762 z = -1555.07 detector = D ReadData INFO Hit x = 1630.12 y = -53.4551 z = -1556.17 detector = DummyHitDetector AthenaEventLoopMgr INFO ===>>> done processing event #16, run #0 17 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000011]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000011]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000011] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #17, run #0 17 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -799,19 +805,21 @@ ReadData INFO Hit x = 1726.91 y = -47.7762 z = -1655.07 detector = D ReadData INFO Hit x = 1730.12 y = -53.4551 z = -1656.17 detector = DummyHitDetector AthenaEventLoopMgr INFO ===>>> done processing event #17, run #0 18 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000012]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000012]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000012] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #18, run #0 18 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -830,19 +838,21 @@ ReadData INFO Hit x = 1826.91 y = -47.7762 z = -1755.07 detector = D ReadData INFO Hit x = 1830.12 y = -53.4551 z = -1756.17 detector = DummyHitDetector AthenaEventLoopMgr INFO ===>>> done processing event #18, run #0 19 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000013]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000013]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000013] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #19, run #0 19 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -860,10 +870,10 @@ ReadData INFO Hit x = 1923.7 y = -42.0973 z = -1853.68 detector = Du ReadData INFO Hit x = 1926.91 y = -47.7762 z = -1855.07 detector = DummyHitDetector ReadData INFO Hit x = 1930.12 y = -53.4551 z = -1856.17 detector = DummyHitDetector AthenaEventLoopMgr INFO ===>>> done processing event #19, run #0 20 events processed so far <<<=== -Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? -Domain[ROOT_All] INFO > Deaccess DbDomain READ [ROOT_All] MetaDataSvc DEBUG handle() EndInputFile for FID:???? EventSelector INFO Disconnecting input sourceID: ???? +Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? +Domain[ROOT_All] INFO > Deaccess DbDomain READ [ROOT_All] MetaDataSvc DEBUG handle() LastInputFile for end AthenaEventLoopMgr INFO No more events in event selection MetaDataSvc DEBUG MetaDataSvc::stop() @@ -877,9 +887,9 @@ ToolSvc.AthPool... INFO in finalize() *****Chrono***** INFO **************************************************************************************************** *****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) *****Chrono***** INFO **************************************************************************************************** -cObjR_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 47 -cObj_ALL INFO Time User : Tot= 40 [ms] Ave/Min/Max=0.889(+- 4.12)/ 0/ 20 [ms] #= 45 -ChronoStatSvc INFO Time User : Tot= 0.94 [s] #= 1 +cObjR_ALL INFO Time User : Tot= 10 [ms] Ave/Min/Max=0.213(+- 1.44)/ 0/ 10 [ms] #= 47 +cObj_ALL INFO Time User : Tot= 20 [ms] Ave/Min/Max=0.444(+- 2.06)/ 0/ 10 [ms] #= 45 +ChronoStatSvc INFO Time User : Tot= 0.55 [s] #= 1 *****Chrono***** INFO **************************************************************************************************** ChronoStatSvc.f... INFO Service finalized successfully ApplicationMgr INFO Application Manager Finalized successfully diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RWJobOptions.py b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RWJobOptions.py index d2ce1a0825b0fe5155a07d1169b5df642abcf1de..ef363d22b760aff49b4294a41ee549da9b2a45ec 100755 --- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RWJobOptions.py +++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RWJobOptions.py @@ -11,7 +11,6 @@ # 2. Writes SimplePoolFile3.root file with ExampleTracks using ReWriteData algorithm # ------------------------------------------------------------ # Expected output file (20 events): -# -rw-r--r-- 1 gemmeren zp 11395 Aug 5 17:34 SimplePoolCollection3.root # -rw-r--r-- 1 gemmeren zp 27536 Aug 5 17:34 SimplePoolFile3.root # ------------------------------------------------------------ # File:SimplePoolFile3.root @@ -41,8 +40,6 @@ import AthenaCommon.AtlasUnixStandardJob ## get a handle on the default top-level algorithm sequence from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() -from AthenaCommon.AlgSequence import AthSequencer -regSequence = AthSequencer("AthRegSeq") ## get a handle on the ServiceManager from AthenaCommon.AppMgr import ServiceMgr as svcMgr @@ -98,20 +95,6 @@ StreamerSvc = AthenaRootStreamerSvc() StreamerSvc.Streamers += [ "ExampleHitStreamer_p0" ] svcMgr += StreamerSvc -#-------------------------------------------------------------- -# Event Collection Registration -#-------------------------------------------------------------- -from RegistrationServices.RegistrationServicesConf import RegistrationStreamTagTool -TagTool = RegistrationStreamTagTool("TagTool") - -from RegistrationServices.RegistrationServicesConf import RegistrationStream -RegStream1 = RegistrationStream( "RegStream1" , CollectionType="ExplicitROOT" , Tool=TagTool ) -RegStream1.WriteInputDataHeader = False -RegStream1.OutputCollection = "SimplePoolCollection3.root" -RegStream1.ItemList += [ "DataHeader#Stream1" ] -RegStream1.ItemList += [ "TagAthenaAttributeList#" + MagicWriteTag.Key ] -regSequence += RegStream1 - #-------------------------------------------------------------- # Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL) #-------------------------------------------------------------- @@ -128,8 +111,6 @@ topSequence.ReWriteData.OutputLevel = 2 Stream1.OutputLevel = 2 Stream1.WritingTool.OutputLevel = 3 Stream1.HelperTools[0].OutputLevel = 3 -RegStream1.OutputLevel = 2 -RegStream1.Tool.OutputLevel = 3 # # End of job options file diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWrite.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWrite.ref index a109d3d6499128c69db000c238845eec1c77355c..792b1e656e9581d7eed9ab75bbd037abb8e7c3bc 100644 --- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWrite.ref +++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWrite.ref @@ -1,30 +1,30 @@ -Tue Feb 5 18:40:02 CET 2019 +Thu Mar 7 20:09:55 CET 2019 Preloading tcmalloc_minimal.so Athena INFO including file "AthenaCommon/Preparation.py" Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" Athena INFO executing ROOT6Setup Athena INFO including file "AthenaCommon/Execution.py" Athena INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_RWJobOptions.py" -Py:ConfigurableDb INFO Read module info for 5456 configurables from 56 genConfDb files +Py:ConfigurableDb INFO Read module info for 5462 configurables from 48 genConfDb files Py:ConfigurableDb INFO No duplicates have been found: that's good ! Athena INFO including file "AthenaCommon/runbatch.py" -[?1034hApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 +ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 ApplicationMgr SUCCESS ==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v30r5) - running on lxplus115.cern.ch on Tue Feb 5 18:40:15 2019 + Welcome to ApplicationMgr (GaudiCoreSvc v31r0) + running on lxplus084.cern.ch on Thu Mar 7 20:10:05 2019 ==================================================================================================================================== -ApplicationMgr INFO Successfully loaded modules : AthenaServices ApplicationMgr INFO Application Manager Configured successfully ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 StatusCodeSvc INFO initialize AthDictLoaderSvc INFO in initialize... AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO getRegistryEntries: read 7037 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 3167 CLIDRegistry entries for module ALL CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00 ClassIDSvc INFO getRegistryEntries: read 836 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 345 CLIDRegistry entries for module ALL ReadData DEBUG Property update for OutputLevel : new value = 2 ReadData INFO in initialize() MetaDataSvc DEBUG Property update for OutputLevel : new value = 2 @@ -37,8 +37,8 @@ PoolSvc DEBUG Service base class initialized successfully PoolSvc INFO Set connectionsvc retry/timeout/IDLE timeout to 'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled PoolSvc INFO Frontier compression level set to 5 DBReplicaSvc INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-02-04T2257/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus115.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] +DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-06T2144/Athena/22.0.1/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config +DBReplicaSvc INFO Total of 10 servers found for host lxplus084.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] PoolSvc INFO Successfully setup replica sorting algorithm PoolSvc DEBUG OutputLevel is PoolSvc INFO Setting up APR FileCatalog and Streams @@ -119,7 +119,7 @@ MetaDataHdr(Dat... DEBUG Opening MetaDataHdr(Dat... DEBUG attributes# = 1 MetaDataHdr(Dat... DEBUG Branch container 'DataHeader' MetaDataHdr(Dat... DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree -ClassIDSvc INFO getRegistryEntries: read 2129 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 2078 CLIDRegistry entries for module ALL EventPersistenc... INFO Added successfully Conversion service:AthenaPoolCnvSvc SimplePoolFile1... DEBUG --> Access DbContainer READ [ROOT_Tree] MetaDataHdrForm(DataHeaderForm) MetaDataHdrForm... DEBUG Opening @@ -171,24 +171,6 @@ Stream1 DEBUG Adding private ToolHandle tool Stream1.Stream1_MakeEve Stream1 DEBUG Adding private ToolHandle tool Stream1.Stream1Tool (AthenaOutputStreamTool) Stream1 DEBUG Data Deps for Stream1 + INPUT ( 'AthenaAttributeList' , 'StoreGateSvc+MagicTag' ) -RegStream1 DEBUG Property update for OutputLevel : new value = 2 -RegStream1.RegS... DEBUG Property update for OutputLevel : new value = 2 -ClassIDSvc INFO getRegistryEntries: read 337 CLIDRegistry entries for module ALL -RegStream1 DEBUG In initialize -RegStream1 DEBUG Found IDecisionSvc. -DecisionSvc INFO Inserting stream: RegStream1 with no Algs -RegStream1 DEBUG End initialize -RegStream1 DEBUG In initialize -RegStream1 DEBUG Found 'StoreName':StoreGateSvc store. -RegStream1.TagTool DEBUG Property update for OutputLevel : new value = 2 -RegStream1 DEBUG Tool initialized -RegStream1 DEBUG Not class requested by Tool, skipping (40774349,"MagicTag") -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") -RegStream1 DEBUG End initialize -RegStream1 DEBUG input handles: 0 -RegStream1 DEBUG output handles: 0 -RegStream1 DEBUG Adding private ToolHandle tool RegStream1.TagTool (RegistrationStreamTagTool) -RegStream1 DEBUG Data Deps for RegStream1 HistogramPersis...WARNING Histograms saving not required. AthenaEventLoopMgr INFO Setup EventSelector service EventSelector ApplicationMgr INFO Application Manager Initialized successfully @@ -218,9 +200,10 @@ POOLContainerFo... DEBUG Opening POOLContainerFo... DEBUG attributes# = 1 POOLContainerFo... DEBUG Branch container 'DataHeaderForm' POOLContainerFo... DEBUG Opened container POOLContainerForm(DataHeaderForm) of type ROOT_Tree -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AlgResourcePool INFO TopAlg list empty. Recovering the one of Application Manager SimplePoolFile1... DEBUG --> Access DbContainer READ [ROOT_Tree] CollectionTree(EventInfo_p4/McEventInfo) CollectionTree(... DEBUG Opening @@ -240,6 +223,7 @@ ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -291,6 +275,7 @@ WriteTag INFO EventInfo event: 0 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 0 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo DbSession INFO Open DbSession Domain[ROOT_All] INFO > Access DbDomain UPDATE [ROOT_All] AthenaPoolCnvSvc DEBUG setAttribute TREE_MAX_SIZE to 1099511627776L @@ -326,6 +311,9 @@ Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 1 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 1 @@ -407,32 +395,23 @@ SimplePoolFile3... DEBUG --->Adding Assoc :????/POOLCollectionTree(MagicNumber) SimplePoolFile3... DEBUG ---->ClassID:???? AthenaPoolCnvSvc DEBUG setAttribute BRANCH_BASKET_SIZE to 256000 for db: SimplePoolFile3.root and cont: POOLContainer(DataHeader) AthenaPoolCnvSvc DEBUG setAttribute BRANCH_BASKET_SIZE to 1024000 for db: SimplePoolFile3.root and cont: POOLContainerForm(DataHeaderForm) -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000000] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000000] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") -PoolSvc INFO Writing ExplicitROOT Collection - do not pass session pointer -RegStream1.TagTool INFO No Primary Key defined AthenaEventLoopMgr INFO ===>>> done processing event #0, run #1 1 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000001]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000001]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000001] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #1, run #1 1 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -479,39 +458,36 @@ WriteTag INFO EventInfo event: 1 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 1 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 2 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 2 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000001] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000001] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #1, run #1 2 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000002]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000002]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000002] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #2, run #1 2 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -558,39 +534,36 @@ WriteTag INFO EventInfo event: 2 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 2 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 3 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 3 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000002] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000002] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #2, run #1 3 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000003]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000003]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000003] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #3, run #1 3 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -637,39 +610,36 @@ WriteTag INFO EventInfo event: 3 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 3 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 4 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 4 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000003] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000003] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #3, run #1 4 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000004]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000004]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000004] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #4, run #1 4 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -716,39 +686,36 @@ WriteTag INFO EventInfo event: 4 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 4 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 5 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 5 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000004] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000004] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #4, run #1 5 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000005]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000005]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000005] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #5, run #1 5 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -795,39 +762,36 @@ WriteTag INFO EventInfo event: 5 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 5 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 6 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 6 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000005] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000005] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #5, run #1 6 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000006]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000006]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000006] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #6, run #1 6 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -874,39 +838,36 @@ WriteTag INFO EventInfo event: 6 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 6 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 7 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 7 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000006] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000006] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #6, run #1 7 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000007]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000007]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000007] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #7, run #1 7 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -953,39 +914,36 @@ WriteTag INFO EventInfo event: 7 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 7 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 8 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 8 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000007] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000007] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #7, run #1 8 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000008]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000008]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000008] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #8, run #1 8 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1032,39 +990,36 @@ WriteTag INFO EventInfo event: 8 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 8 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 9 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 9 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000008] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000008] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #8, run #1 9 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000009]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000009]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000009] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #9, run #1 9 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1111,39 +1066,36 @@ WriteTag INFO EventInfo event: 9 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 9 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 10 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 10 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000009] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000009] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #9, run #1 10 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000A]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000A]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000A] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #10, run #1 10 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1190,39 +1142,36 @@ WriteTag INFO EventInfo event: 10 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 10 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 11 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 11 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000A] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000A] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #10, run #1 11 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000B]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000B]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000B] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #11, run #1 11 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1269,39 +1218,36 @@ WriteTag INFO EventInfo event: 11 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 11 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 12 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 12 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000B] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000B] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #11, run #1 12 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000C]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000C]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000C] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #12, run #1 12 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1348,39 +1294,36 @@ WriteTag INFO EventInfo event: 12 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 12 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 13 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 13 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000C] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000C] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #12, run #1 13 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000D]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000D]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000D] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #13, run #1 13 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1427,39 +1370,36 @@ WriteTag INFO EventInfo event: 13 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 13 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 14 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 14 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000D] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000D] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #13, run #1 14 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000E]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000E]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000E] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #14, run #1 14 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1506,39 +1446,36 @@ WriteTag INFO EventInfo event: 14 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 14 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 15 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 15 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000E] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000E] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #14, run #1 15 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000F]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000F]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000F] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #15, run #1 15 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1585,39 +1522,36 @@ WriteTag INFO EventInfo event: 15 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 15 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 16 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 16 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000F] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000F] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #15, run #1 16 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000010]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000010]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000010] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #16, run #1 16 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1664,39 +1598,36 @@ WriteTag INFO EventInfo event: 16 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 16 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 17 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 17 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000010] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000010] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #16, run #1 17 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000011]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000011]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000011] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #17, run #1 17 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1743,39 +1674,36 @@ WriteTag INFO EventInfo event: 17 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 17 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 18 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 18 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000011] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000011] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #17, run #1 18 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000012]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000012]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000012] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #18, run #1 18 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1822,39 +1750,36 @@ WriteTag INFO EventInfo event: 18 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 18 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 19 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 19 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000012] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000012] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #18, run #1 19 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000013]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000013]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000013] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #19, run #1 19 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1901,24 +1826,19 @@ WriteTag INFO EventInfo event: 19 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 19 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 20 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 20 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000013] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000013] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #19, run #1 20 events processed so far <<<=== MetaDataSvc DEBUG handle() EndInputFile for FID:???? EventSelector INFO Disconnecting input sourceID: ???? @@ -1927,10 +1847,8 @@ Domain[ROOT_All] INFO > Deaccess DbDomain READ [ROOT_All] MetaDataSvc DEBUG handle() LastInputFile for end AthenaEventLoopMgr INFO No more events in event selection Stream1 DEBUG AthenaOutputStream Stream1 ::stop() -RegStream1.TagTool INFO Collection Events output: 20 MetaDataSvc DEBUG MetaDataSvc::stop() Stream1 DEBUG handle() incident type: MetaDataStop -MetaDataSvc DEBUG prepareOutput MetaDataSvc DEBUG calling metaDataStop for ToolSvc.IOVDbMetaDataTool Stream1 DEBUG addItemObjects(167728019,"Stream1") called Stream1 DEBUG Key:Stream1 @@ -1973,10 +1891,9 @@ ReadData INFO in finalize() ReWriteData INFO in finalize() WriteTag INFO in finalize() MagicWriteTag INFO in finalize() +IncidentProcAlg2 INFO Finalize Stream1 DEBUG finalize: Optimize output Stream1 DEBUG finalize: end optimize output -RegStream1 DEBUG In finalize -IncidentProcAlg2 INFO Finalize DecisionSvc INFO Finalized successfully. AthenaPoolCnvSvc DEBUG releasing all workers AthDictLoaderSvc INFO in finalize... @@ -1986,11 +1903,11 @@ ToolSvc INFO Removing all tools created by ToolSvc *****Chrono***** INFO **************************************************************************************************** commitOutput INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 21 cRep_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 62 -cObjR_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 66 -fRep_ALL INFO Time User : Tot= 20 [ms] Ave/Min/Max=0.323(+- 2.52)/ 0/ 20 [ms] #= 62 -cRepR_ALL INFO Time User : Tot= 20 [ms] Ave/Min/Max=0.123(+- 1.56)/ 0/ 20 [ms] #=163 -cObj_ALL INFO Time User : Tot= 50 [ms] Ave/Min/Max=0.794(+- 3.24)/ 0/ 20 [ms] #= 63 -ChronoStatSvc INFO Time User : Tot= 0.94 [s] #= 1 +cRepR_ALL INFO Time User : Tot= 10 [ms] Ave/Min/Max=0.0613(+-0.781)/ 0/ 10 [ms] #=163 +fRep_ALL INFO Time User : Tot= 20 [ms] Ave/Min/Max=0.323(+- 1.77)/ 0/ 10 [ms] #= 62 +cObjR_ALL INFO Time User : Tot= 10 [ms] Ave/Min/Max=0.152(+- 1.22)/ 0/ 10 [ms] #= 66 +cObj_ALL INFO Time User : Tot= 10 [ms] Ave/Min/Max=0.159(+- 1.25)/ 0/ 10 [ms] #= 63 +ChronoStatSvc INFO Time User : Tot= 0.55 [s] #= 1 *****Chrono***** INFO **************************************************************************************************** ChronoStatSvc.f... INFO Service finalized successfully ApplicationMgr INFO Application Manager Finalized successfully diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteAgain.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteAgain.ref index a66e5c8af98d3b96fa1acec5df528ce6c05bb049..8b0ad4b5b225857706654edcc2254b8f2450b8e0 100644 --- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteAgain.ref +++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteAgain.ref @@ -1,30 +1,30 @@ -Tue Feb 5 18:52:15 CET 2019 +Thu Mar 7 20:06:56 CET 2019 Preloading tcmalloc_minimal.so Athena INFO including file "AthenaCommon/Preparation.py" Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" Athena INFO executing ROOT6Setup Athena INFO including file "AthenaCommon/Execution.py" Athena INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_ReWriteAgainJobOptions.py" -Py:ConfigurableDb INFO Read module info for 5456 configurables from 56 genConfDb files +Py:ConfigurableDb INFO Read module info for 5462 configurables from 48 genConfDb files Py:ConfigurableDb INFO No duplicates have been found: that's good ! Athena INFO including file "AthenaCommon/runbatch.py" -[?1034hApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 +ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 ApplicationMgr SUCCESS ==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v30r5) - running on lxplus115.cern.ch on Tue Feb 5 18:52:52 2019 + Welcome to ApplicationMgr (GaudiCoreSvc v31r0) + running on lxplus084.cern.ch on Thu Mar 7 20:07:07 2019 ==================================================================================================================================== -ApplicationMgr INFO Successfully loaded modules : AthenaServices ApplicationMgr INFO Application Manager Configured successfully ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 StatusCodeSvc INFO initialize AthDictLoaderSvc INFO in initialize... AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO getRegistryEntries: read 7037 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 3167 CLIDRegistry entries for module ALL CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00 ClassIDSvc INFO getRegistryEntries: read 836 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 345 CLIDRegistry entries for module ALL ReadData DEBUG Property update for OutputLevel : new value = 2 ReadData INFO in initialize() MetaDataSvc DEBUG Property update for OutputLevel : new value = 2 @@ -37,8 +37,8 @@ PoolSvc DEBUG Service base class initialized successfully PoolSvc INFO Set connectionsvc retry/timeout/IDLE timeout to 'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled PoolSvc INFO Frontier compression level set to 5 DBReplicaSvc INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-02-04T2257/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus115.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] +DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-06T2144/Athena/22.0.1/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config +DBReplicaSvc INFO Total of 10 servers found for host lxplus084.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] PoolSvc INFO Successfully setup replica sorting algorithm PoolSvc DEBUG OutputLevel is PoolSvc INFO Setting up APR FileCatalog and Streams @@ -113,7 +113,7 @@ MetaDataHdr(Dat... DEBUG Opening MetaDataHdr(Dat... DEBUG attributes# = 1 MetaDataHdr(Dat... DEBUG Branch container 'DataHeader' MetaDataHdr(Dat... DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree -ClassIDSvc INFO getRegistryEntries: read 2126 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 2075 CLIDRegistry entries for module ALL EventPersistenc... INFO Added successfully Conversion service:AthenaPoolCnvSvc SimplePoolRepli... DEBUG --> Access DbContainer READ [ROOT_Tree] MetaDataHdrForm(DataHeaderForm) MetaDataHdrForm... DEBUG Opening @@ -165,24 +165,6 @@ Stream1 DEBUG Adding private ToolHandle tool Stream1.Stream1_MakeEve Stream1 DEBUG Adding private ToolHandle tool Stream1.Stream1Tool (AthenaOutputStreamTool) Stream1 DEBUG Data Deps for Stream1 + INPUT ( 'AthenaAttributeList' , 'StoreGateSvc+MagicTag' ) -RegStream1 DEBUG Property update for OutputLevel : new value = 2 -RegStream1.RegS... DEBUG Property update for OutputLevel : new value = 2 -ClassIDSvc INFO getRegistryEntries: read 337 CLIDRegistry entries for module ALL -RegStream1 DEBUG In initialize -RegStream1 DEBUG Found IDecisionSvc. -DecisionSvc INFO Inserting stream: RegStream1 with no Algs -RegStream1 DEBUG End initialize -RegStream1 DEBUG In initialize -RegStream1 DEBUG Found 'StoreName':StoreGateSvc store. -RegStream1.TagTool DEBUG Property update for OutputLevel : new value = 2 -RegStream1 DEBUG Tool initialized -RegStream1 DEBUG Not class requested by Tool, skipping (40774349,"MagicTag") -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") -RegStream1 DEBUG End initialize -RegStream1 DEBUG input handles: 0 -RegStream1 DEBUG output handles: 0 -RegStream1 DEBUG Adding private ToolHandle tool RegStream1.TagTool (RegistrationStreamTagTool) -RegStream1 DEBUG Data Deps for RegStream1 HistogramPersis...WARNING Histograms saving not required. AthenaEventLoopMgr INFO Setup EventSelector service EventSelector ApplicationMgr INFO Application Manager Initialized successfully @@ -342,6 +324,7 @@ WriteTag INFO EventInfo event: 0 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 0 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo DbSession INFO Open DbSession Domain[ROOT_All] INFO > Access DbDomain UPDATE [ROOT_All] AthenaPoolCnvSvc DEBUG setAttribute TREE_MAX_SIZE to 1099511627776L @@ -376,6 +359,9 @@ Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 1 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 1 @@ -461,17 +447,6 @@ SimplePoolFile3... DEBUG --->Adding Assoc :????/POOLCollectionTree(MagicNumber) SimplePoolFile3... DEBUG ---->ClassID:???? AthenaPoolCnvSvc DEBUG setAttribute BRANCH_BASKET_SIZE to 256000 for db: SimplePoolFile3.root and cont: POOLContainer(DataHeader) AthenaPoolCnvSvc DEBUG setAttribute BRANCH_BASKET_SIZE to 1024000 for db: SimplePoolFile3.root and cont: POOLContainerForm(DataHeaderForm) -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000000] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000000] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") -PoolSvc INFO Writing ExplicitROOT Collection - do not pass session pointer -RegStream1.TagTool INFO No Primary Key defined AthenaEventLoopMgr INFO ===>>> done processing event #0, run #1 1 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 0 @@ -533,6 +508,7 @@ WriteTag INFO EventInfo event: 1 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 1 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo ClassIDSvc INFO getRegistryEntries: read 3 CLIDRegistry entries for module ALL Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* @@ -540,18 +516,12 @@ Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 2 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 2 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000001] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000001] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #1, run #1 2 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 0 @@ -613,24 +583,19 @@ WriteTag INFO EventInfo event: 2 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 2 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 3 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 3 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000002] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000002] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #2, run #1 3 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 0 @@ -692,24 +657,19 @@ WriteTag INFO EventInfo event: 3 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 3 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 4 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 4 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000003] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000003] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #3, run #1 4 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 0 @@ -771,24 +731,19 @@ WriteTag INFO EventInfo event: 4 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 4 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 5 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 5 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000004] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000004] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #4, run #1 5 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 0 @@ -850,24 +805,19 @@ WriteTag INFO EventInfo event: 5 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 5 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 6 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 6 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000005] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000005] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #5, run #1 6 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 0 @@ -929,24 +879,19 @@ WriteTag INFO EventInfo event: 6 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 6 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 7 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 7 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000006] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000006] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #6, run #1 7 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 0 @@ -1008,24 +953,19 @@ WriteTag INFO EventInfo event: 7 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 7 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 8 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 8 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000007] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000007] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #7, run #1 8 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 0 @@ -1087,24 +1027,19 @@ WriteTag INFO EventInfo event: 8 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 8 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 9 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 9 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000008] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000008] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #8, run #1 9 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 0 @@ -1166,24 +1101,19 @@ WriteTag INFO EventInfo event: 9 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 9 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 10 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 10 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000009] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000009] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #9, run #1 10 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 0 @@ -1245,24 +1175,19 @@ WriteTag INFO EventInfo event: 10 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 10 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 11 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 11 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000A] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000A] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #10, run #1 11 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 0 @@ -1324,24 +1249,19 @@ WriteTag INFO EventInfo event: 11 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 11 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 12 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 12 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000B] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000B] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #11, run #1 12 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 0 @@ -1403,24 +1323,19 @@ WriteTag INFO EventInfo event: 12 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 12 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 13 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 13 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000C] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000C] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #12, run #1 13 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 0 @@ -1482,24 +1397,19 @@ WriteTag INFO EventInfo event: 13 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 13 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 14 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 14 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000D] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000D] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #13, run #1 14 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 0 @@ -1561,24 +1471,19 @@ WriteTag INFO EventInfo event: 14 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 14 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 15 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 15 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000E] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000E] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #14, run #1 15 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 0 @@ -1640,24 +1545,19 @@ WriteTag INFO EventInfo event: 15 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 15 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 16 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 16 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000F] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000F] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #15, run #1 16 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 0 @@ -1719,24 +1619,19 @@ WriteTag INFO EventInfo event: 16 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 16 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 17 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 17 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000010] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000010] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #16, run #1 17 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 0 @@ -1798,24 +1693,19 @@ WriteTag INFO EventInfo event: 17 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 17 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 18 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 18 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000011] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000011] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #17, run #1 18 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 0 @@ -1877,24 +1767,19 @@ WriteTag INFO EventInfo event: 18 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 18 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 19 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 19 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000012] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000012] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #18, run #1 19 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 0 @@ -1956,24 +1841,19 @@ WriteTag INFO EventInfo event: 19 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 19 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 20 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 20 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000013] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000013] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #19, run #1 20 events processed so far <<<=== Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? Domain[ROOT_All] INFO > Deaccess DbDomain READ [ROOT_All] @@ -1982,11 +1862,8 @@ EventSelector INFO Disconnecting input sourceID: ???? MetaDataSvc DEBUG handle() LastInputFile for end AthenaEventLoopMgr INFO No more events in event selection Stream1 DEBUG AthenaOutputStream Stream1 ::stop() -RegStream1.TagTool INFO Collection Events output: 20 -RegStream1.TagTool INFO Unable to register collection: PFN 'RootCollection||PFN:SimplePoolCollection3.root' already registered ( POOL : "registerPFN" from "FileCatalog" ) MetaDataSvc DEBUG MetaDataSvc::stop() Stream1 DEBUG handle() incident type: MetaDataStop -MetaDataSvc DEBUG prepareOutput MetaDataSvc DEBUG calling metaDataStop for ToolSvc.IOVDbMetaDataTool Stream1 DEBUG addItemObjects(167728019,"Stream1") called Stream1 DEBUG Key:Stream1 @@ -2029,10 +1906,9 @@ ReadData INFO in finalize() ReWriteData INFO in finalize() WriteTag INFO in finalize() MagicWriteTag INFO in finalize() +IncidentProcAlg2 INFO Finalize Stream1 DEBUG finalize: Optimize output Stream1 DEBUG finalize: end optimize output -RegStream1 DEBUG In finalize -IncidentProcAlg2 INFO Finalize DecisionSvc INFO Finalized successfully. AthenaPoolCnvSvc DEBUG releasing all workers AthDictLoaderSvc INFO in finalize... @@ -2042,11 +1918,11 @@ ToolSvc INFO Removing all tools created by ToolSvc *****Chrono***** INFO **************************************************************************************************** commitOutput INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 21 cRep_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 62 -cObjR_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 65 -cObj_ALL INFO Time User : Tot= 40 [ms] Ave/Min/Max=0.635(+- 3.02)/ 0/ 20 [ms] #= 63 -cRepR_ALL INFO Time User : Tot= 40 [ms] Ave/Min/Max=0.245(+- 1.9)/ 0/ 20 [ms] #=163 -fRep_ALL INFO Time User : Tot= 50 [ms] Ave/Min/Max=0.806(+- 3.26)/ 0/ 20 [ms] #= 62 -ChronoStatSvc INFO Time User : Tot= 1.2 [s] #= 1 +cRepR_ALL INFO Time User : Tot= 10 [ms] Ave/Min/Max=0.0613(+-0.781)/ 0/ 10 [ms] #=163 +fRep_ALL INFO Time User : Tot= 10 [ms] Ave/Min/Max=0.161(+- 1.26)/ 0/ 10 [ms] #= 62 +cObjR_ALL INFO Time User : Tot= 10 [ms] Ave/Min/Max=0.154(+- 1.23)/ 0/ 10 [ms] #= 65 +cObj_ALL INFO Time User : Tot= 20 [ms] Ave/Min/Max=0.317(+- 2.5)/ 0/ 20 [ms] #= 63 +ChronoStatSvc INFO Time User : Tot= 0.6 [s] #= 1 *****Chrono***** INFO **************************************************************************************************** ChronoStatSvc.f... INFO Service finalized successfully ApplicationMgr INFO Application Manager Finalized successfully diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteAgainJobOptions.py b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteAgainJobOptions.py index 73c20880b2339e7f638bcfa9ba7e1f42f816d4db..bd01141291fcd1acc82d8f51ef6addb7a933ea2e 100644 --- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteAgainJobOptions.py +++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteAgainJobOptions.py @@ -11,7 +11,6 @@ # 2. Writes SimplePoolFile3.root file with ExampleTracks using ReWriteData algorithm # ------------------------------------------------------------ # Expected output file (20 events): -# -rw-r--r-- 1 gemmeren zp 11395 Aug 5 17:34 SimplePoolCollection3.root # -rw-r--r-- 1 gemmeren zp 27536 Aug 5 17:34 SimplePoolFile3.root # ------------------------------------------------------------ # File:SimplePoolFile3.root @@ -41,8 +40,6 @@ import AthenaCommon.AtlasUnixStandardJob ## get a handle on the default top-level algorithm sequence from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() -from AthenaCommon.AlgSequence import AthSequencer -regSequence = AthSequencer("AthRegSeq") ## get a handle on the ServiceManager from AthenaCommon.AppMgr import ServiceMgr as svcMgr @@ -98,20 +95,6 @@ StreamerSvc = AthenaRootStreamerSvc() StreamerSvc.Streamers += [ "ExampleHitStreamer_p0" ] svcMgr += StreamerSvc -#-------------------------------------------------------------- -# Event Collection Registration -#-------------------------------------------------------------- -from RegistrationServices.RegistrationServicesConf import RegistrationStreamTagTool -TagTool = RegistrationStreamTagTool("TagTool") - -from RegistrationServices.RegistrationServicesConf import RegistrationStream -RegStream1 = RegistrationStream( "RegStream1" , CollectionType="ExplicitROOT" , Tool=TagTool ) -RegStream1.WriteInputDataHeader = False -RegStream1.OutputCollection = "SimplePoolCollection3.root" -RegStream1.ItemList += [ "DataHeader#Stream1" ] -RegStream1.ItemList += [ "TagAthenaAttributeList#" + MagicWriteTag.Key ] -regSequence += RegStream1 - #-------------------------------------------------------------- # Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL) #-------------------------------------------------------------- @@ -128,8 +111,6 @@ topSequence.ReWriteData.OutputLevel = 2 Stream1.OutputLevel = 2 Stream1.WritingTool.OutputLevel = 3 Stream1.HelperTools[0].OutputLevel = 3 -RegStream1.OutputLevel = 2 -RegStream1.Tool.OutputLevel = 3 # # End of job options file diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteNext.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteNext.ref index ef8f7480f757275b5920dc12137385ef9f920a11..2fa0820947cfb858dbc28596a1ee075da34c5943 100644 --- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteNext.ref +++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteNext.ref @@ -1,30 +1,30 @@ -Tue Feb 5 18:53:02 CET 2019 +Thu Mar 7 20:01:12 CET 2019 Preloading tcmalloc_minimal.so Athena INFO including file "AthenaCommon/Preparation.py" Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" Athena INFO executing ROOT6Setup Athena INFO including file "AthenaCommon/Execution.py" Athena INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_ReWriteNextJobOptions.py" -Py:ConfigurableDb INFO Read module info for 5456 configurables from 56 genConfDb files +Py:ConfigurableDb INFO Read module info for 5462 configurables from 48 genConfDb files Py:ConfigurableDb INFO No duplicates have been found: that's good ! Athena INFO including file "AthenaCommon/runbatch.py" -[?1034hApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 +ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 ApplicationMgr SUCCESS ==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v30r5) - running on lxplus115.cern.ch on Tue Feb 5 18:53:55 2019 + Welcome to ApplicationMgr (GaudiCoreSvc v31r0) + running on lxplus084.cern.ch on Thu Mar 7 20:01:22 2019 ==================================================================================================================================== -ApplicationMgr INFO Successfully loaded modules : AthenaServices ApplicationMgr INFO Application Manager Configured successfully ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 StatusCodeSvc INFO initialize AthDictLoaderSvc INFO in initialize... AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO getRegistryEntries: read 7037 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 3167 CLIDRegistry entries for module ALL CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00 ClassIDSvc INFO getRegistryEntries: read 836 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 345 CLIDRegistry entries for module ALL ReadData DEBUG Property update for OutputLevel : new value = 2 ReadData INFO in initialize() MetaDataSvc DEBUG Property update for OutputLevel : new value = 2 @@ -37,8 +37,8 @@ PoolSvc DEBUG Service base class initialized successfully PoolSvc INFO Set connectionsvc retry/timeout/IDLE timeout to 'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled PoolSvc INFO Frontier compression level set to 5 DBReplicaSvc INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-02-04T2257/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus115.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] +DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-06T2144/Athena/22.0.1/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config +DBReplicaSvc INFO Total of 10 servers found for host lxplus084.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] PoolSvc INFO Successfully setup replica sorting algorithm PoolSvc DEBUG OutputLevel is PoolSvc INFO Setting up APR FileCatalog and Streams @@ -119,7 +119,7 @@ MetaDataHdr(Dat... DEBUG Opening MetaDataHdr(Dat... DEBUG attributes# = 1 MetaDataHdr(Dat... DEBUG Branch container 'DataHeader' MetaDataHdr(Dat... DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree -ClassIDSvc INFO getRegistryEntries: read 2129 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 2078 CLIDRegistry entries for module ALL EventPersistenc... INFO Added successfully Conversion service:AthenaPoolCnvSvc SimplePoolFile3... DEBUG --> Access DbContainer READ [ROOT_Tree] MetaDataHdrForm(DataHeaderForm) MetaDataHdrForm... DEBUG Opening @@ -171,24 +171,6 @@ Stream1 DEBUG Adding private ToolHandle tool Stream1.Stream1_MakeEve Stream1 DEBUG Adding private ToolHandle tool Stream1.Stream1Tool (AthenaOutputStreamTool) Stream1 DEBUG Data Deps for Stream1 + INPUT ( 'AthenaAttributeList' , 'StoreGateSvc+MagicTag' ) -RegStream1 DEBUG Property update for OutputLevel : new value = 2 -RegStream1.RegS... DEBUG Property update for OutputLevel : new value = 2 -ClassIDSvc INFO getRegistryEntries: read 337 CLIDRegistry entries for module ALL -RegStream1 DEBUG In initialize -RegStream1 DEBUG Found IDecisionSvc. -DecisionSvc INFO Inserting stream: RegStream1 with no Algs -RegStream1 DEBUG End initialize -RegStream1 DEBUG In initialize -RegStream1 DEBUG Found 'StoreName':StoreGateSvc store. -RegStream1.TagTool DEBUG Property update for OutputLevel : new value = 2 -RegStream1 DEBUG Tool initialized -RegStream1 DEBUG Not class requested by Tool, skipping (40774349,"MagicTag") -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") -RegStream1 DEBUG End initialize -RegStream1 DEBUG input handles: 0 -RegStream1 DEBUG output handles: 0 -RegStream1 DEBUG Adding private ToolHandle tool RegStream1.TagTool (RegistrationStreamTagTool) -RegStream1 DEBUG Data Deps for RegStream1 HistogramPersis...WARNING Histograms saving not required. AthenaEventLoopMgr INFO Setup EventSelector service EventSelector ApplicationMgr INFO Application Manager Initialized successfully @@ -259,6 +241,7 @@ WriteTag INFO EventInfo event: 0 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 0 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo DbSession INFO Open DbSession Domain[ROOT_All] INFO > Access DbDomain UPDATE [ROOT_All] AthenaPoolCnvSvc DEBUG setAttribute TREE_MAX_SIZE to 1099511627776L @@ -294,6 +277,9 @@ Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 1 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 1 @@ -373,19 +359,6 @@ SimplePoolFile4... DEBUG --->Adding Assoc :????/POOLCollectionTree(MagicNumber) SimplePoolFile4... DEBUG ---->ClassID:???? AthenaPoolCnvSvc DEBUG setAttribute BRANCH_BASKET_SIZE to 256000 for db: SimplePoolFile4.root and cont: POOLContainer(DataHeader) AthenaPoolCnvSvc DEBUG setAttribute BRANCH_BASKET_SIZE to 1024000 for db: SimplePoolFile4.root and cont: POOLContainerForm(DataHeaderForm) -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000000] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000000] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=][CLID=????][TECH=0000020?][OID=00000006-00000000] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") -PoolSvc INFO Writing ExplicitROOT Collection - do not pass session pointer -RegStream1.TagTool INFO No Primary Key defined AthenaEventLoopMgr INFO ===>>> done processing event #0, run #1 1 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 @@ -415,26 +388,19 @@ WriteTag INFO EventInfo event: 1 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 1 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 2 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 2 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000001] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000001] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=][CLID=????][TECH=0000020?][OID=00000006-00000001] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #1, run #1 2 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 @@ -464,26 +430,19 @@ WriteTag INFO EventInfo event: 2 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 2 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 3 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 3 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000002] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000002] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=][CLID=????][TECH=0000020?][OID=00000006-00000002] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #2, run #1 3 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 @@ -513,26 +472,19 @@ WriteTag INFO EventInfo event: 3 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 3 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 4 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 4 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000003] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000003] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=][CLID=????][TECH=0000020?][OID=00000006-00000003] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #3, run #1 4 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 @@ -562,26 +514,19 @@ WriteTag INFO EventInfo event: 4 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 4 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 5 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 5 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000004] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000004] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=][CLID=????][TECH=0000020?][OID=00000006-00000004] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #4, run #1 5 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 @@ -611,26 +556,19 @@ WriteTag INFO EventInfo event: 5 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 5 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 6 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 6 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000005] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000005] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=][CLID=????][TECH=0000020?][OID=00000006-00000005] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #5, run #1 6 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 @@ -660,26 +598,19 @@ WriteTag INFO EventInfo event: 6 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 6 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 7 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 7 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000006] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000006] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=][CLID=????][TECH=0000020?][OID=00000006-00000006] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #6, run #1 7 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 @@ -709,26 +640,19 @@ WriteTag INFO EventInfo event: 7 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 7 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 8 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 8 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000007] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000007] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=][CLID=????][TECH=0000020?][OID=00000006-00000007] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #7, run #1 8 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 @@ -758,26 +682,19 @@ WriteTag INFO EventInfo event: 8 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 8 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 9 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 9 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000008] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000008] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=][CLID=????][TECH=0000020?][OID=00000006-00000008] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #8, run #1 9 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 @@ -807,26 +724,19 @@ WriteTag INFO EventInfo event: 9 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 9 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 10 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 10 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000009] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000009] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=][CLID=????][TECH=0000020?][OID=00000006-00000009] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #9, run #1 10 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 @@ -856,26 +766,19 @@ WriteTag INFO EventInfo event: 10 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 10 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 11 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 11 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000A] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000A] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=][CLID=????][TECH=0000020?][OID=00000006-0000000A] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #10, run #1 11 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 @@ -905,26 +808,19 @@ WriteTag INFO EventInfo event: 11 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 11 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 12 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 12 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000B] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000B] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=][CLID=????][TECH=0000020?][OID=00000006-0000000B] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #11, run #1 12 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 @@ -954,26 +850,19 @@ WriteTag INFO EventInfo event: 12 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 12 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 13 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 13 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000C] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000C] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=][CLID=????][TECH=0000020?][OID=00000006-0000000C] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #12, run #1 13 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 @@ -1003,26 +892,19 @@ WriteTag INFO EventInfo event: 13 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 13 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 14 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 14 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000D] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000D] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=][CLID=????][TECH=0000020?][OID=00000006-0000000D] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #13, run #1 14 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 @@ -1052,26 +934,19 @@ WriteTag INFO EventInfo event: 14 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 14 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 15 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 15 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000E] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000E] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=][CLID=????][TECH=0000020?][OID=00000006-0000000E] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #14, run #1 15 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 @@ -1101,26 +976,19 @@ WriteTag INFO EventInfo event: 15 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 15 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 16 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 16 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000F] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000F] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=][CLID=????][TECH=0000020?][OID=00000006-0000000F] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #15, run #1 16 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 @@ -1150,26 +1018,19 @@ WriteTag INFO EventInfo event: 16 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 16 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 17 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 17 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000010] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000010] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=][CLID=????][TECH=0000020?][OID=00000006-00000010] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #16, run #1 17 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 @@ -1199,26 +1060,19 @@ WriteTag INFO EventInfo event: 17 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 17 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 18 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 18 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000011] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000011] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=][CLID=????][TECH=0000020?][OID=00000006-00000011] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #17, run #1 18 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 @@ -1248,26 +1102,19 @@ WriteTag INFO EventInfo event: 18 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 18 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 19 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 19 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000012] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000012] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=][CLID=????][TECH=0000020?][OID=00000006-00000012] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #18, run #1 19 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 @@ -1297,26 +1144,19 @@ WriteTag INFO EventInfo event: 19 run: 1 WriteTag INFO registered all data MagicWriteTag INFO EventInfo event: 19 run: 1 MagicWriteTag INFO registered all data +EventInfoTagBui...WARNING Did not find xAOD::EventInfo Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9103,"MyTracks") called Stream1 DEBUG Key:MyTracks Stream1 DEBUG Added object 9103,"MyTracks" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG No object matching 40774348,"SimpleTag" found Stream1 DEBUG Collected objects: Stream1 DEBUG Object/count: EventInfo_McEventInfo, 20 Stream1 DEBUG Object/count: ExampleTrackContainer_MyTracks, 20 -RegStream1 DEBUG RegistrationStream execute -RegStream1 DEBUG getRefs: Not DataHeader, skipping (40774349,"MagicTag") -RegStream1 DEBUG get ref for (222376821,"Stream1") -RegStream1 DEBUG Retrieved DataHeader with key Stream1 -RegStream1 DEBUG Pushing back ref [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000013] for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000013] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Found ref for input header [DB=????][CNT=][CLID=????][TECH=0000020?][OID=00000006-00000013] -RegStream1 DEBUG Adding ref for Stream1 -RegStream1 DEBUG Setting tagKey to MagicTag -RegStream1 DEBUG Not class requested by Tool, skipping (222376821,"Stream1") AthenaEventLoopMgr INFO ===>>> done processing event #19, run #1 20 events processed so far <<<=== MetaDataSvc DEBUG handle() EndInputFile for FID:???? EventSelector INFO Disconnecting input sourceID: ???? @@ -1325,10 +1165,8 @@ Domain[ROOT_All] INFO > Deaccess DbDomain READ [ROOT_All] MetaDataSvc DEBUG handle() LastInputFile for end AthenaEventLoopMgr INFO No more events in event selection Stream1 DEBUG AthenaOutputStream Stream1 ::stop() -RegStream1.TagTool INFO Collection Events output: 20 MetaDataSvc DEBUG MetaDataSvc::stop() Stream1 DEBUG handle() incident type: MetaDataStop -MetaDataSvc DEBUG prepareOutput MetaDataSvc DEBUG calling metaDataStop for ToolSvc.IOVDbMetaDataTool Stream1 DEBUG addItemObjects(167728019,"Stream1") called Stream1 DEBUG Key:Stream1 @@ -1371,10 +1209,9 @@ ReadData INFO in finalize() ReWriteData INFO in finalize() WriteTag INFO in finalize() MagicWriteTag INFO in finalize() +IncidentProcAlg2 INFO Finalize Stream1 DEBUG finalize: Optimize output Stream1 DEBUG finalize: end optimize output -RegStream1 DEBUG In finalize -IncidentProcAlg2 INFO Finalize DecisionSvc INFO Finalized successfully. AthenaPoolCnvSvc DEBUG releasing all workers AthDictLoaderSvc INFO in finalize... @@ -1384,11 +1221,11 @@ ToolSvc INFO Removing all tools created by ToolSvc *****Chrono***** INFO **************************************************************************************************** commitOutput INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 21 cRep_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 62 +cRepR_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #=163 +fRep_ALL INFO Time User : Tot= 20 [ms] Ave/Min/Max=0.323(+- 1.77)/ 0/ 10 [ms] #= 62 cObjR_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 65 -fRep_ALL INFO Time User : Tot= 10 [ms] Ave/Min/Max=0.161(+- 1.26)/ 0/ 10 [ms] #= 62 -cRepR_ALL INFO Time User : Tot= 10 [ms] Ave/Min/Max=0.0613(+-0.781)/ 0/ 10 [ms] #=163 -cObj_ALL INFO Time User : Tot= 50 [ms] Ave/Min/Max=0.794(+- 3.7)/ 0/ 20 [ms] #= 63 -ChronoStatSvc INFO Time User : Tot= 1.28 [s] #= 1 +cObj_ALL INFO Time User : Tot= 10 [ms] Ave/Min/Max=0.159(+- 1.25)/ 0/ 10 [ms] #= 63 +ChronoStatSvc INFO Time User : Tot= 0.57 [s] #= 1 *****Chrono***** INFO **************************************************************************************************** ChronoStatSvc.f... INFO Service finalized successfully ApplicationMgr INFO Application Manager Finalized successfully diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteNextJobOptions.py b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteNextJobOptions.py index 854056abddbfe1ed5277c016deafaec90b03b75f..b9d9276fbdeedd42b642a80fa060918c236dc593 100644 --- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteNextJobOptions.py +++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReWriteNextJobOptions.py @@ -11,7 +11,6 @@ # 2. Writes SimplePoolFile4.root file with ExampleTracks using ReWriteData algorithm # ------------------------------------------------------------ # Expected output file (20 events): -# -rw-r--r-- 1 gemmeren zp 11395 Aug 5 17:34 SimplePoolCollection4.root # -rw-r--r-- 1 gemmeren zp 27536 Aug 5 17:34 SimplePoolFile4.root # ------------------------------------------------------------ # File:SimplePoolFile4.root @@ -41,8 +40,6 @@ import AthenaCommon.AtlasUnixStandardJob ## get a handle on the default top-level algorithm sequence from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() -from AthenaCommon.AlgSequence import AthSequencer -regSequence = AthSequencer("AthRegSeq") ## get a handle on the ServiceManager from AthenaCommon.AppMgr import ServiceMgr as svcMgr @@ -98,20 +95,6 @@ StreamerSvc = AthenaRootStreamerSvc() StreamerSvc.Streamers += [ "ExampleHitStreamer_p0" ] svcMgr += StreamerSvc -#-------------------------------------------------------------- -# Event Collection Registration -#-------------------------------------------------------------- -from RegistrationServices.RegistrationServicesConf import RegistrationStreamTagTool -TagTool = RegistrationStreamTagTool("TagTool") - -from RegistrationServices.RegistrationServicesConf import RegistrationStream -RegStream1 = RegistrationStream( "RegStream1" , CollectionType="ExplicitROOT" , Tool=TagTool ) -RegStream1.WriteInputDataHeader = False -RegStream1.OutputCollection = "SimplePoolCollection4.root" -RegStream1.ItemList += [ "DataHeader#Stream1" ] -RegStream1.ItemList += [ "TagAthenaAttributeList#" + MagicWriteTag.Key ] -regSequence += RegStream1 - #-------------------------------------------------------------- # Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL) #-------------------------------------------------------------- @@ -128,8 +111,6 @@ topSequence.ReWriteData.OutputLevel = 2 Stream1.OutputLevel = 2 Stream1.WritingTool.OutputLevel = 3 Stream1.HelperTools[0].OutputLevel = 3 -RegStream1.OutputLevel = 2 -RegStream1.Tool.OutputLevel = 3 # # End of job options file diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Read.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Read.ref index fc047d6e2759b7c662127bb0d9bda06cca4c9b07..c1c60b33ea369ae65d326de91d50778848661e8e 100644 --- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Read.ref +++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Read.ref @@ -1,27 +1,26 @@ -Tue Feb 5 18:40:19 CET 2019 +Wed Mar 6 21:41:44 CET 2019 Preloading tcmalloc_minimal.so Athena INFO including file "AthenaCommon/Preparation.py" Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" Athena INFO executing ROOT6Setup Athena INFO including file "AthenaCommon/Execution.py" Athena INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_ReadJobOptions.py" -Py:ConfigurableDb INFO Read module info for 5456 configurables from 56 genConfDb files +Py:ConfigurableDb INFO Read module info for 5461 configurables from 48 genConfDb files Py:ConfigurableDb INFO No duplicates have been found: that's good ! Athena INFO including file "AthenaCommon/runbatch.py" -[?1034hApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 +ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 ApplicationMgr SUCCESS ==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v30r5) - running on lxplus115.cern.ch on Tue Feb 5 18:40:32 2019 + Welcome to ApplicationMgr (GaudiCoreSvc v31r0) + running on lxplus084.cern.ch on Wed Mar 6 21:41:56 2019 ==================================================================================================================================== -ApplicationMgr INFO Successfully loaded modules : AthenaServices ApplicationMgr INFO Application Manager Configured successfully ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 StatusCodeSvc INFO initialize AthDictLoaderSvc INFO in initialize... AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO getRegistryEntries: read 7037 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 3167 CLIDRegistry entries for module ALL CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00 ClassIDSvc INFO getRegistryEntries: read 836 CLIDRegistry entries for module ALL @@ -36,8 +35,8 @@ PoolSvc DEBUG Service base class initialized successfully PoolSvc INFO Set connectionsvc retry/timeout/IDLE timeout to 'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled PoolSvc INFO Frontier compression level set to 5 DBReplicaSvc INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-02-04T2257/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus115.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] +DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-05T2139/Athena/22.0.1/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config +DBReplicaSvc INFO Total of 10 servers found for host lxplus084.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] PoolSvc INFO Successfully setup replica sorting algorithm PoolSvc DEBUG OutputLevel is PoolSvc INFO Setting up APR FileCatalog and Streams @@ -162,7 +161,7 @@ MetaDataHdr(Dat... DEBUG Opening MetaDataHdr(Dat... DEBUG attributes# = 1 MetaDataHdr(Dat... DEBUG Branch container 'DataHeader' MetaDataHdr(Dat... DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree -ClassIDSvc INFO getRegistryEntries: read 1801 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 2078 CLIDRegistry entries for module ALL EventPersistenc... INFO Added successfully Conversion service:AthenaPoolCnvSvc SimplePoolFile1... DEBUG --> Access DbContainer READ [ROOT_Tree] MetaDataHdrForm(DataHeaderForm) MetaDataHdrForm... DEBUG Opening @@ -279,9 +278,10 @@ POOLContainerFo... DEBUG Opening POOLContainerFo... DEBUG attributes# = 1 POOLContainerFo... DEBUG Branch container 'DataHeaderForm' POOLContainerFo... DEBUG Opened container POOLContainerForm(DataHeaderForm) of type ROOT_Tree -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AlgResourcePool INFO TopAlg list empty. Recovering the one of Application Manager SimplePoolFile1... DEBUG --> Access DbContainer READ [ROOT_Tree] CollectionTree(EventInfo_p4/McEventInfo) CollectionTree(... DEBUG Opening @@ -301,6 +301,7 @@ ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -322,23 +323,25 @@ ReadData INFO Hit x = 1020.49 y = 63.5816 z = -951.864 detector = Du ReadData INFO Hit x = 1023.7 y = 57.9027 z = -953.684 detector = DummyHitDetector ReadData INFO Hit x = 1026.91 y = 52.2238 z = -955.073 detector = DummyHitDetector ReadData INFO Hit x = 1030.12 y = 46.5449 z = -956.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 20094 -PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 23 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 20?36 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #10, run #1 1 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000B]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000B]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000B] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #11, run #1 1 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -355,23 +358,25 @@ ReadData INFO Hit x = 1120.49 y = 63.5816 z = -1051.86 detector = Du ReadData INFO Hit x = 1123.7 y = 57.9027 z = -1053.68 detector = DummyHitDetector ReadData INFO Hit x = 1126.91 y = 52.2238 z = -1055.07 detector = DummyHitDetector ReadData INFO Hit x = 1130.12 y = 46.5449 z = -1056.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 20094 -PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 23 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 20?36 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #11, run #1 2 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000C]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000C]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000C] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #12, run #1 2 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -388,23 +393,25 @@ ReadData INFO Hit x = 1220.49 y = 63.5816 z = -1151.86 detector = Du ReadData INFO Hit x = 1223.7 y = 57.9027 z = -1153.68 detector = DummyHitDetector ReadData INFO Hit x = 1226.91 y = 52.2238 z = -1155.07 detector = DummyHitDetector ReadData INFO Hit x = 1230.12 y = 46.5449 z = -1156.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 20094 -PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 23 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 20?36 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #12, run #1 3 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000D]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000D]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000D] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #13, run #1 3 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -421,23 +428,25 @@ ReadData INFO Hit x = 1320.49 y = 63.5816 z = -1251.86 detector = Du ReadData INFO Hit x = 1323.7 y = 57.9027 z = -1253.68 detector = DummyHitDetector ReadData INFO Hit x = 1326.91 y = 52.2238 z = -1255.07 detector = DummyHitDetector ReadData INFO Hit x = 1330.12 y = 46.5449 z = -1256.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 20094 -PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 23 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 20?36 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #13, run #1 4 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000E]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000E]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000E] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #14, run #1 4 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -454,23 +463,25 @@ ReadData INFO Hit x = 1420.49 y = 63.5816 z = -1351.86 detector = Du ReadData INFO Hit x = 1423.7 y = 57.9027 z = -1353.68 detector = DummyHitDetector ReadData INFO Hit x = 1426.91 y = 52.2238 z = -1355.07 detector = DummyHitDetector ReadData INFO Hit x = 1430.12 y = 46.5449 z = -1356.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 20094 -PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 23 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 20?36 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #14, run #1 5 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000F]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000F]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000F] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #15, run #1 5 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -487,23 +498,25 @@ ReadData INFO Hit x = 1520.49 y = 63.5816 z = -1451.86 detector = Du ReadData INFO Hit x = 1523.7 y = 57.9027 z = -1453.68 detector = DummyHitDetector ReadData INFO Hit x = 1526.91 y = 52.2238 z = -1455.07 detector = DummyHitDetector ReadData INFO Hit x = 1530.12 y = 46.5449 z = -1456.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 20094 -PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 23 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 20?36 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #15, run #1 6 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000010]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000010]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000010] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #16, run #1 6 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -520,23 +533,25 @@ ReadData INFO Hit x = 1620.49 y = 63.5816 z = -1551.86 detector = Du ReadData INFO Hit x = 1623.7 y = 57.9027 z = -1553.68 detector = DummyHitDetector ReadData INFO Hit x = 1626.91 y = 52.2238 z = -1555.07 detector = DummyHitDetector ReadData INFO Hit x = 1630.12 y = 46.5449 z = -1556.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 20094 -PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 23 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 20?36 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #16, run #1 7 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000011]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000011]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000011] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #17, run #1 7 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -553,23 +568,25 @@ ReadData INFO Hit x = 1720.49 y = 63.5816 z = -1651.86 detector = Du ReadData INFO Hit x = 1723.7 y = 57.9027 z = -1653.68 detector = DummyHitDetector ReadData INFO Hit x = 1726.91 y = 52.2238 z = -1655.07 detector = DummyHitDetector ReadData INFO Hit x = 1730.12 y = 46.5449 z = -1656.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 20094 -PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 23 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 20?36 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #17, run #1 8 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000012]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000012]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000012] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #18, run #1 8 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -586,23 +603,25 @@ ReadData INFO Hit x = 1820.49 y = 63.5816 z = -1751.86 detector = Du ReadData INFO Hit x = 1823.7 y = 57.9027 z = -1753.68 detector = DummyHitDetector ReadData INFO Hit x = 1826.91 y = 52.2238 z = -1755.07 detector = DummyHitDetector ReadData INFO Hit x = 1830.12 y = 46.5449 z = -1756.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 20094 -PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 23 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 20?36 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #18, run #1 9 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000013]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000013]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000013] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #19, run #1 9 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -619,8 +638,8 @@ ReadData INFO Hit x = 1920.49 y = 63.5816 z = -1851.86 detector = Du ReadData INFO Hit x = 1923.7 y = 57.9027 z = -1853.68 detector = DummyHitDetector ReadData INFO Hit x = 1926.91 y = 52.2238 z = -1855.07 detector = DummyHitDetector ReadData INFO Hit x = 1930.12 y = 46.5449 z = -1856.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 20094 -PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 23 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 20?36 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #19, run #1 10 events processed so far <<<=== MetaDataSvc DEBUG handle() EndInputFile for FID:???? EventSelector INFO Disconnecting input sourceID: ???? @@ -785,8 +804,9 @@ POOLContainerFo... DEBUG Opening POOLContainerFo... DEBUG attributes# = 1 POOLContainerFo... DEBUG Branch container 'DataHeaderForm' POOLContainerFo... DEBUG Opened container POOLContainerForm(DataHeaderForm) of type ROOT_Tree -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag SimplePoolFile2... DEBUG --> Access DbContainer READ [ROOT_Tree] CollectionTree(EventInfo_p4/McEventInfo) CollectionTree(... DEBUG Opening CollectionTree(... DEBUG attributes# = 1 @@ -802,6 +822,7 @@ MetaData(EventS... DEBUG Opened container MetaData(EventStreamInfo_p3/Stream2) ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -809,7 +830,7 @@ ReadData INFO EventInfo event: 0 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16734 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16796 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #0, run #1 11 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -817,13 +838,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000001]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000001]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000001] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #1, run #1 11 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -831,7 +854,7 @@ ReadData INFO EventInfo event: 1 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16734 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16796 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #1, run #1 12 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -839,13 +862,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000002]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000002]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000002] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #2, run #1 12 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -853,7 +878,7 @@ ReadData INFO EventInfo event: 2 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16734 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16796 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #2, run #1 13 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -861,13 +886,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000003]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000003]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000003] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #3, run #1 13 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -875,7 +902,7 @@ ReadData INFO EventInfo event: 3 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16734 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16796 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #3, run #1 14 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -883,13 +910,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000004]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000004]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000004] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #4, run #1 14 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -897,7 +926,7 @@ ReadData INFO EventInfo event: 4 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16734 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16796 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #4, run #1 15 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -905,13 +934,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000005]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000005]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000005] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #5, run #1 15 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -919,7 +950,7 @@ ReadData INFO EventInfo event: 5 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16734 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16796 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #5, run #1 16 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -927,13 +958,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000006]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000006]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000006] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #6, run #1 16 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -941,7 +974,7 @@ ReadData INFO EventInfo event: 6 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16734 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16796 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #6, run #1 17 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -949,13 +982,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000007]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000007]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000007] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #7, run #1 17 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -963,7 +998,7 @@ ReadData INFO EventInfo event: 7 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16734 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16796 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #7, run #1 18 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -971,13 +1006,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000008]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000008]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000008] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #8, run #1 18 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -985,7 +1022,7 @@ ReadData INFO EventInfo event: 8 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16734 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16796 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #8, run #1 19 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -993,13 +1030,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000009]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000009]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000009] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #9, run #1 19 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1007,7 +1046,7 @@ ReadData INFO EventInfo event: 9 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16734 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16796 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #9, run #1 20 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1015,13 +1054,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000A]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000A]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000A] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #10, run #1 20 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1029,7 +1070,7 @@ ReadData INFO EventInfo event: 10 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16734 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16796 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #10, run #1 21 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1037,13 +1078,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #11, run #1 21 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1051,7 +1094,7 @@ ReadData INFO EventInfo event: 11 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16734 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16796 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #11, run #1 22 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1059,13 +1102,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000C]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000C]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000C] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #12, run #1 22 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1073,7 +1118,7 @@ ReadData INFO EventInfo event: 12 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16734 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16796 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #12, run #1 23 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1081,13 +1126,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000D]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000D]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000D] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #13, run #1 23 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1095,7 +1142,7 @@ ReadData INFO EventInfo event: 13 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16734 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16796 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #13, run #1 24 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1103,13 +1150,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000E]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000E]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000E] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #14, run #1 24 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1117,7 +1166,7 @@ ReadData INFO EventInfo event: 14 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16734 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16796 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #14, run #1 25 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1125,13 +1174,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000F]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000F]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000F] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #15, run #1 25 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1139,7 +1190,7 @@ ReadData INFO EventInfo event: 15 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16734 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16796 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #15, run #1 26 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1147,13 +1198,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000010]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000010]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000010] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #16, run #1 26 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1161,7 +1214,7 @@ ReadData INFO EventInfo event: 16 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16734 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16796 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #16, run #1 27 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1169,13 +1222,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000011]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000011]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000011] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #17, run #1 27 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1183,7 +1238,7 @@ ReadData INFO EventInfo event: 17 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16734 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16796 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #17, run #1 28 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1191,13 +1246,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000012]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000012]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000012] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #18, run #1 28 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1205,7 +1262,7 @@ ReadData INFO EventInfo event: 18 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16734 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16796 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #18, run #1 29 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1213,13 +1270,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000013]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000013]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000013] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #19, run #1 29 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1227,7 +1286,7 @@ ReadData INFO EventInfo event: 19 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16734 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16796 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #19, run #1 30 events processed so far <<<=== MetaDataSvc DEBUG handle() EndInputFile for FID:???? @@ -1370,7 +1429,7 @@ ReadData INFO Track pt = 74.8928 eta = 3.1676 phi = 2.6161 detector DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18945 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #0, run #1 31 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1396,7 +1455,7 @@ ReadData INFO Track pt = 137.584 eta = -39.525 phi = 17.2679 detecto DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18945 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #1, run #1 32 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1422,7 +1481,7 @@ ReadData INFO Track pt = 228.154 eta = -6.2704 phi = 31.9197 detecto DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18945 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #2, run #1 33 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1448,7 +1507,7 @@ ReadData INFO Track pt = 324.306 eta = -15.8941 phi = 46.5715 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18945 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #3, run #1 34 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1474,7 +1533,7 @@ ReadData INFO Track pt = 422.255 eta = -13.279 phi = 61.2233 detecto DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18945 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #4, run #1 35 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1500,7 +1559,7 @@ ReadData INFO Track pt = 520.987 eta = -12.3511 phi = 75.8751 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18945 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #5, run #1 36 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1526,7 +1585,7 @@ ReadData INFO Track pt = 620.127 eta = -11.8468 phi = 90.5269 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18945 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #6, run #1 37 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1552,7 +1611,7 @@ ReadData INFO Track pt = 719.507 eta = -11.5247 phi = 105.179 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18945 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #7, run #1 38 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1578,7 +1637,7 @@ ReadData INFO Track pt = 819.038 eta = -11.2998 phi = 119.831 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18945 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #8, run #1 39 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1604,7 +1663,7 @@ ReadData INFO Track pt = 918.671 eta = -11.1334 phi = 134.482 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18945 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #9, run #1 40 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1630,7 +1689,7 @@ ReadData INFO Track pt = 1018.38 eta = -11.0052 phi = 149.134 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18945 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #10, run #1 41 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1656,7 +1715,7 @@ ReadData INFO Track pt = 1118.13 eta = -10.9031 phi = 163.786 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18945 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #11, run #1 42 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1682,7 +1741,7 @@ ReadData INFO Track pt = 1217.93 eta = -10.82 phi = 178.438 detector DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18945 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #12, run #1 43 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1708,7 +1767,7 @@ ReadData INFO Track pt = 1317.76 eta = -10.751 phi = 193.09 detector DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18945 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #13, run #1 44 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1734,7 +1793,7 @@ ReadData INFO Track pt = 1417.61 eta = -10.6927 phi = 207.741 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18945 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #14, run #1 45 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1760,7 +1819,7 @@ ReadData INFO Track pt = 1517.49 eta = -10.6429 phi = 222.393 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18945 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #15, run #1 46 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1786,7 +1845,7 @@ ReadData INFO Track pt = 1617.37 eta = -10.5997 phi = 237.045 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18945 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #16, run #1 47 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1812,7 +1871,7 @@ ReadData INFO Track pt = 1717.27 eta = -10.562 phi = 251.697 detecto DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18945 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #17, run #1 48 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1838,7 +1897,7 @@ ReadData INFO Track pt = 1817.19 eta = -10.5288 phi = 266.349 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18945 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #18, run #1 49 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1864,7 +1923,7 @@ ReadData INFO Track pt = 1917.11 eta = -10.4993 phi = 281 detector = DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18966 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18945 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #19, run #1 50 events processed so far <<<=== MetaDataSvc DEBUG handle() EndInputFile for FID:???? @@ -1884,8 +1943,8 @@ ToolSvc INFO Removing all tools created by ToolSvc *****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) *****Chrono***** INFO **************************************************************************************************** cObjR_ALL INFO Time User : Tot= 10 [ms] Ave/Min/Max=0.099(+- 0.99)/ 0/ 10 [ms] #=101 -cObj_ALL INFO Time User : Tot= 50 [ms] Ave/Min/Max=0.543(+- 2.7)/ 0/ 20 [ms] #= 92 -ChronoStatSvc INFO Time User : Tot= 0.92 [s] #= 1 +cObj_ALL INFO Time User : Tot= 20 [ms] Ave/Min/Max=0.217(+- 1.46)/ 0/ 10 [ms] #= 92 +ChronoStatSvc INFO Time User : Tot= 0.58 [s] #= 1 *****Chrono***** INFO **************************************************************************************************** ChronoStatSvc.f... INFO Service finalized successfully ApplicationMgr INFO Application Manager Finalized successfully diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadAgain.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadAgain.ref index 07a000d002ed011b6aa62adbbf4f3d9128284c8d..9c8d91f31428303d97b83b80bad1e5a0faee828d 100644 --- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadAgain.ref +++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadAgain.ref @@ -1,27 +1,26 @@ -Tue Feb 5 19:29:52 CET 2019 +Wed Mar 6 20:54:14 CET 2019 Preloading tcmalloc_minimal.so Athena INFO including file "AthenaCommon/Preparation.py" Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" Athena INFO executing ROOT6Setup Athena INFO including file "AthenaCommon/Execution.py" Athena INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_ReadAgainJobOptions.py" -Py:ConfigurableDb INFO Read module info for 5456 configurables from 56 genConfDb files +Py:ConfigurableDb INFO Read module info for 5461 configurables from 48 genConfDb files Py:ConfigurableDb INFO No duplicates have been found: that's good ! Athena INFO including file "AthenaCommon/runbatch.py" -[?1034hApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 +ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 ApplicationMgr SUCCESS ==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v30r5) - running on lxplus115.cern.ch on Tue Feb 5 19:30:14 2019 + Welcome to ApplicationMgr (GaudiCoreSvc v31r0) + running on lxplus084.cern.ch on Wed Mar 6 20:54:28 2019 ==================================================================================================================================== -ApplicationMgr INFO Successfully loaded modules : AthenaServices ApplicationMgr INFO Application Manager Configured successfully ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 StatusCodeSvc INFO initialize AthDictLoaderSvc INFO in initialize... AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO getRegistryEntries: read 7037 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 3167 CLIDRegistry entries for module ALL CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00 ClassIDSvc INFO getRegistryEntries: read 836 CLIDRegistry entries for module ALL @@ -36,8 +35,8 @@ PoolSvc DEBUG Service base class initialized successfully PoolSvc INFO Set connectionsvc retry/timeout/IDLE timeout to 'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled PoolSvc INFO Frontier compression level set to 5 DBReplicaSvc INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-02-04T2257/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus115.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] +DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-05T2139/Athena/22.0.1/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config +DBReplicaSvc INFO Total of 10 servers found for host lxplus084.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] PoolSvc INFO Successfully setup replica sorting algorithm PoolSvc DEBUG OutputLevel is PoolSvc INFO Setting up APR FileCatalog and Streams @@ -156,7 +155,7 @@ MetaDataHdr(Dat... DEBUG Opening MetaDataHdr(Dat... DEBUG attributes# = 1 MetaDataHdr(Dat... DEBUG Branch container 'DataHeader' MetaDataHdr(Dat... DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree -ClassIDSvc INFO getRegistryEntries: read 1798 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 2075 CLIDRegistry entries for module ALL EventPersistenc... INFO Added successfully Conversion service:AthenaPoolCnvSvc SimplePoolRepli... DEBUG --> Access DbContainer READ [ROOT_Tree] MetaDataHdrForm(DataHeaderForm) MetaDataHdrForm... DEBUG Opening @@ -381,8 +380,8 @@ ReadData INFO Hit x = 1020.49 y = 63.5816 z = -951.864 detector = Du ReadData INFO Hit x = 1023.7 y = 57.9027 z = -953.684 detector = DummyHitDetector ReadData INFO Hit x = 1026.91 y = 52.2238 z = -955.073 detector = DummyHitDetector ReadData INFO Hit x = 1030.12 y = 46.5449 z = -956.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 19644 -PoolSvc INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 23 +PoolSvc INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 19623 +PoolSvc INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #10, run #1 1 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 0 @@ -414,8 +413,8 @@ ReadData INFO Hit x = 1120.49 y = 63.5816 z = -1051.86 detector = Du ReadData INFO Hit x = 1123.7 y = 57.9027 z = -1053.68 detector = DummyHitDetector ReadData INFO Hit x = 1126.91 y = 52.2238 z = -1055.07 detector = DummyHitDetector ReadData INFO Hit x = 1130.12 y = 46.5449 z = -1056.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 19644 -PoolSvc INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 23 +PoolSvc INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 19623 +PoolSvc INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #11, run #1 2 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 0 @@ -447,8 +446,8 @@ ReadData INFO Hit x = 1220.49 y = 63.5816 z = -1151.86 detector = Du ReadData INFO Hit x = 1223.7 y = 57.9027 z = -1153.68 detector = DummyHitDetector ReadData INFO Hit x = 1226.91 y = 52.2238 z = -1155.07 detector = DummyHitDetector ReadData INFO Hit x = 1230.12 y = 46.5449 z = -1156.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 19644 -PoolSvc INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 23 +PoolSvc INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 19623 +PoolSvc INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #12, run #1 3 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 0 @@ -480,8 +479,8 @@ ReadData INFO Hit x = 1320.49 y = 63.5816 z = -1251.86 detector = Du ReadData INFO Hit x = 1323.7 y = 57.9027 z = -1253.68 detector = DummyHitDetector ReadData INFO Hit x = 1326.91 y = 52.2238 z = -1255.07 detector = DummyHitDetector ReadData INFO Hit x = 1330.12 y = 46.5449 z = -1256.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 19644 -PoolSvc INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 23 +PoolSvc INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 19623 +PoolSvc INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #13, run #1 4 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 0 @@ -513,8 +512,8 @@ ReadData INFO Hit x = 1420.49 y = 63.5816 z = -1351.86 detector = Du ReadData INFO Hit x = 1423.7 y = 57.9027 z = -1353.68 detector = DummyHitDetector ReadData INFO Hit x = 1426.91 y = 52.2238 z = -1355.07 detector = DummyHitDetector ReadData INFO Hit x = 1430.12 y = 46.5449 z = -1356.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 19644 -PoolSvc INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 23 +PoolSvc INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 19623 +PoolSvc INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #14, run #1 5 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 0 @@ -546,8 +545,8 @@ ReadData INFO Hit x = 1520.49 y = 63.5816 z = -1451.86 detector = Du ReadData INFO Hit x = 1523.7 y = 57.9027 z = -1453.68 detector = DummyHitDetector ReadData INFO Hit x = 1526.91 y = 52.2238 z = -1455.07 detector = DummyHitDetector ReadData INFO Hit x = 1530.12 y = 46.5449 z = -1456.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 19644 -PoolSvc INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 23 +PoolSvc INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 19623 +PoolSvc INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #15, run #1 6 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 0 @@ -579,8 +578,8 @@ ReadData INFO Hit x = 1620.49 y = 63.5816 z = -1551.86 detector = Du ReadData INFO Hit x = 1623.7 y = 57.9027 z = -1553.68 detector = DummyHitDetector ReadData INFO Hit x = 1626.91 y = 52.2238 z = -1555.07 detector = DummyHitDetector ReadData INFO Hit x = 1630.12 y = 46.5449 z = -1556.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 19644 -PoolSvc INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 23 +PoolSvc INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 19623 +PoolSvc INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #16, run #1 7 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 0 @@ -612,8 +611,8 @@ ReadData INFO Hit x = 1720.49 y = 63.5816 z = -1651.86 detector = Du ReadData INFO Hit x = 1723.7 y = 57.9027 z = -1653.68 detector = DummyHitDetector ReadData INFO Hit x = 1726.91 y = 52.2238 z = -1655.07 detector = DummyHitDetector ReadData INFO Hit x = 1730.12 y = 46.5449 z = -1656.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 19644 -PoolSvc INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 23 +PoolSvc INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 19623 +PoolSvc INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #17, run #1 8 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 0 @@ -645,8 +644,8 @@ ReadData INFO Hit x = 1820.49 y = 63.5816 z = -1751.86 detector = Du ReadData INFO Hit x = 1823.7 y = 57.9027 z = -1753.68 detector = DummyHitDetector ReadData INFO Hit x = 1826.91 y = 52.2238 z = -1755.07 detector = DummyHitDetector ReadData INFO Hit x = 1830.12 y = 46.5449 z = -1756.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 19644 -PoolSvc INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 23 +PoolSvc INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 19623 +PoolSvc INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #18, run #1 9 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection EventSelector DEBUG AttributeList size 0 @@ -678,8 +677,8 @@ ReadData INFO Hit x = 1920.49 y = 63.5816 z = -1851.86 detector = Du ReadData INFO Hit x = 1923.7 y = 57.9027 z = -1853.68 detector = DummyHitDetector ReadData INFO Hit x = 1926.91 y = 52.2238 z = -1855.07 detector = DummyHitDetector ReadData INFO Hit x = 1930.12 y = 46.5449 z = -1856.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 19644 -PoolSvc INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 23 +PoolSvc INFO Database (SimplePoolReplica1.root) attribute [BYTES_READ]: 19623 +PoolSvc INFO Database (SimplePoolReplica1.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #19, run #1 10 events processed so far <<<=== Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? Domain[ROOT_All] INFO > Deaccess DbDomain READ [ROOT_All] @@ -845,8 +844,9 @@ POOLContainerFo... DEBUG Opening POOLContainerFo... DEBUG attributes# = 1 POOLContainerFo... DEBUG Branch container 'DataHeaderForm' POOLContainerFo... DEBUG Opened container POOLContainerForm(DataHeaderForm) of type ROOT_Tree -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag SimplePoolFile2... DEBUG --> Access DbContainer READ [ROOT_Tree] CollectionTree(EventInfo_p4/McEventInfo) CollectionTree(... DEBUG Opening CollectionTree(... DEBUG attributes# = 1 @@ -862,6 +862,7 @@ MetaData(EventS... DEBUG Opened container MetaData(EventStreamInfo_p3/Stream2) ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -869,7 +870,7 @@ ReadData INFO EventInfo event: 0 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16738 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16799 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #0, run #1 11 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -877,13 +878,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000001]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000001]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000001] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #1, run #1 11 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -891,7 +894,7 @@ ReadData INFO EventInfo event: 1 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16738 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16799 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #1, run #1 12 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -899,13 +902,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000002]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000002]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000002] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #2, run #1 12 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -913,7 +918,7 @@ ReadData INFO EventInfo event: 2 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16738 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16799 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #2, run #1 13 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -921,13 +926,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000003]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000003]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000003] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #3, run #1 13 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -935,7 +942,7 @@ ReadData INFO EventInfo event: 3 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16738 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16799 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #3, run #1 14 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -943,13 +950,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000004]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000004]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000004] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #4, run #1 14 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -957,7 +966,7 @@ ReadData INFO EventInfo event: 4 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16738 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16799 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #4, run #1 15 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -965,13 +974,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000005]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000005]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000005] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #5, run #1 15 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -979,7 +990,7 @@ ReadData INFO EventInfo event: 5 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16738 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16799 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #5, run #1 16 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -987,13 +998,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000006]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000006]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000006] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #6, run #1 16 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1001,7 +1014,7 @@ ReadData INFO EventInfo event: 6 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16738 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16799 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #6, run #1 17 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1009,13 +1022,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000007]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000007]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000007] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #7, run #1 17 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1023,7 +1038,7 @@ ReadData INFO EventInfo event: 7 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16738 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16799 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #7, run #1 18 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1031,13 +1046,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000008]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000008]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000008] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #8, run #1 18 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1045,7 +1062,7 @@ ReadData INFO EventInfo event: 8 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16738 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16799 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #8, run #1 19 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1053,13 +1070,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000009]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000009]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000009] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #9, run #1 19 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1067,7 +1086,7 @@ ReadData INFO EventInfo event: 9 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16738 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16799 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #9, run #1 20 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1075,13 +1094,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000A]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000A]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000A] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #10, run #1 20 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1089,7 +1110,7 @@ ReadData INFO EventInfo event: 10 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16738 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16799 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #10, run #1 21 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1097,13 +1118,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #11, run #1 21 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1111,7 +1134,7 @@ ReadData INFO EventInfo event: 11 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16738 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16799 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #11, run #1 22 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1119,13 +1142,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000C]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000C]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000C] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #12, run #1 22 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1133,7 +1158,7 @@ ReadData INFO EventInfo event: 12 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16738 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16799 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #12, run #1 23 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1141,13 +1166,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000D]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000D]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000D] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #13, run #1 23 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1155,7 +1182,7 @@ ReadData INFO EventInfo event: 13 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16738 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16799 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #13, run #1 24 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1163,13 +1190,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000E]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000E]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000E] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #14, run #1 24 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1177,7 +1206,7 @@ ReadData INFO EventInfo event: 14 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16738 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16799 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #14, run #1 25 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1185,13 +1214,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000F]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000F]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000F] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #15, run #1 25 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1199,7 +1230,7 @@ ReadData INFO EventInfo event: 15 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16738 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16799 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #15, run #1 26 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1207,13 +1238,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000010]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000010]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000010] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #16, run #1 26 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1221,7 +1254,7 @@ ReadData INFO EventInfo event: 16 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16738 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16799 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #16, run #1 27 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1229,13 +1262,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000011]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000011]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000011] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #17, run #1 27 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1243,7 +1278,7 @@ ReadData INFO EventInfo event: 17 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16738 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16799 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #17, run #1 28 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1251,13 +1286,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000012]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000012]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000012] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #18, run #1 28 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1265,7 +1302,7 @@ ReadData INFO EventInfo event: 18 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16738 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16799 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #18, run #1 29 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1273,13 +1310,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000013]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000013]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000013] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #19, run #1 29 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1287,7 +1326,7 @@ ReadData INFO EventInfo event: 19 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16738 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16799 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #19, run #1 30 events processed so far <<<=== MetaDataSvc DEBUG handle() EndInputFile for FID:???? @@ -1430,7 +1469,7 @@ ReadData INFO Track pt = 74.8928 eta = 3.1676 phi = 2.6161 detector DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19068 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19048 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #0, run #1 31 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1456,7 +1495,7 @@ ReadData INFO Track pt = 137.584 eta = -39.525 phi = 17.2679 detecto DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19068 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19048 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #1, run #1 32 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1482,7 +1521,7 @@ ReadData INFO Track pt = 228.154 eta = -6.2704 phi = 31.9197 detecto DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19068 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19048 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #2, run #1 33 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1508,7 +1547,7 @@ ReadData INFO Track pt = 324.306 eta = -15.8941 phi = 46.5715 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19068 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19048 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #3, run #1 34 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1534,7 +1573,7 @@ ReadData INFO Track pt = 422.255 eta = -13.279 phi = 61.2233 detecto DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19068 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19048 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #4, run #1 35 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1560,7 +1599,7 @@ ReadData INFO Track pt = 520.987 eta = -12.3511 phi = 75.8751 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19068 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19048 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #5, run #1 36 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1586,7 +1625,7 @@ ReadData INFO Track pt = 620.127 eta = -11.8468 phi = 90.5269 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19068 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19048 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #6, run #1 37 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1612,7 +1651,7 @@ ReadData INFO Track pt = 719.507 eta = -11.5247 phi = 105.179 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19068 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19048 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #7, run #1 38 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1638,7 +1677,7 @@ ReadData INFO Track pt = 819.038 eta = -11.2998 phi = 119.831 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19068 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19048 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #8, run #1 39 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1664,7 +1703,7 @@ ReadData INFO Track pt = 918.671 eta = -11.1334 phi = 134.482 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19068 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19048 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #9, run #1 40 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1690,7 +1729,7 @@ ReadData INFO Track pt = 1018.38 eta = -11.0052 phi = 149.134 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19068 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19048 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #10, run #1 41 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1716,7 +1755,7 @@ ReadData INFO Track pt = 1118.13 eta = -10.9031 phi = 163.786 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19068 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19048 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #11, run #1 42 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1742,7 +1781,7 @@ ReadData INFO Track pt = 1217.93 eta = -10.82 phi = 178.438 detector DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19068 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19048 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #12, run #1 43 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1768,7 +1807,7 @@ ReadData INFO Track pt = 1317.76 eta = -10.751 phi = 193.09 detector DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19068 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19048 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #13, run #1 44 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1794,7 +1833,7 @@ ReadData INFO Track pt = 1417.61 eta = -10.6927 phi = 207.741 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19068 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19048 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #14, run #1 45 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1820,7 +1859,7 @@ ReadData INFO Track pt = 1517.49 eta = -10.6429 phi = 222.393 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19068 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19048 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #15, run #1 46 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1846,7 +1885,7 @@ ReadData INFO Track pt = 1617.37 eta = -10.5997 phi = 237.045 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19068 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19048 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #16, run #1 47 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1872,7 +1911,7 @@ ReadData INFO Track pt = 1717.27 eta = -10.562 phi = 251.697 detecto DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19068 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19048 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #17, run #1 48 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1898,7 +1937,7 @@ ReadData INFO Track pt = 1817.19 eta = -10.5288 phi = 266.349 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19068 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19048 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #18, run #1 49 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1924,7 +1963,7 @@ ReadData INFO Track pt = 1917.11 eta = -10.4993 phi = 281 detector = DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19068 +PoolSvc INFO Database (SimplePoolFile4.root) attribute [BYTES_READ]: 19048 PoolSvc INFO Database (SimplePoolFile4.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #19, run #1 50 events processed so far <<<=== MetaDataSvc DEBUG handle() EndInputFile for FID:???? @@ -1943,9 +1982,9 @@ ToolSvc INFO Removing all tools created by ToolSvc *****Chrono***** INFO **************************************************************************************************** *****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) *****Chrono***** INFO **************************************************************************************************** -cObjR_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #=101 -cObj_ALL INFO Time User : Tot= 40 [ms] Ave/Min/Max=0.435(+- 2.52)/ 0/ 20 [ms] #= 92 -ChronoStatSvc INFO Time User : Tot= 0.95 [s] #= 1 +cObjR_ALL INFO Time User : Tot= 10 [ms] Ave/Min/Max=0.099(+- 0.99)/ 0/ 10 [ms] #=101 +cObj_ALL INFO Time User : Tot= 10 [ms] Ave/Min/Max=0.109(+- 1.04)/ 0/ 10 [ms] #= 92 +ChronoStatSvc INFO Time User : Tot= 0.58 [s] #= 1 *****Chrono***** INFO **************************************************************************************************** ChronoStatSvc.f... INFO Service finalized successfully ApplicationMgr INFO Application Manager Finalized successfully diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadConcat.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadConcat.ref index 673cabcad57fcb0f286b21cef9643107f19208a9..277b7800a5ac6aac233494f10a4cc66b257c4c51 100644 --- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadConcat.ref +++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_ReadConcat.ref @@ -1,27 +1,26 @@ -Tue Feb 5 19:30:58 CET 2019 +Wed Mar 6 20:35:46 CET 2019 Preloading tcmalloc_minimal.so Athena INFO including file "AthenaCommon/Preparation.py" Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" Athena INFO executing ROOT6Setup Athena INFO including file "AthenaCommon/Execution.py" Athena INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_ReadJobOptions.py" -Py:ConfigurableDb INFO Read module info for 5456 configurables from 56 genConfDb files +Py:ConfigurableDb INFO Read module info for 5461 configurables from 48 genConfDb files Py:ConfigurableDb INFO No duplicates have been found: that's good ! Athena INFO including file "AthenaCommon/runbatch.py" -[?1034hApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 +ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 ApplicationMgr SUCCESS ==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v30r5) - running on lxplus115.cern.ch on Tue Feb 5 19:31:22 2019 + Welcome to ApplicationMgr (GaudiCoreSvc v31r0) + running on lxplus084.cern.ch on Wed Mar 6 20:35:57 2019 ==================================================================================================================================== -ApplicationMgr INFO Successfully loaded modules : AthenaServices ApplicationMgr INFO Application Manager Configured successfully ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 StatusCodeSvc INFO initialize AthDictLoaderSvc INFO in initialize... AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO getRegistryEntries: read 7037 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 3167 CLIDRegistry entries for module ALL CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00 ClassIDSvc INFO getRegistryEntries: read 836 CLIDRegistry entries for module ALL @@ -36,8 +35,8 @@ PoolSvc DEBUG Service base class initialized successfully PoolSvc INFO Set connectionsvc retry/timeout/IDLE timeout to 'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled PoolSvc INFO Frontier compression level set to 5 DBReplicaSvc INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-02-04T2257/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus115.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] +DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-05T2139/Athena/22.0.1/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config +DBReplicaSvc INFO Total of 10 servers found for host lxplus084.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] PoolSvc INFO Successfully setup replica sorting algorithm PoolSvc DEBUG OutputLevel is PoolSvc INFO Setting up APR FileCatalog and Streams @@ -94,7 +93,8 @@ EventSelector DEBUG No events found in: EmptyPoolFile.root skipped!!! Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? Domain[ROOT_All] INFO > Deaccess DbDomain READ [ROOT_All] EventSelector DEBUG Try item: "SimplePoolFile1.root" from the collection list. -PersistencySvc:... DEBUG lookupPFN: SimplePoolFile1.root returned FID: '????' tech=ROOT_All +MetaDataSvc DEBUG handle() FirstInputFile for FID:???? +MetaDataSvc DEBUG initInputMetaDataStore: file name FID:???? DbSession INFO Open DbSession Domain[ROOT_All] INFO > Access DbDomain READ [ROOT_All] Domain[ROOT_All] INFO -> Access DbDatabase READ [ROOT_All] ???? @@ -112,8 +112,18 @@ SimplePoolFile1... DEBUG ---->[0]:DataHeaderForm_p5 Typ:DataHeaderForm_p5 [21] SimplePoolFile1... DEBUG --->Reading Shape[3 , ????]: [1 Column(s)] SimplePoolFile1... DEBUG ---->[0]:DataHeader_p5 Typ:DataHeader_p5 [21] Size:0 Offset:0 #Elements:1 SimplePoolFile1... DEBUG --->Reading Shape[4 , ????]: [1 Column(s)] +SimplePoolFile1... DEBUG ---->[0]:Token Typ:Token [18] Size:0 Offset:0 #Elements:1 +SimplePoolFile1... DEBUG --->Reading Shape[5 , ????]: [1 Column(s)] +SimplePoolFile1... DEBUG ---->[0]:bool Typ:bool [9] Size:0 Offset:0 #Elements:1 +SimplePoolFile1... DEBUG --->Reading Shape[6 , ????]: [1 Column(s)] +SimplePoolFile1... DEBUG ---->[0]:unsigned int Typ:unsigned int [3] Size:0 Offset:0 #Elements:1 +SimplePoolFile1... DEBUG --->Reading Shape[7 , ????]: [1 Column(s)] +SimplePoolFile1... DEBUG ---->[0]:unsigned long long Typ:unsigned long long [23] Size:0 Offset:0 #Elements:1 +SimplePoolFile1... DEBUG --->Reading Shape[8 , ????]: [1 Column(s)] +SimplePoolFile1... DEBUG ---->[0]:float Typ:float [10] Size:0 Offset:0 #Elements:1 +SimplePoolFile1... DEBUG --->Reading Shape[9 , ????]: [1 Column(s)] SimplePoolFile1... DEBUG ---->[0]:EventStreamInfo_p3 Typ:EventStreamInfo_p3 [21] Size:0 Offset:0 #Elements:1 -##Shapes DEBUG No objects passing selection criteria... Container has 5 Entries in total. +##Shapes DEBUG No objects passing selection criteria... Container has 10 Entries in total. SimplePoolFile1... DEBUG --> Access DbContainer READ [ROOT_All] ##Links ##Links DEBUG Opening ##Links DEBUG attributes# = 1 @@ -128,13 +138,39 @@ SimplePoolFile1... DEBUG --->Reading Assoc:????/POOLContainerForm(DataHeaderFor SimplePoolFile1... DEBUG ---->ClassID:???? SimplePoolFile1... DEBUG --->Reading Assoc:????/POOLContainer(DataHeader) [20?] (6 , ffffffff) SimplePoolFile1... DEBUG ---->ClassID:???? -SimplePoolFile1... DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream1) [20?] (7 , ffffffff) +SimplePoolFile1... DEBUG --->Reading Assoc:????/POOLCollectionTree(Token) [20?] (7 , ffffffff) SimplePoolFile1... DEBUG ---->ClassID:???? -SimplePoolFile1... DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?] (8 , ffffffff) +SimplePoolFile1... DEBUG --->Reading Assoc:????/POOLCollectionTree(IsSimulation) [20?] (8 , ffffffff) SimplePoolFile1... DEBUG ---->ClassID:???? -SimplePoolFile1... DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?] (9 , ffffffff) +SimplePoolFile1... DEBUG --->Reading Assoc:????/POOLCollectionTree(IsCalibration) [20?] (9 , ffffffff) SimplePoolFile1... DEBUG ---->ClassID:???? -##Links DEBUG No objects passing selection criteria... Container has 8 Entries in total. +SimplePoolFile1... DEBUG --->Reading Assoc:????/POOLCollectionTree(IsTestBeam) [20?] (a , ffffffff) +SimplePoolFile1... DEBUG ---->ClassID:???? +SimplePoolFile1... DEBUG --->Reading Assoc:????/POOLCollectionTree(McChannel) [20?] (b , ffffffff) +SimplePoolFile1... DEBUG ---->ClassID:???? +SimplePoolFile1... DEBUG --->Reading Assoc:????/POOLCollectionTree(RunNumber) [20?] (c , ffffffff) +SimplePoolFile1... DEBUG ---->ClassID:???? +SimplePoolFile1... DEBUG --->Reading Assoc:????/POOLCollectionTree(EventNumber) [20?] (d , ffffffff) +SimplePoolFile1... DEBUG ---->ClassID:???? +SimplePoolFile1... DEBUG --->Reading Assoc:????/POOLCollectionTree(LumiBlockN) [20?] (e , ffffffff) +SimplePoolFile1... DEBUG ---->ClassID:???? +SimplePoolFile1... DEBUG --->Reading Assoc:????/POOLCollectionTree(ConditionsRun) [20?] (f , ffffffff) +SimplePoolFile1... DEBUG ---->ClassID:???? +SimplePoolFile1... DEBUG --->Reading Assoc:????/POOLCollectionTree(EventTime) [20?] (10 , ffffffff) +SimplePoolFile1... DEBUG ---->ClassID:???? +SimplePoolFile1... DEBUG --->Reading Assoc:????/POOLCollectionTree(EventTimeNanoSec) [20?] (11 , ffffffff) +SimplePoolFile1... DEBUG ---->ClassID:???? +SimplePoolFile1... DEBUG --->Reading Assoc:????/POOLCollectionTree(BunchId) [20?] (12 , ffffffff) +SimplePoolFile1... DEBUG ---->ClassID:???? +SimplePoolFile1... DEBUG --->Reading Assoc:????/POOLCollectionTree(EventWeight) [20?] (13 , ffffffff) +SimplePoolFile1... DEBUG ---->ClassID:???? +SimplePoolFile1... DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream1) [20?] (14 , ffffffff) +SimplePoolFile1... DEBUG ---->ClassID:???? +SimplePoolFile1... DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?] (15 , ffffffff) +SimplePoolFile1... DEBUG ---->ClassID:???? +SimplePoolFile1... DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?] (16 , ffffffff) +SimplePoolFile1... DEBUG ---->ClassID:???? +##Links DEBUG No objects passing selection criteria... Container has 21 Entries in total. SimplePoolFile1... DEBUG --> Access DbContainer READ [ROOT_All] ##Params ##Params DEBUG Opening ##Params DEBUG attributes# = 1 @@ -144,19 +180,12 @@ SimplePoolFile1... DEBUG --->Reading Param:PFN=[SimplePoolFile1.root] SimplePoolFile1... DEBUG --->Reading Param:POOL_VSN=[1.1] SimplePoolFile1... DEBUG --->Reading Param:FORMAT_VSN=[1.1] ##Params DEBUG No objects passing selection criteria... Container has 4 Entries in total. -SimplePoolFile1... DEBUG --> Access DbContainer READ [ROOT_Tree] POOLContainer(DataHeader) -POOLContainer(D... DEBUG Opening -POOLContainer(D... DEBUG attributes# = 1 -POOLContainer(D... DEBUG Branch container 'DataHeader' -POOLContainer(D... DEBUG Opened container POOLContainer(DataHeader) of type ROOT_Tree -MetaDataSvc DEBUG handle() FirstInputFile for FID:???? -MetaDataSvc DEBUG initInputMetaDataStore: file name FID:???? SimplePoolFile1... DEBUG --> Access DbContainer READ [ROOT_Tree] MetaDataHdr(DataHeader) MetaDataHdr(Dat... DEBUG Opening MetaDataHdr(Dat... DEBUG attributes# = 1 MetaDataHdr(Dat... DEBUG Branch container 'DataHeader' MetaDataHdr(Dat... DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree -ClassIDSvc INFO getRegistryEntries: read 1798 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 2078 CLIDRegistry entries for module ALL EventPersistenc... INFO Added successfully Conversion service:AthenaPoolCnvSvc SimplePoolFile1... DEBUG --> Access DbContainer READ [ROOT_Tree] MetaDataHdrForm(DataHeaderForm) MetaDataHdrForm... DEBUG Opening @@ -174,12 +203,8 @@ ReadData DEBUG Data Deps for ReadData HistogramPersis...WARNING Histograms saving not required. AthenaEventLoopMgr INFO Setup EventSelector service EventSelector ApplicationMgr INFO Application Manager Initialized successfully -Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? -Domain[ROOT_All] INFO > Deaccess DbDomain READ [ROOT_All] EventSelector DEBUG Try item: "EmptyPoolFile.root" from the collection list. PersistencySvc:... DEBUG lookupPFN: EmptyPoolFile.root returned FID: '????' tech=ROOT_All -DbSession INFO Open DbSession -Domain[ROOT_All] INFO > Access DbDomain READ [ROOT_All] Domain[ROOT_All] INFO -> Access DbDatabase READ [ROOT_All] ???? Domain[ROOT_All] INFO EmptyPoolFile.root EmptyPoolFile.root DEBUG --> Access DbContainer READ [ROOT_All] ##Shapes @@ -235,63 +260,7 @@ MetaDataSvc DEBUG Loaded input meta data store proxies MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool MetaDataSvc DEBUG handle() EndInputFile for eventless EmptyPoolFile.root Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? -Domain[ROOT_All] INFO > Deaccess DbDomain READ [ROOT_All] EventSelector DEBUG Try item: "SimplePoolFile1.root" from the collection list. -PersistencySvc:... DEBUG lookupPFN: SimplePoolFile1.root returned FID: '????' tech=ROOT_All -DbSession INFO Open DbSession -Domain[ROOT_All] INFO > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] INFO -> Access DbDatabase READ [ROOT_All] ???? -Domain[ROOT_All] INFO SimplePoolFile1.root -SimplePoolFile1... DEBUG --> Access DbContainer READ [ROOT_All] ##Shapes -##Shapes DEBUG Opening -##Shapes DEBUG attributes# = 1 -##Shapes DEBUG Opened container ##Shapes of type ROOT_Tree -SimplePoolFile1... DEBUG --->Reading Shape[0 , ????]: [1 Column(s)] -SimplePoolFile1... DEBUG ---->[0]:EventInfo_p4 Typ:EventInfo_p4 [21] Size:0 Offset:0 #Elements:1 -SimplePoolFile1... DEBUG --->Reading Shape[1 , ????]: [1 Column(s)] -SimplePoolFile1... DEBUG ---->[0]:ExampleHitContainer_p1 Typ:ExampleHitContainer_p1 [21] Size:0 Offset:0 #Elements:1 -SimplePoolFile1... DEBUG --->Reading Shape[2 , ????]: [1 Column(s)] -SimplePoolFile1... DEBUG ---->[0]:DataHeaderForm_p5 Typ:DataHeaderForm_p5 [21] Size:0 Offset:0 #Elements:1 -SimplePoolFile1... DEBUG --->Reading Shape[3 , ????]: [1 Column(s)] -SimplePoolFile1... DEBUG ---->[0]:DataHeader_p5 Typ:DataHeader_p5 [21] Size:0 Offset:0 #Elements:1 -SimplePoolFile1... DEBUG --->Reading Shape[4 , ????]: [1 Column(s)] -SimplePoolFile1... DEBUG ---->[0]:EventStreamInfo_p3 Typ:EventStreamInfo_p3 [21] Size:0 Offset:0 #Elements:1 -##Shapes DEBUG No objects passing selection criteria... Container has 5 Entries in total. -SimplePoolFile1... DEBUG --> Access DbContainer READ [ROOT_All] ##Links -##Links DEBUG Opening -##Links DEBUG attributes# = 1 -##Links DEBUG Opened container ##Links of type ROOT_Tree -SimplePoolFile1... DEBUG --->Reading Assoc:????/##Params [200] (2 , ffffffff) -SimplePoolFile1... DEBUG ---->ClassID:???? -SimplePoolFile1... DEBUG --->Reading Assoc:????/CollectionTree(EventInfo_p4/McEventInfo) [20?] (3 , ffffffff) -SimplePoolFile1... DEBUG ---->ClassID:???? -SimplePoolFile1... DEBUG --->Reading Assoc:????/CollectionTree(ExampleHitContainer_p1/MyHits) [20?] (4 , ffffffff) -SimplePoolFile1... DEBUG ---->ClassID:???? -SimplePoolFile1... DEBUG --->Reading Assoc:????/POOLContainerForm(DataHeaderForm) [20?] (5 , ffffffff) -SimplePoolFile1... DEBUG ---->ClassID:???? -SimplePoolFile1... DEBUG --->Reading Assoc:????/POOLContainer(DataHeader) [20?] (6 , ffffffff) -SimplePoolFile1... DEBUG ---->ClassID:???? -SimplePoolFile1... DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream1) [20?] (7 , ffffffff) -SimplePoolFile1... DEBUG ---->ClassID:???? -SimplePoolFile1... DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?] (8 , ffffffff) -SimplePoolFile1... DEBUG ---->ClassID:???? -SimplePoolFile1... DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?] (9 , ffffffff) -SimplePoolFile1... DEBUG ---->ClassID:???? -##Links DEBUG No objects passing selection criteria... Container has 8 Entries in total. -SimplePoolFile1... DEBUG --> Access DbContainer READ [ROOT_All] ##Params -##Params DEBUG Opening -##Params DEBUG attributes# = 1 -##Params DEBUG Opened container ##Params of type ROOT_Tree -SimplePoolFile1... DEBUG --->Reading Param:FID=[????] -SimplePoolFile1... DEBUG --->Reading Param:PFN=[SimplePoolFile1.root] -SimplePoolFile1... DEBUG --->Reading Param:POOL_VSN=[1.1] -SimplePoolFile1... DEBUG --->Reading Param:FORMAT_VSN=[1.1] -##Params DEBUG No objects passing selection criteria... Container has 4 Entries in total. -SimplePoolFile1... DEBUG --> Access DbContainer READ [ROOT_Tree] POOLContainer(DataHeader) -POOLContainer(D... DEBUG Opening -POOLContainer(D... DEBUG attributes# = 1 -POOLContainer(D... DEBUG Branch container 'DataHeader' -POOLContainer(D... DEBUG Opened container POOLContainer(DataHeader) of type ROOT_Tree ApplicationMgr INFO Application Manager Started successfully RootDatabase.se... DEBUG Request tree cache RootDatabase.se... DEBUG File name SimplePoolFile1.root @@ -306,16 +275,6 @@ PoolSvc INFO Database (SimplePoolFile1.root) attribute [TREE_CACHE_ PoolSvc INFO Database (SimplePoolFile1.root) attribute [TREE_CACHE_SIZE]: 100000 MetaDataSvc DEBUG handle() BeginInputFile for SimplePoolFile1.root MetaDataSvc DEBUG initInputMetaDataStore: file name SimplePoolFile1.root -SimplePoolFile1... DEBUG --> Access DbContainer READ [ROOT_Tree] MetaDataHdr(DataHeader) -MetaDataHdr(Dat... DEBUG Opening -MetaDataHdr(Dat... DEBUG attributes# = 1 -MetaDataHdr(Dat... DEBUG Branch container 'DataHeader' -MetaDataHdr(Dat... DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree -SimplePoolFile1... DEBUG --> Access DbContainer READ [ROOT_Tree] MetaDataHdrForm(DataHeaderForm) -MetaDataHdrForm... DEBUG Opening -MetaDataHdrForm... DEBUG attributes# = 1 -MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' -MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree MetaDataSvc DEBUG Loaded input meta data store proxies MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool EventSelector INFO skipping event 1 @@ -329,18 +288,24 @@ EventSelector INFO skipping event 8 EventSelector INFO skipping event 9 EventSelector INFO skipping event 10 EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000A]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000A]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000A] +SimplePoolFile1... DEBUG --> Access DbContainer READ [ROOT_Tree] POOLContainer(DataHeader) +POOLContainer(D... DEBUG Opening +POOLContainer(D... DEBUG attributes# = 1 +POOLContainer(D... DEBUG Branch container 'DataHeader' +POOLContainer(D... DEBUG Opened container POOLContainer(DataHeader) of type ROOT_Tree SimplePoolFile1... DEBUG --> Access DbContainer READ [ROOT_Tree] POOLContainerForm(DataHeaderForm) POOLContainerFo... DEBUG Opening POOLContainerFo... DEBUG attributes# = 1 POOLContainerFo... DEBUG Branch container 'DataHeaderForm' POOLContainerFo... DEBUG Opened container POOLContainerForm(DataHeaderForm) of type ROOT_Tree -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AlgResourcePool INFO TopAlg list empty. Recovering the one of Application Manager SimplePoolFile1... DEBUG --> Access DbContainer READ [ROOT_Tree] CollectionTree(EventInfo_p4/McEventInfo) CollectionTree(... DEBUG Opening @@ -360,6 +325,7 @@ ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -381,23 +347,25 @@ ReadData INFO Hit x = 1020.49 y = 63.5816 z = -951.864 detector = Du ReadData INFO Hit x = 1023.7 y = 57.9027 z = -953.684 detector = DummyHitDetector ReadData INFO Hit x = 1026.91 y = 52.2238 z = -955.073 detector = DummyHitDetector ReadData INFO Hit x = 1030.12 y = 46.5449 z = -956.169 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 19693 -PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 23 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 20845 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #10, run #1 1 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000B]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000B]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000B] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #11, run #1 1 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -414,23 +382,25 @@ ReadData INFO Hit x = 1120.49 y = 63.5816 z = -1051.86 detector = Du ReadData INFO Hit x = 1123.7 y = 57.9027 z = -1053.68 detector = DummyHitDetector ReadData INFO Hit x = 1126.91 y = 52.2238 z = -1055.07 detector = DummyHitDetector ReadData INFO Hit x = 1130.12 y = 46.5449 z = -1056.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 19693 -PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 23 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 20845 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #11, run #1 2 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000C]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000C]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000C] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #12, run #1 2 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -447,23 +417,25 @@ ReadData INFO Hit x = 1220.49 y = 63.5816 z = -1151.86 detector = Du ReadData INFO Hit x = 1223.7 y = 57.9027 z = -1153.68 detector = DummyHitDetector ReadData INFO Hit x = 1226.91 y = 52.2238 z = -1155.07 detector = DummyHitDetector ReadData INFO Hit x = 1230.12 y = 46.5449 z = -1156.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 19693 -PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 23 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 20845 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #12, run #1 3 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000D]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000D]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000D] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #13, run #1 3 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -480,23 +452,25 @@ ReadData INFO Hit x = 1320.49 y = 63.5816 z = -1251.86 detector = Du ReadData INFO Hit x = 1323.7 y = 57.9027 z = -1253.68 detector = DummyHitDetector ReadData INFO Hit x = 1326.91 y = 52.2238 z = -1255.07 detector = DummyHitDetector ReadData INFO Hit x = 1330.12 y = 46.5449 z = -1256.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 19693 -PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 23 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 20845 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #13, run #1 4 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000E]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000E]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000E] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #14, run #1 4 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -513,23 +487,25 @@ ReadData INFO Hit x = 1420.49 y = 63.5816 z = -1351.86 detector = Du ReadData INFO Hit x = 1423.7 y = 57.9027 z = -1353.68 detector = DummyHitDetector ReadData INFO Hit x = 1426.91 y = 52.2238 z = -1355.07 detector = DummyHitDetector ReadData INFO Hit x = 1430.12 y = 46.5449 z = -1356.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 19693 -PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 23 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 20845 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #14, run #1 5 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000F]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000F]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000F] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #15, run #1 5 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -546,23 +522,25 @@ ReadData INFO Hit x = 1520.49 y = 63.5816 z = -1451.86 detector = Du ReadData INFO Hit x = 1523.7 y = 57.9027 z = -1453.68 detector = DummyHitDetector ReadData INFO Hit x = 1526.91 y = 52.2238 z = -1455.07 detector = DummyHitDetector ReadData INFO Hit x = 1530.12 y = 46.5449 z = -1456.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 19693 -PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 23 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 20845 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #15, run #1 6 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000010]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000010]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000010] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #16, run #1 6 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -579,23 +557,25 @@ ReadData INFO Hit x = 1620.49 y = 63.5816 z = -1551.86 detector = Du ReadData INFO Hit x = 1623.7 y = 57.9027 z = -1553.68 detector = DummyHitDetector ReadData INFO Hit x = 1626.91 y = 52.2238 z = -1555.07 detector = DummyHitDetector ReadData INFO Hit x = 1630.12 y = 46.5449 z = -1556.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 19693 -PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 23 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 20845 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #16, run #1 7 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000011]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000011]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000011] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #17, run #1 7 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -612,23 +592,25 @@ ReadData INFO Hit x = 1720.49 y = 63.5816 z = -1651.86 detector = Du ReadData INFO Hit x = 1723.7 y = 57.9027 z = -1653.68 detector = DummyHitDetector ReadData INFO Hit x = 1726.91 y = 52.2238 z = -1655.07 detector = DummyHitDetector ReadData INFO Hit x = 1730.12 y = 46.5449 z = -1656.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 19693 -PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 23 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 20845 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #17, run #1 8 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000012]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000012]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000012] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #18, run #1 8 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -645,23 +627,25 @@ ReadData INFO Hit x = 1820.49 y = 63.5816 z = -1751.86 detector = Du ReadData INFO Hit x = 1823.7 y = 57.9027 z = -1753.68 detector = DummyHitDetector ReadData INFO Hit x = 1826.91 y = 52.2238 z = -1755.07 detector = DummyHitDetector ReadData INFO Hit x = 1830.12 y = 46.5449 z = -1756.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 19693 -PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 23 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 20845 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #18, run #1 9 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000013]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000013]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000013] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #19, run #1 9 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -678,13 +662,13 @@ ReadData INFO Hit x = 1920.49 y = 63.5816 z = -1851.86 detector = Du ReadData INFO Hit x = 1923.7 y = 57.9027 z = -1853.68 detector = DummyHitDetector ReadData INFO Hit x = 1926.91 y = 52.2238 z = -1855.07 detector = DummyHitDetector ReadData INFO Hit x = 1930.12 y = 46.5449 z = -1856.17 detector = DummyHitDetector -PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 19693 -PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 23 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [BYTES_READ]: 20845 +PoolSvc INFO Database (SimplePoolFile1.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #19, run #1 10 events processed so far <<<=== -Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? -Domain[ROOT_All] INFO > Deaccess DbDomain READ [ROOT_All] MetaDataSvc DEBUG handle() EndInputFile for FID:???? EventSelector INFO Disconnecting input sourceID: ???? +Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? +Domain[ROOT_All] INFO > Deaccess DbDomain READ [ROOT_All] EventSelector DEBUG Try item: "EmptyPoolFile.root" from the collection list. PersistencySvc:... DEBUG lookupPFN: EmptyPoolFile.root returned FID: '????' tech=ROOT_All DbSession INFO Open DbSession @@ -822,7 +806,6 @@ MetaDataHdr(Dat... DEBUG Opening MetaDataHdr(Dat... DEBUG attributes# = 1 MetaDataHdr(Dat... DEBUG Branch container 'DataHeader' MetaDataHdr(Dat... DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree -ClassIDSvc INFO getRegistryEntries: read 3 CLIDRegistry entries for module ALL SimplePoolFile2... DEBUG --> Access DbContainer READ [ROOT_Tree] MetaDataHdrForm(DataHeaderForm) MetaDataHdrForm... DEBUG Opening MetaDataHdrForm... DEBUG attributes# = 1 @@ -845,8 +828,9 @@ POOLContainerFo... DEBUG Opening POOLContainerFo... DEBUG attributes# = 1 POOLContainerFo... DEBUG Branch container 'DataHeaderForm' POOLContainerFo... DEBUG Opened container POOLContainerForm(DataHeaderForm) of type ROOT_Tree -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag SimplePoolFile2... DEBUG --> Access DbContainer READ [ROOT_Tree] CollectionTree(EventInfo_p4/McEventInfo) CollectionTree(... DEBUG Opening CollectionTree(... DEBUG attributes# = 1 @@ -862,6 +846,7 @@ MetaData(EventS... DEBUG Opened container MetaData(EventStreamInfo_p3/Stream2) ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -869,7 +854,7 @@ ReadData INFO EventInfo event: 0 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16738 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16803 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #0, run #1 11 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -877,13 +862,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000001]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000001]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000001] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #1, run #1 11 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -891,7 +878,7 @@ ReadData INFO EventInfo event: 1 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16738 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16803 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #1, run #1 12 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -899,13 +886,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000002]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000002]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000002] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #2, run #1 12 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -913,7 +902,7 @@ ReadData INFO EventInfo event: 2 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16738 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16803 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #2, run #1 13 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -921,13 +910,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000003]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000003]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000003] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #3, run #1 13 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -935,7 +926,7 @@ ReadData INFO EventInfo event: 3 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16738 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16803 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #3, run #1 14 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -943,13 +934,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000004]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000004]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000004] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #4, run #1 14 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -957,7 +950,7 @@ ReadData INFO EventInfo event: 4 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16738 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16803 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #4, run #1 15 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -965,13 +958,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000005]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000005]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000005] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #5, run #1 15 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -979,7 +974,7 @@ ReadData INFO EventInfo event: 5 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16738 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16803 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #5, run #1 16 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -987,13 +982,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000006]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000006]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000006] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #6, run #1 16 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1001,7 +998,7 @@ ReadData INFO EventInfo event: 6 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16738 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16803 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #6, run #1 17 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1009,13 +1006,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000007]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000007]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000007] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #7, run #1 17 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1023,7 +1022,7 @@ ReadData INFO EventInfo event: 7 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16738 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16803 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #7, run #1 18 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1031,13 +1030,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000008]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000008]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000008] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #8, run #1 18 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1045,7 +1046,7 @@ ReadData INFO EventInfo event: 8 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16738 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16803 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #8, run #1 19 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1053,13 +1054,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000009]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000009]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000009] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #9, run #1 19 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1067,7 +1070,7 @@ ReadData INFO EventInfo event: 9 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16738 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16803 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #9, run #1 20 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1075,13 +1078,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000A]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000A]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000A] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #10, run #1 20 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1089,7 +1094,7 @@ ReadData INFO EventInfo event: 10 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16738 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16803 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #10, run #1 21 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1097,13 +1102,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000B] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #11, run #1 21 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1111,7 +1118,7 @@ ReadData INFO EventInfo event: 11 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16738 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16803 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #11, run #1 22 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1119,13 +1126,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000C]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000C]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000C] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #12, run #1 22 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1133,7 +1142,7 @@ ReadData INFO EventInfo event: 12 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16738 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16803 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #12, run #1 23 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1141,13 +1150,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000D]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000D]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000D] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #13, run #1 23 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1155,7 +1166,7 @@ ReadData INFO EventInfo event: 13 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16738 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16803 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #13, run #1 24 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1163,13 +1174,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000E]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000E]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000E] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #14, run #1 24 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1177,7 +1190,7 @@ ReadData INFO EventInfo event: 14 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16738 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16803 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #14, run #1 25 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1185,13 +1198,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000F]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000F]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-0000000F] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #15, run #1 25 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1199,7 +1214,7 @@ ReadData INFO EventInfo event: 15 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16738 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16803 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #15, run #1 26 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1207,13 +1222,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000010]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000010]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000010] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #16, run #1 26 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1221,7 +1238,7 @@ ReadData INFO EventInfo event: 16 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16738 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16803 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #16, run #1 27 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1229,13 +1246,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000011]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000011]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000011] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #17, run #1 27 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1243,7 +1262,7 @@ ReadData INFO EventInfo event: 17 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16738 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16803 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #17, run #1 28 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1251,13 +1270,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000012]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000012]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000012] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #18, run #1 28 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1265,7 +1286,7 @@ ReadData INFO EventInfo event: 18 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16738 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16803 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #18, run #1 29 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1273,13 +1294,15 @@ EventSelector DEBUG AttributeList size 3 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000013]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000013]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000005-00000013] -AthenaPoolAddre... DEBUG The current Event contains: 2 objects +AthenaPoolAddre... DEBUG The current Event contains: 3 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #19, run #1 29 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1287,7 +1310,7 @@ ReadData INFO EventInfo event: 19 run: 1 ReadData INFO Get Smart data ptr 1 ReadData INFO Could not find ExampleTrackContainer/MyTracks ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16738 +PoolSvc INFO Database (SimplePoolFile2.root) attribute [BYTES_READ]: 16803 PoolSvc INFO Database (SimplePoolFile2.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #19, run #1 30 events processed so far <<<=== MetaDataSvc DEBUG handle() EndInputFile for FID:???? @@ -1385,9 +1408,10 @@ POOLContainerFo... DEBUG Opening POOLContainerFo... DEBUG attributes# = 1 POOLContainerFo... DEBUG Branch container 'DataHeaderForm' POOLContainerFo... DEBUG Opened container POOLContainerForm(DataHeaderForm) of type ROOT_Tree -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag SimplePoolFile3... DEBUG --> Access DbContainer READ [ROOT_Tree] CollectionTree(EventInfo_p4/McEventInfo) CollectionTree(... DEBUG Opening CollectionTree(... DEBUG attributes# = 1 @@ -1404,6 +1428,7 @@ ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9103, key = MyTracks +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1418,7 +1443,7 @@ ReadData INFO Track pt = 74.8928 eta = 3.1676 phi = 2.6161 detector DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18601 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18731 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #0, run #1 31 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1426,15 +1451,17 @@ EventSelector DEBUG AttributeList size 0 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000001]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000001]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000001] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #1, run #1 31 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9103, key = MyTracks +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1444,7 +1471,7 @@ ReadData INFO Track pt = 137.584 eta = -39.525 phi = 17.2679 detecto DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18601 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18731 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #1, run #1 32 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1452,15 +1479,17 @@ EventSelector DEBUG AttributeList size 0 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000002]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000002]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000002] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #2, run #1 32 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9103, key = MyTracks +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1470,7 +1499,7 @@ ReadData INFO Track pt = 228.154 eta = -6.2704 phi = 31.9197 detecto DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18601 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18731 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #2, run #1 33 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1478,15 +1507,17 @@ EventSelector DEBUG AttributeList size 0 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000003]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000003]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000003] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #3, run #1 33 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9103, key = MyTracks +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1496,7 +1527,7 @@ ReadData INFO Track pt = 324.306 eta = -15.8941 phi = 46.5715 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18601 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18731 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #3, run #1 34 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1504,15 +1535,17 @@ EventSelector DEBUG AttributeList size 0 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000004]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000004]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000004] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #4, run #1 34 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9103, key = MyTracks +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1522,7 +1555,7 @@ ReadData INFO Track pt = 422.255 eta = -13.279 phi = 61.2233 detecto DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18601 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18731 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #4, run #1 35 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1530,15 +1563,17 @@ EventSelector DEBUG AttributeList size 0 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000005]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000005]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000005] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #5, run #1 35 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9103, key = MyTracks +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1548,7 +1583,7 @@ ReadData INFO Track pt = 520.987 eta = -12.3511 phi = 75.8751 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18601 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18731 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #5, run #1 36 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1556,15 +1591,17 @@ EventSelector DEBUG AttributeList size 0 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000006]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000006]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000006] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #6, run #1 36 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9103, key = MyTracks +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1574,7 +1611,7 @@ ReadData INFO Track pt = 620.127 eta = -11.8468 phi = 90.5269 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18601 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18731 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #6, run #1 37 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1582,15 +1619,17 @@ EventSelector DEBUG AttributeList size 0 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000007]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000007]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000007] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #7, run #1 37 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9103, key = MyTracks +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1600,7 +1639,7 @@ ReadData INFO Track pt = 719.507 eta = -11.5247 phi = 105.179 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18601 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18731 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #7, run #1 38 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1608,15 +1647,17 @@ EventSelector DEBUG AttributeList size 0 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000008]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000008]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000008] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #8, run #1 38 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9103, key = MyTracks +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1626,7 +1667,7 @@ ReadData INFO Track pt = 819.038 eta = -11.2998 phi = 119.831 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18601 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18731 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #8, run #1 39 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1634,15 +1675,17 @@ EventSelector DEBUG AttributeList size 0 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000009]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000009]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000009] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #9, run #1 39 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9103, key = MyTracks +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1652,7 +1695,7 @@ ReadData INFO Track pt = 918.671 eta = -11.1334 phi = 134.482 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18601 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18731 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #9, run #1 40 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1660,15 +1703,17 @@ EventSelector DEBUG AttributeList size 0 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000A]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000A]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000A] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #10, run #1 40 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9103, key = MyTracks +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1678,7 +1723,7 @@ ReadData INFO Track pt = 1018.38 eta = -11.0052 phi = 149.134 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18601 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18731 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #10, run #1 41 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1686,15 +1731,17 @@ EventSelector DEBUG AttributeList size 0 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000B]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000B]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000B] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #11, run #1 41 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9103, key = MyTracks +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1704,7 +1751,7 @@ ReadData INFO Track pt = 1118.13 eta = -10.9031 phi = 163.786 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18601 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18731 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #11, run #1 42 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1712,15 +1759,17 @@ EventSelector DEBUG AttributeList size 0 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000C]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000C]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000C] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #12, run #1 42 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9103, key = MyTracks +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1730,7 +1779,7 @@ ReadData INFO Track pt = 1217.93 eta = -10.82 phi = 178.438 detector DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18601 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18731 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #12, run #1 43 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1738,15 +1787,17 @@ EventSelector DEBUG AttributeList size 0 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000D]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000D]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000D] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #13, run #1 43 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9103, key = MyTracks +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1756,7 +1807,7 @@ ReadData INFO Track pt = 1317.76 eta = -10.751 phi = 193.09 detector DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18601 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18731 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #13, run #1 44 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1764,15 +1815,17 @@ EventSelector DEBUG AttributeList size 0 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000E]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000E]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000E] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #14, run #1 44 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9103, key = MyTracks +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1782,7 +1835,7 @@ ReadData INFO Track pt = 1417.61 eta = -10.6927 phi = 207.741 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18601 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18731 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #14, run #1 45 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1790,15 +1843,17 @@ EventSelector DEBUG AttributeList size 0 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000F]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000F]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000F] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #15, run #1 45 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9103, key = MyTracks +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1808,7 +1863,7 @@ ReadData INFO Track pt = 1517.49 eta = -10.6429 phi = 222.393 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18601 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18731 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #15, run #1 46 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1816,15 +1871,17 @@ EventSelector DEBUG AttributeList size 0 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000010]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000010]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000010] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #16, run #1 46 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9103, key = MyTracks +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1834,7 +1891,7 @@ ReadData INFO Track pt = 1617.37 eta = -10.5997 phi = 237.045 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18601 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18731 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #16, run #1 47 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1842,15 +1899,17 @@ EventSelector DEBUG AttributeList size 0 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000011]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000011]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000011] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #17, run #1 47 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9103, key = MyTracks +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1860,7 +1919,7 @@ ReadData INFO Track pt = 1717.27 eta = -10.562 phi = 251.697 detecto DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18601 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18731 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #17, run #1 48 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1868,15 +1927,17 @@ EventSelector DEBUG AttributeList size 0 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000012]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000012]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000012] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #18, run #1 48 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9103, key = MyTracks +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1886,7 +1947,7 @@ ReadData INFO Track pt = 1817.19 eta = -10.5288 phi = 266.349 detect DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18601 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18731 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #18, run #1 49 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection @@ -1894,15 +1955,17 @@ EventSelector DEBUG AttributeList size 0 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000013]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000013]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000013] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9103, name = MyTracks +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #19, run #1 49 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9103, key = MyTracks +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1912,7 +1975,7 @@ ReadData INFO Track pt = 1917.11 eta = -10.4993 phi = 281 detector = DataProxy WARNING accessData: IOA pointer not set ReadData WARNING Could not follow ExampleTrackContainer/MyTracks ElementLinks to ExampleHitContainer/MyHits ReadData INFO Could not find ExampleHitContainer/MyHits -PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18601 +PoolSvc INFO Database (SimplePoolFile3.root) attribute [BYTES_READ]: 18731 PoolSvc INFO Database (SimplePoolFile3.root) attribute [READ_CALLS]: 21 AthenaEventLoopMgr INFO ===>>> done processing event #19, run #1 50 events processed so far <<<=== Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? @@ -1931,9 +1994,9 @@ ToolSvc INFO Removing all tools created by ToolSvc *****Chrono***** INFO **************************************************************************************************** *****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) *****Chrono***** INFO **************************************************************************************************** -cObjR_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #=101 +cObjR_ALL INFO Time User : Tot= 10 [ms] Ave/Min/Max=0.099(+- 0.99)/ 0/ 10 [ms] #=101 cObj_ALL INFO Time User : Tot= 30 [ms] Ave/Min/Max=0.326(+- 2.31)/ 0/ 20 [ms] #= 92 -ChronoStatSvc INFO Time User : Tot= 1 [s] #= 1 +ChronoStatSvc INFO Time User : Tot= 0.58 [s] #= 1 *****Chrono***** INFO **************************************************************************************************** ChronoStatSvc.f... INFO Service finalized successfully ApplicationMgr INFO Application Manager Finalized successfully diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_WCond.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_WCond.ref index ff796037dfe81950882d2f94daeccdd01092ebd6..41d7d17714d766974cd077e42fef34d850d453cd 100644 --- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_WCond.ref +++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_WCond.ref @@ -1,30 +1,29 @@ -Tue Feb 5 19:31:29 CET 2019 +Wed Mar 6 20:31:08 CET 2019 Preloading tcmalloc_minimal.so Athena INFO including file "AthenaCommon/Preparation.py" Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" Athena INFO executing ROOT6Setup Athena INFO including file "AthenaCommon/Execution.py" Athena INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_WCondJobOptions.py" -Py:ConfigurableDb INFO Read module info for 5456 configurables from 56 genConfDb files +Py:ConfigurableDb INFO Read module info for 5461 configurables from 48 genConfDb files Py:ConfigurableDb INFO No duplicates have been found: that's good ! Athena INFO including file "AthenaCommon/runbatch.py" -[?1034hApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 +ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 ApplicationMgr SUCCESS ==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v30r5) - running on lxplus115.cern.ch on Tue Feb 5 19:31:58 2019 + Welcome to ApplicationMgr (GaudiCoreSvc v31r0) + running on lxplus084.cern.ch on Wed Mar 6 20:31:19 2019 ==================================================================================================================================== -ApplicationMgr INFO Successfully loaded modules : AthenaServices ApplicationMgr INFO Application Manager Configured successfully ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 StatusCodeSvc INFO initialize AthDictLoaderSvc INFO in initialize... AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO getRegistryEntries: read 7037 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 3167 CLIDRegistry entries for module ALL CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00 -ClassIDSvc INFO getRegistryEntries: read 1164 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 1169 CLIDRegistry entries for module ALL Stream1 DEBUG Property update for OutputLevel : new value = 2 Stream1 DEBUG in initialize() ToolSvc.Stream1... INFO Initializing ToolSvc.Stream1Tool - package version AthenaServices-00-00-00 @@ -34,8 +33,8 @@ PoolSvc DEBUG Service base class initialized successfully PoolSvc INFO Set connectionsvc retry/timeout/IDLE timeout to 'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled PoolSvc INFO Frontier compression level set to 5 DBReplicaSvc INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-02-04T2257/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus115.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] +DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-05T2139/Athena/22.0.1/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config +DBReplicaSvc INFO Total of 10 servers found for host lxplus084.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] PoolSvc INFO Successfully setup replica sorting algorithm PoolSvc DEBUG OutputLevel is PoolSvc INFO Setting up APR FileCatalog and Streams @@ -57,7 +56,8 @@ EventSelector DEBUG Service base class initialized successfully EventSelector INFO reinitialization... EventSelector INFO EventSelection with query EventSelector DEBUG Try item: "SimplePoolFile1.root" from the collection list. -PersistencySvc:... DEBUG lookupPFN: SimplePoolFile1.root returned FID: '????' tech=ROOT_All +MetaDataSvc DEBUG handle() FirstInputFile for FID:???? +MetaDataSvc DEBUG initInputMetaDataStore: file name FID:???? Domain[ROOT_All] INFO -> Access DbDatabase READ [ROOT_All] ???? Domain[ROOT_All] INFO SimplePoolFile1.root SimplePoolFile1... DEBUG --> Access DbContainer READ [ROOT_All] ##Shapes @@ -73,8 +73,18 @@ SimplePoolFile1... DEBUG ---->[0]:DataHeaderForm_p5 Typ:DataHeaderForm_p5 [21] SimplePoolFile1... DEBUG --->Reading Shape[3 , ????]: [1 Column(s)] SimplePoolFile1... DEBUG ---->[0]:DataHeader_p5 Typ:DataHeader_p5 [21] Size:0 Offset:0 #Elements:1 SimplePoolFile1... DEBUG --->Reading Shape[4 , ????]: [1 Column(s)] +SimplePoolFile1... DEBUG ---->[0]:Token Typ:Token [18] Size:0 Offset:0 #Elements:1 +SimplePoolFile1... DEBUG --->Reading Shape[5 , ????]: [1 Column(s)] +SimplePoolFile1... DEBUG ---->[0]:bool Typ:bool [9] Size:0 Offset:0 #Elements:1 +SimplePoolFile1... DEBUG --->Reading Shape[6 , ????]: [1 Column(s)] +SimplePoolFile1... DEBUG ---->[0]:unsigned int Typ:unsigned int [3] Size:0 Offset:0 #Elements:1 +SimplePoolFile1... DEBUG --->Reading Shape[7 , ????]: [1 Column(s)] +SimplePoolFile1... DEBUG ---->[0]:unsigned long long Typ:unsigned long long [23] Size:0 Offset:0 #Elements:1 +SimplePoolFile1... DEBUG --->Reading Shape[8 , ????]: [1 Column(s)] +SimplePoolFile1... DEBUG ---->[0]:float Typ:float [10] Size:0 Offset:0 #Elements:1 +SimplePoolFile1... DEBUG --->Reading Shape[9 , ????]: [1 Column(s)] SimplePoolFile1... DEBUG ---->[0]:EventStreamInfo_p3 Typ:EventStreamInfo_p3 [21] Size:0 Offset:0 #Elements:1 -##Shapes DEBUG No objects passing selection criteria... Container has 5 Entries in total. +##Shapes DEBUG No objects passing selection criteria... Container has 10 Entries in total. SimplePoolFile1... DEBUG --> Access DbContainer READ [ROOT_All] ##Links ##Links DEBUG Opening ##Links DEBUG attributes# = 1 @@ -89,13 +99,39 @@ SimplePoolFile1... DEBUG --->Reading Assoc:????/POOLContainerForm(DataHeaderFor SimplePoolFile1... DEBUG ---->ClassID:???? SimplePoolFile1... DEBUG --->Reading Assoc:????/POOLContainer(DataHeader) [20?] (6 , ffffffff) SimplePoolFile1... DEBUG ---->ClassID:???? -SimplePoolFile1... DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream1) [20?] (7 , ffffffff) +SimplePoolFile1... DEBUG --->Reading Assoc:????/POOLCollectionTree(Token) [20?] (7 , ffffffff) +SimplePoolFile1... DEBUG ---->ClassID:???? +SimplePoolFile1... DEBUG --->Reading Assoc:????/POOLCollectionTree(IsSimulation) [20?] (8 , ffffffff) +SimplePoolFile1... DEBUG ---->ClassID:???? +SimplePoolFile1... DEBUG --->Reading Assoc:????/POOLCollectionTree(IsCalibration) [20?] (9 , ffffffff) +SimplePoolFile1... DEBUG ---->ClassID:???? +SimplePoolFile1... DEBUG --->Reading Assoc:????/POOLCollectionTree(IsTestBeam) [20?] (a , ffffffff) +SimplePoolFile1... DEBUG ---->ClassID:???? +SimplePoolFile1... DEBUG --->Reading Assoc:????/POOLCollectionTree(McChannel) [20?] (b , ffffffff) +SimplePoolFile1... DEBUG ---->ClassID:???? +SimplePoolFile1... DEBUG --->Reading Assoc:????/POOLCollectionTree(RunNumber) [20?] (c , ffffffff) +SimplePoolFile1... DEBUG ---->ClassID:???? +SimplePoolFile1... DEBUG --->Reading Assoc:????/POOLCollectionTree(EventNumber) [20?] (d , ffffffff) +SimplePoolFile1... DEBUG ---->ClassID:???? +SimplePoolFile1... DEBUG --->Reading Assoc:????/POOLCollectionTree(LumiBlockN) [20?] (e , ffffffff) +SimplePoolFile1... DEBUG ---->ClassID:???? +SimplePoolFile1... DEBUG --->Reading Assoc:????/POOLCollectionTree(ConditionsRun) [20?] (f , ffffffff) SimplePoolFile1... DEBUG ---->ClassID:???? -SimplePoolFile1... DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?] (8 , ffffffff) +SimplePoolFile1... DEBUG --->Reading Assoc:????/POOLCollectionTree(EventTime) [20?] (10 , ffffffff) SimplePoolFile1... DEBUG ---->ClassID:???? -SimplePoolFile1... DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?] (9 , ffffffff) +SimplePoolFile1... DEBUG --->Reading Assoc:????/POOLCollectionTree(EventTimeNanoSec) [20?] (11 , ffffffff) SimplePoolFile1... DEBUG ---->ClassID:???? -##Links DEBUG No objects passing selection criteria... Container has 8 Entries in total. +SimplePoolFile1... DEBUG --->Reading Assoc:????/POOLCollectionTree(BunchId) [20?] (12 , ffffffff) +SimplePoolFile1... DEBUG ---->ClassID:???? +SimplePoolFile1... DEBUG --->Reading Assoc:????/POOLCollectionTree(EventWeight) [20?] (13 , ffffffff) +SimplePoolFile1... DEBUG ---->ClassID:???? +SimplePoolFile1... DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream1) [20?] (14 , ffffffff) +SimplePoolFile1... DEBUG ---->ClassID:???? +SimplePoolFile1... DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?] (15 , ffffffff) +SimplePoolFile1... DEBUG ---->ClassID:???? +SimplePoolFile1... DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?] (16 , ffffffff) +SimplePoolFile1... DEBUG ---->ClassID:???? +##Links DEBUG No objects passing selection criteria... Container has 21 Entries in total. SimplePoolFile1... DEBUG --> Access DbContainer READ [ROOT_All] ##Params ##Params DEBUG Opening ##Params DEBUG attributes# = 1 @@ -105,19 +141,12 @@ SimplePoolFile1... DEBUG --->Reading Param:PFN=[SimplePoolFile1.root] SimplePoolFile1... DEBUG --->Reading Param:POOL_VSN=[1.1] SimplePoolFile1... DEBUG --->Reading Param:FORMAT_VSN=[1.1] ##Params DEBUG No objects passing selection criteria... Container has 4 Entries in total. -SimplePoolFile1... DEBUG --> Access DbContainer READ [ROOT_Tree] POOLContainer(DataHeader) -POOLContainer(D... DEBUG Opening -POOLContainer(D... DEBUG attributes# = 1 -POOLContainer(D... DEBUG Branch container 'DataHeader' -POOLContainer(D... DEBUG Opened container POOLContainer(DataHeader) of type ROOT_Tree -MetaDataSvc DEBUG handle() FirstInputFile for FID:???? -MetaDataSvc DEBUG initInputMetaDataStore: file name FID:???? SimplePoolFile1... DEBUG --> Access DbContainer READ [ROOT_Tree] MetaDataHdr(DataHeader) MetaDataHdr(Dat... DEBUG Opening MetaDataHdr(Dat... DEBUG attributes# = 1 MetaDataHdr(Dat... DEBUG Branch container 'DataHeader' MetaDataHdr(Dat... DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree -ClassIDSvc INFO getRegistryEntries: read 1798 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 2073 CLIDRegistry entries for module ALL EventPersistenc... INFO Added successfully Conversion service:AthenaPoolCnvSvc SimplePoolFile1... DEBUG --> Access DbContainer READ [ROOT_Tree] MetaDataHdrForm(DataHeaderForm) MetaDataHdrForm... DEBUG Opening @@ -142,64 +171,7 @@ WriteCond DEBUG Data Deps for WriteCond HistogramPersis...WARNING Histograms saving not required. AthenaEventLoopMgr INFO Setup EventSelector service EventSelector ApplicationMgr INFO Application Manager Initialized successfully -Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? -Domain[ROOT_All] INFO > Deaccess DbDomain READ [ROOT_All] EventSelector DEBUG Try item: "SimplePoolFile1.root" from the collection list. -PersistencySvc:... DEBUG lookupPFN: SimplePoolFile1.root returned FID: '????' tech=ROOT_All -DbSession INFO Open DbSession -Domain[ROOT_All] INFO > Access DbDomain READ [ROOT_All] -Domain[ROOT_All] INFO -> Access DbDatabase READ [ROOT_All] ???? -Domain[ROOT_All] INFO SimplePoolFile1.root -SimplePoolFile1... DEBUG --> Access DbContainer READ [ROOT_All] ##Shapes -##Shapes DEBUG Opening -##Shapes DEBUG attributes# = 1 -##Shapes DEBUG Opened container ##Shapes of type ROOT_Tree -SimplePoolFile1... DEBUG --->Reading Shape[0 , ????]: [1 Column(s)] -SimplePoolFile1... DEBUG ---->[0]:EventInfo_p4 Typ:EventInfo_p4 [21] Size:0 Offset:0 #Elements:1 -SimplePoolFile1... DEBUG --->Reading Shape[1 , ????]: [1 Column(s)] -SimplePoolFile1... DEBUG ---->[0]:ExampleHitContainer_p1 Typ:ExampleHitContainer_p1 [21] Size:0 Offset:0 #Elements:1 -SimplePoolFile1... DEBUG --->Reading Shape[2 , ????]: [1 Column(s)] -SimplePoolFile1... DEBUG ---->[0]:DataHeaderForm_p5 Typ:DataHeaderForm_p5 [21] Size:0 Offset:0 #Elements:1 -SimplePoolFile1... DEBUG --->Reading Shape[3 , ????]: [1 Column(s)] -SimplePoolFile1... DEBUG ---->[0]:DataHeader_p5 Typ:DataHeader_p5 [21] Size:0 Offset:0 #Elements:1 -SimplePoolFile1... DEBUG --->Reading Shape[4 , ????]: [1 Column(s)] -SimplePoolFile1... DEBUG ---->[0]:EventStreamInfo_p3 Typ:EventStreamInfo_p3 [21] Size:0 Offset:0 #Elements:1 -##Shapes DEBUG No objects passing selection criteria... Container has 5 Entries in total. -SimplePoolFile1... DEBUG --> Access DbContainer READ [ROOT_All] ##Links -##Links DEBUG Opening -##Links DEBUG attributes# = 1 -##Links DEBUG Opened container ##Links of type ROOT_Tree -SimplePoolFile1... DEBUG --->Reading Assoc:????/##Params [200] (2 , ffffffff) -SimplePoolFile1... DEBUG ---->ClassID:???? -SimplePoolFile1... DEBUG --->Reading Assoc:????/CollectionTree(EventInfo_p4/McEventInfo) [20?] (3 , ffffffff) -SimplePoolFile1... DEBUG ---->ClassID:???? -SimplePoolFile1... DEBUG --->Reading Assoc:????/CollectionTree(ExampleHitContainer_p1/MyHits) [20?] (4 , ffffffff) -SimplePoolFile1... DEBUG ---->ClassID:???? -SimplePoolFile1... DEBUG --->Reading Assoc:????/POOLContainerForm(DataHeaderForm) [20?] (5 , ffffffff) -SimplePoolFile1... DEBUG ---->ClassID:???? -SimplePoolFile1... DEBUG --->Reading Assoc:????/POOLContainer(DataHeader) [20?] (6 , ffffffff) -SimplePoolFile1... DEBUG ---->ClassID:???? -SimplePoolFile1... DEBUG --->Reading Assoc:????/MetaData(EventStreamInfo_p3/Stream1) [20?] (7 , ffffffff) -SimplePoolFile1... DEBUG ---->ClassID:???? -SimplePoolFile1... DEBUG --->Reading Assoc:????/MetaDataHdrForm(DataHeaderForm) [20?] (8 , ffffffff) -SimplePoolFile1... DEBUG ---->ClassID:???? -SimplePoolFile1... DEBUG --->Reading Assoc:????/MetaDataHdr(DataHeader) [20?] (9 , ffffffff) -SimplePoolFile1... DEBUG ---->ClassID:???? -##Links DEBUG No objects passing selection criteria... Container has 8 Entries in total. -SimplePoolFile1... DEBUG --> Access DbContainer READ [ROOT_All] ##Params -##Params DEBUG Opening -##Params DEBUG attributes# = 1 -##Params DEBUG Opened container ##Params of type ROOT_Tree -SimplePoolFile1... DEBUG --->Reading Param:FID=[????] -SimplePoolFile1... DEBUG --->Reading Param:PFN=[SimplePoolFile1.root] -SimplePoolFile1... DEBUG --->Reading Param:POOL_VSN=[1.1] -SimplePoolFile1... DEBUG --->Reading Param:FORMAT_VSN=[1.1] -##Params DEBUG No objects passing selection criteria... Container has 4 Entries in total. -SimplePoolFile1... DEBUG --> Access DbContainer READ [ROOT_Tree] POOLContainer(DataHeader) -POOLContainer(D... DEBUG Opening -POOLContainer(D... DEBUG attributes# = 1 -POOLContainer(D... DEBUG Branch container 'DataHeader' -POOLContainer(D... DEBUG Opened container POOLContainer(DataHeader) of type ROOT_Tree ApplicationMgr INFO Application Manager Started successfully RootDatabase.se... DEBUG Request tree cache RootDatabase.se... DEBUG File name SimplePoolFile1.root @@ -207,27 +179,28 @@ RootDatabase.se... DEBUG Got tree CollectionTree read entry -1 RootDatabase.se... DEBUG Using Tree cache. Size: -1 Nevents to learn with: -1 MetaDataSvc DEBUG handle() BeginInputFile for SimplePoolFile1.root MetaDataSvc DEBUG initInputMetaDataStore: file name SimplePoolFile1.root -SimplePoolFile1... DEBUG --> Access DbContainer READ [ROOT_Tree] MetaDataHdr(DataHeader) -MetaDataHdr(Dat... DEBUG Opening -MetaDataHdr(Dat... DEBUG attributes# = 1 -MetaDataHdr(Dat... DEBUG Branch container 'DataHeader' -MetaDataHdr(Dat... DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree ClassIDSvc INFO getRegistryEntries: read 2 CLIDRegistry entries for module ALL MetaDataSvc DEBUG Loaded input meta data store proxies MetaDataSvc DEBUG calling beginInputFile for ToolSvc.IOVDbMetaDataTool EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000000]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000000]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000000] +SimplePoolFile1... DEBUG --> Access DbContainer READ [ROOT_Tree] POOLContainer(DataHeader) +POOLContainer(D... DEBUG Opening +POOLContainer(D... DEBUG attributes# = 1 +POOLContainer(D... DEBUG Branch container 'DataHeader' +POOLContainer(D... DEBUG Opened container POOLContainer(DataHeader) of type ROOT_Tree SimplePoolFile1... DEBUG --> Access DbContainer READ [ROOT_Tree] POOLContainerForm(DataHeaderForm) POOLContainerFo... DEBUG Opening POOLContainerFo... DEBUG attributes# = 1 POOLContainerFo... DEBUG Branch container 'DataHeaderForm' POOLContainerFo... DEBUG Opened container POOLContainerForm(DataHeaderForm) of type ROOT_Tree -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AlgResourcePool INFO TopAlg list empty. Recovering the one of Application Manager SimplePoolFile1... DEBUG --> Access DbContainer READ [ROOT_Tree] CollectionTree(EventInfo_p4/McEventInfo) CollectionTree(... DEBUG Opening @@ -247,6 +220,7 @@ ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -282,19 +256,21 @@ WriteCond INFO Hit x = 30.1245 y = 46.5449 z = 43.831 detector = Dumm WriteCond INFO registered all data AthenaEventLoopMgr INFO ===>>> done processing event #0, run #1 1 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000001]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000001]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000001] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #1, run #1 1 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -325,19 +301,21 @@ WriteCond INFO Hit x = 130.125 y = 46.5449 z = -56.169 detector = Dum WriteCond INFO registered all data AthenaEventLoopMgr INFO ===>>> done processing event #1, run #1 2 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000002]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000002]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000002] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #2, run #1 2 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -368,19 +346,21 @@ WriteCond INFO Hit x = 230.125 y = 46.5449 z = -156.169 detector = Du WriteCond INFO registered all data AthenaEventLoopMgr INFO ===>>> done processing event #2, run #1 3 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000003]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000003]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000003] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #3, run #1 3 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -411,19 +391,21 @@ WriteCond INFO Hit x = 330.125 y = 46.5449 z = -256.169 detector = Du WriteCond INFO registered all data AthenaEventLoopMgr INFO ===>>> done processing event #3, run #1 4 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000004]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000004]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000004] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #4, run #1 4 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -454,19 +436,21 @@ WriteCond INFO Hit x = 430.125 y = 46.5449 z = -356.169 detector = Du WriteCond INFO registered all data AthenaEventLoopMgr INFO ===>>> done processing event #4, run #1 5 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000005]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000005]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000005] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #5, run #1 5 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -497,19 +481,21 @@ WriteCond INFO Hit x = 530.125 y = 46.5449 z = -456.169 detector = Du WriteCond INFO registered all data AthenaEventLoopMgr INFO ===>>> done processing event #5, run #1 6 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000006]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000006]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000006] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #6, run #1 6 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -540,19 +526,21 @@ WriteCond INFO Hit x = 630.125 y = 46.5449 z = -556.169 detector = Du WriteCond INFO registered all data AthenaEventLoopMgr INFO ===>>> done processing event #6, run #1 7 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000007]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000007]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000007] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #7, run #1 7 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -583,19 +571,21 @@ WriteCond INFO Hit x = 730.125 y = 46.5449 z = -656.169 detector = Du WriteCond INFO registered all data AthenaEventLoopMgr INFO ===>>> done processing event #7, run #1 8 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000008]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000008]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000008] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #8, run #1 8 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -626,19 +616,21 @@ WriteCond INFO Hit x = 830.125 y = 46.5449 z = -756.169 detector = Du WriteCond INFO registered all data AthenaEventLoopMgr INFO ===>>> done processing event #8, run #1 9 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000009]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000009]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000009] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #9, run #1 9 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -669,19 +661,21 @@ WriteCond INFO Hit x = 930.125 y = 46.5449 z = -856.169 detector = Du WriteCond INFO registered all data AthenaEventLoopMgr INFO ===>>> done processing event #9, run #1 10 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000A]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000A]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000A] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #10, run #1 10 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -712,19 +706,21 @@ WriteCond INFO Hit x = 1030.12 y = 46.5449 z = -956.169 detector = Du WriteCond INFO registered all data AthenaEventLoopMgr INFO ===>>> done processing event #10, run #1 11 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000B]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000B]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000B] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #11, run #1 11 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -755,19 +751,21 @@ WriteCond INFO Hit x = 1130.12 y = 46.5449 z = -1056.17 detector = Du WriteCond INFO registered all data AthenaEventLoopMgr INFO ===>>> done processing event #11, run #1 12 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000C]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000C]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000C] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #12, run #1 12 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -798,19 +796,21 @@ WriteCond INFO Hit x = 1230.12 y = 46.5449 z = -1156.17 detector = Du WriteCond INFO registered all data AthenaEventLoopMgr INFO ===>>> done processing event #12, run #1 13 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000D]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000D]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000D] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #13, run #1 13 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -841,19 +841,21 @@ WriteCond INFO Hit x = 1330.12 y = 46.5449 z = -1256.17 detector = Du WriteCond INFO registered all data AthenaEventLoopMgr INFO ===>>> done processing event #13, run #1 14 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000E]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000E]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000E] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #14, run #1 14 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -884,19 +886,21 @@ WriteCond INFO Hit x = 1430.12 y = 46.5449 z = -1356.17 detector = Du WriteCond INFO registered all data AthenaEventLoopMgr INFO ===>>> done processing event #14, run #1 15 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000F]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000F]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-0000000F] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #15, run #1 15 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -927,19 +931,21 @@ WriteCond INFO Hit x = 1530.12 y = 46.5449 z = -1456.17 detector = Du WriteCond INFO registered all data AthenaEventLoopMgr INFO ===>>> done processing event #15, run #1 16 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000010]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000010]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000010] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #16, run #1 16 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -970,19 +976,21 @@ WriteCond INFO Hit x = 1630.12 y = 46.5449 z = -1556.17 detector = Du WriteCond INFO registered all data AthenaEventLoopMgr INFO ===>>> done processing event #16, run #1 17 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000011]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000011]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000011] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #17, run #1 17 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1013,19 +1021,21 @@ WriteCond INFO Hit x = 1730.12 y = 46.5449 z = -1656.17 detector = Du WriteCond INFO registered all data AthenaEventLoopMgr INFO ===>>> done processing event #17, run #1 18 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000012]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000012]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000012] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #18, run #1 18 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1056,19 +1066,21 @@ WriteCond INFO Hit x = 1830.12 y = 46.5449 z = -1756.17 detector = Du WriteCond INFO registered all data AthenaEventLoopMgr INFO ===>>> done processing event #18, run #1 19 events processed so far <<<=== EventSelector DEBUG Get AttributeList from the collection -EventSelector DEBUG AttributeList size 0 +EventSelector DEBUG AttributeList size 12 EventSelector DEBUG record AthenaAttribute, name = Token = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000013]. EventSelector DEBUG record AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000013]. EventSelector DEBUG found AthenaAttribute, name = eventRef = [DB=????][CNT=POOLContainer(DataHeader)][CLID=????][TECH=0000020?][OID=00000006-00000013] -AthenaPoolAddre... DEBUG The current Event contains: 3 objects +AthenaPoolAddre... DEBUG The current Event contains: 4 objects AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 2101, name = McEventInfo AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 9102, name = MyHits +AthenaPoolAddre... DEBUG loadAddresses: DataObject address, clid = 40774348, name = SimpleTag AthenaEventLoopMgr INFO ===>>> start processing event #19, run #1 19 events processed so far <<<=== ReadData DEBUG in execute() ReadData INFO EventStreamInfo: Number of events = 20 ReadData INFO EventStreamInfo: ItemList: ReadData INFO CLID = 2101, key = McEventInfo ReadData INFO CLID = 9102, key = MyHits +ReadData INFO CLID = 40774348, key = SimpleTag ReadData INFO CLID = 222376821, key = StreamX ReadData INFO EventType: Event type: sim/data - is sim , testbeam/atlas - is atlas , calib/physics - is physics ReadData INFO TagInfo: @@ -1098,10 +1110,10 @@ WriteCond INFO Hit x = 1926.91 y = 52.2238 z = -1855.07 detector = Du WriteCond INFO Hit x = 1930.12 y = 46.5449 z = -1856.17 detector = DummyHitDetector WriteCond INFO registered all data AthenaEventLoopMgr INFO ===>>> done processing event #19, run #1 20 events processed so far <<<=== -Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? -Domain[ROOT_All] INFO > Deaccess DbDomain READ [ROOT_All] MetaDataSvc DEBUG handle() EndInputFile for FID:???? EventSelector INFO Disconnecting input sourceID: ???? +Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] ???? +Domain[ROOT_All] INFO > Deaccess DbDomain READ [ROOT_All] MetaDataSvc DEBUG handle() LastInputFile for end AthenaEventLoopMgr INFO No more events in event selection WriteCond INFO in finalize() @@ -1186,9 +1198,9 @@ commitOutput INFO Time User : Tot= 0 [us] cRep_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 2 fRep_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 2 cRepR_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 3 -cObjR_ALL INFO Time User : Tot= 10 [ms] Ave/Min/Max=0.217(+- 1.46)/ 0/ 10 [ms] #= 46 -cObj_ALL INFO Time User : Tot= 30 [ms] Ave/Min/Max=0.682(+- 3.3)/ 0/ 20 [ms] #= 44 -ChronoStatSvc INFO Time User : Tot= 0.98 [s] #= 1 +cObjR_ALL INFO Time User : Tot= 20 [ms] Ave/Min/Max=0.435(+- 2.04)/ 0/ 10 [ms] #= 46 +cObj_ALL INFO Time User : Tot= 30 [ms] Ave/Min/Max=0.682(+- 2.52)/ 0/ 10 [ms] #= 44 +ChronoStatSvc INFO Time User : Tot= 0.55 [s] #= 1 *****Chrono***** INFO **************************************************************************************************** ChronoStatSvc.f... INFO Service finalized successfully ApplicationMgr INFO Application Manager Finalized successfully diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_WMeta.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_WMeta.ref index 0a0ce4be88478f4e835734f052e07d53468c3194..4b6ad9e2ab5abb24e115ad8c2626a2538551f09f 100644 --- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_WMeta.ref +++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_WMeta.ref @@ -1,12 +1,11 @@ -Warning in <TInterpreter::ReadRootmapFile>: class InDet::IInDetTrackSelectionTool found in libInDetTrackSelectionToolDict.so is already in libInDetSecVtxTrackSelectionToolDict.so -Mon Feb 18 13:01:26 CST 2019 +Wed Mar 6 20:15:05 CET 2019 Preloading tcmalloc_minimal.so Athena INFO including file "AthenaCommon/Preparation.py" Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" Athena INFO executing ROOT6Setup Athena INFO including file "AthenaCommon/Execution.py" Athena INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_WMetaJobOptions.py" -Py:ConfigurableDb INFO Read module info for 5458 configurables from 155 genConfDb files +Py:ConfigurableDb INFO Read module info for 5461 configurables from 48 genConfDb files Py:ConfigurableDb INFO No duplicates have been found: that's good ! Athena INFO including file "AthenaCommon/runbatch.py" ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 @@ -14,18 +13,18 @@ ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to leve ApplicationMgr SUCCESS ==================================================================================================================================== Welcome to ApplicationMgr (GaudiCoreSvc v31r0) - running on hepd-0004 on Mon Feb 18 13:01:31 2019 + running on lxplus084.cern.ch on Wed Mar 6 20:15:18 2019 ==================================================================================================================================== -ApplicationMgr INFO Successfully loaded modules : AthenaServices ApplicationMgr INFO Application Manager Configured successfully ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 StatusCodeSvc INFO initialize AthDictLoaderSvc INFO in initialize... AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO getRegistryEntries: read 3045 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 3167 CLIDRegistry entries for module ALL CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00 ClassIDSvc INFO getRegistryEntries: read 770 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 345 CLIDRegistry entries for module ALL ClassIDSvc INFO getRegistryEntries: read 571 CLIDRegistry entries for module ALL xAODMaker::Even... INFO Initializing - Package version: xAODEventInfoCnv-00-00-00 xAODMaker::Even... INFO Initializing - Package version: xAODEventInfoCnv-00-00-00 @@ -37,9 +36,9 @@ PoolSvc DEBUG Service base class initialized successfully PoolSvc INFO io_register[PoolSvc](xmlcatalog_file:Catalog2.xml) [ok] PoolSvc INFO Set connectionsvc retry/timeout/IDLE timeout to 'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled PoolSvc INFO Frontier compression level set to 5 -DBReplicaSvc INFO Frontier server at (serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://frontier-atlas.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /home/gemmeren/workarea/build/x86_64-centos7-gcc8-opt/share/dbreplica.config -DBReplicaSvc INFO Total of 1 servers found for host hepd-0004.lcrc.anl.gov [ATLF ] +DBReplicaSvc INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data +DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-05T2139/Athena/22.0.1/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config +DBReplicaSvc INFO Total of 10 servers found for host lxplus084.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] PoolSvc INFO Successfully setup replica sorting algorithm PoolSvc DEBUG OutputLevel is PoolSvc INFO Setting up APR FileCatalog and Streams @@ -85,7 +84,7 @@ Stream1 DEBUG Registering all Tools in ToolHandleArray HelperTools Stream1 DEBUG Adding private ToolHandle tool Stream1.Stream1_MakeEventStreamInfo (MakeEventStreamInfo) from ToolHandleArray HelperTools Stream1 DEBUG Adding private ToolHandle tool Stream1.Stream1Tool (AthenaOutputStreamTool) Stream1 DEBUG Data Deps for Stream1 - + INPUT IGNORED ( 'AthenaAttributeList' , '' ) + + INPUT ( 'AthenaAttributeList' , 'StoreGateSvc+SimpleTag' ) HistogramPersis...WARNING Histograms saving not required. EventSelector INFO Enter McEventSelector Initialization AthenaEventLoopMgr INFO Setup EventSelector service EventSelector @@ -136,14 +135,18 @@ SimplePoolFile5... DEBUG --->Adding Assoc :????/##Params [200] (2 , ffffffff) SimplePoolFile5... DEBUG ---->ClassID:???? ##Params DEBUG No objects passing selection criteria... Container has 0 Entries in total. AthenaPoolCnvSvc DEBUG setAttribute CONTAINER_SPLITLEVEL to 99 for db: SimplePoolFile5.root and cont: TTree=POOLContainerForm(DataHeaderForm) -ClassIDSvc INFO getRegistryEntries: read 504 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 108 CLIDRegistry entries for module ALL Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"MyHits") called Stream1 DEBUG Key:MyHits Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 1 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 1 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 1 StorageSvc INFO Building shape according to reflection information using shape ID for: @@ -194,6 +197,122 @@ SimplePoolFile5... DEBUG ---->ClassID:???? SimplePoolFile5... DEBUG --->Adding Shape[3 , ????]: [1 Column(s)] SimplePoolFile5... DEBUG ---->Class:DataHeader_p5 SimplePoolFile5... DEBUG ---->[0]:DataHeader_p5 Typ:DataHeader_p5 [21] Size:0 Offset:0 #Elements:1 +StorageSvc INFO Building shape according to reflection information using shape ID for: +StorageSvc INFO Token [????] +SimplePoolFile5... DEBUG --> Access DbContainer CREA/UPDA [ROOT_Tree] POOLCollectionTree(Token) +POOLCollectionT... DEBUG Opening +POOLCollectionT... DEBUG attributes# = 1 +POOLCollectionT... DEBUG Branch container 'Token' +POOLCollectionT... DEBUG Opened container POOLCollectionTree(Token) of type ROOT_Tree +SimplePoolFile5... DEBUG --->Adding Assoc :????/POOLCollectionTree(Token) [20?] (7 , ffffffff) +SimplePoolFile5... DEBUG ---->ClassID:???? +SimplePoolFile5... DEBUG --->Adding Shape[4 , ????]: [1 Column(s)] +SimplePoolFile5... DEBUG ---->Class:Token +SimplePoolFile5... DEBUG ---->[0]:Token Typ:Token [18] Size:0 Offset:0 #Elements:1 +StorageSvc INFO Building shape according to reflection information using shape ID for: +StorageSvc INFO bool [????] +SimplePoolFile5... DEBUG --> Access DbContainer CREA/UPDA [ROOT_Tree] POOLCollectionTree(IsSimulation) +POOLCollectionT... DEBUG Opening +POOLCollectionT... DEBUG attributes# = 1 +POOLCollectionT... DEBUG Branch container 'IsSimulation' +POOLCollectionT... DEBUG Opened container POOLCollectionTree(IsSimulation) of type ROOT_Tree +SimplePoolFile5... DEBUG --->Adding Assoc :????/POOLCollectionTree(IsSimulation) [20?] (8 , ffffffff) +SimplePoolFile5... DEBUG ---->ClassID:???? +SimplePoolFile5... DEBUG --->Adding Shape[5 , ????]: [1 Column(s)] +SimplePoolFile5... DEBUG ---->Class:bool +SimplePoolFile5... DEBUG ---->[0]:bool Typ:bool [9] Size:0 Offset:0 #Elements:1 +SimplePoolFile5... DEBUG --> Access DbContainer CREA/UPDA [ROOT_Tree] POOLCollectionTree(IsCalibration) +POOLCollectionT... DEBUG Opening +POOLCollectionT... DEBUG attributes# = 1 +POOLCollectionT... DEBUG Branch container 'IsCalibration' +POOLCollectionT... DEBUG Opened container POOLCollectionTree(IsCalibration) of type ROOT_Tree +SimplePoolFile5... DEBUG --->Adding Assoc :????/POOLCollectionTree(IsCalibration) [20?] (9 , ffffffff) +SimplePoolFile5... DEBUG ---->ClassID:???? +SimplePoolFile5... DEBUG --> Access DbContainer CREA/UPDA [ROOT_Tree] POOLCollectionTree(IsTestBeam) +POOLCollectionT... DEBUG Opening +POOLCollectionT... DEBUG attributes# = 1 +POOLCollectionT... DEBUG Branch container 'IsTestBeam' +POOLCollectionT... DEBUG Opened container POOLCollectionTree(IsTestBeam) of type ROOT_Tree +SimplePoolFile5... DEBUG --->Adding Assoc :????/POOLCollectionTree(IsTestBeam) [20?] (a , ffffffff) +SimplePoolFile5... DEBUG ---->ClassID:???? +StorageSvc INFO Building shape according to reflection information using shape ID for: +StorageSvc INFO unsigned int [????] +SimplePoolFile5... DEBUG --> Access DbContainer CREA/UPDA [ROOT_Tree] POOLCollectionTree(McChannel) +POOLCollectionT... DEBUG Opening +POOLCollectionT... DEBUG attributes# = 1 +POOLCollectionT... DEBUG Branch container 'McChannel' +POOLCollectionT... DEBUG Opened container POOLCollectionTree(McChannel) of type ROOT_Tree +SimplePoolFile5... DEBUG --->Adding Assoc :????/POOLCollectionTree(McChannel) [20?] (b , ffffffff) +SimplePoolFile5... DEBUG ---->ClassID:???? +SimplePoolFile5... DEBUG --->Adding Shape[6 , ????]: [1 Column(s)] +SimplePoolFile5... DEBUG ---->Class:unsigned int +SimplePoolFile5... DEBUG ---->[0]:unsigned int Typ:unsigned int [3] Size:0 Offset:0 #Elements:1 +SimplePoolFile5... DEBUG --> Access DbContainer CREA/UPDA [ROOT_Tree] POOLCollectionTree(RunNumber) +POOLCollectionT... DEBUG Opening +POOLCollectionT... DEBUG attributes# = 1 +POOLCollectionT... DEBUG Branch container 'RunNumber' +POOLCollectionT... DEBUG Opened container POOLCollectionTree(RunNumber) of type ROOT_Tree +SimplePoolFile5... DEBUG --->Adding Assoc :????/POOLCollectionTree(RunNumber) [20?] (c , ffffffff) +SimplePoolFile5... DEBUG ---->ClassID:???? +StorageSvc INFO Building shape according to reflection information using shape ID for: +StorageSvc INFO unsigned long long [????] +SimplePoolFile5... DEBUG --> Access DbContainer CREA/UPDA [ROOT_Tree] POOLCollectionTree(EventNumber) +POOLCollectionT... DEBUG Opening +POOLCollectionT... DEBUG attributes# = 1 +POOLCollectionT... DEBUG Branch container 'EventNumber' +POOLCollectionT... DEBUG Opened container POOLCollectionTree(EventNumber) of type ROOT_Tree +SimplePoolFile5... DEBUG --->Adding Assoc :????/POOLCollectionTree(EventNumber) [20?] (d , ffffffff) +SimplePoolFile5... DEBUG ---->ClassID:???? +SimplePoolFile5... DEBUG --->Adding Shape[7 , ????]: [1 Column(s)] +SimplePoolFile5... DEBUG ---->Class:unsigned long long +SimplePoolFile5... DEBUG ---->[0]:unsigned long long Typ:unsigned long long [23] Size:0 Offset:0 #Elements:1 +SimplePoolFile5... DEBUG --> Access DbContainer CREA/UPDA [ROOT_Tree] POOLCollectionTree(LumiBlockN) +POOLCollectionT... DEBUG Opening +POOLCollectionT... DEBUG attributes# = 1 +POOLCollectionT... DEBUG Branch container 'LumiBlockN' +POOLCollectionT... DEBUG Opened container POOLCollectionTree(LumiBlockN) of type ROOT_Tree +SimplePoolFile5... DEBUG --->Adding Assoc :????/POOLCollectionTree(LumiBlockN) [20?] (e , ffffffff) +SimplePoolFile5... DEBUG ---->ClassID:???? +SimplePoolFile5... DEBUG --> Access DbContainer CREA/UPDA [ROOT_Tree] POOLCollectionTree(ConditionsRun) +POOLCollectionT... DEBUG Opening +POOLCollectionT... DEBUG attributes# = 1 +POOLCollectionT... DEBUG Branch container 'ConditionsRun' +POOLCollectionT... DEBUG Opened container POOLCollectionTree(ConditionsRun) of type ROOT_Tree +SimplePoolFile5... DEBUG --->Adding Assoc :????/POOLCollectionTree(ConditionsRun) [20?] (f , ffffffff) +SimplePoolFile5... DEBUG ---->ClassID:???? +SimplePoolFile5... DEBUG --> Access DbContainer CREA/UPDA [ROOT_Tree] POOLCollectionTree(EventTime) +POOLCollectionT... DEBUG Opening +POOLCollectionT... DEBUG attributes# = 1 +POOLCollectionT... DEBUG Branch container 'EventTime' +POOLCollectionT... DEBUG Opened container POOLCollectionTree(EventTime) of type ROOT_Tree +SimplePoolFile5... DEBUG --->Adding Assoc :????/POOLCollectionTree(EventTime) [20?] (10 , ffffffff) +SimplePoolFile5... DEBUG ---->ClassID:???? +SimplePoolFile5... DEBUG --> Access DbContainer CREA/UPDA [ROOT_Tree] POOLCollectionTree(EventTimeNanoSec) +POOLCollectionT... DEBUG Opening +POOLCollectionT... DEBUG attributes# = 1 +POOLCollectionT... DEBUG Branch container 'EventTimeNanoSec' +POOLCollectionT... DEBUG Opened container POOLCollectionTree(EventTimeNanoSec) of type ROOT_Tree +SimplePoolFile5... DEBUG --->Adding Assoc :????/POOLCollectionTree(EventTimeNanoSec) [20?] (11 , ffffffff) +SimplePoolFile5... DEBUG ---->ClassID:???? +SimplePoolFile5... DEBUG --> Access DbContainer CREA/UPDA [ROOT_Tree] POOLCollectionTree(BunchId) +POOLCollectionT... DEBUG Opening +POOLCollectionT... DEBUG attributes# = 1 +POOLCollectionT... DEBUG Branch container 'BunchId' +POOLCollectionT... DEBUG Opened container POOLCollectionTree(BunchId) of type ROOT_Tree +SimplePoolFile5... DEBUG --->Adding Assoc :????/POOLCollectionTree(BunchId) [20?] (12 , ffffffff) +SimplePoolFile5... DEBUG ---->ClassID:???? +StorageSvc INFO Building shape according to reflection information using shape ID for: +StorageSvc INFO float [????] +SimplePoolFile5... DEBUG --> Access DbContainer CREA/UPDA [ROOT_Tree] POOLCollectionTree(EventWeight) +POOLCollectionT... DEBUG Opening +POOLCollectionT... DEBUG attributes# = 1 +POOLCollectionT... DEBUG Branch container 'EventWeight' +POOLCollectionT... DEBUG Opened container POOLCollectionTree(EventWeight) of type ROOT_Tree +SimplePoolFile5... DEBUG --->Adding Assoc :????/POOLCollectionTree(EventWeight) [20?] (13 , ffffffff) +SimplePoolFile5... DEBUG ---->ClassID:???? +SimplePoolFile5... DEBUG --->Adding Shape[8 , ????]: [1 Column(s)] +SimplePoolFile5... DEBUG ---->Class:float +SimplePoolFile5... DEBUG ---->[0]:float Typ:float [10] Size:0 Offset:0 #Elements:1 AthenaPoolCnvSvc DEBUG setAttribute BRANCH_BASKET_SIZE to 256000 for db: SimplePoolFile5.root and cont: POOLContainer(DataHeader) AthenaPoolCnvSvc DEBUG setAttribute BRANCH_BASKET_SIZE to 1024000 for db: SimplePoolFile5.root and cont: POOLContainerForm(DataHeaderForm) AthenaEventLoopMgr INFO ===>>> done processing event #0, run #0 1 events processed so far <<<=== @@ -212,14 +331,18 @@ WriteCond INFO Hit x = 123.704 y = -42.0973 z = -53.6841 detector = D WriteCond INFO Hit x = 126.915 y = -47.7762 z = -55.0735 detector = DummyHitDetector WriteCond INFO Hit x = 130.125 y = -53.4551 z = -56.169 detector = DummyHitDetector WriteCond INFO registered all data -ClassIDSvc INFO getRegistryEntries: read 75 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 78 CLIDRegistry entries for module ALL Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"MyHits") called Stream1 DEBUG Key:MyHits Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 2 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 2 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 2 AthenaEventLoopMgr INFO ===>>> done processing event #1, run #0 2 events processed so far <<<=== @@ -244,7 +367,11 @@ Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"MyHits") called Stream1 DEBUG Key:MyHits Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 3 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 3 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 3 AthenaEventLoopMgr INFO ===>>> done processing event #2, run #0 3 events processed so far <<<=== @@ -269,7 +396,11 @@ Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"MyHits") called Stream1 DEBUG Key:MyHits Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 4 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 4 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 4 AthenaEventLoopMgr INFO ===>>> done processing event #3, run #0 4 events processed so far <<<=== @@ -294,7 +425,11 @@ Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"MyHits") called Stream1 DEBUG Key:MyHits Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 5 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 5 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 5 AthenaEventLoopMgr INFO ===>>> done processing event #4, run #0 5 events processed so far <<<=== @@ -319,7 +454,11 @@ Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"MyHits") called Stream1 DEBUG Key:MyHits Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 6 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 6 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 6 AthenaEventLoopMgr INFO ===>>> done processing event #5, run #0 6 events processed so far <<<=== @@ -344,7 +483,11 @@ Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"MyHits") called Stream1 DEBUG Key:MyHits Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 7 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 7 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 7 AthenaEventLoopMgr INFO ===>>> done processing event #6, run #0 7 events processed so far <<<=== @@ -369,7 +512,11 @@ Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"MyHits") called Stream1 DEBUG Key:MyHits Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 8 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 8 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 8 AthenaEventLoopMgr INFO ===>>> done processing event #7, run #0 8 events processed so far <<<=== @@ -394,7 +541,11 @@ Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"MyHits") called Stream1 DEBUG Key:MyHits Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 9 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 9 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 9 AthenaEventLoopMgr INFO ===>>> done processing event #8, run #0 9 events processed so far <<<=== @@ -419,7 +570,11 @@ Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"MyHits") called Stream1 DEBUG Key:MyHits Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 10 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 10 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 10 AthenaEventLoopMgr INFO ===>>> done processing event #9, run #0 10 events processed so far <<<=== @@ -444,7 +599,11 @@ Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"MyHits") called Stream1 DEBUG Key:MyHits Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 11 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 11 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 11 AthenaEventLoopMgr INFO ===>>> done processing event #10, run #0 11 events processed so far <<<=== @@ -469,7 +628,11 @@ Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"MyHits") called Stream1 DEBUG Key:MyHits Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 12 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 12 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 12 AthenaEventLoopMgr INFO ===>>> done processing event #11, run #0 12 events processed so far <<<=== @@ -494,7 +657,11 @@ Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"MyHits") called Stream1 DEBUG Key:MyHits Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 13 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 13 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 13 AthenaEventLoopMgr INFO ===>>> done processing event #12, run #0 13 events processed so far <<<=== @@ -519,7 +686,11 @@ Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"MyHits") called Stream1 DEBUG Key:MyHits Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 14 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 14 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 14 AthenaEventLoopMgr INFO ===>>> done processing event #13, run #0 14 events processed so far <<<=== @@ -545,7 +716,11 @@ Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"MyHits") called Stream1 DEBUG Key:MyHits Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 15 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 15 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 15 AthenaEventLoopMgr INFO ===>>> done processing event #14, run #0 15 events processed so far <<<=== @@ -570,7 +745,11 @@ Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"MyHits") called Stream1 DEBUG Key:MyHits Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 16 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 16 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 16 AthenaEventLoopMgr INFO ===>>> done processing event #15, run #0 16 events processed so far <<<=== @@ -595,7 +774,11 @@ Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"MyHits") called Stream1 DEBUG Key:MyHits Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 17 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 17 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 17 AthenaEventLoopMgr INFO ===>>> done processing event #16, run #0 17 events processed so far <<<=== @@ -620,7 +803,11 @@ Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"MyHits") called Stream1 DEBUG Key:MyHits Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 18 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 18 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 18 AthenaEventLoopMgr INFO ===>>> done processing event #17, run #0 18 events processed so far <<<=== @@ -645,7 +832,11 @@ Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"MyHits") called Stream1 DEBUG Key:MyHits Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 19 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 19 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 19 AthenaEventLoopMgr INFO ===>>> done processing event #18, run #0 19 events processed so far <<<=== @@ -670,7 +861,11 @@ Stream1 DEBUG Added object 2101,"McEventInfo" Stream1 DEBUG addItemObjects(9102,"MyHits") called Stream1 DEBUG Key:MyHits Stream1 DEBUG Added object 9102,"MyHits" +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 20 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 20 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 20 AthenaEventLoopMgr INFO ===>>> done processing event #19, run #0 20 events processed so far <<<=== @@ -691,7 +886,7 @@ MetaData(Exampl... DEBUG Opening MetaData(Exampl... DEBUG attributes# = 1 MetaData(Exampl... DEBUG Branch container 'ExampleHitContainer_p1_PedestalWriteData' MetaData(Exampl... DEBUG Opened container MetaData(ExampleHitContainer_p1/PedestalWriteData) of type ROOT_Tree -SimplePoolFile5... DEBUG --->Adding Assoc :????/MetaData(ExampleHitContainer_p1/PedestalWriteData) [20?] (7 , ffffffff) +SimplePoolFile5... DEBUG --->Adding Assoc :????/MetaData(ExampleHitContainer_p1/PedestalWriteData) [20?] (14 , ffffffff) SimplePoolFile5... DEBUG ---->ClassID:???? StorageSvc INFO Building shape according to reflection information using shape ID for: StorageSvc INFO EventStreamInfo_p3 [????] @@ -700,9 +895,9 @@ MetaData(EventS... DEBUG Opening MetaData(EventS... DEBUG attributes# = 1 MetaData(EventS... DEBUG Branch container 'EventStreamInfo_p3_Stream1' MetaData(EventS... DEBUG Opened container MetaData(EventStreamInfo_p3/Stream1) of type ROOT_Tree -SimplePoolFile5... DEBUG --->Adding Assoc :????/MetaData(EventStreamInfo_p3/Stream1) [20?] (8 , ffffffff) +SimplePoolFile5... DEBUG --->Adding Assoc :????/MetaData(EventStreamInfo_p3/Stream1) [20?] (15 , ffffffff) SimplePoolFile5... DEBUG ---->ClassID:???? -SimplePoolFile5... DEBUG --->Adding Shape[4 , ????]: [1 Column(s)] +SimplePoolFile5... DEBUG --->Adding Shape[9 , ????]: [1 Column(s)] SimplePoolFile5... DEBUG ---->Class:EventStreamInfo_p3 SimplePoolFile5... DEBUG ---->[0]:EventStreamInfo_p3 Typ:EventStreamInfo_p3 [21] Size:0 Offset:0 #Elements:1 SimplePoolFile5... DEBUG --> Access DbContainer CREA/UPDA [ROOT_Tree] MetaDataHdrForm(DataHeaderForm) @@ -710,14 +905,14 @@ MetaDataHdrForm... DEBUG Opening MetaDataHdrForm... DEBUG attributes# = 1 MetaDataHdrForm... DEBUG Branch container 'DataHeaderForm' MetaDataHdrForm... DEBUG Opened container MetaDataHdrForm(DataHeaderForm) of type ROOT_Tree -SimplePoolFile5... DEBUG --->Adding Assoc :????/MetaDataHdrForm(DataHeaderForm) [20?] (9 , ffffffff) +SimplePoolFile5... DEBUG --->Adding Assoc :????/MetaDataHdrForm(DataHeaderForm) [20?] (16 , ffffffff) SimplePoolFile5... DEBUG ---->ClassID:???? SimplePoolFile5... DEBUG --> Access DbContainer CREA/UPDA [ROOT_Tree] MetaDataHdr(DataHeader) MetaDataHdr(Dat... DEBUG Opening MetaDataHdr(Dat... DEBUG attributes# = 1 MetaDataHdr(Dat... DEBUG Branch container 'DataHeader' MetaDataHdr(Dat... DEBUG Opened container MetaDataHdr(DataHeader) of type ROOT_Tree -SimplePoolFile5... DEBUG --->Adding Assoc :????/MetaDataHdr(DataHeader) [20?] (a , ffffffff) +SimplePoolFile5... DEBUG --->Adding Assoc :????/MetaDataHdr(DataHeader) [20?] (17 , ffffffff) SimplePoolFile5... DEBUG ---->ClassID:???? ClassIDSvc INFO getRegistryEntries: read 7 CLIDRegistry entries for module ALL Stream1 INFO Records written: 21 @@ -742,10 +937,10 @@ ToolSvc INFO Removing all tools created by ToolSvc *****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) *****Chrono***** INFO **************************************************************************************************** commitOutput INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 21 -cRep_ALL INFO Time User : Tot= 20 [ms] Ave/Min/Max=0.317(+- 1.75)/ 0/ 10 [ms] #= 63 -fRep_ALL INFO Time User : Tot= 20 [ms] Ave/Min/Max=0.317(+- 1.75)/ 0/ 10 [ms] #= 63 -cRepR_ALL INFO Time User : Tot= 20 [ms] Ave/Min/Max=0.238(+- 1.52)/ 0/ 10 [ms] #= 84 -ChronoStatSvc INFO Time User : Tot= 370 [ms] #= 1 +cRep_ALL INFO Time User : Tot= 20 [ms] Ave/Min/Max=0.241(+- 2.18)/ 0/ 20 [ms] #= 83 +cRepR_ALL INFO Time User : Tot= 20 [ms] Ave/Min/Max=0.0581(+- 1.08)/ 0/ 20 [ms] #=344 +fRep_ALL INFO Time User : Tot= 40 [ms] Ave/Min/Max=0.482(+- 2.65)/ 0/ 20 [ms] #= 83 +ChronoStatSvc INFO Time User : Tot= 0.63 [s] #= 1 *****Chrono***** INFO **************************************************************************************************** ChronoStatSvc.f... INFO Service finalized successfully ApplicationMgr INFO Application Manager Finalized successfully diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Write.ref b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Write.ref index 6ebb3d3d9172d1419c72e274667513148d5477f7..850e562ec6ad71b01cdf8a616cfd881798340861 100644 --- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Write.ref +++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_Write.ref @@ -1,12 +1,11 @@ -Warning in <TInterpreter::ReadRootmapFile>: class InDet::IInDetTrackSelectionTool found in libInDetTrackSelectionToolDict.so is already in libInDetSecVtxTrackSelectionToolDict.so -Mon Feb 18 12:59:38 CST 2019 +Wed Mar 6 21:34:32 CET 2019 Preloading tcmalloc_minimal.so Athena INFO including file "AthenaCommon/Preparation.py" Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" Athena INFO executing ROOT6Setup Athena INFO including file "AthenaCommon/Execution.py" Athena INFO including file "AthenaPoolExampleAlgorithms/AthenaPoolExample_WriteJobOptions.py" -Py:ConfigurableDb INFO Read module info for 5458 configurables from 155 genConfDb files +Py:ConfigurableDb INFO Read module info for 5461 configurables from 48 genConfDb files Py:ConfigurableDb INFO No duplicates have been found: that's good ! Athena INFO including file "AthenaCommon/runbatch.py" ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 @@ -14,19 +13,19 @@ ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to leve ApplicationMgr SUCCESS ==================================================================================================================================== Welcome to ApplicationMgr (GaudiCoreSvc v31r0) - running on hepd-0004 on Mon Feb 18 12:59:51 2019 + running on lxplus084.cern.ch on Wed Mar 6 21:34:47 2019 ==================================================================================================================================== -ApplicationMgr INFO Successfully loaded modules : AthenaServices ApplicationMgr INFO Application Manager Configured successfully ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 StatusCodeSvc INFO initialize AthDictLoaderSvc INFO in initialize... AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO getRegistryEntries: read 3045 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 3167 CLIDRegistry entries for module ALL CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00 ClassIDSvc INFO getRegistryEntries: read 770 CLIDRegistry entries for module ALL ClassIDSvc INFO getRegistryEntries: read 571 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 345 CLIDRegistry entries for module ALL xAODMaker::Even... INFO Initializing - Package version: xAODEventInfoCnv-00-00-00 xAODMaker::Even... INFO Initializing - Package version: xAODEventInfoCnv-00-00-00 MetaDataSvc INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00 @@ -37,9 +36,9 @@ PoolSvc DEBUG Service base class initialized successfully PoolSvc INFO io_register[PoolSvc](xmlcatalog_file:Catalog1.xml) [ok] PoolSvc INFO Set connectionsvc retry/timeout/IDLE timeout to 'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled PoolSvc INFO Frontier compression level set to 5 -DBReplicaSvc INFO Frontier server at (serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://frontier-atlas.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /home/gemmeren/workarea/build/x86_64-centos7-gcc8-opt/share/dbreplica.config -DBReplicaSvc INFO Total of 1 servers found for host hepd-0004.lcrc.anl.gov [ATLF ] +DBReplicaSvc INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data +DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-05T2139/Athena/22.0.1/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config +DBReplicaSvc INFO Total of 10 servers found for host lxplus084.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] PoolSvc INFO Successfully setup replica sorting algorithm PoolSvc DEBUG OutputLevel is PoolSvc INFO Setting up APR FileCatalog and Streams @@ -87,7 +86,6 @@ Stream1 DEBUG Adding private ToolHandle tool Stream1.Stream1_MakeEve Stream1 DEBUG Adding private ToolHandle tool Stream1.Stream1Tool (AthenaOutputStreamTool) Stream1 DEBUG Data Deps for Stream1 + INPUT ( 'AthenaAttributeList' , 'StoreGateSvc+MagicTag' ) -ClassIDSvc INFO getRegistryEntries: read 396 CLIDRegistry entries for module ALL Stream2 DEBUG Property update for OutputLevel : new value = 2 Stream2.Stream2... DEBUG Property update for OutputLevel : new value = 2 Stream2 DEBUG In initialize @@ -162,7 +160,7 @@ SimplePoolFile1... DEBUG --->Adding Assoc :????/##Params [200] (2 , ffffffff) SimplePoolFile1... DEBUG ---->ClassID:???? ##Params DEBUG No objects passing selection criteria... Container has 0 Entries in total. AthenaPoolCnvSvc DEBUG setAttribute CONTAINER_SPLITLEVEL to 99 for db: SimplePoolFile1.root and cont: TTree=POOLContainerForm(DataHeaderForm) -ClassIDSvc INFO getRegistryEntries: read 542 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 543 CLIDRegistry entries for module ALL Stream1 DEBUG addItemObjects(2101,"*") called Stream1 DEBUG Key:* Stream1 DEBUG Added object 2101,"McEventInfo" @@ -172,7 +170,11 @@ Stream1 DEBUG Added object 9102,"MyHits" Stream1 DEBUG addItemObjects(9102,"PetersHits") called Stream1 DEBUG Key:PetersHits Stream1 DEBUG No object matching 9102,"PetersHits" found +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 1 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 1 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 1 StorageSvc INFO Building shape according to reflection information using shape ID for: @@ -291,7 +293,11 @@ Stream2 DEBUG Key:* Stream2 DEBUG Added object 2101,"McEventInfo" Stream2 DEBUG addItemObjects(9102,"*") called Stream2 DEBUG Key:* +Stream2 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream2 DEBUG Key:SimpleTag +Stream2 DEBUG Added object 40774348,"SimpleTag" Stream2 DEBUG Collected objects: +Stream2 DEBUG Object/count: AthenaAttributeList_SimpleTag, 1 Stream2 DEBUG Object/count: EventInfo_McEventInfo, 1 SimplePoolFile2... DEBUG --> Access DbContainer CREA/UPDA [ROOT_Tree] CollectionTree(EventInfo_p4/McEventInfo) CollectionTree(... DEBUG Opening @@ -377,7 +383,11 @@ Stream1 DEBUG Added object 9102,"MyHits" Stream1 DEBUG addItemObjects(9102,"PetersHits") called Stream1 DEBUG Key:PetersHits Stream1 DEBUG No object matching 9102,"PetersHits" found +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 2 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 2 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 2 Stream2 DEBUG addItemObjects(2101,"*") called @@ -385,7 +395,11 @@ Stream2 DEBUG Key:* Stream2 DEBUG Added object 2101,"McEventInfo" Stream2 DEBUG addItemObjects(9102,"*") called Stream2 DEBUG Key:* +Stream2 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream2 DEBUG Key:SimpleTag +Stream2 DEBUG Added object 40774348,"SimpleTag" Stream2 DEBUG Collected objects: +Stream2 DEBUG Object/count: AthenaAttributeList_SimpleTag, 2 Stream2 DEBUG Object/count: EventInfo_McEventInfo, 2 AthenaEventLoopMgr INFO ===>>> done processing event #1, run #1 2 events processed so far <<<=== AthenaEventLoopMgr INFO ===>>> start processing event #2, run #1 2 events processed so far <<<=== @@ -405,7 +419,11 @@ Stream1 DEBUG Added object 9102,"MyHits" Stream1 DEBUG addItemObjects(9102,"PetersHits") called Stream1 DEBUG Key:PetersHits Stream1 DEBUG No object matching 9102,"PetersHits" found +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 3 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 3 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 3 Stream2 DEBUG addItemObjects(2101,"*") called @@ -413,7 +431,11 @@ Stream2 DEBUG Key:* Stream2 DEBUG Added object 2101,"McEventInfo" Stream2 DEBUG addItemObjects(9102,"*") called Stream2 DEBUG Key:* +Stream2 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream2 DEBUG Key:SimpleTag +Stream2 DEBUG Added object 40774348,"SimpleTag" Stream2 DEBUG Collected objects: +Stream2 DEBUG Object/count: AthenaAttributeList_SimpleTag, 3 Stream2 DEBUG Object/count: EventInfo_McEventInfo, 3 AthenaEventLoopMgr INFO ===>>> done processing event #2, run #1 3 events processed so far <<<=== AthenaEventLoopMgr INFO ===>>> start processing event #3, run #1 3 events processed so far <<<=== @@ -433,7 +455,11 @@ Stream1 DEBUG Added object 9102,"MyHits" Stream1 DEBUG addItemObjects(9102,"PetersHits") called Stream1 DEBUG Key:PetersHits Stream1 DEBUG No object matching 9102,"PetersHits" found +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 4 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 4 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 4 Stream2 DEBUG addItemObjects(2101,"*") called @@ -441,7 +467,11 @@ Stream2 DEBUG Key:* Stream2 DEBUG Added object 2101,"McEventInfo" Stream2 DEBUG addItemObjects(9102,"*") called Stream2 DEBUG Key:* +Stream2 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream2 DEBUG Key:SimpleTag +Stream2 DEBUG Added object 40774348,"SimpleTag" Stream2 DEBUG Collected objects: +Stream2 DEBUG Object/count: AthenaAttributeList_SimpleTag, 4 Stream2 DEBUG Object/count: EventInfo_McEventInfo, 4 AthenaEventLoopMgr INFO ===>>> done processing event #3, run #1 4 events processed so far <<<=== AthenaEventLoopMgr INFO ===>>> start processing event #4, run #1 4 events processed so far <<<=== @@ -461,7 +491,11 @@ Stream1 DEBUG Added object 9102,"MyHits" Stream1 DEBUG addItemObjects(9102,"PetersHits") called Stream1 DEBUG Key:PetersHits Stream1 DEBUG No object matching 9102,"PetersHits" found +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 5 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 5 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 5 Stream2 DEBUG addItemObjects(2101,"*") called @@ -469,7 +503,11 @@ Stream2 DEBUG Key:* Stream2 DEBUG Added object 2101,"McEventInfo" Stream2 DEBUG addItemObjects(9102,"*") called Stream2 DEBUG Key:* +Stream2 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream2 DEBUG Key:SimpleTag +Stream2 DEBUG Added object 40774348,"SimpleTag" Stream2 DEBUG Collected objects: +Stream2 DEBUG Object/count: AthenaAttributeList_SimpleTag, 5 Stream2 DEBUG Object/count: EventInfo_McEventInfo, 5 AthenaEventLoopMgr INFO ===>>> done processing event #4, run #1 5 events processed so far <<<=== AthenaEventLoopMgr INFO ===>>> start processing event #5, run #1 5 events processed so far <<<=== @@ -489,7 +527,11 @@ Stream1 DEBUG Added object 9102,"MyHits" Stream1 DEBUG addItemObjects(9102,"PetersHits") called Stream1 DEBUG Key:PetersHits Stream1 DEBUG No object matching 9102,"PetersHits" found +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 6 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 6 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 6 Stream2 DEBUG addItemObjects(2101,"*") called @@ -497,7 +539,11 @@ Stream2 DEBUG Key:* Stream2 DEBUG Added object 2101,"McEventInfo" Stream2 DEBUG addItemObjects(9102,"*") called Stream2 DEBUG Key:* +Stream2 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream2 DEBUG Key:SimpleTag +Stream2 DEBUG Added object 40774348,"SimpleTag" Stream2 DEBUG Collected objects: +Stream2 DEBUG Object/count: AthenaAttributeList_SimpleTag, 6 Stream2 DEBUG Object/count: EventInfo_McEventInfo, 6 AthenaEventLoopMgr INFO ===>>> done processing event #5, run #1 6 events processed so far <<<=== AthenaEventLoopMgr INFO ===>>> start processing event #6, run #1 6 events processed so far <<<=== @@ -517,7 +563,11 @@ Stream1 DEBUG Added object 9102,"MyHits" Stream1 DEBUG addItemObjects(9102,"PetersHits") called Stream1 DEBUG Key:PetersHits Stream1 DEBUG No object matching 9102,"PetersHits" found +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 7 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 7 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 7 Stream2 DEBUG addItemObjects(2101,"*") called @@ -525,7 +575,11 @@ Stream2 DEBUG Key:* Stream2 DEBUG Added object 2101,"McEventInfo" Stream2 DEBUG addItemObjects(9102,"*") called Stream2 DEBUG Key:* +Stream2 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream2 DEBUG Key:SimpleTag +Stream2 DEBUG Added object 40774348,"SimpleTag" Stream2 DEBUG Collected objects: +Stream2 DEBUG Object/count: AthenaAttributeList_SimpleTag, 7 Stream2 DEBUG Object/count: EventInfo_McEventInfo, 7 AthenaEventLoopMgr INFO ===>>> done processing event #6, run #1 7 events processed so far <<<=== AthenaEventLoopMgr INFO ===>>> start processing event #7, run #1 7 events processed so far <<<=== @@ -545,7 +599,11 @@ Stream1 DEBUG Added object 9102,"MyHits" Stream1 DEBUG addItemObjects(9102,"PetersHits") called Stream1 DEBUG Key:PetersHits Stream1 DEBUG No object matching 9102,"PetersHits" found +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 8 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 8 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 8 Stream2 DEBUG addItemObjects(2101,"*") called @@ -553,7 +611,11 @@ Stream2 DEBUG Key:* Stream2 DEBUG Added object 2101,"McEventInfo" Stream2 DEBUG addItemObjects(9102,"*") called Stream2 DEBUG Key:* +Stream2 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream2 DEBUG Key:SimpleTag +Stream2 DEBUG Added object 40774348,"SimpleTag" Stream2 DEBUG Collected objects: +Stream2 DEBUG Object/count: AthenaAttributeList_SimpleTag, 8 Stream2 DEBUG Object/count: EventInfo_McEventInfo, 8 AthenaEventLoopMgr INFO ===>>> done processing event #7, run #1 8 events processed so far <<<=== AthenaEventLoopMgr INFO ===>>> start processing event #8, run #1 8 events processed so far <<<=== @@ -573,7 +635,11 @@ Stream1 DEBUG Added object 9102,"MyHits" Stream1 DEBUG addItemObjects(9102,"PetersHits") called Stream1 DEBUG Key:PetersHits Stream1 DEBUG No object matching 9102,"PetersHits" found +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 9 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 9 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 9 Stream2 DEBUG addItemObjects(2101,"*") called @@ -581,7 +647,11 @@ Stream2 DEBUG Key:* Stream2 DEBUG Added object 2101,"McEventInfo" Stream2 DEBUG addItemObjects(9102,"*") called Stream2 DEBUG Key:* +Stream2 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream2 DEBUG Key:SimpleTag +Stream2 DEBUG Added object 40774348,"SimpleTag" Stream2 DEBUG Collected objects: +Stream2 DEBUG Object/count: AthenaAttributeList_SimpleTag, 9 Stream2 DEBUG Object/count: EventInfo_McEventInfo, 9 AthenaEventLoopMgr INFO ===>>> done processing event #8, run #1 9 events processed so far <<<=== AthenaEventLoopMgr INFO ===>>> start processing event #9, run #1 9 events processed so far <<<=== @@ -601,7 +671,11 @@ Stream1 DEBUG Added object 9102,"MyHits" Stream1 DEBUG addItemObjects(9102,"PetersHits") called Stream1 DEBUG Key:PetersHits Stream1 DEBUG No object matching 9102,"PetersHits" found +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 10 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 10 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 10 Stream2 DEBUG addItemObjects(2101,"*") called @@ -609,7 +683,11 @@ Stream2 DEBUG Key:* Stream2 DEBUG Added object 2101,"McEventInfo" Stream2 DEBUG addItemObjects(9102,"*") called Stream2 DEBUG Key:* +Stream2 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream2 DEBUG Key:SimpleTag +Stream2 DEBUG Added object 40774348,"SimpleTag" Stream2 DEBUG Collected objects: +Stream2 DEBUG Object/count: AthenaAttributeList_SimpleTag, 10 Stream2 DEBUG Object/count: EventInfo_McEventInfo, 10 AthenaEventLoopMgr INFO ===>>> done processing event #9, run #1 10 events processed so far <<<=== AthenaEventLoopMgr INFO ===>>> start processing event #10, run #1 10 events processed so far <<<=== @@ -629,7 +707,11 @@ Stream1 DEBUG Added object 9102,"MyHits" Stream1 DEBUG addItemObjects(9102,"PetersHits") called Stream1 DEBUG Key:PetersHits Stream1 DEBUG No object matching 9102,"PetersHits" found +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 11 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 11 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 11 Stream2 DEBUG addItemObjects(2101,"*") called @@ -637,7 +719,11 @@ Stream2 DEBUG Key:* Stream2 DEBUG Added object 2101,"McEventInfo" Stream2 DEBUG addItemObjects(9102,"*") called Stream2 DEBUG Key:* +Stream2 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream2 DEBUG Key:SimpleTag +Stream2 DEBUG Added object 40774348,"SimpleTag" Stream2 DEBUG Collected objects: +Stream2 DEBUG Object/count: AthenaAttributeList_SimpleTag, 11 Stream2 DEBUG Object/count: EventInfo_McEventInfo, 11 AthenaEventLoopMgr INFO ===>>> done processing event #10, run #1 11 events processed so far <<<=== AthenaEventLoopMgr INFO ===>>> start processing event #11, run #1 11 events processed so far <<<=== @@ -657,7 +743,11 @@ Stream1 DEBUG Added object 9102,"MyHits" Stream1 DEBUG addItemObjects(9102,"PetersHits") called Stream1 DEBUG Key:PetersHits Stream1 DEBUG No object matching 9102,"PetersHits" found +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 12 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 12 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 12 Stream2 DEBUG addItemObjects(2101,"*") called @@ -665,7 +755,11 @@ Stream2 DEBUG Key:* Stream2 DEBUG Added object 2101,"McEventInfo" Stream2 DEBUG addItemObjects(9102,"*") called Stream2 DEBUG Key:* +Stream2 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream2 DEBUG Key:SimpleTag +Stream2 DEBUG Added object 40774348,"SimpleTag" Stream2 DEBUG Collected objects: +Stream2 DEBUG Object/count: AthenaAttributeList_SimpleTag, 12 Stream2 DEBUG Object/count: EventInfo_McEventInfo, 12 AthenaEventLoopMgr INFO ===>>> done processing event #11, run #1 12 events processed so far <<<=== AthenaEventLoopMgr INFO ===>>> start processing event #12, run #1 12 events processed so far <<<=== @@ -685,7 +779,11 @@ Stream1 DEBUG Added object 9102,"MyHits" Stream1 DEBUG addItemObjects(9102,"PetersHits") called Stream1 DEBUG Key:PetersHits Stream1 DEBUG No object matching 9102,"PetersHits" found +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 13 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 13 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 13 Stream2 DEBUG addItemObjects(2101,"*") called @@ -693,7 +791,11 @@ Stream2 DEBUG Key:* Stream2 DEBUG Added object 2101,"McEventInfo" Stream2 DEBUG addItemObjects(9102,"*") called Stream2 DEBUG Key:* +Stream2 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream2 DEBUG Key:SimpleTag +Stream2 DEBUG Added object 40774348,"SimpleTag" Stream2 DEBUG Collected objects: +Stream2 DEBUG Object/count: AthenaAttributeList_SimpleTag, 13 Stream2 DEBUG Object/count: EventInfo_McEventInfo, 13 AthenaEventLoopMgr INFO ===>>> done processing event #12, run #1 13 events processed so far <<<=== AthenaEventLoopMgr INFO ===>>> start processing event #13, run #1 13 events processed so far <<<=== @@ -713,7 +815,11 @@ Stream1 DEBUG Added object 9102,"MyHits" Stream1 DEBUG addItemObjects(9102,"PetersHits") called Stream1 DEBUG Key:PetersHits Stream1 DEBUG No object matching 9102,"PetersHits" found +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 14 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 14 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 14 Stream2 DEBUG addItemObjects(2101,"*") called @@ -721,7 +827,11 @@ Stream2 DEBUG Key:* Stream2 DEBUG Added object 2101,"McEventInfo" Stream2 DEBUG addItemObjects(9102,"*") called Stream2 DEBUG Key:* +Stream2 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream2 DEBUG Key:SimpleTag +Stream2 DEBUG Added object 40774348,"SimpleTag" Stream2 DEBUG Collected objects: +Stream2 DEBUG Object/count: AthenaAttributeList_SimpleTag, 14 Stream2 DEBUG Object/count: EventInfo_McEventInfo, 14 AthenaEventLoopMgr INFO ===>>> done processing event #13, run #1 14 events processed so far <<<=== AthenaEventLoopMgr INFO ===>>> start processing event #14, run #1 14 events processed so far <<<=== @@ -741,7 +851,11 @@ Stream1 DEBUG Key:MyHits Stream1 DEBUG Added object 9102,"MyHits" Stream1 DEBUG addItemObjects(9102,"PetersHits") called Stream1 DEBUG Key:PetersHits +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 15 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 15 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 15 Stream2 DEBUG addItemObjects(2101,"*") called @@ -749,7 +863,11 @@ Stream2 DEBUG Key:* Stream2 DEBUG Added object 2101,"McEventInfo" Stream2 DEBUG addItemObjects(9102,"*") called Stream2 DEBUG Key:* +Stream2 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream2 DEBUG Key:SimpleTag +Stream2 DEBUG Added object 40774348,"SimpleTag" Stream2 DEBUG Collected objects: +Stream2 DEBUG Object/count: AthenaAttributeList_SimpleTag, 15 Stream2 DEBUG Object/count: EventInfo_McEventInfo, 15 AthenaEventLoopMgr INFO ===>>> done processing event #14, run #1 15 events processed so far <<<=== AthenaEventLoopMgr INFO ===>>> start processing event #15, run #1 15 events processed so far <<<=== @@ -768,7 +886,11 @@ Stream1 DEBUG Key:MyHits Stream1 DEBUG Added object 9102,"MyHits" Stream1 DEBUG addItemObjects(9102,"PetersHits") called Stream1 DEBUG Key:PetersHits +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 16 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 16 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 16 Stream2 DEBUG addItemObjects(2101,"*") called @@ -776,7 +898,11 @@ Stream2 DEBUG Key:* Stream2 DEBUG Added object 2101,"McEventInfo" Stream2 DEBUG addItemObjects(9102,"*") called Stream2 DEBUG Key:* +Stream2 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream2 DEBUG Key:SimpleTag +Stream2 DEBUG Added object 40774348,"SimpleTag" Stream2 DEBUG Collected objects: +Stream2 DEBUG Object/count: AthenaAttributeList_SimpleTag, 16 Stream2 DEBUG Object/count: EventInfo_McEventInfo, 16 AthenaEventLoopMgr INFO ===>>> done processing event #15, run #1 16 events processed so far <<<=== AthenaEventLoopMgr INFO ===>>> start processing event #16, run #1 16 events processed so far <<<=== @@ -795,7 +921,11 @@ Stream1 DEBUG Key:MyHits Stream1 DEBUG Added object 9102,"MyHits" Stream1 DEBUG addItemObjects(9102,"PetersHits") called Stream1 DEBUG Key:PetersHits +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 17 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 17 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 17 Stream2 DEBUG addItemObjects(2101,"*") called @@ -803,7 +933,11 @@ Stream2 DEBUG Key:* Stream2 DEBUG Added object 2101,"McEventInfo" Stream2 DEBUG addItemObjects(9102,"*") called Stream2 DEBUG Key:* +Stream2 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream2 DEBUG Key:SimpleTag +Stream2 DEBUG Added object 40774348,"SimpleTag" Stream2 DEBUG Collected objects: +Stream2 DEBUG Object/count: AthenaAttributeList_SimpleTag, 17 Stream2 DEBUG Object/count: EventInfo_McEventInfo, 17 AthenaEventLoopMgr INFO ===>>> done processing event #16, run #1 17 events processed so far <<<=== AthenaEventLoopMgr INFO ===>>> start processing event #17, run #1 17 events processed so far <<<=== @@ -822,7 +956,11 @@ Stream1 DEBUG Key:MyHits Stream1 DEBUG Added object 9102,"MyHits" Stream1 DEBUG addItemObjects(9102,"PetersHits") called Stream1 DEBUG Key:PetersHits +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 18 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 18 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 18 Stream2 DEBUG addItemObjects(2101,"*") called @@ -830,7 +968,11 @@ Stream2 DEBUG Key:* Stream2 DEBUG Added object 2101,"McEventInfo" Stream2 DEBUG addItemObjects(9102,"*") called Stream2 DEBUG Key:* +Stream2 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream2 DEBUG Key:SimpleTag +Stream2 DEBUG Added object 40774348,"SimpleTag" Stream2 DEBUG Collected objects: +Stream2 DEBUG Object/count: AthenaAttributeList_SimpleTag, 18 Stream2 DEBUG Object/count: EventInfo_McEventInfo, 18 AthenaEventLoopMgr INFO ===>>> done processing event #17, run #1 18 events processed so far <<<=== AthenaEventLoopMgr INFO ===>>> start processing event #18, run #1 18 events processed so far <<<=== @@ -849,7 +991,11 @@ Stream1 DEBUG Key:MyHits Stream1 DEBUG Added object 9102,"MyHits" Stream1 DEBUG addItemObjects(9102,"PetersHits") called Stream1 DEBUG Key:PetersHits +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 19 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 19 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 19 Stream2 DEBUG addItemObjects(2101,"*") called @@ -857,7 +1003,11 @@ Stream2 DEBUG Key:* Stream2 DEBUG Added object 2101,"McEventInfo" Stream2 DEBUG addItemObjects(9102,"*") called Stream2 DEBUG Key:* +Stream2 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream2 DEBUG Key:SimpleTag +Stream2 DEBUG Added object 40774348,"SimpleTag" Stream2 DEBUG Collected objects: +Stream2 DEBUG Object/count: AthenaAttributeList_SimpleTag, 19 Stream2 DEBUG Object/count: EventInfo_McEventInfo, 19 AthenaEventLoopMgr INFO ===>>> done processing event #18, run #1 19 events processed so far <<<=== AthenaEventLoopMgr INFO ===>>> start processing event #19, run #1 19 events processed so far <<<=== @@ -876,7 +1026,11 @@ Stream1 DEBUG Key:MyHits Stream1 DEBUG Added object 9102,"MyHits" Stream1 DEBUG addItemObjects(9102,"PetersHits") called Stream1 DEBUG Key:PetersHits +Stream1 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream1 DEBUG Key:SimpleTag +Stream1 DEBUG Added object 40774348,"SimpleTag" Stream1 DEBUG Collected objects: +Stream1 DEBUG Object/count: AthenaAttributeList_SimpleTag, 20 Stream1 DEBUG Object/count: EventInfo_McEventInfo, 20 Stream1 DEBUG Object/count: ExampleHitContainer_MyHits, 20 Stream2 DEBUG addItemObjects(2101,"*") called @@ -884,7 +1038,11 @@ Stream2 DEBUG Key:* Stream2 DEBUG Added object 2101,"McEventInfo" Stream2 DEBUG addItemObjects(9102,"*") called Stream2 DEBUG Key:* +Stream2 DEBUG addItemObjects(40774348,"SimpleTag") called +Stream2 DEBUG Key:SimpleTag +Stream2 DEBUG Added object 40774348,"SimpleTag" Stream2 DEBUG Collected objects: +Stream2 DEBUG Object/count: AthenaAttributeList_SimpleTag, 20 Stream2 DEBUG Object/count: EventInfo_McEventInfo, 20 AthenaEventLoopMgr INFO ===>>> done processing event #19, run #1 20 events processed so far <<<=== Stream1 DEBUG AthenaOutputStream Stream1 ::stop() @@ -1039,11 +1197,11 @@ ToolSvc INFO Removing all tools created by ToolSvc *****Chrono***** INFO **************************************************************************************************** *****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) *****Chrono***** INFO **************************************************************************************************** -commitOutput INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 43 -cRep_ALL INFO Time User : Tot= 20 [ms] Ave/Min/Max=0.189(+- 1.36)/ 0/ 10 [ms] #=106 +commitOutput INFO Time User : Tot= 10 [ms] Ave/Min/Max=0.233(+- 1.51)/ 0/ 10 [ms] #= 43 +cRep_ALL INFO Time User : Tot= 30 [ms] Ave/Min/Max=0.205(+- 1.84)/ 0/ 20 [ms] #=146 cRepR_ALL INFO Time User : Tot= 20 [ms] Ave/Min/Max=0.0647(+-0.802)/ 0/ 10 [ms] #=309 -fRep_ALL INFO Time User : Tot= 40 [ms] Ave/Min/Max=0.377(+- 1.91)/ 0/ 10 [ms] #=106 -ChronoStatSvc INFO Time User : Tot= 450 [ms] #= 1 +fRep_ALL INFO Time User : Tot= 30 [ms] Ave/Min/Max=0.205(+- 1.42)/ 0/ 10 [ms] #=146 +ChronoStatSvc INFO Time User : Tot= 0.62 [s] #= 1 *****Chrono***** INFO **************************************************************************************************** ChronoStatSvc.f... INFO Service finalized successfully ApplicationMgr INFO Application Manager Finalized successfully diff --git a/Database/AthenaPOOL/AthenaPoolTools/CMakeLists.txt b/Database/AthenaPOOL/AthenaPoolTools/CMakeLists.txt index 1a7ac3f5f2fae99fd64068e0a693a68fc90f7e7d..f60e79006f0a48939153627768c6fd93331d4516 100644 --- a/Database/AthenaPOOL/AthenaPoolTools/CMakeLists.txt +++ b/Database/AthenaPOOL/AthenaPoolTools/CMakeLists.txt @@ -12,6 +12,7 @@ atlas_depends_on_subdirs( PRIVATE Control/StoreGate Database/PersistentDataModel Event/EventInfo + Event/ByteStreamData Event/xAOD/xAODEventInfo Event/xAOD/xAODCutFlow GaudiKernel @@ -24,7 +25,7 @@ atlas_add_component( AthenaPoolTools src/BookkeeperDumper.cxx src/RequireUniqueEvent.cxx src/components/*.cxx - LINK_LIBRARIES AthenaBaseComps AthenaKernel StoreGateLib SGtests PersistentDataModel EventInfo xAODEventInfo GaudiKernel xAODCutFlow) + LINK_LIBRARIES AthenaBaseComps AthenaKernel StoreGateLib SGtests PersistentDataModel EventInfo xAODEventInfo GaudiKernel xAODCutFlow ByteStreamData) # Install files from the package: atlas_install_joboptions( share/*.py ) diff --git a/Database/AthenaPOOL/AthenaPoolTools/share/MetadataTest_jobOptions.py b/Database/AthenaPOOL/AthenaPoolTools/share/MetadataTest_jobOptions.py index f795f05fbead9b1fc0ebb9dc2d6e95023e36cd3d..d1c4938c3ddeb78e1b71608e6e84d87e4bf81138 100755 --- a/Database/AthenaPOOL/AthenaPoolTools/share/MetadataTest_jobOptions.py +++ b/Database/AthenaPOOL/AthenaPoolTools/share/MetadataTest_jobOptions.py @@ -15,7 +15,10 @@ svcMgr += ClassIDSvc() from AthenaCommon.Constants import INFO from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() +from AthenaCommon.AlgSequence import AthSequencer +athOutSeq = AthSequencer("AthOutSeq") +# include MetaDataSvc and initialize properties include("EventSelectorAthenaPool/MetaDataSvc_jobOptions.py") from AthenaServices.AthenaServicesConf import MetaDataSvc svcMgr += MetaDataSvc() @@ -23,15 +26,48 @@ svcMgr.MetaDataSvc.OutputLevel = 2 svcMgr.MetaDataSvc.MetaDataContainer = "MetaDataHdr" svcMgr.ProxyProviderSvc.ProviderNames += [ "MetaDataSvc" ] +# include some tools +from EventBookkeeperTools.CutFlowHelpers import CreateBookkeeperTool +CreateBookkeeperTool() + +from ByteStreamCnvSvc.ByteStreamCnvSvcConf import ByteStreamMetadataTool +svcMgr.MetaDataSvc.MetaDataTools += [ "ByteStreamMetadataTool" ] + +#print "SGInputLoader init" +#from SGComps.SGCompsConf import SGInputLoader +#sgin = SGInputLoader() +#sgin.Load = [('EventInfo','ByteStreamEventInfo')] + +# Tell it that there is data in the input file from IOVSvc.IOVSvcConf import MetaInputLoader metain = MetaInputLoader() metain.Dump = True -metain.OutputLevel = DEBUG -metain.Load = [('EventStreamInfo','StreamAOD'),('xAOD::CutBookkeeperContainer','CutBookkeepers'),('xAOD::CutBookkeeperAuxContainer','CutBookkeepersAux.')] +metain.OutputLevel = INFO +metain.Load = [('EventStreamInfo','StreamAOD'),('xAOD::CutBookkeeperContainer','CutBookkeepers'),('xAOD::CutBookkeeperAuxContainer','CutBookkeepersAux.'),('ByteStreamMetadataContainer','ByteStreamMetadata'),('xAOD::CutBookkeeperContainer','IncompleteCutBookkeepers'),('xAOD::CutBookkeeperAuxContainer','IncompleteCutBookkeepersAux.')] topSequence += metain +include ("AthenaPoolTools/EventCount_jobOptions.py") + from AthenaPoolTools.AthenaPoolToolsConf import MetadataTest -topSequence += MetadataTest( OutputLevel = INFO ) +topSequence += MetadataTest( OutputLevel = INFO, InputStream="StreamAOD" ) + +import PyUtils.AthFile as af +from EventBookkeeperTools.CutFlowHelpers import CreateCutFlowSvc +CreateCutFlowSvc( svcName="CutFlowSvc", athFile=af, seq=topSequence, addMetaDataToAllOutputFiles=False ) + +import AthenaPoolCnvSvc.WriteAthenaPool + +from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream +DataStream = AthenaPoolOutputStream( "StreamTest" , "MetadataTest.root", True, noTag=True ) +DataStream.TakeItemsFromInput = True +DataStream.ItemList += ["EventInfo#ByteStreamEventInfo"] +DataStream.MetadataItemList += ["xAOD::CutBookkeeperContainer#CutBookkeepers"] +DataStream.MetadataItemList += ["xAOD::CutBookkeeperAuxContainer#CutBookkeepersAux."] +DataStream.MetadataItemList += ["xAOD::CutBookkeeperContainer#IncompleteCutBookkeepers"] +DataStream.MetadataItemList += ["xAOD::CutBookkeeperAuxContainer#IncompleteCutBookkeepersAux."] +DataStream.MetadataItemList += ["ByteStreamMetadataContainer#ByteStreamMetadata"] +DataStream.OutputLevel = DEBUG + #============================================================== # # End of job options file diff --git a/Database/AthenaPOOL/AthenaPoolTools/src/MetadataTest.cxx b/Database/AthenaPOOL/AthenaPoolTools/src/MetadataTest.cxx index 45f6b6c77124947b1ed6ca2094a30404984157ee..61f356ea1cf0b656e37ddacb62145474ba635931 100755 --- a/Database/AthenaPOOL/AthenaPoolTools/src/MetadataTest.cxx +++ b/Database/AthenaPOOL/AthenaPoolTools/src/MetadataTest.cxx @@ -13,6 +13,7 @@ #include "StoreGate/ReadMetaHandle.h" #include "xAODCutFlow/CutBookkeeperContainer.h" +#include "ByteStreamData/ByteStreamMetadata.h" #include "StoreGate/StoreGateSvc.h" @@ -21,10 +22,15 @@ MetadataTest::MetadataTest(const std::string& name, ISvcLocator* pSvcLocator) : AthAlgorithm(name, pSvcLocator), m_hkey("CutBookkeepers","MetaDataStore"), + m_hinckey("IncompleteCutBookkeepers","MetaDataStore"), m_eihkey("StreamAOD","MetaDataStore"), - //m_eihkey2("DataStream","MetaDataStore"), - m_esidone(false) + m_bshkey("ByteStreamMetadata","MetaDataStore"), + m_esidone(false), + m_inputstream("StreamAOD") { + declareProperty("InputStream", + m_inputstream = "StreamAOD", + "Key to read EventStreamInfo."); } MetadataTest::~MetadataTest() @@ -33,9 +39,11 @@ MetadataTest::~MetadataTest() StatusCode MetadataTest::start() { // Get proper dbkey. + m_eihkey = SG::ReadMetaHandleKey<EventStreamInfo>(m_inputstream,"MetaDataStore"); ATH_CHECK( m_hkey.initialize() ); + ATH_CHECK( m_hinckey.initialize() ); ATH_CHECK( m_eihkey.initialize() ); - //ATH_CHECK( m_eihkey2.initialize() ); + ATH_CHECK( m_bshkey.initialize() ); m_esidone = false; return StatusCode::SUCCESS; } @@ -43,15 +51,10 @@ StatusCode MetadataTest::start() StatusCode MetadataTest::execute() { ATH_MSG_DEBUG ( "in execute()" ); - - const DataHeader* thisDH = nullptr; - ATH_CHECK( evtStore()->retrieve(thisDH, "EventSelector") ); - std::string sid = thisDH->begin()->getToken()->dbID().toString(); if (!m_esidone) { - //m_hkey.setDbKey(sid); - SG::ReadMetaHandleKey<xAOD::CutBookkeeperContainer> readkey(m_hkey.key(),sid); - ATH_CHECK(readkey.initialize()); - SG::ReadMetaHandle<xAOD::CutBookkeeperContainer> readhand(readkey,this->getContext()); + ATH_MSG_INFO("== CUTBOOKKEEPERCONTAINER CHECKS =="); + // create handle, get pointer to object + SG::ReadMetaHandle<xAOD::CutBookkeeperContainer> readhand(m_hkey,this->getContext()); const xAOD::CutBookkeeperContainer* cbkCont(*readhand); if (cbkCont != nullptr) { ATH_MSG_INFO("Found cbk size " << cbkCont->size()); @@ -61,8 +64,20 @@ StatusCode MetadataTest::execute() } else { ATH_MSG_ERROR("Did not retrieve CutBookkeeperContainer from store"); } + // create handle, get pointer to object + SG::ReadMetaHandle<xAOD::CutBookkeeperContainer> increadhand(m_hinckey,this->getContext()); + const xAOD::CutBookkeeperContainer* inccbkCont(*increadhand); + if (inccbkCont != nullptr) { + ATH_MSG_INFO("Found inc cbk size " << inccbkCont->size()); + for (auto it = inccbkCont->begin(); it != inccbkCont->end(); ++it) { + ATH_MSG_INFO("Name: " <<(*it)->name() << ", N=" << (*it)->nAcceptedEvents()); + } + } else { + ATH_MSG_ERROR("Did not retrieve inc CutBookkeeperContainer from store"); + } - m_eihkey.setDbKey(sid); + ATH_MSG_INFO("== EVENTSTREAMINFO CHECKS =="); + // create handle, get pointer to object SG::ReadMetaHandle<EventStreamInfo> eikey(m_eihkey,this->getContext()); const EventStreamInfo* esi(*eikey); if (esi!=nullptr) { @@ -70,16 +85,20 @@ StatusCode MetadataTest::execute() } else { ATH_MSG_ERROR("Did not retrieve EventStreamInfo " << m_eihkey.objKey()); } -/* - m_eihkey2.setDbKey(sid); - SG::ReadMetaHandle<EventStreamInfo> eikey2(m_eihkey2,this->getContext()); - const EventStreamInfo* esi2(*eikey2); - if (esi2!=nullptr) { - ATH_MSG_INFO(" esi has n events = " << esi2->getNumberOfEvents()); + + ATH_MSG_INFO("== BYTESTREAMMETADATACONTAINER CHECKS =="); + // create handle, get pointer to object + SG::ReadMetaHandle<ByteStreamMetadataContainer> bskey(m_bshkey,this->getContext()); + const ByteStreamMetadataContainer* bsmc(*bskey); + if (bsmc!=nullptr) { + ATH_MSG_INFO("ByteStreamMetadataContainer size " << bsmc->size()); + for (auto it = bsmc->begin(); it != bsmc->end(); ++it) { + ATH_MSG_INFO("Run="<<(*it)->getRunNumber()<<" E="<<(*it)->getBeamEnergy()<<" s="<<(*it)->getStream()); + } } else { - ATH_MSG_ERROR("Did not retrieve EventStreamInfo " << m_eihkey2.objKey()); + ATH_MSG_ERROR("Did not find ByteStreamMetadataContainer"); } -*/ + m_esidone=true; } diff --git a/Database/AthenaPOOL/AthenaPoolTools/src/MetadataTest.h b/Database/AthenaPOOL/AthenaPoolTools/src/MetadataTest.h index e609a14f02089c01f3e0ce68fc7b2e0a154af7c3..536ce36a6bfc5210cab2bfddc1095fc00aa4cc3b 100755 --- a/Database/AthenaPOOL/AthenaPoolTools/src/MetadataTest.h +++ b/Database/AthenaPOOL/AthenaPoolTools/src/MetadataTest.h @@ -26,6 +26,7 @@ #include "StoreGate/ReadMetaHandleKey.h" #include "xAODCutFlow/CutBookkeeperContainer.h" #include "EventInfo/EventStreamInfo.h" +#include "ByteStreamData/ByteStreamMetadataContainer.h" class MetadataTest : public AthAlgorithm { public: @@ -40,11 +41,12 @@ public: private: SG::ReadMetaHandleKey<xAOD::CutBookkeeperContainer> m_hkey; + SG::ReadMetaHandleKey<xAOD::CutBookkeeperContainer> m_hinckey; SG::ReadMetaHandleKey<EventStreamInfo> m_eihkey; - //SG::ReadMetaHandleKey<EventStreamInfo> m_eihkey2; + SG::ReadMetaHandleKey<ByteStreamMetadataContainer> m_bshkey; bool m_esidone; - + std::string m_inputstream; }; #endif diff --git a/Database/AthenaPOOL/AthenaPoolUtilities/AthenaPoolUtilities/ATLAS_CHECK_THREAD_SAFETY b/Database/AthenaPOOL/AthenaPoolUtilities/AthenaPoolUtilities/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..6b505768ae81e48ff92eac8e51fc4260af273da2 --- /dev/null +++ b/Database/AthenaPOOL/AthenaPoolUtilities/AthenaPoolUtilities/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Database/AthenaPOOL/AthenaPoolUtilities diff --git a/Database/AthenaPOOL/AthenaPoolUtilities/AthenaPoolUtilities/AthenaAttrListAddress.h b/Database/AthenaPOOL/AthenaPoolUtilities/AthenaPoolUtilities/AthenaAttrListAddress.h index 405caf64752534439c88b7d92850cd7c870aea8f..78886fe1defd90acc5981bf58d11f91439eb9896 100644 --- a/Database/AthenaPOOL/AthenaPoolUtilities/AthenaPoolUtilities/AthenaAttrListAddress.h +++ b/Database/AthenaPOOL/AthenaPoolUtilities/AthenaPoolUtilities/AthenaAttrListAddress.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef ATHENAPOOLCNVSVC_ATHENAATTRLISTADDRESS_H @@ -48,7 +48,7 @@ public: AthenaAttrListAddress& operator= (const AthenaAttrListAddress& copy) = delete; /// Access to AttributeList - AthenaAttributeList* attrList () const; + AthenaAttributeList* attrList (); /// Add AttributeList void setAttrList (AthenaAttributeList* attrList); @@ -107,7 +107,7 @@ AthenaAttrListAddress::~AthenaAttrListAddress() inline AthenaAttributeList* -AthenaAttrListAddress::attrList () const +AthenaAttrListAddress::attrList () { return m_attrList; } diff --git a/Database/AthenaPOOL/AthenaPoolUtilities/AthenaPoolUtilities/AthenaAttributeListSpecification.h b/Database/AthenaPOOL/AthenaPoolUtilities/AthenaPoolUtilities/AthenaAttributeListSpecification.h index 35048d442f40fee169e2bcb24ba72d7fd6db4fef..e02cb31a7a5bb04cddae7f02c73b467c31817c49 100644 --- a/Database/AthenaPOOL/AthenaPoolUtilities/AthenaPoolUtilities/AthenaAttributeListSpecification.h +++ b/Database/AthenaPOOL/AthenaPoolUtilities/AthenaPoolUtilities/AthenaAttributeListSpecification.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef ATHENAPOOLUTILITIES_ATHENAATTRIBUTELISTSPECIFICATION_H @@ -12,6 +12,7 @@ #include <vector> #include <map> #include <set> +#include <atomic> #include "CoralBase/AttributeSpecification.h" #include "CoralBase/AttributeListException.h" #include "CoralBase/AttributeListSpecification.h" @@ -131,7 +132,7 @@ protected: private: /// The reference counter - mutable int m_counter; + mutable std::atomic<int> m_counter; /// The specifications std::vector< AthenaAttributeSpecification* > m_attributeSpecifications; @@ -286,8 +287,7 @@ AthenaAttributeListSpecification::release() const //std::cerr << "Before decrement " << std::endl; //std::cerr << "AthenaAttributeListSpecification release called " // << "with counter = " << m_counter << std::endl; - --m_counter; - if ( m_counter == 0 ) delete this; + if (--m_counter == 0) delete this; } inline void diff --git a/Database/AthenaPOOL/AthenaPoolUtilities/AthenaPoolUtilities/CondAttrListCollAddress.h b/Database/AthenaPOOL/AthenaPoolUtilities/AthenaPoolUtilities/CondAttrListCollAddress.h index 643b99ecbb035402e8f78d76b2d18aa9583cdeb8..76c180e602296fadff1967af5c9e704065e5d56b 100644 --- a/Database/AthenaPOOL/AthenaPoolUtilities/AthenaPoolUtilities/CondAttrListCollAddress.h +++ b/Database/AthenaPOOL/AthenaPoolUtilities/AthenaPoolUtilities/CondAttrListCollAddress.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef ATHENAPOOLCNVSVC_CONDATTRLISTCOLLADDRESS_H @@ -47,7 +47,7 @@ public: virtual ~CondAttrListCollAddress(); /// Access to AttributeList - CondAttrListCollection* attrListColl () const; + CondAttrListCollection* attrListColl (); /// Add AttributeList void setAttrListColl (CondAttrListCollection* attrListColl); @@ -117,7 +117,7 @@ CondAttrListCollAddress::~CondAttrListCollAddress() } inline CondAttrListCollection* -CondAttrListCollAddress::attrListColl () const +CondAttrListCollAddress::attrListColl () { return m_attrListColl; } diff --git a/Database/AthenaPOOL/AthenaPoolUtilities/AthenaPoolUtilities/CondAttrListCollection.h b/Database/AthenaPOOL/AthenaPoolUtilities/AthenaPoolUtilities/CondAttrListCollection.h index 35fb3bf3620dcc98a3ebc26651f1ce7b66fc6642..8f773de733a8f9b62f293ca267dc6723ec0b6d8f 100644 --- a/Database/AthenaPOOL/AthenaPoolUtilities/AthenaPoolUtilities/CondAttrListCollection.h +++ b/Database/AthenaPOOL/AthenaPoolUtilities/AthenaPoolUtilities/CondAttrListCollection.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /** @@ -399,7 +399,7 @@ CondAttrListCollection::attributeList(ChanNum chanNum) const if (itr!=m_attrMap.end()) { return itr->second; } else { - static AttributeList attr; + static const AttributeList attr; return attr; } } @@ -423,7 +423,7 @@ inline const std::string& CondAttrListCollection::chanName(ChanNum chanNum) cons if (itr!=m_nameMap.end()) { return itr->second; } else { - static std::string name; + static const std::string name; return name; } } diff --git a/Database/AthenaPOOL/AthenaPoolUtilities/AthenaPoolUtilities/CondAttrListVec.h b/Database/AthenaPOOL/AthenaPoolUtilities/AthenaPoolUtilities/CondAttrListVec.h index bfd2a1af1864e5a32ac81cc8e85e0cd51a77c123..7975d18d9de3d95911b9ad54384ff152c3d829bf 100644 --- a/Database/AthenaPOOL/AthenaPoolUtilities/AthenaPoolUtilities/CondAttrListVec.h +++ b/Database/AthenaPOOL/AthenaPoolUtilities/AthenaPoolUtilities/CondAttrListVec.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /** @@ -25,6 +25,7 @@ #include "CoralBase/AttributeListSpecification.h" #include "AthenaKernel/IOVRange.h" #include "AthenaKernel/CLASS_DEF.h" +#include "CxxUtils/CachedValue.h" #include "GaudiKernel/DataObject.h" class CondAttrListVec : public DataObject @@ -41,6 +42,12 @@ class CondAttrListVec : public DataObject typedef std::map<unsigned int, std::vector<const coral::AttributeList*> > AttrListCVMap; + struct Index + { + AttrListCVMap m_indexchanvec; + std::vector<unsigned int> m_indexchan; + }; + // constructor with specification of type of time: run/event or timestamp CondAttrListVec(bool runevent); // constructor with specification of type and initial size @@ -106,13 +113,11 @@ class CondAttrListVec : public DataObject IOVRange m_minrange; bool m_uniqueiov; bool m_runevent; - mutable bool m_indexed; coral::AttributeListSpecification* m_spec; // indexing variables - mutable AttrListCVMap m_indexchanvec; - mutable std::vector<unsigned int> m_indexchan; + CxxUtils::CachedValue<Index> m_index; - void makeIndex() const; + const Index& index() const; }; CLASS_DEF( CondAttrListVec , 55403898 , 1) @@ -123,7 +128,7 @@ CONDCONT_DEF( CondAttrListVec, 74272308 ); inline CondAttrListVec::CondAttrListVec(bool runevent) : m_minrange(IOVRange(IOVTime(IOVTime::MINRUN, IOVTime::MINEVENT), IOVTime(IOVTime::MAXRUN, IOVTime::MAXEVENT))), - m_uniqueiov(true),m_runevent(runevent),m_indexed(false),m_spec(0) { + m_uniqueiov(true),m_runevent(runevent),m_spec(0) { if (!runevent) m_minrange=IOVRange(IOVTime(IOVTime::MINTIMESTAMP), IOVTime(IOVTime::MAXTIMESTAMP)); } @@ -131,7 +136,7 @@ inline CondAttrListVec::CondAttrListVec(bool runevent) : inline CondAttrListVec::CondAttrListVec(bool runevent, size_type nelm) : m_minrange(IOVRange(IOVTime(IOVTime::MINRUN, IOVTime::MINEVENT), IOVTime(IOVTime::MAXRUN, IOVTime::MAXEVENT))), - m_uniqueiov(true),m_runevent(runevent),m_indexed(false),m_spec(0) { + m_uniqueiov(true),m_runevent(runevent),m_spec(0) { if (!runevent) m_minrange=IOVRange(IOVTime(IOVTime::MINTIMESTAMP), IOVTime(IOVTime::MAXTIMESTAMP)); m_data.reserve(nelm); @@ -147,7 +152,7 @@ inline CondAttrListVec::CondAttrListVec(const CondAttrListVec& rhs) : m_iovmap(rhs.m_iovmap), m_minrange(rhs.m_minrange), m_uniqueiov(rhs.m_uniqueiov), - m_runevent(rhs.m_runevent),m_indexed(false), + m_runevent(rhs.m_runevent), m_spec(0) { // members with normal semantics setup in initialisation list @@ -236,7 +241,7 @@ inline void CondAttrListVec::add(const IOVRange& range, const unsigned int chan, AttrListDataIter data_begin, AttrListDataIter data_end) { //invalidate index - m_indexed=false; + m_index.reset(); // set minimum range correctly IOVTime start=m_minrange.start(); if (m_minrange.start()<range.start()) start=range.start(); @@ -265,7 +270,7 @@ inline void CondAttrListVec::addSlice(const IOVRange& range, const std::vector<coral::AttributeList>& data, const unsigned int datastart,const unsigned int dataend) { // invalidate index - m_indexed=false; + m_index.reset(); // set minimum range correctly IOVTime start=m_minrange.start(); if (m_minrange.start()<range.start()) start=range.start(); @@ -296,41 +301,51 @@ inline void CondAttrListVec::addNewStop(const IOVTime& stop) { } inline const std::vector<unsigned int>& CondAttrListVec::channelIDs() const { - makeIndex(); - return m_indexchan; + return index().m_indexchan; } inline bool CondAttrListVec::hasChannel(const int chan) const { - return (m_indexchanvec.find(chan)!=m_indexchanvec.end()); + const AttrListCVMap& m = index().m_indexchanvec; + return (m.find(chan)!=m.end()); } inline const std::vector<const coral::AttributeList*>& - CondAttrListVec::attrListVec(const int chan) const { - makeIndex(); - return m_indexchanvec[chan]; +CondAttrListVec::attrListVec(const int chan) const +{ + const AttrListCVMap& m = index().m_indexchanvec; + AttrListCVMap::const_iterator it = m.find (chan); + if (it != m.end()) { + return it->second; + } + static const std::vector<const coral::AttributeList*> dum; + return dum; } -inline void CondAttrListVec::makeIndex() const { - // check if already indexed - if (m_indexed) return; - m_indexchanvec.clear(); - m_indexchan.clear(); - // loop over all the elements, build vector of AttributeList for each channel - // and a vector of all the channels - for (const_iterator citr=m_data.begin();citr!=m_data.end();++citr) { - unsigned int chan=citr->first; - AttrListCVMap::iterator clist=m_indexchanvec.find(chan); - if (clist==m_indexchanvec.end()) { - // channel not seen before, create a new entry in map and vector - std::pair<AttrListCVMap::iterator,bool> res= - m_indexchanvec.insert(AttrListCVMap::value_type(chan, - std::vector<const coral::AttributeList*>())); - clist=res.first; - m_indexchan.push_back(chan); +inline +const CondAttrListVec::Index& CondAttrListVec::index() const +{ + if (!m_index.isValid()) { + Index index; + + // loop over all the elements, build vector of AttributeList for each channel + // and a vector of all the channels + for (const AttrListPair& p : m_data) { + unsigned int chan=p.first; + AttrListCVMap::iterator clist=index.m_indexchanvec.find(chan); + if (clist==index.m_indexchanvec.end()) { + // channel not seen before, create a new entry in map and vector + std::pair<AttrListCVMap::iterator,bool> res= + index.m_indexchanvec.insert(AttrListCVMap::value_type(chan, + std::vector<const coral::AttributeList*>())); + clist=res.first; + index.m_indexchan.push_back(chan); + } + clist->second.push_back(&(p.second)); } - clist->second.push_back(&(citr->second)); + + m_index.set (std::move (index)); } - m_indexed=true; + return *m_index.ptr(); } #endif // DBDATAOBJECTS_CONDATTRLISTVEC_H diff --git a/Database/AthenaPOOL/AthenaPoolUtilities/AthenaPoolUtilities/CondAttrListVecAddress.h b/Database/AthenaPOOL/AthenaPoolUtilities/AthenaPoolUtilities/CondAttrListVecAddress.h index a7fda864effce93deaf0b8704df8b2e838ac08d1..4a25774ba015c70d96d04bd14a98780a9d3d9cb6 100644 --- a/Database/AthenaPOOL/AthenaPoolUtilities/AthenaPoolUtilities/CondAttrListVecAddress.h +++ b/Database/AthenaPOOL/AthenaPoolUtilities/AthenaPoolUtilities/CondAttrListVecAddress.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef ATHENAPOOLCNVSVC_CONDATTRLISTVECADDRESS_H @@ -46,7 +46,7 @@ public: virtual ~CondAttrListVecAddress(); /// Access to CondAttrListVec - CondAttrListVec* attrListVec () const; + CondAttrListVec* attrListVec (); /// Add CondAttrListVec void setAttrListVec (CondAttrListVec* attrListVec); @@ -117,7 +117,7 @@ CondAttrListVecAddress::~CondAttrListVecAddress() } inline CondAttrListVec* -CondAttrListVecAddress::attrListVec () const +CondAttrListVecAddress::attrListVec () { return m_attrListVec; } diff --git a/Database/AthenaPOOL/AthenaPoolUtilities/CMakeLists.txt b/Database/AthenaPOOL/AthenaPoolUtilities/CMakeLists.txt index 7a9ef3c51385b80f81b2c9b6e768bff7d81277b4..398e6dfc62585c30028ee8768e67c5a28a2909d2 100644 --- a/Database/AthenaPOOL/AthenaPoolUtilities/CMakeLists.txt +++ b/Database/AthenaPOOL/AthenaPoolUtilities/CMakeLists.txt @@ -11,6 +11,7 @@ atlas_depends_on_subdirs( PUBLIC Control/AthenaKernel Control/AthContainers + Control/CxxUtils Database/AthenaPOOL/DBDataModel Database/PersistentDataModel ) diff --git a/Database/AthenaPOOL/AtlasCollectionTools/CMakeLists.txt b/Database/AthenaPOOL/AtlasCollectionTools/CMakeLists.txt index 1d3ec8d5be61a901f6bd1745684fe61c5393d070..5a90092bfdd48fbc082d0d24c77f0fd5f7d680d4 100644 --- a/Database/AthenaPOOL/AtlasCollectionTools/CMakeLists.txt +++ b/Database/AthenaPOOL/AtlasCollectionTools/CMakeLists.txt @@ -14,6 +14,9 @@ atlas_depends_on_subdirs( PRIVATE Database/APR/StorageSvc TestPolicy ) +# Necessary external(s): +find_package( cx_Oracle ) + # Component(s) in the package: atlas_add_library( AtlasCollectionTools src/LumiMetaHandler.cxx diff --git a/Database/AthenaPOOL/OutputStreamAthenaPool/python/OutputStreamAthenaPool.py b/Database/AthenaPOOL/OutputStreamAthenaPool/python/OutputStreamAthenaPool.py index abf32aa5a120f31a1040c01edd8a10966c9c4ebc..c78bf49efe3ee339682a81e8757a2732321d8616 100644 --- a/Database/AthenaPOOL/OutputStreamAthenaPool/python/OutputStreamAthenaPool.py +++ b/Database/AthenaPOOL/OutputStreamAthenaPool/python/OutputStreamAthenaPool.py @@ -11,7 +11,7 @@ from AthenaCommon.AppMgr import ServiceMgr as svcMgr from AthenaServices.AthenaServicesConf import AthenaOutputStream from AthenaServices.AthenaServicesConf import AthenaOutputStreamTool -def createOutputStream( streamName, fileName = "", asAlg = False, noTag = True ): +def createOutputStream( streamName, fileName = "", asAlg = False, noTag = False ): # define athena output stream writingTool = AthenaOutputStreamTool( streamName + "Tool" ) outputStream = AthenaOutputStream( diff --git a/Database/AthenaPOOL/OutputStreamAthenaPool/src/CopyEventStreamInfo.cxx b/Database/AthenaPOOL/OutputStreamAthenaPool/src/CopyEventStreamInfo.cxx index c4ff3c32725f7855ff4b651cbd963bc6d040ea78..a966b65e1692e7516940a367a3fbcd46cf00636b 100644 --- a/Database/AthenaPOOL/OutputStreamAthenaPool/src/CopyEventStreamInfo.cxx +++ b/Database/AthenaPOOL/OutputStreamAthenaPool/src/CopyEventStreamInfo.cxx @@ -10,188 +10,48 @@ #include "CopyEventStreamInfo.h" -#include "GaudiKernel/FileIncident.h" - -#include "EventInfo/EventStreamInfo.h" -#include "StoreGate/StoreGateSvc.h" //___________________________________________________________________________ CopyEventStreamInfo::CopyEventStreamInfo(const std::string& type, - const std::string& name, - const IInterface* parent) : ::AthAlgTool(type, name, parent), - m_metaDataStore("StoreGateSvc/MetaDataStore", name), - m_inputMetaDataStore("StoreGateSvc/InputMetaDataStore", name) { - // Declare IMetaDataTool interface - declareInterface<IMetaDataTool>(this); - - // Declare the properties - declareProperty("Key", m_key = std::string()); + const std::string& name, + const IInterface* parent) + : GenericMetadataToolNoAux <EventStreamInfo>(type, name, parent) +{ } //___________________________________________________________________________ CopyEventStreamInfo::~CopyEventStreamInfo() { } -//___________________________________________________________________________ -StatusCode CopyEventStreamInfo::initialize() { - ATH_MSG_INFO("Initializing " << name() << " - package version " << PACKAGE_VERSION); - // Locate the MetaDataStore and InputMetaDataStore - if (!m_metaDataStore.retrieve().isSuccess()) { - ATH_MSG_FATAL("Could not find MetaDataStore"); - return(StatusCode::FAILURE); + + +StatusCode CopyEventStreamInfo::updateContainer( + EventStreamInfo* evtStrInfo_out, + const EventStreamInfo* evtStrInfo_in ) +{ + evtStrInfo_out->addEvent(evtStrInfo_in->getNumberOfEvents()); + for (auto elem = evtStrInfo_in->getRunNumbers().begin(), + lastElem = evtStrInfo_in->getRunNumbers().end(); + elem != lastElem; elem++) { + evtStrInfo_out->insertRunNumber(*elem); } - if (!m_inputMetaDataStore.retrieve().isSuccess()) { - ATH_MSG_FATAL("Could not find InputMetaDataStore"); - return(StatusCode::FAILURE); + for (auto elem = evtStrInfo_in->getLumiBlockNumbers().begin(), + lastElem = evtStrInfo_in->getLumiBlockNumbers().end(); + elem != lastElem; elem++) { + evtStrInfo_out->insertLumiBlockNumber(*elem); } - // Set to be listener for end of event - /* - ServiceHandle<IIncidentSvc> incSvc("IncidentSvc", this->name()); - if (incSvc.retrieve().isFailure()) { - ATH_MSG_FATAL("Unable to get the IncidentSvc"); - return(StatusCode::FAILURE); + for (auto elem = evtStrInfo_in->getProcessingTags().begin(), + lastElem = evtStrInfo_in->getProcessingTags().end(); + elem != lastElem; elem++) { + evtStrInfo_out->insertProcessingTag(*elem); } - incSvc->addListener(this, "BeginInputFile", 60); // pri has to be < 100 to be after MetaDataSvc. - */ - return(StatusCode::SUCCESS); -} -//___________________________________________________________________________ -StatusCode CopyEventStreamInfo::finalize() { - ATH_MSG_DEBUG("in finalize()"); - // release the MetaDataStore and InputMetaDataStore - if (!m_metaDataStore.release().isSuccess()) { - ATH_MSG_WARNING("Could not release MetaDataStore"); + for (auto elem = evtStrInfo_in->getItemList().begin(), + lastElem = evtStrInfo_in->getItemList().end(); + elem != lastElem; elem++) { + evtStrInfo_out->insertItemList((*elem).first, (*elem).second); } - if (!m_inputMetaDataStore.release().isSuccess()) { - ATH_MSG_WARNING("Could not release InputMetaDataStore"); + for (auto elem = evtStrInfo_in->getEventTypes().begin(), + lastElem = evtStrInfo_in->getEventTypes().end(); + elem != lastElem; elem++) { + evtStrInfo_out->insertEventType(*elem); } return(StatusCode::SUCCESS); } - - -StatusCode CopyEventStreamInfo::beginInputFile(const SG::SourceID&) -{ - if (m_inputMetaDataStore->contains<EventStreamInfo>(m_key)) { - std::list<SG::ObjectWithVersion<EventStreamInfo> > allVersions; - if (!m_inputMetaDataStore->retrieveAllVersions(allVersions, m_key).isSuccess()) { - ATH_MSG_ERROR("Could not retrieve all versions for EventStreamInfo"); - return StatusCode::FAILURE; - } - EventStreamInfo* evtStrInfo_out = 0; - for (SG::ObjectWithVersion<EventStreamInfo>& obj : allVersions) { - const EventStreamInfo* evtStrInfo_in = obj.dataObject.cptr(); - if (!m_metaDataStore->contains<EventStreamInfo>(m_key)) { - evtStrInfo_out = new EventStreamInfo(*evtStrInfo_in); - if (!m_metaDataStore->record(evtStrInfo_out, m_key).isSuccess()) { - ATH_MSG_ERROR("Could not record DataObject: " << m_key); - return StatusCode::FAILURE; - } - } else { - if (!m_metaDataStore->retrieve(evtStrInfo_out, m_key).isSuccess()) { - ATH_MSG_ERROR("Could not find DataObject in output: " << m_key); - return StatusCode::FAILURE; - } - evtStrInfo_out->addEvent(evtStrInfo_in->getNumberOfEvents()); - for (auto elem = evtStrInfo_in->getRunNumbers().begin(), - lastElem = evtStrInfo_in->getRunNumbers().end(); - elem != lastElem; elem++) { - evtStrInfo_out->insertRunNumber(*elem); - } - for (auto elem = evtStrInfo_in->getLumiBlockNumbers().begin(), - lastElem = evtStrInfo_in->getLumiBlockNumbers().end(); - elem != lastElem; elem++) { - evtStrInfo_out->insertLumiBlockNumber(*elem); - } - for (auto elem = evtStrInfo_in->getProcessingTags().begin(), - lastElem = evtStrInfo_in->getProcessingTags().end(); - elem != lastElem; elem++) { - evtStrInfo_out->insertProcessingTag(*elem); - } - for (auto elem = evtStrInfo_in->getItemList().begin(), - lastElem = evtStrInfo_in->getItemList().end(); - elem != lastElem; elem++) { - evtStrInfo_out->insertItemList((*elem).first, (*elem).second); - } - for (auto elem = evtStrInfo_in->getEventTypes().begin(), - lastElem = evtStrInfo_in->getEventTypes().end(); - elem != lastElem; elem++) { - evtStrInfo_out->insertEventType(*elem); - } - } - } - } - return(StatusCode::SUCCESS); -} -StatusCode CopyEventStreamInfo::endInputFile(const SG::SourceID&) -{ - return(StatusCode::SUCCESS); -} -StatusCode CopyEventStreamInfo::metaDataStop(const SG::SourceID&) -{ - return(StatusCode::SUCCESS); -} -//___________________________________________________________________________ -/* -void CopyEventStreamInfo::handle(const Incident& inc) { - ATH_MSG_DEBUG("handle() " << inc.type()); - if (inc.type() == "BeginInputFile") { - std::vector<std::string> keys; - if (m_key.value().empty()) { - m_inputMetaDataStore->keys<EventStreamInfo>(keys); - } else { - keys.push_back(m_key); - } - for (const auto &key : keys) { - // Ignore versioned container - if (key.substr(0, 1) == ";" && key.substr(3, 1) == ";") { - ATH_MSG_VERBOSE( "Ignore versioned containe: " << key ); - continue; - } - ATH_MSG_VERBOSE("Attempting to copy " << key); - if (m_inputMetaDataStore->contains<EventStreamInfo>(key)) { - std::list<SG::ObjectWithVersion<EventStreamInfo> > allVersions; - if (!m_inputMetaDataStore->retrieveAllVersions(allVersions, key).isSuccess()) { - ATH_MSG_ERROR("Could not retrieve all versions for EventStreamInfo"); - return; - } - EventStreamInfo* evtStrInfo_out = 0; - for (std::list<SG::ObjectWithVersion<EventStreamInfo> >::const_iterator iter = allVersions.begin(), - iterEnd = allVersions.end(); iter != iterEnd; iter++) { - const EventStreamInfo* evtStrInfo_in = iter->dataObject; - if (!m_metaDataStore->contains<EventStreamInfo>(key)) { - evtStrInfo_out = new EventStreamInfo(*evtStrInfo_in); - if (!m_metaDataStore->record(evtStrInfo_out, key).isSuccess()) { - ATH_MSG_ERROR("Could not record DataObject: " << key); - return; - } - } else { - if (!m_metaDataStore->retrieve(evtStrInfo_out, key).isSuccess()) { - ATH_MSG_ERROR("Could not find DataObject in output: " << key); - return; - } - evtStrInfo_out->addEvent(evtStrInfo_in->getNumberOfEvents()); - for (std::set<unsigned int>::const_iterator elem = evtStrInfo_in->getRunNumbers().begin(), - lastElem = evtStrInfo_in->getRunNumbers().end(); elem != lastElem; elem++) { - evtStrInfo_out->insertRunNumber(*elem); - } - for (std::set<unsigned int>::const_iterator elem = evtStrInfo_in->getLumiBlockNumbers().begin(), - lastElem = evtStrInfo_in->getLumiBlockNumbers().end(); elem != lastElem; elem++) { - evtStrInfo_out->insertLumiBlockNumber(*elem); - } - for (std::set<std::string>::const_iterator elem = evtStrInfo_in->getProcessingTags().begin(), - lastElem = evtStrInfo_in->getProcessingTags().end(); elem != lastElem; elem++) { - evtStrInfo_out->insertProcessingTag(*elem); - } - for (std::set<std::pair<CLID, std::string> >::const_iterator elem = evtStrInfo_in->getItemList().begin(), - lastElem = evtStrInfo_in->getItemList().end(); elem != lastElem; elem++) { - evtStrInfo_out->insertItemList((*elem).first, (*elem).second); - } - for (std::set<EventType>::const_iterator elem = evtStrInfo_in->getEventTypes().begin(), - lastElem = evtStrInfo_in->getEventTypes().end(); elem != lastElem; elem++) { - evtStrInfo_out->insertEventType(*elem); - } - } - } - } - } - } -} -*/ diff --git a/Database/AthenaPOOL/OutputStreamAthenaPool/src/CopyEventStreamInfo.h b/Database/AthenaPOOL/OutputStreamAthenaPool/src/CopyEventStreamInfo.h index 62bdee0caee3816d4e16e8c597ef299a73423cb1..c47114f86e6d3b9c94aea8218d99d978fe191b3f 100644 --- a/Database/AthenaPOOL/OutputStreamAthenaPool/src/CopyEventStreamInfo.h +++ b/Database/AthenaPOOL/OutputStreamAthenaPool/src/CopyEventStreamInfo.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef COPYEVENTSTREAMINFO_H @@ -9,9 +9,8 @@ * @author Peter van Gemmeren <gemmeren@anl.gov> **/ -#include "AthenaBaseComps/AthAlgTool.h" -#include "GaudiKernel/ServiceHandle.h" -#include "AthenaKernel/IMetaDataTool.h" +#include "AthenaKernel/GenericMetadataToolNoAux.h" +#include "EventInfo/EventStreamInfo.h" #include <string> @@ -20,36 +19,21 @@ class StoreGateSvc; /** @class CopyEventStreamInfo * @brief This class provides an algorithm to make the EventStreamInfo object and update it. **/ -class CopyEventStreamInfo : public ::AthAlgTool, virtual public IMetaDataTool { +class CopyEventStreamInfo : public GenericMetadataToolNoAux <EventStreamInfo> { public: /// Standard AlgTool Constructor - CopyEventStreamInfo(const std::string& type, const std::string& name, const IInterface* parent); + CopyEventStreamInfo(const std::string& type, + const std::string& name, + const IInterface* parent); /// Destructor virtual ~CopyEventStreamInfo(); /// AthAlgTool Interface method implementations: - StatusCode initialize(); - StatusCode finalize(); + //StatusCode initialize(); + //StatusCode finalize(); + /// Helper class to update a container with information from another one + virtual StatusCode updateContainer(EventStreamInfo* evtStrInfo_out, + const EventStreamInfo* evtStrInfo_in ); - /// Function called when a new input file is opened - virtual StatusCode beginInputFile(const SG::SourceID& = "Serial"); - - /// Function called when the currently open input file got completely - /// processed - virtual StatusCode endInputFile(const SG::SourceID& = "Serial"); - - /// Function called when the tool should write out its metadata - virtual StatusCode metaDataStop(const SG::SourceID& = "Serial"); - - /// Incident service handle listening for BeginInputFile and EndInputFile. - //void handle(const Incident& incident); - -private: - /// Key, the StoreGate key for the EventStreamInfo object. - StringProperty m_key; - - /// Pointer to the metadata stores - ServiceHandle<StoreGateSvc> m_metaDataStore; - ServiceHandle<StoreGateSvc> m_inputMetaDataStore; }; #endif diff --git a/Database/AthenaPOOL/OutputStreamAthenaPool/src/EventInfoTagBuilder.cxx b/Database/AthenaPOOL/OutputStreamAthenaPool/src/EventInfoTagBuilder.cxx index e0eb8f6e5b4ba2929c101eccd040fbbd07c95fe2..4478e948f71989927a3d68ac60d652b95cfc2594 100755 --- a/Database/AthenaPOOL/OutputStreamAthenaPool/src/EventInfoTagBuilder.cxx +++ b/Database/AthenaPOOL/OutputStreamAthenaPool/src/EventInfoTagBuilder.cxx @@ -35,12 +35,16 @@ StatusCode EventInfoTagBuilder::execute() { SG::ReadHandle<xAOD::EventInfo> h_evt(m_evtKey); /** create a EventInfo Tag and ask the tool to fill it */ - auto attribList = std::make_unique<AthenaAttributeList> - ( m_tool->getAttributeList( *h_evt ) ); - - /** record attribute list to SG */ - SG::WriteHandle<AthenaAttributeList> wh(m_attributeListName); - ATH_CHECK( wh.record(std::move(attribList)) ); + if (h_evt.isValid()) { + auto attribList = std::make_unique<AthenaAttributeList> + ( m_tool->getAttributeList( *h_evt ) ); + + /** record attribute list to SG */ + SG::WriteHandle<AthenaAttributeList> wh(m_attributeListName); + ATH_CHECK( wh.record(std::move(attribList)) ); + } else { + ATH_MSG_WARNING("Did not find xAOD::EventInfo"); + } ATH_MSG_DEBUG( "Finished " << name() ); diff --git a/Database/AthenaPOOL/RootFileTools/CMakeLists.txt b/Database/AthenaPOOL/RootFileTools/CMakeLists.txt index e017c0b459faff6d7b963c9050db9911fbc5464d..3773d2b516fa4dbe75aaffb9af57ad14bcfa9125 100644 --- a/Database/AthenaPOOL/RootFileTools/CMakeLists.txt +++ b/Database/AthenaPOOL/RootFileTools/CMakeLists.txt @@ -15,52 +15,11 @@ atlas_depends_on_subdirs( PUBLIC # External dependencies: find_package( ROOT COMPONENTS RIO Core Tree MathCore Hist pthread ) -# this line failed automatic conversion in cmt2cmake : -# action releaseFileCache "$(cpp_name) $(src)releaseFileCache.cxx -o $(bin)releaseFileCache.exe;mkdir -p $(CMTINSTALLAREA)/$(tag)/bin; cd $(CMTINSTALLAREA)/$(tag)/bin;rm -f releaseFileCache.exe; ln -s ../../../Database/AthenaPOOL/RootFileTools/$(tag)/releaseFileCache.exe releaseFileCache.exe " - # Component(s) in the package: -atlas_add_library( RootFileToolsLib - src/cobs.cxx - src/RootFileTransformationsTool.cxx - src/HistoPile.cxx - PUBLIC_HEADERS RootFileTools - PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES GaudiKernel - PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps PersistentDataModel ) - -atlas_add_component( RootFileTools - src/components/*.cxx - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} GaudiKernel AthenaBaseComps PersistentDataModel RootFileToolsLib ) - -atlas_add_dictionary( RootFileToolsDict - RootFileTools/RootFileToolsDict.h - RootFileTools/selection.xml - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} GaudiKernel AthenaBaseComps PersistentDataModel RootFileToolsLib ) - atlas_add_executable( mergePOOL src/merge.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} GaudiKernel AthenaBaseComps PersistentDataModel RootFileToolsLib ) - -atlas_add_executable( mergeD3PD - src/mergeD3PD.cxx - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} GaudiKernel AthenaBaseComps PersistentDataModel RootFileToolsLib ) - -atlas_add_executable( checkCache - src/checkCache.cxx - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} GaudiKernel AthenaBaseComps PersistentDataModel RootFileToolsLib ) + LINK_LIBRARIES ${ROOT_LIBRARIES} GaudiKernel AthenaBaseComps PersistentDataModel ) # Install files from the package: atlas_install_python_modules( python/*.py ) -atlas_install_scripts( share/orderFile.py share/optimizeBS.py share/showTrees.py ) - -# Aliases: -atlas_add_alias( optimizeBasketsSizes "optimizeBS.py" ) -atlas_add_alias( orderFile "orderFile.py" ) -atlas_add_alias( mergeD3PD "mergeD3PD.exe" ) -atlas_add_alias( showTrees "showTrees.py" ) - diff --git a/Database/AthenaPOOL/RootFileTools/RootFileTools/IRootFileTransformationsTool.h b/Database/AthenaPOOL/RootFileTools/RootFileTools/IRootFileTransformationsTool.h deleted file mode 100644 index 68e66229b44c41b7ccc62cffdaba86aff40be086..0000000000000000000000000000000000000000 --- a/Database/AthenaPOOL/RootFileTools/RootFileTools/IRootFileTransformationsTool.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef ROOTFILETOOLS_IROOTFILETRANSFORMATIONSTOOL_H -#define ROOTFILETOOLS_IROOTFILETRANSFORMATIONSTOOL_H -/** @file RootFileTransformationsTool.cxx - * @brief Tool to call RootFileTransformations to optimise output files - * @author Gerhard Brandt <gbrandt@cern.ch> - * $Id: $ - **/ - -#include "GaudiKernel/IAlgTool.h" - -/** @file RootFileTransformationsTool.cxx - * @brief Tool to call RootFileTransformations to optimise output files - **/ -class IRootFileTransformationsTool : virtual public IAlgTool { - -public: - /// Gaudi boilerplate - static const InterfaceID& interfaceID(); - - /// Initialize AlgTool - virtual StatusCode initialize() = 0; - /// Finalize AlgTool - virtual StatusCode finalize() = 0; - - // Reorder Baskets - virtual StatusCode reorderBaskets(std::string, std::string) = 0; - - // Resize Baskets - virtual StatusCode resizeBaskets(std::string, std::string, std::string, std::string, int, float) = 0; - -}; - -inline const InterfaceID& IRootFileTransformationsTool::interfaceID() { - static const InterfaceID IID("IRootFileTransformationsTool", 1, 0); - return IID; -} - -#endif - diff --git a/Database/AthenaPOOL/RootFileTools/RootFileTools/RootFileToolsDict.h b/Database/AthenaPOOL/RootFileTools/RootFileTools/RootFileToolsDict.h deleted file mode 100644 index 172df8e7bc64a1c624789275b18d8a6d7eda1a43..0000000000000000000000000000000000000000 --- a/Database/AthenaPOOL/RootFileTools/RootFileTools/RootFileToolsDict.h +++ /dev/null @@ -1,10 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef ROOTFILETOOLSDICT_H -#define ROOTFILETOOLSDICT_H - -#include "src/cobs.h" - -#endif diff --git a/Database/AthenaPOOL/RootFileTools/RootFileTools/selection.xml b/Database/AthenaPOOL/RootFileTools/RootFileTools/selection.xml deleted file mode 100644 index 12923255d5598b4a60b89eeff43f2cea83e8c939..0000000000000000000000000000000000000000 --- a/Database/AthenaPOOL/RootFileTools/RootFileTools/selection.xml +++ /dev/null @@ -1,3 +0,0 @@ -<lcgdict> - <class name="cobs" /> -</lcgdict> diff --git a/Database/AthenaPOOL/RootFileTools/python/__init__.py b/Database/AthenaPOOL/RootFileTools/python/__init__.py deleted file mode 100644 index 74583d364ec2ca794156596c7254d9b234a940c6..0000000000000000000000000000000000000000 --- a/Database/AthenaPOOL/RootFileTools/python/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - diff --git a/Database/AthenaPOOL/RootFileTools/python/changeSplit.py b/Database/AthenaPOOL/RootFileTools/python/changeSplit.py deleted file mode 100644 index 8ffb574a85467a3efceefcb66a56b0ccedb53bd1..0000000000000000000000000000000000000000 --- a/Database/AthenaPOOL/RootFileTools/python/changeSplit.py +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import AthenaPython.PyAthena as PyAthena -trans = PyAthena.cobs('/data/ilija/AOD.067184.big.pool.root','/data/ilija/split0.pool.root') -# trans.mkProject() - -trans.setSplitLevel(0) -trans.changeSplitLevel() \ No newline at end of file diff --git a/Database/AthenaPOOL/RootFileTools/python/full.py b/Database/AthenaPOOL/RootFileTools/python/full.py deleted file mode 100644 index 854a5fde0d7634f563c7e1468a562a59d1fc74e5..0000000000000000000000000000000000000000 --- a/Database/AthenaPOOL/RootFileTools/python/full.py +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import AthenaPython.PyAthena as PyAthena -trans = PyAthena.cobs('/data/ilija/AOD.067184.big.pool.root','/data/ilija/tmp.pool.root') -# trans.mkProject() - -# resizing BS and adding CL=7 -trans.setTreeToSkip('##Links') -trans.setTreeToSkip('##Shapes') -trans.setTreeToSkip('##Params') -trans.setTreeMemory(10*1024,'POOLContainer_DataHeader') -trans.resizeBaskets() - -trans1 = PyAthena.cobs('/data/ilija/tmp.pool.root','/data/ilija/oBS_orderedByEvent.pool.root') -trans1.order(2) diff --git a/Database/AthenaPOOL/RootFileTools/python/order.py b/Database/AthenaPOOL/RootFileTools/python/order.py deleted file mode 100644 index 8365f5779ccbcdd02d5d8bf66bb955b209c31dda..0000000000000000000000000000000000000000 --- a/Database/AthenaPOOL/RootFileTools/python/order.py +++ /dev/null @@ -1,66 +0,0 @@ -#!/usr/bin/env python - -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -# @file: orderFile.py -# @purpose: optimizes ordering in trees of root file and creates a new file with a new compression level -# @author: Ilija Vukotic <ilija@vukotic.me> -# @date: October 2009 - -########################################################################################################### -# example: -# for standard AOD file this would be a reasonable command line: -# orderFile -o ofilename ifilename -# -########################################################################################################### - -__version__ = "$Revision: 1.0 $" -__author__ = "Ilija Vukotic <ilija@vukotic.me>" - -import sys -import os - -from optparse import OptionParser - - -import AthenaPython.PyAthena as PyAthena -trans = PyAthena.cobs('/data/ilija/AOD.067184.big.pool.root','/data/ilija/ordered.pool.root') - -if __name__ == "__main__": - - parser = OptionParser(usage="usage: %prog [options] my.file.pool.root") - p = parser.add_option - p( "-f", "--file", dest = "fileName", help = "The path to the POOL file to analyze" ) - p( "-m", "--mode", dest = "orderingMode", default = 2, help = "ordering mode 1 - by Offset, 2 - byEntry, 3 - byBranch " ) - p( "-o", "--output", dest = "outFileName", default = None, help = "Name of the output file. If ommited output file name will be the same as input one with _ordered appended." ) - p( "-s", "--skip", dest="skip", default = None, help ="List of tree names to leave as is. Compression level is still changed.") - (options, args) = parser.parse_args() - - fileName="" - if len(args) > 0: - for arg in args: - if arg[0] != "-": - fileName=arg - - if options.fileName == None and len(fileName) == 0: - str(parser.print_help() or "") - sys.exit(1) - - ofileName="" - if options.outFileName == None: - ofileName=fileName + "_ordered" - else: - ofileName=options.outFileName - - import AthenaPython.PyAthena as PyAthena - print "Optimizing file: ", fileName - print "Output file: ", ofileName - trans = PyAthena.cobs(fileName, ofileName) - - if options.skip != None: - trees=options.skip.split(",") - for t in trees: - print "Skipping tree: ", t - trans.setTreeToSkip(t) - - trans.order(options.orderingMode) \ No newline at end of file diff --git a/Database/AthenaPOOL/RootFileTools/share/optimizeBS.py b/Database/AthenaPOOL/RootFileTools/share/optimizeBS.py deleted file mode 100755 index ba15013ffc6a1d0c95b1f543801a04a7940097e5..0000000000000000000000000000000000000000 --- a/Database/AthenaPOOL/RootFileTools/share/optimizeBS.py +++ /dev/null @@ -1,81 +0,0 @@ -#!/usr/bin/env python - -# @file: optimizeBS.py -# @purpose: optimizes basket sizes in trees of root file and creates a new file with a new compression level -# @author: Ilija Vukotic <ilija@vukotic.me> -# @date: October 2009 - -########################################################################################################### -# example: -# for standard AOD file this would be a reasonable command line: -# optimizeBS -s '##Links,##Shapes,##Params' -t 'POOLContainer_DataHeader=10240' -o ofilename ifilename -# -########################################################################################################### - -__version__ = "$Revision: 226925 $" -__author__ = "Ilija Vukotic <ilija@vukotic.me>" - -import sys -import os - -from optparse import OptionParser - -if __name__ == "__main__": - - parser = OptionParser(usage="usage: %prog [options] my.file.pool.root") - p = parser.add_option - p( "-f", "--file", dest = "fileName", help = "The path to the POOL file to analyze" ) - p( "-o", "--output", dest = "outFileName", default = None, help = "Name of the output file. If ommited output file name will be the same as input one with _optBS appended." ) - p( "-m", "--memory", dest = "Memory", default = None, help = "Memory to be used for all the baskets for all the trees for which it is not explicitly set using option -t. Given in kb." ) - p( "-t", "--treemem", dest = "treeMemList", default = None, help = "Comma separated list of form 'treename=memory,treename=memory'. Memory is given in kb." ) - p( "-c", "--compression", dest = "compressionF", default = 7, help = "Compression factor of the output file. 7 by default.") - p( "-s", "--skip", dest="skip", default = None, help ="List of tree names to leave as is. Compression level is still changed.") - (options, args) = parser.parse_args() - - fileName="" - if len(args) > 0: - for arg in args: - if arg[0] != "-": - fileName=arg - - if options.fileName == None and len(fileName) == 0: - str(parser.print_help() or "") - sys.exit(1) - - ofileName="" - if options.outFileName == None: - ofileName=fileName + "_optBS" - else: - ofileName=options.outFileName - - import AthenaPython.PyAthena as PyAthena - print "Optimizing file: ", fileName - print "Output file: ", ofileName - trans = PyAthena.cobs(fileName, ofileName) - - if options.skip != None: - trees=options.skip.split(",") - for t in trees: - print "Skipping tree: ", t - trans.setTreeToSkip(t) - - if options.compressionF != None: - trans.setCompressionLevel(options.compressionF) - print 'Compression factor:', options.compressionF - else: - print 'Compression factor: 7' - - if options.Memory != None: - trans.setDedicatedMemory(options.Memory) - print 'Memory per tree:', options.Memory,'kb' - else: - print 'Memory per tree: 30720 kb' - - if options.treeMemList != None: - pairs = options.treeMemList.split(",") - for p in pairs: - elem = p.split('=') - trans.setTreeMemory(int (elem[1]),elem[0]) - print 'Memory for tree: ', elem[0], ' set to', int(elem[1]) - - trans.resizeBaskets() diff --git a/Database/AthenaPOOL/RootFileTools/share/orderFile.py b/Database/AthenaPOOL/RootFileTools/share/orderFile.py deleted file mode 100755 index 3cddec94de1449edfcae70e22bef1cb6cc6ac4e7..0000000000000000000000000000000000000000 --- a/Database/AthenaPOOL/RootFileTools/share/orderFile.py +++ /dev/null @@ -1,70 +0,0 @@ -#!/usr/bin/env python - -# @file: orderFile.py -# @purpose: optimizes ordering in trees of root file and creates a new file with a new compression level -# @author: Ilija Vukotic <ilija@vukotic.me> -# @date: October 2009 - -########################################################################################################### -# example: -# for standard AOD file this would be a reasonable command line: -# orderFile -o ofilename ifilename -# -########################################################################################################### - -__version__ = "$Revision: 226925 $" -__author__ = "Ilija Vukotic <ilija@vukotic.me>" - -import sys -import os - -from optparse import OptionParser - - -import AthenaPython.PyAthena as PyAthena -trans = PyAthena.cobs('/data/ilija/AOD.067184.big.pool.root','/data/ilija/ordered.pool.root') - -if __name__ == "__main__": - - parser = OptionParser(usage="usage: %prog [options] my.file.pool.root") - p = parser.add_option - p( "-f", "--file", dest = "fileName", help = "The path to the POOL file to analyze" ) - p( "-m", "--mode", dest = "orderingMode", default = 2, help = "ordering mode 1 - by Offset, 2 - byEntry, 3 - byBranch " ) - p( "-o", "--output", dest = "outFileName", default = None, help = "Name of the output file. If ommited output file name will be the same as input one with _ordered appended." ) - p( "-s", "--skip", dest="skip", default = None, help ="List of tree names to leave as is. Compression level is still changed.") - (options, args) = parser.parse_args() - - fileName="" - if len(args) > 0: - for arg in args: - if arg[0] != "-": - fileName=arg - - if options.fileName == None and len(fileName) == 0: - str(parser.print_help() or "") - sys.exit(1) - - ofileName="" - if options.outFileName == None: - ofileName=fileName + "_ordered" - else: - ofileName=options.outFileName - - import AthenaPython.PyAthena as PyAthena - print "Optimizing file: ", fileName - print "Output file: ", ofileName - trans = PyAthena.cobs(fileName, ofileName) - - if options.skip != None: - trees=options.skip.split(",") - for t in trees: - print "Skipping tree: ", t - trans.setTreeToSkip(t) - if options.orderingMode==1: - print "Ordering mode: by OFFSET" - if options.orderingMode==2: - print "Ordering mode: by EVENT" - if options.orderingMode==1: - print "Ordering mode: by BRANCH" - - trans.order(options.orderingMode) \ No newline at end of file diff --git a/Database/AthenaPOOL/RootFileTools/share/showTrees.py b/Database/AthenaPOOL/RootFileTools/share/showTrees.py deleted file mode 100755 index 02ea0410b8ca453b9f958cef4b641bcf74d95c49..0000000000000000000000000000000000000000 --- a/Database/AthenaPOOL/RootFileTools/share/showTrees.py +++ /dev/null @@ -1,61 +0,0 @@ -#!/usr/bin/env python - -# @file: showTrees.py -# @purpose: print information about the TTrees in the ROOT file given -# @author: Gerhard Brandt <gbrandt@cern.ch> -# @date: October 2009 - -__version__ = "$Revision: 227455 $" -__author__ = "Gerhard Brandt <gbrandt@cern.ch>" - -import sys -import os - -from optparse import OptionParser - -import AthenaPython.PyAthena as PyAthena -mcobs = PyAthena.cobs() - -if __name__ == "__main__": - - parser = OptionParser(usage="usage: %prog [-f] file.root") - p = parser.add_option - p( "-f", - "--file", - dest = "fileName", - help = "The path to the ROOT file to analyze" ) - p( "-b", - "--branches", - action = "store_true", - dest = "show_branches", - default = False, - help = "Print branches" ) - - (options, args) = parser.parse_args() - - if len(args) > 0: - for arg in args: - if arg[0] != "-": - fileName=arg - - if options.fileName == None and len(fileName) == 0: - str(parser.print_help() or "") - sys.exit(1) - - if options.show_branches != None: - mcobs.setShowBranches(True) - - mcobs.printTrees(fileName) - -# import AthenaPython.PyAthena as PyAthena -# print "Optimizing file: ", fileName -# print "Output file: ", ofileName -# mcobs = PyAthena.cobs(fileName, ofileName) -# -# if options.skip != None: -# trees=options.skip.split(",") -# for t in trees: -# print "Skipping tree: ", t -# mcobs.setTreeToSkip(t) -# -# mcobs.order(options.orderingMode) diff --git a/Database/AthenaPOOL/RootFileTools/src/FilterAndMergeD3PD.cxx b/Database/AthenaPOOL/RootFileTools/src/FilterAndMergeD3PD.cxx deleted file mode 100644 index b14fe6eba0949766ce6910688961747185c311b3..0000000000000000000000000000000000000000 --- a/Database/AthenaPOOL/RootFileTools/src/FilterAndMergeD3PD.cxx +++ /dev/null @@ -1,415 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// TODO: -// make sure that we use only the last of all the trees with the same name !!! - -#include <Riostream.h> - -#include <TTree.h> -#include <TFile.h> -#include <TChain.h> -#include <TChainElement.h> -#include <TSystem.h> -#include <TROOT.h> -#include <TKey.h> -#include <TLeaf.h> -#include <TStopwatch.h> - -#include <stdio.h> -#include <stdlib.h> -#include <iostream> -#include <sstream> -#include <fstream> - -using namespace std; - -class mTree{ -public: - mTree(string a):filename(a), entries(0){} - string filename; - long entries; -}; - -class mTrees{ -public: - mTrees(){}; - mTrees(string a):name(a),leaves(0),totalSize(0){} - string name; - int leaves; - double totalSize; - vector<unsigned int> basketSize;// this is the value to be optimized - at beggining = totSize - vector<unsigned int> totSize;// this is value of ZIPPED SIZES collected from all the files - vector<unsigned int> baskets;// this is cached to speed up calculation - at beggining = 1 - void addFile(string s){ m_tree.push_back(mTree(s)); } - - void setLeaves(int l){ - leaves=l; - for (int w=0;w<l;w++){ - totSize.push_back(0); - } - } - - void recalculate(){ - cout<<"recalculate baskets"<<endl; - for (int w=0;w<leaves;w++){ - basketSize.push_back(totSize[w]); - baskets.push_back(1); - totalSize+=totSize[w]; - } - } - - void optimize(unsigned long memory){ - - cout<<"optimize baskets. total tree size:"<<totalSize<<"\t memory: "<<memory<<endl; - while(true){ - double totMem=0; - for (int i=0;i<leaves;i++) - totMem += basketSize[i]; - - if ( totMem < memory) break; - - int maxSpare=-1; int mi=-1; - for (int i=0;i<leaves;i++){ - int spare=totSize[i]/baskets[i]-totSize[i]/(baskets[i]+1); - if (maxSpare<spare){ - maxSpare=spare; - mi=i; - } - } - baskets[mi]++; - basketSize[mi]=totSize[mi]/baskets[mi]; - // cout<<"totMem: "<<totMem<<"\tSpare: "<<totSize[mi]/(baskets[mi]-1)-totSize[mi]/baskets[mi]<<"\t baskets: "<<baskets[mi]<<"\n"; - } - roundBasketSize(); - } - - void roundBasketSize(){ - - cout<<"round basket sizes"<<endl; - double totMem = 0; - int totBas = 0; - unsigned int maxBs = 0; - unsigned int minBs = 1024*1024*1024; - - for (int w=0;w<leaves;w++){ - if (basketSize[w]==0) basketSize[w]=16; - basketSize[w] = basketSize[w] - basketSize[w] % 8; - totMem += basketSize[w]; - totBas += baskets[w]; - if (basketSize[w]<minBs) minBs=basketSize[w]; - if (basketSize[w]>maxBs) maxBs=basketSize[w]; - } - cout<<"Total memory buffer: "<<totMem/1024<<" kb total baskets: "<<totBas<<"\tmin BS: "<<minBs<<"\tmax BS: "<<maxBs<<endl; - cout<<"-------------------------------------------------------------------------------------------------"<<endl; - } - - vector<mTree>::const_iterator bi(){return (vector<mTree>::const_iterator) m_tree.begin();}; - vector<mTree>::const_iterator ei(){return (vector<mTree>::const_iterator) m_tree.end();}; - -private: - vector<mTree> m_tree; -}; - -std::string sfo=""; -std::string stn=""; -std::string filename = ""; -vector<string> toKeep; - -mTrees* tt; - -void ren(){ - cout<<"renaming ... "<<endl; - std::string com="rm "+sfo+".root; for i in *temporary*.root; do mv \"$i\" \"${i/_temporary/}\";done"; - // cout<<"command to execute: "<<com<<endl; - int ret=system (com.c_str()); - if (!ret) cout<<"files renamed OK"<<endl; -} - -void warmUp(const char* fn){ - std::string com="cat "+std::string(fn)+" > /dev/null "; - cout<<"warming up the cache for file: "<<com<<endl; - int ret=system (com.c_str()); - if (!ret) cout<<"file warmed up OK"<<endl; -} - -void loadToKeep(string filename){ - if(filename=="") return; - cout<<"Slimming according to file: "<<filename<<endl; - ifstream file(filename.c_str(),ios::in); - if (file){ - cout<<"Keep only the following branches:"<<endl; - string line; - while(getline(file,line)){ - cout<<line<<endl; - toKeep.push_back(line); - } - } - -} - -void order(int m){ - - TChain *ch=new TChain(tt->name.c_str()); - std::string o=sfo+"*.root"; - ch->Add(o.c_str()); - TObjArray *oaFiles=ch->GetListOfFiles(); - - for(int i=0;i<oaFiles->GetEntries();i++){ - TChainElement *element = (TChainElement*)oaFiles->At(i); - const char *fn=element->GetTitle(); - - TStopwatch timer; - timer.Start(); - cout<<"optimizing: "<<fn<<endl; - // warmUp(fn); - - timer.Start(); - TFile *fIn = TFile::Open(fn); - - std::stringstream out; out << i; - std::string s = out.str(); - std::string tmp = sfo+"_temporary_"+s+".root"; - TFile* fOut=TFile::Open(tmp.c_str(),"recreate","",6); - - // - ordering - TTree *tc2 = (TTree*)fIn->Get(tt->name.c_str()) ; - - if(toKeep.size()){ - tc2->SetBranchStatus("*",0); - for(vector<string>::iterator i=toKeep.begin();i!=toKeep.end();i++){ - unsigned int found=0; - tc2->SetBranchStatus( i->c_str() , 1, &found); - cout<<"Setting status of the branch(es) "<<i->c_str()<<"\t found: "<<found<<endl; - } - } - - TTree* TC2; - if (m==2) TC2= tc2->CloneTree(-1,"SortBasketsByEntry fast"); - else TC2 = tc2->CloneTree(-1,"SortBasketsByBranch fast"); - TC2->Write("",TObject::kOverwrite); - // - - - timer.Stop(); - cout<<"ordering file: "<<i<<" \t\twallclock time: "<< timer.RealTime()<<"\t CPU time: "<<timer.CpuTime()<<endl; - - fOut->Close(); - fIn->Close(); - } - - cout<<"ordering done"<<endl; - ren(); - return; -} - -void optimizeBasketSizes(){ - - cout<<"Doing tree: "<<tt->name<<endl; - // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> SUMMING UP BRANCH SIZES OVER ALL THE FILES - for(vector<mTree>::const_iterator itt=tt->bi(); itt!=tt->ei(); itt++){ // loop over files having this tree - - TFile* f = TFile::Open(itt->filename.c_str()); - TTree* t = (TTree*) f->Get(tt->name.c_str()); - - for (int i=0; i<tt->leaves; i++) { - TBranch* branch = (TBranch*)t->GetListOfBranches()->UncheckedAt(i); - branch->SetAddress(0); - // cout <<i<<"\t"<<branch->GetName()<<"\t BS: "<< branch->GetBasketSize()<<"\t size: "<< branch->GetTotalSize()<< "\ttotbytes: "<<branch->GetTotBytes() << endl; - tt->totSize[i] += branch->GetTotBytes(); - } - - f->Close(); - } - - cout<<"got basket sizes from all the files"<<endl; - tt->recalculate(); - - tt->optimize(40*1024*1024); // in bytes ! - -} - -void createMergedFile(){ - - std::string oname=sfo+".root"; - TFile* fOut = TFile::Open(oname.c_str(),"RECREATE","",1); - TDirectory *gDirectory_save = gDirectory; - if (fOut->IsZombie()){ - cout<<"File "<<oname<<" isZombified. Output file can not be created."<<endl; - return; - } - - TTree *newtree=0; - - TFile* f = TFile::Open((tt->bi())->filename.c_str()); - TTree* t = (TTree*) f->Get(tt->name.c_str()); - - // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> CREATING NEW TREE - newtree = (TTree*)t->CloneTree(0); // no copy of events - - newtree->SetDirectory(gDirectory_save); - - // Once the cloning is done, separate the trees,to avoid as many side-effects as possible - t->GetListOfClones()->Remove(newtree); - t->ResetBranchAddresses(); - newtree->ResetBranchAddresses(); - - // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Setting optimized basket sizes. - for (int w=0;w<tt->leaves;w++) { - TBranch* branch=(TBranch*)newtree->GetListOfBranches()->UncheckedAt(w); - branch->SetBasketSize(tt->basketSize[w]); - // cout<<"basket size: "<<basketSize[w]<<"\t number of baskets:"<<baskets[w]<<endl; - } - - // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> copying data. - - int ne=0; - - for(vector<mTree>::const_iterator itt=tt->bi(); itt!=tt->ei(); itt++){ // loop over files having this tree - - TFile* f = TFile::Open(itt->filename.c_str()); - TTree* t = (TTree*) f->Get(tt->name.c_str()); - - - newtree->CopyAddresses(t); - t-> SetBranchAddress("el_n",&ne); - newtree->SetBranchAddress("el_n",&ne); - - unsigned long nentries = t->GetEntries(); - for ( unsigned long e = 0; e < nentries; ++e) { - t->GetEntry(e); - if (ne>1) - newtree->Fill(); - } - t->ResetBranchAddresses(); // Disconnect from new tree. - f->Close(); - cout<<"Current file entries: "<<nentries <<endl; - } - - fOut->cd(); - int s = newtree->Write("", TObject::kOverwrite); - if (!s) { - cout<<" WARNING FILE IS NOT OPTIMIZED. MAYBE NOT ENOUGH DISK SPACE? "<<endl; - return; - } - - - fOut=newtree->GetCurrentFile(); - fOut->Write(); - fOut->Close(); - -} - - - -int main(int argc,char* argv[]){ - - - if (argc < 7) { - cout << "Usage is:\n"; - cout << "\t-in <infile> --- this can be of the form /data/higgs/my*nobel*_000*.1 \n"; - cout << "\t-out <outfile> --- this can be of the form /data/out/higgs - as .root will be appended\n"; - cout << "\t-tree <outfile> --- name of the tree to be filtered. other trees are not copied.\n"; - cout << "\t-var <variables> --- name of the file containing branche names to be kept in the output file. By default all the branches are copied.\n"; - cout << "\t-maxsize <tree max size> --- maximum zip size of the main tree (in Mb). The default value is 6000.\n"; - cout << "\t-byBranch --- baskets in output files will be ordered by branch. The default is by Entry.\n"; - std::cin.get(); - return 0; - } - - char *fi = NULL; - Long64_t maxsize=6000; - int toOrder=2; - - for (int i = 1; i < argc; i++) { - if (! strcmp(argv[i], "-in") ) { - fi = argv[i + 1]; - } else if (! strcmp(argv[i], "-out") ) { - sfo=std::string(argv[i + 1]); - } else if (! strcmp(argv[i], "-tree") ) { - stn=std::string(argv[i + 1]); - } else if (! strcmp(argv[i], "-maxsize") ) { - maxsize = atoi(argv[i + 1]); - } else if (! strcmp(argv[i], "-var")){ - filename=std::string(argv[i + 1]); - loadToKeep(filename); - } else if (! strcmp(argv[i], "-byBranch") ){ - toOrder=1; - } - } - - TTree::SetMaxTreeSize(maxsize*1024*1024); - - cout<<"Input files: "<<fi<<"\nOutput file: "<<sfo<<"\nMax Tree Size: "<<maxsize<<endl; - - TChain *ch = new TChain(stn.c_str()); - ch->Add(fi); - - TObjArray *oaFiles = ch->GetListOfFiles(); - if (!oaFiles->GetEntries()){ - cout<<"No input files found!"<<endl; - return 0; - } - - - cout<<"I chain created..."<<endl; - - - - // ==================================================================== take tree names from the first file - - - tt = new mTrees(stn.c_str()); - - cout<<"II trees to merge determined ..."<<endl; - // ===================================================================== - - std::vector<TFile*> fFile (oaFiles->GetEntries()); - for(int i=0;i<oaFiles->GetEntries();i++){ - - const char* fn = ((TChainElement*)oaFiles->At(i))->GetTitle(); - fFile[i] = TFile::Open(fn); - - if (fFile[i]->IsZombie()){ - cout<<"File "<<fn<<" isZombified. Its corrupted or not a root file."<<endl; - continue; - } - - TTree* tmpt=(TTree*)fFile[i]->Get( (tt->name).c_str() ); - int leaves=tmpt->GetListOfBranches()->GetEntriesFast(); - - if (!leaves){ - cout<<"WARNING! Tree: "<< (tt->name).c_str() <<" in file: "<<fn<<" contains no events. Will not be merged."<<endl; - } - else{ - tt->addFile(fn); - if (!tt->leaves) - tt->setLeaves(leaves); - } - - - fFile[i]->Close(); - } - - delete ch; ch=NULL; - oaFiles=NULL; - cout<<"Files checked and verified..."<<endl; - // ===================================================================== - - TStopwatch timer; - timer.Start(); - - optimizeBasketSizes(); - createMergedFile(); - - timer.Stop(); - cout<<"Done in wallclock: "<< timer.RealTime()<<"\t\t CPU time: "<<timer.CpuTime()<<endl; - - order(toOrder); - - return 0; -} - - - - diff --git a/Database/AthenaPOOL/RootFileTools/src/HistoPile.cxx b/Database/AthenaPOOL/RootFileTools/src/HistoPile.cxx deleted file mode 100644 index f164020ed5a1ae42f0de921ebb7de5885736b35d..0000000000000000000000000000000000000000 --- a/Database/AthenaPOOL/RootFileTools/src/HistoPile.cxx +++ /dev/null @@ -1,118 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - - -#include "HistoPile.h" - -using namespace std; - -//______________________________________________________________________________ -void HistoPile::Push(const char *str) -{ - m_path.push_back(str); - m_path.push_back("."); - m_currHist = 0; -} - -//______________________________________________________________________________ -void HistoPile::Pop() -{ - m_path.pop_back(); - m_path.pop_back(); - m_currHist = 0; -} - -//______________________________________________________________________________ -const char * HistoPile::Path() -{ - static std::string line; - - for (const std::string& p : m_path) { - line += p; - } - // replace trailing dot - if (line.size() > 0) { - line.erase (line.size()-1); - } - return line.c_str(); -} - -//______________________________________________________________________________ -void HistoPile::Fill(Float_t f) -{ - // only look for current histogram again if not set - if ( !m_currHist) { - - const char *path = Path(); - - m_currHist = (TH1F*)m_histos->FindObject(path); - - // not yet in list - try to take def from reference file - if (!m_currHist && m_reffile) { - TH1F* refHist = (TH1F*)m_reffile->Get(path); - if (!refHist) { - cout << "WARNING Could not find "<<path<<" in reference file!" << endl; - } else { -// cout << ">>>CLONE HISTO<<< " << path << endl; - m_currHist = (TH1F*)refHist->Clone(path); - m_currHist->Reset(); -#if ROOT_VERSION_CODE >= ROOT_VERSION(6,0,0) - m_currHist->SetCanExtend(TH1::kNoAxis); // don't allow rebinning binning -#else - m_currHist->SetBit(TH1::kCanRebin,0); -#endif -// m_currHist->SetDirectory(0); - //cout << m_currHist->Hash() << " " << refHist->Hash() << endl; - m_histos->AddLast(m_currHist); - } - } - - if (!m_currHist) { - // some default - tbc - m_currHist = new TH1F(path,path,40,f/2.,f*2.); -#if ROOT_VERSION_CODE >= ROOT_VERSION(6,0,0) - m_currHist->SetCanExtend(TH1::kAllAxes); -#else - m_currHist->SetBit(TH1::kCanRebin); -#endif - m_currHist->SetDirectory(0); - m_histos->AddLast(m_currHist); -// cout << ">>>NEW HISTO<<< " << path << endl; - } - } - m_currHist->Fill(f); -} - -//______________________________________________________________________________ -void HistoPile::Save() -{ - if (!m_filename) return; - - TFile* file = TFile::Open(m_filename,"RECREATE"); - - TIter next(m_histos); - TH1F* hist; - while ((hist = (TH1F *)next() )) - { -#if ROOT_VERSION_CODE >= ROOT_VERSION(6,0,0) - hist->SetCanExtend(TH1::kNoAxis); // don't allow rebinning binning -#else - hist->SetBit(TH1::kCanRebin,0); -#endif - hist->SetDirectory(file); - hist->Write(); - //cout << hist->GetName() << endl; - //hist->Print(); - // if (obj->GetUniqueID()) nbins++; - - //Remove(hist); // clean up - } - - delete file; - - cout << "Histograms created: about " - << m_histos->AverageCollisions()*m_histos->GetEntries() << endl; - -} - diff --git a/Database/AthenaPOOL/RootFileTools/src/HistoPile.h b/Database/AthenaPOOL/RootFileTools/src/HistoPile.h deleted file mode 100644 index 3c7bd1be58158ba0e2df718a522c31aa6fcca45f..0000000000000000000000000000000000000000 --- a/Database/AthenaPOOL/RootFileTools/src/HistoPile.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef HISTOPILE_H -#define HISTOPILE_H -// -// A hashlist of automatic histograms -// -// - push and pop labels to traverse "tree" -// - call fill to fill histogram belonging to current tree node -// -// Author: Gerhard Brandt, 2009-09-27 -// - -#include <iostream> -#include <list> -#include <string> - -#include "TFile.h" -#include "TH1F.h" -#include "THashList.h" - - -class HistoPile { - -public: - - HistoPile(const char * filename, const char * reffilename=0) : - m_currHist(0) - , m_filename(filename) - { - if (reffilename) { - m_reffile = TFile::Open(reffilename); - if ( !m_reffile ) { - std::cout << "WARNING Could not open reference file!" << std::endl; - } else { - std::cout << "Using reference file " << reffilename << std::endl; - } - } else - m_reffile = 0; - - // high number to avoid collisions - m_histos = new THashList(10000); - } - - void Push(const char *); // Descend object tree - void Pop(); // Ascend object tree - void Fill(Float_t); // Plot value at current node - const char *Path(); // Print name of current node - void Save(); // Save histograms to file - -private: - - THashList* m_histos; // hashlist of histograms at nodes - TH1F* m_currHist; // current histogram - const char * m_filename; // name of output file - TFile * m_reffile; // reference file to take histo definitions from - - std::list<std::string> m_path; // current path -}; - -#endif diff --git a/Database/AthenaPOOL/RootFileTools/src/Makefile b/Database/AthenaPOOL/RootFileTools/src/Makefile deleted file mode 100644 index 96b3f044b5bf5030071a4cb7073a595d5259eb5a..0000000000000000000000000000000000000000 --- a/Database/AthenaPOOL/RootFileTools/src/Makefile +++ /dev/null @@ -1,37 +0,0 @@ -include $(ROOTSYS)/test/Makefile.arch - -MERGEO = mergeD3PD.$(ObjSuf) -MERGES = mergeD3PD.$(SrcSuf) -MERGE = mergeD3PD$(ExeSuf) - -FILTERO = FilterAndMergeD3PD.$(ObjSuf) -FILTERS = FilterAndMergeD3PD.$(SrcSuf) -FILTER = FilterAndMergeD3PD$(ExeSuf) - -OBJS = $(FILTERO) $(MERGEO) -PROGRAMS = $(FILTER) $(MERGE) - -#------------------------------------------------------------------------------ - -.SUFFIXES: .$(SrcSuf) .$(ObjSuf) .$(DllSuf) - -all: $(PROGRAMS) - -$(FILTER): $(FILTERO) - $(LD) $(LDFLAGS) $^ $(LIBS) $(OutPutOpt)$@ - $(MT_EXE) - @echo "$@ done" - -$(MERGE): $(MERGEO) - $(LD) $(LDFLAGS) $^ $(LIBS) $(OutPutOpt)$@ - $(MT_EXE) - @echo "$@ done" - -clean: - @rm -f $(OBJS) core - -.SUFFIXES: .$(SrcSuf) - - -.$(SrcSuf).$(ObjSuf): - $(CXX) $(CXXFLAGS) -c $< diff --git a/Database/AthenaPOOL/RootFileTools/src/RootFileTransformationsTool.cxx b/Database/AthenaPOOL/RootFileTools/src/RootFileTransformationsTool.cxx deleted file mode 100755 index 18b125a0d302f1a827023d22ad8ddfef8cf11b7e..0000000000000000000000000000000000000000 --- a/Database/AthenaPOOL/RootFileTools/src/RootFileTransformationsTool.cxx +++ /dev/null @@ -1,111 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/** @file RootFileTransformationsTool.cxx - * @brief Tool to call RootFileTransformations to optimize output files - * @author Gerhard Brandt <gbrandt@cern.ch> - * $Id: $ - **/ - -#include <stdio.h> -#include "RootFileTransformationsTool.h" -#include "cobs.h" - -RootFileTransformationsTool::RootFileTransformationsTool(const std::string& type, - const std::string& name, - const IInterface* parent) - : AthAlgTool(type, name, parent) -{ - // Declare IRootFileTransformationsTool interface - declareInterface<IRootFileTransformationsTool>(this); -} -//__________________________________________________________________________ -RootFileTransformationsTool::~RootFileTransformationsTool() { -} -//__________________________________________________________________________ -StatusCode RootFileTransformationsTool::initialize() { - ATH_MSG_INFO ("Initializing " << name() << " - package version " << PACKAGE_VERSION); - - return(StatusCode::SUCCESS); -} -//__________________________________________________________________________ -StatusCode RootFileTransformationsTool::finalize() { - return(::AlgTool::finalize()); -} -//__________________________________________________________________________ -StatusCode RootFileTransformationsTool::reorderBaskets(std::string fileName, std::string option) { - ATH_MSG_INFO("Reordering baskets on file " << fileName << " using " << option); - - std::string optFileName = fileName+".opt.root"; - (void) remove(optFileName.c_str()); - - cobs* mcobs = new cobs(fileName, optFileName); - - // set debug level of optimizer - if ( msg().level() <= MSG::DEBUG) { - mcobs->setDebug(true); - // dump tree info before operations - mcobs->printTrees(fileName); - } - - if (option=="SortBasketsByOffset") { - if (mcobs->order(1)) - (void)rename(optFileName.c_str(), fileName.c_str()); - else - (void)remove(optFileName.c_str()); - } - else if(option=="SortBasketsByEntry") { - if (mcobs->order(2)) - (void)rename(optFileName.c_str(), fileName.c_str()); - else - (void)remove(optFileName.c_str()); - } - else if(option=="SortBasketsByBranch") { - if (mcobs->order(3)) - (void)rename(optFileName.c_str(), fileName.c_str()); - else - (void)remove(optFileName.c_str()); - } - else { - ATH_MSG_WARNING("Unsupported ordering option " << option << ". Not ordering file " << fileName); - } - if ( msg().level() <= MSG::DEBUG) { - mcobs->printTrees(fileName); - } - - delete mcobs; - - ATH_MSG_INFO("Finished optimizing " << fileName); - return(StatusCode::SUCCESS); -} -//__________________________________________________________________________ -StatusCode RootFileTransformationsTool::resizeBaskets(std::string fileName, std::string algo, std::string treesToExclude, std::string memPerTree, int maxMemory, float minComp) { - - ATH_MSG_INFO ("Optimizing basket sizes of the file " << fileName << "\tusing " << algo << "\ttreesToExclude: "<< treesToExclude << "\tmemPerTree: " << memPerTree << "\ttotal memory: " << maxMemory << "\tmin compression: " << minComp); - - std::string optFileName = fileName+".opt.root"; - (void) remove(optFileName.c_str()); - - cobs* mcobs = new cobs(fileName, optFileName); - // mcobs->setDebugLevel(1); - mcobs->setDedicatedMemory(maxMemory); - mcobs->setMinCompressionFactor(minComp); - // mcobs->setTreeToSkip(); // here decode treesToExclude and set them - // mcobs->setTreeMemory(mem,treeName); // here decode memPerTree and set them - - if (algo=="1") { // currently only one method exists. - if (mcobs->resizeBaskets()) - (void)rename(optFileName.c_str(), fileName.c_str()); - else - (void)remove(optFileName.c_str()); - } - else { - ATH_MSG_WARNING("Unsupported resizing option " << algo << ". Not resizing baskets on file " << fileName); - } - - delete mcobs; - - ATH_MSG_INFO("Finished optimizing " << fileName); - return(StatusCode::SUCCESS); -} diff --git a/Database/AthenaPOOL/RootFileTools/src/RootFileTransformationsTool.h b/Database/AthenaPOOL/RootFileTools/src/RootFileTransformationsTool.h deleted file mode 100755 index ba0863638c4ac306171fb1e279342bf1e2d8d79a..0000000000000000000000000000000000000000 --- a/Database/AthenaPOOL/RootFileTools/src/RootFileTransformationsTool.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef ROOTFILETOOLS_ROOTFILETRANSFORMATIONSTOOL_H -#define ROOTFILETOOLS_ROOTFILETRANSFORMATIONSTOOL_H -/** @file RootFileTransformationsTool.cxx - * @brief Tool to call RootFileTransformations to optimize output files - * @author Gerhard Brandt <gbrandt@cern.ch> - * $Id: $ - **/ - -#include "RootFileTools/IRootFileTransformationsTool.h" -#include "AthenaBaseComps/AthAlgTool.h" - -/** @class RootFileTransformationsTool - * @brief Tool to call RootFileTransformations to optimize output files - **/ -class RootFileTransformationsTool : virtual public IRootFileTransformationsTool, - virtual public AthAlgTool { - -public: - /// Constructor - RootFileTransformationsTool(const std::string& type, - const std::string& name, - const IInterface* parent); - /// Destructor - virtual ~RootFileTransformationsTool(); - - /// Initialize - virtual StatusCode initialize(); - /// Finalize - virtual StatusCode finalize(); - - // Reorder Baskets - virtual StatusCode reorderBaskets(std::string, std::string); - - // Resize Baskets ( filename, algorithm, names of trees to exlude, memory per tree, memory (in kilobytes!), min zip level) - virtual StatusCode resizeBaskets(std::string, std::string, std::string, std::string, int, float); - -private: -}; - -#endif diff --git a/Database/AthenaPOOL/RootFileTools/src/checkCache.cxx b/Database/AthenaPOOL/RootFileTools/src/checkCache.cxx deleted file mode 100644 index b8e02dd5473c331f5a31d76788790095dd6a8d36..0000000000000000000000000000000000000000 --- a/Database/AthenaPOOL/RootFileTools/src/checkCache.cxx +++ /dev/null @@ -1,57 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include <stdio.h> -#include <stdlib.h> -#include <fcntl.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <unistd.h> -#include <sys/mman.h> -int main(int argc, char *argv[]) { - - if (argc==1) { - puts(" usage: checkCache <filename>\n prints out all the cached blocks of the file given. warning: for a large file that may mean a big printout."); - return 0; - } - int fd; - struct stat file_stat; - void *file_mmap; -#ifndef __APPLE__ - unsigned char *mincore_vec; -#else - char *mincore_vec; -#endif - size_t page_size = getpagesize(); - size_t page_index; - - fd = open(argv[1],0); - if (fd < 0) { - perror ("open"); - return 1; - } - if (fstat(fd, &file_stat) < 0) { - perror ("ftsat"); - return 1; - } - file_mmap = mmap((void *)0, file_stat.st_size, PROT_NONE, MAP_SHARED, fd, 0); -#ifndef __APPLE__ - mincore_vec = (unsigned char *) calloc(1, (file_stat.st_size+page_size-1)/page_size); -#else - mincore_vec = (char *) calloc(1, (file_stat.st_size+page_size-1)/page_size); -#endif - mincore(file_mmap, file_stat.st_size, mincore_vec); - printf("Cached Blocks of %s: ",argv[1]); - for (page_index = 0; page_index <= file_stat.st_size/page_size; page_index++) { - if (mincore_vec[page_index]&1) { - printf("%lu ", (unsigned long)page_index); - } - } - printf("\n"); - free(mincore_vec); - munmap(file_mmap, file_stat.st_size); - close(fd); - return 0; -} - diff --git a/Database/AthenaPOOL/RootFileTools/src/cobs.cxx b/Database/AthenaPOOL/RootFileTools/src/cobs.cxx deleted file mode 100644 index 01c124f909d9887bdaf773fde70366347336b231..0000000000000000000000000000000000000000 --- a/Database/AthenaPOOL/RootFileTools/src/cobs.cxx +++ /dev/null @@ -1,624 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/** @file cobs.cxx - * @brief Rewrite root files in various ways to speed up reading. - * @author: Ilija Vukotic, Gerhard Brandt - * $Id: $ - * - * Current defaults are: - * - * compression level = 6 - * split level = 99 - * dedicated memory = 30MB (per tree) - * minimal compression factor = 1.0 (compression is never off) - * - * There are three main transformations that - * should be applied in the following precedence: - * - * 1. change tree split level (should be set on write already) - * 2. change tree basket sizes - * 3. change tree basket order - * - **/ -#include <sys/types.h> -#include <unistd.h> -#include <stdlib.h> - -#include "cobs.h" -#include <vector> -#include <string> -#include <iostream> - -#include <Riostream.h> -#include <TTree.h> -#include <TFile.h> -#include <TSystem.h> -#include <TROOT.h> -#include <TKey.h> -#include <TLeaf.h> - -using namespace std; - - -//__________________________________________________________________________ -cobs::cobs(string inputFile) : m_inputFilename(inputFile) { - m_compressionLevel = 6; - m_splitLevel = 99; - m_dedicatedMemory = 30720; //30Mb - m_minCompressionFactor = 1.0; - m_libraryName = "RFT"; - m_libraryDirName = "RFT/RFT.so"; - m_useCINTlibrary = false; - m_debug = false; - m_showBranches = false; -} -//__________________________________________________________________________ -cobs::cobs(string inputFile, string outputFile) : - m_inputFilename(inputFile), - m_outputFilename(outputFile) -{ - m_compressionLevel = 6; - m_splitLevel = 99; - m_dedicatedMemory = 30720; //30Mb - m_minCompressionFactor = 1.0; - m_libraryName = "RFT"; - m_libraryDirName = "RFT/RFT.so"; - m_useCINTlibrary = false; - m_debug = false; - m_showBranches = false; -} - -//__________________________________________________________________________ -void cobs::setDebug(bool debug) -{ - m_debug = debug; -} - -//__________________________________________________________________________ -void cobs::setOutputFile(string outputFile){ - m_outputFilename = outputFile; -} -//__________________________________________________________________________ -void cobs::setCompressionLevel(short CL){ - // from (0-9) ROOT default is 1. Outside HEP people use 6. - if (CL>9) CL=9; - if (CL<0) CL=0; - m_compressionLevel = CL; -} -//__________________________________________________________________________ -void cobs::setSplitLevel(short SL){ - m_splitLevel = SL; -} -//__________________________________________________________________________ -void cobs::setDedicatedMemory(int DM){ - // this call sets default amount of memory to be used. - // this is not split on all the trees. - // to give a memory per tree use setTreeMemory - // value is given in kb - m_dedicatedMemory = DM; -} -//__________________________________________________________________________ -void cobs::setDebugLevel(short DL){ - m_debug = DL; -} -//__________________________________________________________________________ -void cobs::setTreeToSkip(string treeName){ - // tree not to be used in transform - // when rewriting into new file it will be simply cloned. - // still compression level will be the one of the output file. - m_treesToSkip.push_back(treeName); -} -//__________________________________________________________________________ -void cobs::setTreeMemory(int mem, string treeName){ - // used to set dedicated memory for a specific tree - std::pair<int, string> p(mem, treeName); - m_memoryForATree.push_back(p); -} -//__________________________________________________________________________ -void cobs::setMinCompressionFactor(float minComp){ - // if compression of a branch in input file is smaller than value given - // the branch will not be compressed. Default value is 1.0 (never) - m_minCompressionFactor = minComp; -} -//__________________________________________________________________________ -void cobs::setLibraryName(std::string libN){ - m_libraryName=libN; - m_libraryDirName=libN+"/"+libN+".so"; -} -//__________________________________________________________________________ -void cobs::useCINTLibrary(bool use){ - m_useCINTlibrary = use; -} -//__________________________________________________________________________ -void cobs::mkProject(){ - // this function should be called just once before the first transform. - // it does not work in root versions before 5.25 - if (!m_useCINTlibrary) return; - std::cout<<"Making library corresponding to the file: "<< m_inputFilename<<std::endl; - TFile* f = TFile::Open(m_inputFilename.c_str()); - if (f->IsZombie()) { - cout << "Error! Can't opend the file to makeProject. Returning." << endl; - return; - } - f->MakeProject(m_libraryName.c_str(),"*","recreate++"); - f->Close(); -} -//__________________________________________________________________________ -bool cobs::order(short orderBy){ - // orders the branches in one of 3 ways: - // 1- byOffset (root default so normaly not to be used) - // 2- by Entry (optimal one when reading all the events) - // 3- byBranch (can be optimal in certain quite special cases) - // output file compression level is root default (=1) - - pid_t p = getpid(); - char com [50]; - sprintf (com, "ls -l /proc/%d/fd > openedfiles", p); - system(com); - - if (m_debug) { - cout<<"<cobs::order> "<<m_inputFilename; - if (orderBy==1) cout<<" (SortBasketsByOffset)"<<endl; - if (orderBy==2) cout<<" (SortBasketsByEntry)"<<endl; - if (orderBy==3) cout<<" (SortBasketsByBranch)"<<endl; - } - - if (m_useCINTlibrary) { - gSystem->Load(m_libraryDirName.c_str()); - } - - TFile* f = TFile::Open( m_inputFilename.c_str()); - if (f->IsZombie()) { - cout << "Error with file to be optimized. File is maybe not closed ?" << endl; - return false; - } - TFile* f2 = TFile::Open( m_outputFilename.c_str(),"RECREATE"); - - sprintf (com, "ls -l /proc/%d/fd > openedfiles1", p); - system(com); - - TTree* T2 = 0; - TList* keys = f->GetListOfKeys(); - TKey* key; - - TIter next( keys ); - while (( key = static_cast< TKey * > (next()) )) { - - TString name(key->GetName()); - TObject* obj = f->Get( name ); - - TClass *classPtr = gROOT->GetClass((const char *) key->GetClassName()); - if (m_debug) { - cout << "<cobs::order> (" << classPtr->GetName() <<") "<<name; - } - - if ( !(classPtr->GetBaseClass("TTree")) ) { - cout << "<cobs::order> WARNING ! object " << name << " not cloned!" << endl; - continue; - } - - TTree* T = static_cast<TTree*>(obj); - -// if (m_debug) cout<<"<cobs::order> Ordering tree "<<T->GetName()<<endl; - if (m_debug) cout<<" --- ordering "<<endl; - - if (orderBy==1) T2 = T->CloneTree(-1,"SortBasketsByOffset fast"); - else if (orderBy==2) T2 = T->CloneTree(-1,"SortBasketsByEntry fast"); - else if (orderBy==3) T2 = T->CloneTree(-1,"SortBasketsByBranch fast"); - - if (!T2) { - cout << "Did't get tree; bad orderBy? " << orderBy << "\n"; - return false; - } - int s=T2->Write("",TObject::kOverwrite); - if (!s) { - cout<<" WARNING FILE IS NOT OPTIMIZED. MAYBE NOT ENOUGH DISK SPACE? "<<endl; - delete f2; - delete f; - return false; - } - f2->WriteStreamerInfo(); - } - - //if (m_debug) cout << "------------ copy"<<endl; - //f2->ls(); - delete f2; - - //if (m_debug) cout << "------------ original"<<endl; - //f->ls(); - delete f; - return true; -} -//__________________________________________________________________________ -bool cobs::resizeBaskets(){ - // optimizes basket sizes - // newly produced file has compression level requested. - // by default uses function which minimizes total number of baskets in the file - - if (m_debug) cout<<"<cobs::resizeBaskets> Resizing baskets ... START"<<endl; - - // // TVirtualStreamerInfo::SetStreamMemberWise(1); - - if (m_useCINTlibrary) { - gSystem->Load(m_libraryDirName.c_str()); - } - - - TFile* f = TFile::Open( m_inputFilename.c_str()); - if (f->IsZombie()) { - cout << "Error file to be optimized. File is maybe not closed ?" << endl; - return false; - } - TFile* f2 = TFile::Open(m_outputFilename.c_str(),"RECREATE","",m_compressionLevel); - // f2->Write(); - - - TTree* T2 = 0; - TList* keys = f->GetListOfKeys(); - TKey* key; - - TIter next( keys ); - while (( key = static_cast< TKey * > (next()) )) { - - TString name(key->GetName()); - TObject* obj = f->Get( name ); - - TClass *classPtr = gROOT->GetClass((const char *) key->GetClassName()); - - if (m_debug) { - cout << "<cobs::resize> (" << classPtr->GetName() <<") "<<name; - } - - if ( !(classPtr->GetBaseClass("TTree")) ) { - cout << "<cobs::resize> WARNING ! object " << name << " not cloned!" << endl; - continue; - } - - TTree* T = static_cast<TTree*>(obj); - - // if no explicit request which trees *not* to optimize is made - // only optimize the main payload tree - int skip=0; - if ( m_treesToSkip.size() == 0) { - if (strcmp("CollectionTree",T->GetName())) skip=1; - } - else{ - // optimize all except those in skip-list - for (vector<string>::iterator i = m_treesToSkip.begin(); i != m_treesToSkip.end(); i++) - if (T->GetName() == (*i)) skip=1; - } - - if (m_debug){ - TObjArray *ls = T->GetListOfLeaves(); - Int_t nls = ls->GetEntries(); - cout<<"<cobs::resizeBaskets> "<<name <<" entries: "<<T->GetEntries()<<" size: "<<T->GetTotBytes() <<" zipped: "<<T->GetZipBytes()<<" leaves: "<<nls<<endl; - } - - int mem = m_dedicatedMemory; // default - for (vector<pair<int, string> >::iterator i=m_memoryForATree.begin(); i != m_memoryForATree.end(); i++) - if ( name==(*i).second ) mem = (*i).first; - - if (skip) { - cout<<"<cobs::resizeBaskets> skipping tree "<<T->GetName()<<endl; - T2 = T->CloneTree(-1,"SortBasketsByEntry fast"); - } - else { - SimpleOptimizeBaskets(T, mem, m_minCompressionFactor); - T2 = T->CloneTree(-1,"SortBasketsByEntry"); - } - - int s=T2->Write("",TObject::kOverwrite); - if (!s) { - cout<<" WARNING FILE IS NOT OPTIMIZED. MAYBE NOT ENOUGH DISK SPACE? "<<endl; - delete f2; - delete f; - return false; - } - f2->WriteStreamerInfo(); - - if (m_debug) cout<<"<cobs::resizeBaskets> new tree zip size: "<<T2->GetZipBytes()<<endl; - } - - - // if (m_debug) { - // cout << "------------ copy"<<endl; - // f2->ls(); - // } - delete f2; - - // if (m_debug) { - // cout << "------------ original"<<endl; - // f->ls(); - // } - delete f; - - cout<<"Optimizing baskets sizes FINISHED"<<endl; - return true; -} -//__________________________________________________________________________ -void cobs::changeSplitLevel(){ - // this function completely rewrites trees from one file to another - // it can change compression level - - if (m_debug) cout<<"Changing split level ... START"<<endl; - // TVirtualStreamerInfo::SetStreamMemberWise(1); - if (m_useCINTlibrary) gSystem->Load(m_libraryDirName.c_str()); - - TFile* f = TFile::Open( m_inputFilename.c_str()); - if (f->IsZombie()) { - cout << "Error! Can't open input file to change split level. returning. " << endl; - return; - } - TFile* f2 = TFile::Open(m_outputFilename.c_str(),"recreate","",m_compressionLevel); - - TList* keys = f->GetListOfKeys(); - TKey* key; - - TIter next( keys ); - while (( key = static_cast< TKey * > (next()) )) { - - TString name(key->GetName()); - TObject* obj = f->Get( name ); - - TClass* classPtr = gROOT->GetClass((const char *) key->GetClassName()); - - if ( !(classPtr->GetBaseClass("TTree") )) continue; - - TTree * T = static_cast<TTree*>(obj); - int nls = T->GetListOfLeaves()->GetEntries(); - // Double_t treeSize = (Double_t)T->GetTotBytes(); - - cout<<name<<"\t entries: "<<T->GetEntries()<<"\t Size: "<<T->GetTotBytes()<<"\t zipped:"<<T->GetZipBytes()<<"\t leaves: "<<nls<<endl; - - int skip=0; - for (vector<string>::iterator i = m_treesToSkip.begin(); i != m_treesToSkip.end(); i++) - if (name==(*i)) skip=1; - if (skip) { - if (m_debug) cout<<"skipping this tree"<<endl; - TTree *T2 = T->CloneTree(-1,"fast"); - T2->Write("", TObject::kOverwrite); - cout<<"---------------------------------------------------"<<endl; - continue; - } - - RecreateTheTree( T ); - } - - delete f2; - - if (m_debug) cout<<"Changing split level ... STOP"<<endl; -} -//__________________________________________________________________________ -void cobs::SimpleOptimizeBaskets(TTree* tree, unsigned long memory, float minComp){ - // function which minimizes total number of baskets in the file - // it will not take more memory than a total tree size - - if (tree->GetDirectory()->IsWritable()) tree->FlushBaskets(); - - memory *= 1024; // change to bytes - TObjArray *leaves = tree->GetListOfLeaves(); - const int nleaves = leaves->GetEntries(); - - int * totSize = new int[nleaves]; - int * basketSize = new int[nleaves]; - int * baskets = new int[nleaves]; - float *CF = new float[nleaves]; - - - int Nnb=0; int NBnb=0; - - for (int i=0;i<nleaves;i++) { // collects data needed - TLeaf *leaf = (TLeaf*)leaves->At(i); - TBranch *branch = leaf->GetBranch(); - int nb = branch->GetListOfBranches()->GetEntries(); - - totSize[i] = branch->GetTotBytes(); - basketSize[i] = totSize[i]; - baskets[i] = 1; - CF[i] = 1.0; - if (branch->GetTotBytes()) CF[i]= (float)branch->GetZipBytes()/branch->GetTotBytes(); - - if (nb > 0) { - Nnb++; - NBnb += 1 + int(branch->GetTotBytes() /2048); - // cout << "no B: " - // << "\t bs: "<<branch->GetBasketSize() - // << "\t tot byte: "<< branch->GetTotBytes() - // << "\t tot size: " << branch->GetTotalSize() - // << "\t zip size: " << branch->GetZipBytes() - // <<"\t name: "<<branch->GetName() <<endl; - } - - } - // cout<<"Nnb: "<<Nnb<<"\tNbasketsNB:"<<NBnb<<endl; - - while(true){ // recursive optimization - - double totMem=0; - for (int i=0;i<nleaves;i++) - totMem += basketSize[i]; - - if ( totMem < memory) break; - - int maxSpare=-1; int mi=-1; - for (int i=0;i<nleaves;i++){ - int spare=totSize[i]/baskets[i]-totSize[i]/(baskets[i]+1); - if (maxSpare<spare){ - maxSpare=spare; - mi=i; - } - } - baskets[mi]++; - basketSize[mi]=totSize[mi]/baskets[mi]; - // cout<<"Spare: "<<totSize[mi]/(baskets[mi]-1)-totSize[mi]/baskets[mi]<<"\t baskets: "<<baskets[mi]<<"\t"; - } - - double totMem = 0; - int totBas = 0; - int maxBs = -1; - int minBs = 1024*1024*1024; - for (int i=0;i<nleaves;i++) { - TLeaf *leaf = (TLeaf*)leaves->At(i); - TBranch *branch = leaf->GetBranch(); - if (basketSize[i]==0) basketSize[i]=16; - basketSize[i] = basketSize[i] - basketSize[i] % 8; - branch->SetBasketSize(basketSize[i]); - if (CF[i]<minComp) branch->SetCompressionLevel(0); - - totMem += basketSize[i]; - totBas += baskets[i]; - if (basketSize[i]<minBs) minBs=basketSize[i]; - if (basketSize[i]>maxBs) maxBs=basketSize[i]; - // cout<<basketSize[i]<<"\t"<<baskets[i]<<endl; - } - if (m_debug) cout<<"<cobs::SimpleOptimizeBaskets> Total memory buffer: " - <<totMem * 1e-3 <<" kb total baskets: "<<totBas<<"\tmin BS: "<<minBs<<"\tmax BS: "<<maxBs<<endl; - //cout<<"-------------------------------------------------------------------------------------------------"<<endl; - delete [] totSize; - delete [] basketSize; - delete [] baskets; - delete [] CF; -} - - -//__________________________________________________________________________ -bool cobs::RecreateTheTree(TTree* T){ - // deep tree copy - if (m_debug) cout << "<cobs::RecreateTheTree> Recreating tree "<< T->GetName(); - - TTree *T2 = new TTree(T->GetName(),T->GetTitle(),m_splitLevel); - - Int_t nbranches = T->GetListOfBranches()->GetEntriesFast(); - TBranch *branch; - - for (Int_t i=0; i<nbranches; i++) { - - branch = (TBranch*)T->GetListOfBranches()->UncheckedAt(i); - branch->SetAddress(0); - - if (m_debug) { - cout <<"<cobs::RecreateTheTree> "<< branch->GetName() - //<<"\t class: "<< branch->GetClassName() - <<"\t BS: "<< branch->GetBasketSize()<<"\t size: "<< branch->GetTotalSize() << endl; - } - - if (strlen(branch->GetClassName())) { // branch with object - T2->Branch(branch->GetName(), branch->GetClassName(), branch->GetAddress(), branch->GetBasketSize(), m_splitLevel); - } else { // branch with simple type - T2->Branch(branch->GetName(), branch->GetAddress(), branch->GetBasketSize(), m_splitLevel); - } - } - - unsigned long nentries = T->GetEntries(); - for ( unsigned long e = 0; e < nentries; ++e) { - T->GetEntry(e); - T2->Fill(); - if (!(e%100)) cout << "\tevent: "<< e << endl; - } - - int s = T2->Write("", TObject::kOverwrite); - if (!s) { - cout<<" WARNING FILE IS NOT OPTIMIZED. MAYBE NOT ENOUGH DISK SPACE? "<<endl; - return false; - } - //cout << "<cobs::RecreateTheTree> Recreated tree. Now "<< T2->GetTotBytes()/1000000<<" MB "<<endl; - return true; -} -//__________________________________________________________________________ -void cobs::printTrees(std::string fileName){ - - //gDebug=1; - - TFile* f = TFile::Open( fileName.c_str()); - if (f->IsZombie()) { - cout << "Error! Can't open file to print trees. returning..." << endl; - return; - } - cout << Form("%-45s %12s[Mb]%9s[Mb]%8s %8s %8s\n", - "TREE","TotBytes","ZipBytes","Entries","Branches","Leaves") << endl; - - // Loop on keys and find all trees - TList* keys = f->GetListOfKeys(); - TKey* key; - TIter next( keys ); - while ( (key = (TKey *)(next())) ) { - TString name(key->GetName()); - TClass *classPtr = gROOT->GetClass((const char *) key->GetClassName()); - if ( classPtr->GetBaseClass("TTree") ) { - TTree* T = (TTree*)(f->Get(name)); - - Int_t nentries = T->GetEntries(); - Int_t nbranches = T->GetListOfBranches()->GetEntries(); - Int_t nleaves = T->GetListOfLeaves()->GetEntries(); - - printf("TREE %-45s %12.6f %12.6f %8d %8d %8d\n", - T->GetName(), - 1.e-6*(Float_t)(T->GetTotBytes()), - 1.e-6*(Float_t)(T->GetZipBytes()), - nentries, nbranches, nleaves - ); - - if (m_showBranches == true) printBranches(T); - - } else { - // also show other objects on file - cout << "("<<classPtr->GetName()<<") "<<name<<endl; - } - } - - delete f; -} -//____________________________________________________________________________ -Int_t cobs::printBranches(TTree *T) { - - Int_t nbranches = T->GetListOfBranches()->GetEntries(); - Int_t nb=0; - Int_t entry=0; - Int_t getall=1; - - //hBranchSizes = new TH1F("hbranchsizes","Branch Sizes (unzipped)",nbranches,0,nbranches); - //hBranchSizes->SetYTitle("Mb"); - //hBranchSizes->SetBit(TH1::kCanRebin); - - printf("%112s\n","basketsize[kb]"); - - for (Int_t i=0;i<nbranches;i++) { - TBranch* branch = (TBranch*)T->GetListOfBranches()->At(i); - - branch->SetAddress(0); - - const char* pname = branch->GetName(); - const char* clname = branch->GetClassName(); - - // only show transient part of name - const char * tname = pname; - if (strstr(pname,clname)) { - tname = pname+strlen(clname)+1; - } - - nb = branch->GetEntry(entry, getall); - if (nb < 0) { - cout << "I/O error reading branch " << branch->GetName() << endl; - return nb; - } - Float_t ntot= branch->GetTotBytes("*"); - Float_t nzip= branch->GetZipBytes("*"); - - Int_t nbranches = branch->GetListOfBranches()->GetEntries(); - Int_t basketsize = branch->GetBasketSize(); - - //if (ntot>20.e6) { - printf("BRANCH %-43s %12.6f %12.6f %8d %8.3f\n", - tname, 1.e-6*(Double_t)(ntot), 1.e-6*(Double_t)(nzip), - nbranches, 1.e-3*basketsize ); - - //hBranchSizes->Fill(branch->GetName(),1.e-6*(Double_t)(ntot)); - //} - } - cout << endl; - - return nbranches; -} - diff --git a/Database/AthenaPOOL/RootFileTools/src/cobs.h b/Database/AthenaPOOL/RootFileTools/src/cobs.h deleted file mode 100644 index 031e4a4c19896d2b5b7aaa89f5d7246739fe58df..0000000000000000000000000000000000000000 --- a/Database/AthenaPOOL/RootFileTools/src/cobs.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include <vector> -#include <string> - -#include <TTree.h> - -class cobs { - -public: - - cobs() - : m_useCINTlibrary(false), - m_compressionLevel(0), - m_splitLevel(0), - m_dedicatedMemory(0), - m_minCompressionFactor(0), - m_debug(false), - m_showBranches(false) - {} - cobs(std::string inputFile); - cobs(std::string inputFile, std::string outputFile); - - void setDebug(bool debug); - void setOutputFile(std::string outputFile); - void setCompressionLevel(short CL); - void setSplitLevel(short SL); - void setDedicatedMemory(int DM); // in kilobytes - void setDebugLevel(short DL); - void setTreeToSkip(std::string treeName); - void setTreeMemory(int mem, std::string treeName); - void setMinCompressionFactor(float minComp); - void setLibraryName(std::string); - void useCINTLibrary(bool use=false); - void mkProject(); - - // clone fast to reorder baskets (default: by entry) - bool order(short orderBy=2); - bool resizeBaskets(); - void changeSplitLevel(); - - void printTrees(std::string fileName); - Int_t printBranches(TTree *T); - void setShowBranches(bool b) { m_showBranches = b; } - -private: - - void SimpleOptimizeBaskets(TTree*, unsigned long, float ); - bool RecreateTheTree(TTree* ); - - std::string m_libraryName; - std::string m_libraryDirName; - bool m_useCINTlibrary; - std::string m_inputFilename; - std::string m_outputFilename; - short m_compressionLevel; - short m_splitLevel; - int m_dedicatedMemory; // in kb's - float m_minCompressionFactor; // don't compress branches with CF smaller than this number - bool m_debug; - std::vector<std::string> m_treesToSkip; - std::vector<std::pair<int, std::string> > m_memoryForATree; - - bool m_showBranches; - -}; diff --git a/Database/AthenaPOOL/RootFileTools/src/components/RootFileTransformations_entries.cxx b/Database/AthenaPOOL/RootFileTools/src/components/RootFileTransformations_entries.cxx deleted file mode 100644 index efa19ea658873420417bb56ca19895f73e74102d..0000000000000000000000000000000000000000 --- a/Database/AthenaPOOL/RootFileTools/src/components/RootFileTransformations_entries.cxx +++ /dev/null @@ -1,5 +0,0 @@ -#include "../RootFileTransformationsTool.h" - - -DECLARE_COMPONENT( RootFileTransformationsTool ) - diff --git a/Database/AthenaPOOL/RootFileTools/src/mergeD3PD.cxx b/Database/AthenaPOOL/RootFileTools/src/mergeD3PD.cxx deleted file mode 100644 index 28f21b61df4b10ca5293ff75818e71ecfd7c459d..0000000000000000000000000000000000000000 --- a/Database/AthenaPOOL/RootFileTools/src/mergeD3PD.cxx +++ /dev/null @@ -1,406 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// TODO: -// make sure that we use only the last of all the trees with the same name !!! - -#include <Riostream.h> - -#include <TTree.h> -#include <TFile.h> -#include <TChain.h> -#include <TChainElement.h> -#include <TSystem.h> -#include <TROOT.h> -#include <TKey.h> -#include <TLeaf.h> -#include <TStopwatch.h> - -#include <stdio.h> -#include <stdlib.h> -#include <iostream> -#include <sstream> - -using namespace std; - -class mTree{ -public: - mTree(string a):filename(a), entries(0){} - string filename; - long entries; -}; - -class mTrees{ -public: - mTrees(string a):name(a),leaves(0),totalSize(0){} - string name; - int leaves; - double totalSize; - vector<unsigned int> basketSize;// this is the value to be optimized - at beggining = totSize - vector<unsigned int> totSize;// this is value of ZIPPED SIZES collected from all the files - vector<unsigned int> baskets;// this is cached to speed up calculation - at beggining = 1 - void addFile(string s){ m_tree.push_back(mTree(s)); } - - void setLeaves(int l){ - leaves=l; - for (int w=0;w<l;w++){ - totSize.push_back(0); - } - } - - void recalculate(){ - cout<<"recalculate baskets"<<endl; - for (int w=0;w<leaves;w++){ - basketSize.push_back(totSize[w]); - baskets.push_back(1); - totalSize+=totSize[w]; - } - } - - void optimize(unsigned long memory){ - - cout<<"optimize baskets. total tree size:"<<totalSize<<"\t memory: "<<memory<<endl; - while(true){ - double totMem=0; - for (int i=0;i<leaves;i++) - totMem += basketSize[i]; - - if ( totMem < memory) break; - - int maxSpare=-1; int mi=-1; - for (int i=0;i<leaves;i++){ - int spare=totSize[i]/baskets[i]-totSize[i]/(baskets[i]+1); - if (maxSpare<spare){ - maxSpare=spare; - mi=i; - } - } - if (mi < 0) continue; - baskets[mi]++; - basketSize[mi]=totSize[mi]/baskets[mi]; - // cout<<"totMem: "<<totMem<<"\tSpare: "<<totSize[mi]/(baskets[mi]-1)-totSize[mi]/baskets[mi]<<"\t baskets: "<<baskets[mi]<<"\n"; - } - roundBasketSize(); - } - - void roundBasketSize(){ - - cout<<"round basket sizes"<<endl; - double totMem = 0; - int totBas = 0; - unsigned int maxBs = 0; - unsigned int minBs = 1024*1024*1024; - - for (int w=0;w<leaves;w++){ - if (basketSize[w]==0) basketSize[w]=16; - basketSize[w] = basketSize[w] - basketSize[w] % 8; - totMem += basketSize[w]; - totBas += baskets[w]; - if (basketSize[w]<minBs) minBs=basketSize[w]; - if (basketSize[w]>maxBs) maxBs=basketSize[w]; - } - cout<<"Total memory buffer: "<<totMem/1024<<" kb total baskets: "<<totBas<<"\tmin BS: "<<minBs<<"\tmax BS: "<<maxBs<<endl; - cout<<"-------------------------------------------------------------------------------------------------"<<endl; - } - - vector<mTree>::const_iterator bi(){return (vector<mTree>::const_iterator) m_tree.begin();}; - vector<mTree>::const_iterator ei(){return (vector<mTree>::const_iterator) m_tree.end();}; - -private: - vector<mTree> m_tree; -}; - -std::string sfo=""; - -vector<mTrees> ALL; - -void ren(){ - cout<<"renaming ... "<<endl; - std::string com="rm "+sfo+".root; for i in *temporary*.root; do mv \"$i\" \"${i/_temporary/}\";done"; - // cout<<"command to execute: "<<com<<endl; - int ret=system (com.c_str()); - if (!ret) cout<<"files renamed OK"<<endl; -} - -void warmUp(const char* fn){ - std::string com="cat "+std::string(fn)+" > /dev/null "; - cout<<"warming up the cache for file: "<<com<<endl; - int ret=system (com.c_str()); - if (!ret) cout<<"file warmed up OK"<<endl; -} - - -void order(int m){ - - TChain *ch=new TChain(ALL.begin()->name.c_str()); - std::string o=sfo+"*.root"; - ch->Add(o.c_str()); - TObjArray *oaFiles=ch->GetListOfFiles(); - - for(int i=0;i<oaFiles->GetEntries();i++){ - TChainElement *element = (TChainElement*)oaFiles->At(i); - const char *fn=element->GetTitle(); - - TStopwatch timer; - timer.Start(); - cout<<"optimizing: "<<fn<<endl; - // warmUp(fn); - - timer.Start(); - TFile *fIn = TFile::Open(fn); - - std::stringstream out; out << i; - std::string s = out.str(); - std::string tmp = sfo+"_temporary_"+s+".root"; - TFile* fOut=TFile::Open(tmp.c_str(),"recreate","",6); - - // - ordering - for (vector<mTrees>::const_iterator it=ALL.begin();it!=ALL.end();it++){ - TTree *tc2 = (TTree*)fIn->Get(it->name.c_str()) ; - TTree* TC2; - if (m==2) TC2= tc2->CloneTree(-1,"SortBasketsByEntry fast"); - else TC2 = tc2->CloneTree(-1,"SortBasketsByBranch fast"); - TC2->Write("",TObject::kOverwrite); - } - // - - - timer.Stop(); - cout<<"ordering file: "<<i<<" \t\twallclock time: "<< timer.RealTime()<<"\t CPU time: "<<timer.CpuTime()<<endl; - - fOut->Close(); - fIn->Close(); - } - - cout<<"ordering done"<<endl; - ren(); - return; -} - -void optimizeBasketSizes(){ - - for (vector<mTrees>::iterator it=ALL.begin(); it!=ALL.end(); it++) { - - cout<<"Doing tree: "<<it->name<<endl; - // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> SUMMING UP BRANCH SIZES OVER ALL THE FILES - for(vector<mTree>::const_iterator itt=it->bi(); itt!=it->ei(); itt++){ // loop over files having this tree - - TFile* f = TFile::Open(itt->filename.c_str()); - TTree* t = (TTree*) f->Get(it->name.c_str()); - - for (int i=0; i<it->leaves; i++) { - TBranch* branch = (TBranch*)t->GetListOfBranches()->UncheckedAt(i); - branch->SetAddress(0); - // cout <<i<<"\t"<<branch->GetName()<<"\t BS: "<< branch->GetBasketSize()<<"\t size: "<< branch->GetTotalSize()<< "\ttotbytes: "<<branch->GetTotBytes() << endl; - it->totSize[i] += branch->GetTotBytes(); - } - - f->Close(); - } - - cout<<"got basket sizes from all the files"<<endl; - it->recalculate(); - - it->optimize(40*1024*1024); // in bytes ! - - - } -} - -void createMergedFile(){ - - std::string oname=sfo+".root"; - TFile* fOut = TFile::Open(oname.c_str(),"RECREATE","",1); - TDirectory *gDirectory_save = gDirectory; - if (fOut->IsZombie()){ - cout<<"File "<<oname<<" isZombified. Output file can not be created."<<endl; - return; - } - - TTree *newtree=0; - for (vector<mTrees>::iterator it=ALL.begin(); it!=ALL.end(); it++) { - - TFile* f = TFile::Open((it->bi())->filename.c_str()); - TTree* t = (TTree*) f->Get(it->name.c_str()); - - // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> CREATING NEW TREE - newtree = (TTree*)t->CloneTree(0); // no copy of events - - newtree->SetDirectory(gDirectory_save); - - // Once the cloning is done, separate the trees,to avoid as many side-effects as possible - t->GetListOfClones()->Remove(newtree); - t->ResetBranchAddresses(); - newtree->ResetBranchAddresses(); - - // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Setting optimized basket sizes. - for (int w=0;w<it->leaves;w++) { - TBranch* branch=(TBranch*)newtree->GetListOfBranches()->UncheckedAt(w); - branch->SetBasketSize(it->basketSize[w]); - // cout<<"basket size: "<<basketSize[w]<<"\t number of baskets:"<<baskets[w]<<endl; - } - - // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> copying data. - - for(vector<mTree>::const_iterator itt=it->bi(); itt!=it->ei(); itt++){ // loop over files having this tree - - TFile* f = TFile::Open(itt->filename.c_str()); - TTree* t = (TTree*) f->Get(it->name.c_str()); - - unsigned long nentries = t->GetEntries(); - newtree->CopyAddresses(t); - for ( unsigned long e = 0; e < nentries; ++e) { - t->GetEntry(e); - newtree->Fill(); - } - t->ResetBranchAddresses(); // Disconnect from new tree. - f->Close(); - cout<<"Current file entries: "<<nentries <<endl; - } - - fOut->cd(); - int s = newtree->Write("", TObject::kOverwrite); - if (!s) { - cout<<" WARNING FILE IS NOT OPTIMIZED. MAYBE NOT ENOUGH DISK SPACE? "<<endl; - return; - } - } - - fOut=newtree->GetCurrentFile(); - fOut->Write(); - fOut->Close(); - -} - - - -int main(int argc,char* argv[]){ - - - if (argc < 5) { - cout << "Usage is:\n"; - cout << "\t-in <infile> --- this can be of the form /data/higgs/my*nobel*_000*.1 \n"; - cout << "\t-out <outfile> --- this can be of the form /data/out/higgs - as .root will be appended\n"; - cout << "\t-maxsize <tree max size> --- maximum zip size of the main tree (in Mb). The default value is 6000.\n"; - cout << "\t-byBranch --- baskets in output files will be ordered by branch. The default is by Entry.\n"; - cout << "\t-noCollectionTree --- TTree named CollectionTree is usualy needed if you will use merged file in Athena\n"; - std::cin.get(); - return 0; - } - - char *fi = NULL; - Long64_t maxsize=6000; - bool noCollectionTree=false; - int toOrder=2; - - for (int i = 1; i < argc; i++) { - if (! strcmp(argv[i], "-in") ) { - fi = argv[i + 1]; - } else if (! strcmp(argv[i], "-out") ) { - sfo=std::string(argv[i + 1]); - } else if (! strcmp(argv[i], "-maxsize") ) { - maxsize = atoi(argv[i + 1]); - } else if (! strcmp(argv[i], "-byBranch") ){ - toOrder=1; - } else if (! strcmp(argv[i], "-noCollectionTree")){ - noCollectionTree=true; - } - } - - TTree::SetMaxTreeSize(maxsize*1024*1024); - - cout<<"Input files: "<<fi<<"\nOutput file: "<<sfo<<"\nMax Tree Size: "<<maxsize<<endl; - - TChain *ch = new TChain("CollectionTree"); - ch->Add(fi); - - TObjArray *oaFiles = ch->GetListOfFiles(); - if (!oaFiles->GetEntries()){ - cout<<"No input files found!"<<endl; - return 0; - } - - - cout<<"I chain created..."<<endl; - - - - // ==================================================================== take tree names from the first file - - TFile f( ((TChainElement*) oaFiles->At(0))->GetTitle() ); - - TList* keys = f.GetListOfKeys(); - TKey* key; TIter next( keys ); - string oldname(""); - while (( key = static_cast< TKey * > (next()) )) { - string name(key->GetName()); - TClass *classPtr = gROOT->GetClass((const char *) key->GetClassName()); - if ( !(classPtr->GetBaseClass("TTree")) ) { - cout << " WARNING ! object " << name << " will not be merged!" << endl; - continue; - } else { - if (oldname==name) continue; - oldname=name; - if (noCollectionTree and name=="CollectionTree") continue; - cout<< "Tree to merge: "<< name <<endl; - mTrees tt(name); - ALL.push_back(tt); - } - } - key=NULL; - f.Close(); - - - cout<<"II trees to merge determined ..."<<endl; - // ===================================================================== - - std::vector<TFile*> fFile (oaFiles->GetEntries()); - for(int i=0;i<oaFiles->GetEntries();i++){ - - const char* fn = ((TChainElement*)oaFiles->At(i))->GetTitle(); - fFile[i] = TFile::Open(fn); - - if (fFile[i]->IsZombie()){ - cout<<"File "<<fn<<" isZombified. Its corrupted or not a root file."<<endl; - continue; - } - - for(vector<mTrees>::iterator it=ALL.begin();it!=ALL.end();it++){ - TTree* tmpt=(TTree*)fFile[i]->Get( (it->name).c_str() ); - int leaves=tmpt->GetListOfBranches()->GetEntriesFast(); - - if (!leaves){ - cout<<"WARNING! Tree: "<< (it->name).c_str() <<" in file: "<<fn<<" contains no events. Will not be merged."<<endl; - } - else{ - it->addFile(fn); - if (!it->leaves) - it->setLeaves(leaves); - } - } - - fFile[i]->Close(); - } - - delete ch; ch=NULL; - oaFiles=NULL; - cout<<"Files checked and verified..."<<endl; - // ===================================================================== - - TStopwatch timer; - timer.Start(); - - optimizeBasketSizes(); - createMergedFile(); - - timer.Stop(); - cout<<"Done in wallclock: "<< timer.RealTime()<<"\t\t CPU time: "<<timer.CpuTime()<<endl; - - order(toOrder); - -return 0; -} - - - - diff --git a/Database/AthenaPOOL/RootFileTools/src/releaseFileCache.cxx b/Database/AthenaPOOL/RootFileTools/src/releaseFileCache.cxx deleted file mode 100644 index 8564a114573b43cad05a2234fcffbc7d28fd0a0e..0000000000000000000000000000000000000000 --- a/Database/AthenaPOOL/RootFileTools/src/releaseFileCache.cxx +++ /dev/null @@ -1,31 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include <unistd.h> -#include <fcntl.h> -#include <stdio.h> -int main(int argc, char *argv[]) { - if (argc==1) { - puts(" usage: releaseFileCache <filename>\n removes from memory all the cache associtated to the file given."); - return 0; - } - int fd; - fd = open(argv[1], O_RDONLY); - if (fd < 0) { - perror ("open"); - return 1; - } -#ifndef __APPLE__ - fdatasync(fd); - if (posix_fadvise(fd, 0,0,POSIX_FADV_DONTNEED) < 0) { - perror ("posix_fadvise"); - return 1; - } -#else - fsync(fd); -#endif - close(fd); - return 0; -} - diff --git a/Database/CoolRunQuery/CMakeLists.txt b/Database/CoolRunQuery/CMakeLists.txt index 01dcbe77d5a77a13d017d3abc45b645e65f13920..994f19576bbc9721de95d99d67f9caf2ca333b14 100644 --- a/Database/CoolRunQuery/CMakeLists.txt +++ b/Database/CoolRunQuery/CMakeLists.txt @@ -1,4 +1,3 @@ -# $Id: CMakeLists.txt 722392 2016-02-08 12:13:08Z krasznaa $ # # CMake description for the package. # @@ -6,6 +5,9 @@ # Declare the package's name: atlas_subdir( CoolRunQuery ) +# Necessary external(s): +find_package( cx_Oracle ) + # Declare the python modules of the package: atlas_install_python_modules( python/*.py python/html python/selector python/utils python/output ) diff --git a/Database/IOVDbMetaDataTools/src/IOVDbMetaDataTool.h b/Database/IOVDbMetaDataTools/src/IOVDbMetaDataTool.h index e6a9b928c27c3e09ac3c49a66577e2ffd318b07a..77052951f838b2a909aea4dc1a2a44d966520b2e 100755 --- a/Database/IOVDbMetaDataTools/src/IOVDbMetaDataTool.h +++ b/Database/IOVDbMetaDataTools/src/IOVDbMetaDataTool.h @@ -87,9 +87,6 @@ public: /// processed StatusCode endInputFile(const SG::SourceID&) {return this->endInputFile();} - /// Function called when the tool should write out its metadata - StatusCode metaDataStop(const SG::SourceID&) {return this->metaDataStop();} - /// Incident service handle listening for BeginInputFile and EndInputFile. void handle(const Incident& incident); diff --git a/Database/IOVDbSvc/CMakeLists.txt b/Database/IOVDbSvc/CMakeLists.txt index 4c3dd3469129190a19a15758f81730612dc97a33..4aa82c1ebdf154f90244b400e19d24eb1d931109 100644 --- a/Database/IOVDbSvc/CMakeLists.txt +++ b/Database/IOVDbSvc/CMakeLists.txt @@ -51,6 +51,7 @@ atlas_add_component( IOVDbSvc # Install files from the package: atlas_install_python_modules( python/*.py ) atlas_install_joboptions( share/*.py ) +atlas_install_joboptions( share/*.txt ) atlas_add_test( IOVDbSvc_test @@ -59,7 +60,7 @@ atlas_add_test( IOVDbSvc_test INCLUDE_DIRS ${COOL_INCLUDE_DIRS} LINK_LIBRARIES AthenaBaseComps AthenaKernel SGTools StoreGateLib SGtests GaudiKernel TestTools EventInfo IOVSvcLib xAODEventInfo PersistentDataModel ${COOL_LIBRARIES} PROPERTIES TIMEOUT 300 - EXTRA_PATTERNS "^HistogramPersis.* INFO|^IOVSvc +DEBUG|^IOVSvcTool +DEBUG |Warning in <TFile::Init>: no" + EXTRA_PATTERNS "^HistogramPersis.* INFO|^IOVSvc +DEBUG|^IOVSvcTool +DEBUG |Warning in <TFile::Init>: no |Initializing" ENVIRONMENT "JOBOPTSEARCHPATH=${CMAKE_CURRENT_SOURCE_DIR}/share" ) atlas_add_test( IOVDbSvc_Boost_test diff --git a/Database/IOVDbSvc/share/IOVDbSvc_test.ref b/Database/IOVDbSvc/share/IOVDbSvc_test.ref index 2a02bdebc6556c854ba9a44acd5edb3e6eb8f9cf..01fe30e1b089e75fa2be3dcdcfaba375ff8d3c12 100644 --- a/Database/IOVDbSvc/share/IOVDbSvc_test.ref +++ b/Database/IOVDbSvc/share/IOVDbSvc_test.ref @@ -1,7 +1,7 @@ IOVDbSvc_test -Initializing Gaudi ApplicationMgr using job opts ../share/IOVDbSvc_test.txt +Initializing Gaudi ApplicationMgr using job opts user_path/athena/Database/IOVDbSvc/share/IOVDbSvc_test.txt JobOptionsSvc INFO # =======> user_path/athena/Database/IOVDbSvc/share/../share/IOVDbSvc_test.txt JobOptionsSvc INFO # (1,1): ApplicationMgr.CreateSvc += ["StoreGateSvc/DetectorStore"] JobOptionsSvc INFO # (2,1): IOVDbSvc.Folders = ["/key1", "/key2<extensible/>"] @@ -33,18 +33,18 @@ Domain[ROOT_All] INFO > Access DbDomain READ [ROOT_All] IOVDbSvc INFO Opened read transaction for POOL PersistencySvc IOVDbSvc INFO Only 5 POOL conditions files will be open at once IOVDbFolder INFO Extensible folder /key2 -IOVDbSvc INFO Initialised with 1 connections and 2 folders +IOVDbSvc INFO Initialised with 2 connections and 2 folders IOVDbSvc INFO Service IOVDbSvc initialised successfully -IOVDbSvc INFO Opening COOL connection for sqlite://;schema=cooldummy.db;dbname=OFLP200 +IOVDbSvc INFO Opening COOL connection for sqlite://none;schema=mytest.db;dbname=OFLP200 IOVSvc INFO No IOVSvcTool associated with store "StoreGateSvc" IOVSvcTool INFO IOVRanges will be checked at every Event -IOVDbSvc INFO Disconnecting from sqlite://;schema=cooldummy.db;dbname=OFLP200 +IOVDbSvc INFO Disconnecting from sqlite://none;schema=mytest.db;dbname=OFLP200 test1 -IOVDbSvc INFO Opening COOL connection for sqlite://;schema=cooldummy.db;dbname=OFLP200 -IOVDbSvc INFO Disconnecting from sqlite://;schema=cooldummy.db;dbname=OFLP200 +IOVDbSvc INFO Opening COOL connection for sqlite://none;schema=mytest.db;dbname=OFLP200 +IOVDbSvc INFO Disconnecting from sqlite://none;schema=mytest.db;dbname=OFLP200 AthenaPoolCnvSvc INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00 EventPersistenc... INFO Added successfully Conversion service:AthenaPoolCnvSvc IOVDbFolder INFO Increase cache length (step 1) for folder /key2 to 8589934590 at validityKey 85899345935 -IOVDbSvc INFO Opening COOL connection for sqlite://;schema=cooldummy.db;dbname=OFLP200 -IOVDbSvc INFO Disconnecting from sqlite://;schema=cooldummy.db;dbname=OFLP200 +IOVDbSvc INFO Opening COOL connection for sqlite://none;schema=mytest.db;dbname=OFLP200 +IOVDbSvc INFO Disconnecting from sqlite://none;schema=mytest.db;dbname=OFLP200 diff --git a/Database/IOVDbSvc/share/IOVDbSvc_test.txt b/Database/IOVDbSvc/share/IOVDbSvc_test.txt index 16d0366b1a795add21841623765d5a335fbb4f4e..114f072e21af245afaff0a0e85172dbba5ab6b1d 100644 --- a/Database/IOVDbSvc/share/IOVDbSvc_test.txt +++ b/Database/IOVDbSvc/share/IOVDbSvc_test.txt @@ -1,3 +1,3 @@ ApplicationMgr.CreateSvc += { "StoreGateSvc/DetectorStore" }; -IOVDbSvc.Folders = { "/key1", "/key2<extensible/>" }; +IOVDbSvc.Folders = { "<db>sqlite://none;schema=mytest.db;dbname=OFLP200</db> /key1", "<db>sqlite://none;schema=mytest.db;dbname=OFLP200</db> /key2<extensible/>" }; EventPersistencySvc.CnvServices += { "AthenaPoolCnvSvc" }; diff --git a/Database/IOVDbSvc/src/IOVDbFolder.cxx b/Database/IOVDbSvc/src/IOVDbFolder.cxx index ab57c5329fbf3ab6c87ae586ca7ab8c82cbe5911..0687f4f2d9bdb2854241243fdf3bcc60c95ec39c 100644 --- a/Database/IOVDbSvc/src/IOVDbFolder.cxx +++ b/Database/IOVDbSvc/src/IOVDbFolder.cxx @@ -380,6 +380,7 @@ bool IOVDbFolder::loadCache(const cool::ValidityKey vkey, m_cacheattr[m_cacheattr.size()-1].fastCopyData(*pitr); m_nbytesread+=IOVDbNamespace::attributeListSize(*pitr); } + // save pointers to start and end m_cacheccstart.push_back(istart); m_cacheccend.push_back(m_cacheattr.size()); @@ -1246,7 +1247,6 @@ IOVDbFolder::setSharedSpec(const coral::AttributeList& atrlist) { " in folder " << m_foldername << " will not be counted for bytes-read statistics" ); } } - m_nbytesread+=IOVDbNamespace::attributeListSize(atrlist); ATH_MSG_DEBUG( "Setup shared AttributeListSpecification with " << m_cachespec->size() << " elements" ); } diff --git a/Database/IOVDbSvc/test/IOVDbCoolFunctions_test.cxx b/Database/IOVDbSvc/test/IOVDbCoolFunctions_test.cxx index 9e38fa3ddd126b73357de0614ab06dca82854b17..e077c901d5219d974564cc437fb4e8a40c46968f 100644 --- a/Database/IOVDbSvc/test/IOVDbCoolFunctions_test.cxx +++ b/Database/IOVDbSvc/test/IOVDbCoolFunctions_test.cxx @@ -79,11 +79,13 @@ BOOST_AUTO_TEST_SUITE(CoolFunctionsTest) //needs coral::AttributeList argument auto pSpec=new coral::AttributeListSpecification; pSpec->extend<int>("myInt"); + pSpec->extend<int>("anotherInt"); pSpec->extend<std::string>("PoolRef"); coral::AttributeList attrList(*pSpec, true); attrList[0].setValue(1); - attrList[1].setValue(std::string("hello")); - BOOST_TEST(IOVDbNamespace::attributeListSize(attrList) ==9); + attrList[1].setValue(2); + attrList[2].setValue(std::string("hello")); + BOOST_TEST(IOVDbNamespace::attributeListSize(attrList) ==13); } // diff --git a/Database/IOVDbSvc/test/IOVDbFolder_test.cxx b/Database/IOVDbSvc/test/IOVDbFolder_test.cxx index 7a1dabf4d44dc843c8f4dde43bc6e7474c37c75f..df5d18c7409544ee39dc4a7efeb4c2b28f304366 100644 --- a/Database/IOVDbSvc/test/IOVDbFolder_test.cxx +++ b/Database/IOVDbSvc/test/IOVDbFolder_test.cxx @@ -83,7 +83,7 @@ BOOST_FIXTURE_TEST_SUITE(IOVDbFolderTest , GaudiKernelFixture) BOOST_FIXTURE_TEST_SUITE(IOVDbFolderMethods, TestFolderFixture) BOOST_AUTO_TEST_CASE(PublicMethods){ //preload tests - IOVDbConn connection("sqlite://;schema=cooldummy.db;dbname=OFLP200", true, parserFixture.log); + IOVDbConn connection("sqlite://;schema=IOVDbFolderTest.db;dbname=OFLP200", true, parserFixture.log); IOVDbFolder iovDbFolder(&connection, parserFixture.parser, parserFixture.log, clidSvc.get(),false); BOOST_TEST_CHECKPOINT("After instantiation, but before any loading method call"); BOOST_TEST(iovDbFolder.folderName() == "/key1"); @@ -91,7 +91,7 @@ BOOST_FIXTURE_TEST_SUITE(IOVDbFolderTest , GaudiKernelFixture) BOOST_TEST(iovDbFolder.conn() != nullptr); BOOST_TEST(iovDbFolder.multiVersion() == false); const bool isEpochTimestamp(true); - BOOST_TEST(iovDbFolder.timeStamp() != isEpochTimestamp); + BOOST_TEST(iovDbFolder.timeStamp() != isEpochTimestamp);//before looking BOOST_TEST(iovDbFolder.tagOverride() == false); BOOST_TEST(iovDbFolder.retrieved() == false); BOOST_TEST(iovDbFolder.noOverride() == false); @@ -111,14 +111,15 @@ BOOST_FIXTURE_TEST_SUITE(IOVDbFolderTest , GaudiKernelFixture) BOOST_TEST_CHECKPOINT("After preLoadFolder method call"); const std::string tag(""); auto addr=iovDbFolder.preLoadFolder(detStore.get(),0,600); - BOOST_TEST(iovDbFolder.loadCache(cool::ValidityKey((10ull<<32) + 20),600, tag, true) == true); + BOOST_TEST(iovDbFolder.loadCache(cool::ValidityKey(50),600, tag, true) == true); BOOST_TEST_CHECKPOINT("After loadCache method call"); + BOOST_TEST(iovDbFolder.timeStamp() == isEpochTimestamp);//after looking BOOST_TEST(iovDbFolder.retrieved() == false);//only changed by getAddress method - BOOST_TEST(iovDbFolder.bytesRead() == 12);//why not 8? we got two int32 + BOOST_TEST(iovDbFolder.bytesRead() == 8); BOOST_TEST(iovDbFolder.readTime() > 0.0); BOOST_TEST(iovDbFolder.clid() == 1238547719); auto theValidityKey=iovDbFolder.iovTime(cool::ValidityKey(600)); - BOOST_TEST(theValidityKey == cool::ValidityKey(18446744073709551615ull));//why? is this -1? + BOOST_TEST(theValidityKey == cool::ValidityKey(600)); IOVRange zeroRange{0,0}; BOOST_TEST(iovDbFolder.currentRange() == zeroRange);//why? BOOST_TEST(iovDbFolder.cacheValid(cool::ValidityKey(600)) ); diff --git a/Database/IOVDbSvc/test/IOVDbSvc_Boost_test.cxx b/Database/IOVDbSvc/test/IOVDbSvc_Boost_test.cxx index 4f2be4267537e99445af4886a753f8a8bfb811ce..85a2ed31195079266bc14a306a960d11fdc59d72 100644 --- a/Database/IOVDbSvc/test/IOVDbSvc_Boost_test.cxx +++ b/Database/IOVDbSvc/test/IOVDbSvc_Boost_test.cxx @@ -24,6 +24,7 @@ // #include "GaudiKernelFixtureBase.h" #include "TestFolderFixture.h" +namespace utf = boost::unit_test; struct GaudiKernelFixture:public GaudiKernelFixtureBase{ GaudiKernelFixture():GaudiKernelFixtureBase(__FILE__){ @@ -32,106 +33,107 @@ struct GaudiKernelFixture:public GaudiKernelFixtureBase{ }; struct TestFolderFixture:public TestFolderFixtureBase{ - TestFolderFixture():TestFolderFixtureBase("IOVDbSvc_Boost_test.db"){ + //using IOVDbSvc default connection to sqlite file cooldummy.db + TestFolderFixture():TestFolderFixtureBase("cooldummy.db"){ //nop, everything in base. } }; //Basic tests that the service can be retrieved -BOOST_FIXTURE_TEST_SUITE(IOVDbSvcTest , GaudiKernelFixture) +BOOST_AUTO_TEST_SUITE(IOVDbSvcTest ) + GaudiKernelFixture g; + const auto & svcLoc=g.svcLoc; + ServiceHandle<IIOVDbSvc> iovdbsvc ("IOVDbSvc", "test"); + BOOST_AUTO_TEST_CASE( SanityCheck ){ - BOOST_TEST(gaudiIsInitialised); - BOOST_TEST(svcLoc!=nullptr); + const bool svcLocatorIsOk=(svcLoc != nullptr); + BOOST_TEST(svcLocatorIsOk); } BOOST_AUTO_TEST_CASE(IOVDbSvcRetrieved){ - ServiceHandle<IIOVDbSvc> iovdbsvc ("IOVDbSvc", "test"); BOOST_TEST (iovdbsvc.retrieve().isSuccess()); } BOOST_AUTO_TEST_CASE(interfaceID){ - ServiceHandle<IIOVDbSvc> iovdbsvc ("IOVDbSvc", "test"); - BOOST_TEST (iovdbsvc.retrieve().isSuccess()); InterfaceID testId("IOVDbSvc",1,0); BOOST_TEST(iovdbsvc->interfaceID()==testId); } BOOST_AUTO_TEST_CASE(preloadAddresses){ - ServiceHandle<IIOVDbSvc> iovdbsvc ("IOVDbSvc", "test"); - BOOST_TEST (iovdbsvc.retrieve().isSuccess()); IAddressProvider* iovdbsvc_ap = dynamic_cast<IAddressProvider*> (iovdbsvc.get()); IAddressProvider::tadList tlist; BOOST_TEST( iovdbsvc_ap->preLoadAddresses (StoreID::DETECTOR_STORE, tlist).isSuccess() ); - } //tests requiring a database - BOOST_FIXTURE_TEST_SUITE(FolderTest, TestFolderFixture) - BOOST_AUTO_TEST_CASE(getRange){ - IOVRange range; - std::string tag{}; - IOpaqueAddress* addr = nullptr; - //normal folder - BOOST_TEST_MESSAGE("Testing getRange for folder"); - BOOST_TEST( iovdbsvc->getRange (1238547719, fixtureFoldername, IOVTime (10, 15),range, tag, addr).isSuccess() ); - BOOST_TEST (std::string(range) == "{[10,10] - [10,20]}"); - BOOST_TEST(tag=="/key1");//setting this value is commented with 'FIXME' in the IOVDbSvc getRange method - // - BOOST_TEST( iovdbsvc->getRange (1238547719, fixtureFoldername, IOVTime (10, 35),range, tag, addr).isSuccess() ); - BOOST_TEST (std::string(range) == "{[10,30] - [2147483647,4294967295]}"); - // - //Things which should fail - //wrong clid - BOOST_TEST( iovdbsvc->getRange (999, fixtureFoldername, IOVTime (10, 15),range, tag, addr).isFailure() ); - //wrong key - BOOST_TEST( iovdbsvc->getRange (1238547719, invalidFoldername, IOVTime (10, 15),range, tag, addr).isFailure() ); - //wrong global tag (todo) - } - /** no need to test the setRange method; it does nothing - BOOST_AUTO_TEST_CASE(setRange){ - BOOST_TEST( iovdbsvc->setRange (1238547719, "/key1",range,tag).isSuccess() ); - } - **/ - BOOST_AUTO_TEST_CASE(signalBeginRun){ - EventContext ctx; - ctx.setExtension<Atlas::ExtendedEventContext>( Atlas::ExtendedEventContext(nullptr,10)); - BOOST_TEST( iovdbsvc->signalBeginRun(IOVTime(10,10), ctx).isSuccess()); - } - - BOOST_AUTO_TEST_CASE(signalEndProxyPreload){ - BOOST_CHECK_NO_THROW( iovdbsvc->signalEndProxyPreload()); - } - - BOOST_AUTO_TEST_CASE(getKeyList){ - auto keyList=iovdbsvc->getKeyList(); - BOOST_TEST(keyList.size() ==1); - auto firstEntry=keyList.front(); - BOOST_TEST(firstEntry == fixtureFoldername); - } - - BOOST_AUTO_TEST_CASE(getKeyInfo){ - std::string foldername{}; - std::string tag{"dummy"}; - IOVRange range; - bool retrieved{}; - unsigned long long bytesRead(0); - float readTime(0.); - BOOST_TEST( iovdbsvc->getKeyInfo(fixtureFoldername, foldername, tag, range, retrieved,bytesRead, readTime)); - std::string rangeString(range); + //Create the test database for subsequent tests + TestFolderFixture db; + + BOOST_AUTO_TEST_CASE(getRange){ + IOVRange range; + std::string tag{}; + IOpaqueAddress* addr = nullptr; + //normal folder + BOOST_TEST_MESSAGE("Testing getRange for folder"); + BOOST_TEST( iovdbsvc->getRange (1238547719, db.fixtureFoldername, IOVTime (10),range, tag, addr).isSuccess() ); + BOOST_TEST (std::string(range) == "{[0] - [100]}"); + BOOST_TEST(tag=="/key1");//setting this value is commented with 'FIXME' in the IOVDbSvc getRange method + // + BOOST_TEST( iovdbsvc->getRange (1238547719, db.fixtureFoldername, IOVTime (103),range, tag, addr).isSuccess() ); + BOOST_TEST (std::string(range) == "{[100] - [9223372036854775807]}"); + // + //Things which should fail + //wrong clid + BOOST_TEST( iovdbsvc->getRange (999, db.fixtureFoldername, IOVTime (10, 15),range, tag, addr).isFailure() ); + //wrong key + BOOST_TEST( iovdbsvc->getRange (1238547719, db.invalidFoldername, IOVTime (10, 15),range, tag, addr).isFailure() ); + //wrong global tag (todo) + } + /** no need to test the setRange method; it does nothing + BOOST_AUTO_TEST_CASE(setRange){ + BOOST_TEST( iovdbsvc->setRange (1238547719, "/key1",range,tag).isSuccess() ); + } + **/ + BOOST_AUTO_TEST_CASE(signalBeginRun){ + EventContext ctx; + ctx.setExtension<Atlas::ExtendedEventContext>( Atlas::ExtendedEventContext(nullptr,10)); + BOOST_TEST( iovdbsvc->signalBeginRun(IOVTime(10,10), ctx).isSuccess()); + } + + BOOST_AUTO_TEST_CASE(signalEndProxyPreload){ + BOOST_CHECK_NO_THROW( iovdbsvc->signalEndProxyPreload()); + } + + BOOST_AUTO_TEST_CASE(getKeyList){ + auto keyList=iovdbsvc->getKeyList(); + BOOST_TEST(keyList.size() ==1); + auto firstEntry=keyList.front(); + BOOST_TEST(firstEntry == db.fixtureFoldername); + } + + BOOST_AUTO_TEST_CASE(getKeyInfo){ + std::string foldername{}; + std::string tag{"dummy"}; + IOVRange range; + bool retrieved{}; + unsigned long long bytesRead(0); + float readTime(0.); + BOOST_TEST( iovdbsvc->getKeyInfo(db.fixtureFoldername, foldername, tag, range, retrieved,bytesRead, readTime)); + std::string rangeString(range); - BOOST_TEST(fixtureFoldername == foldername); - BOOST_TEST(tag.empty()); - BOOST_TEST("{[10,30] - [2147483647,4294967295]}"==rangeString); - BOOST_TEST(retrieved); - BOOST_TEST(bytesRead == 12);//why is this 12 and not 8? two ints were written. - BOOST_TEST(readTime<0.5); - } + BOOST_TEST(db.fixtureFoldername == foldername); + BOOST_TEST(tag.empty()); + BOOST_TEST("{[100] - [9223372036854775807]}"==rangeString); + BOOST_TEST(retrieved); + BOOST_TEST(bytesRead == 8);//why? + BOOST_TEST(readTime<0.5); + } BOOST_AUTO_TEST_CASE(dropObject){ //not sure I can meaningfully test that the object was really dropped //BOOST_TEST(iovdbsvc->dropObject(fixtureFoldername, true)); //will fail, the proxy is nullptr - BOOST_TEST(!iovdbsvc->dropObject(fixtureFoldername,false)); + BOOST_TEST(!iovdbsvc->dropObject(db.fixtureFoldername,false)); //test invalid folderName - BOOST_TEST(!iovdbsvc->dropObject(invalidFoldername,true)); + BOOST_TEST(!iovdbsvc->dropObject(db.invalidFoldername,true)); } - BOOST_AUTO_TEST_SUITE_END() + BOOST_AUTO_TEST_SUITE_END() diff --git a/Database/IOVDbSvc/test/IOVDbSvc_test.cxx b/Database/IOVDbSvc/test/IOVDbSvc_test.cxx index dd12052eea3c73657a0da371d0a7b03c1ea9cac3..992f4d6e66d3d96be65204f39fe89052c6af139b 100644 --- a/Database/IOVDbSvc/test/IOVDbSvc_test.cxx +++ b/Database/IOVDbSvc/test/IOVDbSvc_test.cxx @@ -62,14 +62,19 @@ int main() CxxUtils::ubsan_suppress ([]() { TInterpreter::Instance(); } ); ISvcLocator* svcLoc; - if (!Athena_test::initGaudi("IOVDbSvc_test.txt", svcLoc)) + //The following is to ensure I can run the test executable outside ctest + const std::string here=__FILE__; + const size_t lastSlash=here.find_last_of("/"); + const std::string dir=here.substr(0,lastSlash+1); + const std::string searchPath=dir+"../share/"; + if (!Athena_test::initGaudi(searchPath+"IOVDbSvc_test.txt", svcLoc)) return 1; - unlink ("cooldummy.db"); + unlink ("mytest.db"); cool::IDatabaseSvc& dbSvc=cool::DatabaseSvcFactory::databaseService(); cool::IDatabasePtr coolDb = - dbSvc.createDatabase("sqlite://;schema=cooldummy.db;dbname=OFLP200"); + dbSvc.createDatabase("sqlite://;schema=mytest.db;dbname=OFLP200"); cool::RecordSpecification spec; spec.extend ("int", cool::StorageType::Int32); cool::FolderSpecification fSpec (cool::FolderVersioning::SINGLE_VERSION, diff --git a/Database/IOVDbSvc/test/TestFolderFixture.h b/Database/IOVDbSvc/test/TestFolderFixture.h index c6f553ca1f4c59fc3355c5b36b59984bba5c9379..a7bbb20d2845164f9c075e98ea31ee480f69fdd7 100644 --- a/Database/IOVDbSvc/test/TestFolderFixture.h +++ b/Database/IOVDbSvc/test/TestFolderFixture.h @@ -46,14 +46,14 @@ struct TestFolderFixtureBase{ cool::RecordSpecification spec; spec.extend ("int", cool::StorageType::Int32); cool::FolderSpecification fSpec (cool::FolderVersioning::SINGLE_VERSION,spec,cool::PayloadMode::INLINEPAYLOAD); - std::string desc = "<timeStamp>run-event</timeStamp><addrHeader><address_header service_type=\"71\" clid=\"1238547719\" /></addrHeader><typeName>CondAttrListCollection</typeName>"; + std::string desc = "<timeStamp>time</timeStamp><addrHeader><address_header service_type=\"71\" clid=\"1238547719\" /></addrHeader><typeName>CondAttrListCollection</typeName>"; { cool::IFolderPtr f = coolDb->createFolder (fixtureFoldername, fSpec, desc); cool::Record payload (f->payloadSpecification()); payload[0].setValue (1); - f->storeObject ((10ull<<32) + 10, (10ull<<32) + 20, payload, 0); + f->storeObject (0, 100, payload, 0); payload[0].setValue (2); - f->storeObject ((10ull<<32) + 30, cool::ValidityKeyMax, payload, 0); + f->storeObject (100, cool::ValidityKeyMax, payload, 0); } coolDb->closeDatabase(); } diff --git a/DetectorDescription/AtlasDetDescr/AtlasDetDescr/AtlasDetectorID.h b/DetectorDescription/AtlasDetDescr/AtlasDetDescr/AtlasDetectorID.h index 81b5c03ac5395beaafa13cf741e8d4638160def3..a6dfed9d8715167d4773befdb92519a18b43f90c 100755 --- a/DetectorDescription/AtlasDetDescr/AtlasDetDescr/AtlasDetectorID.h +++ b/DetectorDescription/AtlasDetDescr/AtlasDetDescr/AtlasDetectorID.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef ATLASDETDESCR_ATLASDETECTORID_H @@ -226,13 +226,13 @@ public: /// @name Checks are performed by default in debug compilation and NOT in optimized compilation. One can switch or query this mode for any idHelper with the following methods: //@{ virtual bool do_checks (void) const; - virtual void set_do_checks (bool do_checks) const; + virtual void set_do_checks (bool do_checks); //@} /// @name neighbours are initialized by default. One can switch or query this mode with the following methods: //@{ virtual bool do_neighbours (void) const; - virtual void set_do_neighbours (bool do_neighbours) const; + virtual void set_do_neighbours (bool do_neighbours); //@} /// @name setting pointer to the MessageService diff --git a/DetectorDescription/AtlasDetDescr/src/AtlasDetectorID.cxx b/DetectorDescription/AtlasDetDescr/src/AtlasDetectorID.cxx index ba06031682ddb76d4502f60c1c8ff3cdeeca707c..c2326bc62477876b9461935a3a8180a5de242ddf 100755 --- a/DetectorDescription/AtlasDetDescr/src/AtlasDetectorID.cxx +++ b/DetectorDescription/AtlasDetDescr/src/AtlasDetectorID.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /*************************************************************************** @@ -903,7 +903,7 @@ bool AtlasDetectorID::do_checks (void) const return (m_do_checks); } -void AtlasDetectorID::set_do_checks (bool do_checks) const +void AtlasDetectorID::set_do_checks (bool do_checks) { m_do_checks = do_checks; } @@ -913,7 +913,7 @@ bool AtlasDetectorID::do_neighbours (void) const return (m_do_neighbours); } -void AtlasDetectorID::set_do_neighbours (bool do_neighbours) const +void AtlasDetectorID::set_do_neighbours (bool do_neighbours) { m_do_neighbours = do_neighbours; } diff --git a/DetectorDescription/GeoModel/GeoSpecialShapes/src/LArWheelCalculator_Impl/DistanceCalculatorSaggingOff.cxx b/DetectorDescription/GeoModel/GeoSpecialShapes/src/LArWheelCalculator_Impl/DistanceCalculatorSaggingOff.cxx index 9881c3ef423abb98b2b1015d622c8da80b3331e7..c8bdbaa421bfff3317bfe705006054256a58000c 100644 --- a/DetectorDescription/GeoModel/GeoSpecialShapes/src/LArWheelCalculator_Impl/DistanceCalculatorSaggingOff.cxx +++ b/DetectorDescription/GeoModel/GeoSpecialShapes/src/LArWheelCalculator_Impl/DistanceCalculatorSaggingOff.cxx @@ -48,7 +48,7 @@ namespace LArWheelCalculator_Impl const double cos_a = scalpha.cs, sin_a = scalpha.sn; #else // parameterized sine double cos_a, sin_a; - lwc()->parameterized_sin(P.y(), sin_a, cos_a); + lwc()->parameterized_sincos(P.y(), sin_a, cos_a); #endif // determination of the nearest quarter-wave number int nqwave = (z < 0.) ? 0 : int(z / lwc()->m_QuarterWaveLength); @@ -160,7 +160,7 @@ namespace LArWheelCalculator_Impl double cos_a = scalpha.cs, sin_a = scalpha.sn; #else // parameterized sine double cos_a, sin_a; - lwc()->parameterized_sin(P.y(), sin_a, cos_a); + lwc()->parameterized_sincos(P.y(), sin_a, cos_a); #endif bool sqw = false; @@ -251,7 +251,7 @@ namespace LArWheelCalculator_Impl const double cos_a = scalpha.cs, sin_a = scalpha.sn; #else // parameterized sine double cos_a, sin_a; - lwc()->parameterized_sin(P.y(), sin_a, cos_a); + lwc()->parameterized_sincos(P.y(), sin_a, cos_a); #endif int nqwave; @@ -339,7 +339,7 @@ namespace LArWheelCalculator_Impl double cos_a = scalpha.cs, sin_a = scalpha.sn; #else // parameterized sine double cos_a, sin_a; - lwc()->parameterized_sin(P.y(), sin_a, cos_a); + lwc()->parameterized_sincos(P.y(), sin_a, cos_a); #endif bool sqw = false; @@ -434,7 +434,7 @@ namespace LArWheelCalculator_Impl // parameterized sine #else double cos_a, sin_a; - lwc()->parameterized_sin(P.y(), sin_a, cos_a); + lwc()->parameterized_sincos(P.y(), sin_a, cos_a); #endif // determination of the nearest quarter-wave number diff --git a/DetectorDescription/IdDict/IdDict/ATLAS_CHECK_THREAD_SAFETY b/DetectorDescription/IdDict/IdDict/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..8d4017a3d23ed6ac31d51ea0a2e377bfc8c1eb90 --- /dev/null +++ b/DetectorDescription/IdDict/IdDict/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +DetectorDescription/IdDict diff --git a/DetectorDescription/IdDict/IdDict/IdDictDefs.h b/DetectorDescription/IdDict/IdDict/IdDictDefs.h index 4af35be5d95c8475cd9b6642ca641513f9b52da0..dc3c36e3e9bb2cb2d57b1cef9f2dfea9cb7b5fa2 100755 --- a/DetectorDescription/IdDict/IdDict/IdDictDefs.h +++ b/DetectorDescription/IdDict/IdDict/IdDictDefs.h @@ -1,9 +1,9 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ -#ifndef __IdDictDefs_h__ -#define __IdDictDefs_h__ +#ifndef IDDICT_IDDICTDEFS_H +#define IDDICT_IDDICTDEFS_H #include "Identifier/Range.h" #include "Identifier/Identifier.h" @@ -63,8 +63,8 @@ public: void add_subdictionary_name (const std::string& name); void add_metadata (const std::string& name, const std::string& value); void set_DTD_version (const std::string& DTD_version); - void set_do_checks (bool do_checks) const; - void set_do_neighbours (bool do_neighbours) const; + void set_do_checks (bool do_checks); + void set_do_neighbours (bool do_neighbours); /// Construct dictionary after parsing @@ -89,8 +89,8 @@ private: std::set<std::string> m_subdictionary_names; bool m_resolved_references; bool m_generated_implementation; - mutable bool m_do_checks; - mutable bool m_do_neighbours; + bool m_do_checks; + bool m_do_neighbours; }; class IdDictDictionary @@ -107,7 +107,7 @@ public: int get_label_value (const std::string& field, const std::string& label, int& value) const; // > 0 == error IdDictSubRegion* find_subregion (const std::string& subregion_name) const; IdDictRegion* find_region (const std::string& region_name) const; - IdDictRegion* find_region (const std::string& region_name, const std::string group_name) const; + IdDictRegion* find_region (const std::string& region_name, const std::string& group_name) const; IdDictGroup* find_group (const std::string& group_name) const; @@ -126,7 +126,7 @@ public: /// Find first region that matches id int find_region(const ExpandedIdentifier& id, size_type& index) const; IdDictRegion* find_region(const ExpandedIdentifier& id) const; - IdDictRegion* find_region(const ExpandedIdentifier& id,const std::string group_name) const; + IdDictRegion* find_region(const ExpandedIdentifier& id,const std::string& group_name) const; /// Set up integral of bits for efficient unpacking void integrate_bits (); @@ -139,8 +139,8 @@ public: * 'last_field' If last_field == "", all fields are * taken. Prepend prefix if provided. */ MultiRange build_multirange (const ExpandedIdentifier& region_id, - const Range prefix = Range(), - std::string last_field = "") const; + const Range& prefix = Range(), + const std::string& last_field = "") const; /** * Get MultiRange for a specific region_id, constrained to be @@ -150,8 +150,8 @@ public: MultiRange build_multirange (const ExpandedIdentifier& region_id, const std::string& group_name, - const Range prefix = Range(), - std::string last_field = "") const; + const Range& prefix = Range(), + const std::string& last_field = "") const; /** * Pack to 32bits the subset of id between (inclusive) index1 @@ -259,13 +259,13 @@ public: /// in optimized compilation. One can switch or query this mode for /// any idHelper with the following methods: bool do_checks (void) const; - void set_do_checks (bool do_checks) const; + void set_do_checks (bool do_checks); /// Neighbour initialization is performed by default /// One can switch or query this mode for /// any idHelper with the following methods: bool do_neighbours (void) const; - void set_do_neighbours (bool do_neighbours) const; + void set_do_neighbours (bool do_neighbours); /// Access to file name std::string file_name (void) const; @@ -310,8 +310,8 @@ private: std::string m_dict_tag; //bool m_resolved_references; bool m_generated_implementation; - mutable bool m_do_checks; - mutable bool m_do_neighbours; + bool m_do_checks; + bool m_do_neighbours; }; class IdDictField @@ -517,8 +517,6 @@ public: IdDictRegion& region, std::string tag = ""); void reset_implementation (); - - std::string m_name; }; class IdDictRegionEntry diff --git a/DetectorDescription/IdDict/IdDict/IdDictFieldImplementation.h b/DetectorDescription/IdDict/IdDict/IdDictFieldImplementation.h index 5ce9ef1f10c782556719a08810f4deeb9330504f..63d4fd40a90a42c917b2e8c15739d2b3ed838741 100755 --- a/DetectorDescription/IdDict/IdDict/IdDictFieldImplementation.h +++ b/DetectorDescription/IdDict/IdDict/IdDictFieldImplementation.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /*************************************************************************** @@ -89,8 +89,8 @@ public: /// Modifiers void set_range (const IdDictRange* range); - void set_field (Range::field field); - void set_ored_field (Range::field ored_field); + void set_field (const Range::field& field); + void set_ored_field (const Range::field& ored_field); void set_bits_offset (size_type bits_offset); void set_bits (size_type bits, size_type bits_offset); void set_decode_index (bool decode_index); @@ -248,7 +248,7 @@ inline void IdDictFieldImplementation::initialize() } //----------------------------------------------------------------- -inline void IdDictFieldImplementation::set_field (Range::field field) +inline void IdDictFieldImplementation::set_field (const Range::field& field) //----------------------------------------------------------------- { m_field = field; @@ -256,7 +256,7 @@ inline void IdDictFieldImplementation::set_field (Range::field field) //----------------------------------------------------------------- -inline void IdDictFieldImplementation::set_ored_field (Range::field ored_field) +inline void IdDictFieldImplementation::set_ored_field (const Range::field& ored_field) //----------------------------------------------------------------- { // Set ored field and bits, and init diff --git a/DetectorDescription/IdDict/src/IdDictMgr.cxx b/DetectorDescription/IdDict/src/IdDictMgr.cxx index 33e34c505f5f6edddb7ea8cde49b2f44aed0a347..a6256fce4f876b70cdf9302d819032cf8db63515 100755 --- a/DetectorDescription/IdDict/src/IdDictMgr.cxx +++ b/DetectorDescription/IdDict/src/IdDictMgr.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // $Header: /build/atlas/cvs/atlas/offline/DetectorDescription/IdDict/src/IdDictMgr.cxx,v 1.43 2008-12-09 09:49:43 dquarrie Exp $ @@ -8,65 +8,26 @@ #include <iostream> #include <stdio.h> -#include <cstdlib> +#include <cstdlib> +#include <atomic> #include "IdDict/IdDictDefs.h" class Debugger { -public: +public: + static bool get_debug_state() + { + if (::getenv ("IDDEBUG") != 0) { + return true; + } + return false; + } static bool debug () { - static bool first = true; - static bool debug_state = false; - - if (first) - { - first = false; - if (::getenv ("IDDEBUG") == 0) - { - debug_state = false; - } - else - { - debug_state = true; - } - } - - return (debug_state); + static const bool debug_state = get_debug_state(); + return debug_state; } - - static void up () - { - level (1); - } - - static void down () - { - level (-1); - } - - static void tab (int nspaces = 0) - { - int n = (nspaces) ? nspaces : level (); - - for (int i = 0; i < n; ++i) - { - std::cout << " "; - } - } - -private: - - static int level (int d = 0) - { - static int n = 0; - - n += d; - - return (n); - } - }; static bool isNumber(const std::string& str) @@ -98,14 +59,14 @@ class TypeId public: operator int () { - static int i = TypeIdBuilder::build_id (); + static const int i = TypeIdBuilder::build_id (); return (i); } }; int TypeIdBuilder::build_id () { - static int i = 0; + static std::atomic<int> i = 0; i++; return (i); } @@ -144,12 +105,11 @@ bool IdDictMgr::do_checks () const } void -IdDictMgr::set_do_checks (bool do_checks) const +IdDictMgr::set_do_checks (bool do_checks) { m_do_checks = do_checks; - dictionary_map::const_iterator it; - for (it = m_dictionaries.begin (); it != m_dictionaries.end (); ++it) { - const IdDictDictionary* d = (*it).second; + for (const auto& p : m_dictionaries) { + IdDictDictionary* d = p.second; d->set_do_checks(do_checks); } } @@ -160,12 +120,11 @@ bool IdDictMgr::do_neighbours () const } void -IdDictMgr::set_do_neighbours (bool do_neighbours) const +IdDictMgr::set_do_neighbours (bool do_neighbours) { m_do_neighbours = do_neighbours; - dictionary_map::const_iterator it; - for (it = m_dictionaries.begin (); it != m_dictionaries.end (); ++it) { - const IdDictDictionary* d = (*it).second; + for (const auto& p : m_dictionaries) { + IdDictDictionary* d = p.second; d->set_do_neighbours(do_neighbours); } } @@ -174,7 +133,7 @@ const std::string& IdDictMgr::find_metadata (const std::string& name) const { metadata_map::const_iterator it = m_metadata.find(name); - static std::string empty; + static const std::string empty; if (it != m_metadata.end()) return (it->second); else return empty; } @@ -260,7 +219,7 @@ void IdDictMgr::generate_implementation (std::string tag) if (Debugger::debug ()) { - Debugger::tab (); std::cout << "IdDictMgr::generate_implementation>" << std::endl; + std::cout << "IdDictMgr::generate_implementation>" << std::endl; } // Must reset the implementation for multiple passes, this resets @@ -409,7 +368,7 @@ IdDictRegion* IdDictDictionary::find_region (const std::string& region_name) con return find_region (region_name, ""); } -IdDictRegion* IdDictDictionary::find_region (const std::string& region_name, const std::string group_name) const +IdDictRegion* IdDictDictionary::find_region (const std::string& region_name, const std::string& group_name) const { for (size_t i = 0; i < m_regions.size (); ++i) { @@ -492,7 +451,7 @@ void IdDictDictionary::resolve_references (const IdDictMgr& idd) typedef std::vector <IdDictRegion*> RV; -static void compute_bits (const RV& regions, size_t level, const std::string group) +static void compute_bits (const RV& regions, size_t level, const std::string& group) { // @@ -577,7 +536,6 @@ static void get_bits (const RV& regions, size_t level, const std::string& group) // -// Debugger::tab (level); // std::cout << " get_bits : level " << level; // std::cout << " regions size " << regions.size() << std::endl; @@ -618,7 +576,6 @@ static void get_bits (const RV& regions, size_t level, const std::string& group) RV mr = regions; - // Debugger::tab (level); // std::cout << " or-ing fields : level " << level; // std::cout << " name " << mr[0]->m_implementation[level].m_range->m_field_name ; @@ -645,7 +602,7 @@ static void get_bits (const RV& regions, size_t level, const std::string& group) for (;;) { if (mr.size () == 0) { - //Debugger::tab (level); std::cout << "empty RV" << std::endl; + //std::cout << "empty RV" << std::endl; break; } @@ -666,7 +623,7 @@ static void get_bits (const RV& regions, size_t level, const std::string& group) // std::cout << "k in level " << k << " " << level << std::endl; /* - Debugger::tab (level); std::cout << "Install the non empty Region : " << + std::cout << "Install the non empty Region : " << reference_region->m_index; const IdDictFieldImplementation& f = reference_region->m_implementation[level]; @@ -691,7 +648,7 @@ static void get_bits (const RV& regions, size_t level, const std::string& group) if (reference_region == 0) break; if (overlapping.size () == 0) { -// Debugger::tab (level); std::cout << "RV only contains empty Regions" << std::endl; +// std::cout << "RV only contains empty Regions" << std::endl; break; } @@ -748,7 +705,7 @@ static void get_bits (const RV& regions, size_t level, const std::string& group) if (region->m_implementation.size () <= level) continue; -// Debugger::tab (level); std::cout << "Check a non empty Region : " << region->m_index; +// std::cout << "Check a non empty Region : " << region->m_index; bool overlap = false; @@ -809,7 +766,7 @@ static void get_bits (const RV& regions, size_t level, const std::string& group) if (all_within_group) temp.clear(); -// Debugger::tab (level); std::cout << "now we have " << overlapping.size () << +// std::cout << "now we have " << overlapping.size () << // " vs " << // temp.size () << " regions" << std::endl; @@ -833,7 +790,7 @@ void IdDictDictionary::generate_implementation (const IdDictMgr& idd, if (Debugger::debug ()) { - Debugger::tab (); std::cout << "IdDictDictionary::generate_implementation>" << std::endl; + std::cout << "IdDictDictionary::generate_implementation>" << std::endl; } if (!m_generated_implementation) { @@ -931,7 +888,7 @@ IdDictRegion* IdDictDictionary::find_region(const ExpandedIdentifier& id) const return find_region (id, ""); } -IdDictRegion* IdDictDictionary::find_region(const ExpandedIdentifier& id, const std::string group_name) const +IdDictRegion* IdDictDictionary::find_region(const ExpandedIdentifier& id, const std::string& group_name) const { // Find first region that matches id @@ -1127,8 +1084,8 @@ MultiRange IdDictDictionary::build_multirange () const } MultiRange IdDictDictionary::build_multirange (const ExpandedIdentifier& region_id, - const Range prefix, - std::string last_field) const + const Range& prefix, + const std::string& last_field) const { MultiRange result; @@ -1194,8 +1151,8 @@ MultiRange IdDictDictionary::build_multirange (const ExpandedIdentifier& region_ MultiRange IdDictDictionary::build_multirange (const ExpandedIdentifier& region_id, const std::string& group_name, - const Range prefix, - std::string last_field) const + const Range& prefix, + const std::string& last_field) const { MultiRange result; @@ -2129,7 +2086,7 @@ IdDictDictionary::do_checks (void) const } void -IdDictDictionary::set_do_checks (bool do_checks) const +IdDictDictionary::set_do_checks (bool do_checks) { m_do_checks = do_checks; } @@ -2141,7 +2098,7 @@ IdDictDictionary::do_neighbours (void) const } void -IdDictDictionary::set_do_neighbours (bool do_neighbours) const +IdDictDictionary::set_do_neighbours (bool do_neighbours) { m_do_neighbours = do_neighbours; } @@ -2358,7 +2315,7 @@ IdDictGroup::generate_implementation (const IdDictMgr& idd, { if (Debugger::debug ()) { - Debugger::tab (); std::cout << "IdDictGroup::generate_implementation>" << std::endl; + std::cout << "IdDictGroup::generate_implementation>" << std::endl; } if (!m_generated_implementation) { @@ -2661,7 +2618,7 @@ void IdDictRegion::generate_implementation (const IdDictMgr& idd, if (Debugger::debug ()) { - Debugger::tab (); std::cout << "IdDictRegion::generate_implementation>" << std::endl; + std::cout << "IdDictRegion::generate_implementation>" << std::endl; } // std::cout << "IdDictRegion::generate_implementation - name, tag " @@ -2877,7 +2834,7 @@ IdDictSubRegion::generate_implementation (const IdDictMgr& idd, if (Debugger::debug ()) { - Debugger::tab (); std::cout << "IdDictSubRegion::generate_implementation>" << std::endl; + std::cout << "IdDictSubRegion::generate_implementation>" << std::endl; } // NOTE: we DO NOT protect this method with @@ -3040,7 +2997,7 @@ void IdDictRange::generate_implementation (const IdDictMgr& /*idd*/, if (Debugger::debug ()) { - Debugger::tab (); std::cout << "IdDictRange::generate_implementation>" << std::endl; + std::cout << "IdDictRange::generate_implementation>" << std::endl; } @@ -3281,7 +3238,7 @@ void IdDictReference::generate_implementation (const IdDictMgr& idd, if (Debugger::debug ()) { - Debugger::tab (); std::cout << "IdDictReference::generate_implementation>" << std::endl; + std::cout << "IdDictReference::generate_implementation>" << std::endl; } if (m_subregion != 0) m_subregion->generate_implementation (idd, dictionary, region, tag); diff --git a/DetectorDescription/IdDictParser/IdDictParser/ATLAS_CHECK_THREAD_SAFETY b/DetectorDescription/IdDictParser/IdDictParser/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..6eadd1bd71ad4d5fc053e7e00869e131b7e27de5 --- /dev/null +++ b/DetectorDescription/IdDictParser/IdDictParser/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +DetectorDescription/IdDictParser diff --git a/DetectorDescription/IdDictParser/IdDictParser/IdDictParser.h b/DetectorDescription/IdDictParser/IdDictParser/IdDictParser.h index 9f60b01da0d31c9dd4bcb4c5535bc994400b5e6d..1f856bdbede0a1e35ece22a7df8546c7b7ca53ee 100755 --- a/DetectorDescription/IdDictParser/IdDictParser/IdDictParser.h +++ b/DetectorDescription/IdDictParser/IdDictParser/IdDictParser.h @@ -1,9 +1,9 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ -#ifndef __IdDictParser_h__ -#define __IdDictParser_h__ +#ifndef IDDICTPARSER_IDDICTPARSER_H +#define IDDICTPARSER_IDDICTPARSER_H #include "XMLCoreParser/XMLCoreParser.h" #include "IdDict/IdDictDefs.h" diff --git a/DetectorDescription/IdDictParser/src/IdDictParser.cxx b/DetectorDescription/IdDictParser/src/IdDictParser.cxx index ec3949ed6cbf35704e136c9074d323c50e759fc1..128cdcab8d339e45e115510407307765875b6af8 100755 --- a/DetectorDescription/IdDictParser/src/IdDictParser.cxx +++ b/DetectorDescription/IdDictParser/src/IdDictParser.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // $Header: /build/atlas/cvs/atlas/offline/DetectorDescription/IdDictParser/src/IdDictParser.cxx,v 1.13 2008-12-09 09:55:22 dquarrie Exp $ @@ -15,58 +15,23 @@ namespace IdDictParserNS class Debugger { public: - static bool debug () - { - static bool first = true; - static bool debug_state = false; - - if (first) - { - first = false; - if (::getenv ("IDDEBUG") == 0) - { - debug_state = false; - } - else - { - debug_state = true; - } - } - - return (debug_state); - } - - static void up () - { - level (1); - } - - static void down () - { - level (-1); - } + static bool get_debug_state() + { + return ::getenv ("XMLDEBUG") != 0; + } + static bool debug () + { + static const bool debug_state = get_debug_state(); + return debug_state; + } - static void tab () - { - int n = level (); - + static void tab (int n) + { for (int i = 0; i < n; ++i) { std::cout << " "; } } - - private: - - static int level (int d = 0) - { - static int n = 0; - - n += d; - - return (n); - } - }; class IdDictBaseFactory : public XMLCoreFactory @@ -158,18 +123,16 @@ using namespace IdDictParserNS; IdDictParser::IdDictParser () : XMLCoreParser () { - initialize_factories (); - - register_factory ("IdDict", new IdDictMgrFactory); - register_factory ("IdDictionary", new DictionaryFactory); - register_factory ("field", new FieldFactory); - register_factory ("label", new LabelFactory); - register_factory ("alternate_regions", new AltRegionsFactory); - register_factory ("region", new RegionFactory); - register_factory ("subregion", new SubRegionFactory); - register_factory ("range", new RangeFactory); - register_factory ("reference", new ReferenceFactory); - register_factory ("dictionary", new DictionaryRefFactory); + register_factory ("IdDict", std::make_unique<IdDictMgrFactory>()); + register_factory ("IdDictionary", std::make_unique<DictionaryFactory>()); + register_factory ("field", std::make_unique<FieldFactory>()); + register_factory ("label", std::make_unique<LabelFactory>()); + register_factory ("alternate_regions", std::make_unique<AltRegionsFactory>()); + register_factory ("region", std::make_unique<RegionFactory>()); + register_factory ("subregion", std::make_unique<SubRegionFactory>()); + register_factory ("range", std::make_unique<RangeFactory>()); + register_factory ("reference", std::make_unique<ReferenceFactory>()); + register_factory ("dictionary", std::make_unique<DictionaryRefFactory>()); m_dictionary = 0; m_field = 0; @@ -187,21 +150,21 @@ IdDictMgr& IdDictParser::parse (const std::string& file_name, std::string tag) if (Debugger::debug ()) { - Debugger::tab (); std::cout << "IdDictParser::parse1>" << std::endl; + std::cout << "IdDictParser::parse1>" << std::endl; } m_idd.resolve_references (); if (Debugger::debug ()) { - Debugger::tab (); std::cout << "IdDictParser::parse2>" << std::endl; + std::cout << "IdDictParser::parse2>" << std::endl; } m_idd.generate_implementation (tag); if (Debugger::debug ()) { - Debugger::tab (); std::cout << "IdDictParser::parse3>" << std::endl; + std::cout << "IdDictParser::parse3>" << std::endl; } return (m_idd); @@ -210,14 +173,14 @@ IdDictMgr& IdDictParser::parse (const std::string& file_name, std::string tag) void IdDictBaseFactory::do_start (XMLCoreParser& parser, const XMLCoreNode& node) { - Debugger::up (); + parser.up (); idd_start ((IdDictParser&) parser, node); } void IdDictBaseFactory::do_end (XMLCoreParser& parser, const XMLCoreNode& node) { idd_end ((IdDictParser&) parser, node); - Debugger::down (); + parser.down (); } void IdDictBaseFactory::idd_start (IdDictParser& /*parser*/, @@ -242,17 +205,19 @@ void IdDictMgrFactory::idd_start (IdDictParser& parser, const XMLCoreNode& node) { if (Debugger::debug ()) { - Debugger::tab (); std::cout << "IdDictMgrFactoryFactory::idd_start>" << std::endl; + Debugger::tab (parser.level()); + std::cout << "IdDictMgrFactoryFactory::idd_start>" << std::endl; } parser.m_idd.set_DTD_version(get_value (node, "DTD_version")); } -void IdDictMgrFactory::idd_end (IdDictParser& /*parser*/, +void IdDictMgrFactory::idd_end (IdDictParser& parser, const XMLCoreNode& /*node*/) { if (Debugger::debug ()) { - Debugger::tab (); std::cout << "IdDictMgrFactoryFactory::idd_end>" << std::endl; + Debugger::tab (parser.level()); + std::cout << "IdDictMgrFactoryFactory::idd_end>" << std::endl; } } @@ -260,7 +225,8 @@ void DictionaryFactory::idd_start (IdDictParser& parser, const XMLCoreNode& node { if (Debugger::debug ()) { - Debugger::tab (); std::cout << "DictionaryFactory::idd_start>" << std::endl; + Debugger::tab (parser.level()); + std::cout << "DictionaryFactory::idd_start>" << std::endl; } parser.m_dictionary = new IdDictDictionary; @@ -275,7 +241,8 @@ void DictionaryFactory::idd_end (IdDictParser& parser, const XMLCoreNode& /*node { if (Debugger::debug ()) { - Debugger::tab (); std::cout << "DictionaryFactory::idd_end> d=" << parser.m_dictionary << std::endl; + Debugger::tab (parser.level()); + std::cout << "DictionaryFactory::idd_end> d=" << parser.m_dictionary << std::endl; } if (parser.m_dictionary != 0) @@ -290,7 +257,8 @@ void FieldFactory::idd_start (IdDictParser& parser, const XMLCoreNode& node) { if (Debugger::debug ()) { - Debugger::tab (); std::cout << "FieldFactory::idd_start>" << std::endl; + Debugger::tab (parser.level()); + std::cout << "FieldFactory::idd_start>" << std::endl; } IdDictField* field = new IdDictField; @@ -312,7 +280,8 @@ void FieldFactory::idd_end (IdDictParser& parser, const XMLCoreNode& /*node*/) { if (Debugger::debug ()) { - Debugger::tab (); std::cout << "FieldFactory::idd_end>" << std::endl; + Debugger::tab (parser.level()); + std::cout << "FieldFactory::idd_end>" << std::endl; } if (parser.m_field != 0) @@ -328,7 +297,8 @@ void LabelFactory::idd_start (IdDictParser& parser, const XMLCoreNode& node) { if (Debugger::debug ()) { - Debugger::tab (); std::cout << "LabelFactory::idd_start>" << std::endl; + Debugger::tab (parser.level()); + std::cout << "LabelFactory::idd_start>" << std::endl; } IdDictLabel* label = new IdDictLabel; @@ -348,11 +318,12 @@ void LabelFactory::idd_start (IdDictParser& parser, const XMLCoreNode& node) else delete label; } -void LabelFactory::idd_end (IdDictParser& /*parser*/, const XMLCoreNode& /*node*/) +void LabelFactory::idd_end (IdDictParser& parser, const XMLCoreNode& /*node*/) { if (Debugger::debug ()) { - Debugger::tab (); std::cout << "LabelFactory::idd_end>" << std::endl; + Debugger::tab (parser.level()); + std::cout << "LabelFactory::idd_end>" << std::endl; } } @@ -360,16 +331,18 @@ void AltRegionsFactory::idd_start (IdDictParser& parser, const XMLCoreNode& /*no { if (Debugger::debug ()) { - Debugger::tab (); std::cout << "AltRegionsFactory::idd_start>" << std::endl; + Debugger::tab (parser.level()); + std::cout << "AltRegionsFactory::idd_start>" << std::endl; } IdDictAltRegions* altregions = new IdDictAltRegions; if (Debugger::debug ()) { - Debugger::tab (); std::cout << "AltRegionsFactory::idd_start> previous=" << parser.m_altregions - << " new=" << altregions - << std::endl; + Debugger::tab (parser.level()); + std::cout << "AltRegionsFactory::idd_start> previous=" << parser.m_altregions + << " new=" << altregions + << std::endl; } parser.m_altregions = altregions; @@ -379,7 +352,8 @@ void AltRegionsFactory::idd_end (IdDictParser& parser, const XMLCoreNode& /*node { if (Debugger::debug ()) { - Debugger::tab (); std::cout << "AltRegionsFactory::idd_end>" << std::endl; + Debugger::tab (parser.level()); + std::cout << "AltRegionsFactory::idd_end>" << std::endl; } if (parser.m_altregions != 0) @@ -419,7 +393,8 @@ void RegionFactory::idd_start (IdDictParser& parser, const XMLCoreNode& node) { if (Debugger::debug ()) { - Debugger::tab (); std::cout << "RegionFactory::idd_start>" << std::endl; + Debugger::tab (parser.level()); + std::cout << "RegionFactory::idd_start>" << std::endl; } parser.m_region = new IdDictRegion; @@ -608,11 +583,12 @@ void RegionFactory::idd_start (IdDictParser& parser, const XMLCoreNode& node) if (Debugger::debug ()) { - Debugger::tab (); std::cout << "RegionFactory::idd_start> name, group, tag, next eta, prev/next samp, prev/next subdet " - << parser.m_region->m_name << " " - << parser.m_region->m_group << " " - << parser.m_region->m_tag << " " - << parser.m_region->m_next_abs_eta << " "; + Debugger::tab (parser.level()); + std::cout << "RegionFactory::idd_start> name, group, tag, next eta, prev/next samp, prev/next subdet " + << parser.m_region->m_name << " " + << parser.m_region->m_group << " " + << parser.m_region->m_tag << " " + << parser.m_region->m_next_abs_eta << " "; for (unsigned int i = 0; i < parser.m_region->m_prev_samp_names.size(); ++i) { std::cout << parser.m_region->m_prev_samp_names[i] << " "; } @@ -638,7 +614,8 @@ void RegionFactory::idd_end (IdDictParser& parser, const XMLCoreNode& /*node*/) { if (Debugger::debug ()) { - Debugger::tab (); std::cout << "RegionFactory::idd_end>" << std::endl; + Debugger::tab (parser.level()); + std::cout << "RegionFactory::idd_end>" << std::endl; } if (parser.m_region != 0) @@ -684,7 +661,8 @@ void SubRegionFactory::idd_start (IdDictParser& parser, const XMLCoreNode& node) { if (Debugger::debug ()) { - Debugger::tab (); std::cout << "SubRegionFactory::idd_start>" << std::endl; + Debugger::tab (parser.level()); + std::cout << "SubRegionFactory::idd_start>" << std::endl; } parser.m_subregion = new IdDictSubRegion; @@ -695,7 +673,8 @@ void SubRegionFactory::idd_end (IdDictParser& parser, const XMLCoreNode& /*node* { if (Debugger::debug ()) { - Debugger::tab (); std::cout << "SubRegionFactory::idd_end>" << std::endl; + Debugger::tab (parser.level()); + std::cout << "SubRegionFactory::idd_end>" << std::endl; } if (parser.m_subregion != 0) @@ -707,11 +686,12 @@ void SubRegionFactory::idd_end (IdDictParser& parser, const XMLCoreNode& /*node* } } -void RegionEntryFactory::idd_start (IdDictParser& /*parser*/, const XMLCoreNode& /*node*/) +void RegionEntryFactory::idd_start (IdDictParser& parser, const XMLCoreNode& /*node*/) { if (Debugger::debug ()) { - Debugger::tab (); std::cout << "RegionEntryFactory::idd_start>" << std::endl; + Debugger::tab (parser.level()); + std::cout << "RegionEntryFactory::idd_start>" << std::endl; } } @@ -719,7 +699,8 @@ void RegionEntryFactory::idd_end (IdDictParser& parser, const XMLCoreNode& /*nod { if (Debugger::debug ()) { - Debugger::tab (); std::cout << "RegionEntryFactory::idd_end>" << std::endl; + Debugger::tab (parser.level()); + std::cout << "RegionEntryFactory::idd_end>" << std::endl; } if (parser.m_regionentry != 0) @@ -736,7 +717,8 @@ void RangeFactory::idd_start (IdDictParser& parser, const XMLCoreNode& node) { if (Debugger::debug ()) { - Debugger::tab (); std::cout << "RangeFactory::idd_start>" << std::endl; + Debugger::tab (parser.level()); + std::cout << "RangeFactory::idd_start>" << std::endl; } IdDictRange* range = new IdDictRange; @@ -857,7 +839,8 @@ void ReferenceFactory::idd_start (IdDictParser& parser, const XMLCoreNode& node) { if (Debugger::debug ()) { - Debugger::tab (); std::cout << "ReferenceFactory::idd_start>" << std::endl; + Debugger::tab (parser.level()); + std::cout << "ReferenceFactory::idd_start>" << std::endl; } IdDictReference* reference = new IdDictReference; @@ -873,7 +856,8 @@ void DictionaryRefFactory::idd_start (IdDictParser& parser, const XMLCoreNode& n { if (Debugger::debug ()) { - Debugger::tab (); std::cout << "DictionaryRefFactory::idd_start>" << std::endl; + Debugger::tab (parser.level()); + std::cout << "DictionaryRefFactory::idd_start>" << std::endl; } IdDictDictionaryRef* dictionaryref = new IdDictDictionaryRef; diff --git a/DetectorDescription/IdDictParser/test/test_indet_id.cxx b/DetectorDescription/IdDictParser/test/test_indet_id.cxx index 9893d37f568462fc69a2e808b70fc06236b063c9..e818057081d0f2bb82e3671bda4160b197e4d72b 100755 --- a/DetectorDescription/IdDictParser/test/test_indet_id.cxx +++ b/DetectorDescription/IdDictParser/test/test_indet_id.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ @@ -822,7 +822,7 @@ int main (int argc, char* argv[]) std::cout << "Could not find 'part' field" << " in dictionary " << atlasDict->m_name << std::endl; - exit (1); + return 1; } std::vector <IdDictLabel*>::const_iterator itLabels = partField->m_labels.begin(); diff --git a/DetectorDescription/Identifier/Identifier/ATLAS_CHECK_THREAD_SAFETY b/DetectorDescription/Identifier/Identifier/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..3cb15597ac8626384b960762fc81fa5a01e5b063 --- /dev/null +++ b/DetectorDescription/Identifier/Identifier/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +DetectorDescription/Identifier diff --git a/DetectorDescription/Identifier/Identifier/ExpandedIdentifier.h b/DetectorDescription/Identifier/Identifier/ExpandedIdentifier.h index dd3aa92232d6151e630de842a69232e846fb3cf4..79e3ef1b642c296a32029fd6933f577f7225b4db 100644 --- a/DetectorDescription/Identifier/Identifier/ExpandedIdentifier.h +++ b/DetectorDescription/Identifier/Identifier/ExpandedIdentifier.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef IDENTIFIER_EXPANDEDIDENTIFIER_H @@ -88,18 +88,6 @@ // /1 == /1/3 // // -// error_code last_error () : returns the last error code -// produced by the most recent -// identifier operation. The possible -// values are : -// -// none -// bad_parameter -// field_not_found -// -// const std::string last_error_text () : returns a text describing the -// last error. -// // ---------------------------------------------------- // // Example of how to use an identifier : @@ -109,10 +97,6 @@ // ExpandedIdentifier id; // // id << 125 << 236 << 306 << 2222; -// if (id.last_error () != ExpandedIdentifier::none) -// { -// cout << "Error : " << id.last_error_text () << endl; -// } // // for (size_type i = 0; i < id.fields (); ++i) // { @@ -138,19 +122,6 @@ public: max_value = 0x3FFFFFFF } max_value_type; - //---------------------------------------------------------------- - // Possible errors that may occur in operations. - //---------------------------------------------------------------- - typedef enum - { - none, // success - bad_parameter, // bad value for any method parameter - field_not_found, // the field number is not found - - errors, - get - } error_code; - //---------------------------------------------------------------- // Constructors //---------------------------------------------------------------- @@ -229,22 +200,6 @@ public: */ int match (const ExpandedIdentifier& other) const; - //---------------------------------------------------------------- - // Error management - //---------------------------------------------------------------- - - //---------------------------------------------------------------- - // Return the error produced in the last operation - // The value identifier::none represents the successful condition. - //---------------------------------------------------------------- - error_code last_error () const; - - //---------------------------------------------------------------- - // Return a textual equivalent to the error produced - // in the last operation - //---------------------------------------------------------------- - const std::string last_error_text () const; - //---------------------------------------------------------------- // Utilities //---------------------------------------------------------------- @@ -262,11 +217,6 @@ private: // The actual identifier data. //---------------------------------------------------------------- element_vector m_fields; - - //---------------------------------------------------------------- - // Maintains the last error code (shared by all objects). - //---------------------------------------------------------------- - error_code set_last_error (error_code code = get) const; }; //----------------------------------------------- @@ -278,16 +228,13 @@ private: inline ExpandedIdentifier::ExpandedIdentifier () { - set_last_error (none); } //----------------------------------------------- inline ExpandedIdentifier::ExpandedIdentifier (const ExpandedIdentifier& other) + : m_fields (other.m_fields) { - set_last_error (none); - - m_fields = other.m_fields; } //----------------------------------------------- @@ -296,7 +243,6 @@ ExpandedIdentifier& ExpandedIdentifier::operator= (const ExpandedIdentifier& other) { if (this != &other) { - set_last_error (none); m_fields = other.m_fields; } return *this; @@ -308,7 +254,6 @@ ExpandedIdentifier& ExpandedIdentifier::operator= (ExpandedIdentifier&& other) { if (this != &other) { - set_last_error (none); m_fields = std::move(other.m_fields); } return *this; @@ -318,8 +263,6 @@ ExpandedIdentifier::operator= (ExpandedIdentifier&& other) inline ExpandedIdentifier::ExpandedIdentifier (const ExpandedIdentifier& other, size_type start) { - set_last_error (none); - if (start < other.fields ()) { element_vector::const_iterator it = other.m_fields.begin (); @@ -336,8 +279,6 @@ ExpandedIdentifier::ExpandedIdentifier (const ExpandedIdentifier& other, size_ty inline void ExpandedIdentifier::add (element_type value) { - set_last_error (none); - // Max size of id levels should be < 10 if(m_fields.capacity() < 10) m_fields.reserve(10); m_fields.push_back (value); @@ -347,8 +288,6 @@ void ExpandedIdentifier::add (element_type value) inline ExpandedIdentifier& ExpandedIdentifier::operator << (element_type value) { - set_last_error (none); - // Max size of id levels should be < 10 if(m_fields.capacity() < 10) m_fields.reserve(10); m_fields.push_back (value); @@ -360,18 +299,8 @@ ExpandedIdentifier& ExpandedIdentifier::operator << (element_type value) inline ExpandedIdentifier::element_type & ExpandedIdentifier::operator [] (size_type index) { - set_last_error (none); - - if (index >= m_fields.size ()) - { - static element_type dummy = 0; - - set_last_error (field_not_found); - - return (dummy); - } - - return (m_fields[index]); + // Raises an exception if index is out-of-bounds. + return m_fields.at (index); } //----------------------------------------------- @@ -388,16 +317,8 @@ void ExpandedIdentifier::clear () inline ExpandedIdentifier::element_type ExpandedIdentifier::operator [] (size_type index) const { - set_last_error (none); - - if (index >= m_fields.size ()) - { - set_last_error (field_not_found); - - return (0); - } - - return (m_fields[index]); + // Raises an exception if index is out-of-bounds. + return m_fields.at (index); } //----------------------------------------------- @@ -498,28 +419,5 @@ int ExpandedIdentifier::match (const ExpandedIdentifier& other) const return (1); } - // Error management -//----------------------------------------------- -inline -ExpandedIdentifier::error_code ExpandedIdentifier::last_error () const -{ - return (set_last_error (get)); -} - -//---------------------------------------------------------------- -inline -ExpandedIdentifier::error_code ExpandedIdentifier::set_last_error (error_code code) const -{ - static error_code last = none; - - if (code != get) - { - last = code; - } - - return (last); -} - - #endif diff --git a/DetectorDescription/Identifier/Identifier/IdHelper.h b/DetectorDescription/Identifier/Identifier/IdHelper.h index bae6c57428c73183dfb9316ee9301e501e9dc9a7..869015edb55fddde455a28d9688e4a002531813c 100644 --- a/DetectorDescription/Identifier/Identifier/IdHelper.h +++ b/DetectorDescription/Identifier/Identifier/IdHelper.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /*************************************************************************** @@ -61,12 +61,12 @@ public: /// in optimized compilation. One can switch or query this mode for /// any idHelper with the following methods: virtual bool do_checks (void) const = 0; - virtual void set_do_checks (bool do_checks) const = 0; + virtual void set_do_checks (bool do_checks) = 0; /// Neighbour initialization is performed by default /// One can switch or query this mode for /// any idHelper with the following method: virtual bool do_neighbours (void) const = 0; - virtual void set_do_neighbours (bool do_neighbours) const = 0; + virtual void set_do_neighbours (bool do_neighbours) = 0; // setting pointer to the MessageSvc virtual void setMessageSvc (IMessageSvc* msgSvc) = 0; diff --git a/DetectorDescription/Identifier/Identifier/Range.h b/DetectorDescription/Identifier/Identifier/Range.h index 699f7285a4363a75a49480796635103ed9815594..dfdbfcb3004c0814a43719bc443aeb82eafc85ac 100644 --- a/DetectorDescription/Identifier/Identifier/Range.h +++ b/DetectorDescription/Identifier/Identifier/Range.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef IDENTIFIER_RANGE_H @@ -249,11 +249,11 @@ public: * will have their min=max=id[i] */ Range (const ExpandedIdentifier& root); - + /** * Build a range from a textual description. */ - void build (const std::string& text); + void build (const std::string& text); /** * Build a range from a single ExpandedIdentifier @@ -364,7 +364,7 @@ public: public: identifier_factory (); identifier_factory (const identifier_factory& other); - identifier_factory (const MultiRange& multirange, bool sort); + identifier_factory (const MultiRange& multirange); ~identifier_factory (); identifier_factory& operator = (const identifier_factory& other); @@ -383,7 +383,6 @@ public: typedef id_vec::const_iterator id_const_iterator; ExpandedIdentifier m_id; - bool m_sort; Range::const_identifier_factory m_id_fac_it; Range::const_identifier_factory m_id_fac_end; range_vector::const_iterator m_range_it; @@ -398,7 +397,7 @@ public: public: const_identifier_factory (); const_identifier_factory (const const_identifier_factory& other); - const_identifier_factory (const MultiRange& multirange, bool sort); + const_identifier_factory (const MultiRange& multirange); ~const_identifier_factory (); const_identifier_factory& operator = (const const_identifier_factory& other); @@ -416,7 +415,6 @@ public: typedef id_vec::const_iterator id_const_iterator; ExpandedIdentifier m_id; - bool m_sort; Range::const_identifier_factory m_id_fac_it; Range::const_identifier_factory m_id_fac_end; range_vector::const_iterator m_range_it; @@ -429,7 +427,6 @@ public: /// Constructors MultiRange (); MultiRange (const MultiRange& other); - MultiRange (const std::string& text); /// Assignment. @@ -440,10 +437,7 @@ public: * two overlapping ones */ MultiRange (const Range& r, const Range& s); - - /// Build a range from a textual description. - void build (const std::string& text); - + /// Modifications void clear (); @@ -484,8 +478,8 @@ public: void reduce (); // identifier_factory management - identifier_factory factory_begin (bool sort = false); - const_identifier_factory factory_begin (bool sort = false) const; + identifier_factory factory_begin (); + const_identifier_factory factory_begin () const; identifier_factory factory_end (); const_identifier_factory factory_end () const; @@ -504,10 +498,6 @@ private: friend class const_identifier_factory; typedef std::vector<ExpandedIdentifier> id_vec; range_vector m_ranges; - // number of iterators accessing m_ids - mutable size_type m_it_count; - mutable id_vec m_ids; - }; diff --git a/DetectorDescription/Identifier/src/ExpandedIdentifier.cxx b/DetectorDescription/Identifier/src/ExpandedIdentifier.cxx index 584d48552e3a9d832bfccef12c2bc59db558f013..86387b11b3553eeb3237a45bb747a01622af6ef0 100644 --- a/DetectorDescription/Identifier/src/ExpandedIdentifier.cxx +++ b/DetectorDescription/Identifier/src/ExpandedIdentifier.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ @@ -43,8 +43,6 @@ ExpandedIdentifier::ExpandedIdentifier (const std::string& text) //----------------------------------------------- void ExpandedIdentifier::set (const std::string& text) { - set_last_error (none); - clear (); if (text.size () == 0) return; const char* ctext = text.c_str (); @@ -94,22 +92,6 @@ int ExpandedIdentifier::prefix_less (const ExpandedIdentifier& other) const return (0); } - // Error management - -//----------------------------------------------- -const std::string ExpandedIdentifier::last_error_text () const -{ - static const std::string text[] = { - "none", - "bad parameter", - "field not found" - }; - - error_code code = last_error (); - - return (text[code]); -} - //----------------------------------------------- ExpandedIdentifier::operator std::string () const { diff --git a/DetectorDescription/Identifier/src/Range.cxx b/DetectorDescription/Identifier/src/Range.cxx index ec4d2e29ee26fdfa1e011bc2ac1858365b7fb9c6..9e821eb4b9716947538d5e08a58aafc6338acf72 100644 --- a/DetectorDescription/Identifier/src/Range.cxx +++ b/DetectorDescription/Identifier/src/Range.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ @@ -322,17 +322,16 @@ Range::field::field () //----------------------------------------------- Range::field::field (const field& other) - : m_values (other.m_values), - m_indexes (other.m_indexes) + : m_minimum (other.m_minimum), + m_maximum (other.m_maximum), + m_values (other.m_values), + m_indexes (other.m_indexes), + m_indices (other.m_indices), + m_previous (other.m_previous), + m_next (other.m_next), + m_mode (other.m_mode), + m_continuation_mode (other.m_continuation_mode) { - m_minimum = other.m_minimum; - m_maximum = other.m_maximum; - m_indices = other.m_indices; - m_previous = other.m_previous; - m_next = other.m_next; - m_mode = other.m_mode; - m_continuation_mode = other.m_continuation_mode; - } //----------------------------------------------- @@ -556,7 +555,7 @@ bool Range::field::overlaps_with (const field& other) const all_values } check_type; - static check_type check_needed[5][5] = + static const check_type check_needed[5][5] = { {done, done, done, done, done}, {done, done, min_max, min_max, min_max}, @@ -1173,9 +1172,9 @@ Range::Range () } //----------------------------------------------- -Range::Range (const Range& other) +Range::Range (const Range& other) + : m_fields (other.m_fields) { - m_fields = other.m_fields; } //----------------------------------------------- @@ -2007,7 +2006,7 @@ void Range::const_identifier_factory::operator ++ () if (m_id.fields () == 0) return; size_type fields = m_id.fields (); - size_type i = fields; + size_type i = fields - 1; // // Starting from the end, we try to increment the m_id fields @@ -2352,16 +2351,13 @@ private: //----------------------------------------------- MultiRange::MultiRange () - : - m_it_count(0) { } //----------------------------------------------- MultiRange::MultiRange (const MultiRange& other) : - m_ranges (other.m_ranges), - m_it_count(0) + m_ranges (other.m_ranges) { } @@ -2369,12 +2365,7 @@ MultiRange::MultiRange (const MultiRange& other) MultiRange& MultiRange::operator= (const MultiRange& other) { if (this != &other) { - if (m_it_count > 0) { - // Can't do this if we still have iterators referencing us. - std::abort(); - } m_ranges = other.m_ranges; - m_it_count = other.m_it_count; } return *this; } @@ -2386,28 +2377,11 @@ MultiRange& MultiRange::operator= (const MultiRange& other) * source file. */ MultiRange::MultiRange (const Range& r, const Range& s) - : - m_it_count(0) { m_ranges.push_back (r); m_ranges.push_back (s); } - -//----------------------------------------------- -MultiRange::MultiRange (const std::string& text) - : - m_it_count(0) -{ - build (text); -} - -//----------------------------------------------- -void MultiRange::build (const std::string& text) -{ - static MultiRangeParser parser; - parser.run (text, *this); -} - + //----------------------------------------------- void MultiRange::clear () { @@ -2553,19 +2527,17 @@ bool MultiRange::has_overlap () const } //----------------------------------------------- -MultiRange::identifier_factory MultiRange::factory_begin (bool sort) +MultiRange::identifier_factory MultiRange::factory_begin () { const MultiRange& me = *this; - if (sort) m_it_count++; - return (identifier_factory (me, sort)); + return (identifier_factory (me)); } //----------------------------------------------- -MultiRange::const_identifier_factory MultiRange::factory_begin (bool sort) const +MultiRange::const_identifier_factory MultiRange::factory_begin () const { const MultiRange& me = *this; - if (sort) m_it_count++; - return (const_identifier_factory (me, sort)); + return (const_identifier_factory (me)); } //----------------------------------------------- @@ -2587,7 +2559,6 @@ MultiRange::const_identifier_factory MultiRange::factory_end () const //----------------------------------------------- MultiRange::identifier_factory::identifier_factory () : - m_sort(false), m_multirange(0) { } @@ -2596,7 +2567,6 @@ MultiRange::identifier_factory::identifier_factory () MultiRange::identifier_factory::identifier_factory (const identifier_factory& other) : m_id (other.m_id), - m_sort (other.m_sort), m_id_fac_it (other.m_id_fac_it), m_id_fac_end (other.m_id_fac_end), m_range_it (other.m_range_it), @@ -2605,107 +2575,31 @@ MultiRange::identifier_factory::identifier_factory (const identifier_factory& ot m_id_vec_end (other.m_id_vec_end), m_multirange (other.m_multirange) { - - if (m_sort && m_multirange) { - m_multirange->m_it_count++; -// std::cout << "MultiRange::identifier_factory::operator =: it_count" -// << m_multirange->m_it_count -// << std::endl; - } } //----------------------------------------------- -MultiRange::identifier_factory::identifier_factory (const MultiRange& multirange, bool sort) +MultiRange::identifier_factory::identifier_factory (const MultiRange& multirange) : - m_sort(sort), m_range_it(multirange.m_ranges.begin()), m_range_end(multirange.m_ranges.end()), m_multirange(&multirange) { if (m_range_it == m_range_end)return; // no ranges /** - * For sorted ids, must set up initial id vector. For unsorted, - * one can just set up iterators over ranges and ids. + * Set up iterators over ranges and ids. */ - if (m_sort) { - if (m_multirange->m_ids.size() > 0) { - // id vector has already been created - // Set up iterator over ids - m_id_vec_it = m_multirange->m_ids.begin(); - m_id_vec_end = m_multirange->m_ids.end(); - if (m_id_vec_it != m_id_vec_end) { - // Set id - m_id = *m_id_vec_it; - } - } - else { - // Limit sorted access to just under 500K ids - size_type nids = m_multirange->cardinality(); - if (500000 < nids) { - std::cout << "MultiRange::identifier_factory: unable to provide " - << " access to sorted identifier iterator. Limited to < 500k ids." - << std::endl; - } - else { - // Access and sort ids, removing duplicates - std::set<ExpandedIdentifier> ids; - for (; m_range_it != m_range_end; ++m_range_it) { - m_id_fac_it = (*m_range_it).factory_begin(); - m_id_fac_end = (*m_range_it).factory_end(); - for (; m_id_fac_it != m_id_fac_end; ++m_id_fac_it) { - ids.insert(*m_id_fac_it); - } - } - std::set<ExpandedIdentifier>::iterator firstIds = ids.begin(); - std::set<ExpandedIdentifier>::iterator lastIds = ids.end(); - for(; firstIds != lastIds; ++firstIds) { - m_multirange->m_ids.push_back (*firstIds); - } - // Set up iterator over ids - m_id_vec_it = m_multirange->m_ids.begin(); - m_id_vec_end = m_multirange->m_ids.end(); - if (m_id_vec_it != m_id_vec_end) { - // Set id - m_id = *m_id_vec_it; - } - } - } - } - else { - /** - * No sort: Set up the iterators for range and identifiers - */ - if (m_range_it != m_range_end) { - m_id_fac_it = (*m_range_it).factory_begin(); - m_id_fac_end = (*m_range_it).factory_end(); - if(m_id_fac_it != m_id_fac_end) { - // Set id - m_id = *m_id_fac_it; - } - } + if (m_range_it != m_range_end) { + m_id_fac_it = (*m_range_it).factory_begin(); + m_id_fac_end = (*m_range_it).factory_end(); + if(m_id_fac_it != m_id_fac_end) { + // Set id + m_id = *m_id_fac_it; + } } } MultiRange::identifier_factory::~identifier_factory () { - // remove id buffer in multirange if no iterator is still using it - if (m_sort && m_multirange) { - if(m_multirange->m_it_count) { - m_multirange->m_it_count--; - } - else { - std::cout << "MultiRange::identifier_factory::~identifier_factory: it_count ALREADY 0" - << std::endl; - } -// std::cout << "MultiRange::identifier_factory::~identifier_factory: it_count" -// << m_multirange->m_it_count -// << std::endl; - if (!m_multirange->m_it_count) { - m_multirange->m_ids.clear(); -// std::cout << "MultiRange::identifier_factory::~identifier_factory: cleared id buffer" -// << std::endl; - } - } } @@ -2714,7 +2608,6 @@ MultiRange::identifier_factory& MultiRange::identifier_factory::operator = (cons { if (this != &other) { m_id = other.m_id; - m_sort = other.m_sort; m_id_fac_it = other.m_id_fac_it; m_id_fac_end = other.m_id_fac_end; m_range_it = other.m_range_it; @@ -2722,14 +2615,6 @@ MultiRange::identifier_factory& MultiRange::identifier_factory::operator = (cons m_id_vec_it = other.m_id_vec_it; m_id_vec_end = other.m_id_vec_end; m_multirange = other.m_multirange; - // Must increment number of iterators looking at the id buffer in - // the multirange - if (m_sort && m_multirange) { - m_multirange->m_it_count++; -// std::cout << "MultiRange::identifier_factory::operator =: it_count" -// << m_multirange->m_it_count -// << std::endl; - } } return (*this); } @@ -2739,7 +2624,6 @@ MultiRange::identifier_factory& MultiRange::identifier_factory::operator = (iden { if (this != &other) { m_id = std::move(other.m_id); - m_sort = other.m_sort; m_id_fac_it = std::move(other.m_id_fac_it); m_id_fac_end = std::move(other.m_id_fac_end); m_range_it = other.m_range_it; @@ -2758,36 +2642,21 @@ void MultiRange::identifier_factory::operator ++ () if (m_id.fields () == 0) return; - /** - * Advance iterators depending upon whether or not we have sorted. - */ - - if (m_sort) { - m_id.clear(); - if (m_id_vec_it != m_id_vec_end) { - ++m_id_vec_it; - if (m_id_vec_it != m_id_vec_end) { - m_id = *m_id_vec_it; - } - } - } - else { - m_id.clear(); - if (m_range_it != m_range_end) { - if (m_id_fac_it != m_id_fac_end) { - ++m_id_fac_it; - } - if (m_id_fac_it == m_id_fac_end) { - ++m_range_it; - if (m_range_it != m_range_end) { - m_id_fac_it = (*m_range_it).factory_begin(); - m_id_fac_end = (*m_range_it).factory_end(); - } - } - if (m_id_fac_it != m_id_fac_end) { - m_id = *m_id_fac_it; - } - } + m_id.clear(); + if (m_range_it != m_range_end) { + if (m_id_fac_it != m_id_fac_end) { + ++m_id_fac_it; + } + if (m_id_fac_it == m_id_fac_end) { + ++m_range_it; + if (m_range_it != m_range_end) { + m_id_fac_it = (*m_range_it).factory_begin(); + m_id_fac_end = (*m_range_it).factory_end(); + } + } + if (m_id_fac_it != m_id_fac_end) { + m_id = *m_id_fac_it; + } } } @@ -2815,7 +2684,6 @@ bool MultiRange::identifier_factory::operator != (const identifier_factory& othe //----------------------------------------------- MultiRange::const_identifier_factory::const_identifier_factory () : - m_sort(false), m_multirange(0) { } @@ -2824,7 +2692,6 @@ MultiRange::const_identifier_factory::const_identifier_factory () MultiRange::const_identifier_factory::const_identifier_factory (const const_identifier_factory& other) : m_id (other.m_id), - m_sort (other.m_sort), m_id_fac_it (other.m_id_fac_it), m_id_fac_end (other.m_id_fac_end), m_range_it (other.m_range_it), @@ -2833,117 +2700,34 @@ MultiRange::const_identifier_factory::const_identifier_factory (const const_iden m_id_vec_end (other.m_id_vec_end), m_multirange (other.m_multirange) { - - if (m_sort && m_multirange) { - m_multirange->m_it_count++; -// std::cout << "MultiRange::const_identifier_factory::operator =: it_count" -// << m_multirange->m_it_count -// << std::endl; - } } //----------------------------------------------- -MultiRange::const_identifier_factory::const_identifier_factory (const MultiRange& multirange, bool sort) +MultiRange::const_identifier_factory::const_identifier_factory (const MultiRange& multirange) : - m_sort(sort), m_range_it(multirange.m_ranges.begin()), m_range_end(multirange.m_ranges.end()), m_multirange(&multirange) { -// std::cout << "MultiRange::const_identifier_factory::const_identifier_factory: sort " -// << sort << " size " << m_multirange->m_ids.size() -// << " range it " << (m_range_it == m_range_end) -// << " multi range " << (std::string)(*m_multirange) -// << std::endl; - - if (m_range_it == m_range_end)return; // no ranges /** - * For sorted ids, must set up initial id vector. For unsorted, - * one can just set up iterators over ranges and ids. + * Set up iterators over ranges and ids. */ - if (m_sort) { - if (m_multirange->m_ids.size() > 0) { - // id vector has already been created - // Set up iterator over ids - m_id_vec_it = m_multirange->m_ids.begin(); - m_id_vec_end = m_multirange->m_ids.end(); - if (m_id_vec_it != m_id_vec_end) { - // Set id - m_id = *m_id_vec_it; - } - } - else { - // Limit sorted access to just under 500K ids - size_type nids = m_multirange->cardinality(); - if (500000 < nids) { - std::cout << "MultiRange::identifier_factory: unable to provide " - << " access to sorted identifier iterator. Limited to < 500k ids." - << std::endl; - } - else { - // Access and sort ids, removing duplicates - std::set<ExpandedIdentifier> ids; - for (; m_range_it != m_range_end; ++m_range_it) { - m_id_fac_it = (*m_range_it).factory_begin(); - m_id_fac_end = (*m_range_it).factory_end(); - for (; m_id_fac_it != m_id_fac_end; ++m_id_fac_it) { - ids.insert(*m_id_fac_it); - } - } - std::set<ExpandedIdentifier>::iterator firstIds = ids.begin(); - std::set<ExpandedIdentifier>::iterator lastIds = ids.end(); - for(; firstIds != lastIds; ++firstIds) { - m_multirange->m_ids.push_back (*firstIds); - } - // Set up iterator over ids - m_id_vec_it = m_multirange->m_ids.begin(); - m_id_vec_end = m_multirange->m_ids.end(); - if (m_id_vec_it != m_id_vec_end) { - // Set id - m_id = *m_id_vec_it; - } - } - } - } - else { - /** - * No sort: Set up the iterators for range and identifiers - */ - if (m_range_it != m_range_end) { - m_id_fac_it = (*m_range_it).factory_begin(); - m_id_fac_end = (*m_range_it).factory_end(); - if(m_id_fac_it != m_id_fac_end) { - // Set id - m_id = *m_id_fac_it; - } - } + if (m_range_it != m_range_end) { + m_id_fac_it = (*m_range_it).factory_begin(); + m_id_fac_end = (*m_range_it).factory_end(); + if(m_id_fac_it != m_id_fac_end) { + // Set id + m_id = *m_id_fac_it; + } } } MultiRange::const_identifier_factory::~const_identifier_factory () { - // remove id buffer in multirange if no iterator is still using it - if (m_sort && m_multirange) { - if(m_multirange->m_it_count) { - m_multirange->m_it_count--; - } - else { - std::cout << "MultiRange::const_identifier_factory::~const_identifier_factory: it_count ALREADY 0" - << std::endl; - } -// std::cout << "MultiRange::const_identifier_factory::~const_identifier_factory: it_count" -// << m_multirange->m_it_count -// << std::endl; - if (!m_multirange->m_it_count) { - m_multirange->m_ids.clear(); -// std::cout << "MultiRange::const_identifier_factory::const_~identifier_factory: cleared id buffer" -// << std::endl; - } - } } @@ -2952,7 +2736,6 @@ MultiRange::const_identifier_factory& MultiRange::const_identifier_factory::oper { if (this != &other) { m_id = other.m_id; - m_sort = other.m_sort; m_id_fac_it = other.m_id_fac_it; m_id_fac_end = other.m_id_fac_end; m_range_it = other.m_range_it; @@ -2960,14 +2743,6 @@ MultiRange::const_identifier_factory& MultiRange::const_identifier_factory::oper m_id_vec_it = other.m_id_vec_it; m_id_vec_end = other.m_id_vec_end; m_multirange = other.m_multirange; - // Must increment number of iterators looking at the id buffer in - // the multirange - if (m_sort && m_multirange) { - m_multirange->m_it_count++; -// std::cout << "MultiRange::const_identifier_factory::operator =: it_count" -// << m_multirange->m_it_count -// << std::endl; - } } return (*this); } @@ -2977,7 +2752,6 @@ MultiRange::const_identifier_factory& MultiRange::const_identifier_factory::oper { if (this != &other) { m_id = std::move(other.m_id); - m_sort = other.m_sort; m_id_fac_it = std::move(other.m_id_fac_it); m_id_fac_end = std::move(other.m_id_fac_end); m_range_it = other.m_range_it; @@ -2996,36 +2770,21 @@ void MultiRange::const_identifier_factory::operator ++ () if (m_id.fields () == 0) return; - /** - * Advance iterators depending upon whether or not we have sorted. - */ - - if (m_sort) { - m_id.clear(); - if (m_id_vec_it != m_id_vec_end) { - ++m_id_vec_it; - if (m_id_vec_it != m_id_vec_end) { - m_id = *m_id_vec_it; - } - } - } - else { - m_id.clear(); - if (m_range_it != m_range_end) { - if (m_id_fac_it != m_id_fac_end) { - ++m_id_fac_it; - } - if (m_id_fac_it == m_id_fac_end) { - ++m_range_it; - if (m_range_it != m_range_end) { - m_id_fac_it = (*m_range_it).factory_begin(); - m_id_fac_end = (*m_range_it).factory_end(); - } - } - if (m_id_fac_it != m_id_fac_end) { - m_id = *m_id_fac_it; - } - } + m_id.clear(); + if (m_range_it != m_range_end) { + if (m_id_fac_it != m_id_fac_end) { + ++m_id_fac_it; + } + if (m_id_fac_it == m_id_fac_end) { + ++m_range_it; + if (m_range_it != m_range_end) { + m_id_fac_it = (*m_range_it).factory_begin(); + m_id_fac_end = (*m_range_it).factory_end(); + } + } + if (m_id_fac_it != m_id_fac_end) { + m_id = *m_id_fac_it; + } } } diff --git a/DetectorDescription/RegionSelector/python/RegSelConfig.py b/DetectorDescription/RegionSelector/python/RegSelConfig.py index 844eca624c1e15bf26488cf597983f085dc8db17..40ffe7ebf526e58cdea2a7e80f8a1fcee43a4c2d 100644 --- a/DetectorDescription/RegionSelector/python/RegSelConfig.py +++ b/DetectorDescription/RegionSelector/python/RegSelConfig.py @@ -1,10 +1,15 @@ # -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration # - def RegSelConfig( flags ): + from AthenaCommon.Logging import logging + log = logging.getLogger ('RegSelConfig') + log.warning("Please use regSeCfg - that name matches ComponentAccumulator generator functions naming convention ") + return regSelCfg( flags ) + +def regSelCfg( flags ): from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from RegionSelector.RegionSelectorConf import RegSelSvc from AthenaCommon.SystemOfUnits import mm @@ -13,92 +18,103 @@ def RegSelConfig( flags ): regSel = RegSelSvc() regSel.DeltaZ = 225 * mm - # there will be ifology here enabling only the configured detectors - from LArRegionSelector.LArRegionSelectorConf import LArRegionSelectorTable - larTable = LArRegionSelectorTable(name="LArRegionSelectorTable") - acc.addPublicTool( larTable ) - regSel.LArRegionSelectorTable = larTable - - from IOVDbSvc.IOVDbSvcConfig import addFolders - acc.merge( addFolders(flags, ['/LAR/Identifier/FebRodMap'], 'LAR' )) - - - from TileRawUtils.TileRawUtilsConf import TileRegionSelectorTable - tileTable = TileRegionSelectorTable(name="TileRegionSelectorTable") - acc.addPublicTool( tileTable ) - # ??? that is puzzle, the RegSelSvc seems not to ahev such a property - # while it is set in:RegSelSvcDefault.py - #regSel.TileRegionSelectorTable = tileTable - - regSel.enableCalo = True - regSel.enableID = True - regSel.enablePixel = True - regSel.enableSCT = True - regSel.enableTRT = True - - # Setup RegSelSvc for muon detector based on RegSelSvcDefault.py - from MuonRegionSelector.MuonRegionSelectorConf import RPC_RegionSelectorTable - rpcTable = RPC_RegionSelectorTable(name = "RPC_RegionSelectorTable") - acc.addPublicTool( rpcTable ) - - from MuonRegionSelector.MuonRegionSelectorConf import MDT_RegionSelectorTable - mdtTable = MDT_RegionSelectorTable(name = "MDT_RegionSelectorTable") - acc.addPublicTool( mdtTable ) - - from MuonRegionSelector.MuonRegionSelectorConf import TGC_RegionSelectorTable - tgcTable = TGC_RegionSelectorTable(name = "TGC_RegionSelectorTable") - acc.addPublicTool( tgcTable ) - - from MuonRegionSelector.MuonRegionSelectorConf import CSC_RegionSelectorTable - cscTable = CSC_RegionSelectorTable(name = "CSC_RegionSelectorTable") - acc.addPublicTool( cscTable ) - - # ??? that is same puzzle of Calo, the RegSelSvc seems not to ahev such a property - # while it is set in:RegSelSvcDefault.py - #regSel.RPC_RegionLUT_CreatorTool = rpcTable - #regSel.MDT_RegionLUT_CreatorTool = mdtTable - #regSel.TGC_RegionLUT_CreatorTool = tgcTable - #regSel.CSC_RegionLUT_CreatorTool = cscTable - - regSel.enableMuon = True - regSel.enableRPC = True - regSel.enableMDT = True - regSel.enableTGC = True - regSel.enableCSC = True - regSel.enableMM = False - - from InDetRegionSelector.InDetRegionSelectorConf import SiRegionSelectorTable - pixTable = SiRegionSelectorTable(name = "PixelRegionSelectorTable", - ManagerName = "Pixel", - OutputFile = "RoITablePixel.txt", - PrintHashId = True, - PrintTable = False) - acc.addPublicTool(pixTable) - - from InDetRegionSelector.InDetRegionSelectorConf import SiRegionSelectorTable - sctTable = SiRegionSelectorTable(name = "SCT_RegionSelectorTable", - ManagerName = "SCT", - OutputFile = "RoITableSCT.txt", - PrintHashId = True, - PrintTable = False) - acc.addPublicTool(sctTable) - - from InDetRegionSelector.InDetRegionSelectorConf import TRT_RegionSelectorTable - trtTable = TRT_RegionSelectorTable(name = "TRT_RegionSelectorTable", - ManagerName = "TRT", - OutputFile = "RoITableTRT.txt", - PrintHashId = True, - PrintTable = False) - acc.addPublicTool(trtTable) + if flags.Detector.GeometryLAr: + regSel.enableCalo = True + + from LArGeoAlgsNV.LArGMConfig import LArGMCfg + acc.merge( LArGMCfg( flags ) ) + + from LArRegionSelector.LArRegionSelectorConf import LArRegionSelectorTable + larTable = LArRegionSelectorTable(name="LArRegionSelectorTable") + acc.addPublicTool( larTable ) + regSel.LArRegionSelectorTable = larTable + + from IOVDbSvc.IOVDbSvcConfig import addFolders + acc.merge( addFolders(flags, ['/LAR/Identifier/FebRodMap'], 'LAR' )) + + if flags.Detector.GeometryTile: + regSel.enableCalo = True + + from TileGeoModel.TileGMConfig import TileGMCfg + acc.merge( TileGMCfg( flags ) ) + + from TileRawUtils.TileRawUtilsConf import TileRegionSelectorTable + tileTable = TileRegionSelectorTable(name="TileRegionSelectorTable") + acc.addPublicTool( tileTable ) + + if flags.Detector.GeometryPixel: + regSel.enableID = True + regSel.enablePixel = True + from InDetRegionSelector.InDetRegionSelectorConf import SiRegionSelectorTable + pixTable = SiRegionSelectorTable(name = "PixelRegionSelectorTable", + ManagerName = "Pixel", + OutputFile = "RoITablePixel.txt", + PrintHashId = True, + PrintTable = False) + acc.addPublicTool(pixTable) + + if flags.Detector.GeometrySCT: + regSel.enableID = True + regSel.enableSCT = True + + from InDetRegionSelector.InDetRegionSelectorConf import SiRegionSelectorTable + sctTable = SiRegionSelectorTable(name = "SCT_RegionSelectorTable", + ManagerName = "SCT", + OutputFile = "RoITableSCT.txt", + PrintHashId = True, + PrintTable = False) + acc.addPublicTool(sctTable) + + if flags.Detector.GeometryTRT: + regSel.enableID = True + regSel.enableTRT = True + + from InDetRegionSelector.InDetRegionSelectorConf import TRT_RegionSelectorTable + trtTable = TRT_RegionSelectorTable(name = "TRT_RegionSelectorTable", + ManagerName = "TRT", + OutputFile = "RoITableTRT.txt", + PrintHashId = True, + PrintTable = False) + acc.addPublicTool(trtTable) + + + if flags.Detector.GeometryRPC: + regSel.enableMuon = True + regSel.enableRPC = True + from MuonRegionSelector.MuonRegionSelectorConf import RPC_RegionSelectorTable + rpcTable = RPC_RegionSelectorTable(name = "RPC_RegionSelectorTable") + acc.addPublicTool( rpcTable ) + + if flags.Detector.GeometryMDT: + regSel.enableMuon = True + regSel.enableMDT = True + from MuonRegionSelector.MuonRegionSelectorConf import MDT_RegionSelectorTable + mdtTable = MDT_RegionSelectorTable(name = "MDT_RegionSelectorTable") + acc.addPublicTool( mdtTable ) + + if flags.Detector.GeometryTGC: + regSel.enableMuon = True + regSel.enableTGC = True + from MuonRegionSelector.MuonRegionSelectorConf import TGC_RegionSelectorTable + tgcTable = TGC_RegionSelectorTable(name = "TGC_RegionSelectorTable") + acc.addPublicTool( tgcTable ) + + if flags.Detector.GeometryCSC: + regSel.enableMuon = True + regSel.enableCSC = True + from MuonRegionSelector.MuonRegionSelectorConf import CSC_RegionSelectorTable + cscTable = CSC_RegionSelectorTable(name = "CSC_RegionSelectorTable") + acc.addPublicTool( cscTable ) + + + if flags.Detector.GeometryMM: + regSel.enableMM = True + acc.addService( regSel ) - from LArGeoAlgsNV.LArGMConfig import LArGMCfg - from TileGeoModel.TileGMConfig import TileGMCfg - acc.merge( LArGMCfg( flags ) ) - acc.merge( TileGMCfg( flags ) ) - return acc, regSel + return acc if __name__ == "__main__": from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator @@ -110,9 +126,19 @@ if __name__ == "__main__": Configurable.configurableRun3Behavior=True + ConfigFlags.Detector.GeometryPixel = True + ConfigFlags.Detector.GeometrySCT = True + ConfigFlags.Detector.GeometryTRT = True + ConfigFlags.Detector.GeometryLAr = True + ConfigFlags.Detector.GeometryTile = True + ConfigFlags.Detector.GeometryMDT = True + ConfigFlags.Detector.GeometryTGC = True + ConfigFlags.Detector.GeometryCSC = True + ConfigFlags.Detector.GeometryRPC = True ConfigFlags.Input.Files = defaultTestFiles.RAW + ConfigFlags.Input.isMC = False ConfigFlags.dump() ConfigFlags.lock() @@ -121,16 +147,16 @@ if __name__ == "__main__": ## move up -# when trying AOD -# from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg -# cfg.merge( PoolReadCfg( ConfigFlags ) ) + # when trying AOD + # from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg + # cfg.merge( PoolReadCfg( ConfigFlags ) ) from ByteStreamCnvSvc.ByteStreamConfig import TrigBSReadCfg cfg.merge(TrigBSReadCfg( ConfigFlags )) - acc,regSel = RegSelConfig( ConfigFlags ) + acc = regSelCfg( ConfigFlags ) cfg.merge( acc ) diff --git a/Event/ByteStreamCnvSvc/python/ByteStreamConfig.py b/Event/ByteStreamCnvSvc/python/ByteStreamConfig.py index d9e1c6676f07909d36ad7983254b44c69561f51a..36bb8fab6cdfe151b1c559e217e0172beab809e9 100644 --- a/Event/ByteStreamCnvSvc/python/ByteStreamConfig.py +++ b/Event/ByteStreamCnvSvc/python/ByteStreamConfig.py @@ -50,6 +50,8 @@ def TrigBSReadCfg( inputFlags ): from ByteStreamCnvSvc.ByteStreamCnvSvcConf import ByteStreamMetadataTool bsMetaDataTool = ByteStreamMetadataTool() + bsMetaDataTool.InputCollName = "ByteStreamMetadata" + bsMetaDataTool.OutputCollName = "ByteStreamMetadata" acc.addPublicTool( bsMetaDataTool ) from StoreGate.StoreGateConf import ProxyProviderSvc, StoreGateSvc diff --git a/Event/ByteStreamCnvSvc/python/ReadByteStream.py b/Event/ByteStreamCnvSvc/python/ReadByteStream.py index 301a7b47fad9a1b9de9d3c2837f62259198bda49..f6fab4ce1083699bd29c71ad41342eb2ece50ff7 100644 --- a/Event/ByteStreamCnvSvc/python/ReadByteStream.py +++ b/Event/ByteStreamCnvSvc/python/ReadByteStream.py @@ -67,6 +67,8 @@ if not hasattr (svcMgr.ToolSvc, 'IOVDbMetaDataTool'): svcMgr.MetaDataSvc.MetaDataTools += [ "ByteStreamMetadataTool" ] if not hasattr (svcMgr.ToolSvc, 'ByteStreamMetadataTool'): svcMgr.ToolSvc += CfgMgr.ByteStreamMetadataTool() + svcMgr.ToolSvc.ByteStreamMetadataTool.InputCollName = "ByteStreamMetadata" + svcMgr.ToolSvc.ByteStreamMetadataTool.OutputCollName = "ByteStreamMetadata" # User metadata in FMD if not hasattr (svcMgr, 'ByteStreamAttListMetadataSvc'): diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamCnvSvc.cxx b/Event/ByteStreamCnvSvc/src/ByteStreamCnvSvc.cxx index 1717f26c348a6c395cb20f7369784cc37201de52..b86ed1261fdd77a587dc188d2a78f4ea27392d10 100644 --- a/Event/ByteStreamCnvSvc/src/ByteStreamCnvSvc.cxx +++ b/Event/ByteStreamCnvSvc/src/ByteStreamCnvSvc.cxx @@ -21,9 +21,6 @@ #include <algorithm> -/// External definitions (TODO: remove this once all "extern" references are removed) -long ByteStream_StorageType = ByteStreamAddress::storageType(); - /// Standard constructor ByteStreamCnvSvc::ByteStreamCnvSvc(const std::string& name, ISvcLocator* pSvcLocator) : ByteStreamCnvSvcBase(name, pSvcLocator), diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageInputSvc.cxx b/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageInputSvc.cxx index ac1e5b12a962c5faa3ab19b3e45db3dd5edf94c8..4a7511a92fcaf0b756430f029f486d3f1e08e6ca 100644 --- a/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageInputSvc.cxx +++ b/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageInputSvc.cxx @@ -6,6 +6,7 @@ #include "DumpFrags.h" #include "ByteStreamData/ByteStreamMetadata.h" +#include "ByteStreamData/ByteStreamMetadataContainer.h" #include "ByteStreamData/ByteStreamUserMetadata.h" #include "ByteStreamCnvSvcBase/ByteStreamAddress.h" #include "EventStorage/pickDataReader.h" @@ -168,7 +169,9 @@ bool ByteStreamEventStorageInputSvc::loadMetadata() m_reader->maxEvents(), m_reader->recEnable(), m_reader->triggerType(), word1.to_ulong(), word2.to_ulong(), m_reader->beamType(), m_reader->beamEnergy(), m_reader->GUID(), m_reader->stream(), m_reader->projectTag(), m_reader->lumiblockNumber(), nonuser); - StatusCode status = m_mdSvc->record(metadata, "ByteStreamMetadata"); + ByteStreamMetadataContainer* bsmdc = new ByteStreamMetadataContainer; + bsmdc->push_back(metadata); + StatusCode status = m_mdSvc->record(bsmdc, "ByteStreamMetadata"); if (!status.isSuccess()) { delete metadata; metadata = 0; ATH_MSG_WARNING("Unable to record Input MetaData for ByteStream"); diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamMetadataTool.cxx b/Event/ByteStreamCnvSvc/src/ByteStreamMetadataTool.cxx index 3f58c4f1680648fb5fcaa3e6bce2b982e3ee1f18..d9dc41baaa81c24c0861fd207b3c30618a31ee0c 100644 --- a/Event/ByteStreamCnvSvc/src/ByteStreamMetadataTool.cxx +++ b/Event/ByteStreamCnvSvc/src/ByteStreamMetadataTool.cxx @@ -10,19 +10,15 @@ #include "ByteStreamMetadataTool.h" -//#include "GaudiKernel/IIncidentSvc.h" -//#include "GaudiKernel/FileIncident.h" - -#include "ByteStreamData/ByteStreamMetadataContainer.h" -#include "StoreGate/StoreGateSvc.h" - //___________________________________________________________________________ ByteStreamMetadataTool::ByteStreamMetadataTool(const std::string& type, - const std::string& name, - const IInterface* parent) : AthAlgTool(type, name, parent), - m_pMetaDataStore("StoreGateSvc/MetaDataStore", name), - m_pInputStore("StoreGateSvc/InputMetaDataStore", name) { - declareInterface<IMetaDataTool>(this); + const std::string& name, + const IInterface* parent) + : GenericMetadataToolNoAux <ByteStreamMetadataContainer>(type, name, parent) +{ + m_inputCollName="ByteStreamMetadata"; + m_outputCollName="ByteStreamMetadata"; + m_markIncomplete=false; } //___________________________________________________________________________ @@ -32,138 +28,46 @@ ByteStreamMetadataTool::~ByteStreamMetadataTool() { //___________________________________________________________________________ StatusCode ByteStreamMetadataTool::initialize() { ATH_MSG_INFO("Initializing " << name() << " - package version " << PACKAGE_VERSION); - if (!::AthAlgTool::initialize().isSuccess()) { - ATH_MSG_FATAL("Cannot initialize AthService base class."); - return(StatusCode::FAILURE); - } - - // locate the DetectorStore and initialize our local ptr - StatusCode status = m_pMetaDataStore.retrieve(); - if (!status.isSuccess() || 0 == m_pMetaDataStore) { - ATH_MSG_ERROR("Could not find MetaDataStore"); - return(status); - } - status = m_pInputStore.retrieve(); - if (!status.isSuccess() || 0 == m_pInputStore) { - ATH_MSG_ERROR("Could not find InputMetaDataStore"); - return(status); - } return(StatusCode::SUCCESS); } //___________________________________________________________________________ StatusCode ByteStreamMetadataTool::finalize() { ATH_MSG_INFO("in finalize()"); - return(::AthAlgTool::finalize()); + return(StatusCode::SUCCESS); } -StatusCode ByteStreamMetadataTool::beginInputFile(const SG::SourceID&) -{ - return this->beginInputFile(); -} - -StatusCode ByteStreamMetadataTool::beginInputFile() +StatusCode ByteStreamMetadataTool::updateContainer( + ByteStreamMetadataContainer* bsmdc_out, + const ByteStreamMetadataContainer* bsmdc_in ) { - std::vector<std::string> vKeys; - std::set<std::string> keys; - m_pInputStore->keys<ByteStreamMetadata>(vKeys); - keys.insert(vKeys.begin(), vKeys.end()); - m_pInputStore->keys<ByteStreamMetadataContainer>(vKeys); - keys.insert(vKeys.begin(), vKeys.end()); - std::vector<ByteStreamMetadata*> copy; std::set<std::string> transGuids; - for (std::set<std::string>::const_iterator keyIter = keys.begin(), keyEnd = keys.end(); - keyIter != keyEnd; keyIter++) { - ATH_MSG_DEBUG("Processing Input ByteStreamMetadata, key = " << *keyIter); - copy.clear(); - if (m_pInputStore->contains<ByteStreamMetadata>(*keyIter)) { - std::list<SG::ObjectWithVersion<ByteStreamMetadata> > allVersions; - StatusCode status = m_pInputStore->retrieveAllVersions(allVersions, *keyIter); - if (!status.isSuccess()) { - ATH_MSG_ERROR("Could not find Input ByteStreamMetadata"); - return StatusCode::FAILURE; - } else { - ATH_MSG_DEBUG("Found Input ByteStreamMetadata"); - } - for (SG::ObjectWithVersion<ByteStreamMetadata>& obj : allVersions) { - copy.push_back(new ByteStreamMetadata(*obj.dataObject)); - } - } - if (m_pInputStore->contains<ByteStreamMetadataContainer>(*keyIter)) { - std::list<SG::ObjectWithVersion<ByteStreamMetadataContainer> > allVersions; - StatusCode status = m_pInputStore->retrieveAllVersions(allVersions, *keyIter); - if (!status.isSuccess()) { - ATH_MSG_ERROR("Could not find Input ByteStreamMetadataContainer"); - return StatusCode::FAILURE; - } else { - ATH_MSG_DEBUG("Found Input ByteStreamMetadataContainer"); - } - for (SG::ObjectWithVersion<ByteStreamMetadataContainer>& obj : allVersions) { - const ByteStreamMetadataContainer& bsmdc = *obj.dataObject; - for (const ByteStreamMetadata* md : bsmdc) { - copy.push_back(new ByteStreamMetadata(*md)); - } - } - } - if (!copy.empty()) { - transGuids.clear(); - // Check for existing container - ByteStreamMetadataContainer* bsmdc = 0; - if (m_pMetaDataStore->contains<ByteStreamMetadataContainer>(*keyIter)) { - ATH_MSG_DEBUG("Pre-existing ByteStreamMetadataContainer found"); - StatusCode status = m_pMetaDataStore->retrieve(bsmdc, *keyIter); - if (!status.isSuccess()) { - ATH_MSG_ERROR("Could not retrieve " << *keyIter << " ByteStreamMetadataContainer"); - return StatusCode::FAILURE; - } - for (ByteStreamMetadataContainer::const_iterator iter = bsmdc->begin(), iterEnd = bsmdc->end(); + + // Put input into vector of components + for (const ByteStreamMetadata* md : *bsmdc_in) { + copy.push_back(new ByteStreamMetadata(*md)); + } + // If anything was in the input, copy to output + if (!copy.empty()) { + transGuids.clear(); + // Check for existing guid in output container + for (auto iter = bsmdc_out->begin(), iterEnd = bsmdc_out->end(); iter != iterEnd; iter++) { - transGuids.insert((*iter)->getGuid()); - } - } else { - bsmdc = new ByteStreamMetadataContainer; - StatusCode status = m_pMetaDataStore->record(bsmdc, *keyIter); - if (!status.isSuccess()) { - ATH_MSG_ERROR("Could not store ByteStreamMetadata in Metadata store"); - return StatusCode::FAILURE; - } else { - ATH_MSG_DEBUG("ByteStreamMetadata copied to MetaDataStore"); - } - } - for (std::vector<ByteStreamMetadata*>::iterator iter = copy.begin(), iterEnd = copy.end(); + transGuids.insert((*iter)->getGuid()); + } + for (auto iter = copy.begin(), iterEnd = copy.end(); iter != iterEnd; iter++) { - // Only insert new metadata records (with GUID not yet in container) - if (transGuids.insert((*iter)->getGuid()).second) { - bsmdc->push_back(*iter); - *iter = 0; - } else { - delete *iter; *iter = 0; - } + // Only insert new metadata records (with GUID not yet in container) + if (transGuids.insert((*iter)->getGuid()).second) { + bsmdc_out->push_back(*iter); + *iter = 0; + } else { + delete *iter; *iter = 0; } } } return StatusCode::SUCCESS; } - -StatusCode ByteStreamMetadataTool::endInputFile(const SG::SourceID&) -{ - return StatusCode::SUCCESS; -} - -StatusCode ByteStreamMetadataTool::endInputFile() -{ - return StatusCode::SUCCESS; -} - -StatusCode ByteStreamMetadataTool::metaDataStop(const SG::SourceID&) -{ - return StatusCode::SUCCESS; -} - -StatusCode ByteStreamMetadataTool::metaDataStop() -{ - return StatusCode::SUCCESS; -} diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamMetadataTool.h b/Event/ByteStreamCnvSvc/src/ByteStreamMetadataTool.h index a9c579681ffc1676b5617f8de4ef00612b7fdbee..6f753dbc6cc325273742ebd685ca04a938e7c9f3 100644 --- a/Event/ByteStreamCnvSvc/src/ByteStreamMetadataTool.h +++ b/Event/ByteStreamCnvSvc/src/ByteStreamMetadataTool.h @@ -1,20 +1,21 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef BYTESTREAMMETADATATOOL_H #define BYTESTREAMMETADATATOOL_H /** @file ByteStreamMetadataTool.h - * @brief This file contains the class definition for the ByteStreamMetadataTool class. + * @brief This class is an implementation of the GenericMetadataToolNoAux + * for the ByteStreamMetadataContainer. * @author Peter van Gemmeren <gemmeren@anl.gov> * $Id: $ **/ #include "GaudiKernel/ServiceHandle.h" -#include "AthenaBaseComps/AthAlgTool.h" #include "AthenaKernel/SourceID.h" -#include "AthenaKernel/IMetaDataTool.h" +#include "AthenaKernel/GenericMetadataToolNoAux.h" +#include "ByteStreamData/ByteStreamMetadataContainer.h" #include <string> @@ -23,8 +24,8 @@ class StoreGateSvc; /** @class ByteStreamMetadataTool * @brief This class provides the MetaDataTool for ByteStreamMetadata objects **/ -class ByteStreamMetadataTool : public ::AthAlgTool, - virtual public IMetaDataTool { +class ByteStreamMetadataTool : public GenericMetadataToolNoAux <ByteStreamMetadataContainer> +{ public: /// Standard Service Constructor ByteStreamMetadataTool(const std::string& type, const std::string& name, const IInterface* parent); @@ -32,21 +33,11 @@ public: virtual ~ByteStreamMetadataTool(); /// Gaudi Service Interface method implementations: - StatusCode initialize(); - StatusCode finalize(); - - /// Incident service handle listening for BeginInputFile and EndInputFile. - virtual StatusCode beginInputFile(); - virtual StatusCode endInputFile(); - virtual StatusCode metaDataStop(const SG::SourceID&); - virtual StatusCode beginInputFile(const SG::SourceID&); - virtual StatusCode endInputFile(const SG::SourceID&); - virtual StatusCode metaDataStop(); - -private: - typedef ServiceHandle<StoreGateSvc> StoreGateSvc_t; - StoreGateSvc_t m_pMetaDataStore; - StoreGateSvc_t m_pInputStore; + StatusCode initialize() override; + StatusCode finalize() override; + /// Virtual method to update a container with information from another one + virtual StatusCode updateContainer(ByteStreamMetadataContainer* bsmdc_out, + const ByteStreamMetadataContainer* bsmdc_in ); }; #endif diff --git a/Event/ByteStreamCnvSvc/src/EventInfoByteStreamCnv.cxx b/Event/ByteStreamCnvSvc/src/EventInfoByteStreamCnv.cxx index 221a2a0d700e202b661b0397332d6f1f03956978..fe6f552c2f4a0a1cbeda82d32ba103c4cf981f85 100644 --- a/Event/ByteStreamCnvSvc/src/EventInfoByteStreamCnv.cxx +++ b/Event/ByteStreamCnvSvc/src/EventInfoByteStreamCnv.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "EventInfoByteStreamCnv.h" @@ -10,6 +10,7 @@ #include "ByteStreamData/RawEvent.h" #include "ByteStreamData/ByteStreamMetadata.h" +#include "ByteStreamData/ByteStreamMetadataContainer.h" #include "GaudiKernel/MsgStream.h" #include "GaudiKernel/StatusCode.h" @@ -36,7 +37,7 @@ // const ICnvFactory& EventInfoByteStreamCnvFactory = s_factory; EventInfoByteStreamCnv::EventInfoByteStreamCnv(ISvcLocator* svcloc) - : Converter(ByteStream_StorageType, classID(), svcloc), + : Converter(storageType(), classID(), svcloc), m_ByteStreamCnvSvc(0), m_robDataProvider("ROBDataProviderSvc", "EventInfoByteStreamCnv"), m_mdSvc("InputMetaDataStore", "EventInfoByteStreamCnv"), @@ -50,6 +51,10 @@ const CLID& EventInfoByteStreamCnv::classID() { return(ClassID_traits<EventInfo>::ID()); } +long EventInfoByteStreamCnv::storageType() { + return ByteStreamAddress::storageType(); +} + StatusCode EventInfoByteStreamCnv::initialize() { StatusCode sc = Converter::initialize(); if (StatusCode::SUCCESS != sc) { @@ -199,11 +204,12 @@ StatusCode EventInfoByteStreamCnv::createObj(IOpaqueAddress* pAddr, DataObject*& unsigned int detMask0 = 0xFFFFFFFF, detMask1 = 0xFFFFFFFF, detMask2 = 0xFFFFFFFF, detMask3 = 0xFFFFFFFF; // Get ByteStream Metadata from Input MetaData Store - const ByteStreamMetadata* metadata = 0; - StatusCode status = m_mdSvc->retrieve(metadata, "ByteStreamMetadata"); + const ByteStreamMetadataContainer* metadatacont = 0; + StatusCode status = m_mdSvc->retrieve(metadatacont, "ByteStreamMetadata"); if (!status.isSuccess()) { log << MSG::WARNING << "Unable to retrieve Input MetaData for ByteStream" << endmsg; } else { + const ByteStreamMetadata* metadata = *(metadatacont->begin()); uint64_t detectorMask = metadata->getDetectorMask(); detMask0 = (unsigned int)(detectorMask & 0x00000000FFFFFFFF); detMask1 = (unsigned int)(detectorMask >> 32); diff --git a/Event/ByteStreamCnvSvc/src/EventInfoByteStreamCnv.h b/Event/ByteStreamCnvSvc/src/EventInfoByteStreamCnv.h index edd6117e761674ed6fa85bae8bdffbe1277d0343..90f726f44cc7260ecd2dc8c41abc3ca785df3e80 100644 --- a/Event/ByteStreamCnvSvc/src/EventInfoByteStreamCnv.h +++ b/Event/ByteStreamCnvSvc/src/EventInfoByteStreamCnv.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef EVENTINFOBYTESTREAMCNV_H @@ -18,9 +18,6 @@ #include <string> class IOpaqueAddress; -//class DataObject; -//class StatusCode; -//class IAddressCreator; class ByteStreamCnvSvc; class IROBDataProviderSvc; class StoreGateSvc; @@ -28,8 +25,6 @@ class StoreGateSvc; // Abstract factory to create the converter template <class TYPE> class CnvFactory; -// Externals -extern long ByteStream_StorageType; /** @class EventInfoByteStreamCnv * @brief This class implements the ByteStream Converter for EventInfo. @@ -40,17 +35,17 @@ class EventInfoByteStreamCnv : public Converter { public: EventInfoByteStreamCnv(ISvcLocator* svcloc); - virtual StatusCode initialize(); - virtual StatusCode finalize(); + virtual StatusCode initialize() override; + virtual StatusCode finalize() override; /// converter method to create object - virtual StatusCode createObj(IOpaqueAddress* pAddr, DataObject*& pObj); + virtual StatusCode createObj(IOpaqueAddress* pAddr, DataObject*& pObj) override; /// converter method to write object - virtual StatusCode createRep(DataObject* pObj, IOpaqueAddress*& pAddr); + virtual StatusCode createRep(DataObject* pObj, IOpaqueAddress*& pAddr) override; /// Storage type and class ID - virtual long repSvcType() const { return ByteStream_StorageType; } - static long storageType() { return ByteStream_StorageType; } + virtual long repSvcType() const override { return i_repSvcType(); } + static long storageType(); static const CLID& classID(); private: diff --git a/Event/ByteStreamCnvSvcBase/ByteStreamCnvSvcBase/ByteStreamCnvSvcBase.h b/Event/ByteStreamCnvSvcBase/ByteStreamCnvSvcBase/ByteStreamCnvSvcBase.h index d296bb4f1f94d805de25df519fb43a4951f501b2..eb20d2b92eac63509321d235ca7aec8543050fb0 100755 --- a/Event/ByteStreamCnvSvcBase/ByteStreamCnvSvcBase/ByteStreamCnvSvcBase.h +++ b/Event/ByteStreamCnvSvcBase/ByteStreamCnvSvcBase/ByteStreamCnvSvcBase.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef BYTESTREAMCNVSVCBASE_BYTESTREAMCNVSVCBASE_H @@ -29,19 +29,19 @@ public: virtual ~ByteStreamCnvSvcBase(); /// Required of all Gaudi Services - StatusCode initialize(); + virtual StatusCode initialize() override; /// Required of all Gaudi services: see Gaudi documentation for details - virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface); + virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override; /// Checks whether an IOpaqueAddress is a GenericAddress - virtual StatusCode updateServiceState(IOpaqueAddress* pAddress); + virtual StatusCode updateServiceState(IOpaqueAddress* pAddress) override; /// Implementation of IByteStreamEventAccess: Get RawEvent - virtual RawEventWrite* getRawEvent() { return m_rawEventWrite; } + virtual RawEventWrite* getRawEvent() override { return m_rawEventWrite; } /// Implementation of IIncidentListener: Handle for EndEvent incidence - virtual void handle(const Incident&); + virtual void handle(const Incident&) override; protected: // data RawEventWrite* m_rawEventWrite; diff --git a/Event/ByteStreamCnvSvcBase/ByteStreamCnvSvcBase/CollectionByteStreamCnv.h b/Event/ByteStreamCnvSvcBase/ByteStreamCnvSvcBase/CollectionByteStreamCnv.h index bae641fbeb9c6c34c750076c45ab9bbcafc5d4ae..243505121ab21a172ee3e073398e1435d7d5f984 100755 --- a/Event/ByteStreamCnvSvcBase/ByteStreamCnvSvcBase/CollectionByteStreamCnv.h +++ b/Event/ByteStreamCnvSvcBase/ByteStreamCnvSvcBase/CollectionByteStreamCnv.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef BYTESTRAMCNVSVC_COLLECTIONBYTESTREAMCNV_H @@ -19,9 +19,6 @@ class IROBDataProviderSvc; // Abstract factory to create the converter template <class TYPE> class CnvFactory; -// Externals -extern long ByteStream_StorageType; - /** * @class CollectionByteStreamCnv * @brief template class for BS converter for Collections @@ -43,23 +40,23 @@ class CollectionByteStreamCnv: public Converter { /** @brief initialize the converter */ - virtual StatusCode initialize(); + virtual StatusCode initialize() override; /** @brief create data object from Address */ - virtual StatusCode createObj(IOpaqueAddress* pAddr, DataObject*& pObj); + virtual StatusCode createObj(IOpaqueAddress* pAddr, DataObject*& pObj) override; /** @brief write data object to Bytestream */ - virtual StatusCode createRep(DataObject* pObj, IOpaqueAddress*& pAddr); + virtual StatusCode createRep(DataObject* pObj, IOpaqueAddress*& pAddr) override; /** @brief Storage type for BS */ - virtual long repSvcType() const { return ByteStream_StorageType; } + virtual long repSvcType() const override { return i_repSvcType(); } /** @brief Storage type for BS */ - static long storageType() { return ByteStream_StorageType; } + static long storageType(); /** @brief CLID for the data type */ diff --git a/Event/ByteStreamCnvSvcBase/ByteStreamCnvSvcBase/CollectionByteStreamCnv.icc b/Event/ByteStreamCnvSvcBase/ByteStreamCnvSvcBase/CollectionByteStreamCnv.icc index bbf4ac7f8ffb854cc77d63bb10fbc43495899bfd..eed763b0712aba7b2ea4b88f9982634d74dcd055 100755 --- a/Event/ByteStreamCnvSvcBase/ByteStreamCnvSvcBase/CollectionByteStreamCnv.icc +++ b/Event/ByteStreamCnvSvcBase/ByteStreamCnvSvcBase/CollectionByteStreamCnv.icc @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "ByteStreamCnvSvcBase/ByteStreamCnvSvcBase.h" @@ -18,17 +18,22 @@ template< typename TOOL> CollectionByteStreamCnv< TOOL>::CollectionByteStreamCnv(ISvcLocator* svcloc) : - Converter(ByteStream_StorageType, classID(), svcloc), m_robDataProvider(0), m_tool(0) + Converter(storageType(), classID(), svcloc), m_robDataProvider(0), m_tool(0) { } -template< typename TOOL> +template< typename TOOL> const CLID& CollectionByteStreamCnv<TOOL>::classID(){ return ClassID_traits<COLLECTION>::ID() ; } +template< typename TOOL> +long CollectionByteStreamCnv<TOOL>::storageType(){ + return ByteStreamAddress::storageType(); +} + template< typename TOOL> StatusCode CollectionByteStreamCnv<TOOL>::initialize() diff --git a/Event/ByteStreamCnvSvcBase/ByteStreamCnvSvcBase/IROBDataProviderSvc.h b/Event/ByteStreamCnvSvcBase/ByteStreamCnvSvcBase/IROBDataProviderSvc.h index f78e47850d28771a97e8339f4941ef51920b3dea..da4f888ce9a74eb085c97aaf42f9f01338c4381c 100755 --- a/Event/ByteStreamCnvSvcBase/ByteStreamCnvSvcBase/IROBDataProviderSvc.h +++ b/Event/ByteStreamCnvSvcBase/ByteStreamCnvSvcBase/IROBDataProviderSvc.h @@ -12,6 +12,7 @@ #include <cstdint> #include <vector> #include <string> +#include <string_view> #include <stdexcept> #include <functional> @@ -32,7 +33,7 @@ public: DeclareInterfaceID(IROBDataProviderSvc, 1, 1); /// Add ROBFragments to cache for given ROB ids, ROB fragments may be retrieved with DataCollector - virtual void addROBData(const std::vector<uint32_t>& robIds, const std::string callerName="UNKNOWN") = 0 ; + virtual void addROBData(const std::vector<uint32_t>& robIds, const std::string_view callerName="UNKNOWN") = 0 ; /// Add a given LVL1/LVL2 ROBFragment to cache virtual void setNextEvent(const std::vector<ROBF>& result) = 0 ; @@ -43,7 +44,7 @@ public: /// Retrieve ROBFragments for given ROB ids from cache - virtual void getROBData(const std::vector<uint32_t>& robIds, VROBFRAG& robFragments, const std::string callerName="UNKNOWN") = 0; + virtual void getROBData(const std::vector<uint32_t>& robIds, VROBFRAG& robFragments, const std::string_view callerName="UNKNOWN") = 0; /// Retrieve the whole event. @@ -59,8 +60,8 @@ public: // variants for MT, it has an implementation for now in order not to require change in all implementations yet, they will all become pure virtual methods - virtual void addROBData(const EventContext& /*context*/, const std::vector<uint32_t>& /*robIds*/, const std::string callerName="UNKNOWN") { - throw std::runtime_error( std::string( callerName+" is using unimplemented ") + __FUNCTION__ ) ; + virtual void addROBData(const EventContext& /*context*/, const std::vector<uint32_t>& /*robIds*/, const std::string_view callerName="UNKNOWN") { + throw std::runtime_error( std::string(callerName)+ std::string(" is using unimplemented ") + __FUNCTION__ ) ; } virtual void setNextEvent(const EventContext& /*context*/, const std::vector<ROBF>& /*result*/) { throw std::runtime_error( std::string("Unimplemented ") + __FUNCTION__ ); @@ -68,8 +69,9 @@ public: virtual void setNextEvent( const EventContext& /*context*/, const RawEvent* /*re*/) { throw std::runtime_error(std::string("Unimplemented ") + __FUNCTION__ ); } - virtual void getROBData(const EventContext& /*context*/, const std::vector<uint32_t>& /*robIds*/, VROBFRAG& /*robFragments*/, const std::string callerName="UNKNOWN") { - throw std::runtime_error( std::string( callerName+" is using unimplemented ") + __FUNCTION__ ) ; + virtual void getROBData(const EventContext& /*context*/, const std::vector<uint32_t>& /*robIds*/, VROBFRAG& /*robFragments*/, + const std::string_view callerName="UNKNOWN") { + throw std::runtime_error( std::string(callerName)+ std::string(" is using unimplemented ") + __FUNCTION__ ) ; } virtual const RawEvent* getEvent(const EventContext& /*context*/) { throw std::runtime_error(std::string("Unimplemented ") + __FUNCTION__ ); @@ -102,8 +104,8 @@ public: /// @brief Collect all data for an event from the ROS and put them into the cache /// @return value: number of ROBs which were retrieved to complete the event /// Optionally the name of the caller of this method can be specified for monitoring - virtual int collectCompleteEventData(const EventContext& /*context*/, const std::string callerName="UNKNOWN") { - throw std::runtime_error(std::string(callerName + " is using unimplemented ") + __FUNCTION__ ); + virtual int collectCompleteEventData(const EventContext& /*context*/, const std::string_view callerName="UNKNOWN") { + throw std::runtime_error(std::string(callerName) + std::string(" is using unimplemented ") + __FUNCTION__ ); return 0; } diff --git a/Event/ByteStreamCnvSvcBase/ByteStreamCnvSvcBase/ROBDataProviderSvc.h b/Event/ByteStreamCnvSvcBase/ByteStreamCnvSvcBase/ROBDataProviderSvc.h index bedb316f828554e7922b2885042e3f9d1065517b..fe62e9b69206e5280c63cce1cac4c21d088f7375 100755 --- a/Event/ByteStreamCnvSvcBase/ByteStreamCnvSvcBase/ROBDataProviderSvc.h +++ b/Event/ByteStreamCnvSvcBase/ByteStreamCnvSvcBase/ROBDataProviderSvc.h @@ -51,7 +51,7 @@ public: // virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface); /// Add ROBFragments to cache for given ROB ids, ROB fragments may be retrieved with DataCollector - virtual void addROBData(const std::vector<uint32_t>& robIds, const std::string callerName="UNKNOWN") override; + virtual void addROBData(const std::vector<uint32_t>& robIds, const std::string_view callerName="UNKNOWN") override; /// Add a given LVL1/LVL2 ROBFragment to cache virtual void setNextEvent(const std::vector<ROBF>& result) override; @@ -60,7 +60,7 @@ public: virtual void setNextEvent(const RawEvent* re) override; /// Retrieve ROBFragments for given ROB ids from cache - virtual void getROBData(const std::vector<uint32_t>& robIds, std::vector<const ROBF*>& robFragments, const std::string callerName="UNKNOWN") override; + virtual void getROBData(const std::vector<uint32_t>& robIds, std::vector<const ROBF*>& robFragments, const std::string_view callerName="UNKNOWN") override; /// Retrieve the whole event. virtual const RawEvent* getEvent() override; @@ -73,10 +73,11 @@ public: /// MT variants - virtual void addROBData(const EventContext& context, const std::vector<uint32_t>& robIds, const std::string callerName="UNKNOWN") override; + virtual void addROBData(const EventContext& context, const std::vector<uint32_t>& robIds, const std::string_view callerName="UNKNOWN") override; virtual void setNextEvent(const EventContext& context, const std::vector<OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment>& result) override; virtual void setNextEvent(const EventContext& context, const RawEvent* re) override; - virtual void getROBData(const EventContext& context, const std::vector<uint32_t>& robIds, VROBFRAG& robFragments, const std::string callerName="UNKNOWN") override; + virtual void getROBData(const EventContext& context, const std::vector<uint32_t>& robIds, VROBFRAG& robFragments, + const std::string_view callerName="UNKNOWN") override; virtual const RawEvent* getEvent(const EventContext& context) override; virtual void setEventStatus(const EventContext& context, uint32_t status) override; virtual uint32_t getEventStatus(const EventContext& context) override; @@ -85,9 +86,7 @@ public: const std::function< void(const ROBF* )>& fn ) const override; virtual bool isEventComplete(const EventContext& /*context*/) const override { return true; } - virtual int collectCompleteEventData(const EventContext& /*context*/, const std::string /*callerName*/ ) override { return 0; } - - + virtual int collectCompleteEventData(const EventContext& /*context*/, const std::string_view /*callerName*/ ) override { return 0; } protected: /// vector of ROBFragment class @@ -125,8 +124,6 @@ protected: BooleanProperty m_filterEmptyROB; bool m_maskL2EFModuleID = false; - - private: // data private: // diff --git a/Event/ByteStreamCnvSvcBase/src/ByteStreamAddress.cxx b/Event/ByteStreamCnvSvcBase/src/ByteStreamAddress.cxx index ce3dbcf124352154e87f5ac42c2cbb2611d44ded..8ec169e945cba81077cfd26c92b899681e2bf5f6 100755 --- a/Event/ByteStreamCnvSvcBase/src/ByteStreamAddress.cxx +++ b/Event/ByteStreamCnvSvcBase/src/ByteStreamAddress.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ //==================================================================== @@ -23,18 +23,14 @@ // Framework include files #include "GaudiKernel/GenericAddress.h" -// Externals -extern long ByteStream_StorageType; - - /// Standard Constructor ByteStreamAddress::ByteStreamAddress(const CLID& clid, const std::string& fname , const std::string& cname, int p1, int p2) - : GenericAddress(ByteStream_StorageType, clid, fname, cname, p1, p2), m_eid(0,0) { + : GenericAddress(storageType(), clid, fname, cname, p1, p2), m_eid(0,0) { } ByteStreamAddress::ByteStreamAddress(const CLID& clid) - : GenericAddress(ByteStream_StorageType, clid, "", "") { + : GenericAddress(storageType(), clid, "", "") { } /** Add ROBID diff --git a/Event/ByteStreamCnvSvcBase/src/ByteStreamAddressL1R.cxx b/Event/ByteStreamCnvSvcBase/src/ByteStreamAddressL1R.cxx index 604c610c6576c3e96a441404d2cd959192343ba7..2f65b968ee2081c1647dab684260012a1a99e882 100755 --- a/Event/ByteStreamCnvSvcBase/src/ByteStreamAddressL1R.cxx +++ b/Event/ByteStreamCnvSvcBase/src/ByteStreamAddressL1R.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ //==================================================================== @@ -16,21 +16,20 @@ //==================================================================== #include "ByteStreamCnvSvcBase/ByteStreamAddressL1R.h" +#include "ByteStreamCnvSvcBase/ByteStreamAddress.h" // Framework include files #include "GaudiKernel/GenericAddress.h" -// Externals -extern long ByteStream_StorageType; /// Standard Constructor ByteStreamAddressL1R::ByteStreamAddressL1R(const CLID& clid, const std::string& fname , const std::string& cname, int p1, int p2) - : GenericAddress(ByteStream_StorageType, clid, fname, cname, p1, p2) { + : GenericAddress(ByteStreamAddress::storageType(), clid, fname, cname, p1, p2) { } ByteStreamAddressL1R::ByteStreamAddressL1R(const CLID& clid) - : GenericAddress(ByteStream_StorageType, clid, "", "") { + : GenericAddress(ByteStreamAddress::storageType(), clid, "", "") { } /** Add pointer diff --git a/Event/ByteStreamCnvSvcBase/src/ByteStreamCnvSvcBase.cxx b/Event/ByteStreamCnvSvcBase/src/ByteStreamCnvSvcBase.cxx index a829435e7c12292db001e984452acf0c96c75bfa..c231f5d85354b884e2e4fbded5c1a8f2ae445fd9 100755 --- a/Event/ByteStreamCnvSvcBase/src/ByteStreamCnvSvcBase.cxx +++ b/Event/ByteStreamCnvSvcBase/src/ByteStreamCnvSvcBase.cxx @@ -1,8 +1,9 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "ByteStreamCnvSvcBase/ByteStreamCnvSvcBase.h" +#include "ByteStreamCnvSvcBase/ByteStreamAddress.h" #include "GaudiKernel/IOpaqueAddress.h" #include "GaudiKernel/GenericAddress.h" @@ -13,12 +14,9 @@ #include "AthenaKernel/IClassIDSvc.h" #include "StoreGate/StoreGate.h" -//External definitions -long ByteStream_StorageType = 0x43; - //______________________________________________________________________________ ByteStreamCnvSvcBase::ByteStreamCnvSvcBase(const std::string& name, ISvcLocator* pSvcLocator) : - ::AthCnvSvc(name, pSvcLocator, ByteStream_StorageType), + ::AthCnvSvc(name, pSvcLocator, ByteStreamAddress::storageType()), m_rawEventWrite(0) { declareProperty("InitCnvs", m_initCnvs); // This property is used by Tile BS converter, not by this class. diff --git a/Event/ByteStreamCnvSvcBase/src/ROBDataProviderSvc.cxx b/Event/ByteStreamCnvSvcBase/src/ROBDataProviderSvc.cxx index 879cd668dec2e068e2887a84daa36db7a5366f2c..ab5c970fcdd662a9b5a6244c6a675f3310d9b126 100755 --- a/Event/ByteStreamCnvSvcBase/src/ROBDataProviderSvc.cxx +++ b/Event/ByteStreamCnvSvcBase/src/ROBDataProviderSvc.cxx @@ -170,12 +170,12 @@ StatusCode ROBDataProviderSvc::initialize() { -void ROBDataProviderSvc::addROBData(const std::vector<uint32_t>& robIds, const std::string callerName) { +void ROBDataProviderSvc::addROBData(const std::vector<uint32_t>& robIds, const std::string_view callerName) { const EventContext context{ Gaudi::Hive::currentContext() }; return addROBData( context, robIds, callerName ); } -void ROBDataProviderSvc::addROBData(const EventContext& context, const std::vector<uint32_t>& robIds, const std::string callerName) { +void ROBDataProviderSvc::addROBData(const EventContext& context, const std::vector<uint32_t>& robIds, const std::string_view callerName) { EventCache* cache = m_eventsCache.get( context ); // Copy missing ROB ids to vector with pthread allocator @@ -318,12 +318,13 @@ void ROBDataProviderSvc::setNextEvent( const EventContext& context, const RawEve } /** return ROBData for ROBID */ -void ROBDataProviderSvc::getROBData(const std::vector<uint32_t>& ids, std::vector<const ROBF*>& v, const std::string callerName) { +void ROBDataProviderSvc::getROBData(const std::vector<uint32_t>& ids, std::vector<const ROBF*>& v, const std::string_view callerName) { const EventContext context{ Gaudi::Hive::currentContext() }; return getROBData( context, ids, v, callerName ); } -void ROBDataProviderSvc::getROBData(const EventContext& context, const std::vector<uint32_t>& ids, std::vector<const ROBF*>& v, const std::string callerName) { +void ROBDataProviderSvc::getROBData(const EventContext& context, const std::vector<uint32_t>& ids, std::vector<const ROBF*>& v, + const std::string_view callerName) { EventCache* cache = m_eventsCache.get( context ); for (std::vector<uint32_t>::const_iterator it = ids.begin(), it_end = ids.end(); it != it_end; it++) { diff --git a/Event/ByteStreamData/ByteStreamData/ByteStreamMetadataContainer.h b/Event/ByteStreamData/ByteStreamData/ByteStreamMetadataContainer.h index 2f6b5f2cbc16bcd4bfad2f2dd80bccee31c5b52f..56c3307f128b2f9afb1ab1964a2b2f3ad031b7fe 100644 --- a/Event/ByteStreamData/ByteStreamData/ByteStreamMetadataContainer.h +++ b/Event/ByteStreamData/ByteStreamData/ByteStreamMetadataContainer.h @@ -22,4 +22,11 @@ class ByteStreamMetadataContainer : public DataVector<ByteStreamMetadata> { #include "AthenaKernel/CLASS_DEF.h" CLASS_DEF(ByteStreamMetadataContainer, 1076128893, 1) +#ifndef XAOD_STANDALONE +#include "AthenaKernel/MetaCont.h" +CLASS_DEF( MetaCont<ByteStreamMetadataContainer> , 1174128703 , 1 ) +#include "SGTools/BaseInfo.h" +SG_BASE( MetaCont<ByteStreamMetadataContainer>, MetaContBase ); +#endif // not XAOD_STANDALONE + #endif diff --git a/Event/ByteStreamTest/share/ByteStreamTestMetaWrite.ref b/Event/ByteStreamTest/share/ByteStreamTestMetaWrite.ref index cfea0267456eb33c5921aec0f7fd163179d246fa..2cc12cacd92856cf05c056689ab686e9b2ddd0fa 100644 --- a/Event/ByteStreamTest/share/ByteStreamTestMetaWrite.ref +++ b/Event/ByteStreamTest/share/ByteStreamTestMetaWrite.ref @@ -18,18 +18,19 @@ AthenaEventLoopMgr INFO Setup EventSelector service EventSelector ByteStreamInputSvc DEBUG Recorded ByteStreamMetadata in InputMetadataStore ByteStreamInputSvc DEBUG run parameters = ByteStreamInputSvc DEBUG Number of Free meta data strings: 0 - flags: ( valid, UNLOCKED, reset) --- data: 0x17bce940 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x174afa90 --- key: RunEventTag ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1038508 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 500 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x17c14000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x17506000 ByteStreamInputSvc DEBUG switched to next event in slot INVALID ByteStreamInputSvc DEBUG ByteStream File GUID:1C43C4AA-2555-E711-BB1F-02163E01794D ByteStreamInputSvc DEBUG ByteStream Event Position in File: 1324 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x17bce940 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x174afa90 --- key: RunEventTag StoreDump INFO AttributeList has size 2 +ByteStreamEvent... INFO No ByteStreamMetadata in InputMetaDataStore ByteStreamAttLi... INFO ByteStreamAttListMetadataSvc::toBSMetadata ByteStreamAttLi... INFO Found RunEventTag in DetectorStore ByteStreamAttLi... DEBUG name RunNumber type unsigned int value 88 @@ -40,229 +41,229 @@ ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1000648 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 500 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x17d12000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x17604000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 0 ByteStreamInputSvc DEBUG ByteStream File GUID:1C43C4AA-2555-E711-BB1F-02163E01794D ByteStreamInputSvc DEBUG ByteStream Event Position in File: 1039848 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x17bce940 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x17bcc320 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x174afa90 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1737cc10 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 965292 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 500 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x17c14000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x17506000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 1 ByteStreamInputSvc DEBUG ByteStream File GUID:1C43C4AA-2555-E711-BB1F-02163E01794D ByteStreamInputSvc DEBUG ByteStream Event Position in File: 2040512 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x17bce940 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x17bcc320 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x174afa90 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1737cc10 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1014472 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 500 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x18146000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x178b6000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 2 ByteStreamInputSvc DEBUG ByteStream File GUID:1C43C4AA-2555-E711-BB1F-02163E01794D ByteStreamInputSvc DEBUG ByteStream Event Position in File: 3005820 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x17bce940 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x17bcc320 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x174afa90 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1737cc10 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1104432 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 500 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x17c14000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x17a96000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 3 ByteStreamInputSvc DEBUG ByteStream File GUID:1C43C4AA-2555-E711-BB1F-02163E01794D ByteStreamInputSvc DEBUG ByteStream Event Position in File: 4020308 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x17bce940 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x17bcc320 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x174afa90 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1737cc10 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1037592 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 500 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x17d22000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x17ba4000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 4 ByteStreamInputSvc DEBUG ByteStream File GUID:1C43C4AA-2555-E711-BB1F-02163E01794D ByteStreamInputSvc DEBUG ByteStream Event Position in File: 5124756 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x17bce940 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x17bcc320 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x174afa90 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1737cc10 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1045524 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 500 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x17c14000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x17a96000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 5 ByteStreamInputSvc DEBUG ByteStream File GUID:1C43C4AA-2555-E711-BB1F-02163E01794D ByteStreamInputSvc DEBUG ByteStream Event Position in File: 6162364 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x17bce940 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x17bcc320 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x174afa90 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1737cc10 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1126828 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 500 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x17d14000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x17b96000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 6 ByteStreamInputSvc DEBUG ByteStream File GUID:1C43C4AA-2555-E711-BB1F-02163E01794D ByteStreamInputSvc DEBUG ByteStream Event Position in File: 7207904 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x17bce940 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x17bcc320 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x174afa90 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1737cc10 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1074584 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 500 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x17e28000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x17506000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 7 ByteStreamInputSvc DEBUG ByteStream File GUID:1C43C4AA-2555-E711-BB1F-02163E01794D ByteStreamInputSvc DEBUG ByteStream Event Position in File: 8334748 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x17bce940 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x17bcc320 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x174afa90 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1737cc10 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1361908 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 500 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x17c14000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x17922000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 8 ByteStreamInputSvc DEBUG ByteStream File GUID:1C43C4AA-2555-E711-BB1F-02163E01794D ByteStreamInputSvc DEBUG ByteStream Event Position in File: 9409348 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x17bce940 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x17bcc320 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x174afa90 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1737cc10 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1168392 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 500 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x17d62000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x17a96000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 9 ByteStreamInputSvc DEBUG ByteStream File GUID:1C43C4AA-2555-E711-BB1F-02163E01794D ByteStreamInputSvc DEBUG ByteStream Event Position in File: 10771272 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x17bce940 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x17bcc320 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x174afa90 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1737cc10 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1052428 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 500 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x17c14000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x17bb4000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 10 ByteStreamInputSvc DEBUG ByteStream File GUID:1C43C4AA-2555-E711-BB1F-02163E01794D ByteStreamInputSvc DEBUG ByteStream Event Position in File: 11939680 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x17bce940 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x17bcc320 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x174afa90 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1737cc10 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1103056 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 500 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x17d16000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x17a96000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 11 ByteStreamInputSvc DEBUG ByteStream File GUID:1C43C4AA-2555-E711-BB1F-02163E01794D ByteStreamInputSvc DEBUG ByteStream Event Position in File: 12992124 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x17bce940 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x17bcc320 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x174afa90 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1737cc10 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1110836 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 500 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x17e24000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x17ba4000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 12 ByteStreamInputSvc DEBUG ByteStream File GUID:1C43C4AA-2555-E711-BB1F-02163E01794D ByteStreamInputSvc DEBUG ByteStream Event Position in File: 14095196 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x17bce940 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x17bcc320 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x174afa90 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1737cc10 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1058732 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 500 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x17c14000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x17a96000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 13 ByteStreamInputSvc DEBUG ByteStream File GUID:1C43C4AA-2555-E711-BB1F-02163E01794D ByteStreamInputSvc DEBUG ByteStream Event Position in File: 15206048 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x17bce940 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x17bcc320 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x174afa90 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1737cc10 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1156428 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 500 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x17d18000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x17b9a000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 14 ByteStreamInputSvc DEBUG ByteStream File GUID:1C43C4AA-2555-E711-BB1F-02163E01794D ByteStreamInputSvc DEBUG ByteStream Event Position in File: 16264796 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x17bce940 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x17bcc320 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x174afa90 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1737cc10 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1093640 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 500 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x17e34000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x17506000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 15 ByteStreamInputSvc DEBUG ByteStream File GUID:1C43C4AA-2555-E711-BB1F-02163E01794D ByteStreamInputSvc DEBUG ByteStream Event Position in File: 17421240 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x17bce940 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x17bcc320 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x174afa90 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1737cc10 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1149620 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 500 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x17c14000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x17934000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 16 ByteStreamInputSvc DEBUG ByteStream File GUID:1C43C4AA-2555-E711-BB1F-02163E01794D ByteStreamInputSvc DEBUG ByteStream Event Position in File: 18514896 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x17bce940 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x17bcc320 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x174afa90 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1737cc10 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1051544 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 500 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x17d2e000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x17a96000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 17 ByteStreamInputSvc DEBUG ByteStream File GUID:1C43C4AA-2555-E711-BB1F-02163E01794D ByteStreamInputSvc DEBUG ByteStream Event Position in File: 19664532 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x17bce940 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x17bcc320 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x174afa90 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1737cc10 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG nextEvent _above_ high water mark ByteStreamInputSvc DEBUG Event Size 1050384 ByteStreamInputSvc DEBUG First word of the fragment aa1234aa ByteStreamInputSvc DEBUG Format version 500 -ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x17c14000 +ByteStreamInputSvc DEBUG Made an FullEventFragment from ES 0x17b98000 ByteStreamInputSvc DEBUG switched to next event in slot s: 0 e: 18 ByteStreamInputSvc DEBUG ByteStream File GUID:1C43C4AA-2555-E711-BB1F-02163E01794D ByteStreamInputSvc DEBUG ByteStream Event Position in File: 20716092 StoreDump INFO <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> - flags: ( valid, UNLOCKED, reset) --- data: 0x17bce940 --- key: RunEventTag - flags: ( valid, UNLOCKED, reset) --- data: 0x17bcc320 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x174afa90 --- key: RunEventTag + flags: ( valid, UNLOCKED, reset) --- data: 0x1737cc10 --- key: RunEventTag StoreDump INFO AttributeList has size 2 ByteStreamInputSvc DEBUG Calling ByteStreamInputSvc::stop() ByteStreamEvent... INFO number of events written: 20 diff --git a/Event/EventBookkeeperTools/EventBookkeeperTools/BookkeeperTool.h b/Event/EventBookkeeperTools/EventBookkeeperTools/BookkeeperTool.h index ff3f8368960f9a025c6235f675ddef2cb9fcb8f1..a905dcbec04f5c19e635516f3eb6751456fdb908 100644 --- a/Event/EventBookkeeperTools/EventBookkeeperTools/BookkeeperTool.h +++ b/Event/EventBookkeeperTools/EventBookkeeperTools/BookkeeperTool.h @@ -1,25 +1,18 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef BOOKKEEPERTOOL_H #define BOOKKEEPERTOOL_H /** @file BookkeeperTool.h - * @brief This file contains the class definition for the BookkeeperTool class. - * @author Peter van Gemmeren <gemmeren@anl.gov> - * $Id: BookkeeperTool.h 663679 2015-04-29 08:31:54Z krasznaa $ + * @brief This class is an implementation of the GenericMetadataTool + * for the xAOD::CutBookkeeperContainer. + * @author Jack Cranshaw <cranshaw@anl.gov> + * $Id: $ **/ -//#include "GaudiKernel/AlgTool.h" -#include "AthenaBaseComps/AthAlgTool.h" -#include "AsgTools/AsgMetadataTool.h" -#ifdef ASGTOOL_ATHENA -#include "AthenaKernel/IMetaDataTool.h" -#endif // ASGTOOL_ATHENA -#include "GaudiKernel/IIncidentListener.h" -#include "GaudiKernel/ServiceHandle.h" -#include "AthenaKernel/ICutFlowSvc.h" +#include "AthenaKernel/GenericMetadataTool.h" #include "xAODCutFlow/CutBookkeeper.h" #include "xAODCutFlow/CutBookkeeperContainer.h" @@ -27,62 +20,23 @@ #include <string> -/** @class BookkeeperTool - * @brief This class provides an example for reading with a ISelectorTool to veto events on AttributeList. - **/ - -class BookkeeperTool : public asg::AsgMetadataTool -#ifdef ASGTOOL_ATHENA - , public virtual ::IMetaDataTool -#endif // ASGTOOL_ATHENA +class BookkeeperTool : public GenericMetadataTool <xAOD::CutBookkeeperContainer, xAOD::CutBookkeeperAuxContainer> { - ASG_TOOL_CLASS0(BookkeeperTool) -public: // Constructor and Destructor +public: + // Constructor and Destructor /// Standard Service Constructor - BookkeeperTool(const std::string& name = "BookkeeperTool"); + BookkeeperTool(const std::string& type, + const std::string& name, + const IInterface* parent); /// Destructor virtual ~BookkeeperTool(); -public: - //void handle(const Incident& incident); - virtual StatusCode metaDataStop(); - virtual StatusCode beginInputFile(); - virtual StatusCode endInputFile(); - /// Function collecting the metadata from a new input file - virtual StatusCode beginInputFile(const SG::SourceID&) {return this->beginInputFile();} - /// Function collecting the metadata from a new input file - virtual StatusCode endInputFile(const SG::SourceID&) {return this->endInputFile();} - /// Function writing the collected metadata to the output - virtual StatusCode metaDataStop(const SG::SourceID&) {return this->metaDataStop();} - // - virtual StatusCode initialize(); - virtual StatusCode finalize(); - private: - /// Helper class to update a container with information from another one - StatusCode updateContainer( xAOD::CutBookkeeperContainer* contToUpdate, - const xAOD::CutBookkeeperContainer* otherCont ); - - StatusCode copyContainerToOutput(const std::string& outname); - - /// Fill Cutflow information - StatusCode addCutFlow(); - - /// Pointer to cut flow svc - //ServiceHandle<ICutFlowSvc> m_cutflowsvc; - - /// The name of the output CutBookkeeperContainer - std::string m_outputCollName; - - /// The name of the input CutBookkeeperContainer - std::string m_inputCollName; - - /// The name of the CutFlowSvc CutBookkeeperContainer - std::string m_cutflowCollName; - - bool m_cutflowTaken; + /// Virtual method to update a container with information from another one + virtual StatusCode updateContainer(xAOD::CutBookkeeperContainer* contToUpdate, + const xAOD::CutBookkeeperContainer* otherCont ); }; diff --git a/Event/EventBookkeeperTools/Root/BookkeeperTool.cxx b/Event/EventBookkeeperTools/Root/BookkeeperTool.cxx index f7de464878772bc2980fe958ad27272946052f22..d3fb8a16b355294b7c98360dcdf650d7ce1e2e2c 100644 --- a/Event/EventBookkeeperTools/Root/BookkeeperTool.cxx +++ b/Event/EventBookkeeperTools/Root/BookkeeperTool.cxx @@ -1,11 +1,11 @@ ///////////////////////// -*- C++ -*- ///////////////////////////// /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // Implementation file for class BookkeeperTool -// Authors: Joao Firmino da Costa <joao.costa@cern.ch> and David Cote <david.cote@cern.ch> +// Authors: Jack Cranshaw <Jack.Cranshaw@cern.ch> /////////////////////////////////////////////////////////////////// #include "EventBookkeeperTools/BookkeeperTool.h" @@ -13,241 +13,28 @@ // STL include #include <algorithm> -// #include "FillEBCFromFlat.h" - -#include "GaudiKernel/Incident.h" -#include "GaudiKernel/FileIncident.h" -#include "GaudiKernel/IIncidentSvc.h" +#include "AthenaKernel/MetaCont.h" +#include "AthenaKernel/ClassID_traits.h" #include "AthenaKernel/errorcheck.h" +#include "AthenaKernel/GenericMetadataTool.h" +#include "AthenaKernel/ICutFlowSvc.h" #include "AthenaBaseComps/AthCheckMacros.h" +#include "AthContainersInterfaces/IConstAuxStoreMeta.h" - -BookkeeperTool::BookkeeperTool(const std::string& name) - : asg::AsgMetadataTool(name), - m_cutflowTaken(false) +BookkeeperTool::BookkeeperTool(const std::string& type, + const std::string& name, + const IInterface* parent) + : GenericMetadataTool <xAOD::CutBookkeeperContainer, xAOD::CutBookkeeperAuxContainer>(type,name,parent) { - declareProperty("OutputCollName", m_outputCollName="CutBookkeepers", - "The default name of the xAOD::CutBookkeeperContainer for output files"); - declareProperty("InputCollName", m_inputCollName = "CutBookkeepers", - "The default name of the xAOD::CutBookkeeperContainer for input files"); - declareProperty("CutFlowCollName", m_cutflowCollName = "CutBookkeepersFile", - "The default name of the xAOD::CutBookkeeperContainer for CutFlowSvc"); -#ifdef ASGTOOL_ATHENA - declareInterface< ::IMetaDataTool >( this ); -#endif // ASGTOOL_ATHENA } - - BookkeeperTool::~BookkeeperTool() { } - -StatusCode -BookkeeperTool::initialize() -{ - ATH_MSG_DEBUG( "Initializing " << name() << " - package version " << PACKAGE_VERSION ); - - ATH_MSG_DEBUG("InputCollName = " << m_inputCollName); - ATH_MSG_DEBUG("OutputCollName = " << m_outputCollName); - ATH_MSG_DEBUG("CutFlowCollName = " << m_cutflowCollName); - - return StatusCode::SUCCESS; -} - - -//__________________________________________________________________________ -StatusCode BookkeeperTool::beginInputFile() -{ - //OPENING NEW INPUT FILE - //Things to do: - // 1) note that a file is currently opened - // 2) Load CutBookkeepers from input file - // 2a) if incomplete from input, directly propagate to output - // 2b) if complete from input, wait for EndInputFile to decide what to do in output - - // reset cutflow taken marker - m_cutflowTaken = false; - - // Get the incomplete bookkeeper collection of the input metadata store - const xAOD::CutBookkeeperContainer* input_inc = 0; - // Construct input and output incomplete names - std::string inCollName = "Incomplete" + m_inputCollName; - std::string outCollName = "Incomplete" + m_outputCollName; - if (inputMetaStore()->contains<xAOD::CutBookkeeperContainer>(inCollName) ) { - StatusCode ssc = inputMetaStore()->retrieve( input_inc, inCollName ); - if (ssc.isSuccess()) { - // First make sure there is an incomplete container in the output store - if( !(outputMetaStore()->contains<xAOD::CutBookkeeperContainer>(outCollName)) ) { - xAOD::CutBookkeeperContainer* inc = new xAOD::CutBookkeeperContainer(); - xAOD::CutBookkeeperAuxContainer* auxinc = new xAOD::CutBookkeeperAuxContainer(); - inc->setStore(auxinc); - ATH_CHECK(outputMetaStore()->record(inc,outCollName)); - ATH_CHECK(outputMetaStore()->record(auxinc,outCollName+"Aux.")); - } - // retrieve the incomplete output container - xAOD::CutBookkeeperContainer* incompleteBook(NULL); - ATH_CHECK(outputMetaStore()->retrieve( incompleteBook, outCollName)); - // update incomplete output with any incomplete input - ATH_CHECK(this->updateContainer(incompleteBook,input_inc)); - ATH_MSG_DEBUG("Successfully merged input incomplete bookkeepers with output"); - } - } - else { - ATH_MSG_INFO("No incomplete bookkeepers in this file " << inCollName); - } - - // Get the complete bookkeeper collection of the input metadata store - const xAOD::CutBookkeeperContainer* input_com = 0; - inCollName = m_inputCollName; - outCollName = m_outputCollName; - if (inputMetaStore()->contains<xAOD::CutBookkeeperContainer>(inCollName) ) { - if ( (inputMetaStore()->retrieve( input_com, inCollName )).isSuccess() ) { - // Check if a tmp is there. IT SHOULD NOT BE - //xAOD::CutBookkeeperContainer* incompleteBook(NULL); - if( !(outputMetaStore()->contains<xAOD::CutBookkeeperContainer>(outCollName+"tmp")) ) { - // Now create the tmp container - xAOD::CutBookkeeperContainer* tmp = new xAOD::CutBookkeeperContainer(); - xAOD::CutBookkeeperAuxContainer* auxtmp = new xAOD::CutBookkeeperAuxContainer(); - tmp->setStore(auxtmp); - if (updateContainer(tmp,input_com).isSuccess()) { - ATH_CHECK(outputMetaStore()->record(tmp,outCollName+"tmp")); - ATH_CHECK(outputMetaStore()->record(auxtmp,outCollName+"tmpAux.")); - } - else { - ATH_MSG_WARNING("Could not update tmp container from input complete conatiner"); - } - } - } - else { - ATH_MSG_WARNING("tmp collection already exists"); - return StatusCode::SUCCESS; - } - ATH_MSG_DEBUG("Successfully copied complete bookkeepers to temp container"); - } - - // Now make sure the output containers are in the output store - // - // Make sure complete container exists in output - if( !(outputMetaStore()->contains<xAOD::CutBookkeeperContainer>(m_outputCollName)) ) { - // Now create the complete container - xAOD::CutBookkeeperContainer* inc = new xAOD::CutBookkeeperContainer(); - xAOD::CutBookkeeperAuxContainer* auxinc = new xAOD::CutBookkeeperAuxContainer(); - inc->setStore(auxinc); - ATH_CHECK(outputMetaStore()->record(inc,m_outputCollName)); - ATH_CHECK(outputMetaStore()->record(auxinc,m_outputCollName+"Aux.")); - } - else { - ATH_MSG_WARNING("complete collection already exists"); - //return StatusCode::SUCCESS; - } - // Make sure incomplete container exists in output - std::string inc_name = "Incomplete"+m_outputCollName; - if( !(outputMetaStore()->contains<xAOD::CutBookkeeperContainer>(inc_name)) ) { - // Now create the complete container - xAOD::CutBookkeeperContainer* coll = new xAOD::CutBookkeeperContainer(); - xAOD::CutBookkeeperAuxContainer* auxcoll = new xAOD::CutBookkeeperAuxContainer(); - coll->setStore(auxcoll); - ATH_CHECK(outputMetaStore()->record(coll,inc_name)); - ATH_CHECK(outputMetaStore()->record(auxcoll,inc_name+"Aux.")); - } - else { - ATH_MSG_WARNING("incomplete collection already exists"); - } - - return StatusCode::SUCCESS; -} - - -StatusCode BookkeeperTool::endInputFile() -{ - - if (copyContainerToOutput(m_outputCollName).isFailure()) return StatusCode::FAILURE; - - if (!m_cutflowTaken) { - if (addCutFlow().isFailure()) { - ATH_MSG_ERROR("Could not add CutFlow information"); - } - m_cutflowTaken = true; - } - else { - ATH_MSG_DEBUG("Cutflow information written into container before endInputFile"); - } - - return StatusCode::SUCCESS; -} - -StatusCode BookkeeperTool::metaDataStop() -{ - //TERMINATING THE JOB (EndRun) - //Things to do: - // 1) Create new incomplete CutBookkeepers if relevant - // 2) Print cut flow summary - // 3) Write root file if requested - // Make sure incomplete container exists in output - std::string inc_name = "Incomplete"+m_outputCollName; - if (copyContainerToOutput(inc_name).isFailure()) return StatusCode::FAILURE; - - - if (!m_cutflowTaken) { - if (addCutFlow().isFailure()) { - ATH_MSG_ERROR("Could not add CutFlow information"); - } - } - else { - ATH_MSG_DEBUG("Cutflow information written into container before metaDataStop"); - } - - // Reset after metadata stop - m_cutflowTaken = false; - - return StatusCode::SUCCESS; -} - - -StatusCode -BookkeeperTool::finalize() -{ - ATH_MSG_DEBUG( "Finalizing " << name() << " - package version " << PACKAGE_VERSION ); - return StatusCode::SUCCESS; -} - - -StatusCode BookkeeperTool::addCutFlow() -{ - // Add the information from the current processing to the complete output - // --> same paradigm as original CutFlowSvc - // Get the complete bookkeeper collection of the output meta-data store - xAOD::CutBookkeeperContainer* completeBook(NULL); - if( !(outputMetaStore()->retrieve( completeBook, m_outputCollName) ).isSuccess() ) { - ATH_MSG_ERROR( "Could not get complete CutBookkeepers from output MetaDataStore" ); - return StatusCode::FAILURE; - } - - // Get the bookkeeper from the current processing - const xAOD::CutBookkeeperContainer* fileCompleteBook(NULL); - if( outputMetaStore()->contains<xAOD::CutBookkeeperContainer>(m_cutflowCollName) ) { - if( !(outputMetaStore()->retrieve( fileCompleteBook, m_cutflowCollName) ).isSuccess() ) { - ATH_MSG_WARNING( "Could not get CutFlowSvc CutBookkeepers from output MetaDataStore" ); - } - else { - // update the complete output with the complete input - ATH_CHECK(this->updateContainer(completeBook,fileCompleteBook)); - } - } - else { - ATH_MSG_INFO("No cutflow container " << m_cutflowCollName); - } - - return StatusCode::SUCCESS; -} - - namespace { - xAOD::CutBookkeeper* resolveLink (const xAOD::CutBookkeeper* old, xAOD::CutBookkeeperContainer& contToUpdate, @@ -285,7 +72,11 @@ resolveLink (const xAOD::CutBookkeeper* old, } // anonymous namespace - +// +// (Merge) method required by base clase GenericMetdataTool +// Note that the implementation of the IMetaDataTool interface +// is done in GenericMetadataTool and configured by properties +// of that class StatusCode BookkeeperTool::updateContainer( xAOD::CutBookkeeperContainer* contToUpdate, const xAOD::CutBookkeeperContainer* otherCont ) @@ -320,6 +111,9 @@ BookkeeperTool::updateContainer( xAOD::CutBookkeeperContainer* contToUpdate, foundEBKToUpdate = true; break; } + else { + ATH_MSG_INFO("otherEBK("<<otherEBK->name()<<") != ebkToUpdate("<<ebkToUpdate->name()); + } } // End: Inner loop over contToUpdate if (!foundEBKToUpdate) { xAOD::CutBookkeeper* newEBK = new xAOD::CutBookkeeper(); @@ -381,33 +175,3 @@ BookkeeperTool::updateContainer( xAOD::CutBookkeeperContainer* contToUpdate, return StatusCode::SUCCESS; } - -StatusCode BookkeeperTool::copyContainerToOutput(const std::string& outname) -{ - - // Get the complete bookkeeper collection of the output meta-data store - xAOD::CutBookkeeperContainer* contBook(nullptr); - if( !(outputMetaStore()->retrieve( contBook, outname) ).isSuccess() ) { - ATH_MSG_ERROR( "Could not get " << outname << " CutBookkeepers from output MetaDataStore" ); - return StatusCode::FAILURE; - } - - // Get the tmp bookkeeper from the input - const xAOD::CutBookkeeperContainer* tmpBook(NULL); - if ( outputMetaStore()->contains<xAOD::CutBookkeeperContainer>(outname+"tmp") ) { - if( !(outputMetaStore()->retrieve( tmpBook, outname+"tmp") ).isSuccess() ) { - ATH_MSG_WARNING( "Could not get tmp CutBookkeepers from output MetaDataStore" ); - } - else { - // update the complete output with the complete input - ATH_CHECK(this->updateContainer(contBook,tmpBook)); - // remove the tmp container - const SG::IConstAuxStore* tmpBookAux = tmpBook->getConstStore(); - ATH_CHECK(outputMetaStore()->removeDataAndProxy(tmpBook)); - ATH_CHECK(outputMetaStore()->removeDataAndProxy(tmpBookAux)); - } - } - - return StatusCode::SUCCESS; -} - diff --git a/Event/EventBookkeeperTools/python/CutFlowHelpers.py b/Event/EventBookkeeperTools/python/CutFlowHelpers.py index 892259abd7ec48c7bb272cc11de19d09ce86630a..8ffb7d2c98c442cf6dfe176bf3a315dc5ca49ccb 100644 --- a/Event/EventBookkeeperTools/python/CutFlowHelpers.py +++ b/Event/EventBookkeeperTools/python/CutFlowHelpers.py @@ -65,6 +65,7 @@ def CreateCutFlowSvc( svcName="CutFlowSvc", athFile=None, seq=None, addAlgInPlac if not hasattr(svcMgr,"CutFlowSvc"): svcMgr += CfgMgr.CutFlowSvc() svcMgr.CutFlowSvc.InputStream = inputStreamName + # Make sure MetaDataSvc is ready if not hasattr(svcMgr,'MetaDataSvc'): from AthenaServices.AthenaServicesConf import MetaDataSvc @@ -78,7 +79,8 @@ def CreateCutFlowSvc( svcName="CutFlowSvc", athFile=None, seq=None, addAlgInPlac outname = "CutBookkeepers" cutflowtool = BookkeeperTool(outname+"Tool", InputCollName = inname, - OutputCollName= outname) + OutputCollName= outname, + ProcessMetadataCollName=inname+"File") svcMgr.ToolSvc += cutflowtool @@ -141,7 +143,8 @@ def CreateCutFlowSvc( svcName="CutFlowSvc", athFile=None, seq=None, addAlgInPlac MSMgr.AddMetaDataItemToAllStreams( "xAOD::CutBookkeeperAuxContainer#"+SGkey+"Aux.*" ) MSMgr.AddMetaDataItemToAllStreams( "xAOD::CutBookkeeperContainer#Incomplete"+SGkey ) MSMgr.AddMetaDataItemToAllStreams( "xAOD::CutBookkeeperAuxContainer#Incomplete"+SGkey+"Aux.*" ) - SGkey = "FileBookkeepers" + #SGkey = "FileBookkeepers" + SGkey = "CutBookkeepersFile" MSMgr.AddMetaDataItemToAllStreams( "xAOD::CutBookkeeperContainer#"+SGkey ) MSMgr.AddMetaDataItemToAllStreams( "xAOD::CutBookkeeperAuxContainer#"+SGkey+"Aux.*" ) MSMgr.AddMetaDataItemToAllStreams( "xAOD::CutBookkeeperContainer#Incomplete"+SGkey ) diff --git a/Event/EventBookkeeperTools/src/CutFlowSvc.cxx b/Event/EventBookkeeperTools/src/CutFlowSvc.cxx index 5fa077dd209b81c73d84afcf8387535a8f7bc66b..bf83582cc45089670994e4025620d82801f2387c 100644 --- a/Event/EventBookkeeperTools/src/CutFlowSvc.cxx +++ b/Event/EventBookkeeperTools/src/CutFlowSvc.cxx @@ -81,7 +81,7 @@ CutFlowSvc::initialize() ATH_CHECK( incSvc.retrieve() ); incSvc->addListener(this, IncidentType::BeginInputFile, 60); // pri has to be < 100 to be after MetaDataSvc. incSvc->addListener(this, IncidentType::EndInputFile, 50); // pri has to be > 10 to be before MetaDataSvc. - incSvc->addListener(this, "MetaDataStop", 50); + incSvc->addListener(this, "MetaDataStop", 30); // Create bookkeeper container for bookkeepers in _this_ processing auto fileBook = new xAOD::CutBookkeeperContainer(); diff --git a/Event/EventBookkeeperTools/src/EventCounterAlg.cxx b/Event/EventBookkeeperTools/src/EventCounterAlg.cxx index f9709885509a55117cb26d131b24ddce039684c4..6968d07074ab13623aa486bbb334806a276d120e 100644 --- a/Event/EventBookkeeperTools/src/EventCounterAlg.cxx +++ b/Event/EventBookkeeperTools/src/EventCounterAlg.cxx @@ -65,7 +65,6 @@ StatusCode EventCounterAlg::initialize() xAOD::CutBookkeeper::CutLogic::ALLEVENTSPROCESSED, "AllStreams"); - ATH_CHECK( m_eventInfoKey.initialize() ); return StatusCode::SUCCESS; } @@ -89,7 +88,7 @@ StatusCode EventCounterAlg::execute() // Update also the other counters for the non-nominal MC weights if (m_trackOtherMCWeights) { // Get the EventInfo object - SG::ReadHandle<xAOD::EventInfo> evtInfo (m_eventInfoKey, ctx); + SG::ReadHandle<xAOD::EventInfo> evtInfo (eventInfoKey(), ctx); // Only try to access the mcEventWeight is we are running on Monte Carlo, duhhh! if ( !(evtInfo->eventType(xAOD::EventInfo::IS_SIMULATION)) ) { ATH_MSG_DEBUG("We are not running on simulation and thus, nothing to be done here"); diff --git a/Event/EventBookkeeperTools/src/EventCounterAlg.h b/Event/EventBookkeeperTools/src/EventCounterAlg.h index 20feee5020172cfdc9d293e3962c0af4a764b30a..e489cf7ba4959e808fb68c5f7c5b8ff169aa5e0b 100644 --- a/Event/EventBookkeeperTools/src/EventCounterAlg.h +++ b/Event/EventBookkeeperTools/src/EventCounterAlg.h @@ -70,9 +70,6 @@ class EventCounterAlg /// Keep a vector of all cutIDs for the non-nominal MC event weights std::vector<CutIdentifier> m_mcCutIDs; - - SG::ReadHandleKey<xAOD::EventInfo> m_eventInfoKey - { this, "EventInfoKey", "EventInfo", "" }; }; // I/O operators diff --git a/Event/EventContainers/EventContainers/IdentifiableContainerMT.h b/Event/EventContainers/EventContainers/IdentifiableContainerMT.h index f88270c4be598ae38636cf7694d7ebabad55821d..5324a8aa40aedf25a7c5b8060ffb7651e4f476c5 100644 --- a/Event/EventContainers/EventContainers/IdentifiableContainerMT.h +++ b/Event/EventContainers/EventContainers/IdentifiableContainerMT.h @@ -61,7 +61,7 @@ public: std::swap(a.m_atomic, b.m_atomic); std::swap(a.m_mut, b.m_mut); } - IDC_WriteHandle(IDC_WriteHandle&& other){ + IDC_WriteHandle(IDC_WriteHandle&& other) : IDC_WriteHandle() { Swap(*this, other); } StatusCode addOrDelete(std::unique_ptr<T> ptr, bool &deleted){ diff --git a/Event/EventInfo/EventInfo/PileUpTimeEventIndex.h b/Event/EventInfo/EventInfo/PileUpTimeEventIndex.h index e3c55cd3050ddd2e73813c310e3e5c81563b3dd9..cf01c5d900d0bd26c31659a5ac3aa18bd369117f 100755 --- a/Event/EventInfo/EventInfo/PileUpTimeEventIndex.h +++ b/Event/EventInfo/EventInfo/PileUpTimeEventIndex.h @@ -16,7 +16,8 @@ public: MinimumBias=1, Cavern=2, HaloGas=3, - ZeroBias=4, + HighPtMinimumBias=4, + ZeroBias=5, NTYPES }; typedef long time_type; typedef unsigned long index_type; diff --git a/Event/EventInfo/src/PileUpTimeEventIndex.cxx b/Event/EventInfo/src/PileUpTimeEventIndex.cxx index f995baf8ec298e8d68730d19f610be7c8c747cb6..0a4d63fdda6054a21331f53360437177ddb721de 100755 --- a/Event/EventInfo/src/PileUpTimeEventIndex.cxx +++ b/Event/EventInfo/src/PileUpTimeEventIndex.cxx @@ -11,9 +11,9 @@ const std::string& PileUpTimeEventIndex::typeName(PileUpTimeEventIndex::PileUpType typ) { - static std::string typNam[PileUpTimeEventIndex::NTYPES+1] = + static std::string typNam[PileUpTimeEventIndex::NTYPES+1] = {"Unknown" /*-1*/, "Signal" /*0*/, "MinimumBias" /*1*/, "Cavern" /*2*/, - "HaloGas"/*3*/, "ZeroBias"/*4*/ }; + "HaloGas"/*3*/, "HighPtMinimumBias" /*4*/, "ZeroBias"/*5*/ }; assert(typ < PileUpTimeEventIndex::NTYPES); return typNam[typ+1]; } @@ -25,7 +25,8 @@ PileUpTimeEventIndex::ushortToType(unsigned short uType) { case 1: puType = PileUpTimeEventIndex::MinimumBias; break; case 2: puType = PileUpTimeEventIndex::Cavern; break; case 3: puType = PileUpTimeEventIndex::HaloGas; break; - case 4: puType = PileUpTimeEventIndex::ZeroBias; break; + case 4: puType = PileUpTimeEventIndex::HighPtMinimumBias; break; + case 5: puType = PileUpTimeEventIndex::ZeroBias; break; default: std::ostringstream merr; merr << diff --git a/Event/EventInfoMgt/src/TagInfoMgr.cxx b/Event/EventInfoMgt/src/TagInfoMgr.cxx index c421e3e6274ddfc1c891f5400b0a6578a922e58e..1609c6ff919b742fbec7b9cb857c1cb9d6d7ed84 100755 --- a/Event/EventInfoMgt/src/TagInfoMgr.cxx +++ b/Event/EventInfoMgt/src/TagInfoMgr.cxx @@ -35,6 +35,7 @@ #include "AthenaPoolUtilities/CondAttrListCollAddress.h" #include "IOVDbMetaDataTools/IIOVDbMetaDataTool.h" #include "CxxUtils/make_unique.h" +#include "AthenaKernel/ExtendedEventContext.h" // Gaudi includes #include "GaudiKernel/IIncidentSvc.h" @@ -55,6 +56,7 @@ TagInfoMgr::TagInfoMgr(const std::string &name, m_iovDbSvc("IOVDbSvc", name), m_metaDataTool("IOVDbMetaDataTool"), m_isFirstBeginRun(true), + m_conditionsRun(EventIDBase::UNDEFNUM), m_newFileIncidentSeen(false), m_lastIOVRange(IOVRange(IOVTime(),IOVTime())), m_log(msgSvc(), name) @@ -487,7 +489,7 @@ TagInfoMgr::fillMetaData (const TagInfo* tagInfo, const CondAttrListCollection if (m_log.level() <= MSG::DEBUG) m_log << MSG::DEBUG << "entering fillMetaData" << endmsg; // Get run number for IOV - unsigned int runNumber = 0; + EventIDBase::number_type runNumber = 0; const EventIDBase* evid = EventIDFromStore( m_storeGate ); if( evid ) { runNumber = evid->run_number(); @@ -495,8 +497,13 @@ TagInfoMgr::fillMetaData (const TagInfo* tagInfo, const CondAttrListCollection // For simulation, we may be in the initialization phase and // must get the run number from the event selector if (StatusCode::SUCCESS != getRunNumber (runNumber)) { + // For HLT use the conditionsRun retrieved from the first BeginRun incident + if( m_conditionsRun != EventIDBase::UNDEFNUM ) { + runNumber = m_conditionsRun; + } else { m_log << MSG::ERROR << "fillMetaData: Could not get event info neither via retrieve nor from the EventSelectror" << endmsg; return (StatusCode::FAILURE); + } } } // Copy tags to AttributeList @@ -672,25 +679,30 @@ TagInfoMgr::handle(const Incident& inc) { // reset flags m_newFileIncidentSeen = false; + // get conditionsRun from the Context - can be used if no EventID in the SG (for HLT) + m_conditionsRun = inc.context().getExtension<Atlas::ExtendedEventContext>().conditionsRun(); + // Print out EventInfo // can't use a ref here! const EventIDBase eventID = inc.context().eventID(); if (m_log.level() <= MSG::DEBUG) { - m_log << MSG::DEBUG << "handle: BeginRun incident - Event info: " << endmsg; - m_log << MSG::DEBUG << "handle: Event ID: [" + m_log << MSG::DEBUG << "handle: First BeginRun incident - Event ID: [" << eventID.run_number() << "," << eventID.event_number() << ":" - << eventID.time_stamp() << "] " - << endmsg; + << eventID.time_stamp() << "] "; + if( m_conditionsRun != EventIDBase::UNDEFNUM ) { + m_log << MSG::DEBUG <<"conditionsRun = " << m_conditionsRun; + } + m_log << MSG::DEBUG << endmsg; } - + // For the moment, we must set IOVDbSvc into the BeginRun // state to be able to access TagInfo from the file meta data // create IOV time from current event coming in with BeginRun incident - unsigned int run = eventID.run_number(); - unsigned int lb = eventID.lumi_block(); + EventIDBase::number_type run = eventID.run_number(); + EventIDBase::number_type lb = eventID.lumi_block(); IOVTime curTime; curTime.setRunEvent(run, lb); @@ -744,7 +756,7 @@ TagInfoMgr::handle(const Incident& inc) { if (m_log.level() <= MSG::DEBUG) m_log << MSG::DEBUG << "handle: Requested IOVDbSvc to register callback" << endmsg; } } - else if (inc.type() == "BeginRun") { + else if (inc.type() == IncidentType::BeginRun) { // For subsequent BeginRuns, check whether the /TagInfo folder // exists, and if so return. We only treat the case where // TagInfo is coming in with each event. In this case we fill diff --git a/Event/EventInfoMgt/src/TagInfoMgr.h b/Event/EventInfoMgt/src/TagInfoMgr.h index 51eb17a333c5a3d5a14555cdc61c9fb796202a15..6099805bd0ad74bf16c6f233dd972ba7cb190915 100755 --- a/Event/EventInfoMgt/src/TagInfoMgr.h +++ b/Event/EventInfoMgt/src/TagInfoMgr.h @@ -221,6 +221,9 @@ private: /// Flag to identify the first BeginRun incident bool m_isFirstBeginRun; + /// conditionsRun from the first BeginRun incident (HLT) + EventIDBase::number_type m_conditionsRun; + /// Flag to identify a new file incident bool m_newFileIncidentSeen; diff --git a/Event/EventInfoUtils/CMakeLists.txt b/Event/EventInfoUtils/CMakeLists.txt index 4aafaf0e65a7d8a02858c0f9a64b3796a8854859..3d2168afe775b906e32cf78989468469c337df13 100644 --- a/Event/EventInfoUtils/CMakeLists.txt +++ b/Event/EventInfoUtils/CMakeLists.txt @@ -11,7 +11,7 @@ atlas_depends_on_subdirs( PUBLIC Control/StoreGate PRIVATE Control/SGTools - Event/Eventinfo + Event/EventInfo Event/xAOD/xAODEventInfo ) diff --git a/Event/EventOverlay/EventOverlayJobTransforms/CMakeLists.txt b/Event/EventOverlay/EventOverlayJobTransforms/CMakeLists.txt index 7fcde34640cafff33c8d163f6a47ca31f9b2846d..ea881ca5c0602d03249ee98c3f6fb11aa9b14ca9 100644 --- a/Event/EventOverlay/EventOverlayJobTransforms/CMakeLists.txt +++ b/Event/EventOverlay/EventOverlayJobTransforms/CMakeLists.txt @@ -5,6 +5,9 @@ # Declare the package name: atlas_subdir( EventOverlayJobTransforms ) +# Necessary external(s): +find_package( cx_Oracle ) + # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC Tools/PyJobTransforms diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/MuonOverlay_jobOptions.py b/Event/EventOverlay/EventOverlayJobTransforms/share/MuonOverlay_jobOptions.py index b288231c84feb018220dfc012d57c61a28a5589c..a0a6b12b426ae04eab8c5651302c616292213c15 100644 --- a/Event/EventOverlay/EventOverlayJobTransforms/share/MuonOverlay_jobOptions.py +++ b/Event/EventOverlay/EventOverlayJobTransforms/share/MuonOverlay_jobOptions.py @@ -33,6 +33,8 @@ if DetFlags.overlay.MDT_on() or DetFlags.overlay.CSC_on() or DetFlags.overlay.RP include("MuonCnvExample/MuonReadBS_jobOptions.py") if DetFlags.overlay.CSC_on(): + job += CfgGetter.getAlgorithm("CscOverlayDigitBuilder") + job += CfgGetter.getAlgorithm("OverlayCscDigitToCscRDO") job += CfgGetter.getAlgorithm("CscOverlay") if not overlayFlags.isDataOverlay(): job += CfgGetter.getAlgorithm("CscTruthOverlay") diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/Rt_override_OFLCOND-MC16-SDR-26.py b/Event/EventOverlay/EventOverlayJobTransforms/share/Rt_override_OFLCOND-MC16-SDR-26.py new file mode 100644 index 0000000000000000000000000000000000000000..2f77f1bc325e6cda58fb3c540023b7ce1e580c04 --- /dev/null +++ b/Event/EventOverlay/EventOverlayJobTransforms/share/Rt_override_OFLCOND-MC16-SDR-26.py @@ -0,0 +1,224 @@ +from IOVDbSvc.CondDB import conddb +from AthenaCommon.DetFlags import DetFlags +from RecExConfig.RecAlgsFlags import recAlgs +######################################## + +#use MC MDT RT functions +#conddb.blockFolder("/MDT/RT") +#conddb.addFolderWithTag("MDT_OFL","/MDT/RT","MDTRT_Sim-04",force=True,forceMC=True) +conddb.blockFolder("/MDT/RTBLOB") +conddb.addFolderWithTag("MDT_OFL","/MDT/RTBLOB","MDTRT_Sim-04-BLOB",force=True,forceMC=True) + +#from Guillaume +conddb.blockFolder("/LAR/LArCellPositionShift"); +conddb.addFolderWithTag("LAR_OFL","/LAR/LArCellPositionShift","LArCellPositionShift-ideal",force=True,forceMC=True); +conddb.addOverride("/LAR/ElecCalibOfl/Shape/RTM/4samples1phase","LARElecCalibOflShapeRTM4samples1phase-RUN2-UPD4-00") +conddb.addOverride("/LAR/ElecCalibOfl/OFC/PhysWave/RTM/4samples1phase","LARElecCalibOflOFCPhysWaveRTM4samples1phase-RUN2-UPD4-00") +svcMgr.PoolSvc.ReadCatalog+=["xmlcatalog_file:"+"/cvmfs/atlas-condb.cern.ch/repo/conditions/poolcond/PoolFileCatalog.xml"] + +conddb.blockFolder("/PIXEL/ReadoutSpeed") +conddb.addFolderSplitMC("PIXEL","/PIXEL/ReadoutSpeed","/PIXEL/ReadoutSpeed",force=True) + +conddb.blockFolder("/TRT/Cond/DigVers") +conddb.addFolderWithTag("TRT_OFL","/TRT/Cond/DigVers","TRTCondDigVers-Collisions-01",force=True,forceMC=True) + + +################################################### +print "RT OVERRIDE, for OFLCOND-MC16-SDR-26 MC condition tag " +#See https://atlas-tagservices.cern.ch/tagservices/RunBrowser/runBrowserReport/rBR_CB_Report.php?CBAction=GlobalTagReport&cbgt=OFLCOND-MC16-SDR-26 +# https://atlas-tagservices.cern.ch/tagservices/RunBrowser/runBrowserReport/rBR_CB_Report.php?CBAction=GlobalTagReport&cbgt=CONDBR2-BLKPA-2018-12 + +conddb.blockFolder("/LAR/BadChannels/BadChannels"); +conddb.blockFolder("/LAR/BadChannelsOfl/BadChannels"); +conddb.addFolderWithTag("LAR_OFL","/LAR/BadChannels/BadChannels","LArBadChannelsBadChannels-IOVDEP-08",force=True,forceMC=True); +conddb.blockFolder("/LAR/BadChannels/MissingFEBs"); +conddb.blockFolder("/LAR/BadChannelsOfl/MissingFEBs"); +conddb.addFolderWithTag("LAR_OFL","/LAR/BadChannels/MissingFEBs","LArBadChannelsMissingFEBs-IOVDEP-04",force=True,forceMC=True) + +if not "EOJT_alignMC" in globals(): + print "EOJT_alignMC not found in globals(), so aligning ID to data conditions" + #conddb.blockFolder("/TRT/Align") + #conddb.addFolderWithTag("TRT_OFL","/TRT/Align","TRTAlign-RUN2-BLK-UPD4-10",force=True,forceData=True) + #conddb.blockFolder("/LAR/Align") + #conddb.addFolderWithTag("LAR_ONL","/LAR/Align","LARAlign-RUN2-UPD4-02",force=True,forceData=True) + #conddb.blockFolder("/Indet/Align") + #conddb.addFolderWithTag("INDET_OFL","/Indet/Align","InDetAlign-RUN2-BLK-UPD4-13",force=True,forceData=True) +else: + print "EOJT_alignMC found in globals(), so aligning ID to MC conditions" + conddb.blockFolder("/TRT/Align") + conddb.addFolderWithTag("TRT_OFL","/TRT/Align","TRTAlign-RUN2-BLK-UPD4-13",force=True,forceMC=True) + conddb.blockFolder("/LAR/Align") + conddb.addFolderWithTag("LAR_OFL","/LAR/Align","LARAlign-RUN2-UPD4-03",force=True,forceMC=True) + conddb.blockFolder("/Indet/Align") + conddb.addFolderWithTag("INDET_OFL","/Indet/Align","InDetAlign-RUN2-BLK-UPD4-16",force=True,forceMC=True) #InDetAlign_IOVDEP-03 + +#to set beam spot from MC +#conddb.blockFolder("/Indet/Beampos") +#conddb.addFolderWithTag("INDET_OFL","/Indet/Beampos","IndetBeampos-RunDep-MC15-BestKnowledge-002",force=True,forceMC=True) + +#to run overlay chain with trigger +if (hasattr(runArgs, "triggerConfig") and runArgs.triggerConfig!="NONE") or (hasattr(recAlgs,'doTrigger') and recAlgs.doTrigger() and DetFlags.LVL1_on()): + print "running with trigger " + conddb.addOverride("/GLOBAL/Onl/BTagCalib/RUN12","BTagCalibRUN12Onl-08-40") +else: + print "running with no trigger " + +if DetFlags.writeRDOPool.pixel_on(): + conddb.addFolder("PIXEL_OFL","/PIXEL/PixReco") + +conddb.blockFolder("/PIXEL/PixdEdx") +conddb.addFolderWithTag("PIXEL_OFL","/PIXEL/PixdEdx","PixdEdx-SIM-RUN124-000-00",force=True,forceMC=True) +mcIDoverlay=False +if mcIDoverlay: + print "ACH777: Using MC overlay Lorentz DB settings" + conddb.blockFolder("/PIXEL/DCS/HV") + conddb.addFolderWithTag("DCS_OFL","/PIXEL/DCS/HV","PixDCSHV-SIM-MC16-000-07",force=True,forceMC=True) + conddb.blockFolder("/PIXEL/DCS/TEMPERATURE") + conddb.addFolderWithTag("DCS_OFL","/PIXEL/DCS/TEMPERATURE","PixDCSTemp-SIM-MC16-000-09",force=True,forceMC=True) + conddb.blockFolder("/SCT/DCS/HV") + conddb.addFolderWithTag("DCS_OFL","/SCT/DCS/HV","SctDcsHv-MC16",force=True,forceMC=True) + conddb.blockFolder("/SCT/DCS/MODTEMP") + conddb.addFolderWithTag("DCS_OFL","/SCT/DCS/MODTEMP","SctDcsModtemp-MC16",force=True,forceMC=True) +mcIDoverlay2=False +if mcIDoverlay2: + print "ACH777: Using more MC overlay ID DB settings" + conddb.blockFolder("/Indet/PixelDist") + conddb.addFolderWithTag("INDET_OFL","/Indet/PixelDist","InDetPixelDist-nominal",force=True,forceMC=True) + conddb.blockFolder("/PIXEL/PixelClustering/PixelClusNNCalib") + conddb.addFolderWithTag("PIXEL_OFL","/PIXEL/PixelClustering/PixelClusNNCalib","PixelClusNNCalib-SIM-RUN12-000-06",force=True,forceMC=True) + conddb.blockFolder("/PIXEL/LorentzAngleScale") + conddb.addFolderWithTag("PIXEL_OFL","/PIXEL/LorentzAngleScale","PixLorentzAngleScale-SIM-RUN124-000-00",force=True,forceMC=True) + +conddb.blockFolder("/MUONALIGN/MDT/BARREL") +conddb.blockFolder("/MUONALIGN/MDT/ENDCAP/SIDEA") +conddb.blockFolder("/MUONALIGN/MDT/ENDCAP/SIDEC") +conddb.blockFolder("/MUONALIGN/TGC/SIDEA") +conddb.blockFolder("/MUONALIGN/TGC/SIDEC") + +#use updated muon alignments +conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/BARREL","MuonAlignMDTBarrelAlign-RUN2-BA_ROLLING_09-BLKP-UPD4-00",force=True,forceData=True) +conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEA","MuonAlignMDTEndCapAAlign-RUN2-ECA_ROLLING_2015_02_01-UPD4-02",force=True,forceData=True) +conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEC","MuonAlignMDTEndCapCAlign-RUN2-ECC_ROLLING_2015_02_01-UPD4-02",force=True,forceData=True) + +#the TGC alignments had overlap issues... caused G4 crash +conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEA","MuonAlignTGCEndCapAAlign-0001-DEFAULT",force=True,forceMC=True) +conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEC","MuonAlignTGCEndCapCAlign-0001-DEFAULT",force=True,forceMC=True) + +conddb.blockFolder("/SCT/DAQ/Config/Chip") +conddb.addFolderSplitMC("SCT","/SCT/DAQ/Config/Chip","/SCT/DAQ/Config/Chip",force=True) +conddb.blockFolder("/SCT/DAQ/Config/Module") +conddb.addFolderSplitMC("SCT","/SCT/DAQ/Config/Module","/SCT/DAQ/Config/Module",force=True) + +dofolderoverrides = True +runN=365681 +lumiBlock=500 +if dofolderoverrides: + print "ACH - overriding folder access patterns" + conddb.dumpFolderTags('myconddb.txt',True) + +overlaylongfolders = [] +def setrunforfolder(name): + if conddb.folderRequested(name): + print "setting run to "+str(runN)+" and lumiblock "+str(lumiBlock) + frnTag="<forceRunNumber>"+str(runN)+"</forceRunNumber>" + flbTag="<forceLumiblockNumber>"+str(lumiBlock)+"</forceLumiblockNumber>" + conddb.addMarkup(name,frnTag) + conddb.addMarkup(name,flbTag) + global overlaylongfolders + overlaylongfolders += [name] + +if dofolderoverrides: + setrunforfolder("/CALO/CaloSwClusterCorrections/calhits") + setrunforfolder("/CALO/CaloSwClusterCorrections/clcon") + setrunforfolder("/CALO/CaloSwClusterCorrections/deadOTXback") + setrunforfolder("/CALO/CaloSwClusterCorrections/deadOTXps") + setrunforfolder("/CALO/CaloSwClusterCorrections/etamod") + setrunforfolder("/CALO/CaloSwClusterCorrections/etaoff") + setrunforfolder("/CALO/CaloSwClusterCorrections/gap") + setrunforfolder("/CALO/CaloSwClusterCorrections/larupdate") + setrunforfolder("/CALO/CaloSwClusterCorrections/lwc") + setrunforfolder("/CALO/CaloSwClusterCorrections/phimod") + setrunforfolder("/CALO/CaloSwClusterCorrections/phioff") + setrunforfolder("/CALO/CaloSwClusterCorrections/rfac") + setrunforfolder("/CALO/CaloSwClusterCorrections/trcorr") + setrunforfolder("/CALO/H1Weights/H1WeightsCone4Topo") + setrunforfolder("/CALO/Identifier/CaloTTOnAttrIdMapAtlas") + setrunforfolder("/CALO/Identifier/CaloTTOnOffIdMapAtlas") + setrunforfolder("/CALO/Identifier/CaloTTPpmRxIdMapAtlas") + setrunforfolder("/CALO/JetCalib/EtaMassEnergyCorr") + setrunforfolder("/CALO/JetCalib/JetPropertyInvertResponseTool") + setrunforfolder("/CALO/JetCalib/MCNumInversionResponse") + setrunforfolder("/CALO/JetCalib/OffsetCorrection") + setrunforfolder("/CALO/JetCalib/TrackAngularCorrection") + setrunforfolder("/CALO/JetCalib/TrackBasedResponseCorrection") + setrunforfolder("/CALO/Ofl/Pedestal/CellPedestal") + setrunforfolder("/CALO/Pedestal/CellPedestal") + setrunforfolder("/CSC/PSLOPE") + setrunforfolder("/CSC/RMS") + setrunforfolder("/CSC/T0BASE") + setrunforfolder("/CSC/T0PHASE") + setrunforfolder("/GLOBAL/DETSTATUS/DEFECTLOGIC") + setrunforfolder("/Indet/TrkErrorScaling") + setrunforfolder("/LAR/CellCorrOfl/deadOTX") + setrunforfolder("/LAR/ElecCalibOfl/LArPileupShape") + setrunforfolder("/MDT/CABLING/MAP_SCHEMA") + setrunforfolder("/MDT/CABLING/MEZZANINE_SCHEMA") + setrunforfolder("/MUONALIGN/MDT/ASBUILTPARAMS") + setrunforfolder("/MUONALIGN/TGC/SIDEA") + setrunforfolder("/MUONALIGN/TGC/SIDEC") + setrunforfolder("/PIXEL/LorentzAngleScale") + setrunforfolder("/PIXEL/NoiseMapLong") + setrunforfolder("/PIXEL/PixMapLong") + setrunforfolder("/PIXEL/PixMapShort") + setrunforfolder("/PIXEL/PixdEdx") + setrunforfolder("/PIXEL/PixelClustering/PixelClusNNCalib") + setrunforfolder("/PIXEL/PixelClustering/PixelCovCorr") + setrunforfolder("/RPC/CABLING/MAP_SCHEMA") + setrunforfolder("/RPC/CABLING/MAP_SCHEMA_CORR") + setrunforfolder("/RPC/DQMF/ELEMENT_STATUS") + setrunforfolder("/TGC/CABLING/MAP_SCHEMA") + setrunforfolder("/TILE/OFL02/CALIB/CIS/NLN") + setrunforfolder("/TILE/OFL02/CALIB/EMS") + setrunforfolder("/TILE/OFL02/CALIB/LAS/FIBER") + setrunforfolder("/TILE/OFL02/CALIB/LAS/NLN") + setrunforfolder("/TILE/OFL02/NOISE/AUTOCR") + setrunforfolder("/TILE/OFL02/PULSESHAPE/CIS/LEAK100") + setrunforfolder("/TILE/OFL02/PULSESHAPE/CIS/LEAK5P2") + setrunforfolder("/TILE/OFL02/PULSESHAPE/CIS/PULSE100") + setrunforfolder("/TILE/OFL02/PULSESHAPE/CIS/PULSE5P2") + setrunforfolder("/TILE/OFL02/PULSESHAPE/LAS") + setrunforfolder("/TILE/OFL02/PULSESHAPE/PHY") + setrunforfolder("/TILE/OFL02/TIME/CHANNELOFFSET/CIS") + setrunforfolder("/TRT/Calib/DX") + setrunforfolder("/TRT/Calib/HTCalib") + setrunforfolder("/TRT/Calib/PID") + setrunforfolder("/TRT/Calib/PID_RToT") + setrunforfolder("/TRT/Calib/PID_RToTver_New") + setrunforfolder("/TRT/Calib/PID_vector") + setrunforfolder("/TRT/Calib/PIDver_New") + setrunforfolder("/TRT/Calib/ToT/ToTValue") + setrunforfolder("/TRT/Calib/ToT/ToTVectors") + setrunforfolder("/TRT/Calib/ToTCalib") + setrunforfolder("/TRT/Calib/errors") + setrunforfolder("/TRT/Calib/errors2d") + setrunforfolder("/TRT/Calib/slopes") + setrunforfolder("/CSC/FTHOLD") + setrunforfolder("/CSC/NOISE") + setrunforfolder("/CSC/PED") + setrunforfolder("/GLOBAL/BTagCalib/Onl/RUN12") + setrunforfolder("/Indet/PixelDist") + setrunforfolder("/LAR/ElecCalibOfl/OFC/PhysWave/RTM/4samples3bins17phases") + setrunforfolder("/LAR/ElecCalibOfl/Shape/RTM/4samples3bins17phases") + setrunforfolder("/PIXEL/CablingMap") + setrunforfolder("/PIXEL/NoiseMapShort") + setrunforfolder("/PIXEL/PixReco") + setrunforfolder("/Indet/AlignL3") + setrunforfolder("/MUONALIGN/ERRS") + setrunforfolder("/RPC/TRIGGER/CM_THR_ETA") + setrunforfolder("/RPC/TRIGGER/CM_THR_PHI") + setrunforfolder("/TRT/AlignL2") + +print "set run "+str(runN)+" and lumiblock "+str(lumiBlock)+" for folders: ", overlaylongfolders + + + diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/Rt_override_OFLCOND-MC16-SDR-26_folders100M.py b/Event/EventOverlay/EventOverlayJobTransforms/share/Rt_override_OFLCOND-MC16-SDR-26_folders100M.py new file mode 100644 index 0000000000000000000000000000000000000000..74e01f9bc6083f58f1969207612b6f5713c03bd8 --- /dev/null +++ b/Event/EventOverlay/EventOverlayJobTransforms/share/Rt_override_OFLCOND-MC16-SDR-26_folders100M.py @@ -0,0 +1,236 @@ +from IOVDbSvc.CondDB import conddb +from AthenaCommon.DetFlags import DetFlags +from RecExConfig.RecAlgsFlags import recAlgs +######################################## + +#use MC MDT RT functions +#conddb.blockFolder("/MDT/RT") +#conddb.addFolderWithTag("MDT_OFL","/MDT/RT","MDTRT_Sim-04",force=True,forceMC=True) +conddb.blockFolder("/MDT/RTBLOB") +conddb.addFolderWithTag("MDT_OFL","/MDT/RTBLOB","MDTRT_Sim-04-BLOB",force=True,forceMC=True) + +#from Guillaume +conddb.blockFolder("/LAR/LArCellPositionShift"); +conddb.addFolderWithTag("LAR_OFL","/LAR/LArCellPositionShift","LArCellPositionShift-ideal",force=True,forceMC=True); +conddb.addOverride("/LAR/ElecCalibOfl/Shape/RTM/4samples1phase","LARElecCalibOflShapeRTM4samples1phase-RUN2-UPD4-00") +conddb.addOverride("/LAR/ElecCalibOfl/OFC/PhysWave/RTM/4samples1phase","LARElecCalibOflOFCPhysWaveRTM4samples1phase-RUN2-UPD4-00") +svcMgr.PoolSvc.ReadCatalog+=["xmlcatalog_file:"+"/cvmfs/atlas-condb.cern.ch/repo/conditions/poolcond/PoolFileCatalog.xml"] + +conddb.blockFolder("/PIXEL/ReadoutSpeed") +conddb.addFolderSplitMC("PIXEL","/PIXEL/ReadoutSpeed","/PIXEL/ReadoutSpeed",force=True) + +conddb.blockFolder("/TRT/Cond/DigVers") +conddb.addFolderWithTag("TRT_OFL","/TRT/Cond/DigVers","TRTCondDigVers-Collisions-01",force=True,forceMC=True) + + +################################################### +print "RT OVERRIDE, for OFLCOND-MC16-SDR-26 " +#See https://atlas-tagservices.cern.ch/tagservices/RunBrowser/runBrowserReport/rBR_CB_Report.php?CBAction=GlobalTagReport&cbgt=OFLCOND-MC16-SDR-26 +# https://atlas-tagservices.cern.ch/tagservices/RunBrowser/runBrowserReport/rBR_CB_Report.php?CBAction=GlobalTagReport&cbgt=CONDBR2-BLKPA-2018-12 + +conddb.blockFolder("/LAR/BadChannels/BadChannels"); +conddb.blockFolder("/LAR/BadChannelsOfl/BadChannels"); +conddb.addFolderWithTag("LAR_OFL","/LAR/BadChannels/BadChannels","LArBadChannelsBadChannels-IOVDEP-08",force=True,forceMC=True); +conddb.blockFolder("/LAR/BadChannels/MissingFEBs"); +conddb.blockFolder("/LAR/BadChannelsOfl/MissingFEBs"); +conddb.addFolderWithTag("LAR_OFL","/LAR/BadChannels/MissingFEBs","LArBadChannelsMissingFEBs-IOVDEP-04",force=True,forceMC=True) + +if not "EOJT_alignMC" in globals(): + print "EOJT_alignMC not found in globals(), so aligning ID to data conditions" + #conddb.blockFolder("/TRT/Align") + #conddb.addFolderWithTag("TRT_OFL","/TRT/Align","TRTAlign-RUN2-BLK-UPD4-10",force=True,forceData=True) + #conddb.blockFolder("/LAR/Align") + #conddb.addFolderWithTag("LAR_ONL","/LAR/Align","LARAlign-RUN2-UPD4-02",force=True,forceData=True) + #conddb.blockFolder("/Indet/Align") + #conddb.addFolderWithTag("INDET_OFL","/Indet/Align","InDetAlign-RUN2-BLK-UPD4-13",force=True,forceData=True) +else: + print "EOJT_alignMC found in globals(), so aligning ID to MC conditions" + conddb.blockFolder("/TRT/Align") + conddb.addFolderWithTag("TRT_OFL","/TRT/Align","TRTAlign-RUN2-BLK-UPD4-13",force=True,forceMC=True) + conddb.blockFolder("/LAR/Align") + conddb.addFolderWithTag("LAR_OFL","/LAR/Align","LARAlign-RUN2-UPD4-03",force=True,forceMC=True) + conddb.blockFolder("/Indet/Align") + conddb.addFolderWithTag("INDET_OFL","/Indet/Align","InDetAlign-RUN2-BLK-UPD4-16",force=True,forceMC=True) #InDetAlign_IOVDEP-03 + +#to set beam spot from MC +#conddb.blockFolder("/Indet/Beampos") +#conddb.addFolderWithTag("INDET_OFL","/Indet/Beampos","IndetBeampos-RunDep-MC15-BestKnowledge-002",force=True,forceMC=True) + +#to run overlay chain with trigger +if (hasattr(runArgs, "triggerConfig") and runArgs.triggerConfig!="NONE") or (hasattr(recAlgs,'doTrigger') and recAlgs.doTrigger() and DetFlags.LVL1_on()): + print "running with trigger " + conddb.addOverride("/GLOBAL/Onl/BTagCalib/RUN12","BTagCalibRUN12Onl-08-40") +else: + print "running with no trigger " + +if DetFlags.writeRDOPool.pixel_on(): + conddb.addFolder("PIXEL_OFL","/PIXEL/PixReco") + +conddb.blockFolder("/PIXEL/PixdEdx") +conddb.addFolderWithTag("PIXEL_OFL","/PIXEL/PixdEdx","PixdEdx-SIM-RUN124-000-00",force=True,forceMC=True) +mcIDoverlay=False +if mcIDoverlay: + print "ACH777: Using MC overlay Lorentz DB settings" + conddb.blockFolder("/PIXEL/DCS/HV") + conddb.addFolderWithTag("DCS_OFL","/PIXEL/DCS/HV","PixDCSHV-SIM-MC16a-000-07",force=True,forceMC=True) + conddb.blockFolder("/PIXEL/DCS/TEMPERATURE") + conddb.addFolderWithTag("DCS_OFL","/PIXEL/DCS/TEMPERATURE","PixDCSTemp-SIM-MC16a-000-09",force=True,forceMC=True) + conddb.blockFolder("/SCT/DCS/HV") + conddb.addFolderWithTag("DCS_OFL","/SCT/DCS/HV","SctDcsHv-MC16",force=True,forceMC=True) + conddb.blockFolder("/SCT/DCS/MODTEMP") + conddb.addFolderWithTag("DCS_OFL","/SCT/DCS/MODTEMP","SctDcsModtemp-MC16",force=True,forceMC=True) +mcIDoverlay2=False +if mcIDoverlay2: + print "ACH777: Using more MC overlay ID DB settings" + conddb.blockFolder("/Indet/PixelDist") + conddb.addFolderWithTag("INDET_OFL","/Indet/PixelDist","InDetPixelDist-nominal",force=True,forceMC=True) + conddb.blockFolder("/PIXEL/PixelClustering/PixelClusNNCalib") + conddb.addFolderWithTag("PIXEL_OFL","/PIXEL/PixelClustering/PixelClusNNCalib","PixelClusNNCalib-SIM-RUN12-000-06",force=True,forceMC=True) + conddb.blockFolder("/PIXEL/LorentzAngleScale") + conddb.addFolderWithTag("PIXEL_OFL","/PIXEL/LorentzAngleScale","PixLorentzAngleScale-SIM-RUN124-000-00",force=True,forceMC=True) + +conddb.blockFolder("/MUONALIGN/MDT/BARREL") +conddb.blockFolder("/MUONALIGN/MDT/ENDCAP/SIDEA") +conddb.blockFolder("/MUONALIGN/MDT/ENDCAP/SIDEC") +conddb.blockFolder("/MUONALIGN/TGC/SIDEA") +conddb.blockFolder("/MUONALIGN/TGC/SIDEC") + +#use updated muon alignments +conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/BARREL","MuonAlignMDTBarrelAlign-RUN2-BA_ROLLING_09-BLKP-UPD4-00",force=True,forceData=True) +conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEA","MuonAlignMDTEndCapAAlign-RUN2-ECA_ROLLING_2015_02_01-UPD4-02",force=True,forceData=True) +conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEC","MuonAlignMDTEndCapCAlign-RUN2-ECC_ROLLING_2015_02_01-UPD4-02",force=True,forceData=True) +conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEA","MuonAlignTGCEndCapAAlign-0001-DEFAULT",force=True,forceMC=True) +conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEC","MuonAlignTGCEndCapCAlign-0001-DEFAULT",force=True,forceMC=True) + +conddb.blockFolder("/SCT/DAQ/Config/Chip") +conddb.addFolderSplitMC("SCT","/SCT/DAQ/Config/Chip","/SCT/DAQ/Config/Chip",force=True) +conddb.blockFolder("/SCT/DAQ/Config/Module") +conddb.addFolderSplitMC("SCT","/SCT/DAQ/Config/Module","/SCT/DAQ/Config/Module",force=True) + +dofolderoverrides = True +if dofolderoverrides: + print "ACH - overriding folder access patterns" + conddb.dumpFolderTags('myconddb.txt',True) + +overlaylongfolders = [] +def adjustlongfolder(name): + if conddb.folderRequested(name): + print "setting "+name+" to 100000000s cache" + conddb.addMarkup(name,"<cache>100000000</cache>") + global overlaylongfolders + overlaylongfolders += [name] + +if dofolderoverrides: + adjustlongfolder("/CALO/CaloSwClusterCorrections/calhits") + adjustlongfolder("/CALO/CaloSwClusterCorrections/clcon") + adjustlongfolder("/CALO/CaloSwClusterCorrections/deadOTXback") + adjustlongfolder("/CALO/CaloSwClusterCorrections/deadOTXps") + adjustlongfolder("/CALO/CaloSwClusterCorrections/etamod") + adjustlongfolder("/CALO/CaloSwClusterCorrections/etaoff") + adjustlongfolder("/CALO/CaloSwClusterCorrections/gap") + adjustlongfolder("/CALO/CaloSwClusterCorrections/larupdate") + adjustlongfolder("/CALO/CaloSwClusterCorrections/lwc") + adjustlongfolder("/CALO/CaloSwClusterCorrections/phimod") + adjustlongfolder("/CALO/CaloSwClusterCorrections/phioff") + adjustlongfolder("/CALO/CaloSwClusterCorrections/rfac") + adjustlongfolder("/CALO/CaloSwClusterCorrections/trcorr") + adjustlongfolder("/CALO/H1Weights/H1WeightsCone4Topo") + adjustlongfolder("/CALO/Identifier/CaloTTOnAttrIdMapAtlas") + adjustlongfolder("/CALO/Identifier/CaloTTOnOffIdMapAtlas") + adjustlongfolder("/CALO/Identifier/CaloTTPpmRxIdMapAtlas") + adjustlongfolder("/CALO/JetCalib/EtaMassEnergyCorr") + adjustlongfolder("/CALO/JetCalib/JetPropertyInvertResponseTool") + adjustlongfolder("/CALO/JetCalib/MCNumInversionResponse") + adjustlongfolder("/CALO/JetCalib/OffsetCorrection") + adjustlongfolder("/CALO/JetCalib/TrackAngularCorrection") + adjustlongfolder("/CALO/JetCalib/TrackBasedResponseCorrection") + adjustlongfolder("/CALO/Ofl/Pedestal/CellPedestal") + adjustlongfolder("/CALO/Pedestal/CellPedestal") + adjustlongfolder("/CSC/PSLOPE") + adjustlongfolder("/CSC/RMS") + adjustlongfolder("/CSC/T0BASE") + adjustlongfolder("/CSC/T0PHASE") + adjustlongfolder("/GLOBAL/DETSTATUS/DEFECTLOGIC") + adjustlongfolder("/Indet/TrkErrorScaling") + adjustlongfolder("/LAR/CellCorrOfl/deadOTX") + adjustlongfolder("/LAR/ElecCalibOfl/LArPileupShape") + adjustlongfolder("/MDT/CABLING/MAP_SCHEMA") + adjustlongfolder("/MDT/CABLING/MEZZANINE_SCHEMA") + adjustlongfolder("/MUONALIGN/MDT/ASBUILTPARAMS") + adjustlongfolder("/MUONALIGN/TGC/SIDEA") + adjustlongfolder("/MUONALIGN/TGC/SIDEC") + adjustlongfolder("/PIXEL/LorentzAngleScale") + adjustlongfolder("/PIXEL/NoiseMapLong") + adjustlongfolder("/PIXEL/PixMapLong") + adjustlongfolder("/PIXEL/PixMapShort") + adjustlongfolder("/PIXEL/PixdEdx") + adjustlongfolder("/PIXEL/PixelClustering/PixelClusNNCalib") + adjustlongfolder("/PIXEL/PixelClustering/PixelCovCorr") + adjustlongfolder("/RPC/CABLING/MAP_SCHEMA") + adjustlongfolder("/RPC/CABLING/MAP_SCHEMA_CORR") + adjustlongfolder("/RPC/DQMF/ELEMENT_STATUS") + adjustlongfolder("/TGC/CABLING/MAP_SCHEMA") + adjustlongfolder("/TILE/OFL02/CALIB/CIS/NLN") + adjustlongfolder("/TILE/OFL02/CALIB/EMS") + adjustlongfolder("/TILE/OFL02/CALIB/LAS/FIBER") + adjustlongfolder("/TILE/OFL02/CALIB/LAS/NLN") + adjustlongfolder("/TILE/OFL02/NOISE/AUTOCR") + adjustlongfolder("/TILE/OFL02/PULSESHAPE/CIS/LEAK100") + adjustlongfolder("/TILE/OFL02/PULSESHAPE/CIS/LEAK5P2") + adjustlongfolder("/TILE/OFL02/PULSESHAPE/CIS/PULSE100") + adjustlongfolder("/TILE/OFL02/PULSESHAPE/CIS/PULSE5P2") + adjustlongfolder("/TILE/OFL02/PULSESHAPE/LAS") + adjustlongfolder("/TILE/OFL02/PULSESHAPE/PHY") + adjustlongfolder("/TILE/OFL02/TIME/CHANNELOFFSET/CIS") + adjustlongfolder("/TRT/Calib/DX") + adjustlongfolder("/TRT/Calib/HTCalib") + adjustlongfolder("/TRT/Calib/PID") + adjustlongfolder("/TRT/Calib/PID_RToT") + adjustlongfolder("/TRT/Calib/PID_RToTver_New") + adjustlongfolder("/TRT/Calib/PID_vector") + adjustlongfolder("/TRT/Calib/PIDver_New") + adjustlongfolder("/TRT/Calib/ToT/ToTValue") + adjustlongfolder("/TRT/Calib/ToT/ToTVectors") + adjustlongfolder("/TRT/Calib/ToTCalib") + adjustlongfolder("/TRT/Calib/errors") + adjustlongfolder("/TRT/Calib/errors2d") + adjustlongfolder("/TRT/Calib/slopes") + adjustlongfolder("/CSC/FTHOLD") + adjustlongfolder("/CSC/NOISE") + adjustlongfolder("/CSC/PED") + adjustlongfolder("/GLOBAL/BTagCalib/Onl/RUN12") + adjustlongfolder("/Indet/PixelDist") + adjustlongfolder("/LAR/ElecCalibOfl/OFC/PhysWave/RTM/4samples3bins17phases") + adjustlongfolder("/LAR/ElecCalibOfl/Shape/RTM/4samples3bins17phases") + adjustlongfolder("/PIXEL/CablingMap") + adjustlongfolder("/PIXEL/NoiseMapShort") + adjustlongfolder("/PIXEL/PixReco") + adjustlongfolder("/Indet/AlignL3") + adjustlongfolder("/MUONALIGN/ERRS") + adjustlongfolder("/RPC/TRIGGER/CM_THR_ETA") + adjustlongfolder("/RPC/TRIGGER/CM_THR_PHI") + adjustlongfolder("/TRT/AlignL2") + +print "overlaylongfolders: ", overlaylongfolders + +def adjustshortfolder(name): + global overlaylongfolders + if name in overlaylongfolders: + print "already made "+name+" long" + else: + if conddb.folderRequested(name): + print "setting "+name+" to 10s cache" + conddb.addMarkup(name,"<cache>10</cache>") + else: + print "folder "+name+" was not requested?!" + +if dofolderoverrides: + with open("myconddb.txt") as f: + for l in f: + ls=l.split(" ") + if ls[0].startswith("--folder"): + ls1=ls[1].rstrip('\r\n') + ls11=ls1.rstrip('\n') + adjustshortfolder(ls11) + + diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/blockFoldersHI_ESDtoAOD.py b/Event/EventOverlay/EventOverlayJobTransforms/share/blockFoldersHI_ESDtoAOD.py index 603a01e9284d86a3fb69b062343bdfe85ee01e8d..b991161ab1e52935318ed2d7102cc683d4a79b6d 100644 --- a/Event/EventOverlay/EventOverlayJobTransforms/share/blockFoldersHI_ESDtoAOD.py +++ b/Event/EventOverlay/EventOverlayJobTransforms/share/blockFoldersHI_ESDtoAOD.py @@ -10,3 +10,6 @@ conddb.blockFolder("/TRT/Cond/Status"); conddb.blockFolder("/TRT/Cond/StatusHT"); conddb.blockFolder("/TRT/Cond/StatusPermanent"); conddb.blockFolder("/LAR/Identifier/LArTTCellMapAtlas"); +conddb.blockFolder("/LAR/BadChannels/BadChannels"); +conddb.blockFolder("/LAR/BadChannels/MissingFEBs"); +conddb.blockFolder("/TRT/Cond/Status"); diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/blockFoldersHI_OverlayBS.py b/Event/EventOverlay/EventOverlayJobTransforms/share/blockFoldersHI_OverlayBS.py index 1743eec25d709a75ba56866f3226f12c76fb4b22..6287b79ffbac348fb6cfc38a3ec92b614de306e2 100644 --- a/Event/EventOverlay/EventOverlayJobTransforms/share/blockFoldersHI_OverlayBS.py +++ b/Event/EventOverlay/EventOverlayJobTransforms/share/blockFoldersHI_OverlayBS.py @@ -3,6 +3,9 @@ conddb.blockFolder("/LAR/BadChannelsOfl/KnownBADFEBs"); conddb.blockFolder("/LAR/BadChannelsOfl/KnownMNBFEBs"); conddb.blockFolder("/SCT/DAQ/Calibration/NPtGainDefects"); conddb.blockFolder("/SCT/DAQ/Calibration/NoiseOccupancyDefects"); +conddb.blockFolder("/SCT/DCS/CHANSTAT"); +conddb.blockFolder("/SCT/HLT/DCS/HV"); +conddb.blockFolder("/SCT/HLT/DCS/MODTEMP"); conddb.blockFolder("/TRT/Calib/PID"); conddb.blockFolder("/TRT/Calib/PID_RToT"); conddb.blockFolder("/TRT/Calib/PID_RToTver_New"); diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/muAlign_HI2018Pb_reco.py b/Event/EventOverlay/EventOverlayJobTransforms/share/muAlign_HI2018Pb_reco.py new file mode 100644 index 0000000000000000000000000000000000000000..3af7793ad450229e22cd4d9f8fa6dd0a6cde55b1 --- /dev/null +++ b/Event/EventOverlay/EventOverlayJobTransforms/share/muAlign_HI2018Pb_reco.py @@ -0,0 +1,44 @@ + +#use muon alignments +print "Haas: Reading muon alignment constants from DB for reco" + +from IOVDbSvc.CondDB import conddb + +MGM_AlignmentDbTool = ToolSvc.MGM_AlignmentDbTool +#MGM_AlignmentDbTool.OutputLevel=DEBUG +#print MGM_AlignmentDbTool +from AtlasGeoModel.MuonGM import GeoModelSvc +MuonDetectorTool = GeoModelSvc.DetectorTools[ "MuonDetectorTool" ] +MuonDetectorTool.UseConditionDb = 1 +#MuonDetectorTool.OutputLevel=DEBUG + +MuonDetectorTool.EnableFineClashFixing = 0 #this should be on for g4? +#print MuonDetectorTool +#print GeoModelSvc +#print ToolSvc + +#Now use MC T0 for TRT during overlay digi, but MC or data T0/Rt during reco, depending on where digit came from... so this stuff is just for reco +conddb.blockFolder("/TRT/Calib/MC/RT") +conddb.addFolderWithTag("TRT_OFL","/TRT/Calib/MC/RT","TrtCalibRt-R2-MC-run2-scenario1_04-03",force=True,forceData=True) +conddb.addMarkup("/TRT/Calib/MC/RT","<forceRunNumber>313000</forceRunNumber>") +conddb.blockFolder("/TRT/Calib/MC/T0") +conddb.addFolderWithTag("TRT_OFL","/TRT/Calib/MC/T0","TrtCalibT0-R2-MC-run2-scenario1_04-03",force=True,forceData=True) +conddb.addMarkup("/TRT/Calib/MC/T0","<forceRunNumber>313000</forceRunNumber>") + +from TRT_ConditionsServices.TRT_ConditionsServicesConf import TRT_CalDbSvc +TRTMCCalibDBSvc=TRT_CalDbSvc(name="TRTMCCalibDBSvc",RtFolderName="/TRT/Calib/MC/RT",T0FolderName="/TRT/Calib/MC/T0",ErrorSlopeFolderName="/TRT/Calib/slopes",ErrorFolderName ="/TRT/Calib/errors2d") +ServiceMgr += TRTMCCalibDBSvc + +#This would add another trtdriftfuntiontool, using the new trtcaldb +ToolSvc.InDetTRT_DriftFunctionTool.IsOverlay=True +ToolSvc.InDetTRT_DriftFunctionTool.TRTCalDbTool2=TRTMCCalibDBSvc + +if "EOJT_noLorentz" in globals(): + print "EOJT_noLorentz found in globals(), so not doing Lorentz corrections" + svcMgr.PixelSiliconConditionsSvc.ForceUseGeoModel=True + svcMgr.PixelSiliconConditionsSvc.CheckGeoModel=True + svcMgr.PixelSiliconConditionsSvc.UseDBForHV=False + svcMgr.PixelLorentzAngleSvc.usePixelDefaults=True +else: + print "EOJT_noLorentz not found in globals(), so doing standard Lorentz corrections" + diff --git a/Event/EventOverlay/IDC_OverlayBase/CMakeLists.txt b/Event/EventOverlay/IDC_OverlayBase/CMakeLists.txt index 99c2cc620c69a811a9a22a2771145f565002283b..f17f9b0b758ccbee2c5649da439b9b6fcc16bcd2 100644 --- a/Event/EventOverlay/IDC_OverlayBase/CMakeLists.txt +++ b/Event/EventOverlay/IDC_OverlayBase/CMakeLists.txt @@ -7,13 +7,10 @@ atlas_subdir( IDC_OverlayBase ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC - Control/AthenaBaseComps - Control/AthContainers DetectorDescription/Identifier Event/EventOverlay/OverlayAlgBase ) # Component(s) in the package: atlas_add_library( IDC_OverlayBase PUBLIC_HEADERS IDC_OverlayBase - LINK_LIBRARIES AthenaBaseComps AthContainers Identifier OverlayAlgBase ) - + LINK_LIBRARIES Identifier OverlayAlgBase ) diff --git a/Event/EventOverlay/IDC_OverlayBase/IDC_OverlayBase/IDC_OverlayBase.h b/Event/EventOverlay/IDC_OverlayBase/IDC_OverlayBase/IDC_OverlayBase.h index 4bd1cf5b48a28cf8cf6c282a4afa18108e5690de..ec933f9e5958d38b2ae1d8901b50bc37aeed660b 100644 --- a/Event/EventOverlay/IDC_OverlayBase/IDC_OverlayBase/IDC_OverlayBase.h +++ b/Event/EventOverlay/IDC_OverlayBase/IDC_OverlayBase/IDC_OverlayBase.h @@ -10,78 +10,29 @@ * Common base class and generic overlaying code for boolean-like hits. * Factored out from InDetOverlay. * + * @author Tadej Novak * @author Andrei Gaponenko <agaponenko@lbl.gov>, 2006-2009 - * */ #ifndef IDC_OVERLAYBASE_H #define IDC_OVERLAYBASE_H -#include <string> - -#include "OverlayAlgBase/OverlayAlgBase.h" -#include "IDC_OverlayBase/IDC_OverlayCommon.h" - -class IDC_OverlayBase; - -namespace Overlay { - - /** - * Merging of hits on the same channel. Modifies the first argument by adding data from the second.. - * Implementations can assume that the arguments have the same Id. (That is, correspond to the same readout channel.) - * - * A generic implementation of this template is provided in this package, - * but subdetectors can provide specializations suitable for their RDO type. - * A simple example of providing a specialization is in InDetOverlay.cxx (for TRT_RDORawData). - * A more elaborate implementation can be found e.g. in MdtOverlay.cxx - * - * Note that a declaration of a specialized template must occur before it is used - * by overlayContainer()/mergeCollections() [typically from the execute() method of your algorithm]. - */ - template<class Datum> void mergeChannelData(Datum& r1, const Datum& r2, IDC_OverlayBase* parent); - - /** - * Adds data and mc from the second collection to the output one merging where necessary. - * After this data and mc collections stay unchanged and output collection contains all information - * - * A generic implementation in the .icc file can be overriden by a - * specialization, see above. - */ +#include <OverlayAlgBase/OverlayAlgBase.h> - template<class Collection> void mergeCollectionsNew(Collection *mc_coll, Collection *data_coll, Collection *out_coll, IDC_OverlayBase* parent); -} - - -class IDC_OverlayBase : public OverlayAlgBase { +class IDC_OverlayBase : public OverlayAlgBase +{ public: - IDC_OverlayBase(const std::string &name, ISvcLocator *pSvcLocator) - : OverlayAlgBase(name, pSvcLocator) - {} - - /** - * Transfers all collections from the first and second arguments to the output the first merging where necessary. - */ - template<class IDC_Container> void overlayContainer(const IDC_Container* data, const IDC_Container* mc, IDC_Container* out ) { - Overlay::overlayContainer(data, mc, out, this); - } - - template<class IDC_Container> void overlayContainerNew(const IDC_Container* data, const IDC_Container* mc, IDC_Container* out ) { - Overlay::overlayContainerNew(data, mc, out, this); - } - - template<class IDC_Container> std::string shortPrint(const IDC_Container *container, unsigned numprint = 25) { - return Overlay::shortPrint(container, numprint); - } + : OverlayAlgBase(name, pSvcLocator) {} - /** - * Adds data and mc from the second collection to the output one merging where necessary. - * After this data and mc collections stay unchanged and output collection contains all information - */ - template<class Collection> void mergeCollections(Collection *mc_coll, Collection *data_coll, Collection *out_coll); +protected: + template <class IDC_Container> + StatusCode overlayContainer(const IDC_Container *bkgContainer, + const IDC_Container *signalContainer, + IDC_Container *outputContainer); }; #include "IDC_OverlayBase/IDC_OverlayBase.icc" -#endif/*IDC_OVERLAYBASE_H*/ +#endif diff --git a/Event/EventOverlay/IDC_OverlayBase/IDC_OverlayBase/IDC_OverlayBase.icc b/Event/EventOverlay/IDC_OverlayBase/IDC_OverlayBase/IDC_OverlayBase.icc index 711db40f69f1452f37554c7d48f2549aa4dcf7fb..dc932208f9524fcb40f14f51e39208571deee394 100644 --- a/Event/EventOverlay/IDC_OverlayBase/IDC_OverlayBase/IDC_OverlayBase.icc +++ b/Event/EventOverlay/IDC_OverlayBase/IDC_OverlayBase/IDC_OverlayBase.icc @@ -1,172 +1,107 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ -// Generic overlaying code for boolean-like hits. -// Factored out from InDetOverlay. -// -// Andrei Gaponenko <agaponenko@lbl.gov>, 2006-2009 +/// @author Tadej Novak +/// @author Andrei Gaponenko <agaponenko@lbl.gov>, 2006-2009 -#include "Identifier/Identifier.h" -#include "Identifier/IdentifierHash.h" +#include <Identifier/Identifier.h> +#include <Identifier/IdentifierHash.h> -#include "AthenaBaseComps/AthMsgStreamMacros.h" +#include "IDC_OverlayCommon.h" -#include "AthContainers/DataVector.h" - -#include <sstream> -#include <typeinfo> +template <class IDC_Container> +StatusCode IDC_OverlayBase::overlayContainer(const IDC_Container *bkgContainer, + const IDC_Container *signalContainer, + IDC_Container *outputContainer) +{ + ATH_MSG_DEBUG("overlayContainer<>() begin"); -namespace Overlay { - - //================================================================ - template<class Datum> - void mergeChannelData(Datum& /*r1*/, const Datum& /*r2*/, IDC_OverlayBase* parent) { - // this is the default implementation. - // We do not touch the data here, just print a warning. - static bool first_time = true; - if(first_time) { - first_time = false; - parent->msg(MSG::WARNING)<<"Overlay::mergeChannelData(): Merging of hits on the same channel is not implemented for " - <<typeid(Datum).name() - <<endmsg; - } - } + typedef typename IDC_Container::base_value_type Collection; + // Get all the hashes for the signal container + const std::vector<IdentifierHash> signalHashes = signalContainer->GetAllCurrentHashes(); - //================================================================ - template<class Collection> - void mergeCollectionsNew(Collection *mc_coll, Collection *data_coll, Collection *out_coll, IDC_OverlayBase *parent) { - - if(mc_coll->identify() != data_coll->identify()) { - std::ostringstream os; - os<<"mergeCollectionsNew<generic>(): collection Id mismatch"; - parent->msg(MSG::FATAL)<<os.str()<<endmsg; - throw std::runtime_error(os.str()); - } + // There are some use cases where background is empty + if (!bkgContainer) { + // Only loop through the signal collections and copy them over + for (const IdentifierHash &hashId : signalHashes) { + // Copy the signal collection + std::unique_ptr<Collection> signalCollection = Overlay::copyCollection(hashId, signalContainer->indexFindPtr(hashId)); - const Identifier idColl = mc_coll->identify(); - - // ---------------------------------------------------------------- - // debug - static bool first_time = true; - if(first_time) { - first_time = false; - parent->msg(MSG::INFO)<<"IDC_OverlayBase::mergeCollectionsNew(): " - <<"generic code is called for " - <<typeid(*mc_coll).name() - <<endmsg; - } - - // ---------------------------------------------------------------- - - //DataVector<typename Collection::base_value_type> data(data_coll->identifyHash()); - Collection data(data_coll->identifyHash()); - data.setIdentifier(idColl); - data_coll->swap(data); - - //DataVector<typename Collection::base_value_type> mc(mc_coll->identifyHash()); - Collection mc(mc_coll->identifyHash()); - mc.setIdentifier(idColl); - mc_coll->swap(mc); - - //################################################################ - // Merge by copying ptrs from data and mc to mc_coll - - typename Collection::size_type idata = 0; - typename Collection::size_type imc = 0; - - while( (idata < data.size()) || (imc < mc.size())) { - - // The RDO that goes to the output at the end of this step. - typename Collection::base_value_type *p_rdo(0); - - if(imc == mc.size()) { - // just copy the remaining data inputs - data.swapElement(idata++, 0, p_rdo); - } - else if(idata == data.size()) { - //just copy the remaining MC digits - mc.swapElement(imc++, 0, p_rdo); - } - else { - // Need to decide which one goes first. - // See comments in TRTDigitization.cxx about the assumption that id1<id2 <=> hash1<hash2 - if( mc[imc]->identify() < data[idata]->identify() ) { - mc.swapElement(imc++, 0, p_rdo); - } - else if(data[idata]->identify() < mc[imc]->identify()) { - data.swapElement(idata++, 0, p_rdo); - } - else { - // The hits are on the same channel. - typename Collection::base_value_type *p2(0); - data.swapElement(idata++, 0, p2); - mc.swapElement(imc++, 0, p_rdo); - Overlay::mergeChannelData(*p_rdo, *p2, parent); - delete p2; - } + if (outputContainer->addCollection(signalCollection.get(), hashId).isFailure()) { + ATH_MSG_ERROR("Adding signal Collection with hashId " << hashId << " failed"); + return StatusCode::FAILURE; + } else { + signalCollection.release(); } + } - out_coll->push_back(p_rdo); - } // <= while + return StatusCode::SUCCESS; } -} // namespace Overlay - - -//================================================================ -template<class Collection> -void IDC_OverlayBase::mergeCollections(Collection *mc_coll, - Collection *data_coll, - Collection *out_coll) -{ - DataVector<typename Collection::base_value_type> data; - data_coll->swap(data); - - DataVector<typename Collection::base_value_type> mc; - mc_coll->swap(mc); + // Get all the hashes for the background container + const std::vector<IdentifierHash> bkgHashes = bkgContainer->GetAllCurrentHashes(); - //################################################################ - // Merge by copying ptrs from data and mc to mc_coll - - typename Collection::size_type idata = 0; - typename Collection::size_type imc = 0; - - while( (idata < data.size()) || (imc < mc.size())) { - - // The RDO that goes to the output at the end of this step. - typename Collection::base_value_type *p_rdo(0); - - if(idata == data.size()) { - // just copy the remaining MC inputs - mc.swapElement(imc++, 0, p_rdo); - } - else if(imc == mc.size()) { - //just copy the remaining data digits - data.swapElement(idata++, 0, p_rdo); - } - else { - // Need to decide which one goes first. - // See comments in TRTDigitization.cxx about the assumption that id1<id2 <=> hash1<hash2 - if( data[idata]->identify() < mc[imc]->identify() ) { - data.swapElement(idata++, 0, p_rdo); + // The MC signal container should typically be smaller than bkgContainer, + // because the latter contains all the noise, minimum bias and pile up. + // Thus we firstly iterate over signal hashes and store them in a map. + std::map<IdentifierHash, bool> overlapMap; + for (const IdentifierHash &hashId : signalHashes) { + overlapMap.emplace(hashId, false); + } + + // Now loop through the background hashes and copy unique ones over + for (const IdentifierHash &hashId : bkgHashes) { + auto search = overlapMap.find(hashId); + if (search == overlapMap.end()) { + // Copy the background collection + std::unique_ptr<Collection> bkgCollection = Overlay::copyCollection(hashId, bkgContainer->indexFindPtr(hashId)); + + if (outputContainer->addCollection(bkgCollection.get(), hashId).isFailure()) { + ATH_MSG_ERROR("Adding background Collection with hashId " << hashId << " failed"); + return StatusCode::FAILURE; + } else { + bkgCollection.release(); } - else if(mc[imc]->identify() < data[idata]->identify()) { - mc.swapElement(imc++, 0, p_rdo); + } else { + // Flip the overlap flag + search->second = true; + } + } + + // Finally loop through the map and process the signal and overlay if + // necessary + for (const auto &[hashId, overlap] : overlapMap) { + // Copy the signal collection + std::unique_ptr<Collection> signalCollection = Overlay::copyCollection(hashId, signalContainer->indexFindPtr(hashId)); + + if (overlap) { // Do overlay + // Create the output collection, only works for Inner Detector + auto outputCollection = std::make_unique<Collection>(hashId); + outputCollection->setIdentifier(signalCollection->identify()); + // Copy the background collection + std::unique_ptr<Collection> bkgCollection = Overlay::copyCollection(hashId, bkgContainer->indexFindPtr(hashId)); + + // Merge collections + Overlay::mergeCollections(bkgCollection.get(), signalCollection.get(), outputCollection.get(), this); + + if (outputContainer->addCollection(outputCollection.get(), hashId).isFailure()) { + ATH_MSG_ERROR("Adding overlaid Collection with hashId " << hashId << " failed"); + return StatusCode::FAILURE; + } else { + outputCollection.release(); } - else { - // The hits are on the same channel. - typename Collection::base_value_type *p2(0); - data.swapElement(idata++, 0, p2); - mc.swapElement(imc++, 0, p_rdo); - Overlay::mergeChannelData(*p_rdo, *p2, this); - delete p2; + } else { // Only write signal out + if (outputContainer->addCollection(signalCollection.get(), hashId).isFailure()) { + ATH_MSG_ERROR("Adding signal Collection with hashId " << hashId << " failed"); + return StatusCode::FAILURE; + } else { + signalCollection.release(); } } + } - out_coll->push_back(p_rdo); - } // <= while + return StatusCode::SUCCESS; } - diff --git a/Event/EventOverlay/IDC_OverlayBase/IDC_OverlayBase/IDC_OverlayCommon.h b/Event/EventOverlay/IDC_OverlayBase/IDC_OverlayBase/IDC_OverlayCommon.h index 25079244bb2e0279ac591958bb0df2401bb2e200..f2913969b8808e50df5d5b8a96aaf01966c45a7f 100644 --- a/Event/EventOverlay/IDC_OverlayBase/IDC_OverlayBase/IDC_OverlayCommon.h +++ b/Event/EventOverlay/IDC_OverlayBase/IDC_OverlayBase/IDC_OverlayCommon.h @@ -2,49 +2,46 @@ Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ -// Dear emacs, this is -*-c++-*- +// Dear emacs, this is -*-c++-*- /** * @file - * + * * Overlaying of Identifiable Containers. Functions common to the * single-hit-per-readout-channel-in-an-event case and the * possible-multiple-hits-on-a-channel case are declared in this file. * + * @author Tadej Novak * @author Andrei Gaponenko <agaponenko@lbl.gov>, 2009 - * */ #ifndef IDC_OVERLAYCOMMON_H #define IDC_OVERLAYCOMMON_H -#include <string> - -#include "OverlayAlgBase/OverlayAlgBase.h" - -class IDC_OverlayBase; - -namespace Overlay { +#include <memory> - template<class Collection> void copyCollection(const Collection *input_coll, Collection *copy_coll); +#include <Identifier/IdentifierHash.h> - //Forward decl for compiling ... - template<class Collection> void mergeCollectionsNew(Collection*, Collection*, Collection*, IDC_OverlayBase*); +namespace Overlay +{ - /** - * Transfers all collection from the second argument the first merging where necessary. - * After this call the "data" container contains all information, and the "mc" - * container is empty. - */ - template<class IDC_Container, class OvlAlg> void overlayContainer(const IDC_Container* data, const IDC_Container* mc, IDC_Container* out, OvlAlg *parent); +template <class Collection> +std::unique_ptr<Collection> copyCollection(const IdentifierHash &hashId, + const Collection *collection); - template<class IDC_Container, class OvlAlg> void overlayContainerNew(const IDC_Container* dataContainer, const IDC_Container* mcContainer, IDC_Container* outputContainer, OvlAlg *parent); +template<class Datum, class Alg> +void mergeChannelData(Datum &baseDatum, + const Datum &additionalDatum, + Alg *algorithm); - /** Diagnostic output */ - template<class IDC_Container> std::string shortPrint(const IDC_Container *container, unsigned numprint = 25); +template <class Collection, class Alg> +void mergeCollections(Collection *bkgCollection, + Collection *signalCollection, + Collection *outputCollection, + Alg *algorithm); -} +} // namespace Overlay #include "IDC_OverlayBase/IDC_OverlayCommon.icc" -#endif/*IDC_OVERLAYCOMMON_H*/ +#endif diff --git a/Event/EventOverlay/IDC_OverlayBase/IDC_OverlayBase/IDC_OverlayCommon.icc b/Event/EventOverlay/IDC_OverlayBase/IDC_OverlayBase/IDC_OverlayCommon.icc index 8459c06beb843ea4ea2b5c1169ecf190f9ab4e77..5aaf601297fbe2ca3f6bbcacd8ea4b4511664e3a 100644 --- a/Event/EventOverlay/IDC_OverlayBase/IDC_OverlayBase/IDC_OverlayCommon.icc +++ b/Event/EventOverlay/IDC_OverlayBase/IDC_OverlayBase/IDC_OverlayCommon.icc @@ -1,194 +1,74 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ -// Generic overlaying code for Identifiable Containers. -// -// Andrei Gaponenko <agaponenko@lbl.gov>, 2006-2009 +/// Generic overlaying code for Identifiable Containers. -#include "Identifier/Identifier.h" -#include "Identifier/IdentifierHash.h" +/// @author Tadej Novak +/// @author Andrei Gaponenko <agaponenko@lbl.gov>, 2006-2009 -#include "StoreGate/ReadHandle.h" -#include "StoreGate/WriteHandle.h" - +#include <string> +#include <typeinfo> -#include "AthenaBaseComps/AthMsgStreamMacros.h" -#include "AthContainers/DataVector.h" +namespace Overlay +{ -#include <sstream> +template <class Datum, class Alg> +void mergeChannelData(Datum &/* baseDatum */, + const Datum &/* additionalDatum */, + Alg */* algorithm */) +{ + throw std::logic_error("Merging of data on the same channel is not implemented for " + + std::string(typeid(Datum).name())); +} -namespace Overlay { - - template<class IDC_Container> - std::string shortPrint(const IDC_Container *container, unsigned maxprint) { - std::ostringstream os; - if(container) { - for(unsigned i=0; i<maxprint; i++) { - typename IDC_Container::const_iterator p = container->indexFind(i); - if(p != container->end()) { - os<<" "<< (*p)->size(); - } - else { - os<<" *"; - } - } - } - else { - os<<"(NULL)"; - } - return os.str(); - } - - - //================================================================ - template<class IDC_Container, class OvlAlg> - void overlayContainerNew(const IDC_Container *dataContainer, - const IDC_Container *mcContainer, - IDC_Container *outputContainer, - OvlAlg *parent) - { - typedef typename IDC_Container::base_value_type Collection; - std::cout<<"start overlayContainer"<<std::endl; - if(parent->msgLvl(MSG::DEBUG)) { parent->msg(MSG::DEBUG)<<"overlayContainerNew<>() begin"<<endmsg; } - - //There are some use cases where this is empty - if(dataContainer != nullptr){ - /** Add data from the data container to the output one */ - typename IDC_Container::const_iterator p_data = dataContainer->begin(); - typename IDC_Container::const_iterator p_data_end = dataContainer->end(); - - for(; p_data != p_data_end; ++p_data) { - IdentifierHash hashId = p_data.hashId(); - auto coll_data = std::make_unique<Collection>(hashId); - copyCollection(*p_data,coll_data.get()); - - if ( outputContainer->addCollection(coll_data.release(), p_data.hashId()).isFailure() ) { - parent->msg(MSG::WARNING) <<"add data Collection failed for output "<< p_data.hashId ()<<endmsg; //" collectionNo "<<collectionNo<<endmsg; - } - } - } - - /** Add data from the ovl container to the output one */ - typename IDC_Container::const_iterator p_ovl = mcContainer->begin(); - typename IDC_Container::const_iterator p_ovl_end = mcContainer->end(); - - for(; p_ovl != p_ovl_end; ++p_ovl) { - - IdentifierHash coll_id = p_ovl.hashId();//(*p_ovl)->identify(); - auto coll_ovl = std::make_unique<Collection>(coll_id); - copyCollection(*p_ovl,coll_ovl.get()); - /** The newly created stuff will go to the output EventStore SG */ - auto coll_out = std::make_unique<Collection>(coll_id); - coll_out->setIdentifier((*p_ovl)->identify()); - - /** Look for the same ID in the main StoreGate EventStore */ - typename IDC_Container::const_iterator q = outputContainer->indexFind( coll_id ); - if( q != outputContainer->end() ) { - /**Need to merge the collections - Retrieve q */ - std::unique_ptr <Collection> coll_data ((Collection *) *q); - mergeCollectionsNew(coll_data.get(),coll_ovl.get(),coll_out.get(),parent); - - outputContainer->removeCollection(p_ovl.hashId()); - if (outputContainer->addCollection(coll_out.release(), p_ovl.hashId()).isFailure() ) { - parent->msg(MSG::WARNING) << "overlay addCollection failed " << endmsg; - } - } - else { - /** Copy the complete collection from ovl to output, - hopefully preserving the "most derived" type of its raw data */ - if ( outputContainer->addCollection(coll_ovl.release(), coll_id).isFailure() ) { - parent->msg(MSG::WARNING) << "add mc Collection failed " << endmsg; - } - } - } +template <class Collection, class Alg> +void mergeCollections(Collection *bkgCollection, + Collection *signalCollection, + Collection *outputCollection, + Alg *algorithm) +{ + if (bkgCollection->identify() != signalCollection->identify()) { + throw std::runtime_error("mergeCollections<>(): collection Id mismatch"); } - - //================================================================ - template<class IDC_Container, class OvlAlg> - void overlayContainer(const IDC_Container *dataContainer, - const IDC_Container *mcContainer, - IDC_Container *outputContainer, - OvlAlg *parent) - { - typedef typename IDC_Container::base_value_type Collection; - typedef typename Collection::base_value_type Datum; - - if(parent->msgLvl(MSG::DEBUG)) { parent->msg(MSG::DEBUG)<<"overlayContainer<>() begin"<<endmsg; } - - // The MC signal container should typically be smaller than - // dataContainer, because the latter contains all the noise, - // min bias and pile up. Thus we firstly copy data collection to the - // output and then merge with MC inputs. - - /** Add data from the data container to the output one */ - typename IDC_Container::const_iterator p_data = dataContainer->begin(); - typename IDC_Container::const_iterator p_data_end = dataContainer->end(); - - for(; p_data != p_data_end; ++p_data) { - IdentifierHash hashId = p_data.hashId(); - Identifier ident = p_data->identify(); - auto coll_data = std::make_unique<Collection>(ident, hashId); - - typename Collection::const_iterator firstData = p_data->begin(); - typename Collection::const_iterator lastData = p_data->end(); - for (; firstData != lastData; ++firstData) { - Datum* newData = new Datum (*(dynamic_cast<const Datum*>(*firstData))); - coll_data->push_back(newData); - } - - if ( outputContainer->addCollection(coll_data.release(), p_data.hashId()).isFailure() ) { - parent->msg(MSG::WARNING) <<"add data Collection failed for output "<< p_data.hashId()<<endmsg; + typedef typename Collection::base_value_type Datum; + typedef typename Collection::size_type size_type; + + // Merge by copying ptrs from background and signal to output collection + size_type ibkg = 0, isig = 0; + while ((ibkg < bkgCollection->size()) || (isig < signalCollection->size())) { + // The Datum that goes to the output at the end of this step. + Datum *tmp{}; + + if (isig == signalCollection->size()) { + // just copy the remaining background digits + bkgCollection->swapElement(ibkg++, nullptr, tmp); + } else if (ibkg == bkgCollection->size()) { + // just copy the remaining signal digits + signalCollection->swapElement(isig++, nullptr, tmp); + } else { + // Need to decide which one goes first. + // See comments in TRTDigitization.cxx about the assumption that id1<id2 + // <=> hash1<hash2 + if (signalCollection->at(isig)->identify() < bkgCollection->at(ibkg)->identify()) { + signalCollection->swapElement(isig++, nullptr, tmp); + } else if (bkgCollection->at(ibkg)->identify() < signalCollection->at(isig)->identify()) { + bkgCollection->swapElement(ibkg++, nullptr, tmp); + } else { + // The hits are on the same channel. + Datum *tmpBkg{}; + bkgCollection->swapElement(ibkg++, nullptr, tmpBkg); + signalCollection->swapElement(isig++, nullptr, tmp); + Overlay::mergeChannelData(*tmp, *tmpBkg, algorithm); + delete tmpBkg; } - } - - /** Add data from the ovl container to the output one */ - typename IDC_Container::const_iterator p_ovl = mcContainer->begin(); - typename IDC_Container::const_iterator p_ovl_end = mcContainer->end(); - - for(; p_ovl != p_ovl_end; ++p_ovl) { - IdentifierHash coll_id = p_ovl.hashId();//(*p_ovl)->identify(); - Identifier elemId = p_ovl->identify(); - auto coll_ovl = std::make_unique<Collection>(elemId, coll_id); - - typename Collection::const_iterator firstData = p_ovl->begin(); - typename Collection::const_iterator lastData = p_ovl->end(); - for (; firstData != lastData; ++firstData) { - Datum* newData = new Datum (*(dynamic_cast<const Datum*>(*firstData))); - coll_ovl->push_back(newData); - } - - /** The newly created stuff will go to the output EventStore SG */ - auto coll_out = std::make_unique<Collection>(elemId, coll_id); - - /** Look for the same ID in the main StoreGate EventStore */ - typename IDC_Container::const_iterator q = outputContainer->indexFind(coll_id); - if( q != outputContainer->end() ) { - /** Need to merge the collections - Retrieve q */ - - std::unique_ptr <Collection> coll_data ((Collection *) *q); - parent->mergeCollections(coll_data.get(),coll_ovl.get(),coll_out.get()); + } - outputContainer->removeCollection(p_ovl.hashId()); - if (outputContainer->addCollection(coll_out.release(), p_ovl.hashId()).isFailure() ) { - parent->msg(MSG::WARNING) << "overlay addCollection failed " << endmsg; - } - } - else { - /** Copy the complete collection from ovl to output, - hopefully preserving the "most derived" type of its raw data */ - if ( outputContainer->addCollection(coll_ovl.release(), coll_id).isFailure() ) { - parent->msg(MSG::WARNING) << "add mc Collection failed " << endmsg; - } - } - } - } + outputCollection->push_back(tmp); + } // <= while +} } // namespace Overlay - -//================================================================ diff --git a/Event/EventOverlay/IDC_OverlayBase/IDC_OverlayBase/IDC_OverlayHelpers.h b/Event/EventOverlay/IDC_OverlayBase/IDC_OverlayBase/IDC_OverlayHelpers.h new file mode 100644 index 0000000000000000000000000000000000000000..81023c354b8be3d6410c32b93c22a58e31822ae1 --- /dev/null +++ b/Event/EventOverlay/IDC_OverlayBase/IDC_OverlayBase/IDC_OverlayHelpers.h @@ -0,0 +1,25 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +/// @brief Helpers for overlaying Identifiable Containers +/// @author Tadej Novak + +#ifndef IDC_OVERLAYHELPERS_H +#define IDC_OVERLAYHELPERS_H + +#include <string> + +namespace Overlay +{ + +/// @brief Diagnostic output of Identifiable Containers +template <class IDC_Container> +std::string debugPrint(const IDC_Container *container, + unsigned numprint = 25); + +} // namespace Overlay + +#include "IDC_OverlayHelpers.icc" + +#endif diff --git a/Event/EventOverlay/IDC_OverlayBase/IDC_OverlayBase/IDC_OverlayHelpers.icc b/Event/EventOverlay/IDC_OverlayBase/IDC_OverlayBase/IDC_OverlayHelpers.icc new file mode 100644 index 0000000000000000000000000000000000000000..0c2052c966b47df87e9f2c2d14afcdffa2d2efa7 --- /dev/null +++ b/Event/EventOverlay/IDC_OverlayBase/IDC_OverlayBase/IDC_OverlayHelpers.icc @@ -0,0 +1,33 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +/// Helpers for overlaying Identifiable Containers +/// @author Tadej Novak + +#include <sstream> + +namespace Overlay +{ + +template <class IDC_Container> +std::string debugPrint(const IDC_Container *container, + unsigned maxprint) +{ + std::ostringstream os; + if (container) { + for (unsigned i = 0; i < maxprint; i++) { + typename IDC_Container::const_iterator p = container->indexFind(i); + if (p != container->end()) { + os << " " << (*p)->size(); + } else { + os << " *"; + } + } + } else { + os << "(NULL)"; + } + return os.str(); +} + +} // namespace Overlay diff --git a/Event/xAOD/xAODEventFormat/xAODEventFormat/EventFormat.h b/Event/xAOD/xAODEventFormat/xAODEventFormat/EventFormat.h index e30904bb8080b13c4b3b51b30e00b4b2886c6599..c1e91f909c82ee2fb7e4081eb0212ee1af8c5100 100644 --- a/Event/xAOD/xAODEventFormat/xAODEventFormat/EventFormat.h +++ b/Event/xAOD/xAODEventFormat/xAODEventFormat/EventFormat.h @@ -19,5 +19,11 @@ namespace xAOD { // Declare a CLID for the class: #include "xAODCore/CLASS_DEF.h" CLASS_DEF( xAOD::EventFormat, 243004407, 1 ) +#ifndef XAOD_STANDALONE +#include "AthenaKernel/MetaCont.h" +CLASS_DEF( MetaCont<xAOD::EventFormat> , 35480469 , 1 ) +#include "SGTools/BaseInfo.h" +SG_BASE( MetaCont<xAOD::EventFormat>, MetaContBase ); +#endif // not XAOD_STANDALONE #endif // XAODEVENTFORMAT_EVENTFORMAT_H diff --git a/Event/xAOD/xAODEventFormatCnv/src/EventFormatMetaDataTool.cxx b/Event/xAOD/xAODEventFormatCnv/src/EventFormatMetaDataTool.cxx index d40cc5668953bcda0b17a21ea866981954129580..d2e96bc3219084e89d502a8b7688ede00ffcb570 100644 --- a/Event/xAOD/xAODEventFormatCnv/src/EventFormatMetaDataTool.cxx +++ b/Event/xAOD/xAODEventFormatCnv/src/EventFormatMetaDataTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // $Id: EventFormatMetaDataTool.cxx 651874 2015-03-05 14:16:19Z krasznaa $ @@ -8,8 +8,6 @@ #include <stdexcept> // Gaudi/Athena include(s): -#include "GaudiKernel/IIncidentSvc.h" -#include "GaudiKernel/Incident.h" #include "AthenaKernel/errorcheck.h" // Local include(s): @@ -23,132 +21,25 @@ namespace xAODMaker { EventFormatMetaDataTool::EventFormatMetaDataTool( const std::string& type, const std::string& name, const IInterface* parent ) - : AthAlgTool( type, name, parent ), - m_inputMetaStore( "StoreGateSvc/InputMetaDataStore", name ), - m_outputMetaStore( "StoreGateSvc/MetaDataStore", name ), - m_format() { - - declareProperty( "InputMetaStore", m_inputMetaStore ); - declareProperty( "OutputMetaStore", m_outputMetaStore ); - - declareProperty( "InputKey", m_inputKey = "EventFormat" ); - declareProperty( "OutputKey", m_outputKey = "EventFormat" ); - - declareInterface< ::IMetaDataTool >( this ); - //declareInterface< ::IIncidentListener >( this ); + : GenericMetadataToolNoAux <xAOD::EventFormat>(type,name,parent) + { } StatusCode EventFormatMetaDataTool::initialize() { - // Greet the user: - ATH_MSG_DEBUG( "Initialising - Package version: " << PACKAGE_VERSION ); - ATH_MSG_DEBUG( " InputMetaStore = " << m_inputMetaStore ); - ATH_MSG_DEBUG( " OutputMetaStore = " << m_outputMetaStore ); - ATH_MSG_DEBUG( " InputKey = " << m_inputKey ); - ATH_MSG_DEBUG( " OutputKey = " << m_outputKey ); - - // Connect to the metadata stores: - ATH_CHECK( m_inputMetaStore.retrieve() ); - ATH_CHECK( m_outputMetaStore.retrieve() ); - - // Make the tool listen to certain incidents: - /* - ServiceHandle< ::IIncidentSvc > incSvc( "IncidentSvc", name() ); - ATH_CHECK( incSvc.retrieve() ); - incSvc->addListener( this, IncidentType::BeginInputFile ); - incSvc->addListener( this, METADATASTOP, 70 ); - */ - - // Reset the internal object if it exists: - m_format.reset(); - // Return gracefully: return StatusCode::SUCCESS; } - StatusCode EventFormatMetaDataTool::beginInputFile() - { - StatusCode sc = collectMetaData(); - if( sc.isFailure() ) { - REPORT_ERROR( sc ) - << "Failed to collect metadata from the input file"; - throw std::runtime_error( "Failed to collect trigger configuration " - "metadata from the input" ); - } - return StatusCode::SUCCESS; - } - - - StatusCode EventFormatMetaDataTool::endInputFile() - { - return StatusCode::SUCCESS; - } - - - StatusCode EventFormatMetaDataTool::metaDataStop() - { - StatusCode sc = writeMetaData(); - if( sc.isFailure() ) { - REPORT_ERROR( sc ) - << "Failed to write metadata to the output store"; - throw std::runtime_error( "Failed write xAOD::EventFormat " - "to the output" ); - } - return StatusCode::SUCCESS; - } - -/* - void EventFormatMetaDataTool::handle( const Incident& inc ) { - - // Some debugging information: - ATH_MSG_DEBUG( "Received incident: " << inc.type() ); - - if( inc.type() == IncidentType::BeginInputFile ) { - if( collectMetaData().isFailure() ) { - REPORT_ERROR( StatusCode::FAILURE ) - << "Failed to collect metadata from the input file"; - throw std::runtime_error( "Failed to collect trigger configuration " - "metadata from the input" ); - } - } else if( inc.type() == METADATASTOP ) { - if( writeMetaData().isFailure() ) { - REPORT_ERROR( StatusCode::FAILURE ) - << "Failed to write metadata to the output store"; - throw std::runtime_error( "Failed write xAOD::EventFormat " - "to the output" ); - } - } else { - ATH_MSG_WARNING( "Unknown incident type (" << inc.type() << ") " - << "received" ); - } - - return; - } -*/ - - StatusCode EventFormatMetaDataTool::collectMetaData() { - - // If the input file doesn't have any event format metadata, - // then finish right away: - if( ! m_inputMetaStore->contains< xAOD::EventFormat >( m_inputKey ) ) { - return StatusCode::SUCCESS; - } - - // Retrieve the input container: - const xAOD::EventFormat* input = 0; - ATH_CHECK( m_inputMetaStore->retrieve( input, m_inputKey ) ); - - // Create an output container if it doesn't exist yet: - if( ! m_format.get() ) { - ATH_MSG_DEBUG( "Creating output container" ); - m_format.reset( new xAOD::EventFormat() ); - } + StatusCode EventFormatMetaDataTool::updateContainer( + xAOD::EventFormat* output, + const xAOD::EventFormat* input ) { // Merge the new object into the output one: for( auto itr = input->begin(); itr != input->end(); ++itr ) { - if( ! m_format->exists( itr->second.hash() ) ) { - m_format->add( itr->second ); + if( ! output->exists( itr->second.hash() ) ) { + output->add( itr->second ); } } @@ -156,25 +47,4 @@ namespace xAODMaker { return StatusCode::SUCCESS; } - StatusCode EventFormatMetaDataTool::writeMetaData() { - - // The output may already have such an object, coming from some - // other source. Like the event format service. - if( m_outputMetaStore->contains< xAOD::EventFormat >( m_outputKey ) ) { - ATH_MSG_DEBUG( "xAOD::EventFormat object already in the output" ); - return StatusCode::SUCCESS; - } - - // Record the event format metadata, if any was found in the - // processed input files. - if( m_format.get() ) { - ATH_MSG_DEBUG( "Recording event format metadata" ); - ATH_CHECK( m_outputMetaStore->record( std::move( m_format ), - m_outputKey ) ); - } - - // Return gracefully: - return StatusCode::SUCCESS; - } - } // namespace xAODMaker diff --git a/Event/xAOD/xAODEventFormatCnv/src/EventFormatMetaDataTool.h b/Event/xAOD/xAODEventFormatCnv/src/EventFormatMetaDataTool.h index 33875ae4af58750780350060fcffdfa6288de596..ca0afb8e779d6c52a8d9eebcee98b5312f7ef419 100644 --- a/Event/xAOD/xAODEventFormatCnv/src/EventFormatMetaDataTool.h +++ b/Event/xAOD/xAODEventFormatCnv/src/EventFormatMetaDataTool.h @@ -1,7 +1,5 @@ -// Dear emacs, this is -*- c++ -*- - /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // $Id: EventFormatMetaDataTool.h 651874 2015-03-05 14:16:19Z krasznaa $ @@ -13,10 +11,7 @@ #include <memory> // Gaudi/Athena include(s): -#include "GaudiKernel/ServiceHandle.h" -#include "AthenaKernel/IMetaDataTool.h" -#include "AthenaBaseComps/AthAlgTool.h" -#include "StoreGate/StoreGateSvc.h" +#include "AthenaKernel/GenericMetadataToolNoAux.h" // EDM include(s): #include "xAODEventFormat/EventFormat.h" @@ -35,8 +30,7 @@ namespace xAODMaker { /// $Revision: 651874 $ /// $Date: 2015-03-05 15:16:19 +0100 (Thu, 05 Mar 2015) $ /// - class EventFormatMetaDataTool : public virtual ::IMetaDataTool, - public ::AthAlgTool { + class EventFormatMetaDataTool : public GenericMetadataToolNoAux <xAOD::EventFormat> { public: /// Regular AlgTool constructor @@ -46,44 +40,11 @@ namespace xAODMaker { /// Function initialising the tool virtual StatusCode initialize(); - /// Function collecting the metadata from a new input file - virtual StatusCode beginInputFile(const SG::SourceID&) {return beginInputFile();} - - /// Function collecting the metadata from a new input file - virtual StatusCode endInputFile(const SG::SourceID&) {return endInputFile();} - - /// Function writing the collected metadata to the output - virtual StatusCode metaDataStop(const SG::SourceID&) {return metaDataStop();} - - /// Function called when a new input file is opened - virtual StatusCode beginInputFile(); - - /// Function called when the currently open input file got completely - /// processed - virtual StatusCode endInputFile(); - - /// Function called when the tool should write out its metadata - virtual StatusCode metaDataStop(); - private: - /// Function collecting the event format metadata from the input file - StatusCode collectMetaData(); - /// Function writing out the collected metadata - StatusCode writeMetaData(); - - /// Connection to the input metadata store - ServiceHandle< ::StoreGateSvc > m_inputMetaStore; - /// Connection to the output metadata store - ServiceHandle< ::StoreGateSvc > m_outputMetaStore; - - /// The key of the trigger menu in the input file - std::string m_inputKey; - /// The key of the trigger menu for the output file - std::string m_outputKey; - - /// The merged event format object - std::unique_ptr< xAOD::EventFormat > m_format; - + /// Helper class to update a container with information from another one + virtual StatusCode updateContainer(xAOD::EventFormat* contToUpdate, + const xAOD::EventFormat* otherCont ); + }; // class EventFormatMetaDataTool } // namespace xAODMaker diff --git a/Event/xAOD/xAODEventInfo/Root/EventInfo_v1.cxx b/Event/xAOD/xAODEventInfo/Root/EventInfo_v1.cxx index d60fe19eeb18e836bc4e0736a2b97def2491be67..dcf950f390e2c2dcf997da62d6b088c2f63875e0 100644 --- a/Event/xAOD/xAODEventInfo/Root/EventInfo_v1.cxx +++ b/Event/xAOD/xAODEventInfo/Root/EventInfo_v1.cxx @@ -391,6 +391,9 @@ namespace xAOD { } else if( m_type == HaloGas ) { static const std::string name = "HaloGas"; return name; + } else if( m_type == HighPtMinimumBias ) { + static const std::string name = "HighPtMinimumBias"; + return name; } else if( m_type == ZeroBias ) { static const std::string name = "ZeroBias"; return name; @@ -653,14 +656,20 @@ namespace xAOD { bool EventInfo_v1::updateEventFlagBit( EventFlagSubDet subDet, size_t bit) const { - // Get the accessor: - const SG::AtomicDecorator< uint32_t >* acc = eventFlagsAccessorsV1( subDet ); - if( ! acc ) { + // Check if the bit makes sense: + if( bit >= EF_ERROR_SHIFT ) { return false; } - // Check if the bit makes sense: - if( bit >= EF_ERROR_SHIFT ) { + // Don't try to write if the requested flag is already set. + uint32_t existingFlags = (*eventFlagsConstAccessorsV1( subDet ))( *this ); + if (existingFlags & (1u << bit)) { + return true; + } + + // Get the accessor: + const SG::AtomicDecorator< uint32_t >* acc = eventFlagsAccessorsV1( subDet ); + if( ! acc ) { return false; } @@ -692,8 +701,16 @@ namespace xAOD { } bool EventInfo_v1::updateEventFlags( const EventFlagSubDet subDet, - const uint32_t flags) const + const uint32_t flags_in) const { + uint32_t flags = flags_in & EF_BITS; + + // Don't try to write if all requested flags are already set. + uint32_t existingFlags = (*eventFlagsConstAccessorsV1( subDet ))( *this ); + if ((existingFlags | flags) == existingFlags) { + return true; + } + // Get the accessor: const SG::AtomicDecorator< uint32_t >* acc = eventFlagsAccessorsV1( subDet ); if( ! acc ) { @@ -750,6 +767,16 @@ namespace xAOD { bool EventInfo_v1::updateErrorState( const EventFlagSubDet subDet, const EventFlagErrorState state ) const { + // Check its value: + if( ( state != NotSet ) && ( state != Warning ) && ( state != Error ) ) { + return false; + } + + // Return without trying to write if the desired state is + // already set. + if (errorState (subDet) == state) { + return true; + } // Get the accessor: const SG::AtomicDecorator< uint32_t >* acc = eventFlagsAccessorsV1( subDet ); @@ -757,11 +784,6 @@ namespace xAOD { return false; } - // Check its value: - if( ( state != NotSet ) && ( state != Warning ) && ( state != Error ) ) { - return false; - } - // Construct the new value: std::atomic<uint32_t>& a = (*acc)(*this); uint32_t orig = a; diff --git a/Event/xAOD/xAODEventInfo/xAODEventInfo/versions/EventInfo_v1.h b/Event/xAOD/xAODEventInfo/xAODEventInfo/versions/EventInfo_v1.h index 918c44d7b0d95a20fbe0c6dbc84c15bebfdef418..fde9e62af7e9dbe7a554360e15b78f3fc6cf2721 100644 --- a/Event/xAOD/xAODEventInfo/xAODEventInfo/versions/EventInfo_v1.h +++ b/Event/xAOD/xAODEventInfo/xAODEventInfo/versions/EventInfo_v1.h @@ -249,10 +249,11 @@ namespace xAOD { enum PileUpType { Unknown = 99, ///< Type not known/specified Signal = 0, ///< The signal event - MinimumBias = 1, ///< Minimum bias pileup event + MinimumBias = 1, ///< (Low pT) Minimum bias pileup event Cavern = 2, ///< Cavern background pileup event HaloGas = 3, ///< Halo-gas non-collision background - ZeroBias = 4, ///< Zero bias pileup event + HighPtMinimumBias = 4, ///< High pT Minimum bias pileup event + ZeroBias = 5, ///< Zero bias pileup event PileUp_NTYPES }; // enum PileUpType @@ -411,7 +412,7 @@ namespace xAOD { /// Turn on a set of event flags for one particular sub-detector. /// This does a logical OR of the exising flags and FLAGS. bool updateEventFlags( const EventFlagSubDet subDet, - const uint32_t flags ) const; + const uint32_t flags_in ) const; /// Update the error state for one particular sub-detector. /// The error state may only be increased by this method. /// If STATE is less than the current error state, then this method diff --git a/Event/xAOD/xAODEventInfoCnv/src/EventInfoCnvAlg.cxx b/Event/xAOD/xAODEventInfoCnv/src/EventInfoCnvAlg.cxx index 16db2676d824389364fb3b38bd580f5f35bb957f..e3a065da7cf80f14206db009235551dfebb6caa9 100644 --- a/Event/xAOD/xAODEventInfoCnv/src/EventInfoCnvAlg.cxx +++ b/Event/xAOD/xAODEventInfoCnv/src/EventInfoCnvAlg.cxx @@ -135,6 +135,9 @@ namespace xAODMaker { case PileUpTimeEventIndex::HaloGas: type = xAOD::EventInfo::HaloGas; break; + case PileUpTimeEventIndex::HighPtMinimumBias: + type = xAOD::EventInfo::HighPtMinimumBias; + break; case PileUpTimeEventIndex::ZeroBias: type = xAOD::EventInfo::ZeroBias; break; diff --git a/Event/xAOD/xAODEventInfoCnv/src/EventInfoCnvTool.cxx b/Event/xAOD/xAODEventInfoCnv/src/EventInfoCnvTool.cxx index 6a017fd2adf5c9a39fddbf25b740edf37f399ec7..79f8d6e6b25c6722926e2038d2feffa34862f84a 100644 --- a/Event/xAOD/xAODEventInfoCnv/src/EventInfoCnvTool.cxx +++ b/Event/xAOD/xAODEventInfoCnv/src/EventInfoCnvTool.cxx @@ -289,6 +289,9 @@ namespace xAODMaker { case PileUpTimeEventIndex::HaloGas: type = xAOD::EventInfo::HaloGas; break; + case PileUpTimeEventIndex::HighPtMinimumBias: + type = xAOD::EventInfo::HighPtMinimumBias; + break; case PileUpTimeEventIndex::ZeroBias: type = xAOD::EventInfo::ZeroBias; break; diff --git a/Event/xAOD/xAODMetaDataCnv/src/FileMetaDataCreatorTool.h b/Event/xAOD/xAODMetaDataCnv/src/FileMetaDataCreatorTool.h index 1059a9bb4f2b44d867c9fce39fe887b9a30d680c..3cc9ee1e7a54063000f064e577b0f734495fe53f 100644 --- a/Event/xAOD/xAODMetaDataCnv/src/FileMetaDataCreatorTool.h +++ b/Event/xAOD/xAODMetaDataCnv/src/FileMetaDataCreatorTool.h @@ -76,9 +76,6 @@ namespace xAODMaker { /// Function collecting the metadata from a new input file virtual StatusCode endInputFile(const SG::SourceID&) {return StatusCode::SUCCESS;} - /// Function writing the collected metadata to the output - virtual StatusCode metaDataStop(const SG::SourceID&) {return StatusCode::SUCCESS;} - /// @} private: diff --git a/Event/xAOD/xAODMetaDataCnv/xAODMetaDataCnv/FileMetaDataTool.h b/Event/xAOD/xAODMetaDataCnv/xAODMetaDataCnv/FileMetaDataTool.h index a0c1b5b441142cd056b4e3633683bb0dba2b1c3b..8b6af54ccdbc8bd60f888c845f625dd54404062c 100644 --- a/Event/xAOD/xAODMetaDataCnv/xAODMetaDataCnv/FileMetaDataTool.h +++ b/Event/xAOD/xAODMetaDataCnv/xAODMetaDataCnv/FileMetaDataTool.h @@ -76,9 +76,6 @@ namespace xAODMaker { /// Function collecting the metadata from a new input file virtual StatusCode endInputFile(const SG::SourceID&) {return endInputFile();} - /// Function writing the collected metadata to the output - virtual StatusCode metaDataStop(const SG::SourceID&) {return metaDataStop();} - /// @} private: diff --git a/Event/xAOD/xAODMuon/Root/MuonAuxContainer_v4.cxx b/Event/xAOD/xAODMuon/Root/MuonAuxContainer_v4.cxx index 8f091ea8f91504af68b8dbc08419c46e82308624..979f5b1c49720cf7b42c0e1c98f3c3d0b26d3830 100644 --- a/Event/xAOD/xAODMuon/Root/MuonAuxContainer_v4.cxx +++ b/Event/xAOD/xAODMuon/Root/MuonAuxContainer_v4.cxx @@ -114,8 +114,8 @@ namespace xAOD { AUX_VARIABLE( etaLayer3TGCHoles ); AUX_VARIABLE( etaLayer4TGCHoles ); - AUX_VARIABLE( cscEtaHits ); - AUX_VARIABLE( cscUnspoiledEtaHits ); + AUX_VARIABLE( cscEtaHits ); + AUX_VARIABLE( cscUnspoiledEtaHits ); // Isolation AUX_VARIABLE( etcone20 ); diff --git a/Event/xAOD/xAODMuon/Root/MuonAuxContainer_v5.cxx b/Event/xAOD/xAODMuon/Root/MuonAuxContainer_v5.cxx new file mode 100644 index 0000000000000000000000000000000000000000..d06a294f9fb65025b84ce68270ab847e350dad35 --- /dev/null +++ b/Event/xAOD/xAODMuon/Root/MuonAuxContainer_v5.cxx @@ -0,0 +1,183 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +// Local include(s): +#include "xAODMuon/versions/MuonAuxContainer_v5.h" + +namespace xAOD { + + MuonAuxContainer_v5::MuonAuxContainer_v5() + : AuxContainerBase() { + + // iParticle + AUX_VARIABLE( pt ); + AUX_VARIABLE( eta ); + AUX_VARIABLE( phi ); + AUX_VARIABLE(charge); + + + // Muon summary + AUX_VARIABLE( allAuthors ); + AUX_VARIABLE( author ); + AUX_VARIABLE( muonType ); + AUX_VARIABLE( quality ); //quality, passesIDCuts and passesHighPtCuts are packed in here. + + // Energyloss + AUX_VARIABLE( energyLossType ); + + // Muon-specific track summary (the other track summary information is retrieved from the TrackParticle) + AUX_VARIABLE( numberOfPrecisionLayers ); + AUX_VARIABLE( numberOfPrecisionHoleLayers ); + AUX_VARIABLE( numberOfPhiLayers ); + AUX_VARIABLE( numberOfPhiHoleLayers ); + AUX_VARIABLE( numberOfTriggerEtaLayers ); + AUX_VARIABLE( numberOfTriggerEtaHoleLayers ); + AUX_VARIABLE( primarySector ); + AUX_VARIABLE( secondarySector ); + + AUX_VARIABLE( innerSmallHits ); + AUX_VARIABLE( innerLargeHits ); + AUX_VARIABLE( middleSmallHits ); + AUX_VARIABLE( middleLargeHits ); + AUX_VARIABLE( outerSmallHits ); + AUX_VARIABLE( outerLargeHits ); + AUX_VARIABLE( extendedSmallHits ); + AUX_VARIABLE( extendedLargeHits ); + + AUX_VARIABLE( innerSmallHoles ); + AUX_VARIABLE( innerLargeHoles ); + AUX_VARIABLE( middleSmallHoles ); + AUX_VARIABLE( middleLargeHoles ); + AUX_VARIABLE( outerSmallHoles ); + AUX_VARIABLE( outerLargeHoles ); + AUX_VARIABLE( extendedSmallHoles ); + AUX_VARIABLE( extendedLargeHoles ); + + AUX_VARIABLE( phiLayer1Hits ); + AUX_VARIABLE( phiLayer2Hits ); + AUX_VARIABLE( phiLayer3Hits ); + AUX_VARIABLE( phiLayer4Hits ); + + AUX_VARIABLE( etaLayer1Hits ); + AUX_VARIABLE( etaLayer2Hits ); + AUX_VARIABLE( etaLayer3Hits ); + AUX_VARIABLE( etaLayer4Hits ); + + AUX_VARIABLE( phiLayer1Holes ); + AUX_VARIABLE( phiLayer2Holes ); + AUX_VARIABLE( phiLayer3Holes ); + AUX_VARIABLE( phiLayer4Holes ); + + AUX_VARIABLE( etaLayer1Holes ); + AUX_VARIABLE( etaLayer2Holes ); + AUX_VARIABLE( etaLayer3Holes ); + AUX_VARIABLE( etaLayer4Holes ); + + AUX_VARIABLE( phiLayer1RPCHits ); + AUX_VARIABLE( phiLayer2RPCHits ); + AUX_VARIABLE( phiLayer3RPCHits ); + AUX_VARIABLE( phiLayer4RPCHits ); + + AUX_VARIABLE( etaLayer1RPCHits ); + AUX_VARIABLE( etaLayer2RPCHits ); + AUX_VARIABLE( etaLayer3RPCHits ); + AUX_VARIABLE( etaLayer4RPCHits ); + + AUX_VARIABLE( phiLayer1RPCHoles ); + AUX_VARIABLE( phiLayer2RPCHoles ); + AUX_VARIABLE( phiLayer3RPCHoles ); + AUX_VARIABLE( phiLayer4RPCHoles ); + + AUX_VARIABLE( etaLayer1RPCHoles ); + AUX_VARIABLE( etaLayer2RPCHoles ); + AUX_VARIABLE( etaLayer3RPCHoles ); + AUX_VARIABLE( etaLayer4RPCHoles ); + + AUX_VARIABLE( phiLayer1TGCHits ); + AUX_VARIABLE( phiLayer2TGCHits ); + AUX_VARIABLE( phiLayer3TGCHits ); + AUX_VARIABLE( phiLayer4TGCHits ); + + AUX_VARIABLE( etaLayer1TGCHits ); + AUX_VARIABLE( etaLayer2TGCHits ); + AUX_VARIABLE( etaLayer3TGCHits ); + AUX_VARIABLE( etaLayer4TGCHits ); + + AUX_VARIABLE( phiLayer1TGCHoles ); + AUX_VARIABLE( phiLayer2TGCHoles ); + AUX_VARIABLE( phiLayer3TGCHoles ); + AUX_VARIABLE( phiLayer4TGCHoles ); + + AUX_VARIABLE( etaLayer1TGCHoles ); + AUX_VARIABLE( etaLayer2TGCHoles ); + AUX_VARIABLE( etaLayer3TGCHoles ); + AUX_VARIABLE( etaLayer4TGCHoles ); + + // New Small Wheel + // STGC + AUX_VARIABLE( phiLayer1STGCHits ); + AUX_VARIABLE( phiLayer2STGCHits ); + + AUX_VARIABLE( etaLayer1STGCHits ); + AUX_VARIABLE( etaLayer2STGCHits ); + + AUX_VARIABLE( phiLayer1STGCHoles ); + AUX_VARIABLE( phiLayer2STGCHoles ); + + AUX_VARIABLE( etaLayer1STGCHoles ); + AUX_VARIABLE( etaLayer2STGCHoles ); + + // MM + AUX_VARIABLE( MMHits ); + AUX_VARIABLE( MMHoles ); + // Note: there is currently no MuonStationIndex for the two MM layers + // In the future it might be needed to add them in order to have + // separate counters as follows + // AUX_VARIABLE( Layer1MMHits ); + // AUX_VARIABLE( Layer2MMHits ); + // AUX_VARIABLE( Layer1MMHoles ); + // AUX_VARIABLE( Layer2MMHoles ); + + AUX_VARIABLE( cscEtaHits ); + AUX_VARIABLE( cscUnspoiledEtaHits ); + + // Links + AUX_VARIABLE( inDetTrackParticleLink ); + AUX_VARIABLE( muonSpectrometerTrackParticleLink ); + AUX_VARIABLE( extrapolatedMuonSpectrometerTrackParticleLink ); + AUX_VARIABLE( msOnlyExtrapolatedMuonSpectrometerTrackParticleLink ); + AUX_VARIABLE( combinedTrackParticleLink ); + AUX_VARIABLE( clusterLink ); + AUX_VARIABLE( muonSegmentLinks ); + + // Paramdefs + AUX_VARIABLE(spectrometerFieldIntegral ); + AUX_VARIABLE(scatteringCurvatureSignificance); + AUX_VARIABLE(scatteringNeighbourSignificance); + AUX_VARIABLE(momentumBalanceSignificance ); + AUX_VARIABLE(segmentDeltaEta ); + AUX_VARIABLE(segmentDeltaPhi ); + AUX_VARIABLE(segmentChi2OverDoF ); + AUX_VARIABLE(t0 ); + AUX_VARIABLE(beta ); + AUX_VARIABLE(annBarrel ); + AUX_VARIABLE(annEndCap ); + AUX_VARIABLE(innAngle ); + AUX_VARIABLE(midAngle ); + AUX_VARIABLE(msInnerMatchChi2 ); + AUX_VARIABLE(meanDeltaADCCountsMDT ); + AUX_VARIABLE(CaloLRLikelihood ); + AUX_VARIABLE(EnergyLoss ); + AUX_VARIABLE(ParamEnergyLoss ); + AUX_VARIABLE(MeasEnergyLoss ); + AUX_VARIABLE(EnergyLossSigma ); + AUX_VARIABLE(ParamEnergyLossSigmaPlus ); + AUX_VARIABLE(ParamEnergyLossSigmaMinus ); + AUX_VARIABLE(MeasEnergyLossSigma ); + AUX_VARIABLE(msInnerMatchDOF ); + AUX_VARIABLE(msOuterMatchDOF ); + AUX_VARIABLE(CaloMuonIDTag ); + } + +} // namespace xAOD diff --git a/Event/xAOD/xAODMuon/Root/MuonTrackSummaryAccessors_v1.cxx b/Event/xAOD/xAODMuon/Root/MuonTrackSummaryAccessors_v1.cxx index 0da68c9354b5ab6c2e6fddd69accb075a806b42c..0f948ef4395f48a619c2b4f094b5bf6ab41a074d 100644 --- a/Event/xAOD/xAODMuon/Root/MuonTrackSummaryAccessors_v1.cxx +++ b/Event/xAOD/xAODMuon/Root/MuonTrackSummaryAccessors_v1.cxx @@ -1,9 +1,7 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ -// $Id: MuonTrackSummaryAccessors_v1.cxx 796148 2017-02-08 10:18:43Z wleight $ - // System include(s): #include <iostream> @@ -105,12 +103,38 @@ namespace xAOD { DEFINE_ACCESSOR( uint8_t, etaLayer3TGCHoles ); DEFINE_ACCESSOR( uint8_t, etaLayer4TGCHoles ); - DEFINE_ACCESSOR( uint8_t, innerClosePrecisionHits ); - DEFINE_ACCESSOR( uint8_t, middleClosePrecisionHits ); - DEFINE_ACCESSOR( uint8_t, outerClosePrecisionHits ); - DEFINE_ACCESSOR( uint8_t, extendedClosePrecisionHits ); - - DEFINE_ACCESSOR( uint8_t, innerOutBoundsPrecisionHits ); + // New Small Wheel + // STGC + DEFINE_ACCESSOR( uint8_t, phiLayer1STGCHits ); + DEFINE_ACCESSOR( uint8_t, phiLayer2STGCHits ); + + DEFINE_ACCESSOR( uint8_t, etaLayer1STGCHits ); + DEFINE_ACCESSOR( uint8_t, etaLayer2STGCHits ); + + DEFINE_ACCESSOR( uint8_t, phiLayer1STGCHoles ); + DEFINE_ACCESSOR( uint8_t, phiLayer2STGCHoles ); + + DEFINE_ACCESSOR( uint8_t, etaLayer1STGCHoles ); + DEFINE_ACCESSOR( uint8_t, etaLayer2STGCHoles ); + + // MM + DEFINE_ACCESSOR( uint8_t, MMHits ); + DEFINE_ACCESSOR( uint8_t, MMHoles ); + // Note: there is currently no MuonStationIndex for the two MM layers + // In the future it might be needed to add them in order to have + // separate counters as follows + // DEFINE_ACCESSOR( uint8_t, Layer1MMHits ); + // DEFINE_ACCESSOR( uint8_t, Layer2MMHits ); + // DEFINE_ACCESSOR( uint8_t, Layer1MMHoles ); + // DEFINE_ACCESSOR( uint8_t, Layer2MMHoles ); + + + DEFINE_ACCESSOR( uint8_t, innerClosePrecisionHits ); + DEFINE_ACCESSOR( uint8_t, middleClosePrecisionHits ); + DEFINE_ACCESSOR( uint8_t, outerClosePrecisionHits ); + DEFINE_ACCESSOR( uint8_t, extendedClosePrecisionHits ); + + DEFINE_ACCESSOR( uint8_t, innerOutBoundsPrecisionHits ); DEFINE_ACCESSOR( uint8_t, middleOutBoundsPrecisionHits ); DEFINE_ACCESSOR( uint8_t, outerOutBoundsPrecisionHits ); DEFINE_ACCESSOR( uint8_t, extendedOutBoundsPrecisionHits ); diff --git a/Event/xAOD/xAODMuon/xAODMuon/MuonAuxContainer.h b/Event/xAOD/xAODMuon/xAODMuon/MuonAuxContainer.h index d51dcaf08cfdb7d482f797934088dd47174ba9cb..cffc16a574d5ec5b5ccbcadafa2a4dc7bc07110f 100644 --- a/Event/xAOD/xAODMuon/xAODMuon/MuonAuxContainer.h +++ b/Event/xAOD/xAODMuon/xAODMuon/MuonAuxContainer.h @@ -1,12 +1,12 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef XAODMUON_MUONAUXCONTAINER_H #define XAODMUON_MUONAUXCONTAINER_H // Local include(s): -#include "xAODMuon/versions/MuonAuxContainer_v4.h" +#include "xAODMuon/versions/MuonAuxContainer_v5.h" namespace xAOD { /// Definition of the current Muon auxiliary container @@ -16,7 +16,7 @@ namespace xAOD { /// the container type as we get new I/O technologies for these /// objects. /// - typedef MuonAuxContainer_v4 MuonAuxContainer; + typedef MuonAuxContainer_v5 MuonAuxContainer; } // Set up a CLID and StoreGate inheritance for the class: diff --git a/Event/xAOD/xAODMuon/xAODMuon/selection.xml b/Event/xAOD/xAODMuon/xAODMuon/selection.xml index 1eb8ed1308ce3c7177c9cc8aaffc8922fa495e31..e68fa1c1886dbce46492e203fc94bcfbda166a02 100644 --- a/Event/xAOD/xAODMuon/xAODMuon/selection.xml +++ b/Event/xAOD/xAODMuon/xAODMuon/selection.xml @@ -13,6 +13,10 @@ <class name="xAOD::MuonAuxContainer_v4" id="8251F481-EA4C-4852-AE72-BED87E6FD2FB"/> + <!-- MuonAux _v5 dictionaries: --> + <class name="xAOD::MuonAuxContainer_v5" + id="9245FA19-1552-4BBB-8CC3-57224E57A466"/> + <!-- Muon_v1 dictionaries: --> <class name="xAOD::Muon_v1" /> <class name="xAOD::MuonContainer_v1" diff --git a/Event/xAOD/xAODMuon/xAODMuon/versions/MuonAuxContainer_v5.h b/Event/xAOD/xAODMuon/xAODMuon/versions/MuonAuxContainer_v5.h new file mode 100644 index 0000000000000000000000000000000000000000..ff39bcacde305aebbb717f8819df0bb319d857f4 --- /dev/null +++ b/Event/xAOD/xAODMuon/xAODMuon/versions/MuonAuxContainer_v5.h @@ -0,0 +1,226 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef XAODMUON_VERSIONS_MUONAUXCONTAINER_V5_H +#define XAODMUON_VERSIONS_MUONAUXCONTAINER_V5_H + +// System include(s): +#include <stdint.h> +#include <vector> + +// Core include(s): +#include "AthLinks/ElementLink.h" +#include "xAODCore/AuxContainerBase.h" + +// xAOD include(s): +#include "xAODTracking/TrackParticleContainer.h" +#include "xAODCaloEvent/CaloClusterContainer.h" +#include "xAODMuon/MuonSegmentContainer.h" + +namespace xAOD { + + /// Temporary container used until we have I/O for AuxStoreInternal + /// + /// This class is meant to serve as a temporary way to provide an auxiliary + /// store with Athena I/O capabilities for the Muon EDM. Will be exchanged for + /// a generic auxiliary container type (AuxStoreInternal) later on. + /// + /// @author Edward Moyse + /// + class MuonAuxContainer_v5 : public AuxContainerBase { + + public: + /// Default constructor + MuonAuxContainer_v5(); + + private: + /// @name iParticle values + /// @{ + std::vector< float > pt; + std::vector< float > eta; + std::vector< float > phi; + std::vector< float > charge; + /// @} + + /// @name Muon summary information + /// @{ + std::vector< uint16_t > allAuthors; + std::vector< uint16_t> author; + std::vector< uint16_t> muonType; + std::vector< uint8_t> quality; //quality, passesIDCuts and passesHighPtCuts are packed in here. + + /// @} + + /// @name TrackSummary and MuonTrackSummary information + /// @{ + std::vector< uint8_t > numberOfPrecisionLayers; + std::vector< uint8_t > numberOfPrecisionHoleLayers; + std::vector< uint8_t > numberOfPhiLayers; + std::vector< uint8_t > numberOfPhiHoleLayers; + std::vector< uint8_t > numberOfTriggerEtaLayers; + std::vector< uint8_t > numberOfTriggerEtaHoleLayers; + std::vector< uint8_t > primarySector; + std::vector< uint8_t > secondarySector; + + std::vector< uint8_t > innerSmallHits; + std::vector< uint8_t > innerLargeHits; + std::vector< uint8_t > middleSmallHits; + std::vector< uint8_t > middleLargeHits; + std::vector< uint8_t > outerSmallHits; + std::vector< uint8_t > outerLargeHits; + std::vector< uint8_t > extendedSmallHits; + std::vector< uint8_t > extendedLargeHits; + + std::vector< uint8_t > innerSmallHoles; + std::vector< uint8_t > innerLargeHoles; + std::vector< uint8_t > middleSmallHoles; + std::vector< uint8_t > middleLargeHoles; + std::vector< uint8_t > outerSmallHoles; + std::vector< uint8_t > outerLargeHoles; + std::vector< uint8_t > extendedSmallHoles; + std::vector< uint8_t > extendedLargeHoles; + + std::vector< uint8_t > phiLayer1Hits; + std::vector< uint8_t > phiLayer2Hits; + std::vector< uint8_t > phiLayer3Hits; + std::vector< uint8_t > phiLayer4Hits; + + std::vector< uint8_t > etaLayer1Hits; + std::vector< uint8_t > etaLayer2Hits; + std::vector< uint8_t > etaLayer3Hits; + std::vector< uint8_t > etaLayer4Hits; + + std::vector< uint8_t > phiLayer1Holes; + std::vector< uint8_t > phiLayer2Holes; + std::vector< uint8_t > phiLayer3Holes; + std::vector< uint8_t > phiLayer4Holes; + + std::vector< uint8_t > etaLayer1Holes; + std::vector< uint8_t > etaLayer2Holes; + std::vector< uint8_t > etaLayer3Holes; + std::vector< uint8_t > etaLayer4Holes; + + std::vector< uint8_t > phiLayer1RPCHits; + std::vector< uint8_t > phiLayer2RPCHits; + std::vector< uint8_t > phiLayer3RPCHits; + std::vector< uint8_t > phiLayer4RPCHits; + + std::vector< uint8_t > etaLayer1RPCHits; + std::vector< uint8_t > etaLayer2RPCHits; + std::vector< uint8_t > etaLayer3RPCHits; + std::vector< uint8_t > etaLayer4RPCHits; + + std::vector< uint8_t > phiLayer1RPCHoles; + std::vector< uint8_t > phiLayer2RPCHoles; + std::vector< uint8_t > phiLayer3RPCHoles; + std::vector< uint8_t > phiLayer4RPCHoles; + + std::vector< uint8_t > etaLayer1RPCHoles; + std::vector< uint8_t > etaLayer2RPCHoles; + std::vector< uint8_t > etaLayer3RPCHoles; + std::vector< uint8_t > etaLayer4RPCHoles; + + std::vector< uint8_t > phiLayer1TGCHits; + std::vector< uint8_t > phiLayer2TGCHits; + std::vector< uint8_t > phiLayer3TGCHits; + std::vector< uint8_t > phiLayer4TGCHits; + + std::vector< uint8_t > etaLayer1TGCHits; + std::vector< uint8_t > etaLayer2TGCHits; + std::vector< uint8_t > etaLayer3TGCHits; + std::vector< uint8_t > etaLayer4TGCHits; + + std::vector< uint8_t > phiLayer1TGCHoles; + std::vector< uint8_t > phiLayer2TGCHoles; + std::vector< uint8_t > phiLayer3TGCHoles; + std::vector< uint8_t > phiLayer4TGCHoles; + + std::vector< uint8_t > etaLayer1TGCHoles; + std::vector< uint8_t > etaLayer2TGCHoles; + std::vector< uint8_t > etaLayer3TGCHoles; + std::vector< uint8_t > etaLayer4TGCHoles; + + // STGC + std::vector< uint8_t > phiLayer1STGCHits; + std::vector< uint8_t > phiLayer2STGCHits; + + std::vector< uint8_t > etaLayer1STGCHits; + std::vector< uint8_t > etaLayer2STGCHits; + + std::vector< uint8_t > phiLayer1STGCHoles; + std::vector< uint8_t > phiLayer2STGCHoles; + + std::vector< uint8_t > etaLayer1STGCHoles; + std::vector< uint8_t > etaLayer2STGCHoles; + + // MM + std::vector< uint8_t > MMHits; + std::vector< uint8_t > MMHoles; + // Note: there is currently no MuonStationIndex for the two MM layers + // In the future it might be needed to add them in order to have + // separate counters as follows + // std::vector< uint8_t > Layer1MMHits; + // std::vector< uint8_t > Layer2MMHits; + // std::vector< uint8_t > Layer1MMHoles; + // std::vector< uint8_t > Layer2MMHoles; + + std::vector< uint8_t > cscEtaHits; + std::vector< uint8_t > cscUnspoiledEtaHits; + + /// @} + + /// @name Links + /// @{ + std::vector<ElementLink< TrackParticleContainer > > inDetTrackParticleLink; + std::vector<ElementLink< TrackParticleContainer > > muonSpectrometerTrackParticleLink; + std::vector<ElementLink< TrackParticleContainer > > extrapolatedMuonSpectrometerTrackParticleLink; + std::vector<ElementLink< TrackParticleContainer > > msOnlyExtrapolatedMuonSpectrometerTrackParticleLink; + std::vector<ElementLink< TrackParticleContainer > > combinedTrackParticleLink; + std::vector<ElementLink< CaloClusterContainer > > clusterLink; + std::vector<std::vector<ElementLink< MuonSegmentContainer > > > muonSegmentLinks; + /// @} + + /// @name Energy loss + /// @{ + std::vector< uint8_t> energyLossType; + /// @} + + /// @name Param defs + /// @{ + std::vector< float> spectrometerFieldIntegral ; + std::vector< float> scatteringCurvatureSignificance; + std::vector< float> scatteringNeighbourSignificance; + std::vector< float> momentumBalanceSignificance ; + std::vector< float> segmentDeltaEta ; + std::vector< float> segmentDeltaPhi ; + std::vector< float> segmentChi2OverDoF ; + std::vector< float> t0 ; + std::vector< float> beta ; + std::vector< float> annBarrel ; + std::vector< float> annEndCap ; + std::vector< float> innAngle ; + std::vector< float> midAngle ; + std::vector< float> msInnerMatchChi2 ; + std::vector< float> meanDeltaADCCountsMDT ; + std::vector< float> CaloLRLikelihood ; + std::vector< float> EnergyLoss ; + std::vector< float> ParamEnergyLoss ; + std::vector< float> MeasEnergyLoss ; + std::vector< float> EnergyLossSigma ; + std::vector< float> ParamEnergyLossSigmaPlus ; + std::vector< float> ParamEnergyLossSigmaMinus ; + std::vector< float> MeasEnergyLossSigma ; + std::vector< int > msInnerMatchDOF ; + std::vector< int > msOuterMatchDOF ; + std::vector< int > CaloMuonIDTag ; + /// @} + + }; // class MuonAuxContainer_v5 + +} // namespace xAOD + +#include "xAODCore/BaseInfo.h" +SG_BASE( xAOD::MuonAuxContainer_v5, xAOD::AuxContainerBase ); + +#endif diff --git a/Event/xAOD/xAODMuon/xAODMuon/xAODMuonDict.h b/Event/xAOD/xAODMuon/xAODMuon/xAODMuonDict.h index 775cbf1666309dc82bf94850c60c44dd05bd5ea7..ef28b18f02e76b7774f1edb478f5b8ade7f5ec68 100644 --- a/Event/xAOD/xAODMuon/xAODMuon/xAODMuonDict.h +++ b/Event/xAOD/xAODMuon/xAODMuon/xAODMuonDict.h @@ -1,10 +1,9 @@ // Dear emacs, this is -*- c++ -*- /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ -// $Id: xAODMuonDict.h 745098 2016-05-05 15:47:04Z wleight $ #ifndef XAODMUON_XAODMUONDICT_H #define XAODMUON_XAODMUONDICT_H @@ -22,6 +21,7 @@ #include "xAODMuon/versions/MuonAuxContainer_v2.h" #include "xAODMuon/versions/MuonAuxContainer_v3.h" #include "xAODMuon/versions/MuonAuxContainer_v4.h" +#include "xAODMuon/versions/MuonAuxContainer_v5.h" #include "xAODMuon/MuonContainer.h" #include "xAODMuon/MuonAuxContainer.h" #include "xAODMuon/MuonSegmentContainer.h" diff --git a/Event/xAOD/xAODMuonAthenaPool/src/xAODMuonAthenaPoolTPCnv.cxx b/Event/xAOD/xAODMuonAthenaPool/src/xAODMuonAthenaPoolTPCnv.cxx index cf61b74fbe1324d984acde288a86e2ad96b67066..2f726cf73aa323267d5b1c9b021024a4412a63c5 100644 --- a/Event/xAOD/xAODMuonAthenaPool/src/xAODMuonAthenaPoolTPCnv.cxx +++ b/Event/xAOD/xAODMuonAthenaPool/src/xAODMuonAthenaPoolTPCnv.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // $Id: $ @@ -12,12 +12,14 @@ #include "xAODMuon/versions/MuonAuxContainer_v1.h" #include "xAODMuon/versions/MuonAuxContainer_v2.h" #include "xAODMuon/versions/MuonAuxContainer_v3.h" +#include "xAODMuon/versions/MuonAuxContainer_v4.h" // Local include(s): #include "xAODMuonAuxContainerCnv_v1.h" #include "xAODMuonAuxContainerCnv_v2.h" #include "xAODMuonAuxContainerCnv_v3.h" +#include "xAODMuonAuxContainerCnv_v4.h" // Declare the T/P converter(s): DECLARE_TPCNV_FACTORY( xAODMuonAuxContainerCnv_v1, @@ -35,3 +37,7 @@ DECLARE_TPCNV_FACTORY( xAODMuonAuxContainerCnv_v3, xAOD::MuonAuxContainer_v3, Athena::TPCnvVers::Old ) +DECLARE_TPCNV_FACTORY( xAODMuonAuxContainerCnv_v4, + xAOD::MuonAuxContainer, + xAOD::MuonAuxContainer_v4, + Athena::TPCnvVers::Old ) diff --git a/Event/xAOD/xAODMuonAthenaPool/src/xAODMuonAuxContainerCnv.cxx b/Event/xAOD/xAODMuonAthenaPool/src/xAODMuonAuxContainerCnv.cxx index fa844389f59ad7e3f6d507ccac458a3950a01ef9..1b4c49ee804540f8d8824577358199dbeac0148d 100644 --- a/Event/xAOD/xAODMuonAthenaPool/src/xAODMuonAuxContainerCnv.cxx +++ b/Event/xAOD/xAODMuonAthenaPool/src/xAODMuonAuxContainerCnv.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // System include(s): @@ -12,6 +12,7 @@ #include "xAODMuonAuxContainerCnv_v1.h" #include "xAODMuonAuxContainerCnv_v2.h" #include "xAODMuonAuxContainerCnv_v3.h" +#include "xAODMuonAuxContainerCnv_v4.h" xAODMuonAuxContainerCnv:: xAODMuonAuxContainerCnv( ISvcLocator* svcLoc ) @@ -34,11 +35,20 @@ xAODMuonAuxContainerCnv::createTransient() { static const pool::Guid v2_guid( "AB53C81C-B10C-11E4-AC59-6C3BE51AB9F1" ); static const pool::Guid v3_guid( "ECC65005-302B-4662-ACBA-D2CE5A0218B8" ); static const pool::Guid v4_guid( "8251F481-EA4C-4852-AE72-BED87E6FD2FB" ); + static const pool::Guid v5_guid( "9245FA19-1552-4BBB-8CC3-57224E57A466" ); // Check which version of the container we're reading: - if( compareClassGuid( v4_guid ) ) { + if( compareClassGuid( v5_guid ) ) { // It's the latest version, read it directly: return poolReadObject< xAOD::MuonAuxContainer >(); + }else if( compareClassGuid( v4_guid ) ) { + // Handle dynamic to aux conversion. + // The v4 converter: + static xAODMuonAuxContainerCnv_v4 converter; + std::unique_ptr< xAOD::MuonAuxContainer_v4 > + old( poolReadObject< xAOD::MuonAuxContainer_v4 >() ); + + return converter.createTransient( old.get(), msg() ); }else if( compareClassGuid( v3_guid ) ) { // Handle dynamic to aux conversion. // The v3 converter: diff --git a/Event/xAOD/xAODMuonAthenaPool/src/xAODMuonAuxContainerCnv_v4.cxx b/Event/xAOD/xAODMuonAthenaPool/src/xAODMuonAuxContainerCnv_v4.cxx new file mode 100644 index 0000000000000000000000000000000000000000..8971a1f3fc0dba550fa0244a9720dc0618cf8dc4 --- /dev/null +++ b/Event/xAOD/xAODMuonAthenaPool/src/xAODMuonAuxContainerCnv_v4.cxx @@ -0,0 +1,75 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +// $Id: $ + +// System include(s): +#include <stdexcept> + +// Gaudi/Athena include(s): +#include "GaudiKernel/MsgStream.h" + +// Core EDM include(s): +#include "AthContainers/tools/copyAuxStoreThinned.h" + +// Local include(s): +#include "xAODMuonAuxContainerCnv_v4.h" +#include "xAODMuon/MuonContainer.h" +#include "xAODMuon/versions/MuonContainer_v1.h" + +/// Convenience macro for setting the level of output messages +#define MSGLVL MSG::DEBUG + +/// Another convenience macro for printing messages in the converter +#define ATH_MSG( MSG ) \ + do { \ + if( log.level() <= MSGLVL ) { \ + log << MSGLVL << MSG << endmsg; \ + } \ + } while( 0 ) + +xAODMuonAuxContainerCnv_v4::xAODMuonAuxContainerCnv_v4() + : T_AthenaPoolTPCnvBase< xAOD::MuonAuxContainer, + xAOD::MuonAuxContainer_v4 >() { + +} + +void xAODMuonAuxContainerCnv_v4:: +persToTrans( const xAOD::MuonAuxContainer_v4* oldObj, + xAOD::MuonAuxContainer* newObj, + MsgStream& log ) { + + // Greet the user: + ATH_MSG( "Converting xAOD::MuonAuxContainer_v4 to current version..." ); + + // Clear the transient object: + newObj->resize( 0 ); + + // Copy the payload of the v1 object into the latest one by misusing + // the thinning code a bit... + SG::copyAuxStoreThinned( *oldObj, *newObj, 0 ); + + // Print what happened: + ATH_MSG( "Converting xAOD::MuonAuxContainer_v4 to current version " + "[OK]" ); + + return; +} + +/// This function should never be called, as we are not supposed to convert +/// object before writing. +/// +void xAODMuonAuxContainerCnv_v4:: +transToPers( const xAOD::MuonAuxContainer*, + xAOD::MuonAuxContainer_v4*, + MsgStream& log ) { + + log << MSG::ERROR + << "Somebody called xAODMuonAuxContainerCnv_v4::transToPers" + << endmsg; + throw std::runtime_error( "Somebody called xAODMuonAuxContainerCnv_v4::" + "transToPers" ); + + return; +} diff --git a/Event/xAOD/xAODMuonAthenaPool/src/xAODMuonAuxContainerCnv_v4.h b/Event/xAOD/xAODMuonAthenaPool/src/xAODMuonAuxContainerCnv_v4.h new file mode 100644 index 0000000000000000000000000000000000000000..a6d74551cb45d6129b12910a38b2b77b6e41a2c1 --- /dev/null +++ b/Event/xAOD/xAODMuonAthenaPool/src/xAODMuonAuxContainerCnv_v4.h @@ -0,0 +1,48 @@ +// Dear emacs, this is -*- c++ -*- + +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +// $Id: $ +#ifndef XAODMUONATHENAPOOL_XAODMUONAUXCONTAINERCNV_V4_H +#define XAODMUONATHENAPOOL_XAODMUONAUXCONTAINERCNV_V4_H + +// Gaudi/Athena include(s): +#include "AthenaPoolCnvSvc/T_AthenaPoolTPConverter.h" + +// EDM include(s): +#include "xAODMuon/versions/MuonAuxContainer_v4.h" +#include "xAODMuon/MuonAuxContainer.h" + +/// Converter class used for reading xAOD::MuonAuxContainer_v4 +/// +/// This converter implements the conversion from xAOD::MuonAuxContainer_v4 +/// to the latest version of the class. In a way that makes this converter +/// usable both from the POOL converter, and the BS converter. +/// +/// @author Edward.Moyse@cern.ch (based on example from Attila) +/// +/// $Revision: 619884 $ +/// $Date: 2014-10-03 11:00:40 -0400 (Fri, 03 Oct 2014) $ +/// +class xAODMuonAuxContainerCnv_v4 : + public T_AthenaPoolTPCnvBase< xAOD::MuonAuxContainer, + xAOD::MuonAuxContainer_v4 > { + +public: + /// Default constructor + xAODMuonAuxContainerCnv_v4(); + + /// Function converting from the old type to the current one + virtual void persToTrans( const xAOD::MuonAuxContainer_v4* oldObj, + xAOD::MuonAuxContainer* newObj, + MsgStream& log ); + /// Dummy function inherited from the base class + virtual void transToPers( const xAOD::MuonAuxContainer*, + xAOD::MuonAuxContainer_v4*, + MsgStream& log ); + +}; // class xAODMuonAuxContainerCnv_v4 + +#endif // XAODMUONATHENAPOOL_xAODMuonAuxContainerCnv_v4_H diff --git a/Event/xAOD/xAODTracking/Root/SCTRawHitValidationAuxContainer_v1.cxx b/Event/xAOD/xAODTracking/Root/SCTRawHitValidationAuxContainer_v1.cxx index 0cd4a40a3806d7904e3fd898d99512ee282fb551..bbae7be5766700a298975790508efa99adf46263 100644 --- a/Event/xAOD/xAODTracking/Root/SCTRawHitValidationAuxContainer_v1.cxx +++ b/Event/xAOD/xAODTracking/Root/SCTRawHitValidationAuxContainer_v1.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "xAODTracking/versions/SCTRawHitValidationAuxContainer_v1.h" diff --git a/Event/xAOD/xAODTracking/Root/SCTRawHitValidation_v1.cxx b/Event/xAOD/xAODTracking/Root/SCTRawHitValidation_v1.cxx index b77313167b24d5d599f387b3977cb8f2ef83a0f8..bad5f35683eb8cd3dd7c9939f49dfc2620ac8ce2 100644 --- a/Event/xAOD/xAODTracking/Root/SCTRawHitValidation_v1.cxx +++ b/Event/xAOD/xAODTracking/Root/SCTRawHitValidation_v1.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "xAODTracking/versions/SCTRawHitValidation_v1.h" @@ -11,6 +11,11 @@ namespace xAOD { SCTRawHitValidation_v1::SCTRawHitValidation_v1() { } AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(SCTRawHitValidation_v1, uint64_t, identifier, setIdentifier) + AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(SCTRawHitValidation_v1, int, bec, setBec) + AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(SCTRawHitValidation_v1, int, layer, setLayer) + AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(SCTRawHitValidation_v1, int, eta_module, setEta_module) + AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(SCTRawHitValidation_v1, int, phi_module, setPhi_module) + AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(SCTRawHitValidation_v1, int, side, setSide) static const SG::AuxElement::Accessor<uint32_t> word_acc("dataword"); void SCTRawHitValidation_v1::setWord(uint32_t new_word) { diff --git a/Event/xAOD/xAODTracking/xAODTracking/TrackingPrimitives.h b/Event/xAOD/xAODTracking/xAODTracking/TrackingPrimitives.h index 0f8cf6d6f760aa6bbcf4654294e43f525d8a6434..ec153d5cc284dda87aa3ce44aaf9b3e695776de5 100644 --- a/Event/xAOD/xAODTracking/xAODTracking/TrackingPrimitives.h +++ b/Event/xAOD/xAODTracking/xAODTracking/TrackingPrimitives.h @@ -1,7 +1,7 @@ // Dear emacs, this is -*- c++ -*- /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // $Id: xAODPrimitives.h 576255 2013-12-19 12:54:41Z emoyse $ @@ -393,12 +393,38 @@ namespace xAOD { etaLayer3TGCHoles = 75, //!< number of eta holes in the third TGC trigger layer (T2) etaLayer4TGCHoles = 76, //!< number of eta holes in the fourth TGC trigger layer (T3) + // New Small Wheel + //STGC + phiLayer1STGCHits = 79, //!< number of phi hits in the first STGC trigger layer (STGC1) + phiLayer2STGCHits = 80, //!< number of phi hits in the second STGC trigger layer (STGC2) + + etaLayer1STGCHits = 81, //!< number of eta hits in the first STGC trigger layer (STGC1) + etaLayer2STGCHits = 82, //!< number of eta hits in the second STGC trigger layer (STGC2) + + phiLayer1STGCHoles = 83, //!< number of phi holes in the first STGC trigger layer (STGC1) + phiLayer2STGCHoles = 84, //!< number of phi holes in the second STGC trigger layer (STGC2) + + etaLayer1STGCHoles = 85, //!< number of eta holes in the first STGC trigger layer (STGC1) + etaLayer2STGCHoles = 86, //!< number of eta holes in the second STGC trigger layer (STGC2) + + //MM + MMHits = 87, + MMHoles = 88, + // Note: there is currently no MuonStationIndex for the two MM layers + // In the future it might be needed to add them in order to have + // separate counters as follows + // Layer1MMHits = 87, //!< number of eta hits in the first MM layer + // Layer2MMHits = 88, //!< number of eta hits in the second MM layer + // Layer1MMHoles = 89, //!< number of eta holes in the first MM layer + // Layer2MMHoles = 90, //!< number of eta holes in the second MM layer + + //CSC debugging cscEtaHits = 77, //!<number of CSC eta clusters on the track cscUnspoiledEtaHits = 78, //!<number of unspoiled CSC eta clusters on track // -- numbers... - numberOfMuonSummaryTypes = 79 + numberOfMuonSummaryTypes = 89 }; /// A convenience namespace to make the client code easier to understand diff --git a/Event/xAOD/xAODTracking/xAODTracking/versions/SCTRawHitValidationAuxContainer_v1.h b/Event/xAOD/xAODTracking/xAODTracking/versions/SCTRawHitValidationAuxContainer_v1.h index 67157be1e9c71c8251fcb2c90cce052f77522cc6..0627f07f8386ec789d32f12ada299923a03111f5 100644 --- a/Event/xAOD/xAODTracking/xAODTracking/versions/SCTRawHitValidationAuxContainer_v1.h +++ b/Event/xAOD/xAODTracking/xAODTracking/versions/SCTRawHitValidationAuxContainer_v1.h @@ -21,6 +21,11 @@ namespace xAOD { private: std::vector<uint64_t> identifier; std::vector<uint32_t> dataword; + std::vector<int> bec; + std::vector<int> layer; + std::vector<int> phi_module; + std::vector<int> eta_module; + std::vector<int> side; }; } diff --git a/Event/xAOD/xAODTracking/xAODTracking/versions/SCTRawHitValidation_v1.h b/Event/xAOD/xAODTracking/xAODTracking/versions/SCTRawHitValidation_v1.h index 559f906c79aa3136c8fc9d659b6e176783716227..640ca40a54cec6224f1c6bd58ce2daa07a442961 100644 --- a/Event/xAOD/xAODTracking/xAODTracking/versions/SCTRawHitValidation_v1.h +++ b/Event/xAOD/xAODTracking/xAODTracking/versions/SCTRawHitValidation_v1.h @@ -1,7 +1,7 @@ // -*- C++ -*- /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef XAODTRACKING_VERSIONS_SCTRAWHITVALIDATION_V1_H @@ -63,6 +63,37 @@ namespace xAOD { /// check if there is an error in the second hit's data bool SecondHitError() const; /// @} + + /// set bec of this RDO + void setBec(int new_bec); + + /// get bec of this RDO + int bec() const; + + /// set layer of this RDO + void setLayer(int new_layer); + + /// get layer of this RDO + int layer() const; + + /// set eta_module of this RDO + void setEta_module(int new_eta_module); + + /// get eta_module of this RDO + int eta_module() const; + + /// set phi_module of this RDO + void setPhi_module(int new_phi_module); + + /// get phi_module of this RDO + int phi_module() const; + + /// set side of this RDO + void setSide(int new_side); + + /// get side of this RDO + int side() const; + }; // end of the SCTRawHitValidation_v1 class definition } // end of the xAOD namespace diff --git a/Event/xAOD/xAODTrackingAthenaPool/src/xAODSCTRDOContainerCnv.cxx b/Event/xAOD/xAODTrackingAthenaPool/src/xAODSCTRDOContainerCnv.cxx index f3d85fb051b5e8ca2174f88c1104f7cd52b93d70..8d74ff2d9ea6e7bfb627633b6325795e9eaf3a05 100644 --- a/Event/xAOD/xAODTrackingAthenaPool/src/xAODSCTRDOContainerCnv.cxx +++ b/Event/xAOD/xAODTrackingAthenaPool/src/xAODSCTRDOContainerCnv.cxx @@ -38,7 +38,7 @@ xAODSCTRDOContainerCnv::createPersistent( xAOD::SCTRawHitValidationContainer* tr xAOD::SCTRawHitValidationContainer* xAODSCTRDOContainerCnv::createTransient() { // The known ID(s) for this container: - static pool::Guid v1_guid( "BC8CE35A-5785-4F97-82B6-1E4A21A8C28F" ); + const pool::Guid v1_guid( "BC8CE35A-5785-4F97-82B6-1E4A21A8C28F" ); // Check if we're reading the most up to date type: if( compareClassGuid( v1_guid ) ) { diff --git a/Event/xAOD/xAODTrigger/Root/TrigCompositeAuxContainer_v2.cxx b/Event/xAOD/xAODTrigger/Root/TrigCompositeAuxContainer_v2.cxx index d6fdf943c3c83cf817a3029d6c74f86162652e55..a9ae9559fdfc0a3e7b0e7170c94c3fe98d315603 100644 --- a/Event/xAOD/xAODTrigger/Root/TrigCompositeAuxContainer_v2.cxx +++ b/Event/xAOD/xAODTrigger/Root/TrigCompositeAuxContainer_v2.cxx @@ -18,6 +18,8 @@ namespace xAOD { AUX_VARIABLE( linkColKeys ); AUX_VARIABLE( linkColIndices ); AUX_VARIABLE( linkColClids ); + + AUX_VARIABLE( decisions ); } } // namespace xAOD diff --git a/Event/xAOD/xAODTrigger/Root/TrigComposite_v1.cxx b/Event/xAOD/xAODTrigger/Root/TrigComposite_v1.cxx index 50905d65e450824752caf6dcab3f24291161530e..c0603fb755d73a457b5927bf541d7f068f2cae46 100644 --- a/Event/xAOD/xAODTrigger/Root/TrigComposite_v1.cxx +++ b/Event/xAOD/xAODTrigger/Root/TrigComposite_v1.cxx @@ -47,6 +47,9 @@ namespace xAOD { AUXSTORE_OBJECT_SETTER_AND_GETTER( TrigComposite_v1, std::string, name, setName ) + AUXSTORE_OBJECT_SETTER_AND_GETTER( TrigComposite_v1, std::vector<TrigCompositeUtils::DecisionID>, + decisions, setDecisions ) + // ///////////////////////////////////////////////////////////////////////////// @@ -97,6 +100,10 @@ namespace xAOD { if (newName == "") { newName = name; } + if (newName == "self") { + if (s_throwOnCopyError) throw std::runtime_error("It does not make sense for the 'self' link to be in a collection. There can be only one."); + return false; + } const std::string mangledName = name + s_collectionSuffix; const std::string mangledNewName = newName + s_collectionSuffix; if (other.hasObjectLink(mangledName)) { @@ -123,8 +130,8 @@ namespace xAOD { bool TrigComposite_v1::copyAllLinksFrom(const xAOD::TrigComposite_v1& other) { bool didCopy = false; for (const std::string& name : other.linkColNames()) { - // Cannot copy any 'self' links as *this does not know its own location in its parent container - if (name == "self") continue; + // Cannot copy any 'self' link(s) as *this does not know its own location in its parent container + if (name == "self" || name == "self" + s_collectionSuffix) continue; // Check we don't have one (or more) entries with this raw name (raw = might be mangled). if (this->hasObjectLink(name)) continue; // Check if the link is for a single object or collection of objects by looking for the mangled suffix @@ -173,6 +180,17 @@ namespace xAOD { return hasObjectLink( mangledName ); } + bool TrigComposite_v1::hasObjectLinkExact(const std::string& name, const uint32_t key, const uint16_t index, const uint32_t clid) const { + for (size_t i = 0; i < this->linkColNames().size(); ++i) { + if (this->linkColNames().at(i) != name) continue; + if (this->linkColKeys().at(i) != key) continue; + if (this->linkColIndices().at(i) != index) continue; + if (this->linkColClids().at(i) != clid) continue; + return true; + } + return false; + } + AUXSTORE_OBJECT_GETTER( TrigComposite_v1, std::vector< std::string >, linkColNames ) AUXSTORE_OBJECT_GETTER( TrigComposite_v1, std::vector< uint32_t >, @@ -209,7 +227,7 @@ namespace xAOD { void TrigComposite_v1::typelessSetObjectLink( const std::string& name, const uint32_t key, const uint32_t clid, const uint16_t beginIndex, const uint16_t endIndex ) { // Loop over collections - if ( endIndex - beginIndex > 1 ) { + if ( endIndex - beginIndex > 1 ) { // Adding a *collection* of links // Check uniqueness const std::string mangledName = name + s_collectionSuffix; @@ -247,7 +265,7 @@ namespace xAOD { this->linkColClidsNC().push_back( clid ); } } - else { + else { // Adding a *single* link // Check uniqueness if ( std::find( linkColNamesNC().begin(), linkColNamesNC().end(), name ) == linkColNamesNC().end() ) { @@ -280,12 +298,19 @@ namespace xAOD { std::ostream& operator<<(std::ostream& os, const xAOD::TrigComposite_v1& tc) { - os << "TrigComposite_v1 '" << tc.name() << "' link: name, key, index, CLID" << std::endl; + os << "TrigComposite_v1 name:'" << tc.name() << "'" << std::endl; + os << " N Lnks:" << tc.linkColNames().size(); for (size_t i=0; i<tc.linkColNames().size(); ++i){ - os << tc.linkColNames()[i] << ", "; - os << tc.linkColKeys()[i] << ", "; - os << tc.linkColIndices()[i] << ", "; - os << tc.linkColClids()[i] << std::endl; + if (!i) os << std::endl; + os << " Link Name:" << tc.linkColNames()[i]; + os << ", Key:" << tc.linkColKeys()[i]; + os << ", Index:" << tc.linkColIndices()[i]; + os << ", CLID:" << tc.linkColClids()[i]; + if (i != tc.linkColNames().size() - 1) os << std::endl; + } + if (tc.decisions().size()) { + os << std::endl << " N Decisions: '" << tc.decisions().size() << std::endl << " "; + for (const TrigCompositeUtils::DecisionID id : tc.decisions()) os << id << ", "; } return os; } diff --git a/Event/xAOD/xAODTrigger/xAODTrigger/TrigComposite.h b/Event/xAOD/xAODTrigger/xAODTrigger/TrigComposite.h index 32524ccb8d3133b433503338bf811cd71a1dcd2e..6fc5a85eec5a526e1af68657fd44b202c3c74789 100644 --- a/Event/xAOD/xAODTrigger/xAODTrigger/TrigComposite.h +++ b/Event/xAOD/xAODTrigger/xAODTrigger/TrigComposite.h @@ -11,8 +11,6 @@ // Local include(s): #include "xAODTrigger/versions/TrigComposite_v1.h" -#include <set> - namespace xAOD{ /// Declare the latest version of the class typedef TrigComposite_v1 TrigComposite; @@ -20,9 +18,6 @@ namespace xAOD{ namespace TrigCompositeUtils{ typedef xAOD::TrigComposite Decision; - - typedef unsigned int DecisionID; - typedef std::set<DecisionID> DecisionIDContainer; } // Declare a CLID for the type: diff --git a/Event/xAOD/xAODTrigger/xAODTrigger/versions/TrigCompositeAuxContainer_v2.h b/Event/xAOD/xAODTrigger/xAODTrigger/versions/TrigCompositeAuxContainer_v2.h index a930c557c246d21a8ce1ae5b7aa37d3da8c18465..fce55c86b240c21e0ed0c09e311e6487ed1aebcf 100644 --- a/Event/xAOD/xAODTrigger/xAODTrigger/versions/TrigCompositeAuxContainer_v2.h +++ b/Event/xAOD/xAODTrigger/xAODTrigger/versions/TrigCompositeAuxContainer_v2.h @@ -18,6 +18,8 @@ extern "C" { // xAOD include(s): #include "xAODCore/AuxContainerBase.h" +#include "xAODTrigger/TrigComposite.h" + namespace xAOD { /// Auxiliary store for TrigComposite containers @@ -41,6 +43,8 @@ namespace xAOD { std::vector< std::vector< uint16_t > > linkColIndices; std::vector< std::vector< uint32_t > > linkColClids; + std::vector< std::vector< TrigCompositeUtils::DecisionID > > decisions; + }; // class TrigCompositeAuxContainer_v2 } // namespace xAOD diff --git a/Event/xAOD/xAODTrigger/xAODTrigger/versions/TrigComposite_v1.h b/Event/xAOD/xAODTrigger/xAODTrigger/versions/TrigComposite_v1.h index b65c66e1b880f035c1d2cd9b6e3624d65b05836b..6b529cabc190dd0102630bb320c80a2a6ca45c79 100644 --- a/Event/xAOD/xAODTrigger/xAODTrigger/versions/TrigComposite_v1.h +++ b/Event/xAOD/xAODTrigger/xAODTrigger/versions/TrigComposite_v1.h @@ -14,12 +14,18 @@ extern "C" { } #include <string> #include <vector> +#include <set> // EDM include(s): #include "AthContainers/AuxElement.h" #include "AthLinks/ElementLink.h" #include "AthLinks/ElementLinkVector.h" +namespace TrigCompositeUtils{ + typedef unsigned int DecisionID; + typedef std::set<DecisionID> DecisionIDContainer; +} + namespace xAOD { /// Class used to describe composite objects in the HLT @@ -54,6 +60,11 @@ namespace xAOD { /// Set a human-readable name for the object void setName( const std::string& name ); + /// Get positive HLT chain decisions associated with this TrigComposite. Navigation use + const std::vector<TrigCompositeUtils::DecisionID>& decisions() const; + /// Set positive HLT chain decisions associated with this TrigComposite. Navigation use + void setDecisions( const std::vector<TrigCompositeUtils::DecisionID>& decisions ); + /// @} /// @name Functions for accessing basic properties on the object @@ -94,11 +105,11 @@ namespace xAOD { template< class OBJECT > const OBJECT* object( const std::string& name ) const; - /// Add a link to a single object within a collection + /// Add a link to a single object within a collection. Performs de-duplication template< class CONTAINER > bool addObjectCollectionLink( const std::string& collectionName, const ElementLink< CONTAINER >& link ); - /// Add links to multiple objects within a collection + /// Add links to multiple objects within a collection. Performs de-duplication template< class CONTAINER > bool addObjectCollectionLinks( const std::string& collectionName, const ElementLinkVector< CONTAINER >& links ); @@ -176,6 +187,9 @@ namespace xAOD { /// Raw access to the persistent link CLIDs (non-const) std::vector< uint32_t >& linkColClidsNC(); + // Helper function, check for exact link match + bool hasObjectLinkExact(const std::string& name, const uint32_t key, const uint16_t index, const uint32_t clid) const; + /// Helper function, copy one link into this object void copyLinkInternal(const xAOD::TrigComposite_v1& other, const size_t index, const std::string& newName); diff --git a/Event/xAOD/xAODTrigger/xAODTrigger/versions/TrigComposite_v1.icc b/Event/xAOD/xAODTrigger/xAODTrigger/versions/TrigComposite_v1.icc index 360664965ada39b4a054b1a6beaf1e6d3a60151e..598f26110174cef2457cc5c9481e81e35d5ed487 100644 --- a/Event/xAOD/xAODTrigger/xAODTrigger/versions/TrigComposite_v1.icc +++ b/Event/xAOD/xAODTrigger/xAODTrigger/versions/TrigComposite_v1.icc @@ -184,12 +184,14 @@ namespace xAOD { // No method currently provided to update or check for uniqueness of a link // being added to a container. - // Add a new object: + // Add a new object (unless it would duplicate an existing one): const std::string mangledName = collectionName + s_collectionSuffix; - linkColNamesNC().push_back( mangledName ); - linkColKeysNC().push_back( link.key() ); - linkColIndicesNC().push_back( link.index() ); - linkColClidsNC().push_back( ClassID_traits< CONTAINER >::ID() ); + if (!hasObjectLinkExact(mangledName, link.key(), link.index(), ClassID_traits< CONTAINER >::ID())) { + linkColNamesNC().push_back( mangledName ); + linkColKeysNC().push_back( link.key() ); + linkColIndicesNC().push_back( link.index() ); + linkColClidsNC().push_back( ClassID_traits< CONTAINER >::ID() ); + } return true; } diff --git a/ForwardDetectors/AFP/AFP_Digitization/AFP_Digitization/AFP_PileUpTool.h b/ForwardDetectors/AFP/AFP_Digitization/AFP_Digitization/AFP_PileUpTool.h index e1054228ec2ceaa22b3dcb3f87c9c6889273bcfc..6d3751b6715bf910401fdc5b2103b186754f9ef7 100644 --- a/ForwardDetectors/AFP/AFP_Digitization/AFP_Digitization/AFP_PileUpTool.h +++ b/ForwardDetectors/AFP/AFP_Digitization/AFP_Digitization/AFP_PileUpTool.h @@ -1,11 +1,10 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef AFP_DIGITIZATION_TOOL_H #define AFP_DIGITIZATION_TOOL_H -#include "EventInfo/PileUpEventInfo.h" /*SubEvent*/ #include "PileUpTools/PileUpToolBase.h" #include "xAODEventInfo/EventInfo.h" // NEW EDM #include "xAODEventInfo/EventAuxInfo.h" // NEW EDM diff --git a/ForwardDetectors/AFP/AFP_Digitization/CMakeLists.txt b/ForwardDetectors/AFP/AFP_Digitization/CMakeLists.txt index 1d11236260aad1dc37e55d98b8d322d46739e72c..c9581326d8d2af0ffa5cdca395ea8af45e6c151b 100644 --- a/ForwardDetectors/AFP/AFP_Digitization/CMakeLists.txt +++ b/ForwardDetectors/AFP/AFP_Digitization/CMakeLists.txt @@ -10,7 +10,6 @@ atlas_depends_on_subdirs( PUBLIC Control/AthenaBaseComps Control/AthenaKernel Control/PileUpTools - Event/EventInfo Event/xAOD/xAODEventInfo ForwardDetectors/AFP/AFP_DigiEv ForwardDetectors/AFP/AFP_SimEv @@ -28,7 +27,7 @@ atlas_add_component( AFP_Digitization src/*.cxx src/components/*.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthenaBaseComps AthenaKernel PileUpToolsLib EventInfo xAODEventInfo AFP_DigiEv AFP_SimEv GaudiKernel HitManagement Identifier ) + LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthenaBaseComps AthenaKernel PileUpToolsLib xAODEventInfo AFP_DigiEv AFP_SimEv GaudiKernel HitManagement Identifier ) # Install files from the package: atlas_install_headers( AFP_Digitization ) diff --git a/ForwardDetectors/AFP/AFP_Digitization/src/AFP_PileUpTool.cxx b/ForwardDetectors/AFP/AFP_Digitization/src/AFP_PileUpTool.cxx index 43011becb1d2beba30d5d73198b2f2dcba836367..82754b30510a2dace74239dfd13de77be4da9d43 100644 --- a/ForwardDetectors/AFP/AFP_Digitization/src/AFP_PileUpTool.cxx +++ b/ForwardDetectors/AFP/AFP_Digitization/src/AFP_PileUpTool.cxx @@ -1,12 +1,10 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "AFP_Digitization/AFP_PileUpTool.h" #include <algorithm> -#include "EventInfo/EventInfo.h" -#include "EventInfo/EventID.h" #include "AFP_SimEv/AFP_TDSimHit.h" #include "AFP_SimEv/AFP_TDSimHitCollection.h" #include "AFP_DigiEv/AFP_TDDigiCollection.h" @@ -17,7 +15,6 @@ #include "CLHEP/Random/RandFlat.h" #include "CLHEP/Random/RandGaussQ.h" #include "CLHEP/Random/RandPoissonQ.h" -//#include "AFP_G4_SD/AFP_SensitiveDetector.h" AFP_PileUpTool::AFP_PileUpTool(const std::string& type, const std::string& name, diff --git a/ForwardDetectors/ALFA/ALFA_Digitization/ALFA_Digitization/ALFA_PileUpTool.h b/ForwardDetectors/ALFA/ALFA_Digitization/ALFA_Digitization/ALFA_PileUpTool.h index 5acad297996eab9187951436ae9b7d33c5be552a..21e3913a3c6ae912a03b6bbbb48a9219017a082b 100644 --- a/ForwardDetectors/ALFA/ALFA_Digitization/ALFA_Digitization/ALFA_PileUpTool.h +++ b/ForwardDetectors/ALFA/ALFA_Digitization/ALFA_Digitization/ALFA_PileUpTool.h @@ -1,11 +1,10 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef ALFA_PILEUP_TOOL_H #define ALFA_PILEUP_TOOL_H -#include "EventInfo/PileUpEventInfo.h" /*SubEvent*/ #include "PileUpTools/PileUpToolBase.h" #include "GaudiKernel/Property.h" diff --git a/ForwardDetectors/ALFA/ALFA_Digitization/CMakeLists.txt b/ForwardDetectors/ALFA/ALFA_Digitization/CMakeLists.txt index 9dbaa7655e5fa2fbb428dcbf937e644605215147..d845ffc73b2859aa3b8245a39cba094cc0f2595d 100644 --- a/ForwardDetectors/ALFA/ALFA_Digitization/CMakeLists.txt +++ b/ForwardDetectors/ALFA/ALFA_Digitization/CMakeLists.txt @@ -10,7 +10,6 @@ atlas_depends_on_subdirs( PUBLIC Control/AthenaBaseComps Control/AthenaKernel Control/PileUpTools - Event/EventInfo ForwardDetectors/ALFA/ALFA_RawEv ForwardDetectors/ALFA/ALFA_SimEv GaudiKernel @@ -30,7 +29,7 @@ atlas_add_component( ALFA_Digitization src/*.cxx src/components/*.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} ${HEPMC_LIBRARIES} AthenaBaseComps AthenaKernel PileUpToolsLib EventInfo ALFA_RawEv ALFA_SimEv GaudiKernel HitManagement Identifier GeneratorObjects PathResolver ) + LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} ${HEPMC_LIBRARIES} AthenaBaseComps AthenaKernel PileUpToolsLib ALFA_RawEv ALFA_SimEv GaudiKernel HitManagement Identifier GeneratorObjects PathResolver ) # Install files from the package: atlas_install_headers( ALFA_Digitization ) diff --git a/ForwardDetectors/ALFA/ALFA_Digitization/src/ALFA_PileUpTool.cxx b/ForwardDetectors/ALFA/ALFA_Digitization/src/ALFA_PileUpTool.cxx index 65bf632f9653874bbb98f9415959b25eae47d7ac..a4cce2f2d08a7c80e8935a4a8416ef91950e9d6b 100644 --- a/ForwardDetectors/ALFA/ALFA_Digitization/src/ALFA_PileUpTool.cxx +++ b/ForwardDetectors/ALFA/ALFA_Digitization/src/ALFA_PileUpTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "ALFA_Digitization/ALFA_PileUpTool.h" @@ -18,9 +18,6 @@ #include <algorithm> -#include "EventInfo/EventInfo.h" -#include "EventInfo/EventID.h" - #include <map> #include "PileUpTools/PileUpMergeSvc.h" diff --git a/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_EventTPCnv/share/LUCID_SimHitCnv_p1_test.ref b/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_EventTPCnv/share/LUCID_SimHitCnv_p1_test.ref index 6a0927bf3bfd71b47909f10725590944a6daf6ef..eebebda9e1c21057cb9e97fc3b87abf511644ffd 100644 --- a/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_EventTPCnv/share/LUCID_SimHitCnv_p1_test.ref +++ b/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_EventTPCnv/share/LUCID_SimHitCnv_p1_test.ref @@ -13,4 +13,4 @@ test1 ClassIDSvc INFO getRegistryEntries: read 1130 CLIDRegistry entries for module ALL ProxyProviderSvc INFO Initializing ProxyProviderSvc - package version SGComps-00-00-00 ClassIDSvc INFO getRegistryEntries: read 869 CLIDRegistry entries for module ALL -HepMcParticleLink INFO find_hostkey: Using TruthEvent as McEventCollection key for this job +HepMcParticleLink INFO find_proxy: Using TruthEvent as McEventCollection key for this job diff --git a/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_EventTPCnv/share/LUCID_SimHitCnv_p2_test.ref b/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_EventTPCnv/share/LUCID_SimHitCnv_p2_test.ref index 6a0927bf3bfd71b47909f10725590944a6daf6ef..eebebda9e1c21057cb9e97fc3b87abf511644ffd 100644 --- a/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_EventTPCnv/share/LUCID_SimHitCnv_p2_test.ref +++ b/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_EventTPCnv/share/LUCID_SimHitCnv_p2_test.ref @@ -13,4 +13,4 @@ test1 ClassIDSvc INFO getRegistryEntries: read 1130 CLIDRegistry entries for module ALL ProxyProviderSvc INFO Initializing ProxyProviderSvc - package version SGComps-00-00-00 ClassIDSvc INFO getRegistryEntries: read 869 CLIDRegistry entries for module ALL -HepMcParticleLink INFO find_hostkey: Using TruthEvent as McEventCollection key for this job +HepMcParticleLink INFO find_proxy: Using TruthEvent as McEventCollection key for this job diff --git a/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_EventTPCnv/test/LUCID_SimHitCnv_p1_test.cxx b/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_EventTPCnv/test/LUCID_SimHitCnv_p1_test.cxx index d6bd151226487a1f88ec0b3778fdbf55e96c25f9..51d5a2c4156e105bcc6dcb1f3448a9fafab8eb1f 100644 --- a/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_EventTPCnv/test/LUCID_SimHitCnv_p1_test.cxx +++ b/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_EventTPCnv/test/LUCID_SimHitCnv_p1_test.cxx @@ -28,6 +28,7 @@ void compare (const HepMcParticleLink& p1, assert ( p1.isValid() == p2.isValid() ); assert ( p1.barcode() == p2.barcode() ); assert ( p1.eventIndex() == p2.eventIndex() ); + assert ( p1.getEventCollectionAsChar() == p2.getEventCollectionAsChar() ); assert ( p1.cptr() == p2.cptr() ); assert ( p1 == p2 ); } diff --git a/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_EventTPCnv/test/LUCID_SimHitCnv_p2_test.cxx b/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_EventTPCnv/test/LUCID_SimHitCnv_p2_test.cxx index 672e926e74aa5e1e5c7437daf7133f35eb08771e..df6b13213a23badb3373f66d79f0d22a73dd7214 100644 --- a/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_EventTPCnv/test/LUCID_SimHitCnv_p2_test.cxx +++ b/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_EventTPCnv/test/LUCID_SimHitCnv_p2_test.cxx @@ -27,6 +27,7 @@ void compare (const HepMcParticleLink& p1, assert ( p1.isValid() == p2.isValid() ); assert ( p1.barcode() == p2.barcode() ); assert ( p1.eventIndex() == p2.eventIndex() ); + assert ( p1.getEventCollectionAsChar() == p2.getEventCollectionAsChar() ); assert ( p1.cptr() == p2.cptr() ); assert ( p1 == p2 ); } diff --git a/ForwardDetectors/ZDC/ZDC_SimuDigitization/CMakeLists.txt b/ForwardDetectors/ZDC/ZDC_SimuDigitization/CMakeLists.txt index 79c7cf2a2477da5fda7713fd42244697c18a7c97..4f35e4c85db70931ea17c3afd6d42fc54f417e42 100644 --- a/ForwardDetectors/ZDC/ZDC_SimuDigitization/CMakeLists.txt +++ b/ForwardDetectors/ZDC/ZDC_SimuDigitization/CMakeLists.txt @@ -10,7 +10,6 @@ atlas_depends_on_subdirs( PUBLIC Control/AthenaBaseComps Control/AthenaKernel Control/PileUpTools - Event/EventInfo ForwardDetectors/ZDC/ZDC_SimEvent ForwardDetectors/ZDC/ZdcEvent GaudiKernel @@ -26,7 +25,7 @@ atlas_add_component( ZDC_SimuDigitization src/*.cxx src/components/*.cxx INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaBaseComps AthenaKernel PileUpToolsLib EventInfo ZDC_SimEvent ZdcEvent GaudiKernel HitManagement Identifier ) + LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaBaseComps AthenaKernel PileUpToolsLib ZDC_SimEvent ZdcEvent GaudiKernel HitManagement Identifier ) # Install files from the package: atlas_install_headers( ZDC_SimuDigitization ) diff --git a/ForwardDetectors/ZDC/ZDC_SimuDigitization/ZDC_SimuDigitization/ZDC_PileUpTool.h b/ForwardDetectors/ZDC/ZDC_SimuDigitization/ZDC_SimuDigitization/ZDC_PileUpTool.h index 325a1cfc25705cb10615850f2aadaff31a28dacc..40b5ece4185d5d69e070c95991ae2b60534de47d 100644 --- a/ForwardDetectors/ZDC/ZDC_SimuDigitization/ZDC_SimuDigitization/ZDC_PileUpTool.h +++ b/ForwardDetectors/ZDC/ZDC_SimuDigitization/ZDC_SimuDigitization/ZDC_PileUpTool.h @@ -1,11 +1,10 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef ZDC_DIGITIZATION_TOOL_H #define ZDC_DIGITIZATION_TOOL_H -#include "EventInfo/PileUpEventInfo.h" /*SubEvent*/ #include "PileUpTools/PileUpToolBase.h" #include "GaudiKernel/Property.h" #include "GaudiKernel/ServiceHandle.h" diff --git a/ForwardDetectors/ZDC/ZDC_SimuDigitization/src/ZDC_PileUpTool.cxx b/ForwardDetectors/ZDC/ZDC_SimuDigitization/src/ZDC_PileUpTool.cxx index b2e463f7f6dbccec65bda813f701e006255d373b..43e656221b45da2080b76c56c3a26d432a68fffb 100644 --- a/ForwardDetectors/ZDC/ZDC_SimuDigitization/src/ZDC_PileUpTool.cxx +++ b/ForwardDetectors/ZDC/ZDC_SimuDigitization/src/ZDC_PileUpTool.cxx @@ -1,12 +1,10 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "ZDC_SimuDigitization/ZDC_PileUpTool.h" #include <algorithm> -#include "EventInfo/EventInfo.h" -#include "EventInfo/EventID.h" #include "ZDC_SimEvent/ZDC_SimStripHit_Collection.h" #include "ZDC_SimEvent/ZDC_SimPixelHit_Collection.h" #include "ZDC_SimEvent/ZDC_SimStripHit.h" diff --git a/Generators/GeneratorObjects/CMakeLists.txt b/Generators/GeneratorObjects/CMakeLists.txt index d8f8588d5417df46b5e3316b70dbf8059237af5d..501a878e6e674acad4564ae97a91a3af9a784aee 100644 --- a/Generators/GeneratorObjects/CMakeLists.txt +++ b/Generators/GeneratorObjects/CMakeLists.txt @@ -48,3 +48,8 @@ atlas_add_test( HepMcParticleLink_test INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS} ${GTEST_INCLUDE_DIRS} LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} ${HEPMC_LIBRARIES} AthContainers CxxUtils AthLinks SGTools xAODTruth GaudiKernel TestTools AthenaKernel RootUtils RootUtilsPyROOT StoreGateLib SGtests GeneratorObjects ${GTEST_LIBRARIES} ) + +atlas_add_test( CachedParticlePtr_test + SOURCES test/CachedParticlePtr_test.cxx + LINK_LIBRARIES GeneratorObjects ) + diff --git a/Generators/GeneratorObjects/GeneratorObjects/CachedParticlePtr.h b/Generators/GeneratorObjects/GeneratorObjects/CachedParticlePtr.h new file mode 100644 index 0000000000000000000000000000000000000000..06e5390eb327f88a88bee8f6ce8db7c581cb7ae4 --- /dev/null +++ b/Generators/GeneratorObjects/GeneratorObjects/CachedParticlePtr.h @@ -0,0 +1,149 @@ +// This file's extension implies that it's C, but it's really -*- C++ -*-. +/* + * Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration. + */ +/** + * @file GeneratorObjects/CachedParticlePtr.h + * @author scott snyder <snyder@bnl.gov> + * @date Feb, 2019 + * @brief Hold overloaded store/particle pointer. + */ + + +#ifndef GENERATOROBJECTS_CACHEDPARTICLEPTR_H +#define GENERATOROBJECTS_CACHEDPARTICLEPTR_H + + +#include "SGTools/CurrentEventStore.h" +#include <atomic> +#include <cassert> + + +namespace HepMC { + class GenParticle; +} +class IProxyDict; + + +namespace GeneratorObjects { + + +/** + * @brief Hold overloaded store/particle pointer. + * + * When we initialize a HepMcParticleLink, we need to save a reference + * to the current event store. We use this to look up the particle container + * when the link is dereferenced. After that, we no longer need + * the store pointer. So to save space, we overload a single pointer + * to store both of them. We distinguish the two by setting the low bit + * if an IProxyDict* is stored. We allow the value to be atomically + * changed from an IProxyDict* to a GenParticle*. This is safe to do + * concurrently as long as we always get the same GenParticle*. + */ +class CachedParticlePtr +{ +public: + /** + * @brief Default constructor. + * Initializes to a reference the current event store. + */ + CachedParticlePtr(); + + + /** + * @brief Constructor referencing a specific event store. + * @param sg The store to reference, as an IProxyDict*. + */ + CachedParticlePtr (const IProxyDict* sg); + + + /** + * @brief Constructor referencing a specific particle. + * @param part The particle to reference. + */ + CachedParticlePtr (const HepMC::GenParticle* part); + + + /** + * @brief Copy constructor. (Can't be defaulted due to the atomic member.) + */ + CachedParticlePtr (const CachedParticlePtr& other); + + + /** + * @brief Assignment. (Can't be defaulted due to the atomic member.) + */ + CachedParticlePtr& operator= (const CachedParticlePtr& other); + + + /** + * @brief Reset to reference a new event store. + * @param sg The store to reference, as an IProxyDict*. + * + * Not compatible with any other concurrent access. + */ + void store (const IProxyDict* sg); + + + /** + * @brief Retrieve the current value. + * @param sg[out] Referenced event store. + * + * If this pointer is referencing an event store, set @c sg to that + * and return nullptr. + * Otherwise, we're referencing a particular particle. + * Return that and set @c sg to nullptr. + */ + const HepMC::GenParticle* get (IProxyDict const* & sg) const; + + + /** + * @brief Change the pointer to refer to a particle rather than a store. + * @param sg Store the pointer is currently referencing. + * @param part Particle the pointer should be referencing. + * + * It is ok to call this concurrently, as long as each call uses + * the same parameters. + */ + void set (const IProxyDict* sg, const HepMC::GenParticle* part) const; + + +private: + /** + * @brief Convert a store pointer to a void* stored value. + * @param sg IProxyDict* to reference. + * + * Sets the low bit and converts to void*. + */ + static const void* storedict (const IProxyDict* sg); + + + /** + * @brief Test if a stored value references an event store. + * @param p The value to test. + * + * Tests if the low bit is set. + */ + static bool isdict (const void* p); + + + /** + * @brief Convert a stored value void* to an IProxyDict*. + * @param Clears the low bit and does pointer conversion. + */ + static const IProxyDict* getdict (const void* p); + + + /// The stored pointer: either an IProxyDict* or a GenParticle*. + /// They are distinguished by setting the low bit for an IProxyDict*. + mutable std::atomic<const void*> m_ptr; +}; + + +} // namespace GeneratorObjects + + +#include "GeneratorObjects/CachedParticlePtr.icc" + + +#endif // not GENERATOROBJECTS_CACHEDPARTICLEPTR_H diff --git a/Generators/GeneratorObjects/GeneratorObjects/CachedParticlePtr.icc b/Generators/GeneratorObjects/GeneratorObjects/CachedParticlePtr.icc new file mode 100644 index 0000000000000000000000000000000000000000..aeb89370e87b032cf0cea931f0d3caaafe0c433f --- /dev/null +++ b/Generators/GeneratorObjects/GeneratorObjects/CachedParticlePtr.icc @@ -0,0 +1,167 @@ +/* + * Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration. + */ +/** + * @file GeneratorObjects/CachedParticlePtr.icc + * @author scott snyder <snyder@bnl.gov> + * @date Feb, 2019 + * @brief Hold overloaded store/particle pointer. + */ + + +namespace GeneratorObjects { + + +/** + * @brief Default constructor. + * Initializes to a reference the current event store. + */ +inline +CachedParticlePtr::CachedParticlePtr() + : CachedParticlePtr (SG::CurrentEventStore::store()) +{ +} + + +/** + * @brief Constructor referencing a specific event store. + * @param sg The store to reference, as an IProxyDict*. + */ +inline +CachedParticlePtr::CachedParticlePtr (const IProxyDict* sg) + : m_ptr (storedict (sg)) +{ +} + +/** + * @brief Constructor referencing a specific particle. + * @param part The particle to reference. + */ +inline +CachedParticlePtr::CachedParticlePtr (const HepMC::GenParticle* part) + : m_ptr (part) +{ + assert (!isdict (part)); +} + + +/** + * @brief Copy constructor. (Can't be defaulted due to the atomic member.) + */ +inline +CachedParticlePtr::CachedParticlePtr (const CachedParticlePtr& other) + : m_ptr (static_cast<const void*>(other.m_ptr)) +{ +} + + +/** + * @brief Assignment. (Can't be defaulted due to the atomic member.) + */ +inline +CachedParticlePtr& CachedParticlePtr::operator= (const CachedParticlePtr& other) +{ + if (this != &other) { + m_ptr = static_cast<const void*> (other.m_ptr); + } + return *this; +} + + +/** + * @brief Reset to reference a new event store. + * @param sg The store to reference, as an IProxyDict*. + * + * Not compatible with any other concurrent access. + */ +inline +void CachedParticlePtr::store (const IProxyDict* sg) +{ + m_ptr = storedict (sg); +} + + +/** + * @brief Retrieve the current value. + * @param sg[out] Referenced event store. + * + * If this pointer is referencing an event store, set @c sg to that + * and return nullptr. + * Otherwise, we're referencing a particular particle. + * Return that and set @c sg to nullptr. + */ +inline +const HepMC::GenParticle* +CachedParticlePtr::get (IProxyDict const* & sg) const +{ + const void* p = m_ptr; + if (isdict (p)) { + sg = getdict (p); + return nullptr; + } + else { + sg = nullptr; + return reinterpret_cast<const HepMC::GenParticle*> (p); + } +} + + +/** + * @brief Change the pointer to refer to a particle rather than a store. + * @param sg Store the pointer is currently referencing. + * @param part Particle the pointer should be referencing. + * + * It is ok to call this concurrently, as long as each call uses + * the same parameters. + */ +inline +void CachedParticlePtr::set (const IProxyDict* sg, + const HepMC::GenParticle* part) const +{ + assert (!isdict (part)); + const void* p = storedict (sg); + m_ptr.compare_exchange_strong (p, part); + assert (p == part || p == storedict (sg)); +} + + +/** + * @brief Convert a store pointer to a void* to store. + * @param sg IProxyDict* to reference. + * + * Sets the low bit and converts to void*. + */ +inline +const void* CachedParticlePtr::storedict (const IProxyDict* sg) +{ + assert ((reinterpret_cast<unsigned long>(sg) & 1) == 0); + return reinterpret_cast<const void*>(reinterpret_cast<unsigned long>(sg) | 1); +} + + +/** + * @brief Test if a stored value references an event store. + * @param p The value to test. + * + * Tests if the low bit is set. + */ +inline +bool CachedParticlePtr::isdict (const void* p) +{ + return (reinterpret_cast<unsigned long>(p)&1) != 0; +} + + +/** + * @brief Convert a stored value void* to an IProxyDict*. + * @param Clears the low bit and does pointer conversion. + */ +inline +const IProxyDict* CachedParticlePtr::getdict (const void* p) +{ + assert ((reinterpret_cast<unsigned long>(p)&1) != 0); + return reinterpret_cast<const IProxyDict*>(reinterpret_cast<unsigned long>(p)&~1UL); +} + + +} // namespace GeneratorObjects diff --git a/Generators/GeneratorObjects/GeneratorObjects/HepMcParticleLink.h b/Generators/GeneratorObjects/GeneratorObjects/HepMcParticleLink.h index c4a5378162059aaeeccc59f890ca32d546ff7efd..03f23289188bee38398a44b22acf1447ec426b18 100644 --- a/Generators/GeneratorObjects/GeneratorObjects/HepMcParticleLink.h +++ b/Generators/GeneratorObjects/GeneratorObjects/HepMcParticleLink.h @@ -1,20 +1,25 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef GENERATOROBJECTS_HEPMCPARTICLELINK_H #define GENERATOROBJECTS_HEPMCPARTICLELINK_H /** @class HepMcParticleLink - * @brief a link optimized in size for a GenParticle in a McEventCollection + * @brief a link optimized in size for a GenParticle in a McEventCollection * * @see McEventCollection, GenEvent, ElementLink * @author Paolo Calafiura * $Id: HepMcParticleLink.h,v 1.11 2007-09-13 05:53:34 dquarrie Exp $ **/ + +#include "GeneratorObjects/CachedParticlePtr.h" +#include "SGTools/DataProxy.h" +#include "AthenaKernel/ExtendedEventContext.h" +#include "GaudiKernel/MsgStream.h" +#include "GaudiKernel/EventContext.h" #include <cassert> #include <cstdint> /*int32_t etc*/ #include <iostream> -#include "GaudiKernel/MsgStream.h" #include <limits> /* numeric_limits */ #include <string> @@ -23,161 +28,593 @@ namespace HepMC { class GenEvent; } class IProxyDict; +class McEventCollection; + +enum EBC_EVCOLL{ + EBC_MAINEVCOLL=0, //Usually contains the HS GenEvent + EBC_FIRSTPUEVCOLL, //Low pt minbias PU, or full PU collection where applicable (i.e. Fast Chain) + EBC_SECONDPUEVCOLL, //High pt minbias PU + EBC_THIRDPUEVCOLL, //Reserved for cavern background + EBC_NCOLLKINDS //Just contains the maximum of the enum (for loops) +}; + +/** + * @brief a link optimized in size for a GenParticle in a McEventCollection + * + * A link is defined by three items: + * - A target McEventCollection; + * - A particlular GenEvent within this collection; and + * - A particular particle within the GenEvent. + * + * The target McEventCollection is identified by an enum of type EBC_EVCOLL. + * These enums may also be represented as the characters 'a'..'d'. + * Each of these enums has an associated list of StoreGate keys (see + * the initialization of @c s_keys). When we want to dereference the link, + * we try to look up each possible key in turn until we find one that works. + * (The position of that key in the list is then remembered as a hint + * for where to start searching next time.) + * + * The particular GenEvent within the collection can be represented as either + * an event number (as returned by GenEvent::event_number()) or by a position + * within the collection. Which case is desired is indicated by the value + * of the isIndexEventPosition argument to the constructors (defaulting + * to the event number case). In order to convert between these, we need + * to retrieve the McEventCollection from the store, but we don't have + * the store pointer once the link has been dereferenced. Therefore, + * when a position-based link is dereferenced, it is automatically changed + * to be event-number-based. This also happens when a link is constructed + * with an explicit GenParticle* and a position-based GenEvent. + * + * As a special case, a GenEvent number of 0 is interpreted as the first + * GenEvent in the collection. + * + * The particle within the GenEvent is represented by a barcode. + * A barcode of 0 implies a null link. + * + * In order to dereference a link, we need to reference a particular + * event store. By default, the current store (as defined by + * SG::CurrentEventStore::store()) is stored when the link is constructed; + * however, an explicit IProxyDict* or EventContext may also be specified. + * We don't need the store once the link has been dereferenced; therefore, + * to keep the size of the links small, the same pointer field is overloaded + * to store either an IProxyDict* or a GenParticle* (see CachedParticlePtr). + */ class HepMcParticleLink { -public: +public: typedef uint32_t barcode_type; typedef uint16_t index_type; - /// \name structors - //@{ - HepMcParticleLink() { init_dict(); } - HepMcParticleLink(IProxyDict* sg) - : m_have_particle(false) - { - m_ptrs.m_dict = sg; - } - HepMcParticleLink(barcode_type barCode, uint32_t eventIndex = 0) : - m_extBarcode(barCode, eventIndex) { init_dict(); } - HepMcParticleLink(barcode_type barCode, uint32_t eventIndex, - IProxyDict* sg) - : m_extBarcode(barCode, eventIndex), - m_have_particle(false) - { - m_ptrs.m_dict = sg; - } - HepMcParticleLink(const HepMC::GenParticle* p, uint32_t eventIndex = 0); - HepMcParticleLink(const HepMcParticleLink& rhs) : - m_ptrs(rhs.m_ptrs), - m_extBarcode(rhs.m_extBarcode), - m_have_particle (rhs.m_have_particle){ } - - HepMcParticleLink& operator= (const HepMcParticleLink& rhs) - { - if (this != &rhs) { - m_ptrs = rhs.m_ptrs; - m_extBarcode = rhs.m_extBarcode; - m_have_particle = rhs.m_have_particle; - } - return *this; - } -//// HepMcParticleLink(const HepMC::GenParticle* part, -//// const HepMC::GenEvent* pevt); //FIXME NOT YET - //@} - + + enum PositionFlag { + IS_INDEX = 0, + IS_POSITION = 1, + }; + + + /** + * @brief Persistent representation of a link. + * See @c HepMcParticleLink for details. + */ + class ExtendedBarCode { + public: + /// All 1's. Used to represent an undefined index/position. + constexpr static index_type UNDEFINED = ~static_cast<index_type>(0); + + + /** + * @brief Default constructor. Makes a null link (barcode 0). + */ + ExtendedBarCode(); + + + /** + * @brief Constructor. + * @param barcode Barcode of target particle. + * @param eventIndex Identifies the target GenEvent in a McEventCollection, + * as either the number if @c isIndexEventPosition is IS_INDEX, + * or the position in the container + * if isIndexEventPosition is IS_POSITION. + * 0 always means the first event in the collection. + * @param evtColl Identifies which McEventCollection to use. + * @param isIndexEventPosition: See @c eventIndex. + */ + ExtendedBarCode (barcode_type barcode, + index_type eventIndex, + EBC_EVCOLL evtColl=EBC_MAINEVCOLL, + PositionFlag isIndexEventPosition = IS_INDEX); + + + /** + * @brief Constructor. + * @param barcode Barcode of target particle. + * @param eventIndex Identifies the target GenEvent in a McEventCollection, + * as either the number if @c isIndexEventPosition is IS_INDEX, + * or the position in the container + * if isIndexEventPosition is IS_POSITION. + * 0 always means the first event in the collection. + * @param evtColl Identifies which McEventCollection to use, + * as a character ('a'..'d'). + * @param isIndexEventPosition: See @c eventIndex. + */ + ExtendedBarCode (barcode_type barcode, + index_type eventIndex, + char evtColl, + PositionFlag isIndexEventPosition = IS_INDEX); + + + /** + * @brief Copy constructor. (Can't be defaulted due to the atomic member.) + */ + ExtendedBarCode(const ExtendedBarCode& rhs); + + + /** + * @brief Assignment. (Can't be defaulted due to the atomic member.) + */ + ExtendedBarCode& operator= (const ExtendedBarCode& rhs); + + + /** + * @brief Barcode of target variable (0 for a null link). + */ + barcode_type barcode() const; + + + /** + * @brief Return the event index/position. + * @param index[out] Event index (number), or @c UNDEFINED. + * @param position[out] Event position, or @c UNDEFINED. + * + * The GenEvent within the McEventCollection is identified either by + * the GenEvent number or by the position within the collection. + * This method will return this by setting either @c index or @c position; + * the other one is set to @c UNDEFINED. + */ + void eventIndex (index_type& index, index_type& position) const; + + + /** + * @brief Return which collection we're targeting, as an enum. + */ + EBC_EVCOLL getEventCollection() const; + + + /** + * @brief Return which collection we're targeting, as a char ('a'..'d'). + */ + char getEventCollectionAsChar() const; + + + /** + * @brief Translate event collection enum to a char ('a'..'d'). + */ + static char eventCollectionAsChar (EBC_EVCOLL evtColl); + + + /** + * @brief Translate event char ('a'..'d') to an enum. + */ + static EBC_EVCOLL eventCollectionFromChar (char evtColl); + + + /** + * @brief Equality test. + * + * Be aware: if one EBC holds the target GenEvent by number and the + * other by position, then this will always return false, even if they + * reference the same GenEvent. + * To avoid this, use HepMcParticleLink::operator=. + */ + bool operator == (const ExtendedBarCode& rhs ) const; + + + /** + * @brief Inequality test. + * + * Be aware: if one EBC holds the target GenEvent by number and the + * other by position, then this will always return true, even if they + * reference the same GenEvent. + * To avoid this, use HepMcParticleLink::operator=. + */ + bool operator != (const ExtendedBarCode& rhs ) const; + + + /** + * @brief Ordering test. + * + * Be aware: if one EBC holds the target GenEvent by number and the + * other by position, then this will not work as expected. + * To avoid this, use HepMcParticleLink::operator=. + */ + bool operator < (const ExtendedBarCode& rhs ) const; + + + /** + * @brief Compare the event index part of two links. + * @param lhs First link to compare. + * @param rhs Second link to compare. + * @returns -1, 0, or 1, depending on the result of the comparison. + * + * The event index part of the link can be represented as either + * an event number or the position within the container. + * If necessary, the links will be normalized so that they + * both refer to an event number. + */ + static + int compareIndex (const HepMcParticleLink& lhs, + const HepMcParticleLink& rhs); + + + /** + * @brief Dump in textual format to a stream. + */ + void print(std::ostream& os) const; + + + /** + * @brief Dump in textual format to a MsgStream. + */ + void print(MsgStream& os) const; + + + /** + * @brief Change index from position to number. + * @param index Event number to set. + * @param position Existing event position. + * + * If the link is currently referencing the GenEvent at @c position, + * update it so that it instead references the GenEvent + * with number @c index. + * + * This may be called concurrently, as long as all such concurrent + * calls have the same arguments. + */ + void makeIndex (index_type index, index_type position) const; + + + private: + /// Flag marking that an index refers to an event position. + constexpr static index_type POSITION_MASK = UNDEFINED ^ (UNDEFINED>>1); + + + /** + * @brief Initialize the event index part of the link. + * @param idx The index or position. + * @param positionFlag If IS_POSITION, @c idx represents a position + * in the collection; otherwise, it represents an event number. + */ + void setIndex (index_type idx, PositionFlag isPosition); + + + /// Barcode of the target particle. 0 means a null link. + barcode_type m_BC; + + /// Identifies the target GenEvent within the event collection. + /// If the high bit is set, then this (with the high bit clear) + /// is a position within the collection; otherwise, it is the + /// target GenEvent number. + mutable std::atomic<index_type> m_evtIndex; + + /// Identifies which event collection is targeted. + EBC_EVCOLL m_evtColl; + }; + + + /** + * @brief Default constructor. Makes a null link. + * @param sg Optional specification of a specific store to reference. + */ + HepMcParticleLink (IProxyDict* sg = SG::CurrentEventStore::store()); + + + /** + * @brief Default constructor. Makes a null link. + * @param ctx Context of the store to reference. + */ + HepMcParticleLink (const EventContext& ctx); + + + /** + * @brief Constructor. + * @param barCode Barcode of the target particle. 0 means a null link. + * @param eventIndex Identifies the target GenEvent in a McEventCollection, + * as either the number if @c isIndexEventPosition is IS_INDEX, + * or the position in the container + * if isIndexEventPosition is IS_POSITION. + * 0 always means the first event in the collection. + * @param evColl The targeted event collection, as an enum. + * @param positionFlag: See @c eventIndex. + * @param sg Optional specification of a specific store to reference. + */ + HepMcParticleLink (barcode_type barCode, + uint32_t eventIndex = 0, + EBC_EVCOLL evColl = EBC_MAINEVCOLL, + PositionFlag positionFlag = IS_INDEX, + IProxyDict* sg = SG::CurrentEventStore::store()); + + + /** + * @brief Constructor. + * @param barCode Barcode of the target particle. 0 means a null link. + * @param eventIndex Identifies the target GenEvent in a McEventCollection, + * as either the number if @c isIndexEventPosition is IS_INDEX, + * or the position in the container + * if isIndexEventPosition is IS_POSITION. + * 0 always means the first event in the collection. + * @param evColl The targeted event collection, as an enum. + * @param positionFlag: See @c eventIndex. + * @param ctx Context of the store to reference. + */ + HepMcParticleLink (barcode_type barCode, + uint32_t eventIndex, + EBC_EVCOLL evColl, + PositionFlag positionFlag, + const EventContext& ctx); + + + /** + * @brief Constructor. + * @param barCode Barcode of the target particle. 0 means a null link. + * @param eventIndex Identifies the target GenEvent in a McEventCollection, + * as either the number if @c isIndexEventPosition is IS_INDEX, + * or the position in the container + * if isIndexEventPosition is IS_POSITION. + * 0 always means the first event in the collection. + * @param evCollName The name of the targeted event collection. + * @param positionFlag: See @c eventIndex. + * @param sg Optional specification of a specific store to reference. + */ + HepMcParticleLink (barcode_type barCode, + uint32_t eventIndex, + const std::string& evCollName, + PositionFlag positionFlag = IS_INDEX, + IProxyDict* sg = SG::CurrentEventStore::store()); + + + /** + * @brief Constructor. + * @param p Particle to reference. + * @param eventIndex Identifies the target GenEvent in a McEventCollection, + * as either the number if @c isIndexEventPosition is IS_INDEX, + * or the position in the container + * if isIndexEventPosition is IS_POSITION. + * 0 always means the first event in the collection. + * @param evColl The targeted event collection, as an enum. + * @param positionFlag: See @c eventIndex. + * @param sg Optional specification of a specific store to reference. + */ + HepMcParticleLink (const HepMC::GenParticle* p, + uint32_t eventIndex = 0, + EBC_EVCOLL evColl=EBC_MAINEVCOLL, + PositionFlag positionFlag = IS_INDEX, + IProxyDict* sg = SG::CurrentEventStore::store()); + + + /** + * @brief Constructor. + * @param p Particle to reference. + * @param eventIndex Identifies the target GenEvent in a McEventCollection, + * as either the number if @c isIndexEventPosition is IS_INDEX, + * or the position in the container + * if isIndexEventPosition is IS_POSITION. + * 0 always means the first event in the collection. + * @param evCollName The name of the targeted event collection. + * @param positionFlag: See @c eventIndex. + * @param sg Optional specification of a specific store to reference. + */ + HepMcParticleLink (const HepMC::GenParticle* part, + uint32_t eventIndex, + const std::string& evCollName, + PositionFlag positionFlag = IS_INDEX, + IProxyDict* sg = SG::CurrentEventStore::store()); + + + /** + * @brief Constructor. + * @param p Particle to reference. + * @param eventIndex Identifies the target GenEvent in a McEventCollection, + * as either the number if @c isIndexEventPosition is IS_INDEX, + * or the position in the container + * if isIndexEventPosition is IS_POSITION. + * 0 always means the first event in the collection. + * @param evColl The targeted event collection, as an enum. + * @param positionFlag: See @c eventIndex. + * @param ctx Context of the store to reference. + */ + HepMcParticleLink (const HepMC::GenParticle* part, + uint32_t eventIndex, + EBC_EVCOLL evColl, + PositionFlag positionFlag, + const EventContext& ctx); + + + /** + * @brief Copy constructor. + */ + HepMcParticleLink(const HepMcParticleLink& rhs); + + + /** + * @brief Assignment. + */ + HepMcParticleLink& operator= (const HepMcParticleLink& rhs); + + /// \name pointer interface //@{ - /// @throws std::runtime_error when the element is not found - const HepMC::GenParticle& operator* () const { return *cptr(); }//FIXME - const HepMC::GenParticle* operator->() const { return cptr(); } - operator const HepMC::GenParticle* () const { return cptr(); } - bool operator!() const {return !isValid();} - bool operator == (const HepMcParticleLink& rhs) const { - return ( m_extBarcode== rhs.m_extBarcode ); } - bool operator != (const HepMcParticleLink& rhs) const { - return !(operator==(rhs)); } - bool operator < (const HepMcParticleLink& rhs) const { - return ( m_extBarcode < rhs.m_extBarcode ); } - friend std::ostream& operator << (std::ostream&, const HepMcParticleLink&); - friend MsgStream& operator << (MsgStream&, const HepMcParticleLink&); + + + /** + * @brief Dereference. + */ + const HepMC::GenParticle& operator* () const; + + + /** + * @brief Dereference. + */ + const HepMC::GenParticle* operator->() const; + + + /** + * @brief Dereference. + */ + operator const HepMC::GenParticle* () const; + + + /** + * @brief Dereference. + */ + const HepMC::GenParticle* cptr() const; + + + /** + * @brief Validity check. Dereference and check for null. + */ + bool isValid() const; + + + /** + * @brief Validity check. Dereference and check for null. + */ + bool operator!() const; //@} - /// \name indexing accessors (e.g. for writing) + /// \name Comparison operators. //@{ - int barcode() const { return int(m_extBarcode.barcode()); } //FIXME ret type - index_type eventIndex() const { return index_type(m_extBarcode.eventIndex()); } - ///hash the 32 bit barcode and 16 bit eventindex into a 32bit int - barcode_type compress() const { - return ( ((m_extBarcode.barcode()&0xFFFF) << 16) | - m_extBarcode.eventIndex() ); - }; + + + /** + * @brief Equality comparison. + */ + bool operator == (const HepMcParticleLink& rhs) const; + + + /** + * @brief Inequality comparison. + */ + bool operator != (const HepMcParticleLink& rhs) const; + + + /** + * @brief Ordering comparison. + */ + bool operator < (const HepMcParticleLink& rhs) const; + + //@} - - static const std::string s_DEFAULTKEY; - static const std::string s_DC2DEFAULTKEY; - static const std::string s_AODKEY; - bool isValid() const { return (0 != cptr()); } - const HepMC::GenParticle* cptr() const; + /// \name ParticleLink-specific methods. + //@{ - class ExtendedBarCode { - public: - ExtendedBarCode() : m_BC(0), m_evtIndex(0) {} - ExtendedBarCode(barcode_type barcode, index_type eventIndex) : - m_BC(barcode), m_evtIndex(eventIndex) - { - assert(eventIndex < std::numeric_limits<unsigned short>::max()); - } - - barcode_type barcode() const { return m_BC; } - index_type eventIndex() const { return m_evtIndex; } - bool operator == (const ExtendedBarCode& rhs ) const - { - return ( (this->m_BC)==(rhs.m_BC) && (this->m_evtIndex)==(rhs.m_evtIndex) ) ; - } - bool operator != (const ExtendedBarCode& rhs ) const { - return !(operator==(rhs)); - } - bool operator < (const ExtendedBarCode& rhs ) const - { - return ((m_evtIndex < rhs.m_evtIndex) || - ((m_evtIndex == rhs.m_evtIndex) && (m_BC < rhs.m_BC)) ) ; - } - void print(std::ostream& os) const { - os << "Event index " << m_evtIndex - << ", Barcode " << m_BC; - } - void print(MsgStream& os) const { - os << "Event index " << m_evtIndex - << ", Barcode " << m_BC; - } - - private: - barcode_type m_BC; - index_type m_evtIndex; - } -#ifdef __GNUC__ - __attribute__ ((packed)) -#endif -; + + /** + * @brief Return the barcode of the target particle. 0 for a null link. + * FIXME: return type. + */ + int barcode() const; + + + /** + * @brief Return the event number of the referenced GenEvent. + * 0 means the first GenEvent in the collection. + */ + index_type eventIndex() const; + + + index_type getEventPositionInCollection (const IProxyDict* sg) const; + + + /** + * @brief Return which collection we're targeting, as an enum. + */ + EBC_EVCOLL getEventCollection() const; + + + /** + * @brief Return which collection we're targeting, as a char ('a'..'d'). + */ + char getEventCollectionAsChar() const; + + + /** + * @brief Hash the 32 bit barcode and 16 bit eventindex into a 32bit int. + */ + barcode_type compress() const; + + + /** + * @brief Return the corresponding enum from a McEventCollection name. + */ + static EBC_EVCOLL find_enumFromKey (const std::string& evCollName); + + + /** + * @brief Alter the persistent part of the link. + */ + void setExtendedBarCode (const ExtendedBarCode& extBarcode); + + + //@} private: - friend class HepMcParticleLinkCnv_p1; - friend class HepMcParticleLinkCnv_p2; - - static std::string s_HOSTKEY; - - // We need to remember the default data source when we're constructed. - // But once we have the particle pointer, we don't need it any more. - // Thus, we can put them in a union. If m_have_particle is true, - // then m_particle is valid; otherwise, m_dict. Note that adding - // m_have_particle doesn't add to the aligned size of this structure - // due to the trailing short in ExtendedBarCode. But we have to use - // the __packed__ attribute on ExtendedBarCode above to prevent - // it from being padded out. - mutable union { - HepMC::GenParticle* m_particle; - IProxyDict* m_dict; - } m_ptrs; /* transient */ - ExtendedBarCode m_extBarcode; - mutable bool m_have_particle; /* transient */ + friend std::ostream& operator << (std::ostream&, const HepMcParticleLink&); + friend MsgStream& operator << (MsgStream&, const HepMcParticleLink&); + + + /** + * @brief Look up the event collection we're targeting. + * @param sg Target event store. + * May return nullptr if the collection is not found. + */ + const McEventCollection* + retrieveMcEventCollection (const IProxyDict* sg) const; + + + /** + * @brief Find the proxy for the target event collection. + * @param sg Target event store. + * May return nullptr if the collection is not found. + */ + SG::DataProxy* find_proxy (const IProxyDict* sg) const; + + + /** + * @brief Return the most recent SG key used for a particular collection type. + * @param evColl The targeted event collection, as an enum. + */ + static std::string getLastEventCollectionName (EBC_EVCOLL evColl); + + + /// Transient part. Either a GenParticle* or an IProxyDict*. + GeneratorObjects::CachedParticlePtr m_ptrs; - void init_dict(); - bool find_hostkey() const; + + /// Persistent part: barcode and location of target GenEvent. + ExtendedBarCode m_extBarcode; }; -inline -std::ostream& -operator << (std::ostream& os, const HepMcParticleLink& link) { - link.m_extBarcode.print(os); return os; -} -inline -MsgStream& -operator << (MsgStream& os, const HepMcParticleLink& link) { - link.m_extBarcode.print(os); return os; -} +/** + * @brief Output operator. + * @param os Stream to which to output. + * @param link Link to dump. + */ +std::ostream& operator<< (std::ostream& os, const HepMcParticleLink& link); + + +/** + * @brief Output operator. + * @param os MsgStream to which to output. + * @param link Link to dump. + */ +MsgStream& operator<< (MsgStream& os, const HepMcParticleLink& link); + + +#include "GeneratorObjects/HepMcParticleLink.icc" + #endif diff --git a/Generators/GeneratorObjects/GeneratorObjects/HepMcParticleLink.icc b/Generators/GeneratorObjects/GeneratorObjects/HepMcParticleLink.icc new file mode 100644 index 0000000000000000000000000000000000000000..62342578d61941ac18a480781c19a2fc9c451248 --- /dev/null +++ b/Generators/GeneratorObjects/GeneratorObjects/HepMcParticleLink.icc @@ -0,0 +1,602 @@ +/* + * Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration. + */ +/** + * @file GeneratorObjects/HepMcParticleLink.icc + * @author scott snyder <snyder@bnl.gov> + * @date Feb, 2019 + * @brief a link optimized in size for a GenParticle in a McEventCollection + */ + + +//************************************************************************** +// ExtendedBarCode +// + +inline +HepMcParticleLink::ExtendedBarCode::ExtendedBarCode() + : m_BC(0), + m_evtIndex(0), + m_evtColl(EBC_MAINEVCOLL) +{ +} + + +/** + * @brief Constructor. + * @param barcode Barcode of target particle. + * @param eventIndex Identifies the target GenEvent in a McEventCollection, + * as either the number if @c isIndexEventPosition is IS_INDEX, + * or the position in the container + * if isIndexEventPosition is IS_POSITION. + * 0 always means the first event in the collection. + * @param evtColl Identifies which McEventCollection to use. + * @param isIndexEventPosition: See @c eventIndex. + */ +inline +HepMcParticleLink::ExtendedBarCode::ExtendedBarCode + (barcode_type barcode, + index_type eventIndex, + EBC_EVCOLL evtColl /*=EBC_MAINEVCOLL*/, + PositionFlag isIndexEventPosition /*=IS_INDEX*/) + : m_BC(barcode), + m_evtColl (evtColl) +{ + setIndex (eventIndex, isIndexEventPosition); +} + + +/** + * @brief Constructor. + * @param barcode Barcode of target particle. + * @param eventIndex Identifies the target GenEvent in a McEventCollection, + * as either the number if @c isIndexEventPosition is IS_INDEX, + * or the position in the container + * if isIndexEventPosition is IS_POSITION. + * 0 always means the first event in the collection. + * @param evtColl Identifies which McEventCollection to use, + * as a character ('a'..'d'). + * @param isIndexEventPosition: See @c eventIndex. + */ +inline +HepMcParticleLink::ExtendedBarCode::ExtendedBarCode + (barcode_type barcode, + index_type eventIndex, + char evtColl, + PositionFlag isIndexEventPosition /*=IS_INDEX*/) + : ExtendedBarCode (barcode, + eventIndex, + eventCollectionFromChar (evtColl), + isIndexEventPosition) +{ +} + + +/** + * @brief Copy constructor. (Can't be defaulted due to the atomic member.) + */ +inline +HepMcParticleLink::ExtendedBarCode::ExtendedBarCode (const ExtendedBarCode& rhs) + : m_BC (rhs.m_BC), + m_evtIndex (static_cast<index_type> (rhs.m_evtIndex)), + m_evtColl (rhs.m_evtColl) +{ +} + + +/** + * @brief Assignment. (Can't be defaulted due to the atomic member.) + */ +inline +HepMcParticleLink::ExtendedBarCode& +HepMcParticleLink::ExtendedBarCode::operator= (const ExtendedBarCode& rhs) +{ + if (this != &rhs) { + m_BC = rhs.m_BC; + m_evtIndex = static_cast<index_type> (rhs.m_evtIndex); + m_evtColl=rhs.m_evtColl; + } + return *this; +} + + +/** + * @brief Barcode of target variable (0 for a null link). + */ +inline +HepMcParticleLink::barcode_type +HepMcParticleLink::ExtendedBarCode::barcode() const +{ + return m_BC; +} + + +/** + * @brief Return the event index/position. + * @param index[out] Event index (number), or @c UNDEFINED. + * @param position[out] Event position, or @c UNDEFINED. + * + * The GenEvent within the McEventCollection is identified either by + * the GenEvent number or by the position within the collection. + * This method will return this by setting either @c index or @c position; + * the other one is set to @c UNDEFINED. + */ +inline +void HepMcParticleLink::ExtendedBarCode::eventIndex (index_type& index, + index_type& position) const +{ + index_type idx = m_evtIndex; + if (idx & POSITION_MASK) { + index = UNDEFINED; + position = idx & ~POSITION_MASK; + } + else { + index = idx; + position = UNDEFINED; + } +} + + +/** + * @brief Return which collection we're targeting, as an enum. + */ +inline +EBC_EVCOLL HepMcParticleLink::ExtendedBarCode::getEventCollection() const +{ + return m_evtColl; +} + + +/** + * @brief Return which collection we're targeting, as a char ('a'..'d'). + */ +inline +char HepMcParticleLink::ExtendedBarCode::getEventCollectionAsChar() const +{ + return eventCollectionAsChar (m_evtColl); +} + + +/** + * @brief Equality test. + * + * Be aware: if one EBC holds the target GenEvent by number and the + * other by position, then this will always return false, even if they + * reference the same GenEvent. + * To avoid this, use HepMcParticleLink::operator=. + */ +inline +bool +HepMcParticleLink::ExtendedBarCode::operator==(const ExtendedBarCode& rhs) const +{ + return (this->m_BC == rhs.m_BC && + this->m_evtColl == rhs.m_evtColl && + this->m_evtIndex == rhs.m_evtIndex); +} + + +/** + * @brief Inequality test. + * + * Be aware: if one EBC holds the target GenEvent by number and the + * other by position, then this will always return true, even if they + * reference the same GenEvent. + * To avoid this, use HepMcParticleLink::operator=. + */ +inline +bool +HepMcParticleLink::ExtendedBarCode::operator!= (const ExtendedBarCode& rhs) const +{ + return !(operator==(rhs)); +} + + +/** + * @brief Ordering test. + * + * Be aware: if one EBC holds the target GenEvent by number and the + * other by position, then this will not work as expected. + * To avoid this, use HepMcParticleLink::operator=. + */ +inline +bool +HepMcParticleLink::ExtendedBarCode::operator< (const ExtendedBarCode& rhs) const +{ + return (m_evtColl < rhs.m_evtColl || + (m_evtColl == rhs.m_evtColl && m_evtIndex < rhs.m_evtIndex) || + (m_evtColl == rhs.m_evtColl && m_evtIndex == rhs.m_evtIndex && m_BC < rhs.m_BC) ) ; +} + + +/** + * @brief Compare the event index part of two links. + * @param lhs First link to compare. + * @param rhs Second link to compare. + * @returns -1, 0, or 1, depending on the result of the comparison. + * + * The event index part of the link can be represented as either + * an event number or the position within the container. + * If necessary, the links will be normalized so that they + * both refer to an event number. + */ +inline +int +HepMcParticleLink::ExtendedBarCode::compareIndex (const HepMcParticleLink& lhs, + const HepMcParticleLink& rhs) +{ + // Get the stored indices. The high bit will be set of they + // represent a position. Do a quick test for equality. + index_type idx1 = lhs.m_extBarcode.m_evtIndex; + index_type idx2 = rhs.m_extBarcode.m_evtIndex; + if (idx1 == idx2) return 0; + + // Normalize the values so that they both refer to event number; + // this happens as a side-effect of calling cptr(). + if (idx1 & POSITION_MASK) { + lhs.cptr(); + idx1 = lhs.m_extBarcode.m_evtIndex; + } + if (idx2 & POSITION_MASK) { + rhs.cptr(); + idx2 = rhs.m_extBarcode.m_evtIndex; + } + + // Compare. + if (idx1 == idx2) { + return 0; + } + else if (idx1 < idx2) { + return -1; + } + else { + return 1; + } +} + + +/** + * @brief Change index from position to number. + * @param index Event number to set. + * @param position Existing event position. + * + * If the link is currently referencing the GenEvent at @c position, + * update it so that it instead references the GenEvent + * with number @c index. + * + * This may be called concurrently, as long as all such concurrent + * calls have the same arguments. + */ +inline +void HepMcParticleLink::ExtendedBarCode::makeIndex (index_type index, + index_type position) const +{ + assert ((index & POSITION_MASK) == 0); + index_type old = position | POSITION_MASK; + m_evtIndex.compare_exchange_strong (old, index); + assert (old == (position|POSITION_MASK) || old == index); +} + + +/** + * @brief Initialize the event index part of the link. + * @param idx The index or position. + * @param positionFlag If IS_POSITION, @c idx represents a position + * in the collection; otherwise, it represents an event number. + */ +inline +void +HepMcParticleLink::ExtendedBarCode::setIndex (index_type idx, + PositionFlag positionFlag) +{ + assert ((idx & POSITION_MASK) == 0); + if (positionFlag == IS_POSITION) { + idx |= POSITION_MASK; + } + m_evtIndex = idx; +} + + +//************************************************************************** +// HepMcParticleLink +// + + +/** + * @brief Default constructor. Makes a null link. + * @param sg Optional specification of a specific store to reference. + */ +inline +HepMcParticleLink::HepMcParticleLink (IProxyDict* sg /*= SG::CurrentEventStore::store()*/) + : m_ptrs (sg) +{ +} + + +/** + * @brief Default constructor. Makes a null link. + * @param ctx Context of the store to reference. + */ +inline +HepMcParticleLink::HepMcParticleLink (const EventContext& ctx) + : HepMcParticleLink (ctx.getExtension<Atlas::ExtendedEventContext>().proxy()) +{ +} + + +/** + * @brief Constructor. + * @param barCode Barcode of the target particle. 0 means a null link. + * @param eventIndex Identifies the target GenEvent in a McEventCollection, + * as either the number if @c isIndexEventPosition is IS_INDEX, + * or the position in the container + * if isIndexEventPosition is IS_POSITION. + * 0 always means the first event in the collection. + * @param evColl The targeted event collection, as an enum. + * @param positionFlag: See @c eventIndex. + * @param sg Optional specification of a specific store to reference. + */ +inline +HepMcParticleLink::HepMcParticleLink (barcode_type barCode, + uint32_t eventIndex /*= 0*/, + EBC_EVCOLL evColl /*= EBC_MAINEVCOLL*/, + PositionFlag positionFlag /*= IS_INDEX*/, + IProxyDict* sg /*= SG::CurrentEventStore::store()*/) + : m_ptrs (sg), + m_extBarcode (barCode, eventIndex, evColl, positionFlag) +{ +} + + +/** + * @brief Constructor. + * @param barCode Barcode of the target particle. 0 means a null link. + * @param eventIndex Identifies the target GenEvent in a McEventCollection, + * as either the number if @c isIndexEventPosition is IS_INDEX, + * or the position in the container + * if isIndexEventPosition is IS_POSITION. + * 0 always means the first event in the collection. + * @param evCollName The name of the targeted event collection. + * @param positionFlag: See @c eventIndex. + * @param sg Optional specification of a specific store to reference. + */ +inline +HepMcParticleLink::HepMcParticleLink (barcode_type barCode, + uint32_t eventIndex /*= 0*/, + const std::string& evCollName, + PositionFlag positionFlag /*= IS_INDEX*/, + IProxyDict* sg /*= SG::CurrentEventStore::store()*/) + : HepMcParticleLink (barCode, eventIndex, + find_enumFromKey (evCollName), + positionFlag, sg) +{ +} + + +/** + * @brief Constructor. + * @param barCode Barcode of the target particle. 0 means a null link. + * @param eventIndex Identifies the target GenEvent in a McEventCollection, + * as either the number if @c isIndexEventPosition is IS_INDEX, + * or the position in the container + * if isIndexEventPosition is IS_POSITION. + * 0 always means the first event in the collection. + * @param evColl The targeted event collection, as an enum. + * @param positionFlag: See @c eventIndex. + * @param ctx Context of the store to reference. + */ +inline +HepMcParticleLink::HepMcParticleLink (barcode_type barCode, + uint32_t eventIndex, + EBC_EVCOLL evColl, + PositionFlag positionFlag, + const EventContext& ctx) + : HepMcParticleLink (barCode, eventIndex, evColl, positionFlag, + ctx.getExtension<Atlas::ExtendedEventContext>().proxy()) +{ +} + + +/** + * @brief Constructor. + * @param p Particle to reference. + * @param eventIndex Identifies the target GenEvent in a McEventCollection, + * as either the number if @c isIndexEventPosition is IS_INDEX, + * or the position in the container + * if isIndexEventPosition is IS_POSITION. + * 0 always means the first event in the collection. + * @param evCollName The name of the targeted event collection. + * @param positionFlag: See @c eventIndex. + * @param sg Optional specification of a specific store to reference. + */ +inline +HepMcParticleLink::HepMcParticleLink (const HepMC::GenParticle* part, + uint32_t eventIndex, + const std::string& evCollName, + PositionFlag positionFlag /*= IS_INDEX*/, + IProxyDict* sg /*= SG::CurrentEventStore::store()*/) + : HepMcParticleLink (part, eventIndex, + find_enumFromKey (evCollName), + positionFlag, sg) +{ +} + + +/** + * @brief Constructor. + * @param p Particle to reference. + * @param eventIndex Identifies the target GenEvent in a McEventCollection, + * as either the number if @c isIndexEventPosition is IS_INDEX, + * or the position in the container + * if isIndexEventPosition is IS_POSITION. + * 0 always means the first event in the collection. + * @param evColl The targeted event collection, as an enum. + * @param positionFlag: See @c eventIndex. + * @param ctx Context of the store to reference. + */ +inline +HepMcParticleLink::HepMcParticleLink (const HepMC::GenParticle* part, + uint32_t eventIndex, + EBC_EVCOLL evColl, + PositionFlag positionFlag, + const EventContext& ctx) + : HepMcParticleLink (part, eventIndex, evColl, positionFlag, + ctx.getExtension<Atlas::ExtendedEventContext>().proxy()) +{ +} + + +/** + * @brief Copy constructor. + */ +inline +HepMcParticleLink::HepMcParticleLink (const HepMcParticleLink& rhs) + : m_ptrs(rhs.m_ptrs), + m_extBarcode(rhs.m_extBarcode) +{ +} + + +/** + * @brief Assignment. + */ +inline +HepMcParticleLink& HepMcParticleLink::operator= (const HepMcParticleLink& rhs) +{ + if (this != &rhs) { + m_ptrs = rhs.m_ptrs; + m_extBarcode = rhs.m_extBarcode; + } + return *this; +} + + +/** + * @brief Dereference. + */ +inline +const HepMC::GenParticle& HepMcParticleLink::operator* () const +{ + return *cptr(); +} + + +/** + * @brief Dereference. + */ +inline +const HepMC::GenParticle* HepMcParticleLink::operator->() const +{ + return cptr(); +} + + +/** + * @brief Dereference. + */ +inline +HepMcParticleLink::operator const HepMC::GenParticle* () const +{ + return cptr(); +} + + +/** + * @brief Validity check. Dereference and check for null. + */ +inline +bool HepMcParticleLink::isValid() const +{ + return (0 != cptr()); +} + + +/** + * @brief Validity check. Dereference and check for null. + */ +inline +bool HepMcParticleLink::operator!() const +{ + return !isValid(); +} + + +/** + * @brief Equality comparison. + */ +inline +bool HepMcParticleLink::operator== (const HepMcParticleLink& rhs) const +{ + return (m_extBarcode.barcode()==rhs.m_extBarcode.barcode() && + m_extBarcode.getEventCollection()==rhs.m_extBarcode.getEventCollection() && + ExtendedBarCode::compareIndex (*this, rhs) == 0); +} + + +/** + * @brief Inequality comparison. + */ +inline +bool HepMcParticleLink::operator!= (const HepMcParticleLink& rhs) const +{ + return !(operator==(rhs)); +} + + +/** + * @brief Ordering comparison. + */ +inline +bool HepMcParticleLink::operator< (const HepMcParticleLink& rhs) const +{ + if (m_extBarcode.getEventCollection() < rhs.m_extBarcode.getEventCollection()) return true; + if (m_extBarcode.getEventCollection() == rhs.m_extBarcode.getEventCollection()) { + int cmpIndex = ExtendedBarCode::compareIndex (*this, rhs); + if (cmpIndex < 0) return true; + if (cmpIndex == 0) { + return m_extBarcode.barcode() < rhs.m_extBarcode.barcode(); + } + } + return false; +} + + +/** + * @brief Return the barcode of the target particle. 0 for a null link. + * FIXME: return type. + */ +inline +int HepMcParticleLink::barcode() const +{ + return int(m_extBarcode.barcode()); +} + + +/** + * @brief Return which collection we're targeting, as an enum. + */ +inline +EBC_EVCOLL HepMcParticleLink::getEventCollection() const +{ + return m_extBarcode.getEventCollection(); +} + + +/** + * @brief Return which collection we're targeting, as a char ('a'..'d'). + */ +inline +char HepMcParticleLink::getEventCollectionAsChar() const +{ + return m_extBarcode.getEventCollectionAsChar(); +} + + +/** + * @brief Hash the 32-bit barcode and 16-bit eventindex into a 32bit int. + */ +inline +HepMcParticleLink::barcode_type HepMcParticleLink::compress() const +{ + return ( ((m_extBarcode.barcode()&0xFFFF) << 16) | + eventIndex() ); +} diff --git a/Generators/GeneratorObjects/share/CachedParticlePtr_test.ref b/Generators/GeneratorObjects/share/CachedParticlePtr_test.ref new file mode 100644 index 0000000000000000000000000000000000000000..3f554989732f154b76c9f895264150425a0cb62f --- /dev/null +++ b/Generators/GeneratorObjects/share/CachedParticlePtr_test.ref @@ -0,0 +1,3 @@ +CachedParticlePtr_test +test1 +test2 diff --git a/Generators/GeneratorObjects/share/HepMcParticleLink_test.ref b/Generators/GeneratorObjects/share/HepMcParticleLink_test.ref new file mode 100644 index 0000000000000000000000000000000000000000..3b5c108c78eaab7a82dfa60c6a4bc5cfb5502009 --- /dev/null +++ b/Generators/GeneratorObjects/share/HepMcParticleLink_test.ref @@ -0,0 +1,31 @@ +[==========] Running 3 tests from 1 test case. +[----------] Global test environment set-up. +ApplicationMgr SUCCESS +==================================================================================================================================== + Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99) + running on karma on Tue Feb 19 16:13:51 2019 +==================================================================================================================================== +ApplicationMgr INFO Application Manager Configured successfully +EventLoopMgr WARNING Unable to locate service "EventSelector" +EventLoopMgr WARNING No events will be processed from external input. +HistogramPersis...WARNING Histograms saving not required. +ApplicationMgr INFO Application Manager Initialized successfully +ApplicationMgr Ready +[----------] 3 tests from HepMcParticleLink_test +[ RUN ] HepMcParticleLink_test.old_test +*** HepMcParticleLink_test starts *** +ClassIDSvc INFO getRegistryEntries: read 896 CLIDRegistry entries for module ALL +Testing HepMcParticleLink streamer Event index 0, Barcode 10005, McEventCollection CollectionNotSet(a) --- Event index 1, Barcode 10005, McEventCollection CollectionNotSet(a) +HepMcParticleLink INFO find_proxy: Using TruthEvent as McEventCollection key for this job +*** HepMcParticleLink_test OK *** +[ OK ] HepMcParticleLink_test.old_test (63 ms) +[ RUN ] HepMcParticleLink_test.broken_event_link +ClassIDSvc INFO getRegistryEntries: read 1024 CLIDRegistry entries for module ALL +[ OK ] HepMcParticleLink_test.broken_event_link (5 ms) +[ RUN ] HepMcParticleLink_test.truth_event_link +[ OK ] HepMcParticleLink_test.truth_event_link (0 ms) +[----------] 3 tests from HepMcParticleLink_test (68 ms total) + +[----------] Global test environment tear-down +[==========] 3 tests from 1 test case ran. (113 ms total) +[ PASSED ] 3 tests. diff --git a/Generators/GeneratorObjects/src/HepMcParticleLink.cxx b/Generators/GeneratorObjects/src/HepMcParticleLink.cxx index 286ad9288618810e84f18e87f76c782c6c451fd1..8bbcfddf44157596c225d276715614e450e838fa 100644 --- a/Generators/GeneratorObjects/src/HepMcParticleLink.cxx +++ b/Generators/GeneratorObjects/src/HepMcParticleLink.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ @@ -7,7 +7,7 @@ // Don't use the StoreGateSvc interface here, so that this code // will work in root too. -#include <cassert> +#include "GeneratorObjects/HepMcParticleLink.h" #include "GeneratorObjects/McEventCollection.h" #include "StoreGate/StoreGate.h" #include "HepMC/GenParticle.h" @@ -16,116 +16,389 @@ #include "GaudiKernel/MsgStream.h" #include "SGTools/CurrentEventStore.h" #include "SGTools/DataProxy.h" +#include <sstream> +#include <cassert> -#include "GeneratorObjects/HepMcParticleLink.h" - -const std::string HepMcParticleLink::s_DEFAULTKEY("TruthEvent"); -const std::string HepMcParticleLink::s_DC2DEFAULTKEY("G4Truth"); -const std::string HepMcParticleLink::s_AODKEY("GEN_AOD"); -std::string HepMcParticleLink::s_HOSTKEY; namespace { - MsgStream& mlog() { - static MsgStream s_log(Athena::getMessageSvc(), "HepMcParticleLink"); - return s_log; + + +/** + * @brief StoreGate keys to try for each EBC_EVCOLL enum. + */ +constexpr static int NKEYS = 4; +const +std::string s_keys[EBC_NCOLLKINDS][NKEYS] = + { + {"TruthEvent","G4Truth","GEN_AOD","GEN_EVENT"}, + {"TruthEvent_PU","G4Truth_PU","GEN_AOD_PU","GEN_EVENT_PU"}, + {"TruthEvent_HighPtPU","G4Truth_HighPtPU","GEN_AOD_HighPtPU","GEN_EVENT_HighPtPU"}, + {"TruthEvent_Cavern","G4Truth_Cavern","GEN_AOD_Cavern","GEN_EVENT_Cavern"}, + }; + + +/** + * @brief Hint about where to start searching. + * + * On a successful SG lookup of a McEventCollection, we store here the index + * in the s_keys array of the key that worked. We can that start the + * search at that position the next time. + */ +std::atomic<unsigned> s_hints[EBC_NCOLLKINDS] = {NKEYS, NKEYS, NKEYS, NKEYS}; + + +const unsigned short CPTRMAXMSGCOUNT = 100; + + +} // anonymous namespace + + +//************************************************************************** +// ExtendedBarCode +// + + +/** + * @brief Translate event collection enum to a char ('a'..'d'). + */ +char +HepMcParticleLink::ExtendedBarCode::eventCollectionAsChar (EBC_EVCOLL evtColl) +{ + static const char codes[EBC_NCOLLKINDS] = {'a', 'b', 'c', 'd'}; + assert (evtColl < EBC_NCOLLKINDS); + return codes[evtColl]; +} + + +/** + * @brief Translate event char ('a'..'d') to an enum. + */ +EBC_EVCOLL +HepMcParticleLink::ExtendedBarCode::eventCollectionFromChar (char evtColl) +{ + switch (evtColl) { + case 'a': return EBC_MAINEVCOLL; + case 'b': return EBC_FIRSTPUEVCOLL; + case 'c': return EBC_SECONDPUEVCOLL; + case 'd': return EBC_THIRDPUEVCOLL; + default: + // Should not reach this + MsgStream log (Athena::getMessageSvc(), "HepMcParticleLink"); + log << MSG::ERROR << " Wrong event collection (" << std::string(&evtColl,1) << ") set in HepMcParticleLink ExtendedBarCode object !!!" << endmsg; } - const unsigned short CPTRMAXMSGCOUNT(100); + return EBC_MAINEVCOLL; } -HepMcParticleLink::HepMcParticleLink(const HepMC::GenParticle* part, - uint32_t eventIndex) : - m_extBarcode((0 != part) ? part->barcode() : 0, eventIndex), - m_have_particle (true) + +/** + * @brief Dump in textual format to a stream. + */ +void HepMcParticleLink::ExtendedBarCode::print (std::ostream& os) const +{ + os << "Event index " ; + index_type index, position; + eventIndex (index, position); + if (position != UNDEFINED) { + os << position << " (position in collection) "; + } + else { + os << index; + } + os << ", Barcode " << m_BC + << ", McEventCollection " + << HepMcParticleLink::getLastEventCollectionName(this->getEventCollection()) + << "(" << eventCollectionAsChar (m_evtColl) << ")"; +} + + +/** + * @brief Dump in textual format to a MsgStream. + */ +void HepMcParticleLink::ExtendedBarCode::print (MsgStream& os) const +{ + std::ostringstream ss; + print (ss); + os << ss.str(); +} + + +//************************************************************************** +// HepMcParticleLink +// + + +/** + * @brief Constructor. + * @param p Particle to reference. + * @param eventIndex Identifies the target GenEvent in a McEventCollection, + * as either the number if @c isIndexEventPosition is IS_INDEX, + * or the position in the container + * if isIndexEventPosition is IS_POSITION. + * 0 always means the first event in the collection. + * @param evColl The targeted event collection, as an enum. + * @param positionFlag: See @c eventIndex. + * @param sg Optional specification of a specific store to reference. + */ +HepMcParticleLink::HepMcParticleLink (const HepMC::GenParticle* part, + uint32_t eventIndex, + EBC_EVCOLL evColl, + PositionFlag positionFlag /*= IS_INDEX*/, + IProxyDict* sg /*= SG::CurrentEventStore::store()*/) + : m_ptrs (part), + m_extBarcode((0 != part) ? part->barcode() : 0, eventIndex, evColl, positionFlag) { - m_ptrs.m_particle = const_cast<HepMC::GenParticle*>(part); assert(part); + + if (part != 0 && positionFlag == IS_POSITION) { + if (const McEventCollection* pEvtColl = retrieveMcEventCollection(sg)) { + const HepMC::GenEvent *pEvt = pEvtColl->at (eventIndex); + m_extBarcode.makeIndex (pEvt->event_number(), eventIndex); + } + else { + MsgStream log (Athena::getMessageSvc(), "HepMcParticleLink"); + log << MSG::WARNING << "cptr: McEventCollection not found" << endmsg; + } + } } -const HepMC::GenParticle* HepMcParticleLink::cptr() const { - if (!m_have_particle) { + +/** + * @brief Dereference. + */ +const HepMC::GenParticle* HepMcParticleLink::cptr() const +{ + const IProxyDict* sg = nullptr; + const HepMC::GenParticle* p = m_ptrs.get (sg); + if (!p) { if (0 == barcode()) { #if 0 mlog() << MSG::DEBUG - << "cptr: no truth particle associated with this hit (barcode==0)." - << " Probably this is a noise hit" << endmsg; + << "cptr: no truth particle associated with this hit (barcode==0)." + << " Probably this is a noise hit" << endmsg; #endif - return 0; - } - CLID clid = ClassID_traits<McEventCollection>::ID(); - const McEventCollection* pEvtColl(0); - if(s_HOSTKEY.empty() ) { - if (!find_hostkey()) return 0; - } - SG::DataProxy* proxy = m_ptrs.m_dict->proxy (clid, s_HOSTKEY); - if (!proxy) { - if (!find_hostkey()) return 0; - proxy = m_ptrs.m_dict->proxy (clid, s_HOSTKEY); + return nullptr; } - if (proxy && - (0 != (pEvtColl = SG::DataProxy_cast<McEventCollection> (proxy)))) { - const HepMC::GenEvent *pEvt((0 == eventIndex()) ? - pEvtColl->at(0) : //original event is at EvtColl[0] - pEvtColl->find(eventIndex())); + if (const McEventCollection* pEvtColl = retrieveMcEventCollection(sg)) { + const HepMC::GenEvent *pEvt = nullptr; + index_type index, position; + m_extBarcode.eventIndex (index, position); + if (index == 0) { + pEvt = pEvtColl->at(0); + } + else if (position != ExtendedBarCode::UNDEFINED) { + pEvt = pEvtColl->at (position); + } + else { + pEvt = pEvtColl->find (index); + } + if (0 != pEvt) { - m_ptrs.m_particle = pEvt->barcode_to_particle(barcode()); - m_have_particle = true; + p = pEvt->barcode_to_particle(barcode()); + m_ptrs.set (sg, p); + if (position != ExtendedBarCode::UNDEFINED) { + m_extBarcode.makeIndex (pEvt->event_number(), position); + } } else { - mlog() << MSG::WARNING - << "cptr: Mc Truth not stored for event " << eventIndex() - << endmsg; + MsgStream log (Athena::getMessageSvc(), "HepMcParticleLink"); + log << MSG::WARNING + << "cptr: Mc Truth not stored for event " << eventIndex() + << endmsg; } } else { - mlog() << MSG::WARNING << "cptr: McEventCollection not found" << endmsg; + MsgStream log (Athena::getMessageSvc(), "HepMcParticleLink"); + log << MSG::WARNING << "cptr: McEventCollection not found" << endmsg; + } + } + return p; +} + + +/** + * @brief Return the event number of the referenced GenEvent. + * 0 means the first GenEvent in the collection. + */ +HepMcParticleLink::index_type HepMcParticleLink::eventIndex() const +{ + index_type index, position; + m_extBarcode.eventIndex (index, position); + if (index == ExtendedBarCode::UNDEFINED) { + // Don't trip the assertion for a null link. + if (barcode() == 0) return 0; + cptr(); + m_extBarcode.eventIndex (index, position); + assert (index != ExtendedBarCode::UNDEFINED); + } + return index; +} + + +HepMcParticleLink::index_type +HepMcParticleLink::getEventPositionInCollection (const IProxyDict* sg) const +{ + index_type index, position; + m_extBarcode.eventIndex (index, position); + if (position != ExtendedBarCode::UNDEFINED) { + return position; + } + if (index == 0) { + return 0; + } + + const McEventCollection* coll = retrieveMcEventCollection (sg); + size_t sz = coll->size(); + for (size_t i = 0; i < sz; i++) { + if ((*coll)[i]->event_number() == index) { + return i; } } - if (m_have_particle) - return m_ptrs.m_particle; - return 0; + return ExtendedBarCode::UNDEFINED; +} + + +/** + * @brief Return the corresponding enum from a McEventCollection name. + */ +EBC_EVCOLL HepMcParticleLink::find_enumFromKey (const std::string& evCollName) +{ + for (unsigned int iEnum=0; iEnum<EBC_NCOLLKINDS; ++iEnum) { + for (unsigned int iName=0;iName<NKEYS;iName++) + if (evCollName==s_keys[iEnum][iName]) { + return static_cast<EBC_EVCOLL>(iEnum); + } + } + + MsgStream log (Athena::getMessageSvc(), "HepMcParticleLink"); + log << MSG::WARNING << "HepMcParticleLink::find_enumFromKey(" << evCollName << "): trying to find enum for unknown McEventCollection, returning " << EBC_MAINEVCOLL << endmsg; + return EBC_MAINEVCOLL; } +/** + * @brief Alter the persistent part of the link. + */ +void HepMcParticleLink::setExtendedBarCode (const ExtendedBarCode& extBarcode) +{ + m_extBarcode = extBarcode; + m_ptrs.store (SG::CurrentEventStore::store()); +} + -// This is a bit overly complicated at the moment in order to work -// with both the old and new DataModel. -void HepMcParticleLink::init_dict() +/** + * @brief Look up the event collection we're targeting. + * @param sg Target event store. + * May return nullptr if the collection is not found. + */ +const McEventCollection* +HepMcParticleLink::retrieveMcEventCollection (const IProxyDict* sg) const { - m_have_particle = false; - m_ptrs.m_dict = SG::CurrentEventStore::store(); + const McEventCollection* pEvtColl = nullptr; + SG::DataProxy* proxy = find_proxy (sg); + if (proxy) { + pEvtColl = SG::DataProxy_cast<McEventCollection> (proxy); + if (!pEvtColl) { + MsgStream log (Athena::getMessageSvc(), "HepMcParticleLink"); + log << MSG::WARNING << "cptr: McEventCollection not found" << endmsg; + } + } + return pEvtColl; } -bool HepMcParticleLink::find_hostkey() const +/** + * @brief Find the proxy for the target event collection. + * @param sg Target event store. + * May return nullptr if the collection is not found. + */ +SG::DataProxy* HepMcParticleLink::find_proxy (const IProxyDict* sg) const { - static unsigned short msgCount(0); - assert (!m_have_particle); - CLID clid = ClassID_traits<McEventCollection>::ID(); - s_HOSTKEY.clear(); - if (m_ptrs.m_dict->proxy (clid, s_DEFAULTKEY)) - s_HOSTKEY=s_DEFAULTKEY; - else if (m_ptrs.m_dict->proxy (clid, s_DC2DEFAULTKEY)) - s_HOSTKEY=s_DC2DEFAULTKEY; - else if (m_ptrs.m_dict->proxy (clid, s_AODKEY)) - s_HOSTKEY=s_AODKEY; - if (!s_HOSTKEY.empty()) { - mlog() << MSG::INFO << "find_hostkey: Using " << s_HOSTKEY - <<" as McEventCollection key for this job " << endmsg; - return true; + const CLID clid = ClassID_traits<McEventCollection>::ID(); + EBC_EVCOLL evColl = getEventCollection(); + assert (evColl < EBC_NCOLLKINDS); + unsigned int hint_orig = s_hints[evColl]; + unsigned int hint = hint_orig; + if (hint >= NKEYS) hint = 0; + do { + SG::DataProxy* proxy = sg->proxy (clid, s_keys[evColl][hint]); + if (proxy) { + if (hint != s_hints[evColl]) { + s_hints[evColl] = hint; + } + static std::atomic<unsigned> findCount {0}; + if(++findCount == 1) { + MsgStream log (Athena::getMessageSvc(), "HepMcParticleLink"); + log << MSG::INFO << "find_proxy: Using " << s_keys[evColl][hint] + <<" as McEventCollection key for this job " << endmsg; + } + return proxy; + } + ++hint; + if (hint >= NKEYS) hint = 0; + } while (hint != hint_orig); + + MsgStream log (Athena::getMessageSvc(), "HepMcParticleLink"); + static std::atomic<unsigned long> msgCount {0}; + unsigned int count = ++msgCount; + if (count <= CPTRMAXMSGCOUNT) { + log << MSG::WARNING << "find_proxy: No Valid MC event Collection found " + << endmsg; + } + if (count == CPTRMAXMSGCOUNT) { + log << MSG::WARNING <<"find_proxy: suppressing further messages about valid MC event Collection. Use \n" + << " msgSvc.setVerbose += [HepMcParticleLink]\n" + << "to see all messages" << endmsg; } - if (msgCount<CPTRMAXMSGCOUNT) { - mlog() << MSG::WARNING << "find_hostkey: No Valid MC event Collection found " - << endmsg; - ++msgCount; - } else if (msgCount==CPTRMAXMSGCOUNT) { - mlog() << MSG::WARNING <<"find_hostkey: suppressing further messages about valid MC event Collection. Use \n" - << " msgSvc.setVerbose += [HepMcParticleLink]\n" - << "to see all messages" << endmsg; - ++msgCount; - } else { - mlog() << MSG::VERBOSE << "find_hostkey: No Valid MC event Collection found " - << endmsg; + if (count > CPTRMAXMSGCOUNT) { + log << MSG::VERBOSE << "find_proxy: No Valid MC event Collection found " + << endmsg; } - return false; + return nullptr; } +/** + * @brief Return the most recent SG key used for a particular collection type. + * @param evColl The targeted event collection, as an enum. + */ +std::string HepMcParticleLink::getLastEventCollectionName (EBC_EVCOLL evColl) +{ + static const std::string unset[EBC_NCOLLKINDS] = + { + "CollectionNotSet", + "PUCollectionNotSet", + "PU2CollectionNotSet", + "PU3CollectionNotSet", + }; + assert (evColl < EBC_NCOLLKINDS); + unsigned idx = s_hints[evColl]; + if (idx < NKEYS) { + return s_keys[evColl][idx]; + } + return unset[evColl]; +} + + +/** + * @brief Output operator. + * @param os Stream to which to output. + * @param link Link to dump. + */ +std::ostream& +operator<< (std::ostream& os, const HepMcParticleLink& link) +{ + link.m_extBarcode.print(os); + return os; +} + + +/** + * @brief Output operator. + * @param os MsgStream to which to output. + * @param link Link to dump. + */ +MsgStream& +operator<< (MsgStream& os, const HepMcParticleLink& link) +{ + link.m_extBarcode.print(os); + return os; +} diff --git a/Generators/GeneratorObjects/test/CachedParticlePtr_test.cxx b/Generators/GeneratorObjects/test/CachedParticlePtr_test.cxx new file mode 100644 index 0000000000000000000000000000000000000000..360a5e368554f224d935568c16a78f76dcd73eda --- /dev/null +++ b/Generators/GeneratorObjects/test/CachedParticlePtr_test.cxx @@ -0,0 +1,174 @@ +/* + * Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration. + */ +/** + * @file GeneratorObjects/CachedParticlePtr_test.cxx + * @author scott snyder <snyder@bnl.gov> + * @date Feb, 2019 + * @brief Unit tests for CachedParticlePtr + */ + + +#undef NDEBUG +#include "GeneratorObjects/CachedParticlePtr.h" +#include "HepMC/GenParticle.h" +#include "SGTools/TestStore.h" +#include "SGTools/CurrentEventStore.h" +#include <thread> +#include <shared_mutex> +#include <iostream> +#include <cassert> + + +void test1 (const IProxyDict* store) +{ + std::cout << "test1\n"; + HepMC::GenParticle gp1; + + const IProxyDict* sg = nullptr; + GeneratorObjects::CachedParticlePtr p1; + assert (p1.get (sg) == nullptr); + assert (sg == store); + p1.set (sg, &gp1); + assert (p1.get (sg) == &gp1); + assert (sg == nullptr); + + SGTest::TestStore store2; + GeneratorObjects::CachedParticlePtr p2 (&store2); + assert (p2.get (sg) == nullptr); + assert (sg == &store2); + + GeneratorObjects::CachedParticlePtr p3 (&gp1); + assert (p3.get (sg) == &gp1); + assert (sg == nullptr); + + GeneratorObjects::CachedParticlePtr p4 (p1); + assert (p4.get (sg) == &gp1); + assert (sg == nullptr); + + p2 = p4; + assert (p2.get (sg) == &gp1); + assert (sg == nullptr); + + p1.store (&store2); + assert (p1.get (sg) == nullptr); + assert (sg == &store2); +} + + +class ThreadingTest +{ +public: + static const int NVAL = 10; + GeneratorObjects::CachedParticlePtr m_vals[NVAL]; + std::shared_timed_mutex m_sm; + HepMC::GenParticle m_parts[NVAL]; + + void threadedTest (const IProxyDict* store); + + struct writerThread + { + writerThread (ThreadingTest& test, int iworker, const IProxyDict* store) + : m_test (test), m_iworker (iworker), m_store (store) {} + void operator()(); + ThreadingTest& m_test; + int m_iworker; + const IProxyDict* m_store; + }; + + + struct readerThread + { + readerThread (ThreadingTest& test, int iworker, const IProxyDict* store) + : m_test (test), m_iworker (iworker), m_store (store) {} + void operator()(); + ThreadingTest& m_test; + int m_iworker; + const IProxyDict* m_store; + }; +}; + + +void ThreadingTest::writerThread::operator()() +{ + int i = m_iworker; + do { + m_test.m_vals[i].set (m_store, &m_test.m_parts[i]); + i++; + if (i >= NVAL) i = 0; + } while (i != m_iworker); +} + + +void ThreadingTest::readerThread::operator()() +{ + bool checked[NVAL] = {false}; + int nchecked = 0; + while (nchecked < NVAL) { + int i = m_iworker; + do { + if (!checked[i]) { + const IProxyDict* sg = nullptr; + const HepMC::GenParticle* p = m_test.m_vals[i].get (sg); + if (p != nullptr) { + assert (p == &m_test.m_parts[i]); + assert (sg == nullptr); + checked[i] = true; + ++nchecked; + } + else { + assert (sg == m_store); + } + } + i++; + if (i >= NVAL) i = 0; + } while (i != m_iworker); + } +} + + +void ThreadingTest::threadedTest (const IProxyDict* store) +{ + const int nthread = 10; + std::thread threads[nthread]; + m_sm.lock(); + + for (int i=0; i < nthread; i++) { + if (i < 3) { + threads[i] = std::thread (writerThread (*this, i, store)); + } + else { + threads[i] = std::thread (readerThread (*this, i, store)); + } + } + + // Try to get the threads starting as much at the same time as possible. + m_sm.unlock(); + for (int i=0; i < nthread; i++) + threads[i].join(); +} + + +// Threading test. +void test2 (const IProxyDict* store) +{ + std::cout << "test2\n"; + + ThreadingTest test; + for (int i=0; i < 20; i++) + test.threadedTest (store); +} + + +int main() +{ + std::cout << "CachedParticlePtr_test\n"; + + SGTest::TestStore store; + SG::CurrentEventStore::setStore (&store); + + test1 (&store); + test2 (&store); + + return 0; +} diff --git a/Generators/GeneratorObjects/test/HepMcParticleLink_test.cxx b/Generators/GeneratorObjects/test/HepMcParticleLink_test.cxx old mode 100755 new mode 100644 index c48b24b9e986c39cf8267f366125c458f0d725ee..5edff9738ea6e54db1065b39dd31b198cc798954 --- a/Generators/GeneratorObjects/test/HepMcParticleLink_test.cxx +++ b/Generators/GeneratorObjects/test/HepMcParticleLink_test.cxx @@ -1,11 +1,10 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /** * @author John Chapman * @date June, 2016 - * @brief Tests for BeamEffectsAlg. */ #undef NDEBUG @@ -20,8 +19,6 @@ // Google Test #include "gtest/gtest.h" -// Google Mock -// #include "gmock/gmock.h" // HepMC includes #include "HepMC/GenEvent.h" @@ -201,7 +198,7 @@ namespace MCTesting { TEST_F(HepMcParticleLink_test, old_test) { std::cout << "*** HepMcParticleLink_test starts ***" <<std::endl; - SG::WriteHandle<McEventCollection> inputTestDataHandle{HepMcParticleLink::s_DEFAULTKEY}; + SG::WriteHandle<McEventCollection> inputTestDataHandle{"TruthEvent"}; inputTestDataHandle = CxxUtils::make_unique<McEventCollection>(); HepMC::GenEvent* pEvent(buildEvent()); @@ -244,7 +241,7 @@ namespace MCTesting { ASSERT_LT( gammaLink1, gammaLink11 ); //FIXME weird! Can't check ptr... StoreGateSvc* pStore(nullptr); ASSERT_TRUE(MCTesting::g_svcLoc->service("StoreGateSvc", pStore).isSuccess()); - pStore->clearStore(); + pStore->clearStore(true); // forceRemove=true to remove all proxies std::cout << "*** HepMcParticleLink_test OK ***" <<std::endl; } @@ -262,12 +259,12 @@ namespace MCTesting { HepMcParticleLink testLink1a(particle1,0); ASSERT_TRUE( testLink1a.isValid() ); // A HepMcParticleLink built using the barcode and the position of - // the GenEvent in the McEventCollection will not work. + // the GenEvent in the McEventCollection should still work. HepMcParticleLink testLink1b(particle1->barcode(),0); - ASSERT_FALSE( testLink1b.isValid() ); + ASSERT_TRUE( testLink1b.isValid() ); StoreGateSvc* pStore(nullptr); ASSERT_TRUE(MCTesting::g_svcLoc->service("StoreGateSvc", pStore).isSuccess()); - pStore->clearStore(); + pStore->clearStore(true); // forceRemove=true to remove all proxies } TEST_F(HepMcParticleLink_test, truth_event_link) { @@ -296,22 +293,25 @@ namespace MCTesting { const HepMC::GenParticle* particle3 = populateGenEvent(ge3); //Testing links to the first dummy GenEvent + const IProxyDict* sg = SG::CurrentEventStore::store(); // HepMcParticleLink built using a GenParticle pointer and the // position of the GenEvent. - HepMcParticleLink testLink1a(particle1,0); + HepMcParticleLink testLink1a(particle1,0, EBC_MAINEVCOLL, + HepMcParticleLink::IS_POSITION); ASSERT_TRUE( testLink1a.isValid() ); ASSERT_EQ( particle1->barcode(), testLink1a.barcode()); - ASSERT_EQ( 0, testLink1a.eventIndex()); - ASSERT_NE( event_number1, testLink1a.eventIndex()); + ASSERT_EQ( event_number1, testLink1a.eventIndex()); + ASSERT_EQ( 0, testLink1a.getEventPositionInCollection(sg)); ASSERT_EQ(particle1,testLink1a.cptr()); // A HepMcParticleLink built using the barcode and the position of // the GenEvent. - HepMcParticleLink testLink1b(particle1->barcode(),0); + HepMcParticleLink testLink1b(particle1->barcode(),0, EBC_MAINEVCOLL, + HepMcParticleLink::IS_POSITION); ASSERT_TRUE( testLink1b.isValid() ); ASSERT_EQ( particle1->barcode(), testLink1b.barcode()); - ASSERT_EQ( 0, testLink1b.eventIndex()); - ASSERT_NE( event_number1, testLink1b.eventIndex()); + ASSERT_EQ( event_number1, testLink1b.eventIndex()); + ASSERT_EQ( 0, testLink1b.getEventPositionInCollection(sg)); ASSERT_EQ(*(testLink1a.cptr()),*(testLink1b.cptr())); // HepMcParticleLink built using a GenParticle pointer and the // event_number of the GenEvent. @@ -320,6 +320,7 @@ namespace MCTesting { ASSERT_EQ( particle1->barcode(), testLink1c.barcode()); ASSERT_NE( 0, testLink1c.eventIndex()); ASSERT_EQ( event_number1, testLink1c.eventIndex()); + ASSERT_EQ( 0, testLink1c.getEventPositionInCollection(sg)); ASSERT_EQ(particle1,testLink1c.cptr()); // A HepMcParticleLink built using the barcode and the event_number of // the GenEvent. @@ -328,22 +329,29 @@ namespace MCTesting { ASSERT_EQ( particle1->barcode(), testLink1d.barcode()); ASSERT_NE( 0, testLink1d.eventIndex()); ASSERT_EQ( event_number1, testLink1d.eventIndex()); + ASSERT_EQ( 0, testLink1d.getEventPositionInCollection(sg)); ASSERT_EQ(particle1,testLink1d.cptr()); //Testing links to the second dummy GenEvent // HepMcParticleLink built using a GenParticle pointer and the // position of the GenEvent. - HepMcParticleLink testLink2a(particle2,1); + HepMcParticleLink testLink2a(particle2,1, EBC_MAINEVCOLL, + HepMcParticleLink::IS_POSITION); ASSERT_TRUE( testLink2a.isValid() ); ASSERT_EQ( particle2->barcode(), testLink2a.barcode()); - ASSERT_EQ( 1, testLink2a.eventIndex()); - ASSERT_NE( event_number2, testLink2a.eventIndex()); + ASSERT_EQ( event_number2, testLink2a.eventIndex()); + ASSERT_EQ( 1, testLink2a.getEventPositionInCollection(sg)); ASSERT_EQ(particle2,testLink2a.cptr()); // A HepMcParticleLink built using the barcode and the position of - // the GenEvent. BROKEN - HepMcParticleLink testLink2b(particle2->barcode(),1); - ASSERT_FALSE( testLink2b.isValid() ); + // the GenEvent. + HepMcParticleLink testLink2b(particle2->barcode(),1, EBC_MAINEVCOLL, + HepMcParticleLink::IS_POSITION); + ASSERT_TRUE( testLink2b.isValid() ); + ASSERT_EQ( particle2->barcode(), testLink2b.barcode()); + ASSERT_EQ( event_number2, testLink2b.eventIndex()); + ASSERT_EQ( 1, testLink2b.getEventPositionInCollection(sg)); + ASSERT_EQ(particle2,testLink2b.cptr()); // HepMcParticleLink built using a GenParticle pointer and the // event_number of the GenEvent. HepMcParticleLink testLink2c(particle2,event_number2); @@ -351,6 +359,7 @@ namespace MCTesting { ASSERT_EQ( particle2->barcode(), testLink2c.barcode()); ASSERT_NE( 1, testLink2c.eventIndex()); ASSERT_EQ( event_number2, testLink2c.eventIndex()); + ASSERT_EQ( 1, testLink2c.getEventPositionInCollection(sg)); ASSERT_EQ(particle2,testLink2c.cptr()); // A HepMcParticleLink built using the barcode and the event_number of // the GenEvent. @@ -359,22 +368,27 @@ namespace MCTesting { ASSERT_EQ( particle2->barcode(), testLink2d.barcode()); ASSERT_NE( 1, testLink2d.eventIndex()); ASSERT_EQ( event_number2, testLink2d.eventIndex()); + ASSERT_EQ( 1, testLink2d.getEventPositionInCollection(sg)); ASSERT_EQ(particle2,testLink2d.cptr()); //Testing links to the third dummy GenEvent // HepMcParticleLink built using a GenParticle pointer and the // position of the GenEvent. - HepMcParticleLink testLink3a(particle3,2); + HepMcParticleLink testLink3a(particle3,2, EBC_MAINEVCOLL, + HepMcParticleLink::IS_POSITION); ASSERT_TRUE( testLink3a.isValid() ); ASSERT_EQ( particle3->barcode(), testLink3a.barcode()); - ASSERT_EQ( 2, testLink3a.eventIndex()); - ASSERT_NE( event_number3, testLink3a.eventIndex()); + ASSERT_EQ( event_number3, testLink3a.eventIndex()); ASSERT_EQ(particle3,testLink3a.cptr()); // A HepMcParticleLink built using the barcode and the position of - // the GenEvent. BROKEN - HepMcParticleLink testLink3b(particle3->barcode(),2); - ASSERT_FALSE( testLink3b.isValid() ); + // the GenEvent. + HepMcParticleLink testLink3b(particle3->barcode(),2, EBC_MAINEVCOLL, + HepMcParticleLink::IS_POSITION); + ASSERT_TRUE( testLink3b.isValid() ); + ASSERT_EQ( particle3->barcode(), testLink3b.barcode()); + ASSERT_EQ( event_number3, testLink3b.eventIndex()); + ASSERT_EQ(particle3,testLink3b.cptr()); // HepMcParticleLink built using a GenParticle pointer and the // event_number of the GenEvent. HepMcParticleLink testLink3c(particle3,event_number3); @@ -395,7 +409,7 @@ namespace MCTesting { StoreGateSvc* pStore(nullptr); ASSERT_TRUE(MCTesting::g_svcLoc->service("StoreGateSvc", pStore).isSuccess()); - pStore->clearStore(); + pStore->clearStore(true); // forceRemove=true to remove all proxies } } // <-- namespace MCTesting diff --git a/Generators/GeneratorObjectsTPCnv/share/HepMcParticleLinkCnv_p1_test.ref b/Generators/GeneratorObjectsTPCnv/share/HepMcParticleLinkCnv_p1_test.ref index 293789a64a3d2dd8f1d04920fc2606093513e922..075f1607b3a428f1d10a95404d8e0b80d6d77043 100644 --- a/Generators/GeneratorObjectsTPCnv/share/HepMcParticleLinkCnv_p1_test.ref +++ b/Generators/GeneratorObjectsTPCnv/share/HepMcParticleLinkCnv_p1_test.ref @@ -1,7 +1,7 @@ ApplicationMgr SUCCESS ==================================================================================================================================== Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99) - running on karma on Tue Mar 6 11:36:17 2018 + running on karma on Tue Feb 19 21:52:54 2019 ==================================================================================================================================== ApplicationMgr INFO Application Manager Configured successfully EventLoopMgr WARNING Unable to locate service "EventSelector" @@ -10,6 +10,5 @@ HistogramPersis...WARNING Histograms saving not required. ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr Ready test1 -ClassIDSvc INFO getRegistryEntries: read 1157 CLIDRegistry entries for module ALL -ClassIDSvc INFO getRegistryEntries: read 374 CLIDRegistry entries for module ALL -HepMcParticleLink INFO find_hostkey: Using TruthEvent as McEventCollection key for this job +ClassIDSvc INFO getRegistryEntries: read 1853 CLIDRegistry entries for module ALL +HepMcParticleLink INFO find_proxy: Using TruthEvent as McEventCollection key for this job diff --git a/Generators/GeneratorObjectsTPCnv/share/HepMcParticleLinkCnv_p2_test.ref b/Generators/GeneratorObjectsTPCnv/share/HepMcParticleLinkCnv_p2_test.ref index 8633d8ace9b4883a00f6e29e68937582b9b5e684..ad71efce4f8586494b63dcf78e897b1ef39ae84f 100644 --- a/Generators/GeneratorObjectsTPCnv/share/HepMcParticleLinkCnv_p2_test.ref +++ b/Generators/GeneratorObjectsTPCnv/share/HepMcParticleLinkCnv_p2_test.ref @@ -1,3 +1,8 @@ +ApplicationMgr SUCCESS +==================================================================================================================================== + Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99) + running on karma on Tue Feb 19 21:52:20 2019 +==================================================================================================================================== ApplicationMgr INFO Application Manager Configured successfully EventLoopMgr WARNING Unable to locate service "EventSelector" EventLoopMgr WARNING No events will be processed from external input. @@ -5,4 +10,5 @@ HistogramPersis...WARNING Histograms saving not required. ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr Ready test1 -HepMcParticleLink INFO find_hostkey: Using TruthEvent as McEventCollection key for this job +ClassIDSvc INFO getRegistryEntries: read 1853 CLIDRegistry entries for module ALL +HepMcParticleLink INFO find_proxy: Using TruthEvent as McEventCollection key for this job diff --git a/Generators/GeneratorObjectsTPCnv/src/HepMcParticleLinkCnv_p1.cxx b/Generators/GeneratorObjectsTPCnv/src/HepMcParticleLinkCnv_p1.cxx index d3e139790d1067cf235bc070900f25fb5ef2b1d9..a231c671b466e02a079b37f671a31c28ca860a42 100755 --- a/Generators/GeneratorObjectsTPCnv/src/HepMcParticleLinkCnv_p1.cxx +++ b/Generators/GeneratorObjectsTPCnv/src/HepMcParticleLinkCnv_p1.cxx @@ -1,7 +1,7 @@ ///////////////////////// -*- C++ -*- ///////////////////////////// /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // Framework includes @@ -23,11 +23,11 @@ void HepMcParticleLinkCnv_p1::persToTrans( const HepMcParticleLink_p1* persObj, HepMcParticleLink* transObj, MsgStream &/*msg*/ ) { - if (transObj->m_ptrs.m_dict == nullptr) - transObj->init_dict(); - transObj->m_extBarcode = - HepMcParticleLink::ExtendedBarCode( persObj->m_barcode, - persObj->m_mcEvtIndex ); + transObj->setExtendedBarCode + ( HepMcParticleLink::ExtendedBarCode( persObj->m_barcode, + persObj->m_mcEvtIndex, + EBC_MAINEVCOLL, + HepMcParticleLink::IS_POSITION) ); return; } @@ -35,8 +35,8 @@ void HepMcParticleLinkCnv_p1::transToPers( const HepMcParticleLink* transObj, HepMcParticleLink_p1* persObj, MsgStream &/*msg*/ ) { - persObj->m_mcEvtIndex = transObj->eventIndex(); - persObj->m_barcode = transObj->m_extBarcode.barcode(); + persObj->m_mcEvtIndex = transObj->getEventPositionInCollection(SG::CurrentEventStore::store()); + persObj->m_barcode = transObj->barcode(); return; } diff --git a/Generators/GeneratorObjectsTPCnv/src/HepMcParticleLinkCnv_p2.cxx b/Generators/GeneratorObjectsTPCnv/src/HepMcParticleLinkCnv_p2.cxx index f515cf3d99718004c72e93612d153772b8205ec4..ac9e2258b02e0a9ef631f282e7d0802814b884a2 100755 --- a/Generators/GeneratorObjectsTPCnv/src/HepMcParticleLinkCnv_p2.cxx +++ b/Generators/GeneratorObjectsTPCnv/src/HepMcParticleLinkCnv_p2.cxx @@ -1,7 +1,7 @@ ///////////////////////// -*- C++ -*- ///////////////////////////// /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // Framework includes @@ -23,11 +23,11 @@ void HepMcParticleLinkCnv_p2::persToTrans( const HepMcParticleLink_p2* persObj, HepMcParticleLink* transObj, MsgStream &/*msg*/ ) { - if (transObj->m_ptrs.m_dict == nullptr) - transObj->init_dict(); - transObj->m_extBarcode = - HepMcParticleLink::ExtendedBarCode( persObj->m_barcode, - persObj->m_mcEvtIndex ); + transObj->setExtendedBarCode + ( HepMcParticleLink::ExtendedBarCode( persObj->m_barcode, + persObj->m_mcEvtIndex, + HepMcParticleLink::ExtendedBarCode::eventCollectionFromChar(persObj->m_evtColl), + HepMcParticleLink::IS_INDEX) ); return; } @@ -36,8 +36,8 @@ void HepMcParticleLinkCnv_p2::transToPers( const HepMcParticleLink* transObj, MsgStream &/*msg*/ ) { persObj->m_mcEvtIndex = transObj->eventIndex(); - persObj->m_barcode = transObj->m_extBarcode.barcode(); - persObj->m_evtColl = 'a'; // hard-coded until we change the transient class implementation + persObj->m_barcode = transObj->barcode(); + persObj->m_evtColl = transObj->getEventCollectionAsChar(); return; } diff --git a/Generators/GeneratorObjectsTPCnv/test/HepMcParticleLinkCnv_p1_test.cxx b/Generators/GeneratorObjectsTPCnv/test/HepMcParticleLinkCnv_p1_test.cxx index 6102c52d7d8412882384e3ad82c8c00f2bfd1ed8..0e4af50864d09307360e47bee12a62117bf0e2b4 100644 --- a/Generators/GeneratorObjectsTPCnv/test/HepMcParticleLinkCnv_p1_test.cxx +++ b/Generators/GeneratorObjectsTPCnv/test/HepMcParticleLinkCnv_p1_test.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // $Id$ @@ -31,6 +31,7 @@ void compare (const HepMcParticleLink& p1, assert ( p1.isValid() == p2.isValid() ); assert ( p1.barcode() == p2.barcode() ); assert ( p1.eventIndex() == p2.eventIndex() ); + assert ( p1.getEventCollectionAsChar() == p2.getEventCollectionAsChar() ); assert ( p1.cptr() == p2.cptr() ); assert ( p1 == p2 ); } diff --git a/Generators/GeneratorObjectsTPCnv/test/HepMcParticleLinkCnv_p2_test.cxx b/Generators/GeneratorObjectsTPCnv/test/HepMcParticleLinkCnv_p2_test.cxx index fe8836e3357a46235884f5c8e7e2fece573eb452..5284dfa1a0c6b9cac1184ddc85f1b5cb238605e0 100644 --- a/Generators/GeneratorObjectsTPCnv/test/HepMcParticleLinkCnv_p2_test.cxx +++ b/Generators/GeneratorObjectsTPCnv/test/HepMcParticleLinkCnv_p2_test.cxx @@ -26,6 +26,7 @@ void compare (const HepMcParticleLink& p1, assert ( p1.isValid() == p2.isValid() ); assert ( p1.barcode() == p2.barcode() ); assert ( p1.eventIndex() == p2.eventIndex() ); + assert ( p1.getEventCollectionAsChar() == p2.getEventCollectionAsChar() ); assert ( p1.cptr() == p2.cptr() ); assert ( p1 == p2 ); } diff --git a/Generators/GeneratorUtils/share/postJO.PoolOutput.py b/Generators/GeneratorUtils/share/postJO.PoolOutput.py index 9495f2c538bc31bbc2246509a132f7efc38c9cb1..3e572d528fb086116d294de18dfa022017cd3837 100644 --- a/Generators/GeneratorUtils/share/postJO.PoolOutput.py +++ b/Generators/GeneratorUtils/share/postJO.PoolOutput.py @@ -1,6 +1,9 @@ ## Pool persistency for evgen -from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream -stream = AthenaPoolOutputStream("StreamEVGEN") +from AthenaCommon.AppMgr import theApp +stream = theApp.getOutputStream( "StreamEVGEN" ) +if stream is None: + from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream + stream = AthenaPoolOutputStream("StreamEVGEN") stream.OutputFile = "evgen.pool.root" if "OUTFILE" in dir(): stream.OutputFile = OUTFILE diff --git a/HLT/Trigger/TrigControl/TrigCommon/CMakeLists.txt b/HLT/Trigger/TrigControl/TrigCommon/CMakeLists.txt index e042bad54e1a3c244d2a147706d5cd03cbdde0a2..da7204ccbb85684564a25a24c4d7e6df61cd79e9 100644 --- a/HLT/Trigger/TrigControl/TrigCommon/CMakeLists.txt +++ b/HLT/Trigger/TrigControl/TrigCommon/CMakeLists.txt @@ -24,8 +24,8 @@ atlas_add_test( test_AthHLT POST_EXEC_SCRIPT nopost.sh PROPERTIES TIMEOUT 300 ) -#atlas_add_test( athenaHLT_jo_noopts -# SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/share/test_athenaHLT.sh dummy.py) +atlas_add_test( athenaHLT_jo_noopts + SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/share/test_athenaHLT.sh dummy.py) -#atlas_add_test( athenaHLT_jo_allopts -# SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/share/test_athenaHLT.sh --number-of-events 3 --skip-events 7 -l ERROR,FATAL -c 'x=1' -c 'y=2' -C 'x=2' -o out.data --threads 2 --nprocs 4 --timeout 777 --python-setup mysetup.py --partition mypart dummy.py) +atlas_add_test( athenaHLT_jo_allopts + SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/share/test_athenaHLT.sh --number-of-events 3 --skip-events 7 -l ERROR,FATAL -c 'x=1' -c 'y=2' -C 'x=2' -o out.data --threads 2 --nprocs 4 --timeout 777 --oh-monitoring --python-setup mysetup.py --partition mypart dummy.py) diff --git a/HLT/Trigger/TrigControl/TrigCommon/bin/athenaHLT.py b/HLT/Trigger/TrigControl/TrigCommon/bin/athenaHLT.py index e2618adc6dd883dda5a7ad9fd4d45e67508f6bef..70976eeeffbd22cb5d281efd98422e1cfe03fcc8 100755 --- a/HLT/Trigger/TrigControl/TrigCommon/bin/athenaHLT.py +++ b/HLT/Trigger/TrigControl/TrigCommon/bin/athenaHLT.py @@ -141,18 +141,16 @@ def set_athena_flags(args): jp.ConcurrencyFlags.NumProcs = args.nprocs def HLTMPPy_cfgdict(args): - """ - Create the configuration dictionary as expected by HLTMPPy as defined in - https://gitlab.cern.ch/atlas-tdaq-software/HLTMPPU/blob/master/python/HLTMPPy/runner.py - """ + """Create the configuration dictionary as expected by HLTMPPy as defined in + https://gitlab.cern.ch/atlas-tdaq-software/HLTMPPU/blob/master/python/HLTMPPy/runner.py""" cdict = {} cdict['HLTMPPU'] = { - 'application_name' : 'athenaHLT', + 'application_name' : 'athenaHLT-%d' % os.getpid(), # unique name required to avoid interference 'extra_params' : None, 'interactive' : args.interactive, 'log_root' : os.getcwd(), - 'log_name' : ('' if args.unique_log_files else 'worker'), + 'log_name' : ('' if args.unique_log_files else 'athenaHLT:'), 'module' : 'HLTMPPU', 'num_forks' : args.nprocs, 'num_threads' : args.threads, diff --git a/HLT/Trigger/TrigControl/TrigCommon/python/AthHLT.py b/HLT/Trigger/TrigControl/TrigCommon/python/AthHLT.py index 4a4050670f6ba942c13443837eca8c662460ddb0..c5ab6a3d595e338663d03ecd408355d43958e62d 100644 --- a/HLT/Trigger/TrigControl/TrigCommon/python/AthHLT.py +++ b/HLT/Trigger/TrigControl/TrigCommon/python/AthHLT.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration # # Utilities used in athenaHLT.py # @@ -23,8 +23,20 @@ class CondDB: @memoize def get_sor_params(run_number): + import cPickle as pickle + cool_cache = 'AthHLT.sor.pkl' - log.info('Reading SOR record for run %s from COOL' % run_number) + try: + # Try to load the SOR record from the file cache + d = pickle.load(open(cool_cache, 'rb')) + if d['RunNumber'] != run_number: + raise Exception('Cache does not contain current run') + log.info('Reading cached SOR record for run %s from %s' % (run_number, cool_cache)) + return d + except Exception as e: + d = {} + log.verbose('Could not read SOR reacord from cache: %s' % e) + log.info('Reading SOR record for run %s from COOL' % run_number) from CoolConvUtilities import AtlCoolLib cdb = CondDB(run_number) @@ -41,7 +53,13 @@ def get_sor_params(run_number): return None # This can happen for unknown run numbers payload = sor.payload() - return {k: payload[k] for k in payload} + d = {k: payload[k] for k in payload} + try: + pickle.dump(d, open(cool_cache, 'wb')) + except Exception: + log.info('Could not store SOR record in cache %s' % cool_cache) + + return d # diff --git a/HLT/Trigger/TrigControl/TrigCommon/share/athenaHLT_jo_allopts.ref b/HLT/Trigger/TrigControl/TrigCommon/share/athenaHLT_jo_allopts.ref index 9cda86352a9cb6810fa0d1f6828b8916ba6e9a72..ad3e0dc196f7b5af418a117000193309f55891ef 100644 --- a/HLT/Trigger/TrigControl/TrigCommon/share/athenaHLT_jo_allopts.ref +++ b/HLT/Trigger/TrigControl/TrigCommon/share/athenaHLT_jo_allopts.ref @@ -1,25 +1,24 @@ <Configuration> <HLTMPPUApplication> + <childLogName>athenaHLT:</childLogName> <numForks>4</numForks> - <childLogRoot>/scratch/fwinkl/athenaHLT/HLT/Trigger/TrigControl/TrigCommon/unitTestRun</childLogRoot> <InfoServiceLibrary>MonSvcInfoService</InfoServiceLibrary> <softTimeoutFraction>0.9</softTimeoutFraction> <HLTImplementationLibraries> - <library>TrigServices</library> <library>TrigPSC</library> </HLTImplementationLibraries> <UID>HLTMPPy</UID> <HardTimeout>777</HardTimeout> <finalizeTimeout>120</finalizeTimeout> <numberOfEventSlots>2</numberOfEventSlots> - <DataSourceLibrary>DFFileBackend</DataSourceLibrary> + <DataSourceLibrary>DFDcmEmuBackend</DataSourceLibrary> <numberOfAthenaMTThreads>2</numberOfAthenaMTThreads> <DataSource> <HLTDFFileBackend> <preload>False</preload> <numEvents>3</numEvents> <start_id>1</start_id> - <library>DFFileBackend</library> + <library>DFDcmEmuBackend</library> <fileOffset>-1</fileOffset> <UID>DataSource-is-DCM</UID> <compressionLevel>2</compressionLevel> @@ -30,7 +29,7 @@ <fileList> <file>dummy.data</file> </fileList> - <extraL1Robs/> + <extraL1Robs /> </HLTDFFileBackend> </DataSource> <InfoService> @@ -42,7 +41,7 @@ <UID>HltpuConfigurationRuleBundle</UID> <Rules> <ConfigurationRule> - <ExcludeFilter></ExcludeFilter> + <ExcludeFilter /> <Name>Dumm</Name> <UID>HltpuOHRule</UID> <Parameters> @@ -57,7 +56,7 @@ <IncludeFilter>.*</IncludeFilter> </ConfigurationRule> <ConfigurationRule> - <ExcludeFilter></ExcludeFilter> + <ExcludeFilter /> <Name>DummDumm</Name> <UID>HltpuISRule</UID> <Parameters> @@ -78,7 +77,6 @@ </HLTMPPUApplication> <Partition> <UID>mypart</UID> - <LogRoot>/scratch/fwinkl/athenaHLT/HLT/Trigger/TrigControl/TrigCommon/unitTestRun</LogRoot> <TriggerConfiguration> <TriggerConfiguration> <L1TriggerConfiguration> @@ -99,24 +97,21 @@ <preCommand>x=1</preCommand> <preCommand>y=2</preCommand> <preCommand>_run_number=327265</preCommand> - <preCommand>include('TrigServices/OfflineTHistSvc.py')</preCommand> </preCommands> + <showInclude>false</showInclude> <postCommands> <postCommand>x=2</postCommand> </postCommands> <UID>HLTImplementationJobOptions-1</UID> - <evtSel>NONE</evtSel> <HLTCommonParameters> <HLTCommonParameters> - <factoryName></factoryName> - <dllName></dllName> <messageSvcType>TrigMessageSvc</messageSvcType> <jobOptionsSvcType>JobOptionsSvc</jobOptionsSvcType> </HLTCommonParameters> </HLTCommonParameters> <logLevels> - <logLevel>INFO</logLevel> <logLevel>ERROR</logLevel> + <logLevel>FATAL</logLevel> </logLevels> <pythonSetupFile>mysetup.py</pythonSetupFile> <jobOptionsPath>dummy.py</jobOptionsPath> @@ -128,8 +123,8 @@ <Name>dummy</Name> <Server>TRIGGERDB</Server> <Alias>TRIGGERDB</Alias> - <User></User> - <Password></Password> + <User /> + <Password /> <Type>Coral</Type> <SuperMasterKey>0</SuperMasterKey> </TriggerDBConnection> @@ -137,7 +132,7 @@ </TriggerConfiguration> </TriggerConfiguration> </Partition> - <ROS2ROBS/> + <ROS2ROBS /> </Configuration> <RunParams> <totalTime>0</totalTime> @@ -145,12 +140,12 @@ <timeEOR>1/1/70 01:00:00</timeEOR> <det_mask>00000000000000000001fffffffffff7</det_mask> <beam_type>0</beam_type> - <filename_tag></filename_tag> + <filename_tag /> <max_events>0</max_events> <run_number>327265</run_number> <timeSOR>22/11/18 11:02:32.703856</timeSOR> <trigger_type>0</trigger_type> - <T0_project_tag></T0_project_tag> + <T0_project_tag /> <beam_energy>0</beam_energy> <recording_enabled>0</recording_enabled> </RunParams> diff --git a/HLT/Trigger/TrigControl/TrigCommon/share/athenaHLT_jo_noopts.ref b/HLT/Trigger/TrigControl/TrigCommon/share/athenaHLT_jo_noopts.ref index 6083e1b27b98483f5d21fbdef7bfd9089da082bf..6a9df1bf15323d1e619aa3024126b7311874687f 100644 --- a/HLT/Trigger/TrigControl/TrigCommon/share/athenaHLT_jo_noopts.ref +++ b/HLT/Trigger/TrigControl/TrigCommon/share/athenaHLT_jo_noopts.ref @@ -1,25 +1,24 @@ <Configuration> <HLTMPPUApplication> + <childLogName>athenaHLT:</childLogName> <numForks>1</numForks> - <childLogRoot>/scratch/fwinkl/athenaHLT/HLT/Trigger/TrigControl/TrigCommon/unitTestRun</childLogRoot> <InfoServiceLibrary>MonSvcInfoService</InfoServiceLibrary> <softTimeoutFraction>0.9</softTimeoutFraction> <HLTImplementationLibraries> - <library>TrigServices</library> <library>TrigPSC</library> </HLTImplementationLibraries> <UID>HLTMPPy</UID> <HardTimeout>36000</HardTimeout> <finalizeTimeout>120</finalizeTimeout> <numberOfEventSlots>1</numberOfEventSlots> - <DataSourceLibrary>DFFileBackend</DataSourceLibrary> + <DataSourceLibrary>DFDcmEmuBackend</DataSourceLibrary> <numberOfAthenaMTThreads>1</numberOfAthenaMTThreads> <DataSource> <HLTDFFileBackend> <preload>False</preload> <numEvents>-1</numEvents> <start_id>1</start_id> - <library>DFFileBackend</library> + <library>DFDcmEmuBackend</library> <fileOffset>-1</fileOffset> <UID>DataSource-is-DCM</UID> <compressionLevel>2</compressionLevel> @@ -29,7 +28,7 @@ <fileList> <file>dummy.data</file> </fileList> - <extraL1Robs/> + <extraL1Robs /> </HLTDFFileBackend> </DataSource> <InfoService> @@ -41,7 +40,7 @@ <UID>HltpuConfigurationRuleBundle</UID> <Rules> <ConfigurationRule> - <ExcludeFilter></ExcludeFilter> + <ExcludeFilter /> <Name>Dumm</Name> <UID>HltpuOHRule</UID> <Parameters> @@ -56,7 +55,7 @@ <IncludeFilter>.*</IncludeFilter> </ConfigurationRule> <ConfigurationRule> - <ExcludeFilter></ExcludeFilter> + <ExcludeFilter /> <Name>DummDumm</Name> <UID>HltpuISRule</UID> <Parameters> @@ -77,7 +76,6 @@ </HLTMPPUApplication> <Partition> <UID>athenaHLT</UID> - <LogRoot>/scratch/fwinkl/athenaHLT/HLT/Trigger/TrigControl/TrigCommon/unitTestRun</LogRoot> <TriggerConfiguration> <TriggerConfiguration> <L1TriggerConfiguration> @@ -96,15 +94,12 @@ </libraries> <preCommands> <preCommand>_run_number=327265</preCommand> - <preCommand>include('TrigServices/OfflineTHistSvc.py')</preCommand> </preCommands> - <postCommands/> + <showInclude>false</showInclude> + <postCommands /> <UID>HLTImplementationJobOptions-1</UID> - <evtSel>NONE</evtSel> <HLTCommonParameters> <HLTCommonParameters> - <factoryName></factoryName> - <dllName></dllName> <messageSvcType>TrigMessageSvc</messageSvcType> <jobOptionsSvcType>JobOptionsSvc</jobOptionsSvcType> </HLTCommonParameters> @@ -123,8 +118,8 @@ <Name>dummy</Name> <Server>TRIGGERDB</Server> <Alias>TRIGGERDB</Alias> - <User></User> - <Password></Password> + <User /> + <Password /> <Type>Coral</Type> <SuperMasterKey>0</SuperMasterKey> </TriggerDBConnection> @@ -132,7 +127,7 @@ </TriggerConfiguration> </TriggerConfiguration> </Partition> - <ROS2ROBS/> + <ROS2ROBS /> </Configuration> <RunParams> <totalTime>0</totalTime> @@ -140,12 +135,12 @@ <timeEOR>1/1/70 01:00:00</timeEOR> <det_mask>00000000000000000001fffffffffff7</det_mask> <beam_type>0</beam_type> - <filename_tag></filename_tag> + <filename_tag /> <max_events>0</max_events> <run_number>327265</run_number> <timeSOR>22/11/18 11:02:32.703856</timeSOR> <trigger_type>0</trigger_type> - <T0_project_tag></T0_project_tag> + <T0_project_tag /> <beam_energy>0</beam_energy> <recording_enabled>0</recording_enabled> </RunParams> diff --git a/HLT/Trigger/TrigControl/TrigCommon/share/test_athenaHLT.sh b/HLT/Trigger/TrigControl/TrigCommon/share/test_athenaHLT.sh index 4ae2f732aae7b2a6a2c9328efa268d00b9461c45..5ee5a5490e9cd7c987ce93cbb1ceb9ecb536b1e4 100755 --- a/HLT/Trigger/TrigControl/TrigCommon/share/test_athenaHLT.sh +++ b/HLT/Trigger/TrigControl/TrigCommon/share/test_athenaHLT.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration # # Configuration testing script for athenaHLT.py # @@ -9,8 +10,8 @@ test_options=$@ trap cleanup INT TERM EXIT function cleanup { sid=`ps -o sess= -p $$` # our own session id - pkill -9 --parent 1 --session $sid ipc_server - pkill -9 --parent 1 --session $sid is_server + pkill -9 -P 1 -s $sid ipc_server + pkill -9 -P 1 -s $sid is_server } # We only test the configuration stage, so these dummy values are just fine. @@ -22,4 +23,6 @@ detmask="00000000000000000001fffffffffff7" # Run only config stage (exit immediately via interactive mode) and filter final ptree # If there was a failure, the exit code will be non-zero -echo "e" | athenaHLT.py --file ${file} --detector-mask ${detmask} --run-number ${run} --sor-time ${sortime} --interactive ${test_options} | sed -n '/<Configuration>/,/<\/Magnets>/p;/<\/Magnets>/q' | grep '<' +log=test_athenaHLT-${BASHPID} +echo "e" | athenaHLT.py --file ${file} --detector-mask ${detmask} --run-number ${run} --sor-time ${sortime} --interactive ${test_options} &> $log +cat $log | sed -n '/<Configuration>/,/<\/Magnets>/p;/<\/Magnets>/q' | grep '<' | grep -v 'LogRoot' diff --git a/HLT/Trigger/TrigControl/TrigServices/CMakeLists.txt b/HLT/Trigger/TrigControl/TrigServices/CMakeLists.txt index 90df1bb827479f4b16b52d6243e582543a598272..e778a7736a982b223e085bca97a4c56b21a02154 100644 --- a/HLT/Trigger/TrigControl/TrigServices/CMakeLists.txt +++ b/HLT/Trigger/TrigControl/TrigServices/CMakeLists.txt @@ -32,6 +32,7 @@ find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) find_package( tdaq COMPONENTS omniORB4 omnithread ipc is owl ) find_package( tdaq-common COMPONENTS CTPfragment eformat eformat_write hltinterface ) +find_package( TBB ) # Component(s) in the package: atlas_add_library( TrigServicesLib diff --git a/HLT/Trigger/TrigControl/TrigServices/python/TrigServicesConfig.py b/HLT/Trigger/TrigControl/TrigServices/python/TrigServicesConfig.py index ab121e6cb5fa9c30003b50ab380385ba246b63d3..4f7f02252d2c028da54c2a435c08c49f4d327aae 100644 --- a/HLT/Trigger/TrigControl/TrigServices/python/TrigServicesConfig.py +++ b/HLT/Trigger/TrigControl/TrigServices/python/TrigServicesConfig.py @@ -41,7 +41,7 @@ def setupMessageSvc(): MessageSvc = svcMgr.MessageSvc MessageSvc.OutputLevel = theApp.OutputLevel - MessageSvc.Format = "%t % F%35W%S%4W%e%s%7W%R%T %0W%M" + MessageSvc.Format = "% F%40W%S%4W%e%s%7W%R%T %0W%M" # Message suppression MessageSvc.enableSuppression = False @@ -75,3 +75,34 @@ def setupMessageSvc(): # publish message counts during RUNNING in histogram MessageSvc.publishStats = True MessageSvc.publishLevel = INFO + +# online ROB data provider service +from TrigServicesConf import HltROBDataProviderSvc as _HltROBDataProviderSvc +class HltROBDataProviderSvc(_HltROBDataProviderSvc): + __slots__ = () + + def __init__(self, name='ROBDataProviderSvc'): + super(HltROBDataProviderSvc, self).__init__(name) + from AthenaMonitoring.GenericMonitoringTool import GenericMonitoringTool,defineHistogram + self.MonTool = GenericMonitoringTool('MonTool') + self.MonTool.Histograms = [ + defineHistogram('TIME_ROBReserveData', path='EXPERT', type='TH1F', + title='Time to reserve ROBs for later retrieval;time [ms]', + xbins=100, xmin=0, xmax=100), + defineHistogram('NUMBER_ROBReserveData', path='EXPERT', type='TH1F', + title='Number of reserved ROBs for later retrieval;number', + xbins=100, xmin=0, xmax=500), + defineHistogram('TIME_ROBRequest', path='EXPERT', type='TH1F', + title='Time for ROB retrievals;time [ms]', + xbins=100, xmin=0, xmax=500), + defineHistogram('NUMBER_ROBRequest', path='EXPERT', type='TH1F', + title='Number of retrieved ROBs;number', + xbins=100, xmin=0, xmax=1000), + defineHistogram('TIME_CollectAllROBs', path='EXPERT', type='TH1F', + title='Time for retrieving complete event data;time [ms]', + xbins=100, xmin=0, xmax=1000), + defineHistogram('NUMBER_CollectAllROBs', path='EXPERT', type='TH1F', + title='Number of received ROBs for collect call;number', + xbins=100, xmin=0, xmax=2500) + ] + return diff --git a/HLT/Trigger/TrigControl/TrigServices/python/TriggerUnixStandardSetup.py b/HLT/Trigger/TrigControl/TrigServices/python/TriggerUnixStandardSetup.py index edee483270a46d0448bec4ece286421f975e8f14..8523783a3fa3c58edc6705bc4a4d44abc2630b06 100644 --- a/HLT/Trigger/TrigControl/TrigServices/python/TriggerUnixStandardSetup.py +++ b/HLT/Trigger/TrigControl/TrigServices/python/TriggerUnixStandardSetup.py @@ -65,6 +65,23 @@ def setupCommonServices(): from PyUtils.Helpers import ROOT6Setup ROOT6Setup() + # Setup online THistSvc unless specifically configured otherwise + # setup the THistSvc early and force the creation of the ThistSvc + # so that it can be used by infrastructure services to book histograms + # (to avoid problems e.g. with histograms in ROBDataProviderSvc) + if _Conf.useOnlineTHistSvc: + if hasattr(svcMgr, 'THistSvc'): + log.fatal("The offline histogramming THistSvc is already in place.") + raise RuntimeError("Cannot setup online histogramming TrigMonTHistSvc") + log.debug("Using online histogramming service (TrigMonTHistSvc)") + from TrigServices.TrigServicesConf import TrigMonTHistSvc + svcMgr += TrigMonTHistSvc("THistSvc") + else: + log.debug("Using offline histogramming service (THistSvc)") + from GaudiSvc.GaudiSvcConf import THistSvc + svcMgr += THistSvc() + theApp.CreateSvc += [ svcMgr.THistSvc.getFullName() ] + # StoreGateSvc svcMgr.StoreGateSvc.ActivateHistory = False @@ -109,18 +126,9 @@ def setupCommonServices(): from TrigServices.TrigServicesConfig import TrigCOOLUpdateHelper svcMgr.HltEventLoopMgr.CoolUpdateTool = TrigCOOLUpdateHelper() - # Setup online THistSvc unless specifically configured otherwise - if _Conf.useOnlineTHistSvc: - if hasattr(svcMgr, 'THistSvc'): - log.fatal("The offline histogramming THistSvc is already in place.") - raise RuntimeError("Cannot setup online histogramming TrigMonTHistSvc") - log.debug("Using online histogramming service (TrigMonTHistSvc)") - from TrigServices.TrigServicesConf import TrigMonTHistSvc - svcMgr += TrigMonTHistSvc("THistSvc") - else: - log.debug("Using offline histogramming service (THistSvc)") - from GaudiSvc.GaudiSvcConf import THistSvc - svcMgr += THistSvc() + # Configure the online ROB data provider service + from TrigServices.TrigServicesConfig import HltROBDataProviderSvc + svcMgr += HltROBDataProviderSvc() # Explicitly set a few OutputLevels (needed because some services are created in # different order when running with the PSC) @@ -155,7 +163,6 @@ def setupCommonServicesEnd(): if 1 not in [ o.count('EXPERT') for o in svcMgr.THistSvc.Output ]: svcMgr.THistSvc.Output += ["EXPERT DATAFILE='expert-monitoring.root' OPT='RECREATE'"] - # Set default properties for some important services after all user job options log.info('Configure core services for online runnig') diff --git a/HLT/Trigger/TrigControl/TrigServices/src/HltEventLoopMgr.cxx b/HLT/Trigger/TrigControl/TrigServices/src/HltEventLoopMgr.cxx index 76a6599cbe003f71db75ba8015b4c7928881910b..c49c1fc21767e4165e679f5f6bf109532a046639 100644 --- a/HLT/Trigger/TrigControl/TrigServices/src/HltEventLoopMgr.cxx +++ b/HLT/Trigger/TrigControl/TrigServices/src/HltEventLoopMgr.cxx @@ -72,6 +72,7 @@ using namespace boost::property_tree; HltEventLoopMgr::HltEventLoopMgr(const std::string& name, ISvcLocator* svcLoc) : base_class(name, svcLoc), m_incidentSvc("IncidentSvc", name), + m_jobOptionsSvc("JobOptionsSvc", name), m_evtStore("StoreGateSvc", name), m_detectorStore("DetectorStore", name), m_inputMetaDataStore("StoreGateSvc/InputMetaDataStore", name), @@ -107,14 +108,6 @@ StatusCode HltEventLoopMgr::initialize() // JobOptions type SmartIF<IProperty> propMgr = serviceLocator()->service<IProperty>("ApplicationMgr"); if (propMgr.isValid()) { - try { - if (m_jobOptionsType.assign( propMgr->getProperty("JobOptionsType") )) - ATH_MSG_DEBUG(" ---> Read from DataFlow configuration: " << m_jobOptionsType); - } - catch (...) { - ATH_REPORT_MESSAGE(MSG::WARNING) << "Could not set Property '" << m_jobOptionsType.name() << "' from DataFlow"; - } - if ( m_topAlgNames.value().empty() ) { if (setProperty(propMgr->getProperty("TopAlg")).isFailure()) { ATH_REPORT_MESSAGE(MSG::WARNING) << "Could not set the TopAlg property from ApplicationMgr"; @@ -125,39 +118,28 @@ StatusCode HltEventLoopMgr::initialize() ATH_REPORT_MESSAGE(MSG::WARNING) << "Error retrieving IProperty interface of ApplicationMgr"; } - // get JobOptionsSvc to read the configuration of NumConcurrentEvents and NumThreads - ServiceHandle<IJobOptionsSvc> jobOptionsSvc("JobOptionsSvc", name()); - if ((jobOptionsSvc.retrieve()).isFailure()) { - ATH_REPORT_MESSAGE(MSG::WARNING) << "Could not find JobOptionsSvc to read configuration"; - } + ATH_CHECK( m_jobOptionsSvc.retrieve() ); // print properties ATH_MSG_INFO(" ---> ApplicationName = " << m_applicationName); - ATH_MSG_INFO(" ---> PartitionName = " << m_partitionName); - ATH_MSG_INFO(" ---> JobOptionsType = " << m_jobOptionsType); - ATH_MSG_INFO(" ---> HardTimeout = " << m_hardTimeout); - ATH_MSG_INFO(" ---> SoftTimeoutFraction = " << m_softTimeoutFraction); - ATH_MSG_INFO(" ---> MaxFrameworkErrors = " << m_maxFrameworkErrors); - ATH_MSG_INFO(" ---> FwkErrorDebugStreamName = " << m_fwkErrorDebugStreamName); - ATH_MSG_INFO(" ---> AlgErrorDebugStreamName = " << m_algErrorDebugStreamName); + ATH_MSG_INFO(" ---> HardTimeout = " << m_hardTimeout.value()); + ATH_MSG_INFO(" ---> SoftTimeoutFraction = " << m_softTimeoutFraction.value()); + ATH_MSG_INFO(" ---> MaxFrameworkErrors = " << m_maxFrameworkErrors.value()); + ATH_MSG_INFO(" ---> FwkErrorDebugStreamName = " << m_fwkErrorDebugStreamName.value()); + ATH_MSG_INFO(" ---> AlgErrorDebugStreamName = " << m_algErrorDebugStreamName.value()); ATH_MSG_INFO(" ---> EventContextWHKey = " << m_eventContextWHKey.key()); ATH_MSG_INFO(" ---> EventInfoRHKey = " << m_eventInfoRHKey.key()); - if (jobOptionsSvc.isValid()) { - const Gaudi::Details::PropertyBase* prop = jobOptionsSvc->getClientProperty("EventDataSvc","NSlots"); - if (prop) - ATH_MSG_INFO(" ---> NumConcurrentEvents = " << *prop); - else - ATH_REPORT_MESSAGE(MSG::WARNING) << "Failed to retrieve the job property EventDataSvc.NSlots"; - prop = jobOptionsSvc->getClientProperty("AvalancheSchedulerSvc","ThreadPoolSize"); - if (prop) - ATH_MSG_INFO(" ---> NumThreads = " << *prop); - else - ATH_REPORT_MESSAGE(MSG::WARNING) << "Failed to retrieve the job property AvalancheSchedulerSvc.ThreadPoolSize"; - } - ATH_MSG_INFO(" ---> Enabled ROBs: size = " << m_enabledROBs.value().size() - << (m_enabledROBs.value().size()==0 ? ". No check will be performed" : " ")); - ATH_MSG_INFO(" ---> Enabled Sub Detectors: size = " << m_enabledSubDetectors.value().size() - << (m_enabledSubDetectors.value().size()==0 ? ". No check will be performed" : " ")); + + const Gaudi::Details::PropertyBase* prop = m_jobOptionsSvc->getClientProperty("EventDataSvc","NSlots"); + if (prop) + ATH_MSG_INFO(" ---> NumConcurrentEvents = " << prop->toString()); + else + ATH_REPORT_MESSAGE(MSG::WARNING) << "Failed to retrieve the job property EventDataSvc.NSlots"; + prop = m_jobOptionsSvc->getClientProperty("AvalancheSchedulerSvc","ThreadPoolSize"); + if (prop) + ATH_MSG_INFO(" ---> NumThreads = " << prop->toString()); + else + ATH_REPORT_MESSAGE(MSG::WARNING) << "Failed to retrieve the job property AvalancheSchedulerSvc.ThreadPoolSize"; //---------------------------------------------------------------------------- // Create and initialise the top level algorithms @@ -381,28 +363,15 @@ StatusCode HltEventLoopMgr::prepareForRun(const ptree& pt) // (void)TClass::GetClass("vector<unsigned short>"); // preload to overcome an issue with dangling references in serialization // (void)TClass::GetClass("vector<unsigned long>"); - // do the necessary resets - ATH_CHECK(clearTemporaryStores()); - - // update SOR in det store - ATH_CHECK( processRunParams(pt) ); + ATH_CHECK(clearTemporaryStores()); // do the necessary resets + ATH_CHECK( processRunParams(pt) ); // update SOR in det store + ATH_CHECK( updateMagField(pt) ); // update magnetic field auto& soral = getSorAttrList(); updateInternal(soral); // update internally kept info updateMetadataStore(soral); // update metadata store - /* Old code: kept for reference for the moment - const EventInfo * evinfo; - if(updMagField(pt).isFailure() || // update mag field when appropriate - updHLTConfigSvc().isFailure() || // update config svc when appropriate - prepXAODEventInfo().isFailure() || // update xAOD event data in SG - !(evinfo = prepEventInfo())) // update old event data in SG - return StatusCode::FAILURE; - - bookAllHistograms(); - */ - // start top level algorithms for (auto& ita : m_topAlgList) { ATH_CHECK(ita->sysStart()); @@ -447,7 +416,7 @@ StatusCode HltEventLoopMgr::hltUpdateAfterFork(const ptree& /*pt*/) ATH_MSG_VERBOSE("start of " << __FUNCTION__); updateDFProps(); - ATH_MSG_INFO("Post-fork initialization for " << m_applicationName.value()); + ATH_MSG_INFO("Post-fork initialization for " << m_applicationName); ATH_MSG_DEBUG("Initialising the scheduler after forking"); m_schedulerSvc = serviceLocator()->service(m_schedulerName, /*createIf=*/ true); @@ -473,7 +442,9 @@ StatusCode HltEventLoopMgr::hltUpdateAfterFork(const ptree& /*pt*/) SmartIF<IIoComponent> histsvc = serviceLocator()->service("THistSvc", /*createIf=*/ false).as<IIoComponent>(); if ( !m_ioCompMgr->io_retrieve(histsvc.get()).empty() ) { boost::filesystem::path worker_dir = boost::filesystem::absolute("athenaHLT_workers"); - worker_dir /= m_applicationName.value(); + std::ostringstream oss; + oss << "athenaHLT-" << std::setfill('0') << std::setw(2) << m_workerId; + worker_dir /= oss.str(); // Delete worker directory if it exists already if ( boost::filesystem::exists(worker_dir) ) { if ( !boost::filesystem::remove_all(worker_dir) ) { @@ -759,56 +730,19 @@ StatusCode HltEventLoopMgr::executeEvent(void* pEvtContext) // ============================================================================= void HltEventLoopMgr::updateDFProps() { - ATH_MSG_VERBOSE("start of " << __FUNCTION__); - ServiceHandle<IJobOptionsSvc> p_jobOptionsSvc("JobOptionsSvc", name()); - if ((p_jobOptionsSvc.retrieve()).isFailure()) { - ATH_REPORT_MESSAGE(MSG::WARNING) << "Could not find JobOptionsSvc to set DataFlow properties"; - } else { - auto dfprops = p_jobOptionsSvc->getProperties("DataFlowConfig"); - - // Application name - auto pname = "DF_ApplicationName"; - const auto * prop = Gaudi::Utils::getProperty(dfprops, pname); - if(prop && m_applicationName.assign(*prop)) { - ATH_MSG_DEBUG(" ---> Read from DataFlow configuration: " << m_applicationName); - } else { - ATH_REPORT_MESSAGE(MSG::WARNING) << "Could not set Property '" << pname << "' from DataFlow"; - } - - // Partition name - pname = "DF_PartitionName"; - prop = Gaudi::Utils::getProperty(dfprops, pname); - if (prop && m_partitionName.assign(*prop)) { - ATH_MSG_DEBUG(" ---> Read from DataFlow configuration: " << m_partitionName); - } else { - ATH_REPORT_MESSAGE(MSG::WARNING) << "Could not set Property '" << pname << "' from DataFlow"; - } - - // get the list of enabled ROBs - pname = "DF_Enabled_ROB_IDs"; - prop = Gaudi::Utils::getProperty(dfprops, pname); - if (prop && m_enabledROBs.assign(*prop)) { - ATH_MSG_DEBUG(" ---> Read from DataFlow configuration: " - << m_enabledROBs.value().size() << " enabled ROB IDs"); - } else { - // this is only info, because it is normal in athenaHLT - ATH_MSG_INFO("Could not set Property '" << pname << "' from DataFlow"); - } - - // get the list of enabled Sub Detectors - pname = "DF_Enabled_SubDet_IDs"; - prop = Gaudi::Utils::getProperty(dfprops, pname); - if (prop && m_enabledSubDetectors.assign(*prop)) { - ATH_MSG_DEBUG(" ---> Read from DataFlow configuration: " - << m_enabledSubDetectors.value().size() << " enabled Sub Detector IDs"); - } else { - // this is only info, because it is normal in athenaHLT - ATH_MSG_INFO("Could not set Property '" << pname << "' from DataFlow"); - } - } - - p_jobOptionsSvc.release().ignore(); - ATH_MSG_VERBOSE("end of " << __FUNCTION__); + auto getDFProp = [&](const std::string& name, std::string& value, bool required = true) { + const auto* prop = m_jobOptionsSvc->getClientProperty("DataFlowConfig", name); + if (prop) { + value = prop->toString(); + ATH_MSG_INFO(" ---> Read from DataFlow configuration: " << name << " = " << value); + } else { + msg() << (required ? MSG::WARNING : MSG::INFO) + << "Could not set Property " << name << " from DataFlow" << endmsg; + } + }; + + getDFProp( "DF_ApplicationName", m_applicationName ); + getDFProp( "DF_WorkerId", m_workerId, false ); } // ============================================================================= @@ -885,9 +819,41 @@ void HltEventLoopMgr::updateMetadataStore(const coral::AttributeList & sor_attrl else { ATH_MSG_DEBUG("Recorded MetaData in InputMetaDataStore"); } +} + +//========================================================================= +StatusCode HltEventLoopMgr::updateMagField(const ptree& pt) const +{ + if (m_setMagFieldFromPtree) { + try { + auto tor_cur = pt.get<float>("Magnets.ToroidsCurrent.value"); + auto sol_cur = pt.get<float>("Magnets.SolenoidCurrent.value"); + IProperty* fieldSvc{nullptr}; + service("AtlasFieldSvc", fieldSvc, /*createIf=*/false).ignore(); + if ( fieldSvc==nullptr ) { + ATH_MSG_ERROR("Cannot retrieve AtlasFieldSvc"); + return StatusCode::FAILURE; + } + + ATH_CHECK( Gaudi::Utils::setProperty(fieldSvc, "UseSoleCurrent", sol_cur) ); + ATH_CHECK( Gaudi::Utils::setProperty(fieldSvc, "UseToroCurrent", tor_cur) ); + + ATH_MSG_INFO("*****************************************"); + ATH_MSG_INFO(" Auto-configuration of magnetic field: "); + ATH_MSG_INFO(" solenoid current from IS = " << sol_cur); + ATH_MSG_INFO(" torroid current from IS = " << tor_cur); + ATH_MSG_INFO("*****************************************"); + } + catch(ptree_bad_path& e) { + ATH_MSG_ERROR( "Cannot read magnet currents from ptree: " << e.what() ); + return StatusCode::FAILURE; + } + } + return StatusCode::SUCCESS; } + // ============================================================================= StatusCode HltEventLoopMgr::clearTemporaryStores() { diff --git a/HLT/Trigger/TrigControl/TrigServices/src/HltEventLoopMgr.h b/HLT/Trigger/TrigControl/TrigServices/src/HltEventLoopMgr.h index 3b237ed7c1c4efd20d5d42b5c1cd2456a328aca4..182d6a8f7a210d729cd079d99e065784a4e21831 100644 --- a/HLT/Trigger/TrigControl/TrigServices/src/HltEventLoopMgr.h +++ b/HLT/Trigger/TrigControl/TrigServices/src/HltEventLoopMgr.h @@ -43,6 +43,7 @@ class IAlgorithm; class IAlgResourcePool; class IHiveWhiteBoard; class IIncidentSvc; +class IJobOptionsSvc; class IROBDataProviderSvc; class IScheduler; class ITHistSvc; @@ -116,9 +117,6 @@ private: // ------------------------- Helper methods ---------------------------------- - /// Check if running in partition - bool validPartition() const; - /// Read DataFlow configuration properties void updateDFProps(); @@ -131,6 +129,9 @@ private: // Update internally kept data from new sor void updateMetadataStore(const coral::AttributeList & sor_attrlist) const; + /// Set magnetic field currents from ptree + StatusCode updateMagField(const boost::property_tree::ptree& pt) const; + /// Clear per-event stores StatusCode clearTemporaryStores(); @@ -168,6 +169,7 @@ private: // ------------------------- Handles to required services/tools -------------- ServiceHandle<IIncidentSvc> m_incidentSvc; + ServiceHandle<IJobOptionsSvc> m_jobOptionsSvc; ServiceHandle<StoreGateSvc> m_evtStore; ServiceHandle<StoreGateSvc> m_detectorStore; ServiceHandle<StoreGateSvc> m_inputMetaDataStore; @@ -186,17 +188,6 @@ private: SmartIF<ITrigROBDataProviderSvc> m_hltROBDataProviderSvc; // ------------------------- Other properties -------------------------------------- - Gaudi::Property<std::string> m_jobOptionsType{ - this, "JobOptionsType", "NONE", "'NONE' or 'DB'"}; - - Gaudi::Property<std::string> m_applicationName{ - this, "ApplicationName", "None", - "Application Name (='None' or 'athenaHLT' for simulated data, 'HLTMPPU-xx' in online environment)"}; - - Gaudi::Property<std::string> m_partitionName{ - this, "PartitionName", "None", - "Partition Name (='None' for offline, real partition name in online environment)"}; - Gaudi::Property<std::string> m_schedulerName{ this, "SchedulerSvc", "AvalancheSchedulerSvc", "Name of the scheduler"}; @@ -206,12 +197,6 @@ private: Gaudi::Property<std::vector<std::string> > m_topAlgNames{ this, "TopAlg", {}, "List of top level algorithms names"}; - Gaudi::Property<std::vector<uint32_t>> m_enabledROBs{ - this, "enabledROBs", {}, "list of all enabled ROBs which can be retrieved"}; - - Gaudi::Property<std::vector<uint32_t>> m_enabledSubDetectors{ - this, "enabledSubDetectors", {}, "list of enabled Subdetectors"}; - Gaudi::Property<float> m_hardTimeout{ this, "HardTimeout", 10*60*1000/*=10min*/, "Hard event processing timeout in milliseconds"}; @@ -230,15 +215,18 @@ private: this, "AlgErrorDebugStreamName", "HLTError", "Debug stream name for events with HLT algorithm errors"}; + Gaudi::Property<std::string> m_sorPath{ + this, "SORPath", "/TDAQ/RunCtrl/SOR_Params", "Path to StartOfRun parameters in detector store"}; + + Gaudi::Property<bool> m_setMagFieldFromPtree{ + this, "setMagFieldFromPtree", false, "Read magnet currents from ptree"}; + SG::WriteHandleKey<EventContext> m_eventContextWHKey{ this, "EventContextWHKey", "EventContext", "StoreGate key for recording EventContext"}; SG::ReadHandleKey<EventInfo> m_eventInfoRHKey{ this, "EventInfoRHKey", "ByteStreamEventInfo", "StoreGate key for reading EventInfo"}; - Gaudi::Property<std::string> m_sorPath{ - this, "SORPath", "/TDAQ/RunCtrl/SOR_Params", "Path to StartOfRun parameters in detector store"}; - SG::ReadHandleKey<HLT::HLTResultMT> m_hltResultRHKey; ///< StoreGate key for reading the HLT result // ------------------------- Other private members --------------------------- @@ -253,7 +241,7 @@ private: /// "Event" context of current run (invalid event/slot) EventContext m_currentRunCtx; /// Event counter used for local bookkeeping; incremental per instance of HltEventLoopMgr, unrelated to global_id - size_t m_localEventNumber; + size_t m_localEventNumber{0}; /// Event selector context IEvtSelector::Context* m_evtSelContext; /// Vector of top level algorithms @@ -273,12 +261,13 @@ private: /// Flag set to false if timer thread should be stopped std::atomic<bool> m_runEventTimer; /// Counter of framework errors - int m_nFrameworkErrors; -}; + int m_nFrameworkErrors{0}; + /// Application name + std::string m_applicationName; + /// Worker ID + std::string m_workerId; -//============================================================================== -inline bool HltEventLoopMgr::validPartition() const { - return (m_partitionName.value()!="None" && m_partitionName.value()!="NONE"); -} + +}; #endif // TRIGSERVICES_HLTEVENTLOOPMGR_H diff --git a/HLT/Trigger/TrigControl/TrigServices/src/HltROBDataProviderSvc.cxx b/HLT/Trigger/TrigControl/TrigServices/src/HltROBDataProviderSvc.cxx index a1451a407ebcb4bcda12fc7087f06b1ff4c428de..a796a8f58d3a423bd2e7e2dfb50c43fe4e3c2d78 100644 --- a/HLT/Trigger/TrigControl/TrigServices/src/HltROBDataProviderSvc.cxx +++ b/HLT/Trigger/TrigControl/TrigServices/src/HltROBDataProviderSvc.cxx @@ -1,137 +1,109 @@ /* Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ - -// Include files. #include "HltROBDataProviderSvc.h" -#include "TrigMonitorBase/TrigLockedHist.h" -#include "StoreGate/StoreGateSvc.h" -#include "GaudiKernel/ISvcLocator.h" -#include "GaudiKernel/ITHistSvc.h" +#include "TrigKernel/HltExceptions.h" + +// Gaudi #include "GaudiKernel/IJobOptionsSvc.h" -#include "GaudiKernel/Property.h" -#include "GaudiKernel/IIncidentSvc.h" -#include "GaudiKernel/IAlgContextSvc.h" -#include "GaudiKernel/IAlgorithm.h" + +// hltinterface / data collector #include "hltinterface/DataCollector.h" -#include "eformat/Version.h" - -#include <iostream> -#include <sstream> -#include <iomanip> -#include <cassert> -#include <bitset> -#include <TH1F.h> -#include <TH2F.h> - -#if ROOT_VERSION_CODE >= ROOT_VERSION(6,0,0) -# define CAN_REBIN(hist) hist->SetCanExtend(TH1::kAllAxes) -#else -# define CAN_REBIN(hist) hist->SetBit(TH1::kCanRebin) -#endif - -namespace HltROBDataProviderConstants { - // reserve a number of ROB monitor collections - static const int Number_of_Rob_Monitor_Structs = 10; - // number of ROBs in an event, used to reserve space in an array - static const int Max_Number_Of_ROBs = 2000; -} -// Constructor. -HltROBDataProviderSvc::HltROBDataProviderSvc(const std::string& name, ISvcLocator* svcloc) -:ROBDataProviderSvc(name,svcloc), - m_storeGateSvc( "StoreGateSvc", name ), - m_algContextSvc(0), - m_onlineRunning(false), - m_removeEmptyROB(false), - m_isEventComplete(false), - m_callerName("UNKNOWN"), - m_RobRequestInfo(0), - m_histProp_requestedROBsPerCall(Gaudi::Histo1DDef("RequestedROBsPerCall" ,0,300,50)), - m_histProp_receivedROBsPerCall(Gaudi::Histo1DDef("ReceivedROBsPerCall" ,0,300,50)), - m_histProp_timeROBretrieval(Gaudi::Histo1DDef("TimeForROBretrieval" ,0.,500.,50)), - m_hist_requestedROBsPerCall(0), - m_hist_receivedROBsPerCall(0), - m_hist_timeROBretrieval(0), - m_hist_genericStatusForROB(0), - m_hist_specificStatusForROB(0) +// eformat +#include "eformat/Status.h" +#include "eformat/write/FullEventFragment.h" // max number of possible ROB fragments + +// Athena + +HltROBDataProviderSvc::HltROBDataProviderSvc(const std::string& name, ISvcLocator* pSvcLocator) : + base_class(name, pSvcLocator) { - declareProperty("ignoreROB", m_ignoreROB,"List of ROBs to ignore for retrieval"); - declareProperty("enabledROBs", m_enabledROBs,"List of enabled detector ROBs"); - declareProperty("LArMetROBs", m_enabledLArMetROBs,"List of enabled LAr MET ROBs"); - declareProperty("TileMetROBs", m_enabledTileMetROBs,"List of enabled Tile MET ROBs"); - declareProperty("readROBfromOKS", m_readROBfromOKS=true,"Read enabled ROBs from OKS"); - declareProperty("doMonitoring", m_doMonitoring=false,"Enable histograms"); - declareProperty("doDetailedROBMonitoring", m_doDetailedROBMonitoring=false,"Produce ROB cost data"); - declareProperty("ROBDataMonitorCollectionSGName", m_ROBDataMonitorCollection_SG_Name="ROBDataMonitorCollection","Name of cost monitoring collection in SG"); - declareProperty("HistRequestedROBsPerCall", m_histProp_requestedROBsPerCall,"Number of ROBs requested"); - declareProperty("HistReceivedROBsPerCall", m_histProp_receivedROBsPerCall,"Number of ROBs received"); - declareProperty("HistTimeROBretrieval", m_histProp_timeROBretrieval,"Timing for ROB retrieval"); - declareProperty("ModuleIDGenericLArMetROB", m_genericLArMetModuleID=0xffff,"Generic module id for LAr MET ROB retrieval"); - declareProperty("ModuleIDGenericTileMetROB", m_genericTileMetModuleID=0xffff,"Generic module id for Tile MET ROB retrieval"); - declareProperty("SeparateMETandDetROBRetrieval", m_separateMETandDetROBRetrieval=true,"Separate retrieval of MET and detector ROBs"); - - // fill map with generic status codes - m_map_GenericStatus[eformat::UNCLASSIFIED] = "UNCLASSIFIED"; - m_map_GenericStatus[eformat::BCID_CHECK_FAIL] = "BCID_CHECK_FAIL"; - m_map_GenericStatus[eformat::LVL1ID_CHECK_FAIL] = "LVL1ID_CHECK_FAIL"; - m_map_GenericStatus[eformat::TIMEOUT] = "TIMEOUT"; - m_map_GenericStatus[eformat::DATA_CORRUPTION] = "DATA_CORRUPTION"; - m_map_GenericStatus[eformat::INTERNAL_OVERFLOW] = "INTERNAL_OVERFLOW"; - m_map_GenericStatus[eformat::DUMMY_FRAGMENT] = "DUMMY_FRAGMENT"; - - // fill vector with specific status codes - m_vec_SpecificStatus.reserve(16); - m_vec_SpecificStatus.push_back("TRIGGER_TYPE_SYNC_ERROR/DATAFLOW_DUMMY"); - m_vec_SpecificStatus.push_back("FRAGMENT_SIZE_ERROR"); - m_vec_SpecificStatus.push_back("DATABLOCK_ERROR"); - m_vec_SpecificStatus.push_back("CTRL_WORD_ERROR"); - m_vec_SpecificStatus.push_back("MISSING_BOF"); - m_vec_SpecificStatus.push_back("MISSING_EOF"); - m_vec_SpecificStatus.push_back("INVALID_HEADER_MARKER"); - m_vec_SpecificStatus.push_back("FORMAT_ERROR"); - m_vec_SpecificStatus.push_back("DUPLICATE_EVENT"); - m_vec_SpecificStatus.push_back("SEQUENCE_ERROR"); - m_vec_SpecificStatus.push_back("TRANSMISSION_ERROR"); - m_vec_SpecificStatus.push_back("TRUNCATION"); - m_vec_SpecificStatus.push_back("SHORT_FRAGMENT"); - m_vec_SpecificStatus.push_back("FRAGMENT_LOST"); - m_vec_SpecificStatus.push_back("FRAGMENT_PENDING"); - m_vec_SpecificStatus.push_back("ROBIN_DISCARD_MODE"); } -// Destructor. HltROBDataProviderSvc::~HltROBDataProviderSvc() { } -// Initialization StatusCode HltROBDataProviderSvc::initialize() { - StatusCode sc = ROBDataProviderSvc::initialize(); - - ATH_MSG_INFO(" ---> HltROBDataProviderSvc = " << name() << " initialize " - << " - package version " << PACKAGE_VERSION); - - // get Property filterEmptyROB from base class - if ( !sc.isSuccess() ) { - ATH_MSG_ERROR(" ROBDataProviderSvc::initialize() failed."); - return sc; - } else { - BooleanProperty filterEmptyROB; - filterEmptyROB.setName("filterEmptyROB"); - if (filterEmptyROB.assign(getProperty("filterEmptyROB"))) { - m_removeEmptyROB = filterEmptyROB.value() ; - ATH_MSG_INFO(" ---> getProperty('filterEmptyROB') = " << filterEmptyROB); - } else { - ATH_MSG_WARNING(" ROBDataProviderSvc::getProperty('filterEmptyROB') failed."); + ATH_MSG_INFO("HltROBDataProviderSvc::" << __FUNCTION__ << ": name = " << name()); +//=================================================================== +// The filtering of ROBs can be configured with job options as: +// +// for individual ROBs as : +// ------------------------ +// ROBDataProviderSvc.filterRobWithStatus = [ (ROB SourceId, StatusCode to remove), +// (ROB SourceId 2, StatusCode to remove 2), ... ] +// and: +// ROBDataProviderSvc.filterRobWithStatus += [ (ROB SourceId n, StatusCode to remove n) ] +// +// Example: +// ROBDataProviderSvc.filterRobWithStatus = [ (0x42002a,0x0000000f), (0x42002e,0x00000008) ] +// ROBDataProviderSvc.filterRobWithStatus += [ (0x42002b,0x00000000) ] +// +// for all ROBs of a given sub detector as : +// ----------------------------------------- +// ROBDataProviderSvc.filterSubDetWithStatus = [ (Sub Det Id, StatusCode to remove), +// (Sub Det Id 2, StatusCode to remove 2), ... ] +// and: +// ROBDataProviderSvc.filterSubDetWithStatus += [ (Sub Det Id n, StatusCode to remove n) ] +// +// Example: +// ROBDataProviderSvc.filterSubDetWithStatus = [ (0x41,0x00000000), (0x42,0x00000000) ] +// ROBDataProviderSvc.filterSubDetWithStatus += [ (0x41,0xcb0002) ] +// +// For valid ROB Source Ids, Sub Det Ids and ROB Status elements see the event format +// document ATL-D-ES-0019 (EDMS) +//=================================================================== + // get list of ROBs to filter out by status code + for (unsigned int i = 0; i < m_filterRobWithStatus.value().size(); i++) { + eformat::helper::SourceIdentifier tmpsrc(m_filterRobWithStatus.value()[i].first); + if (tmpsrc.human_detector() != "UNKNOWN") { + m_filterRobMap[tmpsrc.code()].push_back(m_filterRobWithStatus.value()[i].second); + } + } + + // get list of subdetectors to filter out by status code + for (unsigned int i = 0; i < m_filterSubDetWithStatus.value().size(); i++) { + eformat::helper::SourceIdentifier tmpsrc((eformat::SubDetector)m_filterSubDetWithStatus.value()[i].first, 0); + if (tmpsrc.human_detector() != "UNKNOWN") { + m_filterSubDetMap[tmpsrc.subdetector_id()].push_back(m_filterSubDetWithStatus.value()[i].second); + } + } + ATH_MSG_INFO(" ---> Filter out empty ROB fragments = " << m_filterEmptyROB); + + // print list of ROBs to filter out by status code + ATH_MSG_INFO(" ---> Filter out specific ROBs by Status Code: # ROBs = " << m_filterRobMap.size()); + for (auto it : m_filterRobMap) { + eformat::helper::SourceIdentifier tmpsrc(it.first); + ATH_MSG_INFO(" RobId=0x" << MSG::hex << it.first << " -> in Sub Det = " << tmpsrc.human_detector()); + + for (auto it_status: it.second) { + eformat::helper::Status tmpstatus(it_status); + ATH_MSG_INFO(" Status Code=0x" + << MSG::hex << std::setfill( '0' ) << std::setw(8) << tmpstatus.code() + << " Generic Part=0x" << std::setw(4) << tmpstatus.generic() + << " Specific Part=0x" << std::setw(4) << tmpstatus.specific() << MSG::dec); + } + } + + // print list of subdetectors to filter out by status code + ATH_MSG_INFO(" ---> Filter out Sub Detector ROBs by Status Code: # Sub Detectors = " << m_filterSubDetMap.size()); + for (auto it : m_filterSubDetMap) { + eformat::helper::SourceIdentifier tmpsrc(it.first, 0); + ATH_MSG_INFO(" SubDetId=0x" << MSG::hex << it.first << " -> " << tmpsrc.human_detector()); + for (auto it_status : it.second) { + eformat::helper::Status tmpstatus(it_status); + ATH_MSG_INFO(" Status Code=0x" + << MSG::hex << std::setfill( '0' ) << std::setw(8) << tmpstatus.code() + << " Generic Part=0x" << std::setw(4) << tmpstatus.generic() + << " Specific Part=0x" << std::setw(4) << tmpstatus.specific() << MSG::dec); } } // get the list of enabled ROBs from OKS bool robOKSconfigFound = false; - bool robLArMetOKSconfigFound = false; - bool robTileMetOKSconfigFound = false; if ( m_readROBfromOKS.value() ) { ServiceHandle<IJobOptionsSvc> p_jobOptionsSvc("JobOptionsSvc", name()); @@ -148,1136 +120,516 @@ StatusCode HltROBDataProviderSvc::initialize() if ( cur->name() == "DF_Enabled_ROB_IDs" ) { if (m_enabledROBs.assign(*cur)) { robOKSconfigFound = true; - ATH_MSG_INFO(" ---> Read from OKS = " << m_enabledROBs.value().size() << " enabled ROB IDs."); + ATH_MSG_INFO(" ---> Read from OKS = " + << MSG::dec << m_enabledROBs.value().size() << " enabled ROB IDs."); } else { ATH_MSG_WARNING(" Could not set Property 'enabledROBs' from OKS."); } } - - // the LAr MET ROB list is found - if ( cur->name() == "DF_LAr_MET_ROB_IDs" ) { - if (m_enabledLArMetROBs.assign(*cur)) { - robLArMetOKSconfigFound = true; - ATH_MSG_INFO(" ---> Read from OKS = " << m_enabledLArMetROBs.value().size() << " LAr MET ROB IDs."); - } else { - ATH_MSG_WARNING(" Could not set Property 'LArMetROBs' from OKS."); - } - } - - // the Tile MET ROB list is found - if ( cur->name() == "DF_Tile_MET_ROB_IDs" ) { - if (m_enabledTileMetROBs.assign(*cur)) { - robTileMetOKSconfigFound = true; - ATH_MSG_INFO(" ---> Read from OKS = " << m_enabledTileMetROBs.value().size() << " Tile MET ROB IDs."); - } else { - ATH_MSG_WARNING(" Could not set Property 'TileMetROBs' from OKS."); - } - } } } p_jobOptionsSvc.release().ignore(); } } - ATH_MSG_INFO(" ---> HltROBDataProviderSvc = " << name() << " special properties <---"); - ATH_MSG_INFO(" ---> Filter out empty ROB fragments = " << m_removeEmptyROB); - ATH_MSG_INFO(" ---> Fill monitoring histograms = " << m_doMonitoring); - ATH_MSG_INFO(" Hist:RequestedROBsPerCall = " << m_histProp_requestedROBsPerCall); - ATH_MSG_INFO(" Hist:ReceivedROBsPerCall = " << m_histProp_receivedROBsPerCall); - ATH_MSG_INFO(" Hist:TimeROBretrieval = " << m_histProp_timeROBretrieval); - ATH_MSG_INFO(" ---> Do detailed ROB monitoring = " << m_doDetailedROBMonitoring); - ATH_MSG_INFO(" ---> SG name for ROB monitoring collect. = " << m_ROBDataMonitorCollection_SG_Name); - ATH_MSG_INFO(" ---> Read list of enabled ROBs from OKS = " << m_readROBfromOKS); + // print list of enabled ROBs, read from OKS + ATH_MSG_INFO(" ---> Read list of enabled ROBs from OKS = " << m_readROBfromOKS); if (m_enabledROBs.value().size() == 0) { - ATH_MSG_INFO(" ---> The list of enabled ROBs has size = 0. No check will be performed "); + ATH_MSG_INFO(" ---> The list of enabled ROBs has size = 0. No check will be performed "); } else { if (m_readROBfromOKS.value() && robOKSconfigFound) { - ATH_MSG_INFO(" ---> The list of enabled ROBs has size = " << m_enabledROBs.value().size() - << ". It was read from the partition database." ); - } else { - ATH_MSG_INFO(" ---> The list of enabled ROBs has size = " << m_enabledROBs.value().size() - << ". It was read from job options." ); - } - } - - ATH_MSG_INFO(" ---> Generic Module ID for LAr MET ROB = " << m_genericLArMetModuleID); - if (m_enabledLArMetROBs.value().size() == 0) { - ATH_MSG_INFO(" ---> The list of LAr MET ROBs has size = 0. No LAr MET ROB access will be done."); - } else { - if (m_readROBfromOKS.value() && robLArMetOKSconfigFound) { - ATH_MSG_INFO(" ---> The list of LAr MET ROBs has size = " << m_enabledLArMetROBs.value().size() + ATH_MSG_INFO(" ---> The list of enabled ROBs has size = " << MSG::dec << m_enabledROBs.value().size() << ". It was read from the partition database." ); } else { - ATH_MSG_INFO(" ---> The list of LAr MET ROBs has size = " << m_enabledLArMetROBs.value().size() + ATH_MSG_INFO(" ---> The list of enabled ROBs has size = " << MSG::dec << m_enabledROBs.value().size() << ". It was read from job options." ); } } - ATH_MSG_INFO(" ---> Generic Module ID for Tile MET ROB = " << m_genericTileMetModuleID); - if (m_enabledTileMetROBs.value().size() == 0) { - ATH_MSG_INFO(" ---> The list of Tile MET ROBs has size = 0. No Tile MET ROB access will be done."); - } else { - if (m_readROBfromOKS.value() && robTileMetOKSconfigFound) { - ATH_MSG_INFO(" ---> The list of Tile MET ROBs has size = " << m_enabledTileMetROBs.value().size() - << ". It was read from the partition database." ); - } else { - ATH_MSG_INFO(" ---> The list of Tile MET ROBs has size = " << m_enabledTileMetROBs.value().size() - << ". It was read from job options." ); - } - } + // Setup the slot specific cache + m_eventsCache = SG::SlotSpecificObj<EventCache>( SG::getNSlots() ); - ATH_MSG_INFO(" ---> Separate MET and Det ROB Retrieval = " << m_separateMETandDetROBRetrieval); + // Retrieve the monitoring tool + if (!m_monTool.empty()) ATH_CHECK(m_monTool.retrieve()); - if (m_ignoreROB.value().size() == 0) { - ATH_MSG_INFO(" ---> The list of ROBs to ignore has size = 0. No check will be performed "); - } else { - ATH_MSG_INFO(" ---> The list of ROBs to ignore has size = " << m_ignoreROB.value().size()); - } - - for (unsigned int i=0; i<m_ignoreROB.value().size(); i++) { - ATH_MSG_INFO(" ---> do not retrieve ROB[" << i << "]: hex(id)=0x" - << MSG::hex << m_ignoreROB.value()[i]<<MSG::dec - << " dec(id)="<< m_ignoreROB.value()[i]); - } - - // register incident handler for begin run - ServiceHandle<IIncidentSvc> incidentSvc("IncidentSvc", name()); - ATH_CHECK(incidentSvc.retrieve()); + return(StatusCode::SUCCESS); +} - long int pri=100; - incidentSvc->addListener(this,"BeginRun",pri); - incidentSvc.release().ignore(); +StatusCode HltROBDataProviderSvc::finalize() +{ + ATH_CHECK(m_monTool.release()); + return StatusCode::SUCCESS; +} - // Setup the StoreGateSvc - ATH_CHECK(m_storeGateSvc.retrieve()); +/// --- Implementation of IROBDataProviderSvc interface --- +/// --- Legacy interface (depricated) --- - return sc; +/// Signal ROB fragments which should be considered for prefetching in online running +void HltROBDataProviderSvc::addROBData(const std::vector<uint32_t>& robIds, + const std::string_view callerName) +{ + const EventContext context{ Gaudi::Hive::currentContext() }; + return addROBData( context, robIds, callerName ); } -// Initialization -StatusCode HltROBDataProviderSvc::finalize() +/// Start a new event with a set of ROB fragments, e.g. from LVL1 result, in online and add the fragments to the ROB cache +void HltROBDataProviderSvc::setNextEvent(const std::vector<ROBF>& result) { - StatusCode sc = ROBDataProviderSvc::finalize(); - if ( !sc.isSuccess() ) { - ATH_MSG_ERROR(" ROBDataProviderSvc::finalize() failed."); - } - - // release the AlgContextSvc if used - if ( m_algContextSvc ) m_algContextSvc->release(); + const EventContext context{ Gaudi::Hive::currentContext() }; + return setNextEvent( context, result ); +} - return sc; +/// Start a new event with a full event fragment and add all ROB fragments in to the ROB cache +void HltROBDataProviderSvc::setNextEvent(const RawEvent* re) +{ + const EventContext context{ Gaudi::Hive::currentContext() }; + return setNextEvent( context, re ); } -/// Query interface -StatusCode HltROBDataProviderSvc::queryInterface(const InterfaceID& riid, void** ppvInterface) +/// Retrieve ROB fragments for given ROB ids from the ROB cache +void HltROBDataProviderSvc::getROBData(const std::vector<uint32_t>& robIds, std::vector<const ROBF*>& robFragments, + const std::string_view callerName) { - if ( IROBDataProviderSvc::interfaceID().versionMatch(riid) ) { - *ppvInterface = (IROBDataProviderSvc*)this; - } else if ( ITrigROBDataProviderSvc::interfaceID().versionMatch(riid) ) { - *ppvInterface = (ITrigROBDataProviderSvc*)this; - } else if ( ITrigROBDataProviderSvcPrefetch::interfaceID().versionMatch(riid) ) { - *ppvInterface = (ITrigROBDataProviderSvcPrefetch*)this; - } else if ( IIncidentListener::interfaceID().versionMatch(riid) ) { - *ppvInterface = (IIncidentListener*)this; - } else { - return Service::queryInterface(riid, ppvInterface); - } - addRef(); - return StatusCode::SUCCESS; + const EventContext context{ Gaudi::Hive::currentContext() }; + return getROBData( context, robIds, robFragments, callerName ); } -/** - in online add ROB fragments for given ROB ids to the map - call the DataCollector to retrieve the ROB fragments - - - in offline only check that given ROB ids are in the map, issue an - error if not - */ -void HltROBDataProviderSvc::addROBData(const std::vector<uint32_t>& robIds, const std::string callerName) -{ - //------------------- - // remove empty calls - //------------------- - if (robIds.size() == 0) return; - - //-------------------- - // set the caller name - //-------------------- - if (callerName != "UNKNOWN") m_callerName = callerName; - - //-------------------- - // make unique ROB IDs - //-------------------- - std::vector<uint32_t>::iterator remove_duplicate; - std::vector<uint32_t> robIdsUnique(robIds); - - sort(robIdsUnique.begin(), robIdsUnique.end()); - remove_duplicate = unique(robIdsUnique.begin(), robIdsUnique.end()); - robIdsUnique.erase(remove_duplicate, robIdsUnique.end()); - - //------------------------------------------------------------------ - // Replace the generic MET ROB ID with the full list of all MET ROBs - //------------------------------------------------------------------ - // LAr MET ROBs - uint32_t generic_LAr_MET_id = eformat::helper::SourceIdentifier(eformat::TDAQ_LAR_MET,m_genericLArMetModuleID.value()).code(); - std::vector<uint32_t>::iterator rob_LAr_Met_it = std::find(robIdsUnique.begin(), robIdsUnique.end(), generic_LAr_MET_id); - if (rob_LAr_Met_it != robIdsUnique.end()) { - robIdsUnique.erase(rob_LAr_Met_it); - if (m_enabledLArMetROBs.value().size() != 0) robIdsUnique.insert(robIdsUnique.end(),m_enabledLArMetROBs.value().begin(),m_enabledLArMetROBs.value().end()); - } +/// Retrieve the full event fragment +const RawEvent* HltROBDataProviderSvc::getEvent() +{ + const EventContext context{ Gaudi::Hive::currentContext() }; + return getEvent( context ); +} - // Tile MET ROBs - uint32_t generic_Tile_MET_id = eformat::helper::SourceIdentifier(eformat::TDAQ_TILE_MET,m_genericTileMetModuleID.value()).code(); - std::vector<uint32_t>::iterator rob_Tile_Met_it = std::find(robIdsUnique.begin(), robIdsUnique.end(), generic_Tile_MET_id); - if (rob_Tile_Met_it != robIdsUnique.end()) { - robIdsUnique.erase(rob_Tile_Met_it); - if (m_enabledTileMetROBs.value().size() != 0) robIdsUnique.insert(robIdsUnique.end(),m_enabledTileMetROBs.value().begin(),m_enabledTileMetROBs.value().end()); - } +/// Store the status for the event. +void HltROBDataProviderSvc::setEventStatus(uint32_t status) +{ + const EventContext context{ Gaudi::Hive::currentContext() }; + setEventStatus( context, status ); +} - //------------------- - //--- offline running - //------------------- - if (!m_onlineRunning) { - - // for offline running all requested ROBs should be found in cache - // if not issue error - ROBDataProviderSvc::addROBData(robIdsUnique); - //------------------ - //--- online running - //------------------ - } else { - // detailed ROB monitoring - //------------------------ - // Create a ROB monitoring collection and register it to StoreGate - ROBDataMonitorCollection* p_robMonCollection(0); - if ( m_doDetailedROBMonitoring.value() ) { - if ( !(m_storeGateSvc->transientContains<ROBDataMonitorCollection>(m_ROBDataMonitorCollection_SG_Name.value())) ) { - p_robMonCollection = new ROBDataMonitorCollection; - if ( p_robMonCollection ) { - p_robMonCollection->reserve( HltROBDataProviderConstants::Number_of_Rob_Monitor_Structs ) ; - if ( (m_storeGateSvc->record(p_robMonCollection, m_ROBDataMonitorCollection_SG_Name.value(), true)).isFailure() ) { - ATH_MSG_WARNING(" Registering ROB Monitoring collection in StoreGate failed."); - delete p_robMonCollection; - p_robMonCollection = 0; - } - } - } else { - if ( m_storeGateSvc->retrieve(p_robMonCollection).isFailure() ) { - ATH_MSG_WARNING(" Retrieval of ROB Monitoring collection from StoreGate failed."); - p_robMonCollection = 0; - } - } - } +/// Retrieve the status for the event. +uint32_t HltROBDataProviderSvc::getEventStatus() +{ + const EventContext context{ Gaudi::Hive::currentContext() }; + return getEventStatus( context ); +} - // create a new ROBDataMonitorStruct and fill it - robmonitor::ROBDataMonitorStruct* p_robMonStruct(0); - if ( p_robMonCollection ) { - // caller name - std::string caller_name("UNKNOWN"); - if (callerName != "UNKNOWN") { - caller_name = callerName; - } else if ((callerName == "UNKNOWN") && (m_callerName != "UNKNOWN")) { - caller_name = m_callerName; - } else { - IAlgorithm* alg(0); - if ( m_algContextSvc ) { - alg = m_algContextSvc->currentAlg(); - caller_name = (alg ? alg->name() : "<NONE>"); - } - } +/// --- Implementation of IROBDataProviderSvc interface --- +/// --- Context aware interface for MT --- - // initialize new ROBDataMonitorStruct - p_robMonStruct = new robmonitor::ROBDataMonitorStruct(m_currentLvl1ID, robIdsUnique, caller_name); +/// Signal ROB fragments which should be considered for prefetching in online running +void HltROBDataProviderSvc::addROBData(const EventContext& context, const std::vector<uint32_t>& robIds, + const std::string_view callerName) +{ + ATH_MSG_VERBOSE("start of " << __FUNCTION__ << ": Number of ROB Ids to add = " << robIds.size() + << " caller name = " << callerName); + EventCache* cache = m_eventsCache.get( context ); + + // allocate vector of missing ROB Ids + std::vector<uint32_t> robIds_missing ; + robIds_missing.reserve( robIds.size() ) ; + + // allocate vector with existing ROB fragments in cache + std::vector<const ROBF*> robFragments_inCache ; + robFragments_inCache.reserve( robIds.size() ) ; + + // check input ROB list against cache + eventCache_checkRobListToCache(cache,robIds, robFragments_inCache, robIds_missing ) ; + + // call data collector + if (robIds_missing.size() > 0) { + ATH_MSG_DEBUG( __FUNCTION__ << ": Number of ROB Ids to reserve with DCM = " << robIds_missing.size()); + // reserve the ROBs in the DCM + try { + auto mon_robres_t = Monitored::Timer("TIME_ROBReserveData"); + hltinterface::DataCollector::instance()->reserveROBData(cache->globalEventNumber, robIds_missing); + mon_robres_t.stop(); + // Fill monitoring histograms + auto mon_robres_nROBs = Monitored::Scalar("NUMBER_ROBReserveData",robIds_missing.size()); + auto mon = Monitored::Group(m_monTool, mon_robres_t, mon_robres_nROBs); + } catch (const std::exception& ex) { + ATH_MSG_ERROR( __FUNCTION__ << ":" << __LINE__ + << "Failed to reserve ROB data, caught an unexpected exception: " << ex.what()); + } catch (...) { + ATH_MSG_ERROR( __FUNCTION__ << ":" << __LINE__ + << "Failed to reserve ROB data, caught an unexpected exception."); } + } +} - // for online running the requested ROBs should be not found in cache - // ------------------------------------------------------------------ - // vector with missing ROB ids for DataCollector - std::vector<uint32_t> vRobIds; - vRobIds.reserve( robIdsUnique.size() ) ; - - // find missing ROB ids which should be retrieved - ATH_MSG_DEBUG(" ---> addROBData: Number of ROB Ids requested : " << robIdsUnique.size()); - - for (uint32_t id : robIdsUnique) { - - // check if ROB is already in cache - ONLINE_ROBMAP::iterator map_it = m_online_robmap.find(id) ; - if(map_it != m_online_robmap.end()) { - ATH_MSG_DEBUG(" ---> addROBData: Found ROB Id : 0x" << MSG::hex << (*map_it).second.source_id()); - continue; - } - - // check if ROB should be ignored - if (m_ignoreROB.value().size() != 0) { - std::vector<uint32_t>::const_iterator rob_ignore_it = - std::find(m_ignoreROB.value().begin(), m_ignoreROB.value().end(),id); - if(rob_ignore_it != m_ignoreROB.value().end()) { - ATH_MSG_DEBUG(" ---> addROBData: ROB Id : 0x" << MSG::hex << id << MSG::dec << " will be not retrieved, since it is on the veto list."); - continue; - } - } +/// Start a new event with a set of ROB fragments, e.g. from LVL1 result, in online and add the fragments to the ROB cache +void HltROBDataProviderSvc::setNextEvent(const EventContext& context, const std::vector<ROBF>& result) +{ + ATH_MSG_FATAL("Obsolete method HltROBDataProviderSvc::setNextEvent(const EventContext& context, const std::vector<ROBF>& result) called " + << "\n context = " << context << " number of ROB fragments = " << result.size() ); +} - // check if ROB is actually enabled for readout - // do not perform this check for MET ROBs - if ( (m_enabledROBs.value().size() != 0) && - (eformat::helper::SourceIdentifier(id).subdetector_id() != eformat::TDAQ_LAR_MET) && - (eformat::helper::SourceIdentifier(id).subdetector_id() != eformat::TDAQ_TILE_MET) ){ - std::vector<uint32_t>::const_iterator rob_enabled_it = - std::find(m_enabledROBs.value().begin(), m_enabledROBs.value().end(),id); - if(rob_enabled_it == m_enabledROBs.value().end()) { - ATH_MSG_DEBUG(" ---> addROBData: ROB Id : 0x" << MSG::hex << id << MSG::dec - << " will be not retrieved, since it is not on the list of enabled ROBs."); - continue; - } - } - // Only Monitor SCHEDULED ROBs - if ( p_robMonStruct ) { - (p_robMonStruct->requested_ROBs)[id].rob_history = robmonitor::SCHEDULED; - } +/// Start a new event with a full event fragment and add all ROB fragments in to the ROB cache +void HltROBDataProviderSvc::setNextEvent(const EventContext& context, const RawEvent* re) +{ + ATH_MSG_VERBOSE("start of " << __FUNCTION__); + EventCache* cache = m_eventsCache.get( context ); + + // clear the event cache of the previous event + eventCache_clear( cache ); - // the ROB should be retrieved from the ROS - ATH_MSG_DEBUG(" ---> addROBData: Request ROB Id : 0x" << MSG::hex << id <<" from ROS "); - vRobIds.push_back( id ) ; - } // end loop over requested input ROBs - - if (vRobIds.size() == 0) { - ATH_MSG_DEBUG(" ---> addROBData: either all requested ROBs are found in cache for running mode ONLINE, \n" - << " or input ROB Id list was empty, \n" - << " or all requested ROBs were not retrieved due to the veto list.\n" - << " Number of requested ROB Ids = " << robIdsUnique.size() << "\n" - << " Lvl1 id = " << m_currentLvl1ID); - // Set ROB request time also in the case when no DataCollector request is necessary - // to allow correlation with RoI request times - // start and stop times will be equal - if ( p_robMonStruct ) { - struct timeval time_start; - struct timeval time_stop; - - gettimeofday(&time_start, 0); - gettimeofday(&time_stop, 0); - - p_robMonStruct->start_time_of_ROB_request = time_start; - p_robMonStruct->end_time_of_ROB_request = time_stop; - } - } else { - // - // Tell the DCM that these ROBs may be needed - // --------------------------------------------------------------- - // - if (msgLvl(MSG::DEBUG)) { - std::ostringstream ost; - ost << " Number of scheduled ROB Ids = " << vRobIds.size() << "\n" ; - unsigned int rob_counter = 1; - for (uint32_t rob : vRobIds) { - ost << " # = "<< std::setw(5) << rob_counter++ << " ROB id = 0x" << std::hex << rob << std::dec << "\n"; - } - ATH_MSG_DEBUG(" ---> addROBData: The following ROB Ids are scheduled for retrieval and are reserved in the DCM: \n" - << " Lvl1 id = " << m_currentLvl1ID << "\n" - << ost.str()); - } - // reserve the ROBs in the DCM - hltinterface::DataCollector::instance()->reserveROBData(m_currentLvl1ID, vRobIds); - } + //----------------------------------------------+ + // Fill the event cache with the new event data | + //----------------------------------------------+ - // add the ROB monitoring structure to the collection - if ( p_robMonCollection && p_robMonStruct ) p_robMonCollection->push_back( p_robMonStruct ); - } // end online running + // store the pointer to the event + cache->event = re; + // set the LVL1 id + cache->currentLvl1ID = re->lvl1_id(); + // set the global event number + cache->globalEventNumber = re->global_id(); + // set flag for masking L2/EF module ID, this is only necessary for the separate L2 and EF systems from Run 1 + m_maskL2EFModuleID = (re->nlvl2_trigger_info() != 0); + + //--------------------+ + // Fill the ROB cache | + //--------------------+ + + // get all the ROBFragments + OFFLINE_FRAGMENTS_NAMESPACE::PointerType robF[eformat::write::MAX_UNCHECKED_FRAGMENTS]; + size_t number_robs = re->children(robF,eformat::write::MAX_UNCHECKED_FRAGMENTS); + if (number_robs == eformat::write::MAX_UNCHECKED_FRAGMENTS) { + ATH_MSG_ERROR("ROB buffer overflow: ROBs found = " << number_robs + << " Max. number of ROBs allowed = " << eformat::write::MAX_UNCHECKED_FRAGMENTS); + } + std::vector<ROBF> rob_fragments; + rob_fragments.reserve(number_robs); + // loop over all ROBs + for (size_t irob = 0; irob < number_robs; irob++) { + rob_fragments.push_back(ROBF(robF[irob])); + } + // add the ROBs to the cache/rob map + eventCache_addRobData(cache, rob_fragments) ; + + ATH_MSG_DEBUG(" ---> setNextEvent for " << name() ); + ATH_MSG_DEBUG(" current [global id, LVL1 id] = [" << cache->globalEventNumber << "," << cache->currentLvl1ID << "]" ); + ATH_MSG_DEBUG(" number of received ROBs = " << rob_fragments.size() ); + ATH_MSG_DEBUG(" size of ROB cache = " << cache->robmap.size() ); return; } -/** - in online add the LVL1/HLT result - - rebuild the map - - set flag for online running - */ -void HltROBDataProviderSvc::setNextEvent(const std::vector<ROBF>& result) -{ - // clear the ROB map - m_online_robmap.clear(); - m_currentLvl1ID = 0; - - // set the online flag - m_onlineRunning = true ; +/// Retrieve ROB fragments for given ROB ids from the ROB cache +void HltROBDataProviderSvc::getROBData(const EventContext& context, + const std::vector<uint32_t>& robIds, std::vector<const ROBF*>& robFragments, + const std::string_view callerName) +{ + ATH_MSG_VERBOSE("start of " << __FUNCTION__ << ": Number of ROB Ids to get = " << robIds.size() + << " caller name = " << callerName); + EventCache* cache = m_eventsCache.get( context ); - // set the complete event flag - m_isEventComplete = false; + // allocate vector of missing ROB Ids + std::vector<uint32_t> robIds_missing ; + robIds_missing.reserve( robIds.size() ) ; - // clear the ROB info object from steering - if (m_RobRequestInfo) m_RobRequestInfo->clearRequestScheduledRobIDs(); + // check input ROB list against cache + eventCache_checkRobListToCache(cache, robIds, robFragments, robIds_missing) ; - if ( result.size() == 0 ) { - ATH_MSG_ERROR(" ---> setNextEvent online for "<< name() - <<" failed: Size of received vector of ROB fragments = " << result.size()); + // missing ROB fragments from the DCM and add them to the cache + if (robIds_missing.size() == 0) { + ATH_MSG_DEBUG( __FUNCTION__ << ": All requested ROB Ids were found in the cache. "); return; } - // set the LVL1 id - m_currentLvl1ID = result[0].rod_lvl1_id(); - - // add fragments to map - std::vector<ROBF>::const_iterator it_robf = result.begin(); - std::vector<ROBF>::const_iterator it_robf_end = result.end(); - for(; it_robf!=it_robf_end; ++it_robf) { - uint32_t id = it_robf->source_id() ; - // check current L1 ID against CTP fragment when possible - if ( (eformat::helper::SourceIdentifier(id).subdetector_id() == eformat::TDAQ_CTP) && - (it_robf->rod_lvl1_id() != m_currentLvl1ID) ) { - ATH_MSG_ERROR(" ---> Lvl1 ID mismatch for CTP fragment with SourceId = 0x" << MSG::hex << id << MSG::dec - << " and L1 Id = " << it_robf->rod_lvl1_id() - << " to currently used L1 Id = " << m_currentLvl1ID - << " -> Use CTP version from now on."); - m_currentLvl1ID = it_robf->rod_lvl1_id() ; - } - // remove empty ROB fragments or ones with bad status, if requested - if ((it_robf->rod_ndata() == 0) && (m_removeEmptyROB)) { - ATH_MSG_DEBUG(" ---> Empty ROB Id = 0x" << MSG::hex << id << MSG::dec - << " removed for L1 Id = " << m_currentLvl1ID); - } else if ( ROBDataProviderSvc::filterRobWithStatus(&*it_robf) ) { - if (msgLvl(MSG::DEBUG) && (it_robf->nstatus() > 0)) { - const uint32_t* it_status; - it_robf->status(it_status); - eformat::helper::Status tmpstatus( (*it_status) ) ; - ATH_MSG_DEBUG(" ---> ROB Id = 0x" << MSG::hex << id - << std::setfill( '0' ) - << " with Generic Status Code = 0x" << std::setw(4) << tmpstatus.generic() - << " and Specific Status Code = 0x" << std::setw(4) << tmpstatus.specific() - << MSG::dec - << " removed for L1 Id = " << m_currentLvl1ID); - } - } else { - m_online_robmap[id]= (*it_robf) ; - } - - //* fill monitoring histogram for ROB generic status - if ( ( m_hist_genericStatusForROB ) && ( it_robf->nstatus() != 0 ) ) { - const uint32_t* it_status; - it_robf->status(it_status); - if ((*it_status) != 0) { - scoped_lock_histogram lock; - m_hist_genericStatusForROB->Fill(eformat::helper::SourceIdentifier(it_robf->source_id()).human_detector().c_str(), - m_map_GenericStatus[eformat::helper::Status(*it_status).generic()].c_str(),1.); - } - } + // There were missing ROB fragments retrieve them from the DCM and add them to the cache + ATH_MSG_DEBUG( __FUNCTION__ << ": Number of ROB Ids to retrieve with DCM = " << robIds_missing.size()); - //* fill monitoring histogram for ROB specific status - if ( ( m_hist_specificStatusForROB ) && ( it_robf->nstatus() != 0 ) ) { - const uint32_t* it_status; - it_robf->status(it_status); - if ((*it_status) != 0) { - scoped_lock_histogram lock; - std::bitset<16> specificBits(eformat::helper::Status(*it_status).specific()); - for (unsigned int index=0; index < 16; ++index) { - if (specificBits[index]) m_hist_specificStatusForROB->Fill(eformat::helper::SourceIdentifier(it_robf->source_id()).human_detector().c_str(), - m_vec_SpecificStatus[index].c_str(),1.); - } - } - } - } + typedef std::vector<hltinterface::DCM_ROBInfo> ROBInfoVec; + ROBInfoVec vRobInfos ; - if(msgLvl(MSG::DEBUG)) { - msg() << MSG::DEBUG << " ---> setNextEvent online for "<< name() << endmsg; - msg() << MSG::DEBUG << " online running = " << m_onlineRunning << endmsg; - msg() << MSG::DEBUG << " current LVL1 id = " << m_currentLvl1ID << endmsg; - msg() << MSG::DEBUG << " # LVL1 ROBs = " << result.size() << endmsg; - msg() << MSG::DEBUG << " size of ROB cache = " << m_online_robmap.size() << endmsg; - msg() << MSG::DEBUG << dumpROBcache() << endmsg; - } - return; + // Get ROB Fragments with DataCollector + vRobInfos.reserve( robIds_missing.size() ) ; + try { + auto mon_rob_t = Monitored::Timer("TIME_ROBRequest"); + hltinterface::DataCollector::instance()->collect(vRobInfos, cache->globalEventNumber, robIds_missing); + mon_rob_t.stop(); + // Fill monitoring histograms + auto mon_rob_nROBs = Monitored::Scalar("NUMBER_ROBRequest",vRobInfos.size()); + auto mon = Monitored::Group(m_monTool, mon_rob_t, mon_rob_nROBs); + } catch (const std::exception& ex) { + ATH_MSG_ERROR( __FUNCTION__ << ":" << __LINE__ + << "Failed to collect ROBs, caught an unexpected exception: " << ex.what() + << ". Throwing hltonl::Exception::EventSourceCorrupted" ); + throw hltonl::Exception::EventSourceCorrupted(); + } catch (...) { + ATH_MSG_ERROR( __FUNCTION__ << ":" << __LINE__ + << "Failed to collect ROBs, caught an unexpected exception. " + << "Throwing hltonl::Exception::EventSourceCorrupted" ); + throw hltonl::Exception::EventSourceCorrupted(); + } + + // Store retrieved ROB data in the cache + std::vector<ROBF> robFragments_missing; + robFragments_missing.reserve( vRobInfos.size() ); + for(ROBInfoVec::const_iterator it=vRobInfos.begin(); it!=vRobInfos.end(); ++it) { + ATH_MSG_DEBUG(__FUNCTION__ << " ROB Id = 0x" << MSG::hex << it->robFragment.source_id() << MSG::dec + << " retrieved from DCM for (global Id, L1 Id) = (" << cache->globalEventNumber << "," << cache->currentLvl1ID <<")" ); + robFragments_missing.push_back( it->robFragment ); + } + // add the ROBs to the cache/rob map + eventCache_addRobData(cache, robFragments_missing) ; + + // return all the requested ROB fragments from the cache + robFragments.clear() ; + eventCache_checkRobListToCache(cache, robIds, robFragments, robIds_missing) ; } -/** - add a new Raw event - - rebuild the map - - set flag for offline running - */ -void HltROBDataProviderSvc::setNextEvent(const RawEvent* re) -{ - // set the offline flag - m_onlineRunning = false ; - - // set the event complete flag - m_isEventComplete = true ; - - ROBDataProviderSvc::setNextEvent(re); - return ; +/// Retrieve the full event fragment +const RawEvent* HltROBDataProviderSvc::getEvent(const EventContext& context) +{ + ATH_MSG_VERBOSE("start of " << __FUNCTION__); + return m_eventsCache.get( context )->event; } -/** return ROBData for ROBID - */ -void HltROBDataProviderSvc::getROBData(const std::vector<uint32_t>& robIds, std::vector<const ROBF*>& robFragments, std::string callerName) +/// Store the status for the event. +void HltROBDataProviderSvc::setEventStatus(const EventContext& context, uint32_t status) { - //-------------------- - // set the caller name - //-------------------- - if (callerName != "UNKNOWN") m_callerName = callerName; - - //------------------- - //--- offline running - //------------------- - if (!m_onlineRunning) { - ROBDataProviderSvc::getROBData(robIds,robFragments); - //------------------ - //--- online running - //------------------ - } else { - // --------------------------------------------------------------------------------------------- - // make sure that all ROB prefetching information is taken into account before the ROB retrieval - // --------------------------------------------------------------------------------------------- - if (m_RobRequestInfo) { - // add ROBs in the info object to the prefetching list - addROBData(m_RobRequestInfo->requestScheduledRobIDs()); - m_RobRequestInfo->clearRequestScheduledRobIDs(); - } - - //-------------------- - // make unique ROB IDs - //-------------------- - std::vector<uint32_t>::iterator remove_duplicate; - std::vector<uint32_t> robIdsUnique(robIds); - - sort(robIdsUnique.begin(), robIdsUnique.end()); - remove_duplicate = unique(robIdsUnique.begin(), robIdsUnique.end()); - robIdsUnique.erase(remove_duplicate, robIdsUnique.end()); - - //------------------------------------------------------------------ - // Replace the generic MET ROB ID with the full list of all MET ROBs - //------------------------------------------------------------------ - // LAr MET ROBs - uint32_t generic_LAr_MET_id = eformat::helper::SourceIdentifier(eformat::TDAQ_LAR_MET,m_genericLArMetModuleID.value()).code(); - std::vector<uint32_t>::iterator rob_LAr_Met_it = std::find(robIdsUnique.begin(), robIdsUnique.end(), generic_LAr_MET_id); - if (rob_LAr_Met_it != robIdsUnique.end()) { - robIdsUnique.erase(rob_LAr_Met_it); - if (m_enabledLArMetROBs.value().size() != 0) robIdsUnique.insert(robIdsUnique.end(),m_enabledLArMetROBs.value().begin(),m_enabledLArMetROBs.value().end()); - } - - // Tile MET ROBs - uint32_t generic_Tile_MET_id = eformat::helper::SourceIdentifier(eformat::TDAQ_TILE_MET,m_genericTileMetModuleID.value()).code(); - std::vector<uint32_t>::iterator rob_Tile_Met_it = std::find(robIdsUnique.begin(), robIdsUnique.end(), generic_Tile_MET_id); - if (rob_Tile_Met_it != robIdsUnique.end()) { - robIdsUnique.erase(rob_Tile_Met_it); - if (m_enabledTileMetROBs.value().size() != 0) robIdsUnique.insert(robIdsUnique.end(),m_enabledTileMetROBs.value().begin(),m_enabledTileMetROBs.value().end()); - } - - // detailed ROB monitoring - //------------------------ - // Create a ROB monitoring collection and register it to StoreGate - ROBDataMonitorCollection* p_robMonCollection(0); - if ((m_doDetailedROBMonitoring.value()) && (robIdsUnique.size() != 0)) { - if ( !(m_storeGateSvc->transientContains<ROBDataMonitorCollection>(m_ROBDataMonitorCollection_SG_Name.value())) ) { - p_robMonCollection = new ROBDataMonitorCollection; - if ( p_robMonCollection ) { - p_robMonCollection->reserve( HltROBDataProviderConstants::Number_of_Rob_Monitor_Structs ) ; - if ( (m_storeGateSvc->record(p_robMonCollection, m_ROBDataMonitorCollection_SG_Name.value(), true)).isFailure() ) { - ATH_MSG_WARNING(" getROBData: Registering ROB Monitoring collection in StoreGate failed."); - delete p_robMonCollection; - p_robMonCollection = 0; - } - } - } else { - if ( m_storeGateSvc->retrieve(p_robMonCollection).isFailure() ) { - ATH_MSG_WARNING(" getROBData: Retrieval of ROB Monitoring collection from StoreGate failed."); - p_robMonCollection = 0; - } - } - } - - // create a new ROBDataMonitorStruct and fill it - robmonitor::ROBDataMonitorStruct* p_robMonStruct(0); - if ( p_robMonCollection ) { - // caller name - std::string caller_name("UNKNOWN"); - if (callerName != "UNKNOWN") { - caller_name = callerName; - } else if ((callerName == "UNKNOWN") && (m_callerName != "UNKNOWN")) { - caller_name = m_callerName; - } else { - IAlgorithm* alg(0); - if ( m_algContextSvc ) { - alg = m_algContextSvc->currentAlg(); - caller_name = (alg ? alg->name() : "<NONE>"); - } - } - - // initialize new ROBDataMonitorStruct - - p_robMonStruct = new robmonitor::ROBDataMonitorStruct(m_currentLvl1ID, robIdsUnique, caller_name); - } - - //-------------------------- - // update internal ROB cache - //-------------------------- - addROBDataToCache(robIdsUnique, p_robMonStruct); - - // add the ROB monitoring structure to the collection - if ( p_robMonCollection && p_robMonStruct ) p_robMonCollection->push_back( p_robMonStruct ); - - - //------------------------------------------------------------------ - // Return requested ROBs from internal cache - //------------------------------------------------------------------ - for(std::vector<uint32_t>::const_iterator it = robIdsUnique.begin(); it != robIdsUnique.end(); ++it){ - uint32_t id = (*it); - ONLINE_ROBMAP::iterator map_it = m_online_robmap.find(id) ; - if(map_it != m_online_robmap.end()) { - robFragments.push_back( &((*map_it).second) ); - } else { - ATH_MSG_DEBUG(" ---> getROBData: Failed to find ROB for id 0x" - << MSG::hex << id << MSG::dec); - ATH_MSG_VERBOSE(dumpROBcache()); - } - } - } - - return ; + ATH_MSG_VERBOSE("start of " << __FUNCTION__); + m_eventsCache.get(context)->eventStatus = status; } -/// Retrieve the whole event. -const RawEvent* HltROBDataProviderSvc::getEvent(){ - if (m_onlineRunning) return 0; - return ROBDataProviderSvc::getEvent(); +/// Retrieve the status for the event. +uint32_t HltROBDataProviderSvc::getEventStatus(const EventContext& context) +{ + ATH_MSG_VERBOSE("start of " << __FUNCTION__); + return m_eventsCache.get( context )->eventStatus; } -/// Return vector with all ROBFragments stored in the cache -void HltROBDataProviderSvc::getAllROBData(std::vector<const ROBF*>& robFragments) +/// Apply a function to all ROBs in the cache +void HltROBDataProviderSvc::processCachedROBs(const EventContext& context, const std::function< void(const ROBF* )>& fn) const { - //------------------ - //--- online running - //------------------ - if (m_onlineRunning) { - for(ONLINE_ROBMAP::iterator it=m_online_robmap.begin(); it!=m_online_robmap.end(); ++it) { - robFragments.push_back( &((*it).second) ); - } - } - return ; + ATH_MSG_VERBOSE("start of " << __FUNCTION__); + for ( const auto& el : m_eventsCache.get( context )->robmap ) + { + fn( &el.second ); + } } -// Dump ROB cache -std::string HltROBDataProviderSvc::dumpROBcache() const { - - ONLINE_ROBMAP::const_iterator cache_it = m_online_robmap.begin() ; - ONLINE_ROBMAP::const_iterator cache_end = m_online_robmap.end() ; - int nrob = 0; - - std::ostringstream ost; - ost << " --- Dump of ROB cache ids --- total size = " - << m_online_robmap.size() <<"\n"; - for(; cache_it!=cache_end; ++cache_it){ - ++nrob; - ost <<" # = "<< std::setw(5) << nrob << " cache id = 0x" << std::hex << (*cache_it).first - << " hex: source id = 0x" << std::hex << (*cache_it).second.source_id() - << std::dec << " decimal: source id = " << (*cache_it).second.source_id() << "\n"; - } - std::string ret(ost.str()); - return ret; +/// Flag to check if all event data have been retrieved +bool HltROBDataProviderSvc::isEventComplete(const EventContext& context) const +{ + ATH_MSG_VERBOSE("start of " << __FUNCTION__); + return m_eventsCache.get( context )->isEventComplete; } -/// Collect all data for an event from the ROS and put them into the cache -/// Return value: number of ROBs which were retrieved to complete event -int HltROBDataProviderSvc::collectCompleteEventData(const std::string callerName) { +/// retrieve in online running all ROBs for the event from the readout system. Only those ROBs are retrieved which are not already in the cache +int HltROBDataProviderSvc::collectCompleteEventData(const EventContext& context, const std::string_view callerName) +{ + ATH_MSG_VERBOSE("start of " << __FUNCTION__ << " caller name = " << callerName); - // return if call was already issued - if (m_isEventComplete) return 0; + EventCache* cache = m_eventsCache.get( context ); - //-------------------- - // set the caller name - //-------------------- - if (callerName != "UNKNOWN") m_callerName = callerName; + // return if event is already complete + if (cache->isEventComplete) return 0; typedef std::vector<hltinterface::DCM_ROBInfo> ROBInfoVec; ROBInfoVec vRobInfos ; if (m_enabledROBs.value().size() != 0) { vRobInfos.reserve( m_enabledROBs.value().size() ) ; } else { - vRobInfos.reserve( HltROBDataProviderConstants::Max_Number_Of_ROBs ) ; + vRobInfos.reserve( eformat::write::MAX_UNCHECKED_FRAGMENTS ) ; } - struct timeval time_start; - struct timeval time_stop; - if ( m_doMonitoring || m_doDetailedROBMonitoring.value() ) gettimeofday(&time_start, 0); - // Get ROB Fragments for complete event with DataCollector - hltinterface::DataCollector::instance()->collect(vRobInfos, m_currentLvl1ID); - - if ( m_doMonitoring || m_doDetailedROBMonitoring.value() ) gettimeofday(&time_stop, 0); - - if (msgLvl(MSG::DEBUG)) { - std::ostringstream ost; - unsigned int rob_counter = 1; - for (const auto& rob : vRobInfos) { - ost << " # = "<< std::setw(5) << rob_counter++ << " ROB id = 0x" - << std::hex << rob.robFragment.source_id() << std::dec << "\n" ; - } - ATH_MSG_DEBUG(" ---> collectCompleteEventData: The following ROB Ids were received from DataCollector : \n" - << " Lvl1 id = " << m_currentLvl1ID << "\n" - << " Number of actually received ROB Ids = " << vRobInfos.size() << "\n" - << ost.str()); - } - - - // detailed ROB monitoring - //------------------------ - // Create a ROB monitoring collection and register it to StoreGate - ROBDataMonitorCollection* p_robMonCollection(0); - if ( m_doDetailedROBMonitoring.value() ) { - if ( !(m_storeGateSvc->transientContains<ROBDataMonitorCollection>(m_ROBDataMonitorCollection_SG_Name.value())) ) { - p_robMonCollection = new ROBDataMonitorCollection; - if ( p_robMonCollection ) { - p_robMonCollection->reserve( HltROBDataProviderConstants::Number_of_Rob_Monitor_Structs ) ; - if ( (m_storeGateSvc->record(p_robMonCollection, m_ROBDataMonitorCollection_SG_Name.value(), true)).isFailure() ) { - ATH_MSG_WARNING(" Registering ROB Monitoring collection in StoreGate failed."); - delete p_robMonCollection; - p_robMonCollection = 0; - } - } - } else { - if ( m_storeGateSvc->retrieve(p_robMonCollection).isFailure() ) { - ATH_MSG_WARNING(" Retrieval of ROB Monitoring collection from StoreGate failed."); - p_robMonCollection = 0; - } - } - } - - // create a new ROBDataMonitorStruct and fill it - robmonitor::ROBDataMonitorStruct* p_robMonStruct(0); - if ( p_robMonCollection ) { - // caller name - std::string caller_name("UNKNOWN"); - if (callerName != "UNKNOWN") { - caller_name = callerName; - } else if ((callerName == "UNKNOWN") && (m_callerName != "UNKNOWN")) { - caller_name = m_callerName; - } else { - IAlgorithm* alg(0); - if ( m_algContextSvc ) { - alg = m_algContextSvc->currentAlg(); - caller_name = (alg ? alg->name() : "<NONE>"); - } - } - - // get ROB Ids - std::vector<uint32_t> robIds; - robIds.reserve(vRobInfos.size()); - for(ROBInfoVec::const_iterator it=vRobInfos.begin(); it!=vRobInfos.end(); ++it) { - robIds.push_back( it->robFragment.source_id() ) ; - } - - // initialize new ROBDataMonitorStruct - p_robMonStruct = new robmonitor::ROBDataMonitorStruct(m_currentLvl1ID, robIds, caller_name); - } - - if ( m_doMonitoring || p_robMonStruct ) { - int secs = 0 ; - if (time_stop.tv_sec >= time_start.tv_sec) - secs = time_stop.tv_sec - time_start.tv_sec; - - int usecs = time_stop.tv_usec - time_start.tv_usec; - float mtime = static_cast<float>(secs)*1000 + static_cast<float>(usecs)/1000; - - //* timing histogram - if (m_hist_timeROBretrieval) { - scoped_lock_histogram lock; - m_hist_timeROBretrieval->Fill(mtime); - m_hist_timeROBretrieval->LabelsDeflate("X"); - } - //* number of received ROBs - if ( m_hist_receivedROBsPerCall ) { - scoped_lock_histogram lock; - m_hist_receivedROBsPerCall->Fill(vRobInfos.size()); - m_hist_receivedROBsPerCall->LabelsDeflate("X"); - } - - //* detailed monitoring - if ( p_robMonStruct ) { - p_robMonStruct->start_time_of_ROB_request = time_start; - p_robMonStruct->end_time_of_ROB_request = time_stop; - } - } - - // add ROBs to cache - updateROBDataCache(vRobInfos,p_robMonStruct); - - // add the ROB monitoring structure to the collection - if ( p_robMonCollection && p_robMonStruct ) p_robMonCollection->push_back( p_robMonStruct ); + try { + auto mon_col_t = Monitored::Timer("TIME_CollectAllROBs"); + hltinterface::DataCollector::instance()->collect(vRobInfos, cache->globalEventNumber); + mon_col_t.stop(); + ATH_MSG_DEBUG( __FUNCTION__ << ": Number of received ROB Ids = " << vRobInfos.size() ); + // Fill monitoring histograms + auto mon_col_nROBs = Monitored::Scalar("NUMBER_CollectAllROBs",vRobInfos.size()); + auto mon = Monitored::Group(m_monTool, mon_col_t, mon_col_nROBs); + } catch (const std::exception& ex) { + ATH_MSG_ERROR( __FUNCTION__ << ":" << __LINE__ + << "Failed to collect complete event, caught an unexpected exception: " << ex.what() + << ". Throwing hltonl::Exception::EventSourceCorrupted" ); + throw hltonl::Exception::EventSourceCorrupted(); + } catch (...) { + ATH_MSG_ERROR( __FUNCTION__ << ":" << __LINE__ + << "Failed to collect complete event, caught an unexpected exception. " + << "Throwing hltonl::Exception::EventSourceCorrupted" ); + throw hltonl::Exception::EventSourceCorrupted(); + } + + // Store retrieved ROB data in the cache + std::vector<ROBF> robFragments_missing; + robFragments_missing.reserve( vRobInfos.size() ); + for(ROBInfoVec::const_iterator it=vRobInfos.begin(); it!=vRobInfos.end(); ++it) { + ATH_MSG_VERBOSE(__FUNCTION__ << " ROB Id = 0x" << MSG::hex << it->robFragment.source_id() << MSG::dec + << " retrieved from DCM for (global Id, L1 Id) = (" << cache->globalEventNumber << "," << cache->currentLvl1ID <<")" ); + robFragments_missing.push_back( it->robFragment ); + } + // add the ROBs to the cache/rob map + eventCache_addRobData(cache, robFragments_missing) ; // update event complete flag - m_isEventComplete = true; + cache->isEventComplete = true; return vRobInfos.size(); -} // end int collectCompleteEventData(...) - -/// set the name of the program which uses the ROBDataProviderSvc -void HltROBDataProviderSvc::setCallerName(const std::string callerName) { - m_callerName = callerName; } -// handler for BeginRun -void HltROBDataProviderSvc::handle(const Incident& incident) { - if (incident.type()!="BeginRun") return; - ATH_MSG_DEBUG("In BeginRun incident."); - - // if detailed ROB monitoring is requested, check if the AlgContextSvc is running, - // if yes use it to obtain the calling algorithm name - if ( m_doDetailedROBMonitoring.value() ) { - if ( service("AlgContextSvc", m_algContextSvc, /*createIf=*/ false).isFailure() ) { - ATH_MSG_ERROR("Error retrieving AlgContextSvc." - << "Calling algorithm name not available in detailed ROB monitoring"); - m_algContextSvc=0; - } - } - - // define histograms if monitoring is requested - if ( !m_doMonitoring.value() ) return; - - // find histogramming service - ServiceHandle<ITHistSvc> rootHistSvc("THistSvc", name()); - if ((rootHistSvc.retrieve()).isFailure()) { - ATH_MSG_ERROR("Unable to locate THistSvc"); - rootHistSvc.release().ignore(); - return; - } - - // *-- booking path - std::string path = std::string("/EXPERT/") + name() + "/"; - - // *-- number of bins for sub detector plots (55 SubDet max.) - uint32_t n_bins_partEBSubDet = eformat::helper::SubDetectorDictionary.size(); - - // *-- number of requested ROBs per call - m_hist_requestedROBsPerCall = new TH1F (m_histProp_requestedROBsPerCall.value().title().c_str(), - (m_histProp_requestedROBsPerCall.value().title()+";number of ROBs").c_str(), - m_histProp_requestedROBsPerCall.value().bins(), - m_histProp_requestedROBsPerCall.value().lowEdge(), - m_histProp_requestedROBsPerCall.value().highEdge()); - if (m_hist_requestedROBsPerCall) { - CAN_REBIN(m_hist_requestedROBsPerCall); - if( rootHistSvc->regHist(path + m_hist_requestedROBsPerCall->GetName(), m_hist_requestedROBsPerCall).isFailure() ) { - ATH_MSG_WARNING("Can not register monitoring histogram: " << m_hist_requestedROBsPerCall->GetName()); - } - } - - // *-- number of received ROBs per call - m_hist_receivedROBsPerCall = new TH1F (m_histProp_receivedROBsPerCall.value().title().c_str(), - (m_histProp_receivedROBsPerCall.value().title()+";number of ROBs").c_str(), - m_histProp_receivedROBsPerCall.value().bins(), - m_histProp_receivedROBsPerCall.value().lowEdge(), - m_histProp_receivedROBsPerCall.value().highEdge()); - if (m_hist_receivedROBsPerCall) { - CAN_REBIN(m_hist_receivedROBsPerCall); - if( rootHistSvc->regHist(path + m_hist_receivedROBsPerCall->GetName(), m_hist_receivedROBsPerCall).isFailure() ) { - ATH_MSG_WARNING("Can not register monitoring histogram: " << m_hist_receivedROBsPerCall->GetName()); - } - } - - // *-- timing of ROB retrieval - m_hist_timeROBretrieval = new TH1F (m_histProp_timeROBretrieval.value().title().c_str(), - (m_histProp_timeROBretrieval.value().title()+";time [ms]").c_str(), - m_histProp_timeROBretrieval.value().bins(), - m_histProp_timeROBretrieval.value().lowEdge(), - m_histProp_timeROBretrieval.value().highEdge()); - if (m_hist_timeROBretrieval) { - CAN_REBIN(m_hist_timeROBretrieval); - if( rootHistSvc->regHist(path + m_hist_timeROBretrieval->GetName(), m_hist_timeROBretrieval).isFailure() ) { - ATH_MSG_WARNING("Can not register monitoring histogram: " << m_hist_timeROBretrieval->GetName()); - } - } - - // *-- Generic Status for ROBs per sub detector - m_hist_genericStatusForROB = new TH2F ("GenericStatusForROBsFromSubDetectors", - "GenericStatusForROBsFromSubDetectors;;", - n_bins_partEBSubDet,0.,(float) n_bins_partEBSubDet, - m_map_GenericStatus.size(),0., (float) m_map_GenericStatus.size()); - if (m_hist_genericStatusForROB) { - uint32_t n_tmp_bin = 1; - for (eformat::helper::EnumClass<eformat::SubDetector>::const_iterator it_sub=eformat::helper::SubDetectorDictionary.begin(); - it_sub != eformat::helper::SubDetectorDictionary.end(); ++it_sub ) { - m_hist_genericStatusForROB->GetXaxis()->SetBinLabel( n_tmp_bin, (it_sub->second).c_str() ); - n_tmp_bin++; - } +/// method to filter ROBs with given Status code +bool HltROBDataProviderSvc::robmap_filterRobWithStatus(const ROBF* rob) +{ + // No filter criteria defined + if ((m_filterRobMap.size() == 0) && (m_filterSubDetMap.size() == 0)) { + return(false); + } + + // There should be at least one status element if there was an error + // in case there are 0 status elements then there was no known error + // (see event format document ATL-D-ES-0019 (EDMS)) + const uint32_t* rob_it_status; + const uint32_t null_status(0); + // The ROB has no status elements + if (rob->nstatus() == 0) { + rob_it_status = &null_status; + } else { + // The ROB has at least one status element, access it via an iterator + rob->status(rob_it_status); + } - n_tmp_bin = 1; - for (std::map<eformat::GenericStatus, std::string>::const_iterator it = m_map_GenericStatus.begin();it != m_map_GenericStatus.end();++it) { - m_hist_genericStatusForROB->GetYaxis()->SetBinLabel( n_tmp_bin, (*it).second.c_str() ); - n_tmp_bin++; - } - if( rootHistSvc->regHist(path + m_hist_genericStatusForROB->GetName(), m_hist_genericStatusForROB).isFailure() ) { - ATH_MSG_WARNING("Can not register monitoring histogram: " << m_hist_genericStatusForROB->GetName()); + // Build the full ROB Sourceidentifier + eformat::helper::SourceIdentifier tmpsrc(rob->rob_source_id()); + + // Check if there is a ROB specific filter rule defined for this ROB Id and match the status code + FilterRobMap::iterator map_it_rob = m_filterRobMap.find(tmpsrc.code()); + if (map_it_rob != m_filterRobMap.end()) { + for (auto it_status: (*map_it_rob).second) { + if (*rob_it_status == it_status) { + ATH_MSG_VERBOSE(__FUNCTION__ << " ROB Id = 0x" << MSG::hex << tmpsrc.code() + << " with status = 0x" << *rob_it_status << MSG::dec + << " removed due to ROB filter rule."); + return(true); + } } } - // *-- Specific Status Bits for ROBs per sub detector - m_hist_specificStatusForROB = new TH2F ("SpecificStatusBitsForROBsFromSubDetectors", - "SpecificStatusBitsForROBsFromSubDetectors;;", - n_bins_partEBSubDet,0.,(float) n_bins_partEBSubDet, - m_vec_SpecificStatus.size(),0., (float) m_vec_SpecificStatus.size()); - if (m_hist_specificStatusForROB) { - uint32_t n_tmp_bin = 1; - for (eformat::helper::EnumClass<eformat::SubDetector>::const_iterator it_sub=eformat::helper::SubDetectorDictionary.begin(); - it_sub != eformat::helper::SubDetectorDictionary.end(); ++it_sub ) { - m_hist_specificStatusForROB->GetXaxis()->SetBinLabel( n_tmp_bin, (it_sub->second).c_str() ); - n_tmp_bin++; - } - - n_tmp_bin = 1; - for (std::vector<std::string>::const_iterator it = m_vec_SpecificStatus.begin();it != m_vec_SpecificStatus.end();++it) { - m_hist_specificStatusForROB->GetYaxis()->SetBinLabel( n_tmp_bin, (*it).c_str() ); - n_tmp_bin++; - } - if( rootHistSvc->regHist(path + m_hist_specificStatusForROB->GetName(), m_hist_specificStatusForROB).isFailure() ) { - ATH_MSG_WARNING("Can not register monitoring histogram: " << m_hist_specificStatusForROB->GetName()); + // Check if there is a sub detector specific filter rule defined for this ROB Id and match the status code + FilterSubDetMap::iterator map_it_subdet = m_filterSubDetMap.find(tmpsrc.subdetector_id()); + if (map_it_subdet != m_filterSubDetMap.end()) { + for (auto it_status: (*map_it_subdet).second) { + if (*rob_it_status == it_status) { + ATH_MSG_VERBOSE(__FUNCTION__ << " ROB Id = 0x" << MSG::hex << tmpsrc.code() + << " with status = 0x" << *rob_it_status << MSG::dec + << " removed due to SubDet filter rule."); + return(true); + } } } + return(false); +} - // release histogramming service - rootHistSvc.release().ignore(); -} // end handler for BeginRun - -// helper function to retrieve ROB fragments over the network and to add them to the cache -void HltROBDataProviderSvc::addROBDataToCache(std::vector<uint32_t>& robIdsForRetrieval, - robmonitor::ROBDataMonitorStruct* p_robMonStruct) { - - struct timeval time_start; - struct timeval time_stop; +void HltROBDataProviderSvc::eventCache_clear(EventCache* cache) +{ + ATH_MSG_VERBOSE("start of " << __FUNCTION__); + cache->event = nullptr; + cache->currentLvl1ID = 0; + cache->globalEventNumber = 0; + cache->eventStatus = 0; + cache->isEventComplete = false; + cache->robmap.clear(); +} - ATH_MSG_DEBUG(" ---> addROBDataToCache: Number of ROB Ids requested for retrieval : " - << robIdsForRetrieval.size() << ", Lvl1 id = " << m_currentLvl1ID); +void HltROBDataProviderSvc::eventCache_checkRobListToCache(EventCache* cache, const std::vector<uint32_t>& robIds_toCheck, + std::vector<const ROBF*>& robFragments_inCache, + std::vector<uint32_t>& robIds_missing ) +{ + ATH_MSG_VERBOSE("start of " << __FUNCTION__ << " number of ROB Ids to check = " << robIds_toCheck.size()); - // return if no ROBs are requested - if (robIdsForRetrieval.size() == 0) return; + for (uint32_t id : robIds_toCheck) { - - std::vector<uint32_t> vRobIds, vMETRobIds; - vRobIds.reserve( robIdsForRetrieval.size() ); - vMETRobIds.reserve( robIdsForRetrieval.size() ); - - // Check requested ROBs - for (std::vector<uint32_t>::const_iterator rob_it=robIdsForRetrieval.begin(); rob_it!=robIdsForRetrieval.end(); ++rob_it) { - uint32_t id = (*rob_it); - - // check first if ROB is already in cache - ONLINE_ROBMAP::iterator map_it = m_online_robmap.find(*rob_it) ; - if(map_it != m_online_robmap.end()) { - ATH_MSG_DEBUG(" ---> addROBDataToCache: Found ROB Id : 0x" << MSG::hex << (*map_it).second.source_id() - << MSG::dec <<" in cache "); - if ( p_robMonStruct ) { - - (p_robMonStruct->requested_ROBs)[id].rob_history = robmonitor::CACHED; - (p_robMonStruct->requested_ROBs)[id].rob_size = ((*map_it).second).fragment_size_word(); - if ( (*map_it).second.nstatus() != 0 ) { - const uint32_t* it_status; - (*map_it).second.status(it_status); - for (uint32_t k=0; k < (*map_it).second.nstatus(); k++) { - (p_robMonStruct->requested_ROBs)[id].rob_status_words.push_back( *(it_status+k) ); - } - } - } + // check if ROB is already in cache + ROBMAP::const_iterator map_it = cache->robmap.find(id); + if (map_it != cache->robmap.end()) { + ATH_MSG_VERBOSE(__FUNCTION__ << " ROB Id 0x" << MSG::hex << id << MSG::dec + << " found for (global Id, L1 Id) = (" << cache->globalEventNumber << "," << cache->currentLvl1ID <<")" ); + robFragments_inCache.push_back( &(map_it->second) ); continue; - } + } // check if ROB is actually enabled for readout - // do not perform this check for MET ROBs - if (m_enabledROBs.value().size() != 0) { - if ( (eformat::helper::SourceIdentifier(*rob_it).subdetector_id() != eformat::TDAQ_LAR_MET) && - (eformat::helper::SourceIdentifier(*rob_it).subdetector_id() != eformat::TDAQ_TILE_MET) ){ - std::vector<uint32_t>::const_iterator rob_enabled_it = - std::find(m_enabledROBs.value().begin(), m_enabledROBs.value().end(),(*rob_it)); - if(rob_enabled_it == m_enabledROBs.value().end()) { - ATH_MSG_DEBUG(" ---> addROBDataToCache: ROB Id : 0x" << MSG::hex << (*rob_it) << MSG::dec - << " will be not retrieved, since it is not on the list of enabled ROBs."); - if ( p_robMonStruct ) { - (p_robMonStruct->requested_ROBs)[id].rob_history = robmonitor::DISABLED; - } - continue; - } + if (m_enabledROBs.value().size() != 0) { + std::vector<uint32_t>::const_iterator rob_enabled_it = + std::find(m_enabledROBs.value().begin(), m_enabledROBs.value().end(),id); + if(rob_enabled_it == m_enabledROBs.value().end()) { + ATH_MSG_VERBOSE(__FUNCTION__ << " ROB Id : 0x" << MSG::hex << id << MSG::dec + << " will be not added, since it is not on the list of enabled ROBs."); + continue; } } - - if (m_ignoreROB.value().size() != 0) { - std::vector<uint32_t>::const_iterator rob_ignore_it = - std::find(m_ignoreROB.value().begin(), m_ignoreROB.value().end(),id); - if(rob_ignore_it != m_ignoreROB.value().end()) { - ATH_MSG_DEBUG(" ---> addROBDataToCache: ROB Id : 0x" << MSG::hex << id << MSG::dec - << " will be not retrieved, since it is on the veto list."); - if ( p_robMonStruct ) { - (p_robMonStruct->requested_ROBs)[id].rob_history = robmonitor::IGNORED; - } - continue; - } - } - - // separate MET and detector ROBs if requested - if ( (m_separateMETandDetROBRetrieval.value()) && - ( (eformat::helper::SourceIdentifier(*rob_it).subdetector_id() == eformat::TDAQ_LAR_MET) || - (eformat::helper::SourceIdentifier(*rob_it).subdetector_id() == eformat::TDAQ_TILE_MET) ) ) { - vMETRobIds.push_back( *rob_it ) ; - } else { - vRobIds.push_back( *rob_it ); - } - } - typedef std::vector<hltinterface::DCM_ROBInfo> ROBInfoVec; - ROBInfoVec vRobInfos ; + // the ROB is not in the cache and should be eventually added + ATH_MSG_VERBOSE(__FUNCTION__ << " ROB Id : 0x" << MSG::hex << id << MSG::dec <<" is missing "); + robIds_missing.push_back( id ) ; + } // end loop over input ROB Ids to check +} - // Get ROB Fragments with DataCollector - if ( m_doMonitoring || p_robMonStruct ) gettimeofday(&time_start, 0); - if ( vRobIds.size() != 0 ) { - vRobInfos.reserve( vRobIds.size() ) ; - hltinterface::DataCollector::instance()->collect(vRobInfos, m_currentLvl1ID, vRobIds); - } +void HltROBDataProviderSvc::eventCache_addRobData(EventCache* cache, const std::vector<ROBF>& robFragments) +{ + ATH_MSG_VERBOSE("start of " << __FUNCTION__ << " number of ROB fragments to add = " << robFragments.size()); - // Do a separate data collect call for MET ROBs if required - if ( (m_separateMETandDetROBRetrieval.value()) && (vMETRobIds.size() != 0) ) { - ROBInfoVec vMETRobInfos; - vMETRobInfos.reserve( vMETRobIds.size() ) ; - // retrieve MET ROBs - hltinterface::DataCollector::instance()->collect(vMETRobInfos, m_currentLvl1ID, vMETRobIds); - // add MET ROBs to Det ROBs - vRobInfos.insert( vRobInfos.end(), vMETRobInfos.begin(), vMETRobInfos.end() ); + for (auto rob : robFragments) { - - } + // Source ID + uint32_t id = rob.source_id(); + ATH_MSG_VERBOSE(__FUNCTION__ << " Id = 0x" << std::hex << id << std::dec ); - if(msgLvl(MSG::DEBUG) && ((vRobIds.size()!=0) || (vMETRobIds.size()!=0))) { - std::ostringstream ost; - unsigned int rob_counter = 1; - for (const auto& rob : vRobInfos) { - ost << " # = "<< std::setw(5) << rob_counter++ << " ROB id = 0x" << std::hex - << rob.robFragment.source_id() << std::dec << "\n" ; + // mask off the module ID for L2 and EF result for Run 1 data + if ( (eformat::helper::SourceIdentifier(id).module_id() != 0) && + (eformat::helper::SourceIdentifier(id).subdetector_id() == eformat::TDAQ_LVL2) ) { + id = eformat::helper::SourceIdentifier(eformat::helper::SourceIdentifier(id).subdetector_id(),0).code(); + if (!m_maskL2EFModuleID) { + ATH_MSG_ERROR(__FUNCTION__ << " Inconsistent flag for masking L2/EF module IDs"); + m_maskL2EFModuleID=true; + } + } else if ( (eformat::helper::SourceIdentifier(id).module_id() != 0) && + (eformat::helper::SourceIdentifier(id).subdetector_id() == eformat::TDAQ_EVENT_FILTER) && + (m_maskL2EFModuleID) ) { + id = eformat::helper::SourceIdentifier(eformat::helper::SourceIdentifier(id).subdetector_id(),0).code(); } - ATH_MSG_DEBUG(" ---> addROBDataToCache: The following ROB Ids were received from DataCollector : \n" - << " Lvl1 id = " << m_currentLvl1ID << "\n" - << " Number of detector ROB Ids requested for retrieval = " << vRobIds.size() << "\n" - << " Number of MET ROB Ids requested for retrieval = " << vMETRobIds.size() << "\n" - << " Number of actually received ROB Ids = " << vRobInfos.size() << "\n" - << ost.str()); - } - - if ( m_doMonitoring || p_robMonStruct ) { - gettimeofday(&time_stop, 0); - int secs = 0 ; - if (time_stop.tv_sec >= time_start.tv_sec) - secs = time_stop.tv_sec - time_start.tv_sec; - int usecs = time_stop.tv_usec - time_start.tv_usec; - float mtime = static_cast<float>(secs)*1000 + static_cast<float>(usecs)/1000; - - //* timing histogram - if (m_hist_timeROBretrieval) { - scoped_lock_histogram lock; - m_hist_timeROBretrieval->Fill(mtime); - m_hist_timeROBretrieval->LabelsDeflate("X"); + // check if ROB is already in cache + ROBMAP::const_iterator it = cache->robmap.find(id); + if (it != cache->robmap.end()) { + ATH_MSG_VERBOSE(__FUNCTION__ << " Duplicate ROB Id 0x" << MSG::hex << id << MSG::dec + << " found for (global Id, L1 Id) = (" << cache->globalEventNumber << "," << cache->currentLvl1ID <<")" ); + continue; } - //* detailed monitoring - if ( p_robMonStruct ) { - p_robMonStruct->start_time_of_ROB_request = time_start; - p_robMonStruct->end_time_of_ROB_request = time_stop; - } - } - - //* histograms for number of requested/received ROBs - if ( m_hist_requestedROBsPerCall ) { - scoped_lock_histogram lock; - m_hist_requestedROBsPerCall->Fill(robIdsForRetrieval.size()); - m_hist_requestedROBsPerCall->LabelsDeflate("X"); - } - if ( m_hist_receivedROBsPerCall ) { - scoped_lock_histogram lock; - m_hist_receivedROBsPerCall->Fill(vRobInfos.size()); - m_hist_receivedROBsPerCall->LabelsDeflate("X"); - } - - // add ROBs to cache - updateROBDataCache(vRobInfos,p_robMonStruct); - - return; -} // end void addROBDataToCache(...) - - -// helper function to put retrieved ROB fragments into the local cache and update the monitoring records -void HltROBDataProviderSvc::updateROBDataCache(std::vector<hltinterface::DCM_ROBInfo>& vRobInfo, - robmonitor::ROBDataMonitorStruct* p_robMonStruct) { - - ATH_MSG_DEBUG(" ---> updateROBDataCache: Number of ROB Info records for cache update : " - << vRobInfo.size() << ", Lvl1 id = " << m_currentLvl1ID); + // check for ROBs with no data + if ((rob.rod_ndata() == 0) && (m_filterEmptyROB)) { + ATH_MSG_VERBOSE(__FUNCTION__ << " Empty ROB Id = 0x" << MSG::hex << id << MSG::dec + << " removed for (global Id, L1 Id) = (" << cache->globalEventNumber << "," << cache->currentLvl1ID <<")" ); + continue; + } - // return if no ROB Info records are available - if (vRobInfo.size() == 0) return; - - // add ROBs to cache - typedef std::vector<hltinterface::DCM_ROBInfo> ROBInfoVec; - for(ROBInfoVec::const_iterator it=vRobInfo.begin(); it!=vRobInfo.end(); ++it) { - uint32_t id = it->robFragment.source_id() ; - - // check first if ROB is already in cache (for full event requests) - ONLINE_ROBMAP::iterator map_it = m_online_robmap.find(id) ; - if(map_it != m_online_robmap.end()) continue; - - if ((it->robFragment.rod_ndata() == 0) && (m_removeEmptyROB)) { - ATH_MSG_DEBUG(" ---> addROBDataToCache: Empty ROB Id = 0x" << MSG::hex << id << MSG::dec - << " removed for L1 Id = " << m_currentLvl1ID); - if ( p_robMonStruct ) { - (p_robMonStruct->requested_ROBs)[id].rob_history = robmonitor::IGNORED; - } - } else if ( ROBDataProviderSvc::filterRobWithStatus(&it->robFragment)) { - if (msgLvl(MSG::DEBUG) && (it->robFragment.nstatus() > 0)) { - const uint32_t* it_status; - it->robFragment.status(it_status); - eformat::helper::Status tmpstatus( (*it_status) ) ; - ATH_MSG_DEBUG(" ---> addROBDataToCache: ROB Id = 0x" << MSG::hex << id - << std::setfill( '0' ) - << " with Generic Status Code = 0x" << std::setw(4) << tmpstatus.generic() - << " and Specific Status Code = 0x" << std::setw(4) << tmpstatus.specific() - << MSG::dec - << " removed for L1 Id = " << m_currentLvl1ID); - } - if ( p_robMonStruct ) { - (p_robMonStruct->requested_ROBs)[id].rob_history = robmonitor::IGNORED; - } - } else if ((m_ignoreROB.value().size() != 0) && - (std::find(m_ignoreROB.value().begin(), m_ignoreROB.value().end(),id) != m_ignoreROB.value().end())) { - ATH_MSG_DEBUG(" ---> addROBDataToCache: ROB Id : 0x" << MSG::hex << id << MSG::dec - << " removed for L1 Id = " << m_currentLvl1ID); - if ( p_robMonStruct ) { - (p_robMonStruct->requested_ROBs)[id].rob_history = robmonitor::IGNORED; - } - } else { - m_online_robmap[id]= (it->robFragment); - //* detailed monitoring - if ( p_robMonStruct ) { - (p_robMonStruct->requested_ROBs)[id].rob_history = robmonitor::RETRIEVED; - (p_robMonStruct->requested_ROBs)[id].rob_size = it->robFragment.fragment_size_word(); - if ( it->robFragment.nstatus() != 0 ) { - const uint32_t* it_status; - it->robFragment.status(it_status); - for (uint32_t k=0; k < it->robFragment.nstatus(); k++) { - (p_robMonStruct->requested_ROBs)[id].rob_status_words.push_back( *(it_status+k) ); - } - } - } // end detailed monitoring - } - - //* fill monitoring histogram for ROB generic status - if ( ( m_hist_genericStatusForROB ) && ( it->robFragment.nstatus() != 0 ) ) { - const uint32_t* it_status; - it->robFragment.status(it_status); - if ((*it_status) != 0) { - scoped_lock_histogram lock; - m_hist_genericStatusForROB->Fill(eformat::helper::SourceIdentifier(it->robFragment.source_id()).human_detector().c_str(), - m_map_GenericStatus[eformat::helper::Status(*it_status).generic()].c_str(),1.); + // filter ROBs with external criteria + if (robmap_filterRobWithStatus(&rob)) { + if (rob.nstatus() > 0) { + const uint32_t* it_status; + rob.status(it_status); + eformat::helper::Status tmpstatus(*it_status); + ATH_MSG_VERBOSE(__FUNCTION__ << " ROB Id = 0x" << MSG::hex << id << std::setfill('0') + << " with Generic Status Code = 0x" << std::setw(4) << tmpstatus.generic() + << " and Specific Status Code = 0x" << std::setw(4) << tmpstatus.specific() << MSG::dec + << " removed for (global Id, L1 Id) = (" << cache->globalEventNumber << "," << cache->currentLvl1ID <<")" ); } + continue; } - //* fill monitoring histogram for ROB specific status - if ( ( m_hist_specificStatusForROB ) && ( it->robFragment.nstatus() != 0 ) ) { - const uint32_t* it_status; - it->robFragment.status(it_status); - if ((*it_status) != 0) { - scoped_lock_histogram lock; - std::bitset<16> specificBits(eformat::helper::Status(*it_status).specific()); - for (unsigned int index=0; index < 16; ++index) { - if (specificBits[index]) m_hist_specificStatusForROB->Fill(eformat::helper::SourceIdentifier(it->robFragment.source_id()).human_detector().c_str(), - m_vec_SpecificStatus[index].c_str(),1.); - } - } - } - } // end loop over ROBInfo records - return; -} // end void updateROBDataCache(...) + // add ROB to map + cache->robmap[id] = rob; + } +} + +HltROBDataProviderSvc::EventCache::~EventCache() +{ + // delete event; + robmap.clear(); +} diff --git a/HLT/Trigger/TrigControl/TrigServices/src/HltROBDataProviderSvc.h b/HLT/Trigger/TrigControl/TrigServices/src/HltROBDataProviderSvc.h index a9e37fbdcfb8ed8494f87087583c0c2606c4ea53..56f09782d28546e3df66f5f4d51d8000309e547c 100644 --- a/HLT/Trigger/TrigControl/TrigServices/src/HltROBDataProviderSvc.h +++ b/HLT/Trigger/TrigControl/TrigServices/src/HltROBDataProviderSvc.h @@ -1,251 +1,200 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ - #ifndef TRIGSERVICES_HLTROBDATAPROVIDERSVC_H #define TRIGSERVICES_HLTROBDATAPROVIDERSVC_H - -/** =============================================================== - * HltROBDataProviderSvc.h - * =============================================================== - * Description: ROBDataProvider class for accessing ROBData - * To be used for Offline/Online - * - * Requirements: define a ROBData class in the scope - * provide a method - * void getROBData(const vector<uint>& ids, vector<ROBData*>& v) - * Implementation: Use an interal map to store all ROBs - * We can not assume any ROB/ROS relationship, no easy - * way to search. - * - * Created: Sept 19, 2002 - * By: Hong Ma - * Modified: Aug. 18 2003 (common class for Online/Offline) - * By: Werner Wiedenmann - * Modified: Apr 21 2005 (implementation for online) - * By: Werner Wiedenmann - * Modified: Jun. 02 2006 (added monitoring horograms) - * By: Tomasz Bold - * Modified: May 21 2007 (updates for release 13) - * By: Werner Wiedenmann - * Modified: Nov. 10 2008 (updates for L2/EF result node ID handling) - * By: Werner Wiedenmann - * Modified: Mar. 05, 2013 (adapted from L2 for merged HLT) - * By: Ricardo Abreu - * Modified: Nov. 04, 2013 (implement complete hltinterface definitions) - * By: Werner Wiedenmann - */ -#include "GaudiKernel/Service.h" -#include "GaudiKernel/ISvcLocator.h" -#include "GaudiKernel/StatusCode.h" -#include "GaudiKernel/IIncidentListener.h" -#include "GaudiKernel/ServiceHandle.h" -#include "GaudiKernel/HistoProperty.h" -#include "GaudiKernel/Property.h" -#include "TrigROBDataProviderSvc/ITrigROBDataProviderSvc.h" -#include "TrigROBDataProviderSvc/ITrigROBDataProviderSvcPrefetch.h" -#include "ByteStreamCnvSvcBase/ROBDataProviderSvc.h" +/** + * @file HltROBDataProviderSvc.h + * @brief Service to serve ROB data in online environment + * @author Werner Wiedenmann + */ + +// Package includes +#include "ByteStreamCnvSvcBase/IROBDataProviderSvc.h" #include "ByteStreamData/RawEvent.h" -#include "TrigDataAccessMonitoring/ROBDataMonitor.h" -#include "TrigSteeringEvent/RobRequestInfo.h" -#include "eformat/Status.h" -#include "hltinterface/DCM_ROBInfo.h" -#include <vector> -#include <map> +#include "eformat/SourceIdentifier.h" -// Forward declarations -class StoreGateSvc; -class IAlgContextSvc; -class TH1F; /// for monitoring purposes -class TH2F; /// for monitoring purposes - -class HltROBDataProviderSvc : public ROBDataProviderSvc, - virtual public ITrigROBDataProviderSvc, - virtual public ITrigROBDataProviderSvcPrefetch, - virtual public IIncidentListener -{ -public: - - typedef OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment ROBF ; +// Framework includes +#include "AthenaBaseComps/AthService.h" +#include "AthenaKernel/SlotSpecificObj.h" +#include "AthenaMonitoring/Monitored.h" - HltROBDataProviderSvc(const std::string& name, ISvcLocator* svcloc); - - virtual ~HltROBDataProviderSvc(void); - - virtual StatusCode initialize(); +// STL includes +#include <string> +#include <string_view> +#include <vector> +#include <map> - virtual StatusCode finalize(); +// TBB includes +#include "tbb/concurrent_unordered_map.h" - virtual StatusCode queryInterface( const InterfaceID& riid, void** ppvInterface ); +/** + * @class HltROBDataProviderSvc + * @brief ROBDataProvider service for retrieving and serving ROB data in HLT online + **/ +class HltROBDataProviderSvc : public extends<AthService, IROBDataProviderSvc> { +public: + /// ROB Fragment class + typedef OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment ROBF; - /// --- Implementation of IROBDataProviderSvc interface --- + HltROBDataProviderSvc(const std::string& name, ISvcLocator* pSvcLocator); + virtual ~HltROBDataProviderSvc() override; + virtual StatusCode initialize() override; + virtual StatusCode finalize() override; - /// Add ROBFragments to cache for given ROB ids, ROB fragments may be retrieved with DataCollector - virtual void addROBData(const EventContext& /*ctx*/, - const std::vector<uint32_t>& robIds, - const std::string callerName="UNKNOWN") - { - addROBData(robIds, callerName); - } - virtual void addROBData(const std::vector<uint32_t>& robIds, - const std::string callerName="UNKNOWN"); + /// --- Implementation of IROBDataProviderSvc interface --- + /// --- Legacy interface (deprecated) --- - /// Add a given LVL1/HLT ROBFragment to cache - virtual void setNextEvent(const EventContext& /*ctx*/, - const std::vector<ROBF>& result) - { setNextEvent (result); } - virtual void setNextEvent(const std::vector<ROBF>& result); + /// Signal ROB fragments which should be considered for prefetching in online running + virtual void addROBData(const std::vector<uint32_t>& /*robIds*/, + const std::string_view callerName="UNKNOWN") override; - /// Add all ROBFragments of a RawEvent to cache - virtual void setNextEvent(const EventContext& /*ctx*/, const RawEvent* re) - { setNextEvent(re); } - virtual void setNextEvent(const RawEvent* re); + /// Start a new event with a set of ROB fragments, e.g. from LVL1 result, in online and add the fragments to the ROB cache + virtual void setNextEvent(const std::vector<ROBF>& /*result*/) override; - /// Retrieve ROBFragments for given ROB ids from cache - virtual void getROBData(const EventContext& /*ctx*/, - const std::vector<uint32_t>& robIds, - std::vector<const ROBF*>& robFragments, - const std::string callerName="UNKNOWN") - { - getROBData (robIds, robFragments, callerName); - } - virtual void getROBData(const std::vector<uint32_t>& robIds, - std::vector<const ROBF*>& robFragments, - const std::string callerName="UNKNOWN"); - - /// Retrieve the whole event. - virtual const RawEvent* getEvent(const EventContext& /*ctx*/) - { return getEvent(); } - virtual const RawEvent* getEvent(); + /// Start a new event with a full event fragment and add all ROB fragments in to the ROB cache + virtual void setNextEvent(const RawEvent* /*re*/) override; - /// --- Implementation of ITrigROBDataProviderSvc interface --- + /// Retrieve ROB fragments for given ROB ids from the ROB cache + virtual void getROBData(const std::vector<uint32_t>& /*robIds*/, std::vector<const ROBF*>& /*robFragments*/, + const std::string_view callerName="UNKNOWN") override; - /// Return vector with all ROBFragments stored in the cache - virtual void getAllROBData(std::vector<const ROBF*>& robFragments) ; + /// Retrieve the full event fragment + virtual const RawEvent* getEvent() override; - // Dump ROB cache - virtual std::string dumpROBcache() const ; + /// Store the status for the event. + virtual void setEventStatus(uint32_t /*status*/) override; - /// Return size of ROBFragments cache - virtual int sizeROBCache() { return m_online_robmap.size(); } + /// Retrieve the status for the event. + virtual uint32_t getEventStatus() override; - /// iterators over cache entries - virtual std::map<uint32_t, ROBF>::iterator beginROBCache() { return m_online_robmap.begin(); } - virtual std::map<uint32_t, ROBF>::iterator endROBCache() { return m_online_robmap.end(); } + /// --- Implementation of IROBDataProviderSvc interface --- + /// --- Context aware interface for MT --- - /// Flag to check if complete event data are already in cache - virtual bool isEventComplete(const EventContext& /*ctx*/) const { return m_isEventComplete; } - virtual bool isEventComplete() { return m_isEventComplete; } + /// Signal ROB fragments which should be considered for prefetching in online running + virtual void addROBData(const EventContext& /*context*/, const std::vector<uint32_t>& /*robIds*/, + const std::string_view callerName="UNKNOWN") override; - /// Collect all data for an event from the ROS and put them into the cache - /// Return value: number of ROBs which were retrieved to complete the event - /// Optinonally the name of the caller of this method can be specified for cost monitoring - virtual int collectCompleteEventData(const EventContext& /*ctx*/, - const std::string callerName="UNKNOWN") - { - return collectCompleteEventData(callerName); - } - virtual int collectCompleteEventData(const std::string callerName="UNKNOWN"); + /// Start a new event with a set of ROB fragments, e.g. from LVL1 result, in online and add the fragments to the ROB cache + virtual void setNextEvent(const EventContext& /*context*/, const std::vector<ROBF>& /*result*/) override; - /// set the name of the program which uses the ROBDataProviderSvc - virtual void setCallerName(const std::string); + /// Start a new event with a full event fragment and add all ROB fragments in to the ROB cache + virtual void setNextEvent(const EventContext& /*context*/, const RawEvent* /*re*/) override; - /// get the name of the program which is presently registered in the ROBDataProviderSvc - virtual std::string getCallerName() { return m_callerName; }; + /// Retrieve ROB fragments for given ROB ids from the ROB cache + virtual void getROBData(const EventContext& /*context*/, + const std::vector<uint32_t>& /*robIds*/, std::vector<const ROBF*>& /*robFragments*/, + const std::string_view callerName="UNKNOWN") override; - /// --- Implementation of ITrigROBDataProviderSvcPrefetch interface --- + /// Retrieve the full event fragment + virtual const RawEvent* getEvent(const EventContext& /*context*/) override; - /// Set access to ROB prefetching information from steering - virtual void setRobRequestInfo(HLT::RobRequestInfo* robInfo) { m_RobRequestInfo = robInfo; } ; + /// Store the status for the event. + virtual void setEventStatus(const EventContext& /*context*/, uint32_t /*status*/) override; - /// Get access to ROB prefetching information from steering - virtual HLT::RobRequestInfo* robRequestInfo() const { return m_RobRequestInfo; }; + /// Retrieve the status for the event. + virtual uint32_t getEventStatus(const EventContext& /*context*/) override; - /// --- Implementation of IIncidentListener interface --- + /// Apply a function to all ROBs in the cache + virtual void processCachedROBs(const EventContext& /*context*/, const std::function< void(const ROBF* )>& /*fn*/) const override; - // handler for BeginRun actions - void handle(const Incident& incident); + /// Flag to check if all event data have been retrieved + virtual bool isEventComplete(const EventContext& /*context*/) const override; + /// retrieve in online running all ROBs for the event from the readout system. Only those ROBs are retrieved which are not already in the cache + virtual int collectCompleteEventData(const EventContext& /*context*/, + const std::string_view callerName="UNKNOWN") override; private: - typedef ServiceHandle<StoreGateSvc> StoreGateSvc_t; - /// Reference to StoreGateSvc; - StoreGateSvc_t m_storeGateSvc; - - /// Pointer to AlgContextSvc - IAlgContextSvc* m_algContextSvc; - - typedef SimpleProperty< std::vector<uint32_t> > Uint32ArrayProperty; - typedef SimpleProperty< std::map<int,int> > IntegerMapProperty; - - // flag indicates if running in online/offline - bool m_onlineRunning ; - - // read enabled ROBs from OKS when possible - BooleanProperty m_readROBfromOKS; - - // list of all enabled ROBs which can be retrieved - Uint32ArrayProperty m_enabledROBs; - - // list of ROBs which should be ignored for retrieval - Uint32ArrayProperty m_ignoreROB; - - // list of all LAr MET ROBs which can be retrieved - Uint32ArrayProperty m_enabledLArMetROBs ; - UnsignedIntegerProperty m_genericLArMetModuleID ; - - // list of all Tile MET ROBs which can be retrieved - Uint32ArrayProperty m_enabledTileMetROBs; - UnsignedIntegerProperty m_genericTileMetModuleID ; - - // Separate data collector calls to ROS for normal ROBs and MET ROBs - BooleanProperty m_separateMETandDetROBRetrieval ; - - // Filter out empty ROB fragments which are send by the ROS - bool m_removeEmptyROB; - - // map for all the ROB fragments (cache for ROB data so that they are - // not deleted when local containers go out of scope) - typedef std::map<uint32_t, ROBF> ONLINE_ROBMAP; - ONLINE_ROBMAP m_online_robmap; - - // helper function to retrieve ROB fragments over the network and to add them to the cache - void addROBDataToCache(std::vector<uint32_t>& robIdsForRetrieval, // vector of ROBs to retrieve - robmonitor::ROBDataMonitorStruct* p_robMonStruct); // pointer to ROB monitoring structure for retrieval - - // helper function to put retrieved ROB fragments into the local cache and update the monitoring records - void updateROBDataCache(std::vector<hltinterface::DCM_ROBInfo>& vRobInfo, // vector of ROB Info records with retrieved fragments - robmonitor::ROBDataMonitorStruct* p_robMonStruct); // pointer to ROB monitoring structure - - // Flag to indicate if all event data are already in the cache - bool m_isEventComplete; - - // name of the program which presently uses the ROBDataProviderSvc - std::string m_callerName; - - // ROB prefetching info - HLT::RobRequestInfo* m_RobRequestInfo; - - // monitoring - std::map<eformat::GenericStatus, std::string> m_map_GenericStatus; - std::vector<std::string> m_vec_SpecificStatus; - - BooleanProperty m_doMonitoring; - BooleanProperty m_doDetailedROBMonitoring; - StringProperty m_ROBDataMonitorCollection_SG_Name; - - Histo1DProperty m_histProp_requestedROBsPerCall; - Histo1DProperty m_histProp_receivedROBsPerCall; - Histo1DProperty m_histProp_timeROBretrieval; - - TH1F* m_hist_requestedROBsPerCall; - TH1F* m_hist_receivedROBsPerCall; - TH1F* m_hist_timeROBretrieval; - TH2F* m_hist_genericStatusForROB; - TH2F* m_hist_specificStatusForROB; - - // Temporary hack to make this version compile in master - uint32_t m_currentLvl1ID; + /*--------------+ + * Event cache | + *--------------+ + */ + /// map for all the ROB fragments + typedef tbb::concurrent_unordered_map<uint32_t, ROBF> ROBMAP; + + /// struct which provides the event cache for each slot + struct EventCache { + ~EventCache(); + const RawEvent* event = 0; + uint32_t currentLvl1ID = 0; + uint64_t globalEventNumber = 0; + uint32_t eventStatus = 0; + bool isEventComplete = false; + ROBMAP robmap; + }; + + /// An event cache for each slot + SG::SlotSpecificObj<EventCache> m_eventsCache; + + /*------------------------------+ + * Attributes for configuration | + *------------------------------+ + */ + /// vector of Source ids and status words to be ignored for the ROB map + typedef std::vector< std::pair<int, int> > ArrayPairIntType; + Gaudi::Property< ArrayPairIntType > m_filterRobWithStatus{ + this, "filterRobWithStatus", {} , "List of ROBs with status code to remove"}; + Gaudi::Property< ArrayPairIntType > m_filterSubDetWithStatus{ + this, "filterSubDetWithStatus", {} , "List of SubDets with status code to remove"}; + + /// map of full ROB Source ids and status words to be ignored for the ROB map + typedef std::map<uint32_t, std::vector<uint32_t> > FilterRobMap; + FilterRobMap m_filterRobMap; + /// map of Sub Det Source ids and status words to be ignored for the ROB map + typedef std::map<eformat::SubDetector, std::vector<uint32_t> > FilterSubDetMap; + FilterSubDetMap m_filterSubDetMap; + + /// Filter out empty ROB fragments which are send by the ROS + Gaudi::Property<bool> m_filterEmptyROB{ + this, "filterEmptyROB", false , "Filter out empty ROB fragments"}; + + /// For Run 1 the module ID for the Lvl2/EF result contained the machine ID and nedded to + /// be filtered out to access these result records transparently + bool m_maskL2EFModuleID = false; + + // read enabled ROBs from OKS when possible + Gaudi::Property<bool> m_readROBfromOKS{ + this, "readROBfromOKS", true , "Read enabled ROBs from OKS"}; + + // list of all enabled ROBs which can be retrieved + Gaudi::Property< std::vector<uint32_t> > m_enabledROBs{ + this, "enabledROBs", {} , "Enabled ROBs for retrieval"}; + + /*------------------------+ + * Methods acting on ROBs | + *------------------------+ + */ + /// method to filter ROBs with given Status code + bool robmap_filterRobWithStatus(const ROBF*); + + /*------------------------------+ + * Methods acting on EventCache | + *------------------------------+ + */ + /// method to clear an event cache in a slot + /// input: + /// pointer to cache + void eventCache_clear(EventCache*); + + /// method to compare a list of ROB Ids to the ones in an event cache in a slot + /// input: + /// pointer to cache + /// vector of ROB Ids to compare to existing ones in cache + /// output: + /// vector of ROB fragments available already in cache + /// vector of ROB Ids missing in cache + void eventCache_checkRobListToCache(EventCache*, const std::vector<uint32_t>&, + std::vector<const ROBF*>&, std::vector<uint32_t>& ); + + /// method to add ROB fragments to an event cache in a slot + /// input: + /// pointer to cache + /// vector of ROB fragments to add to the cache + void eventCache_addRobData(EventCache*, const std::vector<ROBF>&) ; + + /// Monitoring tool + ToolHandle<GenericMonitoringTool> m_monTool{this, "MonTool", "", "Monitoring tool"}; }; -#endif +#endif // TRIGSERVICES_HLTROBDATAPROVIDERSVC_H diff --git a/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/src/InDetBeamSpotReader.cxx b/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/src/InDetBeamSpotReader.cxx index bdd0ef2c8497342d9ede62875f5e1d63a102f025..69ba8b91c1e5006e410c4165af1261f722cdd491 100644 --- a/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/src/InDetBeamSpotReader.cxx +++ b/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/src/InDetBeamSpotReader.cxx @@ -1,15 +1,9 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "InDetBeamSpotReader.h" - #include "VxVertex/VxCandidate.h" -//#include "TrkEventPrimitives/VertexType.h" - -#include "EventInfo/EventID.h" - - InDet::InDetBeamSpotReader::InDetBeamSpotReader(const std::string& name, ISvcLocator* pSvcLocator): AthReentrantAlgorithm(name, pSvcLocator) @@ -32,9 +26,8 @@ StatusCode InDet::InDetBeamSpotReader::execute(const EventContext& ctx) const { //get the set of SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle { m_beamSpotKey, ctx }; - SG::ReadHandle<EventInfo> eventInfo(m_eventInfo, ctx); - EventID* eventID = eventInfo->event_ID(); - ATH_MSG_INFO( "In event " << (*eventID) ); + SG::ReadHandle<xAOD::EventInfo> eventInfo(m_eventInfo, ctx); + ATH_MSG_INFO( "In event " << (*eventInfo) ); ATH_MSG_INFO("BeamSpot Position: \n " << beamSpotHandle->beamPos() ); ATH_MSG_INFO("BeamSpot Sigma\n\t" diff --git a/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/src/InDetBeamSpotReader.h b/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/src/InDetBeamSpotReader.h index 8533e0c824744c74b09df77476c8d93de6858144..ee83cf1be1d4c30f1f0ff206e867ef536d7f7c08 100644 --- a/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/src/InDetBeamSpotReader.h +++ b/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/src/InDetBeamSpotReader.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef INDET_INDETBEAMSPOTREADER_H @@ -13,7 +13,7 @@ #include "AthenaBaseComps/AthReentrantAlgorithm.h" #include "StoreGate/ReadHandleKey.h" #include "VxVertex/VxContainer.h" -#include "EventInfo/EventInfo.h" +#include "xAODEventInfo/EventInfo.h" #include "BeamSpotConditionsData/BeamSpotData.h" namespace InDet { @@ -34,7 +34,7 @@ namespace InDet { private: SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" }; - SG::ReadHandleKey<EventInfo> m_eventInfo + SG::ReadHandleKey<xAOD::EventInfo> m_eventInfo {this, "EvtInfo", "EventInfo", "EventInfo name"}; SG::ReadHandleKey<VxContainer> m_vxContainer {this, "VxContainer", "VxPrimaryCandidate", "Vertex container name"}; diff --git a/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/src/InDetBeamSpotRooFit.cxx b/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/src/InDetBeamSpotRooFit.cxx index dc21a4702438f92b20e5b1948e170691e7b764bc..f658c6308e7f95113f636078d516c4bea09c3f29 100644 --- a/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/src/InDetBeamSpotRooFit.cxx +++ b/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/src/InDetBeamSpotRooFit.cxx @@ -1,11 +1,9 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "InDetBeamSpotRooFit.h" #include "GaudiKernel/ITHistSvc.h" -#include "EventInfo/EventInfo.h" -#include "EventInfo/EventID.h" #include "VxVertex/VxCandidate.h" #include "VxVertex/VxContainer.h" #include <RooRealVar.h> diff --git a/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/src/InDetBeamSpotVertex.cxx b/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/src/InDetBeamSpotVertex.cxx index ac58270dba17951ecbf7abc4009320c4d49322a9..bfcd4dc9eaed141e535d307270802df9ca14a5fa 100644 --- a/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/src/InDetBeamSpotVertex.cxx +++ b/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/src/InDetBeamSpotVertex.cxx @@ -1,13 +1,9 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "InDetBeamSpotVertex.h" - - #include "GaudiKernel/ITHistSvc.h" -#include "EventInfo/EventInfo.h" -#include "EventInfo/EventID.h" #include "VxVertex/VxCandidate.h" #include "VxVertex/VxContainer.h" diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/PixelChargeInterpolationValidation.cxx b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/PixelChargeInterpolationValidation.cxx index f938992e6dcf070d97d48f5acd5147bfdcbb50f0..e367ce9048bd0ee1d78869d593803fdef4c9cde9 100644 --- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/PixelChargeInterpolationValidation.cxx +++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/PixelChargeInterpolationValidation.cxx @@ -50,8 +50,6 @@ PixelChargeInterpolationValidation::PixelChargeInterpolationValidation(std::stri m_name(tag){ std::vector<float> *layers = getLayersBins(); - std::vector<float> etabins = model.getEtaBins(); - std::vector<float> phibins = model.getAngleBins(); std::vector<float> clustersizeEta = model.getClusterSizeYBins(); clustersizeEta.insert(clustersizeEta.begin(),0.5); clustersizeEta.push_back(100); diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..3b2aa4f2c9c7ce4e8b9abc29d94d6072f3b045b2 --- /dev/null +++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +InnerDetector/InDetCalibAlgs/SCT_CalibAlgs diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/ISCT_CalibEvtInfo.h b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/ISCT_CalibEvtInfo.h index 2f4b3812bc2bed633d047e33bf99971d3dca6b68..a3b3cca59e9214dfb51713e98c3e27702bced568 100644 --- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/ISCT_CalibEvtInfo.h +++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/ISCT_CalibEvtInfo.h @@ -1,14 +1,14 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /** -* @file ISCT_CalibEvtInfo.h -* interface for SCT_CalibEvtInfo -* -* author Shaun Roe -* -**/ + * @file ISCT_CalibEvtInfo.h + * interface for SCT_CalibEvtInfo + * + * author Shaun Roe + * + **/ #ifndef ISCT_CalibEvtInfo_H #define ISCT_CalibEvtInfo_H @@ -20,49 +20,47 @@ #include <string> /** -* @class ISCTCalib_EvtInfo -* Interface to class to deal with run/event information for SCTCalib -**/ + * @class ISCTCalib_EvtInfo + * Interface to class to deal with run/event information for SCTCalib + **/ class ISCT_CalibEvtInfo: virtual public IAlgTool{ - public: - /// no-op c/tor - ISCT_CalibEvtInfo(){} - /// no-op destructor - virtual ~ISCT_CalibEvtInfo(){} - /// interfaceID re-implemented from IInterface - static const InterfaceID & interfaceID(); - /// specific methods for this class - //virtual void setOptions(const bool useBytestream, const bool useTrkVal, const bool sortChain, const bool readHist)=0; - virtual void setTimeStamp(const std::string & begin, const std::string & end)=0; - virtual void setTimeStamp(const int begin, const int end)=0; - virtual void setTimeStamp(const int ts)=0; + public: + /// no-op c/tor + ISCT_CalibEvtInfo(){} + /// no-op destructor + virtual ~ISCT_CalibEvtInfo() = default; + /// interfaceID re-implemented from IInterface + static const InterfaceID& interfaceID(); + /// specific methods for this class + virtual void setTimeStamp(const int begin, const int end)=0; + virtual void setTimeStamp(const std::string& begin, const std::string& end)=0; + virtual void setTimeStamp(const int ts)=0; + virtual void getTimeStamps(int& begin, int& end) const =0; + virtual void getTimeStamps(std::string& begin, std::string& end) const =0; + virtual int timeStamp() const =0; + virtual int duration() const =0; - virtual void setSource(const std::string source)=0; + virtual void setSource(const std::string source)=0; - virtual void getLumiBlock(int & begin, int & end) const=0; - virtual void setLumiBlock(const int begin, const int end)=0; - virtual void setLumiBlock(const int lb)=0; + virtual void setLumiBlock(const int begin, const int end)=0; + virtual void setLumiBlock(const int lb)=0; + virtual void getLumiBlock(int& begin, int& end) const =0; + virtual int lumiBlock() const =0; + virtual int numLumiBlocks() const =0; - virtual void setRunNumber(const int rn)=0; - virtual void setBunchCrossing(const int bc)=0; - virtual void setCounter(const int counterVal)=0; - virtual void incrementCounter()=0; + virtual void setRunNumber(const int rn)=0; + virtual int runNumber() const =0; - virtual void getTimeStamps(int & begin, int & end) const=0; - virtual void getTimeStamps(std::string & begin, std::string & end) const=0; - - virtual int timeStamp()const=0; - virtual int lumiBlock() const=0; - virtual int runNumber() const=0; - virtual int counter() const =0; - virtual int duration() const=0; - virtual int numLumiBlocks() const=0; + virtual void setCounter(const int counterVal)=0; + virtual void incrementCounter()=0; + virtual int counter() const =0; + virtual void setBunchCrossing(const int bc)=0; }; -inline const InterfaceID & ISCT_CalibEvtInfo::interfaceID(){ - static const InterfaceID IID("ISCT_CalibEvtInfo",1,0); +inline const InterfaceID& ISCT_CalibEvtInfo::interfaceID() { + static const InterfaceID IID{"ISCT_CalibEvtInfo", 1, 0}; return IID; } diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/ISCT_CalibHistoTool.h b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/ISCT_CalibHistoTool.h index 1b58fe492ecbf3b7c4aff9c63aae78222184b923..bd16f81542b940aeefcc988e293d3294d935a2e9 100644 --- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/ISCT_CalibHistoTool.h +++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/ISCT_CalibHistoTool.h @@ -1,12 +1,12 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /** * @file ISCT_CalibHistoTool.h * Header file to interface class for histograms in the SCT_CalibAlgs package * @author Shaun Roe -**/ + **/ #ifndef ISCT_CalibHistoTool_h #define ISCT_CalibHistoTool_h @@ -26,61 +26,57 @@ class ITHistSvc; class SCT_ID; class ISCT_CalibHistoTool: virtual public IAlgTool { - public: - ISCT_CalibHistoTool(); - /// no-op destructor - virtual ~ISCT_CalibHistoTool() = default; - /// interfaceID re-implemented from IInterface - static const InterfaceID & interfaceID(); - /// book histograms - virtual bool book()=0; - /// read histograms - virtual bool read(const std::string & fileName)=0; - /// fill histograms from simulation - virtual bool fill(const bool fromData=false)=0; - /// fill histograms from data - virtual bool fillFromData()=0; - /// get number of events in a specific bin - virtual int getNumberOfEventsInBin(const int nbin) const; - /// get total number of entries in the number of events histo - int size() const; - /// get bin content for bin in specific histogram - double getBinForHistogramIndex(const int bin, const int histogramIndex) const; - /// get the number of entries in a given histogram - int size(const int histogramIndex) const; - void binHistograms(const int nLbMerged); - /// set number of lumiblocks - static void setNumberOfLb(const int nLb); - /// get number of lumiblocks - static int numberOfLb(); - /// set number of lumiblocks - static void setLbToMerge(const int nLbMerge); - /// get number of lumiblocks - static int LbToMerge(); - protected: - std::vector<TH1F *> m_phistoVector; - std::vector<TH2F *> m_phistoVector2D; - TH1I * m_numberOfEventsHisto; - ITHistSvc * m_thistSvc; - //need to implement retrieval for these - //ServiceHandle<StoreGateSvc> m_detStore; - //ServiceHandle<StoreGateSvc> m_evtStore; - const SCT_ID* m_pSCTHelper; - static int m_nLb; - static int m_nLbMerge; - // - bool init(); - template<class T> - std::pair<std::string, bool> retrievedTool(T & tool) { - if (tool.retrieve().isFailure() ) return std::make_pair(std::string("Unable to retrieve ")+tool.name(), false); - return std::make_pair("",true); - } + public: + ISCT_CalibHistoTool(); + /// no-op destructor + virtual ~ISCT_CalibHistoTool() = default; + /// interfaceID re-implemented from IInterface + static const InterfaceID& interfaceID(); + /// book histograms + virtual bool book()=0; + /// read histograms + virtual bool read(const std::string& fileName)=0; + /// fill histograms from simulation + virtual bool fill(const bool fromData=false)=0; + /// fill histograms from data + virtual bool fillFromData()=0; + /// get number of events in a specific bin + virtual int getNumberOfEventsInBin(const int nbin) const; + /// get total number of entries in the number of events histo + int size() const; + /// get bin content for bin in specific histogram + double getBinForHistogramIndex(const int bin, const int histogramIndex) const; + /// get the number of entries in a given histogram + int size(const int histogramIndex) const; + void binHistograms(const int nLbMerged); + /// set number of lumiblocks + void setNumberOfLb(const int nLb); + /// get number of lumiblocks + int numberOfLb() const; + /// set number of lumiblocks + void setLbToMerge(const int nLbMerge); + /// get number of lumiblocks + int LbToMerge() const; + protected: + std::vector<TH1F*> m_phistoVector; + std::vector<TH2F*> m_phistoVector2D; + TH1I* m_numberOfEventsHisto; + ITHistSvc* m_thistSvc; + const SCT_ID* m_pSCTHelper; + int m_nLb; + int m_nLbMerge; + // + bool init(); + template<class T> + std::pair<std::string, bool> retrievedTool(T& tool) const { + if (tool.retrieve().isFailure() ) return std::make_pair(std::string{"Unable to retrieve "}+tool.name(), false); + return std::make_pair("", true); + } }; - -inline const InterfaceID & ISCT_CalibHistoTool::interfaceID() { - static const InterfaceID IID("ISCT_CalibHistoTool",1,0); - return IID; +inline const InterfaceID& ISCT_CalibHistoTool::interfaceID() { + static const InterfaceID IID{"ISCT_CalibHistoTool", 1, 0}; + return IID; } #endif diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/ISCT_CalibModuleListTool.h b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/ISCT_CalibModuleListTool.h index 761348143382502d3fff990ddd39da50f9b36b90..e8c0d1d733de747020d5b77f81d874ac8fd7df64 100644 --- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/ISCT_CalibModuleListTool.h +++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/ISCT_CalibModuleListTool.h @@ -1,16 +1,22 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /** -* @file SCT_CalibModuleListTool.h -* Header file for the SCT_CalibModuleListTool class -* @author Shaun Roe -**/ + * @file SCT_CalibModuleListTool.h + * Header file for the SCT_CalibModuleListTool class + * @author Shaun Roe + **/ #ifndef ISCT_CalibModuleListTool_h #define ISCT_CalibModuleListTool_h +#include "Identifier/Identifier.h" + +#include "GaudiKernel/IInterface.h" +#include "GaudiKernel/IAlgTool.h" +#include "GaudiKernel/ToolHandle.h" + // STL and boost headers #include <string> #include <vector> @@ -18,33 +24,26 @@ #include <map> #include <utility> -#include "GaudiKernel/IInterface.h" -#include "GaudiKernel/IAlgTool.h" -#include "GaudiKernel/ToolHandle.h" -#include "Identifier/Identifier.h" - class ISCT_CalibModuleListTool : virtual public IAlgTool { - public: - //@name Service methods, reimplemented - //@{ - ISCT_CalibModuleListTool() {/**nop**/}; - virtual ~ISCT_CalibModuleListTool() {/**nop**/}; - //virtual StatusCode initialize()=0; - //virtual StatusCode finalize()=0; - static const InterfaceID & interfaceID(); - //@} - virtual StatusCode readModuleList( std::map< Identifier, std::set<Identifier> >& moduleList )=0; - - protected: - template<class T> - std::pair<std::string, bool> retrievedTool(T & tool) { - if (tool.retrieve().isFailure() ) return std::make_pair(std::string("Unable to retrieve ")+tool.name(), false); - return std::make_pair("",true); - } + public: + //@name Service methods, reimplemented + //@{ + ISCT_CalibModuleListTool() {/**nop**/}; + virtual ~ISCT_CalibModuleListTool() = default; + static const InterfaceID& interfaceID(); + //@} + virtual StatusCode readModuleList(std::map<Identifier, std::set<Identifier>>& moduleList) const =0; + + protected: + template<class T> + std::pair<std::string, bool> retrievedTool(T& tool) const { + if (tool.retrieve().isFailure()) return std::make_pair(std::string{"Unable to retrieve "}+tool.name(), false); + return std::make_pair("", true); + } }; -inline const InterfaceID & ISCT_CalibModuleListTool::interfaceID() { - static const InterfaceID IID("ISCT_CalibModuleListTool",1,0); - return IID; +inline const InterfaceID& ISCT_CalibModuleListTool::interfaceID() { + static const InterfaceID IID{"ISCT_CalibModuleListTool", 1, 0}; + return IID; } #endif diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/SCTCalib.h b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/SCTCalib.h index c353f51b28e530676acf183347f534e63bb21205..961ecac85a5dcbea42c779bfd3e03f40f45853be 100644 --- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/SCTCalib.h +++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/SCTCalib.h @@ -3,17 +3,17 @@ */ /** -* @file SCTCalib.h -* -* Header file for the SCTCalib class -* -* @author Jose E. Garcia, jose.enrique.garcia@cern.ch -* @author Peter Vankov, peter.vankov@cern.ch -* @author Kazu Hanagaki, kazunori.hanagaki@cern.ch -* @author Minoru Hirose, minoru.hirose@cern.ch -* @author Tim Andeen, timothy.robert.andeen@cern.ch -* @author Junji Tojo, junji.tojo@cern.ch -**/ + * @file SCTCalib.h + * + * Header file for the SCTCalib class + * + * @author Jose E. Garcia, jose.enrique.garcia@cern.ch + * @author Peter Vankov, peter.vankov@cern.ch + * @author Kazu Hanagaki, kazunori.hanagaki@cern.ch + * @author Minoru Hirose, minoru.hirose@cern.ch + * @author Tim Andeen, timothy.robert.andeen@cern.ch + * @author Junji Tojo, junji.tojo@cern.ch + **/ #ifndef SCTCalib_H #define SCTCalib_H @@ -65,261 +65,261 @@ class StatusCode; class SCTCalib : public AthAlgorithm { - public: - SCTCalib( const std::string &name, ISvcLocator *pSvcLocator ) ; - ~SCTCalib() = default; - virtual StatusCode initialize() override; - virtual StatusCode beginRun() override; - virtual StatusCode execute() override; - virtual StatusCode endRun() override; - virtual StatusCode finalize() override; - - private: - // SCT specific numbers - enum { nbins = 6*128, firstStrip = 0, lastStrip = nbins-1, - ntimeBins = 3, firstTimeBin = 0, lastTimeBin = 2, - n_hitBins = 50, first_hitBin = 0, last_hitBin = 50, - n_etaBins = 13, first_etaBin = -6, last_etaBin = 6, - n_phiBins = 56, first_phiBin = 0, last_phiBin = 55, - n_barrels = 4, first_barrel = 0, last_barrel = 3, - n_disks = 9, first_disk = 0, last_disk = 8, - n_etaBinsEC = 3, first_etaBinEC = 0, last_etaBinEC = 2, - n_phiBinsEC = 52, first_phiBinEC = 0, last_phiBinEC = 51 - }; - - // Additional info on SCT specific numbers - enum { n_chipPerSide = 6, n_chipPerModule = 12, n_stripPerChip = 128, n_etaInBarrel = 12, - n_phiBinsB0 = 32, n_phiBinsB1 = 40, n_phiBinsB2 = 48, n_phiBinsB3 = 56, - n_phiBinsECShort = 40, n_phiBinsECMiddle = 40, n_phiBinsECOuter = 52, n_elements=8176, - n_BSErrorType = 15, firstBSErrorType = 0, lastBSErrorType = 14 - }; - - const SCT_ID* m_pSCTHelper; - SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"}; - SG::ReadHandleKey<EventInfo> m_eventInfoKey{this, "EventInfoKey", "ByteStreamEventInfo"}; - - ToolHandle<SCTCalibWriteTool> m_pCalibWriteTool{this, "SCTCalibWriteTool", "SCTCalibWriteTool", "Tool to write out data from calibration loop"}; - ToolHandle<ISCT_ConfigurationConditionsTool> m_ConfigurationConditionsTool{this, "SCT_ConfigurationConditionsTool", "SCT_ConfigurationConditionsTool/InDetSCT_ConfigurationConditionsTool", "Tool to retrieve SCT Configuration"}; - ToolHandle<ISCT_ReadCalibDataTool> m_ReadCalibDataTool{this, "SCT_ReadCalibDataTool", "SCT_ReadCalibDataTool/InDetSCT_ReadCalibDataTool", "Tool to retrieve SCT calibration data"}; - ToolHandle<ISCT_DetectorLevelConditionsTool> m_MajorityConditionsTool{this, "SCT_MajorityConditionsTool", "SCT_MajorityConditionsTool", "Tool to retrieve the majority conditions of SCT"}; - ToolHandle<ISCT_CablingTool> m_CablingTool{this, "SCT_CablingTool", "SCT_CablingTool", "Tool to retrieve SCT Cabling"}; - ToolHandle<ISCT_CalibHistoTool> m_calibHitmapTool{this, "SCT_CalibHitMapTool", "SCT_CalibHitMapTool", "Tool for reading and writing HitMap histograms"}; - ToolHandle<ISCT_CalibHistoTool> m_calibLbTool{this, "SCT_CalibLbTool", "SCT_CalibLbTool", "Tool for reading and writing Lb dependent HitMap histograms"}; - ToolHandle<ISCT_CalibHistoTool> m_calibBsErrTool{this, "SCT_CalibBsErrTool", "SCT_CalibBsErrTool", "Tool for reading and writing BS error histograms"}; - ToolHandle<ISCT_CalibModuleListTool> m_calibModuleListTool{this, "SCT_CalibModuleListTool", "SCT_CalibModuleListTool", "Tool for handling list of modules"}; - ToolHandle<ISCT_CalibEvtInfo> m_calibEvtInfoTool{this, "SCT_CalibEvtInfo", "SCT_CalibEvtInfo", "Tool for handling event info"}; - - // For ntuple sorting - // For HV trips - std::vector< std::vector< std::pair<int, int> > > m_summarytrips; - std::vector< std::vector< std::pair<int, int> > > m_summarytripslb; - - std::ofstream m_gofile; - - // output files (for dead search & MONP200 related things ) - std::ofstream m_outDeadStrips; - std::ofstream m_outDeadChips; - std::ofstream m_outDeadSummary; - std::ofstream m_outNOSummary; - std::ofstream m_outROSummary; - std::ofstream m_outEffSummary; - std::ofstream m_outBSErrSummary; - std::ofstream m_outBSErrModule; - std::ofstream m_outLASummary; - - // Properties configurable from jobO - IntegerProperty m_runNumber{this, "RunNumber", -1}; - - StringProperty m_runStartTime{this, "RunStartTime", "", "from runInfo.txt"}; - StringProperty m_runEndTime{this, "RunEndTime", "", "from runInfo.txt"}; - StringProperty m_LBMax{this, "LBMax", "1000", "from runInfo.txt"}; - - BooleanProperty m_useConfiguration{this, "UseConfiguration", true}; - BooleanProperty m_useCalibration{this, "UseCalibration", true}; - BooleanProperty m_useMajority{this, "UseMajority", true}; - BooleanProperty m_useBSError{this, "UseBSError", false}; - - StringArrayProperty m_input_hist{this, "InputHist", {}, "list of HIST (assuming 1 file)"}; - - BooleanProperty m_readBS{this, "ReadBS", false, "True if BS is used"}; - BooleanProperty m_histBefore2010{this, "HistBefore2010", false, "True if HIST is from 2009 or earlier"}; - - BooleanProperty m_doHitMaps{this, "DoHitMaps", true}; - IntegerProperty m_nLbsMerged{this, "LbsPerWindow", 20}; - BooleanProperty m_readHitMaps{this, "ReadHitMaps", false}; - BooleanProperty m_doBSErrors{this, "DoBSErrors", false}; - BooleanProperty m_doNoisyStrip{this, "DoNoisyStrip", true}; - BooleanProperty m_doNoisyLB{this, "DoNoisyLB", true}; - BooleanProperty m_doHV{this, "DoHV", false}; - BooleanProperty m_doDeadStrip{this, "DoDeadStrip", false}; - BooleanProperty m_doDeadChip{this, "DoDeadChip", false}; - BooleanProperty m_doNoiseOccupancy{this, "DoNoiseOccupancy", false}; - BooleanProperty m_doRawOccupancy{this, "DoRawOccupancy", false}; - BooleanProperty m_doEfficiency{this, "DoEfficiency", false}; - BooleanProperty m_doBSErrorDB{this, "DoBSErrorDB", false}; - BooleanProperty m_doLorentzAngle{this, "DoLorentzAngle", false}; - BooleanProperty m_writeToCool{this, "WriteToCool", true}; - - BooleanProperty m_noisyUpdate{this, "NoisyUpdate", true}; - BooleanProperty m_noisyUploadTest{this, "NoisyUploadTest", true}; - FloatProperty m_noisyModuleAverageInDB{this, "NoisyModuleAverageInDB", -1., "Average number of modules with at least 1 noisy strip in COOL"}; - IntegerProperty m_noisyStripLastRunInDB{this, "NoisyStripLastRunInDB", -999, "Number of noisy strips of the last run uploaded to COOL"}; - FloatProperty m_noisyStripAverageInDB{this, "NoisyStripAverageInDB", -999., "Number of noisy strips of the last run uploaded to COOL"}; - IntegerProperty m_noisyModuleList{this, "NoisyModuleList", 200}; - FloatProperty m_noisyModuleDiff{this, "NoisyModuleDiff", 0.200}; - FloatProperty m_noisyStripDiff{this, "NoisyStripDiff", 128.}; - - UnsignedIntegerProperty m_noisyMinStat{this, "NoisyMinStat", 50000}; - BooleanProperty m_noisyStripAll{this, "NoisyStripAll", true}; - BooleanProperty m_noisyStripThrDef{this, "NoisyStripThrDef", true}; - FloatProperty m_noisyStripThrOffline{this, "NoisyStripThrOffline", 1.500E-2}; - FloatProperty m_noisyStripThrOnline{this, "NoisyStripThrOnline", 1.500E-3}; - BooleanProperty m_noisyWaferFinder{this, "NoisyWaferFinder", true}; - BooleanProperty m_noisyWaferWrite{this, "NoisyWaferWrite", true}; - BooleanProperty m_noisyWaferAllStrips{this, "NoisyWaferAllStrips", true}; - FloatProperty m_noisyWaferThrBarrel{this, "NoisyWaferThrBarrel", 1.000E-4}; - FloatProperty m_noisyWaferThrECA{this, "NoisyWaferThrECA", 1.000E-4}; - FloatProperty m_noisyWaferThrECC{this, "NoisyWaferThrECC", 1.000E-4}; - FloatProperty m_noisyWaferFraction{this, "NoisyWaferFraction", 0.500}; - FloatProperty m_noisyChipFraction{this, "NoisyChipFraction", 0.500}; - - IntegerProperty m_maxtbins{this, "HVBinWidth", 5}; - - UnsignedIntegerProperty m_deadStripMinStat{this, "DeadStripMinStat", 200000}; - UnsignedIntegerProperty m_deadStripMinStatBusy{this, "DeadStripMinStatBusy", 1600000}; - UnsignedIntegerProperty m_deadChipMinStat{this, "DeadChipMinStat", 200000}; - UnsignedIntegerProperty m_deadStripSignificance{this, "DeadStripSignificance", 10}; - UnsignedIntegerProperty m_deadChipSignificance{this, "DeadChipSignificance", 10}; - FloatProperty m_busyThr4DeadFinding{this, "BusyThr4DeadFinding", 1E-4}; - FloatProperty m_noisyThr4DeadFinding{this, "NoisyThr4DeadFinding", 1.500E-3}; - BooleanProperty m_deadChipUploadTest{this, "DeadChipUploadTest", true}; - BooleanProperty m_deadStripUploadTest{this, "DeadStripUploadTest", true}; - - BooleanProperty m_noiseOccupancyTriggerAware{this, "NoiseOccupancyTriggerAware", true}; - UnsignedIntegerProperty m_noiseOccupancyMinStat{this, "NoiseOccupancyMinStat", 50000}; - UnsignedIntegerProperty m_rawOccupancyMinStat{this, "RawOccupancyMinStat", 50000}; - UnsignedIntegerProperty m_efficiencyMinStat{this, "EfficiencyMinStat", 50000}; - UnsignedIntegerProperty m_BSErrorDBMinStat{this, "BSErrorDBMinStat", 50000}; - UnsignedIntegerProperty m_LorentzAngleMinStat{this, "LorentzAngleMinStat", 50000}; - - BooleanProperty m_LorentzAngleDebugMode{this, "LorentzAngleDebugMode", true}; - - StringProperty m_tagID4NoisyStrips{this, "TagID4NoisyStrips", "SctDerivedMonitoring-001-00"}; - StringProperty m_tagID4DeadStrips{this, "TagID4DeadStrips", "SctDerivedDeadStrips-001-00"}; - StringProperty m_tagID4DeadChips{this, "TagID4DeadChips", "SctDerivedDeadChips-001-00"}; - StringProperty m_tagID4NoiseOccupancy{this, "TagID4NoiseOccupancy", "SctDerivedNoiseOccupancy-001-00"}; - - StringProperty m_badStripsAllFile{this, "BadStripsAllFile", "BadStripsAllFile.xml", "Output XML for all noisy strips"}; - StringProperty m_badStripsNewFile{this, "BadStripsNewFile", "BadStripsNewFile.xml", "Output XML for newly found noisy strips (i.e. not in config/calib data)"}; - StringProperty m_badStripsSummaryFile{this, "BadStripsSummaryFile", "BadStripsSummaryFile.xml", "Output XML for summary info from noisy strip search"}; - - StringProperty m_badModulesFile{this, "BadModulesFile", "BadModulesFile.xml", "Output XML for HV trips"}; - - StringProperty m_deadStripsFile{this, "DeadStripsFile", "DeadStripsFile.xml", "Output XML for dead strips"}; - StringProperty m_deadChipsFile{this, "DeadChipsFile", "DeadChipsFile.xml", "Output XML for dead chips"}; - StringProperty m_deadSummaryFile{this, "DeadSummaryFile", "DeadSummaryFile.xml", "Output XML for summary of Dead Finding"}; - - StringProperty m_noiseOccupancyFile{this, "NoiseOccupancyFile", "NoiseOccupancyFile.xml", "Output XML for noise occupancy"}; - StringProperty m_noiseOccupancySummaryFile{this, "NoiseOccupancySummaryFile", "NoiseOccupancySummaryFile.xml", "Output XML for summary of noise occupancy"}; - StringProperty m_rawOccupancySummaryFile{this,"RawOccupancySummaryFile", "RawOccupancySummaryFile.xml", "Output XML for summary of raw occupancy"}; - StringProperty m_efficiencySummaryFile{this, "EfficiencySummaryFile", "EfficiencySummaryFile.xml", "Output XML for summary of efficiency"}; - StringProperty m_efficiencyModuleFile{this, "EfficiencyModuleFile", "EfficiencyModuleSummary.xml", "Output XML for efficiency"}; - StringProperty m_BSErrorSummaryFile{this, "BSErrorSummaryFile", "BSErrorSummaryFile.xml", "Output XML for summary of BS Errors"}; - StringProperty m_BSErrorModuleFile{this, "BSErrorModuleFile", "BSErrorModuleSummary.xml", "Output XML for summary of BS Errors"}; - StringProperty m_LorentzAngleFile{this, "LorentzAngleFile", "LorentzAngleFile.xml", "Output XML for noise occupancy"}; - StringProperty m_LorentzAngleSummaryFile{this, "LorentzAngleSummaryFile", "LorentzAngleSummaryFile.xml", "Output XML for summary of lorentz angle"}; - - // Event related - int m_numOfLBsProcessed; - unsigned long long m_numberOfEvents; - unsigned long long m_numberOfEventsHist; // For number of events from HIST - std::string m_utcBegin; - std::string m_utcEnd; - int m_LBRange; - IOVTime m_iovStart; - IOVTime m_iovStop; - - // Input - TFile* m_inputHist; // Monitoring histograms - bool m_readHIST; // True if HIST is used - - // Histograms - std::vector<TProfile2D *> m_pnoiseoccupancymapHistoVector; - std::vector<TProfile2D *> m_pnoiseoccupancymapHistoVectorECp; - std::vector<TProfile2D *> m_pnoiseoccupancymapHistoVectorECm; - std::vector<TProfile *> m_h_phiVsNstripsSideHistoVector; - - // Book histograms - - // Methods implemented - StatusCode prepareHV(); - StatusCode doHVPrintXML(const std::pair<int, int> & timeInterval, const std::pair<int, int> & lbRange, Identifier); - - bool notEnoughStatistics(const int required, const int obtained, const std::string & histogramName="HIST") const; - - StatusCode getNoisyStrip(); - StatusCode getDeadStrip(); - StatusCode getNoiseOccupancy(); - StatusCode getRawOccupancy(); - StatusCode getEfficiency(); - StatusCode getBSErrors(); - StatusCode getLorentzAngle(); - - // To handle XML file for DB - StatusCode openXML4DB( std::ofstream&, const char*, const char*, IOVTime, IOVTime ) const; - StatusCode closeXML4DB( std::ofstream& ) const; - StatusCode addToXML4DB( std::ofstream&, const Identifier&, const char*, float, const char* ) const; - - // To handle XML file for Summary - StatusCode openXML4MonSummary( std::ofstream&, const char* ) const; - StatusCode openXML4DeadSummary( std::ofstream& file, const char* type, int n_Module=0, int n_Link=0, int n_Chip=0, int n_Strip=0 ) const; - StatusCode wrapUpXML4Summary( std::ofstream&, const char*, std::ostringstream& ) const; - StatusCode addToSummaryStr( std::ostringstream&, const Identifier&, const char*, const char*, const char* ) const; - - template<class S> - bool retrievedService(S & service) { - if (service.retrieve().isFailure() ) { - ATH_MSG_ERROR("Unable to retrieve "<<service.name()); - return false; - } - return true; - } - std::string - xmlChannelNoiseOccDataString(const Identifier & waferId, const float occupancy, const SCT_SerialNumber & serial) const; - - std::string - xmlChannelEfficiencyDataString(const Identifier & waferId, const float efficiency, const SCT_SerialNumber & serial) const; - - std::pair<int, bool> - getNumNoisyStrips( const Identifier& waferId ) const; - - StatusCode - addStripsToList( Identifier& waferId, std::set<Identifier>& stripIdList, bool isNoisy, bool isNew ); - - StatusCode - writeModuleListToCool( const std::map< Identifier, std::set<Identifier> >& moduleListAll, - const std::map< Identifier, std::set<Identifier> >& moduleListNew, - const std::map< Identifier, std::set<Identifier> >& moduleListRef ); - std::string - getStripList( const std::set<Identifier>& stripIdList ) const; - - StatusCode - noisyStripsToXml( const std::map< Identifier, std::set<Identifier> >& moduleList, const std::string& badStripsFile ) const; - - StatusCode - noisyStripsToSummaryXml( const std::map< Identifier, std::set<Identifier> >& moduleListAll, - const std::map< Identifier, std::set<Identifier> >& moduleListNew, - const std::map< Identifier, std::set<Identifier> >& moduleListRef, - const std::string& badStripsFile) const; - - std::set<int> - getNoisyChips( const std::set<Identifier>& stripIdList ) const; - - std::pair< std::string, float > - getNoisyLB( const Identifier& moduleId, int& chipId ) const; - - std::string - getLBList( const std::set<int>& LBList ) const; + public: + SCTCalib( const std::string &name, ISvcLocator* pSvcLocator ) ; + ~SCTCalib() = default; + virtual StatusCode initialize() override; + virtual StatusCode beginRun() override; + virtual StatusCode execute() override; + virtual StatusCode endRun() override; + virtual StatusCode finalize() override; + + private: + // SCT specific numbers + enum { nbins = 6*128, firstStrip = 0, lastStrip = nbins-1, + ntimeBins = 3, firstTimeBin = 0, lastTimeBin = 2, + n_hitBins = 50, first_hitBin = 0, last_hitBin = 50, + n_etaBins = 13, first_etaBin = -6, last_etaBin = 6, + n_phiBins = 56, first_phiBin = 0, last_phiBin = 55, + n_barrels = 4, first_barrel = 0, last_barrel = 3, + n_disks = 9, first_disk = 0, last_disk = 8, + n_etaBinsEC = 3, first_etaBinEC = 0, last_etaBinEC = 2, + n_phiBinsEC = 52, first_phiBinEC = 0, last_phiBinEC = 51 + }; + + // Additional info on SCT specific numbers + enum { n_chipPerSide = 6, n_chipPerModule = 12, n_stripPerChip = 128, n_etaInBarrel = 12, + n_phiBinsB0 = 32, n_phiBinsB1 = 40, n_phiBinsB2 = 48, n_phiBinsB3 = 56, + n_phiBinsECShort = 40, n_phiBinsECMiddle = 40, n_phiBinsECOuter = 52, n_elements=8176, + n_BSErrorType = 15, firstBSErrorType = 0, lastBSErrorType = 14 + }; + + const SCT_ID* m_pSCTHelper; + SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"}; + SG::ReadHandleKey<EventInfo> m_eventInfoKey{this, "EventInfoKey", "ByteStreamEventInfo"}; + + ToolHandle<SCTCalibWriteTool> m_pCalibWriteTool{this, "SCTCalibWriteTool", "SCTCalibWriteTool", "Tool to write out data from calibration loop"}; + ToolHandle<ISCT_ConfigurationConditionsTool> m_ConfigurationConditionsTool{this, "SCT_ConfigurationConditionsTool", "SCT_ConfigurationConditionsTool/InDetSCT_ConfigurationConditionsTool", "Tool to retrieve SCT Configuration"}; + ToolHandle<ISCT_ReadCalibDataTool> m_ReadCalibDataTool{this, "SCT_ReadCalibDataTool", "SCT_ReadCalibDataTool/InDetSCT_ReadCalibDataTool", "Tool to retrieve SCT calibration data"}; + ToolHandle<ISCT_DetectorLevelConditionsTool> m_MajorityConditionsTool{this, "SCT_MajorityConditionsTool", "SCT_MajorityConditionsTool", "Tool to retrieve the majority conditions of SCT"}; + ToolHandle<ISCT_CablingTool> m_CablingTool{this, "SCT_CablingTool", "SCT_CablingTool", "Tool to retrieve SCT Cabling"}; + ToolHandle<ISCT_CalibHistoTool> m_calibHitmapTool{this, "SCT_CalibHitMapTool", "SCT_CalibHitMapTool", "Tool for reading and writing HitMap histograms"}; + ToolHandle<ISCT_CalibHistoTool> m_calibLbTool{this, "SCT_CalibLbTool", "SCT_CalibLbTool", "Tool for reading and writing Lb dependent HitMap histograms"}; + ToolHandle<ISCT_CalibHistoTool> m_calibBsErrTool{this, "SCT_CalibBsErrTool", "SCT_CalibBsErrTool", "Tool for reading and writing BS error histograms"}; + ToolHandle<ISCT_CalibModuleListTool> m_calibModuleListTool{this, "SCT_CalibModuleListTool", "SCT_CalibModuleListTool", "Tool for handling list of modules"}; + ToolHandle<ISCT_CalibEvtInfo> m_calibEvtInfoTool{this, "SCT_CalibEvtInfo", "SCT_CalibEvtInfo", "Tool for handling event info"}; + + // For ntuple sorting + // For HV trips + std::vector<std::vector<std::pair<int, int>>> m_summarytrips; + std::vector<std::vector<std::pair<int, int>>> m_summarytripslb; + + std::ofstream m_gofile; + + // output files (for dead search & MONP200 related things ) + std::ofstream m_outDeadStrips; + std::ofstream m_outDeadChips; + std::ofstream m_outDeadSummary; + std::ofstream m_outNOSummary; + std::ofstream m_outROSummary; + std::ofstream m_outEffSummary; + std::ofstream m_outBSErrSummary; + std::ofstream m_outBSErrModule; + std::ofstream m_outLASummary; + + // Properties configurable from jobO + IntegerProperty m_runNumber{this, "RunNumber", -1}; + + StringProperty m_runStartTime{this, "RunStartTime", "", "from runInfo.txt"}; + StringProperty m_runEndTime{this, "RunEndTime", "", "from runInfo.txt"}; + StringProperty m_LBMax{this, "LBMax", "1000", "from runInfo.txt"}; + + BooleanProperty m_useConfiguration{this, "UseConfiguration", true}; + BooleanProperty m_useCalibration{this, "UseCalibration", true}; + BooleanProperty m_useMajority{this, "UseMajority", true}; + BooleanProperty m_useBSError{this, "UseBSError", false}; + + StringArrayProperty m_input_hist{this, "InputHist", {}, "list of HIST (assuming 1 file)"}; + + BooleanProperty m_readBS{this, "ReadBS", false, "True if BS is used"}; + BooleanProperty m_histBefore2010{this, "HistBefore2010", false, "True if HIST is from 2009 or earlier"}; + + BooleanProperty m_doHitMaps{this, "DoHitMaps", true}; + IntegerProperty m_nLbsMerged{this, "LbsPerWindow", 20}; + BooleanProperty m_readHitMaps{this, "ReadHitMaps", false}; + BooleanProperty m_doBSErrors{this, "DoBSErrors", false}; + BooleanProperty m_doNoisyStrip{this, "DoNoisyStrip", true}; + BooleanProperty m_doNoisyLB{this, "DoNoisyLB", true}; + BooleanProperty m_doHV{this, "DoHV", false}; + BooleanProperty m_doDeadStrip{this, "DoDeadStrip", false}; + BooleanProperty m_doDeadChip{this, "DoDeadChip", false}; + BooleanProperty m_doNoiseOccupancy{this, "DoNoiseOccupancy", false}; + BooleanProperty m_doRawOccupancy{this, "DoRawOccupancy", false}; + BooleanProperty m_doEfficiency{this, "DoEfficiency", false}; + BooleanProperty m_doBSErrorDB{this, "DoBSErrorDB", false}; + BooleanProperty m_doLorentzAngle{this, "DoLorentzAngle", false}; + BooleanProperty m_writeToCool{this, "WriteToCool", true}; + + BooleanProperty m_noisyUpdate{this, "NoisyUpdate", true}; + BooleanProperty m_noisyUploadTest{this, "NoisyUploadTest", true}; + FloatProperty m_noisyModuleAverageInDB{this, "NoisyModuleAverageInDB", -1., "Average number of modules with at least 1 noisy strip in COOL"}; + IntegerProperty m_noisyStripLastRunInDB{this, "NoisyStripLastRunInDB", -999, "Number of noisy strips of the last run uploaded to COOL"}; + FloatProperty m_noisyStripAverageInDB{this, "NoisyStripAverageInDB", -999., "Number of noisy strips of the last run uploaded to COOL"}; + IntegerProperty m_noisyModuleList{this, "NoisyModuleList", 200}; + FloatProperty m_noisyModuleDiff{this, "NoisyModuleDiff", 0.200}; + FloatProperty m_noisyStripDiff{this, "NoisyStripDiff", 128.}; + + UnsignedIntegerProperty m_noisyMinStat{this, "NoisyMinStat", 50000}; + BooleanProperty m_noisyStripAll{this, "NoisyStripAll", true}; + BooleanProperty m_noisyStripThrDef{this, "NoisyStripThrDef", true}; + FloatProperty m_noisyStripThrOffline{this, "NoisyStripThrOffline", 1.500E-2}; + FloatProperty m_noisyStripThrOnline{this, "NoisyStripThrOnline", 1.500E-3}; + BooleanProperty m_noisyWaferFinder{this, "NoisyWaferFinder", true}; + BooleanProperty m_noisyWaferWrite{this, "NoisyWaferWrite", true}; + BooleanProperty m_noisyWaferAllStrips{this, "NoisyWaferAllStrips", true}; + FloatProperty m_noisyWaferThrBarrel{this, "NoisyWaferThrBarrel", 1.000E-4}; + FloatProperty m_noisyWaferThrECA{this, "NoisyWaferThrECA", 1.000E-4}; + FloatProperty m_noisyWaferThrECC{this, "NoisyWaferThrECC", 1.000E-4}; + FloatProperty m_noisyWaferFraction{this, "NoisyWaferFraction", 0.500}; + FloatProperty m_noisyChipFraction{this, "NoisyChipFraction", 0.500}; + + IntegerProperty m_maxtbins{this, "HVBinWidth", 5}; + + UnsignedIntegerProperty m_deadStripMinStat{this, "DeadStripMinStat", 200000}; + UnsignedIntegerProperty m_deadStripMinStatBusy{this, "DeadStripMinStatBusy", 1600000}; + UnsignedIntegerProperty m_deadChipMinStat{this, "DeadChipMinStat", 200000}; + UnsignedIntegerProperty m_deadStripSignificance{this, "DeadStripSignificance", 10}; + UnsignedIntegerProperty m_deadChipSignificance{this, "DeadChipSignificance", 10}; + FloatProperty m_busyThr4DeadFinding{this, "BusyThr4DeadFinding", 1E-4}; + FloatProperty m_noisyThr4DeadFinding{this, "NoisyThr4DeadFinding", 1.500E-3}; + BooleanProperty m_deadChipUploadTest{this, "DeadChipUploadTest", true}; + BooleanProperty m_deadStripUploadTest{this, "DeadStripUploadTest", true}; + + BooleanProperty m_noiseOccupancyTriggerAware{this, "NoiseOccupancyTriggerAware", true}; + UnsignedIntegerProperty m_noiseOccupancyMinStat{this, "NoiseOccupancyMinStat", 50000}; + UnsignedIntegerProperty m_rawOccupancyMinStat{this, "RawOccupancyMinStat", 50000}; + UnsignedIntegerProperty m_efficiencyMinStat{this, "EfficiencyMinStat", 50000}; + UnsignedIntegerProperty m_BSErrorDBMinStat{this, "BSErrorDBMinStat", 50000}; + UnsignedIntegerProperty m_LorentzAngleMinStat{this, "LorentzAngleMinStat", 50000}; + + BooleanProperty m_LorentzAngleDebugMode{this, "LorentzAngleDebugMode", true}; + + StringProperty m_tagID4NoisyStrips{this, "TagID4NoisyStrips", "SctDerivedMonitoring-001-00"}; + StringProperty m_tagID4DeadStrips{this, "TagID4DeadStrips", "SctDerivedDeadStrips-001-00"}; + StringProperty m_tagID4DeadChips{this, "TagID4DeadChips", "SctDerivedDeadChips-001-00"}; + StringProperty m_tagID4NoiseOccupancy{this, "TagID4NoiseOccupancy", "SctDerivedNoiseOccupancy-001-00"}; + + StringProperty m_badStripsAllFile{this, "BadStripsAllFile", "BadStripsAllFile.xml", "Output XML for all noisy strips"}; + StringProperty m_badStripsNewFile{this, "BadStripsNewFile", "BadStripsNewFile.xml", "Output XML for newly found noisy strips (i.e. not in config/calib data)"}; + StringProperty m_badStripsSummaryFile{this, "BadStripsSummaryFile", "BadStripsSummaryFile.xml", "Output XML for summary info from noisy strip search"}; + + StringProperty m_badModulesFile{this, "BadModulesFile", "BadModulesFile.xml", "Output XML for HV trips"}; + + StringProperty m_deadStripsFile{this, "DeadStripsFile", "DeadStripsFile.xml", "Output XML for dead strips"}; + StringProperty m_deadChipsFile{this, "DeadChipsFile", "DeadChipsFile.xml", "Output XML for dead chips"}; + StringProperty m_deadSummaryFile{this, "DeadSummaryFile", "DeadSummaryFile.xml", "Output XML for summary of Dead Finding"}; + + StringProperty m_noiseOccupancyFile{this, "NoiseOccupancyFile", "NoiseOccupancyFile.xml", "Output XML for noise occupancy"}; + StringProperty m_noiseOccupancySummaryFile{this, "NoiseOccupancySummaryFile", "NoiseOccupancySummaryFile.xml", "Output XML for summary of noise occupancy"}; + StringProperty m_rawOccupancySummaryFile{this,"RawOccupancySummaryFile", "RawOccupancySummaryFile.xml", "Output XML for summary of raw occupancy"}; + StringProperty m_efficiencySummaryFile{this, "EfficiencySummaryFile", "EfficiencySummaryFile.xml", "Output XML for summary of efficiency"}; + StringProperty m_efficiencyModuleFile{this, "EfficiencyModuleFile", "EfficiencyModuleSummary.xml", "Output XML for efficiency"}; + StringProperty m_BSErrorSummaryFile{this, "BSErrorSummaryFile", "BSErrorSummaryFile.xml", "Output XML for summary of BS Errors"}; + StringProperty m_BSErrorModuleFile{this, "BSErrorModuleFile", "BSErrorModuleSummary.xml", "Output XML for summary of BS Errors"}; + StringProperty m_LorentzAngleFile{this, "LorentzAngleFile", "LorentzAngleFile.xml", "Output XML for noise occupancy"}; + StringProperty m_LorentzAngleSummaryFile{this, "LorentzAngleSummaryFile", "LorentzAngleSummaryFile.xml", "Output XML for summary of lorentz angle"}; + + // Event related + int m_numOfLBsProcessed; + unsigned long long m_numberOfEvents; + unsigned long long m_numberOfEventsHist; // For number of events from HIST + std::string m_utcBegin; + std::string m_utcEnd; + int m_LBRange; + IOVTime m_iovStart; + IOVTime m_iovStop; + + // Input + TFile* m_inputHist; // Monitoring histograms + bool m_readHIST; // True if HIST is used + + // Histograms + std::vector<TProfile2D*> m_pnoiseoccupancymapHistoVector; + std::vector<TProfile2D*> m_pnoiseoccupancymapHistoVectorECp; + std::vector<TProfile2D*> m_pnoiseoccupancymapHistoVectorECm; + std::vector<TProfile*> m_h_phiVsNstripsSideHistoVector; + + // Book histograms + + // Methods implemented + StatusCode prepareHV(); + StatusCode doHVPrintXML(const std::pair<int, int>& timeInterval, const std::pair<int, int>& lbRange, Identifier); + + bool notEnoughStatistics(const int required, const int obtained, const std::string& histogramName="HIST") const; + + StatusCode getNoisyStrip(); + StatusCode getDeadStrip(); + StatusCode getNoiseOccupancy(); + StatusCode getRawOccupancy(); + StatusCode getEfficiency(); + StatusCode getBSErrors(); + StatusCode getLorentzAngle(); + + // To handle XML file for DB + StatusCode openXML4DB(std::ofstream&, const char*, const char*, IOVTime, IOVTime) const; + StatusCode closeXML4DB(std::ofstream&) const; + StatusCode addToXML4DB(std::ofstream&, const Identifier&, const char*, float, const char*) const; + + // To handle XML file for Summary + StatusCode openXML4MonSummary(std::ofstream&, const char*) const; + StatusCode openXML4DeadSummary(std::ofstream& file, const char* type, int n_Module=0, int n_Link=0, int n_Chip=0, int n_Strip=0) const; + StatusCode wrapUpXML4Summary(std::ofstream&, const char*, std::ostringstream&) const; + StatusCode addToSummaryStr(std::ostringstream&, const Identifier&, const char*, const char*, const char*) const; + + template<class S> + bool retrievedService(S& service) const { + if (service.retrieve().isFailure()) { + ATH_MSG_ERROR("Unable to retrieve "<<service.name()); + return false; + } + return true; + } + std::string + xmlChannelNoiseOccDataString(const Identifier& waferId, const float occupancy, const SCT_SerialNumber& serial) const; + + std::string + xmlChannelEfficiencyDataString(const Identifier& waferId, const float efficiency, const SCT_SerialNumber& serial) const; + + std::pair<int, bool> + getNumNoisyStrips(const Identifier& waferId) const; + + StatusCode + addStripsToList(Identifier& waferId, std::set<Identifier>& stripIdList, bool isNoisy, bool isNew) const; + + StatusCode + writeModuleListToCool(const std::map<Identifier, std::set<Identifier>>& moduleListAll, + const std::map<Identifier, std::set<Identifier>>& moduleListNew, + const std::map<Identifier, std::set<Identifier>>& moduleListRef) const; + std::string + getStripList(const std::set<Identifier>& stripIdList) const; + + StatusCode + noisyStripsToXml(const std::map< Identifier, std::set<Identifier> >& moduleList, const std::string& badStripsFile) const; + + StatusCode + noisyStripsToSummaryXml(const std::map<Identifier, std::set<Identifier>>& moduleListAll, + const std::map<Identifier, std::set<Identifier>>& moduleListNew, + const std::map<Identifier, std::set<Identifier>>& moduleListRef, + const std::string& badStripsFile) const; + + std::set<int> + getNoisyChips(const std::set<Identifier>& stripIdList) const; + + std::pair<std::string, float> + getNoisyLB(const Identifier& moduleId, int& chipId) const; + + std::string + getLBList(const std::set<int>& LBList) const; }; // end of class #endif // SCTCalib_H diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/SCTCalibWriteTool.h b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/SCTCalibWriteTool.h index a8fc81f48c3331734ede0b5bf64e126f3e786b05..4906150408653ea4ee297fa8f506f32b4e453e61 100644 --- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/SCTCalibWriteTool.h +++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/SCTCalibWriteTool.h @@ -5,12 +5,12 @@ */ /* -* @file SCTCalibWriteTool.h -* -* @brief Header file for the SCTCalibWriteTool class -* -* @author Jose E. Garcia -**/ + * @file SCTCalibWriteTool.h + * + * @brief Header file for the SCTCalibWriteTool class + * + * @author Jose E. Garcia + **/ #ifndef SCTCalibWriteTool_H #define SCTCalibWriteTool_H @@ -48,188 +48,171 @@ class CondAttrListCollection; class StoreGateSvc; /** -** Algorithm to test writing conditions data and reading them back. -**/ + ** Algorithm to test writing conditions data and reading them back. + **/ class SCTCalibWriteTool : public AthAlgTool { - public: - // Constructor - SCTCalibWriteTool(const std::string& type, const std::string& name, const IInterface* parent); - // Destructor - virtual ~SCTCalibWriteTool() = default; - - // overloading functions - virtual StatusCode initialize(); - virtual StatusCode finalize(); - static const InterfaceID & interfaceID(); - virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvIF); - - ///Manually get the data in the structure before proceding - virtual StatusCode fillData(); - - //I'm going to fill this from job options, so the callback version of fillData is not needed. - virtual StatusCode fillData(int& /*i */, std::list<std::string>& /*l*/) { //comment out unused parameters to prevent compiler warning - return StatusCode::FAILURE; - } - - std::string - addDefect(const std::string& defectlist,const int defectBeginChannel,const int defectEndChannel) const; - - std::string - addNumber(const std::string numStr,const unsigned long long number) const; - - std::string - createDefectString(const int defectBeginChannel,const int defectEndChannel) const; - - StatusCode - createCondObjects( const Identifier& wafer_id,const SCT_ID* m_sctId,const int samplesize,const std::string& defectType,const float threshold,const std::string& defectList ) const; - - StatusCode createListStrip( const Identifier& wafer_id, - const SCT_ID* m_sctId, - const int samplesize, - const std::string& defectType, - const float threshold, - const std::string& defectList ) const; - - StatusCode createListChip( const Identifier& wafer_id, - const SCT_ID* m_sctId, - const int samplesize, - const std::string& defectType, - const float threshold, - const std::string& defectList ) const; - - StatusCode createListEff( const Identifier& wafer_id, - const SCT_ID* m_sctId, - const int samplesize, - const float eff ) const; - - StatusCode createListNO( const Identifier& wafer_id, +public: + // Constructor + SCTCalibWriteTool(const std::string& type, const std::string& name, const IInterface* parent); + // Destructor + virtual ~SCTCalibWriteTool() = default; + + // overloading functions + virtual StatusCode initialize(); + virtual StatusCode finalize(); + static const InterfaceID& interfaceID(); + virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvIF); + + std::string + addDefect(const std::string& defectlist,const int defectBeginChannel,const int defectEndChannel) const; + + std::string + addNumber(const std::string numStr,const unsigned long long number) const; + + std::string + createDefectString(const int defectBeginChannel,const int defectEndChannel) const; + + StatusCode + createCondObjects(const Identifier& wafer_id, const SCT_ID* m_sctId, const int samplesize, const std::string& defectType, const float threshold, const std::string& defectList) const; + + StatusCode createListStrip(const Identifier& wafer_id, + const SCT_ID* m_sctId, + const int samplesize, + const std::string& defectType, + const float threshold, + const std::string& defectList) const; + + StatusCode createListChip(const Identifier& wafer_id, + const SCT_ID* m_sctId, + const int samplesize, + const std::string& defectType, + const float threshold, + const std::string& defectList) const; + + StatusCode createListEff(const Identifier& wafer_id, + const SCT_ID* m_sctId, + const int samplesize, + const float eff) const; + + StatusCode createListNO(const Identifier& wafer_id, + const SCT_ID* m_sctId, + const int samplesize, + const float noise_occ) const; + + StatusCode createListRawOccu(const Identifier& wafer_id, const SCT_ID* m_sctId, const int samplesize, - const float noise_occ ) const; - - StatusCode createListRawOccu( const Identifier& wafer_id, - const SCT_ID* m_sctId, - const int samplesize, - const float raw_occu ) const; - - StatusCode createListBSErr(const Identifier& wafer_id, - const SCT_ID* m_sctId, - const int samplesize, - const std::string & errorList, - const std::string & probList) const ; - - StatusCode createListLA(const Identifier& wafer_id, - const SCT_ID* m_sctId, - const int samplesize, - const int module, - const float lorentz, - const float err_lorentz, - const float chisq, - const float fitParam_a, - const float err_a, - const float fitParam_b, - const float err_b, - const float fitParam_sigma, - const float err_sigma, - const float MCW, - const float err_MCW ) const; - - StatusCode wrapUpNoisyChannel(); - StatusCode wrapUpDeadStrips(); - StatusCode wrapUpDeadChips(); - StatusCode wrapUpEfficiency(); - StatusCode wrapUpNoiseOccupancy(); - StatusCode wrapUpRawOccupancy(); - StatusCode wrapUpBSErrors(); - StatusCode wrapUpLorentzAngle(); - - private: - StoreGateSvc* m_detStore; - SG::ReadHandleKey<EventInfo> m_eventInfoKey; - - StatusCode registerIOV(const CLID& clid); - int stringToInt(const std::string& s) const; - - StatusCode streamOutCondObjects(const std::string & foldername); - StatusCode streamOutCondObjectsWithErrMsg(const std::string & foldername); - - StatusCode registerCondObjects(const std::string & foldername,const std::string & tagname); - StatusCode recordAndStream(const CondAttrListCollection* pCollection,const std::string & foldername, bool & flag); - StatusCode registerCondObjectsWithErrMsg(const std::string& foldername,const std::string& tagname); - - coral::AttributeListSpecification* createBasicDbSpec(const bool capsFormat) const; - void setBasicValues(coral::AttributeList & attrList, const Identifier& wafer_id, const int samplesize,const SCT_ID* m_sctId, const bool capsFormat) const; - // small helper function - unsigned int computeIstrip4moncond(const Identifier& elementId) const; - - const CondAttrListCollection* getAttrListCollectionByFolder(const std::string&) const; - - // would it make sense to change the strings to properties? - // that would be a fairly simple fix - static std::string s_separator; - static std::string s_defectFolderName; - static std::string s_deadStripFolderName; - static std::string s_deadChipFolderName; - static std::string s_effFolderName; - static std::string s_noFolderName; - static std::string s_RawOccuFolderName; - static std::string s_BSErrFolderName; - static std::string s_LAFolderName; - - // cache for the Collections, access by foldername - mutable std::mutex m_mutex; - mutable std::map<const std::string, const CondAttrListCollection*> m_attrListCollectionMap; - CondAttrListCollection* m_attrListColl; - CondAttrListCollection* m_attrListColl_deadStrip; - CondAttrListCollection* m_attrListColl_deadChip; - CondAttrListCollection* m_attrListColl_eff; - CondAttrListCollection* m_attrListColl_no; - CondAttrListCollection* m_attrListColl_RawOccu; - CondAttrListCollection* m_attrListColl_BSErr; - CondAttrListCollection* m_attrListColl_LA; - BooleanProperty m_writeCondObjs; - BooleanProperty m_regIOV; - BooleanProperty m_readWriteCool; - BooleanProperty m_twoStepWriteReg; - BooleanProperty m_manualiov; - /*IntegerProperty m_regTime;*/ - IntegerProperty m_version; - /*IntegerProperty m_nhits_noisychip;*/ - /*IntegerProperty m_nhits_noisywafer;*/ - /*IntegerProperty m_nhits_noisymodule;*/ - IntegerProperty m_beginRun; - IntegerProperty m_endRun; - StringProperty m_streamName; - std::string m_tagID4NoisyStrips; - std::string m_tagID4DeadStrips; - std::string m_tagID4DeadChips; - std::string m_tagID4Efficiency; - std::string m_tagID4NoiseOccupancy; - std::string m_tagID4RawOccupancy; - std::string m_tagID4BSErrors; - std::string m_tagID4LorentzAngle; - - IIOVRegistrationSvc* m_regSvc; - IAthenaOutputStreamTool* m_streamer; - //ToolHandle<IAthenaOutputStreamTool> m_streamer; - - //StringArrayProperty m_badElements; unused list of bad detector elements (= module sides) - std::set<Identifier> m_badIds; - bool m_defectRecorded; - bool m_deadStripRecorded; - bool m_deadChipRecorded; - bool m_effRecorded; - bool m_noRecorded; - bool m_RawOccuRecorded; - bool m_BSErrRecorded; - bool m_LARecorded; - const SCT_ID* m_pHelper; + const float raw_occu) const; + + StatusCode createListBSErr(const Identifier& wafer_id, + const SCT_ID* m_sctId, + const int samplesize, + const std::string& errorList, + const std::string& probList) const ; + + StatusCode createListLA(const Identifier& wafer_id, + const SCT_ID* m_sctId, + const int samplesize, + const int module, + const float lorentz, + const float err_lorentz, + const float chisq, + const float fitParam_a, + const float err_a, + const float fitParam_b, + const float err_b, + const float fitParam_sigma, + const float err_sigma, + const float MCW, + const float err_MCW) const; + + StatusCode wrapUpNoisyChannel(); + StatusCode wrapUpDeadStrips(); + StatusCode wrapUpDeadChips(); + StatusCode wrapUpEfficiency(); + StatusCode wrapUpNoiseOccupancy(); + StatusCode wrapUpRawOccupancy(); + StatusCode wrapUpBSErrors(); + StatusCode wrapUpLorentzAngle(); + +private: + SG::ReadHandleKey<EventInfo> m_eventInfoKey; + + int stringToInt(const std::string& s) const; + + StatusCode streamOutCondObjects(const std::string& foldername); + StatusCode streamOutCondObjectsWithErrMsg(const std::string& foldername); + + StatusCode registerCondObjects(const std::string& foldername,const std::string& tagname) const; + StatusCode recordAndStream(const CondAttrListCollection* pCollection,const std::string& foldername, bool& flag); + StatusCode registerCondObjectsWithErrMsg(const std::string& foldername,const std::string& tagname) const; + + coral::AttributeListSpecification* createBasicDbSpec(const bool capsFormat) const; + void setBasicValues(coral::AttributeList& attrList, const Identifier& wafer_id, const int samplesize,const SCT_ID* m_sctId, const bool capsFormat) const; + // small helper function + unsigned int computeIstrip4moncond(const Identifier& elementId) const; + + const CondAttrListCollection* getAttrListCollectionByFolder(const std::string&) const; + + // would it make sense to change the strings to properties? + // that would be a fairly simple fix + static const std::string s_separator; + static const std::string s_defectFolderName; + static const std::string s_deadStripFolderName; + static const std::string s_deadChipFolderName; + static const std::string s_effFolderName; + static const std::string s_noFolderName; + static const std::string s_RawOccuFolderName; + static const std::string s_BSErrFolderName; + static const std::string s_LAFolderName; + + // cache for the Collections, access by foldername + mutable std::mutex m_mutex; + mutable std::map<const std::string, const CondAttrListCollection*> m_attrListCollectionMap ATLAS_THREAD_SAFE; // Guarded by m_mutex + CondAttrListCollection* m_attrListColl; + CondAttrListCollection* m_attrListColl_deadStrip; + CondAttrListCollection* m_attrListColl_deadChip; + CondAttrListCollection* m_attrListColl_eff; + CondAttrListCollection* m_attrListColl_no; + CondAttrListCollection* m_attrListColl_RawOccu; + CondAttrListCollection* m_attrListColl_BSErr; + CondAttrListCollection* m_attrListColl_LA; + BooleanProperty m_writeCondObjs; + BooleanProperty m_regIOV; + BooleanProperty m_readWriteCool; + BooleanProperty m_twoStepWriteReg; + BooleanProperty m_manualiov; + IntegerProperty m_version; + IntegerProperty m_beginRun; + IntegerProperty m_endRun; + StringProperty m_streamName; + std::string m_tagID4NoisyStrips; + std::string m_tagID4DeadStrips; + std::string m_tagID4DeadChips; + std::string m_tagID4Efficiency; + std::string m_tagID4NoiseOccupancy; + std::string m_tagID4RawOccupancy; + std::string m_tagID4BSErrors; + std::string m_tagID4LorentzAngle; + + IIOVRegistrationSvc* m_regSvc; + IAthenaOutputStreamTool* m_streamer; + + bool m_defectRecorded; + bool m_deadStripRecorded; + bool m_deadChipRecorded; + bool m_effRecorded; + bool m_noRecorded; + bool m_RawOccuRecorded; + bool m_BSErrRecorded; + bool m_LARecorded; + const SCT_ID* m_pHelper; }; -inline const InterfaceID & SCTCalibWriteTool::interfaceID() { - static const InterfaceID IID("SCTCalibWriteTool",1,0); - return IID; +inline const InterfaceID& SCTCalibWriteTool::interfaceID() { + static const InterfaceID IID{"SCTCalibWriteTool", 1, 0}; + return IID; } #endif // SCTCalibWriteTool.h diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/SCT_LorentzAngleFunc.h b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/SCT_LorentzAngleFunc.h index 6f71c74312ec83326c251f049ba22a5db0fefccf..5bb3931d9859ff29b214aa31300fe4802a838175 100644 --- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/SCT_LorentzAngleFunc.h +++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/SCT_LorentzAngleFunc.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ //For SCT Lorentz Angle @@ -7,19 +7,19 @@ #include "TMath.h" Double_t -LA_func(Double_t *x, Double_t *par) { - const Int_t n = 1000; // number of integration step - const Double_t xmin = x[0] - 5.0*par[3]; - const Double_t xmax = x[0] + 5.0*par[3]; - const Double_t h = (xmax - xmin)/(n - 1); - const Double_t pi = 3.14159265; - Double_t sum = 0; - Double_t x_ = xmin; - Double_t LA_sum = 0; - for (Int_t i=1; i<n; i++) { - LA_sum= par[0]*TMath::Abs(TMath::Tan(x_*pi/180)-TMath::Tan(par[1]*pi/180))+par[2]; - sum += LA_sum * 0.017455/TMath::Sqrt(2*pi)/(par[3]*pi/180)*TMath::Exp(-(x[0]*pi/180 - x_*pi/180 )*(x[0]*pi/180 - x_*pi/180 )/(2*par[3]*pi/180*par[3]*pi/180))*h; - x_ += h; - } - return sum; +LA_func(Double_t* x, Double_t* par) { + const Int_t n{1000}; // number of integration step + const Double_t xmin{x[0] - 5.0*par[3]}; + const Double_t xmax{x[0] + 5.0*par[3]}; + const Double_t h{(xmax - xmin)/(n - 1)}; + Double_t sum{0.}; + Double_t x_{xmin}; + Double_t LA_sum{0.}; + for (Int_t i{1}; i<n; i++) { + LA_sum = par[0]*TMath::Abs(TMath::Tan(x_*TMath::Pi()/180.)-TMath::Tan(par[1]*TMath::Pi()/180.))+par[2]; + sum += LA_sum * 0.017455/TMath::Sqrt(2.*TMath::Pi())/(par[3]*TMath::Pi()/180.) + * TMath::Exp(-(x[0]*TMath::Pi()/180. - x_*TMath::Pi()/180. )*(x[0]*TMath::Pi()/180. - x_*TMath::Pi()/180. )/(2*par[3]*TMath::Pi()/180.*par[3]*TMath::Pi()/180.)) * h; + x_ += h; + } + return sum; } diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/IElementStreamer.cxx b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/IElementStreamer.cxx index c449b1c61468ac425b91c7ed571b0c6f80b61f31..5cccb7a98aaab4790b6b959ff6ae320dc1516e74 100644 --- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/IElementStreamer.cxx +++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/IElementStreamer.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /* * IElementStreamer.cpp @@ -12,36 +12,34 @@ namespace SCT_CalibAlgs { -unsigned int IElementStreamer::m_depth=0; -unsigned int IElementStreamer::m_nodeIndex=0; - -IElementStreamer::IElementStreamer(const std::string & name, const std::map<std::string, std::string> & attributeMap, std::ostream & os): - m_name(name), m_os(os),m_nodeId(m_nodeIndex) { - std::map<std::string, std::string>::const_iterator i(attributeMap.begin()); - std::map<std::string, std::string>::const_iterator end(attributeMap.end()); - for(; i!=end; ++i) { + IElementStreamer::IElementStreamer(const std::string& name, const std::map<std::string, std::string>& attributeMap, std::ostream& os): + m_name{name}, m_os{os}, m_depth{0}, m_nodeIndex{0}, m_nodeId{m_nodeIndex} { + std::map<std::string, std::string>::const_iterator i{attributeMap.begin()}; + std::map<std::string, std::string>::const_iterator end{attributeMap.end()}; + for (; i!=end; ++i) { m_attributeNames.push_back(i->first); m_attributeValues.push_back(i->second); - } - ++m_depth; - ++m_nodeIndex; -} - -IElementStreamer::IElementStreamer(const std::string & name, const std::vector<std::string> & attributeNames, const std::vector<std::string> & attributeValues, std::ostream & os): - m_name(name), m_attributeNames(attributeNames), m_attributeValues(attributeValues),m_os(os),m_nodeId(m_nodeIndex) { - ++m_depth; - ++m_nodeIndex; -} + } + ++m_depth; + ++m_nodeIndex; + } + + IElementStreamer::IElementStreamer(const std::string& name, const std::vector<std::string>& attributeNames, const std::vector<std::string>& attributeValues, std::ostream& os): + m_name{name}, m_attributeNames{attributeNames}, m_attributeValues{attributeValues}, m_os{os}, m_nodeId{m_nodeIndex} { + ++m_depth; + ++m_nodeIndex; + } -IElementStreamer::IElementStreamer(const std::string & name, const std::string & attributeName, const std::string & attributeValue, std::ostream & os):m_name(name),m_os(os), m_nodeId(m_nodeIndex) { - m_attributeNames.push_back(attributeName); - m_attributeValues.push_back(attributeValue); - ++m_depth; - ++m_nodeIndex; -} + IElementStreamer::IElementStreamer(const std::string& name, const std::string& attributeName, const std::string& attributeValue, std::ostream& os): + m_name{name}, m_os{os}, m_nodeId{m_nodeIndex} { + m_attributeNames.push_back(attributeName); + m_attributeValues.push_back(attributeValue); + ++m_depth; + ++m_nodeIndex; + } -IElementStreamer::~IElementStreamer() { - --m_depth; -} + IElementStreamer::~IElementStreamer() { + --m_depth; + } } diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/IElementStreamer.h b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/IElementStreamer.h index dfeb16ccf1c068b1dfc1e18e74f51a4b87f7e665..67c2db5b67d353654de15e890c189f33c5d34a59 100644 --- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/IElementStreamer.h +++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/IElementStreamer.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /* * IElementStreamer.h @@ -16,27 +16,27 @@ #include <vector> namespace SCT_CalibAlgs { -class IElementStreamer { + class IElementStreamer { - protected: - std::string m_name; - std::vector<std::string> m_attributeNames; - std::vector<std::string> m_attributeValues; - std::ostream & m_os; - static unsigned int m_depth; - static unsigned int m_nodeIndex; - unsigned int m_nodeId; + protected: + std::string m_name; + std::vector<std::string> m_attributeNames; + std::vector<std::string> m_attributeValues; + std::ostream& m_os; + unsigned int m_depth; + unsigned int m_nodeIndex; + unsigned int m_nodeId; - public: - IElementStreamer(const std::string & name, const std::map<std::string, std::string> & attributeMap, std::ostream & os=std::cout); - IElementStreamer(const std::string & name, const std::string & attributeName, const std::string & attributeValue, std::ostream & os=std::cout); - IElementStreamer(const std::string & name, const std::vector<std::string> & attributeNames, const std::vector<std::string> & attributeValues, std::ostream & os=std::cout); - ~IElementStreamer(); - template<class T> - void value(const T & v) { - m_os<<v; - } -}; + public: + IElementStreamer(const std::string& name, const std::map<std::string, std::string>& attributeMap, std::ostream& os=std::cout); + IElementStreamer(const std::string& name, const std::string& attributeName, const std::string& attributeValue, std::ostream& os=std::cout); + IElementStreamer(const std::string& name, const std::vector<std::string>& attributeNames, const std::vector<std::string>& attributeValues, std::ostream& os=std::cout); + ~IElementStreamer(); + template<class T> + void value(const T& v) { + m_os<<v; + } + }; } #endif diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/ISCT_CalibHistoTool.cxx b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/ISCT_CalibHistoTool.cxx index 3ab782315eb7f010ec5d39d986355f1d98f41aef..9670b6aabe97f84337b97c54ff345361502f41d5 100644 --- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/ISCT_CalibHistoTool.cxx +++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/ISCT_CalibHistoTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ @@ -7,7 +7,7 @@ * @file ISCT_CalibHistoTool.cxx * Implementation file to interface class for histograms in the SCT_CalibAlgs package * @author Shaun Roe -**/ + **/ #include "SCT_CalibAlgs/ISCT_CalibHistoTool.h" #include "TH1I.h" #include "TH1F.h" @@ -15,86 +15,80 @@ #include "TMath.h" #include <stdexcept> // out_of_range exception -int ISCT_CalibHistoTool::m_nLb=0; -int ISCT_CalibHistoTool::m_nLbMerge=0; - -ISCT_CalibHistoTool::ISCT_CalibHistoTool():m_numberOfEventsHisto(0),m_thistSvc(0),m_pSCTHelper(0) { - //std::cout<<"Instantiation of ISCT_CalibHistoTool"<<std::endl; - //nop +ISCT_CalibHistoTool::ISCT_CalibHistoTool(): + m_numberOfEventsHisto{0}, + m_thistSvc{nullptr}, + m_pSCTHelper{nullptr}, + m_nLb{0}, + m_nLbMerge{0} { + //nop } int ISCT_CalibHistoTool::getNumberOfEventsInBin(const int nbin) const { - if (m_numberOfEventsHisto) return m_numberOfEventsHisto->GetBinContent(nbin); - std::cout << "ERROR: a histogram pointer, m_numberOfEventsHisto, is zero" << std::endl; - return 0; + if (m_numberOfEventsHisto) return m_numberOfEventsHisto->GetBinContent(nbin); + std::cout << "ERROR: a histogram pointer, m_numberOfEventsHisto, is zero" << std::endl; + return 0; } int ISCT_CalibHistoTool::size() const { - return m_numberOfEventsHisto->GetEntries(); + return m_numberOfEventsHisto->GetEntries(); } - int ISCT_CalibHistoTool::size(const int histogramIndex) const { - TH1F* pHisto=0; - int result=0; - try { - pHisto=m_phistoVector.at(histogramIndex); - result = pHisto->GetEntries(); - } catch (const std::out_of_range& outOfRange) { - //do nothing, result is zero if the vector<>.at() throws - } - return result; + TH1F* pHisto{nullptr}; + int result{0}; + try { + pHisto = m_phistoVector.at(histogramIndex); + result = pHisto->GetEntries(); + } catch (const std::out_of_range& outOfRange) { + //do nothing, result is zero if the vector<>.at() throws + } + return result; } double ISCT_CalibHistoTool::getBinForHistogramIndex(const int bin, const int histogramIndex) const { - TH1F* pHisto=0; - double result=0.0; - try { - pHisto=m_phistoVector.at(histogramIndex); - result = pHisto->GetBinContent(bin); - } catch (const std::out_of_range& outOfRange) { - //do nothing, result is zero if the vector<>.at() throws - } - return result; + TH1F* pHisto{nullptr}; + double result{0.0}; + try { + pHisto = m_phistoVector.at(histogramIndex); + result = pHisto->GetBinContent(bin); + } catch (const std::out_of_range& outOfRange) { + //do nothing, result is zero if the vector<>.at() throws + } + return result; } void -//ISCT_CalibHistoTool::binHistograms(const int eventsPerWindow){ ISCT_CalibHistoTool::binHistograms(const int nLbMerged) { + int nLb{numberOfLb()}; + int yAxisBins{static_cast<int>(TMath::Ceil(1.0*nLb/nLbMerged))}; - int nLb = numberOfLb(); - int yAxisBins = TMath::Ceil(1.0*nLb/nLbMerged); - // int totalEventNumber = m_numberOfEventsHisto->GetEntries(); - - // int yAxisBins = TMath::Ceil(1.0*totalEventNumber/eventsPerWindow); - for (std::vector<TH2F *>::iterator it = m_phistoVector2D.begin() ; it != m_phistoVector2D.end(); ++it) { - (*it)->SetBins(768, -0.5, 768+0.5,yAxisBins,0.5,nLbMerged*yAxisBins+0.5); - } - // std::cout<<eventsPerWindow<<std::endl; + for (std::vector<TH2F*>::iterator it{m_phistoVector2D.begin()}; it != m_phistoVector2D.end(); ++it) { + (*it)->SetBins(768, -0.5, 768+0.5, yAxisBins, 0.5, nLbMerged*yAxisBins+0.5); + } } void ISCT_CalibHistoTool::setNumberOfLb(const int nLb) { - m_nLb=nLb; + m_nLb=nLb; } int -ISCT_CalibHistoTool::numberOfLb() { - return m_nLb; +ISCT_CalibHistoTool::numberOfLb() const { + return m_nLb; } void ISCT_CalibHistoTool::setLbToMerge(const int nLbMerge) { - m_nLbMerge=nLbMerge; + m_nLbMerge = nLbMerge; } int -ISCT_CalibHistoTool::LbToMerge() { - return m_nLbMerge; +ISCT_CalibHistoTool::LbToMerge() const { + return m_nLbMerge; } - diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCTCalib.cxx b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCTCalib.cxx index a1b99d0424b4b45d533f50f40f569d333bd11109..c8b5ddfbe8eaeabe3a040526fbeac5bbac32c5d7 100644 --- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCTCalib.cxx +++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCTCalib.cxx @@ -4,29 +4,24 @@ /** -* @file SCTCalib.cxx -* -* Find noisy strips, HV trips and dead strips/chips -* Upload NoiseOccupancy and BSErrors from monitoring histograms -* -* @author Jose E. Garcia, jose.enrique.garcia@cern.ch -* @author Peter Vankov, peter.vankov@cern.ch -* @author Kazu Hanagaki, kazunori.hanagaki@cern.ch -* @author Minoru Hirose, minoru.hirose@cern.ch -* @author Tim Andeen, timothy.robert.andeen@cern.ch -* @author Junji Tojo, junji.tojo@cern.ch -* @author Peter Rosendahl, peter.lundgaard.rosendahl@cern.ch -**/ + * @file SCTCalib.cxx + * + * Find noisy strips, HV trips and dead strips/chips + * Upload NoiseOccupancy and BSErrors from monitoring histograms + * + * @author Jose E. Garcia, jose.enrique.garcia@cern.ch + * @author Peter Vankov, peter.vankov@cern.ch + * @author Kazu Hanagaki, kazunori.hanagaki@cern.ch + * @author Minoru Hirose, minoru.hirose@cern.ch + * @author Tim Andeen, timothy.robert.andeen@cern.ch + * @author Junji Tojo, junji.tojo@cern.ch + * @author Peter Rosendahl, peter.lundgaard.rosendahl@cern.ch + **/ #include "SCT_CalibAlgs/SCTCalib.h" #include "SCT_CalibAlgs/SCT_LorentzAngleFunc.h" -#include "SCT_CalibUtilities.h" -#include "SCT_CalibBsErrorTool.h" -#include "SCT_CalibLbTool.h" -#include "SCT_CalibModuleListTool.h" -#include "SCT_CalibEventInfo.h" -#include "SCT_CalibHitmapTool.h" +#include "SCT_CalibUtilities.h" #include "XmlHeader.h" #include "XmlStreamer.h" @@ -57,271 +52,267 @@ using namespace SCT_CalibAlgs; using namespace std; namespace { -enum Bec { ENDCAP_C = -2, BARREL = 0, ENDCAP_A = 2 }; -// String names for the detector parts -const std::string detectorNames[] = { "negativeEndcap", "Barrel", "positiveEndcap" }; -// String names for the detector parts -const std::string shortNames[] = { "EndCapC", "Barrel", "EndCapA" }; -// Path names to become part of the histogram paths -const std::string detectorPaths[] = { "SCTEC", "SCTB", "SCTEA" }; - -bool areConsecutiveIntervals(const std::pair<int, int> &i1, const std::pair<int, int> &i2, const int withinLimits) { - return i1.second <= (i2.first + withinLimits); -} -/** -void -initQueue(std::queue<int> & q, const int numvals, const int setval){ - for (int i(0);i<numvals;++i) q.push(setval); -} -**/ -const std::string xmlHeader("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); -const std::string linefeed("\n"); -std::string -associateStylesheet(const std::string &stylesheetName) { - return std::string("<?xml-stylesheet type=\"text/xsl\" href=\"")+stylesheetName+"\"?>"; -} -template <class T> -std::string -xmlPartData(const Bec bec, const int layer, const int eta, const std::string & dataName, const T data) { - //agrohsje added spaces for proper output format - ostringstream os; - const std::string thisPart=shortNames[bec2Index(bec)]; - os<<" <parts>"<<endl - <<" "<<xmlValue("part",thisPart)<<endl - <<" "<<xmlValue("layer", layer)<<endl - <<" "; - std::string barrelEtaXml=xmlValue("eta", "all"); - std::string endcapEtaXml=xmlValue("eta",eta); - if (bec==BARREL) os<<barrelEtaXml; - else os<<endcapEtaXml; - os<<endl - <<" "<<xmlValue(dataName, data)<<endl - <<" </parts>"<<endl; - return os.str(); -} - -template <class T> -std::string -xmlModuleData(const Bec bec, const int layer, const int side, const int phi, const int eta, const std::string & dataName, const T data, const std::string & serial,const std::string & listOfErrors) { - //xmlModuleData(const Bec bec, const int layer, const int side, const int phi, const int eta, const std::string & dataName, const T data, const std::string & serial, const ostringstream listOfErrors){ - //agasconb added to generate BSErrors file for individual modules - ostringstream os; - os<<" <module>"<<endl - <<" "<<xmlValue("SN", serial)<<endl; - - if (bec==ENDCAP_C) os<<" "<<xmlValue("barrel_endcap","-2")<<endl; - else if (bec==BARREL) os<<" "<<xmlValue("barrel_endcap","0")<<endl; - else if (bec==ENDCAP_A) os<<" "<<xmlValue("barrel_endcap","2")<<endl; - os<<" "<<xmlValue("layer", layer)<<endl - <<" "<<xmlValue("side", side)<<endl - <<" "<<xmlValue("eta", eta)<<endl - <<" "<<xmlValue("phi", phi)<<endl - <<" "<<xmlValue(dataName, data)<<endl; - os<<listOfErrors; - os<<" </module>"<<endl; - return os.str(); -} - -std::string -normalizeList( const std::string& strList ) { - std::string str = strList; - if ( !str.empty() ) { + enum Bec {ENDCAP_C = -2, BARREL = 0, ENDCAP_A = 2}; + // String names for the detector parts + const std::string detectorNames[] = {"negativeEndcap", "Barrel", "positiveEndcap"}; + // String names for the detector parts + const std::string shortNames[] = {"EndCapC", "Barrel", "EndCapA"}; + // Path names to become part of the histogram paths + const std::string detectorPaths[] = {"SCTEC", "SCTB", "SCTEA"}; + + bool areConsecutiveIntervals(const std::pair<int, int>& i1, const std::pair<int, int>& i2, const int withinLimits) { + return i1.second <= (i2.first + withinLimits); + } + const std::string xmlHeader{"<?xml version=\"1.0\" encoding=\"UTF-8\"?>"}; + const std::string linefeed{"\n"}; + std::string + associateStylesheet(const std::string& stylesheetName) { + return std::string("<?xml-stylesheet type=\"text/xsl\" href=\"")+stylesheetName+"\"?>"; + } + template <class T> + std::string + xmlPartData(const Bec bec, const int layer, const int eta, const std::string& dataName, const T data) { + //agrohsje added spaces for proper output format + ostringstream os; + const std::string thisPart{shortNames[bec2Index(bec)]}; + os << " <parts>" << endl + << " " << xmlValue("part", thisPart) << endl + << " " << xmlValue("layer", layer) << endl + << " "; + std::string barrelEtaXml{xmlValue("eta", "all")}; + std::string endcapEtaXml{xmlValue("eta", eta)}; + if (bec==BARREL) os << barrelEtaXml; + else os << endcapEtaXml; + os << endl + << " " << xmlValue(dataName, data) << endl + << " </parts>" << endl; + return os.str(); + } + + template <class T> + std::string + xmlModuleData(const Bec bec, const int layer, const int side, const int phi, const int eta, const std::string& dataName, const T data, const std::string& serial, const std::string& listOfErrors) { + //agasconb added to generate BSErrors file for individual modules + ostringstream os; + os << " <module>" << endl + << " " << xmlValue("SN", serial) << endl; + + if (bec==ENDCAP_C) os << " " << xmlValue("barrel_endcap", "-2") << endl; + else if (bec==BARREL) os << " " << xmlValue("barrel_endcap", "0") << endl; + else if (bec==ENDCAP_A) os << " " << xmlValue("barrel_endcap", "2") << endl; + os << " " << xmlValue("layer", layer) << endl + << " " << xmlValue("side", side) << endl + << " " << xmlValue("eta", eta) << endl + << " " << xmlValue("phi", phi) << endl + << " " << xmlValue(dataName, data) << endl; + os << listOfErrors; + os << " </module>" << endl; + return os.str(); + } + + std::string + normalizeList(const std::string& strList) { + std::string str{strList}; + if (!str.empty()) { //--- Remove 1st & last space - str = str.substr( 1, str.length()-2 ); + str = str.substr(1, str.length()-2); //--- Replace double space to single space - std::string strSingleSpace = " "; - std::string strDoubleSpace = " "; - std::string::size_type pos = 0; - while ( pos =str.find( strDoubleSpace, pos), pos != std::string::npos ) { - str.erase( pos, strSingleSpace.length() ); - pos += strSingleSpace.length(); - } - } - return str; -} + std::string strSingleSpace{" "}; + std::string strDoubleSpace{" "}; + std::string::size_type pos{0}; + while (pos =str.find(strDoubleSpace, pos), pos != std::string::npos) { + str.erase(pos, strSingleSpace.length()); + pos += strSingleSpace.length(); + } + } + return str; + } } ////////////////////////////////////////////////////////////////////////////////////// // Constructor ////////////////////////////////////////////////////////////////////////////////////// -SCTCalib::SCTCalib( const std::string& name, ISvcLocator* pSvcLocator ) : - AthAlgorithm( name, pSvcLocator ), - m_pSCTHelper(nullptr), - m_numOfLBsProcessed(0), - m_numberOfEvents(0), - m_numberOfEventsHist(0), - m_LBRange(-999), - m_inputHist(nullptr) +SCTCalib::SCTCalib(const std::string& name, ISvcLocator* pSvcLocator) : + AthAlgorithm(name, pSvcLocator), + m_pSCTHelper{nullptr}, + m_numOfLBsProcessed{0}, + m_numberOfEvents{0}, + m_numberOfEventsHist{0}, + m_LBRange{-999}, + m_inputHist{nullptr} { - m_readHIST = m_doNoiseOccupancy || m_doRawOccupancy || m_doEfficiency || m_doBSErrorDB || m_doLorentzAngle; + m_readHIST = m_doNoiseOccupancy or m_doRawOccupancy or m_doEfficiency or m_doBSErrorDB or m_doLorentzAngle; } //////////////////////////////////////////////////////////////////////////////////// // Initialization //////////////////////////////////////////////////////////////////////////////////// StatusCode SCTCalib::initialize() { - if ( detStore()->retrieve( m_pSCTHelper, "SCT_ID").isFailure()) { - ATH_MSG_ERROR("Unable to retrieve SCTHelper"); - return StatusCode::FAILURE; - } - - if ( not retrievedService(m_pCalibWriteTool)) return StatusCode::FAILURE; - if ( m_doHV) ATH_MSG_FATAL("Not yet properly implemented and tested!"); - - ATH_CHECK(m_ConfigurationConditionsTool.retrieve( EnableTool {m_useConfiguration} ) ); - - if ( !m_useCalibration ) { - ATH_MSG_DEBUG( "ReadCalibDataTool was removed in initialization" ); - m_ReadCalibDataTool.disable(); - } else { - if (m_ReadCalibDataTool.retrieve().isFailure()) return StatusCode::FAILURE; - } - - if ( !m_useMajority ) { - ATH_MSG_DEBUG( "MajorityConditionsTool was removed in initialization" ); - } else { - if (m_MajorityConditionsTool.retrieve().isFailure()) return StatusCode::FAILURE; - } - - if ( not retrievedService(m_calibHitmapTool)) return StatusCode::FAILURE; - - if ( not retrievedService(m_calibModuleListTool)) return StatusCode::FAILURE; - - if ( not retrievedService(m_calibEvtInfoTool)) return StatusCode::FAILURE; - - if ( !m_useBSError ) { - ATH_MSG_DEBUG( "ByteStreamErrorsSvc was removed in initialization" ); - } else { - if ( not retrievedService(m_calibBsErrTool)) return StatusCode::FAILURE; - } - if ( not retrievedService(m_calibLbTool) ) return StatusCode::FAILURE; - - ATH_CHECK(m_CablingTool.retrieve()); - - //--- LB range - try { - m_LBRange = std::stoi( m_LBMax ); - ISCT_CalibHistoTool::setNumberOfLb(m_LBRange); - } catch (...) { - ATH_MSG_ERROR( "Couldn't cast m_LBMax=\""<< m_LBMax <<"\" to m_LBRange..."); - m_LBRange = 0; - } - - ISCT_CalibHistoTool::setLbToMerge(m_nLbsMerged); - - - m_readHIST = m_doNoiseOccupancy || m_doRawOccupancy || m_doEfficiency || m_doBSErrorDB || m_doLorentzAngle; - - if ( m_readBS && m_readHIST ) { - ATH_MSG_ERROR( "Both BS and HIST are set to be read. Choose either of BS or HIST." ); + if (detStore()->retrieve(m_pSCTHelper, "SCT_ID").isFailure()) { + ATH_MSG_ERROR("Unable to retrieve SCTHelper"); + return StatusCode::FAILURE; + } + + if (not retrievedService(m_pCalibWriteTool)) return StatusCode::FAILURE; + if (m_doHV) ATH_MSG_FATAL("Not yet properly implemented and tested!"); + + ATH_CHECK(m_ConfigurationConditionsTool.retrieve(EnableTool {m_useConfiguration})); + + if (not m_useCalibration) { + ATH_MSG_DEBUG("ReadCalibDataTool was removed in initialization"); + m_ReadCalibDataTool.disable(); + } else { + if (m_ReadCalibDataTool.retrieve().isFailure()) return StatusCode::FAILURE; + } + + if (not m_useMajority) { + ATH_MSG_DEBUG("MajorityConditionsTool was removed in initialization"); + } else { + if (m_MajorityConditionsTool.retrieve().isFailure()) return StatusCode::FAILURE; + } + + if (not retrievedService(m_calibHitmapTool)) return StatusCode::FAILURE; + + if (not retrievedService(m_calibModuleListTool)) return StatusCode::FAILURE; + + if (not retrievedService(m_calibEvtInfoTool)) return StatusCode::FAILURE; + + if (not m_useBSError) { + ATH_MSG_DEBUG("ByteStreamErrorsSvc was removed in initialization"); + } else { + if (not retrievedService(m_calibBsErrTool)) return StatusCode::FAILURE; + } + if (not retrievedService(m_calibLbTool)) return StatusCode::FAILURE; + + ATH_CHECK(m_CablingTool.retrieve()); + + //--- LB range + try { + m_LBRange = std::stoi(m_LBMax); + m_calibHitmapTool->setNumberOfLb(m_LBRange); + m_calibLbTool->setNumberOfLb(m_LBRange); + m_calibBsErrTool->setNumberOfLb(m_LBRange); + } catch (...) { + ATH_MSG_ERROR("Couldn't cast m_LBMax=\"" << m_LBMax << "\" to m_LBRange..."); + m_LBRange = 0; + } + + m_calibHitmapTool->setLbToMerge(m_nLbsMerged); + m_calibLbTool->setLbToMerge(m_nLbsMerged); + m_calibBsErrTool->setLbToMerge(m_nLbsMerged); + + m_readHIST = m_doNoiseOccupancy or m_doRawOccupancy or m_doEfficiency or m_doBSErrorDB or m_doLorentzAngle; + + if (m_readBS and m_readHIST) { + ATH_MSG_ERROR("Both BS and HIST are set to be read. Choose either of BS or HIST."); + return StatusCode::FAILURE; + } + + //--- Open BS + if (m_readBS) { + ATH_MSG_INFO("------------> Reading from ByteStream <-------------"); + m_calibEvtInfoTool->setSource("BS"); + ATH_CHECK(m_eventInfoKey.initialize()); + } + + + //--- Open HIST + if (m_readHIST) { + ATH_MSG_INFO("------------> Reading from HIST <-------------"); + m_calibEvtInfoTool->setSource("HIST"); + //--- List of HIST + std::string hist{""}; + std::vector<std::string> histCollection{m_input_hist.value()}; + ATH_MSG_INFO("The input histogram name is : " << m_input_hist); + if (not histCollection.empty()) { + hist=histCollection.back(); + if (histCollection.size() > 1) ATH_MSG_WARNING("The Histogram collection contains more than one histogram; using the last one."); + } else { + ATH_MSG_ERROR("The input histogram collection property is empty"); return StatusCode::FAILURE; - } - - //--- Open BS - if ( m_readBS ) { - ATH_MSG_INFO( "------------> Reading from ByteStream <-------------"); - m_calibEvtInfoTool->setSource("BS"); - ATH_CHECK(m_eventInfoKey.initialize()); - } - - - //--- Open HIST - if ( m_readHIST ) { - ATH_MSG_INFO( "------------> Reading from HIST <-------------" ); - m_calibEvtInfoTool->setSource("HIST"); - //--- List of HIST - std::string hist(""); - std::vector<std::string> histCollection = m_input_hist.value(); - ATH_MSG_INFO( "The input histogram name is : " << m_input_hist ); - if (not histCollection.empty()) { - hist=histCollection.back(); - if (histCollection.size() > 1) ATH_MSG_WARNING("The Histogram collection contains more than one histogram; using the last one."); - } else { - ATH_MSG_ERROR("The input histogram collection property is empty"); - return StatusCode::FAILURE; - } - - //in case of DeadStrip or DeadChip, change open from EOS to - //copy and open locally. Delete the file after processing - m_inputHist = TFile::Open( hist.c_str() ); - - ATH_MSG_INFO( "opening HIST file : " << hist.c_str() ); - - if (m_inputHist) { - //--- Check run number - const std::string os=std::to_string(m_runNumber.value()); - ATH_MSG_INFO( "Getting HIST directory : " << m_runNumber.value() ); - if ( not m_inputHist->GetDirectory( "/run_"+TString(os) ) ) { - ATH_MSG_ERROR("RunNumber in HIST is inconsistent with jobO : " << os); - return StatusCode::FAILURE ; - } - ATH_MSG_INFO( "Getting Number of events: " << m_calibEvtInfoTool->counter() ); - //--- Read number of events : Get an entry of "tier0ESD" in "/GLOBAL/DQTDataFlow/events_lb" - std::string osHist= std::string( "/run_") + std::to_string(m_runNumber.value())+"/GLOBAL/DQTDataFlow/events_lb"; - TH1I* hist_events = dynamic_cast<TH1I*>(m_inputHist->Get( osHist.c_str() )); - m_numberOfEventsHist = hist_events->GetBinContent( 6 ); // Entry in "tier0ESD" - if ( hist_events->GetBinContent( 4 ) > m_numberOfEventsHist) m_numberOfEventsHist = hist_events->GetBinContent( 4 ); // Entry in "tier0" - //m_numberOfEventsHist = 13902; - } else { - ATH_MSG_WARNING( "can not open HIST : " << hist.c_str() ); - } - - - ATH_MSG_INFO( "Initialization of TimeStamp/LB, taken from runInfo.txt" ); - //--- Initialization of TimeStamp/LB, taken from runInfo.txt - m_calibEvtInfoTool->setSource("HIST"); - m_calibEvtInfoTool->setTimeStamp(m_runStartTime,m_runEndTime); - m_calibEvtInfoTool->setRunNumber(m_runNumber); - } - - //--- Booking histograms for hitmaps - if ( m_doHitMaps ) m_calibHitmapTool->book(); - //--- Reading histograms for hitmaps - if ( ( not m_doHitMaps && not m_doNoisyLB) && m_readHitMaps) { - m_calibEvtInfoTool->setSource("HIST"); - m_calibHitmapTool->read("./SCTHitMaps.root"); - m_numberOfEventsHist = m_calibHitmapTool->size(); - m_calibEvtInfoTool->setTimeStamp(m_runStartTime,m_runEndTime); - m_calibEvtInfoTool->setRunNumber(m_runNumber); - m_calibLbTool->read("./SCTLB.root"); - } - //--- Booking histograms for BSErrors - if ( m_doBSErrors ) m_calibBsErrTool->book(); - //--- Hit-vs-LB for LBs in noisy links/chips - if ( m_doNoisyLB ) m_calibLbTool->book(); - - //--- Check statistics for NoiseOccupancy - if ( m_doNoiseOccupancy and notEnoughStatistics(m_noiseOccupancyMinStat, m_numberOfEventsHist)) return StatusCode::FAILURE; - //--- Check statistics for RawOccupancy - if ( m_doRawOccupancy and notEnoughStatistics(m_rawOccupancyMinStat,m_numberOfEventsHist)) return StatusCode::FAILURE; - //--- Check statistics for Efficiency - if ( m_doEfficiency and notEnoughStatistics(m_efficiencyMinStat,m_numberOfEventsHist)) return StatusCode::FAILURE; - //--- Check statistics for BSError - if ( m_doBSErrorDB and notEnoughStatistics(m_BSErrorDBMinStat, m_numberOfEventsHist )) return StatusCode::FAILURE; - //--- Check statistics for LorentzAngle - if ( m_doLorentzAngle and notEnoughStatistics(m_LorentzAngleMinStat, m_numberOfEventsHist)) return StatusCode::FAILURE; - // - return StatusCode::SUCCESS; + } + + //in case of DeadStrip or DeadChip, change open from EOS to + //copy and open locally. Delete the file after processing + m_inputHist = TFile::Open(hist.c_str()); + + ATH_MSG_INFO("opening HIST file : " << hist.c_str()); + + if (m_inputHist) { + //--- Check run number + const std::string os{std::to_string(m_runNumber.value())}; + ATH_MSG_INFO("Getting HIST directory : " << m_runNumber.value()); + if (not m_inputHist->GetDirectory("/run_"+TString{os})) { + ATH_MSG_ERROR("RunNumber in HIST is inconsistent with jobO : " << os); + return StatusCode::FAILURE ; + } + ATH_MSG_INFO("Getting Number of events: " << m_calibEvtInfoTool->counter()); + //--- Read number of events : Get an entry of "tier0ESD" in "/GLOBAL/DQTDataFlow/events_lb" + std::string osHist{std::string{"/run_"} + std::to_string(m_runNumber.value())+"/GLOBAL/DQTDataFlow/events_lb"}; + TH1I* hist_events{dynamic_cast<TH1I*>(m_inputHist->Get(osHist.c_str()))}; + m_numberOfEventsHist = hist_events->GetBinContent(6); // Entry in "tier0ESD" + if (hist_events->GetBinContent(4) > m_numberOfEventsHist) m_numberOfEventsHist = hist_events->GetBinContent(4); // Entry in "tier0" + //m_numberOfEventsHist = 13902; + } else { + ATH_MSG_WARNING("can not open HIST : " << hist.c_str()); + } + + + ATH_MSG_INFO("Initialization of TimeStamp/LB, taken from runInfo.txt"); + //--- Initialization of TimeStamp/LB, taken from runInfo.txt + m_calibEvtInfoTool->setSource("HIST"); + m_calibEvtInfoTool->setTimeStamp(m_runStartTime, m_runEndTime); + m_calibEvtInfoTool->setRunNumber(m_runNumber); + } + + //--- Booking histograms for hitmaps + if (m_doHitMaps) m_calibHitmapTool->book(); + //--- Reading histograms for hitmaps + if ((not m_doHitMaps and not m_doNoisyLB) and m_readHitMaps) { + m_calibEvtInfoTool->setSource("HIST"); + m_calibHitmapTool->read("./SCTHitMaps.root"); + m_numberOfEventsHist = m_calibHitmapTool->size(); + m_calibEvtInfoTool->setTimeStamp(m_runStartTime, m_runEndTime); + m_calibEvtInfoTool->setRunNumber(m_runNumber); + m_calibLbTool->read("./SCTLB.root"); + } + //--- Booking histograms for BSErrors + if (m_doBSErrors) m_calibBsErrTool->book(); + //--- Hit-vs-LB for LBs in noisy links/chips + if (m_doNoisyLB) m_calibLbTool->book(); + + //--- Check statistics for NoiseOccupancy + if (m_doNoiseOccupancy and notEnoughStatistics(m_noiseOccupancyMinStat, m_numberOfEventsHist)) return StatusCode::FAILURE; + //--- Check statistics for RawOccupancy + if (m_doRawOccupancy and notEnoughStatistics(m_rawOccupancyMinStat, m_numberOfEventsHist)) return StatusCode::FAILURE; + //--- Check statistics for Efficiency + if (m_doEfficiency and notEnoughStatistics(m_efficiencyMinStat, m_numberOfEventsHist)) return StatusCode::FAILURE; + //--- Check statistics for BSError + if (m_doBSErrorDB and notEnoughStatistics(m_BSErrorDBMinStat, m_numberOfEventsHist)) return StatusCode::FAILURE; + //--- Check statistics for LorentzAngle + if (m_doLorentzAngle and notEnoughStatistics(m_LorentzAngleMinStat, m_numberOfEventsHist)) return StatusCode::FAILURE; + // + return StatusCode::SUCCESS; } bool -SCTCalib::notEnoughStatistics(const int required, const int obtained, const std::string & histogramName) const { - if (obtained<required) { - ATH_MSG_ERROR("Number of events in "<<histogramName<<": "<<obtained<<" is less than the required minimum number of events " <<required); - return true; - } - return false; +SCTCalib::notEnoughStatistics(const int required, const int obtained, const std::string& histogramName) const { + if (obtained<required) { + ATH_MSG_ERROR("Number of events in " << histogramName << ": " << obtained << " is less than the required minimum number of events " << required); + return true; + } + return false; } /////////////////////////////////////////////////////////////////////////////////// -/// beginRun - process after initialize() and before execute() +/// beginRun - process after initialize() and before execute() /////////////////////////////////////////////////////////////////////////////////// StatusCode SCTCalib::beginRun() { - ATH_MSG_INFO ("----- in beginRun() -----" ); - //--- Check if calibration data is available or not - return StatusCode::SUCCESS; + ATH_MSG_INFO ("----- in beginRun() -----"); + //--- Check if calibration data is available or not + return StatusCode::SUCCESS; } ////////////////////////////////////////////////////////////////////////////////// @@ -329,43 +320,43 @@ StatusCode SCTCalib::beginRun() { ////////////////////////////////////////////////////////////////////////////////// StatusCode SCTCalib::execute() { - if ( m_readBS ) { - SG::ReadHandle<EventInfo> evt(m_eventInfoKey); - if (not evt.isValid()) { - ATH_MSG_FATAL("Unable to get the EventInfo"); - return StatusCode::FAILURE; - } - const EventInfo* evt_ptr = &(*evt); - ATH_MSG_VERBOSE(SCT_CalibAlgs::eventInfoAsString(evt_ptr)); - //--- TimeStamp/LB range analyzed - const int timeStamp = evt->event_ID()->time_stamp(); - const int lumiBlock = evt->event_ID()->lumi_block(); - int timeStampBeginOld; - int timeStampEndOld; - m_calibEvtInfoTool->getTimeStamps(timeStampBeginOld, timeStampEndOld); - m_calibEvtInfoTool->setTimeStamp(std::min(timeStamp, timeStampBeginOld), std::max(timeStamp, timeStampEndOld)); - int lbBeginOld; - int lbEndOld; - m_calibEvtInfoTool->getLumiBlock(lbBeginOld, lbEndOld); - m_calibEvtInfoTool->setLumiBlock(std::min(lumiBlock, lbBeginOld), std::max(lumiBlock, lbEndOld)); - m_calibEvtInfoTool->setLumiBlock(lumiBlock); - m_calibEvtInfoTool->setTimeStamp(timeStamp); - } - - const bool majorityIsGoodOrUnused=( m_useMajority and m_MajorityConditionsTool->isGood() ) or !m_useMajority; - //--- Fill histograms for (1) Number of events and (2) Hitmaps - if ( m_doHitMaps and majorityIsGoodOrUnused ) m_calibHitmapTool->fill(m_readBS); - - //--- Fill histograms for (1) Number of events and (2) Hits as a function of LB - if ( m_doNoisyLB and majorityIsGoodOrUnused ) m_calibLbTool->fill(m_readBS); - - //--- Fill histograms for (1) Number of events and (2) BSErrors - if ( m_doBSErrors ) m_calibBsErrTool->fill(m_readBS); - - //--- Increment event counter : to be ready for the next event loop - m_calibEvtInfoTool->incrementCounter(); - - return StatusCode::SUCCESS; + if (m_readBS) { + SG::ReadHandle<EventInfo> evt{m_eventInfoKey}; + if (not evt.isValid()) { + ATH_MSG_FATAL("Unable to get the EventInfo"); + return StatusCode::FAILURE; + } + const EventInfo* evt_ptr{&(*evt)}; + ATH_MSG_VERBOSE(SCT_CalibAlgs::eventInfoAsString(evt_ptr)); + //--- TimeStamp/LB range analyzed + const int timeStamp{static_cast<int>(evt->event_ID()->time_stamp())}; + const int lumiBlock{static_cast<int>(evt->event_ID()->lumi_block())}; + int timeStampBeginOld; + int timeStampEndOld; + m_calibEvtInfoTool->getTimeStamps(timeStampBeginOld, timeStampEndOld); + m_calibEvtInfoTool->setTimeStamp(std::min(timeStamp, timeStampBeginOld), std::max(timeStamp, timeStampEndOld)); + int lbBeginOld; + int lbEndOld; + m_calibEvtInfoTool->getLumiBlock(lbBeginOld, lbEndOld); + m_calibEvtInfoTool->setLumiBlock(std::min(lumiBlock, lbBeginOld), std::max(lumiBlock, lbEndOld)); + m_calibEvtInfoTool->setLumiBlock(lumiBlock); + m_calibEvtInfoTool->setTimeStamp(timeStamp); + } + + const bool majorityIsGoodOrUnused{(m_useMajority and m_MajorityConditionsTool->isGood()) or !m_useMajority}; + //--- Fill histograms for (1) Number of events and (2) Hitmaps + if (m_doHitMaps and majorityIsGoodOrUnused) m_calibHitmapTool->fill(m_readBS); + + //--- Fill histograms for (1) Number of events and (2) Hits as a function of LB + if (m_doNoisyLB and majorityIsGoodOrUnused) m_calibLbTool->fill(m_readBS); + + //--- Fill histograms for (1) Number of events and (2) BSErrors + if (m_doBSErrors) m_calibBsErrTool->fill(m_readBS); + + //--- Increment event counter : to be ready for the next event loop + m_calibEvtInfoTool->incrementCounter(); + + return StatusCode::SUCCESS; } /////////////////////////////////////////////////////////////////////////////////// @@ -373,109 +364,106 @@ StatusCode SCTCalib::execute() { /////////////////////////////////////////////////////////////////////////////////// StatusCode SCTCalib::endRun() { - ATH_MSG_INFO( "----- in endRun() ----- " ); - //--- Number of events processed - m_numberOfEvents = (m_readHIST || (!m_doHitMaps && m_readHitMaps)) ? m_numberOfEventsHist : m_calibEvtInfoTool->counter(); - m_calibEvtInfoTool->getTimeStamps(m_utcBegin,m_utcEnd); - - - // if ( m_doNoisyLB ) m_calibLbTool->binHistograms(m_nLbsMerged); - - //--- IOV range defined by RunNumber and LB - unsigned int beginRun = static_cast<unsigned int>(m_runNumber.value()); - unsigned int endRun = static_cast<unsigned int>(m_runNumber.value()); - unsigned int beginLB = IOVTime::MINEVENT; - unsigned int endLB = IOVTime::MAXEVENT; - m_iovStart.setRunEvent( static_cast<unsigned long>(beginRun), static_cast<unsigned long>(beginLB) ); - m_iovStop.setRunEvent( static_cast<unsigned long>(endRun), static_cast<unsigned long>(endLB) ); - - //--- Find noisy strips from hitmaps - const bool doNoisyStripAnalysis = ( ( !m_doHitMaps && m_readHitMaps ) || !m_readHitMaps ) && m_doNoisyStrip; - if ( doNoisyStripAnalysis and getNoisyStrip().isFailure() ) { - ATH_MSG_ERROR("Failed to run getNoisyStrip()"); - return StatusCode::FAILURE; - } - - //--- Upload hv - if ( m_doHV ) { - m_gofile.open(m_badModulesFile.value().c_str(),std::ios::out); - if (not m_gofile) ATH_MSG_ERROR("Problem opening "<<m_badModulesFile); - // - XmlHeader myXml(m_gofile); - XmlStreamer root("modules", m_gofile); - SCT_ID::const_id_iterator waferItr = m_pSCTHelper->wafer_begin(); - SCT_ID::const_id_iterator waferItrE = m_pSCTHelper->wafer_end(); - const unsigned int onlyDummy(1); - pair<int, int> timeInterval(0,0); - pair<int, int> lbRange(0,0); - const int withinLimits(m_maxtbins); - // - for ( ; waferItr not_eq waferItrE; ++waferItr ) { - const Identifier waferId=*waferItr ; - IdentifierHash waferHash = m_pSCTHelper->wafer_hash( waferId ); - const vector< pair<int,int> > & tvec= m_summarytrips.at(waferHash.value()); - const vector< pair<int,int> > & tlbn= m_summarytripslb.at(waferHash.value()); - //tvec is a pair of times in general, although the very first one is a dummy - const unsigned int numberOfElements=tvec.size(); - if (numberOfElements > onlyDummy) { - //only care if something happened in this module - timeInterval=tvec.at(1); - lbRange=tlbn.at(1); - for (unsigned int itrip(2); itrip != numberOfElements; ++itrip) { //skip 0 since that is just the dummy pair. - if (areConsecutiveIntervals(tvec[itrip],timeInterval,withinLimits)) { - timeInterval.second = tvec.at(itrip).second; - lbRange.second = tlbn.at(itrip).second; - } else { - //not consecutive, so first print out the old one - doHVPrintXML(timeInterval,lbRange,waferId); - timeInterval = tvec.at(itrip); - lbRange = tlbn.at(itrip); - } - } // end loop over times - doHVPrintXML(timeInterval,lbRange,waferId ); - } - } // end loop over wafers - } - - //--- Find dead strips/chips from hitmaps - if ( (m_doDeadStrip or m_doDeadChip ) and getDeadStrip().isFailure() ) { - ATH_MSG_ERROR("Failed to run getDeadStrip()"); - return StatusCode::FAILURE; - } - - //--- Upload noise occupancy - if ( m_doNoiseOccupancy and getNoiseOccupancy().isFailure() ) { - ATH_MSG_ERROR("Failed to run getNoiseOccupancy()"); - return StatusCode::FAILURE; - } - - //--- Upload raw occupancy - if ( m_doRawOccupancy and getRawOccupancy().isFailure() ) { - ATH_MSG_ERROR("Failed to run getRawOccupancy()"); - return StatusCode::FAILURE; - } - - //--- Upload efficiency - if ( m_doEfficiency and getEfficiency().isFailure() ) { - ATH_MSG_ERROR("Failed to run getEfficiency()"); - return StatusCode::FAILURE; - } - - //--- Upload ByteStream Errors - if ( m_doBSErrorDB and getBSErrors().isFailure() ) { - ATH_MSG_ERROR("Failed to run getBSErrors()"); - return StatusCode::FAILURE; - } - - //--- Upload Lorentz Angle - if ( m_doLorentzAngle and getLorentzAngle().isFailure() ) { - ATH_MSG_ERROR("Failed to run getLorentzAngle()"); - return StatusCode::FAILURE; - } - - //--- Close HIST - if ( m_readHIST ) m_inputHist->Close(); - return StatusCode::SUCCESS; + ATH_MSG_INFO("----- in endRun() ----- "); + //--- Number of events processed + m_numberOfEvents = (m_readHIST or (!m_doHitMaps and m_readHitMaps)) ? m_numberOfEventsHist : m_calibEvtInfoTool->counter(); + m_calibEvtInfoTool->getTimeStamps(m_utcBegin, m_utcEnd); + + //--- IOV range defined by RunNumber and LB + unsigned int beginRun{static_cast<unsigned int>(m_runNumber.value())}; + unsigned int endRun{static_cast<unsigned int>(m_runNumber.value())}; + unsigned int beginLB{IOVTime::MINEVENT}; + unsigned int endLB{IOVTime::MAXEVENT}; + m_iovStart.setRunEvent(static_cast<unsigned long>(beginRun), static_cast<unsigned long>(beginLB)); + m_iovStop.setRunEvent(static_cast<unsigned long>(endRun), static_cast<unsigned long>(endLB)); + + //--- Find noisy strips from hitmaps + const bool doNoisyStripAnalysis{((!m_doHitMaps and m_readHitMaps) or !m_readHitMaps) and m_doNoisyStrip}; + if (doNoisyStripAnalysis and getNoisyStrip().isFailure()) { + ATH_MSG_ERROR("Failed to run getNoisyStrip()"); + return StatusCode::FAILURE; + } + + //--- Upload hv + if (m_doHV) { + m_gofile.open(m_badModulesFile.value().c_str(), std::ios::out); + if (not m_gofile) ATH_MSG_ERROR("Problem opening " << m_badModulesFile); + // + XmlHeader myXml{m_gofile}; + XmlStreamer root{"modules", m_gofile}; + SCT_ID::const_id_iterator waferItr{m_pSCTHelper->wafer_begin()}; + SCT_ID::const_id_iterator waferItrE{m_pSCTHelper->wafer_end()}; + const unsigned int onlyDummy{1}; + pair<int, int> timeInterval{0, 0}; + pair<int, int> lbRange{0, 0}; + const int withinLimits{m_maxtbins}; + // + for (; waferItr not_eq waferItrE; ++waferItr) { + const Identifier waferId{*waferItr}; + IdentifierHash waferHash{m_pSCTHelper->wafer_hash(waferId)}; + const vector<pair<int, int>>& tvec{m_summarytrips.at(waferHash.value())}; + const vector<pair<int, int>>& tlbn{m_summarytripslb.at(waferHash.value())}; + //tvec is a pair of times in general, although the very first one is a dummy + const unsigned int numberOfElements{static_cast<unsigned int>(tvec.size())}; + if (numberOfElements > onlyDummy) { + //only care if something happened in this module + timeInterval=tvec.at(1); + lbRange=tlbn.at(1); + for (unsigned int itrip{2}; itrip != numberOfElements; ++itrip) { //skip 0 since that is just the dummy pair. + if (areConsecutiveIntervals(tvec[itrip], timeInterval, withinLimits)) { + timeInterval.second = tvec.at(itrip).second; + lbRange.second = tlbn.at(itrip).second; + } else { + //not consecutive, so first print out the old one + doHVPrintXML(timeInterval, lbRange, waferId); + timeInterval = tvec.at(itrip); + lbRange = tlbn.at(itrip); + } + } // end loop over times + doHVPrintXML(timeInterval, lbRange, waferId); + } + } // end loop over wafers + } + + //--- Find dead strips/chips from hitmaps + if ((m_doDeadStrip or m_doDeadChip) and getDeadStrip().isFailure()) { + ATH_MSG_ERROR("Failed to run getDeadStrip()"); + return StatusCode::FAILURE; + } + + //--- Upload noise occupancy + if (m_doNoiseOccupancy and getNoiseOccupancy().isFailure()) { + ATH_MSG_ERROR("Failed to run getNoiseOccupancy()"); + return StatusCode::FAILURE; + } + + //--- Upload raw occupancy + if (m_doRawOccupancy and getRawOccupancy().isFailure()) { + ATH_MSG_ERROR("Failed to run getRawOccupancy()"); + return StatusCode::FAILURE; + } + + //--- Upload efficiency + if (m_doEfficiency and getEfficiency().isFailure()) { + ATH_MSG_ERROR("Failed to run getEfficiency()"); + return StatusCode::FAILURE; + } + + //--- Upload ByteStream Errors + if (m_doBSErrorDB and getBSErrors().isFailure()) { + ATH_MSG_ERROR("Failed to run getBSErrors()"); + return StatusCode::FAILURE; + } + + //--- Upload Lorentz Angle + if (m_doLorentzAngle and getLorentzAngle().isFailure()) { + ATH_MSG_ERROR("Failed to run getLorentzAngle()"); + return StatusCode::FAILURE; + } + + //--- Close HIST + if (m_readHIST) m_inputHist->Close(); + return StatusCode::SUCCESS; } @@ -484,10 +472,10 @@ StatusCode SCTCalib::endRun() { /////////////////////////////////////////////////////////////////////////////////// StatusCode SCTCalib::finalize() { - ATH_MSG_INFO("----- in finalize() ----- "); + ATH_MSG_INFO("----- in finalize() ----- "); - ATH_MSG_INFO("Thank-you for using SCT_CalibAlgs, version "<<PACKAGE_VERSION); - return StatusCode::SUCCESS; + ATH_MSG_INFO("Thank-you for using SCT_CalibAlgs, version " << PACKAGE_VERSION); + return StatusCode::SUCCESS; } @@ -495,36 +483,36 @@ StatusCode SCTCalib::finalize() { /// doHVPrintXML() /// Prints XML file for hv modules /////////////////////////////////////////////////////////////////////////////////// -StatusCode SCTCalib::doHVPrintXML(const std::pair<int, int> & timeInterval, const std::pair<int,int> & lbRange, Identifier waferId) { - const IdentifierHash waferHash = m_pSCTHelper->wafer_hash( waferId ); - const SCT_SerialNumber sn = m_CablingTool->getSerialNumberFromHash( waferHash ); - - XmlStreamer mod("module", m_gofile); - { - XmlStreamer v("value","name","SN", m_gofile); - m_gofile<<sn.str(); - } - { - XmlStreamer v("value", "name", "BecLayerPhiEta", m_gofile); - m_gofile<< formatPosition(waferId, m_pSCTHelper,".",false); - } - { - XmlStreamer v("value","name", "StartTime", m_gofile); - m_gofile<<timeInterval.first; - } - { - XmlStreamer v("value","name","EndTime",m_gofile); - m_gofile<< timeInterval.second; - } - { - XmlStreamer v("value","name", "StartLBN", m_gofile); - m_gofile<<lbRange.first; - } - { - XmlStreamer v("value","name","EndLBN",m_gofile); - m_gofile<< lbRange.second; - } - return StatusCode::SUCCESS; +StatusCode SCTCalib::doHVPrintXML(const std::pair<int, int>& timeInterval, const std::pair<int, int>& lbRange, Identifier waferId) { + const IdentifierHash waferHash{m_pSCTHelper->wafer_hash(waferId)}; + const SCT_SerialNumber sn{m_CablingTool->getSerialNumberFromHash(waferHash)}; + + XmlStreamer mod{"module", m_gofile}; + { + XmlStreamer v{"value", "name", "SN", m_gofile}; + m_gofile << sn.str(); + } + { + XmlStreamer v{"value", "name", "BecLayerPhiEta", m_gofile}; + m_gofile << formatPosition(waferId, m_pSCTHelper, ".", false); + } + { + XmlStreamer v{"value", "name", "StartTime", m_gofile}; + m_gofile << timeInterval.first; + } + { + XmlStreamer v{"value", "name", "EndTime", m_gofile}; + m_gofile << timeInterval.second; + } + { + XmlStreamer v{"value", "name", "StartLBN", m_gofile}; + m_gofile << lbRange.first; + } + { + XmlStreamer v{"value", "name", "EndLBN", m_gofile}; + m_gofile << lbRange.second; + } + return StatusCode::SUCCESS; } /////////////////////////////////////////////////////////////////////////////////// @@ -532,110 +520,110 @@ StatusCode SCTCalib::doHVPrintXML(const std::pair<int, int> & timeInterval, cons /// Find noisy strips from hitmaps and write out into xml/db formats /////////////////////////////////////////////////////////////////////////////////// StatusCode SCTCalib::getNoisyStrip() { - enum Categories {ALL, NEW, REF, N_CATEGORIES}; - //--- Check statistics - //ATH_MSG_INFO(m_calibEvtInfoTool->counter() << " " <<m_calibHitmapTool->size()); - //int numOfEventsProcessed=m_calibEvtInfoTool->counter(); - //sroe: This looks like a bug, so I change the code here - - // if ( noisyStripsToSummaryXmlFake( m_badStripsSummaryFile ).isFailure() ) { - // ATH_MSG_ERROR("Could not write XML file"); - // return StatusCode::FAILURE; - // } - - ATH_MSG_INFO( "----- in getNoisyStrip() ----- " ); - - //--- Number of LBs processed - m_numOfLBsProcessed = 0; - for ( int iLB = 0; iLB != m_LBRange; ++iLB ) { - if ( m_calibLbTool and m_calibLbTool->getNumberOfEventsInBin( iLB + 1 ) > 0 ) ++m_numOfLBsProcessed; - } - - //--- Choice of threshold - //three module lists: all, new, ref - typedef std::map< Identifier, std::set<Identifier> > ModuleList_t; - ModuleList_t moduleLists[N_CATEGORIES]; - //Reading data from COOL - // original code switched on this :if (m_noisyUpdate) - if (m_calibModuleListTool->readModuleList(moduleLists[REF]).isFailure()) { - ATH_MSG_ERROR("Could not read moduleList"); - return StatusCode::FAILURE; - } - - //two bad strip lists: all, new - typedef std::set<Identifier> StripList_t; - StripList_t stripIdLists[2]; - - //--- Loop over wafers - SCT_ID::const_id_iterator waferItr = m_pSCTHelper->wafer_begin(); - SCT_ID::const_id_iterator waferItrE = m_pSCTHelper->wafer_end(); - int numNoisyWafers(0); - for ( ; waferItr not_eq waferItrE; ++waferItr ) { - //--- Identifier/SN - Identifier waferId = *waferItr; - Identifier moduleId = m_pSCTHelper->module_id( waferId ); - //--- Initialization in *module* - if ( m_pSCTHelper->side( waferId ) == 0 ) { - stripIdLists[ALL].clear(); - stripIdLists[NEW].clear(); - } - std::pair<int, bool> noisy=getNumNoisyStrips(waferId); - const int numNoisyStripsInWafer=noisy.first; - const bool isNoisyWafer=noisy.second; - if (numNoisyStripsInWafer!=0) { - if ( m_noisyWaferFinder && isNoisyWafer ) { //in noisy wafer - ++numNoisyWafers; - if (not m_noisyWaferWrite) break; - if (m_noisyWaferAllStrips) { //write out all strips - if ( addStripsToList( waferId, stripIdLists[ALL], false, false ).isFailure() or addStripsToList( waferId, stripIdLists[NEW], false, true ).isFailure() ) { - ATH_MSG_ERROR("Could not add stripIds to the list"); - return StatusCode::FAILURE; - } - break; - } else { - //only noisy strips in noisy wafer - if ( addStripsToList( waferId, stripIdLists[ALL], true, false ).isFailure() or addStripsToList( waferId, stripIdLists[NEW], true, true ).isFailure() ) { - ATH_MSG_ERROR("Could not add stripIds to the list"); - return StatusCode::FAILURE; - } - } - } else { // not in noisy wafer - if ( addStripsToList( waferId, stripIdLists[ALL], true, false ).isFailure() or addStripsToList( waferId, stripIdLists[NEW], true, true ).isFailure() ) { - ATH_MSG_ERROR("Could not add stripIds to the list"); - return StatusCode::FAILURE; - } - } - }//endif numnoisystrips!=0 - //--- Create objects for a module - if ( m_pSCTHelper->side( waferId ) == 1 ) { - if ( !stripIdLists[ALL].empty() ) moduleLists[ALL].insert( map< Identifier, std::set<Identifier> >::value_type( moduleId, stripIdLists[ALL] ) ); - if ( !stripIdLists[NEW].empty() ) moduleLists[NEW].insert( map< Identifier, std::set<Identifier> >::value_type( moduleId, stripIdLists[NEW] ) ); - } - }//end loop over wafers + enum Categories {ALL, NEW, REF, N_CATEGORIES}; + //--- Check statistics + //ATH_MSG_INFO(m_calibEvtInfoTool->counter() << " " << m_calibHitmapTool->size()); + //int numOfEventsProcessed=m_calibEvtInfoTool->counter(); + //sroe: This looks like a bug, so I change the code here + + // if (noisyStripsToSummaryXmlFake(m_badStripsSummaryFile).isFailure()) { + // ATH_MSG_ERROR("Could not write XML file"); + // return StatusCode::FAILURE; + // } + + ATH_MSG_INFO("----- in getNoisyStrip() ----- "); + + //--- Number of LBs processed + m_numOfLBsProcessed = 0; + for (int iLB{0}; iLB != m_LBRange; ++iLB) { + if (m_calibLbTool and m_calibLbTool->getNumberOfEventsInBin(iLB + 1) > 0) ++m_numOfLBsProcessed; + } + + //--- Choice of threshold + //three module lists: all, new, ref + typedef std::map< Identifier, std::set<Identifier> > ModuleList_t; + ModuleList_t moduleLists[N_CATEGORIES]; + //Reading data from COOL + // original code switched on this :if (m_noisyUpdate) + if (m_calibModuleListTool->readModuleList(moduleLists[REF]).isFailure()) { + ATH_MSG_ERROR("Could not read moduleList"); + return StatusCode::FAILURE; + } + + //two bad strip lists: all, new + typedef std::set<Identifier> StripList_t; + StripList_t stripIdLists[2]; + + //--- Loop over wafers + SCT_ID::const_id_iterator waferItr{m_pSCTHelper->wafer_begin()}; + SCT_ID::const_id_iterator waferItrE{m_pSCTHelper->wafer_end()}; + int numNoisyWafers{0}; + for (; waferItr not_eq waferItrE; ++waferItr) { + //--- Identifier/SN + Identifier waferId{*waferItr}; + Identifier moduleId{m_pSCTHelper->module_id(waferId)}; + //--- Initialization in *module* + if (m_pSCTHelper->side(waferId) == 0) { + stripIdLists[ALL].clear(); + stripIdLists[NEW].clear(); + } + std::pair<int, bool> noisy{getNumNoisyStrips(waferId)}; + const int numNoisyStripsInWafer{noisy.first}; + const bool isNoisyWafer{noisy.second}; + if (numNoisyStripsInWafer!=0) { + if (m_noisyWaferFinder and isNoisyWafer) { //in noisy wafer + ++numNoisyWafers; + if (not m_noisyWaferWrite) break; + if (m_noisyWaferAllStrips) { //write out all strips + if (addStripsToList(waferId, stripIdLists[ALL], false, false).isFailure() or addStripsToList(waferId, stripIdLists[NEW], false, true).isFailure()) { + ATH_MSG_ERROR("Could not add stripIds to the list"); + return StatusCode::FAILURE; + } + break; + } else { + //only noisy strips in noisy wafer + if (addStripsToList(waferId, stripIdLists[ALL], true, false).isFailure() or addStripsToList(waferId, stripIdLists[NEW], true, true).isFailure()) { + ATH_MSG_ERROR("Could not add stripIds to the list"); + return StatusCode::FAILURE; + } + } + } else { // not in noisy wafer + if (addStripsToList(waferId, stripIdLists[ALL], true, false).isFailure() or addStripsToList(waferId, stripIdLists[NEW], true, true).isFailure()) { + ATH_MSG_ERROR("Could not add stripIds to the list"); + return StatusCode::FAILURE; + } + } + }//endif numnoisystrips!=0 + //--- Create objects for a module + if (m_pSCTHelper->side(waferId) == 1) { + if (!stripIdLists[ALL].empty()) moduleLists[ALL].insert(map< Identifier, std::set<Identifier> >::value_type(moduleId, stripIdLists[ALL])); + if (!stripIdLists[NEW].empty()) moduleLists[NEW].insert(map< Identifier, std::set<Identifier> >::value_type(moduleId, stripIdLists[NEW])); + } + }//end loop over wafers //--- Local sqlite files here - ATH_MSG_DEBUG( "------ Before writing into COOL ------" ); - if ( m_writeToCool ) { - if ( writeModuleListToCool( moduleLists[ALL], moduleLists[NEW], moduleLists[REF] ).isFailure() ) { - ATH_MSG_ERROR("Could not write NoisyStrips into COOL"); - return StatusCode::FAILURE; - } - } - //--- XML outputs - if ( noisyStripsToXml( moduleLists[ALL], m_badStripsAllFile ).isFailure() ) { - ATH_MSG_ERROR("Could not write XML file"); - return StatusCode::FAILURE; - } - if ( noisyStripsToXml( moduleLists[NEW], m_badStripsNewFile ).isFailure() ) { - ATH_MSG_ERROR("Could not write XML file"); + ATH_MSG_DEBUG("------ Before writing into COOL ------"); + if (m_writeToCool) { + if (writeModuleListToCool(moduleLists[ALL], moduleLists[NEW], moduleLists[REF]).isFailure()) { + ATH_MSG_ERROR("Could not write NoisyStrips into COOL"); return StatusCode::FAILURE; - } - if ( noisyStripsToSummaryXml( moduleLists[ALL], moduleLists[NEW], moduleLists[REF], m_badStripsSummaryFile ).isFailure() ) { - ATH_MSG_ERROR("Could not write XML file"); - return StatusCode::FAILURE; - } - - return StatusCode::SUCCESS; + } + } + //--- XML outputs + if (noisyStripsToXml(moduleLists[ALL], m_badStripsAllFile).isFailure()) { + ATH_MSG_ERROR("Could not write XML file"); + return StatusCode::FAILURE; + } + if (noisyStripsToXml(moduleLists[NEW], m_badStripsNewFile).isFailure()) { + ATH_MSG_ERROR("Could not write XML file"); + return StatusCode::FAILURE; + } + if (noisyStripsToSummaryXml(moduleLists[ALL], moduleLists[NEW], moduleLists[REF], m_badStripsSummaryFile).isFailure()) { + ATH_MSG_ERROR("Could not write XML file"); + return StatusCode::FAILURE; + } + + return StatusCode::SUCCESS; } @@ -644,522 +632,521 @@ StatusCode SCTCalib::getNoisyStrip() { // SCTCalib :: getDeadStrip //==================================================================================================== StatusCode SCTCalib::getDeadStrip() { - //Function to identify and print out the dead strips. - ATH_MSG_INFO( "getDeadStrip() called" ); - - // Bad Mods - const std::set<Identifier>* badMods = m_ConfigurationConditionsTool->badModules(); - std::set<Identifier>::const_iterator ModItr(badMods->begin()); - std::set<Identifier>::const_iterator ModEnd(badMods->end()); - // Bad links - const std::map<IdentifierHash, std::pair<bool, bool> >* badLinks = m_ConfigurationConditionsTool->badLinks(); - std::map<IdentifierHash, std::pair<bool, bool> >::const_iterator linkItr(badLinks->begin()); - std::map<IdentifierHash, std::pair<bool, bool> >::const_iterator linkEnd(badLinks->end()); - // Bad chips - const std::map<Identifier, unsigned int>* badChips = m_ConfigurationConditionsTool->badChips(); - std::map<Identifier, unsigned int>::const_iterator chipItr(badChips->begin()); - std::map<Identifier, unsigned int>::const_iterator chipEnd(badChips->end()); - // Bad strips (w/o bad modules and chips) - std::set<Identifier> badStripsExclusive; - m_ConfigurationConditionsTool->badStrips(badStripsExclusive, true, true); - //std::set<Identifier>::const_iterator stripItr(badStripsExclusive.begin()); - std::set<Identifier>::const_iterator stripEnd(badStripsExclusive.end()); - //To get #(Enabled Modules) - int numEnabledModules_B[n_barrels]= {n_phiBinsB0*n_etaInBarrel,n_phiBinsB1*n_etaInBarrel,n_phiBinsB2*n_etaInBarrel,n_phiBinsB3*n_etaInBarrel}; - int numEnabledModules_EC[n_disks][n_etaBinsEC]= { {0}, {0} }; - for (int i=0; i<n_disks; i++) { - for (int j=0; j<n_etaBinsEC; j++) { - if (!((i==0&&j==2)||(i==6&&j==2)||(i==7&&j==2)||(i==8&&j==1)||(i==8&&j==2))) { - numEnabledModules_EC[i][j] = j==0 ? n_phiBinsECOuter*2 : n_phiBinsECMiddle*2; - } - } - } - for (; ModItr!=ModEnd; ++ModItr) { - Identifier moduleId = *ModItr; - if (m_pSCTHelper->barrel_ec(moduleId)==BARREL) numEnabledModules_B[m_pSCTHelper->layer_disk(moduleId)]--; - else numEnabledModules_EC[m_pSCTHelper->layer_disk(moduleId)][m_pSCTHelper->eta_module(moduleId)]--; - } - //calculate meanOccupancy of layer etc... - double meanOccupancy_Barrel[n_barrels]= {0}; - double meanOccupancy_EC[n_disks][n_etaBinsEC]= { {0}, {0} }; - SCT_ID::const_id_iterator waferItr = m_pSCTHelper->wafer_begin(); - SCT_ID::const_id_iterator waferItrE = m_pSCTHelper->wafer_end(); - for ( ; waferItr != waferItrE; ++waferItr ) { - Identifier waferId = *waferItr; - // Identifier moduleId = m_pSCTHelper->module_id(waferId); - IdentifierHash waferHash = m_pSCTHelper->wafer_hash(waferId); - for (int j=0; j<n_stripPerChip*n_chipPerSide; j++) { - double n_hits = m_calibHitmapTool->getBinForHistogramIndex( j+1, waferHash.value()); - if (n_hits/m_numberOfEvents<m_noisyThr4DeadFinding) { - if (m_pSCTHelper->barrel_ec(waferId)==BARREL) { - meanOccupancy_Barrel[m_pSCTHelper->layer_disk(waferId)]+=m_calibHitmapTool->getBinForHistogramIndex( j+1, waferHash.value()); - } else { - meanOccupancy_EC[m_pSCTHelper->layer_disk(waferId)][m_pSCTHelper->eta_module(waferId)]+=m_calibHitmapTool->getBinForHistogramIndex( j+1, waferHash.value()); - } - } - } - } - - for (int i=0; i<n_barrels; i++) { - meanOccupancy_Barrel[i]/=static_cast<double>(m_numberOfEvents*nbins*2*numEnabledModules_B[i]); - ATH_MSG_INFO("Barrel : layer="<<i<<", meanOccupancy="<<meanOccupancy_Barrel[i]<<", #enabledModule="<<numEnabledModules_B[i]); - } - - for (int i=0; i<n_disks; i++) { - for (int j=0; j<n_etaBinsEC; j++) { - if (numEnabledModules_EC[i][j]!=0) { - meanOccupancy_EC[i][j]/=static_cast<double>(m_numberOfEvents*nbins*2*numEnabledModules_EC[i][j]); - ATH_MSG_INFO("EndCap : disk="<<i<<", eta="<<j<<", meanOccupancy="<<meanOccupancy_EC[i][j]<<", #enabledModule="<<numEnabledModules_EC[i][j]); - } - } - } - bool busyStream = meanOccupancy_Barrel[3]>m_busyThr4DeadFinding ? true : false; - unsigned int minStat = busyStream ? static_cast<unsigned int>(m_deadStripMinStatBusy) : static_cast<unsigned int>(m_deadStripMinStat); - if (m_doDeadStrip && m_numberOfEvents<minStat) { - ATH_MSG_WARNING("required minimum statistics is "<<minStat/1E3<<"k events for DeadStrip search with this stream"); - m_doDeadStrip = false; - } - if (m_doDeadChip && m_numberOfEvents<m_deadChipMinStat) { - ATH_MSG_WARNING("required minimum statistics is "<<static_cast<unsigned int>(m_deadChipMinStat)<<" events for DeadChip search"); - m_doDeadChip = false; - } - if (m_doDeadStrip==false && m_doDeadChip==false) { - ATH_MSG_ERROR("Number of events " << m_numberOfEvents<< " is less than the required minimum number of events... exit getDeadStrip()"); + //Function to identify and print out the dead strips. + ATH_MSG_INFO("getDeadStrip() called"); + + // Bad Mods + const std::set<Identifier>* badMods{m_ConfigurationConditionsTool->badModules()}; + std::set<Identifier>::const_iterator ModItr{badMods->begin()}; + std::set<Identifier>::const_iterator ModEnd{badMods->end()}; + // Bad links + const std::map<IdentifierHash, std::pair<bool, bool> >* badLinks{m_ConfigurationConditionsTool->badLinks()}; + std::map<IdentifierHash, std::pair<bool, bool> >::const_iterator linkItr{badLinks->begin()}; + std::map<IdentifierHash, std::pair<bool, bool> >::const_iterator linkEnd{badLinks->end()}; + // Bad chips + const std::map<Identifier, unsigned int>* badChips{m_ConfigurationConditionsTool->badChips()}; + std::map<Identifier, unsigned int>::const_iterator chipItr{badChips->begin()}; + std::map<Identifier, unsigned int>::const_iterator chipEnd{badChips->end()}; + // Bad strips (w/o bad modules and chips) + std::set<Identifier> badStripsExclusive; + m_ConfigurationConditionsTool->badStrips(badStripsExclusive, true, true); + //std::set<Identifier>::const_iterator stripItr(badStripsExclusive.begin()); + std::set<Identifier>::const_iterator stripEnd(badStripsExclusive.end()); + //To get #(Enabled Modules) + int numEnabledModules_B[n_barrels] = {n_phiBinsB0*n_etaInBarrel, n_phiBinsB1*n_etaInBarrel, n_phiBinsB2*n_etaInBarrel, n_phiBinsB3*n_etaInBarrel}; + int numEnabledModules_EC[n_disks][n_etaBinsEC] = {{0}, {0}}; + for (int i{0}; i<n_disks; i++) { + for (int j{0}; j<n_etaBinsEC; j++) { + if (!((i==0 and j==2) or (i==6 and j==2) or (i==7 and j==2) or (i==8 and j==1) or (i==8 and j==2))) { + numEnabledModules_EC[i][j] = j==0 ? n_phiBinsECOuter*2 : n_phiBinsECMiddle*2; + } + } + } + for (; ModItr!=ModEnd; ++ModItr) { + Identifier moduleId{*ModItr}; + if (m_pSCTHelper->barrel_ec(moduleId)==BARREL) numEnabledModules_B[m_pSCTHelper->layer_disk(moduleId)]--; + else numEnabledModules_EC[m_pSCTHelper->layer_disk(moduleId)][m_pSCTHelper->eta_module(moduleId)]--; + } + //calculate meanOccupancy of layer etc... + double meanOccupancy_Barrel[n_barrels] = {0}; + double meanOccupancy_EC[n_disks][n_etaBinsEC] = {{0}, {0}}; + SCT_ID::const_id_iterator waferItr{m_pSCTHelper->wafer_begin()}; + SCT_ID::const_id_iterator waferItrE{m_pSCTHelper->wafer_end()}; + for (; waferItr != waferItrE; ++waferItr) { + Identifier waferId{*waferItr}; + IdentifierHash waferHash{m_pSCTHelper->wafer_hash(waferId)}; + for (int j{0}; j<n_stripPerChip*n_chipPerSide; j++) { + double n_hits{m_calibHitmapTool->getBinForHistogramIndex(j+1, waferHash.value())}; + if (n_hits/m_numberOfEvents<m_noisyThr4DeadFinding) { + if (m_pSCTHelper->barrel_ec(waferId)==BARREL) { + meanOccupancy_Barrel[m_pSCTHelper->layer_disk(waferId)]+=m_calibHitmapTool->getBinForHistogramIndex(j+1, waferHash.value()); + } else { + meanOccupancy_EC[m_pSCTHelper->layer_disk(waferId)][m_pSCTHelper->eta_module(waferId)]+=m_calibHitmapTool->getBinForHistogramIndex(j+1, waferHash.value()); + } + } + } + } + + for (int i{0}; i<n_barrels; i++) { + meanOccupancy_Barrel[i]/=static_cast<double>(m_numberOfEvents*nbins*2*numEnabledModules_B[i]); + ATH_MSG_INFO("Barrel : layer=" << i << ", meanOccupancy=" << meanOccupancy_Barrel[i] << ", #enabledModule=" << numEnabledModules_B[i]); + } + + for (int i{0}; i<n_disks; i++) { + for (int j{0}; j<n_etaBinsEC; j++) { + if (numEnabledModules_EC[i][j]!=0) { + meanOccupancy_EC[i][j]/=static_cast<double>(m_numberOfEvents*nbins*2*numEnabledModules_EC[i][j]); + ATH_MSG_INFO("EndCap : disk=" << i << ", eta=" << j << ", meanOccupancy=" << meanOccupancy_EC[i][j] << ", #enabledModule=" << numEnabledModules_EC[i][j]); + } + } + } + bool busyStream{meanOccupancy_Barrel[3]>m_busyThr4DeadFinding ? true : false}; + unsigned int minStat{busyStream ? static_cast<unsigned int>(m_deadStripMinStatBusy) : static_cast<unsigned int>(m_deadStripMinStat)}; + if (m_doDeadStrip and m_numberOfEvents<minStat) { + ATH_MSG_WARNING("required minimum statistics is " << minStat/1E3 << "k events for DeadStrip search with this stream"); + m_doDeadStrip = false; + } + if (m_doDeadChip and m_numberOfEvents<m_deadChipMinStat) { + ATH_MSG_WARNING("required minimum statistics is " << static_cast<unsigned int>(m_deadChipMinStat) << " events for DeadChip search"); + m_doDeadChip = false; + } + if (m_doDeadStrip==false and m_doDeadChip==false) { + ATH_MSG_ERROR("Number of events " << m_numberOfEvents << " is less than the required minimum number of events... exit getDeadStrip()"); + return StatusCode::FAILURE; + } + //create XML files + if (m_doDeadStrip) { + if (openXML4DB(m_outDeadStrips, "DeadStrip", m_tagID4DeadStrips.value().c_str(), m_iovStart, m_iovStop).isFailure()) { + ATH_MSG_ERROR("Problem opening " << m_deadStripsFile); return StatusCode::FAILURE; - } - //create XML files - if (m_doDeadStrip) { - if (openXML4DB(m_outDeadStrips, "DeadStrip", m_tagID4DeadStrips.value().c_str(), m_iovStart, m_iovStop).isFailure()) { - ATH_MSG_ERROR("Problem opening "<<m_deadStripsFile); - return StatusCode::FAILURE; - } - } - if (m_doDeadChip) { - if (openXML4DB(m_outDeadChips, "DeadChip", m_tagID4DeadChips.value().c_str(), m_iovStart, m_iovStop).isFailure()) { - ATH_MSG_ERROR("Problem opening "<<m_deadChipsFile); - return StatusCode::FAILURE; - } - } - - // Get SCT_DetectorElementCollection - SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEle(m_SCTDetEleCollKey); - const InDetDD::SiDetectorElementCollection* elements(sctDetEle.retrieve()); - if (elements==nullptr) { - ATH_MSG_FATAL(m_SCTDetEleCollKey.fullKey() << " could not be retrieved"); + } + } + if (m_doDeadChip) { + if (openXML4DB(m_outDeadChips, "DeadChip", m_tagID4DeadChips.value().c_str(), m_iovStart, m_iovStop).isFailure()) { + ATH_MSG_ERROR("Problem opening " << m_deadChipsFile); return StatusCode::FAILURE; - } - - //Dead identification - bool hasDeadStrip=false; - bool hasDeadChip=false; - bool isNoHitLink=false; - bool isDead=false; - bool beforeIsDead=false; - int n_deadStrip=0; - int n_deadChip=0; - int n_deadLink=0; - int n_deadModule=0; - int n_checkedChip=0; - int beginDead=0; - int endDead=0; - std::string defectStrip; - std::string defectChip; - std::ostringstream summaryList; - defectStrip.erase(); - defectChip.erase(); - const double deadStripDefinition = ROOT::Math::gaussian_cdf_c(m_deadStripSignificance); - const double deadChipDefinition = ROOT::Math::gaussian_cdf_c(m_deadChipSignificance); - - - //--- Loop over wafers - waferItr = m_pSCTHelper->wafer_begin(); - for ( ; waferItr != waferItrE; ++waferItr ) { - Identifier waferId = *waferItr; - Identifier moduleId = m_pSCTHelper->module_id(waferId); - IdentifierHash waferHash = m_pSCTHelper->wafer_hash(waferId); - - bool disabledChip[n_chipPerModule]= {false}; - unsigned int disabledChipFlag=0; - double numHitsInStrip[n_stripPerChip*n_chipPerSide]= {0}; - double numHitsInChip[n_chipPerSide]= {0}; - double totalHitsInWafer=0; - int n_noisyStrip=0; - int n_noHitsStrip=0; - int n_disabledStrip=0; - int n_disabledInChip[n_chipPerSide]= {0}; - - //initialize - int side = m_pSCTHelper->side(waferId); - if (side==0) { - isDead=false; - beforeIsDead=false; - beginDead=0; - endDead=0; - defectStrip.erase(); - defectChip.erase(); - } - - //check if module/link is disabled or not - bool disabled=false; - if (badMods->find(moduleId)!=badMods->end()) disabled=true; - linkItr=badLinks->find(waferHash); - if (linkItr!=linkEnd) { - std::pair<bool, bool> status = (*linkItr).second; - if ((side==0 && status.first==true) || (side==1 && status.second==true)) disabled=true; - } - - //check BS Error - bool hasBSError=false; - if (m_calibBsErrTool->size(waferHash.value())>0) hasBSError=true; - if (disabled || hasBSError) { //goto WRITE_DB; //<-- who ever put this in should be shot; http://xkcd.com/292/ - if (side==1) { - //write to DB & .xml. - if (defectChip==" 0-5 6-11 ") { - n_deadModule++; - } else if (defectChip==" 0-5 " || defectChip==" 6-11 ") { - n_deadLink++; - } - - if (!(defectStrip.empty()) || !(defectChip.empty())) { - if (addToSummaryStr(summaryList, waferId, "DEAD", defectStrip.c_str(), defectChip.c_str()).isFailure()) { - ATH_MSG_ERROR("Could not add dead strips to the summary"); - return StatusCode::FAILURE; - } - } - - if (!(defectStrip.empty())) { - if (m_writeToCool) { - if (m_pCalibWriteTool->createListStrip(moduleId,m_pSCTHelper,10000,"DEAD",m_deadStripSignificance,defectStrip).isFailure()) { - ATH_MSG_ERROR("Could not create list"); - return StatusCode::FAILURE; - } - } - - if (addToXML4DB(m_outDeadStrips, waferId, "DEAD", m_deadStripSignificance, defectStrip.c_str()).isFailure()) { - ATH_MSG_ERROR("Could not add dead strips to the summary"); - return StatusCode::FAILURE; - } - - hasDeadStrip=true; + } + } + + // Get SCT_DetectorElementCollection + SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEle{m_SCTDetEleCollKey}; + const InDetDD::SiDetectorElementCollection* elements{sctDetEle.retrieve()}; + if (elements==nullptr) { + ATH_MSG_FATAL(m_SCTDetEleCollKey.fullKey() << " could not be retrieved"); + return StatusCode::FAILURE; + } + + //Dead identification + bool hasDeadStrip{false}; + bool hasDeadChip{false}; + bool isNoHitLink{false}; + bool isDead{false}; + bool beforeIsDead{false}; + int n_deadStrip{0}; + int n_deadChip{0}; + int n_deadLink{0}; + int n_deadModule{0}; + int n_checkedChip{0}; + int beginDead{0}; + int endDead{0}; + std::string defectStrip; + std::string defectChip; + std::ostringstream summaryList; + defectStrip.erase(); + defectChip.erase(); + const double deadStripDefinition{ROOT::Math::gaussian_cdf_c(m_deadStripSignificance)}; + const double deadChipDefinition{ROOT::Math::gaussian_cdf_c(m_deadChipSignificance)}; + + + //--- Loop over wafers + waferItr = m_pSCTHelper->wafer_begin(); + for (; waferItr != waferItrE; ++waferItr) { + Identifier waferId{*waferItr}; + Identifier moduleId{m_pSCTHelper->module_id(waferId)}; + IdentifierHash waferHash{m_pSCTHelper->wafer_hash(waferId)}; + + bool disabledChip[n_chipPerModule] = {false}; + unsigned int disabledChipFlag=0; + double numHitsInStrip[n_stripPerChip*n_chipPerSide] = {0}; + double numHitsInChip[n_chipPerSide] = {0}; + double totalHitsInWafer{0}; + int n_noisyStrip{0}; + int n_noHitsStrip{0}; + int n_disabledStrip{0}; + int n_disabledInChip[n_chipPerSide] = {0}; + + //initialize + int side{m_pSCTHelper->side(waferId)}; + if (side==0) { + isDead=false; + beforeIsDead=false; + beginDead=0; + endDead=0; + defectStrip.erase(); + defectChip.erase(); + } + + //check if module/link is disabled or not + bool disabled{false}; + if (badMods->find(moduleId)!=badMods->end()) disabled=true; + linkItr=badLinks->find(waferHash); + if (linkItr!=linkEnd) { + std::pair<bool, bool> status{(*linkItr).second}; + if ((side==0 and status.first==true) or (side==1 and status.second==true)) disabled=true; + } + + //check BS Error + bool hasBSError{false}; + if (m_calibBsErrTool->size(waferHash.value())>0) hasBSError=true; + if (disabled or hasBSError) { //goto WRITE_DB; //<-- who ever put this in should be shot; http://xkcd.com/292/ + if (side==1) { + //write to DB & .xml. + if (defectChip==" 0-5 6-11 ") { + n_deadModule++; + } else if (defectChip==" 0-5 " or defectChip==" 6-11 ") { + n_deadLink++; + } + + if (!(defectStrip.empty()) or !(defectChip.empty())) { + if (addToSummaryStr(summaryList, waferId, "DEAD", defectStrip.c_str(), defectChip.c_str()).isFailure()) { + ATH_MSG_ERROR("Could not add dead strips to the summary"); + return StatusCode::FAILURE; + } + } + + if (!(defectStrip.empty())) { + if (m_writeToCool) { + if (m_pCalibWriteTool->createListStrip(moduleId, m_pSCTHelper, 10000, "DEAD", m_deadStripSignificance, defectStrip).isFailure()) { + ATH_MSG_ERROR("Could not create list"); + return StatusCode::FAILURE; } + } - if (!(defectChip.empty())) { - if (m_writeToCool) { - if ( m_pCalibWriteTool->createListChip(moduleId,m_pSCTHelper,10000,"DEAD",m_deadChipSignificance,defectChip).isFailure()) { - ATH_MSG_ERROR("Could not create list"); - return StatusCode::FAILURE; - } - } - - if (addToXML4DB(m_outDeadChips, waferId, "DEAD", m_deadChipSignificance, defectChip.c_str()).isFailure()) { - ATH_MSG_ERROR("Could not add dead chips to the summary"); - return StatusCode::FAILURE; - } + if (addToXML4DB(m_outDeadStrips, waferId, "DEAD", m_deadStripSignificance, defectStrip.c_str()).isFailure()) { + ATH_MSG_ERROR("Could not add dead strips to the summary"); + return StatusCode::FAILURE; + } - hasDeadChip=true; + hasDeadStrip=true; + } + if (!(defectChip.empty())) { + if (m_writeToCool) { + if (m_pCalibWriteTool->createListChip(moduleId, m_pSCTHelper, 10000, "DEAD", m_deadChipSignificance, defectChip).isFailure()) { + ATH_MSG_ERROR("Could not create list"); + return StatusCode::FAILURE; } - } - continue; - } - //retrieving info of chip status - chipItr=badChips->find(moduleId); - if (chipItr!=chipEnd) disabledChipFlag = (*chipItr).second; - for (unsigned int i(0); i<n_chipPerModule; i++) { - disabledChip[i] = ((disabledChipFlag & (1<<i)) != 0); - } + } - //retrieving #hits in each strip - for (int j=0; j<n_stripPerChip*n_chipPerSide; j++) { - const InDetDD::SiDetectorElement* pElement = elements->getDetectorElement(waferHash); - bool swap=(pElement->swapPhiReadoutDirection()) ? true : false; - int chipNum=0; - if (side==0) chipNum = swap ? 5-j/n_stripPerChip : j/n_stripPerChip; - else chipNum = swap ? 11-j/n_stripPerChip : 6+j/n_stripPerChip; - int stripNum = swap ? 767-j : j; - Identifier stripId = m_pSCTHelper->strip_id(waferId,j); - - numHitsInStrip[stripNum] = m_calibHitmapTool->getBinForHistogramIndex( j+1, waferHash.value()); - bool misMatch=false; - double n_hitsInDisable=numHitsInStrip[stripNum]; - if (((disabledChipFlag & (1<<chipNum))!=0) || badStripsExclusive.find(stripId)!=stripEnd) { - if (numHitsInStrip[stripNum]!=0) misMatch = true; - numHitsInStrip[stripNum] = -99; - } - if (misMatch) { - ATH_MSG_WARNING("hits in disabled Strip : " - <<"n_hits="<<n_hitsInDisable<<", " - <<"bec="<<m_pSCTHelper->barrel_ec(stripId)<<", " - <<"layer="<<m_pSCTHelper->layer_disk(stripId)<<", " - <<"phi="<<m_pSCTHelper->phi_module(stripId)<<", " - <<"eta="<<m_pSCTHelper->eta_module(stripId)<<", " - <<"side="<<m_pSCTHelper->side(stripId)<<", " - <<"strip="<<m_pSCTHelper->strip(stripId)); - } - - if (numHitsInStrip[stripNum]==0) { - n_noHitsStrip++; - ATH_MSG_DEBUG("nohit strip : barrel_ec="<<m_pSCTHelper->barrel_ec(stripId) - <<", layer="<<m_pSCTHelper->layer_disk(stripId)<<", phi="<<m_pSCTHelper->phi_module(stripId) - <<", eta="<<m_pSCTHelper->eta_module(stripId)<<", side="<<m_pSCTHelper->side(stripId) - <<", strip=offline"<<m_pSCTHelper->strip(stripId)); - } else if (numHitsInStrip[stripNum]==-99) { - n_disabledStrip++; - n_disabledInChip[stripNum/n_stripPerChip]++; - ATH_MSG_DEBUG("disabled strip : barrel_ec="<<m_pSCTHelper->barrel_ec(stripId) - <<", layer="<<m_pSCTHelper->layer_disk(stripId)<<", phi="<<m_pSCTHelper->phi_module(stripId) - <<", eta="<<m_pSCTHelper->eta_module(stripId)<<", side="<<m_pSCTHelper->side(stripId) - <<", strip=offline"<<m_pSCTHelper->strip(stripId)); - } else if (numHitsInStrip[stripNum]/m_numberOfEvents>m_noisyThr4DeadFinding) { - n_noisyStrip++; - } else { - totalHitsInWafer+=numHitsInStrip[stripNum]; - } - - }//end strip loop - - if (n_disabledStrip==768) { - if (side==1) { - //write to DB & .xml. - if (defectChip==" 0-5 6-11 ") { - n_deadModule++; - } else if (defectChip==" 0-5 " || defectChip==" 6-11 ") { - n_deadLink++; - } - if (!(defectStrip.empty()) || !(defectChip.empty())) { - if (addToSummaryStr(summaryList, waferId, "DEAD", defectStrip.c_str(), defectChip.c_str()).isFailure()) { - ATH_MSG_ERROR("Could not add dead strips to the summary"); - return StatusCode::FAILURE; - } + if (addToXML4DB(m_outDeadChips, waferId, "DEAD", m_deadChipSignificance, defectChip.c_str()).isFailure()) { + ATH_MSG_ERROR("Could not add dead chips to the summary"); + return StatusCode::FAILURE; + } + + hasDeadChip=true; + + } + } + continue; + } + //retrieving info of chip status + chipItr=badChips->find(moduleId); + if (chipItr!=chipEnd) disabledChipFlag = (*chipItr).second; + for (unsigned int i{0}; i<n_chipPerModule; i++) { + disabledChip[i] = ((disabledChipFlag & (1 << i)) != 0); + } + + //retrieving #hits in each strip + for (int j=0; j<n_stripPerChip*n_chipPerSide; j++) { + const InDetDD::SiDetectorElement* pElement{elements->getDetectorElement(waferHash)}; + bool swap{(pElement->swapPhiReadoutDirection()) ? true : false}; + int chipNum{0}; + if (side==0) chipNum = swap ? 5-j/n_stripPerChip : j/n_stripPerChip; + else chipNum = swap ? 11-j/n_stripPerChip : 6+j/n_stripPerChip; + int stripNum{swap ? 767-j : j}; + Identifier stripId{m_pSCTHelper->strip_id(waferId, j)}; + + numHitsInStrip[stripNum] = m_calibHitmapTool->getBinForHistogramIndex(j+1, waferHash.value()); + bool misMatch{false}; + double n_hitsInDisable{numHitsInStrip[stripNum]}; + if (((disabledChipFlag & (1 << chipNum))!=0) or badStripsExclusive.find(stripId)!=stripEnd) { + if (numHitsInStrip[stripNum]!=0) misMatch = true; + numHitsInStrip[stripNum] = -99; + } + if (misMatch) { + ATH_MSG_WARNING("hits in disabled Strip : " + << "n_hits=" << n_hitsInDisable << ", " + << "bec=" << m_pSCTHelper->barrel_ec(stripId) << ", " + << "layer=" << m_pSCTHelper->layer_disk(stripId) << ", " + << "phi=" << m_pSCTHelper->phi_module(stripId) << ", " + << "eta=" << m_pSCTHelper->eta_module(stripId) << ", " + << "side=" << m_pSCTHelper->side(stripId) << ", " + << "strip=" << m_pSCTHelper->strip(stripId)); + } + + if (numHitsInStrip[stripNum]==0) { + n_noHitsStrip++; + ATH_MSG_DEBUG("nohit strip : barrel_ec=" << m_pSCTHelper->barrel_ec(stripId) + << ", layer=" << m_pSCTHelper->layer_disk(stripId) << ", phi=" << m_pSCTHelper->phi_module(stripId) + << ", eta=" << m_pSCTHelper->eta_module(stripId) << ", side=" << m_pSCTHelper->side(stripId) + << ", strip=offline" << m_pSCTHelper->strip(stripId)); + } else if (numHitsInStrip[stripNum]==-99) { + n_disabledStrip++; + n_disabledInChip[stripNum/n_stripPerChip]++; + ATH_MSG_DEBUG("disabled strip : barrel_ec=" << m_pSCTHelper->barrel_ec(stripId) + << ", layer=" << m_pSCTHelper->layer_disk(stripId) << ", phi=" << m_pSCTHelper->phi_module(stripId) + << ", eta=" << m_pSCTHelper->eta_module(stripId) << ", side=" << m_pSCTHelper->side(stripId) + << ", strip=offline" << m_pSCTHelper->strip(stripId)); + } else if (numHitsInStrip[stripNum]/m_numberOfEvents>m_noisyThr4DeadFinding) { + n_noisyStrip++; + } else { + totalHitsInWafer+=numHitsInStrip[stripNum]; + } + + }//end strip loop + + if (n_disabledStrip==768) { + if (side==1) { + //write to DB & .xml. + if (defectChip==" 0-5 6-11 ") { + n_deadModule++; + } else if (defectChip==" 0-5 " or defectChip==" 6-11 ") { + n_deadLink++; + } + if (!(defectStrip.empty()) or !(defectChip.empty())) { + if (addToSummaryStr(summaryList, waferId, "DEAD", defectStrip.c_str(), defectChip.c_str()).isFailure()) { + ATH_MSG_ERROR("Could not add dead strips to the summary"); + return StatusCode::FAILURE; + } + } + + if (!(defectStrip.empty())) { + if (m_writeToCool) { + if (m_pCalibWriteTool->createListStrip(moduleId, m_pSCTHelper, 10000, "DEAD", m_deadStripSignificance, defectStrip).isFailure()) { + ATH_MSG_ERROR("Could not create strip list"); + return StatusCode::FAILURE; } + } - if (!(defectStrip.empty())) { - if (m_writeToCool) { - if (m_pCalibWriteTool->createListStrip(moduleId,m_pSCTHelper,10000,"DEAD",m_deadStripSignificance,defectStrip).isFailure()) { - ATH_MSG_ERROR("Could not create strip list"); - return StatusCode::FAILURE; - } - } - - if (addToXML4DB(m_outDeadStrips, waferId, "DEAD", m_deadStripSignificance, defectStrip.c_str()).isFailure()) { - ATH_MSG_ERROR("Could not add xml strip list"); - return StatusCode::FAILURE; - } - hasDeadStrip=true; - + if (addToXML4DB(m_outDeadStrips, waferId, "DEAD", m_deadStripSignificance, defectStrip.c_str()).isFailure()) { + ATH_MSG_ERROR("Could not add xml strip list"); + return StatusCode::FAILURE; + } + hasDeadStrip=true; + + } + if (!(defectChip.empty())) { + if (m_writeToCool) { + if (m_pCalibWriteTool->createListChip(moduleId, m_pSCTHelper, 10000, "DEAD", m_deadChipSignificance, defectChip).isFailure()) { + ATH_MSG_ERROR("Could not create strip list"); + return StatusCode::FAILURE; } - if (!(defectChip.empty())) { - if (m_writeToCool) { - if (m_pCalibWriteTool->createListChip(moduleId,m_pSCTHelper,10000,"DEAD",m_deadChipSignificance,defectChip).isFailure()) { - ATH_MSG_ERROR("Could not create strip list"); - return StatusCode::FAILURE; - } - } - - if (addToXML4DB(m_outDeadChips, waferId, "DEAD", m_deadChipSignificance, defectChip.c_str()).isFailure()) { - ATH_MSG_ERROR("Could not add xml chip list"); - return StatusCode::FAILURE; - } - - hasDeadChip=true; + } + if (addToXML4DB(m_outDeadChips, waferId, "DEAD", m_deadChipSignificance, defectChip.c_str()).isFailure()) { + ATH_MSG_ERROR("Could not add xml chip list"); + return StatusCode::FAILURE; + } + + hasDeadChip=true; + + } + } + continue; + + } + + isNoHitLink=false; + if (n_noHitsStrip+n_disabledStrip==768) { + n_checkedChip+=n_chipPerSide; + isNoHitLink=true; + + double meanOccu{0.}; + if (m_pSCTHelper->barrel_ec(waferId)==BARREL) meanOccu=meanOccupancy_Barrel[m_pSCTHelper->layer_disk(waferId)]; + else meanOccu=meanOccupancy_EC[m_pSCTHelper->layer_disk(waferId)][m_pSCTHelper->eta_module(waferId)]; + double sum_binomial{ROOT::Math::binomial_cdf(0, meanOccu, m_numberOfEvents*n_stripPerChip*n_chipPerSide)}; + + if (sum_binomial<deadChipDefinition) { + ATH_MSG_INFO("DEADLINK : " << moduleId << ", side=" << side); + n_deadChip+=n_chipPerSide; + + //For DeadStrip + if (m_doDeadStrip) { + if (side==0) beginDead=0, endDead=767; + else beginDead=768, endDead=1535; + defectStrip = m_pCalibWriteTool->addDefect(defectStrip, beginDead, endDead); + } + + //For DeadChip + if (m_doDeadChip) { + if (side==0) beginDead=0, endDead=5; + else beginDead=6, endDead=11; + defectChip = m_pCalibWriteTool->addDefect(defectChip, beginDead, endDead); + } + + if (side==1) { + //write to DB & .xml. + if (defectChip==" 0-5 6-11 ") { + n_deadModule++; + } else if (defectChip==" 0-5 " or defectChip==" 6-11 ") { + n_deadLink++; + } + + if (!(defectStrip.empty()) or !(defectChip.empty())) { + if (addToSummaryStr(summaryList, waferId, "DEAD", defectStrip.c_str(), defectChip.c_str()).isFailure()) { + ATH_MSG_ERROR("Could not add dead strips to the summary"); + return StatusCode::FAILURE; } - } - continue; - - } - - isNoHitLink=false; - if (n_noHitsStrip+n_disabledStrip==768) { - n_checkedChip+=n_chipPerSide; - isNoHitLink=true; - - double meanOccu=0; - if (m_pSCTHelper->barrel_ec(waferId)==BARREL) meanOccu=meanOccupancy_Barrel[m_pSCTHelper->layer_disk(waferId)]; - else meanOccu=meanOccupancy_EC[m_pSCTHelper->layer_disk(waferId)][m_pSCTHelper->eta_module(waferId)]; - double sum_binomial = ROOT::Math::binomial_cdf(0, meanOccu, m_numberOfEvents*n_stripPerChip*n_chipPerSide); - - if (sum_binomial<deadChipDefinition) { - ATH_MSG_INFO("DEADLINK : "<<moduleId<<", side="<<side); - n_deadChip+=n_chipPerSide; - - //For DeadStrip - if (m_doDeadStrip) { - if (side==0) beginDead=0, endDead=767; - else beginDead=768, endDead=1535; - defectStrip = m_pCalibWriteTool->addDefect(defectStrip,beginDead,endDead); + } + if (!(defectStrip.empty())) { + if (m_writeToCool) { + if (m_pCalibWriteTool->createListStrip(moduleId, m_pSCTHelper, 10000, "DEAD", m_deadStripSignificance, defectStrip).isFailure()) { + ATH_MSG_ERROR("Could not create strip list"); + return StatusCode::FAILURE; + } } - //For DeadChip - if (m_doDeadChip) { - if (side==0) beginDead=0, endDead=5; - else beginDead=6, endDead=11; - defectChip = m_pCalibWriteTool->addDefect(defectChip,beginDead,endDead); + if (addToXML4DB(m_outDeadStrips, waferId, "DEAD", m_deadStripSignificance, defectStrip.c_str()).isFailure()) { + ATH_MSG_ERROR("Could not add xml strip list"); + return StatusCode::FAILURE; } - if (side==1) { - //write to DB & .xml. - if (defectChip==" 0-5 6-11 ") { - n_deadModule++; - } else if (defectChip==" 0-5 " || defectChip==" 6-11 ") { - n_deadLink++; - } - - if (!(defectStrip.empty()) || !(defectChip.empty())) { - if (addToSummaryStr(summaryList, waferId, "DEAD", defectStrip.c_str(), defectChip.c_str()).isFailure()) { - ATH_MSG_ERROR("Could not add dead strips to the summary"); - return StatusCode::FAILURE; - } - } - if (!(defectStrip.empty())) { - if (m_writeToCool) { - if (m_pCalibWriteTool->createListStrip(moduleId,m_pSCTHelper,10000,"DEAD",m_deadStripSignificance,defectStrip).isFailure()) { - ATH_MSG_ERROR("Could not create strip list"); - return StatusCode::FAILURE; - } - } - - if (addToXML4DB(m_outDeadStrips, waferId, "DEAD", m_deadStripSignificance, defectStrip.c_str()).isFailure()) { - ATH_MSG_ERROR("Could not add xml strip list"); - return StatusCode::FAILURE; - } + hasDeadStrip=true; - hasDeadStrip=true; + } - } - - if (!(defectChip.empty())) { - if (m_writeToCool) { - if ( m_pCalibWriteTool->createListChip(moduleId,m_pSCTHelper,10000,"DEAD",m_deadChipSignificance,defectChip).isFailure()) { - ATH_MSG_ERROR("Could not create chip list"); - return StatusCode::FAILURE; - } - } - - if (addToXML4DB(m_outDeadChips, waferId, "DEAD", m_deadChipSignificance, defectChip.c_str()).isFailure()) { - ATH_MSG_ERROR("Could not add xml chip list"); - return StatusCode::FAILURE; - } - - hasDeadChip=true; - - } - } - continue; - } - }//end DeadLink - - if (n_noHitsStrip>0) { - int n_deadStripInWafer=0; - int n_deadChipInWafer=0; - - double n_effectiveEvents=0; - if (busyStream) n_effectiveEvents = m_numberOfEvents*(n_stripPerChip*n_chipPerSide-n_disabledStrip-n_noisyStrip-n_noHitsStrip); - else n_effectiveEvents = m_numberOfEvents*(n_stripPerChip*n_chipPerSide-n_disabledStrip-n_noisyStrip); - - //First, check DeadChip - double meanOccupancy = totalHitsInWafer/n_effectiveEvents; - for (int j=0; j<n_stripPerChip*n_chipPerSide; j++) { - if (numHitsInStrip[j]>0) numHitsInChip[j/n_stripPerChip] += numHitsInStrip[j]; - } - - for (int j=0; j<n_chipPerSide; j++) { - isDead=false; - int chipNum = side==0 ? j : j+6; - if (numHitsInChip[j]==0 && !disabledChip[chipNum]) { - if (!isNoHitLink) n_checkedChip++; - double sum_binomial = ROOT::Math::binomial_cdf(0, meanOccupancy, m_numberOfEvents*(n_stripPerChip-n_disabledInChip[j])); - if (sum_binomial<deadChipDefinition) { - ATH_MSG_INFO("DEADCHIP : "<<moduleId<<", side="<<side - <<", chip(online)="<<(side==0 ? j : j+n_chipPerSide)); - isDead=true; - n_deadChip++; - n_deadChipInWafer++; - endDead = side==0 ? j : j+n_chipPerSide; - if (!beforeIsDead) beginDead = side==0 ? j : j+n_chipPerSide; - } + if (!(defectChip.empty())) { + if (m_writeToCool) { + if (m_pCalibWriteTool->createListChip(moduleId, m_pSCTHelper, 10000, "DEAD", m_deadChipSignificance, defectChip).isFailure()) { + ATH_MSG_ERROR("Could not create chip list"); + return StatusCode::FAILURE; + } } - if (m_doDeadChip) { - if ((beforeIsDead && !isDead) || (j==5 && isDead)) defectChip = m_pCalibWriteTool->addDefect(defectChip,beginDead,endDead); + if (addToXML4DB(m_outDeadChips, waferId, "DEAD", m_deadChipSignificance, defectChip.c_str()).isFailure()) { + ATH_MSG_ERROR("Could not add xml chip list"); + return StatusCode::FAILURE; } - beforeIsDead = isDead; - }//end chip loop - - //Second, check DeadStrip - if (m_doDeadStrip) { - double meanOccExceptDeadChip=totalHitsInWafer/(n_effectiveEvents-n_stripPerChip*n_deadChipInWafer); - double numHitsInStripOnlineOrder[n_stripPerChip*n_chipPerSide]= {0}; - for (int j=0; j<n_stripPerChip*n_chipPerSide; j++) { - numHitsInStripOnlineOrder[j] = side==0 ? numHitsInStrip[j] : numHitsInStrip[n_stripPerChip*n_chipPerSide-j]; - isDead=false; - if (numHitsInStripOnlineOrder[j]==0) { - double sum_binomial = ROOT::Math::binomial_cdf(0, meanOccExceptDeadChip, m_numberOfEvents); - if (sum_binomial<deadStripDefinition) { - ATH_MSG_INFO("DEADSTRIP : "<<moduleId<<", side="<<side<<", strip(offline)="<<j); - isDead=true; - n_deadStrip++; - n_deadStripInWafer++; - endDead = side==0 ? j : j+n_stripPerChip*n_chipPerSide; - if (!beforeIsDead) beginDead = side==0 ? j : j+n_stripPerChip*n_chipPerSide; - } - } - if (m_doDeadStrip) { - if ((beforeIsDead && !isDead) || (j==5 && isDead)) defectStrip = m_pCalibWriteTool->addDefect(defectStrip,beginDead,endDead); - } - beforeIsDead = isDead; + hasDeadChip=true; + + } + } + continue; + } + }//end DeadLink + + if (n_noHitsStrip>0) { + int n_deadStripInWafer{0}; + int n_deadChipInWafer{0}; + + double n_effectiveEvents{0.}; + if (busyStream) n_effectiveEvents = m_numberOfEvents*(n_stripPerChip*n_chipPerSide-n_disabledStrip-n_noisyStrip-n_noHitsStrip); + else n_effectiveEvents = m_numberOfEvents*(n_stripPerChip*n_chipPerSide-n_disabledStrip-n_noisyStrip); + + //First, check DeadChip + double meanOccupancy{totalHitsInWafer/n_effectiveEvents}; + for (int j{0}; j<n_stripPerChip*n_chipPerSide; j++) { + if (numHitsInStrip[j]>0) numHitsInChip[j/n_stripPerChip] += numHitsInStrip[j]; + } + + for (int j{0}; j<n_chipPerSide; j++) { + isDead=false; + int chipNum{side==0 ? j : j+6}; + if (numHitsInChip[j]==0 and !disabledChip[chipNum]) { + if (!isNoHitLink) n_checkedChip++; + double sum_binomial{ROOT::Math::binomial_cdf(0, meanOccupancy, m_numberOfEvents*(n_stripPerChip-n_disabledInChip[j]))}; + if (sum_binomial<deadChipDefinition) { + ATH_MSG_INFO("DEADCHIP : " << moduleId << ", side=" << side + << ", chip(online)=" << (side==0 ? j : j+n_chipPerSide)); + isDead=true; + n_deadChip++; + n_deadChipInWafer++; + endDead = side==0 ? j : j+n_chipPerSide; + if (!beforeIsDead) beginDead = side==0 ? j : j+n_chipPerSide; + } + } + + if (m_doDeadChip) { + if ((beforeIsDead and !isDead) or (j==5 and isDead)) defectChip = m_pCalibWriteTool->addDefect(defectChip, beginDead, endDead); + } + beforeIsDead = isDead; + }//end chip loop + + //Second, check DeadStrip + if (m_doDeadStrip) { + double meanOccExceptDeadChip{totalHitsInWafer/(n_effectiveEvents-n_stripPerChip*n_deadChipInWafer)}; + double numHitsInStripOnlineOrder[n_stripPerChip*n_chipPerSide] = {0}; + for (int j{0}; j<n_stripPerChip*n_chipPerSide; j++) { + numHitsInStripOnlineOrder[j] = side==0 ? numHitsInStrip[j] : numHitsInStrip[n_stripPerChip*n_chipPerSide-j]; + isDead=false; + if (numHitsInStripOnlineOrder[j]==0) { + double sum_binomial{ROOT::Math::binomial_cdf(0, meanOccExceptDeadChip, m_numberOfEvents)}; + if (sum_binomial<deadStripDefinition) { + ATH_MSG_INFO("DEADSTRIP : " << moduleId << ", side=" << side << ", strip(offline)=" << j); + isDead=true; + n_deadStrip++; + n_deadStripInWafer++; + endDead = side==0 ? j : j+n_stripPerChip*n_chipPerSide; + if (!beforeIsDead) beginDead = side==0 ? j : j+n_stripPerChip*n_chipPerSide; } - } + } + + if (m_doDeadStrip) { + if ((beforeIsDead and !isDead) or (j==5 and isDead)) defectStrip = m_pCalibWriteTool->addDefect(defectStrip, beginDead, endDead); + } + beforeIsDead = isDead; + } } + } - //go to next wafer itr - }//Wafer Loop end + //go to next wafer itr + }//Wafer Loop end //Close Files - if (m_doDeadStrip) { - ATH_MSG_INFO("total #DeadStrip : "<<n_deadStrip); - if (closeXML4DB(m_outDeadStrips).isFailure()) { - ATH_MSG_ERROR("Problem closing "<<m_deadStripsFile); - return StatusCode::FAILURE; - } - } - if (m_doDeadChip) { - ATH_MSG_INFO("total #DeadChip : "<<n_deadChip<<", #noHitChip : "<<n_checkedChip); - if (closeXML4DB(m_outDeadChips).isFailure()) { - ATH_MSG_ERROR("Problem closing "<<m_deadChipsFile); - return StatusCode::FAILURE; - } - } - - //Making Summary File - if (openXML4DeadSummary(m_outDeadSummary, "DEAD", n_deadModule, n_deadLink, n_deadChip, n_deadStrip).isFailure()) { - ATH_MSG_ERROR("Problem opening "<<m_deadSummaryFile); + if (m_doDeadStrip) { + ATH_MSG_INFO("total #DeadStrip : " << n_deadStrip); + if (closeXML4DB(m_outDeadStrips).isFailure()) { + ATH_MSG_ERROR("Problem closing " << m_deadStripsFile); return StatusCode::FAILURE; - } - if (wrapUpXML4Summary(m_outDeadSummary, "DEAD", summaryList).isFailure()) { - ATH_MSG_ERROR("Problem closing "<<m_deadSummaryFile); + } + } + if (m_doDeadChip) { + ATH_MSG_INFO("total #DeadChip : " << n_deadChip << ", #noHitChip : " << n_checkedChip); + if (closeXML4DB(m_outDeadChips).isFailure()) { + ATH_MSG_ERROR("Problem closing " << m_deadChipsFile); return StatusCode::FAILURE; - } - - if ( m_writeToCool ) { - if (m_doDeadStrip && hasDeadStrip) { - if ( m_pCalibWriteTool->wrapUpDeadStrips().isFailure() ) { - ATH_MSG_ERROR("Could not get DeadStrips Info"); - return StatusCode::FAILURE; - } - } - if (m_doDeadChip && hasDeadChip) { - if ( m_pCalibWriteTool->wrapUpDeadChips().isFailure() ) { - ATH_MSG_ERROR("Could not get DeadChips Info"); - return StatusCode::FAILURE; - } - } - } - - ATH_MSG_INFO("END HERE"); - return StatusCode::SUCCESS; + } + } + + //Making Summary File + if (openXML4DeadSummary(m_outDeadSummary, "DEAD", n_deadModule, n_deadLink, n_deadChip, n_deadStrip).isFailure()) { + ATH_MSG_ERROR("Problem opening " << m_deadSummaryFile); + return StatusCode::FAILURE; + } + if (wrapUpXML4Summary(m_outDeadSummary, "DEAD", summaryList).isFailure()) { + ATH_MSG_ERROR("Problem closing " << m_deadSummaryFile); + return StatusCode::FAILURE; + } + + if (m_writeToCool) { + if (m_doDeadStrip and hasDeadStrip) { + if (m_pCalibWriteTool->wrapUpDeadStrips().isFailure()) { + ATH_MSG_ERROR("Could not get DeadStrips Info"); + return StatusCode::FAILURE; + } + } + if (m_doDeadChip and hasDeadChip) { + if (m_pCalibWriteTool->wrapUpDeadChips().isFailure()) { + ATH_MSG_ERROR("Could not get DeadChips Info"); + return StatusCode::FAILURE; + } + } + } + + ATH_MSG_INFO("END HERE"); + return StatusCode::SUCCESS; } @@ -1170,214 +1157,213 @@ StatusCode SCTCalib::getDeadStrip() { StatusCode SCTCalib::getNoiseOccupancy() { - ATH_MSG_INFO("----- in getNoiseOccupancy() -----"); - - //--- Initialization - int n_phiBinsBarrel[ n_barrels ] = { n_phiBinsB0, n_phiBinsB1, n_phiBinsB2, n_phiBinsB3 }; - int n_phiBinsEndcap[ n_disks ][ n_etaBinsEC ] = { { n_phiBinsECOuter, n_phiBinsECMiddle, 0 }, - { n_phiBinsECOuter, n_phiBinsECMiddle, n_phiBinsECShort }, - { n_phiBinsECOuter, n_phiBinsECMiddle, n_phiBinsECShort }, - { n_phiBinsECOuter, n_phiBinsECMiddle, n_phiBinsECShort }, - { n_phiBinsECOuter, n_phiBinsECMiddle, n_phiBinsECShort }, - { n_phiBinsECOuter, n_phiBinsECMiddle, n_phiBinsECShort }, - { n_phiBinsECOuter, n_phiBinsECMiddle, 0 }, - { n_phiBinsECOuter, n_phiBinsECMiddle, 0 }, - { n_phiBinsECOuter, 0, 0 } - }; - - double meanNO_Barrel[ n_barrels ] = { 0 }; - double meanNO_ECA[ n_disks ][ n_etaBinsEC ] = { {0}, {0} }; - double meanNO_ECC[ n_disks ][ n_etaBinsEC ] = { {0}, {0} }; - - //--- RunNumber - std::ostringstream runnum; - runnum << m_runNumber.value(); - - //--- Directory in HIST - std::string stem; - - //--- EndcapC - stem = "/run_" + runnum.str() + "/SCT/SCTEC/Noise/"; - m_pnoiseoccupancymapHistoVectorECm.clear(); - for ( int iDisk = 0; iDisk < n_disks ; ++iDisk ) { - for ( int iSide = 0; iSide < 2; ++iSide ) { - ostringstream streamHist; - streamHist << "noiseoccupancymap"; - if ( m_noiseOccupancyTriggerAware ) streamHist << "trigger"; - streamHist << "ECm_" << iDisk << "_" << iSide; - std::string histName = stem + streamHist.str(); - TProfile2D* hist_tmp = dynamic_cast<TProfile2D*>(m_inputHist->Get( histName.c_str() )); - m_pnoiseoccupancymapHistoVectorECm.push_back( hist_tmp ); - } - } - //--- Barrel - stem = "/run_" + runnum.str() + "/SCT/SCTB/Noise/"; - m_pnoiseoccupancymapHistoVector.clear(); - for ( int iLayer = 0; iLayer < n_barrels ; ++iLayer ) { - for ( int iSide = 0; iSide < 2; ++iSide ) { - ostringstream streamHist; - streamHist << "noiseoccupancymap"; - if ( m_noiseOccupancyTriggerAware ) streamHist << "trigger"; - streamHist << "_" << iLayer << "_" << iSide; - std::string histName = stem + streamHist.str(); - TProfile2D* hist_tmp = dynamic_cast<TProfile2D*>(m_inputHist->Get( histName.c_str() )); - m_pnoiseoccupancymapHistoVector.push_back( hist_tmp ); - } - } - //--- EndcapA - stem = "/run_" + runnum.str() + "/SCT/SCTEA/Noise/"; - m_pnoiseoccupancymapHistoVectorECp.clear(); - for ( int iDisk = 0; iDisk < n_disks ; ++iDisk ) { - for ( int iSide = 0; iSide < 2; ++iSide ) { - ostringstream streamHist; - streamHist << "noiseoccupancymap"; - if ( m_noiseOccupancyTriggerAware ) streamHist << "trigger"; - streamHist << "ECp_" << iDisk << "_" << iSide; - std::string histName = stem + streamHist.str(); - TProfile2D* hist_tmp = dynamic_cast<TProfile2D*>(m_inputHist->Get( histName.c_str() )); - m_pnoiseoccupancymapHistoVectorECp.push_back( hist_tmp ); - } - } - - //--- XML file - const char* outputNoiseOccupancyFileName = m_noiseOccupancyFile.value().c_str(); - ofstream outFile( outputNoiseOccupancyFileName, std::ios::out ); - if ( !outFile.good() ) { - ATH_MSG_ERROR("Unable to open NoiseOccupancyFile : " << outputNoiseOccupancyFileName); - return StatusCode::FAILURE; - } - - //--- Header for XML outputs - ostringstream osHeader; - osHeader << "<channels server=\"ATLAS_COOLPROD\" schema=\"ATLAS_COOLOFL_SCT\" dbname=\"MONP200\" folder=\"SCT/Derived/NoiseOccupancy\" " - << "since=\"" << m_iovStart.re_time() << "\" " - << "until=\"" << m_iovStop.re_time() << "\" " - << "tag=\"" << m_tagID4NoiseOccupancy << "\" " - << "version=\"" << "multi\">"<< endl; - outFile << osHeader.str(); - - //--- EndcapC - for ( int iDisk = 0; iDisk < n_disks ; ++iDisk ) { - for ( int iSide = 0; iSide < 2; ++iSide ) { - for ( int iEta = 0; iEta < n_etaBinsEC; ++iEta ) { - for ( int iPhi = 0; iPhi < n_phiBinsEndcap[iDisk][iEta]; ++iPhi ) { - Identifier waferId = m_pSCTHelper->wafer_id( ENDCAP_C, iDisk, iPhi, iEta, iSide ); - float occupancy = m_pnoiseoccupancymapHistoVectorECm[ 2*iDisk + iSide ]->GetBinContent( iEta+1, iPhi+1 ); - occupancy /= float( ntimeBins ); - occupancy /= 1E5; - //--- For calculating average Noise Occupancy - meanNO_ECC[iDisk][iEta]+=occupancy; - //outFile << outFile << xmlChannelNoiseOccDataString(waferId, occupancy)<<endl; - IdentifierHash waferHash = m_pSCTHelper->wafer_hash( waferId ); - SCT_SerialNumber sn = m_CablingTool->getSerialNumberFromHash( waferHash ); - outFile << xmlChannelNoiseOccDataString(waferId, occupancy, sn)<<endl; - //--- DB output - if ( m_writeToCool ) { - if ( m_pCalibWriteTool->createListNO( waferId, m_pSCTHelper, 10000, occupancy ).isFailure() ) { - ATH_MSG_ERROR("Unable to run createListNO"); - return StatusCode::FAILURE; - } - } + ATH_MSG_INFO("----- in getNoiseOccupancy() -----"); + + //--- Initialization + int n_phiBinsBarrel[n_barrels] = {n_phiBinsB0, n_phiBinsB1, n_phiBinsB2, n_phiBinsB3}; + int n_phiBinsEndcap[n_disks][n_etaBinsEC] = {{n_phiBinsECOuter, n_phiBinsECMiddle, 0}, + {n_phiBinsECOuter, n_phiBinsECMiddle, n_phiBinsECShort}, + {n_phiBinsECOuter, n_phiBinsECMiddle, n_phiBinsECShort}, + {n_phiBinsECOuter, n_phiBinsECMiddle, n_phiBinsECShort}, + {n_phiBinsECOuter, n_phiBinsECMiddle, n_phiBinsECShort}, + {n_phiBinsECOuter, n_phiBinsECMiddle, n_phiBinsECShort}, + {n_phiBinsECOuter, n_phiBinsECMiddle, 0}, + {n_phiBinsECOuter, n_phiBinsECMiddle, 0}, + {n_phiBinsECOuter, 0, 0} + }; + + double meanNO_Barrel[n_barrels] = {0}; + double meanNO_ECA[n_disks][n_etaBinsEC] = {{0}, {0}}; + double meanNO_ECC[n_disks][n_etaBinsEC] = {{0}, {0}}; + + //--- RunNumber + std::ostringstream runnum; + runnum << m_runNumber.value(); + + //--- Directory in HIST + std::string stem; + + //--- EndcapC + stem = "/run_" + runnum.str() + "/SCT/SCTEC/Noise/"; + m_pnoiseoccupancymapHistoVectorECm.clear(); + for (int iDisk{0}; iDisk < n_disks ; ++iDisk) { + for (int iSide{0}; iSide < 2; ++iSide) { + ostringstream streamHist; + streamHist << "noiseoccupancymap"; + if (m_noiseOccupancyTriggerAware) streamHist << "trigger"; + streamHist << "ECm_" << iDisk << "_" << iSide; + std::string histName{stem + streamHist.str()}; + TProfile2D* hist_tmp{dynamic_cast<TProfile2D*>(m_inputHist->Get(histName.c_str()))}; + m_pnoiseoccupancymapHistoVectorECm.push_back(hist_tmp); + } + } + //--- Barrel + stem = "/run_" + runnum.str() + "/SCT/SCTB/Noise/"; + m_pnoiseoccupancymapHistoVector.clear(); + for (int iLayer{0}; iLayer < n_barrels ; ++iLayer) { + for (int iSide{0}; iSide < 2; ++iSide) { + ostringstream streamHist; + streamHist << "noiseoccupancymap"; + if (m_noiseOccupancyTriggerAware) streamHist << "trigger"; + streamHist << "_" << iLayer << "_" << iSide; + std::string histName{stem + streamHist.str()}; + TProfile2D* hist_tmp{dynamic_cast<TProfile2D*>(m_inputHist->Get(histName.c_str()))}; + m_pnoiseoccupancymapHistoVector.push_back(hist_tmp); + } + } + //--- EndcapA + stem = "/run_" + runnum.str() + "/SCT/SCTEA/Noise/"; + m_pnoiseoccupancymapHistoVectorECp.clear(); + for (int iDisk{0}; iDisk < n_disks ; ++iDisk) { + for (int iSide{0}; iSide < 2; ++iSide) { + ostringstream streamHist; + streamHist << "noiseoccupancymap"; + if (m_noiseOccupancyTriggerAware) streamHist << "trigger"; + streamHist << "ECp_" << iDisk << "_" << iSide; + std::string histName{stem + streamHist.str()}; + TProfile2D* hist_tmp{dynamic_cast<TProfile2D*>(m_inputHist->Get(histName.c_str()))}; + m_pnoiseoccupancymapHistoVectorECp.push_back(hist_tmp); + } + } + + //--- XML file + const char* outputNoiseOccupancyFileName{m_noiseOccupancyFile.value().c_str()}; + ofstream outFile{outputNoiseOccupancyFileName, std::ios::out}; + if (!outFile.good()) { + ATH_MSG_ERROR("Unable to open NoiseOccupancyFile : " << outputNoiseOccupancyFileName); + return StatusCode::FAILURE; + } + + //--- Header for XML outputs + ostringstream osHeader; + osHeader << "<channels server=\"ATLAS_COOLPROD\" schema=\"ATLAS_COOLOFL_SCT\" dbname=\"MONP200\" folder=\"SCT/Derived/NoiseOccupancy\" " + << "since=\"" << m_iovStart.re_time() << "\" " + << "until=\"" << m_iovStop.re_time() << "\" " + << "tag=\"" << m_tagID4NoiseOccupancy << "\" " + << "version=\"" << "multi\">" << endl; + outFile << osHeader.str(); + + //--- EndcapC + for (int iDisk{0}; iDisk < n_disks ; ++iDisk) { + for (int iSide{0}; iSide < 2; ++iSide) { + for (int iEta{0}; iEta < n_etaBinsEC; ++iEta) { + for (int iPhi{0}; iPhi < n_phiBinsEndcap[iDisk][iEta]; ++iPhi) { + Identifier waferId = m_pSCTHelper->wafer_id(ENDCAP_C, iDisk, iPhi, iEta, iSide); + float occupancy{static_cast<float>(m_pnoiseoccupancymapHistoVectorECm[2*iDisk + iSide]->GetBinContent(iEta+1, iPhi+1))}; + occupancy /= static_cast<float>(ntimeBins); + occupancy /= 1E5; + //--- For calculating average Noise Occupancy + meanNO_ECC[iDisk][iEta]+=occupancy; + IdentifierHash waferHash{m_pSCTHelper->wafer_hash(waferId)}; + SCT_SerialNumber sn{m_CablingTool->getSerialNumberFromHash(waferHash)}; + outFile << xmlChannelNoiseOccDataString(waferId, occupancy, sn) << endl; + //--- DB output + if (m_writeToCool) { + if (m_pCalibWriteTool->createListNO(waferId, m_pSCTHelper, 10000, occupancy).isFailure()) { + ATH_MSG_ERROR("Unable to run createListNO"); + return StatusCode::FAILURE; } - } - } - } - //--- Barrel - for ( int iLayer = 0; iLayer < n_barrels; ++iLayer ) { - for ( int iSide = 0; iSide < 2; ++iSide ) { - for ( int iEta = 0; iEta < n_etaBins; ++iEta ) { - if ( iEta-6 == 0 ) continue; - for ( int iPhi = 0; iPhi < n_phiBinsBarrel[iLayer]; ++iPhi ) { - Identifier waferId = m_pSCTHelper->wafer_id( BARREL, iLayer, iPhi, iEta-6, iSide ); - float occupancy = m_pnoiseoccupancymapHistoVector[ 2*iLayer + iSide ]->GetBinContent( iEta+1, iPhi+1 ); - occupancy /= float( ntimeBins ); - occupancy /= 1E5; - //--- For calculating average Noise Occupancy - meanNO_Barrel[iLayer]+=occupancy; - IdentifierHash waferHash = m_pSCTHelper->wafer_hash( waferId ); - SCT_SerialNumber sn = m_CablingTool->getSerialNumberFromHash( waferHash ); - outFile << xmlChannelNoiseOccDataString(waferId, occupancy, sn)<<endl; - //--- DB output - if ( m_writeToCool ) { - if ( m_pCalibWriteTool->createListNO( waferId, m_pSCTHelper, 10000, occupancy ).isFailure() ) { - ATH_MSG_ERROR("Unable to run createListNO"); - return StatusCode::FAILURE; - } - } + } + } + } + } + } + //--- Barrel + for (int iLayer{0}; iLayer < n_barrels; ++iLayer) { + for (int iSide{0}; iSide < 2; ++iSide) { + for (int iEta{0}; iEta < n_etaBins; ++iEta) { + if (iEta-6 == 0) continue; + for (int iPhi{0}; iPhi < n_phiBinsBarrel[iLayer]; ++iPhi) { + Identifier waferId{m_pSCTHelper->wafer_id(BARREL, iLayer, iPhi, iEta-6, iSide)}; + float occupancy{static_cast<float>(m_pnoiseoccupancymapHistoVector[2*iLayer + iSide]->GetBinContent(iEta+1, iPhi+1))}; + occupancy /= static_cast<float>(ntimeBins); + occupancy /= 1E5; + //--- For calculating average Noise Occupancy + meanNO_Barrel[iLayer]+=occupancy; + IdentifierHash waferHash{m_pSCTHelper->wafer_hash(waferId)}; + SCT_SerialNumber sn{m_CablingTool->getSerialNumberFromHash(waferHash)}; + outFile << xmlChannelNoiseOccDataString(waferId, occupancy, sn) << endl; + //--- DB output + if (m_writeToCool) { + if (m_pCalibWriteTool->createListNO(waferId, m_pSCTHelper, 10000, occupancy).isFailure()) { + ATH_MSG_ERROR("Unable to run createListNO"); + return StatusCode::FAILURE; } - } - } - } - //--- EndcapA - for ( int iDisk = 0; iDisk < n_disks ; ++iDisk ) { - for ( int iSide = 0; iSide < 2; ++iSide ) { - for ( int iEta = 0; iEta < n_etaBinsEC; ++iEta ) { - for ( int iPhi = 0; iPhi < n_phiBinsEndcap[iDisk][iEta]; ++iPhi ) { - Identifier waferId = m_pSCTHelper->wafer_id( ENDCAP_A, iDisk, iPhi, iEta, iSide ); - float occupancy = m_pnoiseoccupancymapHistoVectorECp[ 2*iDisk + iSide ]->GetBinContent( iEta+1, iPhi+1 ); - occupancy /= float( ntimeBins ); - occupancy /= 1E5; - //--- For calculating average Noise Occupancy - meanNO_ECA[iDisk][iEta]+=occupancy; - IdentifierHash waferHash = m_pSCTHelper->wafer_hash( waferId ); - SCT_SerialNumber sn = m_CablingTool->getSerialNumberFromHash( waferHash ); - outFile << xmlChannelNoiseOccDataString(waferId, occupancy, sn)<<endl; - //--- DB output - if ( m_writeToCool ) { - if ( m_pCalibWriteTool->createListNO( waferId, m_pSCTHelper, 10000, occupancy ).isFailure() ) { - ATH_MSG_ERROR("Unable to run createListNO"); - return StatusCode::FAILURE; - } - } + } + } + } + } + } + //--- EndcapA + for (int iDisk{0}; iDisk < n_disks ; ++iDisk) { + for (int iSide{0}; iSide < 2; ++iSide) { + for (int iEta{0}; iEta < n_etaBinsEC; ++iEta) { + for (int iPhi{0}; iPhi < n_phiBinsEndcap[iDisk][iEta]; ++iPhi) { + Identifier waferId{m_pSCTHelper->wafer_id(ENDCAP_A, iDisk, iPhi, iEta, iSide)}; + float occupancy{static_cast<float>(m_pnoiseoccupancymapHistoVectorECp[2*iDisk + iSide]->GetBinContent(iEta+1, iPhi+1))}; + occupancy /= static_cast<float>(ntimeBins); + occupancy /= 1E5; + //--- For calculating average Noise Occupancy + meanNO_ECA[iDisk][iEta]+=occupancy; + IdentifierHash waferHash{m_pSCTHelper->wafer_hash(waferId)}; + SCT_SerialNumber sn{m_CablingTool->getSerialNumberFromHash(waferHash)}; + outFile << xmlChannelNoiseOccDataString(waferId, occupancy, sn) << endl; + //--- DB output + if (m_writeToCool) { + if (m_pCalibWriteTool->createListNO(waferId, m_pSCTHelper, 10000, occupancy).isFailure()) { + ATH_MSG_ERROR("Unable to run createListNO"); + return StatusCode::FAILURE; } - } - } - } - - //--- Tail of XML outputs - outFile << "</channels>" << endl; - - //--- Summary XML output - ostringstream summaryList; - for ( int i = 0; i < n_disks; ++i ) { - for (int j = 0; j < n_etaBinsEC; ++j ) { - if ( n_phiBinsEndcap[i][j] != 0 ) { - meanNO_ECC[i][j] /= (n_phiBinsEndcap[i][j]*2); - summaryList<<xmlPartData(ENDCAP_C, i, j, "meanNO",meanNO_ECC[i][j]); - } - } - } - for ( int i = 0; i < n_barrels; ++i ) { - meanNO_Barrel[i] /= (n_phiBinsBarrel[i]*n_etaInBarrel*2); - summaryList<<xmlPartData(BARREL, i, 0, "meanNO",meanNO_Barrel[i] ); - } - for ( int i = 0; i < n_disks; ++i ) { - for ( int j = 0; j < n_etaBinsEC; ++j ) { - if ( n_phiBinsEndcap[i][j] != 0 ) { - meanNO_ECA[i][j] /= (n_phiBinsEndcap[i][j]*2); - summaryList<<xmlPartData(ENDCAP_A, i, j, "meanNO",meanNO_ECA[i][j]); - } - } - } - - if ( openXML4MonSummary( m_outNOSummary, "NoiseOccupancy" ).isFailure() ) { - ATH_MSG_ERROR("Problem in opening NoiseOccupancy file"); - return StatusCode::FAILURE; - } - if ( wrapUpXML4Summary( m_outNOSummary, "NoiseOccupancy", summaryList ).isFailure() ) { - ATH_MSG_ERROR("Problem in closing NoiseOccupancy file"); + } + } + } + } + } + + //--- Tail of XML outputs + outFile << "</channels>" << endl; + + //--- Summary XML output + ostringstream summaryList; + for (int i{0}; i < n_disks; ++i) { + for (int j{0}; j < n_etaBinsEC; ++j) { + if (n_phiBinsEndcap[i][j] != 0) { + meanNO_ECC[i][j] /= (n_phiBinsEndcap[i][j]*2); + summaryList << xmlPartData(ENDCAP_C, i, j, "meanNO", meanNO_ECC[i][j]); + } + } + } + for (int i{0}; i < n_barrels; ++i) { + meanNO_Barrel[i] /= (n_phiBinsBarrel[i]*n_etaInBarrel*2); + summaryList << xmlPartData(BARREL, i, 0, "meanNO", meanNO_Barrel[i]); + } + for (int i{0}; i < n_disks; ++i) { + for (int j{0}; j < n_etaBinsEC; ++j) { + if (n_phiBinsEndcap[i][j] != 0) { + meanNO_ECA[i][j] /= (n_phiBinsEndcap[i][j]*2); + summaryList << xmlPartData(ENDCAP_A, i, j, "meanNO", meanNO_ECA[i][j]); + } + } + } + + if (openXML4MonSummary(m_outNOSummary, "NoiseOccupancy").isFailure()) { + ATH_MSG_ERROR("Problem in opening NoiseOccupancy file"); + return StatusCode::FAILURE; + } + if (wrapUpXML4Summary(m_outNOSummary, "NoiseOccupancy", summaryList).isFailure()) { + ATH_MSG_ERROR("Problem in closing NoiseOccupancy file"); + return StatusCode::FAILURE; + } + + //--- DB output + if (m_writeToCool) { + if (m_pCalibWriteTool->wrapUpNoiseOccupancy().isFailure()) { + ATH_MSG_ERROR("Could not get NoiseOccupancy"); return StatusCode::FAILURE; - } - - //--- DB output - if ( m_writeToCool ) { - if ( m_pCalibWriteTool->wrapUpNoiseOccupancy().isFailure() ) { - ATH_MSG_ERROR("Could not get NoiseOccupancy"); - return StatusCode::FAILURE; - } - } + } + } - return StatusCode::SUCCESS; + return StatusCode::SUCCESS; } @@ -1388,148 +1374,148 @@ StatusCode SCTCalib::getNoiseOccupancy() StatusCode SCTCalib::getRawOccupancy() { - ATH_MSG_INFO("----- in getRawOccupancy() -----"); - - //--- Initialization - int n_phiBinsBarrel[ n_barrels ] = { n_phiBinsB0, n_phiBinsB1, n_phiBinsB2, n_phiBinsB3 }; - int n_phiBinsEndcap[ n_disks ][ n_etaBinsEC ] = { { n_phiBinsECOuter, n_phiBinsECMiddle, 0 }, - { n_phiBinsECOuter, n_phiBinsECMiddle, n_phiBinsECShort }, - { n_phiBinsECOuter, n_phiBinsECMiddle, n_phiBinsECShort }, - { n_phiBinsECOuter, n_phiBinsECMiddle, n_phiBinsECShort }, - { n_phiBinsECOuter, n_phiBinsECMiddle, n_phiBinsECShort }, - { n_phiBinsECOuter, n_phiBinsECMiddle, n_phiBinsECShort }, - { n_phiBinsECOuter, n_phiBinsECMiddle, 0 }, - { n_phiBinsECOuter, n_phiBinsECMiddle, 0 }, - { n_phiBinsECOuter, 0, 0 } - }; - - double meanRO_Barrel[ n_barrels ] = { 0 }; - double meanRO_ECA[ n_disks ][ n_etaBinsEC ] = { {0}, {0} }; - double meanRO_ECC[ n_disks ][ n_etaBinsEC ] = { {0}, {0} }; - - //--- RunNumber - std::ostringstream runnum; - runnum << m_runNumber.value(); - - //--- Directory in HIST - std::vector< std::pair<std::string, int> > EC_stems; - EC_stems.clear(); - std::pair<std::string, int> stem_C("/run_" + runnum.str() + "/SCT/SCTEC/hits/", ENDCAP_C); - std::pair<std::string, int> stem_A("/run_" + runnum.str() + "/SCT/SCTEA/hits/", ENDCAP_A); - EC_stems.push_back(stem_C); - EC_stems.push_back(stem_A); - std::vector< std::pair<std::string, int> >::iterator stemItr=EC_stems.begin(); - - //--- Endcaps - for (stemItr=EC_stems.begin(); stemItr!=EC_stems.end(); stemItr++) { - for (int iDisk=0; iDisk<n_disks; ++iDisk) { - for (int iSide=0; iSide<2; ++iSide) { - for (int iEta=0; iEta<n_etaBinsEC; ++iEta) { - for (int iPhi=0; iPhi<n_phiBinsEndcap[iDisk][iEta]; ++iPhi) { - Identifier waferId = m_pSCTHelper->wafer_id( (*stemItr).second, iDisk, iPhi, iEta, iSide ); - std::string detector_part; - detector_part.erase(); - if (m_histBefore2010) { - if ( (*stemItr).second==ENDCAP_C ) detector_part = "ECm_hitsmap"; - else detector_part = "ECp_hitsmap"; - } else { - if ( (*stemItr).second==ENDCAP_C ) detector_part = "hitsmapECm"; - else detector_part = "hitsmapECp"; - } - ostringstream streamHist; - streamHist << detector_part << "_" << iDisk << "_" << iSide; - std::string hitsmapname = stemItr->first + streamHist.str(); - TH2D* hist_tmp = dynamic_cast<TH2D*>(m_inputHist->Get( hitsmapname.c_str() )); - unsigned long long n_hits = static_cast<unsigned long long>(hist_tmp->GetBinContent( iEta+1, iPhi+1 )); - float raw_occu = 0; - if (m_numberOfEvents!=0) { - raw_occu = float(n_hits)/(m_numberOfEvents*n_chipPerSide*n_stripPerChip); - //--- For calculating average Raw Occupancy - if (stemItr->second==ENDCAP_C ) meanRO_ECC[iDisk][iEta]+=static_cast<double>(raw_occu); - else if ( stemItr->second==ENDCAP_A ) meanRO_ECA[iDisk][iEta]+=static_cast<double>(raw_occu); - } - //--- DB writing - if ( m_writeToCool ) { - if ( m_pCalibWriteTool->createListRawOccu(waferId, m_pSCTHelper, m_numberOfEvents, raw_occu).isFailure() ) { - ATH_MSG_ERROR("Unable to run createListRawOccu"); - return StatusCode::FAILURE; - } - } - } + ATH_MSG_INFO("----- in getRawOccupancy() -----"); + + //--- Initialization + int n_phiBinsBarrel[n_barrels] = {n_phiBinsB0, n_phiBinsB1, n_phiBinsB2, n_phiBinsB3}; + int n_phiBinsEndcap[n_disks][n_etaBinsEC] = {{n_phiBinsECOuter, n_phiBinsECMiddle, 0}, + {n_phiBinsECOuter, n_phiBinsECMiddle, n_phiBinsECShort}, + {n_phiBinsECOuter, n_phiBinsECMiddle, n_phiBinsECShort}, + {n_phiBinsECOuter, n_phiBinsECMiddle, n_phiBinsECShort}, + {n_phiBinsECOuter, n_phiBinsECMiddle, n_phiBinsECShort}, + {n_phiBinsECOuter, n_phiBinsECMiddle, n_phiBinsECShort}, + {n_phiBinsECOuter, n_phiBinsECMiddle, 0}, + {n_phiBinsECOuter, n_phiBinsECMiddle, 0}, + {n_phiBinsECOuter, 0, 0} + }; + + double meanRO_Barrel[n_barrels] = {0}; + double meanRO_ECA[n_disks][n_etaBinsEC] = {{0}, {0}}; + double meanRO_ECC[n_disks][n_etaBinsEC] = {{0}, {0}}; + + //--- RunNumber + std::ostringstream runnum; + runnum << m_runNumber.value(); + + //--- Directory in HIST + std::vector<std::pair<std::string, int>> EC_stems; + EC_stems.clear(); + std::pair<std::string, int> stem_C("/run_" + runnum.str() + "/SCT/SCTEC/hits/", ENDCAP_C); + std::pair<std::string, int> stem_A("/run_" + runnum.str() + "/SCT/SCTEA/hits/", ENDCAP_A); + EC_stems.push_back(stem_C); + EC_stems.push_back(stem_A); + std::vector< std::pair<std::string, int> >::iterator stemItr{EC_stems.begin()}; + + //--- Endcaps + for (stemItr=EC_stems.begin(); stemItr!=EC_stems.end(); stemItr++) { + for (int iDisk{0}; iDisk<n_disks; ++iDisk) { + for (int iSide{0}; iSide<2; ++iSide) { + for (int iEta{0}; iEta<n_etaBinsEC; ++iEta) { + for (int iPhi{0}; iPhi<n_phiBinsEndcap[iDisk][iEta]; ++iPhi) { + Identifier waferId{m_pSCTHelper->wafer_id((*stemItr).second, iDisk, iPhi, iEta, iSide)}; + std::string detector_part; + detector_part.erase(); + if (m_histBefore2010) { + if ((*stemItr).second==ENDCAP_C) detector_part = "ECm_hitsmap"; + else detector_part = "ECp_hitsmap"; + } else { + if ((*stemItr).second==ENDCAP_C) detector_part = "hitsmapECm"; + else detector_part = "hitsmapECp"; } - } - } - } - //--- Barrel - for (int iLayer=0; iLayer<n_barrels; ++iLayer) { - for (int iSide=0; iSide<2; ++iSide) { - for (int iEta=0; iEta<n_etaBins; ++iEta) { - if (iEta-6==0) continue; - for (int iPhi=0; iPhi<n_phiBinsBarrel[iLayer]; ++iPhi) { - Identifier waferId = m_pSCTHelper->wafer_id( BARREL, iLayer, iPhi, iEta-6, iSide ); - ostringstream streamHist; - streamHist << iLayer << "_" << iSide; - std::string hitsmapname = "/run_" + runnum.str() + "/SCT/SCTB/hits/hitsmap_" + streamHist.str(); - TH2D* hist_tmp = dynamic_cast<TH2D*>(m_inputHist->Get( hitsmapname.c_str() )); - unsigned long long n_hits = static_cast<unsigned long long>(hist_tmp->GetBinContent( iEta+1, iPhi+1 )); - float raw_occu = 0; - if (m_numberOfEvents!=0) { - raw_occu = float(n_hits)/(m_numberOfEvents*n_chipPerSide*n_stripPerChip); - //--- For calculating average Raw Occupancy - meanRO_Barrel[iLayer]+=static_cast<double>(raw_occu); - } - //--- DB writing - if ( m_writeToCool ) { - if ( m_pCalibWriteTool->createListRawOccu(waferId, m_pSCTHelper, m_numberOfEvents, raw_occu).isFailure() ) { - ATH_MSG_ERROR("Unable to run createListRawOccu"); - return StatusCode::FAILURE; - } - } + ostringstream streamHist; + streamHist << detector_part << "_" << iDisk << "_" << iSide; + std::string hitsmapname{stemItr->first + streamHist.str()}; + TH2D* hist_tmp{dynamic_cast<TH2D*>(m_inputHist->Get(hitsmapname.c_str()))}; + unsigned long long n_hits{static_cast<unsigned long long>(hist_tmp->GetBinContent(iEta+1, iPhi+1))}; + float raw_occu{0}; + if (m_numberOfEvents!=0) { + raw_occu = static_cast<float>(n_hits)/(m_numberOfEvents*n_chipPerSide*n_stripPerChip); + //--- For calculating average Raw Occupancy + if (stemItr->second==ENDCAP_C) meanRO_ECC[iDisk][iEta] += static_cast<double>(raw_occu); + else if (stemItr->second==ENDCAP_A) meanRO_ECA[iDisk][iEta] += static_cast<double>(raw_occu); } - } - } - } - //--- Summary XML output - ostringstream summaryList; - for ( int i = 0; i < n_disks; ++i ) { - for ( int j = 0; j < n_etaBinsEC; ++j ) { - if ( n_phiBinsEndcap[i][j] != 0 ) { - meanRO_ECC[i][j] /= (n_phiBinsEndcap[i][j]*2); - summaryList<<xmlPartData(ENDCAP_C, i, j, "meanRO",meanRO_ECC[i][j]); - } - } - } - for ( int i = 0; i < n_barrels; ++i ) { - meanRO_Barrel[i] /= (n_phiBinsBarrel[i]*n_etaInBarrel*2); - summaryList<<xmlPartData(BARREL, i, 0, "meanRO",meanRO_Barrel[i]); - } - for ( int i = 0; i < n_disks; ++i ) { - for ( int j = 0; j < n_etaBinsEC; ++j ) { - if ( n_phiBinsEndcap[i][j] != 0 ) { - meanRO_ECA[i][j] /= (n_phiBinsEndcap[i][j]*2); - summaryList<<xmlPartData(ENDCAP_A, i, j, "meanRO",meanRO_ECA[i][j]); - } - } - } - - if ( openXML4MonSummary( m_outROSummary, "RawOccupancy" ).isFailure() ) { - ATH_MSG_ERROR("Problem in opening RawOccupancy file"); - return StatusCode::FAILURE; - } - if ( wrapUpXML4Summary( m_outROSummary, "RawOccupancy", summaryList ).isFailure() ) { - ATH_MSG_ERROR("Problem in closing RawOccupancy file "); + //--- DB writing + if (m_writeToCool) { + if (m_pCalibWriteTool->createListRawOccu(waferId, m_pSCTHelper, m_numberOfEvents, raw_occu).isFailure()) { + ATH_MSG_ERROR("Unable to run createListRawOccu"); + return StatusCode::FAILURE; + } + } + } + } + } + } + } + //--- Barrel + for (int iLayer{0}; iLayer<n_barrels; ++iLayer) { + for (int iSide{0}; iSide<2; ++iSide) { + for (int iEta{0}; iEta<n_etaBins; ++iEta) { + if (iEta-6==0) continue; + for (int iPhi{0}; iPhi<n_phiBinsBarrel[iLayer]; ++iPhi) { + Identifier waferId{m_pSCTHelper->wafer_id(BARREL, iLayer, iPhi, iEta-6, iSide)}; + ostringstream streamHist; + streamHist << iLayer << "_" << iSide; + std::string hitsmapname{"/run_" + runnum.str() + "/SCT/SCTB/hits/hitsmap_" + streamHist.str()}; + TH2D* hist_tmp{dynamic_cast<TH2D*>(m_inputHist->Get(hitsmapname.c_str()))}; + unsigned long long n_hits{static_cast<unsigned long long>(hist_tmp->GetBinContent(iEta+1, iPhi+1))}; + float raw_occu{0}; + if (m_numberOfEvents!=0) { + raw_occu = static_cast<float>(n_hits)/(m_numberOfEvents*n_chipPerSide*n_stripPerChip); + //--- For calculating average Raw Occupancy + meanRO_Barrel[iLayer] += static_cast<double>(raw_occu); + } + //--- DB writing + if (m_writeToCool) { + if (m_pCalibWriteTool->createListRawOccu(waferId, m_pSCTHelper, m_numberOfEvents, raw_occu).isFailure()) { + ATH_MSG_ERROR("Unable to run createListRawOccu"); + return StatusCode::FAILURE; + } + } + } + } + } + } + //--- Summary XML output + ostringstream summaryList; + for (int i{0}; i < n_disks; ++i) { + for (int j{0}; j < n_etaBinsEC; ++j) { + if (n_phiBinsEndcap[i][j] != 0) { + meanRO_ECC[i][j] /= (n_phiBinsEndcap[i][j]*2); + summaryList << xmlPartData(ENDCAP_C, i, j, "meanRO", meanRO_ECC[i][j]); + } + } + } + for (int i{0}; i < n_barrels; ++i) { + meanRO_Barrel[i] /= (n_phiBinsBarrel[i]*n_etaInBarrel*2); + summaryList << xmlPartData(BARREL, i, 0, "meanRO", meanRO_Barrel[i]); + } + for (int i{0}; i < n_disks; ++i) { + for (int j{0}; j < n_etaBinsEC; ++j) { + if (n_phiBinsEndcap[i][j] != 0) { + meanRO_ECA[i][j] /= (n_phiBinsEndcap[i][j]*2); + summaryList << xmlPartData(ENDCAP_A, i, j, "meanRO", meanRO_ECA[i][j]); + } + } + } + + if (openXML4MonSummary(m_outROSummary, "RawOccupancy").isFailure()) { + ATH_MSG_ERROR("Problem in opening RawOccupancy file"); + return StatusCode::FAILURE; + } + if (wrapUpXML4Summary(m_outROSummary, "RawOccupancy", summaryList).isFailure()) { + ATH_MSG_ERROR("Problem in closing RawOccupancy file "); + return StatusCode::FAILURE; + } + + //--- DB output + if (m_writeToCool) { + if (m_pCalibWriteTool->wrapUpRawOccupancy().isFailure()) { + ATH_MSG_ERROR("Could not get RawOccupancy"); return StatusCode::FAILURE; - } - - //--- DB output - if ( m_writeToCool ) { - if ( m_pCalibWriteTool->wrapUpRawOccupancy().isFailure() ) { - ATH_MSG_ERROR("Could not get RawOccupancy"); - return StatusCode::FAILURE; - } - } + } + } - return StatusCode::SUCCESS; + return StatusCode::SUCCESS; } @@ -1539,185 +1525,178 @@ StatusCode SCTCalib::getRawOccupancy() /////////////////////////////////////////////////////////////////////////////////// StatusCode SCTCalib::getEfficiency() { - ATH_MSG_INFO("----- in getEfficiency() -----"); - - //--- Initialization - int n_phiBinsBarrel[ n_barrels ] = { n_phiBinsB0, n_phiBinsB1, n_phiBinsB2, n_phiBinsB3 }; - int n_phiBinsEndcap[ n_disks ][ n_etaBinsEC ] = { { n_phiBinsECOuter, n_phiBinsECMiddle, 0 }, - { n_phiBinsECOuter, n_phiBinsECMiddle, n_phiBinsECShort }, - { n_phiBinsECOuter, n_phiBinsECMiddle, n_phiBinsECShort }, - { n_phiBinsECOuter, n_phiBinsECMiddle, n_phiBinsECShort }, - { n_phiBinsECOuter, n_phiBinsECMiddle, n_phiBinsECShort }, - { n_phiBinsECOuter, n_phiBinsECMiddle, n_phiBinsECShort }, - { n_phiBinsECOuter, n_phiBinsECMiddle, 0 }, - { n_phiBinsECOuter, n_phiBinsECMiddle, 0 }, - { n_phiBinsECOuter, 0, 0 } - }; - - double meanEff_Barrel[ n_barrels ] = { 0 }; - double meanEff_ECA[ n_disks ][ n_etaBinsEC ] = { {0}, {0} }; - double meanEff_ECC[ n_disks ][ n_etaBinsEC ] = { {0}, {0} }; - - //--- RunNumber - std::ostringstream runnum; - runnum << m_runNumber.value(); - - //--- Directory in HIST - std::vector< std::pair<std::string, int> > EC_stems; - EC_stems.clear(); - std::pair<std::string, int> stem_C("/run_" + runnum.str() + "/SCT/SCTEC/eff/", ENDCAP_C); - std::pair<std::string, int> stem_A("/run_" + runnum.str() + "/SCT/SCTEA/eff/", ENDCAP_A); - EC_stems.push_back(stem_C); - EC_stems.push_back(stem_A); - std::vector< std::pair<std::string, int> >::iterator stemItr=EC_stems.begin(); - - //--- XML file - // if ( openXML4MonSummary( m_outEffSummary, "EfficiencyModule" ).isFailure() ) { - // ATH_MSG_ERROR("Problem in opening " << m_outEffSummary); - // return StatusCode::FAILURE; - // } - - const char* outputEfficiencyFileName = m_efficiencyModuleFile.value().c_str(); - ofstream outFile( outputEfficiencyFileName, std::ios::out ); - if ( !outFile.good() ) { - ATH_MSG_ERROR("Unable to open EfficiencyFile : " << outputEfficiencyFileName); - return StatusCode::FAILURE; - } - - std::string xslName="EfficiencyInfo.xsl"; - outFile << xmlHeader<< linefeed<< associateStylesheet(xslName) << linefeed<< "<run>"<< endl; - outFile << xmlValue("RunNumber", m_runNumber.value() ) << linefeed - << xmlValue("StartTime", m_utcBegin ) << linefeed - << xmlValue("EndTime", m_utcEnd ) << linefeed - << xmlValue("Duration", m_calibEvtInfoTool->duration() ) << linefeed - << xmlValue("LB", m_LBRange ) << linefeed - << xmlValue("Events", m_numberOfEvents ) << linefeed - << " <modules>"<< endl; - - - //--- Endcaps - for (stemItr=EC_stems.begin(); stemItr!=EC_stems.end(); stemItr++) { - for (int iDisk=0; iDisk<n_disks; ++iDisk) { - for (int iSide=0; iSide<2; ++iSide) { - for (int iEta=0; iEta<n_etaBinsEC; ++iEta) { - for (int iPhi=0; iPhi<n_phiBinsEndcap[iDisk][iEta]; ++iPhi) { - Identifier waferId = m_pSCTHelper->wafer_id( (*stemItr).second, iDisk, iPhi, iEta, iSide ); - std::string detector_part; - detector_part.erase(); - ostringstream streamProf; - if ( (*stemItr).second==ENDCAP_C ) { - detector_part = "m_eff"; - streamProf << detector_part << "_" << iDisk << "_" << iSide; - } else { - detector_part = "p_eff"; - streamProf << detector_part << "_" << iDisk << "_" << iSide; - } - std::string effmapname = stemItr->first + streamProf.str(); - TProfile2D* prof_tmp = dynamic_cast<TProfile2D*>(m_inputHist->Get( effmapname.c_str() )); - int global_bin = prof_tmp->GetBin( iEta+1, iPhi+1 ); - float eff = static_cast<float>(prof_tmp->GetBinContent( global_bin )); - unsigned long long eff_entry = static_cast<unsigned long long>(prof_tmp->GetBinEntries( global_bin )); - //--- For calculating average Efficiency - if ( stemItr->second==ENDCAP_C ) meanEff_ECC[iDisk][iEta]+=static_cast<double>(eff); - else if ( stemItr->second==ENDCAP_A ) meanEff_ECA[iDisk][iEta]+=static_cast<double>(eff); - //--- For Efficiency _not_ averaged over modules - IdentifierHash waferHash = m_pSCTHelper->wafer_hash( waferId ); - SCT_SerialNumber sn = m_CablingTool->getSerialNumberFromHash( waferHash ); - outFile << xmlChannelEfficiencyDataString(waferId, eff, sn)<<endl; - //--- DB writing - if ( m_writeToCool ) { - if ( m_pCalibWriteTool->createListEff(waferId, m_pSCTHelper, eff_entry, eff).isFailure() ) { - ATH_MSG_ERROR("Unable to run createListEff"); - return StatusCode::FAILURE; - } - } - } + ATH_MSG_INFO("----- in getEfficiency() -----"); + + //--- Initialization + int n_phiBinsBarrel[n_barrels] = {n_phiBinsB0, n_phiBinsB1, n_phiBinsB2, n_phiBinsB3}; + int n_phiBinsEndcap[n_disks][n_etaBinsEC] = {{n_phiBinsECOuter, n_phiBinsECMiddle, 0}, + {n_phiBinsECOuter, n_phiBinsECMiddle, n_phiBinsECShort}, + {n_phiBinsECOuter, n_phiBinsECMiddle, n_phiBinsECShort}, + {n_phiBinsECOuter, n_phiBinsECMiddle, n_phiBinsECShort}, + {n_phiBinsECOuter, n_phiBinsECMiddle, n_phiBinsECShort}, + {n_phiBinsECOuter, n_phiBinsECMiddle, n_phiBinsECShort}, + {n_phiBinsECOuter, n_phiBinsECMiddle, 0}, + {n_phiBinsECOuter, n_phiBinsECMiddle, 0}, + {n_phiBinsECOuter, 0, 0} + }; + + double meanEff_Barrel[n_barrels] = {0}; + double meanEff_ECA[n_disks][n_etaBinsEC] = {{0}, {0}}; + double meanEff_ECC[n_disks][n_etaBinsEC] = {{0}, {0}}; + + //--- RunNumber + std::ostringstream runnum; + runnum << m_runNumber.value(); + + //--- Directory in HIST + std::vector<std::pair<std::string, int>> EC_stems; + EC_stems.clear(); + std::pair<std::string, int> stem_C{"/run_" + runnum.str() + "/SCT/SCTEC/eff/", ENDCAP_C}; + std::pair<std::string, int> stem_A{"/run_" + runnum.str() + "/SCT/SCTEA/eff/", ENDCAP_A}; + EC_stems.push_back(stem_C); + EC_stems.push_back(stem_A); + std::vector<std::pair<std::string, int>>::iterator stemItr{EC_stems.begin()}; + + const char* outputEfficiencyFileName{m_efficiencyModuleFile.value().c_str()}; + ofstream outFile{outputEfficiencyFileName, std::ios::out}; + if (!outFile.good()) { + ATH_MSG_ERROR("Unable to open EfficiencyFile : " << outputEfficiencyFileName); + return StatusCode::FAILURE; + } + + std::string xslName{"EfficiencyInfo.xsl"}; + outFile << xmlHeader << linefeed << associateStylesheet(xslName) << linefeed << "<run>" << endl; + outFile << xmlValue("RunNumber", m_runNumber.value()) << linefeed + << xmlValue("StartTime", m_utcBegin) << linefeed + << xmlValue("EndTime", m_utcEnd) << linefeed + << xmlValue("Duration", m_calibEvtInfoTool->duration()) << linefeed + << xmlValue("LB", m_LBRange) << linefeed + << xmlValue("Events", m_numberOfEvents) << linefeed + << " <modules>" << endl; + + + //--- Endcaps + for (stemItr=EC_stems.begin(); stemItr!=EC_stems.end(); stemItr++) { + for (int iDisk{0}; iDisk<n_disks; ++iDisk) { + for (int iSide{0}; iSide<2; ++iSide) { + for (int iEta{0}; iEta<n_etaBinsEC; ++iEta) { + for (int iPhi{0}; iPhi<n_phiBinsEndcap[iDisk][iEta]; ++iPhi) { + Identifier waferId = m_pSCTHelper->wafer_id((*stemItr).second, iDisk, iPhi, iEta, iSide); + std::string detector_part; + detector_part.erase(); + ostringstream streamProf; + if ((*stemItr).second==ENDCAP_C) { + detector_part = "m_eff"; + streamProf << detector_part << "_" << iDisk << "_" << iSide; + } else { + detector_part = "p_eff"; + streamProf << detector_part << "_" << iDisk << "_" << iSide; } - } - } - } - //--- Barrel - for (int iLayer=0; iLayer<n_barrels; ++iLayer) { - for (int iSide=0; iSide<2; ++iSide) { - for (int iEta=0; iEta<n_etaBins; ++iEta) { - if (iEta-6==0) continue; - for (int iPhi=0; iPhi<n_phiBinsBarrel[iLayer]; ++iPhi) { - Identifier waferId = m_pSCTHelper->wafer_id( BARREL, iLayer, iPhi, iEta-6, iSide ); - ostringstream streamProf; - streamProf << iLayer << "_" << iSide; - std::string effmapname = "/run_" + runnum.str() + "/SCT/SCTB/eff/eff_" + streamProf.str(); - TProfile2D* prof_tmp = dynamic_cast<TProfile2D*>(m_inputHist->Get( effmapname.c_str() )); - int global_bin = prof_tmp->GetBin( iEta+1, iPhi+1 ); - float eff = static_cast<float>(prof_tmp->GetBinContent( global_bin )); - unsigned long long eff_entry = static_cast<unsigned long long>(prof_tmp->GetBinEntries( global_bin )); - //--- For calculating average Efficiency - meanEff_Barrel[iLayer]+=static_cast<double>(eff); - //--- For Efficiency _not_ averaged over modules - IdentifierHash waferHash = m_pSCTHelper->wafer_hash( waferId ); - SCT_SerialNumber sn = m_CablingTool->getSerialNumberFromHash( waferHash ); - outFile << xmlChannelEfficiencyDataString(waferId, eff, sn)<<endl; - //--- DB writing - if ( m_writeToCool ) { - if ( m_pCalibWriteTool->createListEff(waferId, m_pSCTHelper, eff_entry, eff).isFailure() ) { - ATH_MSG_ERROR("Unable to run createListEff"); - return StatusCode::FAILURE; - } - } + std::string effmapname{stemItr->first + streamProf.str()}; + TProfile2D* prof_tmp{dynamic_cast<TProfile2D*>(m_inputHist->Get(effmapname.c_str()))}; + int global_bin{prof_tmp->GetBin(iEta+1, iPhi+1)}; + float eff{static_cast<float>(prof_tmp->GetBinContent(global_bin))}; + unsigned long long eff_entry{static_cast<unsigned long long>(prof_tmp->GetBinEntries(global_bin))}; + //--- For calculating average Efficiency + if (stemItr->second==ENDCAP_C) meanEff_ECC[iDisk][iEta] += static_cast<double>(eff); + else if (stemItr->second==ENDCAP_A) meanEff_ECA[iDisk][iEta] += static_cast<double>(eff); + //--- For Efficiency _not_ averaged over modules + IdentifierHash waferHash{m_pSCTHelper->wafer_hash(waferId)}; + SCT_SerialNumber sn{m_CablingTool->getSerialNumberFromHash(waferHash)}; + outFile << xmlChannelEfficiencyDataString(waferId, eff, sn) << endl; + //--- DB writing + if (m_writeToCool) { + if (m_pCalibWriteTool->createListEff(waferId, m_pSCTHelper, eff_entry, eff).isFailure()) { + ATH_MSG_ERROR("Unable to run createListEff"); + return StatusCode::FAILURE; + } } - } - } - } - - //--- Tail of XML outputs - // outFile << "</channels>" << endl; - - outFile << " </modules>" << endl; - outFile << "</run>" << endl; - - - //--- Summary XML output - ostringstream summaryList; - for ( int i = 0; i < n_disks; ++i ) { - for ( int j = 0; j < n_etaBinsEC; ++j ) { - if ( n_phiBinsEndcap[i][j] != 0 ) { - meanEff_ECC[i][j] /= (n_phiBinsEndcap[i][j]*2); - summaryList<<xmlPartData(ENDCAP_C, i, j, "meanEff",meanEff_ECC[i][j]); - } - } - } - for ( int i = 0; i < n_barrels; ++i ) { - meanEff_Barrel[i] /= (n_phiBinsBarrel[i]*n_etaInBarrel*2); - summaryList<<xmlPartData(BARREL, i, 0, "meanEff",meanEff_Barrel[i]); - } - for ( int i = 0; i < n_disks; ++i ) { - for ( int j = 0; j < n_etaBinsEC; ++j ) { - if ( n_phiBinsEndcap[i][j] != 0 ) { - meanEff_ECA[i][j] /= (n_phiBinsEndcap[i][j]*2); - summaryList<<xmlPartData(ENDCAP_A, i, j, "meanEff",meanEff_ECA[i][j]); - } - } - } - - if ( openXML4MonSummary( m_outEffSummary, "Efficiency" ).isFailure() ) { - ATH_MSG_ERROR("Problem in opening Efficiency file"); - return StatusCode::FAILURE; - } - - if ( wrapUpXML4Summary( m_outEffSummary, "Efficiency", summaryList ).isFailure() ) { - ATH_MSG_ERROR("Problem in closing Efficiency file "); + } + } + } + } + } + //--- Barrel + for (int iLayer{0}; iLayer<n_barrels; ++iLayer) { + for (int iSide{0}; iSide<2; ++iSide) { + for (int iEta{0}; iEta<n_etaBins; ++iEta) { + if (iEta-6==0) continue; + for (int iPhi{0}; iPhi<n_phiBinsBarrel[iLayer]; ++iPhi) { + Identifier waferId{m_pSCTHelper->wafer_id(BARREL, iLayer, iPhi, iEta-6, iSide)}; + ostringstream streamProf; + streamProf << iLayer << "_" << iSide; + std::string effmapname{"/run_" + runnum.str() + "/SCT/SCTB/eff/eff_" + streamProf.str()}; + TProfile2D* prof_tmp{dynamic_cast<TProfile2D*>(m_inputHist->Get(effmapname.c_str()))}; + int global_bin{prof_tmp->GetBin(iEta+1, iPhi+1)}; + float eff{static_cast<float>(prof_tmp->GetBinContent(global_bin))}; + unsigned long long eff_entry{static_cast<unsigned long long>(prof_tmp->GetBinEntries(global_bin))}; + //--- For calculating average Efficiency + meanEff_Barrel[iLayer] += static_cast<double>(eff); + //--- For Efficiency _not_ averaged over modules + IdentifierHash waferHash{m_pSCTHelper->wafer_hash(waferId)}; + SCT_SerialNumber sn{m_CablingTool->getSerialNumberFromHash(waferHash)}; + outFile << xmlChannelEfficiencyDataString(waferId, eff, sn) << endl; + //--- DB writing + if (m_writeToCool) { + if (m_pCalibWriteTool->createListEff(waferId, m_pSCTHelper, eff_entry, eff).isFailure()) { + ATH_MSG_ERROR("Unable to run createListEff"); + return StatusCode::FAILURE; + } + } + } + } + } + } + + //--- Tail of XML outputs + // outFile << "</channels>" << endl; + + outFile << " </modules>" << endl; + outFile << "</run>" << endl; + + + //--- Summary XML output + ostringstream summaryList; + for (int i{0}; i < n_disks; ++i) { + for (int j{0}; j < n_etaBinsEC; ++j) { + if (n_phiBinsEndcap[i][j] != 0) { + meanEff_ECC[i][j] /= (n_phiBinsEndcap[i][j]*2); + summaryList << xmlPartData(ENDCAP_C, i, j, "meanEff", meanEff_ECC[i][j]); + } + } + } + for (int i{0}; i < n_barrels; ++i) { + meanEff_Barrel[i] /= (n_phiBinsBarrel[i]*n_etaInBarrel*2); + summaryList << xmlPartData(BARREL, i, 0, "meanEff", meanEff_Barrel[i]); + } + for (int i{0}; i < n_disks; ++i) { + for (int j{0}; j < n_etaBinsEC; ++j) { + if (n_phiBinsEndcap[i][j] != 0) { + meanEff_ECA[i][j] /= (n_phiBinsEndcap[i][j]*2); + summaryList << xmlPartData(ENDCAP_A, i, j, "meanEff", meanEff_ECA[i][j]); + } + } + } + + if (openXML4MonSummary(m_outEffSummary, "Efficiency").isFailure()) { + ATH_MSG_ERROR("Problem in opening Efficiency file"); + return StatusCode::FAILURE; + } + + if (wrapUpXML4Summary(m_outEffSummary, "Efficiency", summaryList).isFailure()) { + ATH_MSG_ERROR("Problem in closing Efficiency file "); + return StatusCode::FAILURE; + } + + //--- DB output + if (m_writeToCool) { + if (m_pCalibWriteTool->wrapUpEfficiency().isFailure()) { + ATH_MSG_ERROR("Could not get Efficiency"); return StatusCode::FAILURE; - } - - //--- DB output - if ( m_writeToCool ) { - if ( m_pCalibWriteTool->wrapUpEfficiency().isFailure() ) { - ATH_MSG_ERROR("Could not get Efficiency"); - return StatusCode::FAILURE; - } - } - - return StatusCode::SUCCESS; + } + } + return StatusCode::SUCCESS; } /////////////////////////////////////////////////////////////////////////////////// @@ -1726,354 +1705,345 @@ StatusCode SCTCalib::getEfficiency() { /////////////////////////////////////////////////////////////////////////////////// StatusCode SCTCalib::getBSErrors() { - ATH_MSG_INFO("----- in getBSErrors() -----"); - - //--- Initialization - int n_phiBinsBarrel[ n_barrels ] = { n_phiBinsB0, n_phiBinsB1, n_phiBinsB2, n_phiBinsB3 }; - int n_phiBinsEndcap[ n_disks ][ n_etaBinsEC ] = { { n_phiBinsECOuter, n_phiBinsECMiddle, 0 }, - { n_phiBinsECOuter, n_phiBinsECMiddle, n_phiBinsECShort }, - { n_phiBinsECOuter, n_phiBinsECMiddle, n_phiBinsECShort }, - { n_phiBinsECOuter, n_phiBinsECMiddle, n_phiBinsECShort }, - { n_phiBinsECOuter, n_phiBinsECMiddle, n_phiBinsECShort }, - { n_phiBinsECOuter, n_phiBinsECMiddle, n_phiBinsECShort }, - { n_phiBinsECOuter, n_phiBinsECMiddle, 0 }, - { n_phiBinsECOuter, n_phiBinsECMiddle, 0 }, - { n_phiBinsECOuter, 0, 0 } - }; - - unsigned long long nErrLink_Barrel[ n_barrels ] = { 0 }; - unsigned long long nErrLink_ECA[ n_disks ][ n_etaBinsEC ] = { {0}, {0} }; - unsigned long long nErrLink_ECC[ n_disks ][ n_etaBinsEC ] = { {0}, {0} }; - - - unsigned long long nErrLink_Barrel_module[ n_barrels ][ 2 ][ n_etaBins ][ n_phiBinsB3 ] = {{{{0}}}}; - unsigned long long nErrLink_ECA_module[ n_disks ][2][ n_etaBinsEC ][n_phiBinsECOuter] = {{{{0}}}}; - unsigned long long nErrLink_ECC_module[ n_disks ][2][ n_etaBinsEC ][n_phiBinsECOuter] = {{{{0}}}}; - - std::string nErrLink_Barrel_module_serial[ n_barrels ][ 2 ][ n_etaBins ][ n_phiBinsB3 ]; - std::string nErrLink_ECA_module_serial[ n_disks ][2][ n_etaBinsEC ][n_phiBinsECOuter]; - std::string nErrLink_ECC_module_serial[ n_disks ][2][ n_etaBinsEC ][n_phiBinsECOuter]; - - unsigned long long nErrs_Barrel_module[ n_barrels ][ 2 ][ n_etaBins ][ n_phiBinsB3 ][ 15 ] = {{{{{0}}}}}; - unsigned long long nErrs_ECA_module[ n_disks ][2][ n_etaBinsEC ][n_phiBinsECOuter][ 15 ] = {{{{{0}}}}}; - unsigned long long nErrs_ECC_module[ n_disks ][2][ n_etaBinsEC ][n_phiBinsECOuter][ 15 ] = {{{{{0}}}}}; - - - - //--- RunNumber - std::ostringstream runnum; - runnum << m_runNumber.value(); - //--- ErrorList - typedef std::map< int, std::string > IntStringMap; - IntStringMap ErrMap_C, ErrMap; - const int numberOfErrorTypes(12); - boost::array<std::string, numberOfErrorTypes> errorNames= {{ - "BSParse","TimeOut", "BCID","LVL1ID", "Preamble", "Formatter", - "ABCD","Raw", "MaskedLink", "RODClock", - "TruncROD", (m_histBefore2010?"ROBFragment":"ROBFrag" ) - } - }; - // - boost::array<std::string, numberOfErrorTypes> errorNames_C= {{ - "BSParse","TimeOut","BCID","LVL1ID", "Preamble", "Formatter", - "ABCD","Raw", (m_histBefore2010?"TmaskedLinks":"MaskedLink"), "RODClock", - "TruncROD", (m_histBefore2010?"ROBFragment":"ROBFrag" ) - } - }; - boost::array<int, numberOfErrorTypes> errorValues= {{0,1,2,3,4,5,9,10,11,12,13,14}}; - //should do compile time check to ensure the sizes are equal. - ErrMap_C.clear(); - for (int indx(0); indx!=numberOfErrorTypes; ++indx) { - ErrMap_C.insert(make_pair(errorValues[indx],errorNames_C[indx])); - } - ErrMap.clear(); - for (int indx(0); indx!=numberOfErrorTypes; ++indx) { - ErrMap.insert(make_pair(errorValues[indx],errorNames[indx])); - } - - //--- Directory in HIST - const int N_ENDCAPS(2); - boost::array<std::string, N_ENDCAPS> detectorStems= {{"/run_" + runnum.str() + "/SCT/SCTEC/errors/", "/run_" + runnum.str() + "/SCT/SCTEA/errors/"}}; //barrel stem unused here - boost::array<IntStringMap::iterator, N_ENDCAPS> detectorIterators= {{ErrMap_C.begin(), ErrMap.begin()}}; - boost::array<std::string, N_ENDCAPS> detectorParts= {{"ECm", "ECp"}}; - std::string defecttype(""); - std::string n_defect(""); - int n_errorLink = 0; - //--- Endcaps - for (int stemIndex=0; stemIndex!=N_ENDCAPS; ++stemIndex) { - // fix agrohsje const int thisBec=(2 * stemIndex) - 2; //map 0, 1 onto -2, 2 - const int thisBec=(4 * stemIndex) - 2; //map 0, 1 onto -2, 2 - const std::string detector_part=detectorParts[stemIndex]; - for (int iDisk=0; iDisk<n_disks; ++iDisk) { - for (int iSide=0; iSide<2; ++iSide) { - for (int iEta=0; iEta<n_etaBinsEC; ++iEta) { - for (int iPhi=0; iPhi<n_phiBinsEndcap[iDisk][iEta]; ++iPhi) { - defecttype.erase(); - n_defect.erase(); - ostringstream osErrorList; - ostringstream osProbList; - Identifier waferId = m_pSCTHelper->wafer_id( thisBec, iDisk, iPhi, iEta, iSide ); - IdentifierHash waferHash = m_pSCTHelper->wafer_hash( waferId ); - SCT_SerialNumber sn = m_CablingTool->getSerialNumberFromHash( waferHash ); - - if ( thisBec==ENDCAP_C ) { - nErrLink_ECC_module_serial[iDisk][iSide][iEta][iPhi]=sn.str(); - } - else if ( thisBec==ENDCAP_A ) { - nErrLink_ECA_module_serial[iDisk][iSide][iEta][iPhi]=sn.str(); - } + ATH_MSG_INFO("----- in getBSErrors() -----"); + + //--- Initialization + int n_phiBinsBarrel[n_barrels] = {n_phiBinsB0, n_phiBinsB1, n_phiBinsB2, n_phiBinsB3}; + int n_phiBinsEndcap[n_disks][n_etaBinsEC] = {{n_phiBinsECOuter, n_phiBinsECMiddle, 0}, + {n_phiBinsECOuter, n_phiBinsECMiddle, n_phiBinsECShort}, + {n_phiBinsECOuter, n_phiBinsECMiddle, n_phiBinsECShort}, + {n_phiBinsECOuter, n_phiBinsECMiddle, n_phiBinsECShort}, + {n_phiBinsECOuter, n_phiBinsECMiddle, n_phiBinsECShort}, + {n_phiBinsECOuter, n_phiBinsECMiddle, n_phiBinsECShort}, + {n_phiBinsECOuter, n_phiBinsECMiddle, 0}, + {n_phiBinsECOuter, n_phiBinsECMiddle, 0}, + {n_phiBinsECOuter, 0, 0} + }; + + unsigned long long nErrLink_Barrel[n_barrels] = {0}; + unsigned long long nErrLink_ECA[n_disks][n_etaBinsEC] = {{0}, {0}}; + unsigned long long nErrLink_ECC[n_disks][n_etaBinsEC] = {{0}, {0}}; + + unsigned long long nErrLink_Barrel_module[n_barrels][2][n_etaBins][n_phiBinsB3] = {{{{0}}}}; + unsigned long long nErrLink_ECA_module[n_disks][2][n_etaBinsEC][n_phiBinsECOuter] = {{{{0}}}}; + unsigned long long nErrLink_ECC_module[n_disks][2][n_etaBinsEC][n_phiBinsECOuter] = {{{{0}}}}; + + std::string nErrLink_Barrel_module_serial[n_barrels][2][n_etaBins][n_phiBinsB3]; + std::string nErrLink_ECA_module_serial[n_disks][2][n_etaBinsEC][n_phiBinsECOuter]; + std::string nErrLink_ECC_module_serial[n_disks][2][n_etaBinsEC][n_phiBinsECOuter]; + + unsigned long long nErrs_Barrel_module[n_barrels][2][n_etaBins][n_phiBinsB3][15] = {{{{{0}}}}}; + unsigned long long nErrs_ECA_module[n_disks][2][n_etaBinsEC][n_phiBinsECOuter][15] = {{{{{0}}}}}; + unsigned long long nErrs_ECC_module[n_disks][2][n_etaBinsEC][n_phiBinsECOuter][15] = {{{{{0}}}}}; + + //--- RunNumber + std::ostringstream runnum; + runnum << m_runNumber.value(); + //--- ErrorList + typedef std::map<int, std::string> IntStringMap; + IntStringMap ErrMap_C, ErrMap; + const int numberOfErrorTypes{12}; + boost::array<std::string, numberOfErrorTypes> errorNames = {{ + "BSParse", "TimeOut", "BCID", "LVL1ID", "Preamble", "Formatter", + "ABCD", "Raw", "MaskedLink", "RODClock", + "TruncROD", (m_histBefore2010?"ROBFragment":"ROBFrag") + } + }; + // + boost::array<std::string, numberOfErrorTypes> errorNames_C = {{ + "BSParse", "TimeOut", "BCID", "LVL1ID", "Preamble", "Formatter", + "ABCD", "Raw", (m_histBefore2010?"TmaskedLinks":"MaskedLink"), "RODClock", + "TruncROD", (m_histBefore2010?"ROBFragment":"ROBFrag") + } + }; + boost::array<int, numberOfErrorTypes> errorValues = {{0, 1, 2, 3, 4, 5, 9, 10, 11, 12, 13, 14}}; + //should do compile time check to ensure the sizes are equal. + ErrMap_C.clear(); + for (int indx{0}; indx!=numberOfErrorTypes; ++indx) { + ErrMap_C.insert(make_pair(errorValues[indx], errorNames_C[indx])); + } + ErrMap.clear(); + for (int indx{0}; indx!=numberOfErrorTypes; ++indx) { + ErrMap.insert(make_pair(errorValues[indx], errorNames[indx])); + } + + //--- Directory in HIST + const int N_ENDCAPS{2}; + boost::array<std::string, N_ENDCAPS> detectorStems = {{"/run_" + runnum.str() + "/SCT/SCTEC/errors/", "/run_" + runnum.str() + "/SCT/SCTEA/errors/"}}; //barrel stem unused here + boost::array<IntStringMap::iterator, N_ENDCAPS> detectorIterators = {{ErrMap_C.begin(), ErrMap.begin()}}; + boost::array<std::string, N_ENDCAPS> detectorParts = {{"ECm", "ECp"}}; + std::string defecttype{""}; + std::string n_defect{""}; + int n_errorLink{0}; + //--- Endcaps + for (int stemIndex{0}; stemIndex!=N_ENDCAPS; ++stemIndex) { + const int thisBec{(4 * stemIndex) - 2}; //map 0, 1 onto -2, 2 + const std::string detector_part{detectorParts[stemIndex]}; + for (int iDisk{0}; iDisk<n_disks; ++iDisk) { + for (int iSide{0}; iSide<2; ++iSide) { + for (int iEta{0}; iEta<n_etaBinsEC; ++iEta) { + for (int iPhi{0}; iPhi<n_phiBinsEndcap[iDisk][iEta]; ++iPhi) { + defecttype.erase(); + n_defect.erase(); + ostringstream osErrorList; + ostringstream osProbList; + Identifier waferId{m_pSCTHelper->wafer_id(thisBec, iDisk, iPhi, iEta, iSide)}; + IdentifierHash waferHash{m_pSCTHelper->wafer_hash(waferId)}; + SCT_SerialNumber sn{m_CablingTool->getSerialNumberFromHash(waferHash)}; + + if (thisBec==ENDCAP_C) { + nErrLink_ECC_module_serial[iDisk][iSide][iEta][iPhi]=sn.str(); + } else if (thisBec==ENDCAP_A) { + nErrLink_ECA_module_serial[iDisk][iSide][iEta][iPhi]=sn.str(); + } - IntStringMap::iterator errItr=detectorIterators[stemIndex]; - for ( int iType = 0; iType < n_BSErrorType; ++iType ) { - float errorProb = 0.; - unsigned long long n_errors = 0; - if ( iType == errItr->first ) { - ostringstream streamHist; - //temporal fix: folder and histogram names should be Preamble - streamHist << errItr->second << "Errs" << "_" << iDisk << "_" << iSide; - // streamHist << "T" << errItr->second << "Errs" << detector_part << "_" << iDisk << "_" << iSide; - std::string folder = errItr->second+std::string("/"); - //histogram might or might not be inside a folder with the same name - std::string profname = detectorStems[stemIndex] + folder +streamHist.str(); - std::string profnameShort = detectorStems[stemIndex] + streamHist.str(); - - TProfile2D* prof_tmp = dynamic_cast<TProfile2D*>(m_inputHist->Get( profname.c_str() )); - if (prof_tmp ==nullptr) { - prof_tmp = dynamic_cast<TProfile2D*>(m_inputHist->Get( profnameShort.c_str() )); - } - if (prof_tmp ==nullptr) { - ATH_MSG_ERROR("Unable to get profile for BSErrorsDB : " << profname); - return StatusCode::FAILURE; - } - - n_errors = static_cast<unsigned long long>(prof_tmp->GetBinContent( iEta+1, iPhi+1 )); - if (n_errors!=0) { - defecttype = m_pCalibWriteTool->addNumber( defecttype, errItr->first ); - n_defect = m_pCalibWriteTool->addNumber( n_defect, n_errors ); - errorProb = static_cast<float>(n_errors) / static_cast<float>(m_numberOfEvents); - nErrs_ECC_module[iDisk][iSide][iEta][iPhi][errItr->first] = n_errors; - if ( thisBec==ENDCAP_C ) { - nErrLink_ECC_module[iDisk][iSide][iEta][iPhi]+=n_errors; - } - else if ( thisBec==ENDCAP_A ) { - nErrLink_ECA_module[iDisk][iSide][iEta][iPhi]+=n_errors; - } - - }//end if (n_errors!=0) - ++errItr; - }//end if ( iType == (*errItr).first ) - osErrorList << n_errors; - osProbList << errorProb; - if ( iType != n_BSErrorType-1 ) { - osErrorList << " "; - osProbList << " "; - } - }//end ErrorType Loop - //--- DB writing - if (!(defecttype.empty())) { - n_errorLink++; - if ( thisBec==ENDCAP_C ) { - nErrLink_ECC[iDisk][iEta]++; - } - else if ( thisBec==ENDCAP_A ) { - nErrLink_ECA[iDisk][iEta]++; - } - if ( m_writeToCool ) { - if ( m_pCalibWriteTool->createListBSErr(waferId, m_pSCTHelper, m_numberOfEvents, osErrorList.str(),osProbList.str()).isFailure() ) { - ATH_MSG_ERROR("Unable to run createListBSError"); - return StatusCode::FAILURE; - } - } - } - }// end of for iPhi - }//implicit end of iEta - }//implicit end of iside - }//implicit end of iDisk - }//end of stemIndex loop - //--- Barrel - for (int iLayer=0; iLayer<n_barrels; ++iLayer) { - for (int iSide=0; iSide<2; ++iSide) { - for (int iEta=0; iEta<n_etaBins; ++iEta) { - if (iEta-6==0) continue; - for (int iPhi=0; iPhi<n_phiBinsBarrel[iLayer]; ++iPhi) { - defecttype.erase(); - n_defect.erase(); - ostringstream osErrorList;//agrohsje - ostringstream osProbList; - Identifier waferId = m_pSCTHelper->wafer_id( BARREL, iLayer, iPhi, iEta-6, iSide ); - IdentifierHash waferHash = m_pSCTHelper->wafer_hash( waferId ); - SCT_SerialNumber sn = m_CablingTool->getSerialNumberFromHash( waferHash ); - nErrLink_Barrel_module_serial[iLayer][iSide][iEta][iPhi] = sn.str(); - IntStringMap::iterator errItr=ErrMap.begin(); - for ( int iType = 0; iType < n_BSErrorType; ++iType ) { - float errorProb = 0.; - unsigned long long n_errors = 0; - if ( iType == errItr->first ) { - ostringstream streamHist; - streamHist << "T" << errItr->second << "Errs" << "_" << iLayer << "_" << iSide; - //histogram might or might not be inside a folder with the same name - std::string folder = errItr->second+std::string("/"); - std::string profname = "/run_" + runnum.str() + "/SCT/SCTB/errors/" + folder + streamHist.str(); - std::string profnameShort = "/run_" + runnum.str() + "/SCT/SCTB/errors/" + streamHist.str(); - - TProfile2D* prof_tmp = dynamic_cast<TProfile2D*>(m_inputHist->Get( profname.c_str() )); - if (prof_tmp ==nullptr) { - prof_tmp = dynamic_cast<TProfile2D*>(m_inputHist->Get( profnameShort.c_str() )); - } - if (prof_tmp ==nullptr) { - ATH_MSG_ERROR("Unable to get profile for BSErrorsDB : " << profname); - return StatusCode::FAILURE; - } - n_errors = static_cast<unsigned long long>(prof_tmp->GetBinContent( iEta+1, iPhi+1 )); - if (n_errors!=0) { - defecttype = m_pCalibWriteTool->addNumber( defecttype, errItr->first ); - n_defect = m_pCalibWriteTool->addNumber( n_defect, n_errors ); - errorProb = static_cast<float>(n_errors) / static_cast<float>(m_numberOfEvents); - nErrs_Barrel_module[iLayer][iSide][iEta][iPhi][errItr->first] = n_errors; - nErrLink_Barrel_module[iLayer][iSide][iEta][iPhi]+=n_errors; - - }//end if (n_errors!=0) - ++errItr; - }//end if ( iType == (*errItr).first ) - osErrorList << n_errors; - osProbList << errorProb; - if ( iType != n_BSErrorType-1 ) { - osErrorList << " "; - osProbList << " "; + IntStringMap::iterator errItr{detectorIterators[stemIndex]}; + for (int iType{0}; iType < n_BSErrorType; ++iType) { + float errorProb{0.}; + unsigned long long n_errors{0}; + if (iType == errItr->first) { + ostringstream streamHist; + //temporal fix: folder and histogram names should be Preamble + streamHist << errItr->second << "Errs" << "_" << iDisk << "_" << iSide; + std::string folder{errItr->second+std::string("/")}; + //histogram might or might not be inside a folder with the same name + std::string profname{detectorStems[stemIndex] + folder +streamHist.str()}; + std::string profnameShort{detectorStems[stemIndex] + streamHist.str()}; + + TProfile2D* prof_tmp{dynamic_cast<TProfile2D*>(m_inputHist->Get(profname.c_str()))}; + if (prof_tmp ==nullptr) { + prof_tmp = dynamic_cast<TProfile2D*>(m_inputHist->Get(profnameShort.c_str())); + } + if (prof_tmp ==nullptr) { + ATH_MSG_ERROR("Unable to get profile for BSErrorsDB : " << profname); + return StatusCode::FAILURE; + } + + n_errors = static_cast<unsigned long long>(prof_tmp->GetBinContent(iEta+1, iPhi+1)); + if (n_errors!=0) { + defecttype = m_pCalibWriteTool->addNumber(defecttype, errItr->first); + n_defect = m_pCalibWriteTool->addNumber(n_defect, n_errors); + errorProb = static_cast<float>(n_errors) / static_cast<float>(m_numberOfEvents); + nErrs_ECC_module[iDisk][iSide][iEta][iPhi][errItr->first] = n_errors; + if (thisBec==ENDCAP_C) { + nErrLink_ECC_module[iDisk][iSide][iEta][iPhi]+=n_errors; + } else if (thisBec==ENDCAP_A) { + nErrLink_ECA_module[iDisk][iSide][iEta][iPhi]+=n_errors; } - } //end ErrorType Loop - //--- DB writing - if (!(defecttype.empty())) { - n_errorLink++; - nErrLink_Barrel[iLayer]++; - if ( m_writeToCool ) { - if ( m_pCalibWriteTool->createListBSErr(waferId, m_pSCTHelper, m_numberOfEvents, osErrorList.str(), osProbList.str()).isFailure() ) { - ATH_MSG_ERROR("Unable to run createListBSError"); - return StatusCode::FAILURE; - }//end of if m_pCalib - }//end of if m_writeToCool - } //end of if defecttype empty - }//end of for iPhi - }//endof for iEta, implicit end of for iSide and iLayer - } - } - - ATH_MSG_INFO("#Links which send BSError : " << n_errorLink); - - //--- Summary XML output - ostringstream summaryList; - for ( int i = 0; i < n_disks; ++i ) { - for ( int j = 0; j < n_etaBinsEC; ++j ) { - if ( n_phiBinsEndcap[i][j] != 0 ) { - summaryList<<xmlPartData(ENDCAP_C, i, j, "nErrLink", nErrLink_ECC[i][j]); - } - } - } - for ( int i = 0; i < n_barrels; ++i ) { - summaryList<<xmlPartData(BARREL, i, 0, "nErrLink", nErrLink_Barrel[i]); - } - - for ( int i = 0; i < n_disks; ++i ) { - for ( int j = 0; j < n_etaBinsEC; ++j ) { - if ( n_phiBinsEndcap[i][j] != 0 ) { - summaryList<<xmlPartData(ENDCAP_A, i, j, "nErrLink", nErrLink_ECA[i][j]); - } - } - } - if ( openXML4MonSummary( m_outBSErrSummary, "BSErrors" ).isFailure() ) { - ATH_MSG_ERROR("Problem in opening BSErrors file"); - return StatusCode::FAILURE; - } - if ( wrapUpXML4Summary( m_outBSErrSummary, "BSErrors", summaryList ).isFailure() ) { - ATH_MSG_ERROR("Problem in closing BSErrors file"); - return StatusCode::FAILURE; - } - - //module XML output - //agascon 06.02.2015 - ostringstream moduleList; - std::string serial; - for ( int i = 0; i < n_disks; ++i ) { - for ( int j = 0; j < n_etaBinsEC; ++j ) { - if ( n_phiBinsEndcap[i][j] != 0 ) { - for ( int k = 0; k < 2; k++) { - for ( int l = 0; l < n_phiBinsEndcap[i][j]; l++) { - serial = nErrLink_ECC_module_serial[i][k][j][l]; - - //fill ostringstream with number of error of each type for one particular module - ostringstream errList; - for ( int errCount = 0; errCount < numberOfErrorTypes; errCount++) { - int type = errorValues[errCount]; // - errList<<" "<<xmlValue(ErrMap[type], nErrs_ECC_module[i][k][j][l][type])<<endl; - } + }//end if (n_errors!=0) + ++errItr; + }//end if (iType == (*errItr).first) + osErrorList << n_errors; + osProbList << errorProb; + if (iType != n_BSErrorType-1) { + osErrorList << " "; + osProbList << " "; + } + }//end ErrorType Loop + //--- DB writing + if (!(defecttype.empty())) { + n_errorLink++; + if (thisBec==ENDCAP_C) { + nErrLink_ECC[iDisk][iEta]++; + } else if (thisBec==ENDCAP_A) { + nErrLink_ECA[iDisk][iEta]++; + } + if (m_writeToCool) { + if (m_pCalibWriteTool->createListBSErr(waferId, m_pSCTHelper, m_numberOfEvents, osErrorList.str(), osProbList.str()).isFailure()) { + ATH_MSG_ERROR("Unable to run createListBSError"); + return StatusCode::FAILURE; + } + } + } + }// end of for iPhi + }//implicit end of iEta + }//implicit end of iside + }//implicit end of iDisk + }//end of stemIndex loop + //--- Barrel + for (int iLayer{0}; iLayer<n_barrels; ++iLayer) { + for (int iSide{0}; iSide<2; ++iSide) { + for (int iEta{0}; iEta<n_etaBins; ++iEta) { + if (iEta-6==0) continue; + for (int iPhi{0}; iPhi<n_phiBinsBarrel[iLayer]; ++iPhi) { + defecttype.erase(); + n_defect.erase(); + ostringstream osErrorList;//agrohsje + ostringstream osProbList; + Identifier waferId{m_pSCTHelper->wafer_id(BARREL, iLayer, iPhi, iEta-6, iSide)}; + IdentifierHash waferHash{m_pSCTHelper->wafer_hash(waferId)}; + SCT_SerialNumber sn{m_CablingTool->getSerialNumberFromHash(waferHash)}; + nErrLink_Barrel_module_serial[iLayer][iSide][iEta][iPhi] = sn.str(); + IntStringMap::iterator errItr{ErrMap.begin()}; + for (int iType{0}; iType < n_BSErrorType; ++iType) { + float errorProb{0.}; + unsigned long long n_errors{0}; + if (iType == errItr->first) { + ostringstream streamHist; + streamHist << "T" << errItr->second << "Errs" << "_" << iLayer << "_" << iSide; + //histogram might or might not be inside a folder with the same name + std::string folder{errItr->second+std::string("/")}; + std::string profname{"/run_" + runnum.str() + "/SCT/SCTB/errors/" + folder + streamHist.str()}; + std::string profnameShort{"/run_" + runnum.str() + "/SCT/SCTB/errors/" + streamHist.str()}; + + TProfile2D* prof_tmp{dynamic_cast<TProfile2D*>(m_inputHist->Get(profname.c_str()))}; + if (prof_tmp ==nullptr) { + prof_tmp = dynamic_cast<TProfile2D*>(m_inputHist->Get(profnameShort.c_str())); + } + if (prof_tmp ==nullptr) { + ATH_MSG_ERROR("Unable to get profile for BSErrorsDB : " << profname); + return StatusCode::FAILURE; + } + n_errors = static_cast<unsigned long long>(prof_tmp->GetBinContent(iEta+1, iPhi+1)); + if (n_errors!=0) { + defecttype = m_pCalibWriteTool->addNumber(defecttype, errItr->first); + n_defect = m_pCalibWriteTool->addNumber(n_defect, n_errors); + errorProb = static_cast<float>(n_errors) / static_cast<float>(m_numberOfEvents); + nErrs_Barrel_module[iLayer][iSide][iEta][iPhi][errItr->first] = n_errors; + nErrLink_Barrel_module[iLayer][iSide][iEta][iPhi]+=n_errors; + + }//end if (n_errors!=0) + ++errItr; + }//end if (iType == (*errItr).first) + osErrorList << n_errors; + osProbList << errorProb; + if (iType != n_BSErrorType-1) { + osErrorList << " "; + osProbList << " "; + } + } //end ErrorType Loop + //--- DB writing + if (!(defecttype.empty())) { + n_errorLink++; + nErrLink_Barrel[iLayer]++; + if (m_writeToCool) { + if (m_pCalibWriteTool->createListBSErr(waferId, m_pSCTHelper, m_numberOfEvents, osErrorList.str(), osProbList.str()).isFailure()) { + ATH_MSG_ERROR("Unable to run createListBSError"); + return StatusCode::FAILURE; + }//end of if m_pCalib + }//end of if m_writeToCool + } //end of if defecttype empty + }//end of for iPhi + }//endof for iEta, implicit end of for iSide and iLayer + } + } + + ATH_MSG_INFO("#Links which send BSError : " << n_errorLink); + + //--- Summary XML output + ostringstream summaryList; + for (int i{0}; i < n_disks; ++i) { + for (int j{0}; j < n_etaBinsEC; ++j) { + if (n_phiBinsEndcap[i][j] != 0) { + summaryList << xmlPartData(ENDCAP_C, i, j, "nErrLink", nErrLink_ECC[i][j]); + } + } + } + for (int i{0}; i < n_barrels; ++i) { + summaryList << xmlPartData(BARREL, i, 0, "nErrLink", nErrLink_Barrel[i]); + } + + for (int i{0}; i < n_disks; ++i) { + for (int j{0}; j < n_etaBinsEC; ++j) { + if (n_phiBinsEndcap[i][j] != 0) { + summaryList << xmlPartData(ENDCAP_A, i, j, "nErrLink", nErrLink_ECA[i][j]); + } + } + } + + if (openXML4MonSummary(m_outBSErrSummary, "BSErrors").isFailure()) { + ATH_MSG_ERROR("Problem in opening BSErrors file"); + return StatusCode::FAILURE; + } + if (wrapUpXML4Summary(m_outBSErrSummary, "BSErrors", summaryList).isFailure()) { + ATH_MSG_ERROR("Problem in closing BSErrors file"); + return StatusCode::FAILURE; + } + + //module XML output + //agascon 06.02.2015 + ostringstream moduleList; + std::string serial; + for (int i{0}; i < n_disks; ++i) { + for (int j{0}; j < n_etaBinsEC; ++j) { + if (n_phiBinsEndcap[i][j] != 0) { + for (int k{0}; k < 2; k++) { + for (int l{0}; l < n_phiBinsEndcap[i][j]; l++) { + serial = nErrLink_ECC_module_serial[i][k][j][l]; + + //fill ostringstream with number of error of each type for one particular module + ostringstream errList; + for (int errCount{0}; errCount < numberOfErrorTypes; errCount++) { + int type{errorValues[errCount]}; // + errList << " " << xmlValue(ErrMap[type], nErrs_ECC_module[i][k][j][l][type]) << endl; + } - moduleList<<xmlModuleData(ENDCAP_C, i, k, j, l, "nErrors", nErrLink_ECC_module[i][k][j][l], serial, errList.str()); - // moduleList<<xmlModuleData(ENDCAP_C, i, k, j, l, "nErrLink", nErrLink_ECC_module[i][k][j][l], serial, errList); + moduleList << xmlModuleData(ENDCAP_C, i, k, j, l, "nErrors", nErrLink_ECC_module[i][k][j][l], serial, errList.str()); - } - } - } + } + } } - } + } + } - for ( int i = 0; i < n_barrels; i++ ) { - for ( int j = 0; j < 2; j++) { - for ( int k = 0; k < n_etaBins; k++) { - for ( int l = 0; l < n_phiBinsBarrel[i] ; l++) { - serial = nErrLink_Barrel_module_serial[i][j][k][l]; + for (int i{0}; i < n_barrels; i++) { + for (int j{0}; j < 2; j++) { + for (int k{0}; k < n_etaBins; k++) { + for (int l{0}; l < n_phiBinsBarrel[i] ; l++) { + serial = nErrLink_Barrel_module_serial[i][j][k][l]; - ostringstream errList; - for ( int errCount = 0; errCount < numberOfErrorTypes; errCount++) { - int type = errorValues[errCount]; // - errList<<" "<<xmlValue(ErrMap[type], nErrs_Barrel_module[i][j][k][l][type])<<endl; - } + ostringstream errList; + for (int errCount{0}; errCount < numberOfErrorTypes; errCount++) { + int type{errorValues[errCount]}; // + errList << " " << xmlValue(ErrMap[type], nErrs_Barrel_module[i][j][k][l][type]) << endl; + } - moduleList<<xmlModuleData(BARREL, i, j, k, l, "nErrors", nErrLink_Barrel_module[i][j][k][l], serial, errList.str()); - } - } + moduleList << xmlModuleData(BARREL, i, j, k, l, "nErrors", nErrLink_Barrel_module[i][j][k][l], serial, errList.str()); + } } - } - - for ( int i = 0; i < n_disks; ++i ) { - for ( int j = 0; j < n_etaBinsEC; ++j ) { - if ( n_phiBinsEndcap[i][j] != 0 ) { - for ( int k = 0; k < 2; k++) { - for ( int l = 0; l < n_phiBinsEndcap[i][j]; l++) { - serial = nErrLink_ECA_module_serial[i][k][j][l]; - - ostringstream errList; - for ( int errCount = 0; errCount < numberOfErrorTypes; errCount++) { - int type = errorValues[errCount]; // - errList<<" "<<xmlValue(ErrMap[type], nErrs_ECA_module[i][k][j][l][type])<<endl; - } + } + } - moduleList<<xmlModuleData(ENDCAP_A, i, k, j, l, "nErrors", nErrLink_ECA_module[i][k][j][l], serial, errList.str()); - } + for (int i{0}; i < n_disks; ++i) { + for (int j{0}; j < n_etaBinsEC; ++j) { + if (n_phiBinsEndcap[i][j] != 0) { + for (int k{0}; k < 2; k++) { + for (int l{0}; l < n_phiBinsEndcap[i][j]; l++) { + serial = nErrLink_ECA_module_serial[i][k][j][l]; + + ostringstream errList; + for (int errCount{0}; errCount < numberOfErrorTypes; errCount++) { + int type{errorValues[errCount]}; // + errList << " " << xmlValue(ErrMap[type], nErrs_ECA_module[i][k][j][l][type]) << endl; } - } - } - } - if ( openXML4MonSummary( m_outBSErrModule, "BSErrorsModule" ).isFailure() ) { - ATH_MSG_ERROR("Problem in opening BSErrorsModule file"); + moduleList << xmlModuleData(ENDCAP_A, i, k, j, l, "nErrors", nErrLink_ECA_module[i][k][j][l], serial, errList.str()); + } + } + } + } + } + + if (openXML4MonSummary(m_outBSErrModule, "BSErrorsModule").isFailure()) { + ATH_MSG_ERROR("Problem in opening BSErrorsModule file"); + return StatusCode::FAILURE; + } + if (wrapUpXML4Summary(m_outBSErrModule, "BSErrors", moduleList).isFailure()) { + ATH_MSG_ERROR("Problem in closing BSErrors file"); + return StatusCode::FAILURE; + } + + //--- DB output + if (m_writeToCool) { + if (m_pCalibWriteTool->wrapUpBSErrors().isFailure()) { + ATH_MSG_ERROR("Could not get ByteStream Errors"); return StatusCode::FAILURE; - } - if ( wrapUpXML4Summary( m_outBSErrModule, "BSErrors", moduleList ).isFailure() ) { - ATH_MSG_ERROR("Problem in closing BSErrors file"); - return StatusCode::FAILURE; - } - - //--- DB output - if ( m_writeToCool ) { - if ( m_pCalibWriteTool->wrapUpBSErrors().isFailure() ) { - ATH_MSG_ERROR("Could not get ByteStream Errors"); - return StatusCode::FAILURE; - } - } + } + } - return StatusCode::SUCCESS; + return StatusCode::SUCCESS; } @@ -2083,377 +2053,355 @@ StatusCode SCTCalib::getBSErrors() { /////////////////////////////////////////////////////////////////////////////////// StatusCode SCTCalib::getLorentzAngle() { - ATH_MSG_INFO("----- in getLorentzAngle() -----"); - - //--- Initialization - - float A_BarrelSide[ n_barrels ][ 2 ][ 2 ] = { {{0},{0}}, {{0},{0}} }; - float LA_BarrelSide[ n_barrels ][ 2 ][ 2 ] = { {{0},{0}}, {{0},{0}} }; - float B_BarrelSide[ n_barrels ][ 2 ][ 2 ] = { {{0},{0}}, {{0},{0}} }; - float Sigma_BarrelSide[ n_barrels ][ 2 ][ 2 ] = { {{0},{0}}, {{0},{0}} }; - - float Err_A_BarrelSide[ n_barrels ][ 2 ][ 2 ] = { {{0},{0}}, {{0},{0}} }; - float Err_LA_BarrelSide[ n_barrels ][ 2 ][ 2 ] = { {{0},{0}}, {{0},{0}} }; - float Err_B_BarrelSide[ n_barrels ][ 2 ][ 2 ] = { {{0},{0}}, {{0},{0}} }; - float Err_Sigma_BarrelSide[ n_barrels ][ 2 ][ 2 ] = { {{0},{0}}, {{0},{0}} }; - - float MCW_BarrelSide[ n_barrels ][ 2 ][ 2 ] = { {{0},{0}}, {{0},{0}} }; - float Err_MCW_BarrelSide[ n_barrels ][ 2 ][ 2 ] = { {{0},{0}}, {{0},{0}} }; - float Chisq_BarrelSide[ n_barrels ][ 2 ][ 2 ] = { {{0},{0}}, {{0},{0}} }; - - string DBUploadFlag = "G"; // fit status flag - string module[2]= {"100","111"}; - int moduleint[2]= {100,111}; - - int FitFlag[ n_barrels ][ 2 ][ 2 ] = { {{0},{0}}, {{0},{0}} }; // fit status flag - - TFile *fitFile; - - //--- RunNumber - std::ostringstream runnum; - runnum << m_runNumber.value(); - - //--- Directory in HIST - std::string stem; - - //--- Barrel - stem = "/run_" + runnum.str() + "/SCT/GENERAL/lorentz/"; - m_h_phiVsNstripsSideHistoVector.clear(); - for ( int iLayer = 0; iLayer < n_barrels ; ++iLayer ) { - for ( int iSide = 0; iSide < 2; ++iSide ) { - for ( int iModule = 0; iModule < 2; ++iModule ) { - ostringstream streamHist; - streamHist << "h_phiVsNstrips_" << module[iModule] << "_" << iLayer << "Side" << iSide; - std::string histName = stem + streamHist.str(); - TProfile* hist_tmp = dynamic_cast<TProfile*>(m_inputHist->Get( histName.c_str() )); - if (hist_tmp ==nullptr) { - ATH_MSG_ERROR("Unable to get histogram for LorentzAngle : " << histName); - return StatusCode::FAILURE; - } - m_h_phiVsNstripsSideHistoVector.push_back( hist_tmp ); - } - } - } - - //--- XML file - const char* outputLorentzAngleFileName = m_LorentzAngleFile.value().c_str(); - ofstream outFile( outputLorentzAngleFileName, std::ios::out ); - if ( !outFile.good() ) { - ATH_MSG_ERROR("Unable to open LorentzAngleFile : " << outputLorentzAngleFileName); - return StatusCode::FAILURE; - } - - //--- Header for XML outputs - ostringstream osHeader; - osHeader << "<folder>"<< endl; - outFile << osHeader.str(); - - fitFile = new TFile("FittingDebugFile.root","RECREATE"); - - //--- Barrel - for ( int iLayer = 0; iLayer < n_barrels; ++iLayer ) { - for ( int iSide = 0; iSide < 2; ++iSide ) { - for ( int iModule = 0; iModule < 2; ++iModule ) { - if (iLayer==1 && iModule==0) continue; // Layer 1 doesn't contain 100 modules - ATH_MSG_INFO("LorentzAngle fit start : " << 4*iLayer + iSide +1 + iModule << " / 16"); - Int_t fitResult; - Double_t par[4],err_par[4]; - TF1 *LAfit = new TF1("LAfit", LA_func, -9., 2.,4 ); - ostringstream streamFile; - streamFile << "h_phiVsNstrips_" << module[iModule] << "_" << iLayer << "Side" << iSide; - - LAfit->SetParLimits(3, 0.1, 50.); - LAfit->SetParNames("a","LA","b","sigma"); - LAfit->SetParameters(1.,-5.,1.13,2.); - fitResult = m_h_phiVsNstripsSideHistoVector[ 4*iLayer + 2*iSide +iModule ] -> Fit("LAfit", "E", "",-9.,2.); - LAfit->GetParameters(par); - err_par[0]=LAfit->GetParError(0); - err_par[1]=LAfit->GetParError(1); - err_par[2]=LAfit->GetParError(2); - err_par[3]=LAfit->GetParError(3); - - //DEBUG MODE - if ( m_LorentzAngleDebugMode ) { - ostringstream streamFileTmp; - streamFileTmp << "h_phiVsNstrips_" << module[iModule] << "_" << iLayer << "Side" << iSide << "_First_Fit"; - std::string dn = streamFile.str(); - std::string tmp_hn = streamFileTmp.str(); - const char* dir_name = dn.c_str(); - const char* histo_name = tmp_hn.c_str(); - fitFile->cd(); - fitFile->mkdir(dir_name); //Creating Directories - fitFile->cd(dir_name); - m_h_phiVsNstripsSideHistoVector[ 4*iLayer + 2*iSide +iModule] -> SetName(histo_name); - m_h_phiVsNstripsSideHistoVector[ 4*iLayer + 2*iSide +iModule] -> Write(); - ATH_MSG_INFO("-------:Directory Name: " << dir_name << "--------"); - } - - - - if ( fitResult != 0 ) { - ATH_MSG_INFO("Try to use parabola Fit to determine initial value!"); - TF1 *parafit = new TF1("parafit", "[0]*(x-[1])*(x-[1])+[2]", -9., 2. ); - ATH_MSG_INFO("LorentzAngle 2nd para fit start : " << 4*iLayer + iSide +1 + iModule << " / 16"); - parafit->SetParameters(par[0],par[1],LAfit->Eval(par[1],0,0,0)); - m_h_phiVsNstripsSideHistoVector[ 4*iLayer + 2*iSide +iModule ] -> Fit("parafit", "R", "",-9.,2.); - ATH_MSG_INFO("LorentzAngle 2nd pre fit start : " << 4*iLayer + iSide +1 + iModule << " / 16"); - par[1]=parafit->GetParameter(1); - LAfit->SetParameters(par[0],par[1],par[2],par[3]); - LAfit->SetParLimits(1,par[1],par[1]); - m_h_phiVsNstripsSideHistoVector[ 4*iLayer + 2*iSide +iModule] -> Fit("LAfit", "R", "",-9.,2.); - LAfit->GetParameters(par); - LAfit->SetParLimits(1, -90., 90.); - LAfit->SetParameters(par[0],par[1],par[2],par[3]); - ATH_MSG_INFO("LorentzAngle 2nd main fit start : " << 4*iLayer + iSide +1 + iModule << " / 16"); - fitResult = m_h_phiVsNstripsSideHistoVector[ 4*iLayer + 2*iSide +iModule] -> Fit("LAfit", "E", "",-9.,2.); - LAfit->GetParameters(par); - if ( m_LorentzAngleDebugMode ) { - - ostringstream streamFileTmp; - streamFileTmp << "h_phiVsNstrips_" << module[iModule] << "_" << iLayer << "Side" << iSide << "Second_Fit"; - std::string tmp_hn = streamFileTmp.str(); - const char* histo_name = tmp_hn.c_str(); - m_h_phiVsNstripsSideHistoVector[ 4*iLayer + 2*iSide +iModule] -> SetName(histo_name); - m_h_phiVsNstripsSideHistoVector[ 4*iLayer + 2*iSide +iModule] -> Write(); - - } - - } - - if ( fitResult != 0 ) { - ATH_MSG_INFO("Try to fix one parameter sigma=2.0 to determine other initial value!"); - ATH_MSG_INFO("LorentzAngle 3rd pre fit start : " << 4*iLayer + iSide +1+ iModule << " / 16"); - LAfit->SetParameters(par[0],par[1],par[2],2.); - LAfit->SetParLimits(3,2.,2.); - m_h_phiVsNstripsSideHistoVector[ 4*iLayer + 2*iSide +iModule] -> Fit("LAfit", "R", "",-9.,2.); - LAfit->GetParameters(par); - LAfit->SetParLimits(3, 0., 50.); - LAfit->SetParameters(par[0],par[1],par[2],par[3]); - ATH_MSG_INFO("LorentzAngle 3rd main fit start : " << 4*iLayer + iSide +1 +iModule<< " / 16"); - fitResult = m_h_phiVsNstripsSideHistoVector[ 4*iLayer + 2*iSide +iModule] -> Fit("LAfit", "E", "",-9.,2.); - LAfit->GetParameters(par); - if ( m_LorentzAngleDebugMode ) { - ostringstream streamFileTmp; - streamFileTmp << "h_phiVsNstrips_" << module[iModule] << "_" << iLayer << "Side" << iSide << "Third_Fit"; - std::string tmp_hn = streamFileTmp.str(); - const char* histo_name = tmp_hn.c_str(); - m_h_phiVsNstripsSideHistoVector[ 4*iLayer + 2*iSide +iModule] -> SetName(histo_name); - m_h_phiVsNstripsSideHistoVector[ 4*iLayer + 2*iSide +iModule] -> Write(); - } - - } - - - if ( fitResult == 0 ) { - FitFlag[iLayer][iSide][iModule]= 1; - } else { - DBUploadFlag="R"; - FitFlag[iLayer][iSide][iModule]= 0; - ATH_MSG_WARNING("Fit Failed! Unable to get LorentzAngle"); - } - double A = par[0]; - double LA = par[1]; // Lorentz Angle - double B = par[2]; - double sigma = par[3]; - double err_A = err_par[0]; - double err_LA = err_par[1]; // Lorentz Angle - double err_B = err_par[2]; - double err_sigma = err_par[3]; - float MCW = LAfit->Eval(LA,0,0,0); //Min-cluster-width - float err_MCW = LAfit->Eval(fabs(err_par[1]),0,0,0); //Min-cluster-width - // float lorentz = fabs(LA); - - A_BarrelSide[iLayer][iSide][iModule]= A; - LA_BarrelSide[iLayer][iSide][iModule]=LA; - B_BarrelSide[iLayer][iSide][iModule]=B; - Sigma_BarrelSide[iLayer][iSide][iModule]=sigma; - Err_A_BarrelSide[iLayer][iSide][iModule]= err_A; - Err_LA_BarrelSide[iLayer][iSide][iModule]=err_LA; - Err_B_BarrelSide[iLayer][iSide][iModule]=err_B; - Err_Sigma_BarrelSide[iLayer][iSide][iModule]=err_sigma; - MCW_BarrelSide[iLayer][iSide][iModule]=MCW; - Err_MCW_BarrelSide[iLayer][iSide][iModule]=err_MCW; - Chisq_BarrelSide[iLayer][iSide][iModule]=LAfit->GetChisquare(); - - - } - - } - - } - - - if ( m_LorentzAngleDebugMode ) { - fitFile->Close(); - } - - for ( int iLayer = 0; iLayer < n_barrels; ++iLayer ) { - for ( int iSide = 0; iSide < 2; ++iSide ) { - for ( int iModule = 0; iModule < 2; ++iModule ) { - Identifier waferId = m_pSCTHelper->wafer_id( BARREL, iLayer, 0, 0, iSide ); - int ch = 0; - outFile << "<folderDefinition folder=\"SCT/Derived/LorentzAngleRun2_v2\" version=\"multi\">" << linefeed - << " <folderDescription>" << linefeed - << " <timeStamp>run-lumi</timeStamp>" << linefeed - << " <addrHeader>" << linefeed - << " <address_header service_type=\"71\" clid=\"1238547719\">" << linefeed - << " </addrHeader>" << linefeed - << " <typeName>CondAttrListCollection</typeName>" << linefeed - << " </folderDescription>" << linefeed - - << " <payloadDescription>" << linefeed - - - << " <payloadType name=\"moduleType\">" << moduleint[iModule] << "</payloadType>" << linefeed - << " <payloadType name=\"lorentzAngle\">" << LA_BarrelSide[iLayer][iSide][iModule] << "</payloadType>" << linefeed - << " <payloadType name=\"err_lorentzAngle\">" << Err_LA_BarrelSide[iLayer][iSide][iModule]<< "</payloadType>" << linefeed - << " <payloadType name=\"chisq\">" << Chisq_BarrelSide[iLayer][iSide][iModule]<< "</payloadType>" << linefeed - << " <payloadType name=\"fitParam_a\">" << A_BarrelSide[iLayer][iSide][iModule] << "</payloadType>" << linefeed - << " <payloadType name=\"err_a\">" << Err_A_BarrelSide[iLayer][iSide][iModule] << "</payloadType>" << linefeed - << " <payloadType name=\"fitParam_b\">" << B_BarrelSide[iLayer][iSide][iModule] << "</payloadType>" << linefeed - << " <payloadType name=\"err_b\">" << Err_B_BarrelSide[iLayer][iSide][iModule] << "</payloadType>" << linefeed - << " <payloadType name=\"fitParam_sigma\">" << Sigma_BarrelSide[iLayer][iSide][iModule] << "</payloadType>" << linefeed - << " <payloadType name=\"err_sigma\">" << Err_Sigma_BarrelSide[iLayer][iSide][iModule] << "</payloadType>" << linefeed - << " <payloadType name=\"minClusterWidth\">" << MCW_BarrelSide[iLayer][iSide][iModule] << "</payloadType>" << linefeed - << " <payloadType name=\"err_minClusterWidth\">" << Err_MCW_BarrelSide[iLayer][iSide][iModule] << "</payloadType>" << linefeed - - << " </payloadDescription>" <<linefeed - << " <channel id=\"" << ch << "\" name=\""<<iLayer<< "_"<<iSide<<" \" />" << linefeed - << "</folderDefinition>" << endl; - - ch++; - - //--- DB output - if ( m_writeToCool ) { - // if ( m_pCalibWriteTool->createListLA( waferId, m_pSCTHelper, 10000, moduleint[iModule], LA_BarrelSide[iLayer][iSide][iModule],MCW_BarrelSide[iLayer][iSide][iModule] ).isFailure() ) { - if ( m_pCalibWriteTool->createListLA( waferId, m_pSCTHelper, 10000, moduleint[iModule], LA_BarrelSide[iLayer][iSide][iModule], Err_LA_BarrelSide[iLayer][iSide][iModule], Chisq_BarrelSide[iLayer][iSide][iModule], A_BarrelSide[iLayer][iSide][iModule], Err_A_BarrelSide[iLayer][iSide][iModule], B_BarrelSide[iLayer][iSide][iModule], Err_B_BarrelSide[iLayer][iSide][iModule], Sigma_BarrelSide[iLayer][iSide][iModule], Err_Sigma_BarrelSide[iLayer][iSide][iModule], MCW_BarrelSide[iLayer][iSide][iModule], Err_MCW_BarrelSide[iLayer][iSide][iModule] ).isFailure() ) { - ATH_MSG_ERROR("Unable to run createListLA"); - return StatusCode::FAILURE; - } - } - - } - } - } - - //--- Tail of XML outputs - outFile << "</folder>" << endl; - - //--- Summary XML output - ostringstream summaryList; - for ( int i = 0; i < n_barrels; ++i ) { - for ( int iSide = 0; iSide < 2; ++iSide ) { - for ( int iModule = 0; iModule < 2; ++iModule ) { - const std::string thisPart=shortNames[bec2Index(BARREL)]; - summaryList<< " <parts>" << linefeed - << xmlValue("part",thisPart) << linefeed - << xmlValue("layer", i) << linefeed - << xmlValue("Side", iSide) << linefeed - << xmlValue("Module", module[iModule]) << linefeed - << xmlValue("lorentzAngle", LA_BarrelSide[i][iSide][iModule]) << linefeed - << xmlValue("minClusterWidth", MCW_BarrelSide[i][iSide][iModule]) << linefeed - << xmlValue("Fit", FitFlag[i][iSide][iModule]) << linefeed - <<" </parts>" << linefeed; - } - } - } - - std::ofstream & file = m_outLASummary; - typedef std::pair<string, string> TwoStrings; - typedef std::map<std::string, TwoStrings > Names; - Names nameAssociation; - nameAssociation["LorentzAngle"]=TwoStrings(m_LorentzAngleSummaryFile, "LorentzAngleInfo.xsl"); - Names::iterator found=nameAssociation.find("LorentzAngle"); - if (found!=nameAssociation.end()) { - std::string filename=found->second.first; - std::string xslName=found->second.second; - file.open( filename.c_str(), std::ios::out ); - if ( !file.good() ) return StatusCode::FAILURE; - file << xmlHeader<< linefeed<< associateStylesheet(xslName) << linefeed<< "<run>"<< endl; - } - else { - ATH_MSG_ERROR(" argument \"type\" needs to be LorentzAngle."); - return StatusCode::FAILURE; - } - - file << xmlValue("RunNumber", m_runNumber.value()) << linefeed - << xmlValue("StartTime", m_utcBegin) << linefeed - << xmlValue("EndTime", m_utcEnd) << linefeed - << xmlValue("Duration", m_calibEvtInfoTool->duration() ) << linefeed - << xmlValue("LB", m_LBRange) << linefeed - << xmlValue("Events", m_numberOfEvents) << linefeed - << xmlValue("Flag", DBUploadFlag) << linefeed - << " <data>"<< endl; - - - if ( wrapUpXML4Summary( m_outLASummary, "LorentzAngle", summaryList ).isFailure() ) { - ATH_MSG_ERROR("Problem in closing LorentzAngle file"); + ATH_MSG_INFO("----- in getLorentzAngle() -----"); + + //--- Initialization + + float A_BarrelSide[n_barrels][2][2] = {{{0}, {0}}, {{0}, {0}}}; + float LA_BarrelSide[n_barrels][2][2] = {{{0}, {0}}, {{0}, {0}}}; + float B_BarrelSide[n_barrels][2][2] = {{{0}, {0}}, {{0}, {0}}}; + float Sigma_BarrelSide[n_barrels][2][2] = {{{0}, {0}}, {{0}, {0}}}; + + float Err_A_BarrelSide[n_barrels][2][2] = {{{0}, {0}}, {{0}, {0}}}; + float Err_LA_BarrelSide[n_barrels][2][2] = {{{0}, {0}}, {{0}, {0}}}; + float Err_B_BarrelSide[n_barrels][2][2] = {{{0}, {0}}, {{0}, {0}}}; + float Err_Sigma_BarrelSide[n_barrels][2][2] = {{{0}, {0}}, {{0}, {0}}}; + + float MCW_BarrelSide[n_barrels][2][2] = {{{0}, {0}}, {{0}, {0}}}; + float Err_MCW_BarrelSide[n_barrels][2][2] = {{{0}, {0}}, {{0}, {0}}}; + float Chisq_BarrelSide[n_barrels][2][2] = {{{0}, {0}}, {{0}, {0}}}; + + string DBUploadFlag{"G"}; // fit status flag + string module[2] = {"100", "111"}; + int moduleint[2] = {100, 111}; + + int FitFlag[n_barrels][2][2] = {{{0}, {0}}, {{0}, {0}}}; // fit status flag + + TFile* fitFile; + + //--- RunNumber + std::ostringstream runnum; + runnum << m_runNumber.value(); + + //--- Directory in HIST + std::string stem; + + //--- Barrel + stem = "/run_" + runnum.str() + "/SCT/GENERAL/lorentz/"; + m_h_phiVsNstripsSideHistoVector.clear(); + for (int iLayer{0}; iLayer < n_barrels ; ++iLayer) { + for (int iSide{0}; iSide < 2; ++iSide) { + for (int iModule{0}; iModule < 2; ++iModule) { + ostringstream streamHist; + streamHist << "h_phiVsNstrips_" << module[iModule] << "_" << iLayer << "Side" << iSide; + std::string histName{stem + streamHist.str()}; + TProfile* hist_tmp{dynamic_cast<TProfile*>(m_inputHist->Get(histName.c_str()))}; + if (hist_tmp ==nullptr) { + ATH_MSG_ERROR("Unable to get histogram for LorentzAngle : " << histName); + return StatusCode::FAILURE; + } + m_h_phiVsNstripsSideHistoVector.push_back(hist_tmp); + } + } + } + + //--- XML file + const char* outputLorentzAngleFileName{m_LorentzAngleFile.value().c_str()}; + ofstream outFile{outputLorentzAngleFileName, std::ios::out}; + if (!outFile.good()) { + ATH_MSG_ERROR("Unable to open LorentzAngleFile : " << outputLorentzAngleFileName); + return StatusCode::FAILURE; + } + + //--- Header for XML outputs + ostringstream osHeader; + osHeader << "<folder>" << endl; + outFile << osHeader.str(); + + fitFile = new TFile("FittingDebugFile.root", "RECREATE"); + + //--- Barrel + for (int iLayer{0}; iLayer < n_barrels; ++iLayer) { + for (int iSide{0}; iSide < 2; ++iSide) { + for (int iModule{0}; iModule < 2; ++iModule) { + if (iLayer==1 and iModule==0) continue; // Layer 1 doesn't contain 100 modules + ATH_MSG_INFO("LorentzAngle fit start : " << 4*iLayer + iSide +1 + iModule << " / 16"); + Int_t fitResult; + Double_t par[4], err_par[4]; + TF1* LAfit{new TF1{"LAfit", LA_func, -9., 2., 4}}; + ostringstream streamFile; + streamFile << "h_phiVsNstrips_" << module[iModule] << "_" << iLayer << "Side" << iSide; + + LAfit->SetParLimits(3, 0.1, 50.); + LAfit->SetParNames("a", "LA", "b", "sigma"); + LAfit->SetParameters(1., -5., 1.13, 2.); + fitResult = m_h_phiVsNstripsSideHistoVector[4*iLayer + 2*iSide +iModule]->Fit("LAfit", "E", "", -9., 2.); + LAfit->GetParameters(par); + err_par[0] = LAfit->GetParError(0); + err_par[1] = LAfit->GetParError(1); + err_par[2] = LAfit->GetParError(2); + err_par[3] = LAfit->GetParError(3); + + //DEBUG MODE + if (m_LorentzAngleDebugMode) { + ostringstream streamFileTmp; + streamFileTmp << "h_phiVsNstrips_" << module[iModule] << "_" << iLayer << "Side" << iSide << "_First_Fit"; + std::string dn{streamFile.str()}; + std::string tmp_hn{streamFileTmp.str()}; + const char* dir_name{dn.c_str()}; + const char* histo_name{tmp_hn.c_str()}; + fitFile->cd(); + fitFile->mkdir(dir_name); //Creating Directories + fitFile->cd(dir_name); + m_h_phiVsNstripsSideHistoVector[4*iLayer + 2*iSide +iModule]->SetName(histo_name); + m_h_phiVsNstripsSideHistoVector[4*iLayer + 2*iSide +iModule]->Write(); + ATH_MSG_INFO("-------:Directory Name: " << dir_name << "--------"); + } + + if (fitResult != 0) { + ATH_MSG_INFO("Try to use parabola Fit to determine initial value!"); + TF1* parafit{new TF1{"parafit", "[0]*(x-[1])*(x-[1])+[2]", -9., 2.}}; + ATH_MSG_INFO("LorentzAngle 2nd para fit start : " << 4*iLayer + iSide +1 + iModule << " / 16"); + parafit->SetParameters(par[0], par[1], LAfit->Eval(par[1], 0, 0, 0)); + m_h_phiVsNstripsSideHistoVector[4*iLayer + 2*iSide +iModule]->Fit("parafit", "R", "", -9., 2.); + ATH_MSG_INFO("LorentzAngle 2nd pre fit start : " << 4*iLayer + iSide +1 + iModule << " / 16"); + par[1] = parafit->GetParameter(1); + LAfit->SetParameters(par[0], par[1], par[2], par[3]); + LAfit->SetParLimits(1, par[1], par[1]); + m_h_phiVsNstripsSideHistoVector[4*iLayer + 2*iSide +iModule]->Fit("LAfit", "R", "", -9., 2.); + LAfit->GetParameters(par); + LAfit->SetParLimits(1, -90., 90.); + LAfit->SetParameters(par[0], par[1], par[2], par[3]); + ATH_MSG_INFO("LorentzAngle 2nd main fit start : " << 4*iLayer + iSide +1 + iModule << " / 16"); + fitResult = m_h_phiVsNstripsSideHistoVector[4*iLayer + 2*iSide +iModule]->Fit("LAfit", "E", "", -9., 2.); + LAfit->GetParameters(par); + if (m_LorentzAngleDebugMode) { + ostringstream streamFileTmp; + streamFileTmp << "h_phiVsNstrips_" << module[iModule] << "_" << iLayer << "Side" << iSide << "Second_Fit"; + std::string tmp_hn{streamFileTmp.str()}; + const char* histo_name{tmp_hn.c_str()}; + m_h_phiVsNstripsSideHistoVector[4*iLayer + 2*iSide +iModule]->SetName(histo_name); + m_h_phiVsNstripsSideHistoVector[4*iLayer + 2*iSide +iModule]->Write(); + } + } + + if (fitResult != 0) { + ATH_MSG_INFO("Try to fix one parameter sigma=2.0 to determine other initial value!"); + ATH_MSG_INFO("LorentzAngle 3rd pre fit start : " << 4*iLayer + iSide +1+ iModule << " / 16"); + LAfit->SetParameters(par[0], par[1], par[2], 2.); + LAfit->SetParLimits(3, 2., 2.); + m_h_phiVsNstripsSideHistoVector[4*iLayer + 2*iSide +iModule]->Fit("LAfit", "R", "", -9., 2.); + LAfit->GetParameters(par); + LAfit->SetParLimits(3, 0., 50.); + LAfit->SetParameters(par[0], par[1], par[2], par[3]); + ATH_MSG_INFO("LorentzAngle 3rd main fit start : " << 4*iLayer + iSide +1 +iModule << " / 16"); + fitResult = m_h_phiVsNstripsSideHistoVector[4*iLayer + 2*iSide +iModule]->Fit("LAfit", "E", "", -9., 2.); + LAfit->GetParameters(par); + if (m_LorentzAngleDebugMode) { + ostringstream streamFileTmp; + streamFileTmp << "h_phiVsNstrips_" << module[iModule] << "_" << iLayer << "Side" << iSide << "Third_Fit"; + std::string tmp_hn{streamFileTmp.str()}; + const char* histo_name{tmp_hn.c_str()}; + m_h_phiVsNstripsSideHistoVector[4*iLayer + 2*iSide +iModule]->SetName(histo_name); + m_h_phiVsNstripsSideHistoVector[4*iLayer + 2*iSide +iModule]->Write(); + } + } + + if (fitResult == 0) { + FitFlag[iLayer][iSide][iModule] = 1; + } else { + DBUploadFlag = "R"; + FitFlag[iLayer][iSide][iModule] = 0; + ATH_MSG_WARNING("Fit Failed! Unable to get LorentzAngle"); + } + double A{par[0]}; + double LA{par[1]}; // Lorentz Angle + double B{par[2]}; + double sigma{par[3]}; + double err_A{err_par[0]}; + double err_LA{err_par[1]}; // Lorentz Angle + double err_B{err_par[2]}; + double err_sigma{err_par[3]}; + float MCW{static_cast<float>(LAfit->Eval(LA, 0, 0, 0))}; //Min-cluster-width + float err_MCW{static_cast<float>(LAfit->Eval(fabs(err_par[1]), 0, 0, 0))}; //Min-cluster-width + + A_BarrelSide[iLayer][iSide][iModule] = A; + LA_BarrelSide[iLayer][iSide][iModule] = LA; + B_BarrelSide[iLayer][iSide][iModule] = B; + Sigma_BarrelSide[iLayer][iSide][iModule] = sigma; + Err_A_BarrelSide[iLayer][iSide][iModule] = err_A; + Err_LA_BarrelSide[iLayer][iSide][iModule] = err_LA; + Err_B_BarrelSide[iLayer][iSide][iModule] = err_B; + Err_Sigma_BarrelSide[iLayer][iSide][iModule] = err_sigma; + MCW_BarrelSide[iLayer][iSide][iModule] = MCW; + Err_MCW_BarrelSide[iLayer][iSide][iModule] = err_MCW; + Chisq_BarrelSide[iLayer][iSide][iModule] = LAfit->GetChisquare(); + } + } + } + + if (m_LorentzAngleDebugMode) { + fitFile->Close(); + } + + for (int iLayer{0}; iLayer < n_barrels; ++iLayer) { + for (int iSide{0}; iSide < 2; ++iSide) { + for (int iModule{0}; iModule < 2; ++iModule) { + Identifier waferId{m_pSCTHelper->wafer_id(BARREL, iLayer, 0, 0, iSide)}; + int ch{0}; + outFile << "<folderDefinition folder=\"SCT/Derived/LorentzAngleRun2_v2\" version=\"multi\">" << linefeed + << " <folderDescription>" << linefeed + << " <timeStamp>run-lumi</timeStamp>" << linefeed + << " <addrHeader>" << linefeed + << " <address_header service_type=\"71\" clid=\"1238547719\">" << linefeed + << " </addrHeader>" << linefeed + << " <typeName>CondAttrListCollection</typeName>" << linefeed + << " </folderDescription>" << linefeed + << " <payloadDescription>" << linefeed + << " <payloadType name=\"moduleType\">" << moduleint[iModule] << "</payloadType>" << linefeed + << " <payloadType name=\"lorentzAngle\">" << LA_BarrelSide[iLayer][iSide][iModule] << "</payloadType>" << linefeed + << " <payloadType name=\"err_lorentzAngle\">" << Err_LA_BarrelSide[iLayer][iSide][iModule] << "</payloadType>" << linefeed + << " <payloadType name=\"chisq\">" << Chisq_BarrelSide[iLayer][iSide][iModule] << "</payloadType>" << linefeed + << " <payloadType name=\"fitParam_a\">" << A_BarrelSide[iLayer][iSide][iModule] << "</payloadType>" << linefeed + << " <payloadType name=\"err_a\">" << Err_A_BarrelSide[iLayer][iSide][iModule] << "</payloadType>" << linefeed + << " <payloadType name=\"fitParam_b\">" << B_BarrelSide[iLayer][iSide][iModule] << "</payloadType>" << linefeed + << " <payloadType name=\"err_b\">" << Err_B_BarrelSide[iLayer][iSide][iModule] << "</payloadType>" << linefeed + << " <payloadType name=\"fitParam_sigma\">" << Sigma_BarrelSide[iLayer][iSide][iModule] << "</payloadType>" << linefeed + << " <payloadType name=\"err_sigma\">" << Err_Sigma_BarrelSide[iLayer][iSide][iModule] << "</payloadType>" << linefeed + << " <payloadType name=\"minClusterWidth\">" << MCW_BarrelSide[iLayer][iSide][iModule] << "</payloadType>" << linefeed + << " <payloadType name=\"err_minClusterWidth\">" << Err_MCW_BarrelSide[iLayer][iSide][iModule] << "</payloadType>" << linefeed + << " </payloadDescription>" << linefeed + << " <channel id=\"" << ch << "\" name=\"" << iLayer << "_" << iSide << " \" />" << linefeed + << "</folderDefinition>" << endl; + + ch++; + + //--- DB output + if (m_writeToCool) { + if (m_pCalibWriteTool->createListLA(waferId, m_pSCTHelper, 10000, moduleint[iModule], LA_BarrelSide[iLayer][iSide][iModule], Err_LA_BarrelSide[iLayer][iSide][iModule], Chisq_BarrelSide[iLayer][iSide][iModule], A_BarrelSide[iLayer][iSide][iModule], Err_A_BarrelSide[iLayer][iSide][iModule], B_BarrelSide[iLayer][iSide][iModule], Err_B_BarrelSide[iLayer][iSide][iModule], Sigma_BarrelSide[iLayer][iSide][iModule], Err_Sigma_BarrelSide[iLayer][iSide][iModule], MCW_BarrelSide[iLayer][iSide][iModule], Err_MCW_BarrelSide[iLayer][iSide][iModule]).isFailure()) { + ATH_MSG_ERROR("Unable to run createListLA"); + return StatusCode::FAILURE; + } + } + + } + } + } + + //--- Tail of XML outputs + outFile << "</folder>" << endl; + + //--- Summary XML output + ostringstream summaryList; + for (int i{0}; i < n_barrels; ++i) { + for (int iSide{0}; iSide < 2; ++iSide) { + for (int iModule{0}; iModule < 2; ++iModule) { + const std::string thisPart{shortNames[bec2Index(BARREL)]}; + summaryList << " <parts>" << linefeed + << xmlValue("part", thisPart) << linefeed + << xmlValue("layer", i) << linefeed + << xmlValue("Side", iSide) << linefeed + << xmlValue("Module", module[iModule]) << linefeed + << xmlValue("lorentzAngle", LA_BarrelSide[i][iSide][iModule]) << linefeed + << xmlValue("minClusterWidth", MCW_BarrelSide[i][iSide][iModule]) << linefeed + << xmlValue("Fit", FitFlag[i][iSide][iModule]) << linefeed + << " </parts>" << linefeed; + } + } + } + + std::ofstream& file{m_outLASummary}; + typedef std::pair<string, string> TwoStrings; + typedef std::map<std::string, TwoStrings > Names; + Names nameAssociation; + nameAssociation["LorentzAngle"]=TwoStrings(m_LorentzAngleSummaryFile, "LorentzAngleInfo.xsl"); + Names::iterator found{nameAssociation.find("LorentzAngle")}; + if (found!=nameAssociation.end()) { + std::string filename{found->second.first}; + std::string xslName{found->second.second}; + file.open(filename.c_str(), std::ios::out); + if (!file.good()) return StatusCode::FAILURE; + file << xmlHeader << linefeed << associateStylesheet(xslName) << linefeed << "<run>" << endl; + } else { + ATH_MSG_ERROR(" argument \"type\" needs to be LorentzAngle."); + return StatusCode::FAILURE; + } + + file << xmlValue("RunNumber", m_runNumber.value()) << linefeed + << xmlValue("StartTime", m_utcBegin) << linefeed + << xmlValue("EndTime", m_utcEnd) << linefeed + << xmlValue("Duration", m_calibEvtInfoTool->duration()) << linefeed + << xmlValue("LB", m_LBRange) << linefeed + << xmlValue("Events", m_numberOfEvents) << linefeed + << xmlValue("Flag", DBUploadFlag) << linefeed + << " <data>" << endl; + + if (wrapUpXML4Summary(m_outLASummary, "LorentzAngle", summaryList).isFailure()) { + ATH_MSG_ERROR("Problem in closing LorentzAngle file"); + return StatusCode::FAILURE; + } + + //--- DB output + if (m_writeToCool) { + if (m_pCalibWriteTool->wrapUpLorentzAngle().isFailure()) { + ATH_MSG_ERROR("Could not get LorentzAngle"); return StatusCode::FAILURE; - } - - //--- DB output - if ( m_writeToCool ) { - if ( m_pCalibWriteTool->wrapUpLorentzAngle().isFailure() ) { - ATH_MSG_ERROR("Could not get LorentzAngle"); - return StatusCode::FAILURE; - } - } - - return StatusCode::SUCCESS; - + } + } + return StatusCode::SUCCESS; } /////////////////////////////////////////////////////////////////////////////////// // Functions to handle XML File for COOL /////////////////////////////////////////////////////////////////////////////////// -StatusCode SCTCalib::openXML4DB( std::ofstream& file, const char* type, const char* tag, IOVTime start, IOVTime end ) const { - if ( !strcmp( type, "DeadStrip" ) ) { - file.open( m_deadStripsFile.value().c_str(), std::ios::out ); - if ( !file.good() ) return StatusCode::FAILURE; - file << "<channels server=\"ATLAS_COOLPROD\" schema=\"ATLAS_COOLOFL_SCT\" dbname=\"MONP200\" folder=\"SCT/Derived/DeadStrips\" "; - } else if ( !strcmp( type, "DeadChip" ) ) { - file.open( m_deadChipsFile.value().c_str(), std::ios::out ); - if ( !file.good() ) return StatusCode::FAILURE; - file << "<channels server=\"ATLAS_COOLPROD\" schema=\"ATLAS_COOLOFL_SCT\" dbname=\"MONP200\" folder=\"SCT/Derived/DeadChips\" "; - } else { - ATH_MSG_ERROR("in openXML4DB : argument \"type\" needs to be (DeadStrip, DeadChip)."); - return StatusCode::FAILURE; - } - file << "since=\"" << start.re_time() << "\" " - << "until=\"" << end.re_time() << "\" " - << "tag=\"" << tag << "\" " - << "version=\"" << "multi\">" << linefeed; - return StatusCode::SUCCESS; +StatusCode SCTCalib::openXML4DB(std::ofstream& file, const char* type, const char* tag, IOVTime start, IOVTime end) const { + if (!strcmp(type, "DeadStrip")) { + file.open(m_deadStripsFile.value().c_str(), std::ios::out); + if (!file.good()) return StatusCode::FAILURE; + file << "<channels server=\"ATLAS_COOLPROD\" schema=\"ATLAS_COOLOFL_SCT\" dbname=\"MONP200\" folder=\"SCT/Derived/DeadStrips\" "; + } else if (!strcmp(type, "DeadChip")) { + file.open(m_deadChipsFile.value().c_str(), std::ios::out); + if (!file.good()) return StatusCode::FAILURE; + file << "<channels server=\"ATLAS_COOLPROD\" schema=\"ATLAS_COOLOFL_SCT\" dbname=\"MONP200\" folder=\"SCT/Derived/DeadChips\" "; + } else { + ATH_MSG_ERROR("in openXML4DB : argument \"type\" needs to be (DeadStrip, DeadChip)."); + return StatusCode::FAILURE; + } + file << "since=\"" << start.re_time() << "\" " + << "until=\"" << end.re_time() << "\" " + << "tag=\"" << tag << "\" " + << "version=\"" << "multi\">" << linefeed; + return StatusCode::SUCCESS; } -StatusCode SCTCalib::closeXML4DB( std::ofstream& file ) const { - file << "</channels>" << endl; - if ( file.is_open() ) { - file.close(); - return StatusCode::SUCCESS; - } else { - return StatusCode::FAILURE; - } +StatusCode SCTCalib::closeXML4DB(std::ofstream& file) const { + file << "</channels>" << endl; + if (file.is_open()) { + file.close(); + return StatusCode::SUCCESS; + } else { + return StatusCode::FAILURE; + } } -StatusCode SCTCalib::addToXML4DB( std::ofstream& file, const Identifier& waferId, const char* DefectType, float Threshold, const char* DefectList ) const { - std::string tmp = DefectList; - int length = tmp.length(); - std::string Defect4DB = tmp.substr( 1, length-2 ); // Removing first&end spaces in DefectList +StatusCode SCTCalib::addToXML4DB(std::ofstream& file, const Identifier& waferId, const char* DefectType, float Threshold, const char* DefectList) const { + std::string tmp{DefectList}; + int length{static_cast<int>(tmp.length())}; + std::string Defect4DB{tmp.substr(1, length-2)}; // Removing first&end spaces in DefectList - file << xmlOpenChannel( m_pSCTHelper->module_id( waferId ).get_identifier32().get_compact(), m_iovStart.re_time(), m_iovStop.re_time() ) << linefeed - << xmlValue("SampleSize","10000") << linefeed - << xmlValue("BarrelEndcap", m_pSCTHelper->barrel_ec( waferId ) )<< linefeed - << xmlValue("Layer", m_pSCTHelper->layer_disk( waferId ))<< linefeed - << xmlValue("Eta", m_pSCTHelper->eta_module( waferId )) << linefeed - << xmlValue("Phi", m_pSCTHelper->phi_module( waferId )) << linefeed - << xmlValue("DefectType", DefectType)<< linefeed - << xmlValue("Threshold", Threshold ) << linefeed - << xmlValue("DefectList",Defect4DB) << linefeed - << xmlCloseChannel() << endl; + file << xmlOpenChannel(m_pSCTHelper->module_id(waferId).get_identifier32().get_compact(), m_iovStart.re_time(), m_iovStop.re_time()) << linefeed + << xmlValue("SampleSize", "10000") << linefeed + << xmlValue("BarrelEndcap", m_pSCTHelper->barrel_ec(waferId)) << linefeed + << xmlValue("Layer", m_pSCTHelper->layer_disk(waferId)) << linefeed + << xmlValue("Eta", m_pSCTHelper->eta_module(waferId)) << linefeed + << xmlValue("Phi", m_pSCTHelper->phi_module(waferId)) << linefeed + << xmlValue("DefectType", DefectType) << linefeed + << xmlValue("Threshold", Threshold) << linefeed + << xmlValue("DefectList", Defect4DB) << linefeed + << xmlCloseChannel() << endl; - return StatusCode::SUCCESS; + return StatusCode::SUCCESS; } @@ -2461,703 +2409,694 @@ StatusCode SCTCalib::addToXML4DB( std::ofstream& file, const Identifier& waferId // Functions to handle XML File for Summary /////////////////////////////////////////////////////////////////////////////////// -StatusCode SCTCalib::openXML4DeadSummary( std::ofstream& file, const char* type, int n_Module, int n_Link, int n_Chip, int n_Strip ) const { - if ( !strcmp( type, "DEAD" ) ) { - file.open( m_deadSummaryFile.value().c_str(), std::ios::out ); - if ( !file.good() ) return StatusCode::FAILURE; - file << xmlHeader<< linefeed<< associateStylesheet("DeadInfo.xsl") << linefeed - << "<run>"<< linefeed; - } else { - ATH_MSG_ERROR("in openXML4DeadSummary : argument \"type\" needs to be \"DEAD\"."); - return StatusCode::FAILURE; - } - - //--- Upload flag - string strUploadFlag = "U"; - bool isNonZero( false ); - - if ( (m_doDeadChip && m_deadChipUploadTest) || (m_doDeadStrip && m_deadStripUploadTest) ) { - if ( n_Chip > 0 ) { - isNonZero = true; - strUploadFlag = "G"; - } else { - strUploadFlag = "R"; - } - } - - //--- Upload test result - ostringstream osNonZero; - osNonZero << "#chips or #strips is non-zero"; - ostringstream osFlagReason; - if ( !isNonZero ) osFlagReason << "FAILED in " << osNonZero.str(); - string strFlagEnable = ( m_deadChipUploadTest || m_deadStripUploadTest ) ? "ENABLED" : "DISABLED"; - ostringstream osCheckList; - osCheckList << osNonZero.str(); - - file <<xmlValue("RunNumber", m_runNumber.value()) << linefeed - <<xmlValue("StartTime", m_utcBegin) << linefeed - <<xmlValue("EndTime", m_utcEnd) << linefeed - <<xmlValue("Duration", m_calibEvtInfoTool->duration()) << linefeed - <<xmlValue("LB", m_calibEvtInfoTool->numLumiBlocks())<< linefeed - <<xmlValue("Events", m_numberOfEvents ) << linefeed - <<xmlValue("Modules", n_Module) << linefeed - <<xmlValue("Links", n_Link) << linefeed - <<xmlValue("Chips", n_Chip) << linefeed - <<xmlValue("Strips", n_Strip) << linefeed - <<xmlValue("Flag", strUploadFlag) << linefeed - <<xmlValue("FlagReason", osFlagReason.str()) << linefeed - <<xmlValue("FlagEnable", strFlagEnable) << linefeed - <<xmlValue("CheckList", osCheckList.str()) << linefeed - <<" <modules>" << endl; - - return StatusCode::SUCCESS; +StatusCode SCTCalib::openXML4DeadSummary(std::ofstream& file, const char* type, int n_Module, int n_Link, int n_Chip, int n_Strip) const { + if (!strcmp(type, "DEAD")) { + file.open(m_deadSummaryFile.value().c_str(), std::ios::out); + if (!file.good()) return StatusCode::FAILURE; + file << xmlHeader << linefeed << associateStylesheet("DeadInfo.xsl") << linefeed + << "<run>" << linefeed; + } else { + ATH_MSG_ERROR("in openXML4DeadSummary : argument \"type\" needs to be \"DEAD\"."); + return StatusCode::FAILURE; + } + + //--- Upload flag + string strUploadFlag{"U"}; + bool isNonZero{false}; + + if ((m_doDeadChip and m_deadChipUploadTest) or (m_doDeadStrip and m_deadStripUploadTest)) { + if (n_Chip > 0) { + isNonZero = true; + strUploadFlag = "G"; + } else { + strUploadFlag = "R"; + } + } + + //--- Upload test result + ostringstream osNonZero; + osNonZero << "#chips or #strips is non-zero"; + ostringstream osFlagReason; + if (!isNonZero) osFlagReason << "FAILED in " << osNonZero.str(); + string strFlagEnable{(m_deadChipUploadTest or m_deadStripUploadTest) ? "ENABLED" : "DISABLED"}; + ostringstream osCheckList; + osCheckList << osNonZero.str(); + + file << xmlValue("RunNumber", m_runNumber.value()) << linefeed + << xmlValue("StartTime", m_utcBegin) << linefeed + << xmlValue("EndTime", m_utcEnd) << linefeed + << xmlValue("Duration", m_calibEvtInfoTool->duration()) << linefeed + << xmlValue("LB", m_calibEvtInfoTool->numLumiBlocks()) << linefeed + << xmlValue("Events", m_numberOfEvents) << linefeed + << xmlValue("Modules", n_Module) << linefeed + << xmlValue("Links", n_Link) << linefeed + << xmlValue("Chips", n_Chip) << linefeed + << xmlValue("Strips", n_Strip) << linefeed + << xmlValue("Flag", strUploadFlag) << linefeed + << xmlValue("FlagReason", osFlagReason.str()) << linefeed + << xmlValue("FlagEnable", strFlagEnable) << linefeed + << xmlValue("CheckList", osCheckList.str()) << linefeed + << " <modules>" << endl; + + return StatusCode::SUCCESS; } -StatusCode SCTCalib::openXML4MonSummary( std::ofstream& file, const char* type ) const { - typedef std::pair<string, string> TwoStrings; - typedef std::map<std::string, TwoStrings > Names; - Names nameAssociation; - nameAssociation["NoiseOccupancy"]=TwoStrings(m_noiseOccupancySummaryFile, "NoiseOccupancyInfo.xsl"); - nameAssociation["RawOccupancy"]=TwoStrings(m_rawOccupancySummaryFile, "RawOccupancyInfo.xsl"); - nameAssociation["Efficiency"]=TwoStrings(m_efficiencySummaryFile, "EfficiencyInfo.xsl"); - nameAssociation["BSErrors"]=TwoStrings(m_BSErrorSummaryFile, "BSErrorInfo.xsl"); - nameAssociation["BSErrorsModule"]=TwoStrings(m_BSErrorModuleFile, "BSErrorInfo.xsl"); - // nameAssociation["LorentzAngle"]=TwoStrings(m_LorentzAngleSummaryFile, "LorentzAngleInfo.xsl"); - Names::iterator found=nameAssociation.find(type); - if (found!=nameAssociation.end()) { - std::string filename=found->second.first; - std::string xslName=found->second.second; - // - file.open( filename.c_str(), std::ios::out ); - if ( !file.good() ) return StatusCode::FAILURE; - file << xmlHeader<< linefeed<< associateStylesheet(xslName) << linefeed<< "<run>"<< endl; - } else { - ATH_MSG_ERROR("in openXML4MonSummary : argument \"type\" needs to be ( NoiseOccupancy, RawOccupancy, Efficiency, BSErrors )."); - return StatusCode::FAILURE; - } - file << xmlValue("RunNumber", m_runNumber.value() ) << linefeed - << xmlValue("StartTime", m_utcBegin ) << linefeed - << xmlValue("EndTime", m_utcEnd ) << linefeed - << xmlValue("Duration", m_calibEvtInfoTool->duration() ) << linefeed - << xmlValue("LB", m_LBRange ) << linefeed - << xmlValue("Events", m_numberOfEvents ) << linefeed - << " <data>"<< endl; - return StatusCode::SUCCESS; +StatusCode SCTCalib::openXML4MonSummary(std::ofstream& file, const char* type) const { + typedef std::pair<string, string> TwoStrings; + typedef std::map<std::string, TwoStrings> Names; + Names nameAssociation; + nameAssociation["NoiseOccupancy"] = TwoStrings(m_noiseOccupancySummaryFile, "NoiseOccupancyInfo.xsl"); + nameAssociation["RawOccupancy"] = TwoStrings(m_rawOccupancySummaryFile, "RawOccupancyInfo.xsl"); + nameAssociation["Efficiency"] = TwoStrings(m_efficiencySummaryFile, "EfficiencyInfo.xsl"); + nameAssociation["BSErrors"] = TwoStrings(m_BSErrorSummaryFile, "BSErrorInfo.xsl"); + nameAssociation["BSErrorsModule"] = TwoStrings(m_BSErrorModuleFile, "BSErrorInfo.xsl"); + // nameAssociation["LorentzAngle"]=TwoStrings(m_LorentzAngleSummaryFile, "LorentzAngleInfo.xsl"); + Names::iterator found{nameAssociation.find(type)}; + if (found!=nameAssociation.end()) { + std::string filename{found->second.first}; + std::string xslName{found->second.second}; + // + file.open(filename.c_str(), std::ios::out); + if (!file.good()) return StatusCode::FAILURE; + file << xmlHeader << linefeed << associateStylesheet(xslName) << linefeed << "<run>" << endl; + } else { + ATH_MSG_ERROR("in openXML4MonSummary : argument \"type\" needs to be (NoiseOccupancy, RawOccupancy, Efficiency, BSErrors)."); + return StatusCode::FAILURE; + } + file << xmlValue("RunNumber", m_runNumber.value()) << linefeed + << xmlValue("StartTime", m_utcBegin) << linefeed + << xmlValue("EndTime", m_utcEnd) << linefeed + << xmlValue("Duration", m_calibEvtInfoTool->duration()) << linefeed + << xmlValue("LB", m_LBRange) << linefeed + << xmlValue("Events", m_numberOfEvents) << linefeed + << " <data>" << endl; + return StatusCode::SUCCESS; } -StatusCode SCTCalib::wrapUpXML4Summary( std::ofstream& file, const char* type, std::ostringstream& list ) const { - file << list.str(); - if ( !strcmp( type, "DEAD" ) ) { - file << " </modules>" << endl; - } else if ( !strcmp( type, "NoiseOccupancy" ) || !strcmp( type, "RawOccupancy" ) || !strcmp( type, "Efficiency" ) || !strcmp( type, "BSErrors" ) || !strcmp( type, "LorentzAngle" ) ) { - file << " </data>" << endl; - } - file << "</run>" << endl; - - if ( file.is_open() ) { - file.close(); - return StatusCode::SUCCESS; - } else { - return StatusCode::FAILURE; - } - +StatusCode SCTCalib::wrapUpXML4Summary(std::ofstream& file, const char* type, std::ostringstream& list) const { + file << list.str(); + if (!strcmp(type, "DEAD")) { + file << " </modules>" << endl; + } else if (!strcmp(type, "NoiseOccupancy") or !strcmp(type, "RawOccupancy") or !strcmp(type, "Efficiency") or !strcmp(type, "BSErrors") or !strcmp(type, "LorentzAngle")) { + file << " </data>" << endl; + } + file << "</run>" << endl; + + if (file.is_open()) { + file.close(); + return StatusCode::SUCCESS; + } else { + return StatusCode::FAILURE; + } } -StatusCode SCTCalib::addToSummaryStr( std::ostringstream& list, const Identifier& waferId, const char* type, const char* stripId, const char* chipId ) const { - //--- Remove first&end spaces in DefectList - const std::string tmpstrip(stripId); - const std::string tmpchip(chipId); - int len_strip = tmpstrip.length(); - int len_chip = tmpchip.length(); - std::string stripList(""); - std::string chipList(""); - if ( len_strip > 0 ) stripList = tmpstrip.substr( 1, len_strip-2 ); - if ( len_chip > 0 ) chipList = tmpchip.substr( 1, len_chip-2 ); - //--- Identifier/SN - IdentifierHash waferHash = m_pSCTHelper->wafer_hash( waferId ); - SCT_SerialNumber sn = m_CablingTool->getSerialNumberFromHash( waferHash ); - //--- Preparing linkList - //std::string linkList=chipList2LinkList(chipList); - std::string linkList=chipList2LinkList(stripList); - //--- Push to summary stream - XmlStreamer m("module", list); - { - XmlStreamer v("value", "name", "SN",list); - list<<sn.str(); - } - { - XmlStreamer v("value", "name", "BecLayerPhiEta", list); - list<<formatPosition(waferId, m_pSCTHelper,".",false); - } - { - XmlStreamer v("value", "name", "LinkID", list); - list<<linkList; - } - // {XmlStreamer v("value", "name", "ChipID", list); list<<chipList;} - { - XmlStreamer v("value", "name", "ChipID", list); - list<<stripList; - } - if ( !strcmp( type, "DEAD" ) ) { - - XmlStreamer v("value", "name", "StripIDOnline", list); - list << stripList; - - } else { - - ATH_MSG_ERROR("in addToSummaryStr : argument \"type\" needs to be \"DEAD\"."); - return StatusCode::FAILURE; - - } - - return StatusCode::SUCCESS; - +StatusCode SCTCalib::addToSummaryStr(std::ostringstream& list, const Identifier& waferId, const char* type, const char* stripId, const char* chipId) const { + //--- Remove first&end spaces in DefectList + const std::string tmpstrip{stripId}; + const std::string tmpchip{chipId}; + int len_strip{static_cast<int>(tmpstrip.length())}; + int len_chip{static_cast<int>(tmpchip.length())}; + std::string stripList{""}; + std::string chipList{""}; + if (len_strip > 0) stripList = tmpstrip.substr(1, len_strip-2); + if (len_chip > 0) chipList = tmpchip.substr(1, len_chip-2); + //--- Identifier/SN + IdentifierHash waferHash{m_pSCTHelper->wafer_hash(waferId)}; + SCT_SerialNumber sn{m_CablingTool->getSerialNumberFromHash(waferHash)}; + //--- Preparing linkList + //std::string linkList=chipList2LinkList(chipList); + std::string linkList{chipList2LinkList(stripList)}; + //--- Push to summary stream + XmlStreamer m{"module", list}; + { + XmlStreamer v{"value", "name", "SN", list}; + list << sn.str(); + } + { + XmlStreamer v{"value", "name", "BecLayerPhiEta", list}; + list << formatPosition(waferId, m_pSCTHelper, ".", false); + } + { + XmlStreamer v{"value", "name", "LinkID", list}; + list << linkList; + } + { + XmlStreamer v{"value", "name", "ChipID", list}; + list << stripList; + } + if (!strcmp(type, "DEAD")) { + XmlStreamer v{"value", "name", "StripIDOnline", list}; + list << stripList; + } else { + ATH_MSG_ERROR("in addToSummaryStr : argument \"type\" needs to be \"DEAD\"."); + return StatusCode::FAILURE; + } + + return StatusCode::SUCCESS; } std::string -SCTCalib::xmlChannelNoiseOccDataString(const Identifier & waferId, const float occupancy, const SCT_SerialNumber & serial) const { - //agrohsje added space and ostringstream for proper xml output - ostringstream os; - os<<xmlOpenChannel(waferId.get_identifier32().get_compact(), m_iovStart.re_time(), m_iovStop.re_time())<<endl - <<" "<<xmlValue("SN", serial.str())<<endl - <<" "<<xmlValue("SampleSize", "10000")<<endl - <<" "<<xmlValue("barrel_endcap", m_pSCTHelper->barrel_ec( waferId ) )<<endl - <<" "<<xmlValue("Layer", m_pSCTHelper->layer_disk( waferId ) )<< linefeed - <<" "<<xmlValue("Eta", m_pSCTHelper->eta_module( waferId ) )<<endl - <<" "<<xmlValue("Phi", m_pSCTHelper->phi_module( waferId ) )<<endl - <<" "<<xmlValue("NoiseOccupancy", occupancy)<<endl - <<" "<<xmlCloseChannel(); - return os.str(); +SCTCalib::xmlChannelNoiseOccDataString(const Identifier& waferId, const float occupancy, const SCT_SerialNumber& serial) const { + //agrohsje added space and ostringstream for proper xml output + ostringstream os; + os << xmlOpenChannel(waferId.get_identifier32().get_compact(), m_iovStart.re_time(), m_iovStop.re_time()) << endl + << " " << xmlValue("SN", serial.str()) << endl + << " " << xmlValue("SampleSize", "10000") << endl + << " " << xmlValue("barrel_endcap", m_pSCTHelper->barrel_ec(waferId)) << endl + << " " << xmlValue("Layer", m_pSCTHelper->layer_disk(waferId)) << linefeed + << " " << xmlValue("Eta", m_pSCTHelper->eta_module(waferId)) << endl + << " " << xmlValue("Phi", m_pSCTHelper->phi_module(waferId)) << endl + << " " << xmlValue("NoiseOccupancy", occupancy) << endl + << " " << xmlCloseChannel(); + return os.str(); } //agasconb 02.02.2015: block for Efficiency output //requested by Naoki Ishijima std::string -SCTCalib::xmlChannelEfficiencyDataString(const Identifier & waferId, const float efficiency, const SCT_SerialNumber & serial) const { - ostringstream os; - os<<" <module>"<<endl - // os<<xmlOpenChannel(waferId.get_identifier32().get_compact(), m_iovStart.re_time(), m_iovStop.re_time())<<endl - <<" "<<xmlValue("SN", serial.str())<<endl - <<" "<<xmlValue("SampleSize", "10000")<<endl - <<" "<<xmlValue("barrel_endcap", m_pSCTHelper->barrel_ec( waferId ) )<<endl - <<" "<<xmlValue("Layer", m_pSCTHelper->layer_disk( waferId ) )<< linefeed - <<" "<<xmlValue("Eta", m_pSCTHelper->eta_module( waferId ) )<<endl - <<" "<<xmlValue("Phi", m_pSCTHelper->phi_module( waferId ) )<<endl - <<" "<<xmlValue("Efficiency", efficiency)<<endl - <<" </module>"; - // <<" "<<xmlCloseChannel(); - return os.str(); +SCTCalib::xmlChannelEfficiencyDataString(const Identifier& waferId, const float efficiency, const SCT_SerialNumber& serial) const { + ostringstream os; + os << " <module>" << endl + << " " << xmlValue("SN", serial.str()) << endl + << " " << xmlValue("SampleSize", "10000") << endl + << " " << xmlValue("barrel_endcap", m_pSCTHelper->barrel_ec(waferId)) << endl + << " " << xmlValue("Layer", m_pSCTHelper->layer_disk(waferId)) << linefeed + << " " << xmlValue("Eta", m_pSCTHelper->eta_module(waferId)) << endl + << " " << xmlValue("Phi", m_pSCTHelper->phi_module(waferId)) << endl + << " " << xmlValue("Efficiency", efficiency) << endl + << " </module>"; + return os.str(); } -std::pair< int, bool > -SCTCalib::getNumNoisyStrips( const Identifier& waferId ) const { - IdentifierHash waferHash = m_pSCTHelper->wafer_hash( waferId ); - //--- Check if there are noisy strips in the wafer - int numNoisyStripsInTheWafer = 0; - bool isNoisyWafer(false); - float noisyStripThr = m_noisyStripThrDef?(m_noisyStripThrOffline):(m_noisyStripThrOnline); - for ( int iStrip = 0; iStrip != nbins; ++iStrip ) { - if ( m_calibHitmapTool->getBinForHistogramIndex( iStrip + 1, waferHash.value() ) / m_numberOfEvents > noisyStripThr ) ++numNoisyStripsInTheWafer; - } - //--- Define/counts noisy wafers using wafer occupancy and number of noisy strips - double averageOccupancy = m_calibHitmapTool->size(waferHash.value())/static_cast<double>(nbins)/static_cast<double>(m_numberOfEvents); - const int subdetector(m_pSCTHelper->barrel_ec( waferId ) ); - isNoisyWafer = ( numNoisyStripsInTheWafer > m_noisyWaferFraction*nbins ) and - ( ( subdetector == ENDCAP_C && averageOccupancy > m_noisyWaferThrECC) or - ( subdetector == BARREL && averageOccupancy > m_noisyWaferThrBarrel) or - ( subdetector == ENDCAP_A && averageOccupancy > m_noisyWaferThrECA) ); - if (isNoisyWafer) { - ATH_MSG_INFO("Module: " << waferHash.value()); - ATH_MSG_INFO("Hits, Nevts, Occ: " << m_calibHitmapTool->size(waferHash.value()) << ", " - << m_numberOfEvents << ", " - << averageOccupancy); - } - return std::make_pair( numNoisyStripsInTheWafer, isNoisyWafer ); +std::pair<int, bool> +SCTCalib::getNumNoisyStrips(const Identifier& waferId) const { + IdentifierHash waferHash{m_pSCTHelper->wafer_hash(waferId)}; + //--- Check if there are noisy strips in the wafer + int numNoisyStripsInTheWafer{0}; + bool isNoisyWafer{false}; + float noisyStripThr{m_noisyStripThrDef ? (m_noisyStripThrOffline) : (m_noisyStripThrOnline)}; + for (int iStrip{0}; iStrip != nbins; ++iStrip) { + if (m_calibHitmapTool->getBinForHistogramIndex(iStrip + 1, waferHash.value()) / m_numberOfEvents > noisyStripThr) ++numNoisyStripsInTheWafer; + } + //--- Define/counts noisy wafers using wafer occupancy and number of noisy strips + double averageOccupancy{m_calibHitmapTool->size(waferHash.value())/static_cast<double>(nbins)/static_cast<double>(m_numberOfEvents)}; + const int subdetector{m_pSCTHelper->barrel_ec(waferId)}; + isNoisyWafer = (numNoisyStripsInTheWafer > m_noisyWaferFraction*nbins) and + ((subdetector == ENDCAP_C and averageOccupancy > m_noisyWaferThrECC) or + (subdetector == BARREL and averageOccupancy > m_noisyWaferThrBarrel) or + (subdetector == ENDCAP_A and averageOccupancy > m_noisyWaferThrECA)); + if (isNoisyWafer) { + ATH_MSG_INFO("Module: " << waferHash.value()); + ATH_MSG_INFO("Hits, Nevts, Occ: " << m_calibHitmapTool->size(waferHash.value()) << ", " + << m_numberOfEvents << ", " + << averageOccupancy); + } + return std::make_pair(numNoisyStripsInTheWafer, isNoisyWafer); } StatusCode -SCTCalib::addStripsToList( Identifier& waferId, std::set<Identifier>& stripIdList, bool isNoisy, bool isNew ) { - IdentifierHash waferHash = m_pSCTHelper->wafer_hash( waferId ); - float noisyStripThr = m_noisyStripThrDef?(m_noisyStripThrOffline):(m_noisyStripThrOnline); - for ( int iStrip = 0; iStrip != nbins; ++iStrip ) { - Identifier stripId = m_pSCTHelper->strip_id( waferId, iStrip ); - if ( !isNoisy ) { //--- Add all strips - stripIdList.insert( stripId ); - } else { - const float stripOccupancy = m_calibHitmapTool->getBinForHistogramIndex( iStrip + 1, waferHash.value() ) / m_numberOfEvents; - if ( stripOccupancy > noisyStripThr ) { - if ( !isNew ) { //--- All noisy strips - stripIdList.insert( stripId ); - } else { //--- New noisy strips : compared with configuration and calibration - const bool isGoodInConfiguration = m_useConfiguration ? m_ConfigurationConditionsTool->isGood( stripId, InDetConditions::SCT_STRIP ) : true; - const bool isGoodInCalibration = m_useCalibration ? m_ReadCalibDataTool->isGood( stripId, InDetConditions::SCT_STRIP ) : true; - if ( m_useConfiguration or m_useCalibration ) { - if ( isGoodInConfiguration && isGoodInCalibration ) { - stripIdList.insert( stripId ); - } - } +SCTCalib::addStripsToList(Identifier& waferId, std::set<Identifier>& stripIdList, bool isNoisy, bool isNew) const { + IdentifierHash waferHash{m_pSCTHelper->wafer_hash(waferId)}; + float noisyStripThr{m_noisyStripThrDef ? (m_noisyStripThrOffline):(m_noisyStripThrOnline)}; + for (int iStrip{0}; iStrip != nbins; ++iStrip) { + Identifier stripId{m_pSCTHelper->strip_id(waferId, iStrip)}; + if (!isNoisy) { //--- Add all strips + stripIdList.insert(stripId); + } else { + const float stripOccupancy{static_cast<float>(m_calibHitmapTool->getBinForHistogramIndex(iStrip + 1, waferHash.value()) / m_numberOfEvents)}; + if (stripOccupancy > noisyStripThr) { + if (!isNew) { //--- All noisy strips + stripIdList.insert(stripId); + } else { //--- New noisy strips : compared with configuration and calibration + const bool isGoodInConfiguration{m_useConfiguration ? m_ConfigurationConditionsTool->isGood(stripId, InDetConditions::SCT_STRIP) : true}; + const bool isGoodInCalibration{m_useCalibration ? m_ReadCalibDataTool->isGood(stripId, InDetConditions::SCT_STRIP) : true}; + if (m_useConfiguration or m_useCalibration) { + if (isGoodInConfiguration and isGoodInCalibration) { + stripIdList.insert(stripId); } - } + } + } } - } - return StatusCode::SUCCESS; + } + } + return StatusCode::SUCCESS; } StatusCode -SCTCalib::writeModuleListToCool( const std::map< Identifier, std::set<Identifier> >& moduleListAll, - const std::map< Identifier, std::set<Identifier> >& moduleListNew, - const std::map< Identifier, std::set<Identifier> >& moduleListRef ) { - //--- Write out strips - float noisyStripThr = m_noisyStripThrDef?(m_noisyStripThrOffline):(m_noisyStripThrOnline); - int nDefects = 0; - SCT_ID::const_id_iterator idItr = m_pSCTHelper->wafer_begin(); - SCT_ID::const_id_iterator idItrE = m_pSCTHelper->wafer_end(); - for ( ; idItr != idItrE; ++idItr ) { - if ( m_pSCTHelper->side( *idItr ) == 0 ) { - Identifier moduleId = m_pSCTHelper->module_id( *idItr ); - map< Identifier, std::set<Identifier> >::const_iterator moduleAllItr = moduleListAll.find( moduleId ); - map< Identifier, std::set<Identifier> >::const_iterator moduleNewItr = moduleListNew.find( moduleId ); - map< Identifier, std::set<Identifier> >::const_iterator moduleRefItr = moduleListRef.find( moduleId ); - std::string defectStripsAll = moduleAllItr != moduleListAll.end() ? getStripList( (*moduleAllItr).second ) : ""; - std::string defectStripsNew = moduleNewItr != moduleListNew.end() ? getStripList( (*moduleNewItr).second ) : ""; - std::string defectStripsRef = moduleRefItr != moduleListRef.end() ? getStripList( (*moduleRefItr).second ) : ""; - if ( m_noisyUpdate ) { //--- UPD1/UPD4 - if ( defectStripsAll != defectStripsRef ) { - if (m_pCalibWriteTool->createCondObjects( moduleId, m_pSCTHelper, 10000, "NOISY", noisyStripThr, defectStripsAll ).isFailure()) { - ATH_MSG_ERROR("Could not create defect strip entry in the CalibWriteTool."); - } - nDefects++; - } else ATH_MSG_DEBUG("Module "<< moduleId <<" is identical to the reference output"); - } else { - if ( m_noisyStripAll ) { //--- ALL noisy strips - if ( !defectStripsAll.empty() ) m_pCalibWriteTool->createCondObjects( moduleId, m_pSCTHelper, 10000, "NOISY", noisyStripThr, defectStripsAll ); - } else { //--- Only NEW noisy strips - if ( !defectStripsNew.empty() ) m_pCalibWriteTool->createCondObjects( moduleId, m_pSCTHelper, 10000, "NOISY", noisyStripThr, defectStripsNew ); - } - } - } - } - //ATH_MSG_INFO("Number of modules for which conditions were created: " << nDefects <<" !!!!"<< endmsg; - if ( moduleListAll.empty() || nDefects==0 ) { - ATH_MSG_INFO("Number of noisy strips was zero or the same list of noisy strips. No local DB was created."); - } else { - if ( m_pCalibWriteTool->wrapUpNoisyChannel().isFailure() ) { - ATH_MSG_ERROR("Could not get NoisyStrips info"); - return StatusCode::FAILURE; - } - } - return StatusCode::SUCCESS; +SCTCalib::writeModuleListToCool(const std::map<Identifier, std::set<Identifier>>& moduleListAll, + const std::map<Identifier, std::set<Identifier>>& moduleListNew, + const std::map<Identifier, std::set<Identifier>>& moduleListRef) const { + //--- Write out strips + float noisyStripThr{m_noisyStripThrDef?(m_noisyStripThrOffline):(m_noisyStripThrOnline)}; + int nDefects{0}; + SCT_ID::const_id_iterator idItr{m_pSCTHelper->wafer_begin()}; + SCT_ID::const_id_iterator idItrE{m_pSCTHelper->wafer_end()}; + for (; idItr != idItrE; ++idItr) { + if (m_pSCTHelper->side(*idItr) == 0) { + Identifier moduleId{m_pSCTHelper->module_id(*idItr)}; + map<Identifier, std::set<Identifier>>::const_iterator moduleAllItr{moduleListAll.find(moduleId)}; + map<Identifier, std::set<Identifier>>::const_iterator moduleNewItr{moduleListNew.find(moduleId)}; + map<Identifier, std::set<Identifier>>::const_iterator moduleRefItr{moduleListRef.find(moduleId)}; + std::string defectStripsAll{moduleAllItr != moduleListAll.end() ? getStripList((*moduleAllItr).second) : ""}; + std::string defectStripsNew{moduleNewItr != moduleListNew.end() ? getStripList((*moduleNewItr).second) : ""}; + std::string defectStripsRef{moduleRefItr != moduleListRef.end() ? getStripList((*moduleRefItr).second) : ""}; + if (m_noisyUpdate) { //--- UPD1/UPD4 + if (defectStripsAll != defectStripsRef) { + if (m_pCalibWriteTool->createCondObjects(moduleId, m_pSCTHelper, 10000, "NOISY", noisyStripThr, defectStripsAll).isFailure()) { + ATH_MSG_ERROR("Could not create defect strip entry in the CalibWriteTool."); + } + nDefects++; + } else ATH_MSG_DEBUG("Module " << moduleId << " is identical to the reference output"); + } else { + if (m_noisyStripAll) { //--- ALL noisy strips + if (!defectStripsAll.empty()) m_pCalibWriteTool->createCondObjects(moduleId, m_pSCTHelper, 10000, "NOISY", noisyStripThr, defectStripsAll); + } else { //--- Only NEW noisy strips + if (!defectStripsNew.empty()) m_pCalibWriteTool->createCondObjects(moduleId, m_pSCTHelper, 10000, "NOISY", noisyStripThr, defectStripsNew); + } + } + } + } + //ATH_MSG_INFO("Number of modules for which conditions were created: " << nDefects << " !!!!" << endmsg; + if (moduleListAll.empty() or nDefects==0) { + ATH_MSG_INFO("Number of noisy strips was zero or the same list of noisy strips. No local DB was created."); + } else { + if (m_pCalibWriteTool->wrapUpNoisyChannel().isFailure()) { + ATH_MSG_ERROR("Could not get NoisyStrips info"); + return StatusCode::FAILURE; + } + } + return StatusCode::SUCCESS; } std::string -SCTCalib::getStripList( const std::set<Identifier>& stripIdList ) const { - std::string strList; - if ( !stripIdList.empty() ) { - int firstStrip = -1; - int groupSize = -1; - - std::set<Identifier>::const_iterator stripItrFirst = stripIdList.begin(); - std::set<Identifier>::const_iterator stripItrLast = --stripIdList.end(); - - std::set<Identifier>::const_iterator stripItr = stripIdList.begin(); - std::set<Identifier>::const_iterator stripItrE = stripIdList.end(); - for ( ; stripItr != stripItrE; ++stripItr ) { - Identifier stripId = *stripItr; - int stripNum = m_pSCTHelper->side( stripId )*nbins + m_pSCTHelper->strip( stripId ); - if ( stripItr == stripItrFirst ) { - firstStrip = stripNum; - groupSize = 1; - } else { - if ( stripNum == firstStrip + groupSize ) { - ++groupSize; - } else { - int stripBegin = firstStrip; - int stripEnd = firstStrip + groupSize -1; - strList = m_pCalibWriteTool->addDefect( strList, stripBegin, stripEnd ); - firstStrip = stripNum; - groupSize = 1; - } - } - if ( stripItr == stripItrLast ) { - int stripBegin = firstStrip; - int stripEnd = stripNum; - strList = m_pCalibWriteTool->addDefect( strList, stripBegin, stripEnd ); - } - } - } - return strList; +SCTCalib::getStripList(const std::set<Identifier>& stripIdList) const { + std::string strList; + if (!stripIdList.empty()) { + int firstStrip{-1}; + int groupSize{-1}; + + std::set<Identifier>::const_iterator stripItrFirst{stripIdList.begin()}; + std::set<Identifier>::const_iterator stripItrLast{--stripIdList.end()}; + + std::set<Identifier>::const_iterator stripItr{stripIdList.begin()}; + std::set<Identifier>::const_iterator stripItrE{stripIdList.end()}; + for (; stripItr != stripItrE; ++stripItr) { + Identifier stripId{*stripItr}; + int stripNum{m_pSCTHelper->side(stripId)*nbins + m_pSCTHelper->strip(stripId)}; + if (stripItr == stripItrFirst) { + firstStrip = stripNum; + groupSize = 1; + } else { + if (stripNum == firstStrip + groupSize) { + ++groupSize; + } else { + int stripBegin{firstStrip}; + int stripEnd{firstStrip + groupSize -1}; + strList = m_pCalibWriteTool->addDefect(strList, stripBegin, stripEnd); + firstStrip = stripNum; + groupSize = 1; + } + } + if (stripItr == stripItrLast) { + int stripBegin{firstStrip}; + int stripEnd{stripNum}; + strList = m_pCalibWriteTool->addDefect(strList, stripBegin, stripEnd); + } + } + } + return strList; } StatusCode -SCTCalib::noisyStripsToXml( const std::map< Identifier, std::set<Identifier> >& moduleList, const std::string& badStripsFile ) const { - //--- Open - const char* outputFileName = badStripsFile.c_str(); - ofstream outFile( outputFileName, std::ios::out ); - if ( !outFile.good() ) { - ATH_MSG_ERROR("Unable to open " << outputFileName); - return( StatusCode::FAILURE ); - } - float noisyStripThr = m_noisyStripThrDef?(m_noisyStripThrOffline):(m_noisyStripThrOnline); - //--- Create module list - ostringstream osModuleList; - //--- Loop over wafers - SCT_ID::const_id_iterator waferItr = m_pSCTHelper->wafer_begin(); - SCT_ID::const_id_iterator waferItrE = m_pSCTHelper->wafer_end(); - for ( ; waferItr != waferItrE; ++waferItr ) { - Identifier waferId = *waferItr; - Identifier moduleId = m_pSCTHelper->module_id( waferId ); - if ( m_pSCTHelper->side( waferId ) != 0 ) continue; - map< Identifier, std::set<Identifier> >::const_iterator moduleItr = moduleList.find( moduleId ); - if ( moduleItr != moduleList.end() ) { - std::string defectStrips = getStripList( (*moduleItr).second ); - osModuleList << " <channel id=\"" << m_pSCTHelper->module_id( waferId ).get_compact() << "\" " - << "since=\"" << m_iovStart.re_time() << "\" " - << "until=\"" << m_iovStop.re_time() << "\">" << linefeed - << " <value name=\"SampleSize\">" << "10000" << "</value>" << linefeed - << " <value name=\"BarrelEndcap\">" << m_pSCTHelper->barrel_ec( waferId ) << "</value>" << linefeed - << " <value name=\"Layer\">" << m_pSCTHelper->layer_disk( waferId )<< "</value>" << linefeed - << " <value name=\"Eta\">" << m_pSCTHelper->eta_module( waferId )<< "</value>" << linefeed - << " <value name=\"Phi\">" << m_pSCTHelper->phi_module( waferId )<< "</value>" << linefeed - << " <value name=\"DefectType\">" << "NOISY" << "</value>" << linefeed - << " <value name=\"Threshold\">" << noisyStripThr << "</value>" << linefeed - << " <value name=\"DefectList\">" << normalizeList( defectStrips ) << "</value>" << linefeed - << " </channel>" << endl; - } - } - //--- Write out the contents - outFile << "<channels server=\"ATLAS_COOLPROD\" schema=\"ATLAS_COOLOFL_SCT\" dbname=\"CONDBR2\" folder=\"SCT/Derived/Monitoring\" " - << "since=\"" << m_iovStart.re_time() << "\" " - << "until=\"" << m_iovStop.re_time() << "\" " - << "tag=\"" << m_tagID4NoisyStrips << "\" " - << "version=\"" << "multi\">" << endl - << osModuleList.str() - << "</channels>" << endl; - - return StatusCode::SUCCESS; +SCTCalib::noisyStripsToXml(const std::map<Identifier, std::set<Identifier>>& moduleList, const std::string& badStripsFile) const { + //--- Open + const char* outputFileName{badStripsFile.c_str()}; + ofstream outFile{outputFileName, std::ios::out}; + if (!outFile.good()) { + ATH_MSG_ERROR("Unable to open " << outputFileName); + return(StatusCode::FAILURE); + } + float noisyStripThr{m_noisyStripThrDef ? (m_noisyStripThrOffline) : (m_noisyStripThrOnline)}; + //--- Create module list + ostringstream osModuleList; + //--- Loop over wafers + SCT_ID::const_id_iterator waferItr{m_pSCTHelper->wafer_begin()}; + SCT_ID::const_id_iterator waferItrE{m_pSCTHelper->wafer_end()}; + for (; waferItr != waferItrE; ++waferItr) { + Identifier waferId{*waferItr}; + Identifier moduleId{m_pSCTHelper->module_id(waferId)}; + if (m_pSCTHelper->side(waferId) != 0) continue; + map< Identifier, std::set<Identifier> >::const_iterator moduleItr{moduleList.find(moduleId)}; + if (moduleItr != moduleList.end()) { + std::string defectStrips{getStripList((*moduleItr).second)}; + osModuleList << " <channel id=\"" << m_pSCTHelper->module_id(waferId).get_compact() << "\" " + << "since=\"" << m_iovStart.re_time() << "\" " + << "until=\"" << m_iovStop.re_time() << "\">" << linefeed + << " <value name=\"SampleSize\">" << "10000" << "</value>" << linefeed + << " <value name=\"BarrelEndcap\">" << m_pSCTHelper->barrel_ec(waferId) << "</value>" << linefeed + << " <value name=\"Layer\">" << m_pSCTHelper->layer_disk(waferId) << "</value>" << linefeed + << " <value name=\"Eta\">" << m_pSCTHelper->eta_module(waferId) << "</value>" << linefeed + << " <value name=\"Phi\">" << m_pSCTHelper->phi_module(waferId) << "</value>" << linefeed + << " <value name=\"DefectType\">" << "NOISY" << "</value>" << linefeed + << " <value name=\"Threshold\">" << noisyStripThr << "</value>" << linefeed + << " <value name=\"DefectList\">" << normalizeList(defectStrips) << "</value>" << linefeed + << " </channel>" << endl; + } + } + //--- Write out the contents + outFile << "<channels server=\"ATLAS_COOLPROD\" schema=\"ATLAS_COOLOFL_SCT\" dbname=\"CONDBR2\" folder=\"SCT/Derived/Monitoring\" " + << "since=\"" << m_iovStart.re_time() << "\" " + << "until=\"" << m_iovStop.re_time() << "\" " + << "tag=\"" << m_tagID4NoisyStrips << "\" " + << "version=\"" << "multi\">" << endl + << osModuleList.str() + << "</channels>" << endl; + + return StatusCode::SUCCESS; } -StatusCode SCTCalib::noisyStripsToSummaryXml( const std::map< Identifier, std::set<Identifier> >& moduleListAll, - const std::map< Identifier, std::set<Identifier> >& moduleListNew, - const std::map< Identifier, std::set<Identifier> >& moduleListRef, - const std::string& badStripsFile) const { - //--- Open - const char* outputFileName = badStripsFile.c_str(); - ofstream outFile( outputFileName, std::ios::out ); - if ( !outFile.good() ) { - ATH_MSG_ERROR("Unable to open " << outputFileName); - return( StatusCode::FAILURE ); - } - - //--- Initialization - int numLinksAll( 0 ), numChipsAll( 0 ); - int numModulesAll( 0 ), numModulesNew( 0 ), numModulesRef( 0 ); - int numStripsAll( 0 ), numStripsNew( 0 ), numStripsRef( 0 ); - int numModulesDiff( 0 ); - - std::string defectLinks, defectChips; - std::string defectStripsAll, defectStripsNew, defectStripsRef; - ostringstream osModuleList, osChipList; - - //--- Create module list - SCT_ID::const_id_iterator waferItr = m_pSCTHelper->wafer_begin(); - SCT_ID::const_id_iterator waferItrE = m_pSCTHelper->wafer_end(); - for ( ; waferItr != waferItrE; ++waferItr ) { - //--- Identifier - Identifier waferId = *waferItr; - Identifier moduleId = m_pSCTHelper->module_id( waferId ); - IdentifierHash waferHash = m_pSCTHelper->wafer_hash( waferId ); - SCT_SerialNumber sn = m_CablingTool->getSerialNumberFromHash( waferHash ); - - //--- Initialization for a module - if ( m_pSCTHelper->side( waferId ) == 0 ) { - defectLinks.erase(); - defectChips.erase(); - defectStripsAll.erase(); - defectStripsNew.erase(); - defectStripsRef.erase(); - } - - //--- Noisy links - bool isNoisyWafer = getNumNoisyStrips( waferId ).second; // true if this wafer is noisy - if ( isNoisyWafer ) { - int link = m_pSCTHelper->side( waferId ); - defectLinks = m_pCalibWriteTool->addDefect( defectLinks, link, link ); - ++numLinksAll; - } - - //--- Execute once in this module - if ( m_pSCTHelper->side( waferId ) == 1 ) { - //--- Noisy strips : All - map< Identifier, std::set<Identifier> >::const_iterator moduleAllItr = moduleListAll.find( moduleId ); - if ( moduleAllItr != moduleListAll.end() ) { - defectStripsAll = getStripList( (*moduleAllItr).second ); - ++numModulesAll; - numStripsAll += (*moduleAllItr).second.size(); - } - //--- Noisy strips : New - map< Identifier, std::set<Identifier> >::const_iterator moduleNewItr = moduleListNew.find( moduleId ); - if ( moduleNewItr != moduleListNew.end() ) { - defectStripsNew = getStripList( (*moduleNewItr).second ); - ++numModulesNew; - numStripsNew += (*moduleNewItr).second.size(); - } - //--- Noisy strips : Ref - map< Identifier, std::set<Identifier> >::const_iterator moduleRefItr = moduleListRef.find( moduleId ); - if ( moduleRefItr != moduleListRef.end() ) { - defectStripsRef = getStripList( moduleRefItr->second ); - ++numModulesRef; - numStripsRef += moduleRefItr->second.size(); - } - - //--- Noisy chips : stripIdList -> chipIdList - if ( moduleAllItr != moduleListAll.end() ) { - std::set<int> chipIdList = getNoisyChips( moduleAllItr->second ); - if ( !chipIdList.empty() ) { - ++numChipsAll; // CS: I think we should count this!? - std::set<int>::iterator chipItr = chipIdList.begin(); - std::set<int>::iterator chipItrE = chipIdList.end(); - for ( ; chipItr != chipItrE; ++chipItr ) { - int chipId = *chipItr; - //--- To be written into module list - defectChips = m_pCalibWriteTool->addDefect( defectChips, chipId, chipId ); - //--- LBs where this chip was noisy - std::pair< string, float > defectLB = getNoisyLB( moduleId, chipId ); - //--- Chip list written to XML - osChipList << " <chip>" << linefeed - << " <value name=\"SN\">" << sn.str() << "</value>" << linefeed - << " <value name=\"BecLayerPhiEta\">" << m_pSCTHelper->barrel_ec( waferId ) << "." - << m_pSCTHelper->layer_disk( waferId ) << "." - << m_pSCTHelper->phi_module( waferId ) << "." - << m_pSCTHelper->eta_module( waferId ) << "</value>" << linefeed - << " <value name=\"ChipID\">" << chipId << "</value>" << linefeed - << " <value name=\"LB\">" << normalizeList( defectLB.first ) << "</value>" << linefeed - << " <value name=\"LBFraction\">" << defectLB.second << "</value>" << linefeed - << " </chip>" << endl; - } - } - } - //--- Difference between All & Ref - if ( defectStripsAll != defectStripsRef ) ++numModulesDiff; - //--- Module list written to XML - if ( !defectStripsAll.empty() || ( m_noisyUpdate && defectStripsAll != defectStripsRef ) ) { - osModuleList << " <module>" << linefeed - << " <value name=\"SN\">" << sn.str() << "</value>" << linefeed - << " <value name=\"BecLayerPhiEta\">" << m_pSCTHelper->barrel_ec( waferId ) << "." - << m_pSCTHelper->layer_disk( waferId ) << "." - << m_pSCTHelper->phi_module( waferId ) << "." - << m_pSCTHelper->eta_module( waferId ) << "</value>" << linefeed - << " <value name=\"LinkID\">" << normalizeList( defectLinks ) << "</value>" << linefeed - << " <value name=\"ChipID\">" << normalizeList( defectChips ) << "</value>" << linefeed - << " <value name=\"StripOfflineAll\">" << normalizeList( defectStripsAll ) << "</value>" << linefeed - << " <value name=\"StripOfflineNew\">" << normalizeList( defectStripsNew ) << "</value>" << linefeed - << " <value name=\"StripOfflineRef\">" << normalizeList( defectStripsRef ) << "</value>" << linefeed - << " </module>" << endl; - } - } - }//--- end loop : waferItr +StatusCode SCTCalib::noisyStripsToSummaryXml(const std::map<Identifier, std::set<Identifier>>& moduleListAll, + const std::map<Identifier, std::set<Identifier>>& moduleListNew, + const std::map<Identifier, std::set<Identifier>>& moduleListRef, + const std::string& badStripsFile) const { + //--- Open + const char* outputFileName{badStripsFile.c_str()}; + ofstream outFile{outputFileName, std::ios::out}; + if (!outFile.good()) { + ATH_MSG_ERROR("Unable to open " << outputFileName); + return(StatusCode::FAILURE); + } + + //--- Initialization + int numLinksAll{0}, numChipsAll{0}; + int numModulesAll{0}, numModulesNew{0}, numModulesRef{0}; + int numStripsAll{0}, numStripsNew{0}, numStripsRef{0}; + int numModulesDiff{0}; + + std::string defectLinks, defectChips; + std::string defectStripsAll, defectStripsNew, defectStripsRef; + ostringstream osModuleList, osChipList; + + //--- Create module list + SCT_ID::const_id_iterator waferItr{m_pSCTHelper->wafer_begin()}; + SCT_ID::const_id_iterator waferItrE{m_pSCTHelper->wafer_end()}; + for (; waferItr != waferItrE; ++waferItr) { + //--- Identifier + Identifier waferId{*waferItr}; + Identifier moduleId{m_pSCTHelper->module_id(waferId)}; + IdentifierHash waferHash{m_pSCTHelper->wafer_hash(waferId)}; + SCT_SerialNumber sn{m_CablingTool->getSerialNumberFromHash(waferHash)}; + + //--- Initialization for a module + if (m_pSCTHelper->side(waferId) == 0) { + defectLinks.erase(); + defectChips.erase(); + defectStripsAll.erase(); + defectStripsNew.erase(); + defectStripsRef.erase(); + } + + //--- Noisy links + bool isNoisyWafer{getNumNoisyStrips(waferId).second}; // true if this wafer is noisy + if (isNoisyWafer) { + int link{m_pSCTHelper->side(waferId)}; + defectLinks = m_pCalibWriteTool->addDefect(defectLinks, link, link); + ++numLinksAll; + } + + //--- Execute once in this module + if (m_pSCTHelper->side(waferId) == 1) { + //--- Noisy strips : All + map< Identifier, std::set<Identifier> >::const_iterator moduleAllItr{moduleListAll.find(moduleId)}; + if (moduleAllItr != moduleListAll.end()) { + defectStripsAll = getStripList((*moduleAllItr).second); + ++numModulesAll; + numStripsAll += (*moduleAllItr).second.size(); + } + //--- Noisy strips : New + map< Identifier, std::set<Identifier> >::const_iterator moduleNewItr{moduleListNew.find(moduleId)}; + if (moduleNewItr != moduleListNew.end()) { + defectStripsNew = getStripList((*moduleNewItr).second); + ++numModulesNew; + numStripsNew += (*moduleNewItr).second.size(); + } + //--- Noisy strips : Ref + map< Identifier, std::set<Identifier> >::const_iterator moduleRefItr{moduleListRef.find(moduleId)}; + if (moduleRefItr != moduleListRef.end()) { + defectStripsRef = getStripList(moduleRefItr->second); + ++numModulesRef; + numStripsRef += moduleRefItr->second.size(); + } + + //--- Noisy chips : stripIdList -> chipIdList + if (moduleAllItr != moduleListAll.end()) { + std::set<int> chipIdList{getNoisyChips(moduleAllItr->second)}; + if (!chipIdList.empty()) { + ++numChipsAll; // CS: I think we should count this!? + std::set<int>::iterator chipItr{chipIdList.begin()}; + std::set<int>::iterator chipItrE{chipIdList.end()}; + for (; chipItr != chipItrE; ++chipItr) { + int chipId{*chipItr}; + //--- To be written into module list + defectChips = m_pCalibWriteTool->addDefect(defectChips, chipId, chipId); + //--- LBs where this chip was noisy + std::pair< string, float > defectLB{getNoisyLB(moduleId, chipId)}; + //--- Chip list written to XML + osChipList << " <chip>" << linefeed + << " <value name=\"SN\">" << sn.str() << "</value>" << linefeed + << " <value name=\"BecLayerPhiEta\">" << m_pSCTHelper->barrel_ec(waferId) << "." + << m_pSCTHelper->layer_disk(waferId) << "." + << m_pSCTHelper->phi_module(waferId) << "." + << m_pSCTHelper->eta_module(waferId) << "</value>" << linefeed + << " <value name=\"ChipID\">" << chipId << "</value>" << linefeed + << " <value name=\"LB\">" << normalizeList(defectLB.first) << "</value>" << linefeed + << " <value name=\"LBFraction\">" << defectLB.second << "</value>" << linefeed + << " </chip>" << endl; + } + } + } + //--- Difference between All & Ref + if (defectStripsAll != defectStripsRef) ++numModulesDiff; + //--- Module list written to XML + if (!defectStripsAll.empty() or (m_noisyUpdate and defectStripsAll != defectStripsRef)) { + osModuleList << " <module>" << linefeed + << " <value name=\"SN\">" << sn.str() << "</value>" << linefeed + << " <value name=\"BecLayerPhiEta\">" << m_pSCTHelper->barrel_ec(waferId) << "." + << m_pSCTHelper->layer_disk(waferId) << "." + << m_pSCTHelper->phi_module(waferId) << "." + << m_pSCTHelper->eta_module(waferId) << "</value>" << linefeed + << " <value name=\"LinkID\">" << normalizeList(defectLinks) << "</value>" << linefeed + << " <value name=\"ChipID\">" << normalizeList(defectChips) << "</value>" << linefeed + << " <value name=\"StripOfflineAll\">" << normalizeList(defectStripsAll) << "</value>" << linefeed + << " <value name=\"StripOfflineNew\">" << normalizeList(defectStripsNew) << "</value>" << linefeed + << " <value name=\"StripOfflineRef\">" << normalizeList(defectStripsRef) << "</value>" << linefeed + << " </module>" << endl; + } + } + }//--- end loop : waferItr //--- Upload flag - string strUploadFlag = "U"; - - bool isRunsInCool( false ); - bool isNoisyMinStat( false ), isNoisyModuleList( false ), isNoisyModuleDiff( false ), isNoisyStripDiff( false ); - if ( m_noisyUploadTest ) { - isRunsInCool = m_noisyModuleAverageInDB != -1. && m_noisyStripLastRunInDB != -999; - if ( isRunsInCool ) { - isNoisyMinStat = m_numberOfEvents > m_noisyMinStat; - isNoisyModuleList = numModulesAll < m_noisyModuleList; - isNoisyModuleDiff = ( ( static_cast<float>(numModulesAll) - m_noisyModuleAverageInDB )/m_noisyModuleAverageInDB ) < m_noisyModuleDiff; - isNoisyStripDiff = ( numStripsAll - m_noisyStripAverageInDB ) < m_noisyStripDiff; - if ( !isNoisyMinStat || !isNoisyModuleList ) { - strUploadFlag = "R"; - } else { - if ( !isNoisyModuleDiff || !isNoisyStripDiff ) { - strUploadFlag = "Y"; - } else { - strUploadFlag = "G"; - } - } - } - } - - //--- Upload test result to XML - ostringstream osNoisyMinStat, osNoisyModuleList, osNoisyModuleDiff, osNoisyStripDiff; - osNoisyMinStat << "#events more than " << m_noisyMinStat.value(); - osNoisyModuleList << "#(modules w/ at least 1 noisy strip) less than " << m_noisyModuleList.value(); - osNoisyModuleDiff << "Increase of #(modules w/ at least 1 noisy strip) from average of recent runs less than " << m_noisyModuleDiff*100 << "%"; - osNoisyStripDiff << "Increase of #(noisy strips) from average of recent runs less than " << m_noisyStripDiff.value(); - - ostringstream osFlagReason; - if ( !isNoisyMinStat ) osFlagReason << "FAILED in " << osNoisyMinStat.str() << "; "; - if ( !isNoisyModuleList ) osFlagReason << "FAILED in " << osNoisyModuleList.str() << "; "; - if ( !isNoisyModuleDiff ) osFlagReason << "FAILED in " << osNoisyModuleDiff.str() << "; "; - if ( !isNoisyStripDiff ) osFlagReason << "FAILED in " << osNoisyStripDiff.str(); - - string strFlagEnable = m_noisyUploadTest ? "ENABLED" : "DISABLED"; - string strRunsInCool = isRunsInCool ? "AVAILABLE" : "UNAVAILABLE"; - - ostringstream osCheckList; - osCheckList << osNoisyMinStat.str() << "; " - << osNoisyModuleList.str() << "; " - << osNoisyModuleDiff.str() << "; " - << osNoisyStripDiff.str(); - - //--- Write out the contents to XML file - outFile << xmlHeader << linefeed - << associateStylesheet("BadStrips.xsl") << linefeed - << "<run>" << linefeed - << " <value name=\"RunNumber\">" << m_runNumber.value() << "</value>" << linefeed - << " <value name=\"StartTime\">" << m_utcBegin << "</value>" << linefeed - << " <value name=\"EndTime\">" << m_utcEnd << "</value>" << linefeed - << " <value name=\"Duration\">" << m_calibEvtInfoTool->duration() << "</value>" << linefeed - << " <value name=\"LB\">" << m_numOfLBsProcessed << "</value>" << linefeed - << " <value name=\"Events\">" << m_numberOfEvents << "</value>" << linefeed - << " <value name=\"Modules\">" << numModulesAll << "</value>" << linefeed - << " <value name=\"Links\">" << numLinksAll << "</value>" << linefeed - << " <value name=\"Chips\">" << numChipsAll << "</value>" << linefeed - << " <value name=\"StripsOfflineAll\">" << numStripsAll << "</value>" << linefeed - << " <value name=\"StripsOfflineNew\">" << numStripsNew << "</value>" << linefeed - << " <value name=\"ModulesRef\">" << numModulesRef << "</value>" << linefeed - << " <value name=\"StripsOfflineRef\">" << numStripsRef << "</value>" << linefeed - << " <value name=\"ModulesDiff\">" << numModulesDiff << "</value>" << linefeed - << " <value name=\"Flag\">" << strUploadFlag << "</value>" << linefeed - << " <value name=\"FlagReason\">" << osFlagReason.str() << "</value>" << linefeed - << " <value name=\"FlagEnable\">" << strFlagEnable << "</value>" << linefeed - << " <value name=\"ReadCool\">" << strRunsInCool << "</value>" << linefeed - << " <value name=\"CheckList\">" << osCheckList.str() << "</value>" << linefeed - << " <chips>" << linefeed - << osChipList.str() - << " </chips>" << linefeed - << " <modules>" << linefeed - << osModuleList.str() - << " </modules>" << linefeed - << "</run>" << endl; - - return StatusCode::SUCCESS; + string strUploadFlag{"U"}; + + bool isRunsInCool{false}; + bool isNoisyMinStat{false}, isNoisyModuleList{false}, isNoisyModuleDiff{false}, isNoisyStripDiff{false}; + if (m_noisyUploadTest) { + isRunsInCool = m_noisyModuleAverageInDB != -1. and m_noisyStripLastRunInDB != -999; + if (isRunsInCool) { + isNoisyMinStat = m_numberOfEvents > m_noisyMinStat; + isNoisyModuleList = numModulesAll < m_noisyModuleList; + isNoisyModuleDiff = ((static_cast<float>(numModulesAll) - m_noisyModuleAverageInDB)/m_noisyModuleAverageInDB) < m_noisyModuleDiff; + isNoisyStripDiff = (numStripsAll - m_noisyStripAverageInDB) < m_noisyStripDiff; + if (!isNoisyMinStat or !isNoisyModuleList) { + strUploadFlag = "R"; + } else { + if (!isNoisyModuleDiff or !isNoisyStripDiff) { + strUploadFlag = "Y"; + } else { + strUploadFlag = "G"; + } + } + } + } + + //--- Upload test result to XML + ostringstream osNoisyMinStat, osNoisyModuleList, osNoisyModuleDiff, osNoisyStripDiff; + osNoisyMinStat << "#events more than " << m_noisyMinStat.value(); + osNoisyModuleList << "#(modules w/ at least 1 noisy strip) less than " << m_noisyModuleList.value(); + osNoisyModuleDiff << "Increase of #(modules w/ at least 1 noisy strip) from average of recent runs less than " << m_noisyModuleDiff*100 << "%"; + osNoisyStripDiff << "Increase of #(noisy strips) from average of recent runs less than " << m_noisyStripDiff.value(); + + ostringstream osFlagReason; + if (!isNoisyMinStat) osFlagReason << "FAILED in " << osNoisyMinStat.str() << "; "; + if (!isNoisyModuleList) osFlagReason << "FAILED in " << osNoisyModuleList.str() << "; "; + if (!isNoisyModuleDiff) osFlagReason << "FAILED in " << osNoisyModuleDiff.str() << "; "; + if (!isNoisyStripDiff) osFlagReason << "FAILED in " << osNoisyStripDiff.str(); + + string strFlagEnable = m_noisyUploadTest ? "ENABLED" : "DISABLED"; + string strRunsInCool = isRunsInCool ? "AVAILABLE" : "UNAVAILABLE"; + + ostringstream osCheckList; + osCheckList << osNoisyMinStat.str() << "; " + << osNoisyModuleList.str() << "; " + << osNoisyModuleDiff.str() << "; " + << osNoisyStripDiff.str(); + + //--- Write out the contents to XML file + outFile << xmlHeader << linefeed + << associateStylesheet("BadStrips.xsl") << linefeed + << "<run>" << linefeed + << " <value name=\"RunNumber\">" << m_runNumber.value() << "</value>" << linefeed + << " <value name=\"StartTime\">" << m_utcBegin << "</value>" << linefeed + << " <value name=\"EndTime\">" << m_utcEnd << "</value>" << linefeed + << " <value name=\"Duration\">" << m_calibEvtInfoTool->duration() << "</value>" << linefeed + << " <value name=\"LB\">" << m_numOfLBsProcessed << "</value>" << linefeed + << " <value name=\"Events\">" << m_numberOfEvents << "</value>" << linefeed + << " <value name=\"Modules\">" << numModulesAll << "</value>" << linefeed + << " <value name=\"Links\">" << numLinksAll << "</value>" << linefeed + << " <value name=\"Chips\">" << numChipsAll << "</value>" << linefeed + << " <value name=\"StripsOfflineAll\">" << numStripsAll << "</value>" << linefeed + << " <value name=\"StripsOfflineNew\">" << numStripsNew << "</value>" << linefeed + << " <value name=\"ModulesRef\">" << numModulesRef << "</value>" << linefeed + << " <value name=\"StripsOfflineRef\">" << numStripsRef << "</value>" << linefeed + << " <value name=\"ModulesDiff\">" << numModulesDiff << "</value>" << linefeed + << " <value name=\"Flag\">" << strUploadFlag << "</value>" << linefeed + << " <value name=\"FlagReason\">" << osFlagReason.str() << "</value>" << linefeed + << " <value name=\"FlagEnable\">" << strFlagEnable << "</value>" << linefeed + << " <value name=\"ReadCool\">" << strRunsInCool << "</value>" << linefeed + << " <value name=\"CheckList\">" << osCheckList.str() << "</value>" << linefeed + << " <chips>" << linefeed + << osChipList.str() + << " </chips>" << linefeed + << " <modules>" << linefeed + << osModuleList.str() + << " </modules>" << linefeed + << "</run>" << endl; + + return StatusCode::SUCCESS; } std::set<int> -SCTCalib::getNoisyChips( const std::set<Identifier>& stripIdList ) const { - std::set<int> chipIdList; - chipIdList.clear(); - - // Get SCT_DetectorElementCollection - SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEle(m_SCTDetEleCollKey); - const InDetDD::SiDetectorElementCollection* elements(sctDetEle.retrieve()); - if (elements==nullptr) { - ATH_MSG_FATAL(m_SCTDetEleCollKey.fullKey() << " could not be retrieved"); - return chipIdList; - } - - //--- Minimum number of noisy strips for a noisy chip - unsigned int noisyChipThr = m_noisyChipFraction*n_stripPerChip; - if ( stripIdList.size() > noisyChipThr ) { - unsigned int numStripsPerChip[ n_chipPerModule ] = { 0 }; - //--- Loop over stripIdList - std::set<Identifier>::const_iterator stripItr = stripIdList.begin(); - std::set<Identifier>::const_iterator stripItrE = stripIdList.end(); - for ( ; stripItr != stripItrE; ++stripItr ) { - Identifier stripId = *stripItr; - int stripOffline = m_pSCTHelper->strip( stripId ); - //--- Chip number : taken from SCT_ConfigurationConditionsSvc::getChip - IdentifierHash waferHash = m_pSCTHelper->wafer_hash( m_pSCTHelper->wafer_id( stripId ) ); - const InDetDD::SiDetectorElement* pElement = elements->getDetectorElement( waferHash ); - if ( !pElement ) { - ATH_MSG_FATAL("Element pointer is NULL"); - continue; - } - int stripOnline = ( pElement->swapPhiReadoutDirection() ) ? lastStrip - stripOffline : stripOffline; - int chipId = m_pSCTHelper->side( stripId ) == 0 ? stripOnline/n_stripPerChip : stripOnline/n_stripPerChip + n_chipPerSide; - //--- Count number of noisy strips per chips - ++numStripsPerChip[ chipId ]; - } - - //--- Insert noisy chips - for ( int iChip = 0; iChip != n_chipPerModule; ++iChip ) { - if ( numStripsPerChip[iChip] > noisyChipThr ) chipIdList.insert( iChip ); - } - } - return chipIdList; +SCTCalib::getNoisyChips(const std::set<Identifier>& stripIdList) const { + std::set<int> chipIdList; + chipIdList.clear(); + + // Get SCT_DetectorElementCollection + SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEle{m_SCTDetEleCollKey}; + const InDetDD::SiDetectorElementCollection* elements{sctDetEle.retrieve()}; + if (elements==nullptr) { + ATH_MSG_FATAL(m_SCTDetEleCollKey.fullKey() << " could not be retrieved"); + return chipIdList; + } + + //--- Minimum number of noisy strips for a noisy chip + unsigned int noisyChipThr{static_cast<unsigned int>(m_noisyChipFraction*n_stripPerChip)}; + if (stripIdList.size() > noisyChipThr) { + unsigned int numStripsPerChip[n_chipPerModule] = {0}; + //--- Loop over stripIdList + std::set<Identifier>::const_iterator stripItr{stripIdList.begin()}; + std::set<Identifier>::const_iterator stripItrE{stripIdList.end()}; + for (; stripItr != stripItrE; ++stripItr) { + Identifier stripId{*stripItr}; + int stripOffline{m_pSCTHelper->strip(stripId)}; + //--- Chip number : taken from SCT_ConfigurationConditionsTool::getChip + IdentifierHash waferHash{m_pSCTHelper->wafer_hash(m_pSCTHelper->wafer_id(stripId))}; + const InDetDD::SiDetectorElement* pElement{elements->getDetectorElement(waferHash)}; + if (!pElement) { + ATH_MSG_FATAL("Element pointer is NULL"); + continue; + } + int stripOnline{(pElement->swapPhiReadoutDirection()) ? lastStrip - stripOffline : stripOffline}; + int chipId{m_pSCTHelper->side(stripId) == 0 ? stripOnline/n_stripPerChip : stripOnline/n_stripPerChip + n_chipPerSide}; + //--- Count number of noisy strips per chips + ++numStripsPerChip[chipId]; + } + + //--- Insert noisy chips + for (int iChip{0}; iChip != n_chipPerModule; ++iChip) { + if (numStripsPerChip[iChip] > noisyChipThr) chipIdList.insert(iChip); + } + } + return chipIdList; } std::pair< string, float > -SCTCalib::getNoisyLB( const Identifier& moduleId, int& chipId ) const { - std::string defectLB(""); //return value if invalid - float defectLBFrac(0.0); //return value if invalid - float noisyStripThr = m_noisyStripThrDef?(m_noisyStripThrOffline):(m_noisyStripThrOnline); - - //--- Identifier - Identifier waferId = m_pSCTHelper->wafer_id( m_pSCTHelper->barrel_ec( moduleId ), - m_pSCTHelper->layer_disk( moduleId ), - m_pSCTHelper->phi_module( moduleId ), - m_pSCTHelper->eta_module( moduleId ), - chipId < n_chipPerSide ? 0 : 1 ); - IdentifierHash waferHash = m_pSCTHelper->wafer_hash( waferId ); - //--- Histogram for this chip - int chipPositionInSide = m_pSCTHelper->side( waferId ) == 0 ? chipId : chipId - n_chipPerSide; - int histIndex = (waferHash.value())*n_chipPerSide + chipPositionInSide; - - //--- Find LBs where this chip was noisy - double chipOccupancyThr = noisyStripThr*n_stripPerChip*m_noisyChipFraction; - std::set<int> LBList; - LBList.clear(); - if (!m_calibLbTool) { - ATH_MSG_ERROR("NULL pointer m_calibLbTool line "<<__LINE__); - return std::make_pair( defectLB, defectLBFrac ); - } - - for ( int iLB = 0; iLB != m_LBRange; ++iLB ) { - double numEventsInLB = m_calibLbTool->getNumberOfEventsInBin( iLB + 1 ); - if ( numEventsInLB == 0 ) continue; - double chipOccupancy = m_calibLbTool->getBinForHistogramIndex( iLB + 1, histIndex )/numEventsInLB; - if ( chipOccupancy > chipOccupancyThr ) LBList.insert( iLB ); - } - //--- Transform LBList to string and calculate a fraction of noisy LBs - if ( LBList.size() != 0 ) { - defectLB = getLBList( LBList ); - defectLBFrac = static_cast<float>(LBList.size()) / m_numOfLBsProcessed; - } - - return std::make_pair( defectLB, defectLBFrac ); +SCTCalib::getNoisyLB(const Identifier& moduleId, int& chipId) const { + std::string defectLB{""}; //return value if invalid + float defectLBFrac{0.0}; //return value if invalid + float noisyStripThr{m_noisyStripThrDef?(m_noisyStripThrOffline):(m_noisyStripThrOnline)}; + + //--- Identifier + Identifier waferId{m_pSCTHelper->wafer_id(m_pSCTHelper->barrel_ec(moduleId), + m_pSCTHelper->layer_disk(moduleId), + m_pSCTHelper->phi_module(moduleId), + m_pSCTHelper->eta_module(moduleId), + chipId < n_chipPerSide ? 0 : 1)}; + IdentifierHash waferHash{m_pSCTHelper->wafer_hash(waferId)}; + //--- Histogram for this chip + int chipPositionInSide{m_pSCTHelper->side(waferId) == 0 ? chipId : chipId - n_chipPerSide}; + int histIndex{static_cast<int>((waferHash.value())*n_chipPerSide + chipPositionInSide)}; + + //--- Find LBs where this chip was noisy + double chipOccupancyThr{noisyStripThr*n_stripPerChip*m_noisyChipFraction}; + std::set<int> LBList; + LBList.clear(); + if (!m_calibLbTool) { + ATH_MSG_ERROR("NULL pointer m_calibLbTool line " <<__LINE__); + return std::make_pair(defectLB, defectLBFrac); + } + + for (int iLB{0}; iLB != m_LBRange; ++iLB) { + double numEventsInLB{static_cast<double>(m_calibLbTool->getNumberOfEventsInBin(iLB + 1))}; + if (numEventsInLB == 0) continue; + double chipOccupancy{m_calibLbTool->getBinForHistogramIndex(iLB + 1, histIndex)/numEventsInLB}; + if (chipOccupancy > chipOccupancyThr) LBList.insert(iLB); + } + //--- Transform LBList to string and calculate a fraction of noisy LBs + if (LBList.size() != 0) { + defectLB = getLBList(LBList); + defectLBFrac = static_cast<float>(LBList.size()) / m_numOfLBsProcessed; + } + + return std::make_pair(defectLB, defectLBFrac); } -std::string SCTCalib::getLBList( const std::set<int>& LBList ) const { - std::string strList; - strList.erase(); - if ( !LBList.empty() ) { - int firstLB = -1; - int LBSize = -1; - - std::set<int>::const_iterator LBItrFirst = LBList.begin(); - std::set<int>::const_iterator LBItrLast = --LBList.end(); - - std::set<int>::const_iterator LBItr = LBList.begin(); - std::set<int>::const_iterator LBItrE = LBList.end(); - for ( ; LBItr != LBItrE; ++LBItr ) { - int iLB = *LBItr; - if ( LBItr == LBItrFirst ) { - firstLB = iLB; - LBSize = 1; - } else { - if ( iLB == firstLB + LBSize ) { - ++LBSize; - } else { - int LBBegin = firstLB; - int LBEnd = firstLB + LBSize -1; - strList = m_pCalibWriteTool->addDefect( strList, LBBegin, LBEnd ); - firstLB = iLB; - LBSize = 1; - } - } - if ( LBItr == LBItrLast ) { - int LBBegin = firstLB; - int LBEnd = iLB; - strList = m_pCalibWriteTool->addDefect( strList, LBBegin, LBEnd ); - } - } - } - return strList; +std::string SCTCalib::getLBList(const std::set<int>& LBList) const { + std::string strList; + strList.erase(); + if (!LBList.empty()) { + int firstLB{-1}; + int LBSize{-1}; + + std::set<int>::const_iterator LBItrFirst{LBList.begin()}; + std::set<int>::const_iterator LBItrLast{--LBList.end()}; + + std::set<int>::const_iterator LBItr{LBList.begin()}; + std::set<int>::const_iterator LBItrE{LBList.end()}; + for (; LBItr != LBItrE; ++LBItr) { + int iLB{*LBItr}; + if (LBItr == LBItrFirst) { + firstLB = iLB; + LBSize = 1; + } else { + if (iLB == firstLB + LBSize) { + ++LBSize; + } else { + int LBBegin{firstLB}; + int LBEnd{firstLB + LBSize -1}; + strList = m_pCalibWriteTool->addDefect(strList, LBBegin, LBEnd); + firstLB = iLB; + LBSize = 1; + } + } + if (LBItr == LBItrLast) { + int LBBegin{firstLB}; + int LBEnd{iLB}; + strList = m_pCalibWriteTool->addDefect(strList, LBBegin, LBEnd); + } + } + } + return strList; } diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCTCalibWriteTool.cxx b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCTCalibWriteTool.cxx index 3748c82e541342dc2dd7ec729ae6a6ae2d571752..9bc1e38ff96c802267640d366b421f09b0a3f9ac 100644 --- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCTCalibWriteTool.cxx +++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCTCalibWriteTool.cxx @@ -14,10 +14,6 @@ // IOVDbTest includes #include "RegistrationServices/IIOVRegistrationSvc.h" -// Gaudi includes -#include "GaudiKernel/StatusCode.h" -#include "GaudiKernel/IToolSvc.h" - // Athena includes #include "AthenaKernel/IAthenaOutputStreamTool.h" #include "CoralBase/Attribute.h" @@ -33,6 +29,10 @@ //path resolver to find the file #include "PathResolver/PathResolver.h" +// Gaudi includes +#include "GaudiKernel/StatusCode.h" +#include "GaudiKernel/IToolSvc.h" + #include <fstream> #include <iterator> #include <sstream> @@ -42,153 +42,134 @@ using std::string; ///////////////////////////////////////////////////////////////////////////// -string SCTCalibWriteTool::s_separator = string("-"); -string SCTCalibWriteTool::s_defectFolderName = string("/SCT/Derived/Monitoring"); -string SCTCalibWriteTool::s_deadStripFolderName = string("/SCT/Derived/DeadStrips"); -string SCTCalibWriteTool::s_deadChipFolderName = string("/SCT/Derived/DeadChips"); -string SCTCalibWriteTool::s_effFolderName = string("/SCT/Derived/Efficiency"); -string SCTCalibWriteTool::s_noFolderName = string("/SCT/Derived/NoiseOccupancy"); -string SCTCalibWriteTool::s_RawOccuFolderName = string("/SCT/Derived/RawOccupancy"); -string SCTCalibWriteTool::s_BSErrFolderName = string("/SCT/Derived/BSErrorsRun2"); -string SCTCalibWriteTool::s_LAFolderName = string("/SCT/Derived/LorentzAngleRun2_v2"); - -static bool becCapsFormat(true); -static bool becUnderscoreFormat(false); +const string SCTCalibWriteTool::s_separator{"-"}; +const string SCTCalibWriteTool::s_defectFolderName{"/SCT/Derived/Monitoring"}; +const string SCTCalibWriteTool::s_deadStripFolderName{"/SCT/Derived/DeadStrips"}; +const string SCTCalibWriteTool::s_deadChipFolderName{"/SCT/Derived/DeadChips"}; +const string SCTCalibWriteTool::s_effFolderName{"/SCT/Derived/Efficiency"}; +const string SCTCalibWriteTool::s_noFolderName{"/SCT/Derived/NoiseOccupancy"}; +const string SCTCalibWriteTool::s_RawOccuFolderName{"/SCT/Derived/RawOccupancy"}; +const string SCTCalibWriteTool::s_BSErrFolderName{"/SCT/Derived/BSErrorsRun2"}; +const string SCTCalibWriteTool::s_LAFolderName{"/SCT/Derived/LorentzAngleRun2_v2"}; + +const bool becCapsFormat{true}; +const bool becUnderscoreFormat{false}; SCTCalibWriteTool::SCTCalibWriteTool(const std::string& type, const std::string& name, const IInterface* parent) : - AthAlgTool(type, name, parent), - m_detStore(0), - m_eventInfoKey(std::string("ByteStreamEventInfo")), - m_mutex(), - m_attrListColl(0), - m_attrListColl_deadStrip(0), - m_attrListColl_deadChip(0), - m_attrListColl_eff(0), - m_attrListColl_no(0), - m_attrListColl_RawOccu(0), - m_attrListColl_BSErr(0), - m_attrListColl_LA(0), - //boolean properties - m_writeCondObjs(true), - m_regIOV(true), - m_readWriteCool(true), - m_twoStepWriteReg(false), - m_manualiov(true), - - /*m_regTime(0), never used */ - m_version(0), - m_beginRun(IOVTime::MINRUN), - m_endRun(IOVTime::MAXRUN), - m_streamName("CondStreamTest"), - - m_regSvc(0), - m_streamer(0), - //m_streamer("AthenaOutputStreamTool"), - m_badIds(), - - m_defectRecorded(false), - m_deadStripRecorded(false), - m_deadChipRecorded(false), - m_effRecorded(false), - m_noRecorded(false), - m_RawOccuRecorded(false), - m_BSErrRecorded(false), - m_LARecorded(false), - m_pHelper(0) -{ - declareProperty("WriteCondObjs", m_writeCondObjs); - declareProperty("RegisterIOV", m_regIOV); - declareProperty("ReadWriteCool", m_readWriteCool); - declareProperty("TwoStepWriteReg", m_twoStepWriteReg); - declareProperty("ManualIOV", m_manualiov); - //declareProperty("RegTime", m_regTime); never used Register time in sec - - declareProperty("BeginRun", m_beginRun); - declareProperty("EndRun", m_endRun); - //string properties: - declareProperty("StreamName", m_streamName); - declareProperty("TagID4NoisyStrips", m_tagID4NoisyStrips); - declareProperty("TagID4DeadStrips", m_tagID4DeadStrips); - declareProperty("TagID4DeadChips", m_tagID4DeadChips); - declareProperty("TagID4Efficiency", m_tagID4Efficiency); - declareProperty("TagID4NoiseOccupancy", m_tagID4NoiseOccupancy); - declareProperty("TagID4RawOccupancy", m_tagID4RawOccupancy); - declareProperty("TagID4BSErrors", m_tagID4BSErrors); - declareProperty("TagID4LorentzAngle", m_tagID4LorentzAngle); - -} + AthAlgTool(type, name, parent), + m_eventInfoKey{"ByteStreamEventInfo"}, + m_mutex{}, + m_attrListColl{nullptr}, + m_attrListColl_deadStrip{nullptr}, + m_attrListColl_deadChip{nullptr}, + m_attrListColl_eff{nullptr}, + m_attrListColl_no{nullptr}, + m_attrListColl_RawOccu{nullptr}, + m_attrListColl_BSErr{nullptr}, + m_attrListColl_LA{nullptr}, + m_version{0}, + m_regSvc{nullptr}, + m_streamer{nullptr}, + m_defectRecorded{false}, + m_deadStripRecorded{false}, + m_deadChipRecorded{false}, + m_effRecorded{false}, + m_noRecorded{false}, + m_RawOccuRecorded{false}, + m_BSErrRecorded{false}, + m_LARecorded{false}, + m_pHelper{nullptr} + { + declareProperty("WriteCondObjs", m_writeCondObjs=true); + declareProperty("RegisterIOV", m_regIOV=true); + declareProperty("ReadWriteCool", m_readWriteCool=true); + declareProperty("TwoStepWriteReg", m_twoStepWriteReg=false); + declareProperty("ManualIOV", m_manualiov=true); + + declareProperty("BeginRun", m_beginRun=IOVTime::MINRUN); + declareProperty("EndRun", m_endRun=IOVTime::MAXRUN); + //string properties: + declareProperty("StreamName", m_streamName="CondStreamTest"); + declareProperty("TagID4NoisyStrips", m_tagID4NoisyStrips); + declareProperty("TagID4DeadStrips", m_tagID4DeadStrips); + declareProperty("TagID4DeadChips", m_tagID4DeadChips); + declareProperty("TagID4Efficiency", m_tagID4Efficiency); + declareProperty("TagID4NoiseOccupancy", m_tagID4NoiseOccupancy); + declareProperty("TagID4RawOccupancy", m_tagID4RawOccupancy); + declareProperty("TagID4BSErrors", m_tagID4BSErrors); + declareProperty("TagID4LorentzAngle", m_tagID4LorentzAngle); + + } /////////////////////////////////////////////////////////////////////////////////////////// StatusCode -SCTCalibWriteTool::initialize() { - StatusCode sc = service("DetectorStore", m_detStore); - if ( !sc.isSuccess() || 0 == m_detStore) return msg(MSG:: ERROR) << "Could not find DetStore" << endmsg, StatusCode::FAILURE; - if (m_detStore->retrieve(m_pHelper,"SCT_ID").isFailure()) return msg(MSG:: ERROR) << "SCT mgr failed to retrieve" << endmsg, StatusCode::FAILURE; - - ATH_CHECK(m_eventInfoKey.initialize()); - - // ------------------------------------------------------------ - // The following is required for writing out something to COOL - - // CondAttrListCollection to store table temporarily - m_attrListColl = new CondAttrListCollection(true); - m_attrListColl_deadStrip = new CondAttrListCollection(true); - m_attrListColl_deadChip = new CondAttrListCollection(true); - m_attrListColl_eff = new CondAttrListCollection(true); - m_attrListColl_no = new CondAttrListCollection(true); - m_attrListColl_RawOccu = new CondAttrListCollection(true); - m_attrListColl_BSErr = new CondAttrListCollection(true); - m_attrListColl_LA = new CondAttrListCollection(true); - - // Get the IOVRegistrationSvc when needed - if (m_regIOV) { - if (service("IOVRegistrationSvc", m_regSvc).isFailure()) return msg(MSG:: ERROR)<< "Unable to find IOVRegistrationSvc "<< endmsg, StatusCode::FAILURE; - } - return StatusCode::SUCCESS; +SCTCalibWriteTool::queryInterface(const InterfaceID& riid, void** ppvIF) +{ + if (SCTCalibWriteTool::interfaceID().versionMatch(riid) ) { + *ppvIF = static_cast<SCTCalibWriteTool*>(this); + } else { + return AthAlgTool::queryInterface(riid, ppvIF); + } + return StatusCode::SUCCESS; } -////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////////////////// StatusCode -SCTCalibWriteTool::finalize() { - if (!m_defectRecorded) delete m_attrListColl; - if (!m_deadStripRecorded) delete m_attrListColl_deadStrip; - if (!m_deadChipRecorded) delete m_attrListColl_deadChip; - if (!m_effRecorded) delete m_attrListColl_eff; - if (!m_noRecorded) delete m_attrListColl_no; - if (!m_RawOccuRecorded) delete m_attrListColl_RawOccu; - if (!m_BSErrRecorded) delete m_attrListColl_BSErr; - if (!m_LARecorded) delete m_attrListColl_LA; - return StatusCode::SUCCESS; +SCTCalibWriteTool::initialize() { + if (detStore()->retrieve(m_pHelper,"SCT_ID").isFailure()) { + ATH_MSG_ERROR("SCT mgr failed to retrieve"); + return StatusCode::FAILURE; + } + + ATH_CHECK(m_eventInfoKey.initialize()); + + // ------------------------------------------------------------ + // The following is required for writing out something to COOL + + // CondAttrListCollection to store table temporarily + m_attrListColl = new CondAttrListCollection{true}; + m_attrListColl_deadStrip = new CondAttrListCollection{true}; + m_attrListColl_deadChip = new CondAttrListCollection{true}; + m_attrListColl_eff = new CondAttrListCollection{true}; + m_attrListColl_no = new CondAttrListCollection{true}; + m_attrListColl_RawOccu = new CondAttrListCollection{true}; + m_attrListColl_BSErr = new CondAttrListCollection{true}; + m_attrListColl_LA = new CondAttrListCollection{true}; + + // Get the IOVRegistrationSvc when needed + if (m_regIOV) { + if (service("IOVRegistrationSvc", m_regSvc).isFailure()) { + ATH_MSG_ERROR("Unable to find IOVRegistrationSvc "); + return StatusCode::FAILURE; + } + } + return StatusCode::SUCCESS; } ////////////////////////////////////////////////////////////////////////////////////////// StatusCode -SCTCalibWriteTool::queryInterface(const InterfaceID& riid, void** ppvIF) -{ - if(SCTCalibWriteTool::interfaceID().versionMatch(riid) ) { - *ppvIF = (SCTCalibWriteTool*)this; - } else { - return AthAlgTool::queryInterface(riid, ppvIF); - } - return StatusCode::SUCCESS; +SCTCalibWriteTool::finalize() { + delete m_attrListColl; + delete m_attrListColl_deadStrip; + delete m_attrListColl_deadChip; + delete m_attrListColl_eff; + delete m_attrListColl_no; + delete m_attrListColl_RawOccu; + delete m_attrListColl_BSErr; + delete m_attrListColl_LA; + return StatusCode::SUCCESS; } ////////////////////////////////////////////////////////////////////////////////////////// unsigned int SCTCalibWriteTool::computeIstrip4moncond(const Identifier& elementId) const { - unsigned int iiside = m_pHelper->side(elementId); - unsigned int iistrip = m_pHelper->strip(elementId); - return 768*iiside + iistrip; -} - -StatusCode -SCTCalibWriteTool::fillData() { - // this is a dummy function - return StatusCode::SUCCESS; + unsigned int iiside{static_cast<unsigned int>(m_pHelper->side(elementId))}; + unsigned int iistrip{static_cast<unsigned int>(m_pHelper->strip(elementId))}; + return 768*iiside + iistrip; } ////////////////////////////////////////////////////////////////////////////////////////// @@ -198,76 +179,76 @@ SCTCalibWriteTool::fillData() { ////////////////////////////////////////////////////////////////////////////////////////// string -SCTCalibWriteTool::addDefect(const string& defectlist,const int defectBeginChannel,const int defectEndChannel) const { - // check size of defect list, - // if it is empty then use createDefectString to make first entry. - if (defectlist.empty()) return createDefectString(defectBeginChannel,defectEndChannel); - - // adding another Defect in DefectList - std::ostringstream defect; - defect << defectlist << " " << defectBeginChannel; - if (defectBeginChannel==defectEndChannel) { - defect << " "; - } else { - defect << "-" << defectEndChannel << " "; - } - return defect.str(); +SCTCalibWriteTool::addDefect(const string& defectlist, const int defectBeginChannel, const int defectEndChannel) const { + // check size of defect list, + // if it is empty then use createDefectString to make first entry. + if (defectlist.empty()) return createDefectString(defectBeginChannel, defectEndChannel); + + // adding another Defect in DefectList + std::ostringstream defect; + defect << defectlist << " " << defectBeginChannel; + if (defectBeginChannel==defectEndChannel) { + defect << " "; + } else { + defect << "-" << defectEndChannel << " "; + } + return defect.str(); } /////////////////////////////////////////////////////////////////////////////////////// std::string -SCTCalibWriteTool::createDefectString(const int defectBeginChannel,const int defectEndChannel) const { - std::ostringstream defect; - defect << " " << defectBeginChannel; - if (defectBeginChannel!=defectEndChannel) { - defect << "-" << defectEndChannel; - } - defect << " "; - return defect.str(); +SCTCalibWriteTool::createDefectString(const int defectBeginChannel, const int defectEndChannel) const { + std::ostringstream defect; + defect << " " << defectBeginChannel; + if (defectBeginChannel!=defectEndChannel) { + defect << "-" << defectEndChannel; + } + defect << " "; + return defect.str(); } /////////////////////////////////////////////////////////////////////////////////////// std::string -SCTCalibWriteTool::addNumber(const string numStr,const unsigned long long number) const { - std::ostringstream num_string; - // if it is empty then use createDefectString to make first entry. - if (numStr.empty()) { - num_string << number; - } else { // adding another number to numStr - num_string << numStr << " " << number; - } - return num_string.str(); +SCTCalibWriteTool::addNumber(const string numStr, const unsigned long long number) const { + std::ostringstream num_string; + // if it is empty then use createDefectString to make first entry. + if (numStr.empty()) { + num_string << number; + } else { // adding another number to numStr + num_string << numStr << " " << number; + } + return num_string.str(); } ///////////////////////////////////////////////////////////////////////////////////////////// StatusCode -SCTCalibWriteTool::createCondObjects(const Identifier& wafer_id,const SCT_ID* sctId,const int samplesize,const std::string & defectType,const float threshold,const std::string & defectList) const { - if (!m_writeCondObjs) { - return StatusCode::SUCCESS; - } - coral::AttributeListSpecification* attrSpec =createBasicDbSpec(becCapsFormat); - attrSpec->extend("DefectType","string"); - attrSpec->extend("Threshold","float"); - attrSpec->extend("DefectList","string"); - - if (!attrSpec->size()) { - msg(MSG:: ERROR) << " Attribute list specification is empty" <<endmsg; - return StatusCode::FAILURE; - } - - coral::AttributeList attrList0(*attrSpec); - setBasicValues(attrList0, wafer_id, samplesize,sctId,becCapsFormat); - attrList0["DefectType"].setValue(static_cast<std::string>(defectType)); - attrList0["Threshold"].setValue(static_cast<float>(threshold)); - attrList0["DefectList"].setValue(static_cast<std::string>(defectList)); - std::ostringstream attrStr2; - attrList0.toOutputStream( attrStr2 ); - m_attrListColl->add(wafer_id.get_identifier32().get_compact(), attrList0); - return StatusCode::SUCCESS; +SCTCalibWriteTool::createCondObjects(const Identifier& wafer_id, const SCT_ID* sctId, const int samplesize, const std::string& defectType, const float threshold, const std::string& defectList) const { + if (!m_writeCondObjs) { + return StatusCode::SUCCESS; + } + coral::AttributeListSpecification* attrSpec{createBasicDbSpec(becCapsFormat)}; + attrSpec->extend("DefectType", "string"); + attrSpec->extend("Threshold", "float"); + attrSpec->extend("DefectList", "string"); + + if (!attrSpec->size()) { + ATH_MSG_ERROR(" Attribute list specification is empty"); + return StatusCode::FAILURE; + } + + coral::AttributeList attrList0{*attrSpec}; + setBasicValues(attrList0, wafer_id, samplesize,sctId,becCapsFormat); + attrList0["DefectType"].setValue(static_cast<std::string>(defectType)); + attrList0["Threshold"].setValue(static_cast<float>(threshold)); + attrList0["DefectList"].setValue(static_cast<std::string>(defectList)); + std::ostringstream attrStr2; + attrList0.toOutputStream(attrStr2); + m_attrListColl->add(wafer_id.get_identifier32().get_compact(), attrList0); + return StatusCode::SUCCESS; } //////////////////////////////////////////////////////////////////////////////// @@ -276,483 +257,482 @@ StatusCode SCTCalibWriteTool::createListStrip(const Identifier& wafer_id, const SCT_ID* sctId, const int samplesize, - const std::string & defectType, + const std::string& defectType, const float threshold, - const std::string & defectList) const + const std::string& defectList) const { - if (!m_writeCondObjs) { - return StatusCode::SUCCESS; - } - coral::AttributeListSpecification* attrSpec =createBasicDbSpec(becCapsFormat); - attrSpec->extend("DefectType","string"); - attrSpec->extend("Threshold","float"); - attrSpec->extend("DefectList","string"); - - if (!attrSpec->size()) { - msg(MSG:: ERROR) << " Attribute list specification is empty" <<endmsg; - return StatusCode::FAILURE; - } - - coral::AttributeList attrList0(*attrSpec); - setBasicValues(attrList0, wafer_id, samplesize,sctId, becCapsFormat); - attrList0["DefectType"].setValue(static_cast<std::string>(defectType)); - attrList0["Threshold"].setValue(static_cast<float>(threshold)); - attrList0["DefectList"].setValue(static_cast<std::string>(defectList)); - - std::ostringstream attrStr2; - attrList0.toOutputStream( attrStr2 ); - m_attrListColl_deadStrip->add(wafer_id.get_identifier32().get_compact(), attrList0); - msg(MSG::INFO)<<"createListStrip: return StatusCode::SUCCESS"<<endmsg; - return StatusCode::SUCCESS; + if (!m_writeCondObjs) { + return StatusCode::SUCCESS; + } + coral::AttributeListSpecification* attrSpec{createBasicDbSpec(becCapsFormat)}; + attrSpec->extend("DefectType", "string"); + attrSpec->extend("Threshold", "float"); + attrSpec->extend("DefectList", "string"); + + if (!attrSpec->size()) { + ATH_MSG_ERROR(" Attribute list specification is empty"); + return StatusCode::FAILURE; + } + + coral::AttributeList attrList0{*attrSpec}; + setBasicValues(attrList0, wafer_id, samplesize, sctId, becCapsFormat); + attrList0["DefectType"].setValue(static_cast<std::string>(defectType)); + attrList0["Threshold"].setValue(static_cast<float>(threshold)); + attrList0["DefectList"].setValue(static_cast<std::string>(defectList)); + + std::ostringstream attrStr2; + attrList0.toOutputStream(attrStr2); + m_attrListColl_deadStrip->add(wafer_id.get_identifier32().get_compact(), attrList0); + ATH_MSG_INFO("createListStrip: return StatusCode::SUCCESS"); + return StatusCode::SUCCESS; } //////////////////////////////////////////////////////////////////////////////// StatusCode -SCTCalibWriteTool::createListChip(const Identifier& wafer_id,const SCT_ID* sctId,const int samplesize,const std::string & defectType,const float threshold,const std::string & defectList) const { - if (!m_writeCondObjs) { - return StatusCode::SUCCESS; - } - coral::AttributeListSpecification* attrSpec =createBasicDbSpec(becCapsFormat); - attrSpec->extend("DefectType","string"); - attrSpec->extend("Threshold","float"); - attrSpec->extend("DefectList","string"); - if (!attrSpec->size()) { - msg(MSG:: ERROR) << " Attribute list specification is empty" <<endmsg; - return StatusCode::FAILURE; - } - - // Add three attr lists - coral::AttributeList attrList0(*attrSpec); - setBasicValues(attrList0, wafer_id, samplesize,sctId, becCapsFormat); - attrList0["DefectType"].setValue(static_cast<std::string>(defectType)); - attrList0["Threshold"].setValue(static_cast<float>(threshold)); - attrList0["DefectList"].setValue(static_cast<std::string>(defectList)); - - std::ostringstream attrStr2; - attrList0.toOutputStream( attrStr2 ); - m_attrListColl_deadChip->add(wafer_id.get_identifier32().get_compact(), attrList0); - - return StatusCode::SUCCESS; +SCTCalibWriteTool::createListChip(const Identifier& wafer_id, const SCT_ID* sctId, const int samplesize, const std::string& defectType, const float threshold, const std::string& defectList) const { + if (!m_writeCondObjs) { + return StatusCode::SUCCESS; + } + coral::AttributeListSpecification* attrSpec{createBasicDbSpec(becCapsFormat)}; + attrSpec->extend("DefectType", "string"); + attrSpec->extend("Threshold", "float"); + attrSpec->extend("DefectList", "string"); + if (!attrSpec->size()) { + ATH_MSG_ERROR(" Attribute list specification is empty"); + return StatusCode::FAILURE; + } + + // Add three attr lists + coral::AttributeList attrList0{*attrSpec}; + setBasicValues(attrList0, wafer_id, samplesize, sctId, becCapsFormat); + attrList0["DefectType"].setValue(static_cast<std::string>(defectType)); + attrList0["Threshold"].setValue(static_cast<float>(threshold)); + attrList0["DefectList"].setValue(static_cast<std::string>(defectList)); + + std::ostringstream attrStr2; + attrList0.toOutputStream(attrStr2); + m_attrListColl_deadChip->add(wafer_id.get_identifier32().get_compact(), attrList0); + + return StatusCode::SUCCESS; } //////////////////////////////////////////////////////////////////////////////// StatusCode -SCTCalibWriteTool::createListEff(const Identifier& wafer_id,const SCT_ID* sctId,const int samplesize,const float eff) const { - if(!m_writeCondObjs) { - return StatusCode::SUCCESS; - } +SCTCalibWriteTool::createListEff(const Identifier& wafer_id,const SCT_ID* sctId, const int samplesize, const float eff) const { + if (!m_writeCondObjs) { + return StatusCode::SUCCESS; + } - coral::AttributeListSpecification* attrSpec =createBasicDbSpec(becUnderscoreFormat); - attrSpec->extend("Efficiency", "float"); - if (!attrSpec->size()) { - msg(MSG:: ERROR) << " Attribute list specification is empty" <<endmsg; - return(StatusCode::FAILURE); - } + coral::AttributeListSpecification* attrSpec{createBasicDbSpec(becUnderscoreFormat)}; + attrSpec->extend("Efficiency", "float"); + if (!attrSpec->size()) { + ATH_MSG_ERROR(" Attribute list specification is empty"); + return StatusCode::FAILURE; + } - coral::AttributeList attrList0(*attrSpec); - setBasicValues(attrList0, wafer_id, samplesize,sctId,becUnderscoreFormat); - attrList0["Efficiency"].setValue(static_cast<float>(eff)); + coral::AttributeList attrList0{*attrSpec}; + setBasicValues(attrList0, wafer_id, samplesize,sctId,becUnderscoreFormat); + attrList0["Efficiency"].setValue(static_cast<float>(eff)); - std::ostringstream attrStr2; - attrList0.toOutputStream(attrStr2); - m_attrListColl_eff->add(wafer_id.get_identifier32().get_compact(), attrList0); + std::ostringstream attrStr2; + attrList0.toOutputStream(attrStr2); + m_attrListColl_eff->add(wafer_id.get_identifier32().get_compact(), attrList0); - return StatusCode::SUCCESS; + return StatusCode::SUCCESS; } /////////////////////////////////////////////////////////////////////////////////// StatusCode -SCTCalibWriteTool::createListNO(const Identifier& wafer_id,const SCT_ID* sctId,const int samplesize,const float noise_occ) const { - if (!m_writeCondObjs) { - return StatusCode::SUCCESS; - } - coral::AttributeListSpecification* attrSpec =createBasicDbSpec(becUnderscoreFormat); - attrSpec->extend("NoiseOccupancy", "float"); - if (!attrSpec->size()) { - msg(MSG:: ERROR) << " Attribute list specification is empty" <<endmsg; - return StatusCode::FAILURE; - } - // Add three attr lists - coral::AttributeList attrList0(*attrSpec); - setBasicValues(attrList0, wafer_id, samplesize,sctId,becUnderscoreFormat); - attrList0["NoiseOccupancy"].setValue(static_cast<float>(noise_occ)); - std::ostringstream attrStr2; - attrList0.toOutputStream(attrStr2); - m_attrListColl_no->add(wafer_id.get_identifier32().get_compact(), attrList0); - return StatusCode::SUCCESS; +SCTCalibWriteTool::createListNO(const Identifier& wafer_id, const SCT_ID* sctId, const int samplesize, const float noise_occ) const { + if (!m_writeCondObjs) { + return StatusCode::SUCCESS; + } + coral::AttributeListSpecification* attrSpec{createBasicDbSpec(becUnderscoreFormat)}; + attrSpec->extend("NoiseOccupancy", "float"); + if (!attrSpec->size()) { + ATH_MSG_ERROR(" Attribute list specification is empty"); + return StatusCode::FAILURE; + } + // Add three attr lists + coral::AttributeList attrList0{*attrSpec}; + setBasicValues(attrList0, wafer_id, samplesize, sctId, becUnderscoreFormat); + attrList0["NoiseOccupancy"].setValue(static_cast<float>(noise_occ)); + std::ostringstream attrStr2; + attrList0.toOutputStream(attrStr2); + m_attrListColl_no->add(wafer_id.get_identifier32().get_compact(), attrList0); + return StatusCode::SUCCESS; } /////////////////////////////////////////////////////////////////////////////////// StatusCode -SCTCalibWriteTool::createListRawOccu(const Identifier& wafer_id,const SCT_ID* sctId,const int samplesize,const float raw_occu) const { - if (!m_writeCondObjs) { - return StatusCode::SUCCESS; - } - coral::AttributeListSpecification* attrSpec =createBasicDbSpec(becUnderscoreFormat); - attrSpec->extend("RawOccupancy", "float"); - if (!attrSpec->size()) { - msg(MSG:: ERROR) << " Attribute list specification is empty" <<endmsg; - return StatusCode::FAILURE; - } - // Add three attr lists - coral::AttributeList attrList0(*attrSpec); - setBasicValues(attrList0, wafer_id, samplesize, sctId,becUnderscoreFormat); - attrList0["RawOccupancy"].setValue(static_cast<float>(raw_occu)); - std::ostringstream attrStr2; - attrList0.toOutputStream(attrStr2); - m_attrListColl_RawOccu->add(wafer_id.get_identifier32().get_compact(), attrList0); - return StatusCode::SUCCESS; +SCTCalibWriteTool::createListRawOccu(const Identifier& wafer_id, const SCT_ID* sctId, const int samplesize, const float raw_occu) const { + if (!m_writeCondObjs) { + return StatusCode::SUCCESS; + } + coral::AttributeListSpecification* attrSpec{createBasicDbSpec(becUnderscoreFormat)}; + attrSpec->extend("RawOccupancy", "float"); + if (!attrSpec->size()) { + ATH_MSG_ERROR(" Attribute list specification is empty"); + return StatusCode::FAILURE; + } + // Add three attr lists + coral::AttributeList attrList0{*attrSpec}; + setBasicValues(attrList0, wafer_id, samplesize, sctId,becUnderscoreFormat); + attrList0["RawOccupancy"].setValue(static_cast<float>(raw_occu)); + std::ostringstream attrStr2; + attrList0.toOutputStream(attrStr2); + m_attrListColl_RawOccu->add(wafer_id.get_identifier32().get_compact(), attrList0); + return StatusCode::SUCCESS; } /////////////////////////////////////////////////////////////////////////////////// StatusCode -SCTCalibWriteTool::createListBSErr(const Identifier& wafer_id,const SCT_ID* sctId,const int samplesize,const std::string & errorList,const std::string & probList) const { - if (!m_writeCondObjs) { - return StatusCode::SUCCESS; - } - - int eta = sctId->eta_module(wafer_id); - int phi = sctId->phi_module(wafer_id); - int barrel_ec = sctId->barrel_ec(wafer_id); - int layer = sctId->layer_disk(wafer_id); - - coral::AttributeListSpecification* attrSpec = - new coral::AttributeListSpecification(); - attrSpec->extend("SampleSize", "int"); - attrSpec->extend("barrel_endcap", "int"); - attrSpec->extend("Layer", "int"); - attrSpec->extend("Eta", "int"); - attrSpec->extend("Phi", "int"); - attrSpec->extend("BSErrors", "string"); - attrSpec->extend("BadFraction", "string"); - - if (!attrSpec->size()) { - msg(MSG:: ERROR) << " Attribute list specification is empty" <<endmsg; - return StatusCode::FAILURE; - } - - // Add three attr lists - coral::AttributeList attrList0(*attrSpec); - attrList0["SampleSize"].setValue(static_cast<int>(samplesize)); - attrList0["barrel_endcap"].setValue(static_cast<int>(barrel_ec)); - attrList0["Layer"].setValue(static_cast<int>(layer)); - attrList0["Phi"].setValue(static_cast<int>(phi)); - attrList0["Eta"].setValue(static_cast<int>(eta)); - attrList0["BSErrors"].setValue(static_cast<std::string>(errorList)); - attrList0["BadFraction"].setValue(static_cast<std::string>(probList)); - - std::ostringstream attrStr2; - attrList0.toOutputStream(attrStr2); - m_attrListColl_BSErr->add(wafer_id.get_identifier32().get_compact(), attrList0); - return StatusCode::SUCCESS; +SCTCalibWriteTool::createListBSErr(const Identifier& wafer_id,const SCT_ID* sctId,const int samplesize, const std::string& errorList, const std::string& probList) const { + if (!m_writeCondObjs) { + return StatusCode::SUCCESS; + } + + int eta{sctId->eta_module(wafer_id)}; + int phi{sctId->phi_module(wafer_id)}; + int barrel_ec{sctId->barrel_ec(wafer_id)}; + int layer{sctId->layer_disk(wafer_id)}; + + coral::AttributeListSpecification* attrSpec{new coral::AttributeListSpecification{}}; + attrSpec->extend("SampleSize", "int"); + attrSpec->extend("barrel_endcap", "int"); + attrSpec->extend("Layer", "int"); + attrSpec->extend("Eta", "int"); + attrSpec->extend("Phi", "int"); + attrSpec->extend("BSErrors", "string"); + attrSpec->extend("BadFraction", "string"); + + if (!attrSpec->size()) { + ATH_MSG_ERROR(" Attribute list specification is empty"); + return StatusCode::FAILURE; + } + + // Add three attr lists + coral::AttributeList attrList0{*attrSpec}; + attrList0["SampleSize"].setValue(static_cast<int>(samplesize)); + attrList0["barrel_endcap"].setValue(static_cast<int>(barrel_ec)); + attrList0["Layer"].setValue(static_cast<int>(layer)); + attrList0["Phi"].setValue(static_cast<int>(phi)); + attrList0["Eta"].setValue(static_cast<int>(eta)); + attrList0["BSErrors"].setValue(static_cast<std::string>(errorList)); + attrList0["BadFraction"].setValue(static_cast<std::string>(probList)); + + std::ostringstream attrStr2; + attrList0.toOutputStream(attrStr2); + m_attrListColl_BSErr->add(wafer_id.get_identifier32().get_compact(), attrList0); + return StatusCode::SUCCESS; } /////////////////////////////////////////////////////////////////////////////////// StatusCode -SCTCalibWriteTool::createListLA(const Identifier& wafer_id,const SCT_ID* sctId,const int samplesize,int module, const float lorentz, const float err_lorentz, const float chisq, const float fitParam_a, const float err_a, const float fitParam_b, const float err_b, const float fitParam_sigma, const float err_sigma, const float MCW, const float err_MCW ) const { - if (!m_writeCondObjs) return StatusCode::SUCCESS; - int barrel_ec = sctId->barrel_ec(wafer_id); - int layer = sctId->layer_disk(wafer_id); - int side = sctId->side(wafer_id); - - coral::AttributeListSpecification* attrSpec =new coral::AttributeListSpecification(); - attrSpec->extend("SampleSize", "int"); - attrSpec->extend("barrel_endcap", "int"); - attrSpec->extend("Layer", "int"); - attrSpec->extend("Side", "int"); - attrSpec->extend("moduleType", "int"); - attrSpec->extend("lorentzAngle", "float"); - attrSpec->extend("err_lorentzAngle", "float"); - attrSpec->extend("chisq", "float"); - attrSpec->extend("fitParam_a", "float"); - attrSpec->extend("err_a", "float"); - attrSpec->extend("fitParam_b", "float"); - attrSpec->extend("err_b", "float"); - attrSpec->extend("fitParam_sigma", "float"); - attrSpec->extend("err_sigma", "float"); - attrSpec->extend("minClusterWidth", "float"); - attrSpec->extend("err_minClusterWidth", "float"); - - if (!attrSpec->size()) { - msg(MSG:: ERROR) << " Attribute list specification is empty" <<endmsg; - return StatusCode::FAILURE; - } - - // Add three attr lists - coral::AttributeList attrList0(*attrSpec); - attrList0["SampleSize"].setValue(static_cast<int>(samplesize)); - attrList0["barrel_endcap"].setValue(static_cast<int>(barrel_ec)); - attrList0["Layer"].setValue(static_cast<int>(layer)); - attrList0["Side"].setValue(static_cast<int>(side)); - attrList0["moduleType"].setValue(static_cast<int>(module)); - attrList0["lorentzAngle"].setValue(static_cast<float>(lorentz)); - attrList0["err_lorentzAngle"].setValue(static_cast<float>(err_lorentz)); - attrList0["chisq"].setValue(static_cast<float>(chisq)); - attrList0["fitParam_a"].setValue(static_cast<float>(fitParam_a)); - attrList0["err_a"].setValue(static_cast<float>(err_a)); - attrList0["fitParam_b"].setValue(static_cast<float>(fitParam_b)); - attrList0["err_b"].setValue(static_cast<float>(err_b)); - attrList0["fitParam_sigma"].setValue(static_cast<float>(fitParam_sigma)); - attrList0["err_sigma"].setValue(static_cast<float>(err_sigma)); - attrList0["minClusterWidth"].setValue(static_cast<float>(MCW)); - attrList0["err_minClusterWidth"].setValue(static_cast<float>(err_MCW)); - - std::ostringstream attrStr2; - attrList0.toOutputStream(attrStr2); - m_attrListColl_LA->add(wafer_id.get_identifier32().get_compact(), attrList0); - - return StatusCode::SUCCESS; +SCTCalibWriteTool::createListLA(const Identifier& wafer_id,const SCT_ID* sctId,const int samplesize,int module, const float lorentz, const float err_lorentz, const float chisq, const float fitParam_a, const float err_a, const float fitParam_b, const float err_b, const float fitParam_sigma, const float err_sigma, const float MCW, const float err_MCW) const { + if (!m_writeCondObjs) return StatusCode::SUCCESS; + int barrel_ec{sctId->barrel_ec(wafer_id)}; + int layer{sctId->layer_disk(wafer_id)}; + int side{sctId->side(wafer_id)}; + + coral::AttributeListSpecification* attrSpec{new coral::AttributeListSpecification{}}; + attrSpec->extend("SampleSize", "int"); + attrSpec->extend("barrel_endcap", "int"); + attrSpec->extend("Layer", "int"); + attrSpec->extend("Side", "int"); + attrSpec->extend("moduleType", "int"); + attrSpec->extend("lorentzAngle", "float"); + attrSpec->extend("err_lorentzAngle", "float"); + attrSpec->extend("chisq", "float"); + attrSpec->extend("fitParam_a", "float"); + attrSpec->extend("err_a", "float"); + attrSpec->extend("fitParam_b", "float"); + attrSpec->extend("err_b", "float"); + attrSpec->extend("fitParam_sigma", "float"); + attrSpec->extend("err_sigma", "float"); + attrSpec->extend("minClusterWidth", "float"); + attrSpec->extend("err_minClusterWidth", "float"); + + if (!attrSpec->size()) { + ATH_MSG_ERROR(" Attribute list specification is empty"); + return StatusCode::FAILURE; + } + + // Add three attr lists + coral::AttributeList attrList0{*attrSpec}; + attrList0["SampleSize"].setValue(static_cast<int>(samplesize)); + attrList0["barrel_endcap"].setValue(static_cast<int>(barrel_ec)); + attrList0["Layer"].setValue(static_cast<int>(layer)); + attrList0["Side"].setValue(static_cast<int>(side)); + attrList0["moduleType"].setValue(static_cast<int>(module)); + attrList0["lorentzAngle"].setValue(static_cast<float>(lorentz)); + attrList0["err_lorentzAngle"].setValue(static_cast<float>(err_lorentz)); + attrList0["chisq"].setValue(static_cast<float>(chisq)); + attrList0["fitParam_a"].setValue(static_cast<float>(fitParam_a)); + attrList0["err_a"].setValue(static_cast<float>(err_a)); + attrList0["fitParam_b"].setValue(static_cast<float>(fitParam_b)); + attrList0["err_b"].setValue(static_cast<float>(err_b)); + attrList0["fitParam_sigma"].setValue(static_cast<float>(fitParam_sigma)); + attrList0["err_sigma"].setValue(static_cast<float>(err_sigma)); + attrList0["minClusterWidth"].setValue(static_cast<float>(MCW)); + attrList0["err_minClusterWidth"].setValue(static_cast<float>(err_MCW)); + + std::ostringstream attrStr2; + attrList0.toOutputStream(attrStr2); + m_attrListColl_LA->add(wafer_id.get_identifier32().get_compact(), attrList0); + + return StatusCode::SUCCESS; } /////////////////////////////////////////////////////////////////////////////////////// const CondAttrListCollection* SCTCalibWriteTool::getAttrListCollectionByFolder(const string& foldername) const { - std::lock_guard<std::mutex> lock(m_mutex); - // trying to find the pointer in the hashmap - // if it exists, return it, otherwise put it in. - const CondAttrListCollection* nullPtr(0); - const CondAttrListCollection* attrListCollection = nullPtr; - if (m_attrListCollectionMap.count(foldername) == 0) { - if ( m_detStore->retrieve(attrListCollection, foldername).isFailure()) return msg(MSG:: ERROR)<< "Could not retrieve " << foldername << endmsg, nullPtr; - m_attrListCollectionMap.insert(make_pair(foldername, attrListCollection)); - } else { - attrListCollection = m_attrListCollectionMap[foldername]; - } - return attrListCollection; + std::lock_guard<std::mutex> lock{m_mutex}; + // trying to find the pointer in the hashmap + // if it exists, return it, otherwise put it in. + const CondAttrListCollection* attrListCollection{nullptr}; + if (m_attrListCollectionMap.count(foldername) == 0) { + if (detStore()->retrieve(attrListCollection, foldername).isFailure()) { + ATH_MSG_ERROR("Could not retrieve " << foldername); + return nullptr; + } + m_attrListCollectionMap.insert(make_pair(foldername, attrListCollection)); + } else { + attrListCollection = m_attrListCollectionMap[foldername]; + } + return attrListCollection; } /////////////////////////////////////////////////////////////////////////////////////// int SCTCalibWriteTool::stringToInt(const std::string& s) const { - return atoi(s.c_str()); + return atoi(s.c_str()); } /////////////////////////////////////////////////////////////////////////////////////// StatusCode SCTCalibWriteTool::wrapUpNoisyChannel() { - if (recordAndStream(m_attrListColl,s_defectFolderName,m_defectRecorded).isFailure()) return StatusCode::FAILURE; - if (registerCondObjectsWithErrMsg(s_defectFolderName, m_tagID4NoisyStrips).isFailure()) return StatusCode::FAILURE; - return StatusCode::SUCCESS; + if (recordAndStream(m_attrListColl, s_defectFolderName, m_defectRecorded).isFailure()) return StatusCode::FAILURE; + if (registerCondObjectsWithErrMsg(s_defectFolderName, m_tagID4NoisyStrips).isFailure()) return StatusCode::FAILURE; + return StatusCode::SUCCESS; } /////////////////////////////////////////////////////////////////////////////////////// StatusCode SCTCalibWriteTool::wrapUpDeadStrips() { - if ( recordAndStream(m_attrListColl_deadStrip,s_deadStripFolderName,m_deadStripRecorded).isFailure()) return StatusCode::FAILURE; - if (registerCondObjectsWithErrMsg(s_deadStripFolderName, m_tagID4DeadStrips).isFailure()) return StatusCode::FAILURE; - return StatusCode::SUCCESS; + if (recordAndStream(m_attrListColl_deadStrip, s_deadStripFolderName, m_deadStripRecorded).isFailure()) return StatusCode::FAILURE; + if (registerCondObjectsWithErrMsg(s_deadStripFolderName, m_tagID4DeadStrips).isFailure()) return StatusCode::FAILURE; + return StatusCode::SUCCESS; } /////////////////////////////////////////////////////////////////////////////////////// StatusCode SCTCalibWriteTool::wrapUpDeadChips() { - if (recordAndStream(m_attrListColl_deadChip,s_deadChipFolderName,m_deadChipRecorded).isFailure()) return StatusCode::FAILURE; - if (registerCondObjectsWithErrMsg(s_deadChipFolderName, m_tagID4DeadChips).isFailure()) return StatusCode::FAILURE; - return StatusCode::SUCCESS; + if (recordAndStream(m_attrListColl_deadChip, s_deadChipFolderName, m_deadChipRecorded).isFailure()) return StatusCode::FAILURE; + if (registerCondObjectsWithErrMsg(s_deadChipFolderName, m_tagID4DeadChips).isFailure()) return StatusCode::FAILURE; + return StatusCode::SUCCESS; } /////////////////////////////////////////////////////////////////////////////////////// StatusCode SCTCalibWriteTool::wrapUpEfficiency() { - if (recordAndStream(m_attrListColl_eff, s_effFolderName,m_effRecorded).isFailure()) return StatusCode::FAILURE; - if (registerCondObjectsWithErrMsg(s_effFolderName, m_tagID4Efficiency).isFailure()) return StatusCode::FAILURE; - return StatusCode::SUCCESS; + if (recordAndStream(m_attrListColl_eff, s_effFolderName, m_effRecorded).isFailure()) return StatusCode::FAILURE; + if (registerCondObjectsWithErrMsg(s_effFolderName, m_tagID4Efficiency).isFailure()) return StatusCode::FAILURE; + return StatusCode::SUCCESS; } /////////////////////////////////////////////////////////////////////////////////////// StatusCode SCTCalibWriteTool::wrapUpNoiseOccupancy() { - if (recordAndStream(m_attrListColl_no, s_noFolderName,m_noRecorded).isFailure()) return StatusCode::FAILURE; - if (registerCondObjectsWithErrMsg(s_noFolderName, m_tagID4NoiseOccupancy).isFailure()) return StatusCode::FAILURE; - return StatusCode::SUCCESS; + if (recordAndStream(m_attrListColl_no, s_noFolderName, m_noRecorded).isFailure()) return StatusCode::FAILURE; + if (registerCondObjectsWithErrMsg(s_noFolderName, m_tagID4NoiseOccupancy).isFailure()) return StatusCode::FAILURE; + return StatusCode::SUCCESS; } /////////////////////////////////////////////////////////////////////////////////////// StatusCode SCTCalibWriteTool::wrapUpRawOccupancy() { - if (recordAndStream(m_attrListColl_RawOccu, s_RawOccuFolderName,m_RawOccuRecorded).isFailure()) return StatusCode::FAILURE; - if( registerCondObjectsWithErrMsg(s_RawOccuFolderName, m_tagID4RawOccupancy).isFailure()) return StatusCode::FAILURE; - return StatusCode::SUCCESS; + if (recordAndStream(m_attrListColl_RawOccu, s_RawOccuFolderName, m_RawOccuRecorded).isFailure()) return StatusCode::FAILURE; + if (registerCondObjectsWithErrMsg(s_RawOccuFolderName, m_tagID4RawOccupancy).isFailure()) return StatusCode::FAILURE; + return StatusCode::SUCCESS; } /////////////////////////////////////////////////////////////////////////////////////// StatusCode SCTCalibWriteTool::wrapUpBSErrors() { - if (recordAndStream(m_attrListColl_BSErr, s_BSErrFolderName,m_BSErrRecorded).isFailure()) return StatusCode::FAILURE; - if (registerCondObjectsWithErrMsg(s_BSErrFolderName, m_tagID4BSErrors).isFailure()) return StatusCode::FAILURE; - return StatusCode::SUCCESS; + if (recordAndStream(m_attrListColl_BSErr, s_BSErrFolderName, m_BSErrRecorded).isFailure()) return StatusCode::FAILURE; + if (registerCondObjectsWithErrMsg(s_BSErrFolderName, m_tagID4BSErrors).isFailure()) return StatusCode::FAILURE; + return StatusCode::SUCCESS; } /////////////////////////////////////////////////////////////////////////////////////// StatusCode SCTCalibWriteTool::wrapUpLorentzAngle() { - if (recordAndStream(m_attrListColl_LA, s_LAFolderName,m_LARecorded).isFailure()) return StatusCode::FAILURE; - if( registerCondObjectsWithErrMsg(s_LAFolderName, m_tagID4LorentzAngle).isFailure()) return StatusCode::FAILURE; - return StatusCode::SUCCESS; + if (recordAndStream(m_attrListColl_LA, s_LAFolderName, m_LARecorded).isFailure()) return StatusCode::FAILURE; + if (registerCondObjectsWithErrMsg(s_LAFolderName, m_tagID4LorentzAngle).isFailure()) return StatusCode::FAILURE; + return StatusCode::SUCCESS; } /////////////////////////////////////////////////////////////////////////////////////// StatusCode SCTCalibWriteTool::streamOutCondObjects(const std::string& foldername) { - //if (m_streamer->connectOutput().isFailure()) { - if (m_streamer->connectOutput(m_streamName).isFailure()) { - msg(MSG:: ERROR) <<"Could not connect stream to output" <<endmsg; - return( StatusCode::FAILURE); - } - IAthenaOutputStreamTool::TypeKeyPairs typeKeys(1); - if (m_readWriteCool) { - IAthenaOutputStreamTool::TypeKeyPair - attrCollPair("CondAttrListCollection",foldername); - typeKeys[0] = attrCollPair; - } - - if (m_streamer->streamObjects(typeKeys).isFailure()) { - msg(MSG:: ERROR) << "Could not stream out AttributeLists" << endmsg; - return StatusCode::FAILURE; - } - - if (m_streamer->commitOutput().isFailure()) { - msg(MSG:: ERROR) << "Could not commit output stream" << endmsg; - return StatusCode::FAILURE; - } - return StatusCode::SUCCESS; + if (m_streamer->connectOutput(m_streamName).isFailure()) { + ATH_MSG_ERROR("Could not connect stream to output"); + return( StatusCode::FAILURE); + } + IAthenaOutputStreamTool::TypeKeyPairs typeKeys{1}; + if (m_readWriteCool) { + IAthenaOutputStreamTool::TypeKeyPair + attrCollPair{"CondAttrListCollection", foldername}; + typeKeys[0] = attrCollPair; + } + + if (m_streamer->streamObjects(typeKeys).isFailure()) { + ATH_MSG_ERROR("Could not stream out AttributeLists"); + return StatusCode::FAILURE; + } + + if (m_streamer->commitOutput().isFailure()) { + ATH_MSG_ERROR("Could not commit output stream"); + return StatusCode::FAILURE; + } + return StatusCode::SUCCESS; } /////////////////////////////////////////////////////////////////////////////////////// StatusCode SCTCalibWriteTool::streamOutCondObjectsWithErrMsg(const std::string& foldername) { - if (streamOutCondObjects(foldername).isFailure()) { - return msg(MSG:: ERROR) <<"Could create conditions object "<< foldername<< endmsg, StatusCode::FAILURE; - } - return StatusCode::SUCCESS; + if (streamOutCondObjects(foldername).isFailure()) { + ATH_MSG_ERROR("Could create conditions object " << foldername); + return StatusCode::FAILURE; + } + return StatusCode::SUCCESS; } /////////////////////////////////////////////////////////////////////////////////////// StatusCode -SCTCalibWriteTool::registerCondObjects(const std::string& foldername,const std::string& tagname) { - // Register the IOV DB with the conditions data written out - if (m_readWriteCool) { - // Can only write out AttrList's if this is NOT write and reg in two steps - if (!m_twoStepWriteReg) { - // Using COOL, write out attrlist and collection of attrlists - // attrlist collection - StatusCode sc; - unsigned int beginRun; - unsigned int endRun; - if ( !m_manualiov ) { - - SG::ReadHandle<EventInfo> evt(m_eventInfoKey); - if (not evt.isValid()) { - msg(MSG:: ERROR) << "Unable to get the EventInfo" << endmsg; - return StatusCode::FAILURE; - } - - beginRun = evt->event_ID()->run_number(); - endRun = beginRun; - - } else { - beginRun = m_beginRun; - if ( m_endRun != -1 ) endRun = m_endRun; - else endRun = IOVTime::MAXRUN; - } - - unsigned int beginLB = IOVTime::MINEVENT; - unsigned int endLB = IOVTime::MAXEVENT; - - //msg(MSG:: INFO) <<"beginRun = "<<beginRun<<" endRun = "<<endRun<<" tag = "<<tagname<<" m_manualiov = "<<m_manualiov << endmsg; - - if (not tagname.empty()) { - sc = m_regSvc->registerIOV("CondAttrListCollection",foldername,tagname,beginRun, endRun,beginLB, endLB); - } else { - sc = m_regSvc->registerIOV("CondAttrListCollection",foldername,"",beginRun, endRun,beginLB, endLB); - } - if (sc.isFailure()) { - msg(MSG:: ERROR) <<"Could not register in IOV DB for CondAttrListCollection" << endmsg; - return StatusCode::FAILURE; - } +SCTCalibWriteTool::registerCondObjects(const std::string& foldername,const std::string& tagname) const { + // Register the IOV DB with the conditions data written out + if (m_readWriteCool) { + // Can only write out AttrList's if this is NOT write and reg in two steps + if (!m_twoStepWriteReg) { + // Using COOL, write out attrlist and collection of attrlists + // attrlist collection + StatusCode sc; + unsigned int beginRun; + unsigned int endRun; + if (!m_manualiov) { + + SG::ReadHandle<EventInfo> evt{m_eventInfoKey}; + if (not evt.isValid()) { + ATH_MSG_ERROR("Unable to get the EventInfo"); + return StatusCode::FAILURE; + } + + beginRun = evt->event_ID()->run_number(); + endRun = beginRun; + + } else { + beginRun = m_beginRun; + if ( m_endRun != -1 ) endRun = m_endRun; + else endRun = IOVTime::MAXRUN; } - } - return StatusCode::SUCCESS; + + unsigned int beginLB{IOVTime::MINEVENT}; + unsigned int endLB{IOVTime::MAXEVENT}; + + if (not tagname.empty()) { + sc = m_regSvc->registerIOV("CondAttrListCollection", foldername, tagname, beginRun, endRun, beginLB, endLB); + } else { + sc = m_regSvc->registerIOV("CondAttrListCollection", foldername, "", beginRun, endRun, beginLB, endLB); + } + if (sc.isFailure()) { + ATH_MSG_ERROR("Could not register in IOV DB for CondAttrListCollection"); + return StatusCode::FAILURE; + } + } + } + return StatusCode::SUCCESS; } /////////////////////////////////////////////////////////////////////////////////////// StatusCode -SCTCalibWriteTool::registerCondObjectsWithErrMsg(const std::string& foldername,const std::string& tagname) { - if (m_regIOV) { - if (registerCondObjects(foldername,tagname).isFailure()) { - msg(MSG:: ERROR) << "Could not register "<<foldername << endmsg; - return StatusCode::FAILURE; - } - } - return StatusCode::SUCCESS; +SCTCalibWriteTool::registerCondObjectsWithErrMsg(const std::string& foldername,const std::string& tagname) const { + if (m_regIOV) { + if (registerCondObjects(foldername,tagname).isFailure()) { + ATH_MSG_ERROR("Could not register " << foldername); + return StatusCode::FAILURE; + } + } + return StatusCode::SUCCESS; } /////////////////////////////////////////////////////////////////////////////////////// StatusCode -SCTCalibWriteTool::recordAndStream(const CondAttrListCollection* pCollection,const std::string & foldername, bool & flag) { - if (m_writeCondObjs) { - if (m_detStore->record(pCollection, foldername).isFailure()) { - msg(MSG:: ERROR) << "Could not record "<<foldername << endmsg; - return StatusCode::FAILURE; - } - flag=true; - if (streamOutCondObjectsWithErrMsg(s_defectFolderName).isFailure()) return StatusCode::FAILURE; - } - return StatusCode::SUCCESS; +SCTCalibWriteTool::recordAndStream(const CondAttrListCollection* pCollection,const std::string& foldername, bool& flag) { + if (m_writeCondObjs) { + if (detStore()->record(pCollection, foldername).isFailure()) { + ATH_MSG_ERROR("Could not record "<<foldername); + return StatusCode::FAILURE; + } + flag=true; + if (streamOutCondObjectsWithErrMsg(s_defectFolderName).isFailure()) return StatusCode::FAILURE; + } + return StatusCode::SUCCESS; } /////////////////////////////////////////////////////////////////////////////////////// coral::AttributeListSpecification* SCTCalibWriteTool::createBasicDbSpec(const bool capsFormat) const { - coral::AttributeListSpecification* attrSpec =new coral::AttributeListSpecification(); - const std::string becName=capsFormat?"BarrelEndcap":"barrel_endcap"; - attrSpec->extend("SampleSize", "int"); - attrSpec->extend(becName, "int"); - attrSpec->extend("Layer", "int"); - attrSpec->extend("Eta", "int"); - attrSpec->extend("Phi", "int"); - return attrSpec; + coral::AttributeListSpecification* attrSpec{new coral::AttributeListSpecification{}}; + const std::string becName{capsFormat?"BarrelEndcap":"barrel_endcap"}; + attrSpec->extend("SampleSize", "int"); + attrSpec->extend(becName, "int"); + attrSpec->extend("Layer", "int"); + attrSpec->extend("Eta", "int"); + attrSpec->extend("Phi", "int"); + return attrSpec; } /////////////////////////////////////////////////////////////////////////////////////// void -SCTCalibWriteTool::setBasicValues(coral::AttributeList & attrList, const Identifier& wafer_id, const int samplesize,const SCT_ID* sctId, const bool capsFormat) const { - int eta = sctId->eta_module(wafer_id); - int phi = sctId->phi_module(wafer_id); - int barrel_ec = sctId->barrel_ec(wafer_id); - int layer = sctId->layer_disk(wafer_id); - // - const std::string becName=capsFormat?"BarrelEndcap":"barrel_endcap"; - attrList["SampleSize"].setValue(static_cast<int>(samplesize)); - attrList[becName].setValue(static_cast<int>(barrel_ec)); - attrList["Layer"].setValue(static_cast<int>(layer)); - attrList["Eta"].setValue(static_cast<int>(eta)); - attrList["Phi"].setValue(static_cast<int>(phi)); - - return; +SCTCalibWriteTool::setBasicValues(coral::AttributeList& attrList, const Identifier& wafer_id, const int samplesize, const SCT_ID* sctId, const bool capsFormat) const { + int eta{sctId->eta_module(wafer_id)}; + int phi{sctId->phi_module(wafer_id)}; + int barrel_ec{sctId->barrel_ec(wafer_id)}; + int layer{sctId->layer_disk(wafer_id)}; + // + const std::string becName{capsFormat?"BarrelEndcap":"barrel_endcap"}; + attrList["SampleSize"].setValue(static_cast<int>(samplesize)); + attrList[becName].setValue(static_cast<int>(barrel_ec)); + attrList["Layer"].setValue(static_cast<int>(layer)); + attrList["Eta"].setValue(static_cast<int>(eta)); + attrList["Phi"].setValue(static_cast<int>(phi)); + + return; } /////////////////////////////////////////////////////////////////////////////////////// diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibBsErrorTool.cxx b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibBsErrorTool.cxx index 3f97044896a81cbba9ac96c2bcbdd760d01577a6..f8bf22718557c4e0ba0123ea1d9782bb06662360 100644 --- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibBsErrorTool.cxx +++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibBsErrorTool.cxx @@ -1,170 +1,159 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /** * @file SCT_CalibBsErrorTool.cxx * Implementation file for the SCT_CalibBsErrorTool class * @author Shaun Roe -**/ + **/ #include "SCT_CalibBsErrorTool.h" #include "SCT_CalibUtilities.h" #include "SCT_CalibNumbers.h" -//Inner detector includes - -#include <set> #include "Identifier/Identifier.h" #include "Identifier/IdentifierHash.h" -#include "GaudiKernel/ITHistSvc.h" - -#include "TH1I.h" // RAW data access #include "InDetRawData/InDetRawDataCLASS_DEF.h" #include "InDetRawData/SCT3_RawData.h" +#include "GaudiKernel/ITHistSvc.h" + +#include "TH1I.h" + +#include <set> + using namespace std; using namespace SCT_CalibAlgs; -const static string pathRoot("/BSErrors/"); -const static string detectorPaths[]= {"SCTEC/", "SCTB/","SCTEA/"}; -const static string detectorNames[] = { "negativeEndcap", "barrel", "positiveEndcap" }; -const static int n_BSErrorType = 15; -const static int firstBSErrorType = 0; -const static int lastBSErrorType = 14; -static int MAXHASH(0); +static const string pathRoot{"/BSErrors/"}; +static const string detectorPaths[]{"SCTEC/", "SCTB/","SCTEA/"}; +static const string detectorNames[]{"negativeEndcap", "barrel", "positiveEndcap"}; +static const int n_BSErrorType{15}; +static const int firstBSErrorType{0}; +static const int lastBSErrorType{14}; SCT_CalibBsErrorTool::SCT_CalibBsErrorTool(const std::string& type, const std::string& name, const IInterface* parent) : - base_class(type, name, parent), - m_detStore("DetectorStore", name), - m_evtStore("StoreGateSvc", name), - m_pSCTHelper(0), - m_scterr_bec(0), - m_scterr_layer(0), - m_scterr_eta(0), - m_scterr_phi(0), - m_scterr_side(0), - m_scterr_type(0) + base_class(type, name, parent), + m_pSCTHelper{nullptr}, + m_scterr_bec{0}, + m_scterr_layer{0}, + m_scterr_eta{0}, + m_scterr_phi{0}, + m_scterr_side{0}, + m_scterr_type{0}, + m_maxHash{0} { } StatusCode SCT_CalibBsErrorTool::initialize() { - if ( service( "THistSvc", m_thistSvc ).isFailure() ) return msg( MSG::ERROR) << "Unable to retrieve pointer to THistSvc" << endmsg, StatusCode::FAILURE; - if ( m_detStore->retrieve( m_pSCTHelper, "SCT_ID").isFailure()) return msg( MSG::ERROR) << "Unable to retrieve SCTHelper" << endmsg, StatusCode::FAILURE; - if ( m_bytestreamErrorsTool.retrieve().isFailure()) return msg( MSG::ERROR) << "Unable to retrieve BS Error Tool" << endmsg, StatusCode::FAILURE; - // - MAXHASH=m_pSCTHelper->wafer_hash_max(); - m_waferItrBegin = m_pSCTHelper->wafer_begin(); - m_waferItrEnd = m_pSCTHelper->wafer_end(); - - return StatusCode::SUCCESS; -} + ATH_CHECK(service("THistSvc", m_thistSvc)); + ATH_CHECK(detStore()->retrieve(m_pSCTHelper, "SCT_ID")); + ATH_CHECK(m_bytestreamErrorsTool.retrieve()); -StatusCode -SCT_CalibBsErrorTool::finalize() { - msg( MSG::INFO)<<"Finalize of SCT_CalibBsErrorTool"<<endmsg; + m_maxHash = m_pSCTHelper->wafer_hash_max(); + m_waferItrBegin = m_pSCTHelper->wafer_begin(); + m_waferItrEnd = m_pSCTHelper->wafer_end(); - return StatusCode::SUCCESS; + return StatusCode::SUCCESS; } StatusCode -SCT_CalibBsErrorTool::queryInterface(const InterfaceID & riid, void** ppvInterface ) { - if ( ISCT_CalibHistoTool::interfaceID().versionMatch(riid) ) { - *ppvInterface = dynamic_cast<ISCT_CalibHistoTool*>(this); - } else { - return AthAlgTool::queryInterface(riid, ppvInterface); - } - addRef(); - return StatusCode::SUCCESS; +SCT_CalibBsErrorTool::finalize() { + ATH_MSG_INFO("Finalize of SCT_CalibBsErrorTool"); + + return StatusCode::SUCCESS; } bool SCT_CalibBsErrorTool::book() { - bool result(true); - m_phistoVector.clear(); - string histoName=pathRoot+"GENERAL/"; - //histogram for numbers of events - m_numberOfEventsHisto=new TH1I("events","Events",1,0.5,1.5); - if( m_thistSvc->regHist( histoName.c_str(), m_numberOfEventsHisto ).isFailure() ) { - msg( MSG::ERROR ) << "Error in booking BSErrors histogram" << endmsg; - } - //--- BSErrors for each wafer - SCT_ID::const_id_iterator waferItr = m_waferItrBegin; - SCT_ID::const_id_iterator waferItrE = m_waferItrEnd; - for( ; waferItr not_eq waferItrE; ++waferItr ) { - Identifier waferId = *waferItr; - const int bec( m_pSCTHelper->barrel_ec( waferId ) ); - const string formattedPosition( formatPosition(waferId, m_pSCTHelper)); - std::string histotitle = string( "SCT " ) + detectorNames[ bec2Index(bec) ] + string( " BSErrors : plane " ) + formattedPosition; - const std::string name=pathRoot+detectorPaths[bec2Index(m_pSCTHelper->barrel_ec( waferId ))] + formattedPosition; - TH1F* hitmapHisto_tmp = new TH1F( TString( formattedPosition ), TString( histotitle ), n_BSErrorType, firstBSErrorType-0.5, lastBSErrorType+0.5 ); - if( m_thistSvc->regHist( name.c_str(), hitmapHisto_tmp ).isFailure() ) msg( MSG::ERROR ) << "Error in booking BSErrors histogram" << endmsg; - m_phistoVector.push_back( hitmapHisto_tmp ); - } - return result; + bool result{true}; + m_phistoVector.clear(); + string histoName{pathRoot+"GENERAL/"}; + //histogram for numbers of events + m_numberOfEventsHisto = new TH1I{"events", "Events", 1, 0.5, 1.5}; + if (m_thistSvc->regHist(histoName.c_str(), m_numberOfEventsHisto ).isFailure()) { + ATH_MSG_ERROR("Error in booking BSErrors histogram"); + } + //--- BSErrors for each wafer + SCT_ID::const_id_iterator waferItr{m_waferItrBegin}; + SCT_ID::const_id_iterator waferItrE{m_waferItrEnd}; + for (; waferItr not_eq waferItrE; ++waferItr) { + Identifier waferId{*waferItr}; + const int bec{m_pSCTHelper->barrel_ec(waferId)}; + const string formattedPosition{formatPosition(waferId, m_pSCTHelper)}; + std::string histotitle{string{"SCT "} + detectorNames[bec2Index(bec)] + string{" BSErrors : plane "} + formattedPosition}; + const std::string name{pathRoot+detectorPaths[bec2Index(m_pSCTHelper->barrel_ec(waferId))] + formattedPosition}; + TH1F* hitmapHisto_tmp{new TH1F{TString{formattedPosition}, TString{histotitle}, n_BSErrorType, firstBSErrorType-0.5, lastBSErrorType+0.5}}; + if (m_thistSvc->regHist(name.c_str(), hitmapHisto_tmp).isFailure()) { + ATH_MSG_ERROR("Error in booking BSErrors histogram"); + } + m_phistoVector.push_back(hitmapHisto_tmp); + } + return result; } bool -SCT_CalibBsErrorTool::read(const std::string & fileName) { - msg( MSG::ERROR ) << "Reding BsError histograms from " << fileName.c_str() << " is not supported!" << endmsg; - return false; +SCT_CalibBsErrorTool::read(const std::string& fileName) { + ATH_MSG_ERROR("Reding BsError histograms from " << fileName.c_str() << " is not supported!"); + return false; } bool SCT_CalibBsErrorTool::fill(const bool fromData) { - if (fromData) { - return fillFromData(); - } - bool result(true); - //--- Number of event - m_numberOfEventsHisto->Fill( 1 ); - //--- Fill BSErrors - const int maxEntry = m_scterr_type->size(); - for( int i = 0; i != maxEntry; ++i ) { - int bec = (*m_scterr_bec)[i]; - int layer = (*m_scterr_layer)[i]; - int phi = (*m_scterr_phi)[i]; - int eta = (*m_scterr_eta)[i]; - int side = (*m_scterr_side)[i]; - int type = (*m_scterr_type)[i]; - Identifier waferId = m_pSCTHelper->wafer_id( bec, layer, phi, eta, side ); - fillBsErrorsForWafer(waferId, type); - } - return result; + if (fromData) { + return fillFromData(); + } + bool result{true}; + //--- Number of event + m_numberOfEventsHisto->Fill( 1 ); + //--- Fill BSErrors + const int maxEntry{static_cast<int>(m_scterr_type->size())}; + for (int i{0}; i != maxEntry; ++i ) { + int bec{(*m_scterr_bec)[i]}; + int layer{(*m_scterr_layer)[i]}; + int phi{(*m_scterr_phi)[i]}; + int eta{(*m_scterr_eta)[i]}; + int side{(*m_scterr_side)[i]}; + int type{(*m_scterr_type)[i]}; + Identifier waferId{m_pSCTHelper->wafer_id( bec, layer, phi, eta, side )}; + fillBsErrorsForWafer(waferId, type); + } + return result; } bool SCT_CalibBsErrorTool::fillFromData() { - bool result(true); - //--- Number of event - m_numberOfEventsHisto->Fill( 1 ); - //--- Loop over BSErrors - for ( int type = 0; type < SCT_ByteStreamErrors::NUM_ERROR_TYPES; ++type ) { - const std::set<IdentifierHash>* errorSet = m_bytestreamErrorsTool->getErrorSet( type ); - if ( errorSet != 0 ) { - std::set<IdentifierHash>::const_iterator it = errorSet->begin(); - std::set<IdentifierHash>::const_iterator itE = errorSet->end(); - for ( ; it != itE; ++it ) { - Identifier waferId = m_pSCTHelper->wafer_id( *it ); - fillBsErrorsForWafer(waferId, type); - } + bool result{true}; + //--- Number of event + m_numberOfEventsHisto->Fill( 1 ); + //--- Loop over BSErrors + for (int type{0}; type < SCT_ByteStreamErrors::NUM_ERROR_TYPES; ++type) { + const std::set<IdentifierHash>* errorSet{m_bytestreamErrorsTool->getErrorSet(type)}; + if ( errorSet != 0 ) { + std::set<IdentifierHash>::const_iterator it{errorSet->begin()}; + std::set<IdentifierHash>::const_iterator itE{errorSet->end()}; + for ( ; it != itE; ++it ) { + Identifier waferId{m_pSCTHelper->wafer_id(*it)}; + fillBsErrorsForWafer(waferId, type); } - } - return result; + } + } + return result; } void -SCT_CalibBsErrorTool::fillBsErrorsForWafer(const Identifier & waferId, const int type) { - int iWaferHash = (int) m_pSCTHelper->wafer_hash( waferId ); - const string osWafer=formatPosition(waferId, m_pSCTHelper,"."); - //--- Protection for wrong waferID - if ( iWaferHash < 0 || iWaferHash >= MAXHASH ) { - msg( MSG::WARNING ) << "WaferHash " << iWaferHash << " is out of range : [ bec.layer.eta.phi.side, BSErrorType ] = [ " << osWafer << ", " << type << " ]" << endmsg; - } else { - if (msgLvl(MSG::DEBUG)) msg( MSG::DEBUG ) << "BSError : [ bec.layer.eta.phi.side, Type ] = [ " << osWafer<< ", " << type << " ]"<< endmsg; - m_phistoVector[ iWaferHash ]->Fill( type ); - } +SCT_CalibBsErrorTool::fillBsErrorsForWafer(const Identifier& waferId, const int type) { + int iWaferHash{static_cast<int>(m_pSCTHelper->wafer_hash(waferId))}; + const string osWafer{formatPosition(waferId, m_pSCTHelper,".")}; + //--- Protection for wrong waferID + if ( iWaferHash < 0 || iWaferHash >= m_maxHash ) { + ATH_MSG_WARNING("WaferHash " << iWaferHash << " is out of range : [ bec.layer.eta.phi.side, BSErrorType ] = [ " << osWafer << ", " << type << " ]"); + } else { + ATH_MSG_DEBUG("BSError : [ bec.layer.eta.phi.side, Type ] = [ " << osWafer<< ", " << type << " ]"); + m_phistoVector[ iWaferHash ]->Fill( type ); + } } diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibBsErrorTool.h b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibBsErrorTool.h index 9eafa8854b8acc1a787ff107cf98be2dcf1513bc..183b25c52f0dd7c635ef91df5396ce57896a4479 100644 --- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibBsErrorTool.h +++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibBsErrorTool.h @@ -3,21 +3,16 @@ */ /** -* @file SCT_CalibBsErrorTool.h -* Header file for the SCT_CalibBsErrorTool class -* @author Shaun Roe -**/ + * @file SCT_CalibBsErrorTool.h + * Header file for the SCT_CalibBsErrorTool class + * @author Shaun Roe + **/ #ifndef SCT_CalibBsErrorTool_h #define SCT_CalibBsErrorTool_h - -//STL includes -#include <string> - //Athena includes #include "AthenaBaseComps/AthAlgTool.h" -#include "StoreGate/StoreGateSvc.h" #include "GaudiKernel/ToolHandle.h" #include "InDetIdentifier/SCT_ID.h" @@ -26,51 +21,49 @@ //local includes #include "SCT_CalibAlgs/ISCT_CalibHistoTool.h" -//fwd declarations +//STL includes +#include <string> +//fwd declarations class StatusCode; class ISvcLocator; class SCT_CalibBsErrorTool : public extends<AthAlgTool, ISCT_CalibHistoTool> { - public: - //@name Tool methods, reimplemented - //@{ - SCT_CalibBsErrorTool(const std::string&, const std::string&, const IInterface*); - virtual ~SCT_CalibBsErrorTool() = default; - virtual StatusCode initialize(); - virtual StatusCode finalize(); - //interfaceID() implementation is in the baseclass - virtual StatusCode queryInterface(const InterfaceID & riid, void** ppvInterface ); - //@} - //@name ISCT_CalibHistoSvc methods, reimplemented - //@{ - virtual bool book(); - virtual bool read(const std::string & fileName); - virtual bool fill(const bool fromData=false); - virtual bool fillFromData(); - //@} + public: + //@name Tool methods, reimplemented + //@{ + SCT_CalibBsErrorTool(const std::string&, const std::string&, const IInterface*); + virtual ~SCT_CalibBsErrorTool() = default; + virtual StatusCode initialize(); + virtual StatusCode finalize(); + //@} + //@name ISCT_CalibHistoSvc methods, reimplemented + //@{ + virtual bool book(); + virtual bool read(const std::string& fileName); + virtual bool fill(const bool fromData=false); + virtual bool fillFromData(); + //@} - private: - ServiceHandle<StoreGateSvc> m_detStore; - ServiceHandle<StoreGateSvc> m_evtStore; - ToolHandle<ISCT_ByteStreamErrorsTool> m_bytestreamErrorsTool{this, "SCT_ByteStreamErrorsTool", "SCT_ByteStreamErrorsTool", "Tool to retrieve SCT ByteStream Errors"}; - const SCT_ID* m_pSCTHelper; + private: + ToolHandle<ISCT_ByteStreamErrorsTool> m_bytestreamErrorsTool{this, "SCT_ByteStreamErrorsTool", "SCT_ByteStreamErrorsTool", "Tool to retrieve SCT ByteStream Errors"}; + const SCT_ID* m_pSCTHelper; - // SCT specific numbers - SCT_ID::const_id_iterator m_waferItrBegin; - SCT_ID::const_id_iterator m_waferItrEnd; - typedef std::vector<int> VecInt; - VecInt *m_scterr_bec; - VecInt *m_scterr_layer; - VecInt *m_scterr_eta; - VecInt *m_scterr_phi; - VecInt *m_scterr_side; - VecInt *m_scterr_type; + // SCT specific numbers + SCT_ID::const_id_iterator m_waferItrBegin; + SCT_ID::const_id_iterator m_waferItrEnd; + typedef std::vector<int> VecInt; + VecInt* m_scterr_bec; + VecInt* m_scterr_layer; + VecInt* m_scterr_eta; + VecInt* m_scterr_phi; + VecInt* m_scterr_side; + VecInt* m_scterr_type; + int m_maxHash; - void - fillBsErrorsForWafer(const Identifier & waferId, const int type); + void fillBsErrorsForWafer(const Identifier & waferId, const int type); }; #endif diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibEventInfo.cxx b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibEventInfo.cxx index f21d3bcf6968c759c066d0e4decb1dab9962694b..6a7bf37050e353fb15374e3ac77d5c6537db5949 100644 --- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibEventInfo.cxx +++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibEventInfo.cxx @@ -1,14 +1,12 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /** * @file SCT_CalibEventInfo.h * Implementation file for the SCT_CalibEventInfo class * @author Shaun Roe -**/ - -#include <limits> + **/ #include "SCT_CalibEventInfo.h" #include "SCT_CalibUtilities.h" @@ -18,160 +16,151 @@ #include "CoralBase/TimeStamp.h" +#include <limits> + namespace { -const int INTMIN(std::numeric_limits<int>::min()); -const int INTMAX(std::numeric_limits<int>::max()); -const long long oneBillion(1000000000LL); -} - -SCT_CalibEventInfo::SCT_CalibEventInfo(const std::string& type, const std::string& name, const IInterface* parent) : - base_class(type, name, parent), - m_timeStampBegin(INTMAX), - m_tsBeginString(""), - m_tsEndString(""), - m_timeStampEnd(INTMIN), - m_duration(0), - m_LBBegin(INTMAX), - m_LBEnd(INTMIN), - m_numLB(0), - m_source("UNKNOWN"), - m_runNumber(0), - m_lumiBlock(0), - m_timeStamp(0), - m_bunchCrossing(0), - m_counter(0) + const int INTMIN{std::numeric_limits<int>::min()}; + const int INTMAX{std::numeric_limits<int>::max()}; + const long long oneBillion{1000000000LL}; +} + +SCT_CalibEventInfo::SCT_CalibEventInfo(const std::string& type, const std::string& name, const IInterface* parent): + base_class(type, name, parent), + m_timeStampBegin{INTMAX}, + m_tsBeginString{""}, + m_tsEndString{""}, + m_timeStampEnd{INTMIN}, + m_duration{0}, + m_LBBegin{INTMAX}, + m_LBEnd{INTMIN}, + m_numLB{0}, + m_source{"UNKNOWN"}, + m_runNumber{0}, + m_lumiBlock{0}, + m_timeStamp{0}, + m_bunchCrossing{0}, + m_counter{0} { } StatusCode SCT_CalibEventInfo::initialize() { - msg( MSG::INFO)<<"Initialize of evtInfo in "<<PACKAGE_VERSION<<endmsg; - return StatusCode::SUCCESS; + ATH_MSG_INFO("Initialize of evtInfo in " << PACKAGE_VERSION); + return StatusCode::SUCCESS; } StatusCode SCT_CalibEventInfo::finalize() { - return StatusCode::SUCCESS; -} - -StatusCode -SCT_CalibEventInfo::queryInterface(const InterfaceID & riid, void** ppvInterface ) { - if ( ISCT_CalibEvtInfo::interfaceID().versionMatch(riid) ) { - *ppvInterface = dynamic_cast<ISCT_CalibEvtInfo*>(this); - } else { - return AthAlgTool::queryInterface(riid, ppvInterface); - } - addRef(); - return StatusCode::SUCCESS; -} - -int SCT_CalibEventInfo::lumiBlock() const { - return m_lumiBlock; + return StatusCode::SUCCESS; } void SCT_CalibEventInfo::setTimeStamp(const int begin, const int end) { - m_timeStampBegin=begin; - m_timeStampEnd=end; - m_duration=m_timeStampEnd-m_timeStampBegin; - m_tsBeginString=toUtc(begin); - m_tsEndString=toUtc(end); -} - -int SCT_CalibEventInfo::duration() const { - return m_duration; + m_timeStampBegin = begin; + m_timeStampEnd = end; + m_duration = m_timeStampEnd-m_timeStampBegin; + m_tsBeginString = toUtc(begin); + m_tsEndString = toUtc(end); } void -SCT_CalibEventInfo::setTimeStamp(const std::string & begin, const std::string & end) { - int ibegin=std::stoi(begin); - int iend=std::stoi(end); - setTimeStamp(ibegin,iend); +SCT_CalibEventInfo::setTimeStamp(const std::string& begin, const std::string& end) { + int ibegin{std::stoi(begin)}; + int iend{std::stoi(end)}; + setTimeStamp(ibegin, iend); } void SCT_CalibEventInfo::setTimeStamp(const int ts) { - m_timeStamp=ts; + m_timeStamp = ts; } void -SCT_CalibEventInfo::getLumiBlock(int & begin, int & end) const { - begin=m_LBBegin; - end=m_LBEnd; +SCT_CalibEventInfo::getTimeStamps(int& begin, int& end) const { + begin = m_timeStampBegin; + end = m_timeStampEnd; } void -SCT_CalibEventInfo::setLumiBlock(const int begin, const int end) { - m_LBBegin=begin; - m_LBEnd=end; - m_numLB=end-begin+1; +SCT_CalibEventInfo::getTimeStamps(std::string& begin, std::string& end) const { + begin = m_tsBeginString; + end = m_tsEndString; } -void -SCT_CalibEventInfo::setLumiBlock(const int lb) { - m_lumiBlock=lb; +int +SCT_CalibEventInfo::timeStamp() const { + return m_timeStamp; +} + +int SCT_CalibEventInfo::duration() const { + return m_duration; } void SCT_CalibEventInfo::setSource(const std::string source) { - m_source=source; + m_source = source; } void -SCT_CalibEventInfo::setRunNumber(const int rn) { - m_runNumber=rn; +SCT_CalibEventInfo::setLumiBlock(const int begin, const int end) { + m_LBBegin = begin; + m_LBEnd = end; + m_numLB = end-begin+1; } void -SCT_CalibEventInfo::setBunchCrossing(const int bc) { - m_bunchCrossing=bc; +SCT_CalibEventInfo::setLumiBlock(const int lb) { + m_lumiBlock = lb; } void -SCT_CalibEventInfo::getTimeStamps(std::string & begin, std::string & end) const { - begin=m_tsBeginString; - end=m_tsEndString; +SCT_CalibEventInfo::getLumiBlock(int& begin, int& end) const { + begin = m_LBBegin; + end = m_LBEnd; } -void -SCT_CalibEventInfo::getTimeStamps(int & begin, int & end) const { - begin=m_timeStampBegin; - end=m_timeStampEnd; +int SCT_CalibEventInfo::lumiBlock() const { + return m_lumiBlock; } int -SCT_CalibEventInfo::timeStamp() const { - return m_timeStamp; +SCT_CalibEventInfo::numLumiBlocks() const { + return m_numLB; } -int -SCT_CalibEventInfo::runNumber() const { - return m_runNumber; +void +SCT_CalibEventInfo::setRunNumber(const int rn) { + m_runNumber = rn; } int -SCT_CalibEventInfo::counter() const { - return m_counter; +SCT_CalibEventInfo::runNumber() const { + return m_runNumber; } void -SCT_CalibEventInfo::incrementCounter() { - ++m_counter; +SCT_CalibEventInfo::setCounter(const int counterVal) { + m_counter = counterVal; } void -SCT_CalibEventInfo::setCounter(const int counterVal) { - m_counter=counterVal; +SCT_CalibEventInfo::incrementCounter() { + ++m_counter; } int -SCT_CalibEventInfo::numLumiBlocks() const { - return m_numLB; +SCT_CalibEventInfo::counter() const { + return m_counter; +} + +void +SCT_CalibEventInfo::setBunchCrossing(const int bc) { + m_bunchCrossing = bc; } std::string SCT_CalibEventInfo::toUtc(const int timestamp) const { - coral::TimeStamp::ValueType nsTime = timestamp*oneBillion; - coral::TimeStamp utc( nsTime ); - return utc.toString(); + coral::TimeStamp::ValueType nsTime{timestamp*oneBillion}; + coral::TimeStamp utc{nsTime}; + return utc.toString(); } diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibEventInfo.h b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibEventInfo.h index 54d44636ff0c13775b257f0e72feba34629a52f6..15c6e755dd960303d366073767b69fe1fe2cf77a 100644 --- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibEventInfo.h +++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibEventInfo.h @@ -6,16 +6,17 @@ * @file SCT_CalibEventInfo.h * Header file for the SCT_CalibEventInfo class * @author Shaun Roe -**/ + **/ #ifndef SCT_CalibEventInfo_h #define SCT_CalibEventInfo_h #include "AthenaBaseComps/AthAlgTool.h" -#include "GaudiKernel/ToolHandle.h" //member #include "SCT_CalibAlgs/ISCT_CalibEvtInfo.h" -#include <atomic> + +#include "GaudiKernel/ToolHandle.h" + #include <string> class StatusCode; @@ -24,62 +25,61 @@ class InterfaceID; class SCT_CalibEventInfo: public extends<AthAlgTool, ISCT_CalibEvtInfo> { - public: - //@name Service methods, reimplemented - //@{ - SCT_CalibEventInfo(const std::string&, const std::string&, const IInterface*); - virtual ~SCT_CalibEventInfo() = default; - virtual StatusCode initialize(); - virtual StatusCode finalize(); - //static const InterfaceID & interfaceID() {return ISCT_CalibEvtInfo::interfaceID();} - virtual StatusCode queryInterface(const InterfaceID & riid, void** ppvInterface ); - //@} - //@name ISCT_CalibEvtinfo interface methods, implemented - //@{ - virtual void setTimeStamp(const int begin, const int end); - virtual void setTimeStamp(const std::string & begin, const std::string & end); - virtual void setTimeStamp(const int ts); - - virtual void getLumiBlock(int & begin, int & end) const; - virtual void setLumiBlock(const int begin, const int end); - virtual void setLumiBlock(const int lb); - - virtual void setSource(const std::string source); - - virtual void setRunNumber(const int rn); - virtual void setBunchCrossing(const int bc); - virtual void setCounter(const int counterVal); - virtual void incrementCounter(); - - virtual void getTimeStamps(int & begin, int & end) const; - virtual void getTimeStamps(std::string & begin, std::string & end) const; - virtual int timeStamp() const; - virtual int duration() const; - virtual int lumiBlock() const; - virtual int runNumber() const; - virtual int counter() const; - virtual int numLumiBlocks() const; - //@} - - private: - - int m_timeStampBegin; - std::string m_tsBeginString; - std::string m_tsEndString; - int m_timeStampEnd; - int m_duration; - int m_LBBegin; - int m_LBEnd; - int m_numLB; - std::string m_source; - - // - mutable std::atomic_int m_runNumber; - mutable std::atomic_int m_lumiBlock; - mutable std::atomic_int m_timeStamp; - mutable std::atomic_int m_bunchCrossing; - int m_counter; - std::string toUtc(const int timestamp) const; + public: + //@name Service methods, reimplemented + //@{ + SCT_CalibEventInfo(const std::string&, const std::string&, const IInterface*); + virtual ~SCT_CalibEventInfo() = default; + virtual StatusCode initialize(); + virtual StatusCode finalize(); + //@} + //@name ISCT_CalibEvtinfo interface methods, implemented + //@{ + virtual void setTimeStamp(const int begin, const int end); + virtual void setTimeStamp(const std::string& begin, const std::string& end); + virtual void setTimeStamp(const int ts); + virtual void getTimeStamps(int& begin, int& end) const; + virtual void getTimeStamps(std::string& begin, std::string& end) const; + virtual int timeStamp() const; + virtual int duration() const; + + virtual void setSource(const std::string source); + + virtual void setLumiBlock(const int begin, const int end); + virtual void setLumiBlock(const int lb); + virtual void getLumiBlock(int& begin, int& end) const; + virtual int lumiBlock() const; + virtual int numLumiBlocks() const; + + virtual void setRunNumber(const int rn); + virtual int runNumber() const; + + virtual void setCounter(const int counterVal); + virtual void incrementCounter(); + virtual int counter() const; + + virtual void setBunchCrossing(const int bc); + //@} + + private: + + int m_timeStampBegin; + std::string m_tsBeginString; + std::string m_tsEndString; + int m_timeStampEnd; + int m_duration; + int m_LBBegin; + int m_LBEnd; + int m_numLB; + std::string m_source; + + // + int m_runNumber; + int m_lumiBlock; + int m_timeStamp; + int m_bunchCrossing; + int m_counter; + std::string toUtc(const int timestamp) const; }; #endif diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibHitmapTool.cxx b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibHitmapTool.cxx index 5b9d0c950f00d4ee7e2566f2498d6549b73ba1bd..d3ee38ea9e5a566f2c2b2193071a1823904bc5ba 100644 --- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibHitmapTool.cxx +++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibHitmapTool.cxx @@ -1,12 +1,12 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /** * @file SCT_CalibHitmapSvc.cxx * Implementation file for the SCT_CalibHitmapTool class * @author Shaun Roe -**/ + **/ #include "SCT_CalibHitmapTool.h" #include "SCT_CalibUtilities.h" @@ -19,6 +19,7 @@ #include "Identifier/Identifier.h" #include "Identifier/IdentifierHash.h" + #include "GaudiKernel/ITHistSvc.h" #include "TH1I.h" @@ -29,176 +30,160 @@ using namespace std; using namespace SCT_CalibAlgs; -const static string pathRoot("/HitMaps/"); -const static string detectorNames[] = { "negativeEndcap", "barrel", "positiveEndcap" }; -const static string detectorPaths[]= {"SCTEC/", "SCTB/","SCTEA/"}; - -SCT_CalibHitmapTool::SCT_CalibHitmapTool(const std::string& type, const std::string& name, const IInterface* parent) : - base_class(type, name, parent), - m_detStore("DetectorStore", name), - m_evtStore("StoreGateSvc", name), - m_pSCTHelper(0), - m_sct_waferHash(0), - m_sct_firstStrip(0), - m_sct_rdoGroupSize(0), - m_rdoContainerKey(std::string("SCT_RDOs")) +const static string pathRoot{"/HitMaps/"}; +const static string detectorNames[]{"negativeEndcap", "barrel", "positiveEndcap"}; +const static string detectorPaths[]{"SCTEC/", "SCTB/","SCTEA/"}; + +SCT_CalibHitmapTool::SCT_CalibHitmapTool(const std::string& type, const std::string& name, const IInterface* parent): + base_class(type, name, parent), + m_pSCTHelper{nullptr}, + m_sct_waferHash{0}, + m_sct_firstStrip{0}, + m_sct_rdoGroupSize{0}, + m_rdoContainerKey{"SCT_RDOs"} { } StatusCode SCT_CalibHitmapTool::initialize() { - if ( m_detStore->retrieve( m_pSCTHelper, "SCT_ID").isFailure()) return msg( MSG::ERROR) << "Unable to retrieve SCTHelper" << endmsg, StatusCode::FAILURE; - // - m_waferItrBegin = m_pSCTHelper->wafer_begin(); - m_waferItrEnd = m_pSCTHelper->wafer_end(); - // + ATH_CHECK(detStore()->retrieve(m_pSCTHelper, "SCT_ID")); + // + m_waferItrBegin = m_pSCTHelper->wafer_begin(); + m_waferItrEnd = m_pSCTHelper->wafer_end(); + // - // Read Handle Key - ATH_CHECK(m_rdoContainerKey.initialize()); + // Read Handle Key + ATH_CHECK(m_rdoContainerKey.initialize()); - return StatusCode::SUCCESS; + return StatusCode::SUCCESS; } StatusCode SCT_CalibHitmapTool::finalize() { - msg(MSG::VERBOSE) << "SCT_CalibHitmapSvc::finalize()"<<endmsg; - if (m_sct_waferHash) delete m_sct_waferHash; - if (m_sct_rdoGroupSize) delete m_sct_rdoGroupSize; - if (m_sct_firstStrip) delete m_sct_firstStrip; - return StatusCode::SUCCESS; -} + ATH_MSG_VERBOSE("SCT_CalibHitmapSvc::finalize()"); -StatusCode -SCT_CalibHitmapTool::queryInterface(const InterfaceID & riid, void** ppvInterface ) { - if ( ISCT_CalibHistoTool::interfaceID().versionMatch(riid) ) { - *ppvInterface = dynamic_cast<ISCT_CalibHistoTool*>(this); - } else { - return AthAlgTool::queryInterface(riid, ppvInterface); - } - addRef(); - return StatusCode::SUCCESS; + delete m_sct_waferHash; + delete m_sct_rdoGroupSize; + delete m_sct_firstStrip; + + return StatusCode::SUCCESS; } bool SCT_CalibHitmapTool::book() { - bool result(true); - //pointers to the histos are deleted by m_thistSvc methods - m_phistoVector.clear(); - string histoName=pathRoot+"GENERAL/"; - //histogram for numbers of events - m_numberOfEventsHisto=new TH1I("events","Events",1,0.5,1.5); - if( m_thistSvc->regHist( histoName.c_str(), m_numberOfEventsHisto ).isFailure() ) { - msg( MSG::ERROR ) << "Error in booking EventNumber histogram" << endmsg; - } - //histograms for each wafer - SCT_ID::const_id_iterator waferItr = m_waferItrBegin; - std::string hitmapPaths[3]; - for (int i(0); i<3; ++i) { - hitmapPaths[i]=pathRoot+detectorPaths[i]; - } - for( ; waferItr not_eq m_waferItrEnd; ++waferItr ) { - const Identifier & waferId = *waferItr; - const int bec( m_pSCTHelper->barrel_ec( waferId ) ); - const string formattedPosition=formatPosition(waferId, m_pSCTHelper); - std::string histotitle = string( "SCT " ) + detectorNames[ bec2Index(bec) ] + string( " Hitmap: plane " ) + formattedPosition; - std::string name=hitmapPaths[bec2Index(m_pSCTHelper->barrel_ec( waferId ))] + formattedPosition; - TH1F* hitmapHisto_tmp = new TH1F( TString( formattedPosition ), TString( histotitle ), nbins, firstStrip-0.5, lastStrip+0.5 ); - - //cout<<name.c_str()<<endl; - if( m_thistSvc->regHist( name.c_str(), hitmapHisto_tmp ).isFailure()) { - msg( MSG::ERROR ) << "Error in booking Hitmap histogram" << endmsg; - } else { - m_phistoVector.push_back( hitmapHisto_tmp ); - } - - } - return result; + bool result{true}; + //pointers to the histos are deleted by m_thistSvc methods + m_phistoVector.clear(); + string histoName{pathRoot + "GENERAL/"}; + //histogram for numbers of events + m_numberOfEventsHisto = new TH1I{"events", "Events", 1, 0.5, 1.5}; + if (m_thistSvc->regHist(histoName.c_str(), m_numberOfEventsHisto).isFailure()) { + ATH_MSG_ERROR("Error in booking EventNumber histogram"); + } + //histograms for each wafer + SCT_ID::const_id_iterator waferItr{m_waferItrBegin}; + std::string hitmapPaths[3]; + for (int i{0}; i<3; ++i) { + hitmapPaths[i]=pathRoot+detectorPaths[i]; + } + for (; waferItr not_eq m_waferItrEnd; ++waferItr) { + const Identifier& waferId{*waferItr}; + const int bec{m_pSCTHelper->barrel_ec(waferId)}; + const string formattedPosition{formatPosition(waferId, m_pSCTHelper)}; + std::string histotitle{string{"SCT "} + detectorNames[bec2Index(bec)] + string{" Hitmap: plane "} + formattedPosition}; + std::string name{hitmapPaths[bec2Index(m_pSCTHelper->barrel_ec(waferId))] + formattedPosition}; + TH1F* hitmapHisto_tmp{new TH1F{TString{formattedPosition}, TString{histotitle}, nbins, firstStrip-0.5, lastStrip+0.5}}; + + if (m_thistSvc->regHist( name.c_str(), hitmapHisto_tmp ).isFailure()) { + ATH_MSG_ERROR("Error in booking Hitmap histogram"); + } else { + m_phistoVector.push_back(hitmapHisto_tmp); + } + + } + return result; } bool -SCT_CalibHitmapTool::read(const std::string & fileName) { - bool result(true); - //pointers to the histos are deleted by m_thistSvc methods - m_phistoVector.clear(); - TFile *fileHitmap = TFile::Open( fileName.c_str() ); - msg( MSG::INFO ) << "opening Hitmap file : " << fileName.c_str() << endmsg; - - if(fileHitmap==NULL) { - msg( MSG::ERROR ) << "can not open Hitmap file : " << fileName.c_str() << endmsg; - return result; - } - //histogram for numbers of events - m_numberOfEventsHisto = (TH1I*) fileHitmap->Get("GENERAL/events"); - if( m_numberOfEventsHisto==NULL ) { - msg( MSG::ERROR ) << "Error in reading EventNumber histogram" << endmsg; - } - //histograms for each wafer - SCT_ID::const_id_iterator waferItr = m_waferItrBegin; - for( ; waferItr not_eq m_waferItrEnd; ++waferItr ) { - const Identifier & waferId = *waferItr; - const string formattedPosition=formatPosition(waferId, m_pSCTHelper); - std::string name=detectorPaths[bec2Index(m_pSCTHelper->barrel_ec( waferId ))] + formattedPosition; - TH1F* hitmapHisto_tmp = (TH1F*) fileHitmap->Get(name.c_str()); - if( hitmapHisto_tmp==NULL ) { - msg( MSG::ERROR ) << "Error in reading Hitmap histogram" << endmsg; - } else { - m_phistoVector.push_back( hitmapHisto_tmp ); - } - } - return result; +SCT_CalibHitmapTool::read(const std::string& fileName) { + bool result{true}; + //pointers to the histos are deleted by m_thistSvc methods + m_phistoVector.clear(); + TFile* fileHitmap{TFile::Open(fileName.c_str())}; + ATH_MSG_INFO("opening Hitmap file : " << fileName.c_str()); + + if (fileHitmap==nullptr) { + ATH_MSG_ERROR("can not open Hitmap file : " << fileName.c_str()); + return result; + } + //histogram for numbers of events + m_numberOfEventsHisto = static_cast<TH1I*>(fileHitmap->Get("GENERAL/events")); + if (m_numberOfEventsHisto==nullptr) { + ATH_MSG_ERROR("Error in reading EventNumber histogram"); + } + //histograms for each wafer + SCT_ID::const_id_iterator waferItr{m_waferItrBegin}; + for (; waferItr not_eq m_waferItrEnd; ++waferItr) { + const Identifier& waferId{*waferItr}; + const string formattedPosition{formatPosition(waferId, m_pSCTHelper)}; + std::string name{detectorPaths[bec2Index(m_pSCTHelper->barrel_ec(waferId))] + formattedPosition}; + TH1F* hitmapHisto_tmp{static_cast<TH1F*>(fileHitmap->Get(name.c_str()))}; + if (hitmapHisto_tmp==nullptr) { + ATH_MSG_ERROR("Error in reading Hitmap histogram"); + } else { + m_phistoVector.push_back(hitmapHisto_tmp); + } + } + return result; } bool SCT_CalibHitmapTool::fill(const bool fromData) { - //cout<<"fromData "<<fromData<<endl; - if (fromData) { - return fillFromData(); - } - bool result(true); - //--- Number of events - m_numberOfEventsHisto->Fill( 1 ); - // both ways hshould give the same results - // int eventNumber = m_numberOfEventsHisto->GetBinContent(1); - // int eventNumber = m_numberOfEventsHisto->GetEntries(); - - //--- Fill hitmap - const int MaxEntry = m_sct_waferHash->size(); - for( int i = 0; i != MaxEntry; ++i ) { - const int theFirstStrip = (*m_sct_firstStrip)[i]; - const int endStrip = (*m_sct_rdoGroupSize)[i] + theFirstStrip; - const int index = (*m_sct_waferHash)[i]; - TH1F * pThisHisto=m_phistoVector[ index ]; - for( int strip(theFirstStrip); strip !=endStrip; ++strip) { - pThisHisto->Fill( strip); - } - } - return result; + //cout<<"fromData "<<fromData<<endl; + if (fromData) { + return fillFromData(); + } + bool result{true}; + //--- Number of events + m_numberOfEventsHisto->Fill(1); + + //--- Fill hitmap + const int MaxEntry{static_cast<int>(m_sct_waferHash->size())}; + for (int i{0}; i != MaxEntry; ++i) { + const int theFirstStrip{(*m_sct_firstStrip)[i]}; + const int endStrip{(*m_sct_rdoGroupSize)[i] + theFirstStrip}; + const int index{(*m_sct_waferHash)[i]}; + TH1F* pThisHisto{m_phistoVector[index]}; + for (int strip{theFirstStrip}; strip!=endStrip; ++strip) { + pThisHisto->Fill(strip); + } + } + return result; } bool SCT_CalibHitmapTool::fillFromData() { - bool result(true); - m_numberOfEventsHisto->Fill( 1 ); - // unused int eventNumber = m_numberOfEventsHisto->GetEntries(); - SG::ReadHandle<SCT_RDO_Container> prdoContainer(m_rdoContainerKey); - if (not prdoContainer.isValid() ) msg(MSG::ERROR) <<"Failed to retrieve the SCT RDO container"<<endmsg; - SCT_RDO_Container::const_iterator itr=prdoContainer->begin(); - const SCT_RDO_Container::const_iterator end=prdoContainer->end(); - for (; itr !=end; ++itr) { - const InDetRawDataCollection<SCT_RDORawData>* SCT_Collection(*itr); - if (not SCT_Collection) continue; - const Identifier waferId = SCT_Collection->identify(); - const IdentifierHash waferHash = m_pSCTHelper->wafer_hash(waferId); - TH1F * pThisHisto =m_phistoVector[(int)waferHash]; - DataVector<SCT_RDORawData>::const_iterator rdoItr = SCT_Collection->begin(); - const DataVector<SCT_RDORawData>::const_iterator rdoEnd = SCT_Collection->end(); - for(; rdoItr != rdoEnd; ++rdoItr) { - int strip=m_pSCTHelper->strip((*rdoItr)->identify()); - const int endStrip=(*rdoItr)->getGroupSize() + strip; - for (; strip != endStrip; ++strip) { - pThisHisto->Fill(strip); - } + bool result{true}; + m_numberOfEventsHisto->Fill(1); + SG::ReadHandle<SCT_RDO_Container> prdoContainer{m_rdoContainerKey}; + if (not prdoContainer.isValid()) ATH_MSG_ERROR("Failed to retrieve the SCT RDO container"); + SCT_RDO_Container::const_iterator itr{prdoContainer->begin()}; + const SCT_RDO_Container::const_iterator end{prdoContainer->end()}; + for (; itr !=end; ++itr) { + const InDetRawDataCollection<SCT_RDORawData>* SCT_Collection{*itr}; + if (not SCT_Collection) continue; + const Identifier waferId{SCT_Collection->identify()}; + const IdentifierHash waferHash{m_pSCTHelper->wafer_hash(waferId)}; + TH1F* pThisHisto{m_phistoVector[static_cast<int>(waferHash)]}; + DataVector<SCT_RDORawData>::const_iterator rdoItr{SCT_Collection->begin()}; + const DataVector<SCT_RDORawData>::const_iterator rdoEnd{SCT_Collection->end()}; + for (; rdoItr != rdoEnd; ++rdoItr) { + int strip{m_pSCTHelper->strip((*rdoItr)->identify())}; + const int endStrip{(*rdoItr)->getGroupSize() + strip}; + for (; strip != endStrip; ++strip) { + pThisHisto->Fill(strip); } - } - return result; + } + } + return result; } diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibHitmapTool.h b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibHitmapTool.h index 996ee330190b6ddd8083b14237469d7f80cdbfb1..46117f6d4c851c2b81c97be862cda7b282dd14c0 100644 --- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibHitmapTool.h +++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibHitmapTool.h @@ -6,18 +6,14 @@ * @file SCT_CalibHitmapTool.h * Header file for the SCT_CalibHitmapTool class * @author Shaun Roe -**/ + **/ #ifndef SCT_CalibHitmapTool_h #define SCT_CalibHitmapTool_h -//STL includes -#include <string> - //Athena includes #include "AthenaBaseComps/AthAlgTool.h" #include "StoreGate/StoreGateSvc.h" -#include "GaudiKernel/ToolHandle.h" #include "StoreGate/ReadHandleKey.h" //Inner detector includes @@ -27,46 +23,45 @@ //local includes #include "SCT_CalibAlgs/ISCT_CalibHistoTool.h" +//Gaudi includes +#include "GaudiKernel/ToolHandle.h" + +//STL includes +#include <string> + //fwd declarations class StatusCode; -//class SCT_CalibHitmapTool : virtual public ISCT_CalibHistoTool, public AthAlgTool class SCT_CalibHitmapTool : public extends<AthAlgTool, ISCT_CalibHistoTool> - { - - public: - //@name Tool methods, reimplemented - //@{ - SCT_CalibHitmapTool(const std::string&, const std::string&, const IInterface*); - virtual ~SCT_CalibHitmapTool() = default; - virtual StatusCode initialize(); - virtual StatusCode finalize(); - //interfaceID() implementation is in the baseclass - virtual StatusCode queryInterface(const InterfaceID & riid, void** ppvInterface ); - //@} - //@name ISCT_CalibHistoTool methods, reimplemented - //@{ - virtual bool book(); - virtual bool read(const std::string & fileName); - virtual bool fill(const bool fromData=false); - virtual bool fillFromData(); - //virtual bool binHistograms(const int eventsPerWindow); - //@} +{ - private: - ServiceHandle<StoreGateSvc> m_detStore; - ServiceHandle<StoreGateSvc> m_evtStore; + public: + //@name Tool methods, reimplemented + //@{ + SCT_CalibHitmapTool(const std::string&, const std::string&, const IInterface*); + virtual ~SCT_CalibHitmapTool() = default; + virtual StatusCode initialize(); + virtual StatusCode finalize(); + //@} + //@name ISCT_CalibHistoTool methods, reimplemented + //@{ + virtual bool book(); + virtual bool read(const std::string& fileName); + virtual bool fill(const bool fromData=false); + virtual bool fillFromData(); + //@} - const SCT_ID* m_pSCTHelper; - SCT_ID::const_id_iterator m_waferItrBegin; - SCT_ID::const_id_iterator m_waferItrEnd; - typedef std::vector<int> VecInt; - VecInt *m_sct_waferHash; - VecInt *m_sct_firstStrip; - VecInt *m_sct_rdoGroupSize; + private: + const SCT_ID* m_pSCTHelper; + SCT_ID::const_id_iterator m_waferItrBegin; + SCT_ID::const_id_iterator m_waferItrEnd; + typedef std::vector<int> VecInt; + VecInt* m_sct_waferHash; + VecInt* m_sct_firstStrip; + VecInt* m_sct_rdoGroupSize; - SG::ReadHandleKey<SCT_RDO_Container> m_rdoContainerKey; + SG::ReadHandleKey<SCT_RDO_Container> m_rdoContainerKey; }; #endif diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibHvTool.cxx b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibHvTool.cxx index aac90abdc7d74351a2e3ca73043d0e90cfbb4c90..1239b093f586a28eaa4b8f5e71d8b73ce7b078df 100644 --- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibHvTool.cxx +++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibHvTool.cxx @@ -1,12 +1,12 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /** -* @file SCT_CalibHvTool.cxx -* Implementation file for the SCT_CalibHvTool class -* @author Shaun Roe -**/ + * @file SCT_CalibHvTool.cxx + * Implementation file for the SCT_CalibHvTool class + * @author Shaun Roe + **/ #include "SCT_CalibHvTool.h" #include "SCT_CalibUtilities.h" @@ -18,214 +18,195 @@ using namespace std; using namespace SCT_CalibAlgs; -const static string detectorNames[] = { "negativeEndcap", "barrel", "positiveEndcap" }; +const static string detectorNames[]{"negativeEndcap", "barrel", "positiveEndcap"}; -const static string detectorPaths[]= {"SCTEC/", "SCTB/","SCTEA/"}; +const static string detectorPaths[]{"SCTEC/", "SCTB/","SCTEA/"}; namespace { -void -initQueue(std::queue<int> & q, const int numvals, const int setval) { - for (int i(0); i<numvals; ++i) q.push(setval); -} + void + initQueue(std::queue<int>& q, const int numvals, const int setval) { + for (int i{0}; i<numvals; ++i) q.push(setval); + } } SCT_CalibHvTool::SCT_CalibHvTool(const std::string& type, const std::string& name, const IInterface* parent) : - base_class(type, name, parent), - m_detStore("DetectorStore", name), - m_evtStore("StoreGateSvc", name), - m_pSCTHelper(0), - m_sct_waferHash(0), - m_sct_numHitsInWafer(0), - m_maxq(100), - m_phvtripPrevTime(0), - m_phvtripFirstTime(0), - m_absolutetriplimit(0), - m_relativetriplimit(0), - m_tq{0}, - m_evt(0), - m_outputLowHits(false),m_lowHitCut(100) -{ -} + base_class(type, name, parent), + m_pSCTHelper{nullptr}, + m_sct_waferHash{0}, + m_sct_numHitsInWafer{0}, + m_maxq{100}, + m_phvtripPrevTime{0}, + m_phvtripFirstTime{0}, + m_absolutetriplimit{0}, + m_relativetriplimit{0}, + m_tq{0}, + m_evt{0}, + m_outputLowHits{false}, + m_lowHitCut{100} + { + } StatusCode SCT_CalibHvTool::initialize() { - ATH_CHECK(m_DCSConditionsTool.retrieve()); - return StatusCode::SUCCESS; - + ATH_CHECK(m_DCSConditionsTool.retrieve()); + return StatusCode::SUCCESS; } StatusCode SCT_CalibHvTool::finalize() { - return StatusCode::SUCCESS; -} - -StatusCode -SCT_CalibHvTool::queryInterface(const InterfaceID & riid, void** ppvInterface ) { - if ( ISCT_CalibHistoTool::interfaceID().versionMatch(riid) ) { - *ppvInterface = dynamic_cast<ISCT_CalibHistoTool*>(this); - } else { - return AthAlgTool::queryInterface(riid, ppvInterface); - } - addRef(); - return StatusCode::SUCCESS; + return StatusCode::SUCCESS; } bool SCT_CalibHvTool::book() { - bool result(true); - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Book HVTrips" <<endmsg; - //now initialize the queues (fill 100 spots with 0): - queue<int> qtemp; - initQueue(qtemp, m_maxq,0); - // need to keep previous bins lbn 4 deep. - initQueue(m_prevLBN, 4, 0); - vector< pair <int,int> > dummy; - //first set num events processed to 0 - m_phvtripProcessedEventsInt.insert(m_phvtripProcessedEventsInt.end(), n_elements, 1); - m_phvtripRunningTotalInt.insert(m_phvtripRunningTotalInt.end(), n_elements, 0); - m_phvtripHasItTripped.insert(m_phvtripHasItTripped.end(),n_elements, 0); - m_phvtripQueue.insert(m_phvtripQueue.end(), n_elements, qtemp); - m_summarytrips.insert(m_summarytrips.end(),n_elements, dummy); - m_summarytripslb.insert(m_summarytripslb.end(), n_elements, dummy); - m_phvtripHasItTripped_prev = m_phvtripHasItTripped; - return result; + bool result{true}; + ATH_MSG_DEBUG("Book HVTrips"); + //now initialize the queues (fill 100 spots with 0): + queue<int> qtemp; + initQueue(qtemp, m_maxq,0); + // need to keep previous bins lbn 4 deep. + initQueue(m_prevLBN, 4, 0); + vector<pair <int,int>> dummy; + //first set num events processed to 0 + m_phvtripProcessedEventsInt.insert(m_phvtripProcessedEventsInt.end(), n_elements, 1); + m_phvtripRunningTotalInt.insert(m_phvtripRunningTotalInt.end(), n_elements, 0); + m_phvtripHasItTripped.insert(m_phvtripHasItTripped.end(),n_elements, 0); + m_phvtripQueue.insert(m_phvtripQueue.end(), n_elements, qtemp); + m_summarytrips.insert(m_summarytrips.end(),n_elements, dummy); + m_summarytripslb.insert(m_summarytripslb.end(), n_elements, dummy); + m_phvtripHasItTripped_prev = m_phvtripHasItTripped; + return result; } bool SCT_CalibHvTool::fill(const bool fromData) { - if (fromData) { - return fillFromData(); - } - bool result(true); - int lumi_block(0); //fix me! - //int event_number; - const int wafersize = m_sct_waferHash->size(); - int time_stamp= m_evt->event_ID()->time_stamp(); - int curr_time = time_stamp; - int dtime = curr_time - m_phvtripPrevTime; - int totalHits = 0; - if (curr_time<m_phvtripPrevTime) { - msg(MSG::ERROR) << "Events not sorted properly (time is going backwards!) " << endmsg; - return false; - } - // for first event - if (m_phvtripFirstTime > curr_time) { - m_phvtripFirstTime = curr_time; - } - bool newbin = false; - // check if we have a new time bin, if we do pop off the back (oldest) part - // of the queue and enqueue 0 for every wafer - int maxtbins(5); - if (dtime > maxtbins) { - newbin = true; - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << " new t bin " << dtime <<" since start "<< (curr_time-(m_phvtripFirstTime-1.01)) << endmsg; - m_phvtripHasItTripped_prev = m_phvtripHasItTripped; - for (int iwaf = 0; iwaf!=n_elements; ++iwaf) { - m_phvtripQueue[iwaf].pop(); - m_phvtripQueue[iwaf].push(0); - m_phvtripHasItTripped[iwaf]=0; - } - } - //if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "time stamp "<<time_stamp <<" event number "<< Event_number<<endmsg; - // Loop over all hits in the event - bool isgoodnow; - for( int itrk=0; itrk!=wafersize; ++itrk) { - int waferhash = (*m_sct_waferHash)[itrk]; - Identifier waferId = m_pSCTHelper->wafer_id(waferhash); - Identifier moduleId = m_pSCTHelper->module_id(waferId); - //step one is to make sure this one isn't already know to be messed up: - isgoodnow = m_DCSConditionsTool->isGood(moduleId,InDetConditions::SCT_MODULE); - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "checked is good "<< isgoodnow <<endmsg; - if (isgoodnow) { - int numhits = (*m_sct_numHitsInWafer)[itrk]; - totalHits += numhits; - /** + if (fromData) { + return fillFromData(); + } + bool result{true}; + int lumi_block{0}; //fix me! + const int wafersize{static_cast<int>(m_sct_waferHash->size())}; + int time_stamp{static_cast<int>(m_evt->event_ID()->time_stamp())}; + int curr_time{time_stamp}; + int dtime{curr_time - m_phvtripPrevTime}; + int totalHits{0}; + if (curr_time<m_phvtripPrevTime) { + ATH_MSG_ERROR("Events not sorted properly (time is going backwards!) "); + return false; + } + // for first event + if (m_phvtripFirstTime > curr_time) { + m_phvtripFirstTime = curr_time; + } + bool newbin{false}; + // check if we have a new time bin, if we do pop off the back (oldest) part + // of the queue and enqueue 0 for every wafer + int maxtbins{5}; + if (dtime > maxtbins) { + newbin = true; + ATH_MSG_DEBUG(" new t bin " << dtime <<" since start "<< (curr_time-(m_phvtripFirstTime-1.01))); + m_phvtripHasItTripped_prev = m_phvtripHasItTripped; + for (int iwaf{0}; iwaf!=n_elements; ++iwaf) { + m_phvtripQueue[iwaf].pop(); + m_phvtripQueue[iwaf].push(0); + m_phvtripHasItTripped[iwaf]=0; + } + } + // Loop over all hits in the event + bool isgoodnow; + for( int itrk{0}; itrk!=wafersize; ++itrk) { + int waferhash{(*m_sct_waferHash)[itrk]}; + Identifier waferId{m_pSCTHelper->wafer_id(waferhash)}; + Identifier moduleId{m_pSCTHelper->module_id(waferId)}; + //step one is to make sure this one isn't already know to be messed up: + isgoodnow = m_DCSConditionsTool->isGood(moduleId,InDetConditions::SCT_MODULE); + ATH_MSG_DEBUG("checked is good "<< isgoodnow); + if (isgoodnow) { + int numhits{(*m_sct_numHitsInWafer)[itrk]}; + totalHits += numhits; + /** calculate the limit for an individual module, limit is m_relativetriplimit (default = 4) times the running average in that module. limits are given in hits/second. need to convert numhits in bin to average (within bin) hits/sec. - **/ - double limit = m_relativetriplimit * (double)m_phvtripRunningTotalInt[waferhash] / ((double)curr_time-((double)m_phvtripFirstTime-0.01)); - - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "waferhash "<<waferhash<<" itrk "<<itrk <<" run tot "<< m_phvtripRunningTotalInt[waferhash] - <<" num hits "<<numhits<<" evnts processed "<< m_phvtripProcessedEventsInt[waferhash] <<" limit "<<limit - <<" abs limit, rel limit "<<m_absolutetriplimit<<","<< m_relativetriplimit<<" max bins "<<maxtbins - <<endmsg; - - if ( ((numhits + m_phvtripQueue[waferhash].back() )/ (double)maxtbins ) > m_absolutetriplimit - and ((numhits + m_phvtripQueue[waferhash].back() )/ (double)maxtbins ) > limit) { - //read back queue and see if the high hit rate is persistant for 3 previous bins (a bin is 5 seconds by default) - for (int iq = 0; iq<m_maxq; ++iq) { - m_tq[iq]=m_phvtripQueue[waferhash].front(); - m_phvtripQueue[waferhash].pop(); - } - if (m_tq[m_maxq-2]/(double)maxtbins > limit && m_tq[m_maxq-3]/(double)maxtbins > limit && m_tq[m_maxq-4]/(double)maxtbins > limit) { - // found a persistent trip/thing - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Found a potential trip in SCT wafer "<< waferhash<<endmsg; - //if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "TRIP: "<< waferhash<<" "<<time_stamp <<" "<< Event_number <<" "<< (numhits + m_tq[m_maxq-1] ) <<endmsg; - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "TRIP more info: limit = "<< limit <<" abslimit = "<< m_absolutetriplimit - <<" hits/secs now = "<< ((numhits + m_tq[m_maxq-1])/ maxtbins ) - <<" running total = "<< m_phvtripRunningTotalInt[waferhash] - <<" running average = "<< m_phvtripRunningTotalInt[waferhash] / (curr_time-(m_phvtripFirstTime-1.01)) << endmsg; - m_phvtripHasItTripped[waferhash] = (numhits + m_tq[m_maxq-1] ); - } // end trip found - - //put queue back the way we found it: - for (int iq = 0; iq < m_maxq; ++iq) { - m_phvtripQueue[waferhash].push(m_tq[iq]); - } - } // end potential trip id - //incriment event counter - m_phvtripProcessedEventsInt[waferhash] += 1; - //recalcuate running total: - m_phvtripRunningTotalInt[waferhash] += numhits; - m_phvtripQueue[waferhash].back() += numhits; - } //end is good check - else { - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Was a bad module already: "<< waferhash <<endmsg; - } - } //end loop over tracks - - // text output, summarizing the event - //if new bin summarzie the previous event. - if (newbin) { - SCT_ID::const_id_iterator waferItr = m_waferItrBegin; - SCT_ID::const_id_iterator waferItrE = m_waferItrEnd; - for( ; waferItr not_eq waferItrE; ++waferItr ) { - Identifier waferId = *waferItr; - IdentifierHash waferHash = m_pSCTHelper->wafer_hash( waferId ); - if (m_phvtripHasItTripped_prev[waferHash]>0) { - pair<int,int> wp; - wp.first = (m_phvtripPrevTime - 3*maxtbins); - wp.second = (m_phvtripPrevTime + maxtbins); - m_summarytrips[waferHash].push_back(wp); - pair<int,int> lbn; - lbn.first = m_prevLBN.front(); - lbn.second = m_prevLBN.back(); - m_summarytripslb[waferHash].push_back(lbn); - } - } - m_phvtripPrevTime = curr_time; //reset prev and current time - m_prevLBN.pop(); - m_prevLBN.push(lumi_block); - } - - for (int iwaf(0); iwaf!=n_elements; ++iwaf) { - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "mod "<< iwaf <<" events with that waf " <<m_phvtripProcessedEventsInt[iwaf] << " numhits "<<m_phvtripRunningTotalInt[iwaf] <<endmsg; - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "did it trip "<<m_phvtripHasItTripped[iwaf] << endmsg; - if (m_phvtripHasItTripped[iwaf]) { - //if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "TRIP: "<< iwaf <<" "<<time_stamp <<" "<< Event_number <<" "<< m_phvtripQueue[iwaf].back() <<endmsg; - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "TRIP more info: abslimit = "<< m_absolutetriplimit - <<" hits/secs now = "<< ( m_phvtripQueue[iwaf].back() / maxtbins ) - <<" running total = "<< m_phvtripRunningTotalInt[iwaf] - <<" running average = "<< m_phvtripRunningTotalInt[iwaf] / (curr_time-(m_phvtripFirstTime-1.01)) << endmsg; + **/ + double limit{m_relativetriplimit * static_cast<double>(m_phvtripRunningTotalInt[waferhash]) / (static_cast<double>(curr_time)-(static_cast<double>(m_phvtripFirstTime-0.01)))}; + + ATH_MSG_DEBUG("waferhash "<<waferhash<<" itrk "<<itrk <<" run tot "<< m_phvtripRunningTotalInt[waferhash] + <<" num hits "<<numhits<<" evnts processed "<< m_phvtripProcessedEventsInt[waferhash] <<" limit "<<limit + <<" abs limit, rel limit "<<m_absolutetriplimit<<","<< m_relativetriplimit<<" max bins "<<maxtbins); + + if ( ((numhits + m_phvtripQueue[waferhash].back() )/ static_cast<double>(maxtbins) ) > m_absolutetriplimit + and ((numhits + m_phvtripQueue[waferhash].back() )/ static_cast<double>(maxtbins) ) > limit) { + //read back queue and see if the high hit rate is persistant for 3 previous bins (a bin is 5 seconds by default) + for (int iq{0}; iq<m_maxq; ++iq) { + m_tq[iq]=m_phvtripQueue[waferhash].front(); + m_phvtripQueue[waferhash].pop(); + } + if (m_tq[m_maxq-2]/static_cast<double>(maxtbins) > limit && m_tq[m_maxq-3]/static_cast<double>(maxtbins) > limit && m_tq[m_maxq-4]/static_cast<double>(maxtbins) > limit) { + // found a persistent trip/thing + ATH_MSG_DEBUG("Found a potential trip in SCT wafer " << waferhash); + ATH_MSG_DEBUG("TRIP more info: limit = " << limit << " abslimit = " << m_absolutetriplimit + << " hits/secs now = " << ((numhits + m_tq[m_maxq-1])/ maxtbins ) + << " running total = " << m_phvtripRunningTotalInt[waferhash] + << " running average = " << m_phvtripRunningTotalInt[waferhash] / (curr_time-(m_phvtripFirstTime-1.01))); + m_phvtripHasItTripped[waferhash] = (numhits + m_tq[m_maxq-1] ); + } // end trip found + + //put queue back the way we found it: + for (int iq{0}; iq < m_maxq; ++iq) { + m_phvtripQueue[waferhash].push(m_tq[iq]); + } + } // end potential trip id + //incriment event counter + m_phvtripProcessedEventsInt[waferhash] += 1; + //recalcuate running total: + m_phvtripRunningTotalInt[waferhash] += numhits; + m_phvtripQueue[waferhash].back() += numhits; + } //end is good check + else { + ATH_MSG_DEBUG("Was a bad module already: " << waferhash); + } + } //end loop over tracks + + // text output, summarizing the event + //if new bin summarzie the previous event. + if (newbin) { + SCT_ID::const_id_iterator waferItr{m_waferItrBegin}; + SCT_ID::const_id_iterator waferItrE{m_waferItrEnd}; + for (; waferItr not_eq waferItrE; ++waferItr) { + Identifier waferId{*waferItr}; + IdentifierHash waferHash{m_pSCTHelper->wafer_hash(waferId)}; + if (m_phvtripHasItTripped_prev[waferHash]>0) { + pair<int, int> wp; + wp.first = (m_phvtripPrevTime - 3*maxtbins); + wp.second = (m_phvtripPrevTime + maxtbins); + m_summarytrips[waferHash].push_back(wp); + pair<int ,int> lbn; + lbn.first = m_prevLBN.front(); + lbn.second = m_prevLBN.back(); + m_summarytripslb[waferHash].push_back(lbn); } - } - if (m_outputLowHits && (totalHits < m_lowHitCut) ) { - //msg(MSG::WARNING) <<"Event: " << Event_number << " Total hits: " << totalHits << endmsg; - } - return result; + } + m_phvtripPrevTime = curr_time; //reset prev and current time + m_prevLBN.pop(); + m_prevLBN.push(lumi_block); + } + + for (int iwaf{0}; iwaf!=n_elements; ++iwaf) { + ATH_MSG_DEBUG("mod "<< iwaf <<" events with that waf " <<m_phvtripProcessedEventsInt[iwaf] << " numhits "<<m_phvtripRunningTotalInt[iwaf]); + ATH_MSG_DEBUG("did it trip "<<m_phvtripHasItTripped[iwaf]); + if (m_phvtripHasItTripped[iwaf]) { + ATH_MSG_DEBUG("TRIP more info: abslimit = "<< m_absolutetriplimit + <<" hits/secs now = "<< ( m_phvtripQueue[iwaf].back() / maxtbins ) + <<" running total = "<< m_phvtripRunningTotalInt[iwaf] + <<" running average = "<< m_phvtripRunningTotalInt[iwaf] / (curr_time-(m_phvtripFirstTime-1.01))); + } + } + if (m_outputLowHits && (totalHits < m_lowHitCut) ) { + } + return result; } bool SCT_CalibHvTool::fillFromData() { - bool result(true); - return result; + bool result{true}; + return result; } diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibHvTool.h b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibHvTool.h index 082980f99e683eef033b17aafa6342b0c379e017..60cd5ff9b15c41e5a50a83b87a1b7e3f2fe71527 100644 --- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibHvTool.h +++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibHvTool.h @@ -6,22 +6,13 @@ * @file SCT_CalibHvTool.h * Header file for the SCT_CalibHvTool class * @author Shaun Roe -**/ + **/ #ifndef SCT_CalibHvTool_h #define SCT_CalibHvTool_h -//STL includes -#include <string> -#include <vector> -#include <queue> -#include <utility> //for 'pair' - //Athena includes #include "AthenaBaseComps/AthAlgTool.h" -#include "StoreGate/StoreGateSvc.h" -#include "GaudiKernel/ToolHandle.h" -#include "GaudiKernel/ServiceHandle.h" //Inner detector includes #include "InDetIdentifier/SCT_ID.h" @@ -30,6 +21,15 @@ #include "SCT_CalibAlgs/ISCT_CalibHistoTool.h" #include "SCT_ConditionsTools/ISCT_DCSConditionsTool.h" //template parameter +// Gaudi includes +#include "GaudiKernel/ToolHandle.h" + +//STL includes +#include <string> +#include <vector> +#include <queue> +#include <utility> //for 'pair' + //fwd declarations class StatusCode; class ISvcLocator; @@ -39,68 +39,67 @@ class EventInfo; class SCT_CalibHvTool : public extends<AthAlgTool, ISCT_CalibHistoTool> { - public: - //@name Tool methods, reimplemented - //@{ - SCT_CalibHvTool(const std::string&, const std::string&, const IInterface*); - virtual ~SCT_CalibHvTool() = default; - virtual StatusCode initialize(); - virtual StatusCode finalize(); - //interfaceID() implementation is in the baseclass - virtual StatusCode queryInterface(const InterfaceID & riid, void** ppvInterface ); - //@} - //@name ISCT_CalibHistoTool methods, reimplemented - //@{ - virtual bool book(); - virtual bool fill(const bool fromData=false); - virtual bool fillFromData(); - //@} - - private: - enum { n_chipPerSide = 6, n_chipPerModule = 12, n_stripPerChip = 128, n_etaInBarrel = 12, - n_phiBinsB0 = 32, n_phiBinsB1 = 40, n_phiBinsB2 = 48, n_phiBinsB3 = 56, - n_phiBinsECShort = 40, n_phiBinsECMiddle = 40, n_phiBinsECOuter = 52, n_elements=8176, - n_BSErrorType = 15, firstBSErrorType = 0, lastBSErrorType = 14 - }; - - ServiceHandle<StoreGateSvc> m_detStore; - ServiceHandle<StoreGateSvc> m_evtStore; - ToolHandle<ISCT_DCSConditionsTool> m_DCSConditionsTool{this, "SCT_DCSConditionsTool", "SCT_DCSConditionsTool", "Tool to retrieve SCT DCS information"}; - - const SCT_ID* m_pSCTHelper; - SCT_ID::const_id_iterator m_waferItrBegin; - SCT_ID::const_id_iterator m_waferItrEnd; - typedef std::vector<int> VecInt; - VecInt *m_sct_waferHash; - VecInt *m_sct_numHitsInWafer; - - //private use in this class - int m_maxq; - // For HV trips - std::vector< std::queue<int> > m_phvtripQueue; - std::queue<int> m_prevLBN; - VecInt m_phvtripRunningTotalInt; - VecInt m_phvtripProcessedEventsInt; - VecInt m_phvtripHasItTripped; - VecInt m_phvtripHasItTripped_prev; - // - int m_phvtripPrevTime; - int m_phvtripFirstTime; - double m_absolutetriplimit; - double m_relativetriplimit; - int m_tq[100]; - - std::vector< std::vector< std::pair<int, int> > > m_summarytrips; - std::vector< std::vector< std::pair<int, int> > > m_summarytripslb; - const EventInfo* m_evt; - bool m_outputLowHits; - int m_lowHitCut; - ///retrieve a tool and report if it failed - template<class T> - bool retrievedTool(T & tool, const std::string & toolName) { - if (tool.retrieve().isFailure() ) return msg(MSG::ERROR)<<"Unable to retrieve "<<toolName<<endmsg, false; - return true; - } + public: + //@name Tool methods, reimplemented + //@{ + SCT_CalibHvTool(const std::string&, const std::string&, const IInterface*); + virtual ~SCT_CalibHvTool() = default; + virtual StatusCode initialize(); + virtual StatusCode finalize(); + //@} + //@name ISCT_CalibHistoTool methods, reimplemented + //@{ + virtual bool book(); + virtual bool fill(const bool fromData=false); + virtual bool fillFromData(); + //@} + + private: + enum {n_chipPerSide = 6, n_chipPerModule = 12, n_stripPerChip = 128, n_etaInBarrel = 12, + n_phiBinsB0 = 32, n_phiBinsB1 = 40, n_phiBinsB2 = 48, n_phiBinsB3 = 56, + n_phiBinsECShort = 40, n_phiBinsECMiddle = 40, n_phiBinsECOuter = 52, n_elements=8176, + n_BSErrorType = 15, firstBSErrorType = 0, lastBSErrorType = 14 + }; + + ToolHandle<ISCT_DCSConditionsTool> m_DCSConditionsTool{this, "SCT_DCSConditionsTool", "SCT_DCSConditionsTool", "Tool to retrieve SCT DCS information"}; + + const SCT_ID* m_pSCTHelper; + SCT_ID::const_id_iterator m_waferItrBegin; + SCT_ID::const_id_iterator m_waferItrEnd; + typedef std::vector<int> VecInt; + VecInt* m_sct_waferHash; + VecInt* m_sct_numHitsInWafer; + + //private use in this class + int m_maxq; + // For HV trips + std::vector<std::queue<int>> m_phvtripQueue; + std::queue<int> m_prevLBN; + VecInt m_phvtripRunningTotalInt; + VecInt m_phvtripProcessedEventsInt; + VecInt m_phvtripHasItTripped; + VecInt m_phvtripHasItTripped_prev; + // + int m_phvtripPrevTime; + int m_phvtripFirstTime; + double m_absolutetriplimit; + double m_relativetriplimit; + int m_tq[100]; + + std::vector<std::vector<std::pair<int, int>>> m_summarytrips; + std::vector<std::vector<std::pair<int, int>>> m_summarytripslb; + const EventInfo* m_evt; + bool m_outputLowHits; + int m_lowHitCut; + ///retrieve a tool and report if it failed + template<class T> + bool retrievedTool(T& tool, const std::string& toolName) const { + if (tool.retrieve().isFailure()) { + ATH_MSG_ERROR("Unable to retrieve " << toolName); + return false; + } + return true; + } }; #endif diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibLbTool.cxx b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibLbTool.cxx index 0ad0ddc382a9ddd9512b4adb0cc52368a76149b4..17a1b8670184b5a24d52a1a78be0a67cb62661b3 100644 --- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibLbTool.cxx +++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibLbTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ @@ -7,7 +7,7 @@ * @file SCT_CalibLbTool.cxx * Implementation file for the SCT_CalibLbTool class * @author Shaun Roe -**/ + **/ #include "SCT_CalibLbTool.h" #include "SCT_CalibUtilities.h" @@ -17,17 +17,15 @@ //InnerDetector #include "InDetReadoutGeometry/SiDetectorElement.h" #include "InDetReadoutGeometry/SCT_DetectorManager.h" - #include "InDetRawData/SCT3_RawData.h" #include "InDetRawData/InDetRawDataCLASS_DEF.h" -#include "StoreGate/ReadHandle.h" - #include "Identifier/Identifier.h" #include "Identifier/IdentifierHash.h" -#include "GaudiKernel/ITHistSvc.h" -#include <boost/lexical_cast.hpp> +#include "StoreGate/ReadHandle.h" + +#include "GaudiKernel/ITHistSvc.h" #include "TH1I.h" #include "TH1F.h" @@ -35,266 +33,251 @@ #include "TFile.h" #include "TMath.h" +#include <boost/lexical_cast.hpp> + using namespace std; using namespace SCT_CalibAlgs; -const static string pathRoot("/LB/"); -const static int n_chipsPerSide(6); -const static int n_stripsPerChip(128); -const static string detectorNames[] = { "negativeEndcap", "barrel", "positiveEndcap" }; -const static string detectorPaths[]= {"SCTEC/", "SCTB/","SCTEA/"}; - - -SCT_CalibLbTool::SCT_CalibLbTool(const std::string& type, const std::string& name, const IInterface* parent) : - base_class(type, name, parent), - m_detStore("DetectorStore", name), - m_evtStore("StoreGateSvc", name), - m_evtInfo("SCT_CalibEventInfo",name), - m_pSCTHelper(0), - m_pManager(0), - m_sct_waferHash(0), - m_sct_firstStrip(0), - m_sct_rdoGroupSize(0), - m_lumiBlock(0), - m_LbRange(0), - m_LbsToMerge(0), - m_rdoContainerKey(std::string("SCT_RDOs")) +static const string pathRoot{"/LB/"}; +static const int n_chipsPerSide{6}; +static const int n_stripsPerChip{128}; +static const string detectorNames[]{"negativeEndcap", "barrel", "positiveEndcap"}; +static const string detectorPaths[]{"SCTEC/", "SCTB/","SCTEA/"}; + +SCT_CalibLbTool::SCT_CalibLbTool(const std::string& type, const std::string& name, const IInterface* parent): + base_class(type, name, parent), + m_pSCTHelper{nullptr}, + m_pManager{nullptr}, + m_sct_waferHash{0}, + m_sct_firstStrip{0}, + m_sct_rdoGroupSize{0}, + m_lumiBlock{0}, + m_LbRange{0}, + m_LbsToMerge{0}, + m_rdoContainerKey{"SCT_RDOs"} { - //nop + //nop } StatusCode SCT_CalibLbTool::initialize() { - msg( MSG::INFO)<<"Initialize of "<<PACKAGE_VERSION<<endmsg; - if ( service( "THistSvc", m_thistSvc ).isFailure() ) return msg( MSG::ERROR) << "Unable to retrieve pointer to THistSvc" << endmsg, StatusCode::FAILURE; - if ( m_detStore->retrieve( m_pSCTHelper, "SCT_ID").isFailure()) return msg( MSG::ERROR) << "Unable to retrieve SCTHelper" << endmsg, StatusCode::FAILURE; - if ( m_detStore->retrieve( m_pManager, "SCT").isFailure() ) return msg( MSG::ERROR) << "Unable to retrieve SCTManager" << endmsg,StatusCode::FAILURE; - std::pair<std::string, bool> msgCode=retrievedTool(m_evtInfo); - if (not msgCode.second) return msg( MSG::ERROR) <<msgCode.first<< endmsg,StatusCode::FAILURE; - // - m_waferItrBegin = m_pSCTHelper->wafer_begin(); - m_waferItrEnd = m_pSCTHelper->wafer_end(); - - m_LbRange=numberOfLb(); - - // Read Handle Key - ATH_CHECK( m_rdoContainerKey.initialize() ); - - return StatusCode::SUCCESS; + ATH_MSG_INFO("Initialize of " << PACKAGE_VERSION); + ATH_CHECK(service("THistSvc", m_thistSvc)); + ATH_CHECK(detStore()->retrieve(m_pSCTHelper, "SCT_ID")); + ATH_CHECK(detStore()->retrieve(m_pManager, "SCT")); + std::pair<std::string, bool> msgCode{retrievedTool(m_evtInfo)}; + if (not msgCode.second) { + ATH_MSG_ERROR(msgCode.first); + return StatusCode::FAILURE; + } + // + m_waferItrBegin = m_pSCTHelper->wafer_begin(); + m_waferItrEnd = m_pSCTHelper->wafer_end(); + + m_LbRange = numberOfLb(); + + // Read Handle Key + ATH_CHECK(m_rdoContainerKey.initialize()); + + return StatusCode::SUCCESS; } StatusCode SCT_CalibLbTool::finalize() { - msg( MSG::INFO)<<"Finalize of "<<PACKAGE_VERSION<<endmsg; - return StatusCode::SUCCESS; -} - -StatusCode -SCT_CalibLbTool::queryInterface(const InterfaceID & riid, void** ppvInterface ) { - if ( ISCT_CalibHistoTool::interfaceID().versionMatch(riid) ) { - *ppvInterface = dynamic_cast<ISCT_CalibHistoTool*>(this); - } else { - return AthAlgTool::queryInterface(riid, ppvInterface); - } - addRef(); - return StatusCode::SUCCESS; + ATH_MSG_INFO("Finalize of " << PACKAGE_VERSION); + return StatusCode::SUCCESS; } bool SCT_CalibLbTool::book() { - msg( MSG::INFO)<<"book() method of "<<PACKAGE_VERSION<<endmsg; - bool result(true); - //pointers to the histos are deleted by m_thistSvc methods - m_phistoVector.clear(); - m_phistoVector2D.clear(); - string histoName=pathRoot+"GENERAL/"; - m_LbRange=numberOfLb(); - m_numberOfEventsHisto=new TH1I("events","Events",m_LbRange,0.5,m_LbRange+0.5); - - m_LbsToMerge = LbToMerge(); - int yAxisBins = TMath::Ceil(1.0*m_LbRange/m_LbsToMerge); - - - if( m_thistSvc->regHist( histoName.c_str(), m_numberOfEventsHisto ).isFailure() ) { - msg( MSG::ERROR ) << "Error in booking EventNumber histogram" << endmsg; - } - //histograms for each wafer - SCT_ID::const_id_iterator waferItr = m_waferItrBegin; - //// - std::string hitmapPaths[3]; - for (int i(0); i<3; ++i) { - hitmapPaths[i]=pathRoot+detectorPaths[i]; - } - //// - for(; waferItr !=m_waferItrEnd; ++waferItr) { - const Identifier &waferId=*waferItr; - const int bec(m_pSCTHelper->barrel_ec(waferId)); - const string formattedPosition=formatPosition(waferId, m_pSCTHelper)+"_"; - //// - std::string histotitle = string( "SCT " ) + detectorNames[ bec2Index(bec) ] + string( " Hitmap: plane " ) + formattedPosition; - std::string formattedPosition2D = formattedPosition+"_2D"; - std::string name2D=hitmapPaths[bec2Index(m_pSCTHelper->barrel_ec( waferId ))] + formattedPosition + "_2D"; - // TH2F* hitmapHistoLB_tmp2D = new TH2F( TString( formattedPosition2D ), TString( histotitle ), nbins, firstStrip-0.5, lastStrip+0.5 ,1,0,0); - TH2F* hitmapHistoLB_tmp2D = new TH2F( TString( formattedPosition2D ), TString( histotitle ), nbins, firstStrip-0.5, lastStrip+0.5,yAxisBins,0.5,m_LbsToMerge*yAxisBins+0.5); - // hitmapHistoLB_tmp2D->GetYaxis()->SetCanExtend(kTRUE); - // TH2F* hitmapHistoLB_tmp2D = new TH2F( TString( formattedPosition2D ), TString( histotitle ), nbins, firstStrip-0.5, lastStrip+0.5 ,m_LbRange,0.5,m_LbRange+0.5); - if(m_thistSvc->regHist( name2D.c_str(), hitmapHistoLB_tmp2D ).isFailure() ) { - msg( MSG::ERROR ) << "Error in booking 2D Hitmap histogram" << endmsg; - } else { - // m_phistoVector.push_back( hitmapHisto_tmp ); - m_phistoVector2D.push_back( hitmapHistoLB_tmp2D ); - } - //// - for (int iChip(0); iChip!=n_chipsPerSide; ++iChip) { - int chipId= m_pSCTHelper->side(waferId)==0 ? iChip:iChip+n_chipsPerSide; - const string formattedChipPosition = formattedPosition + boost::lexical_cast<string>(chipId); - const string hname= pathRoot+detectorPaths[bec2Index(bec)]+"/"+formattedChipPosition; - const string histTitle = string("SCT")+detectorNames[bec2Index(bec)]+string(" LB: chip ")+formattedChipPosition; - TH1F* hist_tmp = new TH1F(TString(formattedChipPosition), TString(histTitle), m_LbRange, 0.5, m_LbRange+0.5); - if(m_thistSvc->regHist(hname.c_str(), hist_tmp).isFailure() ) msg(MSG::ERROR)<<"Error in booking LB histogram"<<endl; - m_phistoVector.push_back(hist_tmp); - } - } - return result; + ATH_MSG_INFO("book() method of " << PACKAGE_VERSION); + bool result{true}; + //pointers to the histos are deleted by m_thistSvc methods + m_phistoVector.clear(); + m_phistoVector2D.clear(); + string histoName{pathRoot+"GENERAL/"}; + m_LbRange = numberOfLb(); + m_numberOfEventsHisto = new TH1I{"events", "Events", m_LbRange, 0.5, m_LbRange+0.5}; + + m_LbsToMerge = LbToMerge(); + int yAxisBins{static_cast<int>(TMath::Ceil(1.0*m_LbRange/m_LbsToMerge))}; + + if (m_thistSvc->regHist( histoName.c_str(), m_numberOfEventsHisto ).isFailure()) { + ATH_MSG_ERROR("Error in booking EventNumber histogram"); + } + //histograms for each wafer + SCT_ID::const_id_iterator waferItr{m_waferItrBegin}; + //// + std::string hitmapPaths[3]; + for (int i{0}; i<3; ++i) { + hitmapPaths[i] = pathRoot+detectorPaths[i]; + } + //// + for (; waferItr !=m_waferItrEnd; ++waferItr) { + const Identifier& waferId{*waferItr}; + const int bec{m_pSCTHelper->barrel_ec(waferId)}; + const string formattedPosition{formatPosition(waferId, m_pSCTHelper)+"_"}; + //// + std::string histotitle{string{"SCT "} + detectorNames[bec2Index(bec)] + string{" Hitmap: plane "} + formattedPosition}; + std::string formattedPosition2D{formattedPosition + "_2D"}; + std::string name2D{hitmapPaths[bec2Index(m_pSCTHelper->barrel_ec(waferId))] + formattedPosition + "_2D"}; + TH2F* hitmapHistoLB_tmp2D{new TH2F{TString{formattedPosition2D}, TString{histotitle}, nbins, firstStrip-0.5, lastStrip+0.5, yAxisBins, 0.5, m_LbsToMerge*yAxisBins+0.5}}; + if (m_thistSvc->regHist(name2D.c_str(), hitmapHistoLB_tmp2D).isFailure()) { + ATH_MSG_ERROR("Error in booking 2D Hitmap histogram"); + } else { + m_phistoVector2D.push_back(hitmapHistoLB_tmp2D); + } + //// + for (int iChip(0); iChip!=n_chipsPerSide; ++iChip) { + int chipId{m_pSCTHelper->side(waferId)==0 ? iChip:iChip+n_chipsPerSide}; + const string formattedChipPosition{formattedPosition + boost::lexical_cast<string>(chipId)}; + const string hname{pathRoot + detectorPaths[bec2Index(bec)] + "/" + formattedChipPosition}; + const string histTitle{string{"SCT"} + detectorNames[bec2Index(bec)] + string{" LB: chip "} + formattedChipPosition}; + TH1F* hist_tmp{new TH1F{TString{formattedChipPosition}, TString{histTitle}, m_LbRange, 0.5, m_LbRange+0.5}}; + if (m_thistSvc->regHist(hname.c_str(), hist_tmp).isFailure()) ATH_MSG_ERROR("Error in booking LB histogram"); + m_phistoVector.push_back(hist_tmp); + } + } + return result; } bool -SCT_CalibLbTool::read(const std::string & fileName) { - msg( MSG::INFO)<<"read() method of "<<PACKAGE_VERSION<<endmsg; - bool result(true); - m_LbRange=numberOfLb(); - //pointers to the histos are deleted by m_thistSvc methods - m_phistoVector.clear(); - m_phistoVector2D.clear(); - TFile *fileLB = TFile::Open( fileName.c_str() ); - msg( MSG::INFO ) << "opening LB file : " << fileName.c_str() << endmsg; - - if(fileLB) { - m_numberOfEventsHisto= (TH1I*) fileLB->Get("GENERAL/events"); - } else { - msg( MSG::ERROR ) << "can not open LB file : " << fileName.c_str() << endmsg; - return result; - } - - if( m_numberOfEventsHisto==NULL ) { - msg( MSG::ERROR ) << "Error in reading EventNumber histogram" << endmsg; - } - //std::cout<<"new of m_numberOfEventsHisto, value = "<<m_numberOfEventsHisto<<std::endl; - //histograms for each wafer - SCT_ID::const_id_iterator waferItr = m_waferItrBegin; - for(; waferItr !=m_waferItrEnd; ++waferItr) { - const Identifier &waferId=*waferItr; - const int bec(m_pSCTHelper->barrel_ec(waferId)); - const string formattedPosition=formatPosition(waferId, m_pSCTHelper)+"_"; - //// - std::string name2D=detectorPaths[bec2Index(m_pSCTHelper->barrel_ec( waferId ))] + formattedPosition + "_2D"; - TH2F* hitmapHistoLB_tmp2D = (TH2F*) fileLB->Get(name2D.c_str()); - // hitmapHistoLB_tmp2D->GetYaxis()->SetCanExtend(kTRUE); - - if( hitmapHistoLB_tmp2D==NULL ) { - msg( MSG::ERROR ) << "Error in reading Hitmap histogram" << endmsg; +SCT_CalibLbTool::read(const std::string& fileName) { + ATH_MSG_INFO("read() method of " << PACKAGE_VERSION); + bool result{true}; + m_LbRange = numberOfLb(); + //pointers to the histos are deleted by m_thistSvc methods + m_phistoVector.clear(); + m_phistoVector2D.clear(); + TFile* fileLB{TFile::Open(fileName.c_str())}; + ATH_MSG_INFO("opening LB file : " << fileName.c_str()); + + if (fileLB) { + m_numberOfEventsHisto = static_cast<TH1I*>(fileLB->Get("GENERAL/events")); + } else { + ATH_MSG_ERROR("can not open LB file : " << fileName.c_str()); + return result; + } + + if (m_numberOfEventsHisto==nullptr) { + ATH_MSG_ERROR("Error in reading EventNumber histogram"); + } + //histograms for each wafer + SCT_ID::const_id_iterator waferItr{m_waferItrBegin}; + for (; waferItr !=m_waferItrEnd; ++waferItr) { + const Identifier& waferId{*waferItr}; + const int bec{m_pSCTHelper->barrel_ec(waferId)}; + const string formattedPosition{formatPosition(waferId, m_pSCTHelper)+"_"}; + //// + std::string name2D=detectorPaths[bec2Index(m_pSCTHelper->barrel_ec( waferId ))] + formattedPosition + "_2D"; + TH2F* hitmapHistoLB_tmp2D = (TH2F*) fileLB->Get(name2D.c_str()); + + if (hitmapHistoLB_tmp2D==nullptr) { + ATH_MSG_ERROR("Error in reading Hitmap histogram"); + } else { + m_phistoVector2D.push_back(hitmapHistoLB_tmp2D); + } + //// + for (int iChip{0}; iChip!=n_chipsPerSide; ++iChip) { + int chipId{m_pSCTHelper->side(waferId)==0 ? iChip : iChip+n_chipsPerSide}; + const string hname{detectorPaths[bec2Index(bec)] + "/" + formattedPosition + boost::lexical_cast<string>(chipId)}; + TH1F* hist_tmp{static_cast<TH1F*>(fileLB->Get(hname.c_str()))}; + if (hist_tmp==nullptr) { + ATH_MSG_ERROR("Error in reading LB histogram"); } else { - m_phistoVector2D.push_back( hitmapHistoLB_tmp2D ); - } - //// - for (int iChip(0); iChip!=n_chipsPerSide; ++iChip) { - int chipId= m_pSCTHelper->side(waferId)==0 ? iChip : iChip+n_chipsPerSide; - const string hname= detectorPaths[bec2Index(bec)]+"/"+formattedPosition + boost::lexical_cast<string>(chipId); - TH1F* hist_tmp = (TH1F*) fileLB->Get(hname.c_str()); - if( hist_tmp==NULL ) { - msg( MSG::ERROR ) << "Error in reading LB histogram" << endmsg; - } else { - m_phistoVector.push_back(hist_tmp); - } + m_phistoVector.push_back(hist_tmp); } - } - return result; + } + } + return result; } bool SCT_CalibLbTool::fill(const bool fromData) { - if (fromData) { - return fillFromData(); - } - m_numberOfEventsHisto->Fill(m_lumiBlock); - bool result(true); - int maxEntry = m_sct_waferHash->size(); - for( int i = 0; i != maxEntry; ++i ) { - int theFirstStrip = (*m_sct_firstStrip)[i]; - // - int endStrip = (*m_sct_rdoGroupSize)[i] + theFirstStrip; - int index = (*m_sct_waferHash)[i]; - TH2F * pThisHisto2D=m_phistoVector2D[ index ]; - // pThisHisto2D->GetYaxis()->SetCanExtend(kTRUE); - - for( int strip(theFirstStrip); strip !=endStrip; ++strip) { - pThisHisto2D->Fill( strip, m_lumiBlock); - } - // - int rdoGroupSize = (*m_sct_rdoGroupSize)[i]; - IdentifierHash waferHash = (*m_sct_waferHash)[i]; - fillLbForWafer(waferHash, theFirstStrip, rdoGroupSize); - } - - return result; + if (fromData) { + return fillFromData(); + } + m_numberOfEventsHisto->Fill(m_lumiBlock); + bool result{true}; + int maxEntry{static_cast<int>(m_sct_waferHash->size())}; + for (int i{0}; i != maxEntry; ++i) { + int theFirstStrip{(*m_sct_firstStrip)[i]}; + // + int endStrip{(*m_sct_rdoGroupSize)[i] + theFirstStrip}; + int index{(*m_sct_waferHash)[i]}; + TH2F* pThisHisto2D{m_phistoVector2D[index]}; + + for (int strip{theFirstStrip}; strip !=endStrip; ++strip) { + pThisHisto2D->Fill(strip, m_lumiBlock); + } + // + int rdoGroupSize{(*m_sct_rdoGroupSize)[i]}; + IdentifierHash waferHash{static_cast<unsigned int>((*m_sct_waferHash)[i])}; + fillLbForWafer(waferHash, theFirstStrip, rdoGroupSize); + } + + return result; } bool SCT_CalibLbTool::fillFromData() { - if (not m_evtInfo) return msg( MSG::ERROR ) << "The evtInfo pointer is NULL" << endmsg, false; - m_lumiBlock=m_evtInfo->lumiBlock(); - m_numberOfEventsHisto->Fill(m_lumiBlock); - bool result(true); - //--- Retrieve the RDO container - typedef SCT_RDORawData SCTRawDataType; - SG::ReadHandle<SCT_RDO_Container> p_rdoContainer(m_rdoContainerKey); - if ( not p_rdoContainer.isValid() ) { - msg( MSG::ERROR ) << "Failed to retrieve SCT RDO container" << endmsg; - } - - SCT_RDO_Container::const_iterator itr = p_rdoContainer->begin(); - SCT_RDO_Container::const_iterator itrE = p_rdoContainer->end(); - for( ; itr != itrE; ++itr ) { - const InDetRawDataCollection<SCTRawDataType>* SCT_Collection( *itr ); - if ( !SCT_Collection ) continue;// select only SCT RDOs - Identifier waferId = SCT_Collection->identify(); - IdentifierHash waferHash = m_pSCTHelper->wafer_hash( waferId ); + if (!m_evtInfo) { + ATH_MSG_ERROR("The evtInfo pointer is NULL"); + return false; + } + m_lumiBlock=m_evtInfo->lumiBlock(); + m_numberOfEventsHisto->Fill(m_lumiBlock); + bool result{true}; + //--- Retrieve the RDO container + typedef SCT_RDORawData SCTRawDataType; + SG::ReadHandle<SCT_RDO_Container> p_rdoContainer{m_rdoContainerKey}; + if (not p_rdoContainer.isValid()) { + ATH_MSG_ERROR("Failed to retrieve SCT RDO container"); + } + + SCT_RDO_Container::const_iterator itr{p_rdoContainer->begin()}; + SCT_RDO_Container::const_iterator itrE{p_rdoContainer->end()}; + for (; itr != itrE; ++itr) { + const InDetRawDataCollection<SCTRawDataType>* SCT_Collection{*itr}; + if (SCT_Collection==nullptr) continue;// select only SCT RDOs + Identifier waferId{SCT_Collection->identify()}; + IdentifierHash waferHash{m_pSCTHelper->wafer_hash(waferId)}; + //// + TH2F* pThisHisto2D{m_phistoVector2D[static_cast<int>(waferHash)]}; + //// + DataVector<SCTRawDataType>::const_iterator rdoItr{SCT_Collection->begin()}; + DataVector<SCTRawDataType>::const_iterator rdoItrE{SCT_Collection->end()}; + for (; rdoItr != rdoItrE; ++rdoItr ) { + int theFirstStrip{m_pSCTHelper->strip((*rdoItr)->identify())}; //// - TH2F * pThisHisto2D =m_phistoVector2D[(int)waferHash]; - //// - DataVector<SCTRawDataType>::const_iterator rdoItr = SCT_Collection->begin(); - DataVector<SCTRawDataType>::const_iterator rdoItrE = SCT_Collection->end(); - for( ; rdoItr != rdoItrE; ++rdoItr ) { - int theFirstStrip = m_pSCTHelper->strip((*rdoItr)->identify()); - //// - int strip=m_pSCTHelper->strip((*rdoItr)->identify()); - const int endStrip=(*rdoItr)->getGroupSize() + strip; - for (; strip != endStrip; ++strip) { - pThisHisto2D->Fill( strip, m_lumiBlock); - } - //// - int rdoGroupSize = (*rdoItr)->getGroupSize(); - fillLbForWafer(waferHash, theFirstStrip, rdoGroupSize); + int strip{m_pSCTHelper->strip((*rdoItr)->identify())}; + const int endStrip{(*rdoItr)->getGroupSize() + strip}; + for (; strip != endStrip; ++strip) { + pThisHisto2D->Fill( strip, m_lumiBlock); } - } + //// + int rdoGroupSize{(*rdoItr)->getGroupSize()}; + fillLbForWafer(waferHash, theFirstStrip, rdoGroupSize); + } + } - return result; + return result; } void -SCT_CalibLbTool::fillLbForWafer(const IdentifierHash &waferHash, const int theFirstStrip, const int groupSize ) { - const InDetDD::SiDetectorElement* pElement = m_pManager->getDetectorElement( waferHash ); - - if ( pElement) { - int stripNumber = ( pElement->swapPhiReadoutDirection() ) ? lastStrip - theFirstStrip : theFirstStrip; - int index = ((int)waferHash)*n_chipsPerSide + stripNumber/n_stripsPerChip; - //--- Fill LB histograms - for( int j = 0; j != groupSize; ++j ) { - m_phistoVector[ index ]->Fill( m_lumiBlock ); - } - - } else { - msg( MSG::FATAL ) << "Element pointer is NULL" << endmsg; - } +SCT_CalibLbTool::fillLbForWafer(const IdentifierHash& waferHash, const int theFirstStrip, const int groupSize) { + const InDetDD::SiDetectorElement* pElement{m_pManager->getDetectorElement(waferHash)}; + + if (pElement) { + int stripNumber{pElement->swapPhiReadoutDirection() ? lastStrip - theFirstStrip : theFirstStrip}; + int index{static_cast<int>(waferHash)*n_chipsPerSide + stripNumber/n_stripsPerChip}; + //--- Fill LB histograms + for (int j{0}; j != groupSize; ++j) { + m_phistoVector[index]->Fill(m_lumiBlock); + } + + } else { + ATH_MSG_FATAL("Element pointer is NULL"); + } } diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibLbTool.h b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibLbTool.h index e3eee1990eb78cb2a9dab8926da017d1c07365c2..12f5ccf4a03709ab119c55ffbcb28516286b67b1 100644 --- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibLbTool.h +++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibLbTool.h @@ -6,16 +6,14 @@ * @file SCT_CalibLbTool.h * Header file for the SCT_CalibLbTool class * @author Shaun Roe -**/ + **/ #ifndef SCT_CalibLbTool_h #define SCT_CalibLbTool_h //Athena includes #include "AthenaBaseComps/AthAlgTool.h" -#include "StoreGate/StoreGateSvc.h" #include "StoreGate/ReadHandleKey.h" -#include "GaudiKernel/ToolHandle.h" #include "SCT_CalibAlgs/ISCT_CalibEvtInfo.h" #include "InDetRawData/SCT_RDO_Container.h" @@ -25,14 +23,16 @@ //local includes #include "SCT_CalibAlgs/ISCT_CalibHistoTool.h" +//Gaudi includes +#include "GaudiKernel/ToolHandle.h" + //STL includes -#include <atomic> #include <string> //fwd declarations namespace InDetDD { -class SCT_DetectorManager; + class SCT_DetectorManager; } class StatusCode; class ISvcLocator; @@ -41,48 +41,43 @@ class IdentifierHash; class SCT_CalibLbTool : public extends<AthAlgTool, ISCT_CalibHistoTool> { - public: - //@name Tool methods, reimplemented - //@{ - SCT_CalibLbTool(const std::string&, const std::string&, const IInterface*); - virtual ~SCT_CalibLbTool() = default; - virtual StatusCode initialize(); - virtual StatusCode finalize(); - //interfaceID() implementation is in the baseclass - virtual StatusCode queryInterface(const InterfaceID & riid, void** ppvInterface ); - //@} - //@name ISCT_CalibHistoTool methods, reimplemented - //@{ - virtual bool book(); - virtual bool fill(const bool fromData=false); - virtual bool read(const std::string & fileName); - virtual bool fillFromData(); - //@} - - private: - ServiceHandle<StoreGateSvc> m_detStore; - ServiceHandle<StoreGateSvc> m_evtStore; - ServiceHandle<ISCT_CalibEvtInfo> m_evtInfo; - - const SCT_ID* m_pSCTHelper; - const InDetDD::SCT_DetectorManager* m_pManager; - SCT_ID::const_id_iterator m_waferItrBegin; - SCT_ID::const_id_iterator m_waferItrEnd; - typedef std::vector<int> VecInt; - VecInt *m_sct_waferHash; - VecInt *m_sct_firstStrip; - VecInt *m_sct_rdoGroupSize; - - mutable std::atomic_int m_lumiBlock; - - //private use in this class - int m_LbRange; - int m_LbsToMerge; - - SG::ReadHandleKey<SCT_RDO_Container> m_rdoContainerKey; - - void - fillLbForWafer(const IdentifierHash &waferHash, const int theFirstStrip, const int groupSize ); + public: + //@name Tool methods, reimplemented + //@{ + SCT_CalibLbTool(const std::string&, const std::string&, const IInterface*); + virtual ~SCT_CalibLbTool() = default; + virtual StatusCode initialize(); + virtual StatusCode finalize(); + //@} + //@name ISCT_CalibHistoTool methods, reimplemented + //@{ + virtual bool book(); + virtual bool fill(const bool fromData=false); + virtual bool read(const std::string& fileName); + virtual bool fillFromData(); + //@} + + private: + ToolHandle<ISCT_CalibEvtInfo> m_evtInfo{this, "SCT_CalibEvtInfo", "SCT_CalibEvtInfo"}; + + const SCT_ID* m_pSCTHelper; + const InDetDD::SCT_DetectorManager* m_pManager; + SCT_ID::const_id_iterator m_waferItrBegin; + SCT_ID::const_id_iterator m_waferItrEnd; + typedef std::vector<int> VecInt; + VecInt* m_sct_waferHash; + VecInt* m_sct_firstStrip; + VecInt* m_sct_rdoGroupSize; + + int m_lumiBlock; + + //private use in this class + int m_LbRange; + int m_LbsToMerge; + + SG::ReadHandleKey<SCT_RDO_Container> m_rdoContainerKey; + + void fillLbForWafer(const IdentifierHash& waferHash, const int theFirstStrip, const int groupSize); }; #endif diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibModuleListTool.cxx b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibModuleListTool.cxx index 43a0b00fc0d8217eaf5c9b63ea5cbfbcbcfcda53..bb5c39831d17afd72e77c397beebef4222410c5f 100644 --- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibModuleListTool.cxx +++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibModuleListTool.cxx @@ -1,72 +1,46 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_CalibModuleListTool.h" -SCT_CalibModuleListTool::SCT_CalibModuleListTool(const std::string& type, const std::string& name, const IInterface* parent) : - base_class(type, name, parent), - m_pSCTHelper(0), - m_detStore("DetectorStore", name), - m_IOVDbSvc( "IOVDbSvc", name ) +SCT_CalibModuleListTool::SCT_CalibModuleListTool(const std::string& type, const std::string& name, const IInterface* parent): + base_class(type, name, parent), + m_pSCTHelper{nullptr}, + m_IOVDbSvc{"IOVDbSvc", name} { } StatusCode SCT_CalibModuleListTool::initialize() { - if (msgLvl(MSG::DEBUG)) msg(MSG:: DEBUG) << "Initializing SCT_CalibModuleListTool " << endmsg; + ATH_MSG_DEBUG("Initializing SCT_CalibModuleListTool"); - StatusCode sc = m_detStore->retrieve( m_pSCTHelper, "SCT_ID" ); - if ( sc.isFailure() ) { - msg( MSG::ERROR ) << "Unable to retrieve SCTHelper" << endmsg; - return sc; - } + ATH_CHECK(detStore()->retrieve(m_pSCTHelper, "SCT_ID")); + ATH_CHECK(m_MonitorConditionsTool.retrieve()); + ATH_CHECK(m_IOVDbSvc.retrieve()); - sc = m_MonitorConditionsTool.retrieve(); - if ( sc.isFailure() ) { - msg( MSG::ERROR ) << "Unable to retrieve MonitorConditionsSvc" << endmsg; - return sc; - } - - sc = m_IOVDbSvc.retrieve(); - if ( sc.isFailure() ) { - msg( MSG::ERROR ) << "Unable to retrieve IOVDbSvc" << endmsg; - return sc; - } - - return StatusCode::SUCCESS; + return StatusCode::SUCCESS; } StatusCode SCT_CalibModuleListTool::finalize() { - return StatusCode::SUCCESS; -} - -StatusCode -SCT_CalibModuleListTool::queryInterface(const InterfaceID & riid, void** ppvInterface ) { - if ( ISCT_CalibModuleListTool::interfaceID().versionMatch(riid) ) { - *ppvInterface = dynamic_cast<ISCT_CalibModuleListTool*>(this); - } else { - return AthAlgTool::queryInterface(riid, ppvInterface); - } - addRef(); - return StatusCode::SUCCESS; + return StatusCode::SUCCESS; } -StatusCode SCT_CalibModuleListTool::readModuleList( std::map< Identifier, std::set<Identifier> >& moduleList ) { - //--- Read strips using SCT_MonitorConditionsSvc - SCT_ID::const_id_iterator waferIdItr = m_pSCTHelper->wafer_begin(); - SCT_ID::const_id_iterator waferIdItrE = m_pSCTHelper->wafer_end(); - for( ; waferIdItr != waferIdItrE; ++waferIdItr ) { - if ( m_pSCTHelper->side( *waferIdItr ) != 0 ) continue; - Identifier waferId = *waferIdItr; - Identifier moduleId = m_pSCTHelper->module_id( waferId ); +StatusCode SCT_CalibModuleListTool::readModuleList(std::map<Identifier, std::set<Identifier>>& moduleList) const { + //--- Read strips using SCT_MonitorConditionsSvc + SCT_ID::const_id_iterator waferIdItr{m_pSCTHelper->wafer_begin()}; + SCT_ID::const_id_iterator waferIdItrE{m_pSCTHelper->wafer_end()}; + for (; waferIdItr != waferIdItrE; ++waferIdItr) { + if (m_pSCTHelper->side( *waferIdItr ) != 0) continue; + Identifier waferId{*waferIdItr}; + Identifier moduleId{m_pSCTHelper->module_id(waferId)}; - std::set<Identifier> stripIdList; - m_MonitorConditionsTool->badStrips( moduleId, stripIdList ); - if ( !stripIdList.empty() ) moduleList.insert( std::map< Identifier, std::set<Identifier> >::value_type( moduleId, stripIdList ) ); - } + std::set<Identifier> stripIdList; + m_MonitorConditionsTool->badStrips(moduleId, stripIdList); + if (!stripIdList.empty()) moduleList.insert(std::map<Identifier, std::set<Identifier>>::value_type(moduleId, stripIdList)); + } - //--- Drop the folder to avoid conflict with SCTCalibWriteSvc - if ( !( m_IOVDbSvc->dropObject( "/SCT/Derived/Monitoring", true ) ) ) msg( MSG::ERROR ) << "Unable to drop /SCT/Derived/Monitoring" << endmsg; + //--- Drop the folder to avoid conflict with SCTCalibWriteSvc + if (!(m_IOVDbSvc->dropObject("/SCT/Derived/Monitoring", true))) ATH_MSG_ERROR("Unable to drop /SCT/Derived/Monitoring"); - return StatusCode::SUCCESS; + return StatusCode::SUCCESS; } diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibModuleListTool.h b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibModuleListTool.h index c66830f836247e24f7088a1149f5520ee61d63f4..e0ade40160f2e64a6951dff2eee1941474434ed3 100644 --- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibModuleListTool.h +++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibModuleListTool.h @@ -3,33 +3,31 @@ */ /** -* @file SCT_CalibModuleListTool.h -* Header file for the SCT_CalibModuleListTool class -* @author Shaun Roe -**/ + * @file SCT_CalibModuleListTool.h + * Header file for the SCT_CalibModuleListTool class + * @author Shaun Roe + **/ #ifndef SCT_CalibModuleListTool_h #define SCT_CalibModuleListTool_h -// STL and boost headers -#include <string> -#include <vector> -#include <set> -#include <map> - -#include "GaudiKernel/IInterface.h" #include "AthenaBaseComps/AthAlgTool.h" -#include "StoreGate/StoreGateSvc.h" +#include "SCT_CalibAlgs/ISCT_CalibModuleListTool.h" + #include "AthenaKernel/IIOVDbSvc.h" +#include "Identifier/Identifier.h" +#include "InDetIdentifier/SCT_ID.h" +#include "SCT_ConditionsTools/ISCT_MonitorConditionsTool.h" +#include "StoreGate/StoreGateSvc.h" #include "GaudiKernel/ToolHandle.h" #include "GaudiKernel/ServiceHandle.h" -#include "SCT_CalibAlgs/ISCT_CalibModuleListTool.h" -#include "SCT_ConditionsTools/ISCT_MonitorConditionsTool.h" - -#include "Identifier/Identifier.h" -#include "InDetIdentifier/SCT_ID.h" +// STL and boost headers +#include <string> +#include <vector> +#include <set> +#include <map> //fwd declarations class StatusCode; @@ -37,22 +35,20 @@ class StatusCode; class SCT_CalibModuleListTool : public extends<AthAlgTool, ISCT_CalibModuleListTool> { - public: - //@name Tool methods, reimplemented - //@{ - SCT_CalibModuleListTool(const std::string&, const std::string&, const IInterface*); - virtual ~SCT_CalibModuleListTool() = default; - virtual StatusCode initialize(); - virtual StatusCode finalize(); - virtual StatusCode queryInterface(const InterfaceID & riid, void** ppvInterface ); - //@} - virtual StatusCode readModuleList( std::map< Identifier, std::set<Identifier> >& moduleList ); - - private: - const SCT_ID* m_pSCTHelper; - ServiceHandle<StoreGateSvc> m_detStore; - ToolHandle<ISCT_MonitorConditionsTool> m_MonitorConditionsTool{this, "SCT_MonitorConditionsTool", "SCT_MonitorConditionsTool/InDetSCT_MonitorConditionsTool", "Tool to retrieve noisy strip information"}; - ServiceHandle<IIOVDbSvc> m_IOVDbSvc; + public: + //@name Tool methods, reimplemented + //@{ + SCT_CalibModuleListTool(const std::string&, const std::string&, const IInterface*); + virtual ~SCT_CalibModuleListTool() = default; + virtual StatusCode initialize(); + virtual StatusCode finalize(); + //@} + virtual StatusCode readModuleList(std::map<Identifier, std::set<Identifier>>& moduleList) const; + + private: + const SCT_ID* m_pSCTHelper; + ToolHandle<ISCT_MonitorConditionsTool> m_MonitorConditionsTool{this, "SCT_MonitorConditionsTool", "SCT_MonitorConditionsTool/InDetSCT_MonitorConditionsTool", "Tool to retrieve noisy strip information"}; + ServiceHandle<IIOVDbSvc> m_IOVDbSvc; }; #endif diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibNumbers.h b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibNumbers.h index 5a5dd67d19f76c35323a0f7171095916a96561b0..56459138feaf9fae90c1af7aa4f8307a5ed7bd24 100644 --- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibNumbers.h +++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibNumbers.h @@ -1,22 +1,22 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_CalibNumbers_h #define SCT_CalibNumbers_h namespace SCT_CalibAlgs { -// SCT specific numbers -enum { nbins = 6*128, firstStrip = 0, lastStrip = nbins-1, - ntimeBins = 3, firstTimeBin = 0, lastTimeBin = 2, - n_hitBins = 50, first_hitBin = 0, last_hitBin = 50, - n_etaBins = 13, first_etaBin = -6, last_etaBin = 6, - n_phiBins = 56, first_phiBin = 0, last_phiBin = 55, - n_barrels = 4, first_barrel = 0, last_barrel = 3, - n_disks = 9, first_disk = 0, last_disk = 8, - n_etaBinsEC = 3, first_etaBinEC = 0, last_etaBinEC = 2, - n_phiBinsEC = 52, first_phiBinEC = 0, last_phiBinEC = 51 - }; + // SCT specific numbers + enum { nbins = 6*128, firstStrip = 0, lastStrip = nbins-1, + ntimeBins = 3, firstTimeBin = 0, lastTimeBin = 2, + n_hitBins = 50, first_hitBin = 0, last_hitBin = 50, + n_etaBins = 13, first_etaBin = -6, last_etaBin = 6, + n_phiBins = 56, first_phiBin = 0, last_phiBin = 55, + n_barrels = 4, first_barrel = 0, last_barrel = 3, + n_disks = 9, first_disk = 0, last_disk = 8, + n_etaBinsEC = 3, first_etaBinEC = 0, last_etaBinEC = 2, + n_phiBinsEC = 52, first_phiBinEC = 0, last_phiBinEC = 51 + }; } #endif diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibUtilities.cxx b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibUtilities.cxx index 291051f1bab04caddc8d20a737815ca4cb1e27c6..1f30a0d1a6d2f7502487191bc3ff594eb0798acb 100644 --- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibUtilities.cxx +++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibUtilities.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /** @@ -11,62 +11,62 @@ #include "SCT_CalibUtilities.h" -//STL, boost -#include <boost/lexical_cast.hpp> - //gaudi #include "EventInfo/EventInfo.h" #include "EventInfo/EventID.h" #include "InDetIdentifier/SCT_ID.h" #include "Identifier/Identifier.h" +//STL, boost +#include <boost/lexical_cast.hpp> + namespace SCT_CalibAlgs { -std::string -eventInfoAsString(const EventInfo * theEvent) { - using boost::lexical_cast; - using std::string; - const EventID* e=theEvent->event_ID(); - string result = string("[ Run, Event, Time, Lumi, Bunch ] = [ " )+ - lexical_cast<string>(e->run_number()) + ", " + - lexical_cast<string>(e->event_number()) + ", "+ - lexical_cast<string>(e->time_stamp()) + ", "+ - lexical_cast<string>(e->lumi_block()) + ", "+ - lexical_cast<string>(e->lumi_block()) + " ] "; - return result; -}//function end + std::string + eventInfoAsString(const EventInfo* theEvent) { + using boost::lexical_cast; + using std::string; + const EventID* e{theEvent->event_ID()}; + string result{string("[ Run, Event, Time, Lumi, Bunch ] = [ " )+ + lexical_cast<string>(e->run_number()) + ", " + + lexical_cast<string>(e->event_number()) + ", "+ + lexical_cast<string>(e->time_stamp()) + ", "+ + lexical_cast<string>(e->lumi_block()) + ", "+ + lexical_cast<string>(e->lumi_block()) + " ] "}; + return result; + }//function end -std::string -formatPosition(const Identifier & waferId, const SCT_ID* helper, const std::string & delimiter, const bool includeSide) { - using boost::lexical_cast; - using std::string; - string result=lexical_cast<string>(helper->barrel_ec(waferId))+delimiter; - result+=lexical_cast<string>(helper->layer_disk(waferId))+delimiter; - result+=lexical_cast<string>(helper->phi_module(waferId))+delimiter; - result+=lexical_cast<string>(helper->eta_module(waferId)); - if (includeSide) result+=( delimiter+lexical_cast<string>(helper->side(waferId)) ); - return result; -}//function end + std::string + formatPosition(const Identifier& waferId, const SCT_ID* helper, const std::string& delimiter, const bool includeSide) { + using boost::lexical_cast; + using std::string; + string result{lexical_cast<string>(helper->barrel_ec(waferId))+delimiter}; + result += lexical_cast<string>(helper->layer_disk(waferId))+delimiter; + result += lexical_cast<string>(helper->phi_module(waferId))+delimiter; + result += lexical_cast<string>(helper->eta_module(waferId)); + if (includeSide) result += (delimiter+lexical_cast<string>(helper->side(waferId))); + return result; + }//function end -std::string -chipList2LinkList(const std::string & chipList) { - if ( chipList == "0-5 6-11" ) { + std::string + chipList2LinkList(const std::string& chipList) { + if (chipList == "0-5 6-11") { return "0 1"; - } else if ( chipList == "0-5" ) { + } else if (chipList == "0-5") { return "0"; - } else if ( chipList == "6-11" ) { + } else if (chipList == "6-11") { return "1"; - } else { + } else { return ""; - } -} + } + } -unsigned int -bec2Index( const int bec ) { - return (bec/2) + 1; -} + unsigned int + bec2Index(const int bec) { + return static_cast<unsigned int>((bec/2) + 1); + } -std::string -xmlCloseChannel() { - return "</channel>"; -} + std::string + xmlCloseChannel() { + return "</channel>"; + } } //end of namespace diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibUtilities.h b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibUtilities.h index 6078988736a53787fcf569d827ffb4c562999abf..c3dccda0e852511f2be30561c16988d001362933 100644 --- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibUtilities.h +++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibUtilities.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /** @@ -21,27 +21,27 @@ class EventInfo; namespace SCT_CalibAlgs { -std::string eventInfoAsString(const EventInfo * theEvent); -std::string formatPosition(const Identifier & waferId, const SCT_ID* helper, const std::string & delimiter="_", const bool includeSide=true); -std::string chipList2LinkList(const std::string & chipList); -unsigned int bec2Index( const int bec ); - -template <class T> -std::string xmlValue(const std::string & name, const T value) { - std::ostringstream os; - os<<" <value name=\""<<name<<"\">"<<value<<"</value>"; - return os.str(); -} - -template <class T> -std::string xmlOpenChannel(const long id, const T since, const T until) { - std::string opener=std::string(" <channel id=\"")+boost::lexical_cast<std::string>(id)+"\""; - std::string sinceAttr=std::string(" since=\"")+boost::lexical_cast<std::string>(since)+"\""; - std::string untilAttr=std::string(" until=\"")+boost::lexical_cast<std::string>(until)+"\""; - return opener+sinceAttr+untilAttr+">"; -} - -std::string xmlCloseChannel(); + std::string eventInfoAsString(const EventInfo* theEvent); + std::string formatPosition(const Identifier& waferId, const SCT_ID* helper, const std::string& delimiter="_", const bool includeSide=true); + std::string chipList2LinkList(const std::string& chipList); + unsigned int bec2Index(const int bec); + + template <class T> + std::string xmlValue(const std::string& name, const T value) { + std::ostringstream os; + os << " <value name=\"" << name << "\">" << value << "</value>"; + return os.str(); + } + + template <class T> + std::string xmlOpenChannel(const long id, const T since, const T until) { + std::string opener=std::string{" <channel id=\""}+boost::lexical_cast<std::string>(id)+"\""; + std::string sinceAttr=std::string{" since=\""}+boost::lexical_cast<std::string>(since)+"\""; + std::string untilAttr=std::string{" until=\""}+boost::lexical_cast<std::string>(until)+"\""; + return opener+sinceAttr+untilAttr+">"; + } + + std::string xmlCloseChannel(); } //end of namespace diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/XmlHeader.cxx b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/XmlHeader.cxx index 893a8184927f252a25f927bdcf9b8d5c8f48c927..c3ee81616db4417e1a55feda5bb3f498eb07b9d0 100644 --- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/XmlHeader.cxx +++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/XmlHeader.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /** @@ -13,13 +13,13 @@ #include <ostream> namespace SCT_CalibAlgs { -XmlHeader::XmlHeader(std::ostream & output): m_os(output) { - m_os << "<?xml version=\"1.0\" encoding=\"UTF-8\"?> \n"; -} + XmlHeader::XmlHeader(std::ostream& output): m_os(output) { + m_os << "<?xml version=\"1.0\" encoding=\"UTF-8\"?> \n"; + } -void -XmlHeader::addStylesheet(const std::string & stylesheetPath) { - m_os << std::string("<?xml-stylesheet type=\"text/xsl\" href=\"") + stylesheetPath + std::string("\"?>\n"); -} + void + XmlHeader::addStylesheet(const std::string& stylesheetPath) { + m_os << std::string{"<?xml-stylesheet type=\"text/xsl\" href=\""} + stylesheetPath + std::string{"\"?>\n"}; + } } diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/XmlHeader.h b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/XmlHeader.h index 8c11634bccc6b2adee691ba6b449e3cf039efacc..543bfc6d7a487f9bd07e6a8e3d3f58bdd1e5649f 100644 --- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/XmlHeader.h +++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/XmlHeader.h @@ -1,13 +1,13 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /** -* @file XmlHeader.h -* header file for the XmlHeader class -* -* @author Shaun Roe shaun.roe@cern.ch -**/ + * @file XmlHeader.h + * header file for the XmlHeader class + * + * @author Shaun Roe shaun.roe@cern.ch + **/ #ifndef SCT_CalibAlgs_XmlHeader_h #define SCT_CalibAlgs_XmlHeader_h @@ -15,14 +15,14 @@ #include <string> namespace SCT_CalibAlgs { -class XmlHeader { - public: - XmlHeader(std::ostream & output); - void addStylesheet(const std::string & stylesheetPath); + class XmlHeader { + public: + XmlHeader(std::ostream& output); + void addStylesheet(const std::string& stylesheetPath); - private: - std::ostream & m_os; -}; + private: + std::ostream& m_os; + }; } #endif diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/XmlStreamer.cxx b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/XmlStreamer.cxx index 8cb1e0dfeab31e7f10e61d82e25f5e415c2602d8..f731bd8ff8938fec0155b3a092bf94944e3cb569 100644 --- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/XmlStreamer.cxx +++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/XmlStreamer.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /* * XmlStreamer.cpp @@ -17,48 +17,49 @@ static Attributes_t empty; namespace SCT_CalibAlgs { -XmlStreamer::XmlStreamer(const std::string & name, const Attributes_t & attributes, std::ostream & os):IElementStreamer(name,attributes, os) { - //if (m_nodeId==0) m_os<<"<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; - m_os<<"\n<"<<m_name; - if (not attributes.empty()) { - Attributes_t::const_iterator i(attributes.begin()); - const Attributes_t::const_iterator end(attributes.end()); - for(; i!=end; ++i) { - m_os<<" "<<i->first<<"=\""<<i->second<<"\""; + XmlStreamer::XmlStreamer(const std::string& name, const Attributes_t& attributes, std::ostream& os): + IElementStreamer(name, attributes, os) { + m_os << "\n<" << m_name; + if (not attributes.empty()) { + Attributes_t::const_iterator i{attributes.begin()}; + const Attributes_t::const_iterator end{attributes.end()}; + for (; i!=end; ++i) { + m_os << " " << i->first << "=\"" << i->second << "\""; } - } - m_os<<">"; - m_os.flush(); -} + } + m_os << ">"; + m_os.flush(); + } -XmlStreamer::XmlStreamer(const std::string & name, const NameValue_t & attributeNames, const NameValue_t & attributeValues, std::ostream & os):IElementStreamer(name,attributeNames,attributeValues, os) { - //if (m_nodeId==0) m_os<<"<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; - m_os<<"\n<"<<m_name; - for(unsigned int i(0); i!=attributeNames.size(); ++i) { - m_os<<" "<<attributeNames[i]<<"=\""<<attributeValues[i]<<"\""; - } - m_os<<">"; - m_os.flush(); -} + XmlStreamer::XmlStreamer(const std::string& name, const NameValue_t& attributeNames, const NameValue_t& attributeValues, std::ostream& os): + IElementStreamer(name, attributeNames, attributeValues, os) { + m_os << "\n<" << m_name; + for (unsigned int i{0}; i!=attributeNames.size(); ++i) { + m_os << " " << attributeNames[i] << "=\"" << attributeValues[i] << "\""; + } + m_os << ">"; + m_os.flush(); + } -XmlStreamer::XmlStreamer(const std::string & name, std::ostream & os) - :IElementStreamer(name,empty, os) { - m_os<<"\n<"<<m_name<<">"; - m_os.flush(); -} + XmlStreamer::XmlStreamer(const std::string& name, std::ostream& os) + :IElementStreamer(name, empty, os) { + m_os << "\n<" << m_name << ">"; + m_os.flush(); + } -XmlStreamer::XmlStreamer(const std::string & name, const std::string & attributeName, const std::string & attributeValue, std::ostream & os):IElementStreamer(name,attributeName,attributeValue, os) { - m_os<<"\n<"<<m_name; - for(unsigned int i(0); i!=m_attributeNames.size(); ++i) { - m_os<<" "<<m_attributeNames[i]<<"=\""<<m_attributeValues[i]<<"\""; - } - m_os<<">"; - m_os.flush(); -} + XmlStreamer::XmlStreamer(const std::string& name, const std::string& attributeName, const std::string& attributeValue, std::ostream& os): + IElementStreamer(name, attributeName, attributeValue, os) { + m_os << "\n<" << m_name; + for (unsigned int i{0}; i!=m_attributeNames.size(); ++i) { + m_os << " " << m_attributeNames[i] << "=\"" << m_attributeValues[i] << "\""; + } + m_os << ">"; + m_os.flush(); + } -XmlStreamer::~XmlStreamer() { - m_os<<"</"<<m_name<<">"; - if (m_depth==1) m_os<<"\n"; -} + XmlStreamer::~XmlStreamer() { + m_os << "</" << m_name << ">"; + if (m_depth==1) m_os << "\n"; + } } diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/XmlStreamer.h b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/XmlStreamer.h index 62bcf2df6dd4fae287dc50dab121ab77c263079c..a5bbd5ef9087244e21d2025aae4428bf668b87de 100644 --- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/XmlStreamer.h +++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/XmlStreamer.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /* * XmlStreamer.h @@ -15,16 +15,16 @@ namespace SCT_CalibAlgs { -class XmlStreamer:public IElementStreamer { + class XmlStreamer:public IElementStreamer { - public: - XmlStreamer(const std::string & name, const std::map<std::string, std::string> & attributes, std::ostream & os=std::cout); - XmlStreamer(const std::string & name, const std::string & attributeName, const std::string & attributeValue, std::ostream & os=std::cout); + public: + XmlStreamer(const std::string& name, const std::map<std::string, std::string>& attributes, std::ostream& os=std::cout); + XmlStreamer(const std::string& name, const std::string& attributeName, const std::string& attributeValue, std::ostream& os=std::cout); - XmlStreamer(const std::string & name, const std::vector<std::string> & attributeNames, const std::vector<std::string> & attributeValues, std::ostream & os=std::cout); - XmlStreamer(const std::string & name, std::ostream & os=std::cout); - virtual ~XmlStreamer(); -}; + XmlStreamer(const std::string& name, const std::vector<std::string>& attributeNames, const std::vector<std::string>& attributeValues, std::ostream& os=std::cout); + XmlStreamer(const std::string& name, std::ostream& os=std::cout); + virtual ~XmlStreamer(); + }; } #endif diff --git a/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/SCT_ByteStreamFractionContainerCnv.cxx b/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/SCT_ByteStreamFractionContainerCnv.cxx index 309644374436d0b2fc339b63b01fd54207c7a967..a896010a4d8dc358cf1f91b143a1e52cb1fe682b 100644 --- a/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/SCT_ByteStreamFractionContainerCnv.cxx +++ b/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/SCT_ByteStreamFractionContainerCnv.cxx @@ -20,7 +20,7 @@ SCT_ByteStreamFractionContainerCnv::createPersistent(SCT_ByteStreamFractionConta SCT_ByteStreamFractionContainer* SCT_ByteStreamFractionContainerCnv::createTransient() { MsgStream log(msgSvc(), "SCT_ByteStreamFractionContainerCnv" ); - static pool::Guid p1_guid("EB75984C-F651-4F40-BA1C-9C2A0A558A55"); + const pool::Guid p1_guid("EB75984C-F651-4F40-BA1C-9C2A0A558A55"); if( compareClassGuid(p1_guid) ) { /** using auto_ptr ensures deletion of the persistent object */ std::auto_ptr< SCT_ByteStreamFractionContainer_p1 > col_vect( poolReadObject< SCT_ByteStreamFractionContainer_p1 >() ); diff --git a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/CMakeLists.txt b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/CMakeLists.txt index 9665ffd0f1bc86df969b27aa812839be16298fed..99c4567fd6586aeca55bb980e335781d6b3d0815 100644 --- a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/CMakeLists.txt +++ b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/CMakeLists.txt @@ -16,7 +16,6 @@ atlas_depends_on_subdirs( InnerDetector/InDetConditions/InDetConditionsSummaryService InnerDetector/InDetConditions/PixelConditionsData InnerDetector/InDetConditions/PixelConditionsTools - InnerDetector/InDetConditions/SiPropertiesSvc PRIVATE Control/SGTools Control/StoreGate @@ -53,7 +52,7 @@ atlas_add_component( PixelConditionsAlgorithms ${CLHEP_LIBRARIES} AthenaBaseComps AthenaKernel AthenaPoolUtilities GaudiKernel PixelConditionsData SGTools StoreGateLib CoralDB GeoModelUtilities Identifier InDetIdentifier InDetReadoutGeometry - PixelCablingLib PixelConditionsAlgorithmsLib SiPropertiesSvcLib PathResolver ) + PixelCablingLib PixelConditionsAlgorithmsLib PathResolver ) # Install files from the package: #atlas_install_joboptions( share/*.py ) diff --git a/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelChargeInterpolationParameters.h b/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelChargeInterpolationParameters.h index a54dda2253b229926bea8f121b5693f69f30610d..4d59540aea0415684b02b332452711b0a600bd65 100644 --- a/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelChargeInterpolationParameters.h +++ b/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelChargeInterpolationParameters.h @@ -27,7 +27,8 @@ class PixelChargeInterpolationParameters { public: PixelChargeInterpolationParameters(); - ~PixelChargeInterpolationParameters(){}; + ~PixelChargeInterpolationParameters() = default; + PixelChargeInterpolationParameters(const PixelChargeInterpolationParameters&) = delete; // get/set version number int getVersion() const; @@ -80,10 +81,10 @@ class PixelChargeInterpolationParameters { int getNumberOfXbins() const; int getNumberOfYbins() const; - const std::vector<float> getEtaBins() const{return m_etabins;} - const std::vector<float> getAngleBins() const{return m_phibins;} - const std::vector<float> getClusterSizeXBins() const{return m_csx;} - const std::vector<float> getClusterSizeYBins() const{return m_csy;} + const std::vector<float>& getEtaBins() const{return m_etabins;} + const std::vector<float>& getAngleBins() const{return m_phibins;} + const std::vector<float>& getClusterSizeXBins() const{return m_csx;} + const std::vector<float>& getClusterSizeYBins() const{return m_csy;} void setParameters(const int ncsx, const int ncsy, const int neta, const int nalpha, int offset, std::vector<float> constants); @@ -92,8 +93,8 @@ class PixelChargeInterpolationParameters { void Load(std::string filename); // IBL - const std::vector<float> getIBLEtaBins() const{return m_ibletabins;} - const std::vector<float> getIBLAngleBins() const{return m_iblphibins;} + const std::vector<float>& getIBLEtaBins() const{return m_ibletabins;} + const std::vector<float>& getIBLAngleBins() const{return m_iblphibins;} int getIBLcsxbins() const {return m_csxbinsibl;} int getIBLcsybins() const {return m_csybinsibl;} int getIBLetabins() const {return m_etaibl;} diff --git a/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelOfflineCalibData.h b/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelOfflineCalibData.h index f69d4f659d435794d1ed8a6beb1053ca2529a6b2..f6b9af934b565325c1740c3eb1b2ddfc0acd433a 100644 --- a/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelOfflineCalibData.h +++ b/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelOfflineCalibData.h @@ -59,7 +59,7 @@ class PixelOfflineCalibData{ int GetNumberOfConstants() const; std::vector<float> GetConstants() const; - void SetConstants(std::vector<float> constants); + void SetConstants(const std::vector<float> &constants); void Dump(); diff --git a/InnerDetector/InDetConditions/PixelConditionsData/src/PixelOfflineCalibData.cxx b/InnerDetector/InDetConditions/PixelConditionsData/src/PixelOfflineCalibData.cxx index 832c545168ee78f27c87794b46a10fe803d79240..c50625035258fdc1cf2c6726d6e7646258a0e378 100644 --- a/InnerDetector/InDetConditions/PixelConditionsData/src/PixelOfflineCalibData.cxx +++ b/InnerDetector/InDetConditions/PixelConditionsData/src/PixelOfflineCalibData.cxx @@ -22,13 +22,13 @@ std::vector<float> PixelOfflineCalibData::GetConstants() const { int n1 = m_clustererrordata->getNumberOfBarrelBins(); int n2 = m_clustererrordata->getNumberOfEndcapBins(); // get the bins of the cluster on track error data parametrization - const std::vector<float> csx = m_clusterontrackerrordata->getClusterSizeBinsX(); - const std::vector<float> csy = m_clusterontrackerrordata->getClusterSizeBinsY(); - const std::vector<float> eta = m_clusterontrackerrordata->getEtaBins(); - const std::vector<float> alpha = m_clusterontrackerrordata->getIncidenceAngleBins(); + const std::vector<float> &csx = m_clusterontrackerrordata->getClusterSizeBinsX(); + const std::vector<float> &csy = m_clusterontrackerrordata->getClusterSizeBinsY(); + const std::vector<float> &eta = m_clusterontrackerrordata->getEtaBins(); + const std::vector<float> &alpha = m_clusterontrackerrordata->getIncidenceAngleBins(); //IBL - const std::vector<float> etaibl = m_clusterontrackerrordata->getEtaIBLBins(); - const std::vector<float> alphaibl = m_clusterontrackerrordata->getIncidenceAngleIBLBins(); + const std::vector<float> &etaibl = m_clusterontrackerrordata->getEtaIBLBins(); + const std::vector<float> &alphaibl = m_clusterontrackerrordata->getIncidenceAngleIBLBins(); // // number of bins // Since the upper value is always implicit, numer of bins is the size of the vector @@ -41,13 +41,13 @@ std::vector<float> PixelOfflineCalibData::GetConstants() const { int netaibl = m_clusterontrackerrordata->getIBLetabins(); int nalphaibl =m_clusterontrackerrordata->getIBLphibins(); // get the bins of the charge interpolation parametrization - const std::vector<float> csx2 = m_chargeinterpolationparameters->getClusterSizeXBins(); - const std::vector<float> csy2 = m_chargeinterpolationparameters->getClusterSizeYBins(); - const std::vector<float> eta2 = m_chargeinterpolationparameters->getEtaBins(); - const std::vector<float> alpha2 = m_chargeinterpolationparameters->getAngleBins(); + const std::vector<float> &csx2 = m_chargeinterpolationparameters->getClusterSizeXBins(); + const std::vector<float> &csy2 = m_chargeinterpolationparameters->getClusterSizeYBins(); + const std::vector<float> &eta2 = m_chargeinterpolationparameters->getEtaBins(); + const std::vector<float> &alpha2 = m_chargeinterpolationparameters->getAngleBins(); // IBL - const std::vector<float> etaibl2 = m_chargeinterpolationparameters->getIBLEtaBins() ; - const std::vector<float> alphaibl2 = m_chargeinterpolationparameters->getIBLAngleBins() ; + const std::vector<float> &etaibl2 = m_chargeinterpolationparameters->getIBLEtaBins() ; + const std::vector<float> &alphaibl2 = m_chargeinterpolationparameters->getIBLAngleBins() ; // // number of bins // The upper limit is not implicit, we must subtract one! @@ -162,7 +162,7 @@ void PixelOfflineCalibData::Dump(){ m_chargeinterpolationparameters->Print("PixelChargeInterpolationParametersDump.txt"); } -void PixelOfflineCalibData::SetConstants(std::vector<float> constants){ +void PixelOfflineCalibData::SetConstants(const std::vector<float> &constants){ if(constants.at(0) > 0){ // old format m_clustererrordata->setVersion(0); diff --git a/InnerDetector/InDetConditions/PixelConditionsServices/test/PixelOfflineCalibServiceTest.cxx b/InnerDetector/InDetConditions/PixelConditionsServices/test/PixelOfflineCalibServiceTest.cxx index 313163f9c7a20c4899d5d945a3621b709cc2c6a3..c67fcfc7e10c1c05d90cd98621b1e8e34cb6ac72 100644 --- a/InnerDetector/InDetConditions/PixelConditionsServices/test/PixelOfflineCalibServiceTest.cxx +++ b/InnerDetector/InDetConditions/PixelConditionsServices/test/PixelOfflineCalibServiceTest.cxx @@ -156,12 +156,12 @@ StatusCode PixelOfflineCalibServiceTest::execute() { // PixelClusterOnTrackErrorData int v2 = m_pat->getPixelClusterOnTrackErrorData()->getVersion(); - const std::vector<float> csx =m_pat->getPixelClusterOnTrackErrorData()->getClusterSizeBinsX(); - const std::vector<float> csy =m_pat->getPixelClusterOnTrackErrorData()->getClusterSizeBinsY(); - const std::vector<float> eta =m_pat->getPixelClusterOnTrackErrorData()->getEtaBins(); - const std::vector<float> alpha = m_pat->getPixelClusterOnTrackErrorData()->getIncidenceAngleBins(); - const std::vector<float> etaibl = m_pat->getPixelClusterOnTrackErrorData()->getEtaIBLBins(); - const std::vector<float> alphaibl = m_pat->getPixelClusterOnTrackErrorData()->getIncidenceAngleIBLBins(); + const std::vector<float> &csx =m_pat->getPixelClusterOnTrackErrorData()->getClusterSizeBinsX(); + const std::vector<float> &csy =m_pat->getPixelClusterOnTrackErrorData()->getClusterSizeBinsY(); + const std::vector<float> &eta =m_pat->getPixelClusterOnTrackErrorData()->getEtaBins(); + const std::vector<float> &alpha = m_pat->getPixelClusterOnTrackErrorData()->getIncidenceAngleBins(); + const std::vector<float> &etaibl = m_pat->getPixelClusterOnTrackErrorData()->getEtaIBLBins(); + const std::vector<float> &alphaibl = m_pat->getPixelClusterOnTrackErrorData()->getIncidenceAngleIBLBins(); int ncsx = csx.size(); int ncsy = csy.size(); @@ -226,14 +226,14 @@ StatusCode PixelOfflineCalibServiceTest::execute() { // PixelChargeInterpolationData int v3 = m_pat->getPixelChargeInterpolationParameters()->getVersion(); - const std::vector<float> csx2 = m_pat->getPixelChargeInterpolationParameters()->getClusterSizeXBins(); - const std::vector<float> csy2 = m_pat->getPixelChargeInterpolationParameters()->getClusterSizeYBins(); - const std::vector<float> eta2 = m_pat->getPixelChargeInterpolationParameters()->getEtaBins(); - const std::vector<float> alpha2 = m_pat->getPixelChargeInterpolationParameters()->getAngleBins(); + const std::vector<float> &csx2 = m_pat->getPixelChargeInterpolationParameters()->getClusterSizeXBins(); + const std::vector<float> &csy2 = m_pat->getPixelChargeInterpolationParameters()->getClusterSizeYBins(); + const std::vector<float> &eta2 = m_pat->getPixelChargeInterpolationParameters()->getEtaBins(); + const std::vector<float> &alpha2 = m_pat->getPixelChargeInterpolationParameters()->getAngleBins(); // IBL - const std::vector<float> etaibl2 = m_pat->getPixelChargeInterpolationParameters()->getIBLEtaBins() ; + const std::vector<float> &etaibl2 = m_pat->getPixelChargeInterpolationParameters()->getIBLEtaBins() ; - const std::vector<float> alphaibl2 = m_pat->getPixelChargeInterpolationParameters()->getIBLAngleBins() ; + const std::vector<float> &alphaibl2 = m_pat->getPixelChargeInterpolationParameters()->getIBLAngleBins() ; // // number of bins // The upper limit is not implicit, we must subtract one! diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..aec6896fd8bdc106c6db73d633ec59c055ea3aea --- /dev/null +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +InnerDetector/InDetConditions/SCT_ConditionsAlgorithms diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/CMakeLists.txt b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/CMakeLists.txt index 2628a141270c42bf575fedf704666b9287134599..c38d5779c42205b4076acc826d6c0b12d5291a64 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/CMakeLists.txt +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/CMakeLists.txt @@ -20,8 +20,6 @@ atlas_depends_on_subdirs( PUBLIC InnerDetector/InDetConditions/SCT_ConditionsData InnerDetector/InDetConditions/SCT_ConditionsTools InnerDetector/InDetDetDescr/SCT_Cabling - Event/EventInfo - Event/xAOD/xAODEventInfo PRIVATE InnerDetector/InDetDetDescr/InDetIdentifier InnerDetector/InDetDetDescr/InDetReadoutGeometry @@ -35,7 +33,7 @@ atlas_add_component( SCT_ConditionsAlgorithms src/*.cxx src/components/*.cxx INCLUDE_DIRS ${Boost_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib SGtests Identifier DetDescrConditions GeoModelUtilities GaudiKernel SCT_ConditionsData SCT_CablingLib EventInfo xAODEventInfo AthenaPoolUtilities InDetIdentifier InDetReadoutGeometry TrkGeometry SCT_ConditionsToolsLib ) + LINK_LIBRARIES ${Boost_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib SGtests Identifier DetDescrConditions GeoModelUtilities GaudiKernel SCT_ConditionsData SCT_CablingLib AthenaPoolUtilities InDetIdentifier InDetReadoutGeometry TrkGeometry SCT_ConditionsToolsLib ) atlas_add_test( TestCalibChipRead SCRIPT athena.py --threads=5 SCT_ConditionsAlgorithms/testCalibChipRead.py diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testCalibChipRead.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testCalibChipRead.py index eb9ce392b14a454d2170c478e3958811d56ca440..37428a1a1733e9cd5f76aa9a7068376eebf7361a 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testCalibChipRead.py +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testCalibChipRead.py @@ -66,14 +66,12 @@ IOVDbSvc.OutputLevel = DEBUG #-------------------------------------------------------------- # --- switch on InnerDetector from AthenaCommon.DetFlags import DetFlags -DetFlags.ID_setOn() +DetFlags.ID_setOff() DetFlags.Calo_setOff() DetFlags.Muon_setOff() DetFlags.Truth_setOff() DetFlags.LVL1_setOff() DetFlags.SCT_setOn() -DetFlags.pixel_setOff() -DetFlags.TRT_setOff() # ---- switch parts of ID off/on as follows #switch off tasks @@ -96,8 +94,9 @@ import AtlasGeoModel.GeoModelInit from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() -from xAODEventInfoCnv.xAODEventInfoCreator import xAODMaker__EventInfoCnvAlg -topSequence +=xAODMaker__EventInfoCnvAlg(OutputLevel=2) +if not hasattr(topSequence, "xAODMaker::EventInfoCnvAlg"): + from xAODEventInfoCnv.xAODEventInfoCreator import xAODMaker__EventInfoCnvAlg + topSequence +=xAODMaker__EventInfoCnvAlg(OutputLevel=2) from SCT_ConditionsTools.SCT_ReadCalibChipDataToolSetup import SCT_ReadCalibChipDataToolSetup sct_ReadCalibChipDataToolSetup = SCT_ReadCalibChipDataToolSetup() diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testCalibRead.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testCalibRead.py index 5ffcddbf5661f092f19968e875e4d12d0b7beb9f..bef49de68b9f5dd96e500fb531490079b8e8494c 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testCalibRead.py +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testCalibRead.py @@ -60,14 +60,12 @@ print globalflags #-------------------------------------------------------------- # --- switch on InnerDetector from AthenaCommon.DetFlags import DetFlags -DetFlags.ID_setOn() +DetFlags.ID_setOff() DetFlags.Calo_setOff() DetFlags.Muon_setOff() DetFlags.Truth_setOff() DetFlags.LVL1_setOff() DetFlags.SCT_setOn() -DetFlags.pixel_setOff() -DetFlags.TRT_setOff() # ---- switch parts of ID off/on as follows #switch off tasks diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testConfig.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testConfig.py index 68ce1da17f13deec9a05ab5240949e586f3cea0e..4dfaf5f00438b6539bcddc1b2a927b18d7fd7c2a 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testConfig.py +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testConfig.py @@ -36,13 +36,12 @@ print globalflags # --- switch on InnerDetector from AthenaCommon.DetFlags import DetFlags DetFlags.detdescr.SCT_setOn() -DetFlags.ID_setOn() +DetFlags.ID_setOff() DetFlags.Calo_setOff() DetFlags.Muon_setOff() DetFlags.Truth_setOff() DetFlags.LVL1_setOff() DetFlags.SCT_setOn() -DetFlags.TRT_setOff() # ---- switch parts of ID off/on as follows #switch off tasks diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testDCSConditions.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testDCSConditions.py index 2e1468d1bdee19a4889362a0e95a21eff4fd6749..bf8d35b437c201babe267944611dcffc35f0f84a 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testDCSConditions.py +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testDCSConditions.py @@ -47,13 +47,12 @@ print globalflags # --- switch on InnerDetector from AthenaCommon.DetFlags import DetFlags DetFlags.detdescr.SCT_setOn() -DetFlags.ID_setOn() +DetFlags.ID_setOff() DetFlags.Calo_setOff() DetFlags.Muon_setOff() DetFlags.Truth_setOff() DetFlags.LVL1_setOff() DetFlags.SCT_setOn() -DetFlags.TRT_setOff() # ---- switch parts of ID off/on as follows #switch off tasks diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testLinkMasking.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testLinkMasking.py index 78485036f0f22f5b586ef48287bac3e1eb05e34c..8734d51d2f52b44adc8ef94533d2828ef2c0eec5 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testLinkMasking.py +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testLinkMasking.py @@ -38,14 +38,12 @@ print globalflags # --- switch on InnerDetector from AthenaCommon.DetFlags import DetFlags DetFlags.detdescr.SCT_setOn() -DetFlags.ID_setOn() +DetFlags.ID_setOff() DetFlags.Calo_setOff() DetFlags.Muon_setOff() DetFlags.Truth_setOff() DetFlags.LVL1_setOff() -DetFlags.pixel_setOff() DetFlags.SCT_setOn() -DetFlags.TRT_setOff() # ---- switch parts of ID off/on as follows #switch off tasks diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testMajority.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testMajority.py index 51f603a6e997e464cc7adabf3485df8c88a27980..f763e9004102e60ac9f479dc766b7dff2fd83f76 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testMajority.py +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testMajority.py @@ -36,13 +36,12 @@ print globalflags # --- switch on InnerDetector from AthenaCommon.DetFlags import DetFlags DetFlags.detdescr.SCT_setOn() -DetFlags.ID_setOn() +DetFlags.ID_setOff() DetFlags.Calo_setOff() DetFlags.Muon_setOff() DetFlags.Truth_setOff() DetFlags.LVL1_setOff() DetFlags.SCT_setOn() -DetFlags.TRT_setOff() # ---- switch parts of ID off/on as follows #switch off tasks diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testModuleVeto.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testModuleVeto.py index c4562d4abd84c265e6da4059ff393a1b5452eebe..57643278eaca90180c2a695f21d1404f52b9b1e0 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testModuleVeto.py +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testModuleVeto.py @@ -35,13 +35,12 @@ print globalflags #-------------------------------------------------------------- # --- switch on InnerDetector from AthenaCommon.DetFlags import DetFlags -DetFlags.ID_setOn() +DetFlags.ID_setOff() DetFlags.Calo_setOff() DetFlags.Muon_setOff() DetFlags.Truth_setOff() DetFlags.LVL1_setOff() DetFlags.SCT_setOn() -DetFlags.TRT_setOff() # ---- switch parts of ID off/on as follows #switch off tasks diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testMonRead.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testMonRead.py index 8dc15da66ca694c45864f2cd3545de39bc75f66a..6522dba2f5da01128f347fb307c5d0a13083ac05 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testMonRead.py +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testMonRead.py @@ -38,13 +38,12 @@ condSeq+=xAODMaker__EventInfoCnvAlg(OutputLevel=2) #-------------------------------------------------------------- # --- switch on InnerDetector from AthenaCommon.DetFlags import DetFlags -DetFlags.ID_setOn() +DetFlags.ID_setOff() DetFlags.Calo_setOff() DetFlags.Muon_setOff() DetFlags.Truth_setOff() DetFlags.LVL1_setOff() DetFlags.SCT_setOn() -DetFlags.TRT_setOff() # ---- switch parts of ID off/on as follows #switch off tasks diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testParameters.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testParameters.py index 4dd83f0d9adb2f9193fa06847ead69139328c8ad..8008b7729df7b2f96c05b71fae3c0a5af1a467a7 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testParameters.py +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testParameters.py @@ -50,13 +50,12 @@ rec.projectName.set_Value_and_Lock("data12_8TeV") # --- switch on InnerDetector from AthenaCommon.DetFlags import DetFlags DetFlags.detdescr.SCT_setOn() -DetFlags.ID_setOn() +DetFlags.ID_setOff() DetFlags.Calo_setOff() DetFlags.Muon_setOff() DetFlags.Truth_setOff() DetFlags.LVL1_setOff() DetFlags.SCT_setOn() -DetFlags.TRT_setOff() # ---- switch parts of ID off/on as follows #switch off tasks @@ -113,9 +112,6 @@ conddb.addFolder("SCT","/SCT/DAQ/Configuration/MUR") from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() -from xAODEventInfoCnv.xAODEventInfoCreator import xAODMaker__EventInfoCnvAlg -topSequence += xAODMaker__EventInfoCnvAlg(OutputLevel=2) - from SCT_ConditionsTools.SCT_ConditionsParameterToolSetup import SCT_ConditionsParameterToolSetup sct_ConditionsParameterToolSetup = SCT_ConditionsParameterToolSetup() sct_ConditionsParameterToolSetup.setup() diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testReadout.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testReadout.py index 23b0ad23d1b09792c825e2d8c992e5f5039f81c5..b566531ed37f6c9f72d70c01c721b6f6bc744c77 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testReadout.py +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testReadout.py @@ -36,13 +36,12 @@ print globalflags # --- switch on InnerDetector from AthenaCommon.DetFlags import DetFlags DetFlags.detdescr.SCT_setOn() -DetFlags.ID_setOn() +DetFlags.ID_setOff() DetFlags.Calo_setOff() DetFlags.Muon_setOff() DetFlags.Truth_setOff() DetFlags.LVL1_setOff() DetFlags.SCT_setOn() -DetFlags.TRT_setOff() # ---- switch parts of ID off/on as follows #switch off tasks diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testRodVeto.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testRodVeto.py index 9d0e6087b9c5454aa9516c565e2f4839848e7b53..d25fefd24713caf5065c8b573763994ef9005b9a 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testRodVeto.py +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testRodVeto.py @@ -37,13 +37,12 @@ print globalflags #-------------------------------------------------------------- # --- switch on InnerDetector from AthenaCommon.DetFlags import DetFlags -DetFlags.ID_setOn() +DetFlags.ID_setOff() DetFlags.Calo_setOff() DetFlags.Muon_setOff() DetFlags.Truth_setOff() DetFlags.LVL1_setOff() DetFlags.SCT_setOn() -DetFlags.TRT_setOff() # ---- switch parts of ID off/on as follows #switch off tasks diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testSensors.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testSensors.py index 9110d7858913d4c335ddc420ee60e936c3c4aa73..701b6cbd0112b283be08bf6db0c50342a8ab3ac8 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testSensors.py +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testSensors.py @@ -51,13 +51,12 @@ conddb.dbdata="COMP200" #-------------------------------------------------------------- # --- switch on InnerDetector from AthenaCommon.DetFlags import DetFlags -DetFlags.ID_setOn() +DetFlags.ID_setOff() DetFlags.Calo_setOff() DetFlags.Muon_setOff() DetFlags.Truth_setOff() DetFlags.LVL1_setOff() DetFlags.SCT_setOn() -DetFlags.TRT_setOff() # ---- switch parts of ID off/on as follows #switch off tasks diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testSilicon.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testSilicon.py index 3df46cbb099a45e0b10a50042808d56534084189..6329af7359843be01ed3d6dd73bfefc447c4aa17 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testSilicon.py +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testSilicon.py @@ -38,13 +38,12 @@ print globalflags # --- switch on InnerDetector from AthenaCommon.DetFlags import DetFlags DetFlags.detdescr.SCT_setOn() -DetFlags.ID_setOn() +DetFlags.ID_setOff() DetFlags.Calo_setOff() DetFlags.Muon_setOff() DetFlags.Truth_setOff() DetFlags.LVL1_setOff() DetFlags.SCT_setOn() -DetFlags.TRT_setOff() # ---- switch parts of ID off/on as follows #switch off tasks diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testStripVeto.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testStripVeto.py index 203175cfedb6591929d20342755e4629bd308092..2bdd389fe025cc260b79d8fd6130ef1f3432ded4 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testStripVeto.py +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testStripVeto.py @@ -35,13 +35,12 @@ print globalflags #-------------------------------------------------------------- # --- switch on InnerDetector from AthenaCommon.DetFlags import DetFlags -DetFlags.ID_setOn() +DetFlags.ID_setOff() DetFlags.Calo_setOff() DetFlags.Muon_setOff() DetFlags.Truth_setOff() DetFlags.LVL1_setOff() DetFlags.SCT_setOn() -DetFlags.TRT_setOff() # ---- switch parts of ID off/on as follows #switch off tasks diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testSummary.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testSummary.py index 0d2d3d30625b9a16b9e4c016a81f13f8feacd67b..ff80dfc12e162a1b5a38f720b52e33fd4d0933b5 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testSummary.py +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testSummary.py @@ -26,13 +26,12 @@ print globalflags # --- switch on InnerDetector from AthenaCommon.DetFlags import DetFlags DetFlags.detdescr.SCT_setOn() -DetFlags.ID_setOn() +DetFlags.ID_setOff() DetFlags.Calo_setOff() DetFlags.Muon_setOff() DetFlags.Truth_setOff() DetFlags.LVL1_setOff() DetFlags.SCT_setOn() -DetFlags.TRT_setOff() # ---- switch parts of ID off/on as follows #switch off tasks diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testTdaqEnabled.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testTdaqEnabled.py index 18fd821e9f17778b7f57608e9e842d1ffeb75df0..455ad32eff48095863b3868eb309a0366447b9a8 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testTdaqEnabled.py +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testTdaqEnabled.py @@ -49,13 +49,12 @@ print 'globalTags.DatabaseInstance', globalflags.DatabaseInstance # --- switch on InnerDetector from AthenaCommon.DetFlags import DetFlags DetFlags.detdescr.SCT_setOn() -DetFlags.ID_setOn() +DetFlags.ID_setOff() DetFlags.Calo_setOff() DetFlags.Muon_setOff() DetFlags.Truth_setOff() DetFlags.LVL1_setOff() DetFlags.SCT_setOn() -DetFlags.TRT_setOff() # ---- switch parts of ID off/on as follows #switch off tasks diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_AlignCondAlg.cxx b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_AlignCondAlg.cxx index fd9581a0323caa30e4b7338a03124656028614e9..bd970519288d633e4b5177e28bc3efab78fe10ca 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_AlignCondAlg.cxx +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_AlignCondAlg.cxx @@ -10,7 +10,7 @@ #include <memory> SCT_AlignCondAlg::SCT_AlignCondAlg(const std::string& name, ISvcLocator* pSvcLocator) - : ::AthReentrantAlgorithm(name, pSvcLocator) + : ::AthAlgorithm(name, pSvcLocator) , m_writeKey{"SCTAlignmentStore", "SCTAlignmentStore"} , m_condSvc{"CondSvc", name} , m_detManager{nullptr} @@ -44,12 +44,12 @@ StatusCode SCT_AlignCondAlg::initialize() return StatusCode::SUCCESS; } -StatusCode SCT_AlignCondAlg::execute(const EventContext& ctx) const +StatusCode SCT_AlignCondAlg::execute() { ATH_MSG_DEBUG("execute " << name()); // ____________ Construct Write Cond Handle and check its validity ____________ - SG::WriteCondHandle<GeoAlignmentStore> writeHandle{m_writeKey, ctx}; + SG::WriteCondHandle<GeoAlignmentStore> writeHandle{m_writeKey}; // Do we have a valid Write Cond Handle for current time? if (writeHandle.isValid()) { @@ -72,7 +72,7 @@ StatusCode SCT_AlignCondAlg::execute(const EventContext& ctx) const if (not m_useDynamicAlignFolders.value()) { // Static // ____________ Get Read Cond Object ____________ - SG::ReadCondHandle<AlignableTransformContainer> readHandleStatic{m_readKeyStatic, ctx}; + SG::ReadCondHandle<AlignableTransformContainer> readHandleStatic{m_readKeyStatic}; const AlignableTransformContainer* readCdoStatic{*readHandleStatic}; if (readCdoStatic==nullptr) { ATH_MSG_FATAL("Null pointer to the read conditions object of " << m_readKeyStatic.key()); @@ -91,19 +91,19 @@ StatusCode SCT_AlignCondAlg::execute(const EventContext& ctx) const } } else { // Dynamic // ____________ Get Read Cond Object ____________ - SG::ReadCondHandle<CondAttrListCollection> readHandleDynamicL1{m_readKeyDynamicL1, ctx}; + SG::ReadCondHandle<CondAttrListCollection> readHandleDynamicL1{m_readKeyDynamicL1}; const CondAttrListCollection* readCdoDynamicL1{*readHandleDynamicL1}; if (readCdoDynamicL1==nullptr) { ATH_MSG_FATAL("Null pointer to the read conditions object of " << m_readKeyDynamicL1.key()); return StatusCode::FAILURE; } - SG::ReadCondHandle<CondAttrListCollection> readHandleDynamicL2{m_readKeyDynamicL2, ctx}; + SG::ReadCondHandle<CondAttrListCollection> readHandleDynamicL2{m_readKeyDynamicL2}; const CondAttrListCollection* readCdoDynamicL2{*readHandleDynamicL2}; if (readCdoDynamicL2==nullptr) { ATH_MSG_FATAL("Null pointer to the read conditions object of " << readHandleDynamicL2.key()); return StatusCode::FAILURE; } - SG::ReadCondHandle<AlignableTransformContainer> readHandleDynamicL3{m_readKeyDynamicL3, ctx}; + SG::ReadCondHandle<AlignableTransformContainer> readHandleDynamicL3{m_readKeyDynamicL3}; const AlignableTransformContainer* readCdoDynamicL3{*readHandleDynamicL3}; if (readCdoDynamicL3==nullptr) { ATH_MSG_FATAL("Null pointer to the read conditions object of " << readHandleDynamicL3.key()); diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_AlignCondAlg.h b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_AlignCondAlg.h index daab6ebb54b622910bd3cd3efad103bafd2e9d45..8db0a90640318a2a4d74c5b72800411d7b9b4325 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_AlignCondAlg.h +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_AlignCondAlg.h @@ -5,7 +5,7 @@ #ifndef SCT_CONDITIONSALGORITHMS_SCT_ALIGNCONDALG_H #define SCT_CONDITIONSALGORITHMS_SCT_ALIGNCONDALG_H -#include "AthenaBaseComps/AthReentrantAlgorithm.h" +#include "AthenaBaseComps/AthAlgorithm.h" #include "StoreGate/ReadCondHandleKey.h" #include "StoreGate/WriteCondHandleKey.h" @@ -19,14 +19,29 @@ namespace InDetDD { class SCT_DetectorManager; } -class SCT_AlignCondAlg : public AthReentrantAlgorithm +// SCT_AlignCondAlg cannot inherit AthReentrantAlgorithm. +// SCT_AlignCondAlg::execute uses the following methods. +// InDetDD::InDetDetectorManager::align +// InDetDD::InDetDetectorManager::processAlignmentContainer +// InDetDD::InDetDetectorManager::processKey +// InDetDD::SCT_DetectorManager::setAlignableTransformDelta +// InDetDD::SiDetectorElement::defModuleTransform +// InDetDD::SiDetectorElement::defTransform +// InDetDD::SiDetectorElement::defTransformCLHEP +// GeoVFullPhysVol::getDefAbsoluteTransform +// GeoVFullPhysVol::getDefAbsoluteTransform is used without argument. +// To be thread-safe, we need to pass non-const GeoVAlignmentStore pointer. +// However, we cannot give non-const pointer for SiDetectorElement +// in SCT_DetectorManager in the above chain. + +class SCT_AlignCondAlg : public AthAlgorithm { public: SCT_AlignCondAlg(const std::string& name, ISvcLocator* pSvcLocator); virtual ~SCT_AlignCondAlg() override = default; virtual StatusCode initialize() override; - virtual StatusCode execute(const EventContext& ctx) const override; + virtual StatusCode execute() override; virtual StatusCode finalize() override; private: diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConditionsParameterTestAlg.cxx b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConditionsParameterTestAlg.cxx index 5857013c413c5fe1b08dc84fd226dc10a8f66209..3c016c336543a097d5195972fbcda445be028499 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConditionsParameterTestAlg.cxx +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConditionsParameterTestAlg.cxx @@ -18,9 +18,6 @@ // Include Athena stuff #include "Identifier/IdentifierHash.h" -// Include Read Handle -#include "StoreGate/ReadHandle.h" - // Include STL stuff #include <string> #include <iostream> @@ -40,9 +37,6 @@ StatusCode SCT_ConditionsParameterTestAlg::initialize() { // ATH_CHECK(m_conditionsParameterTool.retrieve()); - // Read Handle - ATH_CHECK(m_currentEventKey.initialize()); - return StatusCode::SUCCESS; } // SCT_ConditionsParameterTestAlg::execute() @@ -55,16 +49,10 @@ StatusCode SCT_ConditionsParameterTestAlg::execute(const EventContext& ctx) cons StatusCode sc{StatusCode::SUCCESS, true}; // Get the current event - SG::ReadHandle<xAOD::EventInfo> currentEvent{m_currentEventKey, ctx}; - if (not currentEvent.isValid()) { - ATH_MSG_WARNING("Could not get event info"); - return sc; - } - // ATH_MSG_DEBUG("Current Run.Event,Time: " - << "[" << currentEvent->runNumber() - << "." << currentEvent->eventNumber() - << "," << currentEvent->timeStamp() + << "[" << ctx.eventID().run_number() + << "." << ctx.eventID().event_number() + << "," << ctx.eventID().time_stamp() << "]"); bool paramFilled{false}; diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConditionsParameterTestAlg.h b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConditionsParameterTestAlg.h index 3c3274d108bafde9c7405cf0a02a0474a83a1b77..147c93c65c0517c27d72f643553e32a9ecb321bc 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConditionsParameterTestAlg.h +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConditionsParameterTestAlg.h @@ -13,8 +13,6 @@ // Include Athena stuff #include "AthenaBaseComps/AthReentrantAlgorithm.h" #include "SCT_ConditionsTools/ISCT_ConditionsParameterTool.h" -#include "StoreGate/ReadHandleKey.h" -#include "xAODEventInfo/EventInfo.h" // Include Gaudi stuff #include "GaudiKernel/ToolHandle.h" @@ -33,7 +31,6 @@ class SCT_ConditionsParameterTestAlg : public AthReentrantAlgorithm { StatusCode finalize() override; //!< Gaudi finaliser private: - SG::ReadHandleKey<xAOD::EventInfo> m_currentEventKey{this, "EventInfoKey", "EventInfo", "Key of EventInfo"}; ToolHandle<ISCT_ConditionsParameterTool> m_conditionsParameterTool{this, "SCT_ConditionsParameterTool", "SCT_ConditionsParameterTool", "Tool to retrieve SCT conditions parameters"}; }; diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ModuleVetoCondAlg.cxx b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ModuleVetoCondAlg.cxx index 41879063b3fad1ba28a550e2fa4fb191228ca113..cd8b13726c5da7da95f7396f8ceee4eeb56f8143 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ModuleVetoCondAlg.cxx +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ModuleVetoCondAlg.cxx @@ -8,15 +8,17 @@ #include <memory> -template <class T> -static std::vector<T> -string2Vector(const std::string& s) { - std::vector<T> v; - std::istringstream inputStream{s}; - std::istream_iterator<T> vecRead{inputStream}; - std::istream_iterator<T> endOfString; //relies on default constructor to produce eof - std::copy(vecRead,endOfString, std::back_inserter(v)); // DOESN'T ALLOW NON-WHITESPACE DELIMITER ! - return v; +namespace { + template <class T> + std::vector<T> + string2Vector(const std::string& s) { + std::vector<T> v; + std::istringstream inputStream{s}; + std::istream_iterator<T> vecRead{inputStream}; + std::istream_iterator<T> endOfString; //relies on default constructor to produce eof + std::copy(vecRead,endOfString, std::back_inserter(v)); // DOESN'T ALLOW NON-WHITESPACE DELIMITER ! + return v; + } } SCT_ModuleVetoCondAlg::SCT_ModuleVetoCondAlg(const std::string& name, ISvcLocator* pSvcLocator) diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_MonitorConditionsTestAlg.cxx b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_MonitorConditionsTestAlg.cxx index 4b9b4a2c615eede4dc5780e5d4343d818a060935..a5784b9b5900a9aee4157bb3ef406e3da9668ec1 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_MonitorConditionsTestAlg.cxx +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_MonitorConditionsTestAlg.cxx @@ -16,7 +16,6 @@ //Athena includes #include "Identifier/IdentifierHash.h" #include "InDetIdentifier/SCT_ID.h" -#include "StoreGate/ReadHandle.h" SCT_MonitorConditionsTestAlg::SCT_MonitorConditionsTestAlg(const std::string& name, ISvcLocator* pSvcLocator) : AthReentrantAlgorithm(name, pSvcLocator), @@ -33,10 +32,7 @@ StatusCode SCT_MonitorConditionsTestAlg::initialize() ATH_MSG_DEBUG("Found SCT_ID Tool"); ATH_CHECK(m_pMonitorConditionsTool.retrieve()); - ATH_MSG_DEBUG("Found SCT_MoniotorConditinosSvc"); - - // Read Handle - ATH_CHECK(m_evtKey.initialize()); + ATH_MSG_DEBUG("Found SCT_MoniotorConditinosTool"); return StatusCode::SUCCESS; @@ -56,16 +52,10 @@ StatusCode SCT_MonitorConditionsTestAlg::execute(const EventContext& ctx) const ATH_MSG_DEBUG(" in execute()"); - SG::ReadHandle<xAOD::EventInfo> evt{m_evtKey, ctx}; - if (not evt.isValid()) { - ATH_MSG_FATAL("could not get event info "); - return StatusCode::FAILURE; - } else { - ATH_MSG_DEBUG("Event: [" << evt->runNumber() - << "," << evt->eventNumber() - << ":" << evt->timeStamp() - << "]"); - } + ATH_MSG_DEBUG("Event: [" << ctx.eventID().run_number() + << "," << ctx.eventID().event_number() + << ":" << ctx.eventID().time_stamp() + << "]"); std::string defectlist; std::string EfficiencyTable; diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_MonitorConditionsTestAlg.h b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_MonitorConditionsTestAlg.h index 95542ed9128dd493d05aea96223bd87fdfdbd3c7..c469867f17e7905c385bc9b5b139160aeede4062 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_MonitorConditionsTestAlg.h +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_MonitorConditionsTestAlg.h @@ -19,11 +19,6 @@ #include "SCT_ConditionsTools/ISCT_MonitorConditionsTool.h" -// Read Handle Key -#include "StoreGate/ReadHandleKey.h" -// Event Info -#include "xAODEventInfo/EventInfo.h" - //Gaudi #include "GaudiKernel/ToolHandle.h" @@ -43,10 +38,6 @@ class SCT_MonitorConditionsTestAlg : public AthReentrantAlgorithm { private: ToolHandle<ISCT_MonitorConditionsTool> m_pMonitorConditionsTool{this, "SCT_MonitorConditionsTool", "SCT_MonitorConditionsTool", "Tool to retrieve noisy strip information"}; const SCT_ID* m_sctId; - - // Parameters to control the db access - SG::ReadHandleKey<xAOD::EventInfo> m_evtKey{this, "EventInfoKey", "EventInfo"}; - }; // end of class #endif // SCT_MonitorConditionsTestAlg_H diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ReadCalibChipDataTestAlg.cxx b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ReadCalibChipDataTestAlg.cxx index 635b18b3789cd0d4b902252817ba2543bcf0e115..4e5657f7859d56453f6cbfe6a0dcb9e5fba3f577 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ReadCalibChipDataTestAlg.cxx +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ReadCalibChipDataTestAlg.cxx @@ -12,7 +12,6 @@ // Include Athena stuff #include "InDetIdentifier/SCT_ID.h" -#include "StoreGate/ReadHandle.h" // Include Gaudi stuff @@ -43,9 +42,6 @@ StatusCode SCT_ReadCalibChipDataTestAlg::initialize() { // Get the SCT_ReadCaliChipDataSvc ATH_CHECK(m_ReadCalibChipDataTool.retrieve()); - // Read Handle - ATH_CHECK(m_currentEventKey.initialize()); - return StatusCode::SUCCESS; } // SCT_ReadCalibChipDataTestAlg::initialize() @@ -96,16 +92,10 @@ StatusCode SCT_ReadCalibChipDataTestAlg::execute(const EventContext& ctx) const // Print where you are ATH_MSG_DEBUG("in execute()"); - // Get the current event - SG::ReadHandle<xAOD::EventInfo> currentEvent{m_currentEventKey, ctx}; - if (not currentEvent.isValid()) { - ATH_MSG_FATAL("Could not get event info"); - return StatusCode::FAILURE; - } ATH_MSG_DEBUG("Current Run.Event,Time: " - << "[" << currentEvent->runNumber() - << "." << currentEvent->eventNumber() - << "," << currentEvent->timeStamp() + << "[" << ctx.eventID().run_number() + << "." << ctx.eventID().event_number() + << "," << ctx.eventID().time_stamp() << "]"); //Test Chip Data ConditionsSummary diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ReadCalibChipDataTestAlg.h b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ReadCalibChipDataTestAlg.h index 18258542ffd91c98362c59c411ae1980807307fa..050f1c2501ffc3f25318196b0b85a394098bae30 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ReadCalibChipDataTestAlg.h +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ReadCalibChipDataTestAlg.h @@ -16,8 +16,6 @@ #include "Identifier/Identifier.h" #include "SCT_ConditionsTools/ISCT_ReadCalibChipDataTool.h" -#include "StoreGate/ReadHandleKey.h" -#include "xAODEventInfo/EventInfo.h" #include "GaudiKernel/ToolHandle.h" @@ -47,7 +45,6 @@ class SCT_ReadCalibChipDataTestAlg : public AthReentrantAlgorithm //----------Private Attributes----------// const SCT_ID* m_id_sct; //!< ID helper for SCT - SG::ReadHandleKey<xAOD::EventInfo> m_currentEventKey{this, "EventInfoKey", "EventInfo", "EventInfoKey"}; Identifier m_moduleId; //!< Module identifier Identifier m_waferId; //!< Wafer identifier Identifier m_stripId; //!< Strip identifier diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_TdaqEnabledCondAlg.cxx b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_TdaqEnabledCondAlg.cxx index 688fd86c97af68006949521fcccaea52a934d2c2..f1e516fd71ae96a6230b379502b90179264cb6eb 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_TdaqEnabledCondAlg.cxx +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_TdaqEnabledCondAlg.cxx @@ -4,9 +4,7 @@ #include "SCT_TdaqEnabledCondAlg.h" -#include "EventInfo/EventID.h" #include "Identifier/IdentifierHash.h" -#include "SCT_Cabling/SCT_OnlineId.h" #include "GaudiKernel/EventIDRange.h" @@ -15,6 +13,7 @@ SCT_TdaqEnabledCondAlg::SCT_TdaqEnabledCondAlg(const std::string& name, ISvcLocator* pSvcLocator) : ::AthReentrantAlgorithm(name, pSvcLocator) , m_condSvc{"CondSvc", name} + , m_onlineId{} { } @@ -38,9 +37,6 @@ StatusCode SCT_TdaqEnabledCondAlg::initialize() return StatusCode::FAILURE; } - // Read Handle - ATH_CHECK( m_eventInfoKey.initialize() ); - return StatusCode::SUCCESS; } @@ -98,7 +94,7 @@ StatusCode SCT_TdaqEnabledCondAlg::execute(const EventContext& ctx) const unsigned int rodNumber{parseChannelName(chanName)}; // range check on the rod channel number has been removed, since it refers both to existing channel names // which can be rods in slots 1-128 but also historical names which have since been removed - if (SCT_OnlineId::rodIdInRange(rodNumber)) { + if (m_onlineId.rodIdInRange(rodNumber)) { if ((not enabled.empty()) and (not writeCdo->setGoodRod(rodNumber))) { ATH_MSG_WARNING("Set insertion failed for rod "<<rodNumber); } @@ -158,15 +154,10 @@ StatusCode SCT_TdaqEnabledCondAlg::finalize() } bool SCT_TdaqEnabledCondAlg::unfilledRun(const EventContext& ctx) const { - SG::ReadHandle<EventInfo> event{m_eventInfoKey, ctx}; - if (event.isValid()) { - const unsigned int runNumber{event->event_ID()->run_number()}; - const bool noDataExpected{runNumber < s_earliestRunForFolder}; - if (noDataExpected) ATH_MSG_INFO("This run occurred before the /TDAQ/EnabledResources/ATLAS/SCT/Robins folder was filled in COOL; assuming the SCT is all ok."); - return noDataExpected; - } - ATH_MSG_WARNING("The event information could not be retrieved in this service"); - return false; //this means the service will attempt to access the folder and fill it, even though the run number is unknown + const unsigned int runNumber{ctx.eventID().run_number()}; + const bool noDataExpected{runNumber < s_earliestRunForFolder}; + if (noDataExpected) ATH_MSG_INFO("This run occurred before the /TDAQ/EnabledResources/ATLAS/SCT/Robins folder was filled in COOL; assuming the SCT is all ok."); + return noDataExpected; } //parse a rod channel name to a rod number, names are of the format 'ROL-SCT-BA-00-210000' diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_TdaqEnabledCondAlg.h b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_TdaqEnabledCondAlg.h index fe44a73c1c2b732d38252f23fa1ff558cca62890..d2836a3009967deb06e5261dbcae542f86e6a2e4 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_TdaqEnabledCondAlg.h +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_TdaqEnabledCondAlg.h @@ -8,11 +8,10 @@ #include "AthenaBaseComps/AthReentrantAlgorithm.h" #include "AthenaPoolUtilities/CondAttrListCollection.h" -#include "EventInfo/EventInfo.h" #include "SCT_Cabling/ISCT_CablingTool.h" +#include "SCT_Cabling/SCT_OnlineId.h" #include "SCT_ConditionsData/SCT_TdaqEnabledCondData.h" #include "StoreGate/ReadCondHandleKey.h" -#include "StoreGate/ReadHandleKey.h" #include "StoreGate/WriteCondHandleKey.h" #include "GaudiKernel/ICondSvc.h" @@ -34,10 +33,11 @@ class SCT_TdaqEnabledCondAlg : public AthReentrantAlgorithm SG::ReadCondHandleKey<CondAttrListCollection> m_readKey{this, "ReadKey", "/TDAQ/Resources/ATLAS/SCT/Robins", "Key of input (raw) conditions folder"}; SG::WriteCondHandleKey<SCT_TdaqEnabledCondData> m_writeKey{this, "WriteKey", "SCT_TdaqEnabledCondData", "Key of output (derived) conditions data"}; - SG::ReadHandleKey<EventInfo> m_eventInfoKey{this, "EventInfoKey", "ByteStreamEventInfo", "Key of non-xAOD EventInfo"}; ServiceHandle<ICondSvc> m_condSvc; ToolHandle<ISCT_CablingTool> m_cablingTool{this, "SCT_CablingTool", "SCT_CablingTool", "Tool to retrieve SCT Cabling"}; + SCT_OnlineId m_onlineId; + static const unsigned int s_NRODS; static const unsigned int s_modulesPerRod; static const unsigned int s_earliestRunForFolder; diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..2b55036972cc65d3498417a199304ab625f50aa6 --- /dev/null +++ b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +InnerDetector/InDetConditions/SCT_ConditionsData diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ReadoutData.h b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ReadoutData.h index daab20715936efeb8a06e1cb0a5af5a04f41cba3..efc44fbfba4c168109770c4a053e7710e35856da 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ReadoutData.h +++ b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ReadoutData.h @@ -128,7 +128,7 @@ class SCT_ReadoutData { std::vector<int> m_chipsOnLink0; //!< The chips read out on link 0 std::vector<int> m_chipsOnLink1; //! <The chips read out on link 1 - mutable Athena::MsgStreamMember* m_msg; + Athena::MsgStreamMember* m_msg; }; #endif // SCT_ConditionData_SCT_ReadoutData_h diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/CMakeLists.txt b/InnerDetector/InDetConditions/SCT_ConditionsTools/CMakeLists.txt index 7e8d49449cef56862d4a1406e5a965be21b150df..6f3c6525d757d1c3c5a57d2406b0b6de8bdf84cc 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsTools/CMakeLists.txt +++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/CMakeLists.txt @@ -15,13 +15,12 @@ atlas_depends_on_subdirs( PUBLIC PRIVATE Control/AthenaBaseComps Control/StoreGate - Event/EventInfo Event/xAOD/xAODEventInfo Database/RDBAccessSvc DetectorDescription/GeoModel/GeoModelInterfaces DetectorDescription/GeoModel/GeoModelUtilities InnerDetector/InDetConditions/InDetByteStreamErrors - InnerDetector/InDetConditions/SiPropertiesSvc + InnerDetector/InDetConditions/SiPropertiesTool InnerDetector/InDetDetDescr/InDetIdentifier InnerDetector/InDetDetDescr/InDetReadoutGeometry InnerDetector/InDetDetDescr/SCT_Cabling @@ -37,14 +36,14 @@ find_package( GMock ) atlas_add_component ( SCT_ConditionsTools src/components/*.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthenaKernel Identifier GeoModelUtilities GaudiKernel AthenaBaseComps StoreGateLib SGtests EventInfo xAODEventInfo SCT_ConditionsData InDetByteStreamErrors InDetIdentifier InDetReadoutGeometry SCT_CablingLib SiPropertiesSvcLib SCT_ConditionsToolsLib ) + LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthenaKernel Identifier GeoModelUtilities GaudiKernel AthenaBaseComps StoreGateLib SGtests xAODEventInfo SCT_ConditionsData InDetByteStreamErrors InDetIdentifier InDetReadoutGeometry SCT_CablingLib SiPropertiesToolLib SCT_ConditionsToolsLib ) atlas_add_library( SCT_ConditionsToolsLib src/*.cxx PUBLIC_HEADERS SCT_ConditionsTools INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthenaKernel Identifier GeoModelUtilities GaudiKernel AthenaBaseComps StoreGateLib SGtests EventInfo xAODEventInfo SCT_ConditionsData SiPropertiesSvcLib InDetByteStreamErrors InDetIdentifier InDetReadoutGeometry SCT_CablingLib ) + LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthenaKernel Identifier GeoModelUtilities GaudiKernel AthenaBaseComps StoreGateLib SGtests xAODEventInfo SCT_ConditionsData SiPropertiesToolLib InDetByteStreamErrors InDetIdentifier InDetReadoutGeometry SCT_CablingLib ) # Add unit tests atlas_add_test( SCT_RODVetoTool_test diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/SCT_ConditionsTools/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetConditions/SCT_ConditionsTools/SCT_ConditionsTools/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..f0507f811435edec219c05fa57f8d1e7d9b74f5b --- /dev/null +++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/SCT_ConditionsTools/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +InnerDetector/InDetConditions/SCT_ConditionsTools diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_TdaqEnabledToolSetup.py b/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_TdaqEnabledToolSetup.py index b690434d2248eadb4f0ffccbc89feafca0f83cdb..d8262e8e0372500d9300f10d493ab15ba9fa9ef9 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_TdaqEnabledToolSetup.py +++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_TdaqEnabledToolSetup.py @@ -12,7 +12,6 @@ class SCT_TdaqEnabledToolSetup: self.alg = None self.toolName = "InDetSCT_TdaqEnabledTool" self.tool = None - self.eventInfoKey = "ByteStreamEventInfo" def getFolder(self): return self.folder @@ -60,8 +59,7 @@ class SCT_TdaqEnabledToolSetup: if not hasattr(condSeq, self.algName): from SCT_ConditionsAlgorithms.SCT_ConditionsAlgorithmsConf import SCT_TdaqEnabledCondAlg condSeq += SCT_TdaqEnabledCondAlg(name = self.algName, - ReadKey = self.folder, - EventInfoKey = self.eventInfoKey) + ReadKey = self.folder) self.alg = getattr(condSeq, self.algName) def setTool(self): @@ -78,12 +76,6 @@ class SCT_TdaqEnabledToolSetup: def getToolName(self): return self.toolName - def setEventInfoKey(self, eventInfoKey): - self.eventInfoKey = eventInfoKey - - def getEventInfoKey(self): - return self.eventInfoKey - def setup(self): self.setFolders() self.setAlgs() diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ByteStreamErrorsTool.cxx b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ByteStreamErrorsTool.cxx index 2e7f2c4666463e62e49744de7f212ed69e5a0862..d154ba789948b0d5bf47a3dc99db49d0fff3e372 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ByteStreamErrorsTool.cxx +++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ByteStreamErrorsTool.cxx @@ -31,6 +31,7 @@ SCT_ByteStreamErrorsTool::SCT_ByteStreamErrorsTool(const std::string& type, cons /** Initialize */ StatusCode SCT_ByteStreamErrorsTool::initialize() { + std::lock_guard<std::recursive_mutex> lock{m_mutex}; StatusCode sc{StatusCode::SUCCESS}; for (int errorType{0}; errorType<SCT_ByteStreamErrors::NUM_ERROR_TYPES; errorType++) { @@ -270,12 +271,10 @@ SCT_ByteStreamErrorsTool::getChip(const Identifier& stripId, const EventContext& void SCT_ByteStreamErrorsTool::resetSets(const EventContext& ctx) const { - // Used in fillData and m_mutex is already locked. - + std::lock_guard<std::recursive_mutex> lock{m_mutex}; for (int errType{0}; errType<SCT_ByteStreamErrors::NUM_ERROR_TYPES; errType++) { m_bsErrors[errType][ctx.slot()].clear(); } - return; } @@ -288,13 +287,12 @@ SCT_ByteStreamErrorsTool::resetSets(const EventContext& ctx) const { const std::set<IdentifierHash>* SCT_ByteStreamErrorsTool::getErrorSet(int errorType, const EventContext& ctx) const { + std::lock_guard<std::recursive_mutex> lock{m_mutex}; if (errorType>=0 and errorType<SCT_ByteStreamErrors::NUM_ERROR_TYPES) { StatusCode sc{fillData(ctx)}; if (sc.isFailure()) { ATH_MSG_ERROR("fillData in getErrorSet fails"); } - - std::lock_guard<std::mutex> lock{m_mutex}; return &m_bsErrors[errorType][ctx.slot()]; } return nullptr; @@ -315,11 +313,10 @@ SCT_ByteStreamErrorsTool::getErrorSet(int errorType) const { StatusCode SCT_ByteStreamErrorsTool::fillData(const EventContext& ctx) const { + std::lock_guard<std::recursive_mutex> lock{m_mutex}; EventContext::ContextID_t slot{ctx.slot()}; EventContext::ContextEvt_t evt{ctx.evt()}; - std::lock_guard<std::mutex> lock{m_mutex}; - if (slot<m_cache.size() and m_cache[slot]==evt) { // Cache isvalid return StatusCode::SUCCESS; @@ -361,7 +358,7 @@ SCT_ByteStreamErrorsTool::fillData(const EventContext& ctx) const { * over it to populate the sets of errors owned by this Tool. */ ATH_MSG_DEBUG("size of error container is " << errCont->size()); - for (const auto* elt : *errCont) { + for (const std::pair<IdentifierHash, int>* elt : *errCont) { addError(elt->first, elt->second, ctx); Identifier wafer_id{m_sct_id->wafer_id(elt->first)}; Identifier module_id{m_sct_id->module_id(wafer_id)}; @@ -399,8 +396,7 @@ SCT_ByteStreamErrorsTool::fillData(const EventContext& ctx) const { void SCT_ByteStreamErrorsTool::addError(const IdentifierHash& id, int errorType, const EventContext& ctx) const { - // Used in fillData and m_mutex is already locked. - + std::lock_guard<std::recursive_mutex> lock{m_mutex}; if (errorType>=0 and errorType<SCT_ByteStreamErrors::NUM_ERROR_TYPES) { m_bsErrors[errorType][ctx.slot()].insert(id); } @@ -478,21 +474,19 @@ const InDetDD::SiDetectorElement* SCT_ByteStreamErrorsTool::getDetectorElement(c } const std::map<Identifier, unsigned int>& SCT_ByteStreamErrorsTool::getTempMaskedChips(const EventContext& ctx) const { + std::lock_guard<std::recursive_mutex> lock{m_mutex}; StatusCode sc{fillData(ctx)}; if (sc.isFailure()) { ATH_MSG_ERROR("fillData in getTempMaskedChips fails"); } - - std::lock_guard<std::mutex> lock{m_mutex}; return m_tempMaskedChips[ctx.slot()]; } const std::map<Identifier, unsigned int>& SCT_ByteStreamErrorsTool::getAbcdErrorChips(const EventContext& ctx) const { + std::lock_guard<std::recursive_mutex> lock{m_mutex}; StatusCode sc{fillData(ctx)}; if (sc.isFailure()) { ATH_MSG_ERROR("fillData in getAbcdErrorChips fails"); } - - std::lock_guard<std::mutex> lock{m_mutex}; return m_abcdErrorChips[ctx.slot()]; } diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ByteStreamErrorsTool.h b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ByteStreamErrorsTool.h index 011c7c4fde38feb96ced74e9fd6f514a855957e9..1f5f7d89e977b03d706d3edfa85c745f7ec8c8a7 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ByteStreamErrorsTool.h +++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ByteStreamErrorsTool.h @@ -30,6 +30,7 @@ #include "GaudiKernel/EventContext.h" ///STL includes +#include <atomic> #include <map> #include <mutex> #include <vector> @@ -90,17 +91,17 @@ private: BooleanProperty m_checkRODSimulatedData{this, "CheckRODSimulatedData", true, "Flag to check RODSimulatedData flag."}; - mutable std::vector<std::set<IdentifierHash> > m_bsErrors[SCT_ByteStreamErrors::NUM_ERROR_TYPES]; // Used by getErrorSet, addError, resetSets + mutable std::vector<std::set<IdentifierHash>> m_bsErrors[SCT_ByteStreamErrors::NUM_ERROR_TYPES] ATLAS_THREAD_SAFE; // Used by getErrorSet, addError, resetSets - mutable std::vector<std::map<Identifier, unsigned int> > m_tempMaskedChips; - mutable std::vector<std::map<Identifier, unsigned int> > m_abcdErrorChips; + mutable std::vector<std::map<Identifier, unsigned int>> m_tempMaskedChips ATLAS_THREAD_SAFE; + mutable std::vector<std::map<Identifier, unsigned int>> m_abcdErrorChips ATLAS_THREAD_SAFE; // Mutex to protect the contents. - mutable std::mutex m_mutex; + mutable std::recursive_mutex m_mutex; // Cache to store events for slots - mutable std::vector<EventContext::ContextEvt_t> m_cache; + mutable std::vector<EventContext::ContextEvt_t> m_cache ATLAS_THREAD_SAFE; - mutable unsigned int m_nRetrievalFailure; + mutable std::atomic_uint m_nRetrievalFailure; StatusCode fillData(const EventContext& ctx) const; diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ChargeTrappingTool.cxx b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ChargeTrappingTool.cxx index bfd2ed57f825f2031e6306fe0eb5410b446a751e..44540a324a9f253b1a93ddb7b5bbd3e476cbdd19 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ChargeTrappingTool.cxx +++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ChargeTrappingTool.cxx @@ -12,7 +12,7 @@ #include "Identifier/IdentifierHash.h" #include "InDetReadoutGeometry/SiDetectorElement.h" -#include "SiPropertiesSvc/SiliconProperties.h" +#include "SiPropertiesTool/SiliconProperties.h" #include "GaudiKernel/PhysicalConstants.h" #include "GaudiKernel/SystemOfUnits.h" @@ -168,7 +168,7 @@ SCT_ChargeTrappingCondData SCT_ChargeTrappingTool::calculate(const IdentifierHas siProperties.setConditions(temperature, electricField); // -- Calculate electron and holes drift mobility and velocity for these conditions (temperature, electricField) - // using parametrizations in SiliconProperties (SiPropertiesSvc). These will be used later for the trapping model. + // using parametrizations in SiliconProperties (SiPropertiesTool). These will be used later for the trapping model. // In the SCT we collect holes. double electronDriftMobility{0.}; double holeDriftMobility{0.}; diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_MonitorConditionsTool.cxx b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_MonitorConditionsTool.cxx index 0c5091838ca5f5cd9e04fe9b53dc06cf25e8bd4b..156444c0d5bbc90fc4c57c94a23cb2da8e4d1bbe 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_MonitorConditionsTool.cxx +++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_MonitorConditionsTool.cxx @@ -31,7 +31,7 @@ namespace { ///////////////////////////////////////////////////////////////////////////// -string SCT_MonitorConditionsTool::s_separator{string("-")}; +const string SCT_MonitorConditionsTool::s_separator{"-"}; SCT_MonitorConditionsTool::SCT_MonitorConditionsTool(const std::string& type, const std::string& name, const IInterface* parent): base_class(type, name, parent), diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_MonitorConditionsTool.h b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_MonitorConditionsTool.h index 6b2617809b7ab23f609968923172c1771cbfabf6..2378e0c5adbd6b882be7292d01f2ab348e5098f5 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_MonitorConditionsTool.h +++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_MonitorConditionsTool.h @@ -97,7 +97,7 @@ private: // small helper function unsigned int computeIstrip4moncond(const Identifier& elementId) const; - static std::string s_separator; + static const std::string s_separator; IntegerProperty m_nhits_noisychip{this, "Nnoisychip", 64}; IntegerProperty m_nhits_noisywafer{this, "Nnoisywafer", 384}; diff --git a/InnerDetector/InDetConditions/SiLorentzAngleSvc/python/SiLorentzAngleSvcConfigDb.py b/InnerDetector/InDetConditions/SiLorentzAngleSvc/python/SiLorentzAngleSvcConfigDb.py deleted file mode 100644 index 77499920a0588387ccc65c6ada9f38092ab4552c..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetConditions/SiLorentzAngleSvc/python/SiLorentzAngleSvcConfigDb.py +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration - -# https://twiki.cern.ch/twiki/bin/viewauth/AtlasComputing/ConfiguredFactory - -from AthenaCommon.CfgGetter import addTool - -addTool("SiLorentzAngleSvc.SiLorentzAngleSvcConfig.getSCTLorentzAngleTool", "SCTLorentzAngleTool") -addTool("SiLorentzAngleSvc.SiLorentzAngleSvcConfig.getPixelLorentzAngleTool", "PixelLorentzAngleTool") diff --git a/InnerDetector/InDetConditions/SiLorentzAngleSvc/CMakeLists.txt b/InnerDetector/InDetConditions/SiLorentzAngleTool/CMakeLists.txt similarity index 84% rename from InnerDetector/InDetConditions/SiLorentzAngleSvc/CMakeLists.txt rename to InnerDetector/InDetConditions/SiLorentzAngleTool/CMakeLists.txt index fde0a0873b1f523d1d21c368fbbdcf07a87ae236..86125e6f55e0f9b5d90085a3cc64e8f2bd0baf0c 100644 --- a/InnerDetector/InDetConditions/SiLorentzAngleSvc/CMakeLists.txt +++ b/InnerDetector/InDetConditions/SiLorentzAngleTool/CMakeLists.txt @@ -1,9 +1,9 @@ ################################################################################ -# Package: SiLorentzAngleSvc +# Package: SiLorentzAngleTool ################################################################################ # Declare the package name: -atlas_subdir( SiLorentzAngleSvc ) +atlas_subdir( SiLorentzAngleTool ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC @@ -13,7 +13,7 @@ atlas_depends_on_subdirs( PUBLIC DetectorDescription/GeoPrimitives GaudiKernel InnerDetector/InDetConditions/InDetCondTools - InnerDetector/InDetConditions/SiPropertiesSvc + InnerDetector/InDetConditions/SiPropertiesTool InnerDetector/InDetConditions/PixelConditionsData InnerDetector/InDetConditions/PixelConditionsTools InnerDetector/InDetConditions/SCT_ConditionsData @@ -29,19 +29,19 @@ atlas_depends_on_subdirs( PUBLIC find_package( Eigen ) # Component(s) in the package: -atlas_add_component( SiLorentzAngleSvc +atlas_add_component( SiLorentzAngleTool src/*.cxx src/components/*.cxx INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS} - LINK_LIBRARIES ${EIGEN_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib SGtests GeoPrimitives GaudiKernel SiPropertiesSvcLib MagFieldInterfaces AthenaPoolUtilities Identifier InDetIdentifier InDetReadoutGeometry ) + LINK_LIBRARIES ${EIGEN_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib SGtests GeoPrimitives GaudiKernel SiPropertiesToolLib MagFieldInterfaces AthenaPoolUtilities Identifier InDetIdentifier InDetReadoutGeometry ) # Run tests: atlas_add_test( TestSCTLorentzAngle - SCRIPT athena.py --threads=5 SiLorentzAngleSvc/testSCTLorentzAngle.py + SCRIPT athena.py --threads=5 SiLorentzAngleTool/testSCTLorentzAngle.py PROPERTIES TIMEOUT 300 ENVIRONMENT THREADS=5 ) # Install files from the package: -atlas_install_headers( SiLorentzAngleSvc ) +atlas_install_headers( SiLorentzAngleTool ) atlas_install_python_modules( python/*.py ) atlas_install_joboptions( share/*.py ) diff --git a/InnerDetector/InDetConditions/SiLorentzAngleTool/SiLorentzAngleTool/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetConditions/SiLorentzAngleTool/SiLorentzAngleTool/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..372bf00d2df19e4c2caebf243ebcc38310857d48 --- /dev/null +++ b/InnerDetector/InDetConditions/SiLorentzAngleTool/SiLorentzAngleTool/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +InnerDetector/InDetConditions/SiLorentzAngleTool diff --git a/InnerDetector/InDetConditions/SiLorentzAngleSvc/SiLorentzAngleSvc/SiLorentzAngleCondData.h b/InnerDetector/InDetConditions/SiLorentzAngleTool/SiLorentzAngleTool/SiLorentzAngleCondData.h similarity index 100% rename from InnerDetector/InDetConditions/SiLorentzAngleSvc/SiLorentzAngleSvc/SiLorentzAngleCondData.h rename to InnerDetector/InDetConditions/SiLorentzAngleTool/SiLorentzAngleTool/SiLorentzAngleCondData.h diff --git a/InnerDetector/InDetConditions/SiLorentzAngleSvc/doc/packagedoc.h b/InnerDetector/InDetConditions/SiLorentzAngleTool/doc/packagedoc.h similarity index 79% rename from InnerDetector/InDetConditions/SiLorentzAngleSvc/doc/packagedoc.h rename to InnerDetector/InDetConditions/SiLorentzAngleTool/doc/packagedoc.h index c83b513489040770ab492c779f9538bd06b398dc..6b1909528d45d1c580153a4916ebb8f4d02d1ae3 100644 --- a/InnerDetector/InDetConditions/SiLorentzAngleSvc/doc/packagedoc.h +++ b/InnerDetector/InDetConditions/SiLorentzAngleTool/doc/packagedoc.h @@ -4,29 +4,29 @@ /** -@page SiLorentzAngleSvc_page SiLorentzAngleSvc Package +@page SiLorentzAngleTool_page SiLorentzAngleTool Package @authors Grant Gorfine -@section SiLorentzAngleSvc_SiLorentzAngleSvcIntro Introduction +@section SiLorentzAngleTool_SiLorentzAngleToolIntro Introduction Service for providing Lorentz angle (and the corresponding shift of the measurement) for each detector element. -@section SiLorentzAngleSvc_SiLorentzAngleSvcUsage Usage Notes +@section SiLorentzAngleTool_SiLorentzAngleToolUsage Usage Notes A python module has been provided for easy setup. To load simply include the following in your job options. @verbatim - from SiLorentzAngleSvc.LorentzAngleSvcSetup import lorentzAngleSvc + from SiLorentzAngleTool.LorentzAngleSvcSetup import lorentzAngleSvc @endverbatim This will setup both pixel and SCT. If you only want to setup them up separately you can do @verbatim - from SiLorentzAngleSvc.PixelLorentzAngleSvcSetup import pixelLorentzAngleSvcSetup - from SiLorentzAngleSvc.SCTLorentzAngleSvcSetup import sctLorentzAngleSvcSetup + from SiLorentzAngleTool.PixelLorentzAngleSvcSetup import pixelLorentzAngleSvcSetup + from SiLorentzAngleTool.SCTLorentzAngleSvcSetup import sctLorentzAngleSvcSetup @endverbatim @@ -91,7 +91,7 @@ or Alternatively, you can also access the services by: @verbatim - from SiLorentzAngleSvc.LorentzAngleSvcSetup import PixelLorentzAngleSvc,SCTLorentzAngleSvc + from SiLorentzAngleTool.LorentzAngleSvcSetup import PixelLorentzAngleSvc,SCTLorentzAngleSvc PixelLorentzAngleSvc.OutputLevel = VERBOSE SCTLorentzAngleSvc.OutputLevel = VERBOSE @endverbatim @@ -99,10 +99,10 @@ Alternatively, you can also access the services by: or @verbatim - from SiLorentzAngleSvc.PixelLorentzAngleSvcSetup import PixelLorentzAngleSvc + from SiLorentzAngleTool.PixelLorentzAngleSvcSetup import PixelLorentzAngleSvc PixelLorentzAngleSvc.OutputLevel = VERBOSE - from SiLorentzAngleSvc.SCTLorentzAngleSvcSetup import SCTLorentzAngleSvc + from SiLorentzAngleTool.SCTLorentzAngleSvcSetup import SCTLorentzAngleSvc SCTLorentzAngleSvc.OutputLevel = VERBOSE @endverbatim diff --git a/InnerDetector/InDetConditions/SiLorentzAngleSvc/python/PixelLorentzAngleToolSetup.py b/InnerDetector/InDetConditions/SiLorentzAngleTool/python/PixelLorentzAngleToolSetup.py similarity index 90% rename from InnerDetector/InDetConditions/SiLorentzAngleSvc/python/PixelLorentzAngleToolSetup.py rename to InnerDetector/InDetConditions/SiLorentzAngleTool/python/PixelLorentzAngleToolSetup.py index a025892b33974845177c33ec83f3473f66c03cd8..f9f0e2b6d0e364cae01f3a3d23ce2c4d3e074d01 100644 --- a/InnerDetector/InDetConditions/SiLorentzAngleSvc/python/PixelLorentzAngleToolSetup.py +++ b/InnerDetector/InDetConditions/SiLorentzAngleTool/python/PixelLorentzAngleToolSetup.py @@ -32,18 +32,18 @@ class PixelLorentzAngleToolSetup: condSeq += PixelDCSCondTempAlg(name="PixelDCSCondTempAlg", ReadKey=tempFolder, UseConditions=True) if not hasattr(condSeq, "PixelSiPropertiesCondAlg"): - from SiPropertiesSvc.SiPropertiesSvcConf import PixelSiPropertiesCondAlg + from SiPropertiesTool.SiPropertiesToolConf import PixelSiPropertiesCondAlg condSeq += PixelSiPropertiesCondAlg(name="PixelSiPropertiesCondAlg") from AthenaCommon.AppMgr import ToolSvc if not hasattr(ToolSvc, "PixelSiPropertiesTool"): - from SiPropertiesSvc.SiPropertiesSvcConf import SiPropertiesTool + from SiPropertiesTool.SiPropertiesToolConf import SiPropertiesTool ToolSvc += SiPropertiesTool(name = "PixelSiPropertiesTool", DetectorName = "Pixel", ReadKey = "PixelSiliconPropertiesVector") if not hasattr(condSeq, "PixelSiLorentzAngleCondAlg"): - from SiLorentzAngleSvc.SiLorentzAngleSvcConf import PixelSiLorentzAngleCondAlg + from SiLorentzAngleTool.SiLorentzAngleToolConf import PixelSiLorentzAngleCondAlg condSeq += PixelSiLorentzAngleCondAlg(name = "PixelSiLorentzAngleCondAlg", SiPropertiesTool = ToolSvc.PixelSiPropertiesTool, UseMagFieldSvc = True, @@ -51,7 +51,7 @@ class PixelLorentzAngleToolSetup: pixelSiLorentzAngleCondAlg = condSeq.PixelSiLorentzAngleCondAlg if not hasattr(ToolSvc, "PixelLorentzAngleTool"): - from SiLorentzAngleSvc.SiLorentzAngleSvcConf import SiLorentzAngleTool + from SiLorentzAngleTool.SiLorentzAngleToolConf import SiLorentzAngleTool ToolSvc += SiLorentzAngleTool(name="PixelLorentzAngleTool", DetectorName="Pixel", SiLorentzAngleCondData="PixelSiLorentzAngleCondData") pixelLorentzAngleTool = ToolSvc.PixelLorentzAngleTool # Pass the silicon conditions tool to the Lorentz angle tool diff --git a/InnerDetector/InDetConditions/SiLorentzAngleSvc/python/SCTLorentzAngleToolSetup.py b/InnerDetector/InDetConditions/SiLorentzAngleTool/python/SCTLorentzAngleToolSetup.py similarity index 97% rename from InnerDetector/InDetConditions/SiLorentzAngleSvc/python/SCTLorentzAngleToolSetup.py rename to InnerDetector/InDetConditions/SiLorentzAngleTool/python/SCTLorentzAngleToolSetup.py index e259c39cc974b37ead81d8b1902edc15364f7a8b..270b01b6f0a442a5760f828f8348efc830fb5b16 100644 --- a/InnerDetector/InDetConditions/SiLorentzAngleSvc/python/SCTLorentzAngleToolSetup.py +++ b/InnerDetector/InDetConditions/SiLorentzAngleTool/python/SCTLorentzAngleToolSetup.py @@ -45,7 +45,7 @@ class SCTLorentzAngleToolSetup: from AthenaCommon.AlgSequence import AthSequencer condSeq = AthSequencer("AthCondSeq") if not hasattr(condSeq, "SCTSiLorentzAngleCondAlg"): - from SiLorentzAngleSvc.SiLorentzAngleSvcConf import SCTSiLorentzAngleCondAlg + from SiLorentzAngleTool.SiLorentzAngleToolConf import SCTSiLorentzAngleCondAlg from AthenaCommon.AthenaCommonFlags import athenaCommonFlags condSeq += SCTSiLorentzAngleCondAlg(name = "SCTSiLorentzAngleCondAlg", SiConditionsTool = sctSiliconConditionsTool, diff --git a/InnerDetector/InDetConditions/SiLorentzAngleSvc/python/SiLorentzAngleSvcConfig.py b/InnerDetector/InDetConditions/SiLorentzAngleTool/python/SiLorentzAngleToolConfig.py similarity index 81% rename from InnerDetector/InDetConditions/SiLorentzAngleSvc/python/SiLorentzAngleSvcConfig.py rename to InnerDetector/InDetConditions/SiLorentzAngleTool/python/SiLorentzAngleToolConfig.py index 305fe9fe0e1ecc69d09d98912dd7e3beae5ebdb4..00c6e6103ce87efce9ee6bdf4ead921094a9c72b 100644 --- a/InnerDetector/InDetConditions/SiLorentzAngleSvc/python/SiLorentzAngleSvcConfig.py +++ b/InnerDetector/InDetConditions/SiLorentzAngleTool/python/SiLorentzAngleToolConfig.py @@ -7,11 +7,11 @@ from AthenaCommon import CfgMgr def getSCTLorentzAngleTool(name="SCTLorentzAngleTool", **kwargs): kwargs.setdefault("DetectorName", "SCT") kwargs.setdefault("SiLorentzAngleCondData", "SCTSiLorentzAngleCondData") - from SiLorentzAngleSvc.SiLorentzAngleSvcConf import SiLorentzAngleTool + from SiLorentzAngleTool.SiLorentzAngleToolConf import SiLorentzAngleTool return CfgMgr.SiLorentzAngleTool(name, **kwargs) def getPixelLorentzAngleTool(name="PixelLorentzAngleTool", **kwargs): kwargs.setdefault("DetectorName", "Pixel") kwargs.setdefault("SiLorentzAngleCondData","PixelSiLorentzAngleCondData") - from SiLorentzAngleSvc.SiLorentzAngleSvcConf import SiLorentzAngleTool + from SiLorentzAngleTool.SiLorentzAngleToolConf import SiLorentzAngleTool return CfgMgr.SiLorentzAngleTool(name, **kwargs) diff --git a/InnerDetector/InDetConditions/SiLorentzAngleTool/python/SiLorentzAngleToolConfigDb.py b/InnerDetector/InDetConditions/SiLorentzAngleTool/python/SiLorentzAngleToolConfigDb.py new file mode 100644 index 0000000000000000000000000000000000000000..2176f55ea05d6bcd6d7e6a94877d7f175ca63ad7 --- /dev/null +++ b/InnerDetector/InDetConditions/SiLorentzAngleTool/python/SiLorentzAngleToolConfigDb.py @@ -0,0 +1,8 @@ +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + +# https://twiki.cern.ch/twiki/bin/viewauth/AtlasComputing/ConfiguredFactory + +from AthenaCommon.CfgGetter import addTool + +addTool("SiLorentzAngleTool.SiLorentzAngleToolConfig.getSCTLorentzAngleTool", "SCTLorentzAngleTool") +addTool("SiLorentzAngleTool.SiLorentzAngleToolConfig.getPixelLorentzAngleTool", "PixelLorentzAngleTool") diff --git a/InnerDetector/InDetConditions/SiLorentzAngleSvc/python/__init__.py b/InnerDetector/InDetConditions/SiLorentzAngleTool/python/__init__.py similarity index 100% rename from InnerDetector/InDetConditions/SiLorentzAngleSvc/python/__init__.py rename to InnerDetector/InDetConditions/SiLorentzAngleTool/python/__init__.py diff --git a/InnerDetector/InDetConditions/SiLorentzAngleSvc/share/testSCTLorentzAngle.py b/InnerDetector/InDetConditions/SiLorentzAngleTool/share/testSCTLorentzAngle.py similarity index 94% rename from InnerDetector/InDetConditions/SiLorentzAngleSvc/share/testSCTLorentzAngle.py rename to InnerDetector/InDetConditions/SiLorentzAngleTool/share/testSCTLorentzAngle.py index 2824eb152213f95815b99041e06e0111d039551f..0da2a95e94f9441854b464039d9b172ba4e4bb16 100644 --- a/InnerDetector/InDetConditions/SiLorentzAngleSvc/share/testSCTLorentzAngle.py +++ b/InnerDetector/InDetConditions/SiLorentzAngleTool/share/testSCTLorentzAngle.py @@ -69,10 +69,10 @@ from IOVDbSvc.CondDB import conddb IOVDbSvc.GlobalTag="OFLCOND-MC16-SDR-18" IOVDbSvc.OutputLevel = 3 -from SiLorentzAngleSvc.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup +from SiLorentzAngleTool.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup sctLorentzAngleToolSetup = SCTLorentzAngleToolSetup() -from SiLorentzAngleSvc.SiLorentzAngleSvcConf import SCTSiLorentzAngleTestAlg +from SiLorentzAngleTool.SiLorentzAngleToolConf import SCTSiLorentzAngleTestAlg job += SCTSiLorentzAngleTestAlg(SCTLorentzAngleTool=sctLorentzAngleToolSetup.SCTLorentzAngleTool) # Prepare EventSelector diff --git a/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/PixelSiLorentzAngleCondAlg.cxx b/InnerDetector/InDetConditions/SiLorentzAngleTool/src/PixelSiLorentzAngleCondAlg.cxx similarity index 99% rename from InnerDetector/InDetConditions/SiLorentzAngleSvc/src/PixelSiLorentzAngleCondAlg.cxx rename to InnerDetector/InDetConditions/SiLorentzAngleTool/src/PixelSiLorentzAngleCondAlg.cxx index 8743c0c9f830ae371f44454590e6b04f4b8a6060..8c19f8eb2667117e3cc8a667fe485e3463f0d3a7 100644 --- a/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/PixelSiLorentzAngleCondAlg.cxx +++ b/InnerDetector/InDetConditions/SiLorentzAngleTool/src/PixelSiLorentzAngleCondAlg.cxx @@ -11,7 +11,7 @@ #include "InDetReadoutGeometry/PixelDetectorManager.h" #include "InDetReadoutGeometry/SiDetectorElement.h" #include "InDetReadoutGeometry/PixelModuleDesign.h" -#include "SiPropertiesSvc/SiliconProperties.h" +#include "SiPropertiesTool/SiliconProperties.h" PixelSiLorentzAngleCondAlg::PixelSiLorentzAngleCondAlg(const std::string& name, ISvcLocator* pSvcLocator): ::AthAlgorithm(name, pSvcLocator), diff --git a/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/PixelSiLorentzAngleCondAlg.h b/InnerDetector/InDetConditions/SiLorentzAngleTool/src/PixelSiLorentzAngleCondAlg.h similarity index 95% rename from InnerDetector/InDetConditions/SiLorentzAngleSvc/src/PixelSiLorentzAngleCondAlg.h rename to InnerDetector/InDetConditions/SiLorentzAngleTool/src/PixelSiLorentzAngleCondAlg.h index 79c71168e7e7ce25ec867b5ef6bb99e281ffc26c..6cc0db2b2612a8040618eaf445164c7a7af3e5bb 100644 --- a/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/PixelSiLorentzAngleCondAlg.h +++ b/InnerDetector/InDetConditions/SiLorentzAngleTool/src/PixelSiLorentzAngleCondAlg.h @@ -12,9 +12,9 @@ #include "AthenaPoolUtilities/CondAttrListCollection.h" #include "PixelConditionsData/PixelModuleData.h" #include "GaudiKernel/ICondSvc.h" -#include "SiPropertiesSvc/ISiPropertiesTool.h" +#include "SiPropertiesTool/ISiPropertiesTool.h" -#include "SiLorentzAngleSvc/SiLorentzAngleCondData.h" +#include "SiLorentzAngleTool/SiLorentzAngleCondData.h" #include "InDetIdentifier/PixelID.h" #include "InDetReadoutGeometry/PixelDetectorManager.h" diff --git a/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SCTSiLorentzAngleCondAlg.cxx b/InnerDetector/InDetConditions/SiLorentzAngleTool/src/SCTSiLorentzAngleCondAlg.cxx similarity index 99% rename from InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SCTSiLorentzAngleCondAlg.cxx rename to InnerDetector/InDetConditions/SiLorentzAngleTool/src/SCTSiLorentzAngleCondAlg.cxx index 4a8da1451e577c304fce045663a16ad0bd767108..89ddac68c52c4e58f3ee069fe0c85096e18f221f 100644 --- a/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SCTSiLorentzAngleCondAlg.cxx +++ b/InnerDetector/InDetConditions/SiLorentzAngleTool/src/SCTSiLorentzAngleCondAlg.cxx @@ -14,7 +14,7 @@ #include "InDetIdentifier/SCT_ID.h" #include "InDetReadoutGeometry/SiDetectorElement.h" #include "MagFieldInterfaces/IMagFieldSvc.h" -#include "SiPropertiesSvc/SiliconProperties.h" +#include "SiPropertiesTool/SiliconProperties.h" // Gaudi include #include "GaudiKernel/PhysicalConstants.h" diff --git a/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SCTSiLorentzAngleCondAlg.h b/InnerDetector/InDetConditions/SiLorentzAngleTool/src/SCTSiLorentzAngleCondAlg.h similarity index 98% rename from InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SCTSiLorentzAngleCondAlg.h rename to InnerDetector/InDetConditions/SiLorentzAngleTool/src/SCTSiLorentzAngleCondAlg.h index 189038555b487882f19679ff28c2926d562d3d17..f8819e3411897cf9b99e0671cf92d99077f15a2b 100644 --- a/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SCTSiLorentzAngleCondAlg.h +++ b/InnerDetector/InDetConditions/SiLorentzAngleTool/src/SCTSiLorentzAngleCondAlg.h @@ -17,7 +17,7 @@ #include "InDetConditionsSummaryService/ISiliconConditionsTool.h" #include "InDetReadoutGeometry/SiDetectorElementCollection.h" #include "SCT_ConditionsData/SCT_DCSFloatCondData.h" -#include "SiLorentzAngleSvc/SiLorentzAngleCondData.h" +#include "SiLorentzAngleTool/SiLorentzAngleCondData.h" #include "StoreGate/ReadCondHandleKey.h" #include "StoreGate/WriteCondHandleKey.h" diff --git a/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SCTSiLorentzAngleTestAlg.cxx b/InnerDetector/InDetConditions/SiLorentzAngleTool/src/SCTSiLorentzAngleTestAlg.cxx similarity index 100% rename from InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SCTSiLorentzAngleTestAlg.cxx rename to InnerDetector/InDetConditions/SiLorentzAngleTool/src/SCTSiLorentzAngleTestAlg.cxx diff --git a/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SCTSiLorentzAngleTestAlg.h b/InnerDetector/InDetConditions/SiLorentzAngleTool/src/SCTSiLorentzAngleTestAlg.h similarity index 100% rename from InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SCTSiLorentzAngleTestAlg.h rename to InnerDetector/InDetConditions/SiLorentzAngleTool/src/SCTSiLorentzAngleTestAlg.h diff --git a/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SiLorentzAngleCondData.cxx b/InnerDetector/InDetConditions/SiLorentzAngleTool/src/SiLorentzAngleCondData.cxx similarity index 98% rename from InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SiLorentzAngleCondData.cxx rename to InnerDetector/InDetConditions/SiLorentzAngleTool/src/SiLorentzAngleCondData.cxx index ffbcb39219201de8050c13ae5102366fc7aaf280..5ecd26e9480204a0de60e835ed1b02f06c6b4779 100644 --- a/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SiLorentzAngleCondData.cxx +++ b/InnerDetector/InDetConditions/SiLorentzAngleTool/src/SiLorentzAngleCondData.cxx @@ -7,7 +7,7 @@ * @author Susumu.Oda@cern.ch **/ -#include "SiLorentzAngleSvc/SiLorentzAngleCondData.h" +#include "SiLorentzAngleTool/SiLorentzAngleCondData.h" #include <limits> diff --git a/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SiLorentzAngleTool.cxx b/InnerDetector/InDetConditions/SiLorentzAngleTool/src/SiLorentzAngleTool.cxx similarity index 99% rename from InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SiLorentzAngleTool.cxx rename to InnerDetector/InDetConditions/SiLorentzAngleTool/src/SiLorentzAngleTool.cxx index e2ddaf45cca9acac70041c5688aba9fb8168181c..b118ed3e354545f0aa4c2a4c9c2751705fc6a159 100644 --- a/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SiLorentzAngleTool.cxx +++ b/InnerDetector/InDetConditions/SiLorentzAngleTool/src/SiLorentzAngleTool.cxx @@ -12,7 +12,7 @@ #include "AthenaPoolUtilities/AthenaAttributeList.h" #include "Identifier/IdentifierHash.h" #include "InDetReadoutGeometry/SiDetectorElement.h" -#include "SiPropertiesSvc/SiliconProperties.h" +#include "SiPropertiesTool/SiliconProperties.h" SiLorentzAngleTool::SiLorentzAngleTool(const std::string& type, const std::string& name, const IInterface* parent): base_class(type, name, parent), diff --git a/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SiLorentzAngleTool.h b/InnerDetector/InDetConditions/SiLorentzAngleTool/src/SiLorentzAngleTool.h similarity index 98% rename from InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SiLorentzAngleTool.h rename to InnerDetector/InDetConditions/SiLorentzAngleTool/src/SiLorentzAngleTool.h index 37a02d769139f2022087f005a1828a89a13ea67f..80a054455c2816ff25696e88d1ae8557392fd6b0 100644 --- a/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SiLorentzAngleTool.h +++ b/InnerDetector/InDetConditions/SiLorentzAngleTool/src/SiLorentzAngleTool.h @@ -15,7 +15,7 @@ #include "GeoPrimitives/GeoPrimitives.h" #include "InDetReadoutGeometry/SiDetectorElementCollection.h" #include "MagFieldInterfaces/IMagFieldSvc.h" -#include "SiLorentzAngleSvc/SiLorentzAngleCondData.h" +#include "SiLorentzAngleTool/SiLorentzAngleCondData.h" #include "StoreGate/ReadCondHandleKey.h" //Gaudi Includes diff --git a/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/components/SiLorentzAngleSvc_entries.cxx b/InnerDetector/InDetConditions/SiLorentzAngleTool/src/components/SiLorentzAngleTool_entries.cxx similarity index 100% rename from InnerDetector/InDetConditions/SiLorentzAngleSvc/src/components/SiLorentzAngleSvc_entries.cxx rename to InnerDetector/InDetConditions/SiLorentzAngleTool/src/components/SiLorentzAngleTool_entries.cxx diff --git a/InnerDetector/InDetConditions/SiPropertiesSvc/CMakeLists.txt b/InnerDetector/InDetConditions/SiPropertiesTool/CMakeLists.txt similarity index 86% rename from InnerDetector/InDetConditions/SiPropertiesSvc/CMakeLists.txt rename to InnerDetector/InDetConditions/SiPropertiesTool/CMakeLists.txt index ab70b99627d94fd481b16a3160f5576a5c46d9b1..c91b4aef25d5bbafe24335973ae690ba4196a041 100644 --- a/InnerDetector/InDetConditions/SiPropertiesSvc/CMakeLists.txt +++ b/InnerDetector/InDetConditions/SiPropertiesTool/CMakeLists.txt @@ -1,9 +1,9 @@ ################################################################################ -# Package: SiPropertiesSvc +# Package: SiPropertiesTool ################################################################################ # Declare the package name: -atlas_subdir( SiPropertiesSvc ) +atlas_subdir( SiPropertiesTool ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC @@ -24,22 +24,22 @@ atlas_depends_on_subdirs( PUBLIC find_package( CLHEP ) # Component(s) in the package: -atlas_add_library( SiPropertiesSvcLib +atlas_add_library( SiPropertiesToolLib src/*.cxx - PUBLIC_HEADERS SiPropertiesSvc + PUBLIC_HEADERS SiPropertiesTool PRIVATE_INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS} LINK_LIBRARIES AthenaBaseComps AthenaKernel GaudiKernel InDetReadoutGeometry PixelConditionsData SCT_ConditionsData StoreGateLib SGtests PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} Identifier InDetIdentifier ) -atlas_add_component( SiPropertiesSvc +atlas_add_component( SiPropertiesTool src/components/*.cxx INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaBaseComps AthenaKernel GaudiKernel InDetReadoutGeometry PixelConditionsData SCT_ConditionsData StoreGateLib SGtests Identifier InDetIdentifier SiPropertiesSvcLib ) + LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaBaseComps AthenaKernel GaudiKernel InDetReadoutGeometry PixelConditionsData SCT_ConditionsData StoreGateLib SGtests Identifier InDetIdentifier SiPropertiesToolLib ) # Run tests: atlas_add_test( TestSCTProperties - SCRIPT athena.py --threads=5 SiPropertiesSvc/testSCTProperties.py + SCRIPT athena.py --threads=5 SiPropertiesTool/testSCTProperties.py PROPERTIES TIMEOUT 300 ENVIRONMENT THREADS=5 ) diff --git a/InnerDetector/InDetConditions/SiPropertiesTool/SiPropertiesTool/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetConditions/SiPropertiesTool/SiPropertiesTool/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..6980ebf99ac1ff42509173cdfaa1fdc617cb7275 --- /dev/null +++ b/InnerDetector/InDetConditions/SiPropertiesTool/SiPropertiesTool/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +InnerDetector/InDetConditions/SiPropertiesTool diff --git a/InnerDetector/InDetConditions/SiPropertiesSvc/SiPropertiesSvc/ISiPropertiesTool.h b/InnerDetector/InDetConditions/SiPropertiesTool/SiPropertiesTool/ISiPropertiesTool.h similarity index 94% rename from InnerDetector/InDetConditions/SiPropertiesSvc/SiPropertiesSvc/ISiPropertiesTool.h rename to InnerDetector/InDetConditions/SiPropertiesTool/SiPropertiesTool/ISiPropertiesTool.h index f50bd24ecc21757f25185028c03ad55fcd42d8fb..a443861ef24a3093d32e9f5b5332ae7a633c265e 100644 --- a/InnerDetector/InDetConditions/SiPropertiesSvc/SiPropertiesSvc/ISiPropertiesTool.h +++ b/InnerDetector/InDetConditions/SiPropertiesTool/SiPropertiesTool/ISiPropertiesTool.h @@ -11,7 +11,7 @@ //Gaudi Includes #include "GaudiKernel/IAlgTool.h" -#include "SiPropertiesSvc/SiliconProperties.h" +#include "SiPropertiesTool/SiliconProperties.h" #include "Identifier/IdentifierHash.h" /** diff --git a/InnerDetector/InDetConditions/SiPropertiesSvc/SiPropertiesSvc/SiliconProperties.h b/InnerDetector/InDetConditions/SiPropertiesTool/SiPropertiesTool/SiliconProperties.h old mode 100755 new mode 100644 similarity index 93% rename from InnerDetector/InDetConditions/SiPropertiesSvc/SiPropertiesSvc/SiliconProperties.h rename to InnerDetector/InDetConditions/SiPropertiesTool/SiPropertiesTool/SiliconProperties.h index e9a4901ed06e6be06feb8dbbe658ed809abc6e5c..1ee7771f234eb3da0168746f9b2349b5f77b3ad0 --- a/InnerDetector/InDetConditions/SiPropertiesSvc/SiPropertiesSvc/SiliconProperties.h +++ b/InnerDetector/InDetConditions/SiPropertiesTool/SiPropertiesTool/SiliconProperties.h @@ -1,9 +1,9 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ -#ifndef SIPROPERTIESSVC_SILICONPROPERTIES_H -#define SIPROPERTIESSVC_SILICONPROPERTIES_H +#ifndef SIPROPERTIESTOOL_SILICONPROPERTIES_H +#define SIPROPERTIESTOOL_SILICONPROPERTIES_H /////////////////////////////////////////////////////////////////// // Header file for class SiliconProperties @@ -85,9 +85,9 @@ private: bool m_override; // signal that quantities are overriden and recalculation are disabled. - static double s_ehPairsPerEnergyDefault; + const static double s_ehPairsPerEnergyDefault; }; } // namespace InDetDD -#endif // SIPROPERTIESSVC_SILICONPROPERTIES_H +#endif // SIPROPERTIESTOOL_SILICONPROPERTIES_H diff --git a/InnerDetector/InDetConditions/SiPropertiesSvc/SiPropertiesSvc/SiliconPropertiesVector.h b/InnerDetector/InDetConditions/SiPropertiesTool/SiPropertiesTool/SiliconPropertiesVector.h similarity index 83% rename from InnerDetector/InDetConditions/SiPropertiesSvc/SiPropertiesSvc/SiliconPropertiesVector.h rename to InnerDetector/InDetConditions/SiPropertiesTool/SiPropertiesTool/SiliconPropertiesVector.h index ad3019d3be402d09d28793b671a2bae4b914a7b5..d9d610deeb7ae9d7ef140fbc098d0f1843e90213 100644 --- a/InnerDetector/InDetConditions/SiPropertiesSvc/SiPropertiesSvc/SiliconPropertiesVector.h +++ b/InnerDetector/InDetConditions/SiPropertiesTool/SiPropertiesTool/SiliconPropertiesVector.h @@ -2,15 +2,15 @@ Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ -#ifndef SIPROPERTIESSVC_SILICONPROPERTIESVECTOR_H -#define SIPROPERTIESSVC_SILICONPROPERTIESVECTOR_H +#ifndef SIPROPERTIESTOOL_SILICONPROPERTIESVECTOR_H +#define SIPROPERTIESTOOL_SILICONPROPERTIESVECTOR_H /////////////////////////////////////////////////////////////////// // Header file for class SiliconPropertiesVector for SiPropertiesTool /////////////////////////////////////////////////////////////////// #include <vector> -#include "SiPropertiesSvc/SiliconProperties.h" +#include "SiPropertiesTool/SiliconProperties.h" #include "Identifier/IdentifierHash.h" #include "SGTools/CLASS_DEF.h" @@ -39,4 +39,4 @@ CLASS_DEF(InDet::SiliconPropertiesVector, 10146683 , 1) #include "AthenaKernel/CondCont.h" CONDCONT_DEF(InDet::SiliconPropertiesVector, 246562685); -#endif // SIPROPERTIESSVC_SILICONPROPERTIESVECTOR_H +#endif // SIPROPERTIESTOOL_SILICONPROPERTIESVECTOR_H diff --git a/InnerDetector/InDetConditions/SiPropertiesSvc/doc/packagedoc.h b/InnerDetector/InDetConditions/SiPropertiesTool/doc/packagedoc.h similarity index 81% rename from InnerDetector/InDetConditions/SiPropertiesSvc/doc/packagedoc.h rename to InnerDetector/InDetConditions/SiPropertiesTool/doc/packagedoc.h index 84851aef587b6681df6e8bb41f27aa5d1e5e7787..f7d7578fe658e71c3bb5d6ffec6601c5feda1e49 100644 --- a/InnerDetector/InDetConditions/SiPropertiesSvc/doc/packagedoc.h +++ b/InnerDetector/InDetConditions/SiPropertiesTool/doc/packagedoc.h @@ -4,11 +4,11 @@ /** -@page SiPropertiesSvc_page SiPropertiesSvc Package +@page SiPropertiesTool_page SiPropertiesTool Package @authors Grant Gorfine -@section SiPropertiesSvc_SiPropertiesSvcIntro Introduction +@section SiPropertiesTool_SiPropertiesToolIntro Introduction Service for providing silicon properties for each detector element. The properties are available via the SiliconProperties class from diff --git a/InnerDetector/InDetConditions/SiPropertiesSvc/python/PixelSiPropertiesToolSetup.py b/InnerDetector/InDetConditions/SiPropertiesTool/python/PixelSiPropertiesToolSetup.py similarity index 94% rename from InnerDetector/InDetConditions/SiPropertiesSvc/python/PixelSiPropertiesToolSetup.py rename to InnerDetector/InDetConditions/SiPropertiesTool/python/PixelSiPropertiesToolSetup.py index 4d983c1121e578973a100ea4561d862f698117a3..76531152b443dc312c8ed19179e21b8f27e6f328 100644 --- a/InnerDetector/InDetConditions/SiPropertiesSvc/python/PixelSiPropertiesToolSetup.py +++ b/InnerDetector/InDetConditions/SiPropertiesTool/python/PixelSiPropertiesToolSetup.py @@ -58,14 +58,14 @@ class PixelSiPropertiesToolSetup: from AthenaCommon.AppMgr import ToolSvc if not hasattr(condSeq, "PixelSiPropertiesCondAlg"): - from SiPropertiesSvc.SiPropertiesSvcConf import PixelSiPropertiesCondAlg + from SiPropertiesTool.SiPropertiesToolConf import PixelSiPropertiesCondAlg condSeq += PixelSiPropertiesCondAlg(name="PixelSiPropertiesCondAlg") self.alg = getattr(condSeq, "PixelSiPropertiesCondAlg") def setTool(self): from AthenaCommon.AppMgr import ToolSvc if not hasattr(ToolSvc, "PixelSiPropertiesTool"): - from SiPropertiesSvc.SiPropertiesSvcConf import SiPropertiesTool + from SiPropertiesTool.SiPropertiesToolConf import SiPropertiesTool ToolSvc += SiPropertiesTool(name = "PixelSiPropertiesTool", DetectorName = "Pixel", ReadKey = "PixelSiliconPropertiesVector") diff --git a/InnerDetector/InDetConditions/SiPropertiesSvc/python/SCT_SiPropertiesToolSetup.py b/InnerDetector/InDetConditions/SiPropertiesTool/python/SCT_SiPropertiesToolSetup.py similarity index 91% rename from InnerDetector/InDetConditions/SiPropertiesSvc/python/SCT_SiPropertiesToolSetup.py rename to InnerDetector/InDetConditions/SiPropertiesTool/python/SCT_SiPropertiesToolSetup.py index 04d99f5dda6c4f7a6b96f905d7c3650aa27b6e1c..1b91d9381df291618d2832f7ff4c5e9312872aff 100644 --- a/InnerDetector/InDetConditions/SiPropertiesSvc/python/SCT_SiPropertiesToolSetup.py +++ b/InnerDetector/InDetConditions/SiPropertiesTool/python/SCT_SiPropertiesToolSetup.py @@ -36,7 +36,7 @@ class SCT_SiPropertiesToolSetup: condSeq = AthSequencer("AthCondSeq") if not hasattr(condSeq, self.algName): - from SiPropertiesSvc.SiPropertiesSvcConf import SCTSiPropertiesCondAlg + from SiPropertiesTool.SiPropertiesToolConf import SCTSiPropertiesCondAlg if self.siliconTool is None: condSeq += SCTSiPropertiesCondAlg(name = self.algName) else: @@ -46,7 +46,7 @@ class SCT_SiPropertiesToolSetup: def setTool(self): if self.tool is None: - from SiPropertiesSvc.SiPropertiesSvcConf import SiPropertiesTool + from SiPropertiesTool.SiPropertiesToolConf import SiPropertiesTool self.tool = SiPropertiesTool(name = self.toolName, DetectorName = "SCT", ReadKey = "SCTSiliconPropertiesVector") diff --git a/InnerDetector/InDetConditions/SiPropertiesSvc/python/__init__.py b/InnerDetector/InDetConditions/SiPropertiesTool/python/__init__.py similarity index 100% rename from InnerDetector/InDetConditions/SiPropertiesSvc/python/__init__.py rename to InnerDetector/InDetConditions/SiPropertiesTool/python/__init__.py diff --git a/InnerDetector/InDetConditions/SiPropertiesSvc/share/testSCTProperties.py b/InnerDetector/InDetConditions/SiPropertiesTool/share/testSCTProperties.py similarity index 95% rename from InnerDetector/InDetConditions/SiPropertiesSvc/share/testSCTProperties.py rename to InnerDetector/InDetConditions/SiPropertiesTool/share/testSCTProperties.py index 1a72602fc5bab5b03b49634d5375a2e7c86acd63..91d3d114e67894ea482e58093daaad0244c6e080 100644 --- a/InnerDetector/InDetConditions/SiPropertiesSvc/share/testSCTProperties.py +++ b/InnerDetector/InDetConditions/SiPropertiesTool/share/testSCTProperties.py @@ -80,13 +80,13 @@ sct_SiliconConditionsToolSetup.setDcsTool(sct_DCSConditionsToolSetup.getTool()) sct_SiliconConditionsToolSetup.setup() # Set up SCT_SiPropertiesTool -from SiPropertiesSvc.SCT_SiPropertiesToolSetup import SCT_SiPropertiesToolSetup +from SiPropertiesTool.SCT_SiPropertiesToolSetup import SCT_SiPropertiesToolSetup sct_SiPropertiesToolSetup = SCT_SiPropertiesToolSetup() sct_SiPropertiesToolSetup.setSiliconTool(sct_SiliconConditionsToolSetup.getTool()) sct_SiPropertiesToolSetup.setup() # Set up SCTSiPropertiesTestAlg -from SiPropertiesSvc.SiPropertiesSvcConf import SCTSiPropertiesTestAlg +from SiPropertiesTool.SiPropertiesToolConf import SCTSiPropertiesTestAlg job += SCTSiPropertiesTestAlg(SCTPropertiesTool=sct_SiPropertiesToolSetup.getTool()) # Prepare EventSelector diff --git a/InnerDetector/InDetConditions/SiPropertiesSvc/src/PixelSiPropertiesCondAlg.cxx b/InnerDetector/InDetConditions/SiPropertiesTool/src/PixelSiPropertiesCondAlg.cxx similarity index 100% rename from InnerDetector/InDetConditions/SiPropertiesSvc/src/PixelSiPropertiesCondAlg.cxx rename to InnerDetector/InDetConditions/SiPropertiesTool/src/PixelSiPropertiesCondAlg.cxx diff --git a/InnerDetector/InDetConditions/SiPropertiesSvc/src/PixelSiPropertiesCondAlg.h b/InnerDetector/InDetConditions/SiPropertiesTool/src/PixelSiPropertiesCondAlg.h similarity index 96% rename from InnerDetector/InDetConditions/SiPropertiesSvc/src/PixelSiPropertiesCondAlg.h rename to InnerDetector/InDetConditions/SiPropertiesTool/src/PixelSiPropertiesCondAlg.h index 3e0be4071512a7c3535b252c8cf981cf252b4efb..bd38b44fd4642e19414876b8f8049a7170d44a3c 100644 --- a/InnerDetector/InDetConditions/SiPropertiesSvc/src/PixelSiPropertiesCondAlg.h +++ b/InnerDetector/InDetConditions/SiPropertiesTool/src/PixelSiPropertiesCondAlg.h @@ -12,7 +12,7 @@ #include "PixelConditionsData/PixelModuleData.h" #include "GaudiKernel/ICondSvc.h" -#include "SiPropertiesSvc/SiliconPropertiesVector.h" +#include "SiPropertiesTool/SiliconPropertiesVector.h" #include "InDetIdentifier/PixelID.h" #include "InDetReadoutGeometry/PixelDetectorManager.h" diff --git a/InnerDetector/InDetConditions/SiPropertiesSvc/src/SCTSiPropertiesCondAlg.cxx b/InnerDetector/InDetConditions/SiPropertiesTool/src/SCTSiPropertiesCondAlg.cxx similarity index 100% rename from InnerDetector/InDetConditions/SiPropertiesSvc/src/SCTSiPropertiesCondAlg.cxx rename to InnerDetector/InDetConditions/SiPropertiesTool/src/SCTSiPropertiesCondAlg.cxx diff --git a/InnerDetector/InDetConditions/SiPropertiesSvc/src/SCTSiPropertiesCondAlg.h b/InnerDetector/InDetConditions/SiPropertiesTool/src/SCTSiPropertiesCondAlg.h similarity index 97% rename from InnerDetector/InDetConditions/SiPropertiesSvc/src/SCTSiPropertiesCondAlg.h rename to InnerDetector/InDetConditions/SiPropertiesTool/src/SCTSiPropertiesCondAlg.h index 5c4d3bdcdf144059ccb8f6113924cf4f6c69861f..ffe4146527673e0aad17319dbec1a67837f7b4f7 100644 --- a/InnerDetector/InDetConditions/SiPropertiesSvc/src/SCTSiPropertiesCondAlg.h +++ b/InnerDetector/InDetConditions/SiPropertiesTool/src/SCTSiPropertiesCondAlg.h @@ -10,7 +10,7 @@ #include "InDetConditionsSummaryService/ISiliconConditionsTool.h" #include "InDetReadoutGeometry/SiDetectorElementCollection.h" #include "SCT_ConditionsData/SCT_DCSFloatCondData.h" -#include "SiPropertiesSvc/SiliconPropertiesVector.h" +#include "SiPropertiesTool/SiliconPropertiesVector.h" #include "StoreGate/ReadCondHandleKey.h" #include "StoreGate/WriteCondHandleKey.h" diff --git a/InnerDetector/InDetConditions/SiPropertiesSvc/src/SCTSiPropertiesTestAlg.cxx b/InnerDetector/InDetConditions/SiPropertiesTool/src/SCTSiPropertiesTestAlg.cxx similarity index 100% rename from InnerDetector/InDetConditions/SiPropertiesSvc/src/SCTSiPropertiesTestAlg.cxx rename to InnerDetector/InDetConditions/SiPropertiesTool/src/SCTSiPropertiesTestAlg.cxx diff --git a/InnerDetector/InDetConditions/SiPropertiesSvc/src/SCTSiPropertiesTestAlg.h b/InnerDetector/InDetConditions/SiPropertiesTool/src/SCTSiPropertiesTestAlg.h similarity index 94% rename from InnerDetector/InDetConditions/SiPropertiesSvc/src/SCTSiPropertiesTestAlg.h rename to InnerDetector/InDetConditions/SiPropertiesTool/src/SCTSiPropertiesTestAlg.h index 4a2b3a0b83b256482cff57dbd4e21f6b6eb44d5d..8a82d4f32e6b0070de830bc42ce098fa316a20f4 100644 --- a/InnerDetector/InDetConditions/SiPropertiesSvc/src/SCTSiPropertiesTestAlg.h +++ b/InnerDetector/InDetConditions/SiPropertiesTool/src/SCTSiPropertiesTestAlg.h @@ -7,7 +7,7 @@ #include "AthenaBaseComps/AthReentrantAlgorithm.h" -#include "SiPropertiesSvc/ISiPropertiesTool.h" +#include "SiPropertiesTool/ISiPropertiesTool.h" #include "GaudiKernel/ToolHandle.h" diff --git a/InnerDetector/InDetConditions/SiPropertiesSvc/src/SiPropertiesTool.cxx b/InnerDetector/InDetConditions/SiPropertiesTool/src/SiPropertiesTool.cxx similarity index 100% rename from InnerDetector/InDetConditions/SiPropertiesSvc/src/SiPropertiesTool.cxx rename to InnerDetector/InDetConditions/SiPropertiesTool/src/SiPropertiesTool.cxx diff --git a/InnerDetector/InDetConditions/SiPropertiesSvc/src/SiPropertiesTool.h b/InnerDetector/InDetConditions/SiPropertiesTool/src/SiPropertiesTool.h similarity index 91% rename from InnerDetector/InDetConditions/SiPropertiesSvc/src/SiPropertiesTool.h rename to InnerDetector/InDetConditions/SiPropertiesTool/src/SiPropertiesTool.h index aea33f51d03ee3961838f52013744a75597ffb43..72c12ac0d3857d9e58b498c4bf4238dfaca1b686 100644 --- a/InnerDetector/InDetConditions/SiPropertiesSvc/src/SiPropertiesTool.h +++ b/InnerDetector/InDetConditions/SiPropertiesTool/src/SiPropertiesTool.h @@ -9,10 +9,10 @@ #ifndef SiPropertiesTool_h #define SiPropertiesTool_h -#include "SiPropertiesSvc/ISiPropertiesTool.h" +#include "SiPropertiesTool/ISiPropertiesTool.h" #include "AthenaBaseComps/AthAlgTool.h" -#include "SiPropertiesSvc/SiliconPropertiesVector.h" +#include "SiPropertiesTool/SiliconPropertiesVector.h" #include "StoreGate/ReadCondHandleKey.h" /** diff --git a/InnerDetector/InDetConditions/SiPropertiesSvc/src/SiliconProperties.cxx b/InnerDetector/InDetConditions/SiPropertiesTool/src/SiliconProperties.cxx similarity index 97% rename from InnerDetector/InDetConditions/SiPropertiesSvc/src/SiliconProperties.cxx rename to InnerDetector/InDetConditions/SiPropertiesTool/src/SiliconProperties.cxx index 242d049cec93debac8f7527f48ad3fcd2df67bbf..b0619a7f1343d4a39aa79c23486d0e51ad0cb9ba 100644 --- a/InnerDetector/InDetConditions/SiPropertiesSvc/src/SiliconProperties.cxx +++ b/InnerDetector/InDetConditions/SiPropertiesTool/src/SiliconProperties.cxx @@ -1,8 +1,8 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ -#include "SiPropertiesSvc/SiliconProperties.h" +#include "SiPropertiesTool/SiliconProperties.h" #include "CLHEP/Units/PhysicalConstants.h" #include <cmath> @@ -17,7 +17,7 @@ using InDetDD::electrons; // This value for the number of eh pairs per deposited energy is fairly standard I think. // In reality there is some temperture dependence but for the temperature ranges we deal with // I don't think variations are too signifcant. -double SiliconProperties::s_ehPairsPerEnergyDefault = 1. / (3.62 * CLHEP::eV); // 1 eh pair per 3.62 CLHEP::eV. +const double SiliconProperties::s_ehPairsPerEnergyDefault = 1. / (3.62 * CLHEP::eV); // 1 eh pair per 3.62 CLHEP::eV. // Constants used in the formula const double elecHallFactZero = 1.13; diff --git a/InnerDetector/InDetConditions/SiPropertiesSvc/src/SiliconPropertiesVector.cxx b/InnerDetector/InDetConditions/SiPropertiesTool/src/SiliconPropertiesVector.cxx similarity index 95% rename from InnerDetector/InDetConditions/SiPropertiesSvc/src/SiliconPropertiesVector.cxx rename to InnerDetector/InDetConditions/SiPropertiesTool/src/SiliconPropertiesVector.cxx index ee6bac0fcc702fb36c0fb11d958fd1d1cd0ab8b1..07802c39a33da0414fec8c9f154ab85f53b5a25e 100644 --- a/InnerDetector/InDetConditions/SiPropertiesSvc/src/SiliconPropertiesVector.cxx +++ b/InnerDetector/InDetConditions/SiPropertiesTool/src/SiliconPropertiesVector.cxx @@ -6,7 +6,7 @@ // Source file for class SiliconPropertiesVector for SiPropertiesTool /////////////////////////////////////////////////////////////////// -#include "SiPropertiesSvc/SiliconPropertiesVector.h" +#include "SiPropertiesTool/SiliconPropertiesVector.h" namespace InDet { diff --git a/InnerDetector/InDetConditions/SiPropertiesSvc/src/components/SiPropertiesSvc_entries.cxx b/InnerDetector/InDetConditions/SiPropertiesTool/src/components/SiPropertiesTool_entries.cxx similarity index 100% rename from InnerDetector/InDetConditions/SiPropertiesSvc/src/components/SiPropertiesSvc_entries.cxx rename to InnerDetector/InDetConditions/SiPropertiesTool/src/components/SiPropertiesTool_entries.cxx diff --git a/InnerDetector/InDetConditions/TRT_ConditionsServices/CMakeLists.txt b/InnerDetector/InDetConditions/TRT_ConditionsServices/CMakeLists.txt index 5e629ca4b09e44f6d435dd755ad8fefcca0af63d..2c971cbeffc2a6593fe26697f5dc22234d282bbf 100644 --- a/InnerDetector/InDetConditions/TRT_ConditionsServices/CMakeLists.txt +++ b/InnerDetector/InDetConditions/TRT_ConditionsServices/CMakeLists.txt @@ -30,7 +30,6 @@ atlas_depends_on_subdirs( PUBLIC DetectorDescription/GeoModel/GeoModelInterfaces DetectorDescription/GeoModel/GeoModelUtilities DetectorDescription/Identifier - Event/EventInfo Event/xAOD/xAODEventInfo InnerDetector/InDetConditions/InDetCoolCoralClientUtils InnerDetector/InDetDetDescr/InDetIdentifier @@ -50,7 +49,7 @@ atlas_add_library( TRT_ConditionsServicesLib PUBLIC_HEADERS TRT_ConditionsServices PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${COOL_INCLUDE_DIRS} LINK_LIBRARIES AthenaKernel GeoPrimitives EventPrimitives GaudiKernel TRT_ConditionsData StoreGateLib SGtests - PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${COOL_LIBRARIES} AthenaBaseComps AthenaPoolUtilities DetDescrConditions GeoModelUtilities Identifier xAODEventInfo EventInfo InDetCoolCoralClientUtils InDetIdentifier InDetReadoutGeometry PathResolver ) + PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${COOL_LIBRARIES} AthenaBaseComps AthenaPoolUtilities DetDescrConditions GeoModelUtilities Identifier xAODEventInfo InDetCoolCoralClientUtils InDetIdentifier InDetReadoutGeometry PathResolver ) atlas_add_component( TRT_ConditionsServices src/components/*.cxx diff --git a/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_DAQ_ConditionsSvc.cxx b/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_DAQ_ConditionsSvc.cxx index 285e51981ec2000e45f70efa9bfd1ae3d48158f9..be20e1a694704359470adc64608055d0156e2a2a 100644 --- a/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_DAQ_ConditionsSvc.cxx +++ b/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_DAQ_ConditionsSvc.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /*---------------------------------------------------- @@ -9,9 +9,6 @@ // Header Includes #include "GaudiKernel/IIncidentSvc.h" -#include "EventInfo/EventInfo.h" -#include "EventInfo/EventID.h" - #include "TRT_DAQ_ConditionsSvc.h" #include "AthenaPoolUtilities/CondAttrListCollection.h" @@ -28,13 +25,11 @@ TRT_DAQ_ConditionsSvc::TRT_DAQ_ConditionsSvc( const std::string& name, ISvcLocat AthService( name, pSvcLocator ), m_evtStore("StoreGateSvc",name), m_detStore("DetectorStore",name), - m_EventInfoKey("ByteStreamEventInfo"), m_FolderName(run1FolderName), m_TRT_ID_Helper(0), m_EnabledRods(0) { // Get properties from job options - declareProperty( "EventInfoKey", m_EventInfoKey ); declareProperty( "FolderName", m_FolderName ); declareProperty( "EventStore", m_evtStore ); declareProperty( "DetectorStore", m_detStore ); @@ -223,51 +218,10 @@ void TRT_DAQ_ConditionsSvc::handle( const Incident& inc ) { // BeginEvent handler if ( inc.type() == "BeginEvent" ) { - // Retrieve COOL Folder at beginning of event to cut down on StoreGate accesses. // Contents won't change during event. sc= m_detStore->retrieve( m_EnabledRods, m_FolderName ); if (sc.isFailure()) ATH_MSG_ERROR("The folder "<<m_FolderName<<" could not be retrieved"); - - - /* FOR TESTING THE CALLBACK - // Get the run number - const EventInfo* evtInfo; - sc = m_evtStore->retrieve(evtInfo,m_EventInfoKey); - if ( sc.isFailure() || !evtInfo ) { - ATH_MSG_WARNING( "Couldn't get " << m_EventInfoKey << " from StoreGate." ); - return; - } - if ( !evtInfo->event_ID() ) { - ATH_MSG_WARNING( m_EventInfoKey << " object has no EventID object." ); - return; - } - int runNum = evtInfo->event_ID()->run_number(); - int lumiBlock = evtInfo->event_ID()->lumi_block(); - - ATH_MSG_INFO( "Run " << runNum << ", lumiblock " << lumiBlock ); - */ - - /* FOR TESTING FOLDER ACCESS - CondAttrListCollection::name_const_iterator chanNameMapItr; - if ( m_EnabledRods->name_size() == 0 ) { - ATH_MSG_FATAL( "This CondAttrListCollection has no entries in it's ChanNameMap." ); - return; - } - for ( chanNameMapItr = m_EnabledRods->name_begin(); - chanNameMapItr != m_EnabledRods->name_end(); ++chanNameMapItr ) { - int chanNum = (*chanNameMapItr).first; - std::string chanName = (*chanNameMapItr).second; - CondAttrListCollection::iov_const_iterator chanIOVPair; - chanIOVPair = m_EnabledRods->chanIOVPair( chanNum ); - if ( chanIOVPair == m_EnabledRods->iov_end() ) { - ATH_MSG_INFO( "Channel " << chanNum << " (" << chanName << ") not found." ); - return; - } - ATH_MSG_INFO( "Channel " << chanNum << " (" << chanName << ") enabled in this event." ); - } - */ - } return; diff --git a/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_DAQ_ConditionsSvc.h b/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_DAQ_ConditionsSvc.h index 096cf161981a4e1ea04647012f8f30f1cd1d585b..0e1d29c39e9e9b7a2a1bd94ff048de64074f393a 100644 --- a/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_DAQ_ConditionsSvc.h +++ b/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_DAQ_ConditionsSvc.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef TRT_DAQ_CONDITIONSSVC_H @@ -70,7 +70,6 @@ class TRT_DAQ_ConditionsSvc : public AthService, ServiceHandle<StoreGateSvc> m_detStore; // jobOptions properties - std::string m_EventInfoKey; std::string m_FolderName; // Straw Helpers diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/CMakeLists.txt b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/CMakeLists.txt index beb81329593d00419f320df58af43627b45f6844..d18d34bbc21b0d7bf6357db5986d82547d40c290 100644 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/CMakeLists.txt +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/CMakeLists.txt @@ -9,6 +9,7 @@ atlas_subdir( InDetReadoutGeometry ) atlas_depends_on_subdirs( PUBLIC Control/AthenaBaseComps Control/AthenaKernel + Control/CxxUtils Control/StoreGate DetectorDescription/AtlasDetDescr DetectorDescription/GeoModel/GeoModelUtilities @@ -37,6 +38,6 @@ atlas_add_library( InDetReadoutGeometry PUBLIC_HEADERS InDetReadoutGeometry INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} ${GEOMODEL_LIBRARIES} AthenaKernel AtlasDetDescr GeoModelUtilities GeoPrimitives Identifier GaudiKernel InDetIdentifier TrkDetElementBase TrkSurfaces TrkEventPrimitives StoreGateLib SGtests AthenaBaseComps DetDescrConditions + LINK_LIBRARIES ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} ${GEOMODEL_LIBRARIES} AthenaKernel CxxUtils AtlasDetDescr GeoModelUtilities GeoPrimitives Identifier GaudiKernel InDetIdentifier TrkDetElementBase TrkSurfaces TrkEventPrimitives StoreGateLib SGtests AthenaBaseComps DetDescrConditions PRIVATE_LINK_LIBRARIES AthenaPoolUtilities IdDictDetDescr TRT_ConditionsData ) diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..e7b2f6455b3d494d5f0e1dacb0168ca892f4e59f --- /dev/null +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +InnerDetector/InDetDetDescr/InDetReadoutGeometry diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/InDetDetectorManager.h b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/InDetDetectorManager.h index f78d94baa0d455936d47161fd77409228fecc842..5765370a8b25920b0d22dced1512d14052932777 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/InDetDetectorManager.h +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/InDetDetectorManager.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -26,6 +26,14 @@ #include "DetDescrConditions/AlignableTransformContainer.h" +#include "CxxUtils/checker_macros.h" + +#include <atomic> +#include <string> +#include <map> +#include <set> +#include <list> + class StoreGateSvc; class AlignableTransform; class Identifier; @@ -33,10 +41,8 @@ class AtlasDetectorID; class GeoVAlignmentStore; class CondAttrListCollection; -#include <string> -#include <map> -#include <set> -#include <list> +// mutable Athena::MsgStreamMember issues warnings. +ATLAS_NO_CHECK_FILE_THREAD_SAFETY; namespace InDetDD { @@ -184,8 +190,9 @@ namespace InDetDD { std::set<std::string> m_folders; std::set<std::string> m_specialFolders; std::set<std::string> m_globalFolders; // new time-dependent global folders - mutable bool m_suppressWarnings; - + mutable std::atomic_bool m_suppressWarnings; + + static const LevelInfo s_invalidLevel; }; } // namespace InDetDD diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/PixelModuleDesign.h b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/PixelModuleDesign.h index c07431ea306d114a23eb330d12a3f4a2d60dc1fa..1155f300323b9d5f4252cc8795dc16bc2f43ecde 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/PixelModuleDesign.h +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/PixelModuleDesign.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -20,6 +20,7 @@ #include "InDetReadoutGeometry/PixelReadoutScheme.h" // Other includes +#include "CxxUtils/CachedUniquePtr.h" #include "InDetIdentifier/PixelID.h" namespace Trk{ @@ -77,7 +78,7 @@ namespace InDetDD { bool is3D=false); // Destructor: - virtual ~PixelModuleDesign(); + virtual ~PixelModuleDesign() = default; /////////////////////////////////////////////////////////////////// // Const methods: @@ -238,7 +239,7 @@ namespace InDetDD { private: PixelDiodeMap m_diodeMap; PixelReadoutScheme m_readoutScheme; - mutable Trk::RectangleBounds * m_bounds; + CxxUtils::CachedUniquePtr<Trk::RectangleBounds> m_bounds; bool m_is3D; }; diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiCommonItems.h b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiCommonItems.h index a50148bad4d80ec58387813acdbd5214aa139d78..3dbdfcfc4068071b801ec09688da0d50b91f04de 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiCommonItems.h +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiCommonItems.h @@ -15,11 +15,19 @@ class AtlasDetectorID; // Message Stream Member #include "AthenaKernel/MsgStreamMember.h" -#include "GaudiKernel/ServiceHandle.h" -#include "CLHEP/Geometry/Transform3D.h" +#include "CxxUtils/checker_macros.h" +#include "InDetCondTools/ISiLorentzAngleTool.h" #include "GeoPrimitives/GeoPrimitives.h" #include "GeoModelKernel/RCBase.h" -#include "InDetCondTools/ISiLorentzAngleTool.h" + + +#include "GaudiKernel/ServiceHandle.h" +#include "CLHEP/Geometry/Transform3D.h" + +#include <mutex> + +// mutable Athena::MsgStreamMember issues warnings. +ATLAS_NO_CHECK_FILE_THREAD_SAFETY; namespace InDetDD { @@ -59,9 +67,10 @@ namespace InDetDD { mutable Athena::MsgStreamMember m_msg; const AtlasDetectorID* m_idHelper; - mutable HepGeom::Transform3D m_solenoidFrame; + mutable HepGeom::Transform3D m_solenoidFrame ATLAS_THREAD_SAFE; // Guarded by m_mutex const ISiLorentzAngleTool *m_lorentzAngleTool; - + + mutable std::mutex m_mutex; }; @@ -73,7 +82,10 @@ namespace InDetDD { inline const HepGeom::Transform3D & SiCommonItems::solenoidFrame() const { + std::lock_guard<std::mutex> lock{m_mutex}; return m_solenoidFrame; + // This reference might be changed by setSolenoidFrame. + // However, it occurrs very rarely. } diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorElement.h b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorElement.h index 8a0f00554497c72e3dd9cfe1973bb2b78a819876..2c052109eb443981bc68791a4eae2ec005257a03 100644 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorElement.h +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorElement.h @@ -13,6 +13,7 @@ #include "TrkDetElementBase/TrkDetElementBase.h" // Data member classes +#include "CxxUtils/CachedUniquePtr.h" #include "Identifier/Identifier.h" #include "Identifier/IdentifierHash.h" #include "InDetReadoutGeometry/SiDetectorDesign.h" @@ -22,11 +23,12 @@ #include "InDetReadoutGeometry/SiCommonItems.h" #include "InDetReadoutGeometry/SiCellId.h" #include "InDetReadoutGeometry/InDetDD_Defs.h" -#include "CLHEP/Geometry/Point3D.h" #include "GeoPrimitives/CLHEPtoEigenConverter.h" #include "GeoPrimitives/GeoPrimitives.h" #include "GeoModelKernel/GeoDefinitions.h" +#include "CLHEP/Geometry/Point3D.h" + #include <atomic> #include <mutex> @@ -625,16 +627,16 @@ namespace InDetDD { mutable std::recursive_mutex m_mutex; - mutable Amg::Transform3D m_transform; // Will be guarded by m_mutex - mutable HepGeom::Transform3D m_transformCLHEP; // Will be guarded by m_mutex + mutable Amg::Transform3D m_transform ATLAS_THREAD_SAFE; // Guarded by m_mutex + mutable HepGeom::Transform3D m_transformCLHEP ATLAS_THREAD_SAFE; // Guarded by m_mutex - mutable Amg::Vector3D m_normal; // Will be guarded by m_mutex - mutable Amg::Vector3D m_etaAxis; // Will be guarded by m_mutex - mutable HepGeom::Vector3D<double> m_etaAxisCLHEP; // Will be guarded by m_mutex - mutable Amg::Vector3D m_phiAxis; // Will be guarded by m_mutex - mutable HepGeom::Vector3D<double> m_phiAxisCLHEP; // Will be guarded by m_mutex - mutable Amg::Vector3D m_center; // Will be guarded by m_mutex - mutable HepGeom::Vector3D<double> m_centerCLHEP; // Will be guarded by m_mutex + mutable Amg::Vector3D m_normal ATLAS_THREAD_SAFE; // Guarded by m_mutex + mutable Amg::Vector3D m_etaAxis ATLAS_THREAD_SAFE; // Guarded by m_mutex + mutable HepGeom::Vector3D<double> m_etaAxisCLHEP ATLAS_THREAD_SAFE; // Guarded by m_mutex + mutable Amg::Vector3D m_phiAxis ATLAS_THREAD_SAFE; // Guarded by m_mutex + mutable HepGeom::Vector3D<double> m_phiAxisCLHEP ATLAS_THREAD_SAFE; // Guarded by m_mutex + mutable Amg::Vector3D m_center ATLAS_THREAD_SAFE; // Guarded by m_mutex + mutable HepGeom::Vector3D<double> m_centerCLHEP ATLAS_THREAD_SAFE; // Guarded by m_mutex mutable std::atomic<double> m_minZ; mutable std::atomic<double> m_maxZ; @@ -643,8 +645,8 @@ namespace InDetDD { mutable std::atomic<double> m_minPhi; mutable std::atomic<double> m_maxPhi; - mutable std::atomic<Trk::Surface*> m_surface; - mutable std::vector<const Trk::Surface*> m_surfaces; // Will be guarded by m_mutex + CxxUtils::CachedUniquePtr<Trk::Surface> m_surface; + mutable std::vector<const Trk::Surface*> m_surfaces ATLAS_THREAD_SAFE; // Guarded by m_mutex const GeoAlignmentStore* m_geoAlignStore{}; }; @@ -666,8 +668,8 @@ namespace InDetDD { inline Amg::Vector3D SiDetectorElement::globalPosition(const Amg::Vector2D &localPos) const { - if (!m_cacheValid) updateCache(); std::lock_guard<std::recursive_mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); return m_center + localPos[Trk::distEta] * m_etaAxis + localPos[Trk::distPhi] * m_phiAxis; } @@ -678,8 +680,8 @@ namespace InDetDD { inline HepGeom::Point3D<double> SiDetectorElement::globalPositionCLHEP(const Amg::Vector2D &localPos) const { - if (!m_cacheValid) updateCache(); std::lock_guard<std::recursive_mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); return m_centerCLHEP + localPos[Trk::distEta] * m_etaAxisCLHEP + localPos[Trk::distPhi] * m_phiAxisCLHEP; } //here @@ -695,15 +697,16 @@ namespace InDetDD { inline Amg::Vector2D SiDetectorElement::localPosition(const HepGeom::Point3D<double> & globalPosition) const { - if (!m_cacheValid) updateCache(); std::lock_guard<std::recursive_mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); HepGeom::Vector3D<double> relativePos = globalPosition - m_centerCLHEP; return Amg::Vector2D(relativePos.dot(m_phiAxisCLHEP), relativePos.dot(m_etaAxisCLHEP)); } - inline Amg::Vector2D SiDetectorElement::localPosition(const Amg::Vector3D & globalPosition) const{ - if (!m_cacheValid) updateCache(); + inline Amg::Vector2D SiDetectorElement::localPosition(const Amg::Vector3D & globalPosition) const + { std::lock_guard<std::recursive_mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); Amg::Vector3D relativePos = globalPosition - m_center; return Amg::Vector2D(relativePos.dot(m_phiAxis), relativePos.dot(m_etaAxis)); } @@ -765,7 +768,7 @@ namespace InDetDD { inline void SiDetectorElement::updateAllCaches() const { if (!m_cacheValid) updateCache(); - if (!m_surface) surface(); + if (not m_surface) surface(); } diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SurfaceCache.h b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SurfaceCache.h index 8c112a5b97cac3e7074b1f006d8c1cff73490367..07e3e24584765e7fd05f21d95afe8a97ea4615e7 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SurfaceCache.h +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SurfaceCache.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -49,13 +49,13 @@ namespace InDetDD { ///delete assignment SurfaceCache & operator = (const SurfaceCache &) = delete; - const Amg::Transform3D* transform() {return (m_transform);} + const Amg::Transform3D* transform() const {return (m_transform);} - const Amg::Vector3D* center() {return (m_center);} + const Amg::Vector3D* center() const {return (m_center);} - const Amg::Vector3D* normal() {return (m_normal);} + const Amg::Vector3D* normal() const {return (m_normal);} - const Trk::SurfaceBounds* bounds() {return (m_bounds);} + const Trk::SurfaceBounds* bounds() const {return (m_bounds);} private: diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_BarrelDescriptor.h b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_BarrelDescriptor.h index 244ff8ec08b3e208eea72f22f7f442ac2819a8a7..c9c0c73e17f12adae75e7e495d41332d48bd1749 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_BarrelDescriptor.h +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_BarrelDescriptor.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -10,8 +10,9 @@ #ifndef TRT_BarrelDescriptor_h #define TRT_BarrelDescriptor_h 1 -#include "GeoPrimitives/GeoPrimitives.h" #include "GeoModelKernel/RCBase.h" +#include "CxxUtils/CachedUniquePtr.h" +#include "GeoPrimitives/GeoPrimitives.h" #include "GeoModelKernel/GeoXF.h" #include <vector> @@ -92,7 +93,7 @@ namespace InDetDD { protected: - virtual ~TRT_BarrelDescriptor(); + virtual ~TRT_BarrelDescriptor() = default; private: @@ -108,8 +109,7 @@ namespace InDetDD { const GeoXF::Function *m_f; size_t m_o; - mutable Trk::CylinderBounds * m_bounds; - + CxxUtils::CachedUniquePtr<Trk::CylinderBounds> m_bounds; }; } #include "TRT_BarrelDescriptor.icc" diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_BarrelElement.h b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_BarrelElement.h index fcd4d0a8b427ac47fbb83626e7bb63fa98ab0872..4ef4b18957f6870fa662ac312d9bd4887b962c0f 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_BarrelElement.h +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_BarrelElement.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -13,6 +13,7 @@ #include "InDetReadoutGeometry/TRT_BarrelCode.h" #include "InDetReadoutGeometry/TRT_BarrelDescriptor.h" #include "InDetReadoutGeometry/TRT_BaseElement.h" +#include <atomic> class TRT_ID; @@ -149,9 +150,6 @@ namespace InDetDD { const TRT_BarrelElement *m_previousInPhi; const TRT_BarrelElement *m_nextInR; const TRT_BarrelElement *m_previousInR; - - mutable Trk::Surface* m_surface; - }; diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_BaseElement.h b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_BaseElement.h index a59add9b67b6c009de8bd3e0e0fdf357f3610a62..9212062630613c8552fe009f8fa0b90245ef0665 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_BaseElement.h +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_BaseElement.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -13,6 +13,9 @@ #include "TrkDetElementBase/TrkDetElementBase.h" +#include "CxxUtils/CachedUniquePtr.h" +#include "CxxUtils/checker_macros.h" + #include "Identifier/IdentifierHash.h" #include "Identifier/Identifier.h" @@ -20,6 +23,8 @@ #include "CLHEP/Geometry/Transform3D.h" #include "CLHEP/Geometry/Point3D.h" +#include <atomic> +#include <mutex> #include <vector> namespace Trk { @@ -214,6 +219,9 @@ namespace InDetDD { /** Helper method for cache dealing */ void deleteCache() const; + void createStrawSurfaces() const; + void createStrawSurfacesCache() const; + protected: Identifier m_id; @@ -222,15 +230,16 @@ namespace InDetDD { const TRT_Conditions* m_conditions; // Amg cache for the straw surfaces - mutable std::vector<Trk::StraightLineSurface*>* m_strawSurfaces; - mutable std::vector<SurfaceCache*>* m_strawSurfacesCache; + mutable std::atomic<std::vector<Trk::StraightLineSurface*>*> m_strawSurfaces; + mutable std::atomic<std::vector<SurfaceCache*>*> m_strawSurfacesCache; //!< helper element surface for the cache - mutable SurfaceCache* m_surfaceCache; + CxxUtils::CachedUniquePtr<SurfaceCache> m_surfaceCache; - mutable Trk::Surface * m_surface; - mutable std::vector<const Trk::Surface*> m_surfaces; + CxxUtils::CachedUniquePtr<Trk::Surface> m_surface; + mutable std::vector<const Trk::Surface*> m_surfaces ATLAS_THREAD_SAFE; // Guarded by m_mutex + mutable std::mutex m_mutex; }; } diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_Conditions.h b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_Conditions.h index fd3d53b578a62cc4ac78a90a379aeada54d5e74d..be435ec9657bdf13a5c1f20cd85efaadfcb332ca 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_Conditions.h +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_Conditions.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -11,10 +11,13 @@ #ifndef INDETREADOUTGEOMETRY_TRT_CONDITIONS_H #define INDETREADOUTGEOMETRY_TRT_CONDITIONS_H -#include "GeoPrimitives/GeoPrimitives.h" #include "GeoModelKernel/RCBase.h" +#include "CxxUtils/checker_macros.h" +#include "GeoPrimitives/GeoPrimitives.h" #include "CLHEP/Geometry/Transform3D.h" +#include <mutex> + namespace TRTCond { class StrawDxContainer; } @@ -39,9 +42,10 @@ namespace InDetDD { void setSolenoidFrame(const HepGeom::Transform3D & frame); private: - mutable const TRTCond::StrawDxContainer* m_dxContainer; - mutable HepGeom::Transform3D m_solenoidFrame; - + const TRTCond::StrawDxContainer* m_dxContainer; + mutable HepGeom::Transform3D m_solenoidFrame ATLAS_THREAD_SAFE; // Guarded by m_mutex + mutable std::mutex m_mutex; + }; } // end namespace diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_EndcapDescriptor.h b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_EndcapDescriptor.h index a6edf251a9cf89fa09ba9497765cb8ee24e98645..394a9c1adf89330edb1520553dfa5e14755cca59 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_EndcapDescriptor.h +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_EndcapDescriptor.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -10,8 +10,9 @@ #ifndef TRT_EndcapDescriptor_h #define TRT_EndcapDescriptor_h 1 -#include "GeoPrimitives/GeoPrimitives.h" #include "GeoModelKernel/RCBase.h" +#include "CxxUtils/CachedUniquePtr.h" +#include "GeoPrimitives/GeoPrimitives.h" #include "GeoModelKernel/GeoXF.h" namespace Trk{ @@ -73,7 +74,7 @@ namespace InDetDD { protected: - virtual ~TRT_EndcapDescriptor(); + virtual ~TRT_EndcapDescriptor() = default; private: @@ -111,8 +112,7 @@ namespace InDetDD { size_t m_o; // Bounds - mutable Trk::CylinderBounds * m_bounds; - + CxxUtils::CachedUniquePtr<Trk::CylinderBounds> m_bounds; }; } diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_EndcapElement.h b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_EndcapElement.h index 10fe067ac08385fa23abbbc4c53d853f2fc49663..351c969d8a2e300a8e9e536350ccaa854aabf597 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_EndcapElement.h +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_EndcapElement.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -13,6 +13,7 @@ #include "InDetReadoutGeometry/TRT_EndcapCode.h" #include "InDetReadoutGeometry/TRT_BaseElement.h" #include "InDetReadoutGeometry/TRT_EndcapDescriptor.h" +#include <atomic> class TRT_ID; @@ -125,9 +126,6 @@ namespace InDetDD { const TRT_EndcapDescriptor *m_descriptor; const TRT_EndcapElement *m_nextInZ; const TRT_EndcapElement *m_previousInZ; - - mutable Trk::Surface * m_surface; - }; } diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/InDetDetectorManager.cxx b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/InDetDetectorManager.cxx index 090b5e9d86c01629875544c017ec98726eb23702..ae8514eb2cef70331012c42f192b7bbe102171c3 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/InDetDetectorManager.cxx +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/InDetDetectorManager.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ @@ -86,10 +86,9 @@ namespace InDetDD // Return the level in the hierarchy (user defined) corresponding to the key. const InDetDetectorManager::LevelInfo& InDetDetectorManager::getLevel(const std::string & key) const { - static LevelInfo invalidLevel; std::map<std::string, LevelInfo>::const_iterator iter; iter = m_keys.find(key); - if (iter == m_keys.end()) return invalidLevel; + if (iter == m_keys.end()) return s_invalidLevel; return iter->second; } @@ -440,5 +439,6 @@ namespace InDetDD return false; } + const InDetDetectorManager::LevelInfo InDetDetectorManager::s_invalidLevel; } // namespace InDetDD diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/PixelDetectorManager.cxx b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/PixelDetectorManager.cxx index 1272a3136a65456d4ced36c09b0b0a504ca78875..9139354154ec9b80da2f56c320456ed137118dbe 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/PixelDetectorManager.cxx +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/PixelDetectorManager.cxx @@ -421,8 +421,7 @@ namespace InDetDD { Amg::Transform3D shift = Amg::Translation3D(basex+bowx,0,0) * Amg::RotationMatrix3D::Identity(); const AlignableTransform* cpat = *pat; - AlignableTransform *pat_update=const_cast<AlignableTransform*>(cpat); - AlignableTransform::AlignTransMem_citr this_trans=pat_update->findIdent(trans_iter->identify()); + AlignableTransform::AlignTransMem_citr this_trans=cpat->findIdent(trans_iter->identify()); HepGeom::Transform3D newtrans = Amg::EigenTransformToCLHEP(shift)*this_trans->transform(); /** Verbose level debug section for transforms **/ diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/PixelModuleDesign.cxx b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/PixelModuleDesign.cxx index 573c1cf92e9a239533da66c934c010067632d191..5b874a21196fcefff83c6f31bde7ccf6cf61c32d 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/PixelModuleDesign.cxx +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/PixelModuleDesign.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -46,16 +46,9 @@ PixelModuleDesign::PixelModuleDesign(const double thickness, m_readoutScheme(circuitsPerColumn,circuitsPerRow, cellColumnsPerCircuit,cellRowsPerCircuit, diodeColumnsPerCircuit,diodeRowsPerCircuit), - m_bounds(0), + m_bounds(), m_is3D(is3D) { - // m_bounds = new Trk::RectangleBounds(0.5*width(), 0.5*length()); -} - -// Destructor: -PixelModuleDesign::~PixelModuleDesign() -{ - delete m_bounds; } // Returns distance to nearest detector edge @@ -231,7 +224,7 @@ PixelModuleDesign::bounds() const { // We create on demand as width and length are 0 when PixeModuleDesign first gets // created. - if (!m_bounds) m_bounds = new Trk::RectangleBounds(0.5*width(), 0.5*length()); + if (not m_bounds) m_bounds.set(std::make_unique<Trk::RectangleBounds>(0.5*width(), 0.5*length())); return *m_bounds; } diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiCommonItems.cxx b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiCommonItems.cxx index 9df5ae1d295cac4047d90c57b2f6244b04ed9207..46e095a29d9649716d3692343a8904fa109a7aa8 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiCommonItems.cxx +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiCommonItems.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "InDetReadoutGeometry/SiCommonItems.h" @@ -9,12 +9,14 @@ namespace InDetDD { SiCommonItems::SiCommonItems(const AtlasDetectorID* const idHelper) : m_msg("SiDetectorElement"), m_idHelper(idHelper), - m_lorentzAngleTool(nullptr) + m_lorentzAngleTool(nullptr), + m_mutex{} {} void SiCommonItems::setSolenoidFrame(const HepGeom::Transform3D & transform) const { + std::lock_guard<std::mutex> lock{m_mutex}; m_solenoidFrame = transform; } diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorElement.cxx b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorElement.cxx index 1369b8dae36f1b2a53b104b5da64d320acbae09f..bf87647bbb2ee913a1491ad6d30020bdc8b326ab 100644 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorElement.cxx +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorElement.cxx @@ -63,7 +63,7 @@ SiDetectorElement::SiDetectorElement(const Identifier &id, m_firstTime(true), m_isStereo(false), m_mutex(), - m_surface(nullptr), + m_surface{}, m_surfaces{}, m_geoAlignStore(geoAlignStore) { @@ -86,7 +86,7 @@ SiDetectorElement::SiDetectorElement(const Identifier &id, m_hitDepth = m_design->depthAxis(); /// - commonConstructor(); + commonConstructor(); } void @@ -137,13 +137,10 @@ SiDetectorElement::commonConstructor() // Destructor: SiDetectorElement::~SiDetectorElement() { - delete m_surface; - // The design is reference counted so that it will not be deleted until the last element is deleted. m_design->unref(); m_commonItems->unref(); - } void @@ -381,19 +378,17 @@ SiDetectorElement::transformHit() const const Amg::Transform3D & SiDetectorElement::transform() const { - if (!m_cacheValid) updateCache(); std::lock_guard<std::recursive_mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); return m_transform; } const HepGeom::Transform3D & SiDetectorElement::transformCLHEP() const { - //if (!m_cacheValid) updateCache(); - //return m_transform; //stuff to get the CLHEP version of the local to global transform. - if (!m_cacheValid) updateCache(); std::lock_guard<std::recursive_mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); return m_transformCLHEP; } @@ -507,48 +502,48 @@ SiDetectorElement::isModuleFrame() const const Amg::Vector3D & SiDetectorElement::center() const { - if (!m_cacheValid) updateCache(); std::lock_guard<std::recursive_mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); return m_center; } const Amg::Vector3D & SiDetectorElement::normal() const { - if (!m_cacheValid) updateCache(); std::lock_guard<std::recursive_mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); return m_normal; } const HepGeom::Vector3D<double> & SiDetectorElement::etaAxisCLHEP() const { - if (!m_cacheValid) updateCache(); std::lock_guard<std::recursive_mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); return m_etaAxisCLHEP; } const HepGeom::Vector3D<double> & SiDetectorElement::phiAxisCLHEP() const { - if (!m_cacheValid) updateCache(); std::lock_guard<std::recursive_mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); return m_phiAxisCLHEP; } const Amg::Vector3D & SiDetectorElement::etaAxis() const { - if (!m_cacheValid) updateCache(); std::lock_guard<std::recursive_mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); return m_etaAxis; } const Amg::Vector3D & SiDetectorElement::phiAxis() const { - if (!m_cacheValid) updateCache(); std::lock_guard<std::recursive_mutex> lock(m_mutex); + if (!m_cacheValid) updateCache(); return m_phiAxis; } @@ -629,6 +624,7 @@ bool SiDetectorElement::isNextToInnermostPixelLayer() const // compute sin(tilt angle) at center: double SiDetectorElement::sinTilt() const { + std::lock_guard<std::recursive_mutex> lock(m_mutex); if (!m_cacheValid) updateCache(); // Tilt is defined as the angle between a refVector and the sensor normal. @@ -643,7 +639,6 @@ double SiDetectorElement::sinTilt() const // HepGeom::Vector3D<double> refVector(m_center.x(), m_center.y(), 0); // return (refVector.cross(m_normal)).z()/refVector.mag(); // or the equivalent - std::lock_guard<std::recursive_mutex> lock(m_mutex); return (m_center.x() * m_normal.y() - m_center.y() * m_normal.x()) / m_center.perp(); } @@ -660,6 +655,7 @@ double SiDetectorElement::sinTilt() const double SiDetectorElement::sinTilt(const HepGeom::Point3D<double> &globalPos) const { + std::lock_guard<std::recursive_mutex> lock(m_mutex); if (!m_cacheValid) updateCache(); // It is assumed that the global position is already in the plane of the element. @@ -667,7 +663,6 @@ double SiDetectorElement::sinTilt(const HepGeom::Point3D<double> &globalPos) con // tilt angle is not defined for the endcap if (isEndcap()) return 0; - std::lock_guard<std::recursive_mutex> lock(m_mutex); // Angle between normal and radial vector. //HepGeom::Vector3D<double> refVector(globalPos.x(), globalPos.y(), 0); //return (refVector.cross(m_normal)).z()/refVector.mag(); @@ -677,7 +672,7 @@ double SiDetectorElement::sinTilt(const HepGeom::Point3D<double> &globalPos) con double SiDetectorElement::sinStereo() const { - + std::lock_guard<std::recursive_mutex> lock(m_mutex); if (!m_cacheValid) updateCache(); // Stereo is the angle between a refVector and a vector along the strip/pixel in eta direction. @@ -702,7 +697,6 @@ double SiDetectorElement::sinStereo() const // = -(center cross etaAxis) . zAxis // = (etaAxis cross center). z() - std::lock_guard<std::recursive_mutex> lock(m_mutex); double sinStereo; if (isBarrel()) { sinStereo = m_phiAxis.z(); @@ -726,9 +720,9 @@ double SiDetectorElement::sinStereo(const HepGeom::Point3D<double> &globalPos) c // sinStereo = (refVector cross stripAxis) . normal // + std::lock_guard<std::recursive_mutex> lock(m_mutex); if (!m_cacheValid) updateCache(); - std::lock_guard<std::recursive_mutex> lock(m_mutex); double sinStereo; if (isBarrel()) { if (m_design->shape() != InDetDD::Trapezoid) { @@ -795,9 +789,7 @@ SiDetectorElement::sinStereoLocal(const HepGeom::Point3D<double> &globalPos) con const Trk::Surface & SiDetectorElement::surface() const { - if (!m_surface) { - m_surface = new Trk::PlaneSurface(*this); - } + if (not m_surface) m_surface.set(std::make_unique<Trk::PlaneSurface>(*this)); return *m_surface; } diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/TRT_BarrelDescriptor.cxx b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/TRT_BarrelDescriptor.cxx index d6ed3d40064f3bbf9963c610bf0e92cca74d2628..7e071c0dbef33baa6e8b6df7ee302ee0783683ec 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/TRT_BarrelDescriptor.cxx +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/TRT_BarrelDescriptor.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "InDetReadoutGeometry/TRT_BarrelDescriptor.h" @@ -17,18 +17,10 @@ TRT_BarrelDescriptor::TRT_BarrelDescriptor() m_innerTubeRadius(2*CLHEP::mm), // FIXME: Hardwired for now!! m_f(NULL), m_o(0), - m_bounds(0) - -{ -} - - -TRT_BarrelDescriptor::~TRT_BarrelDescriptor() + m_bounds() { - delete m_bounds; } - void TRT_BarrelDescriptor::addStraw(double xPos, double yPos) { m_x.push_back(xPos); @@ -45,7 +37,7 @@ void TRT_BarrelDescriptor::setStrawTransformField(const GeoXF::Function *xf, siz const Trk::SurfaceBounds & TRT_BarrelDescriptor::strawBounds() const { - if (!m_bounds) m_bounds = new Trk::CylinderBounds(m_innerTubeRadius, 0.5*m_length); + if (not m_bounds) m_bounds.set(std::make_unique<Trk::CylinderBounds>(m_innerTubeRadius, 0.5*m_length)); return *m_bounds; } diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/TRT_BarrelElement.cxx b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/TRT_BarrelElement.cxx index e44a52697d0ef947a756c29857e2305552ea19e4..834d334c72e54fb2e2d34b15dfca324e33d3228f 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/TRT_BarrelElement.cxx +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/TRT_BarrelElement.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "Identifier/Identifier.h" @@ -36,9 +36,7 @@ TRT_BarrelElement::TRT_BarrelElement(const GeoVFullPhysVol *volume, m_nextInPhi(NULL), m_previousInPhi(NULL), m_nextInR(NULL), - m_previousInR(NULL), - m_surface(0) - + m_previousInR(NULL) { m_descriptor->ref(); } @@ -47,7 +45,6 @@ TRT_BarrelElement::TRT_BarrelElement(const GeoVFullPhysVol *volume, TRT_BarrelElement::~TRT_BarrelElement() { m_descriptor->unref(); - delete m_surface; } @@ -171,7 +168,7 @@ const Trk::SurfaceBounds& TRT_BarrelElement::strawBounds() const const Trk::Surface& TRT_BarrelElement::elementSurface() const { - if (!m_surface) m_surface = new Trk::PlaneSurface(*this); + if (not m_surface) m_surface.set(std::make_unique<Trk::PlaneSurface>(*this)); return *m_surface; } @@ -222,10 +219,10 @@ void TRT_BarrelElement::createSurfaceCache() const // create the element bounds Trk::RectangleBounds * elementBounds = new Trk::RectangleBounds(0.5*elementWidth, 0.5*strawLength()); // create the surface cache - m_surfaceCache = new SurfaceCache(transform, center, normal, elementBounds); - // creaete the surface (only if needed, links are still ok even if cache update) - if (!m_surface) m_surface = new Trk::PlaneSurface(*this); + m_surfaceCache.set(std::make_unique<SurfaceCache>(transform, center, normal, elementBounds)); + // creaete the surface (only if needed, links are still ok even if cache update) + if (not m_surface) elementSurface(); } diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/TRT_BaseElement.cxx b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/TRT_BaseElement.cxx index b4fd30cbe943d141c60d9a44679cb38fd60bbf28..e7408f3bf2356aa2fdcab8d04062f914ea96d5e3 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/TRT_BaseElement.cxx +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/TRT_BaseElement.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "InDetReadoutGeometry/SurfaceCache.h" @@ -28,9 +28,10 @@ namespace InDetDD { m_conditions(conditions), m_strawSurfaces(nullptr), m_strawSurfacesCache(nullptr), - m_surfaceCache(nullptr), - m_surface(nullptr), - m_surfaces{} + m_surfaceCache{}, + m_surface{}, + m_surfaces{}, + m_mutex{} { m_idHash = m_idHelper->straw_layer_hash(id); m_conditions->ref(); @@ -60,26 +61,26 @@ namespace InDetDD { const Trk::SurfaceBounds& TRT_BaseElement::bounds() const { - if (!m_surfaceCache) createSurfaceCache(); + if (not m_surfaceCache) createSurfaceCache(); return *(m_surfaceCache->bounds()); } const Amg::Transform3D& TRT_BaseElement::transform() const { - if (!m_surfaceCache) createSurfaceCache(); + if (not m_surfaceCache) createSurfaceCache(); return *(m_surfaceCache->transform()); } const Amg::Vector3D& TRT_BaseElement::center() const { - if (!m_surfaceCache) createSurfaceCache(); + if (not m_surfaceCache) createSurfaceCache(); return *(m_surfaceCache->center()); } const Amg::Vector3D& TRT_BaseElement::normal() const { - if (!m_surfaceCache) createSurfaceCache(); + if (not m_surfaceCache) createSurfaceCache(); return *(m_surfaceCache->normal()); } @@ -88,8 +89,7 @@ namespace InDetDD { { int straw = m_idHelper->straw(id); // Create vector of all straws. - if (!m_strawSurfaces) - m_strawSurfaces = new std::vector<Trk::StraightLineSurface*>(nStraws(), 0); + if (!m_strawSurfaces) createStrawSurfaces(); Trk::Surface * surfacePtr = (*m_strawSurfaces)[straw]; if (!surfacePtr) { createSurfaceCache(id); @@ -101,6 +101,7 @@ namespace InDetDD { const std::vector<const Trk::Surface*>& TRT_BaseElement::surfaces() const { + std::lock_guard<std::mutex> lock{m_mutex}; if (!m_surfaces.size()){ m_surfaces.reserve(nStraws()); for (unsigned is = 0; is<nStraws(); ++is) @@ -118,7 +119,7 @@ namespace InDetDD { const Amg::Transform3D& TRT_BaseElement::transform(const Identifier & id) const { int straw = m_idHelper->straw(id); - if (!m_strawSurfacesCache) m_strawSurfacesCache = new std::vector<SurfaceCache*>(nStraws(), 0); + if (!m_strawSurfacesCache) createStrawSurfacesCache(); SurfaceCache* sCachePtr = (*m_strawSurfacesCache)[straw]; if (!sCachePtr) { createSurfaceCache(id); @@ -130,7 +131,7 @@ namespace InDetDD { const Amg::Transform3D& TRT_BaseElement::strawTransform(unsigned int straw) const { - if (!m_strawSurfacesCache) m_strawSurfacesCache = new std::vector<SurfaceCache*>(nStraws(), 0); + if (!m_strawSurfacesCache) createStrawSurfacesCache(); SurfaceCache* sCachePtr = (*m_strawSurfacesCache)[straw]; if (!sCachePtr) { Identifier id = m_idHelper->straw_id(identify(), straw); @@ -154,7 +155,7 @@ namespace InDetDD { const Amg::Vector3D& TRT_BaseElement::center(const Identifier & id) const { int straw = m_idHelper->straw(id); - if (!m_strawSurfacesCache) m_strawSurfacesCache = new std::vector<SurfaceCache*>(nStraws(), 0); + if (!m_strawSurfacesCache) createStrawSurfacesCache(); SurfaceCache* sCachePtr = (*m_strawSurfacesCache)[straw]; if (!sCachePtr) { createSurfaceCache(id); @@ -167,8 +168,7 @@ namespace InDetDD { const Trk::StraightLineSurface& TRT_BaseElement::strawSurface(int straw) const { // Create vector of all straws. - if (!m_strawSurfaces) - m_strawSurfaces = new std::vector<Trk::StraightLineSurface *>(nStraws(), 0); + if (!m_strawSurfaces) createStrawSurfaces(); Trk::StraightLineSurface* surfacePtr = (*m_strawSurfaces)[straw]; if (!surfacePtr) { // get the straw identifier to the given straw number and element identifier @@ -181,7 +181,7 @@ namespace InDetDD { const Amg::Transform3D& TRT_BaseElement::strawTransform(int straw) const { - if (!m_strawSurfacesCache) m_strawSurfacesCache = new std::vector<SurfaceCache*>(nStraws(), 0); + if (!m_strawSurfacesCache) createStrawSurfacesCache(); SurfaceCache* sCachePtr = (*m_strawSurfacesCache)[straw]; if (!sCachePtr) { Identifier id = m_idHelper->straw_id(identify(), straw); @@ -194,7 +194,7 @@ namespace InDetDD { const Amg::Vector3D& TRT_BaseElement::strawCenter(int straw) const { - if (!m_strawSurfacesCache) m_strawSurfacesCache = new std::vector<SurfaceCache*>(nStraws(), 0); + if (!m_strawSurfacesCache) createStrawSurfacesCache(); SurfaceCache* sCachePtr = (*m_strawSurfacesCache)[straw]; if (!sCachePtr) { Identifier id = m_idHelper->straw_id(identify(), straw); @@ -215,7 +215,7 @@ namespace InDetDD { const HepGeom::Transform3D TRT_BaseElement::transformCLHEP() const { - return Amg::EigenTransformToCLHEP((*m_surfaceCache->transform())); + return Amg::EigenTransformToCLHEP(*(m_surfaceCache->transform())); } const HepGeom::Point3D<double> TRT_BaseElement::centerCLHEP() const @@ -260,8 +260,8 @@ namespace InDetDD { { // should not happen, but worth the protection - if (!m_strawSurfacesCache) m_strawSurfacesCache = new std::vector<SurfaceCache*>(nStraws(),0); - if (!m_strawSurfaces) m_strawSurfaces = new std::vector<Trk::StraightLineSurface*>(nStraws(), 0); + if (!m_strawSurfacesCache) createStrawSurfacesCache(); + if (!m_strawSurfaces) createStrawSurfaces(); int straw = m_idHelper->straw(id); @@ -300,17 +300,13 @@ namespace InDetDD { // for all straws if (m_strawSurfacesCache) { - for (size_t i=0; i<m_strawSurfacesCache->size(); i++) { + for (size_t i=0; i<m_strawSurfacesCache.load()->size(); i++) { delete (*m_strawSurfacesCache)[i]; (*m_strawSurfacesCache)[i] = 0; } } delete m_strawSurfacesCache; m_strawSurfacesCache = 0; - - // for the element surface - delete m_surfaceCache; - m_surfaceCache = 0; } @@ -319,7 +315,7 @@ namespace InDetDD { // delete the caches first deleteCache(); // Strawlayer caches - if (!m_surfaceCache) createSurfaceCache(); + if (not m_surfaceCache) createSurfaceCache(); // Loop over all straws and request items that get cached. for (unsigned int iStraw=0; iStraw < nStraws(); iStraw++) { Identifier strawId = m_idHelper->straw_id(identify(),iStraw); @@ -339,7 +335,7 @@ namespace InDetDD { { // delete the information about the straws if (m_strawSurfaces) { - for (size_t i=0; i<m_strawSurfaces->size(); i++) { + for (size_t i=0; i<m_strawSurfaces.load()->size(); i++) { delete (*m_strawSurfaces)[i]; } } @@ -350,5 +346,25 @@ namespace InDetDD { } + void TRT_BaseElement::createStrawSurfaces() const { + if (m_strawSurfaces!=nullptr) return; + std::vector<Trk::StraightLineSurface*>* expected{nullptr}; + std::vector<Trk::StraightLineSurface*>* desired{new std::vector<Trk::StraightLineSurface*>(nStraws(), 0)}; + if (not m_strawSurfaces.compare_exchange_strong(expected, desired)) { + // This happens if more than one threads try to set m_strawSurfaces. + delete desired; + desired = nullptr; + } + } + void TRT_BaseElement::createStrawSurfacesCache() const { + if (m_strawSurfacesCache!=nullptr) return; + std::vector<SurfaceCache*>* expected{nullptr}; + std::vector<SurfaceCache*>* desired{new std::vector<SurfaceCache*>(nStraws(), 0)}; + if (not m_strawSurfacesCache.compare_exchange_strong(expected, desired)) { + // This happens if more than one threads try to set m_strawSurfaces. + delete desired; + desired = nullptr; + } + } } diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/TRT_Conditions.cxx b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/TRT_Conditions.cxx index ac5974f9876776e127434bf86cdca341ced76359..bf1fbd4fec6ac0a1c02b5de7dec8fee9562758f9 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/TRT_Conditions.cxx +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/TRT_Conditions.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "InDetReadoutGeometry/TRT_Conditions.h" @@ -7,7 +7,8 @@ namespace InDetDD { TRT_Conditions::TRT_Conditions() - : m_dxContainer(0) + : m_dxContainer(0), + m_mutex{} {} const TRTCond::StrawDxContainer* @@ -25,12 +26,16 @@ TRT_Conditions::setDxContainer(const TRTCond::StrawDxContainer* container) const HepGeom::Transform3D & TRT_Conditions::solenoidFrame() const { + std::lock_guard<std::mutex> lock{m_mutex}; return m_solenoidFrame; + // This reference might be changed by setSolenoidFrame. + // However, it occurrs very rarely. } void TRT_Conditions::setSolenoidFrame(const HepGeom::Transform3D & frame) { + std::lock_guard<std::mutex> lock{m_mutex}; m_solenoidFrame = frame; } diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/TRT_DetectorManager.cxx b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/TRT_DetectorManager.cxx index df691eebd2257b7fd2f5ba2cde1a3e576d35fd87..43f1ab2de4755001267d3af4f962deb340a07782 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/TRT_DetectorManager.cxx +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/TRT_DetectorManager.cxx @@ -363,7 +363,7 @@ namespace InDetDD { // Register the call back for this key and the corresponding level in // in the hierarchy. // DEPRECATED - void TRT_DetectorManager::addKey(const std::string & key, int level) + void TRT_DetectorManager::addKey ATLAS_NOT_THREAD_SAFE (const std::string & key, int level) { if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Registering alignmentCallback with key " << key << ", at level " << level diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/TRT_EndcapDescriptor.cxx b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/TRT_EndcapDescriptor.cxx index 205496e203937b54c8926b0252c3618d0e3edb86..fc31fde3b64ca10b7fdf6d213ee4cce11bfa6fb2 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/TRT_EndcapDescriptor.cxx +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/TRT_EndcapDescriptor.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "InDetReadoutGeometry/TRT_EndcapDescriptor.h" @@ -21,26 +21,16 @@ TRT_EndcapDescriptor::TRT_EndcapDescriptor(): m_innerTubeRadius(2*CLHEP::mm), // FIXME: Hardwired for now!! m_f(NULL), m_o(0), - m_bounds(0) + m_bounds() { } - -TRT_EndcapDescriptor::~TRT_EndcapDescriptor() -{ - delete m_bounds; -} - - - void TRT_EndcapDescriptor::setStrawTransformField(const GeoXF::Function *xf, size_t offsetInto) { m_f=xf; m_o=offsetInto; } - - unsigned int &TRT_EndcapDescriptor::nStraws() { return m_nStraws; } @@ -64,7 +54,7 @@ double & TRT_EndcapDescriptor::innerRadius() { const Trk::SurfaceBounds & TRT_EndcapDescriptor::strawBounds() const { - if (!m_bounds) m_bounds = new Trk::CylinderBounds(m_innerTubeRadius, 0.5*m_strawLength); + if (not m_bounds) m_bounds.set(std::make_unique<Trk::CylinderBounds>(m_innerTubeRadius, 0.5*m_strawLength)); return *m_bounds; } diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/TRT_EndcapElement.cxx b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/TRT_EndcapElement.cxx index c5637d308b56a475d283d09d610756780d9c660d..f4a344c78530eb2a0421b84f631b862c1699b43a 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/TRT_EndcapElement.cxx +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/TRT_EndcapElement.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "InDetReadoutGeometry/TRT_EndcapElement.h" @@ -38,9 +38,7 @@ namespace InDetDD { m_code(isPositive,wheelIndex,strawLayIndex,phiIndex), m_descriptor(descriptor), m_nextInZ(NULL), - m_previousInZ(NULL), - m_surface(0) - + m_previousInZ(NULL) { m_descriptor->ref(); } @@ -49,7 +47,6 @@ namespace InDetDD { TRT_EndcapElement::~TRT_EndcapElement() { m_descriptor->unref(); - delete m_surface; } unsigned int TRT_EndcapElement::nStraws() const @@ -203,7 +200,7 @@ namespace InDetDD { const Trk::Surface& TRT_EndcapElement::elementSurface() const { - if (!m_surface) m_surface = new Trk::DiscSurface(*this); + if (not m_surface) m_surface.set(std::make_unique<Trk::DiscSurface>(*this)); return *m_surface; } @@ -242,10 +239,9 @@ namespace InDetDD { Trk::DiscBounds* bounds = new Trk::DiscBounds(rMin, rMax, phiHalfWidth); Amg::Vector3D* center = new Amg::Vector3D(transform->translation()); Amg::Vector3D* normal = new Amg::Vector3D(transform->rotation().col(2)); - m_surfaceCache = new SurfaceCache(transform, center, normal, bounds); + m_surfaceCache.set(std::make_unique<SurfaceCache>(transform, center, normal, bounds)); // create the surface if needed - if (!m_surface) m_surface = new Trk::DiscSurface(*this); - + if (not m_surface) elementSurface(); } diff --git a/InnerDetector/InDetDetDescr/SCT_Cabling/CMakeLists.txt b/InnerDetector/InDetDetDescr/SCT_Cabling/CMakeLists.txt index 68a56b75fb64f2d542941b2308ce4366a1fbe4ad..3b8a853779c462889eb27c78d9d66fcdf9f479b1 100644 --- a/InnerDetector/InDetDetDescr/SCT_Cabling/CMakeLists.txt +++ b/InnerDetector/InDetDetDescr/SCT_Cabling/CMakeLists.txt @@ -14,7 +14,6 @@ atlas_depends_on_subdirs( PUBLIC Control/StoreGate Database/AthenaPOOL/AthenaPoolUtilities Database/CoraCool - Event/EventInfo InnerDetector/InDetDetDescr/InDetIdentifier Tools/PathResolver ) @@ -29,12 +28,12 @@ atlas_add_library( SCT_CablingLib PUBLIC_HEADERS SCT_Cabling PRIVATE_INCLUDE_DIRS ${COOL_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} LINK_LIBRARIES AthenaBaseComps Identifier GaudiKernel StoreGateLib SGtests - PRIVATE_LINK_LIBRARIES ${COOL_LIBRARIES} ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} AthenaPoolUtilities CoraCool EventInfo InDetIdentifier PathResolver ) + PRIVATE_LINK_LIBRARIES ${COOL_LIBRARIES} ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} AthenaPoolUtilities CoraCool InDetIdentifier PathResolver ) atlas_add_component( SCT_Cabling src/components/*.cxx INCLUDE_DIRS ${COOL_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} - LINK_LIBRARIES ${COOL_LIBRARIES} ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} AthenaBaseComps Identifier GaudiKernel StoreGateLib SGtests AthenaPoolUtilities CoraCool EventInfo InDetIdentifier PathResolver SCT_CablingLib ) + LINK_LIBRARIES ${COOL_LIBRARIES} ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} AthenaBaseComps Identifier GaudiKernel StoreGateLib SGtests AthenaPoolUtilities CoraCool InDetIdentifier PathResolver SCT_CablingLib ) atlas_add_test( TestSCT_CablingCfg SCRIPT share/TestSCT_CablingCfg.sh diff --git a/InnerDetector/InDetDetDescr/SCT_Cabling/SCT_Cabling/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetDetDescr/SCT_Cabling/SCT_Cabling/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..16a35b51952ee181a8743b4a88050dc22a9bbd1b --- /dev/null +++ b/InnerDetector/InDetDetDescr/SCT_Cabling/SCT_Cabling/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +InnerDetector/InDetDetDescr/SCT_Cabling diff --git a/InnerDetector/InDetDetDescr/SCT_Cabling/SCT_Cabling/SCT_OnlineId.h b/InnerDetector/InDetDetDescr/SCT_Cabling/SCT_Cabling/SCT_OnlineId.h index b8d328d9d431b8aeeeb2b3c5a6479684093f2482..73938ec07793746e68a81df5198d065fd1e39df2 100644 --- a/InnerDetector/InDetDetDescr/SCT_Cabling/SCT_Cabling/SCT_OnlineId.h +++ b/InnerDetector/InDetDetDescr/SCT_Cabling/SCT_Cabling/SCT_OnlineId.h @@ -58,7 +58,7 @@ public: unsigned int index() const; ///Is the rod in range? - static bool rodIdInRange(std::uint32_t r); + bool rodIdInRange(std::uint32_t r) const; ///constants for evaluating hash indices of the online id. The hashing formula is in 'index()' enum { diff --git a/InnerDetector/InDetDetDescr/SCT_Cabling/share/TestSCT_Cabling.py b/InnerDetector/InDetDetDescr/SCT_Cabling/share/TestSCT_Cabling.py index 7683b8f135c29ba4ac05aa37493baed79d4a757d..d6ba8f8021cbeb3d99ff4e45bb2c761db4e864d6 100644 --- a/InnerDetector/InDetDetDescr/SCT_Cabling/share/TestSCT_Cabling.py +++ b/InnerDetector/InDetDetDescr/SCT_Cabling/share/TestSCT_Cabling.py @@ -33,14 +33,12 @@ print globalflags #-------------------------------------------------------------- # --- switch on InnerDetector from AthenaCommon.DetFlags import DetFlags -DetFlags.ID_setOn() +DetFlags.ID_setOff() DetFlags.Calo_setOff() DetFlags.Muon_setOff() DetFlags.Truth_setOff() DetFlags.LVL1_setOff() DetFlags.SCT_setOn() -DetFlags.pixel_setOff() -DetFlags.TRT_setOff() # ---- switch parts of ID off/on as follows #switch off tasks diff --git a/InnerDetector/InDetDetDescr/SCT_Cabling/share/TestSCT_CablingSimple.py b/InnerDetector/InDetDetDescr/SCT_Cabling/share/TestSCT_CablingSimple.py index 56cf8e9fea94f37c99aabd02eead2143a6c4361d..4bbf11d7d773c9798442e48b58d894d2dbba3372 100644 --- a/InnerDetector/InDetDetDescr/SCT_Cabling/share/TestSCT_CablingSimple.py +++ b/InnerDetector/InDetDetDescr/SCT_Cabling/share/TestSCT_CablingSimple.py @@ -52,14 +52,12 @@ globalflags.DataSource="geant4" #-------------------------------------------------------------- # --- switch on InnerDetector from AthenaCommon.DetFlags import DetFlags -DetFlags.ID_setOn() +DetFlags.ID_setOff() DetFlags.Calo_setOff() DetFlags.Muon_setOff() DetFlags.Truth_setOff() DetFlags.LVL1_setOff() DetFlags.SCT_setOn() -DetFlags.pixel_setOff() -DetFlags.TRT_setOff() # ---- switch parts of ID off/on as follows #switch off tasks diff --git a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingCondAlgFromCoraCool.cxx b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingCondAlgFromCoraCool.cxx index 14f536d62b68eb5377ee2be8c773ff7d88f04477..95987730032e820f053db1f528a7d175bca7f837 100644 --- a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingCondAlgFromCoraCool.cxx +++ b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingCondAlgFromCoraCool.cxx @@ -171,7 +171,8 @@ namespace { // Constructor SCT_CablingCondAlgFromCoraCool::SCT_CablingCondAlgFromCoraCool(const std::string& name, ISvcLocator* pSvcLocator): AthReentrantAlgorithm(name, pSvcLocator), - m_condSvc{"CondSvc", name} + m_condSvc{"CondSvc", name}, + m_idHelper{nullptr} { } @@ -196,6 +197,9 @@ SCT_CablingCondAlgFromCoraCool::initialize() { return StatusCode::FAILURE; } + // SCT_ID + ATH_CHECK(detStore()->retrieve(m_idHelper, "SCT_ID")); + // Read Cond Handle ATH_CHECK(m_readKeyRod.initialize()); ATH_CHECK(m_readKeyRodMur.initialize()); @@ -234,9 +238,6 @@ SCT_CablingCondAlgFromCoraCool::execute(const EventContext& ctx) const { return StatusCode::SUCCESS; } - const SCT_ID* idHelper{nullptr}; - ATH_CHECK(detStore()->retrieve(idHelper, "SCT_ID")); - // Determine the folders are Run2 or Run1 bool isRun2{m_readKeyRod.key()==rodFolderName2}; @@ -481,7 +482,7 @@ SCT_CablingCondAlgFromCoraCool::execute(const EventContext& ctx) const { ATH_MSG_WARNING("Invalid eta, phi..skipping insertion to map for module " << snString << " (may be already present in map)"); continue; } - Identifier offlineId{idHelper->wafer_id(bec,layer,phi,eta,side)}; + Identifier offlineId{m_idHelper->wafer_id(bec,layer,phi,eta,side)}; int link{rxLink[side]}; if (defaultLink==link) { link = (fibreOffset % fibresPerRod) + fibreInMur*2 + side; @@ -503,7 +504,7 @@ SCT_CablingCondAlgFromCoraCool::execute(const EventContext& ctx) const { ATH_MSG_WARNING(bec << " " << layer << " " << phi << " " << eta << " " << side); ATH_MSG_INFO("MUR, position " << mur << ", " << harnessPosition); } - IdentifierHash offlineIdHash{idHelper->wafer_hash(offlineId)}; + IdentifierHash offlineIdHash{m_idHelper->wafer_hash(offlineId)}; insert(offlineIdHash, onlineId, SCT_SerialNumber(sn), writeCdo.get()); numEntries++; } diff --git a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingCondAlgFromCoraCool.h b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingCondAlgFromCoraCool.h index bf2ff175ce717c9beea8752f889bb03862fb9185..c28e7de3ab1ad52c5e41c6bc6eeab378cbeae764 100644 --- a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingCondAlgFromCoraCool.h +++ b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingCondAlgFromCoraCool.h @@ -27,6 +27,9 @@ //STL includes #include <string> +//Forward declarations +class SCT_ID; + /** * @class SCT_CablingCondAlgFromCoraCool * @brief Service which fill the SCT Cabling from the database, using CoraCool. @@ -53,6 +56,7 @@ private: SG::WriteCondHandleKey<SCT_CablingData> m_writeKey{this, "WriteKey", "SCT_CablingData", "Key of output (derived) conditions folder"}; ServiceHandle<ICondSvc> m_condSvc; + const SCT_ID* m_idHelper; };//end of class #endif // SCT_CablingCondAlgFromCoraCool_H diff --git a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingCondAlgFromText.cxx b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingCondAlgFromText.cxx index ecba6f9bb07818872064e87bde3cd8ff9a01acf0..702cfc93adbcab4d9826980f655325fe6eeb222c 100644 --- a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingCondAlgFromText.cxx +++ b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingCondAlgFromText.cxx @@ -59,7 +59,8 @@ namespace { // Constructor SCT_CablingCondAlgFromText::SCT_CablingCondAlgFromText(const std::string& name, ISvcLocator* pSvcLocator): AthReentrantAlgorithm(name, pSvcLocator), - m_condSvc{"CondSvc", name} + m_condSvc{"CondSvc", name}, + m_idHelper{nullptr} { } @@ -74,6 +75,9 @@ SCT_CablingCondAlgFromText::initialize() { } ATH_MSG_INFO("Reading cabling from " << m_source.value()); + // SCT_ID + ATH_CHECK(detStore()->retrieve(m_idHelper, "SCT_ID")); + // CondSvc ATH_CHECK(m_condSvc.retrieve()); @@ -106,9 +110,6 @@ SCT_CablingCondAlgFromText::execute(const EventContext& ctx) const { return StatusCode::SUCCESS; } - const SCT_ID* idHelper{nullptr}; - ATH_CHECK(detStore()->retrieve(idHelper, "SCT_ID")); - // Construct the output Cond Object and fill it in std::unique_ptr<SCT_CablingData> writeCdo{std::make_unique<SCT_CablingData>()}; @@ -144,8 +145,8 @@ SCT_CablingCondAlgFromText::execute(const EventContext& ctx) const { dataLine.exceptions(std::ios_base::badbit|std::ios_base::failbit); try { dataLine>>rod>>Link>>barrelOrEndcap>>layer>>eta>>phi>>side>>std::hex>>robidFromfile>>std::dec>>sn; - offlineId = idHelper->wafer_id(barrelOrEndcap,layer,phi,eta,side); - offlineIdHash = idHelper->wafer_hash(offlineId); + offlineId = m_idHelper->wafer_id(barrelOrEndcap,layer,phi,eta,side); + offlineIdHash = m_idHelper->wafer_hash(offlineId); } catch (const std::ios_base::failure&) { ATH_MSG_ERROR("An error occurred while reading the cabling file " << m_source.value() << ", it may be badly formatted in the following line: \n" << inString); @@ -166,8 +167,8 @@ SCT_CablingCondAlgFromText::execute(const EventContext& ctx) const { } if (link==disabledFibre) { ATH_MSG_DEBUG(sn << ": Disabled fibre encountered in text file. Will attempt to place identifier using the other fibre."); - offlineId = idHelper->wafer_id(barrelOrEndcap,layer,phi,eta,side); - offlineIdHash = idHelper->wafer_hash(offlineId); + offlineId = m_idHelper->wafer_id(barrelOrEndcap,layer,phi,eta,side); + offlineIdHash = m_idHelper->wafer_hash(offlineId); disabledFibres.push_back(offlineIdHash); continue; } diff --git a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingCondAlgFromText.h b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingCondAlgFromText.h index d01a858f29b704a93da42dd619ebb896bf9631e2..c090ff163b821de040a9dac71dc5badc0fb31384 100644 --- a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingCondAlgFromText.h +++ b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingCondAlgFromText.h @@ -25,6 +25,9 @@ //STL includes #include <string> +//Forward declarations +class SCT_ID; + /** * @class SCT_CablingCondAlgFromText * @brief Service which fill the SCT Cabling from plain text (a file). @@ -47,6 +50,7 @@ private: SG::WriteCondHandleKey<SCT_CablingData> m_writeKey{this, "WriteKey", "SCT_CablingData", "Key of output (derived) conditions folder"}; ServiceHandle<ICondSvc> m_condSvc; + const SCT_ID* m_idHelper; };//end of class #endif // SCT_CablingCondAlgFromText_H diff --git a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingXmlTags.h b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingXmlTags.h index 89cde8dc5fdec350bb28b7fb1de539e2504376ef..d6c6d7dd66720eece63ed9aab56c3c70ca7fd1f2 100644 --- a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingXmlTags.h +++ b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_CablingXmlTags.h @@ -12,15 +12,14 @@ * @date 14/12/2014. * */ - + +#include "GaudiKernel/time_r.h" // localtime_r + +#include <ctime> // std::time_t, std::tm +#include <iomanip> // put_time #include <iostream> #include <string> #include <sstream> -#include <chrono> // chrono::system_clock -#include <ctime> // localtime -#include <iomanip> // put_time - - namespace SCT_Cabling{ const std::string XmlHeader("<?xml version=\"1.0\"?>"); @@ -55,14 +54,9 @@ namespace SCT_Cabling{ std::string dateTime(){ std::stringstream ss; - //no 'put_time' in gcc48 or gcc49 :-( - //ss << std::put_time(std::localtime(&in_time_t), "%Y-%m-%d %X"); - std::time_t t = std::time(NULL); - char mbstr[100]; - if (std::strftime(mbstr, sizeof(mbstr), "%Y-%m-%d", std::localtime(&t))) { - ss << mbstr; - } - + std::time_t t = std::time(nullptr); + std::tm lt; + ss << std::put_time(localtime_r(&t, <), "%Y-%m-%d %X"); return ss.str(); } std::string makeCablingFileName(){ diff --git a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_OnlineId.cxx b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_OnlineId.cxx index c1b55e48d42ed2f23a8715644e9c0aea6c8b5aff..d5f737e206913221be79247a08eb6f541bcb3013 100644 --- a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_OnlineId.cxx +++ b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_OnlineId.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /* * SCT_OnlineId.cxx @@ -90,7 +90,7 @@ bool SCT_OnlineId::fibreInRange(std::uint32_t f) const{ } // -bool SCT_OnlineId::rodIdInRange(std::uint32_t r) { +bool SCT_OnlineId::rodIdInRange(std::uint32_t r) const { const std::uint32_t lowestRodId(0x210000); const std::uint32_t highestRodId=0x24010F; return ((r >=lowestRodId) and (r<=highestRodId)) ; diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/README b/InnerDetector/InDetDetDescr/SCT_GeoModel/README old mode 100755 new mode 100644 diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..1b1dbc1b881d45f6190bbe3cabcb4fc280323f92 --- /dev/null +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +InnerDetector/InDetDetDescr/SCT_GeoModel diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Barrel.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Barrel.h old mode 100755 new mode 100644 index 496da203672e3daed1571dc5aeda1af64d29b87f..8a58255181f7504ce714dec2098009d445e7c9c6 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Barrel.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Barrel.h @@ -1,12 +1,11 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_BARREL_H #define SCT_GEOMODEL_SCT_BARREL_H #include "SCT_GeoModel/SCT_ComponentFactory.h" -#include "AthenaKernel/MsgStreamMember.h" class GeoVPhysVol; class GeoFullPhysVol; @@ -17,8 +16,11 @@ class SCT_Barrel : public SCT_UniqueComponentFactory { public: - SCT_Barrel(const std::string & name); - virtual GeoVPhysVol * build(SCT_Identifier id) const; + SCT_Barrel(const std::string & name, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); + virtual GeoVPhysVol * build(SCT_Identifier id); public: int numLayers() const {return m_numLayers;} @@ -26,9 +28,6 @@ public: double outerRadius() const {return m_outerRadius;} double length() const {return m_length;} - MsgStream& msg( MSG::Level lvl ) const { return m_msg << lvl; } - bool msgLvl( MSG::Level lvl ) { return m_msg.get().level() <= lvl; } - private: void getParameters(); virtual const GeoLogVol * preBuild(); @@ -49,8 +48,6 @@ private: bool m_isOldGeometry; - mutable Athena::MsgStreamMember m_msg; - }; #endif // SCT_GEOMODEL_SCT_BARREL_H diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_BarrelModuleParameters.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_BarrelModuleParameters.h old mode 100755 new mode 100644 index 7b40a6ffa3cb396d781dd7b1ea84937e66205f5f..09b6190c4a12311bde0ba19f59ebf66685eb4003 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_BarrelModuleParameters.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_BarrelModuleParameters.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GeoModel_SCT_BarrelModuleParameters_H @@ -14,7 +14,7 @@ class SCT_BarrelModuleParameters { public: // Constructor - SCT_BarrelModuleParameters(); + SCT_BarrelModuleParameters(SCT_DataBase* rdb); // Sensors double sensorThickness() const; diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_BarrelParameters.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_BarrelParameters.h old mode 100755 new mode 100644 index 111dbe08b8194cf4e426ccbac111bff45ae5c9d0..8ffb7388380ea1bb9265cc715bcb89c0309dd78c --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_BarrelParameters.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_BarrelParameters.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GeoModel_SCT_BarrelParameters_H @@ -14,7 +14,7 @@ class SCT_BarrelParameters { public: // Constructor - SCT_BarrelParameters(); + SCT_BarrelParameters(SCT_DataBase* rdb); // Ski int skiFirstStagger() const; diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_BaseBoard.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_BaseBoard.h old mode 100755 new mode 100644 index 42b689d5be700b5c83aee1fbef679485fbdadc66..ddd2d08c0600196f88443a1ec667ce853b18bf2e --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_BaseBoard.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_BaseBoard.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_BaseBoard_H @@ -15,7 +15,10 @@ class GeoVPhysVol; class SCT_BaseBoard: public SCT_SharedComponentFactory { public: - SCT_BaseBoard(const std::string & name); + SCT_BaseBoard(const std::string & name, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); public: const GeoMaterial * material() const {return m_material;} diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Bracket.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Bracket.h old mode 100755 new mode 100644 index 73057d438abceb5331c86f1e416974a69dc43283..2ccd94be4c7dfc542ae6935fb2a2d2d6ab646281 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Bracket.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Bracket.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_BRACKET_H @@ -18,7 +18,10 @@ class SCT_Bracket: public SCT_SharedComponentFactory { public: - SCT_Bracket(const std::string & name); + SCT_Bracket(const std::string & name, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); public: const GeoMaterial * material() const {return m_material;} diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Clamp.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Clamp.h old mode 100755 new mode 100644 index 78cb9c515998c686dcb617f2db1da40106dcc17a..2421ff0a773fd7eac15ac5879b1939cdaa124e9a --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Clamp.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Clamp.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_CLAMP_H @@ -16,7 +16,10 @@ class SCT_Clamp : public SCT_SharedComponentFactory public: SCT_Clamp(const std::string & name, int iLayer, - double innerRadius); + double innerRadius, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); public: const GeoMaterial * material() const {return m_material;} diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_CloseOut.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_CloseOut.h old mode 100755 new mode 100644 index 4586a5856ba668d3be985abdfdc5df91319f066a..289d27f1891caf2b78278f7e4367809f9c884490 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_CloseOut.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_CloseOut.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_CLOSEOUT_H @@ -14,7 +14,10 @@ class SCT_CloseOut : public SCT_SharedComponentFactory { public: - SCT_CloseOut(const std::string & name, int iLayer); + SCT_CloseOut(const std::string & name, int iLayer, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); public: const GeoMaterial * material() const {return m_material;} diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_ComponentFactory.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_ComponentFactory.h old mode 100755 new mode 100644 index a87f6f9f5c1fa212b41d86b0a690d398cddc0be7..cb3a123995b936eb5280df14291a405f0f2a1baa --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_ComponentFactory.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_ComponentFactory.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_COMPONENTFACTORY_H @@ -10,6 +10,7 @@ namespace InDetDD{class SCT_DetectorManager;} class SCT_GeometryManager; +class SCT_MaterialManager; class GeoLogVol; class GeoVPhysVol; @@ -19,30 +20,27 @@ class SCT_ComponentFactory { public: - SCT_ComponentFactory(const std::string & name); + SCT_ComponentFactory(const std::string & name, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); const std::string & getName() const {return m_name;} - static void setDetectorManager(InDetDD::SCT_DetectorManager * manager); - static void setGeometryManager(SCT_GeometryManager * manager); - // utility function to covert int to string - static std::string intToString(int i); + std::string intToString(int i) const; protected: - InDetDD::SCT_DetectorManager * detectorManager() const {return s_detectorManager;} - const SCT_GeometryManager * geometryManager() const {return s_geometryManager;} + InDetDD::SCT_DetectorManager* m_detectorManager; + const SCT_GeometryManager* m_geometryManager; + SCT_MaterialManager* m_materials; double epsilon() const; - virtual ~SCT_ComponentFactory(); private: std::string m_name; - static double s_epsilon; - - static InDetDD::SCT_DetectorManager* s_detectorManager; - static const SCT_GeometryManager* s_geometryManager; + const static double s_epsilon; }; @@ -51,12 +49,15 @@ class SCT_SharedComponentFactory : public SCT_ComponentFactory { public: - SCT_SharedComponentFactory(const std::string & name) : - SCT_ComponentFactory(name), - m_physVolume(0) + SCT_SharedComponentFactory(const std::string & name, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials=nullptr) : + SCT_ComponentFactory(name, detectorManager, geometryManager, materials), + m_physVolume(nullptr) {}; - GeoVPhysVol * getVolume() const {return m_physVolume;} + GeoVPhysVol * getVolume() {return m_physVolume;} protected: GeoVPhysVol * m_physVolume; @@ -68,12 +69,15 @@ class SCT_UniqueComponentFactory : public SCT_ComponentFactory { public: - SCT_UniqueComponentFactory(const std::string & name) : - SCT_ComponentFactory(name), - m_logVolume(0) + SCT_UniqueComponentFactory(const std::string & name, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials=nullptr) : + SCT_ComponentFactory(name, detectorManager, geometryManager, materials), + m_logVolume{nullptr} {}; - virtual GeoVPhysVol * build(SCT_Identifier id) const = 0; + virtual GeoVPhysVol * build(SCT_Identifier id) = 0; protected: const GeoLogVol * m_logVolume; diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_CoolingBlock.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_CoolingBlock.h old mode 100755 new mode 100644 index 65612b0e06ffd342f07c8ffac60473e58545301b..6ddfa222eb6712288a5d9efa21cfcc011ba8d57e --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_CoolingBlock.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_CoolingBlock.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_COOLINGBLOCK_H @@ -18,7 +18,10 @@ class SCT_CoolingBlock: public SCT_SharedComponentFactory { public: - SCT_CoolingBlock(const std::string & name); + SCT_CoolingBlock(const std::string & name, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); public: const GeoMaterial * material() const {return m_material;} diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_CoolingEnd.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_CoolingEnd.h old mode 100755 new mode 100644 index c089f8564d365545cb2603afe84592cf3a651049..8de3939bedfbb6f5d6af3144f4bd9e69bd2c2884 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_CoolingEnd.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_CoolingEnd.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_COOLINGEND_H @@ -16,8 +16,11 @@ class SCT_CoolingEnd : public SCT_SharedComponentFactory public: SCT_CoolingEnd(const std::string & name, int iLayer, - double innerRadius, - double length); + double innerRadius, + double length, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); public: const GeoMaterial * material() const {return m_material;} diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_CoolingPipe.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_CoolingPipe.h old mode 100755 new mode 100644 index f538c271cd695d1b5b9b5277ef71685f4ec01c31..58194f645c87f687c04e341b024ebe22d1a1466e --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_CoolingPipe.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_CoolingPipe.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_COOLINGPIPE_H @@ -18,7 +18,10 @@ class SCT_CoolingPipe: public SCT_SharedComponentFactory { public: - SCT_CoolingPipe(const std::string & name, double length); + SCT_CoolingPipe(const std::string & name, double length, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); public: const GeoMaterial * material() const {return m_material;} diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_DataBase.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_DataBase.h old mode 100755 new mode 100644 index 933087e161a47e2a35c17925e3b1f6db20032d99..c1c561ef67e3db4c371e815251548f869975a76f --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_DataBase.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_DataBase.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GeoModel_SCT_DataBase_H @@ -18,18 +18,9 @@ class SCT_DataBase public: - // Get pointer to singleton instance. - static SCT_DataBase * instance(); + SCT_DataBase(const SCT_GeoModelAthenaComps* athenaComps); - // Delete instance - static void reinit(); - - // Access to athena components - static void setAthenaComps(const SCT_GeoModelAthenaComps * athenaComps); - const SCT_GeoModelAthenaComps * athenaComps() const; - - - //const IRDBRecord* atls() const; + const SCT_GeoModelAthenaComps* athenaComps() const; IRDBRecordset_ptr weightTable() const; IRDBRecordset_ptr scalingTable() const; @@ -103,15 +94,12 @@ public: private: - // Singleton - Constructor is private - SCT_DataBase(); SCT_DataBase(const SCT_DataBase &); SCT_DataBase& operator= (const SCT_DataBase &); private: - static SCT_DataBase * s_instance; - static const SCT_GeoModelAthenaComps * s_athenaComps; + const SCT_GeoModelAthenaComps* m_athenaComps; std::string m_sctVersionTag; diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_DetectorFactory.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_DetectorFactory.h old mode 100755 new mode 100644 index 822cea24a084f1dc0b778720200895e2f518b63a..b6aac2cc9fc4a2b0818c531f8ad58f99dba8aaa9 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_DetectorFactory.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_DetectorFactory.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_DETECTORFACTORY_H @@ -10,9 +10,11 @@ #include "InDetReadoutGeometry/InDetDD_Defs.h" class GeoPhysVol; +class SCT_DataBase; class SCT_GeometryManager; -class SCT_Options; class SCT_GeoModelAthenaComps; +class SCT_MaterialManager; +class SCT_Options; class SCT_DetectorFactory : public InDetDD::DetectorFactoryBase { @@ -38,6 +40,8 @@ class SCT_DetectorFactory : public InDetDD::DetectorFactoryBase InDetDD::SCT_DetectorManager *m_detectorManager; SCT_GeometryManager *m_geometryManager; + SCT_DataBase* m_db; + SCT_MaterialManager* m_materials; bool m_useDynamicAlignFolders; }; diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_DetectorFactoryCosmic.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_DetectorFactoryCosmic.h old mode 100755 new mode 100644 diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_DetectorTool.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_DetectorTool.h old mode 100755 new mode 100644 diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Dogleg.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Dogleg.h old mode 100755 new mode 100644 index 567c8d1c28d97686b218947175e7a95ba7d59457..1a29840ec840ee1355c311fe8669b65d9f601d0f --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Dogleg.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Dogleg.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // @@ -21,7 +21,10 @@ class SCT_Dogleg: public SCT_SharedComponentFactory { public: - SCT_Dogleg(const std::string & name); + SCT_Dogleg(const std::string & name, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); public: const GeoMaterial * material() const {return m_material;} diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FSIEndJewel.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FSIEndJewel.h old mode 100755 new mode 100644 index 7c437e9004242377aad05ca491589098c6343ce3..5a447e11670a74b21329d23bc5445210b30ccc4c --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FSIEndJewel.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FSIEndJewel.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_FSIENDJEWEL_H @@ -15,7 +15,10 @@ class SCT_FSIEndJewel : public SCT_SharedComponentFactory { public: - SCT_FSIEndJewel(const std::string & name); + SCT_FSIEndJewel(const std::string & name, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); public: const GeoMaterial * material() const {return m_material;} diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FSIFibreMask.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FSIFibreMask.h old mode 100755 new mode 100644 index 63da137bdd680cd9c91324a980447734ae2d2d38..56e5a945d8dae866e050840a0c3112fecbac23bf --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FSIFibreMask.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FSIFibreMask.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_FSIFIBREMASK_H @@ -15,7 +15,10 @@ class SCT_FSIFibreMask : public SCT_SharedComponentFactory { public: - SCT_FSIFibreMask(const std::string & name, int iLayer, double length); + SCT_FSIFibreMask(const std::string & name, int iLayer, double length, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); public: const GeoMaterial * material() const {return m_material;} diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FSIHelper.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FSIHelper.h old mode 100755 new mode 100644 diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FSIScorpion.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FSIScorpion.h old mode 100755 new mode 100644 index ea18db3ca22e8d3064a4d78def46d3903c53857c..34fcf7a5426a43d7e4e9c124e101caef265ce813 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FSIScorpion.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FSIScorpion.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_FSISCORPION_H @@ -15,7 +15,10 @@ class SCT_FSIScorpion : public SCT_SharedComponentFactory { public: - SCT_FSIScorpion(const std::string & name); + SCT_FSIScorpion(const std::string & name, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); public: const GeoMaterial * material() const {return m_material;} diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Flange.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Flange.h old mode 100755 new mode 100644 index 26b55e5a5618d7fae4cbcd4b0ac6e8e56ba215a9..5d231a3e3264e2f49bc0273a3157bae5c309a4c4 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Flange.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Flange.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_FLANGE_H @@ -15,7 +15,10 @@ class SCT_Flange : public SCT_SharedComponentFactory { public: - SCT_Flange(const std::string & name, int iLayer); + SCT_Flange(const std::string & name, int iLayer, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); public: const GeoMaterial * material() const {return m_material;} diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Forward.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Forward.h old mode 100755 new mode 100644 index 4c2934a77856bcad8db7c446a6e29cd849a63135..b515a77cbd52f07130d9576cd147282e037cd003 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Forward.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Forward.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_FORWARD_H @@ -17,7 +17,10 @@ class SCT_Forward : public SCT_UniqueComponentFactory public: - SCT_Forward(const std::string & name, int ec); + SCT_Forward(const std::string & name, int ec, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); ~SCT_Forward(); // @@ -40,7 +43,7 @@ public: double length() const {return m_length;} double zCenter() const {return 0.5*(m_zMin+m_zMax);} - virtual GeoVPhysVol * build(SCT_Identifier id) const; + virtual GeoVPhysVol * build(SCT_Identifier id); @@ -66,9 +69,9 @@ private: double m_outerRadiusCylinderServices; // Child detector elements - std::vector <const SCT_FwdWheel *> m_wheels; + std::vector <SCT_FwdWheel *> m_wheels; - std::vector <const SCT_FwdModule *> m_modules; + std::vector <SCT_FwdModule *> m_modules; }; diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_ForwardModuleParameters.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_ForwardModuleParameters.h old mode 100755 new mode 100644 index 6f90aa29f501a70ce3a3051847d4bb8d11e42ebc..c442145313af10fd65311c1b321c9bfe44de29f6 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_ForwardModuleParameters.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_ForwardModuleParameters.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GeoModel_SCT_ForwardModuleParameters_H @@ -14,7 +14,7 @@ class SCT_ForwardModuleParameters { public: // Constructor - SCT_ForwardModuleParameters(); + SCT_ForwardModuleParameters(SCT_DataBase* rdb); // Sensor // For Inner module there is only one sensor, diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_ForwardParameters.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_ForwardParameters.h old mode 100755 new mode 100644 index a438c565917fda84e93b87e037041927be42a464..130c7146b4a43ba6f210add2fa82bc498757db14 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_ForwardParameters.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_ForwardParameters.h @@ -1,10 +1,11 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GeoModel_SCT_ForwardParameters_H #define SCT_GeoModel_SCT_ForwardParameters_H +#include <memory> #include <string> #include <vector> @@ -17,7 +18,7 @@ class SCT_ForwardParameters { public: // Constructor and destructor - SCT_ForwardParameters(); + SCT_ForwardParameters(SCT_DataBase* rdb); ~SCT_ForwardParameters(); ////////////////////////////////////////////////////////////////////////////// @@ -181,7 +182,7 @@ private: SCT_DataBase * m_rdb; - mutable FSIHelper * m_fsiHelper; + std::unique_ptr<FSIHelper> m_fsiHelper; }; diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdCoolingBlock.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdCoolingBlock.h old mode 100755 new mode 100644 index 14b7c5608c7d0f4d9bae9bb8a82979731dee43d4..bac694eab7e6e81406d3d0e298f726d42fbe5ff5 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdCoolingBlock.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdCoolingBlock.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_FWDCOOLINGBLOCK_H @@ -19,7 +19,10 @@ class SCT_FwdCoolingBlock: public SCT_SharedComponentFactory public: - SCT_FwdCoolingBlock(const std::string & name, int hiLo, int mainOrSecondary); + SCT_FwdCoolingBlock(const std::string & name, int hiLo, int mainOrSecondary, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); enum types {UPPER = 1, LOWER = -1, diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdCoolingPipe.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdCoolingPipe.h old mode 100755 new mode 100644 index 311bcf19091c2a89263d3ce61a12b7309043a532..cef91098760a51073930db18e7247418273b260d --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdCoolingPipe.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdCoolingPipe.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_FWDCOOLINGPIPE_H @@ -19,8 +19,10 @@ public: int numPipes, double innerRadius, double startPos, - double endPos); - + double endPos, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); const GeoMaterial * material() const {return m_material;} double pipeRadius() const {return m_pipeRadius;} diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdCylinderServices.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdCylinderServices.h old mode 100755 new mode 100644 index 7e655f575cb94eddf0a73da1dfab7352f6f1d412..0766a478aa8f9f430d891bfa896b100df3bad4e5 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdCylinderServices.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdCylinderServices.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_FWDCYLINDERSERVICES_H @@ -14,7 +14,10 @@ class SCT_FwdCylinderServices : public SCT_SharedComponentFactory public: - SCT_FwdCylinderServices(const std::string & name, double rmin, double rmax, double length); + SCT_FwdCylinderServices(const std::string & name, double rmin, double rmax, double length, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); ~SCT_FwdCylinderServices(); // diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdDiscFixation.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdDiscFixation.h old mode 100755 new mode 100644 index 8df7a7246f741b694ac62a63579fe644ff4b2258..d760b498291e533b1ba66320b193931e04ce2084 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdDiscFixation.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdDiscFixation.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_FWDDISCFIXATION_H @@ -13,7 +13,10 @@ class SCT_FwdDiscFixation : public SCT_SharedComponentFactory { public: - SCT_FwdDiscFixation(const std::string & name); + SCT_FwdDiscFixation(const std::string & name, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); // // Methods to return basic and derived parameters. diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdDiscPowerTape.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdDiscPowerTape.h old mode 100755 new mode 100644 index 94bdedc770c42cdf212f020eb2f74e1a82d6cf39..15d6461cd3a0df652a71caa2e68a3a1178ccd3d9 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdDiscPowerTape.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdDiscPowerTape.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_FWDDISCPOWERTAPE_H @@ -13,7 +13,10 @@ class SCT_FwdDiscPowerTape : public SCT_SharedComponentFactory { public: - SCT_FwdDiscPowerTape(const std::string & name, int iRing); + SCT_FwdDiscPowerTape(const std::string & name, int iRing, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); // // Methods to return basic and derived parameters. diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdDiscSupport.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdDiscSupport.h old mode 100755 new mode 100644 index 97b6c4b80a16a9795a54850d544183423245f110..7867f6acea908863bf4d3da790d718b593c7cb92 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdDiscSupport.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdDiscSupport.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_FWDDISCSUPPORT_H @@ -13,7 +13,10 @@ class SCT_FwdDiscSupport : public SCT_SharedComponentFactory { public: - SCT_FwdDiscSupport(const std::string & name, int iWheel); + SCT_FwdDiscSupport(const std::string & name, int iWheel, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); // // Methods to return basic and derived parameters. diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdFSI.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdFSI.h old mode 100755 new mode 100644 index 4f4b933ed71946947f989f4254254b0666d49f7a..c2c6a72f9ae7f700f0542b4f3d91555a2e51197d --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdFSI.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdFSI.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_FWDFSI_H @@ -13,7 +13,10 @@ class SCT_FwdFSI : public SCT_SharedComponentFactory { public: - SCT_FwdFSI(const std::string & name, int type); + SCT_FwdFSI(const std::string & name, int type, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); // // Methods to return basic and derived parameters. diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdHybrid.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdHybrid.h old mode 100755 new mode 100644 index db0069b7b6cf6eb5cfbb9777bb5f323cc300555d..f9fe308161a5c4c20acfa04924ae1cdacc4253d2 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdHybrid.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdHybrid.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_FWDHYBRID_H @@ -15,7 +15,10 @@ class GeoVPhysVol; class SCT_FwdHybrid : public SCT_SharedComponentFactory { public: - SCT_FwdHybrid(const std::string & name, int ringType); + SCT_FwdHybrid(const std::string & name, int ringType, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); public: //int hybridPart() const {return m_hybridPart;} diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdModule.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdModule.h old mode 100755 new mode 100644 index 26c974a01e11c09b2cd0a372a67e260b1944c94e..5b2db9aa7dfebcb4c70bfa4f92bf1468e1ebfb29 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdModule.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdModule.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_FWDMODULE_H @@ -26,7 +26,10 @@ class SCT_FwdModule : public SCT_UniqueComponentFactory { public: - SCT_FwdModule(const std::string & name, int ringType); + SCT_FwdModule(const std::string & name, int ringType, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); ~SCT_FwdModule(); //explicitly disallow copy, assignment to appease coverity SCT_FwdModule(const SCT_FwdModule &) = delete; @@ -35,7 +38,7 @@ public: // Ring type int ringType() const {return m_ringType;} - virtual GeoVPhysVol* build(SCT_Identifier id) const; + virtual GeoVPhysVol* build(SCT_Identifier id); double stereoAngle() const {return m_stereoAngle;} @@ -89,11 +92,11 @@ private: public: // Child detector elements SCT_FwdSensor * m_sensor; - const SCT_FwdModuleConnector * m_connector; - const SCT_FwdHybrid * m_hybrid; - const SCT_FwdSpine * m_spine; - const SCT_FwdSubSpine * m_subspineL; - const SCT_FwdSubSpine * m_subspineR; + SCT_FwdModuleConnector * m_connector; + SCT_FwdHybrid * m_hybrid; + SCT_FwdSpine * m_spine; + SCT_FwdSubSpine * m_subspineL; + SCT_FwdSubSpine * m_subspineR; }; #endif // SCT_GEOMODEL_SCT_FWDMODULE_H diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdModuleConnector.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdModuleConnector.h old mode 100755 new mode 100644 index b0645070fb9451768390734bc7353b8d274b653a..728f492541cffcb1664ca7965d559fe238918f57 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdModuleConnector.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdModuleConnector.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_FWDMODULECONNECTOR_H @@ -13,7 +13,10 @@ class SCT_FwdModuleConnector : public SCT_SharedComponentFactory { public: - SCT_FwdModuleConnector(const std::string & name, int ringType); + SCT_FwdModuleConnector(const std::string & name, int ringType, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); // // Methods to return basic and derived parameters. diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdOptoHarness.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdOptoHarness.h old mode 100755 new mode 100644 index 17b33116b628d019fed3c5c5e20a18497457ff15..39274fc8525b45955643103559f8affef74567cc --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdOptoHarness.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdOptoHarness.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_FWDOPTOHARNESS_H @@ -13,7 +13,10 @@ class SCT_FwdOptoHarness : public SCT_SharedComponentFactory { public: - SCT_FwdOptoHarness(const std::string & name, int iType); + SCT_FwdOptoHarness(const std::string & name, int iType, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); // // Methods to return basic and derived parameters. diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdPPConnector.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdPPConnector.h old mode 100755 new mode 100644 index b1032bb2231ca39301ccb02a77caf7bb9d156e5c..a3ca5e72366f9e34a162d0b5cc58a4a44248458f --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdPPConnector.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdPPConnector.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_FWDPPCONNECTOR_H @@ -13,7 +13,10 @@ class SCT_FwdPPConnector : public SCT_SharedComponentFactory { public: - SCT_FwdPPConnector(const std::string & name); + SCT_FwdPPConnector(const std::string & name, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); // // Methods to return basic and derived parameters. diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdPPCooling.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdPPCooling.h old mode 100755 new mode 100644 index 2b931c3a0b5373f2b992a2d10732b99ae5b3a68d..a9566aea2f0078b600bbbfb192cceee55546881a --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdPPCooling.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdPPCooling.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_FWDPPCOOLING_H @@ -13,7 +13,10 @@ class SCT_FwdPPCooling : public SCT_SharedComponentFactory { public: - SCT_FwdPPCooling(const std::string & name); + SCT_FwdPPCooling(const std::string & name, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); // // Methods to return basic and derived parameters. diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdPatchPanel.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdPatchPanel.h old mode 100755 new mode 100644 index 410e6063958fcaabdc743ed68beec20e7bd64bf2..f38de2d5df373059f09ceaede262b88c712c68b4 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdPatchPanel.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdPatchPanel.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_FWDPATCHPANEL_H @@ -13,7 +13,10 @@ class SCT_FwdPatchPanel : public SCT_SharedComponentFactory { public: - SCT_FwdPatchPanel(const std::string & name, int type); + SCT_FwdPatchPanel(const std::string & name, int type, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); // // Methods to return basic and derived parameters. diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdPowerTape.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdPowerTape.h old mode 100755 new mode 100644 index aface8df71dc5e4a7dab4374af306ed25473e0b8..3b8ee4765ddddd2a78558263f348571f39c1fc4d --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdPowerTape.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdPowerTape.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_FWDPOWERTAPE_H @@ -17,7 +17,10 @@ public: int numModules, double innerRadius, double startPos, - double endPos); + double endPos, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); const GeoMaterial * material() const {return m_material;} diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdRing.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdRing.h old mode 100755 new mode 100644 index b5926772fa0dd8b08d1d37b89ea195bdce0370ff..f23a67ff9f37571c4adaaa3488475a6f6d7bbd96 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdRing.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdRing.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_FWDRING_H @@ -22,10 +22,13 @@ class SCT_FwdRing : public SCT_UniqueComponentFactory public: SCT_FwdRing(const std::string & name, - const SCT_FwdModule * module, + SCT_FwdModule * module, int iWheel, int iRing, - int ec); + int ec, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); ~SCT_FwdRing(); @@ -56,7 +59,7 @@ public: bool discRotated() const {return m_discRotated;} - virtual GeoVPhysVol * build(SCT_Identifier id) const; + virtual GeoVPhysVol * build(SCT_Identifier id); // Child elements const SCT_FwdModule* module() const {return m_module;} @@ -106,7 +109,7 @@ private: double m_maxModuleServicesBaseToRingCenter; // Child detector elements - const SCT_FwdModule* m_module; + SCT_FwdModule* m_module; SCT_FwdCoolingBlock * m_coolingBlockHiMain; SCT_FwdCoolingBlock * m_coolingBlockHiSec; SCT_FwdCoolingBlock * m_coolingBlockLoMain; diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdRingCooling.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdRingCooling.h old mode 100755 new mode 100644 index 2bce180c6b52c2afc9aa13ef89452ad6d3a043ef..b739896744422cc67504a26cfcff78d5252defbf --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdRingCooling.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdRingCooling.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_FWDRINGCOOLING_H @@ -13,7 +13,10 @@ class SCT_FwdRingCooling : public SCT_SharedComponentFactory { public: - SCT_FwdRingCooling(const std::string & name, int ringType); + SCT_FwdRingCooling(const std::string & name, int ringType, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); // // Methods to return basic and derived parameters. diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdSensor.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdSensor.h old mode 100755 new mode 100644 index dfb518719b156c63b272055b5215329b730d21f3..e201263a3d2789b5fcc570c2ddf78df404ead6e0 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdSensor.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdSensor.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_FWDSENSOR_H @@ -8,6 +8,7 @@ #include "SCT_GeoModel/SCT_ComponentFactory.h" +#include <atomic> #include <string> // sensor types @@ -31,7 +32,10 @@ namespace InDetDD{class SiDetectorDesign;} class SCT_FwdSensor : public SCT_UniqueComponentFactory { public: - SCT_FwdSensor(const std::string & name, int ringType); + SCT_FwdSensor(const std::string & name, int ringType, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); ~SCT_FwdSensor(); // Ring type @@ -72,7 +76,7 @@ public: double thicknessF() const {return m_thicknessF;} - virtual GeoVPhysVol * build(SCT_Identifier id) const; + virtual GeoVPhysVol * build(SCT_Identifier id); GeoPhysVol * getInactive() {return m_inactive;} @@ -116,6 +120,7 @@ private: InDetDD::SiDetectorDesign * m_design; + mutable std::atomic_bool m_noElementWarning; }; #endif // SCT_GEOMODEL_SCT_FWDSENSOR_H diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdSpine.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdSpine.h old mode 100755 new mode 100644 index 4b53f2e35cc7bce2a67031814f34c43f165e985d..bfc92c50cb5732695f32b91b79f948812709bd1d --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdSpine.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdSpine.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_FWDSPINE_H @@ -16,7 +16,10 @@ class SCT_FwdSpine : public SCT_SharedComponentFactory { public: - SCT_FwdSpine(const std::string & name, int ringType); + SCT_FwdSpine(const std::string & name, int ringType, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); public: diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdSubSpine.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdSubSpine.h old mode 100755 new mode 100644 index 504d2047d97c72c4d1fcd5273ca6fa70a65e74ac..38a01d882786feccdc30afac6be75f8a69827d18 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdSubSpine.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdSubSpine.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_FWDSUBSPINE_H @@ -20,7 +20,10 @@ class SCT_FwdSubSpine : public SCT_SharedComponentFactory { public: - SCT_FwdSubSpine(const std::string & name, int ringType, int spineSide); + SCT_FwdSubSpine(const std::string & name, int ringType, int spineSide, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); public: const GeoMaterial * material() const {return m_material;} diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdSupportFrame.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdSupportFrame.h old mode 100755 new mode 100644 index f7eb1915e2a020df846d84a9dc7da26a3b9642e7..b94dfadac5828311bc55d4d13223d863fe355e65 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdSupportFrame.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdSupportFrame.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_FWDSUPPORTFRAME_H @@ -15,7 +15,10 @@ class SCT_FwdSupportFrame : public SCT_SharedComponentFactory { public: - SCT_FwdSupportFrame(const std::string & name); + SCT_FwdSupportFrame(const std::string & name, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); public: const GeoMaterial * material() const {return m_material;} diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdThermalShieldElement.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdThermalShieldElement.h old mode 100755 new mode 100644 index e71ceb1664af576b4b32d8d3c5da85753bd2737c..302539bfbead347628b6eeeb5b65206476312229 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdThermalShieldElement.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdThermalShieldElement.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_FWDTHERMALSHIELDELEMENT_H @@ -15,7 +15,10 @@ class SCT_FwdThermalShieldElement : public SCT_SharedComponentFactory { public: - SCT_FwdThermalShieldElement(const std::string & name, int iElement); + SCT_FwdThermalShieldElement(const std::string & name, int iElement, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); public: const GeoMaterial * material() const {return m_material;} diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdWheel.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdWheel.h old mode 100755 new mode 100644 index 706cefb30d2c3c1d7e14359c77007bd5900b2ccd..b1d321982023a8e0517dd8d711edfd9fa6c65308 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdWheel.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_FwdWheel.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_FWDWHEEL_H @@ -27,8 +27,11 @@ class SCT_FwdWheel : public SCT_UniqueComponentFactory public: SCT_FwdWheel(const std::string & name, int iWheel, - const std::vector<const SCT_FwdModule *> & modules, - int ec); + const std::vector<SCT_FwdModule *> & modules, + int ec, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); ~SCT_FwdWheel(); //Explicitly disallow copy and assignment to appease coverity SCT_FwdWheel(const SCT_FwdWheel &) = delete; @@ -52,7 +55,7 @@ public: double outerRadius() const {return m_outerRadius;} int totalModules() const {return m_totalModules;} - virtual GeoVPhysVol * build(SCT_Identifier id) const; + virtual GeoVPhysVol * build(SCT_Identifier id); private: @@ -92,15 +95,15 @@ private: double m_safety; // Child detector elements - std::vector<const SCT_FwdRing *> m_rings; - const SCT_FwdDiscSupport * m_discSupport; - std::vector<const SCT_FwdPatchPanel*> m_patchPanel; - const SCT_FwdPPConnector* m_pPConnector; - const SCT_FwdPPCooling* m_pPCooling; - std::vector<const SCT_FwdFSI*> m_fsiType; - const SCT_FwdDiscFixation* m_discFixation; - - const std::vector<const SCT_FwdModule*> & m_modules; + std::vector<SCT_FwdRing *> m_rings; + SCT_FwdDiscSupport * m_discSupport; + std::vector<SCT_FwdPatchPanel*> m_patchPanel; + SCT_FwdPPConnector* m_pPConnector; + SCT_FwdPPCooling* m_pPCooling; + std::vector<SCT_FwdFSI*> m_fsiType; + SCT_FwdDiscFixation* m_discFixation; + + const std::vector<SCT_FwdModule*> & m_modules; const std::vector<const FSIDetails *> * m_fsiVector; diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_GeneralParameters.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_GeneralParameters.h old mode 100755 new mode 100644 index 922a69f6fce3319641cd226b17b9b0b0ecdf17bc..5a104c6723c3118503a8fbdf2859852c68a0aa18 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_GeneralParameters.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_GeneralParameters.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GeoModel_SCT_GeneralParameters_H @@ -17,7 +17,7 @@ class SCT_GeneralParameters { public: - SCT_GeneralParameters(); + SCT_GeneralParameters(SCT_DataBase* rdb); ~SCT_GeneralParameters(); //Explicitly disallow copy, assignment to appease coverity SCT_GeneralParameters(const SCT_GeneralParameters &) = delete; diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_GeometryManager.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_GeometryManager.h old mode 100755 new mode 100644 index 5073f9e6fab2519248e49ef433a824299064a5e4..00f34f8ee4ae451ca6b486576b228f4fdb456cb5 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_GeometryManager.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_GeometryManager.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GeoModel_SCT_GeometryManager_H @@ -7,13 +7,16 @@ #include "SCT_GeoModel/SCT_Options.h" -namespace InDetDD{ +#include <memory> + +namespace InDetDD { class SiCommonItems; class DistortedMaterialManager; } class SCT_BarrelParameters; class SCT_BarrelModuleParameters; +class SCT_DataBase; class SCT_ForwardParameters; class SCT_ForwardModuleParameters; class SCT_GeneralParameters; @@ -24,7 +27,7 @@ class SCT_GeometryManager { public: // Constructor - SCT_GeometryManager(); + SCT_GeometryManager(SCT_DataBase* rdb); // Destructor ~SCT_GeometryManager(); @@ -35,11 +38,9 @@ public: // Access to athena components const SCT_GeoModelAthenaComps * athenaComps() const; - void setAthenaComps(const SCT_GeoModelAthenaComps * athenaComps); // To be passed to detector element. - InDetDD::SiCommonItems * commonItems() const; - void setCommonItems(InDetDD::SiCommonItems * commonItems); + const InDetDD::SiCommonItems * commonItems() const; const SCT_BarrelParameters * barrelParameters() const; const SCT_BarrelModuleParameters * barrelModuleParameters() const; @@ -56,13 +57,14 @@ private: SCT_Options m_options; const SCT_GeoModelAthenaComps * m_athenaComps; InDetDD::SiCommonItems * m_commonItems; + SCT_DataBase* m_rdb; - mutable const SCT_BarrelParameters * m_barrelParameters; - mutable const SCT_BarrelModuleParameters * m_barrelModuleParameters; - mutable const SCT_ForwardParameters * m_forwardParameters; - mutable const SCT_ForwardModuleParameters * m_forwardModuleParameters; - mutable const SCT_GeneralParameters * m_generalParameters; - mutable const InDetDD::DistortedMaterialManager * m_distortedMatManager; + std::unique_ptr<SCT_BarrelParameters> m_barrelParameters; + std::unique_ptr<SCT_BarrelModuleParameters> m_barrelModuleParameters; + std::unique_ptr<SCT_ForwardParameters> m_forwardParameters; + std::unique_ptr<SCT_ForwardModuleParameters> m_forwardModuleParameters; + std::unique_ptr<SCT_GeneralParameters> m_generalParameters; + std::unique_ptr<InDetDD::DistortedMaterialManager> m_distortedMatManager; }; diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Harness.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Harness.h old mode 100755 new mode 100644 index 06a9b5f2c294f5837b4f1eed2d375ee138c9fd6e..79243c1aae913245374fd1a62e19e30cf5adc2a6 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Harness.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Harness.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_HARNESS_H @@ -15,7 +15,10 @@ class SCT_Harness : public SCT_SharedComponentFactory { public: - SCT_Harness(const std::string & name, double length); + SCT_Harness(const std::string & name, double length, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); public: const GeoMaterial * material() const {return m_material;} diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Hybrid.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Hybrid.h old mode 100755 new mode 100644 index 032fdc70867ee3f81aaffbb824b8687d9911621d..7046e978bb4c9ffbf703bd96c6f1edf8c566c05f --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Hybrid.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Hybrid.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_Hybrid_H @@ -16,7 +16,10 @@ class SCT_Hybrid: public SCT_SharedComponentFactory { public: - SCT_Hybrid(const std::string & name); + SCT_Hybrid(const std::string & name, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); public: const GeoMaterial * material() const {return m_material;} diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Identifier.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Identifier.h old mode 100755 new mode 100644 index c74fad15348fabb54c8c9e47b3356a6760c05b00..675062812259884a6ade843061e0abf507d9a683 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Identifier.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Identifier.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_IDENTIFIER_H @@ -12,16 +12,18 @@ class SCT_Identifier { public: - SCT_Identifier(int barrelEC = 0, + SCT_Identifier(const SCT_ID* idHelper, + int barrelEC = 0, int layerDisk = 0, int phiModule = 0, int etaModule = 0, int side = 0) - : m_barrelEC(barrelEC), - m_layerDisk(layerDisk), - m_phiModule(phiModule), - m_etaModule(etaModule), - m_side(side) + : m_idHelper{idHelper}, + m_barrelEC{barrelEC}, + m_layerDisk{layerDisk}, + m_phiModule{phiModule}, + m_etaModule{etaModule}, + m_side{side} {}; @@ -40,20 +42,18 @@ public: void setSide(int i) {m_side = i;} int getSide() const {return m_side;} - static void setIdHelper(const SCT_ID * idHelper) {s_idHelper = idHelper;} - Identifier getWaferId(); // For debugging purposes. void print(); private: + const SCT_ID* m_idHelper; int m_barrelEC; int m_layerDisk; int m_phiModule; int m_etaModule; int m_side; - static const SCT_ID * s_idHelper; }; #endif // SCT_GEOMODEL_SCT_IDENTIFIER_H diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_InnerSide.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_InnerSide.h old mode 100755 new mode 100644 index fd91a3788d0175bd1e4b52a075126bed8718858e..72f7065edf6603d92f4288c44dda304dfb931ec3 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_InnerSide.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_InnerSide.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // @@ -29,22 +29,25 @@ class SCT_InnerSide: public SCT_UniqueComponentFactory { public: - SCT_InnerSide(const std::string & name); + SCT_InnerSide(const std::string & name, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); //explicitly disallow copy, assign, to appease coverity SCT_InnerSide(const SCT_InnerSide &) = delete; SCT_InnerSide & operator=(const SCT_InnerSide &) = delete; ~SCT_InnerSide(); - virtual GeoVPhysVol * build(SCT_Identifier id) const; + virtual GeoVPhysVol * build(SCT_Identifier id); public: double thickness() const {return m_thickness;} double width() const {return m_width;} double length() const {return m_length;} - GeoTrf::Vector3D * env1RefPointVector() const {return m_env1RefPointVector;} - GeoTrf::Vector3D * env2RefPointVector() const {return m_env2RefPointVector;} + const GeoTrf::Vector3D * env1RefPointVector() const {return m_env1RefPointVector;} + const GeoTrf::Vector3D * env2RefPointVector() const {return m_env2RefPointVector;} // *** End of modified lines. ------------------ (00)********************************* diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_InterLink.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_InterLink.h old mode 100755 new mode 100644 index 620f029b15a260d35f4592ad438ba67e74209fd7..518e168a23b3b68bdaa22aa9317618e0f48d639f --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_InterLink.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_InterLink.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_INTERLINK_H @@ -21,7 +21,10 @@ class SCT_InterLink : public SCT_SharedComponentFactory { public: - SCT_InterLink(const std::string & name); + SCT_InterLink(const std::string & name, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); ~SCT_InterLink(); public: diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Layer.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Layer.h old mode 100755 new mode 100644 index 8309e86487355fbd340e9c6a404d552238546fed..e29c3db798042adae4ba879b563df3d6a1425d94 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Layer.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Layer.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // @@ -37,14 +37,17 @@ class SCT_Layer: public SCT_UniqueComponentFactory public: SCT_Layer(const std::string & name, int iLayer, - const SCT_Module * module); + SCT_Module * module, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); ~SCT_Layer(); //Explicitly disallow copy, assign to appease coverity SCT_Layer(const SCT_Layer &) = delete; SCT_Layer & operator=(const SCT_Layer &) = delete; - virtual GeoVPhysVol * build(SCT_Identifier id) const; + virtual GeoVPhysVol * build(SCT_Identifier id); public: @@ -100,19 +103,19 @@ private: double m_phiScorpion; double m_zScorpion; - const SCT_Module * m_module; - const SCT_Ski * m_ski; - const SCT_Clamp * m_clamp; - const SCT_CoolingEnd * m_coolingEnd; - const SCT_Bracket * m_bracket; - const SCT_Harness * m_harness; - const SCT_SkiPowerTape * m_skiPowerTape; - const SCT_SkiAux * m_skiAux; - const SCT_Flange * m_flange; - const SCT_SupportCyl * m_supportCyl; - const SCT_FSIEndJewel * m_endJewel; - const SCT_FSIScorpion * m_scorpion; - const SCT_FSIFibreMask * m_fibreMask; + SCT_Module * m_module; + SCT_Ski * m_ski; + SCT_Clamp * m_clamp; + SCT_CoolingEnd * m_coolingEnd; + SCT_Bracket * m_bracket; + SCT_Harness * m_harness; + SCT_SkiPowerTape * m_skiPowerTape; + SCT_SkiAux * m_skiAux; + SCT_Flange * m_flange; + SCT_SupportCyl * m_supportCyl; + SCT_FSIEndJewel * m_endJewel; + SCT_FSIScorpion * m_scorpion; + SCT_FSIFibreMask * m_fibreMask; }; diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_MaterialManager.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_MaterialManager.h old mode 100755 new mode 100644 index 9cdb4ec633d8400024f0d8b693a3df95d8ddcd6f..0bbd85ac9ef9691e6afe8b3f873882300f13029c --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_MaterialManager.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_MaterialManager.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_MATERIALMANAGER_H @@ -7,21 +7,22 @@ // SCT_MaterialManager. This provides an interface to the InDetMaterialManager which in turn // is an interface to GeoModel Material Manager with some additional functionality. +#include "InDetGeoModelUtils/InDetMaterialManager.h" + +#include <memory> +#include <string> class GeoMaterial; class GeoElement; class InDetMaterialManager; - -#include <string> +class SCT_DataBase; class SCT_MaterialManager { public: - SCT_MaterialManager(); - - static void reinit(); + SCT_MaterialManager(SCT_DataBase* db); const GeoMaterial* getMaterial(const std::string & materialName) const; const GeoElement* getElement(const std::string & elementName) const; @@ -31,22 +32,15 @@ public: const std::string & newName = ""); const GeoMaterial *getMaterialForVolume(const std::string & materialName, double volume); - // Default gas material const GeoMaterial* gasMaterial() const; - // Allow changing gas material. (Will be air if never called) - // Will affect all instances. - static void setGasMaterial(const GeoMaterial* material); - static void setGasMaterial(const std::string & materialName); - - private: void loadMaterials(); void addMaterial(GeoMaterial* material); - static InDetMaterialManager *s_materialManager; - static const GeoMaterial* s_gasMaterial; + std::unique_ptr<InDetMaterialManager> m_materialManager; + const GeoMaterial* m_gasMaterial; }; diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Module.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Module.h old mode 100755 new mode 100644 index cd739b6b249d5f9ebeaffb8f3e6b61a3e5f184e9..f34e82b520bea1dc98c579c6a2b24f564e05e00b --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Module.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Module.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_MODULE_H @@ -24,14 +24,17 @@ class SCT_Module: public SCT_UniqueComponentFactory { public: - SCT_Module(const std::string & name); + SCT_Module(const std::string & name, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); ~SCT_Module(); //Explicitly disallow copy, assign to appease coverity SCT_Module(const SCT_Module &) = delete; SCT_Module & operator=(const SCT_Module &) = delete; - virtual GeoVPhysVol * build(SCT_Identifier id) const; + virtual GeoVPhysVol * build(SCT_Identifier id); public: double thickness() const {return m_thickness;} @@ -45,8 +48,8 @@ public: double env2Width() const {return m_env2Width;} double env2Length() const {return m_env2Length;} - GeoTrf::Vector3D * env1RefPointVector() const {return m_env1RefPointVector;} - GeoTrf::Vector3D * env2RefPointVector() const {return m_env2RefPointVector;} + const GeoTrf::Vector3D * env1RefPointVector() const {return m_env1RefPointVector;} + const GeoTrf::Vector3D * env2RefPointVector() const {return m_env2RefPointVector;} double sensorGap() const {return m_sensorGap;} double stereoInner() const {return m_stereoInner;} @@ -91,9 +94,9 @@ private: int m_upperSide; double m_safety; - const SCT_InnerSide * m_innerSide; - const SCT_OuterSide * m_outerSide; - const SCT_BaseBoard * m_baseBoard; + SCT_InnerSide * m_innerSide; + SCT_OuterSide * m_outerSide; + SCT_BaseBoard * m_baseBoard; //const SCT_Sensor * m_sensor; // 14:00 Thu 14th Jul 2005 D.Naito removed. GeoTrf::Transform3D * m_innerSidePos; diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Options.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Options.h old mode 100755 new mode 100644 diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_OuterSide.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_OuterSide.h old mode 100755 new mode 100644 index d3fd0dab87777e53379a9c22d98f25971cbfb637..e8c8840bbdc8c2d19228dea87faf6b1c6ee53766 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_OuterSide.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_OuterSide.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_OUTERSIDE_H @@ -25,21 +25,24 @@ class SCT_OuterSide: public SCT_UniqueComponentFactory { public: - SCT_OuterSide(const std::string & name); + SCT_OuterSide(const std::string & name, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); ~SCT_OuterSide(); //Explicitly disallow copy, assign to appease coverity SCT_OuterSide(const SCT_OuterSide &) = delete; SCT_OuterSide & operator=(const SCT_OuterSide &) = delete; - virtual GeoVPhysVol * build(SCT_Identifier id) const; + virtual GeoVPhysVol * build(SCT_Identifier id); public: double thickness() const {return m_thickness;} double width() const {return m_width;} double length() const {return m_length;} - GeoTrf::Vector3D * env1RefPointVector() const {return m_env1RefPointVector;} - GeoTrf::Vector3D * env2RefPointVector() const {return m_env2RefPointVector;} + const GeoTrf::Vector3D * env1RefPointVector() const {return m_env1RefPointVector;} + const GeoTrf::Vector3D * env2RefPointVector() const {return m_env2RefPointVector;} const SCT_Hybrid * hybrid() const {return m_hybrid;} const SCT_Pigtail * pigtail() const {return m_pigtail;} diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Pigtail.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Pigtail.h old mode 100755 new mode 100644 index a7f8c685f00500b06c2486b157f29eb841fbd47f..7ad7ef872c8c40fdd3610c8cf6c7e5d6e7a79d71 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Pigtail.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Pigtail.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_Pigtail_H @@ -16,7 +16,10 @@ class SCT_Pigtail: public SCT_SharedComponentFactory { public: - SCT_Pigtail(const std::string & name); + SCT_Pigtail(const std::string & name, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); public: const GeoMaterial * material() const {return m_material;} diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_PixelAttachment.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_PixelAttachment.h old mode 100755 new mode 100644 index 5a8b6355486f69a2f6c97734b869945b4c0f1477..f847054549587ea040a8b9ed7529f482a0cea497 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_PixelAttachment.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_PixelAttachment.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_PIXELATTACHMENT_H @@ -15,7 +15,10 @@ class SCT_PixelAttachment : public SCT_SharedComponentFactory { public: - SCT_PixelAttachment(const std::string & name); + SCT_PixelAttachment(const std::string & name, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); public: const GeoMaterial * material() const {return m_material;} diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_PowerTape.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_PowerTape.h old mode 100755 new mode 100644 index ce77d46dfe5c326c901ed804ca69c7367eedc32b..6440152146a34d63a92f3892b8ce31d159c873df --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_PowerTape.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_PowerTape.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_POWERTAPE_H @@ -18,7 +18,10 @@ class SCT_PowerTape: public SCT_SharedComponentFactory { public: - SCT_PowerTape(const std::string & name, double length); + SCT_PowerTape(const std::string & name, double length, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); public: const GeoMaterial * material() const {return m_material;} diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Sensor.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Sensor.h old mode 100755 new mode 100644 index 735437710d90e1c7360a1c5f29a35d75d6578368..d77710e9d46b6e00e789d2c814ed6d99ba09b5db --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Sensor.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Sensor.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_SENSOR_H @@ -7,6 +7,7 @@ #include "SCT_GeoModel/SCT_ComponentFactory.h" +#include <atomic> #include <string> class GeoMaterial; @@ -16,7 +17,10 @@ namespace InDetDD{class SiDetectorDesign;} class SCT_Sensor: public SCT_UniqueComponentFactory { public: - SCT_Sensor(const std::string & name); + SCT_Sensor(const std::string & name, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); public: const GeoMaterial * material() const {return m_material;} @@ -24,7 +28,7 @@ public: double width() const {return m_width;} double length() const {return m_length;} - virtual GeoVPhysVol * build(SCT_Identifier id) const; + virtual GeoVPhysVol * build(SCT_Identifier id); private: void getParameters(); @@ -38,6 +42,7 @@ private: InDetDD::SiDetectorDesign * m_design; + mutable std::atomic_bool m_noElementWarning; }; #endif // SCT_GEOMODEL_SCT_SENSOR_H diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Ski.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Ski.h old mode 100755 new mode 100644 index 63b035611703e85256e707e1b7d9c180e6a9c52e..01dd72fa0feb25898cfbe4be1dbbcfed50ea067c --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Ski.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Ski.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_SKI_H @@ -30,13 +30,16 @@ class SCT_Ski: public SCT_UniqueComponentFactory { public: SCT_Ski(const std::string & name, - const SCT_Module * module, - int stereoSign, - double tilt, - double length); + SCT_Module * module, + int stereoSign, + double tilt, + double length, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); ~SCT_Ski(); - virtual GeoVPhysVol * build(SCT_Identifier id) const; + virtual GeoVPhysVol * build(SCT_Identifier id); public: double thickness() const {return m_thickness;} @@ -57,9 +60,9 @@ public: const SCT_CoolingBlock * coolingBlock() const {return m_coolingBlock;} const SCT_CoolingPipe * coolingPipe() const {return m_coolingPipe;} - GeoTransform * getRefPointTransform() const {return m_refPointTransform;} - GeoTrf::Vector3D * env1RefPointVector() const {return m_env1RefPointVector;} - GeoTrf::Vector3D * env2RefPointVector() const {return m_env2RefPointVector;} + const GeoTransform * getRefPointTransform() const {return m_refPointTransform;} + const GeoTrf::Vector3D * env1RefPointVector() const {return m_env1RefPointVector;} + const GeoTrf::Vector3D * env2RefPointVector() const {return m_env2RefPointVector;} double env1Thickness() const {return m_env1Thickness;} double env1Width() const {return m_env1Width;} double env2Thickness() const {return m_env2Thickness;} @@ -115,10 +118,10 @@ private: double m_doglegOffsetX; double m_doglegOffsetY; - const SCT_Module* m_module; - const SCT_Dogleg* m_dogleg; - const SCT_CoolingBlock* m_coolingBlock; - const SCT_CoolingPipe* m_coolingPipe; + SCT_Module* m_module; + SCT_Dogleg* m_dogleg; + SCT_CoolingBlock* m_coolingBlock; + SCT_CoolingPipe* m_coolingPipe; GeoTransform * m_refPointTransform; GeoTransform * m_coolingPipePos; diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_SkiAux.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_SkiAux.h old mode 100755 new mode 100644 index 8445a0ccf7a687e6675d6e17e14d14c3b62f4358..3985d43a1e1471c139e9e4030adcdcab8f42958f --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_SkiAux.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_SkiAux.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_SKIAUX_H @@ -11,7 +11,6 @@ class SCT_Ski; // 14th Aug 2005 S.Mima modified. -//class SCT_Bracket; class SCT_Bracket; class SCT_Harness; class SCT_SkiPowerTape; @@ -24,16 +23,17 @@ public: SCT_SkiAux(const std::string & name, - const SCT_Ski * ski, - // 14th Aug 2005 S.Mima modified. - //const SCT_Bracket * bracket, - const SCT_Bracket * bracket, - const SCT_Harness * harness, - const SCT_SkiPowerTape * skiPowerTape, - double innerRadius, - double bracketPhiOffset, - double powerTapePhiOffset, - double divisionAngle); + SCT_Ski * ski, + SCT_Bracket * bracket, + SCT_Harness * harness, + SCT_SkiPowerTape * skiPowerTape, + double innerRadius, + double bracketPhiOffset, + double powerTapePhiOffset, + double divisionAngle, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); // // Retrieve basic/derived parameters @@ -71,12 +71,10 @@ private: double m_sectorAngle; // Child detector elements - const SCT_Ski * m_ski; - // 14th Aug 2005 S.Mima modified. - // const SCT_Bracket * m_bracket; - const SCT_Bracket * m_bracket; - const SCT_Harness * m_harness; - const SCT_SkiPowerTape * m_skiPowerTape; + SCT_Ski * m_ski; + SCT_Bracket * m_bracket; + SCT_Harness * m_harness; + SCT_SkiPowerTape * m_skiPowerTape; }; diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_SkiPowerTape.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_SkiPowerTape.h old mode 100755 new mode 100644 index c536ca0de7dee931f46b8ab3fcf819e9faa448e6..1542267f6e0ce2b4f4d424bb6391f0eeb9ef43cf --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_SkiPowerTape.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_SkiPowerTape.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_SKIPOWERTAPE_H @@ -18,7 +18,10 @@ public: SCT_SkiPowerTape(const std::string & name, const SCT_Ski * ski, - double length); + double length, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); // // Methods to return basic and derived parameters. diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Spider.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Spider.h old mode 100755 new mode 100644 index d8ed217cbed32373cd7168e230aec396aa8cb78d..35bfe08ba7901759e732100c5ac14285d22d29c1 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Spider.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Spider.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_SPIDER_H @@ -15,7 +15,10 @@ class SCT_Spider : public SCT_SharedComponentFactory { public: - SCT_Spider(const std::string & name); + SCT_Spider(const std::string & name, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); public: const GeoMaterial * material() const {return m_material;} diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_SupportCyl.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_SupportCyl.h old mode 100755 new mode 100644 index 3e8778c558dd0d4853acccbda6581546b9c1f80d..2f671952e1a0394c19f6e7995b740f98c6d71183 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_SupportCyl.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_SupportCyl.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_GEOMODEL_SCT_SUPPORTCYL_H @@ -15,7 +15,10 @@ class SCT_SupportCyl : public SCT_SharedComponentFactory { public: - SCT_SupportCyl(const std::string & name, int iLayer, double length); + SCT_SupportCyl(const std::string & name, int iLayer, double length, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials); public: const GeoMaterial * material() const {return m_material;} diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Barrel.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Barrel.cxx old mode 100755 new mode 100644 index f9daf218931f6e89004d0f1c9493aa9de7161567..a1177453e4f103fb4edab918cc9fa8271e9782ee --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Barrel.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Barrel.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_GeoModel/SCT_Barrel.h" @@ -37,8 +37,11 @@ #include <iostream> -SCT_Barrel::SCT_Barrel(const std::string & name) - : SCT_UniqueComponentFactory(name) +SCT_Barrel::SCT_Barrel(const std::string & name, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) + : SCT_UniqueComponentFactory(name, detectorManager, geometryManager, materials) { getParameters(); m_logVolume = preBuild(); @@ -48,8 +51,8 @@ SCT_Barrel::SCT_Barrel(const std::string & name) void SCT_Barrel::getParameters() { - const SCT_BarrelParameters * parameters = geometryManager()->barrelParameters(); - + const SCT_BarrelParameters * parameters = m_geometryManager->barrelParameters(); + m_innerRadius = parameters->barrelInnerRadius(); m_outerRadius = parameters->barrelOuterRadius(); m_length = parameters->barrelLength(); @@ -59,13 +62,13 @@ SCT_Barrel::getParameters() m_thermalShieldEndWallThickness = parameters->thermalShieldEndCapThickness(); // Clearannce in z between layer and interlink. - m_zClearance = 1*Gaudi::Units::mm; + m_zClearance = 1.*Gaudi::Units::mm; // Layer internal structure and services depend on geometry version m_isOldGeometry = parameters->isOldGeometry(); // Set numerology - detectorManager()->numerology().setNumLayers(m_numLayers); + m_detectorManager->numerology().setNumLayers(m_numLayers); } @@ -74,30 +77,28 @@ SCT_Barrel::preBuild() { // Create the barrel volume // Tube envelope containing the barrel. - SCT_MaterialManager materials; const GeoTube * barrelEnvelopeShape = new GeoTube(m_innerRadius, m_outerRadius, 0.5 * m_length); - GeoLogVol * barrelLog = - new GeoLogVol(getName(), barrelEnvelopeShape, materials.gasMaterial()); + GeoLogVol * barrelLog = new GeoLogVol(getName(), barrelEnvelopeShape, m_materials->gasMaterial()); return barrelLog; } GeoVPhysVol * -SCT_Barrel::build(SCT_Identifier id) const +SCT_Barrel::build(SCT_Identifier id) { GeoFullPhysVol * barrel = new GeoFullPhysVol(m_logVolume); // Old geometries are no longer supported - give up now if one is requested if(m_isOldGeometry) { - msg(MSG::FATAL) << "Old barrel geometry versions are not supported" << endmsg; + std::cout << "SCT_Barrel Old barrel geometry versions are not supported" << std::endl; return barrel; } // There is only one type of module. So we create it just the once and pass it to the layers. - SCT_Module module("Module"); + SCT_Module module("Module", m_detectorManager, m_geometryManager, m_materials); // Create the interlinks - SCT_InterLink interLink("InterLink"); + SCT_InterLink interLink("InterLink", m_detectorManager, m_geometryManager, m_materials); // Calculte the length of the layer cylinder. This is the barrel length less the thermal // shield and interlink width. @@ -113,7 +114,7 @@ SCT_Barrel::build(SCT_Identifier id) const // Create the layers layerLength = 0.; - SCT_Layer layer("Layer"+intToString(iLayer), iLayer, &module); + SCT_Layer layer("Layer"+intToString(iLayer), iLayer, &module, m_detectorManager, m_geometryManager, m_materials); barrel->add(new GeoNameTag("Layer#"+intToString(iLayer))); barrel->add(new GeoIdentifierTag(iLayer)); // Identifier layer= iLayer id.setLayerDisk(iLayer); @@ -122,7 +123,7 @@ SCT_Barrel::build(SCT_Identifier id) const GeoVPhysVol * layerPV = layer.build(id); barrel->add(layerPV); // Store alignable transform - detectorManager()->addAlignableTransform(2, id.getWaferId(), transform, layerPV); + m_detectorManager->addAlignableTransform(2, id.getWaferId(), transform, layerPV); layerLength = std::max(layerLength,layer.length()); } @@ -136,7 +137,7 @@ SCT_Barrel::build(SCT_Identifier id) const // Build and place the cooling spiders double spiderZPos = 0.; - SCT_Spider spider("Spider"); + SCT_Spider spider("Spider", m_detectorManager, m_geometryManager, m_materials); spiderZPos = interLinkZPos + 0.5*interLink.length() + 0.5*spider.length(); barrel->add(new GeoTransform(GeoTrf::TranslateZ3D(+spiderZPos))); barrel->add(spider.getVolume()); @@ -150,14 +151,14 @@ SCT_Barrel::build(SCT_Identifier id) const buildEMIShield(barrel); // Build and place SCT to Pixel attachment - SCT_PixelAttachment pixelAttachment("AttachmentPixelToSCT"); + SCT_PixelAttachment pixelAttachment("AttachmentPixelToSCT", m_detectorManager, m_geometryManager, m_materials); barrel->add(new GeoTransform(GeoTrf::TranslateZ3D(+pixelAttachment.zPosition()))); // +ve z barrel->add(pixelAttachment.getVolume()); barrel->add(new GeoTransform(GeoTrf::TranslateZ3D(-pixelAttachment.zPosition()))); // -ve z barrel->add(pixelAttachment.getVolume()); // Extra Material - InDetDD::ExtraMaterial xMat(geometryManager()->distortedMatManager()); + InDetDD::ExtraMaterial xMat(m_geometryManager->distortedMatManager()); xMat.add(barrel, "SCTBarrel"); return barrel; @@ -173,8 +174,7 @@ void SCT_Barrel::buildThermalShield(GeoFullPhysVol * parent) const // (c) end panels // The inner cylinder is called 'EMI shield' for backwards compatibility - const SCT_BarrelParameters * parameters = geometryManager()->barrelParameters(); - SCT_MaterialManager materials; + const SCT_BarrelParameters * parameters = m_geometryManager->barrelParameters(); double cylinderOuterRadius = parameters->thermalShieldOuterRadius(); double cylinderInnerRadius = parameters->thermalShieldInnerRadius(); @@ -194,14 +194,14 @@ void SCT_Barrel::buildThermalShield(GeoFullPhysVol * parent) const // The outer cylinder part of thermal shield. const GeoTube * cylinderShape = new GeoTube(cylinderInnerRadius, cylinderOuterRadius, 0.5*cylinderLength); - const GeoMaterial* cylinderMaterial = materials.getMaterialForVolume(cylinderMaterialName,cylinderShape->volume()); + const GeoMaterial* cylinderMaterial = m_materials->getMaterialForVolume(cylinderMaterialName,cylinderShape->volume()); const GeoLogVol * cylinderLog = new GeoLogVol("ThShieldOuterCyl", cylinderShape, cylinderMaterial); GeoPhysVol * cylinder = new GeoPhysVol(cylinderLog); parent->add(cylinder); // The bulkheads const GeoTube * bulkheadShape = new GeoTube(bulkheadInnerRadius, bulkheadOuterRadius, 0.5*bulkheadThickness); - const GeoMaterial* bulkheadMaterial = materials.getMaterialForVolume(bulkheadMaterialName,bulkheadShape->volume()); + const GeoMaterial* bulkheadMaterial = m_materials->getMaterialForVolume(bulkheadMaterialName,bulkheadShape->volume()); const GeoLogVol * bulkheadLog = new GeoLogVol("ThShieldBulkhead", bulkheadShape, bulkheadMaterial); GeoPhysVol * bulkhead = new GeoPhysVol(bulkheadLog); GeoTransform * bulkheadPosPlus = new GeoTransform(GeoTrf::TranslateZ3D(+(endPanelZMax-endPanelThickness-0.5*bulkheadThickness))); @@ -213,7 +213,7 @@ void SCT_Barrel::buildThermalShield(GeoFullPhysVol * parent) const // The end panels const GeoTube * endPanelShape = new GeoTube(endPanelInnerRadius, endPanelOuterRadius, 0.5*endPanelThickness); - const GeoMaterial* endPanelMaterial = materials.getMaterialForVolume(endPanelMaterialName,endPanelShape->volume()); + const GeoMaterial* endPanelMaterial = m_materials->getMaterialForVolume(endPanelMaterialName,endPanelShape->volume()); const GeoLogVol * endPanelLog = new GeoLogVol("ThShieldEndPanel", endPanelShape, endPanelMaterial); GeoPhysVol * endPanel = new GeoPhysVol(endPanelLog); GeoTransform * endPanelPosPlus = new GeoTransform(GeoTrf::TranslateZ3D(+(endPanelZMax-0.5*endPanelThickness))); @@ -228,8 +228,7 @@ void SCT_Barrel::buildThermalShield(GeoFullPhysVol * parent) const void SCT_Barrel::buildEMIShield(GeoFullPhysVol * parent) const { - const SCT_BarrelParameters * parameters = geometryManager()->barrelParameters(); - SCT_MaterialManager materials; + const SCT_BarrelParameters * parameters = m_geometryManager->barrelParameters(); // Parameters of cylinder double innerRadius = parameters->emiShieldInnerRadius(); @@ -258,13 +257,13 @@ void SCT_Barrel::buildEMIShield(GeoFullPhysVol * parent) const const GeoTube * emiShieldTube = new GeoTube(innerRadius, outerRadius, 0.5*length); if (m_isOldGeometry) { emiShieldShape = emiShieldTube; - material = materials.getMaterial(materialName); + material = m_materials->getMaterial(materialName); } else { const GeoTube* cutOut = new GeoTube(innerRadius, outerRadius, 0.5*pixelAttachmentLength); const GeoShape* emiTemp = (GeoShape*)&(emiShieldTube->subtract(*cutOut << GeoTrf::TranslateZ3D(pixelAttachmentZpos))); emiShieldShape = (GeoShape*)&emiTemp->subtract(*cutOut << GeoTrf::TranslateZ3D(-pixelAttachmentZpos)); double emiVolume = emiShieldTube->volume() - 2. * cutOut->volume(); - material = materials.getMaterialForVolume(materialName, emiVolume); + material = m_materials->getMaterialForVolume(materialName, emiVolume); } const GeoLogVol * emiShieldLog = new GeoLogVol("EMIShield", emiShieldShape, material); GeoPhysVol * emiShield = new GeoPhysVol(emiShieldLog); @@ -280,7 +279,7 @@ void SCT_Barrel::buildEMIShield(GeoFullPhysVol * parent) const const GeoShape* jointTemp = (GeoShape*)&(emiJointTubs->subtract(*jointCutOut << GeoTrf::TranslateZ3D(pixelAttachmentZpos))); const GeoShape* emiJointShape = (GeoShape*)&jointTemp->subtract(*jointCutOut << GeoTrf::TranslateZ3D(-pixelAttachmentZpos)); double jointVolume = emiJointTubs->volume() - 2. * jointCutOut->volume(); - const GeoMaterial * jointMaterial = materials.getMaterialForVolume(jointMaterialName, jointVolume); + const GeoMaterial * jointMaterial = m_materials->getMaterialForVolume(jointMaterialName, jointVolume); const GeoLogVol * emiJointLog = new GeoLogVol("EMIShieldJoint", emiJointShape, jointMaterial); GeoPhysVol * emiJoint = new GeoPhysVol(emiJointLog); // Place 3 copies diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_BarrelModuleParameters.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_BarrelModuleParameters.cxx old mode 100755 new mode 100644 index 96f390bc501aa638c93237ebff242b3e30d606ba..5fd468fef6128d189e5cdc40f26e2b2e56784240 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_BarrelModuleParameters.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_BarrelModuleParameters.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_GeoModel/SCT_BarrelModuleParameters.h" @@ -15,9 +15,9 @@ using std::abs; -SCT_BarrelModuleParameters::SCT_BarrelModuleParameters() +SCT_BarrelModuleParameters::SCT_BarrelModuleParameters(SCT_DataBase* rdb) { - m_rdb = SCT_DataBase::instance(); + m_rdb = rdb; } // diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_BarrelParameters.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_BarrelParameters.cxx old mode 100755 new mode 100644 index c9cdeb4c5dd079b8382cca7bdd079d6710233967..468c88ea01511cfc29cbdd37cda95d6c9043d342 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_BarrelParameters.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_BarrelParameters.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_GeoModel/SCT_BarrelParameters.h" @@ -13,9 +13,9 @@ #include <cmath> -SCT_BarrelParameters::SCT_BarrelParameters() +SCT_BarrelParameters::SCT_BarrelParameters(SCT_DataBase* rdb) { - m_rdb = SCT_DataBase::instance(); + m_rdb = rdb; } diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_BaseBoard.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_BaseBoard.cxx old mode 100755 new mode 100644 index 08b804b7dcb84709a873b41095efcb620422a610..1866d3583a2725772b46da919cad233805f5ee3e --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_BaseBoard.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_BaseBoard.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_GeoModel/SCT_BaseBoard.h" @@ -15,8 +15,11 @@ #include "GeoModelKernel/GeoPhysVol.h" #include "GeoModelKernel/GeoMaterial.h" -SCT_BaseBoard::SCT_BaseBoard(const std::string & name) - : SCT_SharedComponentFactory(name) +SCT_BaseBoard::SCT_BaseBoard(const std::string & name, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) + : SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials) { getParameters(); m_physVolume = build(); @@ -25,12 +28,10 @@ SCT_BaseBoard::SCT_BaseBoard(const std::string & name) void SCT_BaseBoard::getParameters() { - const SCT_GeneralParameters * generalParameters = geometryManager()->generalParameters(); - const SCT_BarrelModuleParameters * parameters = geometryManager()->barrelModuleParameters(); + const SCT_GeneralParameters * generalParameters = m_geometryManager->generalParameters(); + const SCT_BarrelModuleParameters * parameters = m_geometryManager->barrelModuleParameters(); - SCT_MaterialManager materials; - - m_material = materials.getMaterial(parameters->baseBoardMaterial()); + m_material = m_materials->getMaterial(parameters->baseBoardMaterial()); m_safety = generalParameters->safety(); m_thickness = parameters->baseBoardThickness(); m_width = parameters->baseBoardWidth(); diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Bracket.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Bracket.cxx old mode 100755 new mode 100644 index 599d5081a5cf2a03085433b3e746c9dccca40a66..43323a0eee5b67f46abc0955169b4bf1b91442bb --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Bracket.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Bracket.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // @@ -18,8 +18,11 @@ #include "GeoModelKernel/GeoMaterial.h" #include "GeoModelKernel/Units.h" -SCT_Bracket::SCT_Bracket(const std::string & name) - : SCT_SharedComponentFactory(name) +SCT_Bracket::SCT_Bracket(const std::string & name, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) + : SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials) { getParameters(); m_physVolume = build(); @@ -29,10 +32,9 @@ SCT_Bracket::SCT_Bracket(const std::string & name) void SCT_Bracket::getParameters() { - const SCT_BarrelParameters * parameters = geometryManager()->barrelParameters(); - SCT_MaterialManager materials; + const SCT_BarrelParameters * parameters = m_geometryManager->barrelParameters(); - m_material = materials.getMaterial(parameters->bracketMaterial()); + m_material = m_materials->getMaterial(parameters->bracketMaterial()); m_thickness = parameters->bracketThickness(); m_length = parameters->bracketLength(); m_width = parameters->bracketWidth(); @@ -47,8 +49,7 @@ SCT_Bracket::build() // Length is in z-direction. const GeoBox * bracketShape = new GeoBox(0.5*m_thickness, 0.5*m_width, 0.5*m_length); - const GeoLogVol *bracketLog = - new GeoLogVol(getName(), bracketShape, m_material); + const GeoLogVol *bracketLog = new GeoLogVol(getName(), bracketShape, m_material); GeoPhysVol * bracket = new GeoPhysVol(bracketLog); return bracket; diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Clamp.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Clamp.cxx old mode 100755 new mode 100644 index a85fb7efcdf376c2b353aa9bc4b91c288645c8f3..e61cea9e49b372b4df875c854d1b35bc5654bf27 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Clamp.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Clamp.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_GeoModel/SCT_Clamp.h" @@ -16,9 +16,12 @@ SCT_Clamp::SCT_Clamp(const std::string & name, int iLayer, - double innerRadius) - : SCT_SharedComponentFactory(name), m_iLayer(iLayer), - m_innerRadius(innerRadius) + double innerRadius, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) + : SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials), + m_iLayer(iLayer), m_innerRadius(innerRadius) { getParameters(); m_physVolume = build(); @@ -28,7 +31,7 @@ SCT_Clamp::SCT_Clamp(const std::string & name, int iLayer, void SCT_Clamp::getParameters() { - const SCT_BarrelParameters * parameters = geometryManager()->barrelParameters(); + const SCT_BarrelParameters * parameters = m_geometryManager->barrelParameters(); m_materialName = parameters->clampMaterial(m_iLayer); m_length = parameters->clampDeltaZ(m_iLayer); @@ -41,11 +44,10 @@ GeoVPhysVol * SCT_Clamp::build() { // Make the clamp. A simple tube. - SCT_MaterialManager materials; const GeoTube * clampShape = new GeoTube(m_innerRadius, m_outerRadius, 0.5 * m_length); - m_material = materials.getMaterialForVolume(m_materialName, clampShape->volume()); - if(!m_material) {m_material = materials.getMaterial(m_materialName);} + m_material = m_materials->getMaterialForVolume(m_materialName, clampShape->volume()); + if(!m_material) {m_material = m_materials->getMaterial(m_materialName);} const GeoLogVol * clampLog = new GeoLogVol(getName(), clampShape, m_material); GeoPhysVol * clamp = new GeoPhysVol(clampLog); diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_CloseOut.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_CloseOut.cxx old mode 100755 new mode 100644 index b4b6db173cf9f9079c9ebd299f50e6ed4d54cf5c..4c229c9abc76d933b93fca9e3f0c1739fcf9db8e --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_CloseOut.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_CloseOut.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_GeoModel/SCT_CloseOut.h" @@ -15,8 +15,12 @@ #include "GeoModelKernel/Units.h" -SCT_CloseOut::SCT_CloseOut(const std::string & name, int iLayer) - : SCT_SharedComponentFactory(name), m_iLayer(iLayer) +SCT_CloseOut::SCT_CloseOut(const std::string & name, int iLayer, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) + : SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials), + m_iLayer(iLayer) { getParameters(); m_physVolume = build(); @@ -26,10 +30,9 @@ SCT_CloseOut::SCT_CloseOut(const std::string & name, int iLayer) void SCT_CloseOut::getParameters() { - const SCT_BarrelParameters * parameters = geometryManager()->barrelParameters(); - SCT_MaterialManager materials; + const SCT_BarrelParameters * parameters = m_geometryManager->barrelParameters(); - m_material = materials.getMaterial(parameters->closeOutMaterial(m_iLayer)); + m_material = m_materials->getMaterial(parameters->closeOutMaterial(m_iLayer)); m_length = parameters->closeOutDeltaZ(m_iLayer); // Same inner and outer radius of support cylinder. diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_ComponentFactory.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_ComponentFactory.cxx old mode 100755 new mode 100644 index cee35aa92f6f025439e7ad61aaadfaeff9c88404..614c31349ff7bdfa9d9a4e7ddb7d4328f29f22c4 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_ComponentFactory.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_ComponentFactory.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_GeoModel/SCT_ComponentFactory.h" @@ -10,41 +10,29 @@ using InDetDD::SCT_DetectorManager; -SCT_DetectorManager * SCT_ComponentFactory::s_detectorManager = 0; -const SCT_GeometryManager * SCT_ComponentFactory::s_geometryManager = 0; +const double SCT_ComponentFactory::s_epsilon = 1.0e-6 * Gaudi::Units::mm; -double SCT_ComponentFactory::s_epsilon = 1.0e-6 * Gaudi::Units::mm; - -SCT_ComponentFactory::SCT_ComponentFactory(const std::string & name) - : m_name(name) +SCT_ComponentFactory::SCT_ComponentFactory(const std::string & name, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) + : m_detectorManager(detectorManager), + m_geometryManager(geometryManager), + m_materials(materials), + m_name(name) {} SCT_ComponentFactory::~SCT_ComponentFactory() {} - -void -SCT_ComponentFactory::setDetectorManager(SCT_DetectorManager * manager) -{ - s_detectorManager = manager; -} - -void -SCT_ComponentFactory::setGeometryManager(SCT_GeometryManager * manager) -{ - s_geometryManager = manager; -} - std::string -SCT_ComponentFactory::intToString(int i) +SCT_ComponentFactory::intToString(int i) const { std::ostringstream str; str << i; return str.str(); } - - double SCT_ComponentFactory::epsilon() const { diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_CoolingBlock.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_CoolingBlock.cxx old mode 100755 new mode 100644 index 5db571788fa8949b60130de4947ae25e2e8a78bd..991a4e10a7aa9b850e5554fdc85b26fa7bad74e8 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_CoolingBlock.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_CoolingBlock.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_GeoModel/SCT_CoolingBlock.h" @@ -15,8 +15,11 @@ #include "GeoModelKernel/GeoMaterial.h" #include "GeoModelKernel/Units.h" -SCT_CoolingBlock::SCT_CoolingBlock(const std::string & name) - : SCT_SharedComponentFactory(name) +SCT_CoolingBlock::SCT_CoolingBlock(const std::string & name, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) + : SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials) { getParameters(); m_physVolume = build(); @@ -26,7 +29,7 @@ SCT_CoolingBlock::SCT_CoolingBlock(const std::string & name) void SCT_CoolingBlock::getParameters() { - const SCT_BarrelParameters * parameters = geometryManager()->barrelParameters(); + const SCT_BarrelParameters * parameters = m_geometryManager->barrelParameters(); m_materialName = parameters->coolingBlockMaterial(); m_thickness = parameters->coolingBlockThickness(); @@ -42,10 +45,8 @@ SCT_CoolingBlock::build() // Width is in phi-direction. // Length is in z-direction. - SCT_MaterialManager materials; - const GeoBox * coolingBlockShape = new GeoBox(0.5*m_thickness, 0.5*m_width, 0.5*m_length); - m_material = materials.getMaterialForVolume(m_materialName, coolingBlockShape->volume()); + m_material = m_materials->getMaterialForVolume(m_materialName, coolingBlockShape->volume()); const GeoLogVol *coolingBlockLog = new GeoLogVol(getName(), coolingBlockShape, m_material); GeoPhysVol * coolingBlock = new GeoPhysVol(coolingBlockLog); diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_CoolingEnd.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_CoolingEnd.cxx old mode 100755 new mode 100644 index 969f719c3ebb6f60807844ee522ab581aa20fdcd..cbaaeeab225c759713f696f557826534f21eb041 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_CoolingEnd.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_CoolingEnd.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_GeoModel/SCT_CoolingEnd.h" @@ -17,8 +17,12 @@ SCT_CoolingEnd::SCT_CoolingEnd(const std::string & name, int iLayer, double innerRadius, - double length) - : SCT_SharedComponentFactory(name), m_iLayer(iLayer), + double length, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) + : SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials), + m_iLayer(iLayer), m_innerRadius(innerRadius), m_length(length) { @@ -30,7 +34,7 @@ SCT_CoolingEnd::SCT_CoolingEnd(const std::string & name, int iLayer, void SCT_CoolingEnd::getParameters() { - const SCT_BarrelParameters * parameters = geometryManager()->barrelParameters(); + const SCT_BarrelParameters * parameters = m_geometryManager->barrelParameters(); m_materialName = parameters->coolingEndMaterial(m_iLayer); m_radialWidth = parameters->clampDeltaR(m_iLayer); @@ -42,11 +46,9 @@ GeoVPhysVol * SCT_CoolingEnd::build() { // Make volume representing cooling inlets, outlets and U-bends. A simple tube. - SCT_MaterialManager materials; - const GeoTube * coolShape = new GeoTube(m_innerRadius, m_outerRadius, 0.5 * m_length); - m_material = materials.getMaterialForVolume(m_materialName, coolShape->volume()); - if(!m_material) {m_material = materials.getMaterial(m_materialName);} + m_material = m_materials->getMaterialForVolume(m_materialName, coolShape->volume()); + if(!m_material) m_material = m_materials->getMaterial(m_materialName); const GeoLogVol * coolLog = new GeoLogVol(getName(), coolShape, m_material); GeoPhysVol * cool = new GeoPhysVol(coolLog); diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_CoolingPipe.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_CoolingPipe.cxx old mode 100755 new mode 100644 index cf1d88eaa641bba281c0ad5480393737532ac93e..17f7b184ed3dd14c6bac0a8415f3677396660b2a --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_CoolingPipe.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_CoolingPipe.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_GeoModel/SCT_CoolingPipe.h" @@ -15,8 +15,12 @@ #include "GeoModelKernel/GeoMaterial.h" #include "GeoModelKernel/Units.h" -SCT_CoolingPipe::SCT_CoolingPipe(const std::string & name, double length) - : SCT_SharedComponentFactory(name), m_length(length) +SCT_CoolingPipe::SCT_CoolingPipe(const std::string & name, double length, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) + : SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials), + m_length(length) { getParameters(); m_physVolume = build(); @@ -26,7 +30,7 @@ SCT_CoolingPipe::SCT_CoolingPipe(const std::string & name, double length) void SCT_CoolingPipe::getParameters() { - const SCT_BarrelParameters * parameters = geometryManager()->barrelParameters(); + const SCT_BarrelParameters * parameters = m_geometryManager->barrelParameters(); m_materialName = parameters->coolingPipeMaterial(); m_pipeRadius = parameters->coolingPipeRadius(); @@ -37,11 +41,9 @@ SCT_CoolingPipe::build() { // Build the CoolingPipe. - SCT_MaterialManager materials; - const GeoTube * coolingPipeShape = new GeoTube(0., m_pipeRadius, 0.5*m_length); - m_material = materials.getMaterialForVolume(m_materialName, coolingPipeShape->volume()); - if(!m_material) {m_material = materials.getMaterial(m_materialName);} + m_material = m_materials->getMaterialForVolume(m_materialName, coolingPipeShape->volume()); + if(!m_material) m_material = m_materials->getMaterial(m_materialName); const GeoLogVol *coolingPipeLog = new GeoLogVol(getName(), coolingPipeShape, m_material); GeoPhysVol * coolingPipe = new GeoPhysVol(coolingPipeLog); diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DataBase.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DataBase.cxx old mode 100755 new mode 100644 index 35264aee4d29c4491c9d8190c45732db3b18793e..ef69ebbaa5a9a4e0c1499935a6a5022c10641918 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DataBase.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DataBase.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_GeoModel/SCT_DataBase.h" @@ -15,41 +15,11 @@ #include <iostream> -SCT_DataBase * SCT_DataBase::s_instance = 0; -const SCT_GeoModelAthenaComps * SCT_DataBase::s_athenaComps = 0; - -SCT_DataBase * SCT_DataBase::instance() -{ - if (s_athenaComps) { - if (!s_instance) s_instance = new SCT_DataBase; - } else { - std::cout << "SCT_Data ERROR. Cannot create instance without SCT_GeoModelAthenaComps object!" << std::endl; - } - return s_instance; -} - -void SCT_DataBase::reinit() -{ - delete s_instance; - s_instance = 0; -} - -const SCT_GeoModelAthenaComps * -SCT_DataBase::athenaComps() const -{ - return s_athenaComps; -} - -void -SCT_DataBase::setAthenaComps(const SCT_GeoModelAthenaComps * athenaComps) +SCT_DataBase::SCT_DataBase(const SCT_GeoModelAthenaComps * athenaComps) { - s_athenaComps = athenaComps; -} - -SCT_DataBase::SCT_DataBase() + m_athenaComps = athenaComps; -{ - IGeoDbTagSvc * geoDbTag = s_athenaComps->geoDbTagSvc(); + IGeoDbTagSvc * geoDbTag = m_athenaComps->geoDbTagSvc(); // Get version tag and node for SCT DecodeVersionKey versionKey(geoDbTag,"SCT"); @@ -60,7 +30,7 @@ SCT_DataBase::SCT_DataBase() DecodeVersionKey indetVersionKey(geoDbTag,"InnerDetector"); // Access the RDB - IRDBAccessSvc* rdbSvc = s_athenaComps->rdbAccessSvc(); + IRDBAccessSvc* rdbSvc = m_athenaComps->rdbAccessSvc(); // SCT version tag m_sctVersionTag = rdbSvc->getChildTag("SCT", versionKey.tag(), versionKey.node()); @@ -218,6 +188,7 @@ SCT_DataBase::SCT_DataBase() } +const SCT_GeoModelAthenaComps* SCT_DataBase::athenaComps() const { return m_athenaComps; } IRDBRecordset_ptr SCT_DataBase::weightTable() const {return m_weightTable;} @@ -293,5 +264,5 @@ const std::string & SCT_DataBase::versionTag() const { MsgStream& SCT_DataBase::msg (MSG::Level lvl) const { - return s_athenaComps->msg(lvl); + return m_athenaComps->msg(lvl); } diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DetectorFactory.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DetectorFactory.cxx old mode 100755 new mode 100644 index 94b2350d3ac814ea93b2f23630760bbda38f0c6a..8d0f1d555fd90333d999fcb0e00c94cdefa32c19 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DetectorFactory.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DetectorFactory.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // @@ -8,6 +8,8 @@ #include "SCT_GeoModel/SCT_DetectorFactory.h" + +#include "SCT_GeoModel/SCT_DataBase.h" #include "SCT_GeoModel/SCT_Identifier.h" #include "SCT_GeoModel/SCT_GeometryManager.h" #include "SCT_GeoModel/SCT_MaterialManager.h" @@ -70,24 +72,18 @@ SCT_DetectorFactory::SCT_DetectorFactory(const SCT_GeoModelAthenaComps * athenaC // Create the detector manager m_detectorManager = new SCT_DetectorManager(detStore()); - // + // Create the database + m_db = new SCT_DataBase{athenaComps}; + + // Create the material manager + m_materials = new SCT_MaterialManager{m_db}; + // Create the geometry manager. - // - - m_geometryManager = new SCT_GeometryManager(); + m_geometryManager = new SCT_GeometryManager{m_db}; m_geometryManager->setOptions(options); - m_geometryManager->setAthenaComps(athenaComps); m_useDynamicAlignFolders = options.dynamicAlignFolders(); - // Pass the Athena components the data base access class - SCT_DataBase::setAthenaComps(athenaComps); - - // Create SiCommonItems. These are items that are shared by all elements - SiCommonItems * commonItems = new SiCommonItems(athenaComps->getIdHelper()); - m_geometryManager->setCommonItems(commonItems); - - // Set Version information // Get the geometry tag DecodeVersionKey versionKey(geoDbTagSvc(),"SCT"); @@ -118,12 +114,6 @@ SCT_DetectorFactory::SCT_DetectorFactory(const SCT_GeoModelAthenaComps * athenaC versionPatchNumber); m_detectorManager->setVersion(version); - // Initailize some static variables in various classes/ - SCT_ComponentFactory::setDetectorManager(m_detectorManager); - SCT_ComponentFactory::setGeometryManager(m_geometryManager); - - SCT_Identifier::setIdHelper(athenaComps->getIdHelper()); - } @@ -131,8 +121,9 @@ SCT_DetectorFactory::~SCT_DetectorFactory() { // NB the detector manager (m_detectorManager)is stored in the detector store by the // Tool and so we don't delete it. + delete m_db; + delete m_materials; delete m_geometryManager; - } void SCT_DetectorFactory::create(GeoPhysVol *world) @@ -147,10 +138,6 @@ void SCT_DetectorFactory::create(GeoPhysVol *world) // The tree tops get added to world. We name it "indet" though. GeoPhysVol *indet = world; - // Set default gas throughout detector. - // Air is the default if this is not set. - // SCT_MaterialManager::setGasMaterial("std::Air"); - const SCT_GeneralParameters * sctGeneral = m_geometryManager->generalParameters(); GeoTrf::Transform3D sctTransform = sctGeneral->partTransform("SCT"); @@ -175,9 +162,9 @@ void SCT_DetectorFactory::create(GeoPhysVol *world) m_detectorManager->numerology().addBarrel(0); // Create the SCT Barrel - SCT_Barrel sctBarrel("SCT_Barrel"); + SCT_Barrel sctBarrel("SCT_Barrel", m_detectorManager, m_geometryManager, m_materials); - SCT_Identifier id; + SCT_Identifier id{m_geometryManager->athenaComps()->getIdHelper()}; id.setBarrelEC(0); GeoVPhysVol * barrelPV = sctBarrel.build(id); GeoAlignableTransform * barrelTransform = new GeoAlignableTransform(sctTransform * sctGeneral->partTransform(barrelLabel)); @@ -206,9 +193,9 @@ void SCT_DetectorFactory::create(GeoPhysVol *world) m_detectorManager->numerology().addEndcap(2); // Create the Forward - SCT_Forward sctForwardPlus("SCT_ForwardA", +2); + SCT_Forward sctForwardPlus("SCT_ForwardA", +2, m_detectorManager, m_geometryManager, m_materials); - SCT_Identifier idFwdPlus; + SCT_Identifier idFwdPlus{m_geometryManager->athenaComps()->getIdHelper()}; idFwdPlus.setBarrelEC(2); GeoVPhysVol * forwardPlusPV = sctForwardPlus.build(idFwdPlus); GeoTrf::Transform3D fwdTransformPlus(sctTransform @@ -239,9 +226,9 @@ void SCT_DetectorFactory::create(GeoPhysVol *world) m_detectorManager->numerology().addEndcap(-2); - SCT_Forward sctForwardMinus("SCT_ForwardC",-2); + SCT_Forward sctForwardMinus("SCT_ForwardC", -2, m_detectorManager, m_geometryManager, m_materials); - SCT_Identifier idFwdMinus; + SCT_Identifier idFwdMinus{m_geometryManager->athenaComps()->getIdHelper()}; idFwdMinus.setBarrelEC(-2); GeoVPhysVol * forwardMinusPV = sctForwardMinus.build(idFwdMinus); diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DetectorTool.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DetectorTool.cxx old mode 100755 new mode 100644 index c3c00a5bd7a567c585cf45dc8b41c17c74dec78d..93b7e54b5c7dad8b9358808e52331f6118e9e645 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DetectorTool.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DetectorTool.cxx @@ -50,10 +50,6 @@ SCT_DetectorTool::SCT_DetectorTool(const std::string& type, StatusCode SCT_DetectorTool::create() { - // Reinit various singleton type objects. - SCT_DataBase::reinit(); - SCT_MaterialManager::reinit(); - // Get the detector configuration. ATH_CHECK(m_geoDbTagSvc.retrieve()); @@ -156,10 +152,6 @@ SCT_DetectorTool::create() ATH_CHECK(detStore()->symLink(m_manager, siDetManager)); } - // Delete unneeded singleton objects - SCT_DataBase::reinit(); - SCT_MaterialManager::reinit(); - return StatusCode::SUCCESS; } @@ -175,7 +167,7 @@ SCT_DetectorTool::clear() } StatusCode -SCT_DetectorTool::registerCallback() +SCT_DetectorTool::registerCallback ATLAS_NOT_THREAD_SAFE () { StatusCode sc{StatusCode::FAILURE, true}; if (m_alignable.value()) { diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Dogleg.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Dogleg.cxx old mode 100755 new mode 100644 index e79d3211d0a27bae118b0241115ebaeb0b686ed3..b5c0345cec58f4adb6c675d5432919c980004b1f --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Dogleg.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Dogleg.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // @@ -18,8 +18,11 @@ #include "GeoModelKernel/GeoMaterial.h" #include "GeoModelKernel/Units.h" -SCT_Dogleg::SCT_Dogleg(const std::string & name) - : SCT_SharedComponentFactory(name) +SCT_Dogleg::SCT_Dogleg(const std::string & name, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) + : SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials) { getParameters(); m_physVolume = build(); @@ -29,10 +32,9 @@ SCT_Dogleg::SCT_Dogleg(const std::string & name) void SCT_Dogleg::getParameters() { - const SCT_BarrelParameters * parameters = geometryManager()->barrelParameters(); - SCT_MaterialManager materials; - - m_material = materials.getMaterial(parameters->doglegMaterial()); + const SCT_BarrelParameters * parameters = m_geometryManager->barrelParameters(); + + m_material = m_materials->getMaterial(parameters->doglegMaterial()); m_thickness = parameters->doglegThickness(); m_length = parameters->doglegLength(); m_width = parameters->doglegWidth(); diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FSIEndJewel.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FSIEndJewel.cxx old mode 100755 new mode 100644 index f05175588911f798bfaec00f44cd4f2cfd5884cd..21c6277b383abd7070e89f5574519392f6d66770 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FSIEndJewel.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FSIEndJewel.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_GeoModel/SCT_FSIEndJewel.h" @@ -15,8 +15,11 @@ #include "GeoModelKernel/GeoMaterial.h" #include "GeoModelKernel/Units.h" -SCT_FSIEndJewel::SCT_FSIEndJewel(const std::string & name) - : SCT_SharedComponentFactory(name) +SCT_FSIEndJewel::SCT_FSIEndJewel(const std::string & name, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) + : SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials) { getParameters(); m_physVolume = build(); @@ -26,8 +29,7 @@ SCT_FSIEndJewel::SCT_FSIEndJewel(const std::string & name) void SCT_FSIEndJewel::getParameters() { - const SCT_BarrelParameters * parameters = geometryManager()->barrelParameters(); - SCT_MaterialManager materials; + const SCT_BarrelParameters * parameters = m_geometryManager->barrelParameters(); m_materialName = parameters->fsiEndJewelMaterial(); m_radialWidth = parameters->fsiEndJewelRadialWidth(); @@ -41,12 +43,9 @@ SCT_FSIEndJewel::build() // Build the barrel FSI end jewel. Just a simple box. // Length is in z-direction. - SCT_MaterialManager materials; - const GeoBox * jewelShape = new GeoBox(0.5*m_radialWidth, 0.5*m_rPhiWidth, 0.5*m_length); - m_material = materials.getMaterialForVolume(m_materialName, jewelShape->volume()); - const GeoLogVol *jewelLog = - new GeoLogVol(getName(), jewelShape, m_material); + m_material = m_materials->getMaterialForVolume(m_materialName, jewelShape->volume()); + const GeoLogVol *jewelLog = new GeoLogVol(getName(), jewelShape, m_material); GeoPhysVol * jewel = new GeoPhysVol(jewelLog); return jewel; diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FSIFibreMask.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FSIFibreMask.cxx old mode 100755 new mode 100644 index 96c53597a00d66b52e86cba972027de4ccfa111c..b16d678153db65551d6521858719b5747fb740fa --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FSIFibreMask.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FSIFibreMask.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_GeoModel/SCT_FSIFibreMask.h" @@ -15,8 +15,12 @@ #include "GeoModelKernel/Units.h" -SCT_FSIFibreMask::SCT_FSIFibreMask(const std::string & name, int iLayer, double length) - : SCT_SharedComponentFactory(name), m_iLayer(iLayer), m_length(length) +SCT_FSIFibreMask::SCT_FSIFibreMask(const std::string & name, int iLayer, double length, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) + : SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials), + m_iLayer(iLayer), m_length(length) { getParameters(); m_physVolume = build(); @@ -26,8 +30,8 @@ SCT_FSIFibreMask::SCT_FSIFibreMask(const std::string & name, int iLayer, double void SCT_FSIFibreMask::getParameters() { - const SCT_BarrelParameters * parameters = geometryManager()->barrelParameters(); - + const SCT_BarrelParameters * parameters = m_geometryManager->barrelParameters(); + m_materialName = parameters->fsiFibreMaskMaterial(); m_outerRadius = parameters->supportCylInnerRadius(m_iLayer); m_innerRadius = m_outerRadius - parameters->fsiFibreMaskDeltaR(); @@ -38,15 +42,11 @@ GeoVPhysVol * SCT_FSIFibreMask::build() { // Make the support cyliner. A simple tube. - SCT_MaterialManager materials; - const GeoTube * fibreMaskShape = new GeoTube(m_innerRadius, m_outerRadius, 0.5 * m_length); - m_material = materials.getMaterialForVolume(m_materialName+intToString(m_iLayer), fibreMaskShape->volume()); + m_material = m_materials->getMaterialForVolume(m_materialName+intToString(m_iLayer), fibreMaskShape->volume()); const GeoLogVol * fibreMaskLog = new GeoLogVol(getName(), fibreMaskShape, m_material); GeoPhysVol * fibreMask = new GeoPhysVol(fibreMaskLog); return fibreMask; } - - diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FSIHelper.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FSIHelper.cxx old mode 100755 new mode 100644 diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FSIScorpion.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FSIScorpion.cxx old mode 100755 new mode 100644 index 57a8a419a60b2aecbbd29dbe299d3c4c5d2d5fe4..a94a913277da6f27cca6ab4dcaafea053b1b48bf --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FSIScorpion.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FSIScorpion.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_GeoModel/SCT_FSIScorpion.h" @@ -15,8 +15,11 @@ #include "GeoModelKernel/GeoMaterial.h" #include "GeoModelKernel/Units.h" -SCT_FSIScorpion::SCT_FSIScorpion(const std::string & name) - : SCT_SharedComponentFactory(name) +SCT_FSIScorpion::SCT_FSIScorpion(const std::string & name, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) + : SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials) { getParameters(); m_physVolume = build(); @@ -26,9 +29,7 @@ SCT_FSIScorpion::SCT_FSIScorpion(const std::string & name) void SCT_FSIScorpion::getParameters() { - const SCT_BarrelParameters * parameters = geometryManager()->barrelParameters(); - SCT_MaterialManager materials; - + const SCT_BarrelParameters * parameters = m_geometryManager->barrelParameters(); m_materialName = parameters->fsiScorpionMaterial(); m_radialWidth = parameters->fsiScorpionRadialWidth(); m_rPhiWidth = parameters->fsiScorpionRPhiWidth(); @@ -40,13 +41,10 @@ SCT_FSIScorpion::build() { // Build the barrel FSI scorpion. Just a simple box. - // Length is in z-direction. - SCT_MaterialManager materials; - + // Length is in z-direction. const GeoBox * scorpionShape = new GeoBox(0.5*m_radialWidth, 0.5*m_rPhiWidth, 0.5*m_length); - m_material = materials.getMaterialForVolume(m_materialName, scorpionShape->volume()); - const GeoLogVol *scorpionLog = - new GeoLogVol(getName(), scorpionShape, m_material); + m_material = m_materials->getMaterialForVolume(m_materialName, scorpionShape->volume()); + const GeoLogVol *scorpionLog = new GeoLogVol(getName(), scorpionShape, m_material); GeoPhysVol * scorpion = new GeoPhysVol(scorpionLog); return scorpion; diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Flange.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Flange.cxx old mode 100755 new mode 100644 index 4422b3f751c0a1da9299bb72d606d9279c8d6380..14e0cb9e72267a2d4fb31414a9c6c2ecb09cd2b0 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Flange.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Flange.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_GeoModel/SCT_Flange.h" @@ -15,8 +15,12 @@ #include "GeoModelKernel/Units.h" -SCT_Flange::SCT_Flange(const std::string & name, int iLayer) - : SCT_SharedComponentFactory(name), m_iLayer(iLayer) +SCT_Flange::SCT_Flange(const std::string & name, int iLayer, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) + : SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials), + m_iLayer(iLayer) { getParameters(); m_physVolume = build(); @@ -26,7 +30,7 @@ SCT_Flange::SCT_Flange(const std::string & name, int iLayer) void SCT_Flange::getParameters() { - const SCT_BarrelParameters * parameters = geometryManager()->barrelParameters(); + const SCT_BarrelParameters * parameters = m_geometryManager->barrelParameters(); m_materialName = parameters->flangeMaterial(m_iLayer); m_length = parameters->flangeDeltaZ(m_iLayer); @@ -47,11 +51,9 @@ GeoVPhysVol * SCT_Flange::build() { // Make the flange. A simple tube. - SCT_MaterialManager materials; - const GeoTube * flangeShape = new GeoTube(m_innerRadius, m_outerRadius, 0.5 * m_length); - m_material = materials.getMaterialForVolume(m_materialName, flangeShape->volume()); - if(!m_material) {m_material = materials.getMaterial(m_materialName);} + m_material = m_materials->getMaterialForVolume(m_materialName, flangeShape->volume()); + if(!m_material) {m_material = m_materials->getMaterial(m_materialName);} const GeoLogVol * flangeLog = new GeoLogVol(getName(), flangeShape, m_material); GeoPhysVol * flange = new GeoPhysVol(flangeLog); diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Forward.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Forward.cxx old mode 100755 new mode 100644 index 405c90423da59034bf55eb628f0490f939702844..a9700ebd9dcb69bc44ed5e28665c0d74ece4c016 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Forward.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Forward.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_GeoModel/SCT_Forward.h" @@ -13,7 +13,6 @@ #include "SCT_GeoModel/SCT_FwdWheel.h" #include "SCT_GeoModel/SCT_FwdModule.h" #include "SCT_GeoModel/SCT_FwdRing.h" -#include "SCT_GeoModel/SCT_FwdRingCooling.h" #include "SCT_GeoModel/SCT_FwdSupportFrame.h" #include "SCT_GeoModel/SCT_FwdCoolingPipe.h" #include "SCT_GeoModel/SCT_FwdPowerTape.h" @@ -37,8 +36,11 @@ #include <sstream> #include <cmath> -SCT_Forward::SCT_Forward(const std::string & name, int ec) - : SCT_UniqueComponentFactory(name), +SCT_Forward::SCT_Forward(const std::string & name, int ec, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) + : SCT_UniqueComponentFactory(name, detectorManager, geometryManager, materials), m_endcap(ec) { getParameters(); @@ -55,8 +57,8 @@ void SCT_Forward::getParameters() { - const SCT_ForwardParameters * parameters = geometryManager()->forwardParameters(); - const SCT_ForwardModuleParameters * moduleParameters = geometryManager()->forwardModuleParameters(); + const SCT_ForwardParameters * parameters = m_geometryManager->forwardParameters(); + const SCT_ForwardModuleParameters * moduleParameters = m_geometryManager->forwardModuleParameters(); //m_numRingTypes = parameters->fwdNumRingTypes(); m_numModuleTypes = moduleParameters->fwdModuleNumTypes(); @@ -84,7 +86,7 @@ SCT_Forward::getParameters() // Set numerology - detectorManager()->numerology().setNumDisks(m_numWheels); + m_detectorManager->numerology().setNumDisks(m_numWheels); } @@ -98,35 +100,36 @@ SCT_Forward::preBuild() // We make all the module types here. There is a outer, middle, truncated middle and inner type module. for (int iModuleType = 0; iModuleType < m_numModuleTypes; iModuleType++){ - m_modules.push_back(new SCT_FwdModule("FwdModule"+intToString(iModuleType), iModuleType)); + m_modules.push_back(new SCT_FwdModule("FwdModule"+intToString(iModuleType), iModuleType, + m_detectorManager, m_geometryManager, m_materials)); } for (int iWheel = 0; iWheel < m_numWheels; iWheel++){ // Build Wheels std::ostringstream name; name << "Wheel" << iWheel << ((m_endcap > 0) ? "A" : "C"); - const SCT_FwdWheel * wheel = new SCT_FwdWheel(name.str(), iWheel, m_modules, m_endcap); + SCT_FwdWheel * wheel = new SCT_FwdWheel(name.str(), iWheel, m_modules, m_endcap, + m_detectorManager, m_geometryManager, m_materials); m_wheels.push_back(wheel); } // Make one end of the Forward tracker // Tube envelope containing the forward - SCT_MaterialManager materials; const GeoTube * forwardEnvelopeShape = new GeoTube(m_innerRadius, m_outerRadius, 0.5 * m_length); const GeoLogVol * forwardLog = - new GeoLogVol(getName(), forwardEnvelopeShape, materials.gasMaterial()); + new GeoLogVol(getName(), forwardEnvelopeShape, m_materials->gasMaterial()); return forwardLog; } GeoVPhysVol * -SCT_Forward::build(SCT_Identifier id) const +SCT_Forward::build(SCT_Identifier id) { GeoFullPhysVol * forward = new GeoFullPhysVol(m_logVolume); for (int iWheel = 0; iWheel < m_numWheels; iWheel++){ - const SCT_FwdWheel * wheel = m_wheels[iWheel]; + SCT_FwdWheel * wheel = m_wheels[iWheel]; std::ostringstream wheelName; wheelName << "Wheel#" << iWheel; double zpos = wheel->zPosition() - zCenter(); forward->add(new GeoNameTag(wheelName.str())); @@ -138,13 +141,13 @@ SCT_Forward::build(SCT_Identifier id) const forward->add(wheelPV); // Store the alignable transform - detectorManager()->addAlignableTransform(2, id.getWaferId(), transform, wheelPV); + m_detectorManager->addAlignableTransform(2, id.getWaferId(), transform, wheelPV); } // // Place SupportFrame // - SCT_FwdSupportFrame supportFrame("SupportFrame"); + SCT_FwdSupportFrame supportFrame("SupportFrame", m_detectorManager, m_geometryManager, m_materials); double supportFrameZPos = supportFrame.zPosition() - zCenter(); forward->add(new GeoTransform(GeoTrf::TranslateZ3D(supportFrameZPos))); forward->add(supportFrame.getVolume()); @@ -157,7 +160,8 @@ SCT_Forward::build(SCT_Identifier id) const SCT_FwdCylinderServices cylinderServices("CylinderServices", supportFrame.outerRadius(), m_outerRadiusCylinderServices, - supportFrame.length()); + supportFrame.length(), + m_detectorManager, m_geometryManager, m_materials); forward->add(new GeoTransform(GeoTrf::TranslateZ3D(supportFrameZPos))); forward->add(cylinderServices.getVolume()); @@ -188,7 +192,8 @@ SCT_Forward::build(SCT_Identifier id) const // Label Cooling pipe with W# at end of string SCT_FwdCoolingPipe coolingPipe("OffDiskCoolingPipeW"+intToString(iWheel), - numPipes, rStart, startPos, endPos); + numPipes, rStart, startPos, endPos, + m_detectorManager, m_geometryManager, m_materials); // Place the cooling pipes double coolingPipeZPos = coolingPipe.zPosition() - zCenter(); @@ -227,7 +232,8 @@ SCT_Forward::build(SCT_Identifier id) const // Label power tape with W# at end of string SCT_FwdPowerTape powerTape("OffDiskPowerTapeW"+intToString(iWheel), - numModules, rStart, startPos, endPos); + numModules, rStart, startPos, endPos, + m_detectorManager, m_geometryManager, m_materials); // Place Power Tapes double powerTapeZPos = powerTape.zPosition() - zCenter(); @@ -245,14 +251,14 @@ SCT_Forward::build(SCT_Identifier id) const // for (int iElement = 0; iElement < m_numThermalShieldElements; iElement++){ SCT_FwdThermalShieldElement thermalShieldElement("FwdThermalShieldElement"+intToString(iElement), - iElement); + iElement, m_detectorManager, m_geometryManager, m_materials); double elementZPos = thermalShieldElement.zPosition() - zCenter(); forward->add(new GeoTransform(GeoTrf::TranslateZ3D(elementZPos))); forward->add(thermalShieldElement.getVolume()); } // Extra Material - InDetDD::ExtraMaterial xMat(geometryManager()->distortedMatManager()); + InDetDD::ExtraMaterial xMat(m_geometryManager->distortedMatManager()); xMat.add(forward, "SCTEndcap", zCenter()); if (m_endcap > 0) { xMat.add(forward, "SCTEndcapA", zCenter()); diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_ForwardModuleParameters.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_ForwardModuleParameters.cxx old mode 100755 new mode 100644 index fb09c3900adb960314417fe6ec5df4da25b79130..ef6af4c275dd7e994ee79f39486e6ce6d56c6ba1 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_ForwardModuleParameters.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_ForwardModuleParameters.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_GeoModel/SCT_ForwardModuleParameters.h" @@ -14,9 +14,9 @@ #include <cmath> -SCT_ForwardModuleParameters::SCT_ForwardModuleParameters() +SCT_ForwardModuleParameters::SCT_ForwardModuleParameters(SCT_DataBase* rdb) { - m_rdb = SCT_DataBase::instance(); + m_rdb = rdb; } // diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_ForwardParameters.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_ForwardParameters.cxx old mode 100755 new mode 100644 index 80fc94334cbbc2b0454874d57d8df59a3979e572..f72533b1ed77d179bb36f09e7315296642e842e9 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_ForwardParameters.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_ForwardParameters.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_GeoModel/SCT_ForwardParameters.h" @@ -15,15 +15,14 @@ #include <iostream> #include <cmath> -SCT_ForwardParameters::SCT_ForwardParameters() - : m_fsiHelper(0) +SCT_ForwardParameters::SCT_ForwardParameters(SCT_DataBase* rdb) { - m_rdb = SCT_DataBase::instance(); + m_rdb = rdb; + m_fsiHelper = std::make_unique<FSIHelper>(m_rdb); } SCT_ForwardParameters::~SCT_ForwardParameters() { - delete m_fsiHelper; } // @@ -574,7 +573,6 @@ SCT_ForwardParameters::fwdFSIGeomZOffset(int iType) const const FSIHelper & SCT_ForwardParameters::fsiHelper() const { - if (!m_fsiHelper) m_fsiHelper = new FSIHelper(m_rdb); return *m_fsiHelper; } @@ -776,18 +774,12 @@ SCT_ForwardParameters& SCT_ForwardParameters::operator=(const SCT_ForwardParameters& right) { if (this != &right) { m_rdb = right.m_rdb; - m_fsiHelper = nullptr; - if (right.m_fsiHelper!=nullptr) { - m_fsiHelper = new FSIHelper(m_rdb); - } + m_fsiHelper.reset(new FSIHelper(m_rdb)); } return *this; } SCT_ForwardParameters::SCT_ForwardParameters(const SCT_ForwardParameters& right) { m_rdb = right.m_rdb; - m_fsiHelper = nullptr; - if (right.m_fsiHelper!=nullptr) { - m_fsiHelper = new FSIHelper(m_rdb); - } + m_fsiHelper.reset(new FSIHelper(m_rdb)); } diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdCoolingBlock.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdCoolingBlock.cxx old mode 100755 new mode 100644 index b3420cf13797aabf14b2c13852b2fb6eb2a869d2..2ec1b74a90dc4e1b73ef8f4cea6668bd140819d3 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdCoolingBlock.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdCoolingBlock.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_GeoModel/SCT_FwdCoolingBlock.h" @@ -17,8 +17,12 @@ #include <iostream> -SCT_FwdCoolingBlock::SCT_FwdCoolingBlock(const std::string & name, int hiLo, int mainOrSecondary) - : SCT_SharedComponentFactory(name), m_hiLo(hiLo), m_mainSec(mainOrSecondary) +SCT_FwdCoolingBlock::SCT_FwdCoolingBlock(const std::string & name, int hiLo, int mainOrSecondary, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) + : SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials), + m_hiLo(hiLo), m_mainSec(mainOrSecondary) { getParameters(); m_physVolume = build(); @@ -28,7 +32,7 @@ SCT_FwdCoolingBlock::SCT_FwdCoolingBlock(const std::string & name, int hiLo, int void SCT_FwdCoolingBlock::getParameters() { - const SCT_ForwardParameters * parameters = geometryManager()->forwardParameters(); + const SCT_ForwardParameters * parameters = m_geometryManager->forwardParameters(); m_coolingBlockIndex = -1; for (int i = 0; i < 4; i++){ @@ -38,7 +42,7 @@ SCT_FwdCoolingBlock::getParameters() } if (m_coolingBlockIndex < 0){ - std::cout << "SCT_FwdRing: ERROR. Cooling block type is missing. HiLo = " << m_hiLo + std::cout << "SCT_FwdCoolingBlock: ERROR. Cooling block type is missing. HiLo = " << m_hiLo << ", MainSecondary = " << m_mainSec << std::endl; // Will crash or give unpredictable results } @@ -57,11 +61,8 @@ SCT_FwdCoolingBlock::build() { // Build the CoolingBlock. Just a simple box. - - SCT_MaterialManager materials; - const GeoBox * coolingBlockShape = new GeoBox(0.5*m_deltaR, 0.5*m_rphi, 0.5*m_thickness); - m_material = materials.getMaterialForVolume(m_materialName, coolingBlockShape->volume()); + m_material = m_materials->getMaterialForVolume(m_materialName, coolingBlockShape->volume()); const GeoLogVol *coolingBlockLog = new GeoLogVol(getName(), coolingBlockShape, m_material); GeoPhysVol * coolingBlock = new GeoPhysVol(coolingBlockLog); diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdCoolingPipe.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdCoolingPipe.cxx old mode 100755 new mode 100644 index bd06f571ebd0ef284f2fcd21af6af02499cbd7b5..0ac7f63c0b60af43620262852ec71f72bafedbff --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdCoolingPipe.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdCoolingPipe.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_GeoModel/SCT_FwdCoolingPipe.h" @@ -22,8 +22,12 @@ SCT_FwdCoolingPipe::SCT_FwdCoolingPipe(const std::string & name, int numPipes, double innerRadius, double startPos, - double endPos) - : SCT_SharedComponentFactory(name), m_numPipes(numPipes), m_innerRadius(innerRadius) + double endPos, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) + : SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials), + m_numPipes(numPipes), m_innerRadius(innerRadius) { m_length = std::abs(endPos - startPos); m_zPosition = 0.5 * (startPos + endPos); @@ -35,11 +39,9 @@ SCT_FwdCoolingPipe::SCT_FwdCoolingPipe(const std::string & name, void SCT_FwdCoolingPipe::getParameters() -{ - const SCT_ForwardParameters * parameters = geometryManager()->forwardParameters(); - SCT_MaterialManager materials; - - m_material = materials.getMaterial(parameters->fwdCoolingPipeMaterial()); +{ + const SCT_ForwardParameters * parameters = m_geometryManager->forwardParameters(); + m_material = m_materials->getMaterial(parameters->fwdCoolingPipeMaterial()); m_pipeRadius = parameters->fwdCoolingPipeRadius(); } @@ -65,4 +67,3 @@ SCT_FwdCoolingPipe::build() return pipe; } - diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdCylinderServices.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdCylinderServices.cxx old mode 100755 new mode 100644 index e8bf3e68b7cc0d35dd5984f9a73ca9e01c7693a8..586ca2294c0f6056e9763ee4bfd8dfe847d3fbdf --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdCylinderServices.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdCylinderServices.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_GeoModel/SCT_FwdCylinderServices.h" @@ -26,8 +26,12 @@ SCT_FwdCylinderServices::SCT_FwdCylinderServices(const std::string & name, double rmin, double rmax, - double length) - : SCT_SharedComponentFactory(name), m_innerRadius(rmin), m_outerRadius(rmax), m_length(length) + double length, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) + : SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials), + m_innerRadius(rmin), m_outerRadius(rmax), m_length(length) { getParameters(); m_physVolume = build(); @@ -41,36 +45,36 @@ SCT_FwdCylinderServices::~SCT_FwdCylinderServices() void SCT_FwdCylinderServices::getParameters() { - const SCT_ForwardParameters * parameters = geometryManager()->forwardParameters(); + const SCT_ForwardParameters * parameters = m_geometryManager->forwardParameters(); // Retrieve parameters for each service for (int iType = 0; iType < parameters->fwdNumCylinderServiceTypes(); iType++) { - if(parameters->fwdCylinderServiceName(iType) == "CoolingPipe") { + if (parameters->fwdCylinderServiceName(iType) == "CoolingPipe") { m_coolingDeltaR = parameters->fwdCylinderServiceDeltaR(iType); m_coolingRPhi = parameters->fwdCylinderServiceRPhi(iType); m_coolingMaterialName = parameters->fwdCylinderServiceMaterial(iType); } - if(parameters->fwdCylinderServiceName(iType) == "LMT") { + if (parameters->fwdCylinderServiceName(iType) == "LMT") { m_lmtDeltaR = parameters->fwdCylinderServiceDeltaR(iType); m_lmtRPhi = parameters->fwdCylinderServiceRPhi(iType); m_lmtMaterialName = parameters->fwdCylinderServiceMaterial(iType); } - if(parameters->fwdCylinderServiceName(iType) == "LMTCooling") { + if (parameters->fwdCylinderServiceName(iType) == "LMTCooling") { m_lmtCoolingDeltaR = parameters->fwdCylinderServiceDeltaR(iType); m_lmtCoolingRPhi = parameters->fwdCylinderServiceRPhi(iType); m_lmtCoolingMaterialName = parameters->fwdCylinderServiceMaterial(iType); } - if(parameters->fwdCylinderServiceName(iType) == "Fibres") { + if (parameters->fwdCylinderServiceName(iType) == "Fibres") { m_fibreDeltaR = parameters->fwdCylinderServiceDeltaR(iType); m_fibreRPhi = parameters->fwdCylinderServiceRPhi(iType); m_fibreMaterialName = parameters->fwdCylinderServiceMaterial(iType); } - if(parameters->fwdCylinderServiceName(iType) == "NPipe") { + if (parameters->fwdCylinderServiceName(iType) == "NPipe") { m_nPipeDeltaR = parameters->fwdCylinderServiceDeltaR(iType); m_nPipeRPhi = parameters->fwdCylinderServiceRPhi(iType); m_nPipeMaterialName = parameters->fwdCylinderServiceMaterial(iType); } - if(parameters->fwdCylinderServiceName(iType) == "Rail") { + if (parameters->fwdCylinderServiceName(iType) == "Rail") { m_railDeltaR = parameters->fwdCylinderServiceDeltaR(iType); m_railRPhi = parameters->fwdCylinderServiceRPhi(iType); m_railMaterialName = parameters->fwdCylinderServiceMaterial(iType); @@ -79,22 +83,22 @@ SCT_FwdCylinderServices::getParameters() // Retrieve angles for each service for (int iLoc = 0; iLoc < parameters->fwdNumCylinderServiceLocs(); iLoc++) { - if(parameters->fwdCylinderServiceLocName(iLoc) == "CoolingPipe") { + if (parameters->fwdCylinderServiceLocName(iLoc) == "CoolingPipe") { m_coolingLocAngle.push_back(parameters->fwdCylinderServiceLocAngle(iLoc)); } - if(parameters->fwdCylinderServiceLocName(iLoc) == "LMT") { + if (parameters->fwdCylinderServiceLocName(iLoc) == "LMT") { m_lmtLocAngle.push_back(parameters->fwdCylinderServiceLocAngle(iLoc)); } - if(parameters->fwdCylinderServiceLocName(iLoc) == "LMTCooling") { + if (parameters->fwdCylinderServiceLocName(iLoc) == "LMTCooling") { m_lmtCoolingLocAngle.push_back(parameters->fwdCylinderServiceLocAngle(iLoc)); } - if(parameters->fwdCylinderServiceLocName(iLoc) == "Fibres") { + if (parameters->fwdCylinderServiceLocName(iLoc) == "Fibres") { m_fibreLocAngle.push_back(parameters->fwdCylinderServiceLocAngle(iLoc)); } - if(parameters->fwdCylinderServiceLocName(iLoc) == "NPipe") { + if (parameters->fwdCylinderServiceLocName(iLoc) == "NPipe") { m_nPipeLocAngle.push_back(parameters->fwdCylinderServiceLocAngle(iLoc)); } - if(parameters->fwdCylinderServiceLocName(iLoc) == "Rail") { + if (parameters->fwdCylinderServiceLocName(iLoc) == "Rail") { m_railLocAngle.push_back(parameters->fwdCylinderServiceLocAngle(iLoc)); } } @@ -110,9 +114,8 @@ SCT_FwdCylinderServices::build() { // Make envelope for the services - SCT_MaterialManager materials; const GeoTube * cylinderShape = new GeoTube(m_innerRadius, m_outerRadius, 0.5 * m_length); - const GeoLogVol * cylinderLog = new GeoLogVol(getName(), cylinderShape, materials.gasMaterial()); + const GeoLogVol * cylinderLog = new GeoLogVol(getName(), cylinderShape, m_materials->gasMaterial()); GeoPhysVol * cylinder = new GeoPhysVol(cylinderLog); // Create All Services @@ -132,7 +135,7 @@ SCT_FwdCylinderServices::build() const GeoCons* coolingShape = new GeoCons(coolingRmin, coolingRmin, coolingRmax1, coolingRmax2, 0.5 * m_length, -0.5 * coolingDPhi * Gaudi::Units::radian, coolingDPhi * Gaudi::Units::radian); - const GeoLogVol * coolingLog = new GeoLogVol("CoolingPipe", coolingShape, materials.getMaterialForVolume(m_coolingMaterialName, coolingShape->volume())); + const GeoLogVol * coolingLog = new GeoLogVol("CoolingPipe", coolingShape, m_materials->getMaterialForVolume(m_coolingMaterialName, coolingShape->volume())); GeoPhysVol * coolingPipe = new GeoPhysVol(coolingLog); // Low Mass Tapes @@ -142,7 +145,7 @@ SCT_FwdCylinderServices::build() double lmtDPhi = m_lmtRPhi / lmtRmin; const GeoCons* lmtShape = new GeoCons(lmtRmin, lmtRmin, lmtRmax1, lmtRmax2, 0.5 * m_length, -0.5 * lmtDPhi * Gaudi::Units::radian, lmtDPhi * Gaudi::Units::radian); - const GeoLogVol * lmtLog = new GeoLogVol("LMT", lmtShape, materials.getMaterialForVolume(m_lmtMaterialName,lmtShape->volume())); + const GeoLogVol * lmtLog = new GeoLogVol("LMT", lmtShape, m_materials->getMaterialForVolume(m_lmtMaterialName,lmtShape->volume())); GeoPhysVol * lmt = new GeoPhysVol(lmtLog); // LMT Cooling: must be outside LMTs @@ -152,7 +155,7 @@ SCT_FwdCylinderServices::build() double lmtLength = m_length - 2. * m_lmtCoolingZOffset; const GeoTubs* lmtCoolingShape = new GeoTubs(lmtCoolingRmin, lmtCoolingRmax, 0.5 * lmtLength, -0.5 * lmtCoolingDPhi * Gaudi::Units::radian, lmtCoolingDPhi * Gaudi::Units::radian); - const GeoLogVol * lmtCoolingLog = new GeoLogVol("LMTCooling", lmtCoolingShape, materials.getMaterialForVolume(m_lmtCoolingMaterialName,lmtCoolingShape->volume())); + const GeoLogVol * lmtCoolingLog = new GeoLogVol("LMTCooling", lmtCoolingShape, m_materials->getMaterialForVolume(m_lmtCoolingMaterialName,lmtCoolingShape->volume())); GeoPhysVol * lmtCooling = new GeoPhysVol(lmtCoolingLog); // Fibres @@ -162,7 +165,7 @@ SCT_FwdCylinderServices::build() double fibreDPhi = m_fibreRPhi / fibreRmin; const GeoCons* fibreShape = new GeoCons(fibreRmin, fibreRmin, fibreRmax1, fibreRmax2, 0.5 * m_length, -0.5 * fibreDPhi * Gaudi::Units::radian, fibreDPhi * Gaudi::Units::radian); - const GeoLogVol * fibreLog = new GeoLogVol("Fibres", fibreShape, materials.getMaterialForVolume(m_fibreMaterialName,fibreShape->volume())); + const GeoLogVol * fibreLog = new GeoLogVol("Fibres", fibreShape, m_materials->getMaterialForVolume(m_fibreMaterialName,fibreShape->volume())); GeoPhysVol * fibres = new GeoPhysVol(fibreLog); // N2 Pipe @@ -171,7 +174,7 @@ SCT_FwdCylinderServices::build() double nPipeDPhi = m_nPipeRPhi / nPipeRmin; const GeoTubs* nPipeShape = new GeoTubs(nPipeRmin, nPipeRmax, 0.5 * m_length, -0.5 * nPipeDPhi * Gaudi::Units::radian, nPipeDPhi * Gaudi::Units::radian); - const GeoLogVol * nPipeLog = new GeoLogVol("NPipe", nPipeShape, materials.getMaterialForVolume(m_nPipeMaterialName,nPipeShape->volume())); + const GeoLogVol * nPipeLog = new GeoLogVol("NPipe", nPipeShape, m_materials->getMaterialForVolume(m_nPipeMaterialName,nPipeShape->volume())); GeoPhysVol * nPipe = new GeoPhysVol(nPipeLog); // Rails: must be outside Cooling and N2 Pipes @@ -180,7 +183,7 @@ SCT_FwdCylinderServices::build() double railDPhi = m_railRPhi / railRmin; const GeoTubs* railShape = new GeoTubs(railRmin, railRmax, 0.5 * m_length, -0.5 * railDPhi * Gaudi::Units::radian, railDPhi * Gaudi::Units::radian); - const GeoLogVol * railLog = new GeoLogVol("Rail", railShape, materials.getMaterialForVolume(m_railMaterialName,railShape->volume())); + const GeoLogVol * railLog = new GeoLogVol("Rail", railShape, m_materials->getMaterialForVolume(m_railMaterialName,railShape->volume())); GeoPhysVol * rail = new GeoPhysVol(railLog); // Services are repeated for each quadrant @@ -228,4 +231,3 @@ SCT_FwdCylinderServices::build() return cylinder; } - diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdDiscFixation.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdDiscFixation.cxx old mode 100755 new mode 100644 index 0bd1309dc1643f5384805c733315c037c983cd63..8ff57e6d8bb3430773486acc3889c7086ec8b487 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdDiscFixation.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdDiscFixation.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_GeoModel/SCT_FwdDiscFixation.h" @@ -15,8 +15,11 @@ #include "GeoModelKernel/Units.h" -SCT_FwdDiscFixation::SCT_FwdDiscFixation(const std::string & name) - : SCT_SharedComponentFactory(name) +SCT_FwdDiscFixation::SCT_FwdDiscFixation(const std::string & name, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) + : SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials) { getParameters(); m_physVolume = build(); @@ -26,7 +29,7 @@ SCT_FwdDiscFixation::SCT_FwdDiscFixation(const std::string & name) void SCT_FwdDiscFixation::getParameters() { - const SCT_ForwardParameters * parameters = geometryManager()->forwardParameters(); + const SCT_ForwardParameters * parameters = m_geometryManager->forwardParameters(); m_materialName= parameters->fwdDiscFixationMaterial(); m_thickness = parameters->fwdDiscFixationThickness(); @@ -36,11 +39,8 @@ SCT_FwdDiscFixation::getParameters() GeoVPhysVol * SCT_FwdDiscFixation::build() { - - SCT_MaterialManager materials; - const GeoTube * discFixationShape = new GeoTube(0., m_radius, 0.5*m_thickness); - m_material = materials.getMaterialForVolume(m_materialName, discFixationShape->volume()); + m_material = m_materials->getMaterialForVolume(m_materialName, discFixationShape->volume()); const GeoLogVol * discFixationLog = new GeoLogVol(getName(), discFixationShape, m_material); GeoPhysVol * discFixation = new GeoPhysVol(discFixationLog); diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdDiscPowerTape.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdDiscPowerTape.cxx old mode 100755 new mode 100644 index bb71f56acd3dcc47a878be091486c33df00c9741..47473f65ca0861f1db61bf814f974e285c73e55f --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdDiscPowerTape.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdDiscPowerTape.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_GeoModel/SCT_FwdDiscPowerTape.h" @@ -15,8 +15,12 @@ #include "GeoModelKernel/Units.h" -SCT_FwdDiscPowerTape::SCT_FwdDiscPowerTape(const std::string & name, int iRing) - : SCT_SharedComponentFactory(name), m_ringNumber(iRing) +SCT_FwdDiscPowerTape::SCT_FwdDiscPowerTape(const std::string & name, int iRing, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) + : SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials), + m_ringNumber(iRing) { getParameters(); m_physVolume = build(); @@ -26,7 +30,7 @@ SCT_FwdDiscPowerTape::SCT_FwdDiscPowerTape(const std::string & name, int iRing) void SCT_FwdDiscPowerTape::getParameters() { - const SCT_ForwardParameters * parameters = geometryManager()->forwardParameters(); + const SCT_ForwardParameters * parameters = m_geometryManager->forwardParameters(); m_materialName = parameters->fwdDiscPowerTapeMaterial(m_ringNumber); m_innerRadius = parameters->fwdDiscPowerTapeInnerRadius(m_ringNumber); @@ -38,12 +42,9 @@ SCT_FwdDiscPowerTape::getParameters() GeoVPhysVol * SCT_FwdDiscPowerTape::build() { - - SCT_MaterialManager materials; - // Make the support disk. A simple tube. const GeoTube * powerTapeShape = new GeoTube(m_innerRadius, m_outerRadius, 0.5 * m_thickness); - m_material = materials.getMaterialForVolume(m_materialName, powerTapeShape->volume()); + m_material = m_materials->getMaterialForVolume(m_materialName, powerTapeShape->volume()); const GeoLogVol * powerTapeLog = new GeoLogVol(getName(), powerTapeShape, m_material); GeoPhysVol * powerTape = new GeoPhysVol(powerTapeLog); diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdDiscSupport.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdDiscSupport.cxx old mode 100755 new mode 100644 index 9e66dc2944b76834c3a4c3529ea72c8ab8ade1f6..9952f315e45ce64ebe75fc669eab9de49739a09b --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdDiscSupport.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdDiscSupport.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_GeoModel/SCT_FwdDiscSupport.h" @@ -14,8 +14,12 @@ #include "GeoModelKernel/GeoPhysVol.h" #include "GeoModelKernel/Units.h" -SCT_FwdDiscSupport::SCT_FwdDiscSupport(const std::string & name, int iWheel) - : SCT_SharedComponentFactory(name), m_iWheel(iWheel) +SCT_FwdDiscSupport::SCT_FwdDiscSupport(const std::string & name, int iWheel, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) + : SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials), + m_iWheel(iWheel) { getParameters(); m_physVolume = build(); @@ -25,7 +29,7 @@ SCT_FwdDiscSupport::SCT_FwdDiscSupport(const std::string & name, int iWheel) void SCT_FwdDiscSupport::getParameters() { - const SCT_ForwardParameters * parameters = geometryManager()->forwardParameters(); + const SCT_ForwardParameters * parameters = m_geometryManager->forwardParameters(); m_materialName = parameters->fwdDiscSupportMaterial(); m_thickness = parameters->fwdDiscSupportThickness(); @@ -37,11 +41,9 @@ GeoVPhysVol * SCT_FwdDiscSupport::build() { // Make the support disk. A simple tube. - SCT_MaterialManager materials; - const GeoTube * discSupportShape = new GeoTube(m_innerRadius, m_outerRadius, 0.5 * m_thickness); - m_material = materials.getMaterialForVolume(m_materialName+intToString(m_iWheel), discSupportShape->volume()); - if(!m_material) {m_material = materials.getMaterial(m_materialName);} + m_material = m_materials->getMaterialForVolume(m_materialName+intToString(m_iWheel), discSupportShape->volume()); + if(!m_material) m_material = m_materials->getMaterial(m_materialName); const GeoLogVol * discSupportLog = new GeoLogVol(getName(), discSupportShape, m_material); GeoPhysVol * discSupport = new GeoPhysVol(discSupportLog); diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdFSI.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdFSI.cxx old mode 100755 new mode 100644 index 98c77903a3f0ce3891165b5276435619e78a5446..5597aaf4555092b45e8f4fcf1a2da53207e7c919 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdFSI.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdFSI.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_GeoModel/SCT_FwdFSI.h" @@ -15,8 +15,12 @@ #include "GeoModelKernel/Units.h" -SCT_FwdFSI::SCT_FwdFSI(const std::string & name, int type) - : SCT_SharedComponentFactory(name), m_type(type) +SCT_FwdFSI::SCT_FwdFSI(const std::string & name, int type, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) + : SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials), + m_type(type) { getParameters(); m_physVolume = build(); @@ -26,7 +30,7 @@ SCT_FwdFSI::SCT_FwdFSI(const std::string & name, int type) void SCT_FwdFSI::getParameters() { - const SCT_ForwardParameters * parameters = geometryManager()->forwardParameters(); + const SCT_ForwardParameters * parameters = m_geometryManager->forwardParameters(); m_materialName= parameters->fwdFSIGeomMaterial(m_type); m_thickness = parameters->fwdFSIGeomThickness(m_type); @@ -38,10 +42,8 @@ SCT_FwdFSI::getParameters() GeoVPhysVol * SCT_FwdFSI::build() { - SCT_MaterialManager materials; - const GeoBox * fsiShape = new GeoBox(0.5 * m_deltaR, 0.5 * m_rphi, 0.5 * m_thickness); - m_material = materials.getMaterialForVolume(m_materialName, fsiShape->volume()); + m_material = m_materials->getMaterialForVolume(m_materialName, fsiShape->volume()); const GeoLogVol * fsiLog = new GeoLogVol(getName(), fsiShape, m_material); GeoPhysVol * fsi = new GeoPhysVol(fsiLog); diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdHybrid.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdHybrid.cxx old mode 100755 new mode 100644 index 99b73df0b4d4e3ca155b3e1961da9f682eccab2b..6944ff4bbb3b580c5256af42ed97960ab27a3953 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdHybrid.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdHybrid.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////// @@ -35,8 +35,12 @@ #include <cmath> -SCT_FwdHybrid::SCT_FwdHybrid(const std::string & name, int ringType) - : SCT_SharedComponentFactory(name), m_ringType(ringType) +SCT_FwdHybrid::SCT_FwdHybrid(const std::string & name, int ringType, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) + : SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials), + m_ringType(ringType) { getParameters(); m_physVolume = build(); @@ -48,7 +52,7 @@ void SCT_FwdHybrid::getParameters() { - const SCT_ForwardModuleParameters * parameters = geometryManager()->forwardModuleParameters(); + const SCT_ForwardModuleParameters * parameters = m_geometryManager->forwardModuleParameters(); m_materialName = parameters->fwdHybridMaterial(); @@ -80,7 +84,7 @@ SCT_FwdHybrid::getParameters() GeoVPhysVol * SCT_FwdHybrid::build() { - const SCT_ForwardModuleParameters * parameters = geometryManager()->forwardModuleParameters(); + const SCT_ForwardModuleParameters * parameters = m_geometryManager->forwardModuleParameters(); // Make a hybrid. This is a TRD + BOX const GeoTrd * hybridShape1 = new GeoTrd(0.5 * m_thickness, 0.5 * m_thickness, @@ -108,11 +112,9 @@ GeoVPhysVol * SCT_FwdHybrid::build() const GeoShape & hybridPos2 = (*hybridShape1 << GeoTrf::RotateX3D(rotation) << GeoTrf::TranslateZ3D(position) ); - - SCT_MaterialManager materials; const GeoShapeUnion & hybridShape = hybridPos1.add(hybridPos2); // error getting volume directly. - m_material = materials.getMaterialForVolume(m_materialName, hybridShape1->volume()+hybridShape2->volume()); + m_material = m_materials->getMaterialForVolume(m_materialName, hybridShape1->volume()+hybridShape2->volume()); const GeoLogVol * hybridLog = new GeoLogVol(getName(), &hybridShape, m_material); GeoPhysVol * hybrid = new GeoPhysVol(hybridLog); diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdModule.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdModule.cxx old mode 100755 new mode 100644 index c1170044dc732543df542cc07246e476227a0414..09bb0a3d8d702e321fd1696cae376c3b094bc998 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdModule.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdModule.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////// @@ -45,22 +45,30 @@ inline double sqr(double x) {return x*x;} -SCT_FwdModule::SCT_FwdModule(const std::string & name, int ringType) - : SCT_UniqueComponentFactory(name), m_ringType(ringType) +SCT_FwdModule::SCT_FwdModule(const std::string & name, int ringType, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) + : SCT_UniqueComponentFactory(name, detectorManager, geometryManager, materials), + m_ringType(ringType) { getParameters(); - m_hybrid = new SCT_FwdHybrid("SCT_FwdHybrid"+intToString(ringType), m_ringType ); - m_spine = new SCT_FwdSpine("SCT_FwdSpine"+intToString(ringType), m_ringType); - m_subspineL = new SCT_FwdSubSpine("SCT_FwdSubSpineL"+intToString(ringType), m_ringType, SUBSPINE_LEFT); - m_subspineR = new SCT_FwdSubSpine("SCT_FwdSubSpineR"+intToString(ringType), m_ringType, SUBSPINE_RIGHT); - m_sensor = new SCT_FwdSensor("ECSensor"+intToString(ringType), m_ringType); + m_hybrid = new SCT_FwdHybrid("SCT_FwdHybrid"+intToString(ringType), m_ringType, m_detectorManager, m_geometryManager, materials); + m_spine = new SCT_FwdSpine("SCT_FwdSpine"+intToString(ringType), m_ringType, m_detectorManager, m_geometryManager, materials); + m_subspineL = new SCT_FwdSubSpine("SCT_FwdSubSpineL"+intToString(ringType), m_ringType, SUBSPINE_LEFT, + m_detectorManager, m_geometryManager, materials); + m_subspineR = new SCT_FwdSubSpine("SCT_FwdSubSpineR"+intToString(ringType), m_ringType, SUBSPINE_RIGHT, + m_detectorManager, m_geometryManager, materials); + m_sensor = new SCT_FwdSensor("ECSensor"+intToString(ringType), m_ringType, + m_detectorManager, m_geometryManager, materials); if (m_connectorPresent) { - m_connector = new SCT_FwdModuleConnector("SCT_FwdModuleConnector"+intToString(ringType), m_ringType); + m_connector = new SCT_FwdModuleConnector("SCT_FwdModuleConnector"+intToString(ringType), m_ringType, + m_detectorManager, m_geometryManager, materials); } else { - m_connector = NULL; + m_connector = nullptr; } m_logVolume = preBuild(); @@ -81,7 +89,7 @@ SCT_FwdModule::~SCT_FwdModule() void SCT_FwdModule::getParameters() { - const SCT_ForwardModuleParameters * parameters = geometryManager()->forwardModuleParameters(); + const SCT_ForwardModuleParameters * parameters = m_geometryManager->forwardModuleParameters(); m_glueThickness = parameters->fwdModuleGlueThickness(m_ringType); m_distBtwMountPoints = parameters->fwdModuleDistBtwMountPoints(m_ringType); m_mountPointToCenter = parameters->fwdModuleMountPoint(m_ringType); @@ -97,7 +105,7 @@ const GeoLogVol * SCT_FwdModule::preBuild() { // module volume preparing - const SCT_GeneralParameters * generalParameters = geometryManager()->generalParameters(); + const SCT_GeneralParameters * generalParameters = m_geometryManager->generalParameters(); double safety = generalParameters->safety(); double safetyTmp = safety * Gaudi::Units::cm; // For compatibility with minor bug in older version - safety already in CLHEP units; @@ -159,14 +167,13 @@ const GeoLogVol * SCT_FwdModule::preBuild() 0.5 * m_length); const GeoShapeShift & moduleEnvelope = (*moduleEnvelopeShape << GeoTrf::TranslateZ3D(m_moduleShift) ); - SCT_MaterialManager materials; - GeoLogVol * moduleLog = new GeoLogVol(getName(), &moduleEnvelope, materials.gasMaterial()); + GeoLogVol * moduleLog = new GeoLogVol(getName(), &moduleEnvelope, m_materials->gasMaterial()); return moduleLog; } -GeoVPhysVol * SCT_FwdModule::build(SCT_Identifier id) const +GeoVPhysVol * SCT_FwdModule::build(SCT_Identifier id) { // build method for creating module parent physical volume @@ -174,7 +181,7 @@ GeoVPhysVol * SCT_FwdModule::build(SCT_Identifier id) const // - relative position of component is part of its shape GeoFullPhysVol * module = new GeoFullPhysVol(m_logVolume); - if(m_connector != NULL) module->add(m_connector->getVolume()); + if (m_connector != NULL) module->add(m_connector->getVolume()); module->add(m_hybrid->getVolume()); module->add(m_spine->getVolume()); module->add(m_subspineL->getVolume()); @@ -207,7 +214,7 @@ GeoVPhysVol * SCT_FwdModule::build(SCT_Identifier id) const module->add(bottomSensorPV); // Store transform - detectorManager()->addAlignableTransform(0, id.getWaferId(), bottomTransform, bottomSensorPV); + m_detectorManager->addAlignableTransform(0, id.getWaferId(), bottomTransform, bottomSensorPV); if (m_ringType == 2) { // Place glass pieces in place of sensor @@ -235,7 +242,7 @@ GeoVPhysVol * SCT_FwdModule::build(SCT_Identifier id) const module->add(topSensorPV); // Store transform - detectorManager()->addAlignableTransform(0, id.getWaferId(), topTransform, topSensorPV); + m_detectorManager->addAlignableTransform(0, id.getWaferId(), topTransform, topSensorPV); if (m_ringType == 2) { // Place glass pieces in place of sensor module->add(new GeoTransform(GeoTrf::Transform3D(vecT*rotT))); diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdModuleConnector.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdModuleConnector.cxx old mode 100755 new mode 100644 index 5ba0a82cba9aef8700f98ee1584593d333ad7a09..5d1174cd24bbe07bcc41306303aae4a80453c0b0 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdModuleConnector.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdModuleConnector.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_GeoModel/SCT_FwdModuleConnector.h" @@ -18,8 +18,12 @@ #include <cmath> -SCT_FwdModuleConnector::SCT_FwdModuleConnector(const std::string & name, int ringType) - : SCT_SharedComponentFactory(name), m_ringType(ringType) +SCT_FwdModuleConnector::SCT_FwdModuleConnector(const std::string & name, int ringType, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) + : SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials), + m_ringType(ringType) { getParameters(); m_physVolume = build(); @@ -29,7 +33,7 @@ SCT_FwdModuleConnector::SCT_FwdModuleConnector(const std::string & name, int rin void SCT_FwdModuleConnector::getParameters() { - const SCT_ForwardModuleParameters * parameters = geometryManager()->forwardModuleParameters(); + const SCT_ForwardModuleParameters * parameters = m_geometryManager->forwardModuleParameters(); m_materialName= parameters->fwdModuleConnectorMaterial(); m_deltaR = parameters->fwdModuleConnectorDeltaR(); @@ -40,12 +44,11 @@ SCT_FwdModuleConnector::getParameters() GeoVPhysVol * SCT_FwdModuleConnector::build() { - SCT_MaterialManager materials; - const SCT_ForwardModuleParameters * parameters = geometryManager()->forwardModuleParameters(); + const SCT_ForwardModuleParameters * parameters = m_geometryManager->forwardModuleParameters(); // Construct box const GeoBox * moduleConnShape = new GeoBox(0.5 * m_thickness, 0.5 * m_rphi, 0.5 * m_deltaR); - m_material = materials.getMaterialForVolume(m_materialName, moduleConnShape->volume()); + m_material = m_materials->getMaterialForVolume(m_materialName, moduleConnShape->volume()); // Shift to correct position within module double xposition = 0.5 * (parameters->fwdHybridThickness() + m_thickness); diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdOptoHarness.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdOptoHarness.cxx old mode 100755 new mode 100644 index 0a25774b19791a3b6b913a2cd812fc19c7a86f29..222377aa76eec945cfdfe56b308d7b0f74ef837d --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdOptoHarness.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdOptoHarness.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_GeoModel/SCT_FwdOptoHarness.h" @@ -19,8 +19,12 @@ inline double sqr(double x) {return x*x;} -SCT_FwdOptoHarness::SCT_FwdOptoHarness(const std::string & name, int itype) - : SCT_SharedComponentFactory(name), m_type(itype) +SCT_FwdOptoHarness::SCT_FwdOptoHarness(const std::string & name, int itype, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) + : SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials), + m_type(itype) { getParameters(); m_physVolume = build(); @@ -30,7 +34,7 @@ SCT_FwdOptoHarness::SCT_FwdOptoHarness(const std::string & name, int itype) void SCT_FwdOptoHarness::getParameters() { - const SCT_ForwardParameters * parameters = geometryManager()->forwardParameters(); + const SCT_ForwardParameters * parameters = m_geometryManager->forwardParameters(); m_index = -1; for(int i=0; i<3; ++i) { @@ -52,10 +56,8 @@ SCT_FwdOptoHarness::getParameters() GeoVPhysVol * SCT_FwdOptoHarness::build() { - SCT_MaterialManager materials; - const GeoTube * optoHarnessShape = new GeoTube(m_innerRadius, m_outerRadius, 0.5 * m_thickness); - m_material = materials.getMaterialForVolume(m_materialName, optoHarnessShape->volume()); + m_material = m_materials->getMaterialForVolume(m_materialName, optoHarnessShape->volume()); const GeoLogVol * optoHarnessLog = new GeoLogVol(getName(), optoHarnessShape, m_material); GeoPhysVol * optoHarness = new GeoPhysVol(optoHarnessLog); diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdPPConnector.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdPPConnector.cxx old mode 100755 new mode 100644 index 29b530629e481c1c1773e5e48197a28edd04c905..55325f9c75f7595c03920667ac0d1bef8083bfbc --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdPPConnector.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdPPConnector.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_GeoModel/SCT_FwdPPConnector.h" @@ -15,8 +15,11 @@ #include "GeoModelKernel/Units.h" -SCT_FwdPPConnector::SCT_FwdPPConnector(const std::string & name) - : SCT_SharedComponentFactory(name) +SCT_FwdPPConnector::SCT_FwdPPConnector(const std::string & name, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) + : SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials) { getParameters(); m_physVolume = build(); @@ -26,7 +29,7 @@ SCT_FwdPPConnector::SCT_FwdPPConnector(const std::string & name) void SCT_FwdPPConnector::getParameters() { - const SCT_ForwardParameters * parameters = geometryManager()->forwardParameters(); + const SCT_ForwardParameters * parameters = m_geometryManager->forwardParameters(); m_materialName= parameters->fwdPPConnectorMaterial(); m_thickness = parameters->fwdPPConnectorThickness(); @@ -37,11 +40,8 @@ SCT_FwdPPConnector::getParameters() GeoVPhysVol * SCT_FwdPPConnector::build() { - - SCT_MaterialManager materials; - const GeoBox * pPConnectorShape = new GeoBox(0.5 * m_deltaR, 0.5 * m_rphi, 0.5 * m_thickness); - m_material = materials.getMaterialForVolume(m_materialName, pPConnectorShape->volume()); + m_material = m_materials->getMaterialForVolume(m_materialName, pPConnectorShape->volume()); const GeoLogVol * pPConnectorLog = new GeoLogVol(getName(), pPConnectorShape, m_material); GeoPhysVol * pPConnector = new GeoPhysVol(pPConnectorLog); diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdPPCooling.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdPPCooling.cxx old mode 100755 new mode 100644 index ef6c3b76ee745e00f9d99f57d538b72827b85493..37a100c3fbad8e402d6e09114b23d1e77687ceb8 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdPPCooling.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdPPCooling.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_GeoModel/SCT_FwdPPCooling.h" @@ -15,8 +15,11 @@ #include "GeoModelKernel/Units.h" -SCT_FwdPPCooling::SCT_FwdPPCooling(const std::string & name) - : SCT_SharedComponentFactory(name) +SCT_FwdPPCooling::SCT_FwdPPCooling(const std::string & name, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) + : SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials) { getParameters(); m_physVolume = build(); @@ -26,7 +29,7 @@ SCT_FwdPPCooling::SCT_FwdPPCooling(const std::string & name) void SCT_FwdPPCooling::getParameters() { - const SCT_ForwardParameters * parameters = geometryManager()->forwardParameters(); + const SCT_ForwardParameters * parameters = m_geometryManager->forwardParameters(); m_materialName= parameters->fwdPPCoolingMaterial(); m_thickness = parameters->fwdPPCoolingThickness(); @@ -37,11 +40,8 @@ SCT_FwdPPCooling::getParameters() GeoVPhysVol * SCT_FwdPPCooling::build() { - - SCT_MaterialManager materials; - const GeoBox * pPCoolingShape = new GeoBox(0.5 * m_deltaR, 0.5 * m_rphi, 0.5 * m_thickness); - m_material = materials.getMaterialForVolume(m_materialName, pPCoolingShape->volume()); + m_material = m_materials->getMaterialForVolume(m_materialName, pPCoolingShape->volume()); const GeoLogVol * pPCoolingLog = new GeoLogVol(getName(), pPCoolingShape, m_material); GeoPhysVol * pPCooling = new GeoPhysVol(pPCoolingLog); diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdPatchPanel.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdPatchPanel.cxx old mode 100755 new mode 100644 index 514a6bf0270a66836b51eccea72821be89e005c3..b3e3ff84cc48927eb8b1498b00c90465639394e2 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdPatchPanel.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdPatchPanel.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_GeoModel/SCT_FwdPatchPanel.h" @@ -15,8 +15,12 @@ #include "GeoModelKernel/Units.h" -SCT_FwdPatchPanel::SCT_FwdPatchPanel(const std::string & name, int type) - : SCT_SharedComponentFactory(name), m_type(type) +SCT_FwdPatchPanel::SCT_FwdPatchPanel(const std::string & name, int type, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) + : SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials), + m_type(type) { getParameters(); m_physVolume = build(); @@ -26,7 +30,7 @@ SCT_FwdPatchPanel::SCT_FwdPatchPanel(const std::string & name, int type) void SCT_FwdPatchPanel::getParameters() { - const SCT_ForwardParameters * parameters = geometryManager()->forwardParameters(); + const SCT_ForwardParameters * parameters = m_geometryManager->forwardParameters(); m_materialName= parameters->fwdPatchPanelMaterial(m_type); m_thickness = parameters->fwdPatchPanelThickness(m_type); @@ -38,11 +42,8 @@ SCT_FwdPatchPanel::getParameters() GeoVPhysVol * SCT_FwdPatchPanel::build() { - - SCT_MaterialManager materials; - const GeoBox * patchPanelShape = new GeoBox(0.5 * m_deltaR, 0.5 * m_rphi, 0.5 * m_thickness); - m_material = materials.getMaterialForVolume(m_materialName, patchPanelShape->volume()); + m_material = m_materials->getMaterialForVolume(m_materialName, patchPanelShape->volume()); const GeoLogVol * patchPanelLog = new GeoLogVol(getName(), patchPanelShape, m_material); diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdPowerTape.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdPowerTape.cxx old mode 100755 new mode 100644 index 26eb848821793cc0bfb53e27f94541722c5f25ea..39a7dbced8434d42b797364215c946a48714ee81 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdPowerTape.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdPowerTape.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_GeoModel/SCT_FwdPowerTape.h" @@ -20,8 +20,12 @@ SCT_FwdPowerTape::SCT_FwdPowerTape(const std::string & name, int numModules, double innerRadius, double startPos, - double endPos) - : SCT_SharedComponentFactory(name), m_numModules(numModules), m_innerRadius(innerRadius) + double endPos, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) + : SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials), + m_numModules(numModules), m_innerRadius(innerRadius) { m_length = std::abs(endPos - startPos); m_zPosition = 0.5 * (startPos + endPos); @@ -33,11 +37,9 @@ SCT_FwdPowerTape::SCT_FwdPowerTape(const std::string & name, void SCT_FwdPowerTape::getParameters() -{ - const SCT_ForwardParameters * parameters = geometryManager()->forwardParameters(); - SCT_MaterialManager materials; - - m_material = materials.getMaterial(parameters->fwdPowerTapeMaterial()); +{ + const SCT_ForwardParameters * parameters = m_geometryManager->forwardParameters(); + m_material = m_materials->getMaterial(parameters->fwdPowerTapeMaterial()); m_crossSectArea = parameters->fwdPowerTapeCrossSectArea(); } diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdRing.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdRing.cxx old mode 100755 new mode 100644 index 4ba75ed8c4e9051e0f8d2b1475c1f4915daf7fe7..7546002b12cb757c4004a4d0aa7659943a9eb27f --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdRing.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdRing.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_GeoModel/SCT_FwdRing.h" @@ -34,11 +34,14 @@ inline double sqr(double x) {return x*x;} SCT_FwdRing::SCT_FwdRing(const std::string & name, - const SCT_FwdModule * module, + SCT_FwdModule * module, int iWheel, int iRing, - int ec) - : SCT_UniqueComponentFactory(name), + int ec, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) + : SCT_UniqueComponentFactory(name, detectorManager, geometryManager, materials), m_iWheel(iWheel), m_iRing(iRing), m_endcap(ec), @@ -52,8 +55,8 @@ void SCT_FwdRing::getParameters() { - const SCT_ForwardParameters * parameters = geometryManager()->forwardParameters(); - const SCT_GeneralParameters * generalParameters = geometryManager()->generalParameters(); + const SCT_ForwardParameters * parameters = m_geometryManager->forwardParameters(); + const SCT_GeneralParameters * generalParameters = m_geometryManager->generalParameters(); m_safety = generalParameters->safety(); @@ -71,7 +74,7 @@ SCT_FwdRing::getParameters() m_identifier = m_iRing; // Set numerology - detectorManager()->numerology().setNumPhiModulesForDiskRing(m_iWheel,m_iRing,m_numModules); + m_detectorManager->numerology().setNumPhiModulesForDiskRing(m_iWheel,m_iRing,m_numModules); } @@ -152,10 +155,9 @@ SCT_FwdRing::preBuild() // We want the center in z to be at the module mid plane. So we shift the volume. double envelopeShift = -m_ringSide * (0.5 * m_thickness - m_thicknessOuter); - SCT_MaterialManager materials; const GeoTube * tmpShape = new GeoTube(m_innerRadius, m_outerRadius, 0.5 * m_thickness); const GeoShape & ringEnvelopeShape = (*tmpShape << GeoTrf::Translate3D(0, 0, envelopeShift)); - GeoLogVol * ringLog = new GeoLogVol(getName(), &ringEnvelopeShape, materials.gasMaterial()); + GeoLogVol * ringLog = new GeoLogVol(getName(), &ringEnvelopeShape, m_materials->gasMaterial()); return ringLog; } @@ -163,7 +165,7 @@ SCT_FwdRing::preBuild() GeoVPhysVol * -SCT_FwdRing::build(SCT_Identifier id) const +SCT_FwdRing::build(SCT_Identifier id) { // Physical volume for the half ring @@ -235,7 +237,7 @@ SCT_FwdRing::build(SCT_Identifier id) const ring->add(modulePV); // Store alignable transform - detectorManager()->addAlignableTransform(1, id.getWaferId(), moduleTransform, modulePV); + m_detectorManager->addAlignableTransform(1, id.getWaferId(), moduleTransform, modulePV); // Add the moduleServices (contains the cooling block) // In principle this should also be rotated by the stereo angle (although one @@ -280,11 +282,15 @@ SCT_FwdRing::makeModuleServices() // to add more things to it later. We call it module services. // Cooling blocks for the upper Modules - m_coolingBlockHiMain = new SCT_FwdCoolingBlock("CoolingBlkHiMain",SCT_FwdCoolingBlock::UPPER, SCT_FwdCoolingBlock::MAIN); - m_coolingBlockHiSec = new SCT_FwdCoolingBlock("CoolingBlkHiSec", SCT_FwdCoolingBlock::UPPER, SCT_FwdCoolingBlock::SECONDARY); + m_coolingBlockHiMain = new SCT_FwdCoolingBlock("CoolingBlkHiMain",SCT_FwdCoolingBlock::UPPER, SCT_FwdCoolingBlock::MAIN, + m_detectorManager, m_geometryManager, m_materials); + m_coolingBlockHiSec = new SCT_FwdCoolingBlock("CoolingBlkHiSec", SCT_FwdCoolingBlock::UPPER, SCT_FwdCoolingBlock::SECONDARY, + m_detectorManager, m_geometryManager, m_materials); // Cooling blocks for the lower Modules - m_coolingBlockLoMain = new SCT_FwdCoolingBlock("CoolingBlkLoMain",SCT_FwdCoolingBlock::LOWER, SCT_FwdCoolingBlock::MAIN); - m_coolingBlockLoSec = new SCT_FwdCoolingBlock("CoolingBlkLoSec", SCT_FwdCoolingBlock::LOWER, SCT_FwdCoolingBlock::SECONDARY); + m_coolingBlockLoMain = new SCT_FwdCoolingBlock("CoolingBlkLoMain",SCT_FwdCoolingBlock::LOWER, SCT_FwdCoolingBlock::MAIN, + m_detectorManager, m_geometryManager, m_materials); + m_coolingBlockLoSec = new SCT_FwdCoolingBlock("CoolingBlkLoSec", SCT_FwdCoolingBlock::LOWER, SCT_FwdCoolingBlock::SECONDARY, + m_detectorManager, m_geometryManager, m_materials); double coolingBlkMainR = m_module->mainMountPointRadius(); double coolingBlkSecR = m_module->endModuleRadius(); // This is the end of the module. Align block with the end. @@ -320,15 +326,14 @@ SCT_FwdRing::makeModuleServices() m_moduleServicesHiOuterZPos = -(moduleServicesBaseToRingCenterHi - moduleServicesHiThickness); m_moduleServicesLoOuterZPos = -(moduleServicesBaseToRingCenterLo - moduleServicesLoThickness); - SCT_MaterialManager materials; const GeoBox * moduleServicesHiShape = new GeoBox(0.5*moduleServicesHiLength + m_safety, 0.5*moduleServicesHiWidth + m_safety, 0.5*moduleServicesHiThickness + m_safety); const GeoBox * moduleServicesLoShape = new GeoBox(0.5*moduleServicesLoLength + m_safety, 0.5*moduleServicesLoWidth + m_safety, 0.5*moduleServicesLoThickness + m_safety); - const GeoLogVol * moduleServicesHiLog = new GeoLogVol("ModuleServicesHi", moduleServicesHiShape, materials.gasMaterial()); - const GeoLogVol * moduleServicesLoLog = new GeoLogVol("ModuleServicesLo", moduleServicesLoShape, materials.gasMaterial()); + const GeoLogVol * moduleServicesHiLog = new GeoLogVol("ModuleServicesHi", moduleServicesHiShape, m_materials->gasMaterial()); + const GeoLogVol * moduleServicesLoLog = new GeoLogVol("ModuleServicesLo", moduleServicesLoShape, m_materials->gasMaterial()); m_moduleServicesHi = new GeoPhysVol(moduleServicesHiLog); m_moduleServicesLo = new GeoPhysVol(moduleServicesLoLog); diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdRingCooling.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdRingCooling.cxx old mode 100755 new mode 100644 index 4c321aa924e41565c6d3af50cbf3693d16c0ec7d..04bc673355937b0f15d58036d2ff809d723bfa50 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdRingCooling.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdRingCooling.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_GeoModel/SCT_FwdRingCooling.h" @@ -18,8 +18,12 @@ inline double sqr(double x) {return x*x;} -SCT_FwdRingCooling::SCT_FwdRingCooling(const std::string & name, int ringType) - : SCT_SharedComponentFactory(name), m_ringType(ringType) +SCT_FwdRingCooling::SCT_FwdRingCooling(const std::string & name, int ringType, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) + : SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials), + m_ringType(ringType) { getParameters(); m_physVolume = build(); @@ -29,7 +33,7 @@ SCT_FwdRingCooling::SCT_FwdRingCooling(const std::string & name, int ringType) void SCT_FwdRingCooling::getParameters() { - const SCT_ForwardParameters * parameters = geometryManager()->forwardParameters(); + const SCT_ForwardParameters * parameters = m_geometryManager->forwardParameters(); m_materialName= parameters->fwdRingCoolingMaterial(m_ringType); m_innerRadius = parameters->fwdRingCoolingInnerRadius(m_ringType); @@ -41,10 +45,8 @@ SCT_FwdRingCooling::getParameters() GeoVPhysVol * SCT_FwdRingCooling::build() { - SCT_MaterialManager materials; - const GeoTube * ringCoolingShape = new GeoTube(m_innerRadius, m_outerRadius, 0.5 * m_thickness); - m_material = materials.getMaterialForVolume(m_materialName, ringCoolingShape->volume()); + m_material = m_materials->getMaterialForVolume(m_materialName, ringCoolingShape->volume()); const GeoLogVol * ringCoolingLog = new GeoLogVol(getName(), ringCoolingShape, m_material); GeoPhysVol * ringCooling = new GeoPhysVol(ringCoolingLog); diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdSensor.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdSensor.cxx old mode 100755 new mode 100644 index c8cd1d7aa2eb08f2ce1bb6d2c5a7d4cd466683df..1f47acf4994bda792cbccf3470d26e4b293aae1a --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdSensor.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdSensor.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////// @@ -47,8 +47,13 @@ using namespace InDetDD; SCT_FwdSensor::SCT_FwdSensor(const std::string & name, - int ringType) - : SCT_UniqueComponentFactory(name), m_ringType(ringType) + int ringType, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) + : SCT_UniqueComponentFactory(name, detectorManager, geometryManager, materials), + m_ringType{ringType}, + m_noElementWarning{true} { getParameters(); m_logVolume = preBuild(); @@ -62,15 +67,14 @@ void SCT_FwdSensor::getParameters() { - const SCT_ForwardModuleParameters * parameters = geometryManager()->forwardModuleParameters(); - SCT_MaterialManager materials; + const SCT_ForwardModuleParameters * parameters = m_geometryManager->forwardModuleParameters(); - m_materialSensor = materials.getMaterial(parameters->fwdSensorMaterialFar(m_ringType)); + m_materialSensor = m_materials->getMaterial(parameters->fwdSensorMaterialFar(m_ringType)); m_materialGlass = 0; if (m_ringType == 2) { // Only need to define glass if its a Truncated middle module. - m_materialGlass = materials.getMaterial(parameters->fwdSensorMaterialNear(m_ringType)); + m_materialGlass = m_materials->getMaterial(parameters->fwdSensorMaterialNear(m_ringType)); } m_thicknessN = m_thicknessF = parameters->fwdSensorThickness(m_ringType); @@ -168,7 +172,7 @@ const GeoLogVol * SCT_FwdSensor::preBuild() // Make the moduleside design for this sensor makeDesign(); - detectorManager()->addDesign(m_design); + m_detectorManager->addDesign(m_design); return sensorLog; } @@ -225,7 +229,7 @@ void SCT_FwdSensor::makeDesign() // eta coordinate of crystal center // phi coordinate of crystal center - const SCT_ForwardModuleParameters * parameters = geometryManager()->forwardModuleParameters(); + const SCT_ForwardModuleParameters * parameters = m_geometryManager->forwardModuleParameters(); double radius1=0; double radius2=0; @@ -306,7 +310,7 @@ void SCT_FwdSensor::makeDesign() -GeoVPhysVol *SCT_FwdSensor::build(SCT_Identifier id) const +GeoVPhysVol *SCT_FwdSensor::build(SCT_Identifier id) { GeoFullPhysVol * sensor = new GeoFullPhysVol(m_logVolume); @@ -315,7 +319,7 @@ GeoVPhysVol *SCT_FwdSensor::build(SCT_Identifier id) const // Only do so if we have a valid id helper. //id.print(); // for debugging only - SiCommonItems* commonItems = geometryManager()->commonItems(); + const SiCommonItems* commonItems = m_geometryManager->commonItems(); if (commonItems->getIdHelper()) { @@ -325,13 +329,12 @@ GeoVPhysVol *SCT_FwdSensor::build(SCT_Identifier id) const commonItems); // Add the detector element. - detectorManager()->addDetectorElement(detElement); + m_detectorManager->addDetectorElement(detElement); } else { - static bool noElementWarning = true; // So we don't get the message thousands of times. - if (noElementWarning) { + if (m_noElementWarning) { std::cout << "WARNING!!!!: No SCT id helper and so no elements being produced." << std::endl; - noElementWarning = false; + m_noElementWarning = false; } } diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdSpine.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdSpine.cxx old mode 100755 new mode 100644 index 6c6f13e57d7c97994394c4e5ce1405c1373e2f74..128c2418ab294c51d78b3d7ff52b5f22589e2cce --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdSpine.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdSpine.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////// @@ -30,19 +30,21 @@ #include <cmath> SCT_FwdSpine::SCT_FwdSpine(const std::string & name, - int ringType) - : SCT_SharedComponentFactory(name), m_ringType(ringType) + int ringType, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) + : SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials), + m_ringType(ringType) { getParameters(); m_physVolume = build(); } - - void SCT_FwdSpine::getParameters() { - const SCT_ForwardModuleParameters * parameters = geometryManager()->forwardModuleParameters(); + const SCT_ForwardModuleParameters * parameters = m_geometryManager->forwardModuleParameters(); m_materialName = parameters->fwdSpineMaterial(m_ringType); @@ -91,10 +93,8 @@ SCT_FwdSpine::build() //position = position / 2. * HybPos; - SCT_MaterialManager materials; - const GeoShape & spinePosMain = (*spineShapeMain << GeoTrf::TranslateZ3D(position) ); - m_material = materials.getMaterialForVolume(m_materialName, spineShapeMain->volume()); + m_material = m_materials->getMaterialForVolume(m_materialName, spineShapeMain->volume()); GeoLogVol * spineLog = new GeoLogVol(getName(), &spinePosMain, m_material); GeoPhysVol * spine = new GeoPhysVol(spineLog); diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdSubSpine.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdSubSpine.cxx old mode 100755 new mode 100644 index 20b6b3db60229ba902f8649e3b3512e457d2eb4c..8a547d3e722fd3934540d92b5c7d46d73a01b32c --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdSubSpine.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdSubSpine.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////// @@ -35,8 +35,12 @@ SCT_FwdSubSpine::SCT_FwdSubSpine(const std::string & name, - int ringType, int spineSide) - : SCT_SharedComponentFactory(name), m_ringType(ringType), m_spineSide(spineSide) + int ringType, int spineSide, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) + : SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials), + m_ringType(ringType), m_spineSide(spineSide) { getParameters(); m_physVolume = build(); @@ -47,10 +51,9 @@ SCT_FwdSubSpine::SCT_FwdSubSpine(const std::string & name, void SCT_FwdSubSpine::getParameters() { - const SCT_ForwardModuleParameters * parameters = geometryManager()->forwardModuleParameters(); - SCT_MaterialManager materials; + const SCT_ForwardModuleParameters * parameters = m_geometryManager->forwardModuleParameters(); - m_material = materials.getMaterial(parameters->fwdSubSpineMaterial(m_ringType)); + m_material = m_materials->getMaterial(parameters->fwdSubSpineMaterial(m_ringType)); // Width is in direction of module width (ie long axis of arm) // Length is in direction of module length (ie short axis of arm) @@ -73,7 +76,7 @@ GeoVPhysVol * SCT_FwdSubSpine::build() { // x,y,z are in the geomodel module coordinates - const SCT_ForwardModuleParameters * parameters = geometryManager()->forwardModuleParameters(); + const SCT_ForwardModuleParameters * parameters = m_geometryManager->forwardModuleParameters(); const GeoBox * spineShape1 = new GeoBox( m_thickness1/2., m_width1/2., m_length1/2.); const GeoBox * spineShape2 = 0; diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdSupportFrame.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdSupportFrame.cxx old mode 100755 new mode 100644 index cdac143bd99834bcc32bb06244b739f056eb32f0..3bb364e71c397fabf7cf5d5f976364f1386ee401 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdSupportFrame.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdSupportFrame.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_GeoModel/SCT_FwdSupportFrame.h" @@ -15,8 +15,11 @@ #include "GeoModelKernel/Units.h" -SCT_FwdSupportFrame::SCT_FwdSupportFrame(const std::string & name) - : SCT_SharedComponentFactory(name) +SCT_FwdSupportFrame::SCT_FwdSupportFrame(const std::string & name, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) + : SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials) { getParameters(); m_physVolume = build(); @@ -26,7 +29,7 @@ SCT_FwdSupportFrame::SCT_FwdSupportFrame(const std::string & name) void SCT_FwdSupportFrame::getParameters() { - const SCT_ForwardParameters * parameters = geometryManager()->forwardParameters(); + const SCT_ForwardParameters * parameters = m_geometryManager->forwardParameters(); m_materialName = parameters->fwdSupportFrameMaterial(); m_thickness = parameters->fwdSupportFrameRadialThickness(); @@ -42,12 +45,10 @@ SCT_FwdSupportFrame::getParameters() GeoVPhysVol * SCT_FwdSupportFrame::build() { - SCT_MaterialManager materials; - // Make the support disk. A simple tube. const GeoTube * supportFrameShape = new GeoTube(m_innerRadius, m_outerRadius, 0.5 * m_length); - m_material = materials.getMaterialForVolume(m_materialName, supportFrameShape->volume()); - if(!m_material) {m_material = materials.getMaterial(m_materialName);} + m_material = m_materials->getMaterialForVolume(m_materialName, supportFrameShape->volume()); + if(!m_material) m_material = m_materials->getMaterial(m_materialName); const GeoLogVol * supportFrameLog = new GeoLogVol(getName(), supportFrameShape, m_material); GeoPhysVol * supportFrame = new GeoPhysVol(supportFrameLog); diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdThermalShieldElement.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdThermalShieldElement.cxx old mode 100755 new mode 100644 index d956aca563facace248629163cb2cc25c90caa18..dceaa95de3a20c7d7dcacdebd009b182e2e452d0 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdThermalShieldElement.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdThermalShieldElement.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_GeoModel/SCT_FwdThermalShieldElement.h" @@ -16,8 +16,12 @@ #include <cmath> -SCT_FwdThermalShieldElement::SCT_FwdThermalShieldElement(const std::string & name, int iElement) - : SCT_SharedComponentFactory(name), m_iElement(iElement) +SCT_FwdThermalShieldElement::SCT_FwdThermalShieldElement(const std::string & name, int iElement, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) + : SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials), + m_iElement(iElement) { getParameters(); m_physVolume = build(); @@ -27,7 +31,7 @@ SCT_FwdThermalShieldElement::SCT_FwdThermalShieldElement(const std::string & nam void SCT_FwdThermalShieldElement::getParameters() { - const SCT_ForwardParameters * parameters = geometryManager()->forwardParameters(); + const SCT_ForwardParameters * parameters = m_geometryManager->forwardParameters(); m_materialName = parameters->fwdThermalShieldMaterial(m_iElement); m_innerRadius = parameters->fwdThermalShieldInnerRadius(m_iElement); @@ -42,12 +46,10 @@ SCT_FwdThermalShieldElement::getParameters() GeoVPhysVol * SCT_FwdThermalShieldElement::build() { - SCT_MaterialManager materials; - // Make the support disk. A simple tube. const GeoTube * elementShape = new GeoTube(m_innerRadius, m_outerRadius, 0.5 * m_length); - m_material = materials.getMaterialForVolume(m_materialName, elementShape->volume()); - if(!m_material) {m_material = materials.getMaterial(m_materialName);} + m_material = m_materials->getMaterialForVolume(m_materialName, elementShape->volume()); + if (!m_material) m_material = m_materials->getMaterial(m_materialName); const GeoLogVol * elementLog = new GeoLogVol(getName(), elementShape, m_material); GeoPhysVol * element = new GeoPhysVol(elementLog); diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdWheel.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdWheel.cxx old mode 100755 new mode 100644 index a8df7a8d0623536f9115c4109e9a7f963ef76d2d..24f8b07c1639e94d94a123930709b79ae69621c3 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdWheel.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdWheel.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_GeoModel/SCT_FwdWheel.h" @@ -49,9 +49,12 @@ inline double sqr(double x) {return x*x;} SCT_FwdWheel::SCT_FwdWheel(const std::string & name, int iWheel, - const std::vector<const SCT_FwdModule *> & modules, - int ec) - : SCT_UniqueComponentFactory(name), + const std::vector<SCT_FwdModule *> & modules, + int ec, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) + : SCT_UniqueComponentFactory(name, detectorManager, geometryManager, materials), m_iWheel(iWheel), m_endcap(ec), m_pPConnector(0), @@ -87,8 +90,8 @@ SCT_FwdWheel::~SCT_FwdWheel() void SCT_FwdWheel::getParameters() { - const SCT_ForwardParameters * parameters = geometryManager()->forwardParameters(); - + const SCT_ForwardParameters * parameters = m_geometryManager->forwardParameters(); + m_zPosition = parameters->fwdWheelZPosition(m_iWheel); m_numRings = parameters->fwdWheelNumRings(m_iWheel); for (int iRing = 0; iRing < m_numRings; iRing++) { @@ -134,10 +137,10 @@ SCT_FwdWheel::getParameters() } } - m_safety = geometryManager()->generalParameters()->safety(); + m_safety = m_geometryManager->generalParameters()->safety(); // Set numerology - detectorManager()->numerology().setNumRingsForDisk(m_iWheel,m_numRings); + m_detectorManager->numerology().setNumRingsForDisk(m_iWheel,m_numRings); } @@ -146,28 +149,39 @@ SCT_FwdWheel::preBuild() { // Create disc support. - m_discSupport = new SCT_FwdDiscSupport("DiscSupport"+intToString(m_iWheel), m_iWheel); + m_discSupport = new SCT_FwdDiscSupport("DiscSupport"+intToString(m_iWheel), m_iWheel, + m_detectorManager, m_geometryManager, m_materials); // The rings for (int iRing = 0; iRing < m_numRings; iRing++){ std::string ringName = "Ring"+intToString(iRing)+"For"+getName(); int ringType = m_ringType[iRing]; - m_rings.push_back(new SCT_FwdRing(ringName, m_modules[ringType], m_iWheel, iRing, m_endcap)); + m_rings.push_back(new SCT_FwdRing(ringName, m_modules[ringType], m_iWheel, iRing, m_endcap, + m_detectorManager, m_geometryManager, m_materials)); } // Create Patch Panel //m_patchPanel = new SCT_FwdPatchPanel("PatchPanel"+intToString(m_iWheel), m_iWheel); for (int iPPType = 0; iPPType < m_numPatchPanelTypes; iPPType++) { - m_patchPanel.push_back(new SCT_FwdPatchPanel("PatchPanel"+intToString(iPPType), iPPType)); + m_patchPanel.push_back(new SCT_FwdPatchPanel("PatchPanel"+intToString(iPPType), iPPType, + m_detectorManager, m_geometryManager, m_materials)); } // Create Patch Pannel Connector and Cooling, and disc Fixations - if(m_pPConnectorPresent) {m_pPConnector = new SCT_FwdPPConnector("PPConnector");} - if(m_pPCoolingPresent) {m_pPCooling = new SCT_FwdPPCooling("PPCooling");} - if(m_discFixationPresent) {m_discFixation = new SCT_FwdDiscFixation("DiscFixation");} - + if (m_pPConnectorPresent) { + m_pPConnector = new SCT_FwdPPConnector("PPConnector", + m_detectorManager, m_geometryManager, m_materials); + } + if (m_pPCoolingPresent) { + m_pPCooling = new SCT_FwdPPCooling("PPCooling", + m_detectorManager, m_geometryManager, m_materials); + } + if (m_discFixationPresent) { + m_discFixation = new SCT_FwdDiscFixation("DiscFixation", + m_detectorManager, m_geometryManager, m_materials); + } // Calculate total number of modules m_totalModules = 0; @@ -181,7 +195,8 @@ SCT_FwdWheel::preBuild() for (unsigned int iFSI = 0; iFSI < m_fsiVector->size(); iFSI++) { int type = (*m_fsiVector)[iFSI]->simType(); if (!m_fsiType[type]) { - m_fsiType[type] = new SCT_FwdFSI("FSI"+intToString(type), type); + m_fsiType[type] = new SCT_FwdFSI("FSI"+intToString(type), type, + m_detectorManager, m_geometryManager, m_materials); } } @@ -245,14 +260,12 @@ SCT_FwdWheel::preBuild() // m_thickness = 100 * Gaudi::Units::mm; // Make envelope for the wheel - SCT_MaterialManager materials; - double envelopeShift = 0.5*(m_thicknessBack - m_thicknessFront); const GeoTube * tmpShape = new GeoTube(m_innerRadius, m_outerRadius, 0.5 * m_thickness); const GeoShape & fwdWheelEnvelopeShape = *tmpShape << GeoTrf::Translate3D(0, 0, envelopeShift); const GeoLogVol * fwdWheelLog = - new GeoLogVol(getName(), &fwdWheelEnvelopeShape, materials.gasMaterial()); + new GeoLogVol(getName(), &fwdWheelEnvelopeShape, m_materials->gasMaterial()); return fwdWheelLog; @@ -260,7 +273,7 @@ SCT_FwdWheel::preBuild() } GeoVPhysVol * -SCT_FwdWheel::build(SCT_Identifier id) const +SCT_FwdWheel::build(SCT_Identifier id) { GeoFullPhysVol * wheel = new GeoFullPhysVol(m_logVolume); @@ -277,7 +290,7 @@ SCT_FwdWheel::build(SCT_Identifier id) const for (int iRing = 0; iRing < m_numRings; iRing++){ - const SCT_FwdRing * ring = m_rings[iRing]; + SCT_FwdRing * ring = m_rings[iRing]; // Position ring double ringZpos = ring->ringSide() * ring->ringOffset(); @@ -294,7 +307,7 @@ SCT_FwdWheel::build(SCT_Identifier id) const // Position cooling // Get a pointer to the cooling ring. SCT_FwdRingCooling cooling("RingCoolingW"+intToString(m_iWheel)+"R"+intToString(iRing), - iRing); + iRing, m_detectorManager, m_geometryManager, m_materials); double coolingZpos = ring->ringSide() * (0.5*(m_discSupport->thickness() + cooling.thickness())); wheel->add(new GeoTransform(GeoTrf::TranslateZ3D(coolingZpos))); wheel->add(cooling.getVolume()); @@ -302,7 +315,8 @@ SCT_FwdWheel::build(SCT_Identifier id) const // Power Tapes // Get a pointer to the power tape SCT_FwdDiscPowerTape powerTape("PowerTapeW"+intToString(m_iWheel)+ - "R"+intToString(iRing), iRing); + "R"+intToString(iRing), iRing, + m_detectorManager, m_geometryManager, m_materials); double powerTapeZpos = ring->ringSide() * (0.5*(m_discSupport->thickness() + powerTape.thickness()) + cooling.thickness()); @@ -419,7 +433,8 @@ SCT_FwdWheel::build(SCT_Identifier id) const std::string optoharnessName = "OptoHarnessO"; if(m_numRings > 1) {optoharnessName+="M";} if(m_numRings > 2) {optoharnessName+="I";} - SCT_FwdOptoHarness optoharness(optoharnessName+"W"+intToString(m_iWheel),m_numRings); + SCT_FwdOptoHarness optoharness(optoharnessName+"W"+intToString(m_iWheel), m_numRings, + m_detectorManager, m_geometryManager, m_materials); double optoHarnessZpos = 0.5*m_rotateWheel*(m_discSupport->thickness() + optoharness.thickness()); wheel->add(new GeoTransform(GeoTrf::TranslateZ3D(optoHarnessZpos))); wheel->add(optoharness.getVolume()); @@ -488,7 +503,7 @@ SCT_FwdWheel::build(SCT_Identifier id) const // Extra Material - InDetDD::ExtraMaterial xMat(geometryManager()->distortedMatManager()); + InDetDD::ExtraMaterial xMat(m_geometryManager->distortedMatManager()); xMat.add(wheel, "SCTDisc"); xMat.add(wheel, "SCTDisc"+intToString(m_iWheel)); if (m_endcap > 0) { diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_GeneralParameters.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_GeneralParameters.cxx old mode 100755 new mode 100644 index cd861f5e53325c686e460e3f88f98c6b1a284258..bfc74c74349c2c41d15e7dece87b2ba79120dd9c --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_GeneralParameters.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_GeneralParameters.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_GeoModel/SCT_GeneralParameters.h" @@ -14,9 +14,9 @@ const double SCT_SAFETY = 0.01 * Gaudi::Units::mm; // Used in some places to mak // no overlaps due to rounding errors. -SCT_GeneralParameters::SCT_GeneralParameters() +SCT_GeneralParameters::SCT_GeneralParameters(SCT_DataBase* rdb) { - m_rdb = SCT_DataBase::instance(); + m_rdb = rdb; m_placements = new TopLevelPlacements(m_rdb->topLevelTable()); } diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_GeometryManager.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_GeometryManager.cxx old mode 100755 new mode 100644 index febbf924122612566045b6c700a58a8096573c9d..1b30a9a0adc4d3e78610469bf0fbe11f5bebfbe7 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_GeometryManager.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_GeometryManager.cxx @@ -1,37 +1,37 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_GeoModel/SCT_GeometryManager.h" +#include "InDetGeoModelUtils/DistortedMaterialManager.h" +#include "InDetIdentifier/SCT_ID.h" +#include "InDetReadoutGeometry/SiCommonItems.h" #include "SCT_GeoModel/SCT_BarrelParameters.h" #include "SCT_GeoModel/SCT_BarrelModuleParameters.h" +#include "SCT_GeoModel/SCT_DataBase.h" #include "SCT_GeoModel/SCT_ForwardParameters.h" #include "SCT_GeoModel/SCT_ForwardModuleParameters.h" #include "SCT_GeoModel/SCT_GeneralParameters.h" -#include "InDetGeoModelUtils/DistortedMaterialManager.h" #include "SCT_GeoModel/SCT_GeoModelAthenaComps.h" - -SCT_GeometryManager::SCT_GeometryManager() - : m_athenaComps(0), - m_commonItems(0), - m_barrelParameters(0), - m_barrelModuleParameters(0), - m_forwardParameters(0), - m_forwardModuleParameters(0), - m_generalParameters(0), - m_distortedMatManager(0) -{} +SCT_GeometryManager::SCT_GeometryManager(SCT_DataBase* rdb) + : m_athenaComps{rdb->athenaComps()}, + m_rdb{rdb} +{ + // This class uses reference counting. Should not be delete'd in destructor. + m_commonItems = new InDetDD::SiCommonItems(m_athenaComps->getIdHelper()); + + m_barrelParameters = std::make_unique<SCT_BarrelParameters>(m_rdb); + m_barrelModuleParameters = std::make_unique<SCT_BarrelModuleParameters>(m_rdb); + m_forwardParameters = std::make_unique<SCT_ForwardParameters>(m_rdb); + m_forwardModuleParameters = std::make_unique<SCT_ForwardModuleParameters>(m_rdb); + m_generalParameters = std::make_unique<SCT_GeneralParameters>(m_rdb); + m_distortedMatManager = std::make_unique<InDetDD::DistortedMaterialManager>(); +} SCT_GeometryManager::~SCT_GeometryManager() { - delete m_barrelParameters; - delete m_barrelModuleParameters; - delete m_forwardParameters; - delete m_forwardModuleParameters; - delete m_generalParameters; - delete m_distortedMatManager; } // @@ -55,81 +55,53 @@ SCT_GeometryManager::athenaComps() const return m_athenaComps; } -void -SCT_GeometryManager::setAthenaComps(const SCT_GeoModelAthenaComps * athenaComps) -{ - m_athenaComps = athenaComps; -} - - // // SiCommonItems which are passed to SiDetectorElements. // -InDetDD::SiCommonItems * +const InDetDD::SiCommonItems * SCT_GeometryManager::commonItems() const { return m_commonItems; } - -void -SCT_GeometryManager::setCommonItems(InDetDD::SiCommonItems * commonItems) -{ - m_commonItems = commonItems; -} - const SCT_BarrelParameters * SCT_GeometryManager::barrelParameters() const { - if (!m_barrelParameters) { - m_barrelParameters = new SCT_BarrelParameters; - } - return m_barrelParameters; + return m_barrelParameters.get(); } const SCT_BarrelModuleParameters * SCT_GeometryManager::barrelModuleParameters() const { - if (!m_barrelModuleParameters) { - m_barrelModuleParameters = new SCT_BarrelModuleParameters; - } - return m_barrelModuleParameters; + return m_barrelModuleParameters.get(); } const SCT_ForwardModuleParameters * SCT_GeometryManager::forwardModuleParameters() const { - if (!m_forwardModuleParameters) { - m_forwardModuleParameters = new SCT_ForwardModuleParameters; - } - return m_forwardModuleParameters; + return m_forwardModuleParameters.get(); } const SCT_ForwardParameters * SCT_GeometryManager::forwardParameters() const { - if (!m_forwardParameters) { - m_forwardParameters = new SCT_ForwardParameters; - } - return m_forwardParameters; + return m_forwardParameters.get(); } const SCT_GeneralParameters * SCT_GeometryManager::generalParameters() const { - if (!m_generalParameters) m_generalParameters = new SCT_GeneralParameters; - return m_generalParameters; + return m_generalParameters.get(); } const InDetDD::DistortedMaterialManager * SCT_GeometryManager::distortedMatManager() const { - if (!m_distortedMatManager) m_distortedMatManager = new InDetDD::DistortedMaterialManager; - return m_distortedMatManager; + return m_distortedMatManager.get(); } SCT_GeometryManager& @@ -138,12 +110,13 @@ SCT_GeometryManager::operator=(const SCT_GeometryManager& right) { m_options = right.m_options; m_athenaComps = right.m_athenaComps; m_commonItems = right.m_commonItems; - m_barrelParameters = nullptr; - m_barrelModuleParameters = nullptr; - m_forwardParameters = nullptr; - m_forwardModuleParameters = nullptr; - m_generalParameters = nullptr; - m_distortedMatManager = nullptr; + m_rdb = right.m_rdb; + m_barrelParameters.reset(new SCT_BarrelParameters(m_rdb)); + m_barrelModuleParameters.reset(new SCT_BarrelModuleParameters(m_rdb)); + m_forwardParameters.reset(new SCT_ForwardParameters(m_rdb)); + m_forwardModuleParameters.reset(new SCT_ForwardModuleParameters(m_rdb)); + m_generalParameters.reset(new SCT_GeneralParameters(m_rdb)); + m_distortedMatManager.reset(new InDetDD::DistortedMaterialManager()); } return *this; } @@ -152,10 +125,11 @@ SCT_GeometryManager::SCT_GeometryManager(const SCT_GeometryManager& right) { m_options = right.m_options; m_athenaComps = right.m_athenaComps; m_commonItems = right.m_commonItems; - m_barrelParameters = nullptr; - m_barrelModuleParameters = nullptr; - m_forwardParameters = nullptr; - m_forwardModuleParameters = nullptr; - m_generalParameters = nullptr; - m_distortedMatManager = nullptr; + m_rdb = right.m_rdb; + m_barrelParameters.reset(new SCT_BarrelParameters(m_rdb)); + m_barrelModuleParameters.reset(new SCT_BarrelModuleParameters(m_rdb)); + m_forwardParameters.reset(new SCT_ForwardParameters(m_rdb)); + m_forwardModuleParameters.reset(new SCT_ForwardModuleParameters(m_rdb)); + m_generalParameters.reset(new SCT_GeneralParameters(m_rdb)); + m_distortedMatManager.reset(new InDetDD::DistortedMaterialManager()); } diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Harness.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Harness.cxx old mode 100755 new mode 100644 index a713cba01739d2a60d5b374a57cffed8c429912d..1de3ead94e8ecd6c9921db825a116c89a306234b --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Harness.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Harness.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_GeoModel/SCT_Harness.h" @@ -15,8 +15,12 @@ #include "GeoModelKernel/GeoMaterial.h" #include "GeoModelKernel/Units.h" -SCT_Harness::SCT_Harness(const std::string & name, double length) - : SCT_SharedComponentFactory(name), m_length(length) +SCT_Harness::SCT_Harness(const std::string & name, double length, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) + : SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials), + m_length(length) { getParameters(); m_physVolume = build(); @@ -26,8 +30,8 @@ SCT_Harness::SCT_Harness(const std::string & name, double length) void SCT_Harness::getParameters() { - const SCT_BarrelParameters * parameters = geometryManager()->barrelParameters(); - + const SCT_BarrelParameters * parameters = m_geometryManager->barrelParameters(); + m_materialName = parameters->harnessMaterial(); m_thickness = parameters->harnessThickness(); m_width = parameters->harnessWidth(); @@ -38,13 +42,10 @@ SCT_Harness::build() { // Build the Harness. - SCT_MaterialManager materials; - const GeoBox * harnessShape = new GeoBox(0.5*m_thickness, 0.5*m_width, 0.5*m_length); - m_material = materials.getMaterialForVolume(m_materialName, harnessShape->volume()); - if(!m_material) {m_material = materials.getMaterial(m_materialName);} - const GeoLogVol *harnessLog = - new GeoLogVol(getName(), harnessShape, m_material); + m_material = m_materials->getMaterialForVolume(m_materialName, harnessShape->volume()); + if (!m_material) m_material = m_materials->getMaterial(m_materialName); + const GeoLogVol *harnessLog = new GeoLogVol(getName(), harnessShape, m_material); GeoPhysVol * harness = new GeoPhysVol(harnessLog); return harness; diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Hybrid.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Hybrid.cxx old mode 100755 new mode 100644 index 3572f1656085ffc753ec12284399aec1f029a100..83bb9f309ca6c2ad22aca87059ebde701013f76e --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Hybrid.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Hybrid.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_GeoModel/SCT_Hybrid.h" @@ -15,8 +15,11 @@ #include "GeoModelKernel/GeoMaterial.h" #include "GeoModelKernel/Units.h" -SCT_Hybrid::SCT_Hybrid(const std::string & name) - : SCT_SharedComponentFactory(name) +SCT_Hybrid::SCT_Hybrid(const std::string & name, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManage, + SCT_MaterialManager* materials) + : SCT_SharedComponentFactory(name, detectorManager, geometryManage, materials) { getParameters(); m_physVolume = build(); @@ -25,10 +28,8 @@ SCT_Hybrid::SCT_Hybrid(const std::string & name) void SCT_Hybrid::getParameters() { - const SCT_BarrelModuleParameters * parameters = geometryManager()->barrelModuleParameters(); - SCT_MaterialManager materials; - - m_material = materials.getMaterial(parameters->hybridMaterial()); + const SCT_BarrelModuleParameters * parameters = m_geometryManager->barrelModuleParameters(); + m_material = m_materials->getMaterial(parameters->hybridMaterial()); m_thickness = parameters->hybridThickness(); m_length = parameters->hybridLength(); m_width = parameters->hybridWidth(); diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Identifier.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Identifier.cxx old mode 100755 new mode 100644 index 91b846a5f9bd171fc28dd6e6851feff5aa24e17d..ca4fbc14c040a848ea0fa7180d8c84b9ead99036 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Identifier.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Identifier.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_GeoModel/SCT_Identifier.h" @@ -9,13 +9,11 @@ #include <cassert> #include <iostream> -const SCT_ID * SCT_Identifier::s_idHelper = 0; - Identifier SCT_Identifier::getWaferId() { - assert (s_idHelper); - return s_idHelper->wafer_id(m_barrelEC, m_layerDisk, m_phiModule, m_etaModule, m_side); + assert (m_idHelper); + return m_idHelper->wafer_id(m_barrelEC, m_layerDisk, m_phiModule, m_etaModule, m_side); } void SCT_Identifier::print() diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_InnerSide.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_InnerSide.cxx old mode 100755 new mode 100644 index c350e121281a8be185265854862f8fc9344cb7dd..cb8168fa07e53a6dc74f05e64f63d97abb588213 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_InnerSide.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_InnerSide.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // @@ -37,8 +37,11 @@ #include <cmath> -SCT_InnerSide::SCT_InnerSide(const std::string & name) - : SCT_UniqueComponentFactory(name), +SCT_InnerSide::SCT_InnerSide(const std::string & name, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) + : SCT_UniqueComponentFactory(name, detectorManager, geometryManager, materials), m_hybrid(0), m_sensor(0) { @@ -61,8 +64,8 @@ SCT_InnerSide::~SCT_InnerSide() void SCT_InnerSide::getParameters() { - const SCT_BarrelModuleParameters * parameters = geometryManager()->barrelModuleParameters(); - const SCT_GeneralParameters * generalParameters = geometryManager()->generalParameters(); + const SCT_BarrelModuleParameters * parameters = m_geometryManager->barrelModuleParameters(); + const SCT_GeneralParameters * generalParameters = m_geometryManager->generalParameters(); m_safety = generalParameters->safety(); m_hybridOffsetZ = parameters->hybridOffsetZ(); @@ -73,11 +76,9 @@ SCT_InnerSide::getParameters() const GeoLogVol * SCT_InnerSide::preBuild() { - SCT_MaterialManager materials; - // Create child components - m_sensor = new SCT_Sensor("BRLSensor"); - m_hybrid = new SCT_Hybrid("Hybrid"); + m_sensor = new SCT_Sensor("BRLSensor", m_detectorManager, m_geometryManager, m_materials); + m_hybrid = new SCT_Hybrid("Hybrid", m_detectorManager, m_geometryManager, m_materials); // // Define constants for convenience. @@ -163,7 +164,7 @@ SCT_InnerSide::preBuild() const GeoLogVol * InnerSideEnvelopeLog = new GeoLogVol("InnerSideEnvelope", &InnerSideEnvelopeShape, - materials.gasMaterial()); + m_materials->gasMaterial()); // 28th Mar S.Mima modified // *** 16:30 Wed 15th Jun 2005 D.Naito modified. (00)********************************* //m_thickness = 0.5*t_sensor + hybridPosX + 0.5*t_ise2; @@ -178,7 +179,7 @@ SCT_InnerSide::preBuild() GeoVPhysVol * -SCT_InnerSide::build(SCT_Identifier id) const +SCT_InnerSide::build(SCT_Identifier id) { GeoFullPhysVol * innerSide = new GeoFullPhysVol(m_logVolume); diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_InterLink.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_InterLink.cxx old mode 100755 new mode 100644 index d30351c0efc8830695fc7d7b123a3a799379ab36..a5cd9cfadbc462421e7ee0254975b73ad5c4c501 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_InterLink.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_InterLink.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_GeoModel/SCT_InterLink.h" @@ -16,8 +16,11 @@ #include "GeoModelKernel/GeoTransform.h" #include "GaudiKernel/SystemOfUnits.h" -SCT_InterLink::SCT_InterLink(const std::string & name) - : SCT_SharedComponentFactory(name), +SCT_InterLink::SCT_InterLink(const std::string & name, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) + : SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials), m_interLinkShape(nullptr), m_interLinkLog(nullptr), m_interLink(nullptr), @@ -45,7 +48,7 @@ SCT_InterLink::~SCT_InterLink() { void SCT_InterLink::getParameters() { - const SCT_BarrelParameters * parameters = geometryManager()->barrelParameters(); + const SCT_BarrelParameters * parameters = m_geometryManager->barrelParameters(); // Interlink parameters m_materialName = parameters->interLinkMaterial(); @@ -86,14 +89,11 @@ GeoVPhysVol * SCT_InterLink::build() { // Make the interlink. - - SCT_MaterialManager materials; - if(m_nRepeat == 1) { // For old geometry interlink is a simple tube of material m_interLinkShape = new GeoTube(m_innerRadius, m_outerRadius, 0.5*m_length); - const GeoMaterial* material = materials.getMaterialForVolume(m_materialName, m_interLinkShape->volume()); - if(!material) {material = materials.getMaterial(m_materialName);} + const GeoMaterial* material = m_materials->getMaterialForVolume(m_materialName, m_interLinkShape->volume()); + if(!material) {material = m_materials->getMaterial(m_materialName);} m_interLinkLog = new GeoLogVol(getName(), m_interLinkShape, material); m_interLink = new GeoPhysVol(m_interLinkLog); m_interLink->ref(); @@ -104,13 +104,13 @@ SCT_InterLink::build() // And also include FSI flange segments if defined // Air tube: m_interLinkShape = new GeoTube(m_innerRadius, m_outerRadiusBearing, 0.5*m_length); - m_interLinkLog = new GeoLogVol(getName(), m_interLinkShape, materials.gasMaterial()); + m_interLinkLog = new GeoLogVol(getName(), m_interLinkShape, m_materials->gasMaterial()); m_interLink = new GeoPhysVol(m_interLinkLog); m_interLink->ref(); // Interlink segments: m_interLinkSegShape = new GeoTubs(m_innerRadius, m_outerRadius, 0.5*m_length, - 0.5*m_dPhi*Gaudi::Units::radian, m_dPhi*Gaudi::Units::radian); - m_interLinkSegLog = new GeoLogVol("InterlinkSegment", m_interLinkSegShape, materials.getMaterialForVolume(m_materialName, m_interLinkSegShape->volume())); + m_interLinkSegLog = new GeoLogVol("InterlinkSegment", m_interLinkSegShape, m_materials->getMaterialForVolume(m_materialName, m_interLinkSegShape->volume())); m_interLinkSeg = new GeoPhysVol(m_interLinkSegLog); m_interLinkSeg->ref(); @@ -124,7 +124,7 @@ SCT_InterLink::build() // B6 bearings m_bearingShape = new GeoTubs(m_innerRadiusBearing, m_outerRadiusBearing, 0.5*m_lengthBearing, - 0.5*m_dPhiBearing*Gaudi::Units::radian, m_dPhiBearing*Gaudi::Units::radian); - m_bearingLog = new GeoLogVol("Bearing", m_bearingShape, materials.getMaterialForVolume(m_materialNameBearing, m_bearingShape->volume())); + m_bearingLog = new GeoLogVol("Bearing", m_bearingShape, m_materials->getMaterialForVolume(m_materialNameBearing, m_bearingShape->volume())); m_bearing = new GeoPhysVol(m_bearingLog); m_bearing->ref(); @@ -141,7 +141,7 @@ SCT_InterLink::build() if(m_includeFSIFlange) { double dPhiFSI = (360./m_nRepeat)*Gaudi::Units::deg - m_dPhi; m_FSIFlangeShape = new GeoTubs(m_innerRadiusFSIFlange, m_outerRadiusFSIFlange, 0.5*m_length, - 0.5*dPhiFSI*Gaudi::Units::radian, dPhiFSI*Gaudi::Units::radian); - m_FSIFlangeLog = new GeoLogVol("FSIFlangeSegment", m_FSIFlangeShape, materials.getMaterialForVolume(m_materialNameFSIFlange, m_FSIFlangeShape->volume())); + m_FSIFlangeLog = new GeoLogVol("FSIFlangeSegment", m_FSIFlangeShape, m_materials->getMaterialForVolume(m_materialNameFSIFlange, m_FSIFlangeShape->volume())); m_FSIFlange = new GeoPhysVol(m_FSIFlangeLog); m_FSIFlange->ref(); diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Layer.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Layer.cxx old mode 100755 new mode 100644 index 451ca68a6f01989e7fc82434222c8f2dfa5a2dc7..f30d0a0b3717e779740b4510bf64585b4dee9bf4 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Layer.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Layer.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // @@ -49,8 +49,11 @@ inline double sqr(double x) {return x * x;} SCT_Layer::SCT_Layer(const std::string & name, int iLayer, - const SCT_Module * module) - : SCT_UniqueComponentFactory(name), + SCT_Module * module, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) + : SCT_UniqueComponentFactory(name, detectorManager, geometryManager, materials), m_iLayer(iLayer), m_module(module) { @@ -69,7 +72,7 @@ SCT_Layer::~SCT_Layer() delete m_skiAux; delete m_skiPowerTape; delete m_supportCyl; - if(m_includeFSI) { + if (m_includeFSI) { delete m_endJewel; delete m_scorpion; delete m_fibreMask; @@ -79,8 +82,8 @@ SCT_Layer::~SCT_Layer() void SCT_Layer::getParameters() { - const SCT_BarrelParameters * parameters = geometryManager()->barrelParameters(); - const SCT_GeneralParameters * generalParameters = geometryManager()->generalParameters(); + const SCT_BarrelParameters * parameters = m_geometryManager->barrelParameters(); + const SCT_GeneralParameters * generalParameters = m_geometryManager->generalParameters(); m_safety = generalParameters->safety(); m_radius = parameters->radius(m_iLayer); @@ -95,7 +98,7 @@ SCT_Layer::getParameters() m_cylinderLength = parameters->cylinderLength(); m_includeFSI = parameters->includeFSI(); - if(m_includeFSI) { + if (m_includeFSI) { m_nRepeatEndJewel = parameters->fsiEndJewelNRepeat(m_iLayer); m_phiEndJewel = parameters->fsiEndJewelPhi(m_iLayer); m_zEndJewel = parameters->fsiEndJewelZ(m_iLayer); @@ -105,8 +108,8 @@ SCT_Layer::getParameters() } // Set numerology - detectorManager()->numerology().setNumPhiModulesForLayer(m_iLayer,m_skisPerLayer); - detectorManager()->numerology().setNumEtaModulesForLayer(m_iLayer,parameters->modulesPerSki()); + m_detectorManager->numerology().setNumPhiModulesForLayer(m_iLayer,m_skisPerLayer); + m_detectorManager->numerology().setNumEtaModulesForLayer(m_iLayer,parameters->modulesPerSki()); } @@ -120,30 +123,32 @@ SCT_Layer::preBuild() std::string layerNumStr = intToString(m_iLayer); // Build the Flanges - m_flange = new SCT_Flange("Flange"+layerNumStr, m_iLayer); + m_flange = new SCT_Flange("Flange"+layerNumStr, m_iLayer, m_detectorManager, m_geometryManager, m_materials); // Build the SupportCyl - m_supportCyl = new SCT_SupportCyl("SupportCyl"+layerNumStr, m_iLayer, m_cylinderLength); + m_supportCyl = new SCT_SupportCyl("SupportCyl"+layerNumStr, m_iLayer, m_cylinderLength, + m_detectorManager, m_geometryManager, m_materials); // Build the FSI end jewel, scorpion and fibre mask // Mask runs between scorpions and flange in z - must be built after these - if(m_includeFSI) { - m_endJewel = new SCT_FSIEndJewel("FSIEndJewel"+layerNumStr); - m_scorpion = new SCT_FSIScorpion("FSIScorpion"+layerNumStr); + if (m_includeFSI) { + m_endJewel = new SCT_FSIEndJewel("FSIEndJewel"+layerNumStr, m_detectorManager, m_geometryManager, m_materials); + m_scorpion = new SCT_FSIScorpion("FSIScorpion"+layerNumStr, m_detectorManager, m_geometryManager, m_materials); double length_mask = 0.5*m_cylinderLength - m_flange->length() - m_zScorpion - 0.5*m_scorpion->length(); - m_fibreMask = new SCT_FSIFibreMask("FSIFibreMask"+layerNumStr, m_iLayer, length_mask); + m_fibreMask = new SCT_FSIFibreMask("FSIFibreMask"+layerNumStr, m_iLayer, length_mask, + m_detectorManager, m_geometryManager, m_materials); } else { - m_endJewel = 0; - m_scorpion = 0; - m_fibreMask = 0; + m_endJewel = nullptr; + m_scorpion = nullptr; + m_fibreMask = nullptr; } // // Calculations for making active layer components - called ski. // This is the modules + doglegs + cooling blocks + coolingpipe // - double divisionAngle = 360 * Gaudi::Units::degree / m_skisPerLayer; + double divisionAngle = 360. * Gaudi::Units::degree / m_skisPerLayer; // We define here the first module(id = 0) as the nearest module to phi = 0 with positive phi. // We allow slightly negative in case of rounding errors. @@ -155,7 +160,8 @@ SCT_Layer::preBuild() // Make the ski // The ski length is now reduced to m_activeLength to make room for the cooling inlet/outlet volumes - m_ski = new SCT_Ski("Ski"+layerNumStr, m_module, m_stereoSign, m_tilt, m_activeLength); + m_ski = new SCT_Ski("Ski"+layerNumStr, m_module, m_stereoSign, m_tilt, m_activeLength, + m_detectorManager, m_geometryManager, m_materials); // // Make SkiAux - This is the brackets, harness and power tape. @@ -163,10 +169,12 @@ SCT_Layer::preBuild() // Bracket is placed at edge of division. // -tiltSign * (r*divisionAngle/2 - bracket_width/2) // Works for both +ve and -ve tilt. - m_bracket = new SCT_Bracket("Bracket"+layerNumStr); + m_bracket = new SCT_Bracket("Bracket"+layerNumStr, m_detectorManager, m_geometryManager, m_materials); - m_harness = new SCT_Harness("Harness"+layerNumStr, m_cylinderLength); - m_skiPowerTape = new SCT_SkiPowerTape("SkiPowerTape"+layerNumStr, m_ski, m_cylinderLength); + m_harness = new SCT_Harness("Harness"+layerNumStr, m_cylinderLength, + m_detectorManager, m_geometryManager, m_materials); + m_skiPowerTape = new SCT_SkiPowerTape("SkiPowerTape"+layerNumStr, m_ski, m_cylinderLength, + m_detectorManager, m_geometryManager, m_materials); int tiltSign = (m_tilt < 0) ? -1 : +1; @@ -185,17 +193,22 @@ SCT_Layer::preBuild() m_outerRadiusOfSupport, bracketOffset, powerTapeOffset, - divisionAngle); + divisionAngle, + m_detectorManager, + m_geometryManager, + m_materials); // Build the clamp: we cannot do this until we have the dimensions of SkiAux - m_clamp = new SCT_Clamp("Clamp"+layerNumStr, m_iLayer, m_skiAux->outerRadius()); + m_clamp = new SCT_Clamp("Clamp"+layerNumStr, m_iLayer, m_skiAux->outerRadius(), + m_detectorManager, m_geometryManager, m_materials); // Build the volume representing the cooling inlets, outlet and U-bends. // We cannot do this until we have the dimensions of the clamp double coolingInnerRadius = m_clamp->outerRadius(); double clearance = 1*Gaudi::Units::mm; double coolingLength = 0.5*m_cylinderLength - 0.5*m_activeLength - clearance; - m_coolingEnd = new SCT_CoolingEnd("CoolingEnd"+layerNumStr, m_iLayer, coolingInnerRadius, coolingLength); + m_coolingEnd = new SCT_CoolingEnd("CoolingEnd"+layerNumStr, m_iLayer, coolingInnerRadius, coolingLength, + m_detectorManager, m_geometryManager, m_materials); // // Calculate the envelopes. @@ -235,13 +248,12 @@ SCT_Layer::preBuild() // // Make envelope for layer; length is now same as support cylinder // - SCT_MaterialManager materials; double length = m_cylinderLength; // double length = m_layerLength; // if (m_iLayer == 0) {length = m_cylinderLength + m_safety;} const GeoTube * layerEnvelopeTube = new GeoTube(m_innerRadius, m_outerRadius, 0.5 * length); - GeoLogVol * layerLog = new GeoLogVol(getName(), layerEnvelopeTube, materials.gasMaterial()); + GeoLogVol * layerLog = new GeoLogVol(getName(), layerEnvelopeTube, m_materials->gasMaterial()); // Check for overlap. @@ -253,11 +265,8 @@ SCT_Layer::preBuild() } GeoVPhysVol * -SCT_Layer::build(SCT_Identifier id) const +SCT_Layer::build(SCT_Identifier id) { - - SCT_MaterialManager materials; - // We make this a fullPhysVol for alignment code. GeoFullPhysVol * layer = new GeoFullPhysVol(m_logVolume); @@ -269,7 +278,7 @@ SCT_Layer::build(SCT_Identifier id) const // Make envelope for active layer // const GeoTube * activeLayerEnvelopeShape = new GeoTube(m_innerRadiusActive, m_outerRadiusActive, 0.5 * m_cylinderLength); - GeoLogVol * activeLayerLog = new GeoLogVol(getName()+"Active", activeLayerEnvelopeShape, materials.gasMaterial()); + GeoLogVol * activeLayerLog = new GeoLogVol(getName()+"Active", activeLayerEnvelopeShape, m_materials->gasMaterial()); GeoPhysVol * activeLayer = new GeoPhysVol(activeLayerLog); for (int iSki = 0; iSki < m_skisPerLayer; iSki++){ @@ -311,7 +320,7 @@ SCT_Layer::build(SCT_Identifier id) const // const GeoTube * auxLayerEnvelopeShape = new GeoTube(m_skiAux->innerRadius(), m_skiAux->outerRadius(), 0.5*m_skiAux->length()); - GeoLogVol * auxLayerLog = new GeoLogVol(getName()+"Aux", auxLayerEnvelopeShape, materials.gasMaterial()); + GeoLogVol * auxLayerLog = new GeoLogVol(getName()+"Aux", auxLayerEnvelopeShape, m_materials->gasMaterial()); GeoPhysVol * auxLayer = new GeoPhysVol(auxLayerLog); for (int iSki = 0; iSki < m_skisPerLayer; iSki++){ @@ -331,7 +340,7 @@ SCT_Layer::build(SCT_Identifier id) const // const GeoTube * supportLayerTube = new GeoTube(m_innerRadius, m_outerRadiusOfSupport, 0.5 * m_cylinderLength); GeoLogVol * supportLayerLog = new GeoLogVol(getName()+"Support", supportLayerTube, - materials.gasMaterial()); + m_materials->gasMaterial()); GeoPhysVol * supportLayer = new GeoPhysVol(supportLayerLog); // Position flanges. One at each end. @@ -374,7 +383,7 @@ SCT_Layer::build(SCT_Identifier id) const } // Extra Material - InDetDD::ExtraMaterial xMat(geometryManager()->distortedMatManager()); + InDetDD::ExtraMaterial xMat(m_geometryManager->distortedMatManager()); xMat.add(supportLayer, "SCTLayer"+intToString(m_iLayer)); diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_MaterialManager.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_MaterialManager.cxx old mode 100755 new mode 100644 index b36f72e11de383f19901a7c8d8cd5a6b35985725..101cf3e67c2f4bc2b48301ec930dad0013a1d6ed --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_MaterialManager.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_MaterialManager.cxx @@ -3,7 +3,6 @@ */ #include "SCT_GeoModel/SCT_MaterialManager.h" -#include "InDetGeoModelUtils/InDetMaterialManager.h" #include "GeoModelKernel/GeoMaterial.h" #include "GeoModelKernel/GeoElement.h" #include "SCT_GeoModel/SCT_DataBase.h" @@ -15,46 +14,27 @@ #include <iostream> -InDetMaterialManager * SCT_MaterialManager::s_materialManager = 0; -const GeoMaterial * SCT_MaterialManager::s_gasMaterial = 0; - // Constructor -SCT_MaterialManager::SCT_MaterialManager() +SCT_MaterialManager::SCT_MaterialManager(SCT_DataBase* db) { - // Get my material manager if we haven't already done so. - if (!s_materialManager) { - - ISvcLocator* svcLocator = Gaudi::svcLocator(); // from Bootstrap - StoreGateSvc* detStore; - StatusCode sc = svcLocator->service("DetectorStore", detStore ); - if (sc.isFailure()) { - std::cout << "Could not locate DetectorStore" << std::endl; - return; - } - - const SCT_DataBase * rdb = SCT_DataBase::instance(); - s_materialManager = new InDetMaterialManager("SCT_MaterialManager", rdb->athenaComps()); - s_materialManager->addWeightTable(rdb->weightTable(), "sct"); - s_materialManager->addScalingTable(rdb->scalingTable()); - - loadMaterials(); + // Get my material manager. + ISvcLocator* svcLocator = Gaudi::svcLocator(); // from Bootstrap + StoreGateSvc* detStore; + StatusCode sc = svcLocator->service("DetectorStore", detStore ); + if (sc.isFailure()) { + std::cout << "Could not locate DetectorStore" << std::endl; + return; } - if (!s_gasMaterial) { - s_gasMaterial = s_materialManager->getMaterial("std::Air"); - } + m_materialManager = std::make_unique<InDetMaterialManager>("SCT_MaterialManager", db->athenaComps()); + m_materialManager->addWeightTable(db->weightTable(), "sct"); + m_materialManager->addScalingTable(db->scalingTable()); -} + loadMaterials(); -void -SCT_MaterialManager::reinit() -{ - s_gasMaterial = 0; - delete s_materialManager; - s_materialManager = 0; + m_gasMaterial = m_materialManager->getMaterial("std::Air"); } - // Add materials not yet in the database void SCT_MaterialManager::loadMaterials() @@ -64,19 +44,19 @@ SCT_MaterialManager::loadMaterials() const GeoElement* SCT_MaterialManager::getElement(const std::string & elementName) const { - return s_materialManager->getElement(elementName); + return m_materialManager->getElement(elementName); } const GeoMaterial* SCT_MaterialManager::getMaterial(const std::string & materialName) const { - return s_materialManager->getMaterial(materialName); + return m_materialManager->getMaterial(materialName); } void SCT_MaterialManager::addMaterial(GeoMaterial* material) { - return s_materialManager->addMaterial(material); + return m_materialManager->addMaterial(material); } const GeoMaterial* @@ -85,13 +65,13 @@ SCT_MaterialManager::getMaterial(const std::string & originalMaterial, const std::string & newName) { - return s_materialManager->getMaterial(originalMaterial, density, newName); + return m_materialManager->getMaterial(originalMaterial, density, newName); } const GeoMaterial * SCT_MaterialManager::getMaterialForVolume(const std::string & materialName, double volume) { - return s_materialManager->getMaterialForVolume(materialName, volume); + return m_materialManager->getMaterialForVolume(materialName, volume); } @@ -99,21 +79,5 @@ SCT_MaterialManager::getMaterialForVolume(const std::string & materialName, doub const GeoMaterial* SCT_MaterialManager::gasMaterial() const { - return s_gasMaterial; + return m_gasMaterial; } - - -void -SCT_MaterialManager::setGasMaterial(const GeoMaterial* material) -{ - s_gasMaterial = material; -} - -void -SCT_MaterialManager::setGasMaterial(const std::string & materialName) -{ - // Make sure an instance is created in order to initialize the manager - SCT_MaterialManager manager; - s_gasMaterial = manager.getMaterial(materialName); -} - diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Module.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Module.cxx old mode 100755 new mode 100644 index f48ab25d870ed3d8b07f508bee64d91c4fda58ee..22a44d2e87e0a0ace1fb9ae1649be53fcb65d9ba --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Module.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Module.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_GeoModel/SCT_Module.h" @@ -39,8 +39,11 @@ #include <cmath> -SCT_Module::SCT_Module(const std::string & name) - : SCT_UniqueComponentFactory(name), +SCT_Module::SCT_Module(const std::string & name, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) +: SCT_UniqueComponentFactory(name, detectorManager, geometryManager, materials), m_innerSide(0), m_outerSide(0), m_baseBoard(0) @@ -58,7 +61,6 @@ SCT_Module::~SCT_Module() delete m_innerSidePos; delete m_outerSidePos; - //delete m_sensor; // 14:00 Thu 14th Jul 2005 D.Naito removed. delete m_innerSide; delete m_outerSide; delete m_baseBoard; @@ -71,10 +73,8 @@ SCT_Module::~SCT_Module() void SCT_Module::getParameters() { - const SCT_BarrelModuleParameters * parameters = geometryManager()->barrelModuleParameters(); - const SCT_GeneralParameters * generalParameters = geometryManager()->generalParameters(); - - //const SCT_OuterSide OuterSide("OuterSide"); // 14:00 Thu 14th Jul 2005 D.Naito removed. + const SCT_BarrelModuleParameters * parameters = m_geometryManager->barrelModuleParameters(); + const SCT_GeneralParameters * generalParameters = m_geometryManager->generalParameters(); m_safety = generalParameters->safety(); @@ -86,9 +86,6 @@ SCT_Module::getParameters() m_stereoInner = -0.5*sign*m_stereoAngle; m_stereoOuter = 0.5*sign*m_stereoAngle; - // 1st Feb 2005 D.Naito modified. - //m_hybridAndBaseBoardOffsetDirection = (m_stereoSign == 0) ? -1 : +1; - m_baseBoardOffsetY = parameters->baseBoardOffsetY(); m_baseBoardOffsetZ = parameters->baseBoardOffsetZ(); } @@ -97,13 +94,10 @@ SCT_Module::getParameters() const GeoLogVol * SCT_Module::preBuild() { - SCT_MaterialManager materials; - // Create child components - m_outerSide = new SCT_OuterSide("OuterSide"); - m_baseBoard = new SCT_BaseBoard("BaseBoard"); - m_innerSide = new SCT_InnerSide("InnerSide"); - //m_sensor = new SCT_Sensor("BRLSensor"); // 14:00 Thu 14th Jul 2005 D.Naito removed. + m_outerSide = new SCT_OuterSide("OuterSide", m_detectorManager, m_geometryManager, m_materials); + m_baseBoard = new SCT_BaseBoard("BaseBoard", m_detectorManager, m_geometryManager, m_materials); + m_innerSide = new SCT_InnerSide("InnerSide", m_detectorManager, m_geometryManager, m_materials); // // We have 2 envelopes. @@ -307,7 +301,7 @@ SCT_Module::preBuild() add(*envelope2 << GeoTrf::Translate3D(xCenterEnv2, yCenterEnv2, zCenterEnv2)). subtract(*subBox << GeoTrf::Translate3D(xCenterSubBox, yCenterSubBox, zCenterSubBox)); - const GeoLogVol * moduleLog = new GeoLogVol(getName(), &moduleEnvelope, materials.gasMaterial()); + const GeoLogVol * moduleLog = new GeoLogVol(getName(), &moduleEnvelope, m_materials->gasMaterial()); // // inner side @@ -335,7 +329,7 @@ SCT_Module::preBuild() GeoVPhysVol * -SCT_Module::build(SCT_Identifier id) const +SCT_Module::build(SCT_Identifier id) { GeoFullPhysVol * module = new GeoFullPhysVol(m_logVolume); @@ -362,7 +356,7 @@ SCT_Module::build(SCT_Identifier id) const GeoVPhysVol * innerSide = m_innerSide->build(id); module->add(innerSide); // Store alignable transform - detectorManager()->addAlignableTransform(0, innerId, innerTransform, innerSide); + m_detectorManager->addAlignableTransform(0, innerId, innerTransform, innerSide); // Add outerside GeoAlignableTransform * outerTransform = new GeoAlignableTransform(*m_outerSidePos); @@ -375,7 +369,7 @@ SCT_Module::build(SCT_Identifier id) const GeoVPhysVol * outerSide = m_outerSide->build(id); module->add(outerSide); // Store alignable transform - detectorManager()->addAlignableTransform(0, outerId, outerTransform, outerSide); + m_detectorManager->addAlignableTransform(0, outerId, outerTransform, outerSide); return module; } diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_OuterSide.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_OuterSide.cxx old mode 100755 new mode 100644 index 1a4ee321aeba14e8c90aa2d1910caea0616248d3..a2362fda251f39d5e003be8aff9fb2be7956b4f7 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_OuterSide.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_OuterSide.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_GeoModel/SCT_OuterSide.h" @@ -32,8 +32,11 @@ #include <cmath> -SCT_OuterSide::SCT_OuterSide(const std::string & name) - : SCT_UniqueComponentFactory(name), +SCT_OuterSide::SCT_OuterSide(const std::string & name, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) + : SCT_UniqueComponentFactory(name, detectorManager, geometryManager, materials), m_hybrid(0), m_pigtail(0), m_sensor(0) @@ -59,8 +62,8 @@ SCT_OuterSide::~SCT_OuterSide() void SCT_OuterSide::getParameters() { - const SCT_GeneralParameters * generalParameters = geometryManager()->generalParameters(); - const SCT_BarrelModuleParameters * parameters = geometryManager()->barrelModuleParameters(); + const SCT_GeneralParameters * generalParameters = m_geometryManager->generalParameters(); + const SCT_BarrelModuleParameters * parameters = m_geometryManager->barrelModuleParameters(); m_safety = generalParameters->safety(); m_hybridOffsetZ = parameters->hybridOffsetZ(); @@ -71,12 +74,10 @@ SCT_OuterSide::getParameters() const GeoLogVol * SCT_OuterSide::preBuild() { - SCT_MaterialManager materials; - // Create child components - m_sensor = new SCT_Sensor("BRLSensor"); - m_hybrid = new SCT_Hybrid("Hybrid"); - m_pigtail = new SCT_Pigtail("Pigtail"); + m_sensor = new SCT_Sensor("BRLSensor", m_detectorManager, m_geometryManager, m_materials); + m_hybrid = new SCT_Hybrid("Hybrid", m_detectorManager, m_geometryManager, m_materials); + m_pigtail = new SCT_Pigtail("Pigtail", m_detectorManager, m_geometryManager, m_materials); // // Define constants for convenience. @@ -170,7 +171,7 @@ SCT_OuterSide::preBuild() const GeoLogVol * OuterSideEnvelopeLog = new GeoLogVol("OuterSideEnvelope", &OuterSideEnvelopeShape, - materials.gasMaterial()); + m_materials->gasMaterial()); // 28th Mar S.Mima modified. // *** 16:30 Wed 15th Jun 2005 D.Naito modified. (03)********************************* @@ -186,7 +187,7 @@ SCT_OuterSide::preBuild() GeoVPhysVol * -SCT_OuterSide::build(SCT_Identifier id) const +SCT_OuterSide::build(SCT_Identifier id) { GeoFullPhysVol * outerSide = new GeoFullPhysVol(m_logVolume); diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Pigtail.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Pigtail.cxx old mode 100755 new mode 100644 index 11ae5d4618b0ca5ca6ec10a5cdfb2ecffea6c858..74db2bdcec5bcd36578465651a6b03093b2b6acf --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Pigtail.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Pigtail.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_GeoModel/SCT_Pigtail.h" @@ -15,8 +15,11 @@ #include "GeoModelKernel/GeoMaterial.h" #include "GeoModelKernel/Units.h" -SCT_Pigtail::SCT_Pigtail(const std::string & name) - : SCT_SharedComponentFactory(name) +SCT_Pigtail::SCT_Pigtail(const std::string & name, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) + : SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials) { getParameters(); m_physVolume = build(); @@ -25,10 +28,8 @@ SCT_Pigtail::SCT_Pigtail(const std::string & name) void SCT_Pigtail::getParameters() { - const SCT_BarrelModuleParameters * parameters = geometryManager()->barrelModuleParameters(); - SCT_MaterialManager materials; - - m_material = materials.getMaterial(parameters->pigtailMaterial()); + const SCT_BarrelModuleParameters * parameters = m_geometryManager->barrelModuleParameters(); + m_material = m_materials->getMaterial(parameters->pigtailMaterial()); m_thickness = parameters->pigtailThickness(); m_length = parameters->pigtailLength(); m_width = parameters->pigtailWidth(); diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_PixelAttachment.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_PixelAttachment.cxx old mode 100755 new mode 100644 index 3d3a11f4aba4a6ca84b395625c2755098b27cede..e8fb7d4e7e3381092d1c64821faa5ee58eb3262c --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_PixelAttachment.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_PixelAttachment.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_GeoModel/SCT_PixelAttachment.h" @@ -17,8 +17,11 @@ // This is the SCT to Pixel attachment. This was originally defined in the // general indet services but it is in the SCT mother volume. -SCT_PixelAttachment::SCT_PixelAttachment(const std::string & name) - : SCT_SharedComponentFactory(name) +SCT_PixelAttachment::SCT_PixelAttachment(const std::string & name, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) + : SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials) { getParameters(); m_physVolume = build(); @@ -28,10 +31,8 @@ SCT_PixelAttachment::SCT_PixelAttachment(const std::string & name) void SCT_PixelAttachment::getParameters() { - const SCT_BarrelParameters * parameters = geometryManager()->barrelParameters(); - SCT_MaterialManager materials; - - m_material = materials.getMaterial(parameters->pixelAttachmentMaterial()); + const SCT_BarrelParameters * parameters = m_geometryManager->barrelParameters(); + m_material = m_materials->getMaterial(parameters->pixelAttachmentMaterial()); m_length = parameters->pixelAttachmentDeltaZ(); m_innerRadius = parameters->pixelAttachmentInnerRadius(); m_outerRadius = parameters->pixelAttachmentOuterRadius(); diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_PowerTape.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_PowerTape.cxx old mode 100755 new mode 100644 index 2449ed9c07c25ed709ab44912f415fa8a96ca3b8..41a3bce1552ad695308d2b7a3ca66077663cb01d --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_PowerTape.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_PowerTape.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_GeoModel/SCT_PowerTape.h" @@ -15,8 +15,12 @@ #include "GeoModelKernel/GeoMaterial.h" #include "GeoModelKernel/Units.h" -SCT_PowerTape::SCT_PowerTape(const std::string & name, double length) - : SCT_SharedComponentFactory(name), m_length(length) +SCT_PowerTape::SCT_PowerTape(const std::string & name, double length, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) + : SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials), + m_length(length) { getParameters(); m_physVolume = build(); @@ -26,12 +30,8 @@ SCT_PowerTape::SCT_PowerTape(const std::string & name, double length) void SCT_PowerTape::getParameters() { - const SCT_BarrelParameters * parameters = geometryManager()->barrelParameters(); - SCT_MaterialManager materials; - - // 30th Aug 2005 S.Mima modified. - // m_material = materials.powerTapeMaterial(); - m_material = materials.getMaterial(parameters->powerTapeMaterial()); + const SCT_BarrelParameters * parameters = m_geometryManager->barrelParameters(); + m_material = m_materials->getMaterial(parameters->powerTapeMaterial()); m_thickness = parameters->powerTapeThickness(); m_width = parameters->powerTapeWidth(); } diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Sensor.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Sensor.cxx old mode 100755 new mode 100644 index 4a3b15f269e5585be9b93066739a8134f1e1d1ec..b5ae55a5f8418345bebb31f764fcfc0d4b72a68e --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Sensor.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Sensor.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_GeoModel/SCT_Sensor.h" @@ -24,8 +24,12 @@ using namespace InDetDD; -SCT_Sensor::SCT_Sensor(const std::string & name) - : SCT_UniqueComponentFactory(name) +SCT_Sensor::SCT_Sensor(const std::string & name, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) + : SCT_UniqueComponentFactory(name, detectorManager, geometryManager, materials), + m_noElementWarning{true} { getParameters(); m_logVolume = preBuild(); @@ -36,10 +40,8 @@ void SCT_Sensor::getParameters() { - const SCT_BarrelModuleParameters * parameters = geometryManager()->barrelModuleParameters(); - SCT_MaterialManager materials; - - m_material = materials.getMaterial(parameters->sensorMaterial()); + const SCT_BarrelModuleParameters * parameters = m_geometryManager->barrelModuleParameters(); + m_material = m_materials->getMaterial(parameters->sensorMaterial()); m_thickness = parameters->sensorThickness(); m_length = 0; if (parameters->sensorNumWafers() == 2) { @@ -62,7 +64,7 @@ SCT_Sensor::preBuild() // Make the moduleside design for this sensor makeDesign(); - detectorManager()->addDesign(m_design); + m_detectorManager->addDesign(m_design); return sensorLog; } @@ -74,8 +76,8 @@ SCT_Sensor::makeDesign() //SiDetectorDesign::Axis etaAxis = SiDetectorDesign::zAxis; //SiDetectorDesign::Axis phiAxis = SiDetectorDesign::yAxis; //SiDetectorDesign::Axis depthAxis = SiDetectorDesign::xAxis; - - const SCT_BarrelModuleParameters * parameters = geometryManager()->barrelModuleParameters(); + + const SCT_BarrelModuleParameters * parameters = m_geometryManager->barrelModuleParameters(); double stripPitch = parameters->sensorStripPitch(); double stripLength = parameters->sensorStripLength(); @@ -131,7 +133,7 @@ SCT_Sensor::makeDesign() GeoVPhysVol * -SCT_Sensor::build(SCT_Identifier id) const +SCT_Sensor::build(SCT_Identifier id) { GeoFullPhysVol * sensor = new GeoFullPhysVol(m_logVolume); @@ -140,7 +142,7 @@ SCT_Sensor::build(SCT_Identifier id) const //id.print(); // for debugging only - SiCommonItems* commonItems = geometryManager()->commonItems(); + const SiCommonItems* commonItems = m_geometryManager->commonItems(); if (commonItems->getIdHelper()) { @@ -152,14 +154,12 @@ SCT_Sensor::build(SCT_Identifier id) const commonItems); // Add the detector element. - detectorManager()->addDetectorElement(detElement); + m_detectorManager->addDetectorElement(detElement); } else { - - static bool noElementWarning = true; // So we don't get the message thousands of times. - if (noElementWarning) { + if (m_noElementWarning) { std::cout << "WARNING!!!!: No SCT id helper and so no elements being produced." << std::endl; - noElementWarning = false; + m_noElementWarning = false; } } return sensor; diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Ski.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Ski.cxx old mode 100755 new mode 100644 index bb7405a950f32a2e2742abbdcf79b4b5e43fa499..befcaff00241d42e38c98107e76ebbc56042b0c1 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Ski.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Ski.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_GeoModel/SCT_Ski.h" @@ -35,11 +35,14 @@ #include <cmath> SCT_Ski::SCT_Ski(const std::string & name, - const SCT_Module * module, + SCT_Module * module, int stereoSign, double tilt, - double length) - : SCT_UniqueComponentFactory(name), + double length, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) + : SCT_UniqueComponentFactory(name, detectorManager, geometryManager, materials), m_stereoSign(stereoSign), m_tilt(tilt), m_length(length), @@ -66,8 +69,8 @@ void SCT_Ski::getParameters() { - const SCT_BarrelParameters * parameters = geometryManager()->barrelParameters(); - const SCT_GeneralParameters * generalParameters = geometryManager()->generalParameters(); + const SCT_BarrelParameters * parameters = m_geometryManager->barrelParameters(); + const SCT_GeneralParameters * generalParameters = m_geometryManager->generalParameters(); m_safety = generalParameters->safety(); @@ -107,13 +110,11 @@ SCT_Ski::preBuild() // Make components. - // 15th Aug 2005 S.Mima modified. - // m_dogleg = new SCT_Dogleg(getName()+"Dogleg"); - m_dogleg = new SCT_Dogleg(getName()+"Dogleg"); - // 15th Aug 2005 S.Mima modified. - // m_coolingBlock = new SCT_CoolingBlock(getName()+"CoolingBlock"); - m_coolingBlock = new SCT_CoolingBlock(getName()+"CoolingBlock"); - m_coolingPipe = new SCT_CoolingPipe(getName()+"CoolingPipe",m_length); + m_dogleg = new SCT_Dogleg(getName()+"Dogleg", m_detectorManager, m_geometryManager, m_materials); + m_coolingBlock = new SCT_CoolingBlock(getName()+"CoolingBlock", + m_detectorManager, m_geometryManager, m_materials); + m_coolingPipe = new SCT_CoolingPipe(getName()+"CoolingPipe", m_length, + m_detectorManager, m_geometryManager, m_materials); // We need the sign of the tilt in numerous places int tiltSign = (m_tilt < 0) ? -1 : +1; @@ -432,9 +433,7 @@ SCT_Ski::preBuild() add(*envelope2 << GeoTrf::Translate3D(xShift2, yShift2, 0)); skiEnvelopeShape = &tmpShape; - - SCT_MaterialManager materials; - GeoLogVol * skiLog = new GeoLogVol(getName(), skiEnvelopeShape, materials.gasMaterial()); + GeoLogVol * skiLog = new GeoLogVol(getName(), skiEnvelopeShape, m_materials->gasMaterial()); //GeoPhysVol * ski = new GeoPhysVol(skiLog); @@ -467,7 +466,7 @@ SCT_Ski::preBuild() GeoVPhysVol * -SCT_Ski::build(SCT_Identifier id) const +SCT_Ski::build(SCT_Identifier id) { GeoPhysVol * ski = new GeoPhysVol(m_logVolume); @@ -485,7 +484,7 @@ SCT_Ski::build(SCT_Identifier id) const ski->add(modulePV); // Store alignable transform - detectorManager()->addAlignableTransform(1, id.getWaferId(), moduleTransform, modulePV); + m_detectorManager->addAlignableTransform(1, id.getWaferId(), moduleTransform, modulePV); // Add dogleg ski->add(m_refPointTransform); diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_SkiAux.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_SkiAux.cxx old mode 100755 new mode 100644 index 3c3d51e8e56c9e44ed7d03c1a5a033830c420a33..1c3d5213f88c5dc4a867ec30ad6e0965fc32458e --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_SkiAux.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_SkiAux.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // @@ -38,17 +38,18 @@ calcMinMaxRatioS(double xCenter, double yCenter, double & minRatio, double & maxRatio); SCT_SkiAux::SCT_SkiAux(const std::string & name, - const SCT_Ski * ski, - // 14th Aug 2005 S.Mima modified. - //const SCT_Bracket * bracket, - const SCT_Bracket * bracket, - const SCT_Harness * harness, - const SCT_SkiPowerTape * skiPowerTape, + SCT_Ski * ski, + SCT_Bracket * bracket, + SCT_Harness * harness, + SCT_SkiPowerTape * skiPowerTape, double innerRadius, double bracketPhiOffset, double powerTapePhiOffset, - double divisionAngle) : - SCT_SharedComponentFactory(name), + double divisionAngle, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) : + SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials), m_innerRadius(innerRadius), m_bracketPhiOffset(bracketPhiOffset), m_powerTapePhiOffset(powerTapePhiOffset), @@ -169,12 +170,10 @@ SCT_SkiAux::build() // Length is same as power tape length m_length = m_skiPowerTape->length(); - - SCT_MaterialManager materials; const GeoTubs * skiAuxShape = new GeoTubs(m_innerRadius, m_outerRadius, 0.5*m_length, m_sectorStartAngle, m_sectorAngle); const GeoLogVol *skiAuxLog = - new GeoLogVol(getName(), skiAuxShape, materials.gasMaterial()); + new GeoLogVol(getName(), skiAuxShape, m_materials->gasMaterial()); GeoPhysVol * skiAux = new GeoPhysVol(skiAuxLog); // std::cout << "SCT_SkiAux: m_sectorStartAngle = " << m_sectorStartAngle // << ", m_sectorAngle = " << m_sectorAngle << std::endl; diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_SkiPowerTape.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_SkiPowerTape.cxx old mode 100755 new mode 100644 index b28581610c0c471509cd2225b8835e9c4cc07699..a80601666bf24b1a988666369c6b332e49f52b01 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_SkiPowerTape.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_SkiPowerTape.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // @@ -33,8 +33,12 @@ SCT_SkiPowerTape::SCT_SkiPowerTape(const std::string & name, const SCT_Ski * ski, - double length) : - SCT_SharedComponentFactory(name), m_length(length), m_ski(ski) + double length, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) : + SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials), + m_length(length), m_ski(ski) { getParameters(); m_physVolume = build(); @@ -43,8 +47,8 @@ SCT_SkiPowerTape::SCT_SkiPowerTape(const std::string & name, void SCT_SkiPowerTape::getParameters() { - const SCT_BarrelParameters * parameters = geometryManager()->barrelParameters(); - + const SCT_BarrelParameters * parameters = m_geometryManager->barrelParameters(); + // Width is the same as the width of a single powertape. m_powerTapeThickness = parameters->powerTapeThickness(); m_width = parameters->powerTapeWidth(); @@ -70,10 +74,9 @@ SCT_SkiPowerTape::build() // This is a volume containing all the power tapes. - SCT_MaterialManager materials; const GeoBox * skiPowerTapeShape = new GeoBox(0.5*m_thickness, 0.5*m_width, 0.5*m_length); const GeoLogVol *skiPowerTapeLog = - new GeoLogVol(getName(), skiPowerTapeShape, materials.gasMaterial()); + new GeoLogVol(getName(), skiPowerTapeShape, m_materials->gasMaterial()); GeoPhysVol * skiPowerTape = new GeoPhysVol(skiPowerTapeLog); // Loop over modules in ski as we need their z positions. @@ -141,9 +144,8 @@ SCT_SkiPowerTape::build() // Label tape with M# at end of string //std::ostringstream label; label << "PowerTapeM" << iModule + 1; - //SCT_PowerTape powerTape(label.str(), tapeLength); - //SCT_PowerTape powerTape(getName()+"PowerTapeM"+intToString(iModule + 1), tapeLength); - SCT_PowerTape powerTape(getName()+"PowerTapeM"+intToString(iModule + 1), tapeLength); + SCT_PowerTape powerTape(getName()+"PowerTapeM"+intToString(iModule + 1), tapeLength, + m_detectorManager, m_geometryManager, m_materials); // Calculate x position of tape. This will depend on the module number. // The reference point is the middle of the stack. diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Spider.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Spider.cxx old mode 100755 new mode 100644 index fc375224b9d69127e7f360237a781f3d254b47ca..9036d97e23f4e3ef17aaa5a741f4cf09e5c13125 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Spider.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Spider.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_GeoModel/SCT_Spider.h" @@ -15,8 +15,11 @@ #include "GeoModelKernel/Units.h" -SCT_Spider::SCT_Spider(const std::string & name) - : SCT_SharedComponentFactory(name) +SCT_Spider::SCT_Spider(const std::string & name, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) + : SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials) { getParameters(); m_physVolume = build(); @@ -26,7 +29,7 @@ SCT_Spider::SCT_Spider(const std::string & name) void SCT_Spider::getParameters() { - const SCT_BarrelParameters * parameters = geometryManager()->barrelParameters(); + const SCT_BarrelParameters * parameters = m_geometryManager->barrelParameters(); m_materialName = parameters->spiderMaterial(); m_length = parameters->spiderDeltaZ(); @@ -38,11 +41,9 @@ GeoVPhysVol * SCT_Spider::build() { // Make the spider. A simple tube. - SCT_MaterialManager materials; - const GeoTube * spiderShape = new GeoTube(m_innerRadius, m_outerRadius, 0.5 * m_length); - m_material = materials.getMaterialForVolume(m_materialName, spiderShape->volume()); - if(!m_material) {m_material = materials.getMaterial(m_materialName);} + m_material = m_materials->getMaterialForVolume(m_materialName, spiderShape->volume()); + if (!m_material) m_material = m_materials->getMaterial(m_materialName); const GeoLogVol * spiderLog = new GeoLogVol(getName(), spiderShape, m_material); GeoPhysVol * spider = new GeoPhysVol(spiderLog); diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_SupportCyl.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_SupportCyl.cxx old mode 100755 new mode 100644 index a9a81399933d6348d8c07ccf6fe2970f952f50ea..fd26d5b3d23ad5116480b706de96c7ed399d37c9 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_SupportCyl.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_SupportCyl.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_GeoModel/SCT_SupportCyl.h" @@ -15,8 +15,12 @@ #include "GeoModelKernel/Units.h" -SCT_SupportCyl::SCT_SupportCyl(const std::string & name, int iLayer, double length) - : SCT_SharedComponentFactory(name), m_iLayer(iLayer), m_length(length) +SCT_SupportCyl::SCT_SupportCyl(const std::string & name, int iLayer, double length, + InDetDD::SCT_DetectorManager* detectorManager, + const SCT_GeometryManager* geometryManager, + SCT_MaterialManager* materials) + : SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials), + m_iLayer(iLayer), m_length(length) { getParameters(); m_physVolume = build(); @@ -26,7 +30,7 @@ SCT_SupportCyl::SCT_SupportCyl(const std::string & name, int iLayer, double leng void SCT_SupportCyl::getParameters() { - const SCT_BarrelParameters * parameters = geometryManager()->barrelParameters(); + const SCT_BarrelParameters * parameters = m_geometryManager->barrelParameters(); m_materialName = parameters->supportCylMaterial(m_iLayer); m_innerRadius = parameters->supportCylInnerRadius(m_iLayer); @@ -38,16 +42,12 @@ GeoVPhysVol * SCT_SupportCyl::build() { // Make the support cyliner. A simple tube. - SCT_MaterialManager materials; - const GeoTube * supportCylShape = new GeoTube(m_innerRadius, m_outerRadius, 0.5 * m_length); - m_material = materials.getMaterialForVolume(m_materialName, supportCylShape->volume()); - if(!m_material) {m_material = materials.getMaterial(m_materialName);} + m_material = m_materials->getMaterialForVolume(m_materialName, supportCylShape->volume()); + if (!m_material) m_material = m_materials->getMaterial(m_materialName); const GeoLogVol * supportCylLog = new GeoLogVol(getName(), supportCylShape, m_material); GeoPhysVol * supportCyl = new GeoPhysVol(supportCylLog); return supportCyl; } - - diff --git a/InnerDetector/InDetDetDescr/SCT_ModuleDistortions/SCT_ModuleDistortions/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetDetDescr/SCT_ModuleDistortions/SCT_ModuleDistortions/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..a4e4664de00e10df221005dfc35b24cf8f2589c0 --- /dev/null +++ b/InnerDetector/InDetDetDescr/SCT_ModuleDistortions/SCT_ModuleDistortions/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +InnerDetector/InDetDetDescr/SCT_ModuleDistortions diff --git a/InnerDetector/InDetDigitization/FastSiDigitization/CMakeLists.txt b/InnerDetector/InDetDigitization/FastSiDigitization/CMakeLists.txt index f7726b75231fe197679e9d65b8db603bb2a558bc..47f99e0ea6a4a754db70cf79b0decc63966cc84f 100644 --- a/InnerDetector/InDetDigitization/FastSiDigitization/CMakeLists.txt +++ b/InnerDetector/InDetDigitization/FastSiDigitization/CMakeLists.txt @@ -52,7 +52,7 @@ atlas_add_component( FastSiDigitization src/*.cxx src/components/*.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} ${HEPMC_LIBRARIES} AthenaBaseComps AthenaKernel PileUpToolsLib EventPrimitives xAODEventInfo GaudiKernel SiPropertiesSvcLib InDetReadoutGeometry InDetSimData InDetPrepRawData SiClusterizationToolLib InDetSimEvent HitManagement ISF_FatrasDetDescrModel ISF_FatrasEvent TrkTruthData TrkEventTPCnv CxxUtils StoreGateLib SGtests Identifier GeneratorObjects InDetIdentifier TrkDetDescrInterfaces TrkDigEvent TrkGeometry TrkSurfaces TrkExUtils ) + LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} ${HEPMC_LIBRARIES} AthenaBaseComps AthenaKernel PileUpToolsLib EventPrimitives xAODEventInfo GaudiKernel InDetReadoutGeometry InDetSimData InDetPrepRawData SiClusterizationToolLib InDetSimEvent HitManagement ISF_FatrasDetDescrModel ISF_FatrasEvent TrkTruthData TrkEventTPCnv CxxUtils StoreGateLib SGtests Identifier GeneratorObjects InDetIdentifier TrkDetDescrInterfaces TrkDigEvent TrkGeometry TrkSurfaces TrkExUtils ) # Install files from the package: atlas_install_headers( FastSiDigitization ) diff --git a/InnerDetector/InDetDigitization/FastSiDigitization/python/FastSiDigitizationConfig.py b/InnerDetector/InDetDigitization/FastSiDigitization/python/FastSiDigitizationConfig.py index daab02627aff9639f3234485401ef5264766d08a..216d0071c5757764c57c56ced89ad70231cb36e7 100644 --- a/InnerDetector/InDetDigitization/FastSiDigitization/python/FastSiDigitizationConfig.py +++ b/InnerDetector/InDetDigitization/FastSiDigitization/python/FastSiDigitizationConfig.py @@ -83,7 +83,7 @@ def commonPixelFastDigitizationConfig(name,**kwargs): # SiLorentzAngleTool for PixelFastDigitizationTool from AthenaCommon.AppMgr import ToolSvc if not hasattr(ToolSvc, "PixelLorentzAngleTool"): - from SiLorentzAngleSvc.PixelLorentzAngleToolSetup import PixelLorentzAngleToolSetup + from SiLorentzAngleTool.PixelLorentzAngleToolSetup import PixelLorentzAngleToolSetup pixelLorentzAngleToolSetup = PixelLorentzAngleToolSetup() kwargs.setdefault("LorentzAngleTool", ToolSvc.PixelLorentzAngleTool) @@ -118,14 +118,14 @@ def commonSCT_FastDigitizationConfig(name,**kwargs): sct_SiliconConditionsToolSetup.setDcsTool(sct_DCSConditionsToolSetup.getTool()) sct_SiliconConditionsToolSetup.setup() # Set up SCT_SiPropertiesTool - from SiPropertiesSvc.SCT_SiPropertiesToolSetup import SCT_SiPropertiesToolSetup + from SiPropertiesTool.SCT_SiPropertiesToolSetup import SCT_SiPropertiesToolSetup sct_SiPropertiesToolSetup = SCT_SiPropertiesToolSetup() sct_SiPropertiesToolSetup.setSiliconTool(sct_SiliconConditionsToolSetup.getTool()) sct_SiPropertiesToolSetup.setup() # SiLorentzAngleTool for SCT_FastDigitizationTool from AthenaCommon.AppMgr import ToolSvc - from SiLorentzAngleSvc.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup + from SiLorentzAngleTool.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup sctLorentzAngleToolSetup = SCTLorentzAngleToolSetup() kwargs.setdefault("LorentzAngleTool", sctLorentzAngleToolSetup.SCTLorentzAngleTool) diff --git a/InnerDetector/InDetDigitization/FastSiDigitization/share/SiSmearing_jobOptions.py b/InnerDetector/InDetDigitization/FastSiDigitization/share/SiSmearing_jobOptions.py index 3cfc1ad423c99c76f7d1ae6acf169e6d146bfc3f..39583822514c908ffa9c69aa6ac7b9ed862541fe 100644 --- a/InnerDetector/InDetDigitization/FastSiDigitization/share/SiSmearing_jobOptions.py +++ b/InnerDetector/InDetDigitization/FastSiDigitization/share/SiSmearing_jobOptions.py @@ -36,7 +36,7 @@ from AthenaCommon.BeamFlags import jobproperties # sct_SiliconConditionsToolSetup.setup() # # Silicon properties tool -# from SiPropertiesSvc.SCT_SiPropertiesToolSetup import SCT_SiPropertiesToolSetup +# from SiPropertiesTool.SCT_SiPropertiesToolSetup import SCT_SiPropertiesToolSetup # sct_SiPropertiesToolSetup = SCT_SiPropertiesToolSetup() # sct_SiPropertiesToolSetup.setSiliconTool(sct_SiliconConditionsToolSetup.getTool()) # sct_SiPropertiesToolSetup.setup() diff --git a/InnerDetector/InDetDigitization/PixelDigitization/CMakeLists.txt b/InnerDetector/InDetDigitization/PixelDigitization/CMakeLists.txt index 596d1a444977adb5f98d9a28e3e6f338cfc6fea2..0e5c9d2ed6df1d13495088e4e9e8d40a71b56113 100644 --- a/InnerDetector/InDetDigitization/PixelDigitization/CMakeLists.txt +++ b/InnerDetector/InDetDigitization/PixelDigitization/CMakeLists.txt @@ -22,7 +22,7 @@ atlas_depends_on_subdirs( PUBLIC InnerDetector/InDetConditions/PixelConditionsServices InnerDetector/InDetConditions/PixelConditionsTools InnerDetector/InDetConditions/PixelConditionsData - InnerDetector/InDetConditions/SiPropertiesSvc + InnerDetector/InDetConditions/SiPropertiesTool InnerDetector/InDetDetDescr/InDetIdentifier InnerDetector/InDetDetDescr/InDetReadoutGeometry InnerDetector/InDetDigitization/SiDigitization @@ -42,7 +42,7 @@ atlas_add_component( PixelDigitization src/*.cxx src/components/*.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} ${HEPMC_LIBRARIES} AthenaBaseComps GaudiKernel CommissionEvent AthenaKernel PileUpToolsLib StoreGateLib SGtests Identifier xAODEventInfo GeneratorObjects PixelConditionsData SiPropertiesSvcLib InDetIdentifier InDetReadoutGeometry SiDigitization InDetRawData InDetSimData InDetSimEvent HitManagement PathResolver ) + LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} ${HEPMC_LIBRARIES} AthenaBaseComps GaudiKernel CommissionEvent AthenaKernel PileUpToolsLib StoreGateLib SGtests Identifier xAODEventInfo GeneratorObjects PixelConditionsData SiPropertiesToolLib InDetIdentifier InDetReadoutGeometry SiDigitization InDetRawData InDetSimData InDetSimEvent HitManagement PathResolver ) # Install files from the package: atlas_install_headers( PixelDigitization ) diff --git a/InnerDetector/InDetDigitization/PixelDigitization/python/PixelDigitizationConfig.py b/InnerDetector/InDetDigitization/PixelDigitization/python/PixelDigitizationConfig.py index 76f996b721c1581818cf64997b219b897b562537..971dd4962dc84303a802dcbf1f59e0d8ef401c10 100644 --- a/InnerDetector/InDetDigitization/PixelDigitization/python/PixelDigitizationConfig.py +++ b/InnerDetector/InDetDigitization/PixelDigitization/python/PixelDigitizationConfig.py @@ -43,11 +43,11 @@ def EnergyDepositionTool(name="EnergyDepositionTool", **kwargs): def SensorSimPlanarTool(name="SensorSimPlanarTool", **kwargs): from AthenaCommon.AppMgr import ToolSvc if not hasattr(ToolSvc, "PixelSiPropertiesTool"): - from SiPropertiesSvc.PixelSiPropertiesToolSetup import PixelSiPropertiesToolSetup + from SiPropertiesTool.PixelSiPropertiesToolSetup import PixelSiPropertiesToolSetup pixelSiPropertiesToolSetup = PixelSiPropertiesToolSetup() pixelSiPropertiesToolSetup.setup() if not hasattr(ToolSvc, "PixelLorentzAngleTool"): - from SiLorentzAngleSvc.PixelLorentzAngleToolSetup import PixelLorentzAngleToolSetup + from SiLorentzAngleTool.PixelLorentzAngleToolSetup import PixelLorentzAngleToolSetup pixelLorentzAngleToolSetup = PixelLorentzAngleToolSetup() kwargs.setdefault("SiPropertiesTool", ToolSvc.PixelSiPropertiesTool) kwargs.setdefault("LorentzAngleTool", ToolSvc.PixelLorentzAngleTool) @@ -56,11 +56,11 @@ def SensorSimPlanarTool(name="SensorSimPlanarTool", **kwargs): def SensorSim3DTool(name="SensorSim3DTool", **kwargs): from AthenaCommon.AppMgr import ToolSvc if not hasattr(ToolSvc, "PixelSiPropertiesTool"): - from SiPropertiesSvc.PixelSiPropertiesToolSetup import PixelSiPropertiesToolSetup + from SiPropertiesTool.PixelSiPropertiesToolSetup import PixelSiPropertiesToolSetup pixelSiPropertiesToolSetup = PixelSiPropertiesToolSetup() pixelSiPropertiesToolSetup.setup() if not hasattr(ToolSvc, "PixelLorentzAngleTool"): - from SiLorentzAngleSvc.PixelLorentzAngleToolSetup import PixelLorentzAngleToolSetup + from SiLorentzAngleTool.PixelLorentzAngleToolSetup import PixelLorentzAngleToolSetup pixelLorentzAngleToolSetup = PixelLorentzAngleToolSetup() kwargs.setdefault("SiPropertiesTool", ToolSvc.PixelSiPropertiesTool) return CfgMgr.SensorSim3DTool(name, **kwargs) diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/EnergyDepositionTool.cxx b/InnerDetector/InDetDigitization/PixelDigitization/src/EnergyDepositionTool.cxx index 6ecdcb7e24f7c3db01c087d736b38ee3bfc007ad..23e675efd6f85429fffc1fcd641cc272550a981b 100644 --- a/InnerDetector/InDetDigitization/PixelDigitization/src/EnergyDepositionTool.cxx +++ b/InnerDetector/InDetDigitization/PixelDigitization/src/EnergyDepositionTool.cxx @@ -21,7 +21,7 @@ #include "InDetSimEvent/SiHit.h" #include "InDetIdentifier/PixelID.h" #include "GeneratorObjects/HepMcParticleLink.h" -#include "SiPropertiesSvc/SiliconProperties.h" +#include "SiPropertiesTool/SiliconProperties.h" #include "HepMC/GenEvent.h" #include "HepMC/GenVertex.h" #include "HepMC/GenParticle.h" diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/FEI3SimTool.cxx b/InnerDetector/InDetDigitization/PixelDigitization/src/FEI3SimTool.cxx index 538b73db2b12e88e0c8896135ebd7f7b62a8097b..d7adbe43ef1d30055cd317d8030cdf6f0a6c0077 100644 --- a/InnerDetector/InDetDigitization/PixelDigitization/src/FEI3SimTool.cxx +++ b/InnerDetector/InDetDigitization/PixelDigitization/src/FEI3SimTool.cxx @@ -106,7 +106,7 @@ void FEI3SimTool::process(SiChargedDiodeCollection &chargedDiodes,PixelRDO_Colle } if (bunchSim<0 || bunchSim>m_timeBCN) { SiHelper::belowThreshold((*i_chargedDiode).second,true,true); } - else { SiHelper::SetBunch((*i_chargedDiode).second,bunchSim); } + else { SiHelper::SetBunch((*i_chargedDiode).second,bunchSim, &msg()); } } else { SiHelper::belowThreshold((*i_chargedDiode).second,true,true); diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/FEI4SimTool.cxx b/InnerDetector/InDetDigitization/PixelDigitization/src/FEI4SimTool.cxx index 31bffcc877bdb83fd696e2f420bdca590df884d8..147ee43bb419564de6804d1346dbc173ada1cc7c 100644 --- a/InnerDetector/InDetDigitization/PixelDigitization/src/FEI4SimTool.cxx +++ b/InnerDetector/InDetDigitization/PixelDigitization/src/FEI4SimTool.cxx @@ -80,7 +80,7 @@ void FEI4SimTool::process(SiChargedDiodeCollection &chargedDiodes,PixelRDO_Colle } if (bunchSim<0 || bunchSim>m_timeBCN) { SiHelper::belowThreshold((*i_chargedDiode).second,true,true); } - else { SiHelper::SetBunch((*i_chargedDiode).second,bunchSim); } + else { SiHelper::SetBunch((*i_chargedDiode).second,bunchSim, &msg()); } } else { SiHelper::belowThreshold((*i_chargedDiode).second,true,true); diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/PixelDigitization.cxx b/InnerDetector/InDetDigitization/PixelDigitization/src/PixelDigitization.cxx index 6b5555b33f1e26866dddfad8621e3b6e61a23511..c5eb6e59f10bb46aed2ef8d11cfa73d0f95ed30d 100644 --- a/InnerDetector/InDetDigitization/PixelDigitization/src/PixelDigitization.cxx +++ b/InnerDetector/InDetDigitization/PixelDigitization/src/PixelDigitization.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ //////////////////////////////////////////////////////////////////////////// @@ -16,10 +16,8 @@ // Constructor with parameters: PixelDigitization::PixelDigitization(const std::string &name, ISvcLocator *pSvcLocator) : - AthAlgorithm(name,pSvcLocator), - m_pixelDigitizationTool("PixelDigitizationTool") + AthAlgorithm(name,pSvcLocator) { - declareProperty("DigitizationTool", m_pixelDigitizationTool, "PixelDigitizationTool Name"); } PixelDigitization::~PixelDigitization() { } diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/PixelDigitization.h b/InnerDetector/InDetDigitization/PixelDigitization/src/PixelDigitization.h index 9d557b7db9e94676a86778932e981e1ad5f49a2a..33c98536842872974e323b951f49d5f3f29c5fee 100644 --- a/InnerDetector/InDetDigitization/PixelDigitization/src/PixelDigitization.h +++ b/InnerDetector/InDetDigitization/PixelDigitization/src/PixelDigitization.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -67,7 +67,7 @@ #include "GaudiKernel/ToolHandle.h" #include "PileUpTools/PileUpToolBase.h" - +class PixelDigitizationTool; class PixelDigitization : public AthAlgorithm { public: @@ -88,7 +88,7 @@ public: virtual StatusCode finalize(); private: - ToolHandle<IPileUpTool> m_pixelDigitizationTool; + ToolHandle<PixelDigitizationTool> m_pixelDigitizationTool{this, "DigitizationTool", "PixelDigitizationTool", "PixelDigitizationTool name"}; }; #endif // PIXELDIGITIZATION_PIXELDIGITIZATION_H diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/PixelDigitizationTool.cxx b/InnerDetector/InDetDigitization/PixelDigitization/src/PixelDigitizationTool.cxx index 19ccde868875605bdafa2d6b4732675f754943c2..c229cdb50865b6af90699ac19227e8f2edecb8e7 100644 --- a/InnerDetector/InDetDigitization/PixelDigitization/src/PixelDigitizationTool.cxx +++ b/InnerDetector/InDetDigitization/PixelDigitization/src/PixelDigitizationTool.cxx @@ -34,9 +34,6 @@ PixelDigitizationTool::PixelDigitizationTool(const std::string &type, m_HardScatterSplittingMode(0), m_HardScatterSplittingSkipper(false), m_onlyHitElements(false), - m_chargeTool(nullptr), - m_fesimTool(nullptr), - m_energyDepositionTool(nullptr), m_detID(nullptr), m_vetoThisBarcode(crazyParticleBarcode), m_timedHits(nullptr), @@ -45,9 +42,6 @@ PixelDigitizationTool::PixelDigitizationTool(const std::string &type, m_inputObjectName(""), m_createNoiseSDO(false) { - declareProperty("ChargeTools", m_chargeTool, "List of charge tools"); - declareProperty("FrontEndSimTools", m_fesimTool, "List of Front-End simulation tools"); - declareProperty("EnergyDepositionTool", m_energyDepositionTool, "Energy deposition tool"); declareProperty("MergeSvc", m_mergeSvc, "Merge service used in Pixel digitization"); declareProperty("InputObjectName", m_inputObjectName, "Input Object name" ); declareProperty("CreateNoiseSDO", m_createNoiseSDO, "Set create noise SDO flag"); diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/PixelDigitizationTool.h b/InnerDetector/InDetDigitization/PixelDigitization/src/PixelDigitizationTool.h index 894b5fdaaba14b01b9bd2303101a9fb4b9b0b645..6ba4f2d88a93e8e50f73f6fd70fabe50f793ace2 100644 --- a/InnerDetector/InDetDigitization/PixelDigitization/src/PixelDigitizationTool.h +++ b/InnerDetector/InDetDigitization/PixelDigitization/src/PixelDigitizationTool.h @@ -67,16 +67,16 @@ class PixelDigitizationTool : public PileUpToolBase { bool m_onlyHitElements; - ToolHandleArray<SensorSimTool> m_chargeTool; - ToolHandleArray<FrontEndSimTool> m_fesimTool; - ToolHandle<EnergyDepositionTool> m_energyDepositionTool; - const PixelID *m_detID; IntegerProperty m_vetoThisBarcode; TimedHitCollection<SiHit> *m_timedHits; + ToolHandleArray<SensorSimTool> m_chargeTool{this, "ChargeTools", {}, "List of charge tools"}; + ToolHandleArray<FrontEndSimTool> m_fesimTool{this, "FrontEndSimTools", {}, "List of Front-End simulation tools"}; + ToolHandle<EnergyDepositionTool> m_energyDepositionTool{this, "EnergyDepositionTool", "EnergyDepositionTool", "Energy deposition tool"}; + protected: ServiceHandle<IAthRNGSvc> m_rndmSvc{this, "RndmSvc", "AthRNGSvc", ""}; //!< Random number service diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/RD53SimTool.cxx b/InnerDetector/InDetDigitization/PixelDigitization/src/RD53SimTool.cxx index 477833db1d248479028b050219409ffe99c1e76b..d3cd5b8b431d7cd8425ba810f28658c1eca6fb27 100644 --- a/InnerDetector/InDetDigitization/PixelDigitization/src/RD53SimTool.cxx +++ b/InnerDetector/InDetDigitization/PixelDigitization/src/RD53SimTool.cxx @@ -88,7 +88,7 @@ void RD53SimTool::process(SiChargedDiodeCollection &chargedDiodes,PixelRDO_Colle } if (bunchSim<0 || bunchSim>m_timeBCN) { SiHelper::belowThreshold((*i_chargedDiode).second,true,true); } - else { SiHelper::SetBunch((*i_chargedDiode).second,bunchSim); } + else { SiHelper::SetBunch((*i_chargedDiode).second,bunchSim, &msg()); } } else { SiHelper::belowThreshold((*i_chargedDiode).second,true,true); diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/SensorSim3DTool.cxx b/InnerDetector/InDetDigitization/PixelDigitization/src/SensorSim3DTool.cxx index 59ca1fe472bfbc344b91b942c69dbff9377bb8af..563da6cda3ee919a0e7295151f0dea73c4f720a5 100644 --- a/InnerDetector/InDetDigitization/PixelDigitization/src/SensorSim3DTool.cxx +++ b/InnerDetector/InDetDigitization/PixelDigitization/src/SensorSim3DTool.cxx @@ -16,7 +16,7 @@ #include "SiDigitization/SiSurfaceCharge.h" #include "InDetIdentifier/PixelID.h" #include "GeneratorObjects/HepMcParticleLink.h" -#include "SiPropertiesSvc/SiliconProperties.h" +#include "SiPropertiesTool/SiliconProperties.h" #include "HepMC/GenEvent.h" #include "HepMC/GenVertex.h" diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/SensorSimPlanarTool.cxx b/InnerDetector/InDetDigitization/PixelDigitization/src/SensorSimPlanarTool.cxx index b41b58cf6cfdc5f1a759b63eacafa05ef2a8e85e..081639f30396bedf67f5f0d3e57b1912c3c939c4 100644 --- a/InnerDetector/InDetDigitization/PixelDigitization/src/SensorSimPlanarTool.cxx +++ b/InnerDetector/InDetDigitization/PixelDigitization/src/SensorSimPlanarTool.cxx @@ -16,7 +16,7 @@ #include "InDetSimEvent/SiHit.h" #include "InDetIdentifier/PixelID.h" #include "GeneratorObjects/HepMcParticleLink.h" -#include "SiPropertiesSvc/SiliconProperties.h" +#include "SiPropertiesTool/SiliconProperties.h" #include "HepMC/GenEvent.h" #include "HepMC/GenVertex.h" #include "HepMC/GenParticle.h" diff --git a/InnerDetector/InDetDigitization/PixelDigitization/src/SensorSimTool.h b/InnerDetector/InDetDigitization/PixelDigitization/src/SensorSimTool.h index f2ffb940f1f7dfc313320ba8a300770a19b7eebf..89bb84abbf6ab58b58f08300c56204adfa89a68a 100644 --- a/InnerDetector/InDetDigitization/PixelDigitization/src/SensorSimTool.h +++ b/InnerDetector/InDetDigitization/PixelDigitization/src/SensorSimTool.h @@ -21,7 +21,7 @@ #include "InDetReadoutGeometry/SiDetectorElement.h" #include "SiDigitization/SiChargedDiodeCollection.h" #include "InDetReadoutGeometry/PixelModuleDesign.h" -#include "SiPropertiesSvc/ISiPropertiesTool.h" +#include "SiPropertiesTool/ISiPropertiesTool.h" static const InterfaceID IID_ISensorSimTool("SensorSimTool", 1, 0); diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/CMakeLists.txt b/InnerDetector/InDetDigitization/PixelRadDamDigitization/CMakeLists.txt index 1a9b4a94d57937d3a102d7ab9a8d8c10cb0df15c..171b4db8364263c9c91adf2557f96911126d399a 100644 --- a/InnerDetector/InDetDigitization/PixelRadDamDigitization/CMakeLists.txt +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/CMakeLists.txt @@ -21,7 +21,7 @@ atlas_depends_on_subdirs( PUBLIC InnerDetector/InDetConditions/InDetCondTools InnerDetector/InDetConditions/PixelConditionsServices InnerDetector/InDetConditions/PixelConditionsTools - InnerDetector/InDetConditions/SiPropertiesSvc + InnerDetector/InDetConditions/SiPropertiesTool InnerDetector/InDetDetDescr/InDetIdentifier InnerDetector/InDetDetDescr/InDetReadoutGeometry InnerDetector/InDetDigitization/SiDigitization @@ -41,7 +41,7 @@ atlas_add_component( PixelRadDamDigitization src/*.cxx src/components/*.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} ${HEPMC_LIBRARIES} AthenaBaseComps GaudiKernel CommissionEvent AthenaKernel PileUpToolsLib StoreGateLib SGtests Identifier xAODEventInfo GeneratorObjects InDetCondTools PixelConditionsData SiPropertiesSvcLib InDetIdentifier InDetReadoutGeometry SiDigitization InDetRawData InDetSimData InDetSimEvent HitManagement PathResolver ) + LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} ${HEPMC_LIBRARIES} AthenaBaseComps GaudiKernel CommissionEvent AthenaKernel PileUpToolsLib StoreGateLib SGtests Identifier xAODEventInfo GeneratorObjects InDetCondTools PixelConditionsData SiPropertiesToolLib InDetIdentifier InDetReadoutGeometry SiDigitization InDetRawData InDetSimData InDetSimEvent HitManagement PathResolver ) # Install files from the package: atlas_install_python_modules( python/*.py ) diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/python/PixelRadDamDigitizationConfig.py b/InnerDetector/InDetDigitization/PixelRadDamDigitization/python/PixelRadDamDigitizationConfig.py index e0a3ea13c57cf7e3090771b52fed72fbade22875..92af4950a55810b6231d57e6b047c26e912e0d79 100644 --- a/InnerDetector/InDetDigitization/PixelRadDamDigitization/python/PixelRadDamDigitizationConfig.py +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/python/PixelRadDamDigitizationConfig.py @@ -44,7 +44,7 @@ def EnergyDepositionTool(name="EnergyDepositionTool", **kwargs): def SensorSimPlanarTool(name="SensorSimPlanarTool", **kwargs): if not hasattr(ToolSvc, "PixelSiPropertiesTool"): - from SiPropertiesSvc.PixelSiPropertiesToolSetup import PixelSiPropertiesToolSetup + from SiPropertiesTool.PixelSiPropertiesToolSetup import PixelSiPropertiesToolSetup pixelSiPropertiesToolSetup = PixelSiPropertiesToolSetup() pixelSiPropertiesToolSetup.setup() kwargs.setdefault("SiPropertiesTool", ToolSvc.PixelSiPropertiesTool) @@ -54,7 +54,7 @@ def SensorSimPlanarTool(name="SensorSimPlanarTool", **kwargs): def SensorSim3DTool(name="SensorSim3DTool", **kwargs): if not hasattr(ToolSvc, "PixelSiPropertiesTool"): - from SiPropertiesSvc.PixelSiPropertiesToolSetup import PixelSiPropertiesToolSetup + from SiPropertiesTool.PixelSiPropertiesToolSetup import PixelSiPropertiesToolSetup pixelSiPropertiesToolSetup = PixelSiPropertiesToolSetup() pixelSiPropertiesToolSetup.setup() kwargs.setdefault("SiPropertiesTool", ToolSvc.PixelSiPropertiesTool) @@ -64,7 +64,7 @@ def SensorSim3DTool(name="SensorSim3DTool", **kwargs): def SensorSimTool(name="SensorSimTool", **kwargs): if not hasattr(ToolSvc, "PixelSiPropertiesTool"): - from SiPropertiesSvc.PixelSiPropertiesToolSetup import PixelSiPropertiesToolSetup + from SiPropertiesTool.PixelSiPropertiesToolSetup import PixelSiPropertiesToolSetup pixelSiPropertiesToolSetup = PixelSiPropertiesToolSetup() pixelSiPropertiesToolSetup.setup() kwargs.setdefault("SiPropertiesTool", ToolSvc.PixelSiPropertiesTool) diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/EnergyDepositionTool.cxx b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/EnergyDepositionTool.cxx index b26ff473a960ebd7aa36012f2b7c4dc2d9f0a4e3..27ebbe18a093205b6d880a11f74b37c93f33933d 100644 --- a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/EnergyDepositionTool.cxx +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/EnergyDepositionTool.cxx @@ -21,7 +21,7 @@ #include "InDetSimEvent/SiHit.h" #include "InDetIdentifier/PixelID.h" #include "GeneratorObjects/HepMcParticleLink.h" -#include "SiPropertiesSvc/SiliconProperties.h" +#include "SiPropertiesTool/SiliconProperties.h" #include "HepMC/GenEvent.h" #include "HepMC/GenVertex.h" #include "HepMC/GenParticle.h" diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/FEI3SimTool.cxx b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/FEI3SimTool.cxx index 14daa8bd0122af8457aa3c0c5ed7afe52e228f1b..49e008842b83be16b6d083cb6cffcc790261d64d 100644 --- a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/FEI3SimTool.cxx +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/FEI3SimTool.cxx @@ -106,7 +106,7 @@ void FEI3SimTool::process(SiChargedDiodeCollection &chargedDiodes,PixelRDO_Colle } if (bunchSim<0 || bunchSim>m_timeBCN) { SiHelper::belowThreshold((*i_chargedDiode).second,true,true); } - else { SiHelper::SetBunch((*i_chargedDiode).second,bunchSim); } + else { SiHelper::SetBunch((*i_chargedDiode).second,bunchSim, &msg()); } } else { SiHelper::belowThreshold((*i_chargedDiode).second,true,true); diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/FEI4SimTool.cxx b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/FEI4SimTool.cxx index f6b32a4d30ea00774daa17219de8811c004be3ca..dbbe2dbe423b2adc57e251d7224ea579182c51f4 100644 --- a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/FEI4SimTool.cxx +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/FEI4SimTool.cxx @@ -82,7 +82,7 @@ void FEI4SimTool::process(SiChargedDiodeCollection &chargedDiodes,PixelRDO_Colle } if (bunchSim<0 || bunchSim>m_timeBCN) { SiHelper::belowThreshold((*i_chargedDiode).second,true,true); } - else { SiHelper::SetBunch((*i_chargedDiode).second,bunchSim); } + else { SiHelper::SetBunch((*i_chargedDiode).second,bunchSim, &msg()); } } else { SiHelper::belowThreshold((*i_chargedDiode).second,true,true); diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/RD53SimTool.cxx b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/RD53SimTool.cxx index d073da70a5b724070319ab46c025a220cd798b44..25e2810593c813ef0be000fe3a4f0f01a0663abe 100644 --- a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/RD53SimTool.cxx +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/RD53SimTool.cxx @@ -74,7 +74,7 @@ void RD53SimTool::process(SiChargedDiodeCollection &chargedDiodes,PixelRDO_Colle } if (bunchSim<0 || bunchSim>m_timeBCN) { SiHelper::belowThreshold((*i_chargedDiode).second,true,true); } - else { SiHelper::SetBunch((*i_chargedDiode).second,bunchSim); } + else { SiHelper::SetBunch((*i_chargedDiode).second,bunchSim, &msg()); } } else { SiHelper::belowThreshold((*i_chargedDiode).second,true,true); diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/RadDamageUtil.cxx b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/RadDamageUtil.cxx index 0ed2793422c95beab999e8fd61832e2d270159e3..87bae22ae5c57cf411939d2f347a736831ee30f7 100644 --- a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/RadDamageUtil.cxx +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/RadDamageUtil.cxx @@ -23,7 +23,7 @@ #include "InDetSimEvent/SiHit.h" #include "InDetIdentifier/PixelID.h" #include "GeneratorObjects/HepMcParticleLink.h" -#include "SiPropertiesSvc/SiliconProperties.h" +#include "SiPropertiesTool/SiliconProperties.h" #include "HepMC/GenEvent.h" #include "HepMC/GenVertex.h" #include "HepMC/GenParticle.h" diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/SensorSim3DTool.cxx b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/SensorSim3DTool.cxx index 425f0c882b376a136f7592f5bc8bd16d85f8dc30..c5db4b438db082b15d520acdaad6702c0b20bc5e 100644 --- a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/SensorSim3DTool.cxx +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/SensorSim3DTool.cxx @@ -16,7 +16,7 @@ #include "InDetSimEvent/SiHit.h" #include "InDetIdentifier/PixelID.h" #include "GeneratorObjects/HepMcParticleLink.h" -#include "SiPropertiesSvc/SiliconProperties.h" +#include "SiPropertiesTool/SiliconProperties.h" #include "HepMC/GenEvent.h" #include "HepMC/GenVertex.h" #include "HepMC/GenParticle.h" diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/SensorSimPlanarTool.cxx b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/SensorSimPlanarTool.cxx index 3ac22271ca4356c96d1b054d1df1c836006d9b4a..a7152bd2750f46da60c2143fac5775fa3f887dff 100644 --- a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/SensorSimPlanarTool.cxx +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/SensorSimPlanarTool.cxx @@ -16,7 +16,7 @@ #include "InDetSimEvent/SiHit.h" #include "InDetIdentifier/PixelID.h" #include "GeneratorObjects/HepMcParticleLink.h" -#include "SiPropertiesSvc/SiliconProperties.h" +#include "SiPropertiesTool/SiliconProperties.h" #include "HepMC/GenEvent.h" #include "HepMC/GenVertex.h" #include "HepMC/GenParticle.h" diff --git a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/SensorSimTool.h b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/SensorSimTool.h index 76b81c1051ac155af7ce9f2cf4ed73a1ee33f03a..227632be15fee665db5d4dc201c799d2a289faba 100644 --- a/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/SensorSimTool.h +++ b/InnerDetector/InDetDigitization/PixelRadDamDigitization/src/SensorSimTool.h @@ -20,7 +20,7 @@ #include "HitManagement/TimedHitPtr.h" #include "SiDigitization/SiChargedDiodeCollection.h" -#include "SiPropertiesSvc/ISiPropertiesTool.h" +#include "SiPropertiesTool/ISiPropertiesTool.h" #include "InDetReadoutGeometry/SiDetectorElement.h" #include "SiDigitization/SiChargedDiodeCollection.h" #include "InDetReadoutGeometry/PixelModuleDesign.h" diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/CMakeLists.txt b/InnerDetector/InDetDigitization/SCT_Digitization/CMakeLists.txt index fecb6927f58b0ea2254474c1d00b202b52317607..2b9b857907067fb49570c37c982fe3df6eef15b1 100644 --- a/InnerDetector/InDetDigitization/SCT_Digitization/CMakeLists.txt +++ b/InnerDetector/InDetDigitization/SCT_Digitization/CMakeLists.txt @@ -24,7 +24,7 @@ atlas_depends_on_subdirs( PUBLIC Generators/GeneratorObjects InnerDetector/InDetConditions/InDetConditionsSummaryService InnerDetector/InDetConditions/SCT_ConditionsTools - InnerDetector/InDetConditions/SiPropertiesSvc + InnerDetector/InDetConditions/SiPropertiesTool InnerDetector/InDetDetDescr/InDetIdentifier InnerDetector/InDetDetDescr/InDetReadoutGeometry InnerDetector/InDetDetDescr/SCT_ModuleDistortions @@ -40,7 +40,7 @@ atlas_add_component( SCT_Digitization src/*.cxx src/components/*.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} CommissionEvent AthenaBaseComps AthenaKernel PileUpToolsLib Identifier xAODEventInfo GaudiKernel SiDigitization InDetRawData InDetSimEvent HitManagement GeneratorObjects SiPropertiesSvcLib InDetIdentifier InDetReadoutGeometry InDetSimData ) + LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} CommissionEvent AthenaBaseComps AthenaKernel PileUpToolsLib Identifier xAODEventInfo GaudiKernel SiDigitization InDetRawData InDetSimEvent HitManagement GeneratorObjects SiPropertiesToolLib InDetIdentifier InDetReadoutGeometry InDetSimData ) # Install files from the package: atlas_install_headers( SCT_Digitization ) diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/SCT_Digitization/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetDigitization/SCT_Digitization/SCT_Digitization/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..ea5a83d0c0e28ec04b46d1504484ceedd2f70a4e --- /dev/null +++ b/InnerDetector/InDetDigitization/SCT_Digitization/SCT_Digitization/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +InnerDetector/InDetDigitization/SCT_Digitization diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/python/SCT_DigitizationConfig.py b/InnerDetector/InDetDigitization/SCT_Digitization/python/SCT_DigitizationConfig.py index f0f684910a1d7b7958e93e7e4a2f32637f22316f..a753c90b1b327a9b6e1026ab88f90d0b693e7675 100644 --- a/InnerDetector/InDetDigitization/SCT_Digitization/python/SCT_DigitizationConfig.py +++ b/InnerDetector/InDetDigitization/SCT_Digitization/python/SCT_DigitizationConfig.py @@ -44,7 +44,7 @@ def getSCT_SurfaceChargesGenerator(name="SCT_SurfaceChargesGenerator", **kwargs) sct_SiliconConditionsToolSetup.setDcsTool(sct_DCSConditionsToolSetup.getTool()) sct_SiliconConditionsToolSetup.setup() # Set up SCT_SiPropertiesTool - from SiPropertiesSvc.SCT_SiPropertiesToolSetup import SCT_SiPropertiesToolSetup + from SiPropertiesTool.SCT_SiPropertiesToolSetup import SCT_SiPropertiesToolSetup sct_SiPropertiesToolSetup = SCT_SiPropertiesToolSetup() sct_SiPropertiesToolSetup.setSiliconTool(sct_SiliconConditionsToolSetup.getTool()) sct_SiPropertiesToolSetup.setup() @@ -54,7 +54,7 @@ def getSCT_SurfaceChargesGenerator(name="SCT_SurfaceChargesGenerator", **kwargs) from SCT_ConditionsTools.SCT_ConditionsToolsConf import SCT_RadDamageSummaryTool ToolSvc += SCT_RadDamageSummaryTool(name = "InDetSCT_RadDamageSummaryTool") ## SiLorentzAngleTool for SCT_SurfaceChargesGenerator - from SiLorentzAngleSvc.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup + from SiLorentzAngleTool.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup sctLorentzAngleToolSetup = SCTLorentzAngleToolSetup() kwargs.setdefault("FixedTime", -999) diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_Amp.cxx b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_Amp.cxx index a183f3637bc71b03372de420a0a694de3deae5f1..8d1fd17dd8167d8bfa4015c09414ffd232122bef 100644 --- a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_Amp.cxx +++ b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_Amp.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_Amp.h" @@ -15,11 +15,10 @@ // constructor SCT_Amp::SCT_Amp(const std::string& type, const std::string& name, const IInterface* parent) - : AthAlgTool(type, name, parent), + : base_class(type, name, parent), m_NormConstCentral{0.}, m_NormConstNeigh{0.} { - declareInterface<ISCT_Amp>(this); declareProperty("CrossFactor2sides", m_CrossFactor2sides=0.1); //! <Loss of charge to neighbour strip constant declareProperty("CrossFactorBack", m_CrossFactorBack=0.07); //! <Loss of charge to back plane constant declareProperty("PeakTime", m_PeakTime=21.); //! <Front End Electronics peaking time diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_Amp.h b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_Amp.h index d66532145f0289f3bbaaebc3212022557b145b92..74904fafb6ca55003ef572f3b63b866d020573ae 100644 --- a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_Amp.h +++ b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_Amp.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /** @@ -22,7 +22,7 @@ #include "InDetSimEvent/SiCharge.h" -class SCT_Amp : public AthAlgTool, virtual public ISCT_Amp { +class SCT_Amp : public extends<AthAlgTool, ISCT_Amp> { public: /** constructor */ diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DetailedSurfaceChargesGenerator.h b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DetailedSurfaceChargesGenerator.h index cbfc68d0f536db51fadc9d7605c00c3348c227cd..2d9f02c9712bd7a3d83518b97027956e31a32bbd 100644 --- a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DetailedSurfaceChargesGenerator.h +++ b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DetailedSurfaceChargesGenerator.h @@ -21,7 +21,7 @@ #include "InDetConditionsSummaryService/ISiliconConditionsTool.h" #include "InDetCondTools/ISiLorentzAngleTool.h" #include "SCT_ModuleDistortions/ISCT_ModuleDistortionsTool.h" -#include "SiPropertiesSvc/ISiPropertiesTool.h" +#include "SiPropertiesTool/ISiPropertiesTool.h" // Gaudi #include "GaudiKernel/ServiceHandle.h" diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_Digitization.cxx b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_Digitization.cxx index e2c405efadd7f25e95fa90ea9fea5844968ec6fb..a75241d32e0ee6f82cd8e60e80a3589a93c655a4 100644 --- a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_Digitization.cxx +++ b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_Digitization.cxx @@ -2,8 +2,8 @@ Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ -#include "SCT_Digitization/SCT_Digitization.h" -#include "SCT_Digitization/SCT_DigitizationTool.h" +#include "SCT_Digitization.h" +#include "SCT_DigitizationTool.h" //---------------------------------------------------------------------- // Constructor with parameters: diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/SCT_Digitization/SCT_Digitization.h b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_Digitization.h similarity index 100% rename from InnerDetector/InDetDigitization/SCT_Digitization/SCT_Digitization/SCT_Digitization.h rename to InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_Digitization.h diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DigitizationTool.cxx b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DigitizationTool.cxx index cf6810a8ef3b06e01079d8ba712d96f220f7d974..f31b18eefd5d1f930b9bcebb5d81c40192212d73 100644 --- a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DigitizationTool.cxx +++ b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DigitizationTool.cxx @@ -2,7 +2,7 @@ Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ -#include "SCT_Digitization/SCT_DigitizationTool.h" +#include "SCT_DigitizationTool.h" // Mother Package includes #include "SiDigitization/SiHelper.h" @@ -47,8 +47,6 @@ SCT_DigitizationTool::SCT_DigitizationTool(const std::string& type, m_mergeSvc{"PileUpMergeSvc", name}, m_thpcsi{nullptr}, m_vetoThisBarcode{crazyParticleBarcode} { - declareInterface<SCT_DigitizationTool>(this); - declareProperty("FixedTime", m_tfix = -999., "Fixed time for Cosmics run selection"); declareProperty("CosmicsRun", m_cosmicsRun = false, "Cosmics run selection"); declareProperty("EnableHits", m_enableHits = true, "Enable hits"); @@ -647,7 +645,7 @@ SCT_RDO_Collection* SCT_DigitizationTool::createRDO(SiChargedDiodeCollection* co } if ((it2 != collection->end()) and !(it2->second.flag() & 0xDE)) { SiHelper::ClusterUsed(it2->second, false); - SiHelper::SetStripNum(it2->second, size - cluscounter); + SiHelper::SetStripNum(it2->second, size - cluscounter, &msg()); } // groupSize=tmp; size_rdo = tmp & 0xFFFF; @@ -709,7 +707,7 @@ SCT_RDO_Collection* SCT_DigitizationTool::createRDO(SiChargedDiodeCollection* co } if (diode and !(diode->flag() & 0xDE)) { SiHelper::ClusterUsed(*diode, false); - SiHelper::SetStripNum(*diode, size - cluscounter); + SiHelper::SetStripNum(*diode, size - cluscounter, &msg()); } groupSize = tmp; break; diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/SCT_Digitization/SCT_DigitizationTool.h b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DigitizationTool.h similarity index 100% rename from InnerDetector/InDetDigitization/SCT_Digitization/SCT_Digitization/SCT_DigitizationTool.h rename to InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DigitizationTool.h diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_FrontEnd.cxx b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_FrontEnd.cxx index cdb3a5401f6c080d25d3ec07c2788ec466bbf189..8df88c7d7f062a9b2ce6c0e1317a0e7d28978ddd 100644 --- a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_FrontEnd.cxx +++ b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_FrontEnd.cxx @@ -29,12 +29,11 @@ using namespace InDetDD; // constructor SCT_FrontEnd::SCT_FrontEnd(const std::string& type, const std::string& name, const IInterface* parent) - : AthAlgTool(type, name, parent), - m_mutex(), - m_SCTdetMgr(nullptr), - m_sct_id(nullptr) { - declareInterface<ISCT_FrontEnd>(this); - + : base_class(type, name, parent), + m_strip_max{768}, + m_mutex{}, + m_SCTdetMgr{nullptr}, + m_sct_id{nullptr} { declareProperty("NoiseBarrel", m_NoiseBarrel = 1500.0, "NoiseBarrel"); declareProperty("NoiseBarrel3", m_NoiseBarrel3 = 1541.0, "NoiseBarrel3"); declareProperty("NoiseInners", m_NoiseInners = 1090.0, "NoiseInners"); @@ -57,7 +56,6 @@ SCT_FrontEnd::SCT_FrontEnd(const std::string& type, const std::string& name, con declareProperty("DataCompressionMode", m_data_compression_mode = 1, "Front End Data Compression Mode"); declareProperty("DataReadOutMode", m_data_readout_mode = 0, "Front End Data Read out mode Mode"); declareProperty("UseCalibData", m_useCalibData = true, "Flag to use Calib Data"); - declareProperty("MaxStripsPerSide", m_strip_max = 768, "For SLHC studies"); } // ---------------------------------------------------------------------- @@ -123,6 +121,8 @@ StatusCode SCT_FrontEnd::finalize() { // Init the class variable vectors // ---------------------------------------------------------------------- StatusCode SCT_FrontEnd::initVectors(int strips) const { + std::lock_guard<std::recursive_mutex> lock(m_mutex); + m_Offset.assign(strips, 0.0); m_GainFactor.assign(strips, 0.0); m_NoiseFactor.assign(strips, 0.0); @@ -148,6 +148,8 @@ StatusCode SCT_FrontEnd::initVectors(int strips) const { // prepare gain and offset for the strips for a given module // ---------------------------------------------------------------------- StatusCode SCT_FrontEnd::prepareGainAndOffset(SiChargedDiodeCollection& collection, const Identifier& moduleId, CLHEP::HepRandomEngine * rndmEngine) const { + std::lock_guard<std::recursive_mutex> lock(m_mutex); + // now we need to generate gain and offset channel by channel: some algebra // for generation of partially correlated random numbers float W = m_OGcorr * m_GainRMS * m_Ospread / (m_GainRMS * m_GainRMS - m_Ospread * m_Ospread); @@ -251,6 +253,8 @@ StatusCode SCT_FrontEnd::prepareGainAndOffset(SiChargedDiodeCollection& collecti // Cond Db data to get the chip calibration data // ---------------------------------------------------------------------- StatusCode SCT_FrontEnd::prepareGainAndOffset(SiChargedDiodeCollection& collection, int side, const Identifier& moduleId, CLHEP::HepRandomEngine * rndmEngine) const { + std::lock_guard<std::recursive_mutex> lock(m_mutex); + // Get chip data from calib DB std::vector<float> gainByChipVect = m_ReadCalibChipDataTool->getNPtGainData(moduleId, side, "GainByChip"); std::vector<float> gainRMSByChipVect = m_ReadCalibChipDataTool->getNPtGainData(moduleId, side, "GainRMSByChip"); @@ -374,6 +378,8 @@ StatusCode SCT_FrontEnd::prepareGainAndOffset(SiChargedDiodeCollection& collecti StatusCode SCT_FrontEnd::randomNoise(SiChargedDiodeCollection& collection, const Identifier& moduleId, CLHEP::HepRandomEngine * rndmEngine) const { // Add random noise + std::lock_guard<std::recursive_mutex> lock(m_mutex); + double occupancy = 0.0; double NoiseOccupancy = 0.0; float Noise = 0.0; @@ -492,8 +498,10 @@ StatusCode SCT_FrontEnd::randomNoise(SiChargedDiodeCollection& collection, const // // ---------------------------------------------------------------------- StatusCode SCT_FrontEnd::randomNoise(SiChargedDiodeCollection& collection, const Identifier& moduleId, int side, CLHEP::HepRandomEngine * rndmEngine) const { - int n_chips = 6; - int chipStripmax = m_strip_max / n_chips; + std::lock_guard<std::recursive_mutex> lock(m_mutex); + + const int n_chips = 6; + const int chipStripmax = m_strip_max / n_chips; std::vector<float> NOByChipVect(n_chips, 0.0); std::vector<float> ENCByChipVect(n_chips, 0.0); std::vector<int> nNoisyStrips(n_chips, 0); @@ -594,7 +602,7 @@ StatusCode SCT_FrontEnd::randomNoise(SiChargedDiodeCollection& collection, const // (this could be moved elsewhere later) apply threshold do clustering // ---------------------------------------------------------------------- void SCT_FrontEnd::process(SiChargedDiodeCollection& collection, CLHEP::HepRandomEngine * rndmEngine) const { - std::lock_guard<std::mutex> lock(m_mutex); + std::lock_guard<std::recursive_mutex> lock(m_mutex); // get SCT module side design and check it const SCT_ModuleSideDesign *p_design = dynamic_cast<const SCT_ModuleSideDesign*>(&(collection.design())); @@ -693,6 +701,8 @@ void SCT_FrontEnd::process(SiChargedDiodeCollection& collection, CLHEP::HepRando StatusCode SCT_FrontEnd::doSignalChargeForHits(SiChargedDiodeCollection& collection) const { typedef SiTotalCharge::list_t list_t; + std::lock_guard<std::recursive_mutex> lock(m_mutex); + // ***************************************************************************** // Loop over the diodes (strips ) and for each of them define the total signal // ***************************************************************************** @@ -782,6 +792,8 @@ StatusCode SCT_FrontEnd::doThresholdCheckForRealHits(SiChargedDiodeCollection& c // Flag strips below threshold and flag the threshold check into m_StripHitsOnWafer // ********************************************************************************** + std::lock_guard<std::recursive_mutex> lock(m_mutex); + SiChargedDiodeIterator i_chargedDiode = collection.begin(); SiChargedDiodeIterator i_chargedDiode_end = collection.end(); @@ -800,7 +812,7 @@ StatusCode SCT_FrontEnd::doThresholdCheckForRealHits(SiChargedDiodeCollection& c m_StripHitsOnWafer[strip] = -1; } else { m_StripHitsOnWafer[strip] = 1; - SiHelper::SetTimeBin(diode, 2); // set timebin info + SiHelper::SetTimeBin(diode, 2, &msg()); // set timebin info } } else if (m_data_compression_mode == 2 and m_data_readout_mode == 0) { // edge mode 01x if ((m_Analogue[0][strip] >= m_Threshold or m_Analogue[1][strip] < m_Threshold)) { @@ -811,7 +823,7 @@ StatusCode SCT_FrontEnd::doThresholdCheckForRealHits(SiChargedDiodeCollection& c m_StripHitsOnWafer[strip] = -1; } else { m_StripHitsOnWafer[strip] = 1; - SiHelper::SetTimeBin(diode, 2); // set timebin info + SiHelper::SetTimeBin(diode, 2, &msg()); // set timebin info } } else if (m_data_compression_mode == 3 or m_data_readout_mode == 1) { // Check hit pattern int have_hit_bin = 0; @@ -830,7 +842,7 @@ StatusCode SCT_FrontEnd::doThresholdCheckForRealHits(SiChargedDiodeCollection& c } else if (m_data_compression_mode == 1) { // !< level and expanded mode if (have_hit_bin == 2 or have_hit_bin == 3 or have_hit_bin == 6 or have_hit_bin == 7) { m_StripHitsOnWafer[strip] = 1; - SiHelper::SetTimeBin(diode, have_hit_bin); + SiHelper::SetTimeBin(diode, have_hit_bin, &msg()); } else { SiHelper::belowThreshold(diode, true); // Below strip diode signal threshold m_StripHitsOnWafer[strip] = -1; @@ -838,7 +850,7 @@ StatusCode SCT_FrontEnd::doThresholdCheckForRealHits(SiChargedDiodeCollection& c } else if (m_data_compression_mode == 2) { // !< edge and expanded mode if (have_hit_bin == 2 or have_hit_bin == 3) { m_StripHitsOnWafer[strip] = 1; - SiHelper::SetTimeBin(diode, have_hit_bin); + SiHelper::SetTimeBin(diode, have_hit_bin, &msg()); } else { SiHelper::belowThreshold(diode, true); // Below strip diode signal threshold m_StripHitsOnWafer[strip] = -1; @@ -850,9 +862,9 @@ StatusCode SCT_FrontEnd::doThresholdCheckForRealHits(SiChargedDiodeCollection& c } else { m_StripHitsOnWafer[strip] = 1; if (m_data_readout_mode == 1) { // !< check for exp mode or not - SiHelper::SetTimeBin(diode, have_hit_bin); + SiHelper::SetTimeBin(diode, have_hit_bin, &msg()); } else { - SiHelper::SetTimeBin(diode, 2); + SiHelper::SetTimeBin(diode, 2, &msg()); } } } @@ -873,6 +885,8 @@ StatusCode SCT_FrontEnd::doThresholdCheckForCrosstalkHits(SiChargedDiodeCollecti // =0 for free strips or strips with charge to be checked (m_Analogue[1]!=0) // Set 2 for crosstalk noise hits and -2 for below ones + std::lock_guard<std::recursive_mutex> lock(m_mutex); + for (int strip = 0; strip < m_strip_max; strip++) { // Find strips with m_StripHitsOnWafer[strip] == 0 if (m_StripHitsOnWafer[strip] != 0) { // real hits already checked @@ -951,6 +965,8 @@ StatusCode SCT_FrontEnd::doThresholdCheckForCrosstalkHits(SiChargedDiodeCollecti } StatusCode SCT_FrontEnd::doClustering(SiChargedDiodeCollection& collection) const { + std::lock_guard<std::recursive_mutex> lock(m_mutex); + // ******************************** // now do clustering // ******************************** @@ -987,7 +1003,7 @@ StatusCode SCT_FrontEnd::doClustering(SiChargedDiodeCollection& collection) cons clusterSize = (clusterLastStrip - clusterFirstStrip) + 1; hitStrip = m_sct_id->strip_id(collection.identify(), clusterFirstStrip); SiChargedDiode& HitDiode = *(collection.find(hitStrip)); - SiHelper::SetStripNum(HitDiode, clusterSize); + SiHelper::SetStripNum(HitDiode, clusterSize, &msg()); SiChargedDiode *PreviousHitDiode = &HitDiode; for (int i = clusterFirstStrip+1; i <= clusterLastStrip; ++i) { @@ -1021,7 +1037,7 @@ StatusCode SCT_FrontEnd::doClustering(SiChargedDiodeCollection& collection) cons previousHitDiode = &newHitDiode; clusterSize++; } - SiHelper::SetStripNum(hitDiode, clusterSize); + SiHelper::SetStripNum(hitDiode, clusterSize, &msg()); #ifdef SCT_DIG_DEBUG ATH_MSG_DEBUG("RDO Strip = " << strip << ", tbin = " << @@ -1055,7 +1071,7 @@ StatusCode SCT_FrontEnd::addNoiseDiode(SiChargedDiodeCollection& collection, int if (NoiseDiode == nullptr) { return StatusCode::FAILURE; } - SiHelper::SetTimeBin(*NoiseDiode, tbin); // set timebin info + SiHelper::SetTimeBin(*NoiseDiode, tbin, &msg()); // set timebin info return StatusCode::SUCCESS; } diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_FrontEnd.h b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_FrontEnd.h index 9e2e6c60060e004018e599599e41073fc8423ce6..5f5a5e584dc182254815b3b515a6c4a5665589e5 100644 --- a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_FrontEnd.h +++ b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_FrontEnd.h @@ -56,7 +56,7 @@ namespace CLHEP { * collected charges, also does cross-talk, offset * variation and gain variation, in a correlated way */ -class SCT_FrontEnd : public AthAlgTool, virtual public ISCT_FrontEnd { +class SCT_FrontEnd : public extends<AthAlgTool, ISCT_FrontEnd> { public: @@ -114,14 +114,14 @@ class SCT_FrontEnd : public AthAlgTool, virtual public ISCT_FrontEnd { short m_data_compression_mode; //!< To set the data compression mode short m_data_readout_mode; //!< To set the data read out mode bool m_useCalibData; //!< Flag to set the use of calibration data for noise, Gain,offset etc. - mutable int m_strip_max; //!< For SLHC studies - - mutable std::mutex m_mutex; - mutable std::vector<float> m_Offset; //!< generate offset per channel - mutable std::vector<float> m_GainFactor; //!< generate gain per channel (added to the gain per chip from calib data) - mutable std::vector<float> m_NoiseFactor; //!< Kondo: 31/08/07 noise per channel (actually noise per chip from calib data) - mutable std::vector<double> m_Analogue[3]; //!< To hold the noise and amplifier response - mutable std::vector<int> m_StripHitsOnWafer; //!< Info about which strips are above threshold + mutable int m_strip_max ATLAS_THREAD_SAFE; //!< For SLHC studies + + mutable std::recursive_mutex m_mutex; + mutable std::vector<float> m_Offset ATLAS_THREAD_SAFE; //!< generate offset per channel + mutable std::vector<float> m_GainFactor ATLAS_THREAD_SAFE; //!< generate gain per channel (added to the gain per chip from calib data) + mutable std::vector<float> m_NoiseFactor ATLAS_THREAD_SAFE; //!< Kondo: 31/08/07 noise per channel (actually noise per chip from calib data) + mutable std::vector<double> m_Analogue[3] ATLAS_THREAD_SAFE; //!< To hold the noise and amplifier response + mutable std::vector<int> m_StripHitsOnWafer ATLAS_THREAD_SAFE; //!< Info about which strips are above threshold const InDetDD::SCT_DetectorManager* m_SCTdetMgr; //!< Handle to SCT detector manager const SCT_ID* m_sct_id; //!< Handle to SCT ID helper diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_SurfaceChargesGenerator.cxx b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_SurfaceChargesGenerator.cxx index 260ae32a319945e2ab4884de7693a9d6c26096f7..e7175a390796a9701d5f0a1c67a8172f8db8393d 100644 --- a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_SurfaceChargesGenerator.cxx +++ b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_SurfaceChargesGenerator.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_SurfaceChargesGenerator.h" @@ -40,7 +40,7 @@ using namespace std; SCT_SurfaceChargesGenerator::SCT_SurfaceChargesGenerator(const std::string& type, const std::string& name, const IInterface* parent) - : AthAlgTool(type, name, parent), + : base_class(type, name, parent), m_tHalfwayDrift{0}, m_distInterStrip{1.0}, m_distHalfInterStrip{0}, @@ -73,8 +73,6 @@ SCT_SurfaceChargesGenerator::SCT_SurfaceChargesGenerator(const std::string& type m_h_velocity_trap{nullptr}, m_h_mobility_trap{nullptr}, m_h_trap_pos{nullptr} { - declareInterface<ISCT_SurfaceChargesGenerator>(this); - declareProperty("FixedTime", m_tfix = -999.); // !< fixed timing declareProperty("SubtractTime", m_tsubtract = -999); // !< substract drift time declareProperty("SurfaceDriftTime", m_tSurfaceDrift = 10); // !< max surface drift time diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_SurfaceChargesGenerator.h b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_SurfaceChargesGenerator.h index 8805bef34c1be9a6171af2cdbdc388dc1f22ca90..de948fe6a271169ddcb295f96e9fcc5462315099 100644 --- a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_SurfaceChargesGenerator.h +++ b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_SurfaceChargesGenerator.h @@ -39,7 +39,7 @@ #include "InDetCondTools/ISiLorentzAngleTool.h" #include "SCT_ConditionsTools/ISCT_RadDamageSummaryTool.h" #include "SCT_ModuleDistortions/ISCT_ModuleDistortionsTool.h" -#include "SiPropertiesSvc/ISiPropertiesTool.h" +#include "SiPropertiesTool/ISiPropertiesTool.h" // Gaudi #include "GaudiKernel/ITHistSvc.h" // for ITHistSvc @@ -68,7 +68,7 @@ namespace CLHEP { template <class HIT> class TimedHitPtr; -class SCT_SurfaceChargesGenerator : public AthAlgTool, virtual public ISCT_SurfaceChargesGenerator { +class SCT_SurfaceChargesGenerator : public extends<AthAlgTool, ISCT_SurfaceChargesGenerator> { public: /** constructor */ diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/src/components/SCT_Digitization_entries.cxx b/InnerDetector/InDetDigitization/SCT_Digitization/src/components/SCT_Digitization_entries.cxx index e1a256d65f0716f84cf9f5c8ef08ac1142aa057f..166a8fc8b3f3e372766234a2fc28b9f7c51b7832 100644 --- a/InnerDetector/InDetDigitization/SCT_Digitization/src/components/SCT_Digitization_entries.cxx +++ b/InnerDetector/InDetDigitization/SCT_Digitization/src/components/SCT_Digitization_entries.cxx @@ -1,7 +1,7 @@ #include "../SCT_Amp.h" #include "../SCT_FrontEnd.h" -#include "SCT_Digitization/SCT_Digitization.h" -#include "SCT_Digitization/SCT_DigitizationTool.h" +#include "../SCT_Digitization.h" +#include "../SCT_DigitizationTool.h" #include "../SCT_SurfaceChargesGenerator.h" #include "../SCT_DetailedSurfaceChargesGenerator.h" #include "../SCT_RandomDisabledCellGenerator.h" diff --git a/InnerDetector/InDetDigitization/SiDigitization/SiDigitization/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetDigitization/SiDigitization/SiDigitization/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..9036d718adf5823c5a6f3f10975893bd3cbcbc53 --- /dev/null +++ b/InnerDetector/InDetDigitization/SiDigitization/SiDigitization/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +InnerDetector/InDetDigitization/SiDigitization diff --git a/InnerDetector/InDetDigitization/SiDigitization/SiDigitization/SiChargedDiode.h b/InnerDetector/InDetDigitization/SiDigitization/SiDigitization/SiChargedDiode.h index 00727f5eac6a126f2c134b5b9e6c56f56386ef2c..5184b361849273006a8877e6b04a36c76d60892e 100755 --- a/InnerDetector/InDetDigitization/SiDigitization/SiDigitization/SiChargedDiode.h +++ b/InnerDetector/InDetDigitization/SiDigitization/SiDigitization/SiChargedDiode.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -63,7 +63,7 @@ public: int flag() const; //neighbouring strip for navigation - SiChargedDiode * nextInCluster() const; + SiChargedDiode * nextInCluster(); /////////////////////////////////////////////////////////////////// // Non-const methods: /////////////////////////////////////////////////////////////////// @@ -120,7 +120,7 @@ inline double SiChargedDiode::charge() const return m_totalCharge.charge(); } -inline SiChargedDiode * SiChargedDiode::nextInCluster() const +inline SiChargedDiode * SiChargedDiode::nextInCluster() { return m_nextInCluster; } diff --git a/InnerDetector/InDetDigitization/SiDigitization/SiDigitization/SiChargedDiodeCollection.h b/InnerDetector/InDetDigitization/SiDigitization/SiDigitization/SiChargedDiodeCollection.h index 1da634de1c2267f7cd72e67de013dee9a11e08bc..4cacf39857d509ba13c44603b604cd29b2f749a8 100755 --- a/InnerDetector/InDetDigitization/SiDigitization/SiDigitization/SiChargedDiodeCollection.h +++ b/InnerDetector/InDetDigitization/SiDigitization/SiDigitization/SiChargedDiodeCollection.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -27,7 +27,6 @@ #include "Identifier/Identifiable.h" // Data member classes -#include <map> #include <unordered_map> #include "SiDigitization/SiChargedDiode.h" #include "Identifier/Identifier.h" @@ -35,6 +34,12 @@ // Input/output classes #include "InDetSimEvent/SiHit.h" + +// STL includes +#include <atomic> +#include <map> +#include <memory> + class AtlasDetectorID; namespace InDetDD{ class SiDetectorElement; @@ -153,7 +158,7 @@ class SiChargedDiodeCollection : Identifiable { //SiChargedDiodeMap is empty. SiTotalCharge::alloc_t m_allocator; SiChargedDiodeMap m_chargedDiodes; // list of SiChargedDiodes - mutable const InDetDD::SiDetectorElement *m_sielement; // detector element + const InDetDD::SiDetectorElement* m_sielement; // detector element }; /////////////////////////////////////////////////////////////////// diff --git a/InnerDetector/InDetDigitization/SiDigitization/SiDigitization/SiHelper.h b/InnerDetector/InDetDigitization/SiDigitization/SiDigitization/SiHelper.h index 56a6ea50685b9536ac29e479f009e77c61de4955..af65b4e784ad134cb020e195f02c85c5a6b71a0c 100755 --- a/InnerDetector/InDetDigitization/SiDigitization/SiDigitization/SiHelper.h +++ b/InnerDetector/InDetDigitization/SiDigitization/SiDigitization/SiHelper.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /************************************************************************* @@ -24,13 +24,6 @@ #include "AthenaKernel/getMessageSvc.h" #include "SiDigitization/SiChargedDiode.h" -namespace { - MsgStream& silog() { - static MsgStream s_log(Athena::getMessageSvc(), "SiHelper"); - return s_log; - } -} - class SiHelper { public: @@ -43,9 +36,9 @@ class SiHelper static void disconnected(SiChargedDiode& chDiode, bool flag, bool mask=false); static void maskOut(SiChargedDiode& chDiode, bool flag); static void ClusterUsed(SiChargedDiode& chDiode, bool flag); - static void SetBunch(SiChargedDiode& chDiode, int bunch); - static void SetStripNum(SiChargedDiode& chDiode, int bunch); - static void SetTimeBin(SiChargedDiode& chDiode, int time); + static void SetBunch(SiChargedDiode& chDiode, int bunch, MsgStream* log=nullptr); + static void SetStripNum(SiChargedDiode& chDiode, int nstrip, MsgStream* log=nullptr); + static void SetTimeBin(SiChargedDiode& chDiode, int time, MsgStream* log=nullptr); static bool isUsable(SiChargedDiode& chDiode); static bool isNoise(SiChargedDiode& chDiode); @@ -133,32 +126,32 @@ inline void SiHelper::ClusterUsed(SiChargedDiode& chDiode, bool flag) { } } -inline void SiHelper::SetBunch(SiChargedDiode& chDiode, int bunch) { +inline void SiHelper::SetBunch(SiChargedDiode& chDiode, int bunch, MsgStream* log) { // // Code the bunch number in the 8 bits set corresponding to xx in xx00 // if (bunch > 0xff) { - silog() << MSG::ERROR << "Bunch Number not allowed" << endmsg; + if (log) (*log) << MSG::ERROR << "Bunch Number not allowed" << endmsg; } chDiode.m_word = chDiode.m_word | ( (bunch&0xff) <<8 ) ; } -inline void SiHelper::SetStripNum(SiChargedDiode& chDiode, int nstrip) { +inline void SiHelper::SetStripNum(SiChargedDiode& chDiode, int nstrip, MsgStream* log) { // // Code the number of strips in the 12 bits set corresponding to xxx in 0xxx0000 // if (nstrip > 0xfff) { - silog() << MSG::ERROR << "Number of strips not allowed" << endmsg; + if (log) (*log) << MSG::ERROR << "Number of strips not allowed" << endmsg; } chDiode.m_word = chDiode.m_word | ((nstrip&0xfff) << 16 ) ; } -inline void SiHelper::SetTimeBin(SiChargedDiode& chDiode, int time) { +inline void SiHelper::SetTimeBin(SiChargedDiode& chDiode, int time, MsgStream* log) { // // Code the SCT Timebin number in the 3 bits set corresponding to x in x0000000 // if (time > 0xf) { - silog() << MSG::ERROR << "TimeBin not allowed" << endmsg; + if (log) (*log) << MSG::ERROR << "TimeBin not allowed" << endmsg; } chDiode.m_word = chDiode.m_word | ( (time&0xf) <<28 ) ; } diff --git a/InnerDetector/InDetDigitization/SiDigitization/src/SiChargedDiodeCollection.cxx b/InnerDetector/InDetDigitization/SiDigitization/src/SiChargedDiodeCollection.cxx index 9699fe13ead8c5be996f9122af4375fc7e5fda56..64d7192e260c40af4b7f564ee91f7da9b174bd1a 100755 --- a/InnerDetector/InDetDigitization/SiDigitization/src/SiChargedDiodeCollection.cxx +++ b/InnerDetector/InDetDigitization/SiDigitization/src/SiChargedDiodeCollection.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/InDetEventAthenaPool/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/InDetEventAthenaPool/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..5b6a560431a3db0d0e0bb715c1a8292a984f2f9b --- /dev/null +++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/InDetEventAthenaPool/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +InnerDetector/InDetEventCnv/InDetEventAthenaPool diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/InDetLowBetaCandidateCnv.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/InDetLowBetaCandidateCnv.cxx index fa83294187da74c15a6576b3e2b394be5aac4b30..8979a60dfe06bb3766753b2599873eaed6fb7926 100644 --- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/InDetLowBetaCandidateCnv.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/InDetLowBetaCandidateCnv.cxx @@ -28,7 +28,7 @@ InDetLowBetaCandidate_PERS* InDetLowBetaCandidateCnv::createPersistent(InDet::In InDet::InDetLowBetaCandidate* InDetLowBetaCandidateCnv::createTransient() { ATH_MSG_DEBUG("InDetLowBetaCandidateCnv::createTransient "); - static pool::Guid tlp1_guid("8C24589F-FBAA-4686-9254-B5C360A94733"); + const pool::Guid tlp1_guid("8C24589F-FBAA-4686-9254-B5C360A94733"); InDet::InDetLowBetaCandidate *trans_cont(0); diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/InDetLowBetaContainerCnv.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/InDetLowBetaContainerCnv.cxx index c731090f9c25dcba5e3f03c2ef415caeb2b60674..5935d17948eb72acab95747dcc259ad65da31cf2 100644 --- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/InDetLowBetaContainerCnv.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/InDetLowBetaContainerCnv.cxx @@ -30,7 +30,7 @@ InDetLowBetaContainer_PERS *InDetLowBetaContainerCnv::createPersistent(InDet::In InDet::InDetLowBetaContainer *InDetLowBetaContainerCnv::createTransient() { ATH_MSG_DEBUG("InDetLowBetaContainerCnv::createTransient called"); - static pool::Guid tlp1_guid("2EBE2034-8157-477B-B327-D37BE8A0317D"); + const pool::Guid tlp1_guid("2EBE2034-8157-477B-B327-D37BE8A0317D"); InDet::InDetLowBetaContainer *p_collection = 0; if (compareClassGuid(tlp1_guid)) { diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/InDetSimDataCollectionCnv.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/InDetSimDataCollectionCnv.cxx index 39be5b68628e14e7f37b731a0f0b0162413e2cf2..aaa95ca0363bb497236024d910cdedc7e52f2288 100644 --- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/InDetSimDataCollectionCnv.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/InDetSimDataCollectionCnv.cxx @@ -20,10 +20,10 @@ InDetSimDataCollection* InDetSimDataCollectionCnv::createTransient() { InDetSimDataCollectionCnv_p3 converter_p3; InDetSimDataCollection *trans_cont(0); - static const pool::Guid p3_guid("1430AA7B-EE92-5A41-92F3-5DD5367D6BAA"); - static const pool::Guid p2_guid("C648CA66-013D-44AC-B0D9-99BFB0060E84"); - static const pool::Guid p1_guid("333EF996-1672-4AB8-917D-187F908F1EDE"); - static const pool::Guid old_guid("5A50C32E-C036-4A49-AE97-716D53210BE1"); + const pool::Guid p3_guid("1430AA7B-EE92-5A41-92F3-5DD5367D6BAA"); + const pool::Guid p2_guid("C648CA66-013D-44AC-B0D9-99BFB0060E84"); + const pool::Guid p1_guid("333EF996-1672-4AB8-917D-187F908F1EDE"); + const pool::Guid old_guid("5A50C32E-C036-4A49-AE97-716D53210BE1"); if( this->compareClassGuid(p3_guid)) { std::auto_ptr< InDetSimDataCollection_p3 > col_vect( this->poolReadObject< InDetSimDataCollection_p3 >() ); diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/InDetTrackCnv.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/InDetTrackCnv.cxx index 718b57922360865e2bc260ba6bc78cbbeac84849..678a345f52f68ef2d89d792c430cba395f96b06c 100644 --- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/InDetTrackCnv.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/InDetTrackCnv.cxx @@ -32,8 +32,8 @@ StatusCode InDetTrackCnv::initialize() void InDetTrackCnv::readObjectFromPool( const std::string& token ) { - static pool::Guid p2_guid( "4E3778E2-1497-4F10-8746-AA02319FAC83" ); - static pool::Guid p1_guid( "8380F7AC-4A8F-4382-95A5-1234E43D3B08" ); + const pool::Guid p2_guid( "4E3778E2-1497-4F10-8746-AA02319FAC83" ); + const pool::Guid p1_guid( "8380F7AC-4A8F-4382-95A5-1234E43D3B08" ); // set the POOL token which will be used for reading from POOL setToken( token ); diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelClusterContainerCnv.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelClusterContainerCnv.cxx index 8504cdc5a64a1514e61584177d0b82e840b8a930..f3bc60d9f8258c0516eca3c4bf1b587fa7af57ac 100644 --- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelClusterContainerCnv.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelClusterContainerCnv.cxx @@ -66,10 +66,10 @@ StatusCode PixelClusterContainerCnv::initialize() { InDet::PixelClusterContainer* PixelClusterContainerCnv::createTransient() { - static pool::Guid p0_guid("37B00A31-EA80-45DF-9A3F-2721EC0F0DA6"); // before t/p split - static pool::Guid p1_guid("9DB54746-8C4E-4A56-8B4C-0E5D42905218"); // with PixelCluster_tlp1 - static pool::Guid p2_guid("DE48E26B-9E03-4EAD-86B9-351AD88D060E"); // with pixelCluster_p2 - static pool::Guid p3_guid("7BF0F163-B227-434C-86A6-16130E005E6C"); // with pixelCluster_p3 + const pool::Guid p0_guid("37B00A31-EA80-45DF-9A3F-2721EC0F0DA6"); // before t/p split + const pool::Guid p1_guid("9DB54746-8C4E-4A56-8B4C-0E5D42905218"); // with PixelCluster_tlp1 + const pool::Guid p2_guid("DE48E26B-9E03-4EAD-86B9-351AD88D060E"); // with pixelCluster_p2 + const pool::Guid p3_guid("7BF0F163-B227-434C-86A6-16130E005E6C"); // with pixelCluster_p3 ATH_MSG_DEBUG("createTransient(): main converter"); InDet::PixelClusterContainer* p_collection(0); if( compareClassGuid(p3_guid) ) { diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelGangedClusterAmbiguitiesCnv.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelGangedClusterAmbiguitiesCnv.cxx index 12bf6d5a06a4ad21b0728a26ec6b3f4899df7ddc..26699ff884359890ab08cfc87051302f97df50da 100644 --- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelGangedClusterAmbiguitiesCnv.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelGangedClusterAmbiguitiesCnv.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /** @@ -10,24 +10,22 @@ #include "PixelGangedClusterAmbiguitiesCnv.h" #include "InDetEventTPCnv/InDetPrepRawData/PixelGangedClusterAmbiguities_p1.h" -#include "InDetEventTPCnv/InDetPrepRawData/PixelGangedClusterAmbiguitiesCnv_p1.h" -static PixelGangedClusterAmbiguitiesCnv_p1 TPconverter; PixelGangedClusterAmbiguities_PERS* PixelGangedClusterAmbiguitiesCnv::createPersistent(InDet::PixelGangedClusterAmbiguities* transObj) { ATH_MSG_DEBUG("PixelGangedClusterAmbiguities write"); - PixelGangedClusterAmbiguities_PERS *persObj = TPconverter.createPersistent( transObj, msg() ); + PixelGangedClusterAmbiguities_PERS *persObj = m_TPconverter.createPersistent( transObj, msg() ); ATH_MSG_DEBUG("Success"); return persObj; } InDet::PixelGangedClusterAmbiguities* PixelGangedClusterAmbiguitiesCnv::createTransient() { - static pool::Guid p1_guid("FE36CE7E-EADF-481F-A55A-26DA0030DFAA"); -// static pool::Guid p0_guid("380D8BB9-B34F-470F-92CC-06C3D60F7BE4"); + const pool::Guid p1_guid("FE36CE7E-EADF-481F-A55A-26DA0030DFAA"); +// const pool::Guid p0_guid("380D8BB9-B34F-470F-92CC-06C3D60F7BE4"); if( compareClassGuid(p1_guid) ) { // using unique_ptr ensures deletion of the persistent object std::unique_ptr< InDet::PixelGangedClusterAmbiguities_p1 > col_vect( poolReadObject< InDet::PixelGangedClusterAmbiguities_p1 >() ); ATH_MSG_DEBUG("Reading PixelGangedClusterAmbiguities_p1"); - return TPconverter.createTransient( col_vect.get(), msg() ); + return m_TPconverter.createTransient( col_vect.get(), msg() ); } // else if( compareClassGuid(p0_guid) ) { // dont think there was a "before T/P" split converter diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelGangedClusterAmbiguitiesCnv.h b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelGangedClusterAmbiguitiesCnv.h index 758951702bf4292826e727a9b549aadd49f7366f..0544c746e312519f2d0ce96c80bd14db217538b8 100644 --- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelGangedClusterAmbiguitiesCnv.h +++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelGangedClusterAmbiguitiesCnv.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /** @@ -14,6 +14,7 @@ #include "AthenaPoolCnvSvc/T_AthenaPoolCustomCnv.h" #include "InDetPrepRawData/PixelGangedClusterAmbiguities.h" #include "InDetEventTPCnv/InDetPrepRawData/PixelGangedClusterAmbiguities_p1.h" +#include "InDetEventTPCnv/InDetPrepRawData/PixelGangedClusterAmbiguitiesCnv_p1.h" // the latest persistent representation type of PixelGangedClusterAmbiguities typedef InDet::PixelGangedClusterAmbiguities_p1 PixelGangedClusterAmbiguities_PERS; @@ -27,6 +28,8 @@ public: protected: virtual PixelGangedClusterAmbiguities_PERS* createPersistent (InDet::PixelGangedClusterAmbiguities* transObj); virtual InDet::PixelGangedClusterAmbiguities* createTransient (); +private: + PixelGangedClusterAmbiguitiesCnv_p1 m_TPconverter; }; #endif diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelRDO_ContainerCnv.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelRDO_ContainerCnv.cxx index 4d922261b3337d737fb1f727ea53ad14884bbfab..a9558b57ac05100347a19deb3070b0b1dc7743b2 100644 --- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelRDO_ContainerCnv.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelRDO_ContainerCnv.cxx @@ -123,9 +123,9 @@ PixelRDO_Container_PERS* PixelRDO_ContainerCnv::createPersistent(PixelRDO_Contai //================================================================ PixelRDO_Container* PixelRDO_ContainerCnv::createTransient() { - static pool::Guid p0_guid("7F2C09B6-0B47-4957-8BBA-EDC665A290AC"); // with Pixel1RawData - static pool::Guid TP1_guid("DA76970C-E019-43D2-B2F9-25660DCECD9D"); // for t/p separated version with InDetRawDataContainer_p1 - static pool::Guid TP2_guid("7138342E-0A80-4A32-A387-2842A01C2539"); // for t/p separated version with InDetRawDataContainer_p2 + const pool::Guid p0_guid("7F2C09B6-0B47-4957-8BBA-EDC665A290AC"); // with Pixel1RawData + const pool::Guid TP1_guid("DA76970C-E019-43D2-B2F9-25660DCECD9D"); // for t/p separated version with InDetRawDataContainer_p1 + const pool::Guid TP2_guid("7138342E-0A80-4A32-A387-2842A01C2539"); // for t/p separated version with InDetRawDataContainer_p2 ATH_MSG_DEBUG("createTransient(): main converter"); if( compareClassGuid(TP2_guid) ) { diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_ClusterContainerCnv.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_ClusterContainerCnv.cxx index 0818e7b2c89c7311aee68be7474d4309cdc4a616..4ce7fb35838d467cc92dfcbc13cbccb008195bde 100644 --- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_ClusterContainerCnv.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_ClusterContainerCnv.cxx @@ -69,10 +69,10 @@ StatusCode SCT_ClusterContainerCnv::initialize() { InDet::SCT_ClusterContainer* SCT_ClusterContainerCnv::createTransient() { // MsgStream log(msgSvc(), "SCT_ClusterContainerCnv" ); - static pool::Guid p0_guid("A180F372-0D52-49C3-8AA0-0939CB0B8179"); // before t/p split - static pool::Guid p1_guid("657F6546-F5CD-4166-9567-16AD9C96D286"); // with SCT_Cluster_tlp1 - static pool::Guid p2_guid("ECE7D831-0F31-4E6F-A6BE-2ADDE90083BA"); // with SCT_Cluster_p2 - static pool::Guid p3_guid("623F5836-369F-4A94-9DD4-DAD728E93C13"); // with SCT_Cluster_p3 + const pool::Guid p0_guid("A180F372-0D52-49C3-8AA0-0939CB0B8179"); // before t/p split + const pool::Guid p1_guid("657F6546-F5CD-4166-9567-16AD9C96D286"); // with SCT_Cluster_tlp1 + const pool::Guid p2_guid("ECE7D831-0F31-4E6F-A6BE-2ADDE90083BA"); // with SCT_Cluster_p2 + const pool::Guid p3_guid("623F5836-369F-4A94-9DD4-DAD728E93C13"); // with SCT_Cluster_p3 //ATH_MSG_DEBUG("createTransient(): main converter"); InDet::SCT_ClusterContainer* p_collection(nullptr); diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_FlaggedCondDataCnv.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_FlaggedCondDataCnv.cxx index d9224ba12851cae052f0412750fd50b75a852c6d..299160dca6baac013784be1836b545ae5542ebfc 100644 --- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_FlaggedCondDataCnv.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_FlaggedCondDataCnv.cxx @@ -24,7 +24,7 @@ SCT_FlaggedCondDataCnv::createPersistent(SCT_FlaggedCondData* transCont) { SCT_FlaggedCondData* SCT_FlaggedCondDataCnv::createTransient() { MsgStream log(msgSvc(), "SCT_FlaggedCondDataCnv"); - static pool::Guid p1_guid("0C10E502-F02B-440B-9E8F-6A8C31915D7C"); + const pool::Guid p1_guid("0C10E502-F02B-440B-9E8F-6A8C31915D7C"); if (compareClassGuid(p1_guid)) { /** using auto_ptr ensures deletion of the persistent object */ std::auto_ptr<SCT_FlaggedCondData_p1> col_vect( poolReadObject< SCT_FlaggedCondData_p1 >() ); diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_RDO_ContainerCnv.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_RDO_ContainerCnv.cxx index 74a877fda4ac40c994113ececfaafc2a3c034a76..3e16fae0d1553a0f3db43e9b6fa773b9fdfc4809 100644 --- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_RDO_ContainerCnv.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_RDO_ContainerCnv.cxx @@ -143,12 +143,12 @@ SCT_RDO_Container_PERS* SCT_RDO_ContainerCnv::createPersistent(SCT_RDO_Container //================================================================ SCT_RDO_Container* SCT_RDO_ContainerCnv::createTransient() { - static pool::Guid p0_guid("B82A1D11-3F86-4F07-B380-B61BA2DAF3A9"); // with SCT1_RawData - static pool::Guid TP1_guid("DA76970C-E019-43D2-B2F9-25660DCECD9D"); // for t/p separated version with InDetRawDataContainer_p1 - static pool::Guid SCT_TP1_guid("8E13963E-13E5-4D10-AA8B-73F00AFF8FA8"); // for t/p separated version with SCT_RawDataContainer_p1 - static pool::Guid SCT_TP2_guid("D1258125-2CBA-476E-8578-E09D54F477E1"); // for t/p separated version with SCT_RawDataContainer_p2 - static pool::Guid SCT_TP3_guid("5FBC8D4D-7B4D-433A-8487-0EA0C870CBDB"); // for t/p separated version with SCT_RawDataContainer_p3 - static pool::Guid SCT_TP4_guid("6C7540BE-E85C-4777-BC1C-A9FF11460F54"); // for t/p separated version with SCT_RawDataContainer_p4 + const pool::Guid p0_guid("B82A1D11-3F86-4F07-B380-B61BA2DAF3A9"); // with SCT1_RawData + const pool::Guid TP1_guid("DA76970C-E019-43D2-B2F9-25660DCECD9D"); // for t/p separated version with InDetRawDataContainer_p1 + const pool::Guid SCT_TP1_guid("8E13963E-13E5-4D10-AA8B-73F00AFF8FA8"); // for t/p separated version with SCT_RawDataContainer_p1 + const pool::Guid SCT_TP2_guid("D1258125-2CBA-476E-8578-E09D54F477E1"); // for t/p separated version with SCT_RawDataContainer_p2 + const pool::Guid SCT_TP3_guid("5FBC8D4D-7B4D-433A-8487-0EA0C870CBDB"); // for t/p separated version with SCT_RawDataContainer_p3 + const pool::Guid SCT_TP4_guid("6C7540BE-E85C-4777-BC1C-A9FF11460F54"); // for t/p separated version with SCT_RawDataContainer_p4 #ifdef SCT_DEBUG ATH_MSG_DEBUG("createTransient(): main converter"); diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_DriftCircleContainerCnv.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_DriftCircleContainerCnv.cxx index 23d13c3cbc9d8a4ccf1d4db24ef09da79c1c5c27..986cdee679239d4a18276252a31eb0cbd642e64e 100644 --- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_DriftCircleContainerCnv.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_DriftCircleContainerCnv.cxx @@ -66,9 +66,9 @@ StatusCode TRT_DriftCircleContainerCnv::initialize() { InDet::TRT_DriftCircleContainer* TRT_DriftCircleContainerCnv::createTransient() { - static pool::Guid p0_guid("A99630C5-3D7C-4DB4-9E6C-FC3CEF981895"); // before t/p split - static pool::Guid p1_guid("42B48D79-AF4E-4D45-AAA9-A2BA5A033534"); // with TRT_DriftCircle_tlp1 - static pool::Guid p2_guid("36195EDE-941C-424B-81A1-E04C867C35D8"); // with TRT_DriftCircle_p2 + const pool::Guid p0_guid("A99630C5-3D7C-4DB4-9E6C-FC3CEF981895"); // before t/p split + const pool::Guid p1_guid("42B48D79-AF4E-4D45-AAA9-A2BA5A033534"); // with TRT_DriftCircle_tlp1 + const pool::Guid p2_guid("36195EDE-941C-424B-81A1-E04C867C35D8"); // with TRT_DriftCircle_p2 ATH_MSG_DEBUG("createTransient(): main converter"); InDet::TRT_DriftCircleContainer* p_collection(0); if( compareClassGuid(p2_guid) ) { diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_RDO_ContainerCnv.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_RDO_ContainerCnv.cxx index 1004b4dc54d856def9761c1c8f374d8a663cf43e..0f39ff830d8a60687be355572024c7f633a42ab2 100644 --- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_RDO_ContainerCnv.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_RDO_ContainerCnv.cxx @@ -122,10 +122,10 @@ TRT_RDO_Container_PERS* TRT_RDO_ContainerCnv::createPersistent(TRT_RDO_Container //================================================================ TRT_RDO_Container* TRT_RDO_ContainerCnv::createTransient() { - static pool::Guid p0_guid("5DB01CED-F6FD-4866-A1C6-E046641E44F5"); // with TRT_LoLumRawData - static pool::Guid p1_guid("CFBDB7A8-C788-4EE7-A260-3C8B680234FE"); // with TRT_RDORawData - static pool::Guid TP1_guid("DA76970C-E019-43D2-B2F9-25660DCECD9D"); // for t/p separated version with InDetRawDataContainer_p1 - static pool::Guid TP2_guid("7138342E-0A80-4A32-A387-2842A01C2539"); // for t/p separated version with InDetRawDataContainer_p2 + const pool::Guid p0_guid("5DB01CED-F6FD-4866-A1C6-E046641E44F5"); // with TRT_LoLumRawData + const pool::Guid p1_guid("CFBDB7A8-C788-4EE7-A260-3C8B680234FE"); // with TRT_RDORawData + const pool::Guid TP1_guid("DA76970C-E019-43D2-B2F9-25660DCECD9D"); // for t/p separated version with InDetRawDataContainer_p1 + const pool::Guid TP2_guid("7138342E-0A80-4A32-A387-2842A01C2539"); // for t/p separated version with InDetRawDataContainer_p2 ATH_MSG_DEBUG("createTransient(): main converter"); if( compareClassGuid(TP2_guid) ) { diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_RDO_ContainerCnv_p1.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_RDO_ContainerCnv_p1.cxx index c6798a99dd2b521bc99e54e561addb5a747e6413..f3241b70bebff63a959d033620a1165f9a58c0c4 100644 --- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_RDO_ContainerCnv_p1.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_RDO_ContainerCnv_p1.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // Andrei Gaponenko <agaponenko@lbl.gov>, 2006 @@ -58,7 +58,7 @@ namespace { } //================================================================ -void TRT_RDO_ContainerCnv_p1::transToPers(const TRT_RDO_Container* trans, TRT_RDO_Container_p1* pers, MsgStream &log) { +void TRT_RDO_ContainerCnv_p1::transToPers ATLAS_NOT_THREAD_SAFE (const TRT_RDO_Container* trans, TRT_RDO_Container_p1* pers, MsgStream &log) { // Copy objects from InDetRawDataContainer collections to simple vector unsigned null_count(0); diff --git a/InnerDetector/InDetEventCnv/InDetEventCnvTools/InDetEventCnvTools/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetEventCnv/InDetEventCnvTools/InDetEventCnvTools/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..6b4bfcdb64050788bc3c8244aea37519200282ef --- /dev/null +++ b/InnerDetector/InDetEventCnv/InDetEventCnvTools/InDetEventCnvTools/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +InnerDetector/InDetEventCnv/InDetEventCnvTools diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/InDetEventTPCnv/InDetLowBetaInfo/InDetLowBetaCandidateCnv_tlp1.h b/InnerDetector/InDetEventCnv/InDetEventTPCnv/InDetEventTPCnv/InDetLowBetaInfo/InDetLowBetaCandidateCnv_tlp1.h index 83c1e0a38edea08073c10c671ccbb9198b0883ea..abc0586e40890d68a339412ce482765ee3bc23f4 100644 --- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/InDetEventTPCnv/InDetLowBetaInfo/InDetLowBetaCandidateCnv_tlp1.h +++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/InDetEventTPCnv/InDetLowBetaInfo/InDetLowBetaCandidateCnv_tlp1.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef InDetLowBetaCandidateCnv_TLP1_H diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetLowBetaInfo/InDetLowBetaCandidateCnv_tlp1.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetLowBetaInfo/InDetLowBetaCandidateCnv_tlp1.cxx index a6da6b05f8f16899dc097bf206fea5ee1c1385ba..009a96b38816f3b4ad78d7ad82be01d8d3bd16e3 100644 --- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetLowBetaInfo/InDetLowBetaCandidateCnv_tlp1.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetLowBetaInfo/InDetLowBetaCandidateCnv_tlp1.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "InDetEventTPCnv/InDetLowBetaInfo/InDetLowBetaCandidateCnv_tlp1.h" @@ -16,7 +16,7 @@ void InDetLowBetaCandidateCnv_tlp1::setPStorage(InDetLowBetaCandidate_tlp1* stor } -void T_TPCnv<InDet::InDetLowBetaCandidate, InDetLowBetaCandidate_tlp1 >::persToTrans(const InDetLowBetaCandidate_tlp1 *pers, +void T_TPCnv<InDet::InDetLowBetaCandidate, InDetLowBetaCandidate_tlp1 >::persToTrans ATLAS_NOT_THREAD_SAFE (const InDetLowBetaCandidate_tlp1 *pers, InDet::InDetLowBetaCandidate *trans, MsgStream &msg) { setPStorage(const_cast<InDetLowBetaCandidate_tlp1*>(pers)); diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetLowBetaInfo/InDetLowBetaContainerCnv_tlp1.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetLowBetaInfo/InDetLowBetaContainerCnv_tlp1.cxx index 5fc314510efb95e3a72d13320dbbf66c391344fe..8c32046c88637126d1b32b133289daf2b49492e5 100644 --- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetLowBetaInfo/InDetLowBetaContainerCnv_tlp1.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetLowBetaInfo/InDetLowBetaContainerCnv_tlp1.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "InDetEventTPCnv/InDetLowBetaInfo/InDetLowBetaContainerCnv_tlp1.h" @@ -21,7 +21,7 @@ void InDetLowBetaContainerCnv_tlp1::setPStorage( } void T_TPCnv<InDet::InDetLowBetaContainer, InDetLowBetaContainer_tlp1>:: -persToTrans (const InDetLowBetaContainer_tlp1 *pers, +persToTrans ATLAS_NOT_THREAD_SAFE (const InDetLowBetaContainer_tlp1 *pers, InDet::InDetLowBetaContainer *trans, MsgStream &msg) { this->setTLPersObject(const_cast<InDetLowBetaContainer_tlp1*>(pers)); diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetPrepRawData/PixelGangedClusterAmbiguitiesCnv_p1.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetPrepRawData/PixelGangedClusterAmbiguitiesCnv_p1.cxx index e88a6af7f1ea1f15db49cefbdd7904b64f74caab..140c825e10f2a30c16a2694b1bc8536a2e9fab70 100644 --- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetPrepRawData/PixelGangedClusterAmbiguitiesCnv_p1.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetPrepRawData/PixelGangedClusterAmbiguitiesCnv_p1.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "InDetPrepRawData/PixelGangedClusterAmbiguities.h" @@ -22,7 +22,8 @@ #include "AthenaKernel/IThinningSvc.h" -void PixelGangedClusterAmbiguitiesCnv_p1::transToPers(const InDet::PixelGangedClusterAmbiguities* transObj, InDet::PixelGangedClusterAmbiguities_p1* persObj, MsgStream &log) +void PixelGangedClusterAmbiguitiesCnv_p1::transToPers ATLAS_NOT_THREAD_SAFE +(const InDet::PixelGangedClusterAmbiguities* transObj, InDet::PixelGangedClusterAmbiguities_p1* persObj, MsgStream &log) { // if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << " *** Writing InDet::PixelGangedClusterAmbiguities" << endmsg; diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetRIO_OnTrack/PixelClusterOnTrackCnv_p2.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetRIO_OnTrack/PixelClusterOnTrackCnv_p2.cxx index cfed0f93cffddc1118e76615d51534db9e8a97fa..05bb16bd4a89270ec462d6c403cb98afa7ad937b 100644 --- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetRIO_OnTrack/PixelClusterOnTrackCnv_p2.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetRIO_OnTrack/PixelClusterOnTrackCnv_p2.cxx @@ -52,38 +52,24 @@ void PixelClusterOnTrackCnv_p2::persToTrans( const InDet::PixelClusterOnTrack_p2 void PixelClusterOnTrackCnv_p2::transToPers( const InDet::PixelClusterOnTrack *transObj, InDet::PixelClusterOnTrack_p2 *persObj, MsgStream &log ) { - - const Trk::RIO_OnTrack* tobj = static_cast<const Trk::RIO_OnTrack *>(transObj); - m_eventCnvTool->prepareRIO_OnTrack(const_cast<Trk::RIO_OnTrack *>(tobj)); - //m_eventCnvTool->prepareRIO_OnTrack(const_cast<Trk::RIO_OnTrack *>(transObj)); - persObj->m_id = transObj->identify().get_compact(); - persObj->m_localParams = toPersistent( &m_localParCnv, &transObj->localParameters(), log ); - Trk::ErrorMatrix pMat; - EigenHelpers::eigenMatrixToVector(pMat.values, transObj->localCovariance(), "PixelClusterOnTrackCnv_p2"); - persObj->m_localErrMat = toPersistent( &m_errorMxCnv, &pMat, log ); - - persObj->m_idDE = transObj->idDE(); - persObj->m_isbroad = transObj->isBroadCluster(); - - persObj->m_hasClusterAmbiguity = transObj->hasClusterAmbiguity(); - persObj->m_isFake = transObj->isFake(); - persObj->m_energyLoss = transObj->energyLoss(); - - if(!transObj->prepRawDataLink().dataID().empty()){ - persObj->m_prdLink.m_contName = transObj->prepRawDataLink().dataID(); - persObj->m_prdLink.m_elementIndex = transObj->prepRawDataLink().index(); - }else{ - persObj->m_prdLink.m_contName = ""; - persObj->m_prdLink.m_elementIndex = 0; - } - - //std::cout << "PixelClusterOnTrackCnv_p2::transToPers() " - // << transObj->m_identifier - // << " [" << transObj->m_rio.dataID() << "/" << transObj->m_rio.index() << "]" - // << ": " << persObj->m_prdLink.m_contName - // << " (" << persObj->m_prdLink.m_elementIndex - // << ")" << std::endl; - //transObj->dump(std::cout) << std::endl; + if (transObj==nullptr or persObj==nullptr) return; + + persObj->m_id = transObj->identify().get_compact(); + persObj->m_localParams = toPersistent( &m_localParCnv, &transObj->localParameters(), log ); + Trk::ErrorMatrix pMat; + EigenHelpers::eigenMatrixToVector(pMat.values, transObj->localCovariance(), "PixelClusterOnTrackCnv_p2"); + persObj->m_localErrMat = toPersistent( &m_errorMxCnv, &pMat, log ); + persObj->m_idDE = transObj->idDE(); + persObj->m_isbroad = transObj->isBroadCluster(); + persObj->m_hasClusterAmbiguity = transObj->hasClusterAmbiguity(); + persObj->m_isFake = transObj->isFake(); + persObj->m_energyLoss = transObj->energyLoss(); + + const std::string pixelClusContName{"PixelClusters"}; + ElementLink<InDet::PixelClusterContainer>::index_type hashAndIndex{0}; + bool isFound{m_eventCnvTool->getHashAndIndex<InDet::PixelClusterContainer, InDet::PixelClusterOnTrack>(transObj, pixelClusContName, hashAndIndex)}; + persObj->m_prdLink.m_contName = (isFound ? pixelClusContName : ""); + persObj->m_prdLink.m_elementIndex = hashAndIndex; } StatusCode PixelClusterOnTrackCnv_p2::initialize(MsgStream &/*log*/) { diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetRIO_OnTrack/TRT_DriftCircleOnTrackCnv_p2.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetRIO_OnTrack/TRT_DriftCircleOnTrackCnv_p2.cxx index 7abd3842ef0a5e3ee51b6b0de3303d7c29d25fa3..b71543888021909ff52785c39cebde3ff2d52b48 100644 --- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetRIO_OnTrack/TRT_DriftCircleOnTrackCnv_p2.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetRIO_OnTrack/TRT_DriftCircleOnTrackCnv_p2.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ //----------------------------------------------------------------------------- @@ -48,38 +48,24 @@ void TRT_DriftCircleOnTrackCnv_p2::persToTrans( const InDet::TRT_DriftCircleOnTr void TRT_DriftCircleOnTrackCnv_p2::transToPers( const InDet::TRT_DriftCircleOnTrack *transObj, InDet::TRT_DriftCircleOnTrack_p2 *persObj, MsgStream &log) { - //std::cout<<"WRITING TRT_DriftCircleOnTrackCnv_p2"<<std::endl; - const Trk::RIO_OnTrack* tobj = static_cast<const Trk::RIO_OnTrack *>(transObj); - m_eventCnvTool->prepareRIO_OnTrack(const_cast<Trk::RIO_OnTrack *>(tobj)); - // persObj->m_RIO = baseToPersistent( &m_RIOCnv, transObj, log ); - persObj->m_id = transObj->identify().get_identifier32().get_compact(); - persObj->m_localParams = toPersistent( &m_localParCnv, &transObj->localParameters(), log ); - Trk::ErrorMatrix pMat; - EigenHelpers::eigenMatrixToVector(pMat.values, transObj->localCovariance(), "TRT_DriftCircleOnTrackCnv_p2"); - persObj->m_localErrMat = toPersistent( &m_errorMxCnv, &pMat, log ); - // m_globalPosition - transient? - - persObj->m_idDE = transObj->idDE(); - persObj->m_status = static_cast<unsigned int>( transObj->status() ); - persObj->m_highLevel = transObj->highLevel(); - -//new variables - persObj->m_localAngle = transObj->localAngle(); - persObj->m_positionAlongWire = transObj->positionAlongWire(); - - // added in 12.5 - persObj->m_timeOverThreshold = (float) transObj->timeOverThreshold(); -// m_elementLinkConverter.resetForCnv(persObj->m_elementLinkToIDCTRT_DriftCircleContainerNames); -// m_elementLinkConverter.transToPers(&transObj->m_rio,&persObj->m_elementLinkToIDCTRT_DriftCircleContainer,log); - //m_elCnv.transToPers(&transObj->m_rio,&persObj->m_prdLink,log); - - if (!transObj->prepRawDataLink().dataID().empty()) { - persObj->m_prdLink.m_contName = transObj->prepRawDataLink().dataID();// New suggestion from RD - above crashes - persObj->m_prdLink.m_elementIndex = transObj->prepRawDataLink().index(); - }else{ - persObj->m_prdLink.m_contName = ""; - persObj->m_prdLink.m_elementIndex = 0; - } + if (transObj==nullptr or persObj==nullptr) return; + persObj->m_id = transObj->identify().get_identifier32().get_compact(); + persObj->m_localParams = toPersistent( &m_localParCnv, &transObj->localParameters(), log ); + Trk::ErrorMatrix pMat; + EigenHelpers::eigenMatrixToVector(pMat.values, transObj->localCovariance(), "TRT_DriftCircleOnTrackCnv_p2"); + persObj->m_localErrMat = toPersistent( &m_errorMxCnv, &pMat, log ); + persObj->m_idDE = transObj->idDE(); + persObj->m_status = static_cast<unsigned int>( transObj->status() ); + persObj->m_highLevel = transObj->highLevel(); + persObj->m_localAngle = transObj->localAngle(); + persObj->m_positionAlongWire = transObj->positionAlongWire(); + // added in 12.5 + persObj->m_timeOverThreshold = static_cast<float>(transObj->timeOverThreshold()); + const std::string trtCircleContName{"TRT_DriftCircles"}; + ElementLink<InDet::TRT_DriftCircleContainer>::index_type hashAndIndex{0}; + bool isFound{m_eventCnvTool->getHashAndIndex<InDet::TRT_DriftCircleContainer, InDet::TRT_DriftCircleOnTrack>(transObj, trtCircleContName, hashAndIndex)}; + persObj->m_prdLink.m_contName = (isFound ? trtCircleContName : ""); + persObj->m_prdLink.m_elementIndex = hashAndIndex; } diff --git a/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..1f133e2fc831055f0f64826654a4d559a048ba6b --- /dev/null +++ b/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD diff --git a/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/share/InDetDxAOD.py b/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/share/InDetDxAOD.py index b757c825632442e6f342dd82d02828f45ba78859..6b51841abe78d7f6084c994bf3707368deacfbbc 100644 --- a/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/share/InDetDxAOD.py +++ b/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/share/InDetDxAOD.py @@ -419,7 +419,7 @@ if dumpPixInfo: from AthenaCommon.AppMgr import ToolSvc if not hasattr(ToolSvc, "PixelLorentzAngleTool"): - from SiLorentzAngleSvc.PixelLorentzAngleToolSetup import PixelLorentzAngleToolSetup + from SiLorentzAngleTool.PixelLorentzAngleToolSetup import PixelLorentzAngleToolSetup pixelLorentzAngleToolSetup = PixelLorentzAngleToolSetup() from InDetPrepRawDataToxAOD.InDetPrepRawDataToxAODConf import PixelPrepDataToxAOD diff --git a/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/SCT_RawDataToxAOD.cxx b/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/SCT_RawDataToxAOD.cxx index 25ab40b25deb6c25ddae7bc3beee066bed3b2865..345d2abbc209349563b700d7bb3b488a00806f6b 100644 --- a/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/SCT_RawDataToxAOD.cxx +++ b/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/SCT_RawDataToxAOD.cxx @@ -29,14 +29,6 @@ StatusCode SCT_RawDataToxAOD::initialize() { return StatusCode::SUCCESS; } -// define accessors used by execute method; defining them once means fewer -// string comparisons. -static SG::AuxElement::Accessor<int> bec_acc("bec"); -static SG::AuxElement::Accessor<int> layer_acc("layer"); -static SG::AuxElement::Accessor<int> phi_module_acc("phi_module"); -static SG::AuxElement::Accessor<int> eta_module_acc("eta_module"); -static SG::AuxElement::Accessor<int> side_acc("side"); - StatusCode SCT_RawDataToxAOD::execute(const EventContext& ctx) const { SG::ReadHandle<SCT_RDO_Container> rdoContainer(m_rdoContainerName, ctx); @@ -56,11 +48,11 @@ StatusCode SCT_RawDataToxAOD::execute(const EventContext& ctx) const { xrdo->setIdentifier(id.get_compact()); xrdo->setWord(rdo->getWord()); // setting additional decorations based on identifier - bec_acc(*xrdo) = m_SCTHelper->barrel_ec(id); - layer_acc(*xrdo) = m_SCTHelper->layer_disk(id); - phi_module_acc(*xrdo) = m_SCTHelper->phi_module(id); - eta_module_acc(*xrdo) = m_SCTHelper->eta_module(id); - side_acc(*xrdo) = m_SCTHelper->side(id); + xrdo->setBec(m_SCTHelper->barrel_ec(id)); + xrdo->setLayer(m_SCTHelper->layer_disk(id)); + xrdo->setPhi_module(m_SCTHelper->phi_module(id)); + xrdo->setEta_module(m_SCTHelper->eta_module(id)); + xrdo->setSide(m_SCTHelper->side(id)); } } ATH_MSG_DEBUG(" recorded SCT_RawData objects: size " << xaod->size()); diff --git a/InnerDetector/InDetEventCnv/InDetSimEventAthenaPool/CMakeLists.txt b/InnerDetector/InDetEventCnv/InDetSimEventAthenaPool/CMakeLists.txt index a66d9c330e5d4e1588246387e1d2dde155adccaf..1f012ea1101e610cffeebddf0dc35e70f24ab4fc 100644 --- a/InnerDetector/InDetEventCnv/InDetSimEventAthenaPool/CMakeLists.txt +++ b/InnerDetector/InDetEventCnv/InDetSimEventAthenaPool/CMakeLists.txt @@ -44,7 +44,7 @@ find_package( AthenaPoolUtilitiesTest ) if( ATHENAPOOLUTILITIESTEST_FOUND ) set( INDETSIMEVENTATHENAPOOL_REFERENCE_TAG - InDetSimEventAthenaPoolReference-01-00-00 ) + InDetSimEventAthenaPoolReference-02-00-00 ) run_tpcnv_test( InDetSimEventTPCnv_HITS HITS.04919495._000416 REFERENCE_TAG ${INDETSIMEVENTATHENAPOOL_REFERENCE_TAG} ) else() diff --git a/InnerDetector/InDetEventCnv/InDetSimEventAthenaPool/InDetSimEventAthenaPool/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetEventCnv/InDetSimEventAthenaPool/InDetSimEventAthenaPool/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..3435c2b014f1552041bc1394f64a54c53b8b601a --- /dev/null +++ b/InnerDetector/InDetEventCnv/InDetSimEventAthenaPool/InDetSimEventAthenaPool/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +InnerDetector/InDetEventCnv/InDetSimEventAthenaPool diff --git a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/InDetSimEventTPCnv/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/InDetSimEventTPCnv/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..fd6bc537d7ca9a56fdede67e4dc981d541d963ee --- /dev/null +++ b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/InDetSimEventTPCnv/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +InnerDetector/InDetEventCnv/InDetSimEventTPCnv diff --git a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/share/SiHitCnv_p1_test.ref b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/share/SiHitCnv_p1_test.ref index 6a0927bf3bfd71b47909f10725590944a6daf6ef..eebebda9e1c21057cb9e97fc3b87abf511644ffd 100644 --- a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/share/SiHitCnv_p1_test.ref +++ b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/share/SiHitCnv_p1_test.ref @@ -13,4 +13,4 @@ test1 ClassIDSvc INFO getRegistryEntries: read 1130 CLIDRegistry entries for module ALL ProxyProviderSvc INFO Initializing ProxyProviderSvc - package version SGComps-00-00-00 ClassIDSvc INFO getRegistryEntries: read 869 CLIDRegistry entries for module ALL -HepMcParticleLink INFO find_hostkey: Using TruthEvent as McEventCollection key for this job +HepMcParticleLink INFO find_proxy: Using TruthEvent as McEventCollection key for this job diff --git a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/share/SiHitCollectionCnv_p2_test.ref b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/share/SiHitCollectionCnv_p2_test.ref index 8633d8ace9b4883a00f6e29e68937582b9b5e684..4a7c11977bb121447c32603da54a83a704e8898b 100644 --- a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/share/SiHitCollectionCnv_p2_test.ref +++ b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/share/SiHitCollectionCnv_p2_test.ref @@ -5,4 +5,4 @@ HistogramPersis...WARNING Histograms saving not required. ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr Ready test1 -HepMcParticleLink INFO find_hostkey: Using TruthEvent as McEventCollection key for this job +HepMcParticleLink INFO find_proxy: Using TruthEvent as McEventCollection key for this job diff --git a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/share/SiHitCollectionCnv_p3_test.ref b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/share/SiHitCollectionCnv_p3_test.ref index fe4376f9b7e70f5801e812e27c71878ba71926e3..ee9824a396e67d03d1e160e1c58bafc36c733971 100644 --- a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/share/SiHitCollectionCnv_p3_test.ref +++ b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/share/SiHitCollectionCnv_p3_test.ref @@ -5,4 +5,4 @@ HistogramPersis...WARNING Histograms saving not required. ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr Ready test1 -HepMcParticleLink INFO find_hostkey: Using TruthEvent as McEventCollection key for this job +HepMcParticleLink INFO find_proxy: Using TruthEvent as McEventCollection key for this job diff --git a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/share/TRT_HitCnv_p1_test.ref b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/share/TRT_HitCnv_p1_test.ref index 8633d8ace9b4883a00f6e29e68937582b9b5e684..4a7c11977bb121447c32603da54a83a704e8898b 100644 --- a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/share/TRT_HitCnv_p1_test.ref +++ b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/share/TRT_HitCnv_p1_test.ref @@ -5,4 +5,4 @@ HistogramPersis...WARNING Histograms saving not required. ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr Ready test1 -HepMcParticleLink INFO find_hostkey: Using TruthEvent as McEventCollection key for this job +HepMcParticleLink INFO find_proxy: Using TruthEvent as McEventCollection key for this job diff --git a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/share/TRT_HitCollectionCnv_p2_test.ref b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/share/TRT_HitCollectionCnv_p2_test.ref index 8633d8ace9b4883a00f6e29e68937582b9b5e684..4a7c11977bb121447c32603da54a83a704e8898b 100644 --- a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/share/TRT_HitCollectionCnv_p2_test.ref +++ b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/share/TRT_HitCollectionCnv_p2_test.ref @@ -5,4 +5,4 @@ HistogramPersis...WARNING Histograms saving not required. ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr Ready test1 -HepMcParticleLink INFO find_hostkey: Using TruthEvent as McEventCollection key for this job +HepMcParticleLink INFO find_proxy: Using TruthEvent as McEventCollection key for this job diff --git a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/share/TRT_HitCollectionCnv_p3_test.ref b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/share/TRT_HitCollectionCnv_p3_test.ref index 8633d8ace9b4883a00f6e29e68937582b9b5e684..4a7c11977bb121447c32603da54a83a704e8898b 100644 --- a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/share/TRT_HitCollectionCnv_p3_test.ref +++ b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/share/TRT_HitCollectionCnv_p3_test.ref @@ -5,4 +5,4 @@ HistogramPersis...WARNING Histograms saving not required. ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr Ready test1 -HepMcParticleLink INFO find_hostkey: Using TruthEvent as McEventCollection key for this job +HepMcParticleLink INFO find_proxy: Using TruthEvent as McEventCollection key for this job diff --git a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/share/TRT_HitCollectionCnv_p4_test.ref b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/share/TRT_HitCollectionCnv_p4_test.ref index 8633d8ace9b4883a00f6e29e68937582b9b5e684..4a7c11977bb121447c32603da54a83a704e8898b 100644 --- a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/share/TRT_HitCollectionCnv_p4_test.ref +++ b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/share/TRT_HitCollectionCnv_p4_test.ref @@ -5,4 +5,4 @@ HistogramPersis...WARNING Histograms saving not required. ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr Ready test1 -HepMcParticleLink INFO find_hostkey: Using TruthEvent as McEventCollection key for this job +HepMcParticleLink INFO find_proxy: Using TruthEvent as McEventCollection key for this job diff --git a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/src/InDetHits/SiHitCollectionCnv_p2.cxx b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/src/InDetHits/SiHitCollectionCnv_p2.cxx index 6469d1be6b15538331f3a6aff428fc325579c1f5..c490af1bddbe59f03586c8ed14fe063f85e02a5b 100644 --- a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/src/InDetHits/SiHitCollectionCnv_p2.cxx +++ b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/src/InDetHits/SiHitCollectionCnv_p2.cxx @@ -298,7 +298,8 @@ void SiHitCollectionCnv_p2::persToTrans(const SiHitCollection_p2* persCont, SiHi HepGeom::Point3D<double> endThis( endLast + r ); - transCont->Emplace( endLast, endThis, eneLoss, meanTime, persCont->m_barcode[idxBC], persCont->m_id[idxId]); + HepMcParticleLink partLink; partLink.setExtendedBarCode( HepMcParticleLink::ExtendedBarCode( persCont->m_barcode[idxBC], 0, EBC_MAINEVCOLL, HepMcParticleLink::IS_POSITION) ); + transCont->Emplace( endLast, endThis, eneLoss, meanTime, partLink, persCont->m_id[idxId]); endLast = endThis; diff --git a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/src/InDetHits/SiHitCollectionCnv_p3.cxx b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/src/InDetHits/SiHitCollectionCnv_p3.cxx index 1ed44137a468c62bad7c2cd2700b1f0c7d649755..2d2104f6f8d6d7aac6d26f3d16dbbbbbb067ed03 100644 --- a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/src/InDetHits/SiHitCollectionCnv_p3.cxx +++ b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/src/InDetHits/SiHitCollectionCnv_p3.cxx @@ -103,7 +103,7 @@ void SiHitCollectionCnv_p3::transToPers(const SiHitCollection* transCont, SiHitC lastLink = &(siHit->particleLink()); persCont->m_barcode.push_back(lastLink->barcode()); persCont->m_mcEvtIndex.push_back(lastLink->eventIndex()); - persCont->m_evtColl.push_back('a'); + persCont->m_evtColl.push_back(lastLink->getEventCollectionAsChar()); if (idx > 0) { persCont->m_nBC.push_back(idx - endBC); @@ -299,7 +299,8 @@ void SiHitCollectionCnv_p3::persToTrans(const SiHitCollection_p3* persCont, SiHi HepGeom::Point3D<double> endThis( endLast + r ); - transCont->Emplace( endLast, endThis, eneLoss, meanTime, persCont->m_barcode[idxBC], persCont->m_id[idxId]); + HepMcParticleLink partLink( persCont->m_barcode[idxBC], persCont->m_mcEvtIndex[idxBC], HepMcParticleLink::ExtendedBarCode::eventCollectionFromChar(persCont->m_evtColl[idxBC]), HepMcParticleLink::IS_INDEX ); + transCont->Emplace( endLast, endThis, eneLoss, meanTime, partLink, persCont->m_id[idxId]); endLast = endThis; diff --git a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/src/InDetHits/TRT_HitCollectionCnv_p2.cxx b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/src/InDetHits/TRT_HitCollectionCnv_p2.cxx index 57439ec221bce11d9f74201e122b7319352fe565..ea39ab3fc3d28f6d61735ce4b1fb6cc91cf0fd62 100644 --- a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/src/InDetHits/TRT_HitCollectionCnv_p2.cxx +++ b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/src/InDetHits/TRT_HitCollectionCnv_p2.cxx @@ -158,7 +158,9 @@ void TRT_HitCollectionCnv_p2::persToTrans(const TRT_HitCollection_p2* persCont, HepGeom::Point3D<double> endThis(persCont->m_endX[j], persCont->m_endY[j], persCont->m_endZ[j]); - transCont->Emplace( persCont->m_hitId[hitCount], persCont->m_barcode[idxBC], persCont->m_id[idxId], persCont->m_kinEne[hitCount], + HepMcParticleLink partLink(persCont->m_barcode[idxBC]); + partLink.setExtendedBarCode(HepMcParticleLink::ExtendedBarCode(persCont->m_barcode[idxBC], 0, EBC_MAINEVCOLL, HepMcParticleLink::IS_POSITION));; + transCont->Emplace( persCont->m_hitId[hitCount], partLink, persCont->m_id[idxId], persCont->m_kinEne[hitCount], eneLoss, endLast.x(), endLast.y(), endLast.z(), endThis.x(), endThis.y(), endThis.z(), persCont->m_meanTime[hitCount] ); diff --git a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/src/InDetHits/TRT_HitCollectionCnv_p3.cxx b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/src/InDetHits/TRT_HitCollectionCnv_p3.cxx index 959cd858b187c13e55c1e55696be76817907305c..ddc687f73e1a0ac81ccd5145558b18bde0e9dc98 100644 --- a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/src/InDetHits/TRT_HitCollectionCnv_p3.cxx +++ b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/src/InDetHits/TRT_HitCollectionCnv_p3.cxx @@ -478,7 +478,9 @@ void TRT_HitCollectionCnv_p3::persToTrans(const TRT_HitCollection_p3* persCont, // - For charged particles kinEne is *zero*! // - transCont->Emplace( strawId, persCont->m_barcode[idxBC], persCont->m_id[idxId], + HepMcParticleLink partLink(persCont->m_barcode[idxBC]); + partLink.setExtendedBarCode(HepMcParticleLink::ExtendedBarCode(persCont->m_barcode[idxBC], 0, EBC_MAINEVCOLL, HepMcParticleLink::IS_POSITION));; + transCont->Emplace( strawId, partLink, persCont->m_id[idxId], kinEne, hitEne, startX, startY, startZ, endX, endY, endZ, meanTime ); // diff --git a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/src/InDetHits/TRT_HitCollectionCnv_p4.cxx b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/src/InDetHits/TRT_HitCollectionCnv_p4.cxx index 1d5e3a5d5633404ed16fa0894cab8fdf630a7023..7b0b97f870656420457e4d523ea0a55c3b5e1c62 100644 --- a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/src/InDetHits/TRT_HitCollectionCnv_p4.cxx +++ b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/src/InDetHits/TRT_HitCollectionCnv_p4.cxx @@ -68,7 +68,7 @@ void TRT_HitCollectionCnv_p4::transToPers(const TRTUncompressedHitCollection* tr lastLink = &(trtHit->particleLink()); persCont->m_barcode.push_back(lastLink->barcode()); persCont->m_mcEvtIndex.push_back(lastLink->eventIndex()); - persCont->m_evtColl.push_back('a'); + persCont->m_evtColl.push_back(lastLink->getEventCollectionAsChar()); if ( idx > 0 ) { persCont->m_nBC.push_back(idx - endBC); @@ -481,7 +481,8 @@ void TRT_HitCollectionCnv_p4::persToTrans(const TRT_HitCollection_p4* persCont, // - For charged particles kinEne is *zero*! // - transCont->Emplace( strawId, persCont->m_barcode[idxBC], persCont->m_id[idxId], + HepMcParticleLink partLink( persCont->m_barcode[idxBC], persCont->m_mcEvtIndex[idxBC], HepMcParticleLink::ExtendedBarCode::eventCollectionFromChar(persCont->m_evtColl[idxBC]), HepMcParticleLink::IS_INDEX ); + transCont->Emplace( strawId, partLink, persCont->m_id[idxId], kinEne, hitEne, startX, startY, startZ, endX, endY, endZ, meanTime ); // diff --git a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/SiHitCnv_p1_test.cxx b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/SiHitCnv_p1_test.cxx index 069909fa731055ad964dfa03a8b622c459db2e4c..3ba814891c54543aa996065ee49039e588073f23 100644 --- a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/SiHitCnv_p1_test.cxx +++ b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/SiHitCnv_p1_test.cxx @@ -28,6 +28,7 @@ void compare (const HepMcParticleLink& p1, assert ( p1.isValid() == p2.isValid() ); assert ( p1.barcode() == p2.barcode() ); assert ( p1.eventIndex() == p2.eventIndex() ); + assert ( p1.getEventCollectionAsChar() == p2.getEventCollectionAsChar() ); assert ( p1.cptr() == p2.cptr() ); assert ( p1 == p2 ); } diff --git a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/SiHitCollectionCnv_p2_test.cxx b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/SiHitCollectionCnv_p2_test.cxx index a40a88c30cc43536b92c8133c58a5088c3aac868..2729c87fb73d654b7b54d313035edadb8f8b598f 100644 --- a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/SiHitCollectionCnv_p2_test.cxx +++ b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/SiHitCollectionCnv_p2_test.cxx @@ -28,6 +28,7 @@ void compare (const HepMcParticleLink& p1, assert ( p1.isValid() == p2.isValid() ); assert ( p1.barcode() == p2.barcode() ); assert ( p1.eventIndex() == p2.eventIndex() ); + assert ( p1.getEventCollectionAsChar() == p2.getEventCollectionAsChar() ); assert ( p1.cptr() == p2.cptr() ); assert ( p1 == p2 ); } @@ -73,7 +74,7 @@ void test1(std::vector<HepMC::GenParticle*>& genPartVector) std::cout << "test1\n"; const HepMC::GenParticle *particle = genPartVector.at(0); // Create HepMcParticleLink outside of leak check. - HepMcParticleLink dummyHMPL(particle->barcode(),0); + HepMcParticleLink dummyHMPL(particle->barcode(),particle->parent_event()->event_number()); assert(dummyHMPL.cptr()==particle); // Create DVL info outside of leak check. SiHitCollection dum ("coll"); @@ -82,7 +83,7 @@ void test1(std::vector<HepMC::GenParticle*>& genPartVector) SiHitCollection trans1 ("coll"); for (int i=0; i < 10; i++) { const HepMC::GenParticle* pGenParticle = genPartVector.at(i); - HepMcParticleLink trkLink(pGenParticle->barcode(),0); + HepMcParticleLink trkLink(pGenParticle->barcode(),pGenParticle->parent_event()->event_number()); int o = i*100; trans1.Emplace (HepGeom::Point3D<double> (10.5+o, 11.5+o, 12.5+o), HepGeom::Point3D<double> (13.5+o, 14.5+o, 15.5+o), diff --git a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/SiHitCollectionCnv_p3_test.cxx b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/SiHitCollectionCnv_p3_test.cxx index 2428877ba06ce5f7df1ad3eefa8fa3a27a6ba78c..597f9d21137e85bf4102ea6657168b28029f6183 100644 --- a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/SiHitCollectionCnv_p3_test.cxx +++ b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/SiHitCollectionCnv_p3_test.cxx @@ -27,6 +27,7 @@ void compare (const HepMcParticleLink& p1, assert ( p1.isValid() == p2.isValid() ); assert ( p1.barcode() == p2.barcode() ); assert ( p1.eventIndex() == p2.eventIndex() ); + assert ( p1.getEventCollectionAsChar() == p2.getEventCollectionAsChar() ); assert ( p1.cptr() == p2.cptr() ); assert ( p1 == p2 ); } @@ -72,7 +73,7 @@ void test1(std::vector<HepMC::GenParticle*>& genPartVector) std::cout << "test1\n"; const HepMC::GenParticle *particle = genPartVector.at(0); // Create HepMcParticleLink outside of leak check. - HepMcParticleLink dummyHMPL(particle->barcode(),0); + HepMcParticleLink dummyHMPL(particle->barcode(),particle->parent_event()->event_number()); assert(dummyHMPL.cptr()==particle); // Create DVL info outside of leak check. SiHitCollection dum ("coll"); @@ -81,7 +82,7 @@ void test1(std::vector<HepMC::GenParticle*>& genPartVector) SiHitCollection trans1 ("coll"); for (int i=0; i < 10; i++) { const HepMC::GenParticle* pGenParticle = genPartVector.at(i); - HepMcParticleLink trkLink(pGenParticle->barcode(),0); + HepMcParticleLink trkLink(pGenParticle->barcode(),pGenParticle->parent_event()->event_number()); int o = i*100; trans1.Emplace (HepGeom::Point3D<double> (10.5+o, 11.5+o, 12.5+o), HepGeom::Point3D<double> (13.5+o, 14.5+o, 15.5+o), diff --git a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/TRT_HitCnv_p1_test.cxx b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/TRT_HitCnv_p1_test.cxx index e8182ac840bbd4fc5046a9136fa51cee81a23739..b0947c43205b7f1da710ec821cb98977bfd3f386 100644 --- a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/TRT_HitCnv_p1_test.cxx +++ b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/TRT_HitCnv_p1_test.cxx @@ -27,6 +27,7 @@ void compare (const HepMcParticleLink& p1, assert ( p1.isValid() == p2.isValid() ); assert ( p1.barcode() == p2.barcode() ); assert ( p1.eventIndex() == p2.eventIndex() ); + assert ( p1.getEventCollectionAsChar() == p2.getEventCollectionAsChar() ); assert ( p1.cptr() == p2.cptr() ); assert ( p1 == p2 ); } diff --git a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/TRT_HitCollectionCnv_p2_test.cxx b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/TRT_HitCollectionCnv_p2_test.cxx index 887a2dcfb342c74f753c1e6d7ff2380cd657f867..de1afb5f4ae4d2e4119e774bba1b08064ba828e8 100644 --- a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/TRT_HitCollectionCnv_p2_test.cxx +++ b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/TRT_HitCollectionCnv_p2_test.cxx @@ -27,6 +27,7 @@ void compare (const HepMcParticleLink& p1, assert ( p1.isValid() == p2.isValid() ); assert ( p1.barcode() == p2.barcode() ); assert ( p1.eventIndex() == p2.eventIndex() ); + assert ( p1.getEventCollectionAsChar() == p2.getEventCollectionAsChar() ); assert ( p1.cptr() == p2.cptr() ); assert ( p1 == p2 ); } @@ -78,7 +79,7 @@ void test1(std::vector<HepMC::GenParticle*>& genPartVector) std::cout << "test1\n"; const HepMC::GenParticle *particle = genPartVector.at(0); // Create HepMcParticleLink outside of leak check. - HepMcParticleLink dummyHMPL(particle->barcode(),0); + HepMcParticleLink dummyHMPL(particle->barcode(),particle->parent_event()->event_number()); assert(dummyHMPL.cptr()==particle); // Create DVL info outside of leak check. TRTUncompressedHitCollection dum ("coll"); @@ -88,7 +89,7 @@ void test1(std::vector<HepMC::GenParticle*>& genPartVector) for (int i=0; i < 10; i++) { int o = i*100; const HepMC::GenParticle* pGenParticle = genPartVector.at(0); - HepMcParticleLink trkLink(pGenParticle->barcode(),0); + HepMcParticleLink trkLink(pGenParticle->barcode(),pGenParticle->parent_event()->event_number()); trans1.Emplace (101+o, trkLink, pGenParticle->pdg_id(), 104.5+o, 105.5+o, (106.5+o)/1000, (107.5+o)/1000, 108.5+o, @@ -97,7 +98,7 @@ void test1(std::vector<HepMC::GenParticle*>& genPartVector) } // Special case for photons const HepMC::GenParticle* pGenParticle = genPartVector.at(10); - HepMcParticleLink trkLink(pGenParticle->barcode(),0); + HepMcParticleLink trkLink(pGenParticle->barcode(),pGenParticle->parent_event()->event_number()); trans1.Emplace (131, trkLink, 22, 134.5, 135.5, 10, 3, 138.5, diff --git a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/TRT_HitCollectionCnv_p3_test.cxx b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/TRT_HitCollectionCnv_p3_test.cxx index 5319e538c7ef0ca14b371fd9ca034ffa647f4f72..19d3c099edebc513fdce461c992acf2038671577 100644 --- a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/TRT_HitCollectionCnv_p3_test.cxx +++ b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/TRT_HitCollectionCnv_p3_test.cxx @@ -33,6 +33,7 @@ void compare (const HepMcParticleLink& p1, assert ( p1.isValid() == p2.isValid() ); assert ( p1.barcode() == p2.barcode() ); assert ( p1.eventIndex() == p2.eventIndex() ); + assert ( p1.getEventCollectionAsChar() == p2.getEventCollectionAsChar() ); assert ( p1.cptr() == p2.cptr() ); assert ( p1 == p2 ); } @@ -98,7 +99,7 @@ void test1(std::vector<HepMC::GenParticle*>& genPartVector) std::cout << "test1\n"; const HepMC::GenParticle *particle = genPartVector.at(0); // Create HepMcParticleLink outside of leak check. - HepMcParticleLink dummyHMPL(particle->barcode(),0); + HepMcParticleLink dummyHMPL(particle->barcode(),particle->parent_event()->event_number()); assert(dummyHMPL.cptr()==particle); // Create DVL info outside of leak check. TRTUncompressedHitCollection dum ("coll"); @@ -108,7 +109,7 @@ void test1(std::vector<HepMC::GenParticle*>& genPartVector) for (int i=0; i < 10; i++) { int o = i*100; const HepMC::GenParticle* pGenParticle = genPartVector.at(0); - HepMcParticleLink trkLink(pGenParticle->barcode(),0); + HepMcParticleLink trkLink(pGenParticle->barcode(),pGenParticle->parent_event()->event_number()); trans1.Emplace (101+o, trkLink, 20+o, 104.5+o, 105.5+o, (106.5+o)/1000, (107.5+o)/1000, 108.5+o, @@ -117,7 +118,7 @@ void test1(std::vector<HepMC::GenParticle*>& genPartVector) } // Special case for photons const HepMC::GenParticle* pGenParticle = genPartVector.at(10); - HepMcParticleLink trkLink(pGenParticle->barcode(),0); + HepMcParticleLink trkLink(pGenParticle->barcode(),pGenParticle->parent_event()->event_number()); trans1.Emplace (131, trkLink, 22, 134.5, 135.5, 10, 3, 138.5, diff --git a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/TRT_HitCollectionCnv_p4_test.cxx b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/TRT_HitCollectionCnv_p4_test.cxx index 1991aeacee2de5b54fa243d8d0d00506bb54b1b2..d57eccd700d56ff85ef989a928bb735fe8f33306 100644 --- a/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/TRT_HitCollectionCnv_p4_test.cxx +++ b/InnerDetector/InDetEventCnv/InDetSimEventTPCnv/test/TRT_HitCollectionCnv_p4_test.cxx @@ -33,6 +33,7 @@ void compare (const HepMcParticleLink& p1, assert ( p1.isValid() == p2.isValid() ); assert ( p1.barcode() == p2.barcode() ); assert ( p1.eventIndex() == p2.eventIndex() ); + assert ( p1.getEventCollectionAsChar() == p2.getEventCollectionAsChar() ); assert ( p1.cptr() == p2.cptr() ); assert ( p1 == p2 ); } @@ -98,7 +99,7 @@ void test1(std::vector<HepMC::GenParticle*>& genPartVector) std::cout << "test1\n"; const HepMC::GenParticle *particle = genPartVector.at(0); // Create HepMcParticleLink outside of leak check. - HepMcParticleLink dummyHMPL(particle->barcode(),0); + HepMcParticleLink dummyHMPL(particle->barcode(),particle->parent_event()->event_number()); assert(dummyHMPL.cptr()==particle); // Create DVL info outside of leak check. TRTUncompressedHitCollection dum ("coll"); @@ -108,7 +109,7 @@ void test1(std::vector<HepMC::GenParticle*>& genPartVector) for (int i=0; i < 10; i++) { int o = i*100; const HepMC::GenParticle* pGenParticle = genPartVector.at(0); - HepMcParticleLink trkLink(pGenParticle->barcode(),0); + HepMcParticleLink trkLink(pGenParticle->barcode(),pGenParticle->parent_event()->event_number()); trans1.Emplace (101+o, trkLink, 20+o, 104.5+o, 105.5+o, (106.5+o)/1000, (107.5+o)/1000, 108.5+o, @@ -117,7 +118,7 @@ void test1(std::vector<HepMC::GenParticle*>& genPartVector) } // Special case for photons const HepMC::GenParticle* pGenParticle = genPartVector.at(10); - HepMcParticleLink trkLink(pGenParticle->barcode(),0); + HepMcParticleLink trkLink(pGenParticle->barcode(),pGenParticle->parent_event()->event_number()); trans1.Emplace (131, trkLink, 22, 134.5, 135.5, 10, 3, 138.5, diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/CMakeLists.txt b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/CMakeLists.txt index 3a86119ce94235adc83dcb3ff09b3a3f08c71a91..6aeecdbedf1bc79ecd64b6598e5b225c40244108 100644 --- a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/CMakeLists.txt +++ b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/CMakeLists.txt @@ -16,7 +16,6 @@ atlas_depends_on_subdirs( PUBLIC Control/AthenaBaseComps Control/StoreGate DetectorDescription/Identifier - Event/EventInfo Event/xAOD/xAODEventInfo InnerDetector/InDetConditions/SCT_ConditionsData InnerDetector/InDetConditions/SCT_ConditionsTools @@ -33,16 +32,20 @@ atlas_add_component( SCT_RawDataByteStreamCnv src/*.cxx src/components/*.cxx INCLUDE_DIRS ${TDAQ-COMMON_INCLUDE_DIRS} - LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} ByteStreamCnvSvcBaseLib ByteStreamData ByteStreamData_test GaudiKernel InDetRawData InDetByteStreamErrors AthenaBaseComps StoreGateLib SGtests Identifier EventInfo xAODEventInfo InDetIdentifier InDetReadoutGeometry SCT_CablingLib TrigSteeringEvent) + LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} ByteStreamCnvSvcBaseLib ByteStreamData ByteStreamData_test GaudiKernel InDetRawData InDetByteStreamErrors AthenaBaseComps StoreGateLib SGtests Identifier xAODEventInfo InDetIdentifier InDetReadoutGeometry SCT_CablingLib TrigSteeringEvent) # Run tests: atlas_add_test( TestSCTDecode SCRIPT athena.py --threads=5 SCT_RawDataByteStreamCnv/testSCTDecode.py PROPERTIES TIMEOUT 600 ENVIRONMENT THREADS=5 ) -atlas_add_test( TestSCTEncode +atlas_add_test( TestSCTEncodeSerial SCRIPT athena.py SCT_RawDataByteStreamCnv/testSCTEncode.py PROPERTIES TIMEOUT 300 ) +atlas_add_test( TestSCTEncode + SCRIPT athena.py --threads=5 SCT_RawDataByteStreamCnv/testSCTEncode.py + PROPERTIES TIMEOUT 300 + ENVIRONMENT THREADS=5 ) # Install files from the package: atlas_install_headers( SCT_RawDataByteStreamCnv ) diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/SCT_RawDataByteStreamCnv/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/SCT_RawDataByteStreamCnv/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..36db7789f16835765ddc808f9a40fbcd2fc03aa8 --- /dev/null +++ b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/SCT_RawDataByteStreamCnv/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/share/testSCTDecode.py b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/share/testSCTDecode.py index b03413cd52d54d2c49608a9bd49a2a986eccbb31..4e62db0218b731ba55a24939348a9963cad2bfcb 100644 --- a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/share/testSCTDecode.py +++ b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/share/testSCTDecode.py @@ -46,13 +46,12 @@ print globalflags # --- switch on InnerDetector from AthenaCommon.DetFlags import DetFlags DetFlags.detdescr.SCT_setOn() -DetFlags.ID_setOn() +DetFlags.ID_setOff() DetFlags.Calo_setOff() DetFlags.Muon_setOff() DetFlags.Truth_setOff() DetFlags.LVL1_setOff() DetFlags.SCT_setOn() -DetFlags.TRT_setOff() # ---- switch parts of ID off/on as follows #switch off tasks @@ -102,8 +101,8 @@ topSequence.InDetSCTRawDataProvider.ProviderTool.Decoder.OutputLevel = INFO topSequence.InDetSCTEventFlagWriter.OutputLevel = DEBUG # Set up SCT clsutering -from SiLorentzAngleSvc.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup -from SiLorentzAngleSvc.PixelLorentzAngleToolSetup import PixelLorentzAngleToolSetup +from SiLorentzAngleTool.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup +from SiLorentzAngleTool.PixelLorentzAngleToolSetup import PixelLorentzAngleToolSetup sctLorentzAngleToolSetup = SCTLorentzAngleToolSetup() from SiClusterizationTool.SiClusterizationToolConf import InDet__ClusterMakerTool InDetClusterMakerTool = InDet__ClusterMakerTool(name = "InDetClusterMakerTool", diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/share/testSCTEncode.py b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/share/testSCTEncode.py index 916cf37f2e1df6725a47ae55eb7395fa311549d9..b8b2692b23f48ba3bacd31a089c3883ed4176b88 100644 --- a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/share/testSCTEncode.py +++ b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/share/testSCTEncode.py @@ -46,13 +46,12 @@ print globalflags # --- switch on InnerDetector from AthenaCommon.DetFlags import DetFlags DetFlags.detdescr.SCT_setOn() -DetFlags.ID_setOn() +DetFlags.ID_setOff() DetFlags.Calo_setOff() DetFlags.Muon_setOff() DetFlags.Truth_setOff() DetFlags.LVL1_setOff() DetFlags.SCT_setOn() -DetFlags.TRT_setOff() # ---- switch parts of ID off/on as follows #switch off tasks diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawContByteStreamTool.h b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawContByteStreamTool.h index ef4d265a0e78a67bfbc527e86e2a1e52c84a12f4..130a2a5ae1ea7b244c04c1657ee77d6aee5714ac 100644 --- a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawContByteStreamTool.h +++ b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawContByteStreamTool.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /** @@ -82,7 +82,7 @@ class SCTRawContByteStreamTool : public extends<AthAlgTool, ISCTRawContByteStrea /** Conversion between Lower level Source ID to higher level source ID, used to assemble fragments from ROD fragments to assemble full ATLAS raw events. */ - mutable FullEventAssembler<SrcIdMap> m_fullEventAssembler; + mutable FullEventAssembler<SrcIdMap> m_fullEventAssembler ATLAS_THREAD_SAFE; mutable std::mutex m_mutex; }; diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProviderTool.h b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProviderTool.h index 107836740975032b4b87b485118b066795808454..55e4dfd0179f11574fec58c323a3be9b5b2bd077 100644 --- a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProviderTool.h +++ b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProviderTool.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_RAWDATABYTESTREAMCNV_SCTRAWDATAPROVIDERTOOL_H @@ -65,7 +65,7 @@ class SCTRawDataProviderTool : public extends<AthAlgTool, ISCTRawDataProviderToo ToolHandle<ISCT_RodDecoder> m_decoder{this, "Decoder", "SCT_RodDecoder", "Decoder"}; /** For bookkeeping of decoded ROBs */ - mutable std::set<uint32_t> m_robIDSet; + mutable std::set<uint32_t> m_robIDSet ATLAS_THREAD_SAFE; /** Number of decode errors encountered in decoding. Turning off error message after 100 errors are counted */ diff --git a/InnerDetector/InDetExample/InDetAlignExample/share/ElectronEoverPTracking.py b/InnerDetector/InDetExample/InDetAlignExample/share/ElectronEoverPTracking.py index d0c8b10b17be291d4a55f63f88921979324c5774..48d91adf59a564f49c7dd3d5148c0bd45388bf7c 100755 --- a/InnerDetector/InDetExample/InDetAlignExample/share/ElectronEoverPTracking.py +++ b/InnerDetector/InDetExample/InDetAlignExample/share/ElectronEoverPTracking.py @@ -22,7 +22,7 @@ topSequence = AlgSequence() # # SiLorentzAngleTool # -from SiLorentzAngleSvc.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup +from SiLorentzAngleTool.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup sctLorentzAngleToolSetup = SCTLorentzAngleToolSetup() # # load SCT ROT creator, we overwrite the defaults for it diff --git a/InnerDetector/InDetExample/InDetBeamSpotExample/CMakeLists.txt b/InnerDetector/InDetExample/InDetBeamSpotExample/CMakeLists.txt index 0fa19bd6d894bd017f8894be5ad7cbe123168a74..c5973df0112dac38a4cfa6d8c743dbe58a71efa1 100644 --- a/InnerDetector/InDetExample/InDetBeamSpotExample/CMakeLists.txt +++ b/InnerDetector/InDetExample/InDetBeamSpotExample/CMakeLists.txt @@ -5,6 +5,9 @@ # Declare the package name: atlas_subdir( InDetBeamSpotExample ) +# Necessary external(s): +find_package( cx_Oracle ) + # Install files from the package: atlas_install_python_modules( python/*.py ) atlas_install_joboptions( share/*.py ) diff --git a/InnerDetector/InDetExample/InDetDetDescrExample/share/ReadSiDetectorElements_jobOptions.py b/InnerDetector/InDetExample/InDetDetDescrExample/share/ReadSiDetectorElements_jobOptions.py old mode 100755 new mode 100644 index a390e41f293b70f92f7c4dec323a25f02da755b0..14186022d588cb838fe0966082dbe3acc4b7ed3f --- a/InnerDetector/InDetExample/InDetDetDescrExample/share/ReadSiDetectorElements_jobOptions.py +++ b/InnerDetector/InDetExample/InDetDetDescrExample/share/ReadSiDetectorElements_jobOptions.py @@ -60,11 +60,11 @@ from AthenaCommon.AppMgr import ServiceMgr # Pixel # # Load DCS service -from SiPropertiesSvc.PixelSiPropertiesToolSetup import PixelSiPropertiesToolSetup +from SiPropertiesTool.PixelSiPropertiesToolSetup import PixelSiPropertiesToolSetup pixelSiPropertiesToolSetup = PixelSiPropertiesToolSetup() pixelSiPropertiesToolSetup.setup() pixelSiPropertiesTool = pixelSiPropertiesToolSetup.getTool() -from SiLorentzAngleSvc.PixelLorentzAngleToolSetup import PixelLorentzAngleToolSetup +from SiLorentzAngleTool.PixelLorentzAngleToolSetup import PixelLorentzAngleToolSetup pixelLorentzAngleToolSetup = PixelLorentzAngleToolSetup() pixelLorentzAngleTool = pixelLorentzAngleToolSetup.PixelLorentzAngleTool @@ -77,13 +77,13 @@ ReadPixelElements.SiConditionsTool = pixelDCSConditionsTool # SCT # # Silicon Lorentz angle tool -from SiLorentzAngleSvc.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup +from SiLorentzAngleTool.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup sctLorentzAngleToolSetup = SCTLorentzAngleToolSetup() sctLorentzAngleTool = sctLorentzAngleToolSetup.SCTLorentzAngleTool sctSiliconConditionsTool = sctLorentzAngleToolSetup.sctSiliconConditionsTool # Silicon properties tool -from SiPropertiesSvc.SCT_SiPropertiesToolSetup import SCT_SiPropertiesToolSetup +from SiPropertiesTool.SCT_SiPropertiesToolSetup import SCT_SiPropertiesToolSetup sct_SiPropertiesToolSetup = SCT_SiPropertiesToolSetup() sct_SiPropertiesToolSetup.setSiliconTool(sctSiliconConditionsTool) sct_SiPropertiesToolSetup.setup() diff --git a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecConditionsAccess.py b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecConditionsAccess.py index 9e5e0421e11cf563da384558fdcc1cbd2a046ea5..ef043d6801ff0feb932f8d9f153b89667eb7ad51 100644 --- a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecConditionsAccess.py +++ b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecConditionsAccess.py @@ -7,16 +7,6 @@ from AthenaCommon.DetFlags import DetFlags isData = (globalflags.DataSource == 'data') -eventInfoKey = "ByteStreamEventInfo" -if not isData: - eventInfoKey = "McEventInfo" -if globalflags.isOverlay() and isData : - if DetFlags.overlay.pixel_on() or DetFlags.overlay.SCT_on() or DetFlags.overlay.TRT_on(): - from OverlayCommonAlgs.OverlayFlags import overlayFlags - eventInfoKey = (overlayFlags.dataStore() + '+' + eventInfoKey).replace("StoreGateSvc+","") - else : - eventInfoKey = "McEventInfo" - if not ('conddb' in dir()): IOVDbSvc = Service("IOVDbSvc") from IOVDbSvc.CondDB import conddb @@ -113,7 +103,7 @@ if DetFlags.haveRIO.pixel_on(): condSeq += PixelConfigCondAlg(name="PixelConfigCondAlg") if not hasattr(ToolSvc, "PixelLorentzAngleTool"): - from SiLorentzAngleSvc.PixelLorentzAngleToolSetup import PixelLorentzAngleToolSetup + from SiLorentzAngleTool.PixelLorentzAngleToolSetup import PixelLorentzAngleToolSetup pixelLorentzAngleToolSetup = PixelLorentzAngleToolSetup() @@ -229,7 +219,6 @@ if DetFlags.haveRIO.SCT_on(): from SCT_ConditionsTools.SCT_TdaqEnabledToolSetup import SCT_TdaqEnabledToolSetup sct_TdaqEnabledToolSetup = SCT_TdaqEnabledToolSetup() sct_TdaqEnabledToolSetup.setFolder(tdaqFolder) - sct_TdaqEnabledToolSetup.setEventInfoKey(eventInfoKey) sct_TdaqEnabledToolSetup.setup() InDetSCT_TdaqEnabledTool = sct_TdaqEnabledToolSetup.getTool() if (InDetFlags.doPrintConfigurables()): @@ -278,7 +267,7 @@ if DetFlags.haveRIO.SCT_on(): InDetSCT_ConditionsSummaryToolWithoutFlagged.ConditionsTools = condTools # Setup Lorentz angle tool. - from SiLorentzAngleSvc.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup + from SiLorentzAngleTool.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup forceUseDB = False forceUseGeoModel = False diff --git a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecLoadTools.py b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecLoadTools.py index b1b74a7ec6e2bbaaac04da208d447e4bf34873bd..fe6329886ca02ea3c56510969f69995d3b08cd93 100755 --- a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecLoadTools.py +++ b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecLoadTools.py @@ -52,7 +52,7 @@ if InDetFlags.doPixelClusterSplitting() and not InDetFlags.doSLHC(): # --- a better solution is needed... if not hasattr(ToolSvc, "PixelLorentzAngleTool"): - from SiLorentzAngleSvc.PixelLorentzAngleToolSetup import PixelLorentzAngleToolSetup + from SiLorentzAngleTool.PixelLorentzAngleToolSetup import PixelLorentzAngleToolSetup pixelLorentzAngleToolSetup = PixelLorentzAngleToolSetup() from SiClusterizationTool.SiClusterizationToolConf import InDet__NnClusterizationFactory @@ -96,7 +96,7 @@ if InDetFlags.doPixelClusterSplitting() and not InDetFlags.doSLHC(): print NnClusterizationFactory elif InDetFlags.doPixelClusterSplitting(): if not hasattr(ToolSvc, "PixelLorentzAngleTool"): - from SiLorentzAngleSvc.PixelLorentzAngleToolSetup import PixelLorentzAngleToolSetup + from SiLorentzAngleTool.PixelLorentzAngleToolSetup import PixelLorentzAngleToolSetup pixelLorentzAngleToolSetup = PixelLorentzAngleToolSetup() from SiClusterizationTool.SiClusterizationToolConf import InDet__TruthClusterizationFactory @@ -134,7 +134,7 @@ if InDetFlags.loadRotCreator(): # tool to always make conservative pixel cluster errors # SiLorentzAngleTool if not hasattr(ToolSvc, "PixelLorentzAngleTool"): - from SiLorentzAngleSvc.PixelLorentzAngleToolSetup import PixelLorentzAngleToolSetup + from SiLorentzAngleTool.PixelLorentzAngleToolSetup import PixelLorentzAngleToolSetup pixelLorentzAngleToolSetup = PixelLorentzAngleToolSetup() from SiClusterOnTrackTool.SiClusterOnTrackToolConf import InDet__PixelClusterOnTrackTool if InDetFlags.doDBM(): @@ -197,7 +197,7 @@ if InDetFlags.loadRotCreator(): if DetFlags.haveRIO.SCT_on(): # SiLorentzAngleTool - from SiLorentzAngleSvc.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup + from SiLorentzAngleTool.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup sctLorentzAngleToolSetup = SCTLorentzAngleToolSetup() from SiClusterOnTrackTool.SiClusterOnTrackToolConf import InDet__SCT_ClusterOnTrackTool SCT_ClusterOnTrackTool = InDet__SCT_ClusterOnTrackTool ("InDetSCT_ClusterOnTrackTool", @@ -258,7 +258,7 @@ if InDetFlags.loadRotCreator(): if DetFlags.haveRIO.pixel_on(): # SiLorentzAngleTool if not hasattr(ToolSvc, "PixelLorentzAngleTool"): - from SiLorentzAngleSvc.PixelLorentzAngleToolSetup import PixelLorentzAngleToolSetup + from SiLorentzAngleTool.PixelLorentzAngleToolSetup import PixelLorentzAngleToolSetup pixelLorentzAngleToolSetup = PixelLorentzAngleToolSetup() # # tool to always make conservative pixel cluster errors @@ -290,7 +290,7 @@ if InDetFlags.loadRotCreator(): if DetFlags.haveRIO.SCT_on(): # SiLorentzAngleTool - from SiLorentzAngleSvc.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup + from SiLorentzAngleTool.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup sctLorentzAngleToolSetup = SCTLorentzAngleToolSetup() # # tool to always make conservative sct cluster errors diff --git a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecPreProcessingSilicon.py b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecPreProcessingSilicon.py index 57a5bf0ee8aeccebd52942f84f6919c9bf214675..3eba016b1616abee8cd22b58a96be55e1407a804 100644 --- a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecPreProcessingSilicon.py +++ b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecPreProcessingSilicon.py @@ -28,10 +28,10 @@ if InDetFlags.doPRDFormation(): # --- SiLorentzAngleTool # if not hasattr(ToolSvc, "PixelLorentzAngleTool"): - from SiLorentzAngleSvc.PixelLorentzAngleToolSetup import PixelLorentzAngleToolSetup + from SiLorentzAngleTool.PixelLorentzAngleToolSetup import PixelLorentzAngleToolSetup pixelLorentzAngleToolSetup = PixelLorentzAngleToolSetup() - from SiLorentzAngleSvc.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup + from SiLorentzAngleTool.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup sctLorentzAngleToolSetup = SCTLorentzAngleToolSetup() # diff --git a/InnerDetector/InDetExample/InDetSLHC_Example/share/postInclude.SLHC_Digitization.py b/InnerDetector/InDetExample/InDetSLHC_Example/share/postInclude.SLHC_Digitization.py index 72f9bf877030f180716172116a5e7639bf5db9fc..e657cc5a076885b98aa325a8c40a0c5e0d5286ce 100644 --- a/InnerDetector/InDetExample/InDetSLHC_Example/share/postInclude.SLHC_Digitization.py +++ b/InnerDetector/InDetExample/InDetSLHC_Example/share/postInclude.SLHC_Digitization.py @@ -66,7 +66,6 @@ if DetFlags.digitize.SCT_on(): from SCT_Digitization.SCT_DigitizationConf import SCT_FrontEnd ToolSvc += SCT_FrontEnd("SCT_FrontEnd") theSCT_FrontEnd = ToolSvc.SCT_FrontEnd - theSCT_FrontEnd.MaxStripsPerSide = 1280 theSCT_FrontEnd.UseCalibData = False ToolSvc += theSCT_FrontEnd diff --git a/InnerDetector/InDetExample/InDetSLHC_Example/share/postInclude.SLHC_Digitization_lowthresh.py b/InnerDetector/InDetExample/InDetSLHC_Example/share/postInclude.SLHC_Digitization_lowthresh.py index 8e7d41cc427f32785c164bf7974f423133e4ba99..f1d366b3ed805f8528465e9b8f0f27949791521c 100644 --- a/InnerDetector/InDetExample/InDetSLHC_Example/share/postInclude.SLHC_Digitization_lowthresh.py +++ b/InnerDetector/InDetExample/InDetSLHC_Example/share/postInclude.SLHC_Digitization_lowthresh.py @@ -76,7 +76,6 @@ if DetFlags.digitize.SCT_on(): from SCT_Digitization.SCT_DigitizationConf import SCT_FrontEnd ToolSvc += SCT_FrontEnd("SCT_FrontEnd") theSCT_FrontEnd = ToolSvc.SCT_FrontEnd - theSCT_FrontEnd.MaxStripsPerSide = 1280 theSCT_FrontEnd.UseCalibData = False if not digitizationFlags.doXingByXingPileUp(): diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigConditions.py b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigConditions.py index 660226db840cb39bbafc4172c5ee8f68b5b765c0..a6e0389c9113d00a6c13ccfe75854787c40d6b38 100644 --- a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigConditions.py +++ b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigConditions.py @@ -181,22 +181,22 @@ class PixelConditionsServicesSetup: # Lorentz Angle Setup # ####################### if not hasattr(condSeq, 'PixelSiPropertiesCondAlg'): - from SiPropertiesSvc.SiPropertiesSvcConf import PixelSiPropertiesCondAlg + from SiPropertiesTool.SiPropertiesToolConf import PixelSiPropertiesCondAlg condSeq += PixelSiPropertiesCondAlg(name="PixelSiPropertiesCondAlg") - from SiPropertiesSvc.SiPropertiesSvcConf import SiPropertiesTool + from SiPropertiesTool.SiPropertiesToolConf import SiPropertiesTool TrigSiPropertiesTool = SiPropertiesTool(name="PixelSiPropertiesTool", DetectorName="Pixel", ReadKey="PixelSiliconPropertiesVector") ToolSvc += TrigSiPropertiesTool if not hasattr(condSeq, 'PixelSiLorentzAngleCondAlg'): - from SiLorentzAngleSvc.SiLorentzAngleSvcConf import PixelSiLorentzAngleCondAlg + from SiLorentzAngleTool.SiLorentzAngleToolConf import PixelSiLorentzAngleCondAlg condSeq += PixelSiLorentzAngleCondAlg(name="PixelSiLorentzAngleCondAlg", SiPropertiesTool=TrigSiPropertiesTool, UseMagFieldSvc = True, UseMagFieldDcs = (not athenaCommonFlags.isOnline())) - from SiLorentzAngleSvc.SiLorentzAngleSvcConf import SiLorentzAngleTool + from SiLorentzAngleTool.SiLorentzAngleToolConf import SiLorentzAngleTool TrigPixelLorentzAngleTool = SiLorentzAngleTool(name=self.instanceName('PixelLorentzAngleTool'), DetectorName="Pixel", SiLorentzAngleCondData="PixelSiLorentzAngleCondData") ToolSvc += TrigPixelLorentzAngleTool @@ -427,7 +427,7 @@ class SCT_ConditionsToolsSetup: from AthenaCommon.AlgSequence import AthSequencer condSeq = AthSequencer("AthCondSeq") if not hasattr(condSeq, "SCTSiLorentzAngleCondAlg"): - from SiLorentzAngleSvc.SiLorentzAngleSvcConf import SCTSiLorentzAngleCondAlg + from SiLorentzAngleTool.SiLorentzAngleToolConf import SCTSiLorentzAngleCondAlg from AthenaCommon.AthenaCommonFlags import athenaCommonFlags condSeq += SCTSiLorentzAngleCondAlg(name = "SCTSiLorentzAngleCondAlg", SiConditionsTool = sctSiliconConditionsTool, @@ -436,7 +436,7 @@ class SCT_ConditionsToolsSetup: sctSiLorentzAngleCondAlg = condSeq.SCTSiLorentzAngleCondAlg "Inititalize Lorentz angle Tool" - from SiLorentzAngleSvc.SiLorentzAngleSvcConf import SiLorentzAngleTool + from SiLorentzAngleTool.SiLorentzAngleToolConf import SiLorentzAngleTool SCTLorentzAngleTool = SiLorentzAngleTool(name=instanceName, DetectorName="SCT", SiLorentzAngleCondData="SCTSiLorentzAngleCondData") SCTLorentzAngleTool.UseMagFieldSvc = True #may need also MagFieldSvc instance diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadTools.py b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadTools.py index bfc77bbc0089b24498f9910954fef2d5e5ebff4d..d9c5eb709bce514e4350f0064a94cc425f110b4a 100755 --- a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadTools.py +++ b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadTools.py @@ -22,7 +22,7 @@ from AthenaCommon.CfgGetter import getPublicTool,getPrivateTool TrigPixelLorentzAngleTool = getPublicTool("PixelLorentzAngleTool") TrigSCTLorentzAngleTool = getPrivateTool("SCTLorentzAngleTool") -from SiLorentzAngleSvc.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup +from SiLorentzAngleTool.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup sctLorentzAngleToolSetup = SCTLorentzAngleToolSetup() # diff --git a/InnerDetector/InDetG4/SCT_G4_SD/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetG4/SCT_G4_SD/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..f436d7dcc46bad6ea58696f67fc47297b7c752f2 --- /dev/null +++ b/InnerDetector/InDetG4/SCT_G4_SD/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +InnerDetector/InDetG4/SCT_G4_SD diff --git a/InnerDetector/InDetG4/SCT_G4_SD/src/SctSensorGmxSD.cxx b/InnerDetector/InDetG4/SCT_G4_SD/src/SctSensorGmxSD.cxx index 589886198db0333d2452f7c3b564445acce2d2c8..6a8ef0e94b1b57d485e74938e0b894d7b99988cd 100644 --- a/InnerDetector/InDetG4/SCT_G4_SD/src/SctSensorGmxSD.cxx +++ b/InnerDetector/InDetG4/SCT_G4_SD/src/SctSensorGmxSD.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // @@ -38,7 +38,7 @@ G4bool SctSensorGmxSD::ProcessHits(G4Step *aStep, G4TouchableHistory * /* not us } edep *= CLHEP::MeV; - G4TouchableHistory *myTouch = (G4TouchableHistory*)(aStep->GetPreStepPoint()->GetTouchable()); + const G4TouchableHistory *myTouch = dynamic_cast<const G4TouchableHistory*>(aStep->GetPreStepPoint()->GetTouchable()); // // Get the hit start and end point local coordinates // diff --git a/InnerDetector/InDetG4/SCT_G4_SD/src/SctSensorSD.cxx b/InnerDetector/InDetG4/SCT_G4_SD/src/SctSensorSD.cxx index 1660846650040eaf55f54fcbe5e0891642ccc601..c25fecf6380f23ce77f168b4e0489f901d5f9470 100644 --- a/InnerDetector/InDetG4/SCT_G4_SD/src/SctSensorSD.cxx +++ b/InnerDetector/InDetG4/SCT_G4_SD/src/SctSensorSD.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // @@ -54,7 +54,7 @@ G4bool SctSensorSD::ProcessHits(G4Step* aStep, G4TouchableHistory* /*ROhist*/) // // Get the Touchable History: // - G4TouchableHistory *myTouch = (G4TouchableHistory*)(aStep->GetPreStepPoint()->GetTouchable()); + const G4TouchableHistory *myTouch = dynamic_cast<const G4TouchableHistory*>(aStep->GetPreStepPoint()->GetTouchable()); // // Get the hit coordinates. Start and End Point // @@ -105,7 +105,7 @@ G4bool SctSensorSD::ProcessHits(G4Step* aStep, G4TouchableHistory* /*ROhist*/) return true; } -void SctSensorSD::indexMethod(G4TouchableHistory *myTouch, double coord1z, +void SctSensorSD::indexMethod(const G4TouchableHistory *myTouch, double coord1z, int &brlEcap, int &layerDisk, int &etaMod, int &phiMod, int &side) { diff --git a/InnerDetector/InDetG4/SCT_G4_SD/src/SctSensorSD.h b/InnerDetector/InDetG4/SCT_G4_SD/src/SctSensorSD.h index 3cc6b108dc98b4d1b6221be9a895be83ce2dc01c..417901b891f485f7d3838558c58778d32a5e04cb 100644 --- a/InnerDetector/InDetG4/SCT_G4_SD/src/SctSensorSD.h +++ b/InnerDetector/InDetG4/SCT_G4_SD/src/SctSensorSD.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /**************************************************************** @@ -41,7 +41,7 @@ public: template <class... Args> void AddHit(Args&&... args){ m_HitColl->Emplace( args... ); } private: - void indexMethod(G4TouchableHistory *myTouch, double coord1z, int &brlEcap, int &layerDisk, int &etaMod, int &phiMod, int &side); + void indexMethod(const G4TouchableHistory *myTouch, double coord1z, int &brlEcap, int &layerDisk, int &etaMod, int &phiMod, int &side); protected: // The hits collection SG::WriteHandle<SiHitCollection> m_HitColl; diff --git a/InnerDetector/InDetG4/SCT_G4_SD/src/SctSensor_CTB.cxx b/InnerDetector/InDetG4/SCT_G4_SD/src/SctSensor_CTB.cxx index 81e8e9da5ea6ca5984d13c20693f95eb507c3136..ce8729d475f3074104b39a94f1f6e8752e4b49ae 100644 --- a/InnerDetector/InDetG4/SCT_G4_SD/src/SctSensor_CTB.cxx +++ b/InnerDetector/InDetG4/SCT_G4_SD/src/SctSensor_CTB.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // @@ -58,7 +58,7 @@ G4bool SctSensor_CTB::ProcessHits(G4Step* aStep, G4TouchableHistory* /*ROhist*/) // // Get the Touchable History: // - G4TouchableHistory* myTouch = (G4TouchableHistory*)(aStep->GetPreStepPoint()->GetTouchable()); + const G4TouchableHistory* myTouch = dynamic_cast<const G4TouchableHistory*>(aStep->GetPreStepPoint()->GetTouchable()); // // Get the hit coordinates. Start and End Point // diff --git a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalHitsMonTool.cxx b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalHitsMonTool.cxx index bbbda6faff9c25f6e7a54f300c83e9911b963cf3..2fbacb3f226f118e0aa4e1e268fb80e54953318f 100644 --- a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalHitsMonTool.cxx +++ b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalHitsMonTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /** @file InDetGlobalHitsMonTool.cxx @@ -56,8 +56,6 @@ InDetGlobalHitsMonTool::InDetGlobalHitsMonTool(const std::string & type, const std::string & name, const IInterface* parent) : InDetGlobalMotherMonTool(type, name, parent), - m_updator(nullptr), - m_nTracks(0), m_tracks(nullptr), m_ID_hitmap_x_y(nullptr), m_ID_hitmap_x_y_eca(nullptr), diff --git a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalHitsMonTool.h b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalHitsMonTool.h index d57282e3095d5cd031be400d31b6d0388793325c..5c8b617ca4ea7343cbb60d71e7e6e3c23fe8190b 100755 --- a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalHitsMonTool.h +++ b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalHitsMonTool.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /** @file InDetGlobalHitsMonTool.h @@ -89,12 +89,9 @@ private: //---------- member variables ------------ /// Updator - const Trk::IUpdator *m_updator; // updator for unbiased states PublicToolHandle<Trk::IUpdator> m_iUpdator {this,"KalmanUpdator","Trk::KalmanUpdator",""}; - int m_nTracks; - ///The track collection const TrackCollection* m_tracks; diff --git a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalManager.cxx b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalManager.cxx index 905bd62980bc4cf73657eca5222d1f348765c086..02869a1007c0c69bcc13e0b4d8b7b9119fda72bd 100755 --- a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalManager.cxx +++ b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalManager.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /** @file InDetGlobalManager.cxx @@ -39,8 +39,7 @@ InDetGlobalManager::InDetGlobalManager( const std::string &name, ISvcLocator *pSvcLocator) - : AthenaMonManager(name, pSvcLocator), - m_CombinedTracks(0) + : AthenaMonManager(name, pSvcLocator) { } diff --git a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalManager.h b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalManager.h index ea379507a9b0c1ec8efbf40f08f2ceac910ca60f..10cae4e89e84de9a2afd859815a8ab5d56e704af 100755 --- a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalManager.h +++ b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalManager.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /** @file InDetGlobalManager.h @@ -57,8 +57,6 @@ private: /// Name of combined inner detector tracks container SG::ReadHandleKey<TrackCollection> m_CombinedTracksName{this,"CombinedTrackName", "ExtendedTracks", "Combined Track Collection For Monitoring"}; - const TrackCollection *m_CombinedTracks; - /// Name of trt drift circle container SG::ReadHandleKey<InDet::TRT_DriftCircleContainer> m_TRT_DriftCircleName{this,"TRT_DriftCircleName", "TRT_DriftCircles", "TRT Drift Circle Collection For Monitoring"}; diff --git a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalNoiseOccupancyMonTool.cxx b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalNoiseOccupancyMonTool.cxx index 929a0b5dd4e8d8581cf1cd880f3be252fee7a55d..b611beb8ecbdbebe6fa7c4d75812fb30aa6fa696 100755 --- a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalNoiseOccupancyMonTool.cxx +++ b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalNoiseOccupancyMonTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /** @file InDetGlobalNoiseOccupancyMonTool.cxx @@ -110,7 +110,7 @@ InDetGlobalNoiseOccupancyMonTool::InDetGlobalNoiseOccupancyMonTool( m_SCT_TRT_NO(0), m_SCT_PIX_NO(0), m_PIX_TRT_NO(0), - m_PIX_SCT_TRT_NO(0), + //m_PIX_SCT_TRT_NO(0), m_TRT_SCTvTRT_PIX_10evt(0), m_TRT_SCTvSCT_PIX_10evt(0), m_TRT_PIXvSCT_PIX_10evt(0), @@ -1143,20 +1143,17 @@ int InDetGlobalNoiseOccupancyMonTool::GetSCTCounts(int barrel_ec_sel, bool do_ch int barrel_ec = barrel_ec_sel; int nStripsCntr = 0; - // IDhelper do checks on components. Like strips. - m_sctID->set_do_checks(do_checks_flg); - Identifier rdoId; int layer_disk_max = 0; if(barrel_ec_sel == 0) { layer_disk_max = 3; - rdoId= m_sctID->strip_id(barrel_ec, 0, 0, -6, 0, 0); // start point for barrel + rdoId= m_sctID->strip_id(barrel_ec, 0, 0, -6, 0, 0, do_checks_flg); // start point for barrel } else if(barrel_ec_sel == -2 || barrel_ec_sel == 2) { layer_disk_max = 8; - rdoId = m_sctID->strip_id(barrel_ec, 0, 0, 0, 0, 0); // start point for ec + rdoId = m_sctID->strip_id(barrel_ec, 0, 0, 0, 0, 0, do_checks_flg); // start point for ec } for(int layerItr = 0 ; layerItr <= layer_disk_max ; layerItr++) // 3 layer_disk for Barrel @@ -1171,7 +1168,7 @@ int InDetGlobalNoiseOccupancyMonTool::GetSCTCounts(int barrel_ec_sel, bool do_ch int strip_max_m = m_sctID->strip_max(rdoId); for(int stripItr = 0 ; stripItr <= strip_max_m ; stripItr++) // strips { - rdoId = m_sctID->strip_id(barrel_ec, layerItr, phiItr, etaItr, sideItr, stripItr); + rdoId = m_sctID->strip_id(barrel_ec, layerItr, phiItr, etaItr, sideItr, stripItr, do_checks_flg); nStripsCntr++; } } @@ -1180,7 +1177,7 @@ int InDetGlobalNoiseOccupancyMonTool::GetSCTCounts(int barrel_ec_sel, bool do_ch } // Start point for the positive part. Good for barrel and ec. - rdoId = m_sctID->strip_id(barrel_ec, 0, 0, 1, 0, 0); + rdoId = m_sctID->strip_id(barrel_ec, 0, 0, 1, 0, 0, do_checks_flg); for(int layerItr = 0 ; layerItr <= layer_disk_max ; layerItr++) // 3 layer_disk for Barrel { for(int phiItr = 0 ; phiItr <= m_sctID->phi_module_max(rdoId) ; phiItr++) // phi modules @@ -1193,7 +1190,7 @@ int InDetGlobalNoiseOccupancyMonTool::GetSCTCounts(int barrel_ec_sel, bool do_ch int strip_max_m = m_sctID->strip_max(rdoId); for(int stripItr = 0 ; stripItr <= strip_max_m ; stripItr++) // strips { - rdoId = m_sctID->strip_id(barrel_ec, layerItr, phiItr, etaItr, sideItr, stripItr); + rdoId = m_sctID->strip_id(barrel_ec, layerItr, phiItr, etaItr, sideItr, stripItr, do_checks_flg); //m_sctID->print(rdoId); nStripsCntr++; } @@ -1228,27 +1225,24 @@ int InDetGlobalNoiseOccupancyMonTool::GetPixelCounts(int barrel_ec_sel, bool do_ int barrel_ec = barrel_ec_sel; int nPixelCntr = 0; - // IDhelper do checks on components. Like strips. - m_pixelID->set_do_checks(do_checks_flg); - Identifier rdoId; int layer_disk_max = 0; if(barrel_ec_sel == 0) { layer_disk_max = 2; - rdoId= m_pixelID->pixel_id(barrel_ec, 0, 0, 0, 0, 0); // start point for barrel + rdoId= m_pixelID->pixel_id(barrel_ec, 0, 0, 0, 0, 0, do_checks_flg); // start point for barrel } else if(barrel_ec_sel == -2 || barrel_ec_sel == 2) { layer_disk_max = 2; - rdoId = m_pixelID->pixel_id(barrel_ec, 0, 0, 0, 0, 0); // start point for ec + rdoId = m_pixelID->pixel_id(barrel_ec, 0, 0, 0, 0, 0, do_checks_flg); // start point for ec } for(int layerItr = 0 ; layerItr <= layer_disk_max ; layerItr++) // 3 layer_disk for Barrel { - int eta_module_min = m_pixelID->eta_module_min( m_pixelID->pixel_id(barrel_ec, layerItr, 0, 0, 0, 0) ); - int phi_module_max = m_pixelID->phi_module_max( m_pixelID->pixel_id(barrel_ec, layerItr, 0, 0, 0, 0) ); - int eta_module_max = m_pixelID->eta_module_max( m_pixelID->pixel_id(barrel_ec, layerItr, 0, 0, 0, 0) ); + int eta_module_min = m_pixelID->eta_module_min( m_pixelID->pixel_id(barrel_ec, layerItr, 0, 0, 0, 0, do_checks_flg) ); + int phi_module_max = m_pixelID->phi_module_max( m_pixelID->pixel_id(barrel_ec, layerItr, 0, 0, 0, 0, do_checks_flg) ); + int eta_module_max = m_pixelID->eta_module_max( m_pixelID->pixel_id(barrel_ec, layerItr, 0, 0, 0, 0, do_checks_flg) ); for(int phiItr = 0 ; phiItr <= phi_module_max ; phiItr++) // phi modules { for(int etaItr = eta_module_min; etaItr <= eta_module_max; etaItr++) // eta modules diff --git a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalNoiseOccupancyMonTool.h b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalNoiseOccupancyMonTool.h index 2b11f88c1ed994fd930f50b02b6c5665e2cb7a4b..2a196404639e9b779e60625d0129fb0eb85ed448 100755 --- a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalNoiseOccupancyMonTool.h +++ b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalNoiseOccupancyMonTool.h @@ -1,244 +1,243 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ -/** @file InDetGlobalNoiseOccupancyMonTool.h - * Implementation of inner detector global noise occupancy monitoring tool - * - * @author - * Anne-Catherine Le Bihan <Anne-Catherine.Le.Bihan@cern.ch> @n - * Heidi Sandaker <Heidi.Sandaker@cern.ch> @n - * Arshak Tonoyan <Arshak.Tonyoan@cern.ch> @n - * Thomas Burgess <Thomas.Burgess@cern.ch> - * - * $Id: InDetGlobalNoiseOccupancyMonTool.h,v 1.28 2009-05-13 13:43:47 kastanas Exp $ - * - ****************************************************************************/ - - -#ifndef InDetGlobalNoiseOccupancyMonTool_H -#define InDetGlobalNoiseOccupancyMonTool_H - -//Local -#include "InDetGlobalMotherMonTool.h" -//Standard C++ -#include <string> -#include <vector> -#include <list> -using namespace std; - -//Pre declarations -class TH1F_LW; -class TH2F_LW; -class TProfile_LW; -class IInterface; -class StatusCode; - -/// Monitoring tool derived from InDetGlobalMotherMonTool -/// Tools to verify correlaction in noise occupancy between the three detectors - -class InDetGlobalNoiseOccupancyMonTool : public InDetGlobalMotherMonTool{ - - public: - /// Constructor - InDetGlobalNoiseOccupancyMonTool(const string & type, - const string & name, - const IInterface* parent); - - /// Virtual destructor - virtual ~InDetGlobalNoiseOccupancyMonTool() {} - - ///@name Book, fill and proc histograms - ///@{ - ///@copydoc InDetGlobalMotherMonTool::bookHistograms() - virtual StatusCode bookHistogramsRecurrent(); - - ///@copydoc InDetGlobalMotherMonTool::fillHistograms() - virtual StatusCode fillHistograms(); - ///@} - - - private: - /** Check if Drift Circle is on Track - *@param DCId Drift Circle Identifier - *@return true if DC is on track - */ - bool isOnTrack(const Identifier &DCId) const; - - /** Get triplet id - *@paraFGem list - *@param rdoId - *@return - */ - int histIdx( const vector<int> &aList, - const Identifier &rdoId) const; - - - /* - * container for holding calculated NO for each event together - * Added by m - */ - struct noise{ - float trt_no; - float sct_no; - float pix_no; - }; - - /* - * new methods for calculating the correlation coefficients - * Added by m - */ - void correlation_coeffs(vector<struct noise> &no); - - float calc_correlation(float *sum_x, float *sum_y, - float *sum_xy, float *sum_x_sq, float *sum_y_sq, - int *points); - - int GetSCTCounts(int barrel_ec_sel, bool do_checks_flg); - int GetPixelCounts(int barrel_ec_sel, bool do_checks_flg); - - - //-------- private member variables -------- - - const TrackCollection* m_tracks; - - /// Geometric description (to be replaced with database entries) - float m_nStraws; - float m_nStraws_B; - float m_nStraws_ECA; - float m_nStraws_ECC; - - float m_nStrips; - float m_nStrips_B; - float m_nStrips_ECA; - float m_nStrips_ECC; - - float m_nPixels; - float m_nPixels_B; - float m_nPixels_ECA; - float m_nPixels_ECC; - - /// pixel histogram max limit - float m_pixelMax; - int m_pixel_nBins; - - ///SCT histogram limit - float m_sctMax; - int m_sct_nBins; - - ///TRT histogram limit - float m_trtMax; - int m_trt_nBins; - - bool m_start; - bool m_doData; - - //--- Combined noise correleations --------------------------- - - ///TRT noise occupancy vs SCT noise occupancy - TH2F_LW * m_SCT_TRT_NO; - - ///PIX noise occupancy vs SCT noise occupancy - TH2F_LW * m_SCT_PIX_NO; - - ///PIX noise occupancy vs TRT noise occupancy - TH2F_LW * m_PIX_TRT_NO; - - ///PIX noise occupancy vs event number - TH2F_LW * m_PIX_SCT_TRT_NO; - - - - /* new correlation coefficient histos to combine TRT, - * SCT and PIX NO - * Added by m - */ - - TH2F_LW * m_TRT_SCTvTRT_PIX_10evt; - TH2F_LW * m_TRT_SCTvSCT_PIX_10evt; - TH2F_LW * m_TRT_PIXvSCT_PIX_10evt; - - //--- Debug histograms Pixel ------------------------- - - ///PIX noise occupancy vs event number - TProfile_LW* m_PIX_NO_evt; - - ///PIX noise occupancy - TH1F_LW * m_PIX_NO; - TH1F_LW * m_PIX_NO_B; - TH1F_LW * m_PIX_NO_ECA; - TH1F_LW * m_PIX_NO_ECC; - - ///PIX noise occupancy vs number of PIX segments - TH2F_LW * m_PIX_NO_nseg; - - ///PIX noise occupancy vs number of PIX segments - TH2F_LW * m_PIX_NO_ntrk; - - //--- Debug histograms SCT ------------------------- - - ///SCT noise occupancy vs event number - TProfile_LW* m_SCT_NO_evt; - - ///SCT noise occupancy - TH1F_LW * m_SCT_NO; - TH1F_LW * m_SCT_NO_B; - TH1F_LW * m_SCT_NO_ECA; - TH1F_LW * m_SCT_NO_ECC; - - ///SCT noise occupancy vs number of SCT segments" - TH2F_LW * m_SCT_NO_nseg; - - ///SCT noise occupancy vs number of combined tracks - TH2F_LW * m_SCT_NO_ntrk; - - //--- Debug histograms TRT ------------------------- - - ///TRT noise occupancy vs event number - TProfile_LW* m_TRT_NO_evt; - - ///TRT noise occupancy vs phi sector (barrel) - TProfile_LW* m_TRT_NO_BA_phi; - TProfile_LW* m_TRT_NO_BC_phi; - - ///TRT noise occupancy vs phi sector (ECA) - TProfile_LW* m_TRT_NO_ECA_phi; - - ///TRT noise occupancy vs phi sector (ECC) - TProfile_LW* m_TRT_NO_ECC_phi; - - ///TRT HL noise occupancy vs event number - TProfile_LW* m_TRT_HL_NO_evt; - - ///TRT noise occupancy - TH1F_LW * m_TRT_NO; - - ///TRT HL noise occupancy - TH1F_LW * m_TRT_HL_NO; - - ///TRT noise occupancy vs number of TRT segments - TH2F_LW * m_TRT_NO_nseg; - - ///TRT noise occupancy vs number of combined tracks - TH2F_LW * m_TRT_NO_ntrk; - - /// Temporary (to be verified) - vector<int> m_phiModBTemp; - vector<int> m_phiModECATemp; - vector<int> m_phiModECCTemp; - - /// list of trt circle identifiers - list<Identifier> m_dcidOnTrack; - - /* - * Vector to hold the noise occupancies so they can - * be saved for calculating correlation coefficients - * on several points instead of being over-written - * each time - * Added by m - */ - - vector<struct noise> m_NO; -}; - -#endif +/** @file InDetGlobalNoiseOccupancyMonTool.h + * Implementation of inner detector global noise occupancy monitoring tool + * + * @author + * Anne-Catherine Le Bihan <Anne-Catherine.Le.Bihan@cern.ch> @n + * Heidi Sandaker <Heidi.Sandaker@cern.ch> @n + * Arshak Tonoyan <Arshak.Tonyoan@cern.ch> @n + * Thomas Burgess <Thomas.Burgess@cern.ch> + * + * $Id: InDetGlobalNoiseOccupancyMonTool.h,v 1.28 2009-05-13 13:43:47 kastanas Exp $ + * + ****************************************************************************/ + + +#ifndef InDetGlobalNoiseOccupancyMonTool_H +#define InDetGlobalNoiseOccupancyMonTool_H + +//Local +#include "InDetGlobalMotherMonTool.h" +//Standard C++ +#include <string> +#include <vector> +#include <list> + +//Pre declarations +class TH1F_LW; +class TH2F_LW; +class TProfile_LW; +class IInterface; +class StatusCode; + +/// Monitoring tool derived from InDetGlobalMotherMonTool +/// Tools to verify correlaction in noise occupancy between the three detectors + +class InDetGlobalNoiseOccupancyMonTool : public InDetGlobalMotherMonTool{ + + public: + /// Constructor + InDetGlobalNoiseOccupancyMonTool(const std::string & type, + const std::string & name, + const IInterface* parent); + + /// Virtual destructor + virtual ~InDetGlobalNoiseOccupancyMonTool() {} + + ///@name Book, fill and proc histograms + ///@{ + ///@copydoc InDetGlobalMotherMonTool::bookHistograms() + virtual StatusCode bookHistogramsRecurrent(); + + ///@copydoc InDetGlobalMotherMonTool::fillHistograms() + virtual StatusCode fillHistograms(); + ///@} + + + private: + /** Check if Drift Circle is on Track + *@param DCId Drift Circle Identifier + *@return true if DC is on track + */ + bool isOnTrack(const Identifier &DCId) const; + + /** Get triplet id + *@paraFGem list + *@param rdoId + *@return + */ + int histIdx( const std::vector<int> &aList, + const Identifier &rdoId) const; + + + /* + * container for holding calculated NO for each event together + * Added by m + */ + struct noise{ + float trt_no; + float sct_no; + float pix_no; + }; + + /* + * new methods for calculating the correlation coefficients + * Added by m + */ + void correlation_coeffs(std::vector<struct noise> &no); + + float calc_correlation(float *sum_x, float *sum_y, + float *sum_xy, float *sum_x_sq, float *sum_y_sq, + int *points); + + int GetSCTCounts(int barrel_ec_sel, bool do_checks_flg); + int GetPixelCounts(int barrel_ec_sel, bool do_checks_flg); + + + //-------- private member variables -------- + + const TrackCollection* m_tracks; + + /// Geometric description (to be replaced with database entries) + float m_nStraws; + float m_nStraws_B; + float m_nStraws_ECA; + float m_nStraws_ECC; + + float m_nStrips; + float m_nStrips_B; + float m_nStrips_ECA; + float m_nStrips_ECC; + + float m_nPixels; + float m_nPixels_B; + float m_nPixels_ECA; + float m_nPixels_ECC; + + /// pixel histogram max limit + float m_pixelMax; + int m_pixel_nBins; + + ///SCT histogram limit + float m_sctMax; + int m_sct_nBins; + + ///TRT histogram limit + float m_trtMax; + int m_trt_nBins; + + bool m_start; + bool m_doData; + + //--- Combined noise correleations --------------------------- + + ///TRT noise occupancy vs SCT noise occupancy + TH2F_LW * m_SCT_TRT_NO; + + ///PIX noise occupancy vs SCT noise occupancy + TH2F_LW * m_SCT_PIX_NO; + + ///PIX noise occupancy vs TRT noise occupancy + TH2F_LW * m_PIX_TRT_NO; + + ///PIX noise occupancy vs event number + //TH2F_LW * m_PIX_SCT_TRT_NO; + + + + /* new correlation coefficient histos to combine TRT, + * SCT and PIX NO + * Added by m + */ + + TH2F_LW * m_TRT_SCTvTRT_PIX_10evt; + TH2F_LW * m_TRT_SCTvSCT_PIX_10evt; + TH2F_LW * m_TRT_PIXvSCT_PIX_10evt; + + //--- Debug histograms Pixel ------------------------- + + ///PIX noise occupancy vs event number + TProfile_LW* m_PIX_NO_evt; + + ///PIX noise occupancy + TH1F_LW * m_PIX_NO; + TH1F_LW * m_PIX_NO_B; + TH1F_LW * m_PIX_NO_ECA; + TH1F_LW * m_PIX_NO_ECC; + + ///PIX noise occupancy vs number of PIX segments + TH2F_LW * m_PIX_NO_nseg; + + ///PIX noise occupancy vs number of PIX segments + TH2F_LW * m_PIX_NO_ntrk; + + //--- Debug histograms SCT ------------------------- + + ///SCT noise occupancy vs event number + TProfile_LW* m_SCT_NO_evt; + + ///SCT noise occupancy + TH1F_LW * m_SCT_NO; + TH1F_LW * m_SCT_NO_B; + TH1F_LW * m_SCT_NO_ECA; + TH1F_LW * m_SCT_NO_ECC; + + ///SCT noise occupancy vs number of SCT segments" + TH2F_LW * m_SCT_NO_nseg; + + ///SCT noise occupancy vs number of combined tracks + TH2F_LW * m_SCT_NO_ntrk; + + //--- Debug histograms TRT ------------------------- + + ///TRT noise occupancy vs event number + TProfile_LW* m_TRT_NO_evt; + + ///TRT noise occupancy vs phi sector (barrel) + TProfile_LW* m_TRT_NO_BA_phi; + TProfile_LW* m_TRT_NO_BC_phi; + + ///TRT noise occupancy vs phi sector (ECA) + TProfile_LW* m_TRT_NO_ECA_phi; + + ///TRT noise occupancy vs phi sector (ECC) + TProfile_LW* m_TRT_NO_ECC_phi; + + ///TRT HL noise occupancy vs event number + TProfile_LW* m_TRT_HL_NO_evt; + + ///TRT noise occupancy + TH1F_LW * m_TRT_NO; + + ///TRT HL noise occupancy + TH1F_LW * m_TRT_HL_NO; + + ///TRT noise occupancy vs number of TRT segments + TH2F_LW * m_TRT_NO_nseg; + + ///TRT noise occupancy vs number of combined tracks + TH2F_LW * m_TRT_NO_ntrk; + + /// Temporary (to be verified) + std::vector<int> m_phiModBTemp; + std::vector<int> m_phiModECATemp; + std::vector<int> m_phiModECCTemp; + + /// list of trt circle identifiers + std::list<Identifier> m_dcidOnTrack; + + /* + * Vector to hold the noise occupancies so they can + * be saved for calculating correlation coefficients + * on several points instead of being over-written + * each time + * Added by m + */ + + std::vector<struct noise> m_NO; +}; + +#endif diff --git a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalPixelTool.cxx b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalPixelTool.cxx index 5aee40acd5e4a8ea47483e4ff770165801318e9d..007c8993414733eb1fe0e2ea4c27781f57bbd4e9 100755 --- a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalPixelTool.cxx +++ b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalPixelTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /** @file InDetGlobalPixelTool.cxx @@ -22,7 +22,6 @@ #include "TMath.h" #include "TH1F.h" #include "TH2F.h" -using namespace TMath; //Standard c++ #include <string> //tracks @@ -39,6 +38,8 @@ using namespace TMath; #include "EventPrimitives/EventPrimitivesHelpers.h" +using namespace TMath; + InDetGlobalPixelTool::InDetGlobalPixelTool( const std::string & type, const std::string & name, @@ -57,7 +58,6 @@ InDetGlobalPixelTool::InDetGlobalPixelTool( m_Pixel_track_bar_lay0_cluster_occupancy(0), m_Pixel_track_bar_lay1_cluster_occupancy(0), m_Pixel_track_bar_lay2_cluster_occupancy(0), - m_Pixel_track_Lvl1ID(0), m_Pixel_track_Lvl1A(0), m_Pixel_track_chi2(0), m_Pixel_track_qOverP(0), diff --git a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalPixelTool.h b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalPixelTool.h index 142ba85ca5ba9233ad3b57d9786b32bd9bb3f5d6..e15dc8b0cd05bd8b10e56d7eb2f813cfb5fb5b86 100755 --- a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalPixelTool.h +++ b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalPixelTool.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /** @file InDetGlobalPixelTool.h @@ -66,7 +66,6 @@ class InDetGlobalPixelTool : public InDetGlobalMotherMonTool TH2F* m_Pixel_track_bar_lay0_cluster_occupancy; TH2F* m_Pixel_track_bar_lay1_cluster_occupancy; TH2F* m_Pixel_track_bar_lay2_cluster_occupancy; - TH1F* m_Pixel_track_Lvl1ID; TH1F* m_Pixel_track_Lvl1A; TH1F* m_Pixel_track_chi2; TH1F* m_Pixel_track_qOverP; diff --git a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalTopBottomMonTool.cxx b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalTopBottomMonTool.cxx index 7bda7a1a66b6b3e3af121b8fa4412a3e1ae280b3..51f73b0aa34a8bc4a9584c48a78afe2611ef5c55 100755 --- a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalTopBottomMonTool.cxx +++ b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalTopBottomMonTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /** @file InDetGlobalTopBottomMonTool.cxx @@ -45,25 +45,21 @@ InDetGlobalTopBottomMonTool::InDetGlobalTopBottomMonTool( m_top_d0(0), m_top_z0(0), m_top_phi(0), - m_top_dphi(0), m_top_eta(0), m_top_chi2(0), m_bottom_d0(0), m_bottom_z0(0), m_bottom_phi(0), - m_bottom_dphi(0), m_bottom_eta(0), m_bottom_chi2(0), m_top_d0_1trk(0), m_top_z0_1trk(0), m_top_phi_1trk(0), - m_top_dphi_1trk(0), m_top_eta_1trk(0), m_top_chi2_1trk(0), m_bottom_d0_1trk(0), m_bottom_z0_1trk(0), m_bottom_phi_1trk(0), - m_bottom_dphi_1trk(0), m_bottom_eta_1trk(0), m_bottom_chi2_1trk(0), m_top_bottom_dd0(0), diff --git a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalTopBottomMonTool.h b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalTopBottomMonTool.h index 8947378455b5c567d79ce65d4152afe36f2e101c..a032ba3e233543873052961a63c04c987329c867 100755 --- a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalTopBottomMonTool.h +++ b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalTopBottomMonTool.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /** @file InDetGlobalTopBottomMonTool.h @@ -78,14 +78,12 @@ private: TH1F* m_top_d0; TH1F* m_top_z0; TH1F* m_top_phi; - TH1F* m_top_dphi; TH1F* m_top_eta; TH1F* m_top_chi2; TH1F* m_bottom_d0; TH1F* m_bottom_z0; TH1F* m_bottom_phi; - TH1F* m_bottom_dphi; TH1F* m_bottom_eta; TH1F* m_bottom_chi2; @@ -93,14 +91,12 @@ private: TH1F* m_top_d0_1trk; TH1F* m_top_z0_1trk; TH1F* m_top_phi_1trk; - TH1F* m_top_dphi_1trk; TH1F* m_top_eta_1trk; TH1F* m_top_chi2_1trk; TH1F* m_bottom_d0_1trk; TH1F* m_bottom_z0_1trk; TH1F* m_bottom_phi_1trk; - TH1F* m_bottom_dphi_1trk; TH1F* m_bottom_eta_1trk; TH1F* m_bottom_chi2_1trk; diff --git a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalTrackMonTool.cxx b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalTrackMonTool.cxx index 82f89687b7985e752b513289aca63e6a28fb8565..fdc18f4f459ed986a640c678d75edd5b4c857e5a 100644 --- a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalTrackMonTool.cxx +++ b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalTrackMonTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /** @file InDetGlobalTrackMonTool.cxx @@ -62,7 +62,6 @@ InDetGlobalTrackMonTool::InDetGlobalTrackMonTool( const std::string & type, : ManagedMonitorToolBase(type, name, parent), m_baseline_selTool( "InDet::InDetTrackSelectionTool/TrackSelectionTool", this ), m_tight_selTool( "InDet::InDetTrackSelectionTool/TrackSelectionTool", this ), - m_doLumiblock(true), m_doHolePlots(false), m_DoHoles_Search(false), m_doHitMaps(false), @@ -112,7 +111,6 @@ InDetGlobalTrackMonTool::InDetGlobalTrackMonTool( const std::string & type, m_holes_eta_pt(nullptr), m_holes_phi_pt(nullptr), m_holes_eta_phi_n(nullptr), - m_holesComb2(nullptr), m_holes_hits(nullptr), m_holesvshits(nullptr), m_holesvshits_ECA(nullptr), @@ -778,10 +776,10 @@ StatusCode InDetGlobalTrackMonTool::procHistograms() void InDetGlobalTrackMonTool::FillHits( const Trk::Track *track, const std::unique_ptr<const Trk::TrackSummary> & summary ) { - int pixHits = ( summary->get(Trk::numberOfPixelHits) >= 0 ) ? summary->get(Trk::numberOfPixelHits) : 0 - + ( summary->get(Trk::numberOfPixelDeadSensors) >= 0 ) ? summary->get(Trk::numberOfPixelDeadSensors ) : 0; - int sctHits = ( ( summary->get(Trk::numberOfSCTHits) >= 0 ) ? summary->get(Trk::numberOfSCTHits) : 0 ) - + ( ( summary->get(Trk::numberOfSCTDeadSensors) >= 0 ) ? summary->get(Trk::numberOfSCTDeadSensors) : 0 ); + int pixHits = ( summary->get(Trk::numberOfPixelHits) >= 0 ? summary->get(Trk::numberOfPixelHits) : 0 ) + + ( summary->get(Trk::numberOfPixelDeadSensors) >= 0 ? summary->get(Trk::numberOfPixelDeadSensors ) : 0 ); + int sctHits = (summary->get(Trk::numberOfSCTHits) >= 0 ? summary->get(Trk::numberOfSCTHits) : 0) + + (summary->get(Trk::numberOfSCTDeadSensors) >= 0 ? summary->get(Trk::numberOfSCTDeadSensors) : 0 ); int trtHits = summary->get(Trk::numberOfTRTHits) + summary->get(Trk::numberOfTRTDeadStraws); const Trk::Perigee *perigee = track->perigeeParameters(); diff --git a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalTrackMonTool.h b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalTrackMonTool.h index 9cfe9573419ac3e9c3c23c6049fe3f120b821180..998c7bdddda74c7e1695e1f3b1ebfdae89dacde5 100755 --- a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalTrackMonTool.h +++ b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalTrackMonTool.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ @@ -111,8 +111,6 @@ private: ToolHandle< InDet::IInDetTrackSelectionTool > m_baseline_selTool; ToolHandle< InDet::IInDetTrackSelectionTool > m_tight_selTool; - ///Switch if LB accounting should be done - bool m_doLumiblock; /// Switch for hole searching bool m_doHolePlots; bool m_DoHoles_Search; @@ -212,7 +210,6 @@ private: TProfile2D *m_holes_eta_pt; TProfile2D *m_holes_phi_pt; TProfile2D *m_holes_eta_phi_n; - TH1F *m_holesComb2; TProfile *m_holes_hits; TH2F *m_holesvshits; TH2F *m_holesvshits_ECA; diff --git a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/share/ElectronEoverPTracking.py b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/share/ElectronEoverPTracking.py index 50868637b9b5649fc379fbf7683f801fd721cbea..e46f6e1db332269577536d42f8a2031f9eb9715b 100755 --- a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/share/ElectronEoverPTracking.py +++ b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/share/ElectronEoverPTracking.py @@ -20,7 +20,7 @@ topSequence = AlgSequence() ############################################################################### ############################################################################### # SiLorentzAngleTool -from SiLorentzAngleSvc.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup +from SiLorentzAngleTool.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup sctLorentzAngleToolSetup = SCTLorentzAngleToolSetup() # # load SCT ROT creator, we overwrite the defaults for it diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/CMakeLists.txt b/InnerDetector/InDetMonitoring/PixelMonitoring/CMakeLists.txt index 71730b7c224a08719bf80417a2e201b834eb0aca..1aa1e1e716e8a157cc23a26dd9db801e496fa4fa 100644 --- a/InnerDetector/InDetMonitoring/PixelMonitoring/CMakeLists.txt +++ b/InnerDetector/InDetMonitoring/PixelMonitoring/CMakeLists.txt @@ -19,7 +19,7 @@ atlas_depends_on_subdirs( PRIVATE Database/AthenaPOOL/AthenaPoolUtilities DetectorDescription/GeoPrimitives - Event/EventInfo + Event/xAOD/xAODEventInfo Event/EventPrimitives InnerDetector/InDetConditions/InDetConditionsSummaryService InnerDetector/InDetConditions/PixelConditionsServices @@ -44,7 +44,7 @@ atlas_add_component( PixelMonitoring INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaMonitoringLib AtlasDetDescr GaudiKernel InDetRawData InDetPrepRawData LumiBlockCompsLib TrkTrack - AthenaPoolUtilities GeoPrimitives EventInfo EventPrimitives InDetIdentifier + AthenaPoolUtilities GeoPrimitives xAODEventInfo EventPrimitives InDetIdentifier InDetReadoutGeometry InDetRIO_OnTrack LWHists TrkParameters TrkSpacePoint TrkTrackSummary TrkToolInterfaces PixelCablingLib PixelGeoModelLib PathResolver InDetTrackSelectionToolLib ) diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/PixelMainMon.h b/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/PixelMainMon.h index 12e994d3993773bc19f67338ddb8677ea2c59c9f..b7a41aeaa2fb216260c52502d3be969b38858f91 100755 --- a/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/PixelMainMon.h +++ b/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/PixelMainMon.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef PIXMAINMON_H_ @@ -21,7 +21,6 @@ #include "AtlasDetDescr/AtlasDetectorID.h" #include "LumiBlockComps/ILuminosityTool.h" #include "PixelGeoModel/IBLParameterSvc.h" -#include "EventInfo/EventInfo.h" #include "xAODEventInfo/EventInfo.h" #include "StoreGate/ReadHandleKey.h" #include "InDetConditionsSummaryService/IInDetConditionsTool.h" @@ -211,7 +210,6 @@ class PixelMainMon : public ManagedMonitorToolBase { SG::ReadHandleKey<TrackCollection> m_TracksName; SG::ReadHandleKey<InDetTimeCollection> m_PixelBCIDName; SG::ReadHandleKey<xAOD::EventInfo> m_eventxAODInfoKey; - SG::ReadHandleKey<EventInfo> m_eventInfoKey; std::string m_detector_error_name; std::string m_histTitleExt; diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/src/Hits.cxx b/InnerDetector/InDetMonitoring/PixelMonitoring/src/Hits.cxx index 82130edd0202bf4e866e375c310019ddfcda86a1..50c90a7378d3c1399edc86d53ad25550d14cfacc 100644 --- a/InnerDetector/InDetMonitoring/PixelMonitoring/src/Hits.cxx +++ b/InnerDetector/InDetMonitoring/PixelMonitoring/src/Hits.cxx @@ -31,7 +31,6 @@ #include "PixelMonitoring/PixelMon2DProfilesLW.h" #include "PixelMonitoring/PixelMonModules.h" -#include "EventInfo/TriggerInfo.h" #include "PixelCabling/IPixelCablingSvc.h" /////////////////////////////////////////////////////////////////////////////// @@ -470,11 +469,11 @@ StatusCode PixelMainMon::fillHitsMon(void) // Called once per event } int lvl1idATLAS(-1); - auto thisEventInfo = SG::makeHandle(m_eventInfoKey); + SG::ReadHandle<xAOD::EventInfo> thisEventInfo(m_eventxAODInfoKey); if(!(thisEventInfo.isValid())) { ATH_MSG_WARNING("No EventInfo object found"); } else { - lvl1idATLAS = (int)((thisEventInfo->trigger_info()->extendedLevel1ID()) & 0xf); + lvl1idATLAS = (int)((thisEventInfo->extendedLevel1ID()) & 0xf); } // retrieve Pixel RDO container from storegate diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelMainMon.cxx b/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelMainMon.cxx index 7482d602487a6488208ee098bd8f33cfaa85db42..67a8b1c8a7bd1521e043f3d5570bb1f839703c06 100755 --- a/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelMainMon.cxx +++ b/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelMainMon.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////////////////// @@ -130,7 +130,6 @@ PixelMainMon::PixelMainMon(const std::string& type, const std::string& name, con m_currentTime = 0; m_runNum = 0; m_idHelper = 0; - m_eventInfoKey = "ByteStreamEventInfo"; m_eventxAODInfoKey = "EventInfo"; // Initalize all pointers for histograms @@ -387,7 +386,6 @@ StatusCode PixelMainMon::initialize() { ATH_CHECK(m_Pixel_SiClustersName.initialize()); ATH_CHECK(m_TracksName.initialize()); ATH_CHECK(m_PixelBCIDName.initialize()); - ATH_CHECK(m_eventInfoKey.initialize()); ATH_CHECK(m_eventxAODInfoKey.initialize()); // Retrieve tools if (detStore()->retrieve(m_pixelid, "PixelID").isFailure()) { diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/CMakeLists.txt b/InnerDetector/InDetMonitoring/SCT_Monitoring/CMakeLists.txt index 9749feb29e3bcb649b759c72d744f1e527cfd2d4..8aea144471a62ba529580be2370e51e61dee1d8c 100644 --- a/InnerDetector/InDetMonitoring/SCT_Monitoring/CMakeLists.txt +++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/CMakeLists.txt @@ -10,7 +10,6 @@ atlas_depends_on_subdirs( PUBLIC Commission/CommissionEvent Control/AthenaMonitoring Control/StoreGate - Event/EventInfo Event/xAOD/xAODEventInfo GaudiKernel InnerDetector/InDetConditions/InDetConditionsSummaryService @@ -49,7 +48,7 @@ atlas_add_component( SCT_Monitoring src/*.cxx src/components/*.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} AthenaMonitoringLib GaudiKernel InDetReadoutGeometry InDetPrepRawData MagFieldInterfaces ITrackToVertex TrkTrack TrkToolInterfaces CommissionEvent AthenaKernel AthContainers Identifier EventInfo InDetIdentifier InDetRawData InDetRIO_OnTrack LWHists PathResolver TrkSurfaces TrkEventUtils TrkMeasurementBase TrkParameters TrkRIO_OnTrack TrkSpacePoint TrkTrackSummary ) + LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} AthenaMonitoringLib GaudiKernel InDetReadoutGeometry InDetPrepRawData MagFieldInterfaces ITrackToVertex TrkTrack TrkToolInterfaces CommissionEvent AthenaKernel AthContainers Identifier InDetIdentifier InDetRawData InDetRIO_OnTrack LWHists PathResolver TrkSurfaces TrkEventUtils TrkMeasurementBase TrkParameters TrkRIO_OnTrack TrkSpacePoint TrkTrackSummary ) # Install files from the package: atlas_install_headers( SCT_Monitoring ) diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..fc7962c0e8af980dfc481ecea4ab76c62bf41386 --- /dev/null +++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +InnerDetector/InDetMonitoring/SCT_Monitoring diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTErrMonTool.h b/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTErrMonTool.h old mode 100755 new mode 100644 diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTHitEffMonTool.h b/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTHitEffMonTool.h old mode 100755 new mode 100644 diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTLorentzMonTool.h b/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTLorentzMonTool.h old mode 100755 new mode 100644 diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTMotherTrigMonTool.h b/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTMotherTrigMonTool.h old mode 100755 new mode 100644 index c0960856bc33be4245280997b11c8393da253c7b..527ad41df5aa8010acd20317dca3320f16de2a77 --- a/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTMotherTrigMonTool.h +++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTMotherTrigMonTool.h @@ -19,7 +19,7 @@ #include <bitset> #include "StoreGate/ReadHandleKey.h" -#include "EventInfo/EventInfo.h" +#include "xAODEventInfo/EventInfo.h" //Fwd declarations class IInterface; @@ -63,7 +63,7 @@ protected: private: std::bitset<N_TRIGGER_TYPES> m_firedTriggers; - SG::ReadHandleKey<EventInfo> m_eventInfoKey; + SG::ReadHandleKey<xAOD::EventInfo> m_eventInfoKey{this, "EventInfoKey", "EventInfoKey", "Key of xAOD::EventInfo"}; }; #endif diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTRatioNoiseMonTool.h b/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTRatioNoiseMonTool.h old mode 100755 new mode 100644 diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTSummaryMonTool.h b/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTSummaryMonTool.h old mode 100755 new mode 100644 diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTTracksMonTool.h b/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTTracksMonTool.h old mode 100755 new mode 100644 diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCT_ClusterStruct.h b/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCT_ClusterStruct.h old mode 100755 new mode 100644 diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTErrMonTool.cxx b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTErrMonTool.cxx old mode 100755 new mode 100644 diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTHitEffMonTool.cxx b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTHitEffMonTool.cxx old mode 100755 new mode 100644 index 7ea24447472ac091e0cedadcbcc948293b72e7a9..c509749d608a808272203552ba655ca35b9654ea --- a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTHitEffMonTool.cxx +++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTHitEffMonTool.cxx @@ -66,12 +66,12 @@ using namespace SCT_Monitoring; namespace {// anonymous namespace for functions at file scope const bool testOffline(false); - std::string histogramPath[] = { + const std::string histogramPath[] = { "SCT/SCTEC/eff", "SCT/SCTB/eff", "SCT/SCTEA/eff", "SCT/GENERAL/eff" }; - std::string histogramPathRe[] = { + const std::string histogramPathRe[] = { "SCT/SCTEC/eff/perLumiBlock", "SCT/SCTB/eff/perLumiBlock", "SCT/SCTEA/eff/perLumiBlock" - };// 23.01.2015 + }; template< typename T > Identifier surfaceOnTrackIdentifier(const T &tsos, const bool useTrackParameters = true) { @@ -87,7 +87,7 @@ namespace {// anonymous namespace for functions at file scope return result; } - constexpr Double_t radianDegrees(180. / 3.1415927); + constexpr Double_t radianDegrees(180. / M_PI); float amgPseudoRapidity(const Amg::Vector3D &position) { @@ -371,11 +371,8 @@ SCTHitEffMonTool::initialize() { StatusCode SCTHitEffMonTool::bookHistograms() { - // if (not isNewRun) return StatusCode::SUCCESS; // - // hidetoshi 14.01.22 if (not newRunFlag()) { - return StatusCode::SUCCESS; // hidetoshi - // 14.01.22 + return StatusCode::SUCCESS; } if (m_isCosmic) { WARNING("Running on cosmics: releasing d0 cut and forcing use of TRT timing"); @@ -403,7 +400,7 @@ SCTHitEffMonTool::bookHistograms() { MonGroup(this, m_path + histogramPathRe[ENDCAP_C_INDEX], run, ATTRIB_UNMANAGED), MonGroup(this, m_path + histogramPathRe[BARREL_INDEX], run, ATTRIB_UNMANAGED), MonGroup(this, m_path + histogramPathRe[ENDCAP_A_INDEX], run, ATTRIB_UNMANAGED) - }};// 23.01.2015 + }}; std::array < MonGroup, N_REGIONS + 1 > histGroupShift = {{ MonGroup(this, m_path + histogramPath[ENDCAP_C_INDEX], run, ATTRIB_UNMANAGED), @@ -427,7 +424,7 @@ SCTHitEffMonTool::bookHistograms() { m_Eff_hashCodeHisto->GetXaxis()->SetTitle("Module Hash Code"); m_Eff_hashCodeHisto->GetYaxis()->SetTitle("Efficiency"); CHECK(bookEffHisto(m_Eff_LumiBlockHisto_Total, histGroupE[GENERAL_INDEX], "effLumiBlock", - "Efficiency vs Luminosity block", NBINS_LBs, 0.5, NBINS_LBs + 0.5));// 02.09.2016 + "Efficiency vs Luminosity block", NBINS_LBs, 0.5, NBINS_LBs + 0.5)); m_Eff_LumiBlockHisto_Total->GetXaxis()->SetTitle("Luminosity block"); m_Eff_LumiBlockHisto_Total->GetYaxis()->SetTitle("Efficiency"); CHECK(bookEffHisto(m_effdistribution, histGroupE[GENERAL_INDEX], "SctEffDistribution", @@ -481,7 +478,7 @@ SCTHitEffMonTool::bookHistograms() { }}; std::array < TString, N_REGIONS > effLumiName = {{ "m_eff_Lumi_", "eff_Lumi_", "p_eff_Lumi_" - }};// 23.01.2015 + }}; std::array < TString, N_REGIONS > sumeff = {{ "summaryeffm", "summaryeff", "summaryeffp" }}; @@ -494,11 +491,11 @@ SCTHitEffMonTool::bookHistograms() { TString sumefftitle[3] = { "Summary Module Efficiency in Endcap C", "Summary Module Efficiency in Barrel", "Summary Module Efficiency in Endcap A" - };// 30.11.2014 + }; TString sumefftitleBCID[3] = { "Summary Module Efficiency in Endcap C for First BC", "Summary Module Efficiency in Barrel for First BC", "Summary Module Efficiency in Endcap A for First BC" - };// 30.11.2014 + }; std::array < TString, 12 > selecName = {{ "All", "Module", "nHits", "TRTPhase", "Enclosed", "Phi", "Chi2", "Face", "Guard", "Bad chip", "d0", "pT" }}; @@ -540,7 +537,7 @@ SCTHitEffMonTool::bookHistograms() { effLumiName[isub] + i + "_" + j, "Efficiency vs LumiBlock of" + layerName[isub] + i + " / side " + j + " in " + subDetName[isub], - NBINS_LBs, 0.5, NBINS_LBs + 0.5));// 23.01.2015 + NBINS_LBs, 0.5, NBINS_LBs + 0.5)); m_effLumiBlock[detIndex][j]->GetXaxis()->SetTitle("Luminosity Block"); m_effLumiBlock[detIndex][j]->GetYaxis()->SetTitle("Efficiency"); } @@ -579,20 +576,20 @@ SCTHitEffMonTool::bookHistograms() { 2 * n_layers[isub], 0., n_layers[isub])); unsigned int limit[3] = { N_DISKSx2, N_BARRELSx2, N_DISKSx2 - };// 30.11.2014 + }; for (unsigned int i(0); i != limit[isub]; i++) { LayerSideFormatter layerSide(i, isub); // use dedicated title for the bin labels (from 0_1 to 3_0) m_Eff_summaryHisto[isub]->GetXaxis()->SetBinLabel(i + 1, layerSide.dedicated_title().c_str()); m_Eff_summaryHistoFirstBCID[isub]->GetXaxis()->SetBinLabel(i + 1, layerSide.dedicated_title().c_str()); m_Eff_summaryHisto_old[isub]->GetXaxis()->SetBinLabel(i + 1, layerSide.title().c_str()); - }// 30.11.2014 + } m_Eff_summaryHisto[isub]->GetYaxis()->SetTitle("Efficiency"); m_Eff_summaryHistoFirstBCID[isub]->GetYaxis()->SetTitle("Efficiency"); m_Eff_summaryHisto_old[isub]->GetYaxis()->SetTitle("Efficiency"); CHECK(bookEffHisto(m_Eff_LumiBlockHisto[isub], histGroupE[isub], "effLumiBlock", - "Efficiency vs Luminosity block in " + subDetName[isub], NBINS_LBs, 0.5, NBINS_LBs + 0.5));// 20.01.2015 + "Efficiency vs Luminosity block in " + subDetName[isub], NBINS_LBs, 0.5, NBINS_LBs + 0.5)); m_Eff_LumiBlockHisto[isub]->GetXaxis()->SetTitle("Luminosity block"); m_Eff_LumiBlockHisto[isub]->GetYaxis()->SetTitle("Efficiency"); @@ -697,7 +694,7 @@ SCTHitEffMonTool::bookHistograms() { if (m_superDetailed) { // CHECK (bookEffHisto(m_Eff_LumiBlockHisto[isub], histGroupE[isub],"effLumiBlock", "Efficiency v Luminosity - // block",1000,1,1001));20.01.2015 + // block",1000,1,1001)); CHECK(bookEffHisto(m_inEffStrip[isub], histGroupE[isub], "StripInEfficiency" + subDetNameShort[isub], "Strips inefficiencies in " + subDetName[isub], n_mod[isub] * 2, f_mod[isub] * 2 - 0.5, (f_mod[isub] + n_mod[isub]) * 2 - 0.5, N_STRIPS, @@ -732,15 +729,8 @@ SCTHitEffMonTool::bookHistograms() { return StatusCode::SUCCESS; } -// StatusCode SCTHitEffMonTool::bookHistograms( bool /*isNewEventsBlock*/, bool /*isNewLumiBlock*/, bool isNewRun ) -// // hidetoshi 14.01.22 StatusCode -SCTHitEffMonTool::bookHistogramsRecurrent() { // hidetoshi - // 14.01.22 - // if (not isNewRun) return StatusCode::SUCCESS; // - // hidetoshi 14.01.22 - // if (not newRunFlag()) return StatusCode::SUCCESS; - // // hidetoshi 14.01.22 +SCTHitEffMonTool::bookHistogramsRecurrent() { if (m_isCosmic) { WARNING("Running on cosmics: releasing d0 cut and forcing use of TRT timing"); } @@ -767,7 +757,7 @@ SCTHitEffMonTool::bookHistogramsRecurrent() { MonGroup(this, m_path + histogramPathRe[ENDCAP_C_INDEX], run, ATTRIB_UNMANAGED), MonGroup(this, m_path + histogramPathRe[BARREL_INDEX], run, ATTRIB_UNMANAGED), MonGroup(this, m_path + histogramPathRe[ENDCAP_A_INDEX], run, ATTRIB_UNMANAGED) - }};// 23.01.2015 + }}; std::array < MonGroup, N_REGIONS + 1 > histGroupShift = {{ MonGroup(this, m_path + histogramPath[ENDCAP_C_INDEX], run, ATTRIB_UNMANAGED), @@ -787,11 +777,11 @@ SCTHitEffMonTool::bookHistogramsRecurrent() { m_Eff_TotalBCID->GetXaxis()->SetBinLabel(i + 1, subDetName[i]); } CHECK(bookEffHisto(m_Eff_hashCodeHisto, histGroupE[GENERAL_INDEX], "effHashCode", "Efficiency vs module Hash code", - n_mod[GENERAL_INDEX] * 2, -0.5, n_mod[GENERAL_INDEX] * 2 - 0.5));// 26.11.2014 + n_mod[GENERAL_INDEX] * 2, -0.5, n_mod[GENERAL_INDEX] * 2 - 0.5)); m_Eff_hashCodeHisto->GetXaxis()->SetTitle("Module Hash Code"); - m_Eff_hashCodeHisto->GetYaxis()->SetTitle("Efficiency");// 15.12.2014 + m_Eff_hashCodeHisto->GetYaxis()->SetTitle("Efficiency"); CHECK(bookEffHisto(m_Eff_LumiBlockHisto_Total, histGroupE[GENERAL_INDEX], "effLumiBlock", - "Efficiency vs Luminosity block", NBINS_LBs, 0.5, NBINS_LBs + 0.5));// 02.09.2016 + "Efficiency vs Luminosity block", NBINS_LBs, 0.5, NBINS_LBs + 0.5)); if (m_detailed) { CHECK(bookEffHisto(m_SCTNHitHisto, histGroupE[BARREL_INDEX], "SCTNHit", "Number of total SCT hits", 30, -0.5, @@ -835,7 +825,7 @@ SCTHitEffMonTool::bookHistogramsRecurrent() { }}; std::array < TString, N_REGIONS > effLumiName = {{ "m_eff_Lumi_", "eff_Lumi_", "p_eff_Lumi_" - }};// 23.01.2015 + }}; // inefficiency plots, i.e. 1 - efficiency std::array< TString, N_REGIONS > ineffMapName = {{ "ineffm_", "ineff_", "ineffp_" @@ -899,7 +889,7 @@ SCTHitEffMonTool::bookHistogramsRecurrent() { effLumiName[isub] + i + "_" + j, "Efficiency vs LumiBlock" + layerName[isub] + i + " / side " + j + " in " + subDetName[isub], - 150, 1, 3001));// 23.01.2015 + 150, 1, 3001)); m_effLumiBlock[detIndex][j]->GetXaxis()->SetTitle("Luminosity Block"); m_effLumiBlock[detIndex][j]->GetYaxis()->SetTitle("Efficiency"); } @@ -937,18 +927,18 @@ SCTHitEffMonTool::bookHistogramsRecurrent() { 2 * n_layers[isub], 0., n_layers[isub])); unsigned int limit[3] = { N_DISKSx2, N_BARRELSx2, N_DISKSx2 - };// 30.11.2014 + }; for (unsigned int i(0); i != limit[isub]; i++) { LayerSideFormatter layerSide(i, isub); m_Eff_summaryHisto[isub]->GetXaxis()->SetBinLabel(i + 1, layerSide.dedicated_title().c_str()); m_Eff_summaryHistoFirstBCID[isub]->GetXaxis()->SetBinLabel(i + 1, layerSide.dedicated_title().c_str()); m_Eff_summaryHisto_old[isub]->GetXaxis()->SetBinLabel(i + 1, layerSide.title().c_str()); - }// 30.11.2014 + } m_Eff_summaryHisto[isub]->GetYaxis()->SetTitle("Efficiency"); m_Eff_summaryHistoFirstBCID[isub]->GetYaxis()->SetTitle("Efficiency"); m_Eff_summaryHisto_old[isub]->GetYaxis()->SetTitle("Efficiency"); CHECK(bookEffHisto(m_Eff_LumiBlockHisto[isub], histGroupE[isub], "effLumiBlock", - "Efficiency vs Luminosity block in " + subDetName[isub], NBINS_LBs, 0.5, NBINS_LBs + 0.5));// 20.01.2015 + "Efficiency vs Luminosity block in " + subDetName[isub], NBINS_LBs, 0.5, NBINS_LBs + 0.5)); m_Eff_LumiBlockHisto[isub]->GetXaxis()->SetTitle("Luminosity block"); m_Eff_LumiBlockHisto[isub]->GetYaxis()->SetTitle("Efficiency"); @@ -1052,8 +1042,6 @@ SCTHitEffMonTool::bookHistogramsRecurrent() { } if (m_superDetailed) { - // CHECK (bookEffHisto(m_Eff_LumiBlockHisto[isub], histGroupE[isub],"effLumiBlock", "Efficiency v Luminosity - // block",1000,1,1001));//20.01.2015 CHECK(bookEffHisto(m_inEffStrip[isub], histGroupE[isub], "StripInEfficiency" + subDetNameShort[isub], "Strips inefficiencies in " + subDetName[isub], n_mod[isub] * 2, f_mod[isub] * 2 - 0.5, (f_mod[isub] + n_mod[isub]) * 2 - 0.5, N_STRIPS, @@ -1692,9 +1680,9 @@ SCTHitEffMonTool::fillHistograms() { VERBOSE("Candidate passed all cuts"); m_Eff_summaryHisto_old[isub]->Fill(layerPlusHalfSide, eff); // in order to calculate m_EffsummaryIncBadMod m_Eff_summaryHisto[isub]->Fill(dedicated_layerPlusHalfSide, eff); // adjustment for dedicated_title() - m_Eff_hashCodeHisto->Fill(Double_t(sideHash), eff);// 15.12.2014 - m_Eff_LumiBlockHisto[isub]->Fill(pEvent->lumiBlock(), eff);// 20.01.2015 - m_Eff_LumiBlockHisto_Total->Fill(pEvent->lumiBlock(), eff);// 02.09.2016 + m_Eff_hashCodeHisto->Fill(Double_t(sideHash), eff); + m_Eff_LumiBlockHisto[isub]->Fill(pEvent->lumiBlock(), eff); + m_Eff_LumiBlockHisto_Total->Fill(pEvent->lumiBlock(), eff); if (BCIDpos <= 0) { m_Eff_summaryHistoFirstBCID[isub]->Fill(dedicated_layerPlusHalfSide, eff); // adjustment for dedicated_title() } @@ -1722,7 +1710,6 @@ SCTHitEffMonTool::fillHistograms() { m_Eff_nGoodTrk[isub]->Fill(nTrkGood, eff); } if (m_superDetailed) { - // m_Eff_LumiBlockHisto[isub]->Fill(pEvent->lumiBlock(), eff);//20.01.2015 chipPos = (side == 1) ? 11 - chipPos : chipPos; m_inEffChip[isub]->Fill(sideHash, chipPos, int(eff == 0)); m_inEffStrip[isub]->Fill(sideHash, xl / 79.95e-3 + 768. / 2., int(eff == 0)); @@ -1758,7 +1745,7 @@ SCTHitEffMonTool::fillHistograms() { if( BCIDpos <= 0 ){ m_effMapFirstBCID[histnumber][side]->Fill(ieta, iphi, eff); } - m_effLumiBlock[histnumber][side]->Fill(pEvent->lumiBlock(), eff);// 23.01.2015 + m_effLumiBlock[histnumber][side]->Fill(pEvent->lumiBlock(), eff); if (testOffline) { m_ineffMap[histnumber][side]->Fill(ieta, iphi, 1); // dummyfill for testing @@ -1821,11 +1808,8 @@ SCTHitEffMonTool::fillHistograms() { return StatusCode::SUCCESS; } -// StatusCode SCTHitEffMonTool::procHistograms(bool /*isEndOfEventsBlock*/, bool /*isEndOfLumiBlock*/, bool -// /*isEndOfRun*/){ // hidetoshi 14.01.22 StatusCode -SCTHitEffMonTool::procHistograms() { // hidetoshi - // 14.01.22 +SCTHitEffMonTool::procHistograms() { if (m_superDetailed) { SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEle(m_SCTDetEleCollKey); const InDetDD::SiDetectorElementCollection* elements(sctDetEle.retrieve()); diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTHitsNoiseMonTool.cxx b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTHitsNoiseMonTool.cxx old mode 100755 new mode 100644 index 2234eb8c6c334876e0fafbca32c4515ce9292f2a..e18850fb3b3977cb3e0338278aa16addc0c3dc17 --- a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTHitsNoiseMonTool.cxx +++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTHitsNoiseMonTool.cxx @@ -243,7 +243,6 @@ SCTHitsNoiseMonTool::SCTHitsNoiseMonTool(const std::string &type, m_occTriggerECp_lb{}, m_occTriggerECm_lb{}, m_eventsTrigger_lb(0), - // Add 09.09.2016 m_BARHO(nullptr), m_BARHOTrigger(nullptr), m_ECmHO(nullptr), @@ -252,7 +251,6 @@ SCTHitsNoiseMonTool::SCTHitsNoiseMonTool(const std::string &type, m_ECpHOTrigger(nullptr), m_SCTHO(nullptr), m_SCTHOTrigger(nullptr), - // m_HallHitsBAR_vsLB(nullptr), m_HSPHitsBAR_vsLB(nullptr), m_HallHitsECm_vsLB(nullptr), @@ -266,7 +264,6 @@ SCTHitsNoiseMonTool::SCTHitsNoiseMonTool(const std::string &type, m_NoisyModulesWithHO100_vsLB(nullptr), m_NoisyModulesWithHO1000_vsLB(nullptr), m_NoisyModulesWithHO10000_vsLB(nullptr), - // m_HallHitsTriggerBAR_vsLB(nullptr), m_HSPHitsTriggerBAR_vsLB(nullptr), m_HallHitsTriggerECm_vsLB(nullptr), @@ -381,46 +378,44 @@ SCTHitsNoiseMonTool::bookHistograms() { for (unsigned int det(0); det != N_REGIONS; ++det) { if (doSystem[det]) { if (m_doTrackHits and bookGeneralTrackTimeHistos(det).isFailure()) { - msg(MSG::WARNING) << "Error in bookGeneralTrackTimeHistos()" << endmsg; + ATH_MSG_WARNING("Error in bookGeneralTrackTimeHistos()"); } if (m_doTrackHits and bookGeneralTrackHits(det).isFailure()) { - msg(MSG::WARNING) << "Error in bookGeneralTrackHits()" << endmsg; + ATH_MSG_WARNING("Error in bookGeneralTrackHits()"); } if (bookGeneralNoiseOccupancyMaps(det).isFailure()) { - msg(MSG::WARNING) << "Error in bookGeneralNoiseOccupancyMaps()" << endmsg; + ATH_MSG_WARNING("Error in bookGeneralNoiseOccupancyMaps()"); } if (bookGeneralHitOccupancyMaps(det).isFailure()) { - msg(MSG::WARNING) << "Error in bookGeneralHitOccupancyMaps()" << endmsg; + ATH_MSG_WARNING("Error in bookGeneralHitOccupancyMaps()"); } if (bookGeneralHits(det).isFailure()) { - msg(MSG::WARNING) << "Error in bookGeneralHits()" << endmsg; + ATH_MSG_WARNING("Error in bookGeneralHits()"); } // offline only? if (bookGeneralCluSize(det).isFailure()) { - msg(MSG::WARNING) << "Error in bookGeneralSize()" << endmsg; + ATH_MSG_WARNING("Error in bookGeneralSize()"); } // } } if (bookSPvsEventNumber().isFailure()) { - msg(MSG::WARNING) << "Error in bookSPvsEventNumber()" << endmsg; + ATH_MSG_WARNING("Error in bookSPvsEventNumber()"); } if (bookNoiseDistributions().isFailure()) { - msg(MSG::WARNING) << "Error in bookNoiseDistributions()" << endmsg; + ATH_MSG_WARNING("Error in bookNoiseDistributions()"); } if (m_boolhitmaps) { if (book1DHitHists().isFailure()) { - msg(MSG::WARNING) << "Error in barrel book1DHitHists()" << endmsg; + ATH_MSG_WARNING("Error in barrel book1DHitHists()"); } // Only want these histograms when running the code offline } if (bookClusterSize().isFailure()) { - if (msgLvl(MSG::WARNING)) { - msg(MSG::WARNING) << "Error in bookClusterSize()" << endmsg; - } + ATH_MSG_WARNING("Error in bookClusterSize()"); } if (newRunFlag()) { @@ -431,23 +426,23 @@ SCTHitsNoiseMonTool::bookHistograms() { m_ncluHisto->GetXaxis()->SetTitle("Total SCT Hits"); m_ncluHisto->GetYaxis()->SetTitle("Entries"); if (clu.regHist(m_ncluHisto).isFailure()) { - msg(MSG::WARNING) << "Cannot book Histogram:" << stem + "sct_hits" << endmsg; + ATH_MSG_WARNING("Cannot book Histogram:" << stem + "sct_hits"); } if (m_booltxscan) { if (newEventsBlockFlag()) { // book histograms for TX scans m_hitsvstrigger = TH1F_LW::create("hits_vs_trigger", "Hits vs Trigger Type", 32, -0.5, 31.5); if (clu.regHist(m_hitsvstrigger).isFailure()) { - msg(MSG::WARNING) << "Cannot book Histogram:" << stem + "hitsvstrigger" << endmsg; + ATH_MSG_WARNING("Cannot book Histogram:" << stem + "hitsvstrigger"); } m_hitsvsL1ID = TH1F_LW::create("hits_vs_L1ID", "Hits vs L1ID", 1000, 0., 10000.); if (clu.regHist(m_hitsvsL1ID).isFailure()) { - msg(MSG::WARNING) << "Cannot book Histogram:" << stem + "hitsvsL1ID" << endmsg; + ATH_MSG_WARNING("Cannot book Histogram:" << stem + "hitsvsL1ID"); } } } if (initializeNoiseMaps().isFailure()) { - msg(MSG::WARNING) << "Failed to initalize noise occupancy maps!" << endmsg; + ATH_MSG_WARNING("Failed to initalize noise occupancy maps!"); } } @@ -472,46 +467,44 @@ SCTHitsNoiseMonTool::bookHistogramsRecurrent() { for (unsigned int det(0); det != N_REGIONS; ++det) { if (doSystem[det]) { if (m_doTrackHits and bookGeneralTrackTimeHistos(det).isFailure()) { - msg(MSG::WARNING) << "Error in bookGeneralTrackTimeHistos()" << endmsg; + ATH_MSG_WARNING("Error in bookGeneralTrackTimeHistos()"); } if (m_doTrackHits and bookGeneralTrackHits(det).isFailure()) { - msg(MSG::WARNING) << "Error in bookGeneralTrackHits()" << endmsg; + ATH_MSG_WARNING("Error in bookGeneralTrackHits()"); } if (bookGeneralNoiseOccupancyMaps(det).isFailure()) { - msg(MSG::WARNING) << "Error in bookGeneralNoiseOccupancyMaps()" << endmsg; + ATH_MSG_WARNING("Error in bookGeneralNoiseOccupancyMaps()"); } if (bookGeneralHitOccupancyMaps(det).isFailure()) { - msg(MSG::WARNING) << "Error in bookGeneralHitOccupancyMaps()" << endmsg; + ATH_MSG_WARNING("Error in bookGeneralHitOccupancyMaps()"); } if (bookGeneralHits(det).isFailure()) { - msg(MSG::WARNING) << "Error in bookGeneralHits()" << endmsg; + ATH_MSG_WARNING("Error in bookGeneralHits()"); } // offline only? if (bookGeneralCluSize(det).isFailure()) { - msg(MSG::WARNING) << "Error in bookGeneralSize()" << endmsg; + ATH_MSG_WARNING("Error in bookGeneralSize()"); } // } } if (bookSPvsEventNumber().isFailure()) { - msg(MSG::WARNING) << "Error in bookSPvsEventNumber()" << endmsg; + ATH_MSG_WARNING("Error in bookSPvsEventNumber()"); } if (bookNoiseDistributions().isFailure()) { - msg(MSG::WARNING) << "Error in bookNoiseDistributions()" << endmsg; + ATH_MSG_WARNING("Error in bookNoiseDistributions()"); } if (m_boolhitmaps) { if (book1DHitHists().isFailure()) { - msg(MSG::WARNING) << "Error in barrel book1DHitHists()" << endmsg; + ATH_MSG_WARNING("Error in barrel book1DHitHists()"); } // Only want these histograms when running the code offline } if (bookClusterSize().isFailure()) { - if (msgLvl(MSG::WARNING)) { - msg(MSG::WARNING) << "Error in bookClusterSize()" << endmsg; - } + ATH_MSG_WARNING("Error in bookClusterSize()"); } std::string stem = m_stream + "/SCT/GENERAL/hits/summary"; @@ -521,21 +514,21 @@ SCTHitsNoiseMonTool::bookHistogramsRecurrent() { m_ncluHisto->GetXaxis()->SetTitle("Event Number"); m_ncluHisto->GetYaxis()->SetTitle("Num of SCT Hits"); if (clu.regHist(m_ncluHisto).isFailure()) { - msg(MSG::WARNING) << "Cannot book Histogram:" << stem + "sct_hits" << endmsg; + ATH_MSG_WARNING("Cannot book Histogram:" << stem + "sct_hits"); } if (m_booltxscan) { // book histograms for TX scans m_hitsvstrigger = TH1F_LW::create("hits_vs_trigger", "Hits vs Trigger Type", 32, -0.5, 31.5); if (clu.regHist(m_hitsvstrigger).isFailure()) { - msg(MSG::WARNING) << "Cannot book Histogram:" << stem + "hitsvstrigger" << endmsg; + ATH_MSG_WARNING("Cannot book Histogram:" << stem + "hitsvstrigger"); } m_hitsvsL1ID = TH1F_LW::create("hits_vs_L1ID", "Hits vs L1ID", 1000, 0., 10000.); if (clu.regHist(m_hitsvsL1ID).isFailure()) { - msg(MSG::WARNING) << "Cannot book Histogram:" << stem + "hitsvsL1ID" << endmsg; + ATH_MSG_WARNING("Cannot book Histogram:" << stem + "hitsvsL1ID"); } } if (initializeNoiseMaps().isFailure()) { - msg(MSG::WARNING) << "Failed to initalize noise occupancy maps!" << endmsg; + ATH_MSG_WARNING("Failed to initalize noise occupancy maps!"); } return StatusCode::SUCCESS; @@ -551,9 +544,7 @@ SCTHitsNoiseMonTool::fillHistograms() { ++m_numberOfEventsRecent; SG::ReadHandle<xAOD::EventInfo> pEvent(m_eventInfoKey); if (not pEvent.isValid()) { - if (msgLvl(MSG::ERROR)) { - msg(MSG::ERROR) << "Could not retrieve event info!" << endmsg; - } + ATH_MSG_ERROR("Could not retrieve event info!"); return StatusCode::RECOVERABLE; } int tmp_lb = pEvent->lumiBlock(); @@ -572,7 +563,6 @@ SCTHitsNoiseMonTool::fillHistograms() { m_occTriggerBAR_lb[m_current_lb] = 0; m_occTriggerECp_lb[m_current_lb] = 0; m_occTriggerECm_lb[m_current_lb] = 0; - // add 09.09.2016 m_noisyMWithHO100[m_current_lb] = 0; m_noisyMWithHO1000[m_current_lb] = 0; m_noisyMWithHO10000[m_current_lb] = 0; @@ -614,7 +604,6 @@ SCTHitsNoiseMonTool::fillHistograms() { if ((1E5) * m_occSumUnbiased_lb[*planeIterator] / m_events_lb > 10000.) { m_noisyM10000[m_current_lb]++; } - // 09.09.2016 m_hitocc_lb[m_current_lb] += m_hitoccSumUnbiased_lb[*planeIterator] / m_events_lb; m_hitoccBAR_lb[m_current_lb] += m_hitoccSumUnbiasedBAR_lb[*planeIterator] / m_events_lb; m_hitoccECp_lb[m_current_lb] += m_hitoccSumUnbiasedECp_lb[*planeIterator] / m_events_lb; @@ -643,7 +632,6 @@ SCTHitsNoiseMonTool::fillHistograms() { if ((1E5) * m_occSumUnbiasedTrigger_lb[*planeIterator] / m_eventsTrigger_lb > 10000.) { m_noisyMTrigger10000[m_current_lb]++; } - // add 09.09.2016 m_hitoccTrigger_lb[m_current_lb] += (1E5) * m_hitoccSumUnbiasedTrigger_lb[*planeIterator] / m_eventsTrigger_lb; m_hitoccTriggerBAR_lb[m_current_lb] += (1E5) * m_hitoccSumUnbiasedTriggerBAR_lb[*planeIterator] / m_eventsTrigger_lb; @@ -669,7 +657,6 @@ SCTHitsNoiseMonTool::fillHistograms() { m_occSumUnbiasedTriggerBAR_lb[*planeIterator] = 0; m_occSumUnbiasedTriggerECp_lb[*planeIterator] = 0; m_occSumUnbiasedTriggerECm_lb[*planeIterator] = 0; - // 09.09.2016 m_hitoccSumUnbiased_lb[*planeIterator] = 0; m_hitoccSumUnbiasedBAR_lb[*planeIterator] = 0; m_hitoccSumUnbiasedECp_lb[*planeIterator] = 0; @@ -683,76 +670,62 @@ SCTHitsNoiseMonTool::fillHistograms() { if (bec == ENDCAP_C)nlinksECm++; nlinks++; } - //std::cout <<"Line660: Number of links = "<<nlinks << std::endl; if (nlinks >0){ m_occ_lb[m_current_lb] /= nlinks; m_occTrigger_lb[m_current_lb] /= nlinks; - // 09.09.2016 m_hitocc_lb[m_current_lb] /= nlinks; m_hitoccTrigger_lb[m_current_lb] /= nlinks; } if (nlinksBAR >0){ m_occBAR_lb[m_current_lb] /= nlinksBAR; m_occTriggerBAR_lb[m_current_lb] /= nlinksBAR; - // 09.09.2016 m_hitoccBAR_lb[m_current_lb] /= nlinksBAR; m_hitoccTriggerBAR_lb[m_current_lb] /= nlinksBAR; } if (nlinksECp >0){ m_occECp_lb[m_current_lb] /= nlinksECp; m_occTriggerECp_lb[m_current_lb] /= nlinksECp; - // 09.09.2016 m_hitoccECp_lb[m_current_lb] /= nlinksECp; m_hitoccTriggerECp_lb[m_current_lb] /= nlinksECp; } if (nlinksECm >0){ m_occECm_lb[m_current_lb] /= nlinksECm; m_occTriggerECm_lb[m_current_lb] /= nlinksECm; - // 09.09.2016 m_hitoccECm_lb[m_current_lb] /= nlinksECm; m_hitoccTriggerECm_lb[m_current_lb] /= nlinksECm; } - // m_events_lb = 0; m_eventsTrigger_lb = 0; } m_current_lb = pEvent->lumiBlock(); // If track hits are selected, make the vector of track rdo identifiers if (m_doTrackHits) { - if (makeVectorOfTrackRDOIdentifiers().isFailure() and msgLvl(MSG::WARNING)) { - msg(MSG::WARNING) << "Couldn't make vector of track RDO identifiers" << endmsg; + if (makeVectorOfTrackRDOIdentifiers().isFailure()) { + ATH_MSG_WARNING("Couldn't make vector of track RDO identifiers"); } } - if (generalHistsandNoise().isFailure() and msgLvl(MSG::WARNING)) { - msg(MSG::WARNING) << "Error in generalHists" << endmsg; + if (generalHistsandNoise().isFailure()) { + ATH_MSG_WARNING("Error in generalHists"); } - if (makeSPvsEventNumber().isFailure() and msgLvl(MSG::WARNING)) { - msg(MSG::WARNING) << "Error in makeSPvsEventNumber" << endmsg; + if (makeSPvsEventNumber().isFailure()) { + ATH_MSG_WARNING("Error in makeSPvsEventNumber"); } if (m_environment == AthenaMonManager::online) { if ((m_numberOfEvents % m_checkrate) == 0) { if (checkNoiseMaps(true).isFailure()) { - if (msgLvl(MSG::WARNING)) { - msg(MSG::WARNING) << "Error in checkNoiseMaps(true)" << endmsg; - } + ATH_MSG_WARNING("Error in checkNoiseMaps(true)"); } } if ((m_current_lb % m_checkrecent == 0) && (m_current_lb > m_last_reset_lb)) { if (checkNoiseMaps(true).isFailure()) { - if (msgLvl(MSG::WARNING)) { - msg(MSG::WARNING) << "Error in checkNoiseMaps(true)" << endmsg; - } + ATH_MSG_WARNING("Error in checkNoiseMaps(true)"); } if (resetNoiseMapsRecent().isFailure()) { - if (msgLvl(MSG::WARNING)) { - msg(MSG::WARNING) << "Error in resetNoiseMapsRecent" << endmsg; - } + ATH_MSG_WARNING("Error in resetNoiseMapsRecent"); } if (resetHitMapHists().isFailure()) { - if (msgLvl(MSG::WARNING)) { - msg(MSG::WARNING) << "Error in resetHitMapsRecent" << endmsg; - } + ATH_MSG_WARNING("Error in resetHitMapsRecent"); } m_last_reset_lb = m_current_lb; m_numberOfEventsRecent = 0; @@ -774,9 +747,7 @@ SCTHitsNoiseMonTool::procHistograms() { if (endOfEventsBlock) { if (checkNoiseMaps(true).isFailure()) { - if (msgLvl(MSG::WARNING)) { - msg(MSG::WARNING) << "Error in checkNoiseMaps(true)" << endmsg; - } + ATH_MSG_WARNING("Error in checkNoiseMaps(true)"); } } return StatusCode::SUCCESS; @@ -809,9 +780,7 @@ SCTHitsNoiseMonTool::generalHistsandNoise() { SG::ReadHandle<SCT_RDO_Container> p_rdocontainer(m_dataObjectName); SG::ReadHandle<xAOD::EventInfo> pEvent(m_eventInfoKey); if (not pEvent.isValid()) { - if (msgLvl(MSG::ERROR)) { - msg(MSG::ERROR) << "Could not retrieve event info!" << endmsg; - } + ATH_MSG_ERROR("Could not retrieve event info!"); return StatusCode::FAILURE; } unsigned int current_lb = pEvent->lumiBlock(); @@ -1060,9 +1029,7 @@ SCTHitsNoiseMonTool::generalHistsandNoise() { if (diff < 0) { num = 0; m_skipEvents++; - if (msgLvl(MSG::WARNING)) { - msg(MSG::WARNING) << "Too many reconstructed space points for number of real hits" << endmsg; - } + ATH_MSG_WARNING("Too many reconstructed space points for number of real hits"); } if (den > 0) { sumocc = num / static_cast<float> (den); @@ -1109,7 +1076,7 @@ SCTHitsNoiseMonTool::generalHistsandNoise() { } } - { // hit occupancy 09.09.2016 + { // hit occupancy float sumhitocc(0.); sumhitocc = static_cast<float> (numberOfHitsFromAllRDOs) / static_cast<float> (N_STRIPS); m_hitoccSumUnbiased[theWaferIdentifierOfTheRDOCollection] += sumhitocc; @@ -1267,9 +1234,7 @@ SCTHitsNoiseMonTool::generalHistsandNoise() { // Fill Cluster size histogram SG::ReadHandle<InDet::SCT_ClusterContainer> p_clucontainer(m_clusContainerKey); if (not p_clucontainer.isValid()) { - if (msgLvl(MSG::WARNING)) { - msg(MSG::WARNING) << "Couldn't retrieve clusters" << endmsg; - } + ATH_MSG_WARNING("Couldn't retrieve clusters"); } InDet::SCT_ClusterContainer::const_iterator clucol_it = p_clucontainer->begin(); InDet::SCT_ClusterContainer::const_iterator lastcluCol = p_clucontainer->end(); @@ -1318,9 +1283,7 @@ SCTHitsNoiseMonTool::generalHistsandNoise() { if ((m_numberOfEvents % m_checkrate) == 0) { if (checkHists(false).isFailure()) { - if (msgLvl(MSG::WARNING)) { - msg(MSG::WARNING) << "Error in checkHists(false)" << endmsg; - } + ATH_MSG_WARNING("Error in checkHists(false)"); } } @@ -1353,9 +1316,7 @@ SCTHitsNoiseMonTool::book1DHitHists() { if (bec == BARREL) { h1Factory(formattedPosition, histotitle, BarrelHitHists, m_phitmapHistoVector, FIRST_STRIP - 0.5, LAST_STRIP + 0.5, N_BINS); - if (msgLvl(MSG::DEBUG)) { - msg(MSG::DEBUG) << "Have registered the barrel hists" << endmsg; - } + ATH_MSG_DEBUG("Have registered the barrel hists"); } else if (m_doPositiveEndcap && bec == ENDCAP_A) { h1Factory(formattedPosition, histotitle, PlusECHitHists, m_phitmapHistoVector, FIRST_STRIP - 0.5, LAST_STRIP + 0.5, N_BINS); @@ -1363,9 +1324,7 @@ SCTHitsNoiseMonTool::book1DHitHists() { h1Factory(formattedPosition, histotitle, MinusECHitHists, m_phitmapHistoVector, FIRST_STRIP - 0.5, LAST_STRIP + 0.5, N_BINS); } - if (msgLvl(MSG::DEBUG)) { - msg(MSG::DEBUG) << "Have registered the hists" << endmsg; - } + ATH_MSG_DEBUG("Have registered the hists"); } } return StatusCode::SUCCESS; @@ -1376,7 +1335,7 @@ SCTHitsNoiseMonTool::bookGeneralHits(const unsigned int systemIndex) { const SCT_Monitoring::Bec bec(index2Bec(systemIndex)); if (bec == INVALID_SYSTEM) { - msg(MSG::FATAL) << "Invalid subsystem index, should be 0-2, was " << systemIndex << endmsg; + ATH_MSG_FATAL("Invalid subsystem index, should be 0-2, was " << systemIndex); return StatusCode::FAILURE; } const string paths[] = { @@ -1427,7 +1386,7 @@ SCTHitsNoiseMonTool::bookGeneralHits(const unsigned int systemIndex) { } default: { - msg(MSG::FATAL) << "Invalid barrel/endcap indicator, should be -2, 0 or 2, was " << bec << endmsg; + ATH_MSG_FATAL("Invalid barrel/endcap indicator, should be -2, 0 or 2, was " << bec); return StatusCode::FAILURE; break; @@ -1557,7 +1516,7 @@ SCTHitsNoiseMonTool::bookGeneralCluSize(const unsigned int systemIndex) { }; if (bec == INVALID_SYSTEM) { - msg(MSG::FATAL) << "Invalid subsystem index, should be 0-2, was " << systemIndex << endmsg; + ATH_MSG_FATAL("Invalid subsystem index, should be 0-2, was " << systemIndex); return StatusCode::FAILURE; } VecH1_t &clusterSizeVector = *(clusterSizeArray[systemIndex]); @@ -1592,7 +1551,7 @@ SCTHitsNoiseMonTool::bookGeneralNoiseOccupancyMaps(const unsigned int systemInde const SCT_Monitoring::Bec bec(index2Bec(systemIndex)); if (bec == INVALID_SYSTEM) { - msg(MSG::FATAL) << "Invalid subsystem index, should be 0-2, was " << systemIndex << endmsg; + ATH_MSG_FATAL("Invalid subsystem index, should be 0-2, was " << systemIndex); return StatusCode::FAILURE; } if (newRunFlag()) { @@ -1642,21 +1601,21 @@ SCTHitsNoiseMonTool::bookGeneralNoiseOccupancyMaps(const unsigned int systemInde m_NallHitsECm_vsLB->GetXaxis()->SetTitle("LumiBlock"); m_NallHitsECm_vsLB->GetYaxis()->SetTitle("Average number of all Hits"); if (noiseOccMaps.regHist(m_NallHitsECm_vsLB).isFailure()) { - msg(MSG::WARNING) << "Couldn't book NallHitsECm_vsLB" << endmsg; + ATH_MSG_WARNING("Couldn't book NallHitsECm_vsLB"); } m_NSPHitsECm_vsLB = TProfile_LW::create("h_NSPHitsECm_vsLB", "Average num of SP Hits in ECm vs LB", SCT_Monitoring::NBINS_LBs, 0.5, SCT_Monitoring::NBINS_LBs + 0.5); m_NSPHitsECm_vsLB->GetXaxis()->SetTitle("LumiBlock"); m_NSPHitsECm_vsLB->GetYaxis()->SetTitle("Average number of SP Hits"); if (noiseOccMaps.regHist(m_NSPHitsECm_vsLB).isFailure()) { - msg(MSG::WARNING) << "Couldn't book NSPHitsECm_vsLB" << endmsg; + ATH_MSG_WARNING("Couldn't book NSPHitsECm_vsLB"); } m_ECmNO_vsLB = TProfile_LW::create("ECCNO_vsLB", "NO vs LB for the EndCap C (SP noise)", SCT_Monitoring::NBINS_LBs, 0.5, SCT_Monitoring::NBINS_LBs + 0.5); m_ECmNO_vsLB->GetXaxis()->SetTitle("LumiBlock"); m_ECmNO_vsLB->GetYaxis()->SetTitle("Noise Occupancy [10^{-5}]"); if (noiseOccMaps.regHist(m_ECmNO_vsLB).isFailure()) { - msg(MSG::WARNING) << "Couldn't book ECmNO_vsLB" << endmsg; + ATH_MSG_WARNING("Couldn't book ECmNO_vsLB"); } m_NallHitsTriggerECm_vsLB = TProfile_LW::create("h_NallHitsTriggerECm_vsLB", "Average num of all Hits in ECm with trigger vs LB", SCT_Monitoring::NBINS_LBs, 0.5, @@ -1664,7 +1623,7 @@ SCTHitsNoiseMonTool::bookGeneralNoiseOccupancyMaps(const unsigned int systemInde m_NallHitsTriggerECm_vsLB->GetXaxis()->SetTitle("LumiBlock"); m_NallHitsTriggerECm_vsLB->GetYaxis()->SetTitle("Average number of all Hits"); if (noiseOccMaps.regHist(m_NallHitsTriggerECm_vsLB).isFailure()) { - msg(MSG::WARNING) << "Couldn't book NallHitsTriggerECm_vsLB" << endmsg; + ATH_MSG_WARNING("Couldn't book NallHitsTriggerECm_vsLB"); } m_NSPHitsTriggerECm_vsLB = TProfile_LW::create("h_NSPHitsTriggerECm_vsLB", "Average num of SP Hits in ECm with trigger vs LB", SCT_Monitoring::NBINS_LBs, 0.5, @@ -1672,14 +1631,14 @@ SCTHitsNoiseMonTool::bookGeneralNoiseOccupancyMaps(const unsigned int systemInde m_NSPHitsTriggerECm_vsLB->GetXaxis()->SetTitle("LumiBlock"); m_NSPHitsTriggerECm_vsLB->GetYaxis()->SetTitle("Average number of SP Hits"); if (noiseOccMaps.regHist(m_NSPHitsTriggerECm_vsLB).isFailure()) { - msg(MSG::WARNING) << "Couldn't book NSPHitsTriggerECm_vsLB" << endmsg; + ATH_MSG_WARNING("Couldn't book NSPHitsTriggerECm_vsLB"); } m_ECmNOTrigger_vsLB = TProfile_LW::create("ECCNOTrigger_vsLB", "NO with trigger vs LB for the EndCap C (SP noise)", SCT_Monitoring::NBINS_LBs, 0.5, SCT_Monitoring::NBINS_LBs + 0.5); m_ECmNOTrigger_vsLB->GetXaxis()->SetTitle("LumiBlock"); m_ECmNOTrigger_vsLB->GetYaxis()->SetTitle("Noise Occupancy [10^{-5}]"); if (noiseOccMaps.regHist(m_ECmNOTrigger_vsLB).isFailure()) { - msg(MSG::WARNING) << "Couldn't book ECmNOTrigger_vsLB" << endmsg; + ATH_MSG_WARNING("Couldn't book ECmNOTrigger_vsLB"); } } if (systemIndex == 1) { // BAR @@ -1688,20 +1647,20 @@ SCTHitsNoiseMonTool::bookGeneralNoiseOccupancyMaps(const unsigned int systemInde m_NallHitsBAR_vsLB->GetXaxis()->SetTitle("LumiBlock"); m_NallHitsBAR_vsLB->GetYaxis()->SetTitle("Average number of all Hits"); if (noiseOccMaps.regHist(m_NallHitsBAR_vsLB).isFailure()) { - msg(MSG::WARNING) << "Couldn't book NallHitsBAR_vsLB" << endmsg; + ATH_MSG_WARNING("Couldn't book NallHitsBAR_vsLB"); } m_NSPHitsBAR_vsLB = TProfile_LW::create("h_NSPHitsBAR_vsLB", "Average num of SP Hits in Barrel vs LB", SCT_Monitoring::NBINS_LBs, 0.5, SCT_Monitoring::NBINS_LBs + 0.5); m_NSPHitsBAR_vsLB->GetXaxis()->SetTitle("LumiBlock"); m_NSPHitsBAR_vsLB->GetYaxis()->SetTitle("Average number of SP Hits"); if (noiseOccMaps.regHist(m_NSPHitsBAR_vsLB).isFailure()) { - msg(MSG::WARNING) << "Couldn't book NSPHitsBAR_vsLB" << endmsg; + ATH_MSG_WARNING("Couldn't book NSPHitsBAR_vsLB"); } m_BARNO_vsLB = TProfile_LW::create("BARNO_vsLB", "NO vs LB for the Barrel (SP noise)", SCT_Monitoring::NBINS_LBs, 0.5, SCT_Monitoring::NBINS_LBs + 0.5); m_BARNO_vsLB->GetXaxis()->SetTitle("LumiBlock"); m_BARNO_vsLB->GetYaxis()->SetTitle("Noise Occupancy [10^{-5}]"); if (noiseOccMaps.regHist(m_BARNO_vsLB).isFailure()) { - msg(MSG::WARNING) << "Couldn't book BARNO_vsLB" << endmsg; + ATH_MSG_WARNING("Couldn't book BARNO_vsLB"); } m_NallHitsTriggerBAR_vsLB = TProfile_LW::create("h_NallHitsTriggerBAR_vsLB", "Average num of all Hits in Barrel with trigger vs LB", SCT_Monitoring::NBINS_LBs, 0.5, @@ -1709,7 +1668,7 @@ SCTHitsNoiseMonTool::bookGeneralNoiseOccupancyMaps(const unsigned int systemInde m_NallHitsTriggerBAR_vsLB->GetXaxis()->SetTitle("LumiBlock"); m_NallHitsTriggerBAR_vsLB->GetYaxis()->SetTitle("Average number of all Hits"); if (noiseOccMaps.regHist(m_NallHitsTriggerBAR_vsLB).isFailure()) { - msg(MSG::WARNING) << "Couldn't book NallHitsTriggerBAR_vsLB" << endmsg; + ATH_MSG_WARNING("Couldn't book NallHitsTriggerBAR_vsLB"); } m_NSPHitsTriggerBAR_vsLB = TProfile_LW::create("h_NSPHitsTriggerBAR_vsLB", "Average num of SP Hits in Barrel with trigger vs LB", SCT_Monitoring::NBINS_LBs, 0.5, @@ -1717,14 +1676,14 @@ SCTHitsNoiseMonTool::bookGeneralNoiseOccupancyMaps(const unsigned int systemInde m_NSPHitsTriggerBAR_vsLB->GetXaxis()->SetTitle("LumiBlock"); m_NSPHitsTriggerBAR_vsLB->GetYaxis()->SetTitle("Average number of SP Hits"); if (noiseOccMaps.regHist(m_NSPHitsTriggerBAR_vsLB).isFailure()) { - msg(MSG::WARNING) << "Couldn't book NSPHitsTriggerBAR_vsLB" << endmsg; + ATH_MSG_WARNING("Couldn't book NSPHitsTriggerBAR_vsLB"); } m_BARNOTrigger_vsLB = TProfile_LW::create("BARNOTrigger_vsLB", "NO with trigger vs LB for the Barrel (SP noise)", SCT_Monitoring::NBINS_LBs, 0.5, SCT_Monitoring::NBINS_LBs + 0.5); m_BARNOTrigger_vsLB->GetXaxis()->SetTitle("LumiBlock"); m_BARNOTrigger_vsLB->GetYaxis()->SetTitle("Noise Occupancy [10^{-5}]"); if (noiseOccMaps.regHist(m_BARNOTrigger_vsLB).isFailure()) { - msg(MSG::WARNING) << "Couldn't book BARNOTrigger_vsLB" << endmsg; + ATH_MSG_WARNING("Couldn't book BARNOTrigger_vsLB"); } } if (systemIndex == 2) { // ECp=ECA @@ -1733,21 +1692,21 @@ SCTHitsNoiseMonTool::bookGeneralNoiseOccupancyMaps(const unsigned int systemInde m_NallHitsECp_vsLB->GetXaxis()->SetTitle("LumiBlock"); m_NallHitsECp_vsLB->GetYaxis()->SetTitle("Average number of all Hits"); if (noiseOccMaps.regHist(m_NallHitsECp_vsLB).isFailure()) { - msg(MSG::WARNING) << "Couldn't book NallHitsECp_vsLB" << endmsg; + ATH_MSG_WARNING("Couldn't book NallHitsECp_vsLB"); } m_NSPHitsECp_vsLB = TProfile_LW::create("h_NSPHitsECp_vsLB", "Average num of SP Hits in ECp vs LB", SCT_Monitoring::NBINS_LBs, 0.5, SCT_Monitoring::NBINS_LBs + 0.5); m_NSPHitsECp_vsLB->GetXaxis()->SetTitle("LumiBlock"); m_NSPHitsECp_vsLB->GetYaxis()->SetTitle("Average number of SP Hits"); if (noiseOccMaps.regHist(m_NSPHitsECp_vsLB).isFailure()) { - msg(MSG::WARNING) << "Couldn't book NSPHitsECp_vsLB" << endmsg; + ATH_MSG_WARNING("Couldn't book NSPHitsECp_vsLB"); } m_ECpNO_vsLB = TProfile_LW::create("ECANO_vsLB", "NO vs LB for the EndCap A (SP noise)", SCT_Monitoring::NBINS_LBs, 0.5, SCT_Monitoring::NBINS_LBs + 0.5); m_ECpNO_vsLB->GetXaxis()->SetTitle("LumiBlock"); m_ECpNO_vsLB->GetYaxis()->SetTitle("Noise Occupancy [10^{-5}]"); if (noiseOccMaps.regHist(m_ECpNO_vsLB).isFailure()) { - msg(MSG::WARNING) << "Couldn't book ECpNO_vsLB" << endmsg; + ATH_MSG_WARNING("Couldn't book ECpNO_vsLB"); } m_NallHitsTriggerECp_vsLB = TProfile_LW::create("h_NallHitsTriggerECp_vsLB", "Average num of all Hits in ECp with trigger vs LB", SCT_Monitoring::NBINS_LBs, 0.5, @@ -1755,7 +1714,7 @@ SCTHitsNoiseMonTool::bookGeneralNoiseOccupancyMaps(const unsigned int systemInde m_NallHitsTriggerECp_vsLB->GetXaxis()->SetTitle("LumiBlock"); m_NallHitsTriggerECp_vsLB->GetYaxis()->SetTitle("Average number of all Hits"); if (noiseOccMaps.regHist(m_NallHitsTriggerECp_vsLB).isFailure()) { - msg(MSG::WARNING) << "Couldn't book NallHitsTriggerECp_vsLB" << endmsg; + ATH_MSG_WARNING("Couldn't book NallHitsTriggerECp_vsLB"); } m_NSPHitsTriggerECp_vsLB = TProfile_LW::create("h_NSPHitsTriggerECp_vsLB", "Average num of SP Hits in ECp with trigger vs LB", SCT_Monitoring::NBINS_LBs, 0.5, @@ -1763,27 +1722,26 @@ SCTHitsNoiseMonTool::bookGeneralNoiseOccupancyMaps(const unsigned int systemInde m_NSPHitsTriggerECp_vsLB->GetXaxis()->SetTitle("LumiBlock"); m_NSPHitsTriggerECp_vsLB->GetYaxis()->SetTitle("Average number of SP Hits"); if (noiseOccMaps.regHist(m_NSPHitsTriggerECp_vsLB).isFailure()) { - msg(MSG::WARNING) << "Couldn't book NSPHitsTriggerECp_vsLB" << endmsg; + ATH_MSG_WARNING("Couldn't book NSPHitsTriggerECp_vsLB"); } m_ECpNOTrigger_vsLB = TProfile_LW::create("ECANOTrigger_vsLB", "NO with trigger vs LB for the EndCap A (SP noise)", SCT_Monitoring::NBINS_LBs, 0.5, SCT_Monitoring::NBINS_LBs + 0.5); m_ECpNOTrigger_vsLB->GetXaxis()->SetTitle("LumiBlock"); m_ECpNOTrigger_vsLB->GetYaxis()->SetTitle("Noise Occupancy [10^{-5}]"); if (noiseOccMaps.regHist(m_ECpNOTrigger_vsLB).isFailure()) { - msg(MSG::WARNING) << "Couldn't book ECpNOTrigger_vsLB" << endmsg; + ATH_MSG_WARNING("Couldn't book ECpNOTrigger_vsLB"); } } } return StatusCode::SUCCESS; } -// 09.09.2016 StatusCode SCTHitsNoiseMonTool::bookGeneralHitOccupancyMaps(const unsigned int systemIndex) { const SCT_Monitoring::Bec bec(index2Bec(systemIndex)); if (bec == INVALID_SYSTEM) { - msg(MSG::FATAL) << "Invalid subsystem index, should be 0-2, was " << systemIndex << endmsg; + ATH_MSG_FATAL("Invalid subsystem index, should be 0-2, was " << systemIndex); return StatusCode::FAILURE; } if (newRunFlag()) { @@ -1836,20 +1794,20 @@ SCTHitsNoiseMonTool::bookGeneralHitOccupancyMaps(const unsigned int systemIndex) m_HallHitsECm_vsLB->GetXaxis()->SetTitle("LumiBlock"); m_HallHitsECm_vsLB->GetYaxis()->SetTitle("Average number of all Hits"); if (hitOccMaps.regHist(m_HallHitsECm_vsLB).isFailure()) { - msg(MSG::WARNING) << "Couldn't book HallHitsECm_vsLB" << endmsg; + ATH_MSG_WARNING("Couldn't book HallHitsECm_vsLB"); } m_HSPHitsECm_vsLB = TProfile_LW::create("h_HSPHitsECm_vsLB", "Average num of SP Hits in ECm vs LB", SCT_Monitoring::NBINS_LBs, 0.5, SCT_Monitoring::NBINS_LBs + 0.5); m_HSPHitsECm_vsLB->GetXaxis()->SetTitle("LumiBlock"); m_HSPHitsECm_vsLB->GetYaxis()->SetTitle("Average number of SP Hits"); if (hitOccMaps.regHist(m_HSPHitsECm_vsLB).isFailure()) { - msg(MSG::WARNING) << "Couldn't book HSPHitsECm_vsLB" << endmsg; + ATH_MSG_WARNING("Couldn't book HSPHitsECm_vsLB"); } m_ECmHO_vsLB = TProfile_LW::create("ECCHO_vsLB", "HO vs LB for the EndCap C", SCT_Monitoring::NBINS_LBs, 0.5, SCT_Monitoring::NBINS_LBs + 0.5); m_ECmHO_vsLB->GetXaxis()->SetTitle("LumiBlock"); m_ECmHO_vsLB->GetYaxis()->SetTitle("Hit Occupancy [10^{-5}]"); if (hitOccMaps.regHist(m_ECmHO_vsLB).isFailure()) { - msg(MSG::WARNING) << "Couldn't book ECmHO_vsLB" << endmsg; + ATH_MSG_WARNING("Couldn't book ECmHO_vsLB"); } m_HallHitsTriggerECm_vsLB = TProfile_LW::create("h_HallHitsTriggerECm_vsLB", "Average num of all Hits in ECm with trigger vs LB", SCT_Monitoring::NBINS_LBs, 0.5, @@ -1857,7 +1815,7 @@ SCTHitsNoiseMonTool::bookGeneralHitOccupancyMaps(const unsigned int systemIndex) m_HallHitsTriggerECm_vsLB->GetXaxis()->SetTitle("LumiBlock"); m_HallHitsTriggerECm_vsLB->GetYaxis()->SetTitle("Average number of all Hits"); if (hitOccMaps.regHist(m_HallHitsTriggerECm_vsLB).isFailure()) { - msg(MSG::WARNING) << "Couldn't book HallHitsTriggerECm_vsLB" << endmsg; + ATH_MSG_WARNING("Couldn't book HallHitsTriggerECm_vsLB"); } m_HSPHitsTriggerECm_vsLB = TProfile_LW::create("h_HSPHitsTriggerECm_vsLB", "Average num of SP Hits in ECm with trigger vs LB", SCT_Monitoring::NBINS_LBs, 0.5, @@ -1865,14 +1823,14 @@ SCTHitsNoiseMonTool::bookGeneralHitOccupancyMaps(const unsigned int systemIndex) m_HSPHitsTriggerECm_vsLB->GetXaxis()->SetTitle("LumiBlock"); m_HSPHitsTriggerECm_vsLB->GetYaxis()->SetTitle("Average number of SP Hits"); if (hitOccMaps.regHist(m_HSPHitsTriggerECm_vsLB).isFailure()) { - msg(MSG::WARNING) << "Couldn't book HSPHitsTriggerECm_vsLB" << endmsg; + ATH_MSG_WARNING("Couldn't book HSPHitsTriggerECm_vsLB"); } m_ECmHOTrigger_vsLB = TProfile_LW::create("ECCHOTrigger_vsLB", "HO with trigger vs LB for the EndCap C (SP noise)", SCT_Monitoring::NBINS_LBs, 0.5, SCT_Monitoring::NBINS_LBs + 0.5); m_ECmHOTrigger_vsLB->GetXaxis()->SetTitle("LumiBlock"); m_ECmHOTrigger_vsLB->GetYaxis()->SetTitle("Hit Occupancy [10^{-5}]"); if (hitOccMaps.regHist(m_ECmHOTrigger_vsLB).isFailure()) { - msg(MSG::WARNING) << "Couldn't book ECmHOTrigger_vsLB" << endmsg; + ATH_MSG_WARNING("Couldn't book ECmHOTrigger_vsLB"); } } if (systemIndex == 1) { // BAR @@ -1881,20 +1839,20 @@ SCTHitsNoiseMonTool::bookGeneralHitOccupancyMaps(const unsigned int systemIndex) m_HallHitsBAR_vsLB->GetXaxis()->SetTitle("LumiBlock"); m_HallHitsBAR_vsLB->GetYaxis()->SetTitle("Average number of all Hits"); if (hitOccMaps.regHist(m_HallHitsBAR_vsLB).isFailure()) { - msg(MSG::WARNING) << "Couldn't book HallHitsBAR_vsLB" << endmsg; + ATH_MSG_WARNING("Couldn't book HallHitsBAR_vsLB"); } m_HSPHitsBAR_vsLB = TProfile_LW::create("h_HSPHitsBAR_vsLB", "Average num of SP Hits in Barrel vs LB", SCT_Monitoring::NBINS_LBs, 0.5, SCT_Monitoring::NBINS_LBs + 0.5); m_HSPHitsBAR_vsLB->GetXaxis()->SetTitle("LumiBlock"); m_HSPHitsBAR_vsLB->GetYaxis()->SetTitle("Average number of SP Hits"); if (hitOccMaps.regHist(m_HSPHitsBAR_vsLB).isFailure()) { - msg(MSG::WARNING) << "Couldn't book HSPHitsBAR_vsLB" << endmsg; + ATH_MSG_WARNING("Couldn't book HSPHitsBAR_vsLB"); } m_BARHO_vsLB = TProfile_LW::create("BARHO_vsLB", "HO vs LB for the Barrel (SP noise)", SCT_Monitoring::NBINS_LBs, 0.5, SCT_Monitoring::NBINS_LBs + 0.5); m_BARHO_vsLB->GetXaxis()->SetTitle("LumiBlock"); m_BARHO_vsLB->GetYaxis()->SetTitle("Hit Occupancy [10^{-5}]"); if (hitOccMaps.regHist(m_BARHO_vsLB).isFailure()) { - msg(MSG::WARNING) << "Couldn't book BARHO_vsLB" << endmsg; + ATH_MSG_WARNING("Couldn't book BARHO_vsLB"); } m_HallHitsTriggerBAR_vsLB = TProfile_LW::create("h_HallHitsTriggerBAR_vsLB", "Average num of all Hits in Barrel with trigger vs LB", SCT_Monitoring::NBINS_LBs, 0.5, @@ -1902,7 +1860,7 @@ SCTHitsNoiseMonTool::bookGeneralHitOccupancyMaps(const unsigned int systemIndex) m_HallHitsTriggerBAR_vsLB->GetXaxis()->SetTitle("LumiBlock"); m_HallHitsTriggerBAR_vsLB->GetYaxis()->SetTitle("Average number of all Hits"); if (hitOccMaps.regHist(m_HallHitsTriggerBAR_vsLB).isFailure()) { - msg(MSG::WARNING) << "Couldn't book HallHitsTriggerBAR_vsLB" << endmsg; + ATH_MSG_WARNING("Couldn't book HallHitsTriggerBAR_vsLB"); } m_HSPHitsTriggerBAR_vsLB = TProfile_LW::create("h_HSPHitsTriggerBAR_vsLB", "Average num of SP Hits in Barrel with trigger vs LB", SCT_Monitoring::NBINS_LBs, 0.5, @@ -1910,14 +1868,14 @@ SCTHitsNoiseMonTool::bookGeneralHitOccupancyMaps(const unsigned int systemIndex) m_HSPHitsTriggerBAR_vsLB->GetXaxis()->SetTitle("LumiBlock"); m_HSPHitsTriggerBAR_vsLB->GetYaxis()->SetTitle("Average number of SP Hits"); if (hitOccMaps.regHist(m_HSPHitsTriggerBAR_vsLB).isFailure()) { - msg(MSG::WARNING) << "Couldn't book HSPHitsTriggerBAR_vsLB" << endmsg; + ATH_MSG_WARNING("Couldn't book HSPHitsTriggerBAR_vsLB"); } m_BARHOTrigger_vsLB = TProfile_LW::create("BARHOTrigger_vsLB", "HO with trigger vs LB for the Barrel (SP noise)", SCT_Monitoring::NBINS_LBs, 0.5, SCT_Monitoring::NBINS_LBs + 0.5); m_BARHOTrigger_vsLB->GetXaxis()->SetTitle("LumiBlock"); m_BARHOTrigger_vsLB->GetYaxis()->SetTitle("Hit Occupancy [10^{-5}]"); if (hitOccMaps.regHist(m_BARHOTrigger_vsLB).isFailure()) { - msg(MSG::WARNING) << "Couldn't book BARHOTrigger_vsLB" << endmsg; + ATH_MSG_WARNING("Couldn't book BARHOTrigger_vsLB"); } } if (systemIndex == 2) { // ECp=ECA @@ -1926,21 +1884,21 @@ SCTHitsNoiseMonTool::bookGeneralHitOccupancyMaps(const unsigned int systemIndex) m_HallHitsECp_vsLB->GetXaxis()->SetTitle("LumiBlock"); m_HallHitsECp_vsLB->GetYaxis()->SetTitle("Average number of all Hits"); if (hitOccMaps.regHist(m_HallHitsECp_vsLB).isFailure()) { - msg(MSG::WARNING) << "Couldn't book HallHitsECp_vsLB" << endmsg; + ATH_MSG_WARNING("Couldn't book HallHitsECp_vsLB"); } m_HSPHitsECp_vsLB = TProfile_LW::create("h_HSPHitsECp_vsLB", "Average num of SP Hits in ECp vs LB", SCT_Monitoring::NBINS_LBs, 0.5, SCT_Monitoring::NBINS_LBs + 0.5); m_HSPHitsECp_vsLB->GetXaxis()->SetTitle("LumiBlock"); m_HSPHitsECp_vsLB->GetYaxis()->SetTitle("Average number of SP Hits"); if (hitOccMaps.regHist(m_HSPHitsECp_vsLB).isFailure()) { - msg(MSG::WARNING) << "Couldn't book HSPHitsECp_vsLB" << endmsg; + ATH_MSG_WARNING("Couldn't book HSPHitsECp_vsLB"); } m_ECpHO_vsLB = TProfile_LW::create("ECAHO_vsLB", "HO vs LB for the EndCap A (SP noise)", SCT_Monitoring::NBINS_LBs, 0.5, SCT_Monitoring::NBINS_LBs + 0.5); m_ECpHO_vsLB->GetXaxis()->SetTitle("LumiBlock"); m_ECpHO_vsLB->GetYaxis()->SetTitle("Hit Occupancy [10^{-5}]"); if (hitOccMaps.regHist(m_ECpHO_vsLB).isFailure()) { - msg(MSG::WARNING) << "Couldn't book ECpHO_vsLB" << endmsg; + ATH_MSG_WARNING("Couldn't book ECpHO_vsLB"); } m_HallHitsTriggerECp_vsLB = TProfile_LW::create("h_HallHitsTriggerECp_vsLB", "Average num of all Hits in ECp with trigger vs LB", SCT_Monitoring::NBINS_LBs, 0.5, @@ -1948,7 +1906,7 @@ SCTHitsNoiseMonTool::bookGeneralHitOccupancyMaps(const unsigned int systemIndex) m_HallHitsTriggerECp_vsLB->GetXaxis()->SetTitle("LumiBlock"); m_HallHitsTriggerECp_vsLB->GetYaxis()->SetTitle("Average number of all Hits"); if (hitOccMaps.regHist(m_HallHitsTriggerECp_vsLB).isFailure()) { - msg(MSG::WARNING) << "Couldn't book HallHitsTriggerECp_vsLB" << endmsg; + ATH_MSG_WARNING("Couldn't book HallHitsTriggerECp_vsLB"); } m_HSPHitsTriggerECp_vsLB = TProfile_LW::create("h_HSPHitsTriggerECp_vsLB", "Average num of SP Hits in ECp with trigger vs LB", SCT_Monitoring::NBINS_LBs, 0.5, @@ -1956,14 +1914,14 @@ SCTHitsNoiseMonTool::bookGeneralHitOccupancyMaps(const unsigned int systemIndex) m_HSPHitsTriggerECp_vsLB->GetXaxis()->SetTitle("LumiBlock"); m_HSPHitsTriggerECp_vsLB->GetYaxis()->SetTitle("Average number of SP Hits"); if (hitOccMaps.regHist(m_HSPHitsTriggerECp_vsLB).isFailure()) { - msg(MSG::WARNING) << "Couldn't book HSPHitsTriggerECp_vsLB" << endmsg; + ATH_MSG_WARNING("Couldn't book HSPHitsTriggerECp_vsLB"); } m_ECpHOTrigger_vsLB = TProfile_LW::create("ECAHOTrigger_vsLB", "HO with trigger vs LB for the EndCap A (SP noise)", SCT_Monitoring::NBINS_LBs, 0.5, SCT_Monitoring::NBINS_LBs + 0.5); m_ECpHOTrigger_vsLB->GetXaxis()->SetTitle("LumiBlock"); m_ECpHOTrigger_vsLB->GetYaxis()->SetTitle("Hit Occupancy [10^{-5}]"); if (hitOccMaps.regHist(m_ECpHOTrigger_vsLB).isFailure()) { - msg(MSG::WARNING) << "Couldn't book ECpHOTrigger_vsLB" << endmsg; + ATH_MSG_WARNING("Couldn't book ECpHOTrigger_vsLB"); } } } @@ -1987,7 +1945,7 @@ SCTHitsNoiseMonTool::checkNoiseMaps(bool final) { //////////////////////////////////////////////////////// if (m_environment == AthenaMonManager::online) { // Reset histos for online so there is proper weighting of events if (resetNoiseMapHists().isFailure()) { - msg(MSG::WARNING) << "Failed to reset noise occupancy maps!" << endmsg; + ATH_MSG_WARNING("Failed to reset noise occupancy maps!"); } } if (m_occSumUnbiased.size() && m_numberOfEvents) { @@ -2065,7 +2023,6 @@ SCTHitsNoiseMonTool::checkNoiseMaps(bool final) { } } - // Add 09.09.2016 if (m_hitoccSumUnbiased.size() && m_numberOfEvents) { for (std::map<Identifier, float>::iterator it = m_hitoccSumUnbiased.begin(); it != m_hitoccSumUnbiased.end(); it++) { @@ -2157,7 +2114,6 @@ SCTHitsNoiseMonTool::checkNoiseMaps(bool final) { m_occTriggerBAR_lb[m_current_lb] = 0; m_occTriggerECp_lb[m_current_lb] = 0; m_occTriggerECm_lb[m_current_lb] = 0; - // 09.09.2016 m_noisyMWithHO100[m_current_lb] = 0; m_noisyMWithHO1000[m_current_lb] = 0; m_noisyMWithHO10000[m_current_lb] = 0; @@ -2200,7 +2156,6 @@ SCTHitsNoiseMonTool::checkNoiseMaps(bool final) { if ((1E5) * m_occSumUnbiased_lb[*planeIterator] / m_events_lb > 10000.) { m_noisyM10000[m_current_lb]++; } - // 09.09.2016 m_hitocc_lb[m_current_lb] += (1E5) * m_hitoccSumUnbiased_lb[*planeIterator] / m_events_lb; m_hitoccBAR_lb[m_current_lb] += (1E5) * m_hitoccSumUnbiasedBAR_lb[*planeIterator] / m_events_lb; m_hitoccECp_lb[m_current_lb] += (1E5) * m_hitoccSumUnbiasedECp_lb[*planeIterator] / m_events_lb; @@ -2232,7 +2187,6 @@ SCTHitsNoiseMonTool::checkNoiseMaps(bool final) { if ((1E5) * m_occSumUnbiasedTrigger_lb[*planeIterator] / m_eventsTrigger_lb > 10000.) { m_noisyMTrigger10000[m_current_lb]++; } - // 09.09.2016 m_hitoccTrigger_lb[m_current_lb] += (1E5) * m_hitoccSumUnbiasedTrigger_lb[*planeIterator] / m_eventsTrigger_lb; m_hitoccTriggerBAR_lb[m_current_lb] += (1E5) * m_hitoccSumUnbiasedTriggerBAR_lb[*planeIterator] / @@ -2256,32 +2210,27 @@ SCTHitsNoiseMonTool::checkNoiseMaps(bool final) { if (bec == ENDCAP_C)nlinksECm++; nlinks++; } - // if (nlinks >0){ m_occ_lb[m_current_lb] /= nlinks; m_occTrigger_lb[m_current_lb] /= nlinks; - // 09.09.2016 m_hitocc_lb[m_current_lb] /= nlinks; m_hitoccTrigger_lb[m_current_lb] /= nlinks; } if (nlinksBAR >0){ m_occBAR_lb[m_current_lb] /= nlinksBAR; m_occTriggerBAR_lb[m_current_lb] /= nlinksBAR; - // 09.09.2016 m_hitoccBAR_lb[m_current_lb] /= nlinksBAR; m_hitoccTriggerBAR_lb[m_current_lb] /= nlinksBAR; } if (nlinksECp >0){ m_occECp_lb[m_current_lb] /= nlinksECp; m_occTriggerECp_lb[m_current_lb] /= nlinksECp; - // 09.09.2016 m_hitoccECp_lb[m_current_lb] /= nlinksECp; m_hitoccTriggerECp_lb[m_current_lb] /= nlinksECp; } if (nlinksECm >0){ m_occECm_lb[m_current_lb] /= nlinksECm; m_occTriggerECm_lb[m_current_lb] /= nlinksECm; - // 09.09.2016 m_hitoccECm_lb[m_current_lb] /= nlinksECm; m_hitoccTriggerECm_lb[m_current_lb] /= nlinksECm; } @@ -2301,7 +2250,6 @@ SCTHitsNoiseMonTool::checkNoiseMaps(bool final) { m_NoisyModulesTrigger100_vsLB->Reset(); m_NoisyModulesTrigger1000_vsLB->Reset(); m_NoisyModulesTrigger10000_vsLB->Reset(); - // 09.09.2016 m_BARHO_vsLB->Reset(); m_ECmHO_vsLB->Reset(); m_ECpHO_vsLB->Reset(); @@ -2361,7 +2309,6 @@ SCTHitsNoiseMonTool::checkNoiseMaps(bool final) { m_NoisyModulesTrigger10000_vsLB->Fill(bin, m_noisyMTrigger10000[bin]); } } - // 09.09.2016 for (int bin = 1; bin <= SCT_Monitoring::NBINS_LBs; bin++) { if (m_hitoccBAR_lb[bin] != 0) { m_BARHO_vsLB->Fill(bin, m_hitoccBAR_lb[bin]); @@ -2437,7 +2384,6 @@ SCTHitsNoiseMonTool::initializeNoiseMaps() { m_occSumUnbiasedTriggerBAR_lb[*planeIterator] = 0.; m_occSumUnbiasedTriggerECp_lb[*planeIterator] = 0.; m_occSumUnbiasedTriggerECm_lb[*planeIterator] = 0.; - // 09.09.2016 m_hitoccSumUnbiased[*planeIterator] = 0.; m_hitoccSumUnbiasedTrigger[*planeIterator] = 0.; m_hitoccSumUnbiasedRecent[*planeIterator] = 0.; @@ -2463,63 +2409,62 @@ SCTHitsNoiseMonTool::initializeNoiseMaps() { StatusCode SCTHitsNoiseMonTool::resetNoiseMapHists() { if (resetVecProf2(m_pnoiseoccupancymapHistoVector).isFailure()) { - msg(MSG::WARNING) << "Failed to reset noiseoccupancymapHistoVector!" << endmsg; + ATH_MSG_WARNING("Failed to reset noiseoccupancymapHistoVector!"); } if (resetVecProf2(m_pnoiseoccupancymapHistoVectorECp).isFailure()) { - msg(MSG::WARNING) << "Failed to reset noiseoccupancymapHistoVectorECp!" << endmsg; + ATH_MSG_WARNING("Failed to reset noiseoccupancymapHistoVectorECp!"); } if (resetVecProf2(m_pnoiseoccupancymapHistoVectorECm).isFailure()) { - msg(MSG::WARNING) << "Failed to reset noiseoccupancymapHistoVectorECm!" << endmsg; + ATH_MSG_WARNING("Failed to reset noiseoccupancymapHistoVectorECm!"); } if (m_environment == AthenaMonManager::online) { if (resetVecProf2(m_pnoiseoccupancymapHistoVectorRecent).isFailure()) { - msg(MSG::WARNING) << "Failed to reset noiseoccupancymapHistoVectorRecent!" << endmsg; + ATH_MSG_WARNING("Failed to reset noiseoccupancymapHistoVectorRecent!"); } if (resetVecProf2(m_pnoiseoccupancymapHistoVectorECpRecent).isFailure()) { - msg(MSG::WARNING) << "Failed to reset noiseoccupancymapHistoVectorECpRecent!" << endmsg; + ATH_MSG_WARNING("Failed to reset noiseoccupancymapHistoVectorECpRecent!"); } if (resetVecProf2(m_pnoiseoccupancymapHistoVectorECmRecent).isFailure()) { - msg(MSG::WARNING) << "Failed to reset noiseoccupancymapHistoVectorECmRecent!" << endmsg; + ATH_MSG_WARNING("Failed to reset noiseoccupancymapHistoVectorECmRecent!"); } } if (resetVecProf2(m_pnoiseoccupancymapHistoVectorTrigger).isFailure()) { - msg(MSG::WARNING) << "Failed to reset noiseoccupancymapHistoVectorTrigger!" << endmsg; + ATH_MSG_WARNING("Failed to reset noiseoccupancymapHistoVectorTrigger!"); } if (resetVecProf2(m_pnoiseoccupancymapHistoVectorECpTrigger).isFailure()) { - msg(MSG::WARNING) << "Failed to reset noiseoccupancymapHistoVectorECpTrigger!" << endmsg; + ATH_MSG_WARNING("Failed to reset noiseoccupancymapHistoVectorECpTrigger!"); } if (resetVecProf2(m_pnoiseoccupancymapHistoVectorECmTrigger).isFailure()) { - msg(MSG::WARNING) << "Failed to reset noiseoccupancymapHistoVectorECmTrigger!" << endmsg; + ATH_MSG_WARNING("Failed to reset noiseoccupancymapHistoVectorECmTrigger!"); } - // 09.09.2016 if (resetVecProf2(m_phitoccupancymapHistoVector).isFailure()) { - msg(MSG::WARNING) << "Failed to reset hitoccupancymapHistoVector!" << endmsg; + ATH_MSG_WARNING("Failed to reset hitoccupancymapHistoVector!"); } if (resetVecProf2(m_phitoccupancymapHistoVectorECp).isFailure()) { - msg(MSG::WARNING) << "Failed to reset hitoccupancymapHistoVectorECp!" << endmsg; + ATH_MSG_WARNING("Failed to reset hitoccupancymapHistoVectorECp!"); } if (resetVecProf2(m_phitoccupancymapHistoVectorECm).isFailure()) { - msg(MSG::WARNING) << "Failed to reset hitoccupancymapHistoVectorECm!" << endmsg; + ATH_MSG_WARNING("Failed to reset hitoccupancymapHistoVectorECm!"); } if (m_environment == AthenaMonManager::online) { if (resetVecProf2(m_phitoccupancymapHistoVectorRecent).isFailure()) { - msg(MSG::WARNING) << "Failed to reset hitoccupancymapHistoVectorRecent!" << endmsg; + ATH_MSG_WARNING("Failed to reset hitoccupancymapHistoVectorRecent!"); } if (resetVecProf2(m_phitoccupancymapHistoVectorECpRecent).isFailure()) { - msg(MSG::WARNING) << "Failed to reset hitoccupancymapHistoVectorECpRecent!" << endmsg; + ATH_MSG_WARNING("Failed to reset hitoccupancymapHistoVectorECpRecent!"); } if (resetVecProf2(m_phitoccupancymapHistoVectorECmRecent).isFailure()) { - msg(MSG::WARNING) << "Failed to reset hitoccupancymapHistoVectorECmRecent!" << endmsg; + ATH_MSG_WARNING("Failed to reset hitoccupancymapHistoVectorECmRecent!"); } } if (resetVecProf2(m_phitoccupancymapHistoVectorTrigger).isFailure()) { - msg(MSG::WARNING) << "Failed to reset hitoccupancymapHistoVectorTrigger!" << endmsg; + ATH_MSG_WARNING("Failed to reset hitoccupancymapHistoVectorTrigger!"); } if (resetVecProf2(m_phitoccupancymapHistoVectorECpTrigger).isFailure()) { - msg(MSG::WARNING) << "Failed to reset hitoccupancymapHistoVectorECpTrigger!" << endmsg; + ATH_MSG_WARNING("Failed to reset hitoccupancymapHistoVectorECpTrigger!"); } if (resetVecProf2(m_phitoccupancymapHistoVectorECmTrigger).isFailure()) { - msg(MSG::WARNING) << "Failed to reset hitoccupancymapHistoVectorECmTrigger!" << endmsg; + ATH_MSG_WARNING("Failed to reset hitoccupancymapHistoVectorECmTrigger!"); } @@ -2531,7 +2476,6 @@ SCTHitsNoiseMonTool::resetNoiseMapHists() { m_ECpNOTrigger->Reset(); m_SCTNO->Reset(); m_SCTNOTrigger->Reset(); - // 09.09.2016 m_BARHO->Reset(); m_BARHOTrigger->Reset(); m_ECmHO->Reset(); @@ -2559,7 +2503,7 @@ SCTHitsNoiseMonTool::resetNoiseMapsRecent() { for (std::map<Identifier, float>::iterator it = m_hitoccSumUnbiasedRecent.begin(); it != m_hitoccSumUnbiasedRecent.end(); ++it) { it->second = 0.0; - }// 09.09.2016 + } return StatusCode::SUCCESS; } @@ -2573,40 +2517,40 @@ StatusCode SCTHitsNoiseMonTool::resetHitMapHists() { if (m_environment == AthenaMonManager::online) { if (resetVecH2(m_ptrackhitsHistoVectorRecent).isFailure()) { - msg(MSG::WARNING) << "Failed to reset ptrackhitsHistoVectorRecent!" << endmsg; + ATH_MSG_WARNING("Failed to reset ptrackhitsHistoVectorRecent!"); } if (resetVecH2(m_ptrackhitsHistoVectorRecentECp).isFailure()) { - msg(MSG::WARNING) << "Failed to reset ptrackhitsHistoVectorRecentECp!" << endmsg; + ATH_MSG_WARNING("Failed to reset ptrackhitsHistoVectorRecentECp!"); } if (resetVecH2(m_ptrackhitsHistoVectorRecentECm).isFailure()) { - msg(MSG::WARNING) << "Failed to reset ptrackhitsHistoVectorRecentECm!" << endmsg; + ATH_MSG_WARNING("Failed to reset ptrackhitsHistoVectorRecentECm!"); } if (resetVecH1(m_tbinHistoVectorRecent).isFailure()) { - msg(MSG::WARNING) << "Failed to reset m_tbinHistoVectorRecent!" << endmsg; + ATH_MSG_WARNING("Failed to reset m_tbinHistoVectorRecent!"); } if (resetVecH1(m_tbinHistoVectorRecentECp).isFailure()) { - msg(MSG::WARNING) << "Failed to reset m_tbinHistoVectorRecentECp!" << endmsg; + ATH_MSG_WARNING("Failed to reset m_tbinHistoVectorRecentECp!"); } if (resetVecH1(m_tbinHistoVectorRecentECm).isFailure()) { - msg(MSG::WARNING) << "Failed to reset m_tbinHistoVectorRecentECm!" << endmsg; + ATH_MSG_WARNING("Failed to reset m_tbinHistoVectorRecentECm!"); } if (resetVecH2(m_phitsHistoVectorRecent).isFailure()) { - msg(MSG::WARNING) << "Failed to reset m_phitsHistoVectorRecent!" << endmsg; + ATH_MSG_WARNING("Failed to reset m_phitsHistoVectorRecent!"); } if (resetVecH2(m_phitsHistoVectorRecentECp).isFailure()) { - msg(MSG::WARNING) << "Failed to reset m_phitsHistoVectorRecentECp!" << endmsg; + ATH_MSG_WARNING("Failed to reset m_phitsHistoVectorRecentECp!"); } if (resetVecH2(m_phitsHistoVectorRecentECm).isFailure()) { - msg(MSG::WARNING) << "Failed to reset m_phitsHistoVectorRecentECm!" << endmsg; + ATH_MSG_WARNING("Failed to reset m_phitsHistoVectorRecentECm!"); } if (resetVecH1(m_clusizeHistoVectorRecent).isFailure()) { - msg(MSG::WARNING) << "Failed to reset m_clusizeHistoVectorRecent!" << endmsg; + ATH_MSG_WARNING("Failed to reset m_clusizeHistoVectorRecent!"); } if (resetVecH1(m_clusizeHistoVectorRecentECp).isFailure()) { - msg(MSG::WARNING) << "Failed to reset m_clusizeHistoVectorRecentECp!" << endmsg; + ATH_MSG_WARNING("Failed to reset m_clusizeHistoVectorRecentECp!"); } if (resetVecH1(m_clusizeHistoVectorRecentECm).isFailure()) { - msg(MSG::WARNING) << "Failed to reset m_clusizeHistoVectorRecentECm!" << endmsg; + ATH_MSG_WARNING("Failed to reset m_clusizeHistoVectorRecentECm!"); } m_tbinHistoRecent->Reset(); m_tbinHistoRecentECp->Reset(); @@ -2704,7 +2648,7 @@ SCTHitsNoiseMonTool::bookNoiseDistributions() { m_BARNO->SetBins(bins, xbins); } if (NoiseDistributions.regHist(m_BARNO).isFailure()) { - msg(MSG::WARNING) << "Couldn't book BARNO" << endmsg; + ATH_MSG_WARNING("Couldn't book BARNO"); } std::string barrelNO_title = "NO Distribution for the Barrel for " + m_NOTrigger + " trigger"; @@ -2715,7 +2659,7 @@ SCTHitsNoiseMonTool::bookNoiseDistributions() { m_BARNOTrigger->SetBins(bins, xbins); } if (NoiseDistributions.regHist(m_BARNOTrigger).isFailure()) { - msg(MSG::WARNING) << "Couldn't book BARNOTrigger" << endmsg; + ATH_MSG_WARNING("Couldn't book BARNOTrigger"); } m_ECmNO = new TH1F("ECCNOdistribution", "NO Distribution for the EndCap C", bins, xmin, xmax); @@ -2725,7 +2669,7 @@ SCTHitsNoiseMonTool::bookNoiseDistributions() { m_ECmNO->SetBins(bins, xbins); } if (NoiseDistributions.regHist(m_ECmNO).isFailure()) { - msg(MSG::WARNING) << "Couldn't book ECmNO" << endmsg; + ATH_MSG_WARNING("Couldn't book ECmNO"); } std::string ECmNO_title = "NO Distribution for the EndCap C for " + m_NOTrigger + " trigger"; @@ -2736,7 +2680,7 @@ SCTHitsNoiseMonTool::bookNoiseDistributions() { m_ECmNOTrigger->SetBins(bins, xbins); } if (NoiseDistributions.regHist(m_ECmNOTrigger).isFailure()) { - msg(MSG::WARNING) << "Couldn't book ECmNOTrigger" << endmsg; + ATH_MSG_WARNING("Couldn't book ECmNOTrigger"); } m_ECpNO = new TH1F("ECANOdistribution", "NO Distribution for the EndCap A", bins, xmin, xmax); @@ -2746,7 +2690,7 @@ SCTHitsNoiseMonTool::bookNoiseDistributions() { m_ECpNO->SetBins(bins, xbins); } if (NoiseDistributions.regHist(m_ECpNO).isFailure()) { - msg(MSG::WARNING) << "Couldn't book ECpNO" << endmsg; + ATH_MSG_WARNING("Couldn't book ECpNO"); } std::string ECpNO_title = "NO Distribution for the EndCap A for " + m_NOTrigger + " trigger"; @@ -2757,7 +2701,7 @@ SCTHitsNoiseMonTool::bookNoiseDistributions() { m_ECpNOTrigger->SetBins(bins, xbins); } if (NoiseDistributions.regHist(m_ECpNOTrigger).isFailure()) { - msg(MSG::WARNING) << "Couldn't book ECpNOTrigger" << endmsg; + ATH_MSG_WARNING("Couldn't book ECpNOTrigger"); } m_SCTNO = new TH1F("SCTNOdistribution", "NO Distribution for the SCT", bins, xmin, xmax); @@ -2767,7 +2711,7 @@ SCTHitsNoiseMonTool::bookNoiseDistributions() { m_SCTNO->SetBins(bins, xbins); } if (NoiseDistributions.regHist(m_SCTNO).isFailure()) { - msg(MSG::WARNING) << "Couldn't book NO" << endmsg; + ATH_MSG_WARNING("Couldn't book NO"); } std::string NO_title = "NO Distribution for the SCT for " + m_NOTrigger + " trigger"; @@ -2778,14 +2722,14 @@ SCTHitsNoiseMonTool::bookNoiseDistributions() { m_SCTNOTrigger->SetBins(bins, xbins); } if (NoiseDistributions.regHist(m_SCTNOTrigger).isFailure()) { - msg(MSG::WARNING) << "Couldn't book NOTrigger" << endmsg; + ATH_MSG_WARNING("Couldn't book NOTrigger"); } m_SCTNO_vsLB = TProfile_LW::create("NO_vsLB", "NO vs LB for all region (SP noise)", SCT_Monitoring::NBINS_LBs, 0.5, SCT_Monitoring::NBINS_LBs + 0.5); m_SCTNO_vsLB->GetXaxis()->SetTitle("LumiBlock"); m_SCTNO_vsLB->GetYaxis()->SetTitle("Noise Occupancy [10^{-5}]"); if (NoiseDistributions.regHist(m_SCTNO_vsLB).isFailure()) { - msg(MSG::WARNING) << "Couldn't book SCTNO_vsLB" << endmsg; + ATH_MSG_WARNING("Couldn't book SCTNO_vsLB"); } m_NoisyModulesTrigger100_vsLB = TProfile_LW::create("NoisyModulesTrigger100_vsLB", @@ -2794,7 +2738,7 @@ SCTHitsNoiseMonTool::bookNoiseDistributions() { m_NoisyModulesTrigger100_vsLB->GetXaxis()->SetTitle("LumiBlock"); m_NoisyModulesTrigger100_vsLB->GetYaxis()->SetTitle("Noisy Modules"); if (NoiseDistributions.regHist(m_NoisyModulesTrigger100_vsLB).isFailure()) { - msg(MSG::WARNING) << "Couldn't book NoisyModulesTrigger100_vsLB" << endmsg; + ATH_MSG_WARNING("Couldn't book NoisyModulesTrigger100_vsLB"); } m_NoisyModulesTrigger1000_vsLB = TProfile_LW::create("NoisyModulesTrigger1000_vsLB", @@ -2803,7 +2747,7 @@ SCTHitsNoiseMonTool::bookNoiseDistributions() { m_NoisyModulesTrigger1000_vsLB->GetXaxis()->SetTitle("LumiBlock"); m_NoisyModulesTrigger1000_vsLB->GetYaxis()->SetTitle("Noisy Modules"); if (NoiseDistributions.regHist(m_NoisyModulesTrigger1000_vsLB).isFailure()) { - msg(MSG::WARNING) << "Couldn't book NoisyModulesTrigger1000_vsLB" << endmsg; + ATH_MSG_WARNING("Couldn't book NoisyModulesTrigger1000_vsLB"); } m_NoisyModulesTrigger10000_vsLB = TProfile_LW::create("NoisyModulesTrigger10000_vsLB", @@ -2812,7 +2756,7 @@ SCTHitsNoiseMonTool::bookNoiseDistributions() { m_NoisyModulesTrigger10000_vsLB->GetXaxis()->SetTitle("LumiBlock"); m_NoisyModulesTrigger10000_vsLB->GetYaxis()->SetTitle("Noisy Modules"); if (NoiseDistributions.regHist(m_NoisyModulesTrigger10000_vsLB).isFailure()) { - msg(MSG::WARNING) << "Couldn't book NoisyModulesTrigger10000_vsLB" << endmsg; + ATH_MSG_WARNING("Couldn't book NoisyModulesTrigger10000_vsLB"); } m_SCTNOTrigger_vsLB = TProfile_LW::create("NOTrigger_vsLB", "NO with trigger vs LB for all region (SP noise)", SCT_Monitoring::NBINS_LBs, @@ -2820,7 +2764,7 @@ SCTHitsNoiseMonTool::bookNoiseDistributions() { m_SCTNOTrigger_vsLB->GetXaxis()->SetTitle("LumiBlock"); m_SCTNOTrigger_vsLB->GetYaxis()->SetTitle("Noise Occupancy [10^{-5}]"); if (NoiseDistributions.regHist(m_SCTNOTrigger_vsLB).isFailure()) { - msg(MSG::WARNING) << "Couldn't book SCTNOTrigger_vsLB" << endmsg; + ATH_MSG_WARNING("Couldn't book SCTNOTrigger_vsLB"); } m_NoisyModules100_vsLB = TProfile_LW::create("NoisyModules100_vsLB", "NoisyModules100 vs LB for all region (SP noise)", @@ -2828,7 +2772,7 @@ SCTHitsNoiseMonTool::bookNoiseDistributions() { m_NoisyModules100_vsLB->GetXaxis()->SetTitle("LumiBlock"); m_NoisyModules100_vsLB->GetYaxis()->SetTitle("Noisy Modules"); if (NoiseDistributions.regHist(m_NoisyModules100_vsLB).isFailure()) { - msg(MSG::WARNING) << "Couldn't book NoisyModules100_vsLB" << endmsg; + ATH_MSG_WARNING("Couldn't book NoisyModules100_vsLB"); } m_NoisyModules1000_vsLB = TProfile_LW::create("NoisyModules1000_vsLB", "NoisyModules1000 vs LB for all region (SP noise)", @@ -2836,7 +2780,7 @@ SCTHitsNoiseMonTool::bookNoiseDistributions() { m_NoisyModules1000_vsLB->GetXaxis()->SetTitle("LumiBlock"); m_NoisyModules1000_vsLB->GetYaxis()->SetTitle("Noisy Modules"); if (NoiseDistributions.regHist(m_NoisyModules1000_vsLB).isFailure()) { - msg(MSG::WARNING) << "Couldn't book NoisyModules1000_vsLB" << endmsg; + ATH_MSG_WARNING("Couldn't book NoisyModules1000_vsLB"); } m_NoisyModules10000_vsLB = TProfile_LW::create("NoisyModules10000_vsLB", "NoisyModules10000 vs LB for all region (SP noise)", @@ -2844,9 +2788,8 @@ SCTHitsNoiseMonTool::bookNoiseDistributions() { m_NoisyModules10000_vsLB->GetXaxis()->SetTitle("LumiBlock"); m_NoisyModules10000_vsLB->GetYaxis()->SetTitle("Noisy Modules"); if (NoiseDistributions.regHist(m_NoisyModules10000_vsLB).isFailure()) { - msg(MSG::WARNING) << "Couldn't book NoisyModules10000_vsLB" << endmsg; + ATH_MSG_WARNING("Couldn't book NoisyModules10000_vsLB"); } - // 09.09.2016 m_BARHO = new TH1F("barrelHOdistribution", "HO Distribution for the Barrel", bins, xmin, xmax); m_BARHO->GetXaxis()->SetTitle("Hit Occupancy [10^{-5}]"); m_BARHO->GetYaxis()->SetTitle("Modules"); @@ -2854,7 +2797,7 @@ SCTHitsNoiseMonTool::bookNoiseDistributions() { m_BARHO->SetBins(bins, xbins); } if (NoiseDistributions.regHist(m_BARHO).isFailure()) { - msg(MSG::WARNING) << "Couldn't book BARHO" << endmsg; + ATH_MSG_WARNING("Couldn't book BARHO"); } std::string barrelHO_title = "HO Distribution for the Barrel for " + m_NOTrigger + " trigger"; @@ -2865,7 +2808,7 @@ SCTHitsNoiseMonTool::bookNoiseDistributions() { m_BARHOTrigger->SetBins(bins, xbins); } if (NoiseDistributions.regHist(m_BARHOTrigger).isFailure()) { - msg(MSG::WARNING) << "Couldn't book BARHOTrigger" << endmsg; + ATH_MSG_WARNING("Couldn't book BARHOTrigger"); } m_ECmHO = new TH1F("ECCHOdistribution", "HO Distribution for the EndCap C", bins, xmin, xmax); @@ -2875,7 +2818,7 @@ SCTHitsNoiseMonTool::bookNoiseDistributions() { m_ECmHO->SetBins(bins, xbins); } if (NoiseDistributions.regHist(m_ECmHO).isFailure()) { - msg(MSG::WARNING) << "Couldn't book ECmHO" << endmsg; + ATH_MSG_WARNING("Couldn't book ECmHO"); } std::string ECmHO_title = "HO Distribution for the EndCap C for " + m_NOTrigger + " trigger"; @@ -2886,7 +2829,7 @@ SCTHitsNoiseMonTool::bookNoiseDistributions() { m_ECmHOTrigger->SetBins(bins, xbins); } if (NoiseDistributions.regHist(m_ECmHOTrigger).isFailure()) { - msg(MSG::WARNING) << "Couldn't book ECmHOTrigger" << endmsg; + ATH_MSG_WARNING("Couldn't book ECmHOTrigger"); } m_ECpHO = new TH1F("ECAHOdistribution", "HO Distribution for the EndCap A", bins, xmin, xmax); @@ -2896,7 +2839,7 @@ SCTHitsNoiseMonTool::bookNoiseDistributions() { m_ECpHO->SetBins(bins, xbins); } if (NoiseDistributions.regHist(m_ECpHO).isFailure()) { - msg(MSG::WARNING) << "Couldn't book ECpHO" << endmsg; + ATH_MSG_WARNING("Couldn't book ECpHO"); } std::string ECpHO_title = "HO Distribution for the EndCap A for " + m_NOTrigger + " trigger"; @@ -2907,7 +2850,7 @@ SCTHitsNoiseMonTool::bookNoiseDistributions() { m_ECpHOTrigger->SetBins(bins, xbins); } if (NoiseDistributions.regHist(m_ECpHOTrigger).isFailure()) { - msg(MSG::WARNING) << "Couldn't book ECpHOTrigger" << endmsg; + ATH_MSG_WARNING("Couldn't book ECpHOTrigger"); } m_SCTHO = new TH1F("SCTHOdistribution", "HO Distribution for the SCT", bins, xmin, xmax); @@ -2917,7 +2860,7 @@ SCTHitsNoiseMonTool::bookNoiseDistributions() { m_SCTHO->SetBins(bins, xbins); } if (NoiseDistributions.regHist(m_SCTHO).isFailure()) { - msg(MSG::WARNING) << "Couldn't book HO" << endmsg; + ATH_MSG_WARNING("Couldn't book HO"); } std::string HO_title = "HO Distribution for the SCT for " + m_NOTrigger + " trigger"; @@ -2928,14 +2871,14 @@ SCTHitsNoiseMonTool::bookNoiseDistributions() { m_SCTHOTrigger->SetBins(bins, xbins); } if (NoiseDistributions.regHist(m_SCTHOTrigger).isFailure()) { - msg(MSG::WARNING) << "Couldn't book HOTrigger" << endmsg; + ATH_MSG_WARNING("Couldn't book HOTrigger"); } m_SCTHO_vsLB = TProfile_LW::create("HO_vsLB", "HO vs LB for all region (SP noise)", SCT_Monitoring::NBINS_LBs, 0.5, SCT_Monitoring::NBINS_LBs + 0.5); m_SCTHO_vsLB->GetXaxis()->SetTitle("LumiBlock"); m_SCTHO_vsLB->GetYaxis()->SetTitle("Hit Occupancy [10^{-5}]"); if (NoiseDistributions.regHist(m_SCTHO_vsLB).isFailure()) { - msg(MSG::WARNING) << "Couldn't book SCTHO_vsLB" << endmsg; + ATH_MSG_WARNING("Couldn't book SCTHO_vsLB"); } m_NoisyModulesWithHOTrigger100_vsLB = TProfile_LW::create("NoisyModulesWithHOTrigger100_vsLB", @@ -2944,7 +2887,7 @@ SCTHitsNoiseMonTool::bookNoiseDistributions() { m_NoisyModulesWithHOTrigger100_vsLB->GetXaxis()->SetTitle("LumiBlock"); m_NoisyModulesWithHOTrigger100_vsLB->GetYaxis()->SetTitle("Noisy Modules with HO"); if (NoiseDistributions.regHist(m_NoisyModulesWithHOTrigger100_vsLB).isFailure()) { - msg(MSG::WARNING) << "Couldn't book NoisyModulesWithHOTrigger100_vsLB" << endmsg; + ATH_MSG_WARNING("Couldn't book NoisyModulesWithHOTrigger100_vsLB"); } m_NoisyModulesWithHOTrigger1000_vsLB = TProfile_LW::create("NoisyModulesWithHOTrigger1000_vsLB", @@ -2953,7 +2896,7 @@ SCTHitsNoiseMonTool::bookNoiseDistributions() { m_NoisyModulesWithHOTrigger1000_vsLB->GetXaxis()->SetTitle("LumiBlock"); m_NoisyModulesWithHOTrigger1000_vsLB->GetYaxis()->SetTitle("Noisy Modules with HO"); if (NoiseDistributions.regHist(m_NoisyModulesWithHOTrigger1000_vsLB).isFailure()) { - msg(MSG::WARNING) << "Couldn't book NoisyModulesWithHOTrigger1000_vsLB" << endmsg; + ATH_MSG_WARNING("Couldn't book NoisyModulesWithHOTrigger1000_vsLB"); } m_NoisyModulesWithHOTrigger10000_vsLB = TProfile_LW::create("NoisyModulesWithHOTrigger10000_vsLB", @@ -2962,7 +2905,7 @@ SCTHitsNoiseMonTool::bookNoiseDistributions() { m_NoisyModulesWithHOTrigger10000_vsLB->GetXaxis()->SetTitle("LumiBlock"); m_NoisyModulesWithHOTrigger10000_vsLB->GetYaxis()->SetTitle("Noisy Modules with HO"); if (NoiseDistributions.regHist(m_NoisyModulesWithHOTrigger10000_vsLB).isFailure()) { - msg(MSG::WARNING) << "Couldn't book NoisyModulesWithHOTrigger10000_vsLB" << endmsg; + ATH_MSG_WARNING("Couldn't book NoisyModulesWithHOTrigger10000_vsLB"); } m_SCTHOTrigger_vsLB = TProfile_LW::create("HOTrigger_vsLB", "HO with trigger vs LB for all region (SP noise)", SCT_Monitoring::NBINS_LBs, @@ -2970,7 +2913,7 @@ SCTHitsNoiseMonTool::bookNoiseDistributions() { m_SCTHOTrigger_vsLB->GetXaxis()->SetTitle("LumiBlock"); m_SCTHOTrigger_vsLB->GetYaxis()->SetTitle("Hit Occupancy [10^{-5}]"); if (NoiseDistributions.regHist(m_SCTHOTrigger_vsLB).isFailure()) { - msg(MSG::WARNING) << "Couldn't book SCTHOTrigger_vsLB" << endmsg; + ATH_MSG_WARNING("Couldn't book SCTHOTrigger_vsLB"); } m_NoisyModulesWithHO100_vsLB = TProfile_LW::create("NoisyModulesWithHO100_vsLB", @@ -2979,7 +2922,7 @@ SCTHitsNoiseMonTool::bookNoiseDistributions() { m_NoisyModulesWithHO100_vsLB->GetXaxis()->SetTitle("LumiBlock"); m_NoisyModulesWithHO100_vsLB->GetYaxis()->SetTitle("Noisy Modules with HO"); if (NoiseDistributions.regHist(m_NoisyModulesWithHO100_vsLB).isFailure()) { - msg(MSG::WARNING) << "Couldn't book NoisyModulesWithHO100_vsLB" << endmsg; + ATH_MSG_WARNING("Couldn't book NoisyModulesWithHO100_vsLB"); } m_NoisyModulesWithHO1000_vsLB = TProfile_LW::create("NoisyModulesWithHO1000_vsLB", @@ -2988,7 +2931,7 @@ SCTHitsNoiseMonTool::bookNoiseDistributions() { m_NoisyModulesWithHO1000_vsLB->GetXaxis()->SetTitle("LumiBlock"); m_NoisyModulesWithHO1000_vsLB->GetYaxis()->SetTitle("Noisy Modules with HO"); if (NoiseDistributions.regHist(m_NoisyModulesWithHO1000_vsLB).isFailure()) { - msg(MSG::WARNING) << "Couldn't book NoisyModulesWithHO1000_vsLB" << endmsg; + ATH_MSG_WARNING("Couldn't book NoisyModulesWithHO1000_vsLB"); } m_NoisyModulesWithHO10000_vsLB = TProfile_LW::create("NoisyModulesWithHO10000_vsLB", @@ -2997,7 +2940,7 @@ SCTHitsNoiseMonTool::bookNoiseDistributions() { m_NoisyModulesWithHO10000_vsLB->GetXaxis()->SetTitle("LumiBlock"); m_NoisyModulesWithHO10000_vsLB->GetYaxis()->SetTitle("Noisy Modules with HO"); if (NoiseDistributions.regHist(m_NoisyModulesWithHO10000_vsLB).isFailure()) { - msg(MSG::WARNING) << "Couldn't book NoisyModulesWithHO10000_vsLB" << endmsg; + ATH_MSG_WARNING("Couldn't book NoisyModulesWithHO10000_vsLB"); } } return StatusCode::SUCCESS; @@ -3071,9 +3014,7 @@ SCTHitsNoiseMonTool::makeSPvsEventNumber() { // get space points for SCT from TDS if (not SCT_spcontainer.isValid()) { - if (msgLvl(MSG::WARNING)) { - msg(MSG::WARNING) << "Si SpacePoint container for SCT not found" << endmsg; - } + ATH_MSG_WARNING("Si SpacePoint container for SCT not found"); return StatusCode::FAILURE; } int sct_nspacepoints(0); @@ -3150,43 +3091,34 @@ SCTHitsNoiseMonTool::makeVectorOfTrackRDOIdentifiers() { m_RDOsOnTracks.clear(); SG::ReadHandle<SCT_RDO_Container> p_rdocontainer(m_dataObjectName); if (not p_rdocontainer.isValid()) { - msg(MSG::FATAL) << "Could not find the data object " << m_dataObjectName.key() << " !" << endmsg; + ATH_MSG_FATAL("Could not find the data object " << m_dataObjectName.key() << " !"); return StatusCode::FAILURE; } else { - if (msgLvl(MSG::DEBUG)) { - msg(MSG::DEBUG) << "Data object " << m_dataObjectName.key() << " found" << endmsg; - } + ATH_MSG_DEBUG("Data object " << m_dataObjectName.key() << " found"); } SG::ReadHandle<TrackCollection> tracks(m_tracksName); if (not tracks.isValid()) { - msg(MSG::FATAL) << "No tracks for you!" << endmsg; + ATH_MSG_FATAL("No tracks for you!"); return StatusCode::FAILURE; } // Only do for events with less than some number of tracks if (tracks->size() > m_maxTracks) { - if (msgLvl(MSG::DEBUG)) { - msg(MSG::DEBUG) << "The event has more than " << m_maxTracks - << " tracks. Don't do hits-on-track-hists" << endmsg; - } + ATH_MSG_DEBUG("The event has more than " << m_maxTracks + << " tracks. Don't do hits-on-track-hists"); return StatusCode::SUCCESS; } // assemble list of rdo ids associated with tracks for (int i = 0; i < (int) tracks->size(); i++) { const Trk::Track *track = (*tracks)[i]; if (track == 0) { - if (msgLvl(MSG::WARNING)) { - msg(MSG::WARNING) << "no pointer to track!!!" << endmsg; - } + ATH_MSG_WARNING("no pointer to track!!!"); break; } // Get pointer to track state on surfaces const DataVector<const Trk::TrackStateOnSurface> *trackStates = track->trackStateOnSurfaces(); if (trackStates == 0) { - if (msgLvl(MSG::WARNING)) { - msg(MSG::WARNING) << - "for current track is TrackStateOnSurfaces == Null, no data will be written for this track" << endmsg; - } + ATH_MSG_WARNING("for current track is TrackStateOnSurfaces == Null, no data will be written for this track"); }else {// Loop over all track states on surfaces for (DataVector<const Trk::TrackStateOnSurface>::const_iterator it = trackStates->begin(); it != trackStates->end(); it++) { @@ -3197,9 +3129,7 @@ SCTHitsNoiseMonTool::makeVectorOfTrackRDOIdentifiers() { // Get Pointer to prepRawDataObject const InDet::SiCluster *RawDataClus = dynamic_cast<const InDet::SiCluster *>(clus->prepRawData()); if (RawDataClus == 0) { - if (msgLvl(MSG::WARNING)) { - msg(MSG::WARNING) << "SiCluster WITHOUT prepRawData!!!!" << endmsg; - } + ATH_MSG_WARNING("SiCluster WITHOUT prepRawData!!!!"); break; } // if Cluster is in SCT ... @@ -3211,9 +3141,7 @@ SCTHitsNoiseMonTool::makeVectorOfTrackRDOIdentifiers() { } } } - if (msgLvl(MSG::DEBUG)) { - msg(MSG::DEBUG) << "JEGN!! num RDOs on tracks is " << m_RDOsOnTracks.size() << endmsg; - } + ATH_MSG_DEBUG("JEGN!! num RDOs on tracks is " << m_RDOsOnTracks.size()); return StatusCode::SUCCESS; } @@ -3223,7 +3151,7 @@ SCTHitsNoiseMonTool::bookGeneralTrackHits(const unsigned int systemIndex) { const SCT_Monitoring::Bec bec(index2Bec(systemIndex)); if (bec == INVALID_SYSTEM) { - msg(MSG::FATAL) << "Invalid subsystem index, should be 0-2, was " << systemIndex << endmsg; + ATH_MSG_FATAL("Invalid subsystem index, should be 0-2, was " << systemIndex); return StatusCode::FAILURE; } const string paths[] = { @@ -3427,7 +3355,7 @@ SCTHitsNoiseMonTool::h2Factory(const std::string &name, const std::string &title tmp->SetYTitle("Index in the direction of #phi"); bool success(registry.regHist(tmp).isSuccess()); if (not success) { - msg(MSG::WARNING) << "Cannot book SCT histogram: " << name << endmsg; + ATH_MSG_WARNING("Cannot book SCT histogram: " << name); } storageVector.push_back(tmp); return success ? tmp : NULL; @@ -3442,7 +3370,7 @@ SCTHitsNoiseMonTool::h2IFactory(const std::string &name, const std::string &titl tmp->SetYTitle("Time bin"); bool success(registry.regHist(tmp).isSuccess()); if (not success) { - msg(MSG::WARNING) << "Cannot book SCT histogram: " << name << endmsg; + ATH_MSG_WARNING("Cannot book SCT histogram: " << name); } return success ? tmp : NULL; } @@ -3456,7 +3384,7 @@ SCTHitsNoiseMonTool::prof2DFactory(const std::string &name, const std::string &t tmp->SetYTitle("Index in the direction of #phi"); bool success(registry.regHist(tmp).isSuccess()); if (not success) { - msg(MSG::WARNING) << "Cannot book SCT histogram: " << name << endmsg; + ATH_MSG_WARNING("Cannot book SCT histogram: " << name); } return success ? tmp : NULL; } @@ -3470,7 +3398,7 @@ SCTHitsNoiseMonTool::profFactory(const std::string &name, const std::string &tit tmp->SetYTitle("Fraction of 01X"); bool success(registry.regHist(tmp).isSuccess()); if (not success) { - msg(MSG::WARNING) << "Cannot book SCT histogram: " << name << endmsg; + ATH_MSG_WARNING("Cannot book SCT histogram: " << name); } return success ? tmp : NULL; } @@ -3485,7 +3413,7 @@ SCTHitsNoiseMonTool::profFactory(const std::string &name, const std::string &tit tmp->GetXaxis()->SetBinLabel(3, "Endcap A"); bool success(registry.regHist(tmp).isSuccess()); if (not success) { - msg(MSG::WARNING) << "Cannot book SCT histogram: " << name << endmsg; + ATH_MSG_WARNING("Cannot book SCT histogram: " << name); } return success ? tmp : NULL; } @@ -3510,7 +3438,7 @@ SCTHitsNoiseMonTool::prof2Factory(const std::string &name, const std::string &ti tmp->SetYTitle("Index in the direction of #phi"); bool success(registry.regHist(tmp).isSuccess()); if (not success) { - msg(MSG::WARNING) << "Cannot book SCT histogram: " << name << endmsg; + ATH_MSG_WARNING("Cannot book SCT histogram: " << name); } storageVector.push_back(tmp); return success ? tmp : NULL; @@ -3523,7 +3451,7 @@ SCTHitsNoiseMonTool::h1Factory(const std::string &name, const std::string &title bool success(registry.regHist(tmp).isSuccess()); if (not success) { - msg(MSG::WARNING) << "Cannot book SCT histogram: " << name << endmsg; + ATH_MSG_WARNING("Cannot book SCT histogram: " << name); } return success ? tmp : NULL; } @@ -3535,7 +3463,7 @@ SCTHitsNoiseMonTool::h1Factory(const std::string &name, const std::string &title bool success(registry.regHist(tmp).isSuccess()); if (not success) { - msg(MSG::WARNING) << "Cannot book SCT histogram: " << name << endmsg; + ATH_MSG_WARNING("Cannot book SCT histogram: " << name); } storageVector.push_back(tmp); return success ? tmp : NULL; @@ -3548,7 +3476,7 @@ SCTHitsNoiseMonTool::th1Factory(const std::string &name, const std::string &titl bool success(registry.regHist(tmp).isSuccess()); if (not success) { - msg(MSG::WARNING) << "Cannot book SCT histogram: " << name << endmsg; + ATH_MSG_WARNING("Cannot book SCT histogram: " << name); } return success ? tmp : NULL; } @@ -3560,7 +3488,7 @@ SCTHitsNoiseMonTool::th1Factory(const std::string &name, const std::string &titl bool success(registry.regHist(tmp).isSuccess()); if (not success) { - msg(MSG::WARNING) << "Cannot book SCT histogram: " << name << endmsg; + ATH_MSG_WARNING("Cannot book SCT histogram: " << name); } storageVector.push_back(tmp); return success ? tmp : NULL; diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTLorentzMonTool.cxx b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTLorentzMonTool.cxx old mode 100755 new mode 100644 index a578cbcbb60ce42f2e7b1c812d10cc95b4c3f544..cf4ccd067287e18fc9734eb3ebfef3e874b2b289 --- a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTLorentzMonTool.cxx +++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTLorentzMonTool.cxx @@ -9,7 +9,6 @@ * Modified by Yuta */ #include "SCT_Monitoring/SCTLorentzMonTool.h" -#include "deletePointers.h" #include "SCT_NameFormatter.h" #include <cmath> #include <type_traits> @@ -85,22 +84,16 @@ StatusCode SCTLorentzMonTool::initialize() { // ==================================================================================================== // SCTLorentzMonTool :: bookHistograms // ==================================================================================================== -// StatusCode SCTLorentzMonTool::bookHistograms( bool /*isNewEventsBlock*/, bool isNewLumiBlock, bool isNewRun -// )//suppress 'unused' compiler warning // hidetoshi 14.01.21 StatusCode -SCTLorentzMonTool::bookHistogramsRecurrent( ) { // - // hidetoshi - // 14.01.21 +SCTLorentzMonTool::bookHistogramsRecurrent( ) { m_path = ""; if (newRunFlag()) { - m_numberOfEvents = 0; // - // hidetoshi - // 14.01.21 + m_numberOfEvents = 0; } ATH_MSG_DEBUG("initialize being called"); // Booking Track related Histograms if (bookLorentzHistos().isFailure()) { - msg(MSG::WARNING) << "Error in bookLorentzHistos()" << endmsg; // hidetoshi 14.01.22 + ATH_MSG_WARNING("Error in bookLorentzHistos()"); } return StatusCode::SUCCESS; } @@ -109,19 +102,15 @@ SCTLorentzMonTool::bookHistogramsRecurrent( ) { // SCTLorentzMonTool :: bookHistograms // ==================================================================================================== StatusCode -SCTLorentzMonTool::bookHistograms( ) { // - // hidetoshi - // 14.01.21 +SCTLorentzMonTool::bookHistograms( ) { m_path = ""; - m_numberOfEvents = 0; // - // hidetoshi - // 14.01.21 + m_numberOfEvents = 0; ATH_MSG_DEBUG("initialize being called"); /* Retrieve TrackToVertex extrapolator tool */ ATH_CHECK(m_trackToVertexTool.retrieve()); // Booking Track related Histograms if (bookLorentzHistos().isFailure()) { - msg(MSG::WARNING) << "Error in bookLorentzHistos()" << endmsg; // hidetoshi 14.01.22 + ATH_MSG_WARNING("Error in bookLorentzHistos()"); } return StatusCode::SUCCESS; } @@ -167,7 +156,7 @@ SCTLorentzMonTool::fillHistograms() { SG::ReadHandle<TrackCollection> tracks(m_tracksName); if (not tracks.isValid()) { - msg(MSG::WARNING) << " TrackCollection not found: Exit SCTLorentzTool" << m_tracksName.key() << endmsg; + ATH_MSG_WARNING(" TrackCollection not found: Exit SCTLorentzTool" << m_tracksName.key()); return StatusCode::SUCCESS; } TrackCollection::const_iterator trkitr = tracks->begin(); @@ -177,21 +166,20 @@ SCTLorentzMonTool::fillHistograms() { // Get track const Trk::Track *track = (*trkitr); if (not track) { - msg(MSG::ERROR) << "no pointer to track!!!" << endmsg; + ATH_MSG_ERROR("no pointer to track!!!"); continue; } // Get pointer to track state on surfaces const DataVector<const Trk::TrackStateOnSurface> *trackStates = track->trackStateOnSurfaces(); if (not trackStates) { - msg(MSG::WARNING) << "for current track, TrackStateOnSurfaces == Null, no data will be written for this track" << - endmsg; + ATH_MSG_WARNING("for current track, TrackStateOnSurfaces == Null, no data will be written for this track"); continue; } const Trk::TrackSummary *summary = track->trackSummary(); if (not summary) { - msg(MSG::WARNING) << " null trackSummary" << endmsg; + ATH_MSG_WARNING(" null trackSummary"); continue; } @@ -229,7 +217,7 @@ SCTLorentzMonTool::fillHistograms() { int nStrip = rdoList.size(); const Trk::TrackParameters *trkp = dynamic_cast<const Trk::TrackParameters *>((*it)->trackParameters()); if (not trkp) { - msg(MSG::WARNING) << " Null pointer to MeasuredTrackParameters" << endmsg; + ATH_MSG_WARNING(" Null pointer to MeasuredTrackParameters"); continue; } @@ -245,7 +233,7 @@ SCTLorentzMonTool::fillHistograms() { pTrack[2] = trkp->momentum().z(); int iflag = findAnglesToWaferSurface(pTrack, sinAlpha, clus->identify(), elements, thetaToWafer, phiToWafer); if (iflag < 0) { - msg(MSG::WARNING) << "Error in finding track angles to wafer surface" << endmsg; + ATH_MSG_WARNING("Error in finding track angles to wafer surface"); continue; // Let's think about this (later)... continue, break or return? } @@ -256,7 +244,7 @@ SCTLorentzMonTool::fillHistograms() { (summary->get(Trk::numberOfSCTHits) > 6)// && // #SCTHits >6 ) { passesCuts = true; - }// 01.02.2015 + } else if ((track->perigeeParameters()->parameters()[Trk::qOverP] < 0.) && // use negative track only (fabs(perigee->parameters()[Trk::d0]) < 1.) && // d0 < 1mm (fabs(perigee->parameters()[Trk::z0] * sin(perigee->parameters()[Trk::theta])) < 1.) && // d0 < @@ -299,9 +287,7 @@ SCTLorentzMonTool::fillHistograms() { // SCTLorentzMonTool :: procHistograms // ==================================================================================================== StatusCode -SCTLorentzMonTool::procHistograms() { // - // hidetoshi - // 14.01.21 +SCTLorentzMonTool::procHistograms() { if (endOfRunFlag()) { ATH_MSG_DEBUG("finalHists()"); ATH_MSG_DEBUG("Total Rec Event Number: " << m_numberOfEvents); @@ -323,14 +309,11 @@ SCTLorentzMonTool::checkHists(bool /*fromFinalize*/) { // SCTLorentzMonTool :: bookLorentzHistos // ==================================================================================================== StatusCode -SCTLorentzMonTool::bookLorentzHistos() { // - // hidetoshi - // 14.01.22 +SCTLorentzMonTool::bookLorentzHistos() { const int nLayers(4); const int nSides(2); string stem = m_path + "/SCT/GENERAL/lorentz/"; - // MonGroup Lorentz(this,m_path+"SCT/GENERAL/lorentz",expert,run); // hidetoshi 14.01.21 - MonGroup Lorentz(this, m_path + "SCT/GENERAL/lorentz", run, ATTRIB_UNMANAGED); // hidetoshi 14.01.21 + MonGroup Lorentz(this, m_path + "SCT/GENERAL/lorentz", run, ATTRIB_UNMANAGED); string hNum[nLayers] = { "0", "1", "2", "3" @@ -386,23 +369,6 @@ SCTLorentzMonTool::bookLorentzHistos() { if (success == 0) { return StatusCode::FAILURE; } - // } - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // // - // hidetoshi 14.01.22 return StatusCode::SUCCESS; } @@ -413,9 +379,7 @@ SCTLorentzMonTool::pFactory(const std::string &name, const std::string &title, i bool success(registry.regHist(tmp).isSuccess()); if (not success) { - if (msgLvl(MSG::ERROR)) { - msg(MSG::ERROR) << "Cannot book SCT histogram: " << name << endmsg; - } + ATH_MSG_ERROR("Cannot book SCT histogram: " << name); iflag = 0; }else { iflag = 1; @@ -433,9 +397,7 @@ SCTLorentzMonTool::h1Factory(const std::string &name, const std::string &title, bool success(registry.regHist(tmp).isSuccess()); if (not success) { - if (msgLvl(MSG::ERROR)) { - msg(MSG::ERROR) << "Cannot book SCT histogram: " << name << endmsg; - } + ATH_MSG_ERROR("Cannot book SCT histogram: " << name); } storageVector.push_back(tmp); return success; @@ -454,9 +416,8 @@ SCTLorentzMonTool::findAnglesToWaferSurface(const float (&vec)[3], const float & const IdentifierHash waferHash = m_pSCTHelper->wafer_hash(waferId); const InDetDD::SiDetectorElement *element = elements->getDetectorElement(waferHash); if (!element) { - MsgStream log(msgSvc(), name()); - log << MSG::ERROR << "findAnglesToWaferSurface: failed to find detector element for id=" << - m_pSCTHelper->show_to_string(id) << endmsg; + ATH_MSG_ERROR("findAnglesToWaferSurface: failed to find detector element for id=" << + m_pSCTHelper->show_to_string(id)); return iflag; } diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTMotherTrigMonTool.cxx b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTMotherTrigMonTool.cxx old mode 100755 new mode 100644 index e831cf4694673a0ca6bf3db8138a3ba11f15652b..b935037b7828667be53b6f783bef387ac235f7a3 --- a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTMotherTrigMonTool.cxx +++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTMotherTrigMonTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /** @file SCTMotherTrigMonTool.cxx @@ -12,8 +12,6 @@ // Framework #include "GaudiKernel/IInterface.h" #include "GaudiKernel/StatusCode.h" -#include "EventInfo/EventInfo.h" -#include "EventInfo/TriggerInfo.h" #include "StoreGate/ReadHandle.h" #include "TrigDecisionInterface/ITrigDecisionTool.h" @@ -25,15 +23,14 @@ SCTMotherTrigMonTool::SCTMotherTrigMonTool(const std::string &type, const std::s : ManagedMonitorToolBase(type, name, parent), m_doTrigger(true), m_isStream(false), - m_firedTriggers(0), - m_eventInfoKey(std::string("ByteStreamEventInfo")) { + m_firedTriggers(0) { declareProperty("doTrigger", m_doTrigger); } StatusCode SCTMotherTrigMonTool::initialize() { if (ManagedMonitorToolBase::initialize().isFailure()) { - msg(MSG::ERROR) << "Could not initialize Monitor tool base!" << endmsg; + ATH_MSG_ERROR("Could not initialize Monitor tool base!"); return StatusCode::FAILURE; } @@ -45,9 +42,9 @@ SCTMotherTrigMonTool::initialize() { // --------------------------------------------------------- StatusCode SCTMotherTrigMonTool::checkTriggers() { - SG::ReadHandle<EventInfo> evtInfo(m_eventInfoKey); + SG::ReadHandle<xAOD::EventInfo> evtInfo(m_eventInfoKey); if (evtInfo.isValid()) { - m_firedTriggers = evtInfo->trigger_info()->level1TriggerType(); + m_firedTriggers = evtInfo->level1TriggerType(); return StatusCode::SUCCESS; } @@ -76,15 +73,15 @@ SCTMotherTrigMonTool::isCalibrationNoise(const std::string &L1_Item) { bool SCTMotherTrigMonTool::isStream(const std::string &StreamName) { - SG::ReadHandle<EventInfo> evtInfo(m_eventInfoKey); + SG::ReadHandle<xAOD::EventInfo> evtInfo(m_eventInfoKey); if (evtInfo.isValid()) { m_isStream = false; - for (unsigned int i = 0; i < evtInfo->trigger_info()->streamTags().size(); ++i) { - ATH_MSG_DEBUG(" i " << i << " Stream-Name " << evtInfo->trigger_info()->streamTags()[i].name() - << " type " << evtInfo->trigger_info()->streamTags()[i].type()); + for (unsigned int i = 0; i < evtInfo->streamTags().size(); ++i) { + ATH_MSG_DEBUG(" i " << i << " Stream-Name " << evtInfo->streamTags()[i].name() + << " type " << evtInfo->streamTags()[i].type()); - if (evtInfo->trigger_info()->streamTags()[i].name().find(StreamName) != std::string::npos) { + if (evtInfo->streamTags()[i].name().find(StreamName) != std::string::npos) { m_isStream = true; } } diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTRatioNoiseMonTool.cxx b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTRatioNoiseMonTool.cxx old mode 100755 new mode 100644 index 7cc6669cdaa563ae9eb4cf83af343b7b53329d4a..778dc20c4bc13cd22a811df912cdb5edc55835a6 --- a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTRatioNoiseMonTool.cxx +++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTRatioNoiseMonTool.cxx @@ -8,7 +8,6 @@ * */ #include "SCT_Monitoring/SCTRatioNoiseMonTool.h" -#include "deletePointers.h" #include "SCT_NameFormatter.h" #include <cmath> @@ -277,7 +276,7 @@ SCTRatioNoiseMonTool::bookHistogramsRecurrent() { } // Booking Track related Histograms if (bookRatioNoiseHistos().isFailure()) { - msg(MSG::WARNING) << "Error in bookRatioNoiseHistos()" << endmsg; + ATH_MSG_WARNING("Error in bookRatioNoiseHistos()"); } return StatusCode::SUCCESS; } @@ -299,7 +298,7 @@ SCTRatioNoiseMonTool::bookHistograms() { } // Booking Track related Histograms if (bookRatioNoiseHistos().isFailure()) { - msg(MSG::WARNING) << "Error in bookRatioNoiseHistos()" << endmsg; + ATH_MSG_WARNING("Error in bookRatioNoiseHistos()"); } return StatusCode::SUCCESS; @@ -800,9 +799,7 @@ SCTRatioNoiseMonTool::procHistograms() { m_NOECCSide->SetBinContent(m_NOECCSide->GetNbinsX(), m_NOECCSide->GetBinContent( m_NOECCSide->GetNbinsX()) + m_NOECCSide->GetBinContent(m_NOECCSide->GetNbinsX() + 1)); - if (msgLvl(MSG::DEBUG)) { - msg(MSG::DEBUG) << "Total Rec Event Number: " << m_numberOfEvents << endmsg; - } + ATH_MSG_DEBUG("Total Rec Event Number: " << m_numberOfEvents); return StatusCode::SUCCESS; } @@ -830,10 +827,10 @@ SCTRatioNoiseMonTool::checkHists(bool /*fromFinalize*/) { // SCTRatioNoiseMonTool :: bookRatioNoiseHistos // ==================================================================================================== StatusCode -SCTRatioNoiseMonTool::bookRatioNoiseHistos() { // hidetoshi 14.01.22 - if (newRunFlag()) { // hidetoshi 14.01.22 +SCTRatioNoiseMonTool::bookRatioNoiseHistos() { + if (newRunFlag()) { string stem = m_path + "/SCT/GENERAL/RatioNoise/"; - MonGroup RatioNoise(this, m_path + "SCT/GENERAL/RatioNoise", run, ATTRIB_UNMANAGED); // hidetoshi 14.01.22 + MonGroup RatioNoise(this, m_path + "SCT/GENERAL/RatioNoise", run, ATTRIB_UNMANAGED); string hNumBarrel[N_BARRELS] = { "0", "1", "2", "3" @@ -1090,7 +1087,7 @@ SCTRatioNoiseMonTool::pFactory(const std::string &name, const std::string &title bool success(registry.regHist(tmp).isSuccess()); if (not success) { - msg(MSG::WARNING) << "Cannot book SCT histogram: " << name << endmsg; + ATH_MSG_WARNING("Cannot book SCT histogram: " << name); } return success ? tmp : NULL; } @@ -1102,7 +1099,7 @@ SCTRatioNoiseMonTool::h1Factory(const std::string &name, const std::string &titl bool success(registry.regHist(tmp).isSuccess()); if (not success) { - msg(MSG::WARNING) << "Cannot book SCT histogram: " << name << endmsg; + ATH_MSG_WARNING("Cannot book SCT histogram: " << name); } return success ? tmp : NULL; } @@ -1115,7 +1112,7 @@ SCTRatioNoiseMonTool::h2Factory(const std::string &name, const std::string &titl bool success(registry.regHist(tmp).isSuccess()); if (not success) { - msg(MSG::WARNING) << "Cannot book SCT histogram: " << name << endmsg; + ATH_MSG_WARNING("Cannot book SCT histogram: " << name); } return success ? tmp : NULL; } @@ -1127,7 +1124,7 @@ SCTRatioNoiseMonTool::h1Factory(const std::string &name, const std::string &titl bool success(registry.regHist(tmp).isSuccess()); if (not success) { - msg(MSG::WARNING) << "Cannot book SCT histogram: " << name << endmsg; + ATH_MSG_WARNING("Cannot book SCT histogram: " << name); } storageVector.push_back(tmp); return success ? tmp : NULL; @@ -1153,7 +1150,7 @@ SCTRatioNoiseMonTool::prof2Factory(const std::string &name, const std::string &t tmp->SetYTitle("Index in the direction of #phi"); bool success(registry.regHist(tmp).isSuccess()); if (not success) { - msg(MSG::WARNING) << "Cannot book SCT histogram: " << name << endmsg; + ATH_MSG_WARNING("Cannot book SCT histogram: " << name); } storageVector.push_back(tmp); return success ? tmp : NULL; diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTSummaryMonTool.cxx b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTSummaryMonTool.cxx old mode 100755 new mode 100644 diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTTracksMonTool.cxx b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTTracksMonTool.cxx index 9d281448370713649c446eba41ea7f8d08e00988..69914f5e1c3e0a1955e49dd4ca8eef351f4400d8 100644 --- a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTTracksMonTool.cxx +++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTTracksMonTool.cxx @@ -8,7 +8,6 @@ * Also uses code from InDet::SCT_ResidualPullCalculator */ #include "SCT_Monitoring/SCTTracksMonTool.h" -#include "deletePointers.h" #include "SCT_NameFormatter.h" #include <cmath> #include "AthenaKernel/errorcheck.h" @@ -153,24 +152,19 @@ StatusCode SCTTracksMonTool::initialize() { // ==================================================================================================== // SCTTracksMonTool :: bookHistograms // ==================================================================================================== -// StatusCode SCTTracksMonTool::bookHistograms( bool /*isNewEventsBlock*/, bool isNewLumiBlock, bool isNewRun ) // -// hidetoshi 14.01.21 StatusCode -SCTTracksMonTool::bookHistogramsRecurrent() { // hidetoshi - // 14.01.21 +SCTTracksMonTool::bookHistogramsRecurrent() { ATH_MSG_DEBUG("SCTTracksMonTool::bookHistograms"); m_path = (m_useIDGlobal) ? ("/InDetGlobal/") : (""); if (newRunFlag()) { - m_numberOfEvents = 0; // hidetoshi - // 14.01.21 + m_numberOfEvents = 0; } CHECK(detStore()->retrieve(m_pSCTHelper, "SCT_ID")); if (m_doUnbiasedCalc) { CHECK(m_updator.retrieve()); } // Booking Track related Histograms - CHECK(bookGeneralHistos()); // hidetoshi - // 14.01.21 + CHECK(bookGeneralHistos()); const bool doThisSubsystem[N_REGIONS] = { m_doNegativeEndcap, true, m_doPositiveEndcap }; @@ -178,8 +172,7 @@ SCTTracksMonTool::bookHistogramsRecurrent() { "endcap C", "barrel", "endcap A" }; for (unsigned int sys(0); sys != N_REGIONS; ++sys) { - if (doThisSubsystem[sys] and bookTrackHistos(index2Bec(sys)).isFailure()) { // hidetoshi - // 14.01.22 + if (doThisSubsystem[sys] and bookTrackHistos(index2Bec(sys)).isFailure()) { ATH_MSG_WARNING("Error in booking track histograms for " << names[sys]); } } @@ -190,24 +183,19 @@ SCTTracksMonTool::bookHistogramsRecurrent() { // ==================================================================================================== // SCTTracksMonTool :: bookHistograms // ==================================================================================================== -// StatusCode SCTTracksMonTool::bookHistograms( bool /*isNewEventsBlock*/, bool isNewLumiBlock, bool isNewRun ) // -// hidetoshi 14.01.21 StatusCode -SCTTracksMonTool::bookHistograms() { // hidetoshi - // 14.01.21 +SCTTracksMonTool::bookHistograms() { ATH_MSG_DEBUG("SCTTracksMonTool::bookHistograms"); m_path = (m_useIDGlobal) ? ("/InDetGlobal/") : (""); if (newRunFlag()) { - m_numberOfEvents = 0; // hidetoshi - // 14.11.27 + m_numberOfEvents = 0; } CHECK(detStore()->retrieve(m_pSCTHelper, "SCT_ID")); if (m_doUnbiasedCalc) { CHECK(m_updator.retrieve()); } // Booking Track related Histograms - CHECK(bookGeneralHistos()); // hidetoshi - // 14.01.21 + CHECK(bookGeneralHistos()); const bool doThisSubsystem[N_REGIONS] = { m_doNegativeEndcap, true, m_doPositiveEndcap }; @@ -215,8 +203,7 @@ SCTTracksMonTool::bookHistograms() { "endcap C", "barrel", "endcap A" }; for (unsigned int sys(0); sys != N_REGIONS; ++sys) { - if (doThisSubsystem[sys] and bookTrackHistos(index2Bec(sys)).isFailure()) { // hidetoshi - // 14.01.22 + if (doThisSubsystem[sys] and bookTrackHistos(index2Bec(sys)).isFailure()) { ATH_MSG_WARNING("Error in booking track histograms for " << names[sys]); } } @@ -241,7 +228,7 @@ SCTTracksMonTool::fillHistograms() { m_psctresiduals_summaryHistoVector[n]->GetXaxis()->SetTitle("Residuals [mm]"); m_psctpulls_summaryHistoVector[n]->GetXaxis()->SetTitle("Pull"); } - if (m_environment != AthenaMonManager::online) { // 27.11.2014 + if (m_environment != AthenaMonManager::online) { for (int mm = 0; mm < N_DISKSx2; mm++) { m_psctresidualsHistoVectorECm[mm]->GetXaxis()->SetTitle("Index in the direction of #eta"); m_psctresidualsHistoVectorECm[mm]->GetYaxis()->SetTitle("Index in the direction of #phi"); @@ -358,13 +345,13 @@ SCTTracksMonTool::fillHistograms() { VecProf2_t *pullsHistogramArray[3]; Prof2_t residualsHistogram(0); Prof2_t pullsHistogram(0); - if (m_environment != AthenaMonManager::online) { // 27.11.2014 + if (m_environment != AthenaMonManager::online) { residualsHistogramArray[0] = &m_psctresidualsHistoVectorECm; residualsHistogramArray[1] = &m_psctresidualsHistoVector; residualsHistogramArray[2] = &m_psctresidualsHistoVectorECp; pullsHistogramArray[0] = &m_psctpullsHistoVectorECm; pullsHistogramArray[1] = &m_psctpullsHistoVector; - pullsHistogramArray[2] = &m_psctpullsHistoVectorECp;// 27.11.2014 + pullsHistogramArray[2] = &m_psctpullsHistoVectorECp; } VecH1_t *residualsSummaryHistogramArray[3] = { @@ -435,16 +422,16 @@ SCTTracksMonTool::fillHistograms() { if (doThisDetector) { residualsSummaryHistogram = (*residualsSummaryHistogramArray[subsystemIndex])[element]; pullsSummaryHistogram = (*pullsSummaryHistogramArray[subsystemIndex])[element]; - if (m_environment != AthenaMonManager::online) { // 27.11.2014 - residualsHistogram = (*residualsHistogramArray[subsystemIndex])[element]; // 27.11.2014 - pullsHistogram = (*pullsHistogramArray[subsystemIndex])[element];// 27.11.2014 + if (m_environment != AthenaMonManager::online) { + residualsHistogram = (*residualsHistogramArray[subsystemIndex])[element]; + pullsHistogram = (*pullsHistogramArray[subsystemIndex])[element]; if (residualsHistogram) { residualsHistogram->Fill(eta, phi, local_residual); } if (bigPull and pullsHistogram) { pullsHistogram->Fill(eta, phi, local_pull); } - } // 27.11.2014 + } if (residualsSummaryHistogram) { residualsSummaryHistogram->Fill(local_residual, 1.); } @@ -484,11 +471,10 @@ SCTTracksMonTool::fillHistograms() { if (doThisDetector){ residualsSummaryHistogram = (*residualsSummaryHistogramArray[subsystemIndex])[element]; - if(m_environment != AthenaMonManager::online){ // 27.11.2014 + if(m_environment != AthenaMonManager::online){ residualsHistogram = (*residualsHistogramArray[subsystemIndex])[element]; - //27.11.2014 if (residualsHistogram) residualsHistogram->Fill(eta, phi, local_residual); - } //27.11.2014 + } if (residualsSummaryHistogram) residualsSummaryHistogram->Fill(local_residual, 1.); if(bec == 0) m_totalBarrelResidual->Fill(local_residual, 1.); @@ -507,12 +493,12 @@ SCTTracksMonTool::fillHistograms() { + (LocalTrackParameters[Trk::locY] - clus->localParameters()[Trk::locY]) * sinAlpha); residualsSummaryHistogram = (bec == BARREL) ? 0 : +(*residualsSummaryHistogramArray[subsystemIndex])[element]; - if(m_environment != AthenaMonManager::online){ // 27.11.2014 + if(m_environment != AthenaMonManager::online){ residualsHistogram = (bec == BARREL) ? 0 : +(*residualsHistogramArray[subsystemIndex])[layer];//!!! this is 'layer' in - +the original code, others are elements //27.11.2014 + +the original code, others are elements if (residualsHistogram) residualsHistogram->Fill(eta, phi, local_residual); - } //27.11.2014 + } if (residualsSummaryHistogram) residualsSummaryHistogram->Fill(local_residual, +1.); if(bec == 0) m_totalBarrelResidual->Fill(local_residual, 1.); @@ -545,7 +531,7 @@ SCTTracksMonTool::fillHistograms() { m_trk_N->Fill(goodTrks_N); m_trk_nclu_totHisto->Fill(local_tot_trkhits, 1.); if (m_environment == AthenaMonManager::online) { - if (m_numberOfEvents == 1 || (m_numberOfEvents > 1 && m_numberOfEvents % m_checkrate == 0)) {// 30.11.2014 + if (m_numberOfEvents == 1 || (m_numberOfEvents > 1 && m_numberOfEvents % m_checkrate == 0)) { ATH_MSG_DEBUG("Calling checkHists(false); false := during run"); if (checkHists(false).isFailure()) { ATH_MSG_WARNING("Error in checkHists(false)"); @@ -589,12 +575,8 @@ SCTTracksMonTool::fillHistograms() { // SCTTracksMonTool :: procHistograms // ==================================================================================================== StatusCode -SCTTracksMonTool::procHistograms() { // hidetoshi - // 14.01.21 - if (endOfRunFlag()) { // - // - // hidetoshi - // 14.01.21 +SCTTracksMonTool::procHistograms() { + if (endOfRunFlag()) { ATH_MSG_DEBUG("SCTTracksMonTool::procHistograms"); ATH_MSG_DEBUG("Total Rec Event Number: " << m_numberOfEvents); ATH_MSG_DEBUG("Calling checkHists(true); true := end of run"); @@ -633,7 +615,7 @@ SCTTracksMonTool::checkHists(bool /*fromFinalize*/) { const int negativeEndCap(0); - if (m_environment != AthenaMonManager::online) { // 27.11.2014 + if (m_environment != AthenaMonManager::online) { const VecProf2_t *residuals[3] = { &m_psctresidualsHistoVectorECm, &m_psctresidualsHistoVector, &m_psctresidualsHistoVectorECp }; @@ -642,10 +624,10 @@ SCTTracksMonTool::checkHists(bool /*fromFinalize*/) { }; const VecH2_t *pullsRms[3] = { &m_psctpullsRMSHistoVectorECm, &m_psctpullsRMSHistoVector, &m_psctpullsRMSHistoVectorECp - };// 27.11.2014 + }; const VecH2_t *residualsRms[3] = { &m_psctresidualsRMSHistoVectorECm, &m_psctresidualsRMSHistoVector, &m_psctresidualsRMSHistoVectorECp - };// 27.11.2014 + }; for (int thisDetector(negativeEndCap); thisDetector != N_REGIONS; ++thisDetector) { if (doDetector[thisDetector]) { @@ -669,7 +651,7 @@ SCTTracksMonTool::checkHists(bool /*fromFinalize*/) { } } // (*residualsRms[0])[0]->GetXaxis()->SetTitle("Index in the direction of #eta"); - } // 27.11.2014 + } // Now checking RMS and Means of Pulls 1D Histos TF1 pullgaus("pullgaus", "gaus"); pullgaus.SetParameter(1, 0.); @@ -734,15 +716,11 @@ SCTTracksMonTool::calculatePull(const float residual, const float trkErr, const // ==================================================================================================== // SCTTracksMonTool :: bookGeneralHistos // ==================================================================================================== -// StatusCode SCTTracksMonTool::bookGeneralHistos(bool isNewRun,bool /*isNewLumiBlock*/){ // hidetoshi 14.01.22 StatusCode -SCTTracksMonTool::bookGeneralHistos() { // hidetoshi 14.01.22 - // if(isNewRun){ // hidetoshi 14.01.22 - if (newRunFlag()) { // hidetoshi 14.11.27 +SCTTracksMonTool::bookGeneralHistos() { + if (newRunFlag()) { string stem(m_path + "/SCT/GENERAL/tracks/"); - // MonGroup Tracks(this,m_path+"SCT/GENERAL/tracks",expert,run); // hidetoshi 14.01.21 - MonGroup Tracks(this, m_path + "SCT/GENERAL/tracks", run, ATTRIB_UNMANAGED); // hidetoshi 14.01.21 - // MonGroup TracksPerLB(this,m_path+"SCT/GENERAL/tracks",expert,lumiBlock); + MonGroup Tracks(this, m_path + "SCT/GENERAL/tracks", run, ATTRIB_UNMANAGED); // Book histogram of number of tracks per region m_tracksPerRegion = new TH1F("tracksPerRegion", "Number of tracks in eta regions", 3, 0, 3); @@ -834,7 +812,6 @@ SCTTracksMonTool::bookGeneralHistos() { / m_trk_eta->GetXaxis()->SetTitle("#eta"); CHECK(Tracks.regHist(m_trk_eta)); - // m_psctresidualsRMSHistoVector[0]->GetXaxis()->SetTitle("Index in the direction of #eta"); test if (m_environment == AthenaMonManager::online) { m_nTracks = new TH1I("sct_tracks_vs_en", "Number of Tracks vs Event Number", m_evtsbins, 1, m_evtsbins + 1); m_nTracks->GetXaxis()->SetTitle("Event Number"); @@ -845,18 +822,14 @@ SCTTracksMonTool::bookGeneralHistos() { / m_nTracks_pos = 0; CHECK(Tracks.regHist(m_nTracks)); } - } // hidetoshi 14.01.22 + } return StatusCode::SUCCESS; } -// StatusCode SCTTracksMonTool::bookTrackHistos(const bool isNewRun, const SCT_Monitoring::Bec becVal){ // hidetoshi -// 14.01.22 StatusCode -SCTTracksMonTool::bookTrackHistos(const SCT_Monitoring::Bec becVal) { // hidetoshi 14.01.22 - // if(not isNewRun) return StatusCode::SUCCESS; // hidetoshi - // 14.01.22 +SCTTracksMonTool::bookTrackHistos(const SCT_Monitoring::Bec becVal) { if (not newRunFlag()) { - return StatusCode::SUCCESS; // hidetoshi 14.11.27 + return StatusCode::SUCCESS; } const string pathDelimiter("/"); const string streamDelimiter("_"); @@ -871,10 +844,10 @@ SCTTracksMonTool::bookTrackHistos(const SCT_Monitoring::Bec becVal) { }; const string localPathsResi[N_REGIONS] = { "SCT/SCTEC/tracks", "SCT/SCTB/tracks", "SCT/SCTEA/tracks" - };// 07.01.2015 + }; const string localPathsPull[N_REGIONS] = { "SCT/SCTEC/tracks", "SCT/SCTB/tracks", "SCT/SCTEA/tracks" - };// 07.01.2015 + }; const unsigned int limits[N_REGIONS] = { N_DISKSx2, N_BARRELSx2, N_DISKSx2 }; @@ -896,17 +869,16 @@ SCTTracksMonTool::bookTrackHistos(const SCT_Monitoring::Bec becVal) { const unsigned int limit(limits[systemIndex]); VecH1_t *p_residualsSummary(residualsSummaryArray[systemIndex]), *p_pullsSummary(pullsSummaryArray[systemIndex]); - // MonGroup endCapTracks(this, m_path+localPath, expert, run); // hidetoshi 14.01.21 - MonGroup endCapTracks(this, m_path + localPath, run, ATTRIB_UNMANAGED); // hidetoshi 14.01.21 - MonGroup endCapTracksResi(this, m_path + localPathResi, run, ATTRIB_UNMANAGED);// 07.01.2015 - MonGroup endCapTracksPull(this, m_path + localPathPull, run, ATTRIB_UNMANAGED);// 07.01.2015 + MonGroup endCapTracks(this, m_path + localPath, run, ATTRIB_UNMANAGED); + MonGroup endCapTracksResi(this, m_path + localPathResi, run, ATTRIB_UNMANAGED); + MonGroup endCapTracksPull(this, m_path + localPathPull, run, ATTRIB_UNMANAGED); p_residualsSummary->clear(); p_pullsSummary->clear(); string stem(m_stream + pathDelimiter + localPath + pathDelimiter); for (unsigned int i(0); i != limit; ++i) { - LayerSideFormatter layerSide(i, systemIndex);// 30.11.2014 + LayerSideFormatter layerSide(i, systemIndex); string streamResidual(string("residuals") + abbreviation + streamDelimiter + layerSide.name()); string streamPull(string("pulls") + abbreviation + streamDelimiter + layerSide.name()); string titleResidual(string("SCT Residuals for ") + polarityString + ": " + layerSide.title()); @@ -917,8 +889,7 @@ SCTTracksMonTool::bookTrackHistos(const SCT_Monitoring::Bec becVal) { } - if (m_environment != AthenaMonManager::online) { // 27.11.2014 - // if(1){//27.11 + if (m_environment != AthenaMonManager::online) { VecProf2_t *residualsArray[] = { &m_psctresidualsHistoVectorECm, &m_psctresidualsHistoVector, &m_psctresidualsHistoVectorECp }; @@ -952,7 +923,7 @@ SCTTracksMonTool::bookTrackHistos(const SCT_Monitoring::Bec becVal) { CHECK(p2Factory(streamResidual, titleResidual, becVal, endCapTracksResi, *p_residuals)); CHECK(p2Factory(streamPull, titlePull, becVal, endCapTracksPull, *p_pulls)); - } // 27.11.2014 + } for (unsigned int i(0); i != limit; ++i) { LayerSideFormatter layerSide(i, systemIndex); @@ -966,7 +937,7 @@ SCTTracksMonTool::bookTrackHistos(const SCT_Monitoring::Bec becVal) { CHECK(h2Factory(streamResidual, titleResidual, becVal, endCapTracksResi, *p_residualsRms)); CHECK(h2Factory(streamPull, titlePull, becVal, endCapTracksPull, *p_pullsRms)); } - } // 27.11.2014 + } return StatusCode::SUCCESS; } diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCT_NameFormatter.h b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCT_NameFormatter.h index 8cab566b35e8ef8bbdaf1b46f82692f722c96038..498959900e5d37bec8e2e69bda75572910f36f0e 100644 --- a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCT_NameFormatter.h +++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCT_NameFormatter.h @@ -20,7 +20,7 @@ private: const unsigned int m_element; const std::string m_layerStr; const std::string m_sideStr; - unsigned int m_region;// 30.11.2014 + unsigned int m_region; public: LayerSideFormatter(const unsigned int i) : m_element(i), m_layerStr(std::to_string(i / 2)), m_sideStr(std::to_string( i % 2)), @@ -29,7 +29,7 @@ public: } LayerSideFormatter(const unsigned int i, const unsigned int m) : m_element(i), m_layerStr(std::to_string(i / 2)), - m_sideStr(std::to_string(i % 2)), m_region(m) {// 30.11.2014 + m_sideStr(std::to_string(i % 2)), m_region(m) { // nop } diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/deletePointers.h b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/deletePointers.h deleted file mode 100644 index eba2e1356f324a8851518efcdaf4c2293a221c3b..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/deletePointers.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/** - * @file deletePointers.h - * @author Shaun Roe - * @date 1/09/2009 - * Header file for declaration and definition of templated functions to - * delete a pointer and a container of pointers. - * The template may be further specialized to delete a map of pointers (not done here) - * - **/ -#ifndef SCTMonitoring_deletePointers_h -#define SCTMonitoring_deletePointers_h -#include <algorithm> -namespace SCT_Monitoring { -///Delete a pointer and set it to zero. Suitable for use in a 'std::for_each' algorithm -// @todo check the type is really a pointer - template <class PointerType> - void - deletePointer(PointerType &p) { - delete p; - p = 0; - } - -///Delete a container of pointers and then clear it - template<class C> - void - deletePtrArray(C &container) { - std::for_each(container.begin(), container.end(), deletePointer<typename C::value_type>); - - container.clear(); - } -}// end of namespace - -#endif \ No newline at end of file diff --git a/InnerDetector/InDetMonitoring/TRT_Monitoring/CMakeLists.txt b/InnerDetector/InDetMonitoring/TRT_Monitoring/CMakeLists.txt index 2a00f918142fac684220d6fb1eb14012fce695b1..089e390212a8c4c83eab515cf6aaf04716d13836 100644 --- a/InnerDetector/InDetMonitoring/TRT_Monitoring/CMakeLists.txt +++ b/InnerDetector/InDetMonitoring/TRT_Monitoring/CMakeLists.txt @@ -18,7 +18,6 @@ atlas_depends_on_subdirs( PUBLIC Control/AthContainers DetectorDescription/AtlasDetDescr DetectorDescription/Identifier - Event/EventInfo Event/EventPrimitives Event/xAOD/xAODEventInfo Event/xAOD/xAODTrigger @@ -43,7 +42,7 @@ atlas_add_component( TRT_Monitoring src/*.cxx src/components/*.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} AthenaMonitoringLib GaudiKernel InDetRawData LumiBlockCompsLib CommissionEvent AthContainers AtlasDetDescr Identifier xAODEventInfo xAODTrigger EventInfo EventPrimitives TRT_ConditionsServicesLib InDetIdentifier InDetReadoutGeometry InDetRIO_OnTrack LWHists TrkTrack TrkTrackSummary TrkToolInterfaces ) + LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} AthenaMonitoringLib GaudiKernel InDetRawData LumiBlockCompsLib CommissionEvent AthContainers AtlasDetDescr Identifier xAODEventInfo xAODTrigger EventPrimitives TRT_ConditionsServicesLib InDetIdentifier InDetReadoutGeometry InDetRIO_OnTrack LWHists TrkTrack TrkTrackSummary TrkToolInterfaces ) # Install files from the package: atlas_install_headers( TRT_Monitoring ) diff --git a/InnerDetector/InDetMonitoring/TRT_Monitoring/TRT_Monitoring/TRT_Monitoring_Tool.h b/InnerDetector/InDetMonitoring/TRT_Monitoring/TRT_Monitoring/TRT_Monitoring_Tool.h index 905d285c7524f28fe5c4c141e36ba67a78381fe9..b52230686c726aad22d4ac6f7fc570e3d88f6d93 100644 --- a/InnerDetector/InDetMonitoring/TRT_Monitoring/TRT_Monitoring/TRT_Monitoring_Tool.h +++ b/InnerDetector/InDetMonitoring/TRT_Monitoring/TRT_Monitoring/TRT_Monitoring_Tool.h @@ -1,6 +1,6 @@ // -*- c++ -*- /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef TRT_MONITORING_TOOL_H @@ -12,7 +12,6 @@ // Data handles #include "StoreGate/ReadHandleKey.h" #include "TrkTrack/TrackCollection.h" -#include "EventInfo/EventInfo.h" #include "CommissionEvent/ComTime.h" #include "xAODTrigger/TrigDecision.h" #include "xAODEventInfo/EventInfo.h" @@ -158,7 +157,6 @@ private: SG::ReadHandleKey<TrackCollection> m_trackCollectionKey{this, "TRTTracksObjectName", "Tracks", "Name of tracks container"}; // NOTE: this property is not used anywhere, is it ok to change its name? SG::ReadHandleKey<TrackCollection> m_combTrackCollectionKey{this, "track_collection_hole_finder", "CombinedInDetTracks", "Name of tracks container used for hole finder"}; - SG::ReadHandleKey<EventInfo> m_eventInfoKey{this, "EventInfo", "ByteStreamEventInfo", "Name of EventInfo object"}; SG::ReadHandleKey<xAOD::EventInfo> m_xAODEventInfoKey{this, "xAODEventInfo", "EventInfo", "Name of EventInfo object"}; SG::ReadHandleKey<InDetTimeCollection> m_TRT_BCIDCollectionKey{this, "TRTBCIDCollectionName", "TRT_BCID", "Name of TRT BCID collection"}; SG::ReadHandleKey<ComTime> m_comTimeObjectKey{this, "ComTimeObjectName", "TRT_Phase", "Name of ComTime object"}; diff --git a/InnerDetector/InDetMonitoring/TRT_Monitoring/src/TRT_Monitoring_Tool.cxx b/InnerDetector/InDetMonitoring/TRT_Monitoring/src/TRT_Monitoring_Tool.cxx index b54aad98739063dcf72dd9b9f9c400d0235d600f..e0a57db301f6e6fab56c9f3d245a3feff556bffa 100644 --- a/InnerDetector/InDetMonitoring/TRT_Monitoring/src/TRT_Monitoring_Tool.cxx +++ b/InnerDetector/InDetMonitoring/TRT_Monitoring/src/TRT_Monitoring_Tool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "TRT_Monitoring/TRT_Monitoring_Tool.h" @@ -21,8 +21,6 @@ #include "TRT_ConditionsServices/ITRT_ByteStream_ConditionsSvc.h" #include "TRT_ConditionsServices/ITRT_StrawNeighbourSvc.h" #include "InDetConditionsSummaryService/IInDetConditionsSvc.h" -#include "EventInfo/TriggerInfo.h" -#include "EventInfo/EventID.h" #include "xAODTrigger/TrigDecision.h" #include "EventPrimitives/EventPrimitivesHelpers.h" @@ -609,7 +607,6 @@ StatusCode TRT_Monitoring_Tool::initialize() { ATH_CHECK( m_rdoContainerKey.initialize() ); ATH_CHECK( m_trackCollectionKey.initialize() ); ATH_CHECK( m_combTrackCollectionKey.initialize() ); - ATH_CHECK( m_eventInfoKey.initialize() ); ATH_CHECK( m_xAODEventInfoKey.initialize() ); ATH_CHECK( m_TRT_BCIDCollectionKey.initialize() ); ATH_CHECK( m_comTimeObjectKey.initialize() ); diff --git a/InnerDetector/InDetPerformance/SCTExtension/SCTExtension/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetPerformance/SCTExtension/SCTExtension/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..6399682e7e37b1aa29d152fbddc23b755823109a --- /dev/null +++ b/InnerDetector/InDetPerformance/SCTExtension/SCTExtension/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +InnerDetector/InDetPerformance/SCTExtension diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/CMakeLists.txt b/InnerDetector/InDetRawAlgs/InDetOverlay/CMakeLists.txt index 7282308268c7020d5402f74199a6621ecb278b57..1a7443086f9a8989f0f13d0306d3a18785ce6f42 100644 --- a/InnerDetector/InDetRawAlgs/InDetOverlay/CMakeLists.txt +++ b/InnerDetector/InDetRawAlgs/InDetOverlay/CMakeLists.txt @@ -13,23 +13,46 @@ atlas_depends_on_subdirs( PUBLIC InnerDetector/InDetRawEvent/InDetRawData PRIVATE Control/StoreGate - Control/CxxUtils + DetectorDescription/IdDictParser Generators/GeneratorObjects InnerDetector/InDetDetDescr/InDetIdentifier - InnerDetector/InDetRawEvent/InDetSimData + InnerDetector/InDetRawEvent/InDetSimData InnerDetector/InDetRecTools/TRT_ElectronPidTools Tracking/TrkEvent/TrkTrack ) +#External dependencies: find_package( CLHEP ) +find_package( GTest ) + +# Helper variable(s): +set( _jobOPath + "${CMAKE_CURRENT_SOURCE_DIR}/share:${CMAKE_JOBOPT_OUTPUT_DIRECTORY}" ) +set( _jobOPath "${_jobOPath}:$ENV{JOBOPTSEARCHPATH}" ) + +# Unit Tests +atlas_add_test( PixelOverlay_test + SOURCES src/PixelOverlay.cxx test/PixelOverlay_test.cxx + INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} ${GTEST_INCLUDE_DIRS} + LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaBaseComps IDC_OverlayBase GaudiKernel InDetRawData StoreGateLib SGtests GeneratorObjects InDetIdentifier InDetSimData TrkTrack ${GTEST_LIBRARIES} + EXTRA_PATTERNS "[0-9]+ ms") + +atlas_add_test( SCTOverlay_test + SOURCES src/SCTOverlay.cxx test/SCTOverlay_test.cxx + INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} ${GTEST_INCLUDE_DIRS} + LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaBaseComps IDC_OverlayBase GaudiKernel InDetRawData StoreGateLib SGtests GeneratorObjects InDetIdentifier InDetSimData TrkTrack IdDictParser ${GTEST_LIBRARIES} + EXTRA_PATTERNS "[0-9]+ ms" + ENVIRONMENT "JOBOPTSEARCHPATH=${_jobOPath}" ) + # Component(s) in the package: atlas_add_component( InDetOverlay src/*.cxx src/components/*.cxx - INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaBaseComps IDC_OverlayBase GaudiKernel InDetRawData StoreGateLib SGtests CxxUtils GeneratorObjects InDetIdentifier InDetSimData TrkTrack TRT_ConditionsServicesLib) + INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} + LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaBaseComps IDC_OverlayBase GaudiKernel InDetRawData StoreGateLib SGtests GeneratorObjects InDetIdentifier InDetSimData TrkTrack TRT_ConditionsServicesLib) # Install files from the package: atlas_install_headers( InDetOverlay ) atlas_install_python_modules( python/*.py ) +atlas_install_joboptions( share/StoreGateTestCommon.txt ) diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/InDetOverlay/PixelOverlay.h b/InnerDetector/InDetRawAlgs/InDetOverlay/InDetOverlay/PixelOverlay.h index 08a1d10d7d4416a795bc4a102ef7593db18ea721..3895a5f35ef8730f0cf675875acbcc532b9fad3a 100644 --- a/InnerDetector/InDetRawAlgs/InDetOverlay/InDetOverlay/PixelOverlay.h +++ b/InnerDetector/InDetRawAlgs/InDetOverlay/InDetOverlay/PixelOverlay.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef INDETOVERLAY_PIXELOVERLAY_H @@ -14,8 +14,8 @@ public: PixelOverlay(const std::string &name, ISvcLocator *pSvcLocator); - virtual StatusCode initialize(); - virtual StatusCode execute(); + virtual StatusCode initialize() override final; + virtual StatusCode execute() override final; private: SG::ReadHandleKey<PixelRDO_Container> m_bkgInputKey{ this, "BkgInputKey", "OriginalEvent_SG+PixelRDOs", "ReadHandleKey for Background Input PixelRDO_Container" }; diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/InDetOverlay/SCTOverlay.h b/InnerDetector/InDetRawAlgs/InDetOverlay/InDetOverlay/SCTOverlay.h index 936fa55261acf1a352fcaaebefa953e528de5f0a..cfe4b9a0e76c763f097f304737d50cdaadc42668 100644 --- a/InnerDetector/InDetRawAlgs/InDetOverlay/InDetOverlay/SCTOverlay.h +++ b/InnerDetector/InDetRawAlgs/InDetOverlay/InDetOverlay/SCTOverlay.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef INDETOVERLAY_SCTOVERLAY_H @@ -16,8 +16,8 @@ public: SCTOverlay(const std::string &name, ISvcLocator *pSvcLocator); - virtual StatusCode initialize(); - virtual StatusCode execute(); + virtual StatusCode initialize() override final; + virtual StatusCode execute() override final; // SCT collection merging needs an ID helper. Instead of retrieving // it thousands of times per event in the collection merging code, @@ -29,7 +29,7 @@ public: BkgSource=0, SignalSource=1, NumberOfSources=2}; private: - const SCT_ID *m_sctId; + const SCT_ID *m_sctId{}; SG::ReadHandleKey<SCT_RDO_Container> m_bkgInputKey{ this, "BkgInputKey", "OriginalEvent_SG+SCT_RDOs", "ReadHandleKey for Background Input SCT_RDO_Container" }; SG::ReadHandleKey<SCT_RDO_Container> m_signalInputKey{ this, "SignalInputKey", "BkgEvent_0_SG+SCT_RDOs", "ReadHandleKey for Signal Input SCT_RDO_Container" }; diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/InDetOverlay/TRTOverlay.h b/InnerDetector/InDetRawAlgs/InDetOverlay/InDetOverlay/TRTOverlay.h index 4bc4fba12cde89006cdc4a3b6c681638886c078f..22cdd04a59e571561211f2fa76ba924f2568de64 100644 --- a/InnerDetector/InDetRawAlgs/InDetOverlay/InDetOverlay/TRTOverlay.h +++ b/InnerDetector/InDetRawAlgs/InDetOverlay/InDetOverlay/TRTOverlay.h @@ -1,14 +1,14 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef INDETOVERLAY_TRTOVERLAY_H #define INDETOVERLAY_TRTOVERLAY_H -#include "IDC_OverlayBase/IDC_OverlayBase.h" -#include "InDetRawData/TRT_RDO_Container.h" +#include <AthenaBaseComps/AthAlgorithm.h> +#include <InDetRawData/TRT_RDO_Container.h> -#include "AthenaKernel/IAtRndmGenSvc.h" +#include "AthenaKernel/IAthRNGSvc.h" #include "GaudiKernel/ServiceHandle.h" #include "InDetSimData/InDetSimDataCollection.h" #include "TRT_ElectronPidTools/ITRT_LocalOccupancy.h" @@ -20,32 +20,30 @@ namespace CLHEP { class HepRandomEngine; } -typedef InDetRawDataCollection<TRT_RDORawData> TRT_RDO_Collection; - -class TRTOverlay : public IDC_OverlayBase +class TRTOverlay : public AthAlgorithm { public: - + TRTOverlay(const std::string &name, ISvcLocator *pSvcLocator); - virtual StatusCode initialize(); - virtual StatusCode execute(); + virtual StatusCode initialize() override final; + virtual StatusCode execute() override final; private: - void overlayTRTContainers(const TRT_RDO_Container *bkgContainer, - const TRT_RDO_Container *signalContainer, - TRT_RDO_Container *outputContainer, - std::map<int, double> &occupancyMap, - const InDetSimDataCollection &SDO_Map); + StatusCode overlayContainer(const TRT_RDO_Container *bkgContainer, + const TRT_RDO_Container *signalContainer, + TRT_RDO_Container *outputContainer, + const InDetSimDataCollection *signalSDOCollection); - void mergeTRTCollections(TRT_RDO_Collection *bkgCollection, - TRT_RDO_Collection *signalCollection, - TRT_RDO_Collection *outputCollection, - double occupancy, - const InDetSimDataCollection &SDO_Map); + void mergeCollections(TRT_RDO_Collection *bkgCollection, + TRT_RDO_Collection *signalCollection, + TRT_RDO_Collection *outputCollection, + double occupancy, + const InDetSimDataCollection *signalSDOCollection, + CLHEP::HepRandomEngine *rndmEngine); - const TRT_ID *m_trtId; + const TRT_ID *m_trtId{}; SG::ReadHandleKey<TRT_RDO_Container> m_bkgInputKey{this, "BkgInputKey", "OriginalEvent_SG+TRT_RDOs"," ReadHandleKey for Background Input TRT_RDO_Container"}; SG::ReadHandleKey<TRT_RDO_Container> m_signalInputKey{this, "SignalInputKey", "BkgEvent_0_SG+TRT_RDOs", "ReadHandleKey for Signal Input TRT_RDO_Container"}; @@ -55,16 +53,14 @@ private: BooleanProperty m_includeBkg { this, "includeBkg", true, "Include Background RDO Container" }; // Following tools, services and configurables are there only for the correct of HT hits - ServiceHandle<IAtRndmGenSvc> m_rndmSvc; - std::string m_rndmEngineName; - CLHEP::HepRandomEngine *m_rndmEngine; + ServiceHandle<IAthRNGSvc> m_rndmSvc{this, "RndmSvc", "AthRNGSvc", "Random Number Service"}; // Random number service double m_HTOccupancyCorrectionB; double m_HTOccupancyCorrectionEC; double m_HTOccupancyCorrectionB_noE; double m_HTOccupancyCorrectionEC_noE; - ToolHandle<InDet::ITRT_LocalOccupancy> m_TRT_LocalOccupancyTool; - ServiceHandle<ITRT_StrawStatusSummarySvc> m_TRTStrawSummarySvc; + ToolHandle<InDet::ITRT_LocalOccupancy> m_TRT_LocalOccupancyTool{this, "TRT_LocalOccupancyTool", "TRT_LocalOccupancy", ""}; + ServiceHandle<ITRT_StrawStatusSummarySvc> m_TRTStrawSummarySvc{this, "TRTStrawSummarySvc", "TRT_StrawStatusSummarySvc", ""}; }; diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/python/InDetOverlayConfig.py b/InnerDetector/InDetRawAlgs/InDetOverlay/python/InDetOverlayConfig.py index 759f8e04e9d6212d20190c749988905453bdd5e6..089df11c04d73db7fc9d04ce382b180b312bf2fe 100644 --- a/InnerDetector/InDetRawAlgs/InDetOverlay/python/InDetOverlayConfig.py +++ b/InnerDetector/InDetRawAlgs/InDetOverlay/python/InDetOverlayConfig.py @@ -75,9 +75,6 @@ def getTRTOverlay(name="TRTOverlay", **kwargs): kwargs.setdefault("includeBkg", True); - kwargs.setdefault("RndmEngine", "TRTOverlay") - kwargs.setdefault("RndmSvc", digitizationFlags.rndmSvc.get_Value()) - kwargs.setdefault("TRT_LocalOccupancyTool", "TRT_LocalOccupancy") # HT hit correction fraction diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/share/StoreGateTestCommon.txt b/InnerDetector/InDetRawAlgs/InDetOverlay/share/StoreGateTestCommon.txt new file mode 100644 index 0000000000000000000000000000000000000000..db097fe95144876330b9297b70270de68a205abb --- /dev/null +++ b/InnerDetector/InDetRawAlgs/InDetOverlay/share/StoreGateTestCommon.txt @@ -0,0 +1,11 @@ +// common job opts for athena SG-based unit tests + +// $Id: StoreGateTestCommon.txt,v 1.2 2008-05-30 22:53:11 calaf Exp $ + +ApplicationMgr.ExtSvc += { "StoreGateSvc/DetectorStore", "StoreGateSvc/HistoryStore", "StoreGateSvc/ConditionStore"}; +AuditorSvc.Auditors += { "AlgContextAuditor"}; +//StoreGateSvc.OutputLevel = 1; +//StoreGateSvc.ActivateHistory = false; +CLIDSvc.OutputLevel = 2; +MessageSvc.useColors = true; +//MessageSvc.setVerbose += { "DataProxy"} ; diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/src/PixelOverlay.cxx b/InnerDetector/InDetRawAlgs/InDetOverlay/src/PixelOverlay.cxx index 3764e37f2d570721cf7fd6fa2725e3af0454ef8d..106215eecf669aaafb6e3e7991c16b59b970fea5 100644 --- a/InnerDetector/InDetRawAlgs/InDetOverlay/src/PixelOverlay.cxx +++ b/InnerDetector/InDetRawAlgs/InDetOverlay/src/PixelOverlay.cxx @@ -1,27 +1,41 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "InDetOverlay/PixelOverlay.h" +#include "IDC_OverlayBase/IDC_OverlayHelpers.h" + #include "StoreGate/ReadHandle.h" #include "StoreGate/WriteHandle.h" namespace Overlay { + // Specialize mergeChannelData() for the Pixel + template <> + void mergeChannelData(PixelRDORawData &/* baseDatum */, + const PixelRDORawData &/* additionalDatum */, + IDC_OverlayBase *algorithm) + { + algorithm->msg(MSG::WARNING) << "Overlay::mergeChannelData<PixelRDORawData>(): " + << "Merging of data on the same channel is not implemented for PixelRDORawData" << endmsg; + } + // Specialize copyCollection() for the Pixel - template<> void copyCollection(const InDetRawDataCollection<PixelRDORawData> *input_coll, InDetRawDataCollection<PixelRDORawData> *copy_coll) + template<> + std::unique_ptr<PixelRDO_Collection> copyCollection(const IdentifierHash &hashId, + const PixelRDO_Collection *collection) { - copy_coll->setIdentifier(input_coll->identify()); - InDetRawDataCollection<PixelRDORawData>::const_iterator firstData = input_coll->begin(); - InDetRawDataCollection<PixelRDORawData>::const_iterator lastData = input_coll->end(); - for ( ; firstData != lastData; ++firstData) - { - const Identifier ident = (*firstData)->identify(); - const unsigned int word = (*firstData)->getWord(); - Pixel1RawData *newData = new Pixel1RawData(ident, word); - copy_coll->push_back(newData); + auto outputCollection = std::make_unique<PixelRDO_Collection>(hashId); + outputCollection->setIdentifier(collection->identify()); + + for (const PixelRDORawData *existingDatum : *collection) { + // Owned by the collection + auto *datumCopy = new Pixel1RawData(existingDatum->identify(), existingDatum->getWord()); + outputCollection->push_back(datumCopy); } + + return outputCollection; } } // namespace Overlay @@ -29,7 +43,6 @@ namespace Overlay PixelOverlay::PixelOverlay(const std::string &name, ISvcLocator *pSvcLocator) : IDC_OverlayBase(name, pSvcLocator) { - } StatusCode PixelOverlay::initialize() @@ -69,7 +82,7 @@ StatusCode PixelOverlay::execute() bkgContainerPtr = bkgContainer.cptr(); ATH_MSG_DEBUG("Found background Pixel RDO container " << bkgContainer.name() << " in store " << bkgContainer.store()); - ATH_MSG_DEBUG("Pixel Background = " << shortPrint(bkgContainer.cptr())); + ATH_MSG_DEBUG("Pixel Background = " << Overlay::debugPrint(bkgContainer.cptr())); } SG::ReadHandle<PixelRDO_Container> signalContainer(m_signalInputKey); @@ -78,18 +91,19 @@ StatusCode PixelOverlay::execute() return StatusCode::FAILURE; } ATH_MSG_DEBUG("Found signal Pixel RDO container " << signalContainer.name() << " in store " << signalContainer.store()); - ATH_MSG_DEBUG("Pixel Signal = " << shortPrint(signalContainer.cptr())); + ATH_MSG_DEBUG("Pixel Signal = " << Overlay::debugPrint(signalContainer.cptr())); // Creating output RDO container SG::WriteHandle<PixelRDO_Container> outputContainer(m_outputKey); ATH_CHECK(outputContainer.record(std::make_unique<PixelRDO_Container>(signalContainer->size()))); + if (!outputContainer.isValid()) { + ATH_MSG_ERROR("Could not record output Pixel RDO container " << outputContainer.name() << " to store " << outputContainer.store()); + return StatusCode::FAILURE; + } ATH_MSG_DEBUG("Recorded output Pixel RDO container " << outputContainer.name() << " in store " << outputContainer.store()); - if (outputContainer.isValid()) { - overlayContainerNew(bkgContainerPtr, signalContainer.cptr(), outputContainer.ptr()); - - ATH_MSG_DEBUG("Pixel Result = " << shortPrint(outputContainer.ptr())); - } + ATH_CHECK(overlayContainer(bkgContainerPtr, signalContainer.cptr(), outputContainer.ptr())); + ATH_MSG_DEBUG("Pixel Result = " << Overlay::debugPrint(outputContainer.ptr())); ATH_MSG_DEBUG("execute() end"); return StatusCode::SUCCESS; diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/src/SCTOverlay.cxx b/InnerDetector/InDetRawAlgs/InDetOverlay/src/SCTOverlay.cxx index 07e5c0052e63a043059da315bc8b9da3a0ac600e..a239f2d055af0ed0093188364b85be39faa8d9bb 100644 --- a/InnerDetector/InDetRawAlgs/InDetOverlay/src/SCTOverlay.cxx +++ b/InnerDetector/InDetRawAlgs/InDetOverlay/src/SCTOverlay.cxx @@ -1,55 +1,48 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "InDetIdentifier/SCT_ID.h" #include "InDetOverlay/SCTOverlay.h" +#include "IDC_OverlayBase/IDC_OverlayHelpers.h" + #include "StoreGate/ReadHandle.h" #include "StoreGate/WriteHandle.h" namespace Overlay { // Specialize copyCollection() for the SCT - template<> void copyCollection(const InDetRawDataCollection<SCT_RDORawData> *input_coll, InDetRawDataCollection<SCT_RDORawData> *copy_coll) - { - copy_coll->setIdentifier(input_coll->identify()); - InDetRawDataCollection<SCT_RDORawData>::const_iterator firstData = input_coll->begin(); - InDetRawDataCollection<SCT_RDORawData>::const_iterator lastData = input_coll->end(); - for ( ; firstData != lastData; ++firstData) - { - const Identifier ident = (*firstData)->identify(); - const unsigned int word = (*firstData)->getWord(); - const SCT3_RawData* oldData = dynamic_cast<const SCT3_RawData*>(*firstData); - std::vector<int> errorHit=oldData->getErrorCondensedHit(); - SCT3_RawData *newData=new SCT3_RawData(ident, word, &errorHit); - copy_coll->push_back(newData); + template<> + std::unique_ptr<SCT_RDO_Collection> copyCollection(const IdentifierHash &hashId, + const SCT_RDO_Collection *collection) + { + auto outputCollection = std::make_unique<SCT_RDO_Collection>(hashId); + outputCollection->setIdentifier(collection->identify()); + + for (const SCT_RDORawData *existingDatum : *collection) { + auto *oldDatum = dynamic_cast<const SCT3_RawData *>(existingDatum); + // Owned by the collection + auto *datumCopy = new SCT3_RawData(oldDatum->identify(), + oldDatum->getWord(), + &oldDatum->getErrorCondensedHit()); + outputCollection->push_back(datumCopy); } + + return outputCollection; } - // Specialize mergeCollectionsNew() for the SCT - template<> void mergeCollectionsNew(InDetRawDataCollection<SCT_RDORawData> *bkgCollection, - InDetRawDataCollection<SCT_RDORawData> *signalCollection, - InDetRawDataCollection<SCT_RDORawData> *outputCollection, - IDC_OverlayBase *tmp) + // Specialize mergeCollections() for the SCT + template<> + void mergeCollections(SCT_RDO_Collection *bkgCollection, + SCT_RDO_Collection *signalCollection, + SCT_RDO_Collection *outputCollection, + IDC_OverlayBase *algorithm) { // We want to use the SCT_ID helper provided by SCTOverlay, thus the constraint - SCTOverlay *parent = dynamic_cast<SCTOverlay*>(tmp); + SCTOverlay *parent = dynamic_cast<SCTOverlay *>(algorithm); if (!parent) { - std::ostringstream os; - os << "mergeCollectionsNew<SCT_RDORawData>() called by a wrong parent algorithm? Must be SCTOverlay."; - throw std::runtime_error(os.str()); - } - - // ---------------------------------------------------------------- - // debug - static bool first_time = true; - if (first_time) { - first_time = false; - parent->msg(MSG::INFO) << "SCTOverlay::mergeCollectionsNew(): " - << " SCT specific code is called for " - << typeid(*bkgCollection).name() - << endmsg; + throw std::runtime_error("mergeCollections<SCT_RDORawData>() called by a wrong parent algorithm? Must be SCTOverlay."); } // ---------------------------------------------------------------- @@ -70,39 +63,25 @@ namespace Overlay // // http://alxr.usatlas.bnl.gov/lxr/source/atlas/InnerDetector/InDetRecTools/SiClusterizationTool/src/SCT_ClusteringTool.cxx - - // ---------------------------------------------------------------- if (bkgCollection->identify() != signalCollection->identify()) { - std::ostringstream os; - os << "mergeCollectionsNew<SCT_RDORawData>(): collection Id mismatch"; - parent->msg(MSG::FATAL) << os.str() << endmsg; - throw std::runtime_error(os.str()); + throw std::runtime_error("mergeCollections<SCT_RDO_Collection>(): collection Id mismatch"); } const Identifier idColl = parent->get_sct_id()->wafer_id(signalCollection->identifyHash()); - // Empty the input collections and move RDOs to local vectors. - InDetRawDataCollection<SCT_RDORawData> bkg(bkgCollection->identifyHash()); - bkg.setIdentifier(idColl); - bkgCollection->swap(bkg); - - InDetRawDataCollection<SCT_RDORawData> sig(signalCollection->identifyHash()); - sig.setIdentifier(idColl); - signalCollection->swap(sig); - // Strip hit timing information for Next, Current, Previous and Any BCs // Prepare one more strip to create the last one. The additional strip has no hits. std::bitset<SCTOverlay::NumberOfStrips+1> stripInfo[SCTOverlay::NumberOfBitSets]; // Process background and signal in the wafer for (unsigned source = SCTOverlay::BkgSource; source < SCTOverlay::NumberOfSources; source++) { - InDetRawDataCollection<SCT_RDORawData>::const_iterator rdo; - InDetRawDataCollection<SCT_RDORawData>::const_iterator rdoEnd; + SCT_RDO_Collection::const_iterator rdo; + SCT_RDO_Collection::const_iterator rdoEnd; if (source == SCTOverlay::BkgSource) { // background - rdo = bkg.begin(); - rdoEnd = bkg.end(); + rdo = bkgCollection->begin(); + rdoEnd = bkgCollection->end(); } else { // signal - rdo = sig.begin(); - rdoEnd = sig.end(); + rdo = signalCollection->begin(); + rdoEnd = signalCollection->end(); } // Loop over all RDOs in the wafer for (; rdo!=rdoEnd; ++rdo) { @@ -110,7 +89,7 @@ namespace Overlay if (!rdo3) { std::ostringstream os; const auto& elt = **rdo; - os << "mergeCollectionNew<SCT_RDORawData>(): wrong datum format. Only SCT3_RawData are produced by SCT_RodDecoder and supported by overlay." + os << "mergeCollection<SCT_RDO_Collection>(): wrong datum format. Only SCT3_RawData are produced by SCT_RodDecoder and supported by overlay." << "For the supplied datum typeid(datum).name() = " << typeid(elt).name(); throw std::runtime_error(os.str()); } @@ -171,15 +150,13 @@ namespace Overlay } } } - } // mergeCollectionsNew() + } // mergeCollections() } // namespace Overlay SCTOverlay::SCTOverlay(const std::string &name, ISvcLocator *pSvcLocator) - : IDC_OverlayBase(name, pSvcLocator), - m_sctId(nullptr) + : IDC_OverlayBase(name, pSvcLocator) { - } StatusCode SCTOverlay::initialize() @@ -225,7 +202,7 @@ StatusCode SCTOverlay::execute() bkgContainerPtr = bkgContainer.cptr(); ATH_MSG_DEBUG("Found background SCT RDO container " << bkgContainer.name() << " in store " << bkgContainer.store()); - ATH_MSG_DEBUG("SCT Background = " << shortPrint(bkgContainer.cptr(), 50)); + ATH_MSG_DEBUG("SCT Background = " << Overlay::debugPrint(bkgContainer.cptr(), 50)); } SG::ReadHandle<SCT_RDO_Container> signalContainer(m_signalInputKey); @@ -234,18 +211,19 @@ StatusCode SCTOverlay::execute() return StatusCode::FAILURE; } ATH_MSG_DEBUG("Found signal SCT RDO container " << signalContainer.name() << " in store " << signalContainer.store()); - ATH_MSG_DEBUG("SCT Signal = " << shortPrint(signalContainer.cptr(), 50)); + ATH_MSG_DEBUG("SCT Signal = " << Overlay::debugPrint(signalContainer.cptr(), 50)); // Creating output RDO container SG::WriteHandle<SCT_RDO_Container> outputContainer(m_outputKey); ATH_CHECK(outputContainer.record(std::make_unique<SCT_RDO_Container>(signalContainer->size()))); + if (!outputContainer.isValid()) { + ATH_MSG_ERROR("Could not record output SCT RDO container " << outputContainer.name() << " to store " << outputContainer.store()); + return StatusCode::FAILURE; + } ATH_MSG_DEBUG("Recorded output SCT RDO container " << outputContainer.name() << " in store " << outputContainer.store()); - if (outputContainer.isValid()) { - overlayContainerNew(bkgContainerPtr, signalContainer.cptr(), outputContainer.ptr()); - - ATH_MSG_DEBUG("SCT Result = " << shortPrint(outputContainer.ptr(), 50)); - } + ATH_CHECK(overlayContainer(bkgContainerPtr, signalContainer.cptr(), outputContainer.ptr())); + ATH_MSG_DEBUG("SCT Result = " << Overlay::debugPrint(outputContainer.ptr(), 50)); ATH_MSG_DEBUG("execute() end"); return StatusCode::SUCCESS; diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/src/TRTOverlay.cxx b/InnerDetector/InDetRawAlgs/InDetOverlay/src/TRTOverlay.cxx index c4431e59184000f1e2520dd7051e5fd9c38afc41..ee8ff11590e2ab5196c6d6bfb92cb47ed137babd 100644 --- a/InnerDetector/InDetRawAlgs/InDetOverlay/src/TRTOverlay.cxx +++ b/InnerDetector/InDetRawAlgs/InDetOverlay/src/TRTOverlay.cxx @@ -1,12 +1,11 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ -#include "AthenaKernel/IAtRndmGenSvc.h" +#include "AthenaKernel/RNGWrapper.h" #include "CLHEP/Random/RandomEngine.h" #include "CLHEP/Random/RandFlat.h" -#include "CLHEP/Units/SystemOfUnits.h" -#include "GeneratorObjects/McEventCollection.h" +#include "HepMC/GenParticle.h" #include "InDetIdentifier/TRT_ID.h" #include "InDetOverlay/TRTOverlay.h" @@ -15,77 +14,44 @@ #include "InDetRawData/TRT_RDORawData.h" #include "InDetSimData/InDetSimDataCollection.h" +#include "IDC_OverlayBase/IDC_OverlayCommon.h" +#include "IDC_OverlayBase/IDC_OverlayHelpers.h" + #include "StoreGate/ReadHandle.h" #include "StoreGate/WriteHandle.h" + namespace Overlay { - // Specialize mergeChannelData() for the TRT - template<> void mergeChannelData(TRT_RDORawData &r1, const TRT_RDORawData &r2, IDC_OverlayBase *parent) + // Specialize copyCollection() for the TRT + template<> + std::unique_ptr<TRT_RDO_Collection> copyCollection(const IdentifierHash &hashId, + const TRT_RDO_Collection *collection) { + auto outputCollection = std::make_unique<TRT_RDO_Collection>(hashId); + outputCollection->setIdentifier(collection->identify()); - // ---------------------------------------------------------------- - // debug - static bool first_time = true; - if (first_time) { - first_time = false; - parent->msg(MSG::INFO) << "Overlay::mergeChannelData(): " - << "TRT specific code is called for " - << typeid(TRT_RDORawData).name() - << endmsg; + for (const TRT_RDORawData *existingDatum : *collection) { + // Owned by the collection + auto *datumCopy = new TRT_LoLumRawData(existingDatum->identify(), existingDatum->getWord()); + outputCollection->push_back(datumCopy); } - // ---------------------------------------------------------------- - // FIXME: That should really be a call to r1.merge(r2); - - TRT_LoLumRawData *pr1 = dynamic_cast<TRT_LoLumRawData*>(&r1); - const TRT_LoLumRawData *pr2 = dynamic_cast<const TRT_LoLumRawData*>(&r2); - - if (pr1 && pr2) { - // the actual merging - pr1->merge(*pr2); - } - } // mergeChannelData() - - // Specialize copyCollection() for the TRT - template<> void copyCollection(const InDetRawDataCollection<TRT_RDORawData> *input_coll, InDetRawDataCollection<TRT_RDORawData> *copy_coll) - { - copy_coll->setIdentifier(input_coll->identify()); - InDetRawDataCollection<TRT_RDORawData>::const_iterator firstData = input_coll->begin(); - InDetRawDataCollection<TRT_RDORawData>::const_iterator lastData = input_coll->end(); - for ( ; firstData != lastData; ++firstData) - { - const Identifier ident = (*firstData)->identify(); - const unsigned int word = (*firstData)->getWord(); - TRT_LoLumRawData *newData = new TRT_LoLumRawData(ident, word); - copy_coll->push_back(newData); - } + return outputCollection; } } // namespace Overlay TRTOverlay::TRTOverlay(const std::string &name, ISvcLocator *pSvcLocator) - : IDC_OverlayBase(name, pSvcLocator), - m_trtId(nullptr), - m_rndmSvc("AtRndmGenSvc",name), - m_rndmEngineName("TRTOverlay"), - m_rndmEngine(nullptr), - m_TRT_LocalOccupancyTool("TRT_LocalOccupancy",this), - m_TRTStrawSummarySvc("TRT_StrawStatusSummarySvc","TRT_StrawStatusSummarySvc") + : AthAlgorithm(name, pSvcLocator) { - declareProperty("RndmSvc", m_rndmSvc, "Random Number Service"); - declareProperty("RndmEngine", m_rndmEngineName, "Random engine name"); - - declareProperty("TRT_LocalOccupancyTool", m_TRT_LocalOccupancyTool); - declareProperty("TRT_HT_OccupancyCorrectionBarrel", m_HTOccupancyCorrectionB=0.110); declareProperty("TRT_HT_OccupancyCorrectionEndcap", m_HTOccupancyCorrectionEC=0.090); declareProperty("TRT_HT_OccupancyCorrectionBarrelNoE", m_HTOccupancyCorrectionB_noE=0.060); declareProperty("TRT_HT_OccupancyCorrectionEndcapNoE", m_HTOccupancyCorrectionEC_noE=0.050); - - declareProperty("TRTStrawSummarySvc", m_TRTStrawSummarySvc); } + StatusCode TRTOverlay::initialize() { ATH_MSG_DEBUG("Initializing..."); @@ -113,37 +79,29 @@ StatusCode TRTOverlay::initialize() // Initialize random number generator CHECK(m_rndmSvc.retrieve()); - m_rndmEngine = m_rndmSvc->GetEngine(m_rndmEngineName); - if (!m_rndmEngine) { - ATH_MSG_ERROR("Could not find RndmEngine : " << m_rndmEngineName); - return StatusCode::FAILURE; - } else { - ATH_MSG_DEBUG("Found RndmEngine : " << m_rndmEngineName); - } // Retrieve TRT local occupancy tool CHECK(m_TRT_LocalOccupancyTool.retrieve()); - if (!m_TRTStrawSummarySvc.empty() && m_TRTStrawSummarySvc.retrieve().isFailure() ) { - ATH_MSG_ERROR ("Failed to retrieve StrawStatus Summary " << m_TRTStrawSummarySvc); - ATH_MSG_ERROR ("configure as 'None' to avoid its loading."); - return StatusCode::FAILURE; - } else { - if ( !m_TRTStrawSummarySvc.empty()) - ATH_MSG_INFO( "Retrieved tool " << m_TRTStrawSummarySvc ); + if (!m_TRTStrawSummarySvc.empty()) { + if (m_TRTStrawSummarySvc.retrieve().isFailure() ) { + ATH_MSG_ERROR ("Failed to retrieve StrawStatus Summary " << m_TRTStrawSummarySvc); + ATH_MSG_ERROR ("configure as 'None' to avoid its loading."); + return StatusCode::FAILURE; + } else { + ATH_MSG_DEBUG( "Retrieved tool " << m_TRTStrawSummarySvc ); + } } - - return StatusCode::SUCCESS; } -StatusCode TRTOverlay::execute() { + +StatusCode TRTOverlay::execute() +{ ATH_MSG_DEBUG("execute() begin"); // Reading the input RDOs - ATH_MSG_VERBOSE("Retrieving input RDO containers"); - const TRT_RDO_Container *bkgContainerPtr = nullptr; if (m_includeBkg) { SG::ReadHandle<TRT_RDO_Container> bkgContainer(m_bkgInputKey); @@ -154,7 +112,7 @@ StatusCode TRTOverlay::execute() { bkgContainerPtr = bkgContainer.cptr(); ATH_MSG_DEBUG("Found background TRT RDO container " << bkgContainer.name() << " in store " << bkgContainer.store()); - ATH_MSG_DEBUG("TRT Background = " << shortPrint(bkgContainer.cptr())); + ATH_MSG_DEBUG("TRT Background = " << Overlay::debugPrint(bkgContainer.cptr())); } SG::ReadHandle<TRT_RDO_Container> signalContainer(m_signalInputKey); @@ -163,7 +121,7 @@ StatusCode TRTOverlay::execute() { return StatusCode::FAILURE; } ATH_MSG_DEBUG("Found signal TRT RDO container " << signalContainer.name() << " in store " << signalContainer.store()); - ATH_MSG_DEBUG("TRT Signal = " << shortPrint(signalContainer.cptr())); + ATH_MSG_DEBUG("TRT Signal = " << Overlay::debugPrint(signalContainer.cptr())); SG::ReadHandle<InDetSimDataCollection> signalSDOContainer(m_signalInputSDOKey); if (!signalSDOContainer.isValid()) { @@ -175,175 +133,178 @@ StatusCode TRTOverlay::execute() { // Creating output RDO container SG::WriteHandle<TRT_RDO_Container> outputContainer(m_outputKey); ATH_CHECK(outputContainer.record(std::make_unique<TRT_RDO_Container>(signalContainer->size()))); + if (!outputContainer.isValid()) { + ATH_MSG_ERROR("Could not record output TRT RDO container " << outputContainer.name() << " to store " << outputContainer.store()); + return StatusCode::FAILURE; + } ATH_MSG_DEBUG("Recorded output TRT RDO container " << outputContainer.name() << " in store " << outputContainer.store()); - if (outputContainer.isValid()) { - // Calculate occupancy here - if (m_includeBkg) { - std::map<int, double> occupancy = m_TRT_LocalOccupancyTool->getDetectorOccupancy(bkgContainerPtr); - - //Merge containers - overlayTRTContainers(bkgContainerPtr, signalContainer.cptr(), outputContainer.ptr(), occupancy, *signalSDOContainer); - } else { - overlayContainerNew(bkgContainerPtr, signalContainer.cptr(), outputContainer.ptr()); - } - - ATH_MSG_DEBUG("TRT Result = " << shortPrint(outputContainer.ptr())); - } + ATH_CHECK(overlayContainer(bkgContainerPtr, signalContainer.cptr(), outputContainer.ptr(), signalSDOContainer.cptr())); + ATH_MSG_DEBUG("TRT Result = " << Overlay::debugPrint(outputContainer.ptr())); ATH_MSG_DEBUG("execute() end"); return StatusCode::SUCCESS; } -void TRTOverlay::overlayTRTContainers(const TRT_RDO_Container *bkgContainer, - const TRT_RDO_Container *signalContainer, - TRT_RDO_Container *outputContainer, - std::map<int, double> &occupancyMap, - const InDetSimDataCollection &SDO_Map) + +StatusCode TRTOverlay::overlayContainer(const TRT_RDO_Container *bkgContainer, + const TRT_RDO_Container *signalContainer, + TRT_RDO_Container *outputContainer, + const InDetSimDataCollection *signalSDOCollection) { - /** Add data from the background container to the output one */ - if (bkgContainer) { - TRT_RDO_Container::const_iterator p_bkg = bkgContainer->begin(); - TRT_RDO_Container::const_iterator p_bkg_end = bkgContainer->end(); - - for(; p_bkg != p_bkg_end; ++p_bkg) { - IdentifierHash hashId = p_bkg.hashId(); - auto coll_bkg = std::make_unique<TRT_RDO_Collection>(hashId); - Overlay::copyCollection(*p_bkg, coll_bkg.get()); - - if (outputContainer->addCollection(coll_bkg.release(), p_bkg.hashId() ).isFailure()) { - ATH_MSG_WARNING("add background Collection failed for output " << p_bkg.hashId()); - } - } - } - - /** Add data from the signal container to the output one */ - TRT_RDO_Container::const_iterator p_signal = signalContainer->begin(); - TRT_RDO_Container::const_iterator p_signal_end = signalContainer->end(); - - for (; p_signal != p_signal_end; ++p_signal) { - - IdentifierHash coll_id = p_signal.hashId(); - auto coll_signal = std::make_unique<TRT_RDO_Collection>(coll_id); - Overlay::copyCollection( *p_signal, coll_signal.get() ) ; - - /** The newly created stuff will go to the output EventStore SG */ - auto coll_out = std::make_unique<TRT_RDO_Collection>(coll_id); - coll_out->setIdentifier((*p_signal)->identify()); - - /** Look for the same ID in the main StoreGate EventStore */ - auto q = outputContainer->indexFind( coll_id ); - if ( q != outputContainer->end() ) { - /**Need to merge the collections - Retrieve q */ - std::unique_ptr <TRT_RDO_Collection> coll_bkg ((TRT_RDO_Collection *) *q); - int det = m_trtId->barrel_ec( (*p_signal)->identify() ); - mergeTRTCollections(coll_bkg.get(), coll_signal.get(), coll_out.get(), occupancyMap[det], SDO_Map); - - outputContainer->removeCollection(p_signal.hashId()); - if (outputContainer->addCollection(coll_out.release(), coll_id).isFailure() ) { - ATH_MSG_WARNING( "overlay addCollection failed " ); - } - } - else { - /** Copy the complete collection from signal to output, - hopefully preserving the "most derived" type of its raw data */ - if ( outputContainer->addCollection(coll_signal.release(), coll_id).isFailure() ) { - ATH_MSG_WARNING("add signal Collection failed for output " << coll_id); + // Get all the hashes for the signal container + const std::vector<IdentifierHash> signalHashes = signalContainer->GetAllCurrentHashes(); + + // There are some use cases where background is empty + if (!bkgContainer) { + // Only loop through the signal collections and copy them over + for (const IdentifierHash &hashId : signalHashes) { + // Copy the signal collection + std::unique_ptr<TRT_RDO_Collection> signalCollection = Overlay::copyCollection(hashId, signalContainer->indexFindPtr(hashId)); + + if (outputContainer->addCollection(signalCollection.get(), hashId).isFailure()) { + ATH_MSG_ERROR("Adding signal Collection with hashId " << hashId << " failed"); + return StatusCode::FAILURE; + } else { + signalCollection.release(); } } + + return StatusCode::SUCCESS; } -} -void TRTOverlay::mergeTRTCollections(TRT_RDO_Collection *bkgCollection, - TRT_RDO_Collection *signalCollection, - TRT_RDO_Collection *outputCollection, - double occupancy, - const InDetSimDataCollection& SDO_Map) -{ + // Setup the random engine + ATHRNG::RNGWrapper* rngWrapper = m_rndmSvc->getEngine(this); + rngWrapper->setSeed( name(), Gaudi::Hive::currentContext() ); + CLHEP::HepRandomEngine *rndmEngine(*rngWrapper); - if (bkgCollection->identify() != signalCollection->identify()) { - std::ostringstream os; - os << "mergeTRTCollections<generic>(): collection Id mismatch"; - ATH_MSG_FATAL(os.str()); - throw std::runtime_error(os.str()); - } + // Retrieve the occupancy map + std::map<int, double> occupancyMap = m_TRT_LocalOccupancyTool->getDetectorOccupancy(bkgContainer); - const Identifier idColl = bkgCollection->identify(); + // Get all the hashes for the background container + const std::vector<IdentifierHash> bkgHashes = bkgContainer->GetAllCurrentHashes(); - // ---------------------------------------------------------------- - // debug - static bool first_time = true; - if (first_time) { - first_time = false; - ATH_MSG_INFO( "mergeTRTCollections(): code is called "); + // The MC signal container should typically be smaller than bkgContainer, + // because the latter contains all the noise, minimum bias and pile up. + // Thus we firstly iterate over signal hashes and store them in a map. + std::map<IdentifierHash, bool> overlapMap; + for (const IdentifierHash &hashId : signalHashes) { + overlapMap.emplace(hashId, false); } - // ---------------------------------------------------------------- - - TRT_RDO_Collection bkg(bkgCollection->identifyHash()); - bkg.setIdentifier(idColl); - bkgCollection->swap(bkg); + // Now loop through the background hashes and copy unique ones over + for (const IdentifierHash &hashId : bkgHashes) { + auto search = overlapMap.find(hashId); + if (search == overlapMap.end()) { + // Copy the background collection + std::unique_ptr<TRT_RDO_Collection> bkgCollection = Overlay::copyCollection(hashId, bkgContainer->indexFindPtr(hashId)); + + if (outputContainer->addCollection(bkgCollection.get(), hashId).isFailure()) { + ATH_MSG_ERROR("Adding background Collection with hashId " << hashId << " failed"); + return StatusCode::FAILURE; + } else { + bkgCollection.release(); + } + } else { + // Flip the overlap flag + search->second = true; + } + } - TRT_RDO_Collection sig(signalCollection->identifyHash()); - sig.setIdentifier(idColl); - signalCollection->swap(sig); + // Finally loop through the map and process the signal and overlay if + // necessary + for (const auto &[hashId, overlap] : overlapMap) { + // Copy the signal collection + std::unique_ptr<TRT_RDO_Collection> signalCollection = Overlay::copyCollection(hashId, signalContainer->indexFindPtr(hashId)); + + if (overlap) { // Do overlay + // Create the output collection, only works for Inner Detector + auto outputCollection = std::make_unique<TRT_RDO_Collection>(hashId); + outputCollection->setIdentifier(signalCollection->identify()); + // Copy the background collection + std::unique_ptr<TRT_RDO_Collection> bkgCollection = Overlay::copyCollection(hashId, bkgContainer->indexFindPtr(hashId)); + + // Merge collections + int det = m_trtId->barrel_ec(signalCollection->identify()); + mergeCollections(bkgCollection.get(), signalCollection.get(), outputCollection.get(), occupancyMap[det], signalSDOCollection, rndmEngine); + + if (outputContainer->addCollection(outputCollection.get(), hashId).isFailure()) { + ATH_MSG_ERROR("Adding overlaid Collection with hashId " << hashId << " failed"); + return StatusCode::FAILURE; + } else { + outputCollection.release(); + } + } else { // Only write signal out + if (outputContainer->addCollection(signalCollection.get(), hashId).isFailure()) { + ATH_MSG_ERROR("Adding signal Collection with hashId " << hashId << " failed"); + return StatusCode::FAILURE; + } else { + signalCollection.release(); + } + } + } - //################################################################ - // Merge by copying ptrs from background and signal to signalCollection + return StatusCode::SUCCESS; +} - unsigned int ibkg = 0; - unsigned int isig = 0; - while( (ibkg < bkg.size()) || (isig < sig.size())) { +void TRTOverlay::mergeCollections(TRT_RDO_Collection *bkgCollection, + TRT_RDO_Collection *signalCollection, + TRT_RDO_Collection *outputCollection, + double occupancy, + const InDetSimDataCollection *signalSDOCollection, + CLHEP::HepRandomEngine *rndmEngine) +{ + if (bkgCollection->identify() != signalCollection->identify()) { + throw std::runtime_error("mergeCollections(): collection Id mismatch"); + } + // Merge by copying ptrs from background and signal to output collection + TRT_RDO_Collection::size_type ibkg = 0, isig = 0; + while ((ibkg < bkgCollection->size()) || (isig < signalCollection->size())) { // The RDO that goes to the output at the end of this step. - TRT_RDORawData *p_rdo(0); - - if(isig == sig.size()) { - // just copy the remaining data inputs - bkg.swapElement(ibkg++, 0, p_rdo); - } - else if(ibkg == bkg.size()) { - //just copy the remaining MC digits - sig.swapElement(isig++, 0, p_rdo); - } - else { + TRT_RDORawData *tmp{}; + + if (isig == signalCollection->size()) { + // just copy the remaining background digits + bkgCollection->swapElement(ibkg++, nullptr, tmp); + } else if (ibkg == bkgCollection->size()) { + // just copy the remaining signal digits + signalCollection->swapElement(isig++, nullptr, tmp); + } else { // Need to decide which one goes first. // See comments in TRTDigitization.cxx about the assumption that id1<id2 <=> hash1<hash2 - if( sig[isig]->identify() < bkg[ibkg]->identify() ) { - sig.swapElement(isig++, 0, p_rdo); - } - else if(bkg[ibkg]->identify() < sig[isig]->identify()) { - bkg.swapElement(ibkg++, 0, p_rdo); - } - else { + if (signalCollection->at(isig)->identify() < bkgCollection->at(ibkg)->identify()) { + signalCollection->swapElement(isig++, nullptr, tmp); + } else if (bkgCollection->at(ibkg)->identify() < signalCollection->at(isig)->identify()) { + bkgCollection->swapElement(ibkg++, nullptr, tmp); + } else { // The hits are on the same channel. - TRT_RDORawData *p2(0); - bkg.swapElement(ibkg++, 0, p2); - sig.swapElement(isig++, 0, p_rdo); + TRT_RDORawData *tmpBkg{}; + bkgCollection->swapElement(ibkg++, nullptr, tmpBkg); + signalCollection->swapElement(isig++, nullptr, tmp); - TRT_LoLumRawData *pr1 = dynamic_cast<TRT_LoLumRawData*>(p_rdo); - const TRT_LoLumRawData *pr2 = dynamic_cast<const TRT_LoLumRawData*>(p2); + TRT_LoLumRawData *sigRdo = dynamic_cast<TRT_LoLumRawData *>(tmp); + const TRT_LoLumRawData *bkgRdo = dynamic_cast<const TRT_LoLumRawData *>(tmpBkg); - if(pr1 && pr2) { + if (sigRdo && bkgRdo) { // the actual merging - pr1->merge(*pr2); + sigRdo->merge(*bkgRdo); - //If the hit is not already a high level hit - if( !(pr1->getWord() & 0x04020100) ) { - - //Determine if the hit is from an electron or not + // If the hit is not already a high level hit + if (!(sigRdo->getWord() & 0x04020100)) { + // Determine if the hit is from an electron or not bool isElectron = false; - Identifier rdoId = p_rdo->identify(); - InDetSimDataCollection::const_iterator sdoIter(SDO_Map.find(rdoId)); - if( sdoIter != SDO_Map.end() ){ - const std::vector< InDetSimData::Deposit >& deposits = sdoIter->second.getdeposits(); - for ( const auto& deposit: deposits ){ - const auto& particleLink = deposit.first; - if( particleLink.isValid() ){ - if( abs( particleLink->pdg_id() ) == 11 ){ + Identifier rdoId = sigRdo->identify(); + InDetSimDataCollection::const_iterator sdoIter = signalSDOCollection->find(rdoId); + if (sdoIter != signalSDOCollection->end()) { + const std::vector<InDetSimData::Deposit> &deposits = sdoIter->second.getdeposits(); + for (const InDetSimData::Deposit &deposit : deposits) { + const HepMcParticleLink &particleLink = deposit.first; + if (particleLink.isValid()) { + if (std::abs(particleLink->pdg_id()) == 11) { isElectron = true; + break; } } } @@ -357,34 +318,31 @@ void TRTOverlay::mergeTRTCollections(TRT_RDO_Collection *bkgCollection, } } - - - unsigned int newword = 0; - //Get random number - int det = m_trtId->barrel_ec( pr1->identify() ); + // Get random number + int det = m_trtId->barrel_ec(rdoId); float HTOccupancyCorrection = 0; - if(isElectron){ - HTOccupancyCorrection = abs(det) > 1 ? m_HTOccupancyCorrectionEC : m_HTOccupancyCorrectionB; + if (isElectron) { + HTOccupancyCorrection = std::abs(det) > 1 ? m_HTOccupancyCorrectionEC : m_HTOccupancyCorrectionB; } else { - HTOccupancyCorrection = abs(det) > 1 ? m_HTOccupancyCorrectionEC_noE : m_HTOccupancyCorrectionB_noE; + HTOccupancyCorrection = std::abs(det) > 1 ? m_HTOccupancyCorrectionEC_noE : m_HTOccupancyCorrectionB_noE; } - if( isXenonStraw && occupancy * HTOccupancyCorrection > CLHEP::RandFlat::shoot( m_rndmEngine, 0, 1) ) - newword += 1 << (26-9); - // - TRT_LoLumRawData newrdo( pr1->identify(), newword); - pr1->merge(newrdo); + unsigned int newWord = 0; + if (isXenonStraw && occupancy * HTOccupancyCorrection > CLHEP::RandFlat::shoot(rndmEngine, 0, 1)) { + newWord += 1 << (26-9); + } + + TRT_LoLumRawData newRdo(rdoId, newWord); + sigRdo->merge(newRdo); } } else { ATH_MSG_WARNING("TRT RDO is the wrong format"); } - Overlay::mergeChannelData(*p_rdo, *p2, this); - delete p2; + delete tmpBkg; } } - outputCollection->push_back(p_rdo); + outputCollection->push_back(tmp); } // <= while } - diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/test/PixelOverlay_test.cxx b/InnerDetector/InDetRawAlgs/InDetOverlay/test/PixelOverlay_test.cxx new file mode 100644 index 0000000000000000000000000000000000000000..1a42456d21099378e2d8ed4bf6779ac75149ce0f --- /dev/null +++ b/InnerDetector/InDetRawAlgs/InDetOverlay/test/PixelOverlay_test.cxx @@ -0,0 +1,489 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +/** + * @author John Chapman + * @brief Tests for PixelOverlay. + */ + +#undef NDEBUG + +// Framework +#include "TestTools/initGaudi.h" + +// Google Test +#include "gtest/gtest.h" + +// Tested AthAlgorithm +#include "../InDetOverlay/PixelOverlay.h" + +namespace OverlayTesting { + + // needed every time an AthAlgorithm, AthAlgTool or AthService is instantiated + ISvcLocator* g_svcLoc = nullptr; + + // global test environment takes care of setting up Gaudi + class GaudiEnvironment : public ::testing::Environment { + protected: + virtual void SetUp() override { + Athena_test::initGaudi(OverlayTesting::g_svcLoc); + } + }; + + class PixelOverlay_test : public ::testing::Test { + + protected: + virtual void SetUp() override { + m_alg = new PixelOverlay{"PixelOverlay", g_svcLoc}; + ASSERT_TRUE( m_alg->setProperties().isSuccess() ); + } + + virtual void TearDown() override { + ASSERT_TRUE( m_alg->finalize().isSuccess() ); + delete m_alg; + } + + PixelOverlay* m_alg; + }; // PixelOverlay_test fixture + + + TEST_F(PixelOverlay_test, set_properties) { + // ordering A, C, B is on purpose to test for unintended alphabetic ordering + std::string inputSigPropertyValue = "'StoreGateSvc+PixelRDOs_SIG'"; + std::string inputBkgPropertyValue = "'StoreGateSvc+PixelRDOs_BKG'"; + std::string outputPropertyValue = "'StoreGateSvc+PixelRDOs'"; + ASSERT_TRUE( m_alg->setProperty( "SignalInputKey", inputSigPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "BkgInputKey", inputBkgPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->initialize().isSuccess() ); + ASSERT_TRUE( m_alg->execute().isFailure() ); //inputs don't exist + } + + TEST_F(PixelOverlay_test, empty_containers_alg_execute) { + SG::WriteHandle<PixelRDO_Container> inputSigDataHandle{"StoreGateSvc+PixelRDOs_SIG"}; + const unsigned int containerSize(1188); + inputSigDataHandle = std::make_unique<PixelRDO_Container>(containerSize); + SG::WriteHandle<PixelRDO_Container> inputBkgDataHandle{"StoreGateSvc+PixelRDOs_BKG"}; + inputBkgDataHandle = std::make_unique<PixelRDO_Container>(containerSize); + + // ordering A, C, B is on purpose to test for unintended alphabetic ordering + std::string inputSigPropertyValue = "'StoreGateSvc+PixelRDOs_SIG'"; + std::string inputBkgPropertyValue = "'StoreGateSvc+PixelRDOs_BKG'"; + std::string outputPropertyValue = "'StoreGateSvc+PixelRDOs'"; + ASSERT_TRUE( m_alg->setProperty( "SignalInputKey", inputSigPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "BkgInputKey", inputBkgPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->initialize().isSuccess() ); + ASSERT_TRUE( m_alg->execute().isSuccess() ); + } + + TEST_F(PixelOverlay_test, containers_with_matching_empty_collections) { + SG::WriteHandle<PixelRDO_Container> inputSigDataHandle{"StoreGateSvc+PixelRDOs_SIG1"}; + const unsigned int containerSize(1188); + IdentifierHash sigElementHash(1); + IdentifierHash bkgElementHash(1); + inputSigDataHandle = std::make_unique<PixelRDO_Container>(containerSize); + std::unique_ptr<PixelRDO_Collection> sigCollection = std::make_unique<PixelRDO_Collection>(sigElementHash); + ASSERT_TRUE(inputSigDataHandle->addCollection(sigCollection.get(),sigElementHash).isSuccess()); + sigCollection.release(); // Now owned by inputSigDataHandle + SG::WriteHandle<PixelRDO_Container> inputBkgDataHandle{"StoreGateSvc+PixelRDOs_BKG1"}; + inputBkgDataHandle = std::make_unique<PixelRDO_Container>(containerSize); + std::unique_ptr<PixelRDO_Collection> bkgCollection = std::make_unique<PixelRDO_Collection>(bkgElementHash); + ASSERT_TRUE(inputBkgDataHandle->addCollection(bkgCollection.get(),bkgElementHash).isSuccess()); + bkgCollection.release(); // Now owned by inputBkgDataHandle + + // ordering A, C, B is on purpose to test for unintended alphabetic ordering + std::string inputSigPropertyValue = "'StoreGateSvc+PixelRDOs_SIG1'"; + std::string inputBkgPropertyValue = "'StoreGateSvc+PixelRDOs_BKG1'"; + std::string outputPropertyValue = "'StoreGateSvc+PixelRDOs1'"; + ASSERT_TRUE( m_alg->setProperty( "SignalInputKey", inputSigPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "BkgInputKey", inputBkgPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->initialize().isSuccess() ); + ASSERT_TRUE( m_alg->execute().isSuccess() ); + // check output makes sense + SG::ReadHandle<PixelRDO_Container> outputDataHandle{"StoreGateSvc+PixelRDOs1"}; + ASSERT_TRUE( outputDataHandle.isValid() ); + const PixelRDO_Collection *outputCollection = outputDataHandle->indexFindPtr(sigElementHash); + ASSERT_TRUE( outputCollection!=nullptr ); + ASSERT_TRUE( outputCollection->empty() ); + } + + TEST_F(PixelOverlay_test, containers_with_different_empty_collections) { + SG::WriteHandle<PixelRDO_Container> inputSigDataHandle{"StoreGateSvc+PixelRDOs_SIG2"}; + const unsigned int containerSize(1188); + IdentifierHash sigElementHash(1); + IdentifierHash bkgElementHash(2); + inputSigDataHandle = std::make_unique<PixelRDO_Container>(containerSize); + std::unique_ptr<PixelRDO_Collection> sigCollection = std::make_unique<PixelRDO_Collection>(sigElementHash); + ASSERT_TRUE(inputSigDataHandle->addCollection(sigCollection.get(),sigElementHash).isSuccess()); + sigCollection.release(); // Now owned by inputSigDataHandle + SG::WriteHandle<PixelRDO_Container> inputBkgDataHandle{"StoreGateSvc+PixelRDOs_BKG2"}; + inputBkgDataHandle = std::make_unique<PixelRDO_Container>(containerSize); + std::unique_ptr<PixelRDO_Collection> bkgCollection = std::make_unique<PixelRDO_Collection>(bkgElementHash); + ASSERT_TRUE(inputBkgDataHandle->addCollection(bkgCollection.get(),bkgElementHash).isSuccess()); + bkgCollection.release(); // Now owned by inputBkgDataHandle + + // ordering A, C, B is on purpose to test for unintended alphabetic ordering + std::string inputSigPropertyValue = "'StoreGateSvc+PixelRDOs_SIG2'"; + std::string inputBkgPropertyValue = "'StoreGateSvc+PixelRDOs_BKG2'"; + std::string outputPropertyValue = "'StoreGateSvc+PixelRDOs2'"; + ASSERT_TRUE( m_alg->setProperty( "SignalInputKey", inputSigPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "BkgInputKey", inputBkgPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->initialize().isSuccess() ); + ASSERT_TRUE( m_alg->execute().isSuccess() ); + // check output makes sense + SG::ReadHandle<PixelRDO_Container> outputDataHandle{"StoreGateSvc+PixelRDOs2"}; + ASSERT_TRUE( outputDataHandle.isValid() ); + const PixelRDO_Collection *outputCollection1 = outputDataHandle->indexFindPtr(sigElementHash); + ASSERT_TRUE( outputCollection1!=nullptr ); + ASSERT_TRUE( outputCollection1->empty() ); + const PixelRDO_Collection *outputCollection2 = outputDataHandle->indexFindPtr(bkgElementHash); + ASSERT_TRUE( outputCollection2!=nullptr ); + ASSERT_TRUE( outputCollection2->empty() ); + } + + TEST_F(PixelOverlay_test, containers_with_matching_collections_one_with_an_RDO) { + SG::WriteHandle<PixelRDO_Container> inputSigDataHandle{"StoreGateSvc+PixelRDOs_SIG3"}; + const unsigned int containerSize(1188); + const IdentifierHash sigElementHash(1); + const IdentifierHash bkgElementHash(1); + const unsigned int sigToT(10); + const unsigned int sigBCID(2); + inputSigDataHandle = std::make_unique<PixelRDO_Container>(containerSize); + std::unique_ptr<PixelRDO_Collection> sigCollection = std::make_unique<PixelRDO_Collection>(sigElementHash); + //Add a Pixel1RawData object + std::unique_ptr<Pixel1RawData> sigDigit = std::make_unique<Pixel1RawData>(Identifier(12),sigToT,sigBCID-1,0,sigBCID-1); + sigCollection->push_back(sigDigit.release()); + ASSERT_TRUE(inputSigDataHandle->addCollection(sigCollection.get(),sigElementHash).isSuccess()); + sigCollection.release(); // Now owned by inputSigDataHandle + SG::WriteHandle<PixelRDO_Container> inputBkgDataHandle{"StoreGateSvc+PixelRDOs_BKG3"}; + inputBkgDataHandle = std::make_unique<PixelRDO_Container>(containerSize); + std::unique_ptr<PixelRDO_Collection> bkgCollection = std::make_unique<PixelRDO_Collection>(bkgElementHash); + ASSERT_TRUE(inputBkgDataHandle->addCollection(bkgCollection.get(),bkgElementHash).isSuccess()); + bkgCollection.release(); // Now owned by inputBkgDataHandle + + // ordering A, C, B is on purpose to test for unintended alphabetic ordering + std::string inputSigPropertyValue = "'StoreGateSvc+PixelRDOs_SIG3'"; + std::string inputBkgPropertyValue = "'StoreGateSvc+PixelRDOs_BKG3'"; + std::string outputPropertyValue = "'StoreGateSvc+PixelRDOs3'"; + ASSERT_TRUE( m_alg->setProperty( "SignalInputKey", inputSigPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "BkgInputKey", inputBkgPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->initialize().isSuccess() ); + ASSERT_TRUE( m_alg->execute().isSuccess() ); + // check output makes sense + SG::ReadHandle<PixelRDO_Container> outputDataHandle{"StoreGateSvc+PixelRDOs3"}; + ASSERT_TRUE( outputDataHandle.isValid() ); + const PixelRDO_Collection *outputCollection1 = outputDataHandle->indexFindPtr(sigElementHash); + ASSERT_TRUE( outputCollection1!=nullptr ); + ASSERT_TRUE( outputCollection1->size()==1 ); + const PixelRDORawData* outputDigit1 = outputCollection1->at(0); + ASSERT_TRUE( outputDigit1!=nullptr ); + ASSERT_TRUE( outputDigit1->getToT()==sigToT ); + ASSERT_TRUE( outputDigit1->getBCID()==sigBCID-1 ); + } + + TEST_F(PixelOverlay_test, containers_with_different_collections_one_RDO_each) { + SG::WriteHandle<PixelRDO_Container> inputSigDataHandle{"StoreGateSvc+PixelRDOs_SIG4"}; + const unsigned int containerSize(1188); + const IdentifierHash sigElementHash(1); + const IdentifierHash bkgElementHash(2); + const unsigned int sigToT(10); + const unsigned int bkgToT(10); + const unsigned int sigBCID(2); + const unsigned int bkgBCID(2); + inputSigDataHandle = std::make_unique<PixelRDO_Container>(containerSize); + std::unique_ptr<PixelRDO_Collection> sigCollection = std::make_unique<PixelRDO_Collection>(sigElementHash); + //Add a Pixel1RawData object + std::unique_ptr<Pixel1RawData> sigDigit = std::make_unique<Pixel1RawData>(Identifier(12),sigToT,sigBCID-1,0,sigBCID-1); + sigCollection->push_back(sigDigit.release()); + ASSERT_TRUE(inputSigDataHandle->addCollection(sigCollection.get(),sigElementHash).isSuccess()); + sigCollection.release(); // Now owned by inputSigDataHandle + SG::WriteHandle<PixelRDO_Container> inputBkgDataHandle{"StoreGateSvc+PixelRDOs_BKG4"}; + inputBkgDataHandle = std::make_unique<PixelRDO_Container>(containerSize); + std::unique_ptr<PixelRDO_Collection> bkgCollection = std::make_unique<PixelRDO_Collection>(bkgElementHash); + //Add a Pixel1RawData object + std::unique_ptr<Pixel1RawData> bkgDigit = std::make_unique<Pixel1RawData>(Identifier(12),bkgToT,bkgBCID-1,0,bkgBCID-1); + bkgCollection->push_back(bkgDigit.release()); + ASSERT_TRUE(inputBkgDataHandle->addCollection(bkgCollection.get(),bkgElementHash).isSuccess()); + bkgCollection.release(); // Now owned by inputBkgDataHandle + + // ordering A, C, B is on purpose to test for unintended alphabetic ordering + std::string inputSigPropertyValue = "'StoreGateSvc+PixelRDOs_SIG4'"; + std::string inputBkgPropertyValue = "'StoreGateSvc+PixelRDOs_BKG4'"; + std::string outputPropertyValue = "'StoreGateSvc+PixelRDOs4'"; + ASSERT_TRUE( m_alg->setProperty( "SignalInputKey", inputSigPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "BkgInputKey", inputBkgPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->initialize().isSuccess() ); + ASSERT_TRUE( m_alg->execute().isSuccess() ); + // check output makes sense + SG::ReadHandle<PixelRDO_Container> outputDataHandle{"StoreGateSvc+PixelRDOs4"}; + ASSERT_TRUE( outputDataHandle.isValid() ); + const PixelRDO_Collection *outputCollection1 = outputDataHandle->indexFindPtr(sigElementHash); + ASSERT_TRUE( outputCollection1!=nullptr ); + ASSERT_TRUE( outputCollection1->size()==1 ); + const PixelRDORawData* outputDigit1 = outputCollection1->at(0); + ASSERT_TRUE( outputDigit1!=nullptr ); + ASSERT_TRUE( outputDigit1->getToT()==sigToT ); + ASSERT_TRUE( outputDigit1->getBCID()==sigBCID-1 ); + const PixelRDO_Collection *outputCollection2 = outputDataHandle->indexFindPtr(bkgElementHash); + ASSERT_TRUE( outputCollection2!=nullptr ); + ASSERT_TRUE( outputCollection2->size()==1 ); + const PixelRDORawData* outputDigit2 = outputCollection2->at(0); + ASSERT_TRUE( outputDigit2!=nullptr ); + ASSERT_TRUE( outputDigit2->getToT()==bkgToT ); + ASSERT_TRUE( outputDigit2->getBCID()==bkgBCID-1 ); + } + + TEST_F(PixelOverlay_test, containers_with_matching_collections_one_different_RDO_each) { + SG::WriteHandle<PixelRDO_Container> inputSigDataHandle{"StoreGateSvc+PixelRDOs_SIG5"}; + const unsigned int containerSize(1188); + const IdentifierHash sigElementHash(1); + const IdentifierHash bkgElementHash(1); + const unsigned int sigToT(11); + const unsigned int bkgToT(10); + const unsigned int sigBCID(1); + const unsigned int bkgBCID(2); + inputSigDataHandle = std::make_unique<PixelRDO_Container>(containerSize); + std::unique_ptr<PixelRDO_Collection> sigCollection = std::make_unique<PixelRDO_Collection>(sigElementHash); + //Add a Pixel1RawData object + std::unique_ptr<Pixel1RawData> sigDigit = std::make_unique<Pixel1RawData>(Identifier(12),sigToT,sigBCID-1,0,sigBCID-1); + sigCollection->push_back(sigDigit.release()); + ASSERT_TRUE(inputSigDataHandle->addCollection(sigCollection.get(),sigElementHash).isSuccess()); + sigCollection.release(); // Now owned by inputSigDataHandle + SG::WriteHandle<PixelRDO_Container> inputBkgDataHandle{"StoreGateSvc+PixelRDOs_BKG5"}; + inputBkgDataHandle = std::make_unique<PixelRDO_Container>(containerSize); + std::unique_ptr<PixelRDO_Collection> bkgCollection = std::make_unique<PixelRDO_Collection>(bkgElementHash); + //Add a Pixel1RawData object + std::unique_ptr<Pixel1RawData> bkgDigit = std::make_unique<Pixel1RawData>(Identifier(13),bkgToT,bkgBCID-1,0,bkgBCID-1); + bkgCollection->push_back(bkgDigit.release()); + ASSERT_TRUE(inputBkgDataHandle->addCollection(bkgCollection.get(),bkgElementHash).isSuccess()); + bkgCollection.release(); // Now owned by inputBkgDataHandle + + // ordering A, C, B is on purpose to test for unintended alphabetic ordering + std::string inputSigPropertyValue = "'StoreGateSvc+PixelRDOs_SIG5'"; + std::string inputBkgPropertyValue = "'StoreGateSvc+PixelRDOs_BKG5'"; + std::string outputPropertyValue = "'StoreGateSvc+PixelRDOs5'"; + ASSERT_TRUE( m_alg->setProperty( "SignalInputKey", inputSigPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "BkgInputKey", inputBkgPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->initialize().isSuccess() ); + ASSERT_TRUE( m_alg->execute().isSuccess() ); + // check output makes sense + SG::ReadHandle<PixelRDO_Container> outputDataHandle{"StoreGateSvc+PixelRDOs5"}; + ASSERT_TRUE( outputDataHandle.isValid() ); + const PixelRDO_Collection *outputCollection = outputDataHandle->indexFindPtr(sigElementHash); + ASSERT_TRUE( outputCollection!=nullptr ); + ASSERT_TRUE( outputCollection->size()==2 ); + const PixelRDORawData* outputDigit1 = outputCollection->at(0); + ASSERT_TRUE( outputDigit1!=nullptr ); + ASSERT_TRUE( outputDigit1->getToT()==sigToT ); // RDOs in same collection sorted according to Identifier + ASSERT_TRUE( outputDigit1->getBCID()==sigBCID-1 ); // RDOs in same collection sorted according to Identifier + const PixelRDORawData* outputDigit2 = outputCollection->at(1); + ASSERT_TRUE( outputDigit2!=nullptr ); + ASSERT_TRUE( outputDigit2->getToT()==bkgToT ); // RDOs in same collection sorted according to Identifier + ASSERT_TRUE( outputDigit2->getBCID()==bkgBCID-1 ); // RDOs in same collection sorted according to Identifier + } + + TEST_F(PixelOverlay_test, containers_with_matching_collections_one_matching_RDO_each) { + SG::WriteHandle<PixelRDO_Container> inputSigDataHandle{"StoreGateSvc+PixelRDOs_SIG6"}; + const unsigned int containerSize(1188); + const IdentifierHash sigElementHash(1); + const IdentifierHash bkgElementHash(1); + const unsigned int sigToT(10); + const unsigned int bkgToT(10); + const unsigned int sigBCID(2); + const unsigned int bkgBCID(2); + inputSigDataHandle = std::make_unique<PixelRDO_Container>(containerSize); + std::unique_ptr<PixelRDO_Collection> sigCollection = std::make_unique<PixelRDO_Collection>(sigElementHash); + //Add a Pixel1RawData object + std::unique_ptr<Pixel1RawData> sigDigit = std::make_unique<Pixel1RawData>(Identifier(12),sigToT,sigBCID-1,0,sigBCID-1); + sigCollection->push_back(sigDigit.release()); + ASSERT_TRUE(inputSigDataHandle->addCollection(sigCollection.get(),sigElementHash).isSuccess()); + sigCollection.release(); // Now owned by inputSigDataHandle + SG::WriteHandle<PixelRDO_Container> inputBkgDataHandle{"StoreGateSvc+PixelRDOs_BKG6"}; + inputBkgDataHandle = std::make_unique<PixelRDO_Container>(containerSize); + std::unique_ptr<PixelRDO_Collection> bkgCollection = std::make_unique<PixelRDO_Collection>(bkgElementHash); + //Add a Pixel1RawData object + std::unique_ptr<Pixel1RawData> bkgDigit = std::make_unique<Pixel1RawData>(Identifier(12),bkgToT,bkgBCID-1,0,bkgBCID-1); + bkgCollection->push_back(bkgDigit.release()); + ASSERT_TRUE(inputBkgDataHandle->addCollection(bkgCollection.get(),bkgElementHash).isSuccess()); + bkgCollection.release(); // Now owned by inputBkgDataHandle + + // ordering A, C, B is on purpose to test for unintended alphabetic ordering + std::string inputSigPropertyValue = "'StoreGateSvc+PixelRDOs_SIG6'"; + std::string inputBkgPropertyValue = "'StoreGateSvc+PixelRDOs_BKG6'"; + std::string outputPropertyValue = "'StoreGateSvc+PixelRDOs6'"; + ASSERT_TRUE( m_alg->setProperty( "SignalInputKey", inputSigPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "BkgInputKey", inputBkgPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->initialize().isSuccess() ); + ASSERT_TRUE( m_alg->execute().isSuccess() ); + + // check output makes sense + SG::ReadHandle<PixelRDO_Container> outputDataHandle{"StoreGateSvc+PixelRDOs6"}; + ASSERT_TRUE( outputDataHandle.isValid() ); + const PixelRDO_Collection *outputCollection = outputDataHandle->indexFindPtr(sigElementHash); + ASSERT_TRUE( outputCollection!=nullptr ); + ASSERT_TRUE( outputCollection->size()==1 ); + const PixelRDORawData* outputDigit1 = outputCollection->at(0); + ASSERT_TRUE( outputDigit1!=nullptr ); + ASSERT_TRUE( outputDigit1->getToT()==bkgToT ); // Bkg RDO taken in case of matching Identifiers + ASSERT_TRUE( outputDigit1->getBCID()==bkgBCID-1 ); // Bkg RDO taken in case of matching Identifiers + } + + TEST_F(PixelOverlay_test, two_RDOs_with_matching_id_signal_first) { + SG::WriteHandle<PixelRDO_Container> inputSigDataHandle{"StoreGateSvc+PixelRDOs_SIG7"}; + const unsigned int containerSize(1188); + const IdentifierHash sigElementHash(1); + const IdentifierHash bkgElementHash(1); + const unsigned int sigToT(11); + const unsigned int bkgToT(10); + const unsigned int sigBCID(1); + const unsigned int bkgBCID(2); + inputSigDataHandle = std::make_unique<PixelRDO_Container>(containerSize); + std::unique_ptr<PixelRDO_Collection> sigCollection = std::make_unique<PixelRDO_Collection>(sigElementHash); + //Add a Pixel1RawData object + std::unique_ptr<Pixel1RawData> sigDigit = std::make_unique<Pixel1RawData>(Identifier(12),sigToT,sigBCID-1,0,sigBCID-1); + sigCollection->push_back(sigDigit.release()); + ASSERT_TRUE(inputSigDataHandle->addCollection(sigCollection.get(),sigElementHash).isSuccess()); + sigCollection.release(); // Now owned by inputSigDataHandle + SG::WriteHandle<PixelRDO_Container> inputBkgDataHandle{"StoreGateSvc+PixelRDOs_BKG7"}; + inputBkgDataHandle = std::make_unique<PixelRDO_Container>(containerSize); + std::unique_ptr<PixelRDO_Collection> bkgCollection = std::make_unique<PixelRDO_Collection>(bkgElementHash); + //Add a Pixel1RawData object + std::unique_ptr<Pixel1RawData> bkgDigit = std::make_unique<Pixel1RawData>(Identifier(12),bkgToT,bkgBCID-1,0,bkgBCID-1); + bkgCollection->push_back(bkgDigit.release()); + ASSERT_TRUE(inputBkgDataHandle->addCollection(bkgCollection.get(),bkgElementHash).isSuccess()); + bkgCollection.release(); // Now owned by inputBkgDataHandle + + // ordering A, C, B is on purpose to test for unintended alphabetic ordering + std::string inputSigPropertyValue = "'StoreGateSvc+PixelRDOs_SIG7'"; + std::string inputBkgPropertyValue = "'StoreGateSvc+PixelRDOs_BKG7'"; + std::string outputPropertyValue = "'StoreGateSvc+PixelRDOs7'"; + ASSERT_TRUE( m_alg->setProperty( "SignalInputKey", inputSigPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "BkgInputKey", inputBkgPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->initialize().isSuccess() ); + ASSERT_TRUE( m_alg->execute().isSuccess() ); + // check output makes sense + SG::ReadHandle<PixelRDO_Container> outputDataHandle{"StoreGateSvc+PixelRDOs7"}; + ASSERT_TRUE( outputDataHandle.isValid() ); + const PixelRDO_Collection *outputCollection = outputDataHandle->indexFindPtr(sigElementHash); + ASSERT_TRUE( outputCollection!=nullptr ); + ASSERT_TRUE( outputCollection->size()==1 ); + const PixelRDORawData* outputDigit1 = outputCollection->at(0); + ASSERT_TRUE( outputDigit1!=nullptr ); + ASSERT_TRUE( outputDigit1->getToT()==sigToT ); // Signal RDO taken in case of matching Identifiers + ASSERT_TRUE( outputDigit1->getBCID()==sigBCID-1 ); // Signal RDO taken in case of matching Identifiers + } + + TEST_F(PixelOverlay_test, two_RDOs_with_matching_id_bkg_first) { + SG::WriteHandle<PixelRDO_Container> inputSigDataHandle{"StoreGateSvc+PixelRDOs_SIG8"}; + const unsigned int containerSize(1188); + const IdentifierHash sigElementHash(1); + const IdentifierHash bkgElementHash(1); + const unsigned int sigToT(11); + const unsigned int bkgToT(10); + const unsigned int sigBCID(2); + const unsigned int bkgBCID(1); + inputSigDataHandle = std::make_unique<PixelRDO_Container>(containerSize); + std::unique_ptr<PixelRDO_Collection> sigCollection = std::make_unique<PixelRDO_Collection>(sigElementHash); + //Add a Pixel1RawData object + std::unique_ptr<Pixel1RawData> sigDigit = std::make_unique<Pixel1RawData>(Identifier(12),sigToT,sigBCID-1,0,sigBCID-1); + sigCollection->push_back(sigDigit.release()); + ASSERT_TRUE(inputSigDataHandle->addCollection(sigCollection.get(),sigElementHash).isSuccess()); + sigCollection.release(); // Now owned by inputSigDataHandle + SG::WriteHandle<PixelRDO_Container> inputBkgDataHandle{"StoreGateSvc+PixelRDOs_BKG8"}; + inputBkgDataHandle = std::make_unique<PixelRDO_Container>(containerSize); + std::unique_ptr<PixelRDO_Collection> bkgCollection = std::make_unique<PixelRDO_Collection>(bkgElementHash); + //Add a Pixel1RawData object + std::unique_ptr<Pixel1RawData> bkgDigit = std::make_unique<Pixel1RawData>(Identifier(12),bkgToT,bkgBCID-1,0,bkgBCID-1); + bkgCollection->push_back(bkgDigit.release()); + ASSERT_TRUE(inputBkgDataHandle->addCollection(bkgCollection.get(),bkgElementHash).isSuccess()); + bkgCollection.release(); // Now owned by inputBkgDataHandle + + // ordering A, C, B is on purpose to test for unintended alphabetic ordering + std::string inputSigPropertyValue = "'StoreGateSvc+PixelRDOs_SIG8'"; + std::string inputBkgPropertyValue = "'StoreGateSvc+PixelRDOs_BKG8'"; + std::string outputPropertyValue = "'StoreGateSvc+PixelRDOs8'"; + ASSERT_TRUE( m_alg->setProperty( "SignalInputKey", inputSigPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "BkgInputKey", inputBkgPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->initialize().isSuccess() ); + ASSERT_TRUE( m_alg->execute().isSuccess() ); + // check output makes sense + SG::ReadHandle<PixelRDO_Container> outputDataHandle{"StoreGateSvc+PixelRDOs8"}; + ASSERT_TRUE( outputDataHandle.isValid() ); + const PixelRDO_Collection *outputCollection = outputDataHandle->indexFindPtr(sigElementHash); + ASSERT_TRUE( outputCollection!=nullptr ); + ASSERT_TRUE( outputCollection->size()==1 ); + const PixelRDORawData* outputDigit1 = outputCollection->at(0); + ASSERT_TRUE( outputDigit1!=nullptr ); + ASSERT_TRUE( outputDigit1->getToT()==sigToT ); // Signal RDO taken in case of matching Identifiers + ASSERT_TRUE( outputDigit1->getBCID()==sigBCID-1 ); // Signal RDO taken in case of matching Identifiers + } + + TEST_F(PixelOverlay_test, containers_with_matching_collections_one_different_RDO_each_v2) { + SG::WriteHandle<PixelRDO_Container> inputSigDataHandle{"StoreGateSvc+PixelRDOs_SIG9"}; + const unsigned int containerSize(1188); + const IdentifierHash sigElementHash(1); + const IdentifierHash bkgElementHash(1); + const unsigned int sigToT(11); + const unsigned int bkgToT(10); + const unsigned int sigBCID(1); + const unsigned int bkgBCID(2); + inputSigDataHandle = std::make_unique<PixelRDO_Container>(containerSize); + std::unique_ptr<PixelRDO_Collection> sigCollection = std::make_unique<PixelRDO_Collection>(sigElementHash); + //Add a Pixel1RawData object + std::unique_ptr<Pixel1RawData> sigDigit = std::make_unique<Pixel1RawData>(Identifier(13),sigToT,sigBCID-1,0,sigBCID-1); + sigCollection->push_back(sigDigit.release()); + ASSERT_TRUE(inputSigDataHandle->addCollection(sigCollection.get(),sigElementHash).isSuccess()); + sigCollection.release(); // Now owned by inputSigDataHandle + SG::WriteHandle<PixelRDO_Container> inputBkgDataHandle{"StoreGateSvc+PixelRDOs_BKG9"}; + inputBkgDataHandle = std::make_unique<PixelRDO_Container>(containerSize); + std::unique_ptr<PixelRDO_Collection> bkgCollection = std::make_unique<PixelRDO_Collection>(bkgElementHash); + //Add a Pixel1RawData object + std::unique_ptr<Pixel1RawData> bkgDigit = std::make_unique<Pixel1RawData>(Identifier(12),bkgToT,bkgBCID-1,0,bkgBCID-1); + bkgCollection->push_back(bkgDigit.release()); + ASSERT_TRUE(inputBkgDataHandle->addCollection(bkgCollection.get(),bkgElementHash).isSuccess()); + bkgCollection.release(); // Now owned by inputBkgDataHandle + + // ordering A, C, B is on purpose to test for unintended alphabetic ordering + std::string inputSigPropertyValue = "'StoreGateSvc+PixelRDOs_SIG9'"; + std::string inputBkgPropertyValue = "'StoreGateSvc+PixelRDOs_BKG9'"; + std::string outputPropertyValue = "'StoreGateSvc+PixelRDOs9'"; + ASSERT_TRUE( m_alg->setProperty( "SignalInputKey", inputSigPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "BkgInputKey", inputBkgPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->initialize().isSuccess() ); + ASSERT_TRUE( m_alg->execute().isSuccess() ); + // check output makes sense + SG::ReadHandle<PixelRDO_Container> outputDataHandle{"StoreGateSvc+PixelRDOs9"}; + ASSERT_TRUE( outputDataHandle.isValid() ); + const PixelRDO_Collection *outputCollection = outputDataHandle->indexFindPtr(sigElementHash); + ASSERT_TRUE( outputCollection!=nullptr ); + ASSERT_TRUE( outputCollection->size()==2 ); + const PixelRDORawData* outputDigit1 = outputCollection->at(0); + ASSERT_TRUE( outputDigit1!=nullptr ); + ASSERT_TRUE( outputDigit1->getToT()==bkgToT ); // RDOs in same collection sorted according to Identifier + ASSERT_TRUE( outputDigit1->getBCID()==bkgBCID-1 ); // RDOs in same collection sorted according to Identifier + const PixelRDORawData* outputDigit2 = outputCollection->at(1); + ASSERT_TRUE( outputDigit2!=nullptr ); + ASSERT_TRUE( outputDigit2->getToT()==sigToT ); // RDOs in same collection sorted according to Identifier + ASSERT_TRUE( outputDigit2->getBCID()==sigBCID-1 ); // RDOs in same collection sorted according to Identifier + } + +} // <-- namespace OverlayTesting + + +int main(int argc, char *argv[]) +{ + ::testing::InitGoogleTest( &argc, argv ); + ::testing::AddGlobalTestEnvironment( new OverlayTesting::GaudiEnvironment ); + return RUN_ALL_TESTS(); +} diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/test/SCTOverlay_test.cxx b/InnerDetector/InDetRawAlgs/InDetOverlay/test/SCTOverlay_test.cxx new file mode 100644 index 0000000000000000000000000000000000000000..7c5f9245b9ea34927af0d41939069bb78fb3e1a8 --- /dev/null +++ b/InnerDetector/InDetRawAlgs/InDetOverlay/test/SCTOverlay_test.cxx @@ -0,0 +1,413 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +/** + * @author John Chapman + * @brief Tests for SCTOverlay. + */ + +#undef NDEBUG + +// Framework +#include "TestTools/initGaudi.h" + +// Google Test +#include "gtest/gtest.h" + +#include <vector> + +// Tested AthAlgorithm +#include "../InDetOverlay/SCTOverlay.h" +#include "InDetIdentifier/SCT_ID.h" +#include "IdDictParser/IdDictParser.h" +#include "GaudiKernel/MsgStream.h" + +namespace OverlayTesting { + + // needed every time an AthAlgorithm, AthAlgTool or AthService is instantiated + ISvcLocator* g_svcLoc = nullptr; + + // global test environment takes care of setting up Gaudi + class GaudiEnvironment : public ::testing::Environment { + protected: + virtual void SetUp() override { + Athena_test::initGaudi("StoreGateTestCommon.txt", OverlayTesting::g_svcLoc); + } + }; + + class SCTOverlay_test : public ::testing::Test { + + protected: + virtual void SetUp() override { + m_alg = new SCTOverlay{"SCTOverlay", g_svcLoc}; + ASSERT_TRUE( m_alg->setProperties().isSuccess() ); + + StoreGateSvc *detStore(nullptr); + ASSERT_TRUE( OverlayTesting::g_svcLoc->service("DetectorStore", detStore, true).isSuccess() ); + if (detStore) { + if (not detStore->contains<SCT_ID>("SCT_ID")) { + auto sct_id = std::make_unique<SCT_ID>(); + IdDictParser parser; + parser.register_external_entity ("InnerDetector", + "IdDictInnerDetector.xml"); + IdDictMgr& idd = parser.parse ("IdDictParser/ATLAS_IDS.xml"); + sct_id->initialize_from_dictionary (idd); + ASSERT_TRUE( detStore->record (std::move (sct_id), "SCT_ID").isSuccess() ); + } + } + } + + virtual void TearDown() override { + StoreGateSvc *evtStore(nullptr); + ASSERT_TRUE( OverlayTesting::g_svcLoc->service("StoreGateSvc", evtStore, true).isSuccess() ); + evtStore->clearStore(true); + ASSERT_TRUE( m_alg->finalize().isSuccess() ); + delete m_alg; + } + + void configureSCTOverlay() { + // ordering C, A, B is on purpose to test for unintended alphabetic ordering + std::string inputSigPropertyValue = "'StoreGateSvc+SCT_RDOs_SIG'"; + std::string inputBkgPropertyValue = "'StoreGateSvc+SCT_RDOs_BKG'"; + std::string outputPropertyValue = "'StoreGateSvc+SCT_RDOs'"; + ASSERT_TRUE( m_alg->setProperty( "SignalInputKey", inputSigPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "BkgInputKey", inputBkgPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() ); + } + SCTOverlay* m_alg; + }; // SCTOverlay_test fixture + + + TEST_F(SCTOverlay_test, set_properties) { + configureSCTOverlay(); + ASSERT_TRUE( m_alg->initialize().isSuccess() ); + ASSERT_TRUE( m_alg->execute().isFailure() ); //inputs don't exist + } + + TEST_F(SCTOverlay_test, empty_containers_alg_execute) { + SG::WriteHandle<SCT_RDO_Container> inputSigDataHandle{"StoreGateSvc+SCT_RDOs_SIG"}; + const unsigned int containerSize(1188); + inputSigDataHandle = std::make_unique<SCT_RDO_Container>(containerSize); + SG::WriteHandle<SCT_RDO_Container> inputBkgDataHandle{"StoreGateSvc+SCT_RDOs_BKG"}; + inputBkgDataHandle = std::make_unique<SCT_RDO_Container>(containerSize); + + configureSCTOverlay(); + ASSERT_TRUE( m_alg->initialize().isSuccess() ); + ASSERT_TRUE( m_alg->execute().isSuccess() ); + } + + TEST_F(SCTOverlay_test, containers_with_matching_empty_collections) { + SG::WriteHandle<SCT_RDO_Container> inputSigDataHandle{"StoreGateSvc+SCT_RDOs_SIG"}; + const unsigned int containerSize(1188); + IdentifierHash sigElementHash(1); + IdentifierHash bkgElementHash(1); + inputSigDataHandle = std::make_unique<SCT_RDO_Container>(containerSize); + std::unique_ptr<SCT_RDO_Collection> sigCollection = std::make_unique<SCT_RDO_Collection>(sigElementHash); + ASSERT_TRUE(inputSigDataHandle->addCollection(sigCollection.get(),sigElementHash).isSuccess()); + sigCollection.release(); // Now owned by inputSigDataHandle + SG::WriteHandle<SCT_RDO_Container> inputBkgDataHandle{"StoreGateSvc+SCT_RDOs_BKG"}; + inputBkgDataHandle = std::make_unique<SCT_RDO_Container>(containerSize); + std::unique_ptr<SCT_RDO_Collection> bkgCollection = std::make_unique<SCT_RDO_Collection>(bkgElementHash); + ASSERT_TRUE(inputBkgDataHandle->addCollection(bkgCollection.get(),bkgElementHash).isSuccess()); + bkgCollection.release(); // Now owned by inputBkgDataHandle + + configureSCTOverlay(); + ASSERT_TRUE( m_alg->initialize().isSuccess() ); + ASSERT_TRUE( m_alg->execute().isSuccess() ); + // check output makes sense + SG::ReadHandle<SCT_RDO_Container> outputDataHandle{"StoreGateSvc+SCT_RDOs"}; + ASSERT_TRUE( outputDataHandle.isValid() ); + const SCT_RDO_Collection *outputCollection = outputDataHandle->indexFindPtr(sigElementHash); + ASSERT_TRUE( outputCollection!=nullptr ); + ASSERT_TRUE( outputCollection->empty() ); + } + + TEST_F(SCTOverlay_test, containers_with_different_empty_collections) { + SG::WriteHandle<SCT_RDO_Container> inputSigDataHandle{"StoreGateSvc+SCT_RDOs_SIG"}; + const unsigned int containerSize(1188); + IdentifierHash sigElementHash(1); + IdentifierHash bkgElementHash(2); + inputSigDataHandle = std::make_unique<SCT_RDO_Container>(containerSize); + std::unique_ptr<SCT_RDO_Collection> sigCollection = std::make_unique<SCT_RDO_Collection>(sigElementHash); + ASSERT_TRUE(inputSigDataHandle->addCollection(sigCollection.get(),sigElementHash).isSuccess()); + sigCollection.release(); // Now owned by inputSigDataHandle + SG::WriteHandle<SCT_RDO_Container> inputBkgDataHandle{"StoreGateSvc+SCT_RDOs_BKG"}; + inputBkgDataHandle = std::make_unique<SCT_RDO_Container>(containerSize); + std::unique_ptr<SCT_RDO_Collection> bkgCollection = std::make_unique<SCT_RDO_Collection>(bkgElementHash); + ASSERT_TRUE(inputBkgDataHandle->addCollection(bkgCollection.get(),bkgElementHash).isSuccess()); + bkgCollection.release(); // Now owned by inputBkgDataHandle + + configureSCTOverlay(); + ASSERT_TRUE( m_alg->initialize().isSuccess() ); + ASSERT_TRUE( m_alg->execute().isSuccess() ); + // check output makes sense + SG::ReadHandle<SCT_RDO_Container> outputDataHandle{"StoreGateSvc+SCT_RDOs"}; + ASSERT_TRUE( outputDataHandle.isValid() ); + const SCT_RDO_Collection *outputCollection1 = outputDataHandle->indexFindPtr(sigElementHash); + ASSERT_TRUE( outputCollection1!=nullptr ); + ASSERT_TRUE( outputCollection1->empty() ); + const SCT_RDO_Collection *outputCollection2 = outputDataHandle->indexFindPtr(bkgElementHash); + ASSERT_TRUE( outputCollection2!=nullptr ); + ASSERT_TRUE( outputCollection2->empty() ); + } + + TEST_F(SCTOverlay_test, containers_with_matching_collections_one_with_an_RDO) { + SG::WriteHandle<SCT_RDO_Container> inputSigDataHandle{"StoreGateSvc+SCT_RDOs_SIG"}; + const unsigned int containerSize(1188); + const IdentifierHash sigElementHash(1); + const IdentifierHash bkgElementHash(1); + const int sigGroupSize(1); + const int sigTimeBin(1 << SCTOverlay::CurrentBC); + const int sigStrip(10); + const int sigErrors(0); + const unsigned int sigWord(sigGroupSize | (sigStrip << 11) | (sigTimeBin << 22) | (sigErrors << 25)); + std::vector<int> sigErrorVect{}; + inputSigDataHandle = std::make_unique<SCT_RDO_Container>(containerSize); + std::unique_ptr<SCT_RDO_Collection> sigCollection = std::make_unique<SCT_RDO_Collection>(sigElementHash); + //Add a SCT3_RawData object + std::unique_ptr<SCT3_RawData> sigDigit = std::make_unique<SCT3_RawData>(Identifier(12),sigWord, &sigErrorVect); + sigCollection->push_back(sigDigit.release()); + ASSERT_TRUE(inputSigDataHandle->addCollection(sigCollection.get(),sigElementHash).isSuccess()); + sigCollection.release(); // Now owned by inputSigDataHandle + SG::WriteHandle<SCT_RDO_Container> inputBkgDataHandle{"StoreGateSvc+SCT_RDOs_BKG"}; + inputBkgDataHandle = std::make_unique<SCT_RDO_Container>(containerSize); + std::unique_ptr<SCT_RDO_Collection> bkgCollection = std::make_unique<SCT_RDO_Collection>(bkgElementHash); + ASSERT_TRUE(inputBkgDataHandle->addCollection(bkgCollection.get(),bkgElementHash).isSuccess()); + bkgCollection.release(); // Now owned by inputBkgDataHandle + + configureSCTOverlay(); + ASSERT_TRUE( m_alg->initialize().isSuccess() ); + ASSERT_TRUE( m_alg->execute().isSuccess() ); + // check output makes sense + SG::ReadHandle<SCT_RDO_Container> outputDataHandle{"StoreGateSvc+SCT_RDOs"}; + ASSERT_TRUE( outputDataHandle.isValid() ); + const SCT_RDO_Collection *outputCollection1 = outputDataHandle->indexFindPtr(sigElementHash); + ASSERT_TRUE( outputCollection1!=nullptr ); + ASSERT_TRUE( outputCollection1->size()==1 ); + const SCT3_RawData* outputDigit1 = dynamic_cast<const SCT3_RawData*>(outputCollection1->at(0)); + ASSERT_TRUE( outputDigit1!=nullptr ); + ASSERT_TRUE( outputDigit1->getGroupSize()==sigGroupSize ); + ASSERT_TRUE( outputDigit1->getTimeBin()==sigTimeBin ); + } + + TEST_F(SCTOverlay_test, containers_with_different_collections_one_RDO_each) { + SG::WriteHandle<SCT_RDO_Container> inputSigDataHandle{"StoreGateSvc+SCT_RDOs_SIG"}; + const unsigned int containerSize(1188); + const IdentifierHash sigElementHash(1); + const IdentifierHash bkgElementHash(2); + const int sigGroupSize(1); + const int sigTimeBin(1 << SCTOverlay::CurrentBC); + const int sigStrip(10); + const int sigErrors(0); + const unsigned int sigWord(sigGroupSize | (sigStrip << 11) | (sigTimeBin << 22) | (sigErrors << 25)); + std::vector<int> sigErrorVect{}; + const int bkgGroupSize(1); + const int bkgTimeBin(1 << SCTOverlay::CurrentBC ); + const int bkgStrip(10); + const int bkgErrors(0); + const unsigned int bkgWord(bkgGroupSize | (bkgStrip << 11) | (bkgTimeBin << 22) | (bkgErrors << 25)); + std::vector<int> bkgErrorVect{}; + inputSigDataHandle = std::make_unique<SCT_RDO_Container>(containerSize); + std::unique_ptr<SCT_RDO_Collection> sigCollection = std::make_unique<SCT_RDO_Collection>(sigElementHash); + //Add a SCT3_RawData object + std::unique_ptr<SCT3_RawData> sigDigit = std::make_unique<SCT3_RawData>(Identifier(12),sigWord, &sigErrorVect); + sigCollection->push_back(sigDigit.release()); + ASSERT_TRUE(inputSigDataHandle->addCollection(sigCollection.get(),sigElementHash).isSuccess()); + sigCollection.release(); // Now owned by inputSigDataHandle + SG::WriteHandle<SCT_RDO_Container> inputBkgDataHandle{"StoreGateSvc+SCT_RDOs_BKG"}; + inputBkgDataHandle = std::make_unique<SCT_RDO_Container>(containerSize); + std::unique_ptr<SCT_RDO_Collection> bkgCollection = std::make_unique<SCT_RDO_Collection>(bkgElementHash); + //Add a SCT3_RawData object + std::unique_ptr<SCT3_RawData> bkgDigit = std::make_unique<SCT3_RawData>(Identifier(12),bkgWord,&bkgErrorVect); + bkgCollection->push_back(bkgDigit.release()); + ASSERT_TRUE(inputBkgDataHandle->addCollection(bkgCollection.get(),bkgElementHash).isSuccess()); + bkgCollection.release(); // Now owned by inputBkgDataHandle + + configureSCTOverlay(); + ASSERT_TRUE( m_alg->initialize().isSuccess() ); + ASSERT_TRUE( m_alg->execute().isSuccess() ); + // check output makes sense + SG::ReadHandle<SCT_RDO_Container> outputDataHandle{"StoreGateSvc+SCT_RDOs"}; + ASSERT_TRUE( outputDataHandle.isValid() ); + const SCT_RDO_Collection *outputCollection1 = outputDataHandle->indexFindPtr(sigElementHash); + ASSERT_TRUE( outputCollection1!=nullptr ); + ASSERT_TRUE( outputCollection1->size()==1 ); + const SCT3_RawData* outputDigit1 = dynamic_cast<const SCT3_RawData*>(outputCollection1->at(0)); + ASSERT_TRUE( outputDigit1!=nullptr ); + ASSERT_TRUE( outputDigit1->getGroupSize()==sigGroupSize ); + ASSERT_TRUE( outputDigit1->getTimeBin()==sigTimeBin ); + const SCT_RDO_Collection *outputCollection2 = outputDataHandle->indexFindPtr(bkgElementHash); + ASSERT_TRUE( outputCollection2!=nullptr ); + ASSERT_TRUE( outputCollection2->size()==1 ); + const SCT3_RawData* outputDigit2 = dynamic_cast<const SCT3_RawData*>(outputCollection2->at(0)); + ASSERT_TRUE( outputDigit2!=nullptr ); + ASSERT_TRUE( outputDigit2->getGroupSize()==bkgGroupSize ); + ASSERT_TRUE( outputDigit2->getTimeBin()==bkgTimeBin ); + } + + TEST_F(SCTOverlay_test, containers_with_matching_collections_with_adjecent_RDOs) { + SG::WriteHandle<SCT_RDO_Container> inputSigDataHandle{"StoreGateSvc+SCT_RDOs_SIG"}; + const unsigned int containerSize(1188); + const IdentifierHash sigElementHash(1); + const IdentifierHash bkgElementHash(1); + const int sigGroupSize(1); + const int sigTimeBin(1 << SCTOverlay::CurrentBC); + const int sigStrip(10); + const int sigErrors(0); + const unsigned int sigWord(sigGroupSize | (sigStrip << 11) | (sigTimeBin << 22) | (sigErrors << 25)); + std::vector<int> sigErrorVect{}; + const int bkgGroupSize(2); + const int bkgTimeBin(1 << SCTOverlay::CurrentBC); + const int bkgStrip(11); + const int bkgErrors(0); + const unsigned int bkgWord(bkgGroupSize | (bkgStrip << 11) | (bkgTimeBin << 22) | (bkgErrors << 25)); + std::vector<int> bkgErrorVect{}; + inputSigDataHandle = std::make_unique<SCT_RDO_Container>(containerSize); + std::unique_ptr<SCT_RDO_Collection> sigCollection = std::make_unique<SCT_RDO_Collection>(sigElementHash); + //Add a SCT3_RawData object + std::unique_ptr<SCT3_RawData> sigDigit = std::make_unique<SCT3_RawData>(Identifier(12),sigWord,&sigErrorVect); + sigCollection->push_back(sigDigit.release()); + ASSERT_TRUE(inputSigDataHandle->addCollection(sigCollection.get(),sigElementHash).isSuccess()); + sigCollection.release(); // Now owned by inputSigDataHandle + SG::WriteHandle<SCT_RDO_Container> inputBkgDataHandle{"StoreGateSvc+SCT_RDOs_BKG"}; + inputBkgDataHandle = std::make_unique<SCT_RDO_Container>(containerSize); + std::unique_ptr<SCT_RDO_Collection> bkgCollection = std::make_unique<SCT_RDO_Collection>(bkgElementHash); + //Add a SCT3_RawData object + std::unique_ptr<SCT3_RawData> bkgDigit = std::make_unique<SCT3_RawData>(Identifier(13),bkgWord,&bkgErrorVect); + bkgCollection->push_back(bkgDigit.release()); + ASSERT_TRUE(inputBkgDataHandle->addCollection(bkgCollection.get(),bkgElementHash).isSuccess()); + bkgCollection.release(); // Now owned by inputBkgDataHandle + + configureSCTOverlay(); + ASSERT_TRUE( m_alg->initialize().isSuccess() ); + ASSERT_TRUE( m_alg->execute().isSuccess() ); + // check output makes sense + SG::ReadHandle<SCT_RDO_Container> outputDataHandle{"StoreGateSvc+SCT_RDOs"}; + ASSERT_TRUE( outputDataHandle.isValid() ); + const SCT_RDO_Collection *outputCollection = outputDataHandle->indexFindPtr(sigElementHash); + ASSERT_TRUE( outputCollection!=nullptr ); + ASSERT_TRUE( outputCollection->size()==1 ); + const SCT3_RawData* outputDigit1 = dynamic_cast<const SCT3_RawData*>(outputCollection->at(0)); + ASSERT_TRUE( outputDigit1!=nullptr ); + ASSERT_TRUE( outputDigit1->getGroupSize()==sigGroupSize+bkgGroupSize ); // adjacent RDOs combined + ASSERT_TRUE( outputDigit1->getTimeBin()==sigTimeBin ); // TimeBin matches signal RDO + } + + TEST_F(SCTOverlay_test, containers_with_matching_collections_signal_overlapping_with_early_bkg) { + SG::WriteHandle<SCT_RDO_Container> inputSigDataHandle{"StoreGateSvc+SCT_RDOs_SIG"}; + const unsigned int containerSize(1188); + const IdentifierHash sigElementHash(1); + const IdentifierHash bkgElementHash(1); + const int sigGroupSize(3); + const int sigTimeBin(1 << SCTOverlay::CurrentBC); + const int sigStrip(10); + const int sigErrors(0); + const unsigned int sigWord(sigGroupSize | (sigStrip << 11) | (sigTimeBin << 22) | (sigErrors << 25)); + std::vector<int> sigErrorVect{}; + const int bkgGroupSize(1); + const int bkgTimeBin(1 << SCTOverlay::PreviousBC); + const int bkgStrip(11); + const int bkgErrors(0); + const unsigned int bkgWord(bkgGroupSize | (bkgStrip << 11) | (bkgTimeBin << 22) | (bkgErrors << 25)); + std::vector<int> bkgErrorVect{}; + inputSigDataHandle = std::make_unique<SCT_RDO_Container>(containerSize); + std::unique_ptr<SCT_RDO_Collection> sigCollection = std::make_unique<SCT_RDO_Collection>(sigElementHash); + //Add a SCT3_RawData object + std::unique_ptr<SCT3_RawData> sigDigit = std::make_unique<SCT3_RawData>(Identifier(12),sigWord,&sigErrorVect); + sigCollection->push_back(sigDigit.release()); + ASSERT_TRUE(inputSigDataHandle->addCollection(sigCollection.get(),sigElementHash).isSuccess()); + sigCollection.release(); // Now owned by inputSigDataHandle + SG::WriteHandle<SCT_RDO_Container> inputBkgDataHandle{"StoreGateSvc+SCT_RDOs_BKG"}; + inputBkgDataHandle = std::make_unique<SCT_RDO_Container>(containerSize); + std::unique_ptr<SCT_RDO_Collection> bkgCollection = std::make_unique<SCT_RDO_Collection>(bkgElementHash); + //Add a SCT3_RawData object + std::unique_ptr<SCT3_RawData> bkgDigit = std::make_unique<SCT3_RawData>(Identifier(13),bkgWord,&bkgErrorVect); + bkgCollection->push_back(bkgDigit.release()); + ASSERT_TRUE(inputBkgDataHandle->addCollection(bkgCollection.get(),bkgElementHash).isSuccess()); + bkgCollection.release(); // Now owned by inputBkgDataHandle + + configureSCTOverlay(); + ASSERT_TRUE( m_alg->initialize().isSuccess() ); + ASSERT_TRUE( m_alg->execute().isSuccess() ); + // check output makes sense + SG::ReadHandle<SCT_RDO_Container> outputDataHandle{"StoreGateSvc+SCT_RDOs"}; + ASSERT_TRUE( outputDataHandle.isValid() ); + const SCT_RDO_Collection *outputCollection = outputDataHandle->indexFindPtr(sigElementHash); + ASSERT_TRUE( outputCollection!=nullptr ); + ASSERT_TRUE( outputCollection->size()==3 ); + const SCT3_RawData* outputDigit1 = dynamic_cast<const SCT3_RawData*>(outputCollection->at(0)); + ASSERT_TRUE( outputDigit1!=nullptr ); + ASSERT_TRUE( outputDigit1->getGroupSize()==1 ); // Signal RDO split by overlapping RDO with different TimeBin + ASSERT_TRUE( outputDigit1->getTimeBin()==sigTimeBin ); // TimeBin matches signal RDO + const SCT3_RawData* outputDigit2 = dynamic_cast<const SCT3_RawData*>(outputCollection->at(1)); + ASSERT_TRUE( outputDigit2!=nullptr ); + ASSERT_TRUE( outputDigit2->getGroupSize()==1 ); // Signal RDO split by overlapping RDO with different TimeBin + ASSERT_TRUE( outputDigit2->getTimeBin()==bkgTimeBin+sigTimeBin ); // TimeBin is a sum of signal and background TimeBins + const SCT3_RawData* outputDigit3 = dynamic_cast<const SCT3_RawData*>(outputCollection->at(2)); + ASSERT_TRUE( outputDigit3!=nullptr ); + ASSERT_TRUE( outputDigit3->getGroupSize()==1 ); // Signal RDO split by overlapping RDO with different TimeBin + ASSERT_TRUE( outputDigit3->getTimeBin()==sigTimeBin ); // TimeBin matches background RDO + } + + TEST_F(SCTOverlay_test, containers_with_matching_collections_monkey) { + SG::WriteHandle<SCT_RDO_Container> inputSigDataHandle{"StoreGateSvc+SCT_RDOs_SIG"}; + const unsigned int containerSize(1188); + const IdentifierHash sigElementHash(1); + const IdentifierHash bkgElementHash(1); + const int sigGroupSize(1); + const int sigTimeBin(1 << SCTOverlay::CurrentBC); + const int sigStrip(10); + const int sigErrors(0); + const unsigned int sigWord(sigGroupSize | (sigStrip << 11) | (sigTimeBin << 22) | (sigErrors << 25)); + std::vector<int> sigErrorVect{}; + const int bkgGroupSize(1); + const int bkgTimeBin(1 << SCTOverlay::CurrentBC); + const int bkgStrip(40); + const int bkgErrors(0); + const unsigned int bkgWord(bkgGroupSize | (bkgStrip << 11) | (bkgTimeBin << 22) | (bkgErrors << 25)); + std::vector<int> bkgErrorVect{}; + inputSigDataHandle = std::make_unique<SCT_RDO_Container>(containerSize); + std::unique_ptr<SCT_RDO_Collection> sigCollection = std::make_unique<SCT_RDO_Collection>(sigElementHash); + //Add a SCT3_RawData object + std::unique_ptr<SCT3_RawData> sigDigit = std::make_unique<SCT3_RawData>(Identifier(12),sigWord,&sigErrorVect); + sigCollection->push_back(sigDigit.release()); + ASSERT_TRUE(inputSigDataHandle->addCollection(sigCollection.get(),sigElementHash).isSuccess()); + sigCollection.release(); // Now owned by inputSigDataHandle + SG::WriteHandle<SCT_RDO_Container> inputBkgDataHandle{"StoreGateSvc+SCT_RDOs_BKG"}; + inputBkgDataHandle = std::make_unique<SCT_RDO_Container>(containerSize); + std::unique_ptr<SCT_RDO_Collection> bkgCollection = std::make_unique<SCT_RDO_Collection>(bkgElementHash); + //Add a SCT3_RawData object + std::unique_ptr<SCT3_RawData> bkgDigit = std::make_unique<SCT3_RawData>(Identifier(40),bkgWord,&bkgErrorVect); + bkgCollection->push_back(bkgDigit.release()); + ASSERT_TRUE(inputBkgDataHandle->addCollection(bkgCollection.get(),bkgElementHash).isSuccess()); + bkgCollection.release(); // Now owned by inputBkgDataHandle + + configureSCTOverlay(); + ASSERT_TRUE( m_alg->initialize().isSuccess() ); + ASSERT_TRUE( m_alg->execute().isSuccess() ); + // check output makes sense + SG::ReadHandle<SCT_RDO_Container> outputDataHandle{"StoreGateSvc+SCT_RDOs"}; + ASSERT_TRUE( outputDataHandle.isValid() ); + const SCT_RDO_Collection *outputCollection = outputDataHandle->indexFindPtr(sigElementHash); + ASSERT_TRUE( outputCollection!=nullptr ); + ASSERT_TRUE( outputCollection->size()==2 ); + const SCT3_RawData* outputDigit1 = dynamic_cast<const SCT3_RawData*>(outputCollection->at(0)); + ASSERT_TRUE( outputDigit1!=nullptr ); + ASSERT_TRUE( outputDigit1->getGroupSize()==sigGroupSize ); // RDOs in same collection sorted according to Identifier + ASSERT_TRUE( outputDigit1->getTimeBin()==sigTimeBin ); // TimeBin matches signal RDO + const SCT3_RawData* outputDigit2 = dynamic_cast<const SCT3_RawData*>(outputCollection->at(1)); + ASSERT_TRUE( outputDigit2!=nullptr ); + ASSERT_TRUE( outputDigit2->getGroupSize()==bkgGroupSize ); // RDOs in same collection sorted according to Identifier + ASSERT_TRUE( outputDigit2->getTimeBin()==bkgTimeBin ); // TimeBin matches background RDO + } + +} // <-- namespace OverlayTesting + + +int main(int argc, char *argv[]) +{ + ::testing::InitGoogleTest( &argc, argv ); + ::testing::AddGlobalTestEnvironment( new OverlayTesting::GaudiEnvironment ); + return RUN_ALL_TESTS(); +} diff --git a/InnerDetector/InDetRawEvent/InDetRawData/InDetRawData/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetRawEvent/InDetRawData/InDetRawData/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..3f33a4d2822f771de2ff29f80f72ffe4c2d3763f --- /dev/null +++ b/InnerDetector/InDetRawEvent/InDetRawData/InDetRawData/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +InnerDetector/InDetRawEvent/InDetRawData diff --git a/InnerDetector/InDetRawEvent/InDetSimData/InDetSimData/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetRawEvent/InDetSimData/InDetSimData/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..d7ae968f921463afc9a88b05e0b53494b82f4490 --- /dev/null +++ b/InnerDetector/InDetRawEvent/InDetSimData/InDetSimData/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +InnerDetector/InDetRawEvent/InDetSimData diff --git a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/CMakeLists.txt b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/CMakeLists.txt index 9616ab15a64ac0ca005bb3f699d8b0c408c79829..cd3ae93527b62ba7cf40292a3371e44827d47ae0 100644 --- a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/CMakeLists.txt +++ b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/CMakeLists.txt @@ -22,16 +22,14 @@ atlas_depends_on_subdirs( PUBLIC InnerDetector/InDetDetDescr/InDetIdentifier InnerDetector/InDetDetDescr/InDetReadoutGeometry InnerDetector/InDetRecTools/TRT_DriftCircleTool - InnerDetector/InDetConditions/PixelConditionsData InnerDetector/InDetConditions/SCT_ConditionsData - InnerDetector/InDetConditions/SiLorentzAngleSvc ) # Component(s) in the package: atlas_add_component( InDetPrepRawDataFormation src/*.cxx src/components/*.cxx - LINK_LIBRARIES AthenaBaseComps StoreGateLib SGtests IRegionSelector Identifier GaudiKernel InDetRawData InDetPrepRawData SiClusterizationToolLib TrigSteeringEvent AtlasDetDescr InDetIdentifier InDetReadoutGeometry PixelConditionsData AthViews) + LINK_LIBRARIES AthenaBaseComps StoreGateLib SGtests IRegionSelector Identifier GaudiKernel InDetRawData InDetPrepRawData SiClusterizationToolLib TrigSteeringEvent AtlasDetDescr InDetIdentifier InDetReadoutGeometry AthViews) # Install files from the package: atlas_install_headers( InDetPrepRawDataFormation ) diff --git a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/InDetPrepRawDataFormation/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/InDetPrepRawDataFormation/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..39f44f5fcb1374b6b7326f64b7c7ab9e590ff350 --- /dev/null +++ b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/InDetPrepRawDataFormation/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation diff --git a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/CacheCreator.cxx b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/CacheCreator.cxx index ee0748889c00a8bdd8a412118f11d062729202ca..23153111ff4e1c375edf079a7360b514bd367b48 100644 --- a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/CacheCreator.cxx +++ b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/CacheCreator.cxx @@ -1,5 +1,5 @@ /* -Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ @@ -18,24 +18,8 @@ namespace InDet{ m_pTRTHelper(nullptr), m_pix_idHelper(nullptr), m_sct_idHelper(nullptr), - m_rioContainerCacheKey(""), - m_SCTclusterContainerCacheKey(""), - m_PIXclusterContainerCacheKey(""), - m_PIXSpacePointCacheKey(""), - m_SCTSpacePointCacheKey(""), - - m_SCTRDOCacheKey(""), m_PixRDOCacheKey(""), - m_disableTRT(false), m_disableWarning(false) + m_disableWarningCheck(false) { - declareProperty("TRT_DriftCircleKey", m_rioContainerCacheKey); - declareProperty("SCT_ClusterKey" , m_SCTclusterContainerCacheKey); - declareProperty("Pixel_ClusterKey" , m_PIXclusterContainerCacheKey); - declareProperty("SpacePointCachePix" , m_PIXSpacePointCacheKey); - declareProperty("SpacePointCacheSCT" , m_SCTSpacePointCacheKey); - declareProperty("SCTRDOCacheKey", m_SCTRDOCacheKey); - declareProperty("disableTRT" , m_disableTRT); - declareProperty("PixRDOCacheKey", m_PixRDOCacheKey); - declareProperty("DisableViewWarning", m_disableWarning); } @@ -47,8 +31,7 @@ namespace InDet{ ATH_CHECK( m_SCTSpacePointCacheKey.initialize(!m_SCTSpacePointCacheKey.key().empty()) ); ATH_CHECK( m_SCTRDOCacheKey.initialize(!m_SCTRDOCacheKey.key().empty()) ); ATH_CHECK( m_PixRDOCacheKey.initialize(!m_PixRDOCacheKey.key().empty()) ); - ATH_CHECK( m_condKey5.initialize() ); - if(!m_disableTRT) ATH_CHECK(detStore()->retrieve(m_pTRTHelper , "TRT_ID")); + if (!m_disableTRT.value()) ATH_CHECK(detStore()->retrieve(m_pTRTHelper , "TRT_ID")); ATH_CHECK(detStore()->retrieve(m_sct_idHelper, "SCT_ID")); ATH_CHECK(detStore()->retrieve(m_pix_idHelper, "PixelID")); return StatusCode::SUCCESS; @@ -66,15 +49,15 @@ namespace InDet{ StatusCode CacheCreator::execute (const EventContext& ctx) const { - if(!m_disableWarning){ - if(isInsideView(ctx)){ + if (!m_disableWarningCheck and !m_disableWarning.value()){ + if (isInsideView(ctx)){ ATH_MSG_ERROR("CacheCreator is running inside a view, this is probably a misconfiguration"); return StatusCode::FAILURE; } - m_disableWarning = true; //only check once + m_disableWarningCheck = true; //only check once } - if(!m_disableTRT) ATH_CHECK(createContainer(m_rioContainerCacheKey, m_pTRTHelper->straw_layer_hash_max(), ctx)); + if (!m_disableTRT.value()) ATH_CHECK(createContainer(m_rioContainerCacheKey, m_pTRTHelper->straw_layer_hash_max(), ctx)); ATH_CHECK(createContainer(m_SCTclusterContainerCacheKey, m_sct_idHelper->wafer_hash_max(), ctx)); diff --git a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/CacheCreator.h b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/CacheCreator.h index 16cc736a0568c03b297c0a81fe85b9825156e2b6..89e6aeb25715cc7d8d1d5794099294cee23a8366 100644 --- a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/CacheCreator.h +++ b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/CacheCreator.h @@ -1,5 +1,5 @@ /* -Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ @@ -16,13 +16,13 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration #include "InDetPrepRawData/TRT_DriftCircleContainer.h" #include "InDetPrepRawData/SCT_ClusterContainer.h" #include "TrkSpacePoint/SpacePointContainer.h" -#include "PixelConditionsData/PixelOfflineCalibData.h" #include "InDetRawData/SCT_RDO_Container.h" #include "InDetRawData/PixelRDO_Container.h" #include "AthenaPoolUtilities/CondAttrListCollection.h" -#include "PixelConditionsData/SpecialPixelMap.h" + +#include <atomic> class TRT_ID; class PixelID; @@ -43,18 +43,24 @@ namespace InDet{ const TRT_ID* m_pTRTHelper; const PixelID* m_pix_idHelper; const SCT_ID* m_sct_idHelper; - SG::WriteHandleKey<InDet::TRT_DriftCircleContainerCache> m_rioContainerCacheKey; - SG::WriteHandleKey<SCT_ClusterContainerCache> m_SCTclusterContainerCacheKey; - SG::WriteHandleKey<InDet::PixelClusterContainerCache> m_PIXclusterContainerCacheKey; - SG::WriteHandleKey<SpacePointCache> m_PIXSpacePointCacheKey; - SG::WriteHandleKey<SpacePointCache> m_SCTSpacePointCacheKey; - SG::WriteHandleKey<SCT_RDO_Cache> m_SCTRDOCacheKey; - SG::WriteHandleKey<PixelRDO_Cache> m_PixRDOCacheKey; - bool m_disableTRT; - mutable bool m_disableWarning; + SG::WriteHandleKey<InDet::TRT_DriftCircleContainerCache> m_rioContainerCacheKey + {this, "TRT_DriftCircleKey", ""}; + SG::WriteHandleKey<SCT_ClusterContainerCache> m_SCTclusterContainerCacheKey + {this, "SCT_ClusterKey", ""}; + SG::WriteHandleKey<InDet::PixelClusterContainerCache> m_PIXclusterContainerCacheKey + {this,"Pixel_ClusterKey", ""}; + SG::WriteHandleKey<SpacePointCache> m_PIXSpacePointCacheKey + {this, "SpacePointCachePix", ""}; + SG::WriteHandleKey<SpacePointCache> m_SCTSpacePointCacheKey + {this, "SpacePointCacheSCT", ""}; + SG::WriteHandleKey<SCT_RDO_Cache> m_SCTRDOCacheKey + {this, "SCTRDOCacheKey", ""}; + SG::WriteHandleKey<PixelRDO_Cache> m_PixRDOCacheKey + {this, "PixRDOCacheKey", ""}; + BooleanProperty m_disableTRT{this, "disableTRT", false}; + BooleanProperty m_disableWarning{this, "DisableViewWarning", false}; + mutable std::atomic_bool m_disableWarningCheck; //Temporary workarounds for problem in scheduler - remove later - SG::ReadCondHandleKey<PixelCalib::PixelOfflineCalibData> m_condKey5{ this, "PixelOfflineCalibData", "PixelOfflineCalibData", "" }; - SG::ReadCondHandleKey<DetectorSpecialPixelMap> m_condKey12{ this, "SpecialPixelMap", "SpecialPixelMap", "" }; bool isInsideView(const EventContext&) const; template<typename T> StatusCode createContainer(const SG::WriteHandleKey<T>& , long unsigned int , const EventContext& ) const; diff --git a/InnerDetector/InDetRecAlgs/SiSpacePointFormation/SiSpacePointFormation/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetRecAlgs/SiSpacePointFormation/SiSpacePointFormation/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..fc29e93658bfea34c5cf6d188f4f3385cbebb529 --- /dev/null +++ b/InnerDetector/InDetRecAlgs/SiSpacePointFormation/SiSpacePointFormation/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +InnerDetector/InDetRecAlgs/SiSpacePointFormation diff --git a/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/CMakeLists.txt b/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/CMakeLists.txt index 7a98df7a123745de020cd617a69ab734f1d27585..a62acee4850ceddc8c9f4d24729c7fa5ec5a1443 100644 --- a/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/CMakeLists.txt +++ b/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/CMakeLists.txt @@ -7,6 +7,7 @@ atlas_subdir( InDetCompetingRIOsOnTrack ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC + Control/CxxUtils InnerDetector/InDetRecEvent/InDetRIO_OnTrack Tracking/TrkEvent/TrkCompetingRIOsOnTrack PRIVATE @@ -21,6 +22,6 @@ atlas_add_library( InDetCompetingRIOsOnTrack src/*.cxx PUBLIC_HEADERS InDetCompetingRIOsOnTrack PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES InDetRIO_OnTrack TrkCompetingRIOsOnTrack + LINK_LIBRARIES CxxUtils InDetRIO_OnTrack TrkCompetingRIOsOnTrack PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} GaudiKernel TrkSurfaces ) diff --git a/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/InDetCompetingRIOsOnTrack/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/InDetCompetingRIOsOnTrack/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..8695c4f43e30970c993782ac9cf7372a064c101e --- /dev/null +++ b/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/InDetCompetingRIOsOnTrack/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack diff --git a/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/InDetCompetingRIOsOnTrack/CompetingPixelClustersOnTrack.h b/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/InDetCompetingRIOsOnTrack/CompetingPixelClustersOnTrack.h index fd32d023039c551a6a1ab910d38d4d5325ff19b7..b4051ac6e2f0a175e3a308ff9799e5e34de21e18 100755 --- a/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/InDetCompetingRIOsOnTrack/CompetingPixelClustersOnTrack.h +++ b/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/InDetCompetingRIOsOnTrack/CompetingPixelClustersOnTrack.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -11,6 +11,7 @@ // Trk #include "TrkCompetingRIOsOnTrack/CompetingRIOsOnTrack.h" +#include "CxxUtils/CachedUniquePtr.h" #include "InDetRIO_OnTrack/PixelClusterOnTrack.h" // cannot forward declare #include <iosfwd> @@ -103,7 +104,7 @@ private: /** The global Position */ - mutable const Amg::Vector3D* m_globalPosition; + CxxUtils::CachedUniquePtr<const Amg::Vector3D> m_globalPosition; /** The vector of contained InDet::PixelClusterOnTrack objects */ std::vector<const InDet::PixelClusterOnTrack*>* m_containedChildRots; @@ -136,12 +137,6 @@ inline const InDet::PixelClusterOnTrack& CompetingPixelClustersOnTrack::rioOnTra return * m_containedChildRots->operator[](indx); } - inline const Amg::Vector3D& CompetingPixelClustersOnTrack::globalPosition() const { - if (m_globalPosition) - return (*m_globalPosition); - m_globalPosition = associatedSurface().localToGlobal(localParameters()); - return (*m_globalPosition); -} inline unsigned int CompetingPixelClustersOnTrack::numberOfContainedROTs() const { return m_containedChildRots->size(); diff --git a/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/InDetCompetingRIOsOnTrack/CompetingSCT_ClustersOnTrack.h b/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/InDetCompetingRIOsOnTrack/CompetingSCT_ClustersOnTrack.h index 45b1434dfa7812c1b06b796bd6d89062a0b04773..5f4b07ee0a6af0f4cafaea76862089b656414402 100755 --- a/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/InDetCompetingRIOsOnTrack/CompetingSCT_ClustersOnTrack.h +++ b/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/InDetCompetingRIOsOnTrack/CompetingSCT_ClustersOnTrack.h @@ -12,9 +12,9 @@ // Trk #include "TrkCompetingRIOsOnTrack/CompetingRIOsOnTrack.h" #include "InDetRIO_OnTrack/SCT_ClusterOnTrack.h" // cannot fwd-declare because of covariant method +#include "CxxUtils/CachedUniquePtr.h" #include <iosfwd> -#include <atomic> class MsgStream; @@ -106,7 +106,7 @@ private: /** The global position */ - mutable std::atomic<const Amg::Vector3D*> m_globalPosition; + CxxUtils::CachedUniquePtr<const Amg::Vector3D> m_globalPosition; /** The vector of contained InDet::SCT_ClusterOnTrack objects */ std::vector<const InDet::SCT_ClusterOnTrack*>* m_containedChildRots; @@ -138,10 +138,10 @@ inline const InDet::SCT_ClusterOnTrack& CompetingSCT_ClustersOnTrack::rioOnTrack } inline const Amg::Vector3D& CompetingSCT_ClustersOnTrack::globalPosition() const { - if (m_globalPosition==nullptr) { - m_globalPosition = associatedSurface().localToGlobal(localParameters()); + if (not m_globalPosition) { + m_globalPosition.set(std::unique_ptr<const Amg::Vector3D>(associatedSurface().localToGlobal(localParameters()))); } - return (*m_globalPosition); + return *m_globalPosition; } inline unsigned int CompetingSCT_ClustersOnTrack::numberOfContainedROTs() const { diff --git a/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/InDetCompetingRIOsOnTrack/CompetingTRT_DriftCirclesOnTrack.h b/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/InDetCompetingRIOsOnTrack/CompetingTRT_DriftCirclesOnTrack.h index bb8cf7969007f561f1a63b8004aece50fdac6710..177d5c07648553ef4c40530d8ee950161e5b831c 100755 --- a/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/InDetCompetingRIOsOnTrack/CompetingTRT_DriftCirclesOnTrack.h +++ b/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/InDetCompetingRIOsOnTrack/CompetingTRT_DriftCirclesOnTrack.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -12,6 +12,8 @@ // Trk #include "TrkCompetingRIOsOnTrack/CompetingRIOsOnTrack.h" #include "InDetRIO_OnTrack/TRT_DriftCircleOnTrack.h" +#include "CxxUtils/CachedUniquePtr.h" +#include <atomic> #include <iosfwd> class MsgStream; @@ -105,10 +107,10 @@ namespace InDet { //! private method to clear the Trk::RIO_OnTrack vector void clearChildRotVector(); //! The surface to which the competingROTs parameters are expressed to - mutable const Trk::Surface* m_associatedSurface; + const Trk::Surface* m_associatedSurface; //! The global Position - mutable const Amg::Vector3D* m_globalPosition; + CxxUtils::CachedUniquePtr<const Amg::Vector3D> m_globalPosition; //! The vector of contained InDet::TRT_DriftCircleOnTrack objects std::vector<const InDet::TRT_DriftCircleOnTrack*>* m_containedChildRots; @@ -120,7 +122,7 @@ namespace InDet { are checked. - interface from CompetingRIOsOnTrack */ bool ROTsHaveCommonSurface(const bool withNonVanishingAssignProb=true) const; - mutable int m_ROTsHaveCommonSurface; + mutable std::atomic_int m_ROTsHaveCommonSurface; }; diff --git a/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/src/CompetingPixelClustersOnTrack.cxx b/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/src/CompetingPixelClustersOnTrack.cxx index 62ab26a92dc49191c3fd799df964a23dfb4426db..047359f83a5f4af8ad70cd49a50d1ca374045032 100755 --- a/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/src/CompetingPixelClustersOnTrack.cxx +++ b/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/src/CompetingPixelClustersOnTrack.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -15,20 +15,23 @@ // default constructor InDet::CompetingPixelClustersOnTrack::CompetingPixelClustersOnTrack(): Trk::CompetingRIOsOnTrack(), - m_globalPosition(0), + m_globalPosition{}, m_containedChildRots(0) {} // copy constructor InDet::CompetingPixelClustersOnTrack::CompetingPixelClustersOnTrack(const InDet::CompetingPixelClustersOnTrack& compROT) : Trk::CompetingRIOsOnTrack(compROT), - m_globalPosition(compROT.m_globalPosition ? new Amg::Vector3D(*compROT.m_globalPosition) : 0), + m_globalPosition{}, m_containedChildRots(0) { m_containedChildRots = new std::vector< const InDet::PixelClusterOnTrack* >; std::vector< const InDet::PixelClusterOnTrack* >::const_iterator rotIter = compROT.m_containedChildRots->begin(); for (; rotIter!=compROT.m_containedChildRots->end(); ++rotIter) { m_containedChildRots->push_back((*rotIter)->clone()); } + if (compROT.m_globalPosition) { + m_globalPosition.set(std::make_unique<const Amg::Vector3D>(*compROT.m_globalPosition)); + } } // explicit constructor @@ -38,7 +41,7 @@ InDet::CompetingPixelClustersOnTrack::CompetingPixelClustersOnTrack( ) : Trk::CompetingRIOsOnTrack( assgnProb), - m_globalPosition(0), + m_globalPosition{}, m_containedChildRots(childrots) { // initialize local position and error matrix @@ -52,9 +55,11 @@ InDet::CompetingPixelClustersOnTrack& InDet::CompetingPixelClustersOnTrack::oper // clear rots clearChildRotVector(); delete m_containedChildRots; - delete m_globalPosition; + if (m_globalPosition) delete m_globalPosition.release().get(); m_containedChildRots = new std::vector<const InDet::PixelClusterOnTrack*>; - m_globalPosition = compROT.m_globalPosition ? new Amg::Vector3D(*compROT.m_globalPosition) : 0; + if (compROT.m_globalPosition) { + m_globalPosition.set(std::make_unique<const Amg::Vector3D>(*compROT.m_globalPosition)); + } std::vector<const InDet::PixelClusterOnTrack*>::const_iterator rotIter = compROT.m_containedChildRots->begin(); for (; rotIter!=compROT.m_containedChildRots->end(); ++rotIter) m_containedChildRots->push_back((*rotIter)->clone()); @@ -69,18 +74,15 @@ InDet::CompetingPixelClustersOnTrack& InDet::CompetingPixelClustersOnTrack::oper // clear rots clearChildRotVector(); delete m_containedChildRots; - delete m_globalPosition; + if (m_globalPosition) delete m_globalPosition.release().get(); m_containedChildRots = compROT.m_containedChildRots; compROT.m_containedChildRots = nullptr; - - m_globalPosition = compROT.m_globalPosition; - compROT.m_globalPosition = nullptr; + m_globalPosition = std::move(compROT.m_globalPosition); } return (*this); } InDet::CompetingPixelClustersOnTrack::~CompetingPixelClustersOnTrack() { - delete m_globalPosition; clearChildRotVector(); delete m_containedChildRots; } @@ -97,7 +99,7 @@ MsgStream& InDet::CompetingPixelClustersOnTrack::dump( MsgStream& out ) const { << "] competing Pixel RIO_OnTrack objects" << std::endl; Trk::CompetingRIOsOnTrack::dump(out); out << " - GlobalPosition : "; - if (m_globalPosition==NULL) out << "null pointer"<<std::endl; + if (not m_globalPosition) out << "null pointer"<<std::endl; else out << *m_globalPosition<<endmsg; return out; } @@ -108,7 +110,7 @@ std::ostream& InDet::CompetingPixelClustersOnTrack::dump( std::ostream& out ) co << "] competing Pixel RIO_OnTrack objects" << std::endl; Trk::CompetingRIOsOnTrack::dump(out); out << " - GlobalPosition : "; - if (m_globalPosition==NULL) out << "null pointer"<<std::endl; + if (not m_globalPosition) out << "null pointer"<<std::endl; else out << *m_globalPosition<<std::endl; return out; } @@ -118,3 +120,9 @@ bool InDet::CompetingPixelClustersOnTrack::ROTsHaveCommonSurface(const bool) con return true; } +const Amg::Vector3D& InDet::CompetingPixelClustersOnTrack::globalPosition() const { + if (not m_globalPosition) { + m_globalPosition.set(std::unique_ptr<const Amg::Vector3D>(associatedSurface().localToGlobal(localParameters()))); + } + return *m_globalPosition; +} diff --git a/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/src/CompetingSCT_ClustersOnTrack.cxx b/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/src/CompetingSCT_ClustersOnTrack.cxx index ac3bdd91975da90dfdc5a9730fc9df3b8ed21b2a..5460461be317ad76859bbdd4c50e06591ef6f098 100755 --- a/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/src/CompetingSCT_ClustersOnTrack.cxx +++ b/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/src/CompetingSCT_ClustersOnTrack.cxx @@ -18,7 +18,7 @@ // default constructor InDet::CompetingSCT_ClustersOnTrack::CompetingSCT_ClustersOnTrack(): Trk::CompetingRIOsOnTrack(), - m_globalPosition(nullptr), + m_globalPosition{}, m_containedChildRots(0) // {} @@ -26,13 +26,16 @@ InDet::CompetingSCT_ClustersOnTrack::CompetingSCT_ClustersOnTrack(): // copy constructor InDet::CompetingSCT_ClustersOnTrack::CompetingSCT_ClustersOnTrack(const InDet::CompetingSCT_ClustersOnTrack& compROT) : Trk::CompetingRIOsOnTrack(compROT), - m_globalPosition(compROT.m_globalPosition ? new Amg::Vector3D(*compROT.m_globalPosition) : nullptr), + m_globalPosition{}, m_containedChildRots(0) { m_containedChildRots = new std::vector< const InDet::SCT_ClusterOnTrack* >; std::vector< const InDet::SCT_ClusterOnTrack* >::const_iterator rotIter = compROT.m_containedChildRots->begin(); for (; rotIter!=compROT.m_containedChildRots->end(); ++rotIter) { m_containedChildRots->push_back((*rotIter)->clone()); } + if (compROT.m_globalPosition) { + m_globalPosition.set(std::make_unique<const Amg::Vector3D>(*compROT.m_globalPosition)); + } } // explicit constructor @@ -43,7 +46,7 @@ InDet::CompetingSCT_ClustersOnTrack::CompetingSCT_ClustersOnTrack( ): Trk::CompetingRIOsOnTrack(assgnProb), -m_globalPosition(nullptr), +m_globalPosition{}, m_containedChildRots(childrots) { // initialize local position and error matrix @@ -58,14 +61,16 @@ InDet::CompetingSCT_ClustersOnTrack& InDet::CompetingSCT_ClustersOnTrack::operat // clear rots clearChildRotVector(); delete m_containedChildRots; - delete m_globalPosition; + if (m_globalPosition) delete m_globalPosition.release().get(); m_containedChildRots = new std::vector<const InDet::SCT_ClusterOnTrack*>; std::vector<const InDet::SCT_ClusterOnTrack*>::const_iterator rotIter = compROT.m_containedChildRots->begin(); for (; rotIter!=compROT.m_containedChildRots->end(); ++rotIter) m_containedChildRots->push_back((*rotIter)->clone()); - m_globalPosition = compROT.m_globalPosition ? new Amg::Vector3D(*compROT.m_globalPosition) : nullptr; + if (compROT.m_globalPosition) { + m_globalPosition.set(std::make_unique<const Amg::Vector3D>(*compROT.m_globalPosition)); + } } return (*this); } @@ -73,7 +78,6 @@ InDet::CompetingSCT_ClustersOnTrack& InDet::CompetingSCT_ClustersOnTrack::operat InDet::CompetingSCT_ClustersOnTrack::~CompetingSCT_ClustersOnTrack() { clearChildRotVector(); delete m_containedChildRots; - delete m_globalPosition; } void InDet::CompetingSCT_ClustersOnTrack::clearChildRotVector() { @@ -90,8 +94,8 @@ MsgStream& InDet::CompetingSCT_ClustersOnTrack::dump( MsgStream& out ) const { "over different surfaces") << " (given prob>cut)" << std::endl; Trk::CompetingRIOsOnTrack::dump(out); out << " - GlobalPosition : "; - if (m_globalPosition==nullptr) out << "null pointer"<<endmsg; - else out << *m_globalPosition<<endmsg; + if (not m_globalPosition) out << "null pointer"<<endmsg; + else out << *m_globalPosition << endmsg; return out; } @@ -103,8 +107,8 @@ std::ostream& InDet::CompetingSCT_ClustersOnTrack::dump( std::ostream& out ) con "over different surfaces") << " (given prob>cut)" << std::endl; Trk::CompetingRIOsOnTrack::dump(out); out << " - GlobalPosition : "; - if (m_globalPosition==nullptr) out << "null pointer"<<std::endl; - else out << *m_globalPosition<<std::endl; + if (not m_globalPosition) out << "null pointer"<<std::endl; + else out << *m_globalPosition << std::endl; return out; } diff --git a/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/src/CompetingTRT_DriftCirclesOnTrack.cxx b/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/src/CompetingTRT_DriftCirclesOnTrack.cxx index 950112b78793ce72d89a039f4eef7421a221f7b6..36cb7590723d46d05782040b50e12a1bbf75b6db 100755 --- a/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/src/CompetingTRT_DriftCirclesOnTrack.cxx +++ b/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/src/CompetingTRT_DriftCirclesOnTrack.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -20,16 +20,16 @@ InDet::CompetingTRT_DriftCirclesOnTrack::CompetingTRT_DriftCirclesOnTrack(): Trk::CompetingRIOsOnTrack(), m_associatedSurface(0), - m_globalPosition(0), + m_globalPosition{}, m_containedChildRots(0), m_ROTsHaveCommonSurface(8) {} // copy constructor InDet::CompetingTRT_DriftCirclesOnTrack::CompetingTRT_DriftCirclesOnTrack(const InDet::CompetingTRT_DriftCirclesOnTrack& compROT) : Trk::CompetingRIOsOnTrack(compROT), - m_globalPosition(compROT.m_globalPosition ? new Amg::Vector3D(*compROT.m_globalPosition) : 0), + m_globalPosition{}, m_containedChildRots(0), - m_ROTsHaveCommonSurface(compROT.m_ROTsHaveCommonSurface) { + m_ROTsHaveCommonSurface(compROT.m_ROTsHaveCommonSurface.load()) { if (compROT.m_associatedSurface) { // copy only if surface is not one owned by a detector Element m_associatedSurface = (!compROT.m_associatedSurface->associatedDetectorElement()) ? compROT.m_associatedSurface->clone() : compROT.m_associatedSurface; @@ -41,6 +41,9 @@ InDet::CompetingTRT_DriftCirclesOnTrack::CompetingTRT_DriftCirclesOnTrack(const for (; rotIter!=compROT.m_containedChildRots->end(); ++rotIter) { m_containedChildRots->push_back((*rotIter)->clone()); } + if (compROT.m_globalPosition) { + m_globalPosition.set(std::make_unique<const Amg::Vector3D>(*(compROT.m_globalPosition))); + } } // explicit constructor @@ -56,7 +59,7 @@ InDet::CompetingTRT_DriftCirclesOnTrack::CompetingTRT_DriftCirclesOnTrack( ): Trk::CompetingRIOsOnTrack(assgnProb), m_associatedSurface(sf), - m_globalPosition(0), + m_globalPosition{}, m_containedChildRots(childrots), m_ROTsHaveCommonSurface(ROTsHaveComSrfc) { @@ -75,7 +78,7 @@ InDet::CompetingTRT_DriftCirclesOnTrack& InDet::CompetingTRT_DriftCirclesOnTrack // clear rots clearChildRotVector(); delete m_containedChildRots; - delete m_globalPosition; + if (m_globalPosition) delete m_globalPosition.release().get(); // delete surface if not owned by detElement if (m_associatedSurface && !m_associatedSurface->associatedDetectorElement()) delete m_associatedSurface; @@ -86,8 +89,8 @@ InDet::CompetingTRT_DriftCirclesOnTrack& InDet::CompetingTRT_DriftCirclesOnTrack } else { m_associatedSurface = 0; } - m_globalPosition = compROT.m_globalPosition ? new Amg::Vector3D(*compROT.m_globalPosition) : 0; - m_ROTsHaveCommonSurface = compROT.m_ROTsHaveCommonSurface; + if (compROT.m_globalPosition) m_globalPosition.set(std::make_unique<const Amg::Vector3D>(*compROT.m_globalPosition)); + m_ROTsHaveCommonSurface = compROT.m_ROTsHaveCommonSurface.load(); std::vector<const InDet::TRT_DriftCircleOnTrack*>::const_iterator rotIter = compROT.m_containedChildRots->begin(); for (; rotIter!=compROT.m_containedChildRots->end(); ++rotIter) m_containedChildRots->push_back((*rotIter)->clone()); @@ -97,9 +100,9 @@ InDet::CompetingTRT_DriftCirclesOnTrack& InDet::CompetingTRT_DriftCirclesOnTrack InDet::CompetingTRT_DriftCirclesOnTrack::~CompetingTRT_DriftCirclesOnTrack() { // delete surface if not owned by detElement - if (m_associatedSurface && !m_associatedSurface->associatedDetectorElement()) + if (m_associatedSurface && !m_associatedSurface->associatedDetectorElement()) { delete m_associatedSurface; - delete m_globalPosition; + } clearChildRotVector(); delete m_containedChildRots; } @@ -118,8 +121,8 @@ MsgStream& InDet::CompetingTRT_DriftCirclesOnTrack::dump( MsgStream& out ) const "over different surfaces") << " (given prob>cut)" << std::endl; Trk::CompetingRIOsOnTrack::dump(out); out << " - GlobalPosition : "; - if (m_globalPosition==NULL) out << "null pointer"<<endmsg; - else out << *m_globalPosition<<endmsg; + if (not m_globalPosition) out << "null pointer" << endmsg; + else out << *m_globalPosition << endmsg; return out; } @@ -131,8 +134,8 @@ std::ostream& InDet::CompetingTRT_DriftCirclesOnTrack::dump( std::ostream& out ) "over different surfaces") << " (given prob>cut)" << std::endl; Trk::CompetingRIOsOnTrack::dump(out); out << " - GlobalPosition : "; - if (m_globalPosition==NULL) out << "null pointer"<<std::endl; - else out << *m_globalPosition<<std::endl; + if (not m_globalPosition) out << "null pointer" << std::endl; + else out << *m_globalPosition << std::endl; return out; } @@ -155,7 +158,7 @@ bool InDet::CompetingTRT_DriftCirclesOnTrack::ROTsHaveCommonSurface(const bool w const Amg::Vector3D& InDet::CompetingTRT_DriftCirclesOnTrack::globalPosition() const { - if (m_globalPosition) return (*m_globalPosition); + if (m_globalPosition) return *m_globalPosition; // cannot use the localToGlobal transformation, because the local z-coordinate along // the wire is not known here. The contained TRT_DriftCircleOnTrack use the full // transformation => use the weighted mean of their GlobalPositions @@ -178,9 +181,9 @@ const Amg::Vector3D& InDet::CompetingTRT_DriftCirclesOnTrack::globalPosition() c } else { globalPos = (*m_containedChildRots->begin())->globalPosition(); } - - m_globalPosition = new Amg::Vector3D(globalPos); + m_globalPosition.set(std::make_unique<const Amg::Vector3D>(globalPos)); return *m_globalPosition; + } void InDet::CompetingTRT_DriftCirclesOnTrack::setLocalParametersAndErrorMatrix() { diff --git a/InnerDetector/InDetRecEvent/InDetPrepRawData/CMakeLists.txt b/InnerDetector/InDetRecEvent/InDetPrepRawData/CMakeLists.txt index 15f4c0a5e7ae421ff9b1dd70b66187dfb2ecf998..2149394712e477415f048a4ab7b972ccdc024c3a 100644 --- a/InnerDetector/InDetRecEvent/InDetPrepRawData/CMakeLists.txt +++ b/InnerDetector/InDetRecEvent/InDetPrepRawData/CMakeLists.txt @@ -8,6 +8,7 @@ atlas_subdir( InDetPrepRawData ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC Control/AthLinks + Control/CxxUtils Control/SGTools DetectorDescription/GeoPrimitives DetectorDescription/Identifier @@ -28,12 +29,12 @@ atlas_add_library( InDetPrepRawData PUBLIC_HEADERS InDetPrepRawData INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS} PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${EIGEN_LIBRARIES} AthLinks SGTools GeoPrimitives Identifier EventPrimitives GaudiKernel InDetReadoutGeometry TrkSurfaces TrkEventPrimitives TrkPrepRawData + LINK_LIBRARIES ${EIGEN_LIBRARIES} AthLinks CxxUtils SGTools GeoPrimitives Identifier EventPrimitives GaudiKernel InDetReadoutGeometry TrkSurfaces TrkEventPrimitives TrkPrepRawData PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ) atlas_add_dictionary( InDetPrepRawDataDict InDetPrepRawData/InDetPrepRawDataDict.h InDetPrepRawData/selection.xml INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${EIGEN_LIBRARIES} AthLinks SGTools GeoPrimitives Identifier EventPrimitives GaudiKernel InDetReadoutGeometry TrkSurfaces TrkEventPrimitives TrkPrepRawData InDetPrepRawData EventContainers ) + LINK_LIBRARIES ${ROOT_LIBRARIES} ${EIGEN_LIBRARIES} AthLinks CxxUtils SGTools GeoPrimitives Identifier EventPrimitives GaudiKernel InDetReadoutGeometry TrkSurfaces TrkEventPrimitives TrkPrepRawData InDetPrepRawData EventContainers ) diff --git a/InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..cde14507bc4ac50ccf407e8b58ba1453e1196977 --- /dev/null +++ b/InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +InnerDetector/InDetRecEvent/InDetPrepRawData diff --git a/InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/SiCluster.h b/InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/SiCluster.h index a30eda6ba40bedb8c496c50e8d6f2edb41d70374..a479fe3f0e118b198f5af6c96e3c4fb7fb51a7fe 100755 --- a/InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/SiCluster.h +++ b/InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/SiCluster.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -19,11 +19,14 @@ // Base class #include "TrkPrepRawData/PrepRawData.h" +#include "CxxUtils/CachedUniquePtr.h" #include "Identifier/Identifier.h" #include "InDetPrepRawData/SiWidth.h" #include "InDetReadoutGeometry/SiDetectorElement.h" // cant be forward declared #include "TrkSurfaces/Surface.h" +#include <memory> + class PixelClusterContainerCnv; class SCT_ClusterContainerCnv; @@ -111,7 +114,7 @@ class SiCluster : public Trk::PrepRawData { private: InDet::SiWidth m_width; //col, row, and width in mm - mutable const Amg::Vector3D* m_globalPosition; + CxxUtils::CachedUniquePtr<const Amg::Vector3D> m_globalPosition; bool m_gangedPixel; const InDetDD::SiDetectorElement* m_detEl; @@ -132,8 +135,10 @@ inline const InDet::SiWidth& SiCluster::width() const // return globalPosition: inline const Amg::Vector3D& SiCluster::globalPosition() const { - if (m_globalPosition==0) m_globalPosition = m_detEl->surface(identify()).localToGlobal(localPosition()); - return *m_globalPosition; + if (not m_globalPosition) { + m_globalPosition.set(std::unique_ptr<const Amg::Vector3D>(m_detEl->surface(identify()).localToGlobal(localPosition()))); + } + return *m_globalPosition; } // set gangedPixel: inline void SiCluster::setGangedPixel(bool ganged){ diff --git a/InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/SiWidth.h b/InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/SiWidth.h index 601f8196cd22ac92adc80a3fa64c4ce108f445d8..563e23dfab39c45b091f5d126292919c86cc235f 100755 --- a/InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/SiWidth.h +++ b/InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/SiWidth.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -96,8 +96,9 @@ namespace InDet { // Private data: /////////////////////////////////////////////////////////////////// private: - Amg::Vector2D m_colrow;//<col, row> - Amg::Vector2D m_phirzWidth; + // Need to force proper alignment; otherwise cling gets it wrong. + alignas(16) Amg::Vector2D m_colrow;//<col, row> + alignas(16) Amg::Vector2D m_phirzWidth; }; MsgStream& operator << (MsgStream& stream, const SiWidth& prd); diff --git a/InnerDetector/InDetRecEvent/InDetPrepRawData/src/SiCluster.cxx b/InnerDetector/InDetRecEvent/InDetPrepRawData/src/SiCluster.cxx index 574d66c7167710927e3076a25581e7159f2b4368..67382e4eae4a39f545af996096c4e12403d1e4c7 100755 --- a/InnerDetector/InDetRecEvent/InDetPrepRawData/src/SiCluster.cxx +++ b/InnerDetector/InDetRecEvent/InDetPrepRawData/src/SiCluster.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -28,7 +28,7 @@ SiCluster::SiCluster( ) : PrepRawData(RDOId, locpos, rdoList, locErrMat), //call base class constructor m_width(width), - m_globalPosition(0), + m_globalPosition{}, m_gangedPixel(0), m_detEl(detEl) {} @@ -44,21 +44,20 @@ SiCluster::SiCluster( std::move(rdoList), std::move(locErrMat)), //call base class constructor m_width(width), - m_globalPosition(0), + m_globalPosition{}, m_gangedPixel(0), m_detEl(detEl) {} // Destructor: SiCluster::~SiCluster() { - delete m_globalPosition; // do not delete m_detEl since owned by DetectorStore } // Default constructor: SiCluster::SiCluster(): PrepRawData(), - m_globalPosition(0), + m_globalPosition{}, m_gangedPixel(0), m_detEl(0) {} @@ -67,34 +66,37 @@ SiCluster::SiCluster(): SiCluster::SiCluster(const SiCluster& RIO): PrepRawData( RIO ), m_width( RIO.m_width ), - m_globalPosition( 0 ), + m_globalPosition{}, m_gangedPixel( RIO.m_gangedPixel ), m_detEl( RIO.m_detEl ) { - // copy only if it exists - m_globalPosition = (RIO.m_globalPosition) ? new Amg::Vector3D(*RIO.m_globalPosition) : 0; + // copy only if it exists + if (RIO.m_globalPosition) { + m_globalPosition.set(std::make_unique<Amg::Vector3D>(*RIO.m_globalPosition)); + } } //move constructor: SiCluster::SiCluster(SiCluster&& RIO): PrepRawData( std::move(RIO) ), m_width( std::move(RIO.m_width) ), - m_globalPosition( RIO.m_globalPosition ), + m_globalPosition( std::move(RIO.m_globalPosition) ), m_gangedPixel( RIO.m_gangedPixel ), m_detEl( RIO.m_detEl ) { - RIO.m_globalPosition = nullptr; } //assignment operator SiCluster& SiCluster::operator=(const SiCluster& RIO){ - if (&RIO !=this) { + if (&RIO !=this) { Trk::PrepRawData::operator= (RIO); - delete m_globalPosition; m_width = RIO.m_width; - m_globalPosition = (RIO.m_globalPosition) ? new Amg::Vector3D(*RIO.m_globalPosition) : 0; + if (m_globalPosition) delete m_globalPosition.release().get(); + if (RIO.m_globalPosition) { + m_globalPosition.set(std::make_unique<Amg::Vector3D>(*RIO.m_globalPosition)); + } m_gangedPixel = RIO.m_gangedPixel; m_detEl = RIO.m_detEl ; } @@ -105,12 +107,11 @@ SiCluster& SiCluster::operator=(const SiCluster& RIO){ SiCluster& SiCluster::operator=(SiCluster&& RIO){ if (&RIO !=this) { Trk::PrepRawData::operator= (std::move(RIO)); - delete m_globalPosition; - m_width = RIO.m_width; - m_globalPosition = RIO.m_globalPosition; - RIO.m_globalPosition = nullptr; - m_gangedPixel = RIO.m_gangedPixel; - m_detEl = RIO.m_detEl ; + m_width = RIO.m_width; + if (m_globalPosition) delete m_globalPosition.release().get(); + m_globalPosition = std::move(RIO.m_globalPosition); + m_gangedPixel = RIO.m_gangedPixel; + m_detEl = RIO.m_detEl ; } return *this; } @@ -122,8 +123,8 @@ MsgStream& SiCluster::dump( MsgStream& stream) const // have to do a lot of annoying checking to make sure that PRD is valid. { stream << "at global coordinates (x,y,z) = ("<<this->globalPosition().x()<<", " - <<this->globalPosition().y()<<", " - <<this->globalPosition().z()<<")"<<std::endl; + <<this->globalPosition().y()<<", " + <<this->globalPosition().z()<<")"<<std::endl; } if ( gangedPixel()==true ) diff --git a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/CMakeLists.txt b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/CMakeLists.txt index f14486e6c059075931db0334b48dbfee53c34603..c356fc192d6bc098777486ec7290288ff4af1bd6 100644 --- a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/CMakeLists.txt +++ b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/CMakeLists.txt @@ -8,6 +8,7 @@ atlas_subdir( InDetRIO_OnTrack ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC Control/AthLinks + Control/CxxUtils DetectorDescription/Identifier GaudiKernel InnerDetector/InDetRecEvent/InDetPrepRawData @@ -27,12 +28,12 @@ atlas_add_library( InDetRIO_OnTrack src/*.cxx PUBLIC_HEADERS InDetRIO_OnTrack PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES AthLinks Identifier GaudiKernel InDetPrepRawData TrkEventPrimitives TrkRIO_OnTrack EventContainers EventPrimitives + LINK_LIBRARIES AthLinks CxxUtils Identifier GaudiKernel InDetPrepRawData TrkEventPrimitives TrkRIO_OnTrack EventContainers EventPrimitives PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} InDetReadoutGeometry TrkSurfaces ) atlas_add_dictionary( InDetRIO_OnTrackDict InDetRIO_OnTrack/InDetRIO_OnTrackDict.h InDetRIO_OnTrack/selection.xml INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} AthLinks Identifier GaudiKernel InDetPrepRawData TrkEventPrimitives TrkRIO_OnTrack InDetReadoutGeometry TrkSurfaces InDetRIO_OnTrack EventContainers EventPrimitives) + LINK_LIBRARIES ${ROOT_LIBRARIES} AthLinks CxxUtils Identifier GaudiKernel InDetPrepRawData TrkEventPrimitives TrkRIO_OnTrack InDetReadoutGeometry TrkSurfaces InDetRIO_OnTrack EventContainers EventPrimitives) diff --git a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..8bf4b99c0973d31322b2c14fb2cdeb5a2546fa90 --- /dev/null +++ b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +InnerDetector/InDetRecEvent/InDetRIO_OnTrack diff --git a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/PixelRIO_OnTrackErrorScaling.h b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/PixelRIO_OnTrackErrorScaling.h index a34fbe5beea0b8be8a6dcc9e82425c0734513e02..190643fb7b576a30d7cc2e037e459703be7eead9 100644 --- a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/PixelRIO_OnTrackErrorScaling.h +++ b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/PixelRIO_OnTrackErrorScaling.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef _PixelRIO_OnTrackErrorScaling_H_ #define _PixelRIO_OnTrackErrorScaling_H_ @@ -26,11 +26,11 @@ public: kPixIBLEta, kNParamTypes}; - static const char **paramNames() { return s_names; } + static const char* const* paramNames() { return s_names; } virtual bool postProcess() override; protected: - static const char *s_names[kNParamTypes]; + static const char* const s_names[kNParamTypes]; }; CLASS_DEF( PixelRIO_OnTrackErrorScaling , 254709438 , 1 ) diff --git a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/SCTRIO_OnTrackErrorScaling.h b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/SCTRIO_OnTrackErrorScaling.h index c023558cda0a50c2593af8747b472857c3cffc28..96d626bc911dd8669e009801bacc6b17dfe71a32 100644 --- a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/SCTRIO_OnTrackErrorScaling.h +++ b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/SCTRIO_OnTrackErrorScaling.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef _SCTRIO_OnTrackErrorScaling_H_ #define _SCTRIO_OnTrackErrorScaling_H_ @@ -19,10 +19,10 @@ public: kEndcap, kNParamTypes}; - static const char **paramNames() { return s_names; } + static const char* const* paramNames() { return s_names; } virtual bool postProcess() override; protected: - static const char *s_names[kNParamTypes]; + static const char* const s_names[kNParamTypes]; }; diff --git a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/SiClusterOnTrack.h b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/SiClusterOnTrack.h index fc773dd6a15bfdf7007e4ec612c2aed0cb524d5f..da6123160f8bef0d128ebcfdb443d5cf8bd8b5da 100755 --- a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/SiClusterOnTrack.h +++ b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/SiClusterOnTrack.h @@ -10,10 +10,9 @@ #define TRKRIO_ONTRACK_SICLUSTERONTRACK_H #include "TrkRIO_OnTrack/RIO_OnTrack.h" +#include "CxxUtils/CachedUniquePtr.h" #include "Identifier/IdentifierHash.h" -#include <atomic> - class SiClusterOnTrackCnv_p1; namespace Trk @@ -103,7 +102,7 @@ namespace InDet { /** The IdentifierHash - probably not used*/ IdentifierHash m_idDE; /** The global position */ - mutable std::atomic<const Amg::Vector3D*> m_globalPosition; + CxxUtils::CachedUniquePtr<const Amg::Vector3D> m_globalPosition; bool m_isbroad; }; diff --git a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/TRTRIO_OnTrackErrorScaling.h b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/TRTRIO_OnTrackErrorScaling.h index 134e29578eb7b344cb91b9df22aa81e99081cc0e..0451a243b934769ac0fd48f018cb28d5aa0a99e4 100644 --- a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/TRTRIO_OnTrackErrorScaling.h +++ b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/TRTRIO_OnTrackErrorScaling.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef _TRTRIO_OnTrackErrorScaling_H_ #define _TRTRIO_OnTrackErrorScaling_H_ @@ -19,10 +19,10 @@ public: kEndcap, kNParamTypes}; - static const char **paramNames() { return s_names; } + static const char* const* paramNames() { return s_names; } virtual bool postProcess() override; protected: - static const char *s_names[kNParamTypes]; + static const char* const s_names[kNParamTypes]; }; diff --git a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/TRT_DriftCircleOnTrack.h b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/TRT_DriftCircleOnTrack.h index d63ef19d1e4a333761312d06a754cbccacc4513c..23a148021599efe77f560aec708229928c99665a 100755 --- a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/TRT_DriftCircleOnTrack.h +++ b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/InDetRIO_OnTrack/TRT_DriftCircleOnTrack.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -11,9 +11,9 @@ // Base classes #include "TrkRIO_OnTrack/RIO_OnTrack.h" +#include "CxxUtils/CachedUniquePtr.h" #include "TrkEventPrimitives/DriftCircleStatus.h" #include "TrkEventPrimitives/DriftCircleSide.h" -#include "GaudiKernel/GaudiException.h" // InDet @@ -22,6 +22,10 @@ #include "InDetPrepRawData/TRT_DriftCircleContainer.h" #include "AthLinks/ElementLink.h" +#include "GaudiKernel/GaudiException.h" + +#include <atomic> + namespace Trk { class Surface; class LocalParameters; @@ -156,13 +160,13 @@ namespace InDet{ void setGlobalPosition(Amg::Vector3D& loc3Dframe) const; /** global position to be cached */ - mutable const Amg::Vector3D* m_globalPosition; + CxxUtils::CachedUniquePtr<const Amg::Vector3D> m_globalPosition; /**local angle to be written out */ - mutable float m_localAngle; + mutable std::atomic<float> m_localAngle; /**local position along wire to be written out*/ - mutable float m_positionAlongWire; + mutable std::atomic<float> m_positionAlongWire; /** the contained RIO (PRD, PrepRawData) - TRT_DriftCircle in this case */ // mutable const InDet::TRT_DriftCircle* m_rio; diff --git a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/PixelRIO_OnTrackErrorScaling.cxx b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/PixelRIO_OnTrackErrorScaling.cxx index d69fe70b8076a65196169679552bccc48f145364..b6b6f75ff558ae58c09b979d966091a9dd719c69 100644 --- a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/PixelRIO_OnTrackErrorScaling.cxx +++ b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/PixelRIO_OnTrackErrorScaling.cxx @@ -1,10 +1,10 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "InDetRIO_OnTrack/PixelRIO_OnTrackErrorScaling.h" #include "InDetIdentifier/PixelID.h" -const char *PixelRIO_OnTrackErrorScaling::s_names[PixelRIO_OnTrackErrorScaling::kNParamTypes]={ +const char* const PixelRIO_OnTrackErrorScaling::s_names[PixelRIO_OnTrackErrorScaling::kNParamTypes]={ "PixPhi Barrel", "PixEta Barrel", "PixPhi Endcap", diff --git a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/SCTRIO_OnTrackErrorScaling.cxx b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/SCTRIO_OnTrackErrorScaling.cxx index 1c69e3795334c4e770f5bd73246defdf64eb6a44..749cb4daa928e08428e7003f7b72b50328c3a1f3 100644 --- a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/SCTRIO_OnTrackErrorScaling.cxx +++ b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/SCTRIO_OnTrackErrorScaling.cxx @@ -1,13 +1,13 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "InDetRIO_OnTrack/SCTRIO_OnTrackErrorScaling.h" #include <iostream> -const char *SCTRIO_OnTrackErrorScaling::s_names[SCTRIO_OnTrackErrorScaling::kNParamTypes]={ +const char * const SCTRIO_OnTrackErrorScaling::s_names[SCTRIO_OnTrackErrorScaling::kNParamTypes]={ "SCT Barrel", "SCT Endcap" - }; +}; namespace { inline double square(double a) { return a*a; } diff --git a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/SCT_ClusterOnTrack.cxx b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/SCT_ClusterOnTrack.cxx index d1bcf1e158baa2c3b9de13c512a21385eaf4ca48..dfda5beff5c8be6102741774fefd4b7f0a5ead7b 100755 --- a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/SCT_ClusterOnTrack.cxx +++ b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/SCT_ClusterOnTrack.cxx @@ -90,12 +90,12 @@ void InDet::SCT_ClusterOnTrack::setValues(const Trk::TrkDetElementBase* detEl, c const Amg::Vector3D& InDet::SCT_ClusterOnTrack::globalPosition() const { //checking whether the globalposition is available - if(!m_globalPosition) + if (not m_globalPosition) { // calculate global position from the position of the strip and the position along the strip Amg::Vector2D lpos( localParameters().get(Trk::locX), m_positionAlongStrip ); - m_globalPosition = detectorElement()->surface( identify() ).localToGlobal( lpos ); + m_globalPosition.set(std::unique_ptr<const Amg::Vector3D>(detectorElement()->surface( identify() ).localToGlobal( lpos ))); } return (*m_globalPosition); diff --git a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/SiClusterOnTrack.cxx b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/SiClusterOnTrack.cxx index 5aa45e5ddf1c5e383c7b12176e2715bcaf541819..357c703d42af0cb8f4173deb3bc911d767f48053 100755 --- a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/SiClusterOnTrack.cxx +++ b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/SiClusterOnTrack.cxx @@ -6,13 +6,14 @@ // SiClusterOnTrack.cxx, (c) ATLAS Detector software /////////////////////////////////////////////////////////////////// -#include <new> #include "InDetRIO_OnTrack/SiClusterOnTrack.h" #include "TrkRIO_OnTrack/RIO_OnTrack.h" #include "TrkEventPrimitives/LocalParameters.h" #include "TrkSurfaces/Surface.h" #include "InDetPrepRawData/SiCluster.h" #include "GaudiKernel/MsgStream.h" +#include <memory> +#include <new> #include <ostream> #include <typeinfo> @@ -25,7 +26,7 @@ InDet::SiClusterOnTrack::SiClusterOnTrack( const Trk::LocalParameters& locpars, bool isbroad) : RIO_OnTrack(locpars, locerr, id), //call base class constructor m_idDE(idDE), - m_globalPosition(0), + m_globalPosition{}, m_isbroad(isbroad) {} @@ -39,7 +40,7 @@ InDet::SiClusterOnTrack::SiClusterOnTrack( const Trk::LocalParameters& locpars, : RIO_OnTrack(locpars, locerr, id), //call base class constructor m_idDE(idDE), - m_globalPosition( new Amg::Vector3D(globalPosition) ), + m_globalPosition(std::make_unique<Amg::Vector3D>(globalPosition)), m_isbroad(isbroad) {} @@ -47,14 +48,13 @@ InDet::SiClusterOnTrack::SiClusterOnTrack( const Trk::LocalParameters& locpars, // Destructor: InDet::SiClusterOnTrack::~SiClusterOnTrack() { - delete m_globalPosition; } // Default constructor: InDet::SiClusterOnTrack::SiClusterOnTrack(): Trk::RIO_OnTrack(), m_idDE(), - m_globalPosition(), + m_globalPosition{}, m_isbroad(false) {} @@ -63,17 +63,23 @@ InDet::SiClusterOnTrack::SiClusterOnTrack( const SiClusterOnTrack& rot) : RIO_OnTrack(rot), m_idDE(rot.m_idDE), - m_globalPosition(rot.m_globalPosition ? new Amg::Vector3D(*rot.m_globalPosition) : 0), + m_globalPosition{}, m_isbroad(rot.m_isbroad) -{} +{ + if (rot.m_globalPosition) { + m_globalPosition.set(std::make_unique<const Amg::Vector3D>(*(rot.m_globalPosition))); + } +} // assignment operator: InDet::SiClusterOnTrack& InDet::SiClusterOnTrack::operator=( const SiClusterOnTrack& rot){ if ( &rot != this) { - delete m_globalPosition; - Trk::RIO_OnTrack::operator=(rot); + delete m_globalPosition.release().get(); + Trk::RIO_OnTrack::operator=(rot); m_idDE = rot.m_idDE; - m_globalPosition = rot.m_globalPosition ? new Amg::Vector3D(*rot.m_globalPosition) : 0; + if (rot.m_globalPosition) { + m_globalPosition.set(std::make_unique<const Amg::Vector3D>(*(rot.m_globalPosition))); + } m_isbroad = rot.m_isbroad; } return *this; @@ -84,8 +90,10 @@ InDet::SiClusterOnTrack& InDet::SiClusterOnTrack::operator=( const SiClusterOnTr const Amg::Vector3D& InDet::SiClusterOnTrack::globalPosition() const { - if (!m_globalPosition) m_globalPosition = associatedSurface().localToGlobal(localParameters()); - return (*m_globalPosition); + if (not m_globalPosition) { + m_globalPosition.set(std::unique_ptr<const Amg::Vector3D>(associatedSurface().localToGlobal(localParameters()))); + } + return (*m_globalPosition); } MsgStream& InDet::SiClusterOnTrack::dump( MsgStream& sl ) const @@ -96,7 +104,7 @@ MsgStream& InDet::SiClusterOnTrack::dump( MsgStream& sl ) const sl << "Global position (x,y,z) = ("; this->globalPosition(); - if ( m_globalPosition !=0 ) + if (m_globalPosition) { sl <<this->globalPosition().x()<<", " <<this->globalPosition().y()<<", " @@ -116,7 +124,7 @@ std::ostream& InDet::SiClusterOnTrack::dump( std::ostream& sl ) const sl << "Global position (x,y,z) = ("; this->globalPosition(); - if ( m_globalPosition !=0 ) + if (m_globalPosition) { sl <<this->globalPosition().x()<<", " <<this->globalPosition().y()<<", " diff --git a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/TRTRIO_OnTrackErrorScaling.cxx b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/TRTRIO_OnTrackErrorScaling.cxx index 95362b0fca81e9795c52f4294489ca242a61343e..29929fc83a89bc0df8d081f4f8aeb23b00d29888 100644 --- a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/TRTRIO_OnTrackErrorScaling.cxx +++ b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/TRTRIO_OnTrackErrorScaling.cxx @@ -1,10 +1,10 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "InDetRIO_OnTrack/TRTRIO_OnTrackErrorScaling.h" #include <iostream> -const char *TRTRIO_OnTrackErrorScaling::s_names[TRTRIO_OnTrackErrorScaling::kNParamTypes]={ +const char* const TRTRIO_OnTrackErrorScaling::s_names[TRTRIO_OnTrackErrorScaling::kNParamTypes]={ "TRT Barrel", "TRT Endcap" }; diff --git a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/TRT_DriftCircleOnTrack.cxx b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/TRT_DriftCircleOnTrack.cxx index 29317b2ee30a249372e062d3802a035f0283ffd7..f4ecaafff05d6b1e5d850b4e8dddfdd0148bdb67 100755 --- a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/TRT_DriftCircleOnTrack.cxx +++ b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/src/TRT_DriftCircleOnTrack.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -13,11 +13,14 @@ #include "TrkEventPrimitives/LocalParameters.h" #include "TrkSurfaces/Surface.h" #include "TrkSurfaces/StraightLineSurface.h" -#include <cassert> + #include "GaudiKernel/MsgStream.h" -#include <ostream> -#include <limits> +#include <cassert> +#include <limits> +#include <memory> +#include <ostream> +#include <utility> // Constructor with parameters: InDet::TRT_DriftCircleOnTrack::TRT_DriftCircleOnTrack( @@ -30,7 +33,7 @@ InDet::TRT_DriftCircleOnTrack::TRT_DriftCircleOnTrack( const Trk::DriftCircleStatus status) : Trk::RIO_OnTrack(driftRadius, errDriftRadius, RIO->identify()), //call base class constructor - m_globalPosition(0), + m_globalPosition{}, m_positionAlongWire(predictedLocZ), m_idDE(idDE), m_status(status), @@ -40,7 +43,7 @@ InDet::TRT_DriftCircleOnTrack::TRT_DriftCircleOnTrack( { m_rio.setElement(RIO); const Trk::StraightLineSurface* slsf = dynamic_cast<const Trk::StraightLineSurface*>(&(m_detEl->surface(RIO->identify()))); - if(slsf) m_globalPosition = slsf->localToGlobal(driftRadius, predictedTrackDirection, predictedLocZ); + if (slsf) m_globalPosition.set(std::unique_ptr<const Amg::Vector3D>(slsf->localToGlobal(driftRadius, predictedTrackDirection, predictedLocZ))); Amg::Vector3D loc_gDirection = predictedTrackDirection; const double dr = driftRadius[Trk::driftRadius]; //scaling the direction with drift radius @@ -52,13 +55,13 @@ InDet::TRT_DriftCircleOnTrack::TRT_DriftCircleOnTrack( // Destructor: InDet::TRT_DriftCircleOnTrack::~TRT_DriftCircleOnTrack() -{ delete m_globalPosition; } +{} // default constructor: InDet::TRT_DriftCircleOnTrack::TRT_DriftCircleOnTrack() : Trk::RIO_OnTrack(), - m_globalPosition(0), + m_globalPosition{}, m_localAngle(std::numeric_limits<float>::quiet_NaN()), m_positionAlongWire(std::numeric_limits<float>::quiet_NaN()), m_rio(), @@ -81,7 +84,7 @@ InDet::TRT_DriftCircleOnTrack::TRT_DriftCircleOnTrack bool highLevel, double timeOverThreshold) : Trk::RIO_OnTrack (driftRadius, errDriftRadius, id), - m_globalPosition(nullptr), + m_globalPosition{}, m_localAngle(localAngle), m_positionAlongWire(predictedLocZ), m_rio(RIO), @@ -96,27 +99,33 @@ InDet::TRT_DriftCircleOnTrack::TRT_DriftCircleOnTrack //copy constructor: InDet::TRT_DriftCircleOnTrack::TRT_DriftCircleOnTrack( const InDet::TRT_DriftCircleOnTrack& rot): Trk::RIO_OnTrack(rot), - m_globalPosition(rot.m_globalPosition ? new Amg::Vector3D(*rot.m_globalPosition) : 0 ), - m_localAngle(rot.m_localAngle), - m_positionAlongWire(rot.m_positionAlongWire), + m_globalPosition{}, + m_localAngle(rot.m_localAngle.load()), + m_positionAlongWire(rot.m_positionAlongWire.load()), m_rio(rot.m_rio), m_idDE(rot.m_idDE), m_status(rot.m_status), m_highLevel(rot.m_highLevel), m_timeOverThreshold(rot.m_timeOverThreshold), m_detEl(rot.m_detEl) -{} +{ + if (rot.m_globalPosition) { + m_globalPosition.set(std::make_unique<const Amg::Vector3D>(*(rot.m_globalPosition))); + } +} //assignment operator: InDet::TRT_DriftCircleOnTrack& InDet::TRT_DriftCircleOnTrack::operator=( const InDet::TRT_DriftCircleOnTrack& rot) { if ( &rot != this) { Trk::RIO_OnTrack::operator= (rot); - delete m_globalPosition; - m_globalPosition = (rot.m_globalPosition ? new Amg::Vector3D(*rot.m_globalPosition) : 0); + if (m_globalPosition) delete m_globalPosition.release().get(); + if (rot.m_globalPosition) { + m_globalPosition.set(std::make_unique<const Amg::Vector3D>(*(rot.m_globalPosition))); + } m_rio = rot.m_rio; - m_localAngle = rot.m_localAngle; - m_positionAlongWire = rot.m_positionAlongWire; + m_localAngle = rot.m_localAngle.load(); + m_positionAlongWire = rot.m_positionAlongWire.load(); m_idDE = rot.m_idDE; m_status = rot.m_status; m_highLevel = rot.m_highLevel; @@ -131,11 +140,11 @@ InDet::TRT_DriftCircleOnTrack& InDet::TRT_DriftCircleOnTrack::operator=( InDet:: { if ( &rot != this) { Trk::RIO_OnTrack::operator= (rot); - delete m_globalPosition; - m_globalPosition = rot.m_globalPosition; + if (m_globalPosition) delete m_globalPosition.release().get(); + m_globalPosition = std::move(rot.m_globalPosition); m_rio = rot.m_rio; - m_localAngle = rot.m_localAngle; - m_positionAlongWire = rot.m_positionAlongWire; + m_localAngle = rot.m_localAngle.load(); + m_positionAlongWire = rot.m_positionAlongWire.load(); m_idDE = rot.m_idDE; m_status = rot.m_status; m_highLevel = rot.m_highLevel; @@ -161,7 +170,7 @@ const Trk::Surface& InDet::TRT_DriftCircleOnTrack::associatedSurface() const void InDet::TRT_DriftCircleOnTrack::setGlobalPosition(Amg::Vector3D& loc3Dframe) const{ const Trk::StraightLineSurface* slsf = dynamic_cast<const Trk::StraightLineSurface*>( &(associatedSurface()) ); if(slsf) { - m_globalPosition = new Amg::Vector3D(slsf->transform() * loc3Dframe); + m_globalPosition.set(std::make_unique<Amg::Vector3D>(slsf->transform() * loc3Dframe)); }else{ throw GaudiException("Dynamic_cast to StraightLineSurface failed!", "TRT_DriftCircleOnTrack::setGlobalPosition()", @@ -176,7 +185,7 @@ void InDet::TRT_DriftCircleOnTrack::setValues(const Trk::TrkDetElementBase* detE const Amg::Vector3D& InDet::TRT_DriftCircleOnTrack::globalPosition() const { - if (!m_globalPosition) + if (not m_globalPosition) { if (side()==Trk::NONE) @@ -233,7 +242,7 @@ std::ostream& InDet::TRT_DriftCircleOnTrack::dump( std::ostream& sl ) const sl << "Global position (x,y,z) = ("; this->globalPosition(); - if ( m_globalPosition !=0 ) + if (m_globalPosition) { sl <<this->globalPosition().x()<<", " <<this->globalPosition().y()<<", " diff --git a/InnerDetector/InDetRecEvent/SiSpacePoint/SiSpacePoint/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetRecEvent/SiSpacePoint/SiSpacePoint/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..29eee3ea62f1552c8a6912cf1511e40d1e04148d --- /dev/null +++ b/InnerDetector/InDetRecEvent/SiSpacePoint/SiSpacePoint/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +InnerDetector/InDetRecEvent/SiSpacePoint diff --git a/InnerDetector/InDetRecEvent/SiSpacePoint/SiSpacePoint/SCT_SpacePoint.h b/InnerDetector/InDetRecEvent/SiSpacePoint/SiSpacePoint/SCT_SpacePoint.h index 4af8f9683e56a0400ade7f89c8b965c20df83feb..54766f3a796a9fd2e4ff5a51a747c9b7ef5a86a9 100755 --- a/InnerDetector/InDetRecEvent/SiSpacePoint/SiSpacePoint/SCT_SpacePoint.h +++ b/InnerDetector/InDetRecEvent/SiSpacePoint/SiSpacePoint/SCT_SpacePoint.h @@ -89,7 +89,6 @@ namespace InDet void setup(const std::pair<IdentifierHash, IdentifierHash>& elementIdList, const Amg::Vector3D& position, const std::pair<const Trk::PrepRawData*, const Trk::PrepRawData*>* clusList); - }; /////////////////////////////////////////////////////////////////// diff --git a/InnerDetector/InDetRecEvent/SiSpacePoint/src/SCT_SpacePoint.cxx b/InnerDetector/InDetRecEvent/SiSpacePoint/src/SCT_SpacePoint.cxx index 16714c730c9f7cc39565c97c286a6ac3d3e18806..7adb6e674f2c7b89c2a169f4671801ebb27dd9df 100755 --- a/InnerDetector/InDetRecEvent/SiSpacePoint/src/SCT_SpacePoint.cxx +++ b/InnerDetector/InDetRecEvent/SiSpacePoint/src/SCT_SpacePoint.cxx @@ -103,18 +103,11 @@ namespace InDet //------------------------------------------------------------- - /* Return the local covariance matrix. */ - static const Amg::MatrixX* sctSpacePointSharedLocalCovariance = 0; - //--------------------------------------------------------------- void SCT_SpacePoint::setupLocalCovarianceSCT() { - if( sctSpacePointSharedLocalCovariance ){ - Trk::MeasurementBase::m_localCovariance = *sctSpacePointSharedLocalCovariance; - return; - } /* For performance reason only, the error is assumed constant. numbers are taken from Trigger/TrigTools/TrigOfflineSpacePointTool/OfflineSpacePointProviderTool */ diff --git a/InnerDetector/InDetRecEvent/SiSpacePointsSeed/SiSpacePointsSeed/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetRecEvent/SiSpacePointsSeed/SiSpacePointsSeed/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..60920e36ee18fe49a4cbdc1fe6491b380aeab6ff --- /dev/null +++ b/InnerDetector/InDetRecEvent/SiSpacePointsSeed/SiSpacePointsSeed/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +InnerDetector/InDetRecEvent/SiSpacePointsSeed diff --git a/InnerDetector/InDetRecTools/InDetCompetingRIOsOnTrackTool/InDetCompetingRIOsOnTrackTool/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetRecTools/InDetCompetingRIOsOnTrackTool/InDetCompetingRIOsOnTrackTool/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..b86ad13e8993aaaaca39310ec0ef9c523d5e5eb3 --- /dev/null +++ b/InnerDetector/InDetRecTools/InDetCompetingRIOsOnTrackTool/InDetCompetingRIOsOnTrackTool/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +InnerDetector/InDetRecTools/InDetCompetingRIOsOnTrackTool diff --git a/InnerDetector/InDetRecTools/InDetCompetingRIOsOnTrackTool/src/CompetingPixelClustersOnTrackTool.cxx b/InnerDetector/InDetRecTools/InDetCompetingRIOsOnTrackTool/src/CompetingPixelClustersOnTrackTool.cxx index 8e8da7b4e95730c2d782b5d36fa2e766a0c5bb70..39b1e0c85a8af549c057229b6196c1d371042f7a 100755 --- a/InnerDetector/InDetRecTools/InDetCompetingRIOsOnTrackTool/src/CompetingPixelClustersOnTrackTool.cxx +++ b/InnerDetector/InDetRecTools/InDetCompetingRIOsOnTrackTool/src/CompetingPixelClustersOnTrackTool.cxx @@ -391,8 +391,9 @@ void InDet::CompetingPixelClustersOnTrackTool::updateCompetingROT( // update maximum assign prob index: compROT->m_indexMaxAssignProb = maximumAssignProbIndex; // delete global position (will be recreated by the competingROT itself) - delete compROT->m_globalPosition; - compROT->m_globalPosition = 0; // very important, otherwise segfault... + if (compROT->m_globalPosition) { + delete compROT->m_globalPosition.release().get(); + } compROT->setLocalParametersAndErrorMatrix(); if (msgLvl(MSG::DEBUG)) testCompetingROT(*compROT); } @@ -543,8 +544,9 @@ StatusCode InDet::CompetingPixelClustersOnTrackTool::updateCompetingROTprobs( } // end for loop compROT->m_assignProb = assgnProbVector; // delete global position (will be recreated by the competingROT itself) - delete compROT->m_globalPosition; - compROT->m_globalPosition = 0; // very important, otherwise segfault... + if (compROT->m_globalPosition) { + delete compROT->m_globalPosition.release().get(); + } // recalc localParameters compROT->setLocalParametersAndErrorMatrix(); diff --git a/InnerDetector/InDetRecTools/InDetCompetingRIOsOnTrackTool/src/CompetingSCT_ClustersOnTrackTool.cxx b/InnerDetector/InDetRecTools/InDetCompetingRIOsOnTrackTool/src/CompetingSCT_ClustersOnTrackTool.cxx index 4c03a8418bc6d48d45a33d17ea59a4222caf5ebf..4490984037a3db021dc30e057acdbdcde09f053f 100755 --- a/InnerDetector/InDetRecTools/InDetCompetingRIOsOnTrackTool/src/CompetingSCT_ClustersOnTrackTool.cxx +++ b/InnerDetector/InDetRecTools/InDetCompetingRIOsOnTrackTool/src/CompetingSCT_ClustersOnTrackTool.cxx @@ -386,8 +386,9 @@ void InDet::CompetingSCT_ClustersOnTrackTool::updateCompetingROT( // update maximum assign prob index: compROT->m_indexMaxAssignProb = maximumAssignProbIndex; // delete global position (will be recreated by the competingROT itself) - delete compROT->m_globalPosition; - compROT->m_globalPosition = 0; // very important, otherwise segfault... + if (compROT->m_globalPosition) { + delete compROT->m_globalPosition.release().get(); + } // delete localParameters compROT->setLocalParametersAndErrorMatrix(); if (msgLvl(MSG::VERBOSE)) testCompetingROT(*compROT); @@ -539,8 +540,9 @@ StatusCode InDet::CompetingSCT_ClustersOnTrackTool::updateCompetingROTprobs( } // end for loop compROT->m_assignProb = assgnProbVector; // delete global position (will be recreated by the competingROT itself) - delete compROT->m_globalPosition; - compROT->m_globalPosition = 0; // very important, otherwise segfault... + if (compROT->m_globalPosition) { + delete compROT->m_globalPosition.release().get(); + } // recalc localParameters compROT->setLocalParametersAndErrorMatrix(); if (msgLvl(MSG::DEBUG)) testCompetingROT(*compROT); diff --git a/InnerDetector/InDetRecTools/InDetCompetingRIOsOnTrackTool/src/CompetingTRT_DriftCirclesOnTrackTool.cxx b/InnerDetector/InDetRecTools/InDetCompetingRIOsOnTrackTool/src/CompetingTRT_DriftCirclesOnTrackTool.cxx index 98a6875369bfa73731537112a98e85884342f985..19e04cf777bbce85c35c785d6330978dcce556bb 100755 --- a/InnerDetector/InDetRecTools/InDetCompetingRIOsOnTrackTool/src/CompetingTRT_DriftCirclesOnTrackTool.cxx +++ b/InnerDetector/InDetRecTools/InDetCompetingRIOsOnTrackTool/src/CompetingTRT_DriftCirclesOnTrackTool.cxx @@ -479,7 +479,7 @@ void InDet::CompetingTRT_DriftCirclesOnTrackTool::updateCompetingROT( // cast baseCompROT to CompTRT_DConTrack: - const InDet::CompetingTRT_DriftCirclesOnTrack* compROT = dynamic_cast< const InDet::CompetingTRT_DriftCirclesOnTrack* >(&baseCompROT); + InDet::CompetingTRT_DriftCirclesOnTrack* compROT = dynamic_cast< InDet::CompetingTRT_DriftCirclesOnTrack* >(&baseCompROT); if (!compROT) { ATH_MSG_ERROR("Given CompetingRIOsOnTrack is not a CompetingTRT_DriftCirclesOnTrack!"); ATH_MSG_ERROR("Update of assignment probabilities aborted!!!"); @@ -718,8 +718,9 @@ void InDet::CompetingTRT_DriftCirclesOnTrackTool::updateCompetingROT( delete compROT->m_associatedSurface; compROT->m_associatedSurface=assocSurface; // delete global position (will be recreated in competingROT itself - delete compROT->m_globalPosition; - compROT->m_globalPosition = 0; // very important otherwise segfault in destructor... + if (compROT->m_globalPosition) { + delete compROT->m_globalPosition.release().get(); + } //calling CompetingTRT_DriftCirclesOnTrack::setLocalParametersAndErrorMatrix() does not work here! // have to set the effective measurement and error matrix directly: //const_cast<InDet::CompetingTRT_DriftCirclesOnTrack*>(compROT)->setLocalParametersAndErrorMatrix(); diff --git a/InnerDetector/InDetRecTools/SiClusterOnTrackTool/CMakeLists.txt b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/CMakeLists.txt index fd0bf3e76892555eb2f185f8c4501f1974d440a4..276b06da449b2043daa0e5c1a5c5c01ea5886343 100644 --- a/InnerDetector/InDetRecTools/SiClusterOnTrackTool/CMakeLists.txt +++ b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/CMakeLists.txt @@ -8,6 +8,7 @@ atlas_subdir( SiClusterOnTrackTool ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC Control/AthenaBaseComps + Control/CxxUtils Database/AthenaPOOL/AthenaPoolUtilities DetectorDescription/GeoPrimitives GaudiKernel @@ -40,7 +41,7 @@ atlas_add_component( SiClusterOnTrackTool src/*.cxx src/components/*.cxx INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS} - LINK_LIBRARIES ${EIGEN_LIBRARIES} AthenaBaseComps AthenaPoolUtilities GeoPrimitives GaudiKernel InDetPrepRawData InDetRIO_OnTrack TrkParameters TrkToolInterfaces TrkAmbiguityProcessorLib StoreGateLib SGtests EventPrimitives InDetIdentifier InDetReadoutGeometry SiClusterizationToolLib TrkSurfaces TrkRIO_OnTrack PixelConditionsData TrkNeuralNetworkUtils ) + LINK_LIBRARIES ${EIGEN_LIBRARIES} AthenaBaseComps CxxUtils AthenaPoolUtilities GeoPrimitives GaudiKernel InDetPrepRawData InDetRIO_OnTrack TrkParameters TrkToolInterfaces TrkAmbiguityProcessorLib StoreGateLib SGtests EventPrimitives InDetIdentifier InDetReadoutGeometry SiClusterizationToolLib TrkSurfaces TrkRIO_OnTrack PixelConditionsData TrkNeuralNetworkUtils ) # Install files from the package: atlas_install_headers( SiClusterOnTrackTool ) diff --git a/InnerDetector/InDetRecTools/SiClusterOnTrackTool/SiClusterOnTrackTool/SCT_ClusterOnTrackTool.h b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/SiClusterOnTrackTool/SCT_ClusterOnTrackTool.h index c108691157fa165baa0dd71122d96f5162980212..cf979bdc1a887c5c7a036df410ec17255a6a0051 100755 --- a/InnerDetector/InDetRecTools/SiClusterOnTrackTool/SiClusterOnTrackTool/SCT_ClusterOnTrackTool.h +++ b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/SiClusterOnTrackTool/SCT_ClusterOnTrackTool.h @@ -18,11 +18,15 @@ #include "GaudiKernel/ToolHandle.h" #include "AthenaBaseComps/AthAlgTool.h" #include "TrkToolInterfaces/IRIO_OnTrackCreator.h" -#include "InDetRIO_OnTrack/SCTRIO_OnTrackErrorScaling.h" -#include "TrkParameters/TrackParameters.h" + +#include "CxxUtils/checker_macros.h" +#include "InDetCondTools/ISiLorentzAngleTool.h" #include "InDetRIO_OnTrack/SCT_ClusterOnTrack.h" +#include "InDetRIO_OnTrack/SCTRIO_OnTrackErrorScaling.h" #include "SCT_ModuleDistortions/ISCT_ModuleDistortionsTool.h" -#include "InDetCondTools/ISiLorentzAngleTool.h" +#include "TrkParameters/TrackParameters.h" + +ATLAS_CHECK_FILE_THREAD_SAFETY; namespace InDet { diff --git a/InnerDetector/InDetRecTools/SiClusterOnTrackTool/src/PixelClusterOnTrackTool.cxx b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/src/PixelClusterOnTrackTool.cxx index b179d7b1fa5d755e5304292706d939580ae40943..a49ca7a88d55b3aa2d833bb2724e76e26e2d16fc 100755 --- a/InnerDetector/InDetRecTools/SiClusterOnTrackTool/src/PixelClusterOnTrackTool.cxx +++ b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/src/PixelClusterOnTrackTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ ///////////////////////////////////////////////////////////////// diff --git a/InnerDetector/InDetRecTools/SiClusterOnTrackTool/src/SCT_ClusterOnTrackTool.cxx b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/src/SCT_ClusterOnTrackTool.cxx index c3a6a1632108eb6ac2254bae443a6a271c3503aa..ba96b1f88e554897e1026f9797c61ad9ebb57be0 100755 --- a/InnerDetector/InDetRecTools/SiClusterOnTrackTool/src/SCT_ClusterOnTrackTool.cxx +++ b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/src/SCT_ClusterOnTrackTool.cxx @@ -14,14 +14,18 @@ #include "SiClusterOnTrackTool/SCT_ClusterOnTrackTool.h" +#include "CxxUtils/checker_macros.h" #include "TrkSurfaces/RectangleBounds.h" #include "TrkSurfaces/TrapezoidBounds.h" -#include <cmath> #include "TrkRIO_OnTrack/check_cast.h" +#include <cmath> + using CLHEP::micrometer; using CLHEP::deg; +ATLAS_CHECK_FILE_THREAD_SAFETY; + /////////////////////////////////////////////////////////////////// // Constructor /////////////////////////////////////////////////////////////////// diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/CMakeLists.txt b/InnerDetector/InDetRecTools/SiClusterizationTool/CMakeLists.txt index 4e316f6c687b568625fb48865de454ac5620482f..d21cd07c945dcc073d33b5cd30c9c80f53508e14 100644 --- a/InnerDetector/InDetRecTools/SiClusterizationTool/CMakeLists.txt +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/CMakeLists.txt @@ -27,6 +27,7 @@ atlas_depends_on_subdirs( Tracking/TrkEvent/TrkParameters Tracking/TrkUtilityPackages/TrkNeuralNetworkUtils PRIVATE + Control/CxxUtils Database/AthenaPOOL/AthenaPoolUtilities Database/AthenaPOOL/PoolSvc Database/APR/FileCatalog @@ -52,7 +53,7 @@ atlas_add_library( SiClusterizationToolLib LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps AthenaKernel GeoPrimitives Identifier EventPrimitives GaudiKernel InDetSimData InDetIdentifier InDetReadoutGeometry InDetRawData InDetPrepRawData InDetRecToolInterfaces - TrkParameters TrkNeuralNetworkUtilsLib PixelConditionsData + TrkParameters TrkNeuralNetworkUtilsLib CxxUtils PixelConditionsData PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaPoolUtilities FileCatalog AtlasDetDescr TrkSurfaces TrkEventPrimitives VxVertex PixelGeoModelLib ) diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..e772806066a04394b96f89b55eb0a28e3c4571ea --- /dev/null +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +InnerDetector/InDetRecTools/SiClusterizationTool diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/ClusterMakerTool.h b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/ClusterMakerTool.h index ca84dd810669caeb5851e4a80cbe8c7bbd294e95..4e0505a0bcc07b3d3f073159e67eac36fa678372 100755 --- a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/ClusterMakerTool.h +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/ClusterMakerTool.h @@ -29,6 +29,8 @@ #include "PixelConditionsData/PixelOfflineCalibData.h" #include "StoreGate/ReadCondHandleKey.h" +#include <atomic> + class IPixelCalibSvc; template <class T> class ServiceHandle; class Identifier; @@ -142,6 +144,10 @@ private: // mutable MsgStream m_log; bool m_calibrateCharge; + mutable std::atomic_bool m_issueErrorA; + mutable std::atomic_bool m_forceErrorStrategy1A; + mutable std::atomic_bool m_issueErrorB; + mutable std::atomic_bool m_forceErrorStrategy1B; ServiceHandle<IPixelCalibSvc> m_calibSvc; ToolHandle<ISiLorentzAngleTool> m_pixelLorentzAngleTool{this, "PixelLorentzAngleTool", "SiLorentzAngleTool/PixelLorentzAngleTool", "Tool to retreive Lorentz angle of Pixel"}; ToolHandle<ISiLorentzAngleTool> m_sctLorentzAngleTool{this, "SCTLorentzAngleTool", "SiLorentzAngleTool/SCTLorentzAngleTool", "Tool to retreive Lorentz angle of SCT"}; diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/MergedPixelsTool.h b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/MergedPixelsTool.h index a5f18590501b2a77f1f2600874f69c7e71632504..437e86a64603d25ff9282852d57a526b8a3e01cf 100755 --- a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/MergedPixelsTool.h +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/MergedPixelsTool.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -21,13 +21,15 @@ #include "InDetPrepRawData/PixelGangedClusterAmbiguities.h" #include "Identifier/Identifier.h" -#include <vector> #include "GaudiKernel/ServiceHandle.h" // forward declare not possible (typedef) #include "InDetPrepRawData/PixelClusterCollection.h" +#include <atomic> +#include <vector> + class IIncidentSvc; class PixelID; //class StoreGateSvc; @@ -173,11 +175,12 @@ namespace InDet { std::string m_splitClusterMapName;//No longer used Remove later //!< split cluster ambiguity map - mutable unsigned int m_processedClusters; //!< statistics output - mutable unsigned int m_modifiedOrigClusters; //!< statistics output - mutable unsigned int m_splitOrigClusters; //!< statistics output - mutable unsigned int m_splitProdClusters; //!< statistics output - mutable unsigned int m_largeClusters; //!< statistics output + mutable std::atomic_uint m_processedClusters; //!< statistics output + mutable std::atomic_uint m_modifiedOrigClusters; //!< statistics output + mutable std::atomic_uint m_splitOrigClusters; //!< statistics output + mutable std::atomic_uint m_splitProdClusters; //!< statistics output + mutable std::atomic_uint m_largeClusters; //!< statistics output + mutable std::atomic_bool m_printw; std::vector<int> m_minToT; /**< ToT cut */ //ServiceHandle< StoreGateSvc > m_detStore; //const PixelID* m_idHelper; @@ -186,19 +189,3 @@ namespace InDet { } #endif // SICLUSTERIZATIONTOOL_MERGEDPIXELSALG_H - - - - - - - - - - - - - - - - diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/NnClusterizationFactory.h b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/NnClusterizationFactory.h index e2424bd06f506b6d7d2050b7d94c7767fbcca3de..c1a1bfcef9b15165c83a342dd5e8f82b3b4004e7 100644 --- a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/NnClusterizationFactory.h +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/NnClusterizationFactory.h @@ -39,6 +39,9 @@ #include "SiClusterizationTool/TTrainedNetworkCollection.h" #include "PixelConditionsServices/IPixelCalibSvc.h" +#include "CxxUtils/checker_macros.h" +ATLAS_NO_CHECK_FILE_THREAD_SAFETY; + class TTrainedNetwork; class TH1; class ICoolHistSvc; @@ -189,7 +192,7 @@ namespace InDet { kErrorXNN, kErrorYNN, kNNetworkTypes}; - static const char *s_nnTypeNames[kNNetworkTypes]; + static const char* const s_nnTypeNames[kNNetworkTypes]; std::vector<unsigned int> m_nParticleGroup; std::vector<std::regex> m_nnNames; diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/TruthClusterizationFactory.h b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/TruthClusterizationFactory.h index 3e4e2834b5b3bb0e063f324ec598ee1ada4b80c4..56339bdd7dd0a805cd466411d875bd16f54a5ccc 100644 --- a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/TruthClusterizationFactory.h +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/TruthClusterizationFactory.h @@ -16,7 +16,6 @@ #include "AthenaBaseComps/AthAlgTool.h" #include "GaudiKernel/ToolHandle.h" - #include "GaudiKernel/IIncidentSvc.h" #include <vector> #include <string> @@ -47,8 +46,7 @@ namespace InDet { static const InterfaceID IID_TruthClusterizationFactory("InDet::NnClusterizationFactory", 1, 0); - class TruthClusterizationFactory : virtual public IIncidentListener, - public AthAlgTool { + class TruthClusterizationFactory : public AthAlgTool { public: @@ -62,18 +60,13 @@ namespace InDet { virtual StatusCode initialize(); virtual StatusCode finalize() { return StatusCode::SUCCESS; }; - /** handle for incident service */ - virtual void handle(const Incident& inc); - std::vector<double> estimateNumberOfParticles(const InDet::PixelCluster& pCluster) const; std::vector<Amg::Vector2D> estimatePositions(const InDet::PixelCluster&) const; private: /** IncidentSvc to catch begining of event and end of event */ - ServiceHandle<IIncidentSvc> m_incidentSvc; SG::ReadHandleKey<InDetSimDataCollection> m_simDataCollectionName {this, "InputSDOMap", "PixelSDO_Map", "sim data collection name"}; - mutable const InDetSimDataCollection* m_simDataCollection; //!< sim data collection - refreshed at BeginEvent incident protected: ServiceHandle<IAtRndmGenSvc> m_rndmSvc; diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/ClusterMakerTool.cxx b/InnerDetector/InDetRecTools/SiClusterizationTool/src/ClusterMakerTool.cxx index b383a7af8663d5158b6bc631d59a2816453cfa20..2d135491b0b81439778e594425928a09e543bca6 100755 --- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/ClusterMakerTool.cxx +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/ClusterMakerTool.cxx @@ -47,6 +47,10 @@ ClusterMakerTool::ClusterMakerTool(const std::string& t, const std::string& n, const IInterface* p) : AthAlgTool(t,n,p), + m_issueErrorA(true), + m_forceErrorStrategy1A(false), + m_issueErrorB(true), + m_forceErrorStrategy1B(false), m_calibSvc("PixelCalibSvc", n) { declareInterface<ClusterMakerTool>(this); @@ -146,10 +150,8 @@ PixelCluster* ClusterMakerTool::pixelCluster( bool split, double splitProb1, double splitProb2) const{ - static bool issueError = true; - static bool forceErrorStrategy1 = false; - if ( errorStrategy==2 && issueError ) { - issueError=false; + if ( errorStrategy==2 && m_issueErrorA ) { + m_issueErrorA=false; } const AtlasDetectorID* aid = element->getIdHelper(); @@ -159,7 +161,7 @@ PixelCluster* ClusterMakerTool::pixelCluster( return nullptr; } - if ( errorStrategy==2 && forceErrorStrategy1 ) errorStrategy=1; + if ( errorStrategy==2 && m_forceErrorStrategy1A ) errorStrategy=1; // Fill vector of charges std::vector<float> chargeList; if (m_calibrateCharge) { @@ -294,12 +296,10 @@ PixelCluster* ClusterMakerTool::pixelCluster( if (msgLvl(MSG::VERBOSE)) msg() << "ClusterMakerTool called, number " << endmsg; - static bool issueError = true; - static bool forceErrorStrategy1 = false; - if ( errorStrategy==2 && issueError ) { - issueError=false; + if ( errorStrategy==2 && m_issueErrorB ) { + m_issueErrorB=false; } - if ( errorStrategy==2 && forceErrorStrategy1 ) errorStrategy=1; + if ( errorStrategy==2 && m_forceErrorStrategy1B ) errorStrategy=1; // Fill vector of charges and compute charge balance const InDetDD::PixelModuleDesign* design = (dynamic_cast<const InDetDD::PixelModuleDesign*>(&element->design())); diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/MergedPixelsTool.cxx b/InnerDetector/InDetRecTools/SiClusterizationTool/src/MergedPixelsTool.cxx index 454cbf01ad652398b54ac3a76b834a4b1f459527..4c5c9564b285763f2945f70652e216695c06e72e 100755 --- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/MergedPixelsTool.cxx +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/MergedPixelsTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -74,6 +74,7 @@ namespace InDet { m_splitOrigClusters(0), m_splitProdClusters(0), m_largeClusters(0), + m_printw(true), m_minToT({0,0,0,0,0,0,0}) //m_detStore("DetectorStore", name), //m_idHelper(0) @@ -786,10 +787,10 @@ PixelCluster* MergedPixelsTool::makeCluster if(m_posStrategy == 10 && !hasGanged && etaRow>0 && etaCol > 0){ // recFlag == 10 (CTB simulation) // use parametrization studied on CTB data by I. Reisinger (Dortmund) - static bool printw=true; - if (printw) { + if (m_printw) { ATH_MSG_ERROR("Detected position strategy = 10, this is an obsolete setting for CTB analysis and is not supported anymore since Athena 15.4.0"); - ATH_MSG_ERROR("...reverting to default setting: position strategy = 0"); printw=false; + ATH_MSG_ERROR("...reverting to default setting: position strategy = 0"); + m_printw=false; } } // Endcap SR1 Cosmics diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/NnClusterizationFactory.cxx b/InnerDetector/InDetRecTools/SiClusterizationTool/src/NnClusterizationFactory.cxx index be010465cd5353fa1aef70b77e8167e0bc5917e5..1de39a533d90e91e11849c23127ca6b6aaac36e5 100644 --- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/NnClusterizationFactory.cxx +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/NnClusterizationFactory.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ ///////////////////////////////////////////////////////////////////////////////////////////////////// @@ -46,11 +46,22 @@ #include <cmath> #include <regex> - +#include "CxxUtils/checker_macros.h" +ATLAS_NO_CHECK_FILE_THREAD_SAFETY; +// The following warning message appears four times and the check is disabled for this file. +// InnerDetector/InDetRecTools/SiClusterizationTool/src/NnClusterizationFactory.cxx: +// In member function 'std::vector<double> InDet::NnClusterizationFactory:: +// estimateNumberOfParticles(const InDet::PixelCluster&, Amg::Vector3D&, int, int) const': +// InnerDetector/InDetRecTools/SiClusterizationTool/src/NnClusterizationFactory.cxx:307:77: +// warning: Const discarded from expression '<unknown>' of type +// const InDet::NnClusterizationFactory* const' within function 'std::vector<double> +// InDet::NnClusterizationFactory::estimateNumberOfParticles +// (const InDet::PixelCluster&, Amg::Vector3D&, int, int) const'; may not be thread-safe. +// std::vector<double> inputData=(this->*m_assembleInput)(input,sizeX,sizeY); namespace InDet { - const char *NnClusterizationFactory::s_nnTypeNames[]={ + const char * const NnClusterizationFactory::s_nnTypeNames[]={ "NumberParticlesNN", "PositionNN", "ErrorXNN", diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/TruthClusterizationFactory.cxx b/InnerDetector/InDetRecTools/SiClusterizationTool/src/TruthClusterizationFactory.cxx index 553db1e479545af03f16bbe5de7a101be4c1d910..930ad357f1939d29e426a57c11cca1c142010a5d 100644 --- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/TruthClusterizationFactory.cxx +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/TruthClusterizationFactory.cxx @@ -2,65 +2,56 @@ Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ -///////////////////////////////////////////////////////////////////////////////////////////////////// -/// Name : TruthClusterizationFactory.cxx -/// Package : SiClusterizationTool -/// Author : Roland Jansky & Felix Cormier -/// Created : April 2016 -/// -/// DESCRIPTION: Emulates NN evaluation from truth (for ITK studies) -/////////////////////////////////////////////////////////////////////////////////////////////////////// - - - -#include <TMath.h> -#include "SiClusterizationTool/TruthClusterizationFactory.h" - -//for position estimate and clustering -#include "InDetIdentifier/PixelID.h" -#include "InDetPrepRawData/PixelCluster.h" - -#include "GaudiKernel/ServiceHandle.h" -#include "GaudiKernel/Incident.h" -#include "InDetSimData/InDetSimData.h" -#include "HepMC/GenParticle.h" - -#include "TrkEventPrimitives/ParamDefs.h" - +///////////////////////////////////////////////////////////////////////////////////////////////////// +/// Name : TruthClusterizationFactory.cxx +/// Package : SiClusterizationTool +/// Author : Roland Jansky & Felix Cormier +/// Created : April 2016 +/// +/// DESCRIPTION: Emulates NN evaluation from truth (for ITK studies) +/////////////////////////////////////////////////////////////////////////////////////////////////////// + + + +#include <TMath.h> +#include "SiClusterizationTool/TruthClusterizationFactory.h" + +//for position estimate and clustering +#include "InDetIdentifier/PixelID.h" +#include "InDetPrepRawData/PixelCluster.h" + +#include "GaudiKernel/ServiceHandle.h" +#include "GaudiKernel/Incident.h" +#include "InDetSimData/InDetSimData.h" +#include "HepMC/GenParticle.h" + +#include "TrkEventPrimitives/ParamDefs.h" + #include "CLHEP/Random/RandFlat.h" - -namespace InDet { - - TruthClusterizationFactory::TruthClusterizationFactory(const std::string& name, - const std::string& n, const IInterface* p): - AthAlgTool(name, n,p), - m_incidentSvc("IncidentSvc", n), - m_simDataCollection(0), + +namespace InDet { + + TruthClusterizationFactory::TruthClusterizationFactory(const std::string& name, + const std::string& n, const IInterface* p): + AthAlgTool(name, n,p), m_rndmSvc("AtDSFMTGenSvc",name), m_rndmEngine(0) { - // further properties - declareProperty("IncidentService", m_incidentSvc ); + // further properties declareProperty("RndmSvc", m_rndmSvc, "Random Number Service used in TruthClusterizationFactory"); - declareInterface<TruthClusterizationFactory>(this); - } - -///////////////////////////////////////////////////////////////////////////////////// -/// Destructor - check up memory allocation -/// delete any memory allocation on the heap - - TruthClusterizationFactory::~TruthClusterizationFactory() {} - - StatusCode TruthClusterizationFactory::initialize() { - if (m_incidentSvc.retrieve().isFailure()){ - ATH_MSG_WARNING("Can not retrieve " << m_incidentSvc << ". Exiting."); - return StatusCode::FAILURE; - } - - // register to the incident service - m_incidentSvc->addListener( this, "BeginEvent"); - + declareInterface<TruthClusterizationFactory>(this); + } + +///////////////////////////////////////////////////////////////////////////////////// +/// Destructor - check up memory allocation +/// delete any memory allocation on the heap + + TruthClusterizationFactory::~TruthClusterizationFactory() {} + + StatusCode TruthClusterizationFactory::initialize() { + + msg(MSG::INFO) << "initialize() successful in " << name() << endmsg; // random svc @@ -80,103 +71,89 @@ namespace InDet { ATH_CHECK( m_simDataCollectionName.initialize() ); - return StatusCode::SUCCESS; - } - - void TruthClusterizationFactory::handle(const Incident& inc) - { - if ( inc.type() == IncidentType::BeginEvent ){ - // record the SDO collection - - SG::ReadHandle<InDetSimDataCollection> pixSdoColl(m_simDataCollectionName); - - if (!pixSdoColl.isValid()){ - ATH_MSG_WARNING("Could not retrieve the InDetSimDataCollection with name " << m_simDataCollectionName); - m_simDataCollection = 0; - } else { - ATH_MSG_VERBOSE("Successfully retrieved the InDetSimDataCollection with name " << m_simDataCollectionName); - m_simDataCollection = &(*pixSdoColl); - } - } - } - + return StatusCode::SUCCESS; + } + + + std::vector<double> TruthClusterizationFactory::estimateNumberOfParticles(const InDet::PixelCluster& pCluster) const - { - std::vector<double> probabilities(3,0.); - auto rdos = pCluster.rdoList(); - bool crazycluster(true); - unsigned int nPartContributing = 0; - //Initialize vector for a list of UNIQUE barcodes for the cluster - std::vector<int> barcodes; - //Loop over all elements (pixels/strips) in the cluster - for (auto rdoIter : rdos){ - if (m_simDataCollection){ - auto simDataIter = m_simDataCollection->find(rdoIter); - if (simDataIter != m_simDataCollection->end()){ - crazycluster = false; - // get the SimData and count the individual contributions - auto simData = (simDataIter->second); - //auto simDataDeposits = simData.getdeposits(); - for( auto deposit : simData.getdeposits() ){ - //If deposit exists - if (deposit.first){ - //Now iterate over all barcodes - std::vector<int>::iterator barcodeIterator; - //Look for the barcode of the specific particle depositing energy in the barcodes vector - barcodeIterator = find(barcodes.begin(), barcodes.end(), deposit.first->barcode()); - //If this barcode is not found - if (!(barcodeIterator != barcodes.end())){ - //Add the barcode to the barcodes vector - barcodes.push_back(deposit.first->barcode()); - } - } - else ATH_MSG_WARNING("No deposits found"); - } - //nPartContributing = simDataDeposits.size() > nPartContributing ? simDataDeposits.size() : nPartContributing; - } - } - } - //Barcodes vector is then a list of the total number of UNIQUE - //barcodes in the cluster, each corresponding to a truth particle - nPartContributing = barcodes.size(); - ATH_MSG_VERBOSE("n Part Contributing: " << nPartContributing); - ATH_MSG_VERBOSE("Smearing TruthClusterizationFactory probability output for TIDE studies"); - //If only 1 truth particles found - if (nPartContributing==1) { - //NN will always return 100% chance of there being only 1 particle - probabilities[0] = 1.0; - } - //If two unique truth particles found in cluster - else if (nPartContributing==2) { - //90% chance NN returns high probability of there being 2 particles - if (CLHEP::RandFlat::shoot( m_rndmEngine, 0, 1 ) < 0.9) probabilities[1] = 1.0; - //Other 10% NN returns high probability of there being 1 particle - else probabilities[0] = 1.0; - } - //If greater than 2 unique truth particles in cluster - else if (nPartContributing>2) { - //90% chance NN returns high probability of there being >2 particles - if (CLHEP::RandFlat::shoot( m_rndmEngine, 0, 1 ) < 0.9) probabilities[2] = 1.0; - //Other 10% NN returns high probability of there being 1 particle - else probabilities[0] = 1.0; - } - - //if truth collection not found - if(crazycluster) { - std::vector<double> noprobabilities; - return noprobabilities; - } - //Else return probabilities calculated above - - return probabilities; - - } - + { + std::vector<double> probabilities(3,0.); + auto rdos = pCluster.rdoList(); + bool crazycluster(true); + unsigned int nPartContributing = 0; + //Initialize vector for a list of UNIQUE barcodes for the cluster + std::vector<int> barcodes; + SG::ReadHandle<InDetSimDataCollection> pixSdoColl(m_simDataCollectionName); + //Loop over all elements (pixels/strips) in the cluster + if(pixSdoColl.isValid()){ + for (auto rdoIter : rdos){ + auto simDataIter = pixSdoColl->find(rdoIter); + if (simDataIter != pixSdoColl->end()){ + crazycluster = false; + // get the SimData and count the individual contributions + auto simData = (simDataIter->second); + //auto simDataDeposits = simData.getdeposits(); + for( auto deposit : simData.getdeposits() ){ + //If deposit exists + if (deposit.first){ + //Now iterate over all barcodes + std::vector<int>::iterator barcodeIterator; + //Look for the barcode of the specific particle depositing energy in the barcodes vector + barcodeIterator = find(barcodes.begin(), barcodes.end(), deposit.first->barcode()); + //If this barcode is not found + if (!(barcodeIterator != barcodes.end())){ + //Add the barcode to the barcodes vector + barcodes.push_back(deposit.first->barcode()); + } + } + else ATH_MSG_WARNING("No deposits found"); + } + //nPartContributing = simDataDeposits.size() > nPartContributing ? simDataDeposits.size() : nPartContributing; + } + } + } + //Barcodes vector is then a list of the total number of UNIQUE + //barcodes in the cluster, each corresponding to a truth particle + nPartContributing = barcodes.size(); + ATH_MSG_VERBOSE("n Part Contributing: " << nPartContributing); + ATH_MSG_VERBOSE("Smearing TruthClusterizationFactory probability output for TIDE studies"); + //If only 1 truth particles found + if (nPartContributing==1) { + //NN will always return 100% chance of there being only 1 particle + probabilities[0] = 1.0; + } + //If two unique truth particles found in cluster + else if (nPartContributing==2) { + //90% chance NN returns high probability of there being 2 particles + if (CLHEP::RandFlat::shoot( m_rndmEngine, 0, 1 ) < 0.9) probabilities[1] = 1.0; + //Other 10% NN returns high probability of there being 1 particle + else probabilities[0] = 1.0; + } + //If greater than 2 unique truth particles in cluster + else if (nPartContributing>2) { + //90% chance NN returns high probability of there being >2 particles + if (CLHEP::RandFlat::shoot( m_rndmEngine, 0, 1 ) < 0.9) probabilities[2] = 1.0; + //Other 10% NN returns high probability of there being 1 particle + else probabilities[0] = 1.0; + } + + //if truth collection not found + if(crazycluster) { + std::vector<double> noprobabilities; + return noprobabilities; + } + //Else return probabilities calculated above + + return probabilities; + + } + std::vector<Amg::Vector2D> TruthClusterizationFactory::estimatePositions(const InDet::PixelCluster& ) const - { - ATH_MSG_ERROR("TruthClusterizationFactory::estimatePositions called for ITk ambiguity setup, should never happen! Digital clustering should be run for positions & errors."); - return std::vector<Amg::Vector2D>(2,Amg::Vector2D (2,0.)); - } - -}//end InDet namespace - + { + ATH_MSG_ERROR("TruthClusterizationFactory::estimatePositions called for ITk ambiguity setup, should never happen! Digital clustering should be run for positions & errors."); + return std::vector<Amg::Vector2D>(2,Amg::Vector2D (2,0.)); + } + +}//end InDet namespace + diff --git a/InnerDetector/InDetRecTools/SiSpacePointTool/SiSpacePointTool/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetRecTools/SiSpacePointTool/SiSpacePointTool/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..5198e477a6f7b1bba2c6e8a99a7c0e02b00b027a --- /dev/null +++ b/InnerDetector/InDetRecTools/SiSpacePointTool/SiSpacePointTool/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +InnerDetector/InDetRecTools/SiSpacePointTool diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..e820b9d352f1526bc626e2dc52ce76560b654f22 --- /dev/null +++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/SiSpacePointsSeedTool_xk/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk diff --git a/InnerDetector/InDetRecTools/TRT_ElectronPidTools/TRT_ElectronPidTools/ITRT_LocalOccupancy.h b/InnerDetector/InDetRecTools/TRT_ElectronPidTools/TRT_ElectronPidTools/ITRT_LocalOccupancy.h index acb34dda6208df2641e681c170ff6de76d2c69a2..6adf7b61a63f54be8c976d33c3370eb6d59dcea3 100644 --- a/InnerDetector/InDetRecTools/TRT_ElectronPidTools/TRT_ElectronPidTools/ITRT_LocalOccupancy.h +++ b/InnerDetector/InDetRecTools/TRT_ElectronPidTools/TRT_ElectronPidTools/ITRT_LocalOccupancy.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -21,34 +21,31 @@ class Identifier; namespace Trk { class Track ; } - /** @class ITRT_LocalOccupancy + /** @class ITRT_LocalOccupancy @author Alejandro Alonso: <Alejandro.Alonso@cern.ch> */ namespace InDet { - /** Declaration of the interface ID ( interface id, major version, minor version) */ - static const InterfaceID IID_ITRT_LocalOccupancy("InDet::ITRT_LocalOccupancy", 1 , 0); class ITRT_LocalOccupancy : virtual public IAlgTool { public: - /** AlgTool interface methods */ - static const InterfaceID& interfaceID() ; /** Virtual destructor */ virtual ~ITRT_LocalOccupancy(){}; - virtual StatusCode initialize() = 0; - virtual StatusCode finalize() = 0; - /** Return the local occupancy for the sectors crossed by a given track */ + /// Creates the InterfaceID and interfaceID() method + DeclareInterfaceID(ITRT_LocalOccupancy, 1, 0); + + /** Return the local occupancy for the sectors crossed by a given track */ virtual float LocalOccupancy( const Trk::Track& track) const = 0; virtual float LocalOccupancy(const double eta, const double phi) const = 0; - + /** Return a map of the occupancy in the barrel (-1,+1) and endcaps (-2,+2) */ virtual std::map<int, double> getDetectorOccupancy( const TRT_RDO_Container* p_trtRDOContainer ) const = 0; - - /** Return the global occupancy of the event*/ + + /** Return the global occupancy of the event*/ virtual std::vector<float> GlobalOccupancy( ) const = 0 ; /* virtual int **getOccLocalWheel() = 0; */ @@ -67,11 +64,7 @@ namespace InDet /* virtual int **getOccLocalPrivate() = 0; */ /* virtual int **getHitLocalPrivate() = 0; */ /* virtual int **getStwLocalPrivate() = 0; */ - }; + }; - inline const InterfaceID& InDet::ITRT_LocalOccupancy::interfaceID() - { - return IID_ITRT_LocalOccupancy; - } } -#endif +#endif diff --git a/InnerDetector/InDetRecTools/TRT_ElectronPidTools/TRT_ElectronPidTools/TRT_LocalOccupancy.h b/InnerDetector/InDetRecTools/TRT_ElectronPidTools/TRT_ElectronPidTools/TRT_LocalOccupancy.h index 00b5500c45dc55125b473165d6b04fca6912fa10..635e72a6687317468e88d38e5dd77e4c90978b15 100644 --- a/InnerDetector/InDetRecTools/TRT_ElectronPidTools/TRT_ElectronPidTools/TRT_LocalOccupancy.h +++ b/InnerDetector/InDetRecTools/TRT_ElectronPidTools/TRT_ElectronPidTools/TRT_LocalOccupancy.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -50,8 +50,7 @@ namespace InDet @author Alejandro Alonso: <Alejandro.Alonso@cern.ch> */ - class TRT_LocalOccupancy : public AthAlgTool, - virtual public ITRT_LocalOccupancy{ + class TRT_LocalOccupancy : public extends <AthAlgTool, ITRT_LocalOccupancy> { public: TRT_LocalOccupancy(const std::string&,const std::string&,const IInterface*); diff --git a/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_LocalOccupancy.cxx b/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_LocalOccupancy.cxx index 8ce810d8c21a08d769bf0166d2fbebcaecf0ce98..aca757faf83ce6f543921e3cddd9750e6f53e804 100644 --- a/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_LocalOccupancy.cxx +++ b/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_LocalOccupancy.cxx @@ -43,12 +43,11 @@ TRT_LocalOccupancy::TRT_LocalOccupancy(const std::string& t, const std::string& n, const IInterface* p ) : - AthAlgTool(t,n,p), + base_class(t,n,p), m_TRTHelper(nullptr), m_TRTStrawStatusSummarySvc("InDetTRTStrawStatusSummarySvc", n), m_driftFunctionTool("TRT_DriftFunctionTool") { - declareInterface<ITRT_LocalOccupancy>(this); //declareProperty("isData", m_DATA = true); declareProperty("TRTStrawSummarySvc", m_TRTStrawStatusSummarySvc); declareProperty("isTrigger", m_isTrigger = false); diff --git a/InnerDetector/InDetSimEvent/CMakeLists.txt b/InnerDetector/InDetSimEvent/CMakeLists.txt index 4370c1aee81a1dea3cd0404de741531244f5d677..9598958e42ef5a017cf9e0062470c6b7405e7251 100644 --- a/InnerDetector/InDetSimEvent/CMakeLists.txt +++ b/InnerDetector/InDetSimEvent/CMakeLists.txt @@ -9,6 +9,7 @@ atlas_subdir( InDetSimEvent ) atlas_depends_on_subdirs( PUBLIC Control/AthenaKernel Control/AthAllocators + Control/CxxUtils Generators/GeneratorObjects Simulation/HitManagement @@ -27,12 +28,12 @@ atlas_add_library( InDetSimEvent INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES ${CLHEP_LIBRARIES} AthAllocators AthenaKernel GeneratorObjects HitManagement StoreGateLib SGtests + LINK_LIBRARIES ${CLHEP_LIBRARIES} AthAllocators AthenaKernel CxxUtils GeneratorObjects HitManagement StoreGateLib SGtests PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} InDetIdentifier ) atlas_add_dictionary( InDetSimEventDict InDetSimEvent/InDetSimEventDict.h InDetSimEvent/selection.xml INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthAllocators GeneratorObjects HitManagement StoreGateLib SGtests InDetIdentifier InDetSimEvent ) + LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthAllocators CxxUtils GeneratorObjects HitManagement StoreGateLib SGtests InDetIdentifier InDetSimEvent ) diff --git a/InnerDetector/InDetSimEvent/InDetSimEvent/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetSimEvent/InDetSimEvent/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..ca9adb57d429d784269d055e095c5c59f101be50 --- /dev/null +++ b/InnerDetector/InDetSimEvent/InDetSimEvent/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +InnerDetector/InDetSimEvent diff --git a/InnerDetector/InDetSimEvent/InDetSimEvent/SiHitIdHelper.h b/InnerDetector/InDetSimEvent/InDetSimEvent/SiHitIdHelper.h index f9843b7d7ce5a2f59b436542d5904ee8ad1e6121..1e93a436c453cbe1f183679cbc2ab30c80283e24 100755 --- a/InnerDetector/InDetSimEvent/InDetSimEvent/SiHitIdHelper.h +++ b/InnerDetector/InDetSimEvent/InDetSimEvent/SiHitIdHelper.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef INDETSIMEVENT_SIHITIDHELPER @@ -21,6 +21,9 @@ // Base Class #include "HitManagement/HitIdHelper.h" +// This class is singleton and static method and variable are used. +#include "CxxUtils/checker_macros.h" +ATLAS_NO_CHECK_FILE_THREAD_SAFETY; class SiHitIdHelper : HitIdHelper { public: diff --git a/InnerDetector/InDetSimEvent/InDetSimEvent/TRTHitIdHelper.h b/InnerDetector/InDetSimEvent/InDetSimEvent/TRTHitIdHelper.h index 21ca9cfc3bbcd12c6ceacdec05898e70058ebd50..18f3c381c724a04a86e1fca1c310b2ca666bc997 100755 --- a/InnerDetector/InDetSimEvent/InDetSimEvent/TRTHitIdHelper.h +++ b/InnerDetector/InDetSimEvent/InDetSimEvent/TRTHitIdHelper.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef INDETSIMEVENT_TRTHITIDHELPER @@ -21,6 +21,10 @@ // Base Class #include "HitManagement/HitIdHelper.h" +// This class is singleton and static method and variable are used. +#include "CxxUtils/checker_macros.h" +ATLAS_NO_CHECK_FILE_THREAD_SAFETY; + class TRTHitIdHelper : HitIdHelper { public: diff --git a/InnerDetector/InDetSimEvent/src/SiHitIdHelper.cxx b/InnerDetector/InDetSimEvent/src/SiHitIdHelper.cxx index 25506a70acc3418fdbecf3bc79a62b29946c3f7f..a04ef8f6a65c8b55fb64dacaa36e922ebc6815c7 100755 --- a/InnerDetector/InDetSimEvent/src/SiHitIdHelper.cxx +++ b/InnerDetector/InDetSimEvent/src/SiHitIdHelper.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include <mutex> @@ -15,6 +15,9 @@ static std::mutex sgMutex; +// This class is singleton and static method and variable are used. +ATLAS_NO_CHECK_FILE_THREAD_SAFETY; + // // private constructor SiHitIdHelper::SiHitIdHelper() :HitIdHelper() { diff --git a/InnerDetector/InDetSimEvent/src/TRTHitIdHelper.cxx b/InnerDetector/InDetSimEvent/src/TRTHitIdHelper.cxx index d424031d8f4206a81758929d8e10317f61ece160..4926b00e3b72a5bd8085626411d801a585348edb 100755 --- a/InnerDetector/InDetSimEvent/src/TRTHitIdHelper.cxx +++ b/InnerDetector/InDetSimEvent/src/TRTHitIdHelper.cxx @@ -1,9 +1,12 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "InDetSimEvent/TRTHitIdHelper.h" +// This class is singleton and static method and variable are used. +ATLAS_NO_CHECK_FILE_THREAD_SAFETY; + // // private constructor TRTHitIdHelper::TRTHitIdHelper() :HitIdHelper() { diff --git a/InnerDetector/InDetValidation/InDetGeometryValidation/share/ReadSiDetectorElements_jobOptions.py b/InnerDetector/InDetValidation/InDetGeometryValidation/share/ReadSiDetectorElements_jobOptions.py old mode 100755 new mode 100644 index 7673748b476ad34fe54e0dc73a04c034ad5dd246..74951c2704b5408c137f1d2e9c0617c88f593389 --- a/InnerDetector/InDetValidation/InDetGeometryValidation/share/ReadSiDetectorElements_jobOptions.py +++ b/InnerDetector/InDetValidation/InDetGeometryValidation/share/ReadSiDetectorElements_jobOptions.py @@ -64,11 +64,11 @@ from PixelConditionsTools.PixelDCSConditionsToolSetup import PixelDCSConditionsT pixelDCSConditionsToolSetup = PixelDCSConditionsToolSetup() pixelDCSConditionsToolSetup.setup() pixelDCSConditionsTool = pixelDCSConditionsToolSetup.getTool() -from SiPropertiesSvc.PixelSiPropertiesToolSetup import PixelSiPropertiesToolSetup +from SiPropertiesTool.PixelSiPropertiesToolSetup import PixelSiPropertiesToolSetup pixelSiPropertiesToolSetup = PixelSiPropertiesToolSetup() pixelSiPropertiesToolSetup.setup() pixelSiPropertiesTool = pixelSiPropertiesToolSetup.getTool() -from SiLorentzAngleSvc.PixelLorentzAngleToolSetup import PixelLorentzAngleToolSetup +from SiLorentzAngleTool.PixelLorentzAngleToolSetup import PixelLorentzAngleToolSetup pixelLorentzAngleToolSetup = PixelLorentzAngleToolSetup() pixelLorentzAngleTool = pixelLorentzAngleToolSetup.PixelLorentzAngleTool @@ -81,13 +81,13 @@ ReadPixelElements.SiConditionsTool = pixelDCSConditionsTool # SCT # # Silicon Lorentz angle tool -from SiLorentzAngleSvc.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup +from SiLorentzAngleTool.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup sctLorentzAngleToolSetup = SCTLorentzAngleToolSetup() sctLorentzAngleTool = sctLorentzAngleToolSetup.SCTLorentzAngleTool sctSiliconConditionsTool = sctLorentzAngleToolSetup.sctSiliconConditionsTool # Silicon properties tool -from SiPropertiesSvc.SCT_SiPropertiesToolSetup import SCT_SiPropertiesToolSetup +from SiPropertiesTool.SCT_SiPropertiesToolSetup import SCT_SiPropertiesToolSetup sct_SiPropertiesToolSetup = SCT_SiPropertiesToolSetup() sct_SiPropertiesToolSetup.setSiliconTool(sctSiliconConditionsTool) sct_SiPropertiesToolSetup.setup() diff --git a/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadChanLegacyTool.h b/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadChanLegacyTool.h deleted file mode 100644 index be223d2732efae9269770513ca81e0cd82bc9bf0..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadChanLegacyTool.h +++ /dev/null @@ -1,142 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef LArBadChanLegacyTool_H -#define LArBadChanLegacyTool_H - -#include "AthenaBaseComps/AthAlgTool.h" -#include "LArRecConditions/ILArBadChanTool.h" - -#include "LArRecConditions/LArBadChannel.h" -#include "LArRecConditions/BadChanContainer.h" -#include "CaloConditions/ICaloBadChanTool.h" - -#include "Identifier/HWIdentifier.h" -#include "LArIdentifier/LArOnlineID.h" -#include "LArCabling/LArCablingLegacyService.h" -#include "GaudiKernel/ToolHandle.h" -#include "AthenaKernel/IOVSvcDefs.h" -#include "AthenaPoolUtilities/AthenaAttributeList.h" -#include "AthenaPoolUtilities/CondAttrListCollection.h" - -#include "StoreGate/DataHandle.h" -#include "LArBadChannelTool/LArBadChannelState.h" -#include "LArBadChannelTool/LArBadChanContainerHashed.h" -#include "LArBadChannelTool/LArBadChanFEBHasher.h" - -class StoreGateSvc; - -class LArBadChanLegacyTool : public AthAlgTool, - public ILArBadChanTool, - public ICaloBadChanTool -{ -public: - - typedef LArBadChannelState State; - typedef LArBadChanContainerHashed::BadFebEntry BadFebEntry; - typedef std::vector<BadFebEntry> BadFebVec; - - LArBadChanLegacyTool(const std::string& type, const std::string& name, - const IInterface* parent); - -// to allow access to the interface - StatusCode queryInterface( const InterfaceID& riid, void** ppvIf ); - - - StatusCode initialize(); - // StatusCode finalize(); - - LArBadChannel status( HWIdentifier id) const; - - LArBadChannel status( const HWIdentifier& FEBid, int chan) const; - - LArBadChannel offlineStatus( Identifier id) const; - - virtual bool febMissing( HWIdentifier febId) const { - return m_HwBadChan.febBad( febId); - } - virtual bool febAllGood( HWIdentifier febId) const { - return m_HwBadChan.febAllGood( febId); - } - - virtual LArBadFeb febStatus( HWIdentifier febId) const { - return m_HwBadChan.febStatus( febId); - } - -/// Converts a LArBadChannel status to CaloBadChannel, thus implementing the -/// ICaloBadChannelTool interface - virtual CaloBadChannel caloStatus( Identifier id) const; - - static const InterfaceID& interfaceID(); - - const State& fullState() const {return m_State;} - - std::vector<HWIdentifier> missingFEBs() const; - - const BadFebVec& fullBadFebsState() const {return m_BadFebs;} - - // Callback functions - virtual StatusCode updateFromDB(IOVSVC_CALLBACK_ARGS); - virtual StatusCode updateBadFebsFromDB(IOVSVC_CALLBACK_ARGS); - -private: - - typedef LArBadChanContainerHashed BadChanInfo; - typedef BadChanInfo::BadChanVec BadChanVec; - typedef BadChanContainer<Identifier, LArBadChannel> OfflineInfo; - typedef OfflineInfo::BadChanVec OfflineVec; - - const DataHandle<LArOnlineID> m_onlineID; - const DataHandle<CondAttrListCollection> m_DBColl; - const DataHandle<CondAttrListCollection> m_TmpDBColl; - const DataHandle<AthenaAttributeList> m_DBBadFebColl; - ToolHandle<LArCablingLegacyService> m_cablingService; - - mutable BadChanInfo m_HwBadChan; //should be non-mutable if possible - mutable OfflineInfo m_OfflineBadChan; - State m_State; - State m_Updates; - BadFebVec m_BadFebs; - BadFebVec m_BadFebUpdates; - - bool m_updatedFromDB; - bool m_updatedFebsFromDB; - mutable bool m_ready; - - bool m_readFromASCII; - int m_ASCII_action; - bool m_writeEmptyFolders; - std::vector<std::string> m_fileNames; - std::string m_febFileName; - std::string m_DBFolder; - std::string m_TmpDBFolder; - std::string m_DBBadFebFolder; - bool m_dumpCache; - mutable bool m_OfflineCacheInvalid; - - bool prepareFebHash(); - void check() const {if (!m_ready) complain();} // keep it inline for speed - - void complain() const; - bool readASCII(); - - void fillOfflineInfo() const; - void updateCache(); - void updateFebCache(); - - bool readFromDB(); - bool readFromDB( const DataHandle<CondAttrListCollection> collection); - bool readBadFebsFromDB(); - void dumpHWCache() const; - void applyUpdates(); - void applyUpdate( State::CoolChannelData& coolChan, const State::BadChanEntry& entry); - void applyFebUpdates(); - - void dumpAscii( const std::string& fileName) const; - void dumpFEBsAscii( const std::string& fileName) const; - void warnInvalidFEB( const HWIdentifier& id) const; - -}; - -#endif diff --git a/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadChannelDBToolsDict.h b/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadChannelDBToolsDict.h index 9db4b7695d5235577ae3845f47ebd109bb355012..94827b6f9be5ad764d30422baa45e85e695f0850 100644 --- a/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadChannelDBToolsDict.h +++ b/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadChannelDBToolsDict.h @@ -14,7 +14,6 @@ #include "LArRecConditions/LArBadChanBitPacking.h" #include "LArBadChannelTool/LArBadChannelMasker.h" -#include "LArBadChannelTool/LArBadChanLegacyTool.h" std::pair<bool,LArBadChannelEnum::ProblemType> dummy1; std::pair<HWIdentifier,LArBadFeb> dummy2; diff --git a/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadChannelState.h b/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadChannelState.h index ec81a825e8c3f4ec66e4a2ca5fbae2f8bbb47795..e169ffda64c9c41d8738eddbbc5438585942262a 100644 --- a/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadChannelState.h +++ b/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadChannelState.h @@ -163,8 +163,6 @@ class LArBadChannelState { std::vector< CoolChannelData> m_DataVec; - friend class LArBadChanLegacyTool; - // Non-const access to channel data CoolChannelData& coolChannel( int i) { return m_DataVec.at( static_cast<CoolChannelEnum>(i)); diff --git a/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadFebMasker.h b/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadFebMasker.h new file mode 100644 index 0000000000000000000000000000000000000000..2b8a636b6ce5e5a4a27b0609826861292a750879 --- /dev/null +++ b/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadFebMasker.h @@ -0,0 +1,53 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef LARBADFEBMASKER_H +#define LARBADFEBMASKER_H + +#include "AthenaBaseComps/AthAlgTool.h" +#include "GaudiKernel/ToolHandle.h" +#include "Identifier/HWIdentifier.h" +#include "LArRecConditions/LArBadChannelCont.h" +#include "LArRecConditions/ILArBadFebMasker.h" + +//class StoreGateSvc; + +#include "StoreGate/ReadCondHandleKey.h" + +class LArBadFebMasker : virtual public ILArBadFebMasker, public AthAlgTool +{ +public: + + LArBadFebMasker(const std::string& type, const std::string& name, const IInterface* parent); + virtual ~LArBadFebMasker(); + + virtual StatusCode initialize() override; + + virtual bool febMissing( const HWIdentifier& febId) const override final; + virtual bool shouldbeMasked(const HWIdentifier& febId) const override final; + virtual LArBadFeb febStatus(const HWIdentifier& febId) const override final; + + virtual bool isMaskingOn() const override final//allow the client code to check in order to optimize + {return m_doMasking;} + + StatusCode queryInterface(const InterfaceID& riid, void** ppvIf); + static const InterfaceID& interfaceID(); + +private: + + typedef LArBadFebEnum::BitWord BitWord; + + LArBadFebMasker(); + + void buildBitMask(); + static const std::vector<std::string>& defaultProblems(); + + SG::ReadCondHandleKey<LArBadFebCont> m_bfContKey; + BitWord m_bitMask; // The list of problems from m_problemWords, in bit form. + std::vector<std::string> m_problemWords; // The list of FEB problems to be masked. + bool m_doMasking; // Determines whether to do masking. + +}; + +#endif diff --git a/LArCalorimeter/LArBadChannelTool/src/LArBadChanLegacyTool.cxx b/LArCalorimeter/LArBadChannelTool/src/LArBadChanLegacyTool.cxx deleted file mode 100644 index 72cc9e2203fc446a72969d36e325a56f1b0a72d2..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArBadChannelTool/src/LArBadChanLegacyTool.cxx +++ /dev/null @@ -1,634 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -#include "LArBadChannelTool/LArBadChanLegacyTool.h" - -#include "LArBadChannelTool/LArBadChannelDecoder.h" -#include "StoreGate/StoreGate.h" -#include "GaudiKernel/MsgStream.h" -#include "LArIdentifier/LArOnlineID.h" -#include "StoreGate/StoreGateSvc.h" -#include "LArRecConditions/LArBadChanBitPacking.h" -#include "LArRecConditions/LArBadFebBitPacking.h" -#include "AthenaPoolUtilities/AthenaAttributeList.h" -#include "AthenaPoolUtilities/CondAttrListCollection.h" -#include "CoolKernel/types.h" -#include "LArBadChannelTool/LArBadChannelDBTools.h" -#include "LArBadChannelTool/LArBadChanBlobUtils.h" - -#include "combined_ordered_container.h" -#include "mergeDuplicateEntries.h" - -#include <set> - -#include <fstream> - -struct BadFebEntryLess { - bool operator()(const LArBadChanLegacyTool::BadFebEntry& a, - const LArBadChanLegacyTool::BadFebEntry& b) const { - return a.first < b.first; - } -}; - -struct BadFebEntryMerger { - LArBadChanLegacyTool::BadFebEntry operator()( const LArBadChanLegacyTool::BadFebEntry& a, - const LArBadChanLegacyTool::BadFebEntry& b) const { - return LArBadChanLegacyTool::BadFebEntry( a.first, - LArBadFeb( a.second.packedData() | b.second.packedData())); - } -}; - -LArBadChanLegacyTool::LArBadChanLegacyTool(const std::string& type, const std::string& name, - const IInterface* parent) : - AthAlgTool( type, name, parent), - m_cablingService("LArCablingLegacyService"), - m_updatedFromDB( false), - m_updatedFebsFromDB( false), - m_ready( false), - m_readFromASCII(false), - m_ASCII_action(0), - m_writeEmptyFolders(false), - m_fileNames(State::NCoolChannels), - m_DBFolder("/LAR/BadChannels/BadChannels"), - m_TmpDBFolder(), // empty by default - m_DBBadFebFolder("/LAR/BadChannels/MissingFEBs"), - m_dumpCache(false), - m_OfflineCacheInvalid(true) -{ - declareInterface<ILArBadChanTool>(this); - declareInterface<ICaloBadChanTool>(this); - - declareProperty("ReadFromASCII", m_readFromASCII); - declareProperty("ASCIIFileAction", m_ASCII_action); - declareProperty("WriteEmptyFolders", m_writeEmptyFolders); - declareProperty("CoolFolder", m_DBFolder); - declareProperty("ComplementaryCoolFolder", m_TmpDBFolder); - declareProperty("CoolMissingFEBsFolder", m_DBBadFebFolder); - declareProperty("DumpCache", m_dumpCache); - - declareProperty("EMBAfile", m_fileNames[State::EMBA]); - declareProperty("EMBCfile", m_fileNames[State::EMBC]); - declareProperty("EMECAfile", m_fileNames[State::EMECA]); - declareProperty("EMECCfile", m_fileNames[State::EMECC]); - declareProperty("HECAfile", m_fileNames[State::HECA]); - declareProperty("HECCfile", m_fileNames[State::HECC]); - declareProperty("FCALAfile", m_fileNames[State::FCALA]); - declareProperty("FCALCfile", m_fileNames[State::FCALC]); - declareProperty("FEBfile", m_febFileName); - -} - -const InterfaceID& LArBadChanLegacyTool::interfaceID() -{ - //return ILArBadChanLegacyTool::interfaceID(); - static const InterfaceID id("LArBadChanLegacyTool", 1 , 0); - return id; -} - -StatusCode LArBadChanLegacyTool::queryInterface( const InterfaceID& riid, void** ppvIf ) -{ - if ( riid == ILArBadChanTool::interfaceID() ) { - *ppvIf = static_cast<ILArBadChanTool*>(this); - addRef(); - return StatusCode::SUCCESS; - } - if ( riid == interfaceID() ) { - *ppvIf = this; - addRef(); - return StatusCode::SUCCESS; - } - /* - if ( riid == ICaloBadChannelTool::interfaceID() ) { - *ppvIf = static_cast<ICaloBadChannelTool*>(this); - addRef(); - return StatusCode::SUCCESS; - } - */ - return AthAlgTool::queryInterface( riid, ppvIf ); -} - -StatusCode LArBadChanLegacyTool::initialize() -{ - ATH_MSG_DEBUG ("in initialize()" ); - - ATH_CHECK( detStore()->retrieve(m_onlineID, "LArOnlineID") ); - if (!prepareFebHash()) { - ATH_MSG_ERROR ( "Could not configure FEB hasher" ); - return StatusCode::FAILURE; - } - - // we need to read from ASCII before the callback registration, because - // if the tool is initialised e.g. during event processing the callback - // will be triggered immediately - if (m_readFromASCII) { - if (!readASCII()) { - ATH_MSG_ERROR ("Could not read ASCII file(s)" ); - return StatusCode::FAILURE; - } - // prepare the tool for use in case no DB update occurs, but keep m_ready false - m_State = m_Updates; - if (!m_BadFebUpdates.empty()) applyFebUpdates(); // from ASCII file. Does sorting and duplicate removal - updateCache(); - updateFebCache(); - } - - if (!m_DBFolder.empty()) { - ATH_CHECK( detStore()->regFcn( &ILArBadChanTool::updateFromDB, dynamic_cast<ILArBadChanTool*>(this), - m_DBColl, m_DBFolder, true) ); - } - - if (!m_TmpDBFolder.empty()) { - ATH_CHECK( detStore()->regFcn( &ILArBadChanTool::updateFromDB, dynamic_cast<ILArBadChanTool*>(this), - m_TmpDBColl, m_TmpDBFolder, true) ); - } - - if (!m_DBBadFebFolder.empty()) { - ATH_CHECK( detStore()->regFcn( &ILArBadChanTool::updateBadFebsFromDB, dynamic_cast<ILArBadChanTool*>(this), - m_DBBadFebColl, m_DBBadFebFolder, true) ); - } - - ATH_CHECK( m_cablingService.retrieve() ); - ATH_MSG_DEBUG ( "CablingService retrieved" ); - - return StatusCode::SUCCESS; -} - -std::vector<HWIdentifier> LArBadChanLegacyTool::missingFEBs() const -{ - std::vector<HWIdentifier> result( m_BadFebs.size()); - for (unsigned int i=0; i<m_BadFebs.size(); ++i) - result[i] = m_BadFebs[i].first; - return result; -} - -void LArBadChanLegacyTool::complain() const -{ - if (!m_updatedFromDB) { - // if we are here then the bad channel DB update did not take place before first use - ATH_MSG_WARNING ( "the LArBadChanLegacyTool is used without bad channel information from DB" ); - - if (m_Updates.empty()) { - ATH_MSG_WARNING ( "and it contains no bad channel information from ASCII file." ); - ATH_MSG_WARNING - ( "All channels will be considered good, but this may not be what you wanted" ); - BadChanVec empty; - m_HwBadChan.set(empty); //need to populate the hash table with good channels - } - else { - // No need to apply updates from ASCII file, that's done in initialize() - ATH_MSG_WARNING ( "Only ASCII file bad channel information is available." ); - } - } - if (!m_updatedFebsFromDB) { - // if we are here then the bad Feb DB update did not take place before first use - ATH_MSG_WARNING ( "the LArBadChanLegacyTool is used without missing FEB information from DB" ); - - if (m_BadFebUpdates.empty()) { - ATH_MSG_WARNING ( "and it contains no missing FEB information from ASCII file." ); - ATH_MSG_WARNING - ( "All FEBs will be considered good, but this may not be what you wanted" ); - // the febs are good by default so we don't need to set them explicitly - } - else { - // No need to apply updates from ASCII file, that's done in initialize() - ATH_MSG_WARNING ( "Only ASCII file missing FEB information is available." ); - } - } - m_ready = true; -} - -bool LArBadChanLegacyTool::readASCII() -{ - LArBadChannelDecoder decoder(&(*m_onlineID), msg()); - - int goodLines = 0; - for (int i=0; i<State::NCoolChannels; i++) { - if ( !m_fileNames.at(i).empty()) { - State::CoolChannelEnum coolChan = static_cast<State::CoolChannelEnum>(i); - ATH_MSG_INFO ( "Attempting to read file " << m_fileNames[i] - << " for COOL channel " << State::coolChannelName( coolChan) ); - - std::vector<State::BadChanEntry> res = decoder.readASCII( m_fileNames[i], coolChan); - if ( !res.empty()) { - ATH_MSG_INFO ( "Read " << res.size() << " lines from file " << m_fileNames[i] - << " into COOL channel " << State::coolChannelName( coolChan) ); - m_Updates.addUpdate( res, coolChan); - goodLines += res.size(); - } - else if (!m_writeEmptyFolders) { - ATH_MSG_ERROR ( "Failed to read any lines from file " << m_fileNames[i] - << " for COOL channel " << State::coolChannelName( coolChan) ); - return false; - } - } - } - if ( !m_febFileName.empty()) { - std::vector<LArBadChannelDecoder::BadFebEntry> febs = decoder.readFebASCII( m_febFileName); - if (febs.empty() && (!m_writeEmptyFolders) ) { - ATH_MSG_ERROR ( "Failed to read any lines from FEB file " << m_febFileName ); - return false; - } - else { - ATH_MSG_INFO ( "Decoded " << febs.size() << " lines from FEB file " << m_febFileName ); - m_BadFebUpdates = febs; - goodLines += febs.size(); - } - } - - if (goodLines == 0 && (!m_writeEmptyFolders) ) { - ATH_MSG_ERROR ( "ASCII reading requested but no file names specified " ); - return false; - } - else { - ATH_MSG_INFO ( "Read " << goodLines - << " lines in total (for all COOL channels and missing FEBs together) " ); - } - - // at this stage we have all the contents of the ASCII files in m_Updates. - // We need to - // 1) resolve duplicate entries for same channel - // 2) update the m_HwBadChan - // 3) invalidate or update m_OfflineBadChan - // 4) write the new status to the DB - - for (int i=0; i<State::NCoolChannels; i++) { - if ( m_Updates.coolChannel(i).changed()) { - // resolveDuplicateEntries( m_Updates.coolChannel(i)); - m_Updates.coolChannel(i).resolveDuplicateEntries(); - } - } - return true; -} - -LArBadChannel LArBadChanLegacyTool::status( HWIdentifier id) const { - check(); - try { - return m_HwBadChan.status(id); - } - catch (const std::exception& ex) { - warnInvalidFEB(id); - return LArBadChannel(); - } -} - -LArBadChannel LArBadChanLegacyTool::status( const HWIdentifier& FEBid, int chan) const { - check(); - try { - return m_HwBadChan.status( FEBid, chan); - } - catch (const std::exception& ex) { - warnInvalidFEB( FEBid); - return LArBadChannel(); - } -} - -void LArBadChanLegacyTool::warnInvalidFEB( const HWIdentifier& id) const -{ - ATH_MSG_WARNING ( "status requested for unknown HWIdentifier " - << id.get_identifier32().get_compact() ); -} - -LArBadChannel LArBadChanLegacyTool::offlineStatus( Identifier id) const -{ - check(); - - if (m_OfflineCacheInvalid) fillOfflineInfo(); - - return m_OfflineBadChan.status(id); -} - -CaloBadChannel LArBadChanLegacyTool::caloStatus( Identifier id) const -{ - CaloBadChannel::BitWord res = 0; - LArBadChannel lbc = offlineStatus( id); - - //Set 'noise' bit if appropriate - if ( lbc.reallyNoisy() || lbc.sporadicBurstNoise()) { - CaloBadChannel::setBit( CaloBadChannel::noisyBit, res); - } - //Set 'dead' bit (could be combined with noise bit) - if (lbc.deadReadout() || lbc.deadPhys()) { - CaloBadChannel::setBit( CaloBadChannel::deadBit, res); - } - //Set 'affected' bit (could be combined with noise bit, but not with dead bit - else if ( ! lbc.good()) { - CaloBadChannel::setBit( CaloBadChannel::affectedBit, res); - } - return CaloBadChannel(res); -} - -void LArBadChanLegacyTool::fillOfflineInfo() const -{ - m_OfflineBadChan.clear(); - OfflineVec vec; - std::vector<HWIdentifier> hwvec; - for (BadChanVec::const_iterator i=m_HwBadChan.begin(); i!=m_HwBadChan.end(); i++) { - Identifier id = m_cablingService->cnvToIdentifier( i->first); - vec.push_back(OfflineVec::value_type(id, status(i->first))); - hwvec.push_back(i->first); - } - std::sort( hwvec.begin(), hwvec.end()); - - // fill the missing FEB channels - for (std::vector<BadFebEntry>::const_iterator feb=m_BadFebs.begin(); feb!=m_BadFebs.end(); ++feb) { - for (int ch=0; ch<128; ++ch) { - HWIdentifier hwid = m_onlineID->channel_Id( feb->first, ch); - // check if the channel is bad to avoid duplicates - if ( !std::binary_search( hwvec.begin(), hwvec.end(), hwid)) { - // check if the ids we generate are connected - if (m_cablingService->isOnlineConnected(hwid)) { - Identifier id = m_cablingService->cnvToIdentifier( hwid); - vec.push_back( OfflineVec::value_type( id, status(hwid,ch))); - } - } - } - } - - m_OfflineBadChan = OfflineInfo(vec); - m_OfflineCacheInvalid = false; -} - -void LArBadChanLegacyTool::updateCache() -{ - ATH_MSG_DEBUG ( " entering updateCache " ); - - BadChanVec bcv; - - for (int cc=0; cc<State::NCoolChannels; cc++) { - const State::CoolChannelData& coolChan = m_State.coolChannel(cc); - bcv.insert( bcv.end(), coolChan.begin(), coolChan.end()); - } - m_HwBadChan.set(bcv); - - // invalidate offline cache (will be filled at first access, if needed - m_OfflineCacheInvalid = true; - - ATH_MSG_DEBUG ( " updateCache done " ); -} - -void LArBadChanLegacyTool::updateFebCache() -{ - // just copy current FEB list to the cache - m_HwBadChan.setBadFEBs( m_BadFebs); - - // invalidate offline cache (will be filled at first access, if needed - m_OfflineCacheInvalid = true; - -} - -bool LArBadChanLegacyTool::readFromDB( const DataHandle<CondAttrListCollection> collection) -{ - for ( CondAttrListCollection::const_iterator i=collection->begin(); - i != collection->end(); ++i) { - State::CoolChannelEnum coolChan = static_cast<State::CoolChannelEnum>(i->first); - ATH_MSG_DEBUG ( "Reading Cool Channel " << i->first - << " corresponding to " << State::coolChannelName(coolChan) ); - /* - const AthenaAttributeList& attrList( i->second); - const coral::Blob& blob = attrList["Blob"].data<coral::Blob>(); - unsigned int chanSize = attrList["ChannelSize"].data<unsigned int>(); - unsigned int stateSize = attrList["StatusWordSize"].data<unsigned int>(); - unsigned int endian = attrList["Endianness"].data<unsigned int>(); - unsigned int version = attrList["Version"].data<unsigned int>(); - - std::vector<State::BadChanEntry> stateVec = - LArBadChanBlobUtils::decodeBlob<LArBadChannel>( &blob, chanSize, stateSize, endian, - version, log); - */ - /* - // Unfortunately we have to skip this test because we need empty channels to - // bypass Athena problem. - if (stateVec.empty()) { - log <<MSG::ERROR <<"Got empty channel list after Blob decoding of col channel " - << State::coolChannelName(coolChan) << endmsg; - return false; - } - */ - - m_State.addFromDB( LArBadChannelDBTools::readBadChan( i->second, msg()), coolChan); - } - return true; -} - -bool LArBadChanLegacyTool::readBadFebsFromDB() -{ - - ATH_CHECK( detStore()->retrieve( m_DBBadFebColl, m_DBBadFebFolder), false ); - ATH_MSG_INFO ( "Retrieved folder " << m_DBBadFebFolder ); - - if (!m_DBBadFebColl.isValid()){ - ATH_MSG_ERROR ( " DB handle for missing FEBs is invalid" ); - return false; - } - /* - const AthenaAttributeList& attrList( *m_DBBadFebColl); - const coral::Blob& blob = attrList["Blob"].data<coral::Blob>(); - unsigned int chanSize = attrList["ChannelSize"].data<unsigned int>(); - unsigned int stateSize = attrList["StatusWordSize"].data<unsigned int>(); - unsigned int endian = attrList["Endianness"].data<unsigned int>(); - unsigned int version = attrList["Version"].data<unsigned int>(); - - // overwrite list of bad febs - if (version == 1) { - std::vector<HWIdentifier> idvec = - LArBadChanBlobUtils::decodeFebBlobV1( &blob, chanSize, endian, version, log); - m_BadFebs.resize(idvec.size()); - LArBadFeb missingState; - LArBadFebBitPacking febPacking; - febPacking.setBit( LArBadFeb::deadAllBit, missingState); - for (unsigned int i=0; i<idvec.size(); ++i) { - m_BadFebs[i] = BadFebEntry( idvec[i], missingState); - } - } - else { - m_BadFebs = LArBadChanBlobUtils::decodeBlob<LArBadFeb>( &blob, chanSize, stateSize, - endian, version, log); - } - */ - - m_BadFebs = LArBadChannelDBTools::readBadFeb( *m_DBBadFebColl, msg()); - return true; -} - - -StatusCode LArBadChanLegacyTool::updateFromDB( int&, std::list<std::string>& keylist) -{ - m_State.reset(); - - ATH_MSG_INFO ( "DB callback called with " << keylist.size() << " keys " ); - for (std::list<std::string>::const_iterator ikey = keylist.begin(); ikey != keylist.end(); ikey++) { - ATH_MSG_INFO ( "DB callback called with key " << *ikey ); - } - - // Always read both folders if they are valid, even if only one folder triggered the callback - if (m_DBColl.isValid()) { - if (!readFromDB( m_DBColl)) return StatusCode::FAILURE; - } - if (m_TmpDBColl.isValid()) { - if (!readFromDB( m_TmpDBColl)) return StatusCode::FAILURE; - } - - m_updatedFromDB = true; - - ATH_MSG_INFO ( "Callback updateFromDB finished reading from DB" ); - - if (!m_Updates.empty()) applyUpdates(); // from ASCII file - - updateCache(); - m_ready = m_updatedFebsFromDB; // m_ready is true if both channels and febs are OK from DB - - if(m_dumpCache) dumpAscii("dump.txt"); - - ATH_MSG_INFO ( "Have " << m_HwBadChan.size() << " entries in total." ); - - return StatusCode::SUCCESS; -} - -StatusCode LArBadChanLegacyTool::updateBadFebsFromDB(IOVSVC_CALLBACK_ARGS) -{ - if (!readBadFebsFromDB()) return StatusCode::FAILURE; - m_updatedFebsFromDB = true; - - ATH_MSG_INFO ( "Callback updateBadFebsFromDB finished reading from DB" ); - - if (!m_BadFebUpdates.empty()) applyFebUpdates(); // from ASCII file - - updateFebCache(); - m_ready = m_updatedFromDB; // m_ready is true if both channels and febs are OK from DB - - if(m_dumpCache) dumpFEBsAscii("dumpFEBs.txt"); - - ATH_MSG_INFO ( "Have " << m_BadFebs.size() << " missing FEBs in total." ); - return StatusCode::SUCCESS; -} - -void LArBadChanLegacyTool::dumpHWCache() const -{ - LArBadChanBitPacking packing; - ATH_MSG_INFO ( "Begin of dump of online Id cache" ); - for (BadChanInfo::const_iterator i=m_HwBadChan.begin(); i!=m_HwBadChan.end(); ++i) { - ATH_MSG_INFO ( "HWId " << i->first.get_identifier32().get_compact() << " status " - << packing.stringStatus(i->second) ); - } - ATH_MSG_INFO ( "End of dump of online Id cache" ); -} - -void LArBadChanLegacyTool::applyUpdates() -{ - typedef std::vector<State::BadChanEntry>::const_iterator Iter; - - for (int cc=0; cc<State::NCoolChannels; cc++) { - State::CoolChannelData& coolChan = m_State.coolChannel(cc); - State::CoolChannelData& updChan = m_Updates.coolChannel(cc); - - if (coolChan.empty()) coolChan = updChan; - else { - for (Iter iupd = updChan.begin(); iupd != updChan.end(); iupd++) { - applyUpdate( coolChan, *iupd); - } - } - } -} - -void LArBadChanLegacyTool::applyUpdate( State::CoolChannelData& coolChan, - const State::BadChanEntry& entry) -{ - typedef std::vector<State::BadChanEntry>::iterator Iter; - - // we assume that coolChan does not contain duplicate entries - // because at some point it came from ASCII, so resolveDuplicateEntries was called then. - for (Iter i = coolChan.begin(); i != coolChan.end(); i++) { - if (i->first == entry.first) { // Try to match the update with an existing bad channel - State::mergeFlags( *i, entry); // If found, combine the problems - return; - } - } // The cell from the ASCII update was not already present in the database - coolChan.add(entry); // So, add the new bad channel -} - -// should not be called if m_BadFebUpdates.empty() -void LArBadChanLegacyTool::applyFebUpdates() -{ - using namespace LArBadChanImpl; - typedef combined_ordered_container< BadFebVec, BadFebEntryLess > CNT; - - std::sort( m_BadFebUpdates.begin(), m_BadFebUpdates.end(), BadFebEntryLess()); - - if (m_BadFebs.empty()) { - m_BadFebs = mergeDuplicateEntries( m_BadFebUpdates, BadFebEntryLess(), BadFebEntryMerger()); - } - else { - std::sort( m_BadFebs.begin(), m_BadFebs.end(), BadFebEntryLess()); // in case it's not sorted - CNT cnt( m_BadFebs, m_BadFebUpdates); // a combined sorted view of the two containers - m_BadFebs = mergeDuplicateEntries( cnt, BadFebEntryLess(), BadFebEntryMerger()); - } -} - -void LArBadChanLegacyTool::dumpAscii( const std::string& fileName) const -{ - std::ofstream out(fileName.c_str()); - LArBadChanBitPacking packing; - - for (BadChanInfo::const_iterator i=m_HwBadChan.begin(); i!=m_HwBadChan.end(); ++i) { - int be = m_onlineID->barrel_ec(i->first); - int pn = m_onlineID->pos_neg(i->first); - int ft = m_onlineID->feedthrough(i->first); - int slot = m_onlineID->slot(i->first); - int ch = m_onlineID->channel(i->first); - out << be << " " << pn << " " << ft << " " << slot << " " << ch << " " << 0 << " " - << packing.stringStatus(i->second) << std::endl; - } -} - -void LArBadChanLegacyTool::dumpFEBsAscii( const std::string& fileName) const -{ - std::ofstream out(fileName.c_str()); - LArBadFebBitPacking packing; - - for (BadFebVec::const_iterator i=m_BadFebs.begin(); i!=m_BadFebs.end(); ++i) { - int be = m_onlineID->barrel_ec(i->first); - int pn = m_onlineID->pos_neg(i->first); - int ft = m_onlineID->feedthrough(i->first); - int slot = m_onlineID->slot(i->first); - out << be << " " << pn << " " << ft << " " << slot << " " - << packing.stringStatus(i->second) << std::endl; - } -} - -bool LArBadChanLegacyTool::prepareFebHash() -{ - int firstFEB = m_onlineID->feb_begin()->get_identifier32().get_compact(); - int prevFEB = firstFEB; - int minDelta = 999999999; - int nFEBs = 0; - for (std::vector<HWIdentifier>::const_iterator i = ++(m_onlineID->feb_begin()); - i != m_onlineID->feb_end(); ++i) { - int iFEB = i->get_identifier32().get_compact(); - minDelta = std::min( minDelta, iFEB - prevFEB); - nFEBs++; - prevFEB = iFEB; - } - int lastFEB = prevFEB; // == iFEB - if (minDelta < 1) { - // FEB ids not sorted - return false; - } - - unsigned int febShift = 0; - for (int i = 1; i < 31; i++) { - if ( 1 << i == minDelta) febShift = i; - // check also that minDelta is a power of 2!!! - } - if ( febShift == 0) return false; - - int FEBRange = (lastFEB - firstFEB) / minDelta; - if (FEBRange > 2500) { - // too much memory - return false; - } - - m_HwBadChan.setHasher( LArBadChanFEBHasher( firstFEB, lastFEB, febShift, - &(*m_onlineID))); - return true; -} diff --git a/LArCalorimeter/LArBadChannelTool/src/LArBadChannelDecoder.cxx b/LArCalorimeter/LArBadChannelTool/src/LArBadChannelDecoder.cxx index 220fcde3cbca893407a68957c647acae7122cc7b..da227b24599e54551fb5eb5b7b46506e6d495f99 100644 --- a/LArCalorimeter/LArBadChannelTool/src/LArBadChannelDecoder.cxx +++ b/LArCalorimeter/LArBadChannelTool/src/LArBadChannelDecoder.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "LArBadChannelTool/LArBadChannelDecoder.h" @@ -14,9 +14,6 @@ LArBadChannelDecoder::readASCII( const std::string& fname, { std::vector<BadChanEntry> result; - bool oldIdCheckStatus=m_onlineID->do_checks(); - m_onlineID->set_do_checks(true); //Check Id when reading from ASCII file - // set up parsing with exactly 6 ints and >= 1 string, for reading channels LArBadChannelParser parser(fname, &m_log, 6, -1); if (!parser.fileStatusGood()) { @@ -40,8 +37,6 @@ LArBadChannelDecoder::readASCII( const std::string& fname, } } } - //Reset checking, to avoid downstream problems (see bug #33824) - m_onlineID->set_do_checks(oldIdCheckStatus); return result; } @@ -50,9 +45,6 @@ LArBadChannelDecoder::readFebASCII( const std::string& fname) const { std::vector<BadFebEntry> result; - bool oldIdCheckStatus=m_onlineID->do_checks(); - m_onlineID->set_do_checks(true); //Check Id when reading from ASCII file - // set up a parser to read 4 ints (the 4th of which can be a wildcard) and >=1 strings LArBadChannelParser parser(fname, &m_log, 4, -1, 4); if (!parser.fileStatusGood()) { @@ -76,8 +68,6 @@ LArBadChannelDecoder::readFebASCII( const std::string& fname) const } } } - //Reset checking, to avoid downstream problems (see bug #33824) - m_onlineID->set_do_checks(oldIdCheckStatus); return result; } @@ -94,7 +84,7 @@ HWIdentifier LArBadChannelDecoder::constructChannelId( const std::vector<int>& i } try { HWIdentifier hwid( m_onlineID->channel_Id( intVec[barrel_ec], intVec[pos_neg], intVec[feedthrough], - intVec[slot], intVec[channel])); + intVec[slot], intVec[channel], true)); if (coolChan<LArBadChannelState::MAXCOOLCHAN && !checkId( hwid, intVec[barrel_ec], intVec[pos_neg], coolChan)) { log << MSG::WARNING << "Channel "; insertExpandedID( intVec, log); log << " does not belong to COOL channel " << State::coolChannelName( coolChan) @@ -149,7 +139,7 @@ HWIdentifier LArBadChannelDecoder::constructSingleFebId( const std::vector<int>& HWIdentifier invalid; if (v.size() != 4) return invalid; try { - HWIdentifier hwid( m_onlineID->feb_Id( v[barrel_ec], v[pos_neg], v[feedthrough], v[slot])); + HWIdentifier hwid( m_onlineID->feb_Id( v[barrel_ec], v[pos_neg], v[feedthrough], v[slot], true)); log << MSG::DEBUG << "Translating FEB id "; insertExpandedID( v, log); log << " to 0x" << MSG::hex << hwid << MSG::dec << endmsg; return hwid; diff --git a/LArCalorimeter/LArBadChannelTool/src/LArBadFebMasker.cxx b/LArCalorimeter/LArBadChannelTool/src/LArBadFebMasker.cxx new file mode 100644 index 0000000000000000000000000000000000000000..d34e8d40af06d01d9b496f4b4266de6c97664ed9 --- /dev/null +++ b/LArCalorimeter/LArBadChannelTool/src/LArBadFebMasker.cxx @@ -0,0 +1,118 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#include "LArBadChannelTool/LArBadFebMasker.h" +#include "StoreGate/ReadCondHandle.h" +#include "LArRecConditions/LArBadFebBitPacking.h" + + +LArBadFebMasker::LArBadFebMasker(const std::string& type, + const std::string& name, const IInterface* parent) : + AthAlgTool(type, name, parent), + m_bfContKey("LArBadFeb"), + m_bitMask(0), + m_problemWords(defaultProblems()), + m_doMasking(false) +{ + declareInterface<ILArBadFebMasker>(this); + declareProperty("BFKey",m_bfContKey,"Key of the BadFebContainer in the conditions store"); + declareProperty("ProblemsToMask", m_problemWords, "List of FEB problems to be masked."); + declareProperty("DoMasking", m_doMasking, "Flag to turn FEB masking on or off."); +} + +LArBadFebMasker::~LArBadFebMasker() +{} + +StatusCode LArBadFebMasker::initialize() +{ + ATH_MSG_DEBUG ( "in initialize()" ); + + if(!m_doMasking) return StatusCode::SUCCESS; //Do nothing + + ATH_CHECK(m_bfContKey.initialize()); + + buildBitMask(); + + LArBadFeb tempBF(m_bitMask); //consider overloading the function + LArBadFebBitPacking bf_bitpack; + ATH_MSG_INFO ( "Cell masking is ON. The following problems will be masked: " + << bf_bitpack.stringStatus(tempBF) ); + + return StatusCode::SUCCESS; +} + +bool LArBadFebMasker::febMissing(const HWIdentifier& febId) const{ + + if(!m_doMasking) return false; + + SG::ReadCondHandle<LArBadFebCont> bfContHdl{m_bfContKey}; + const LArBadFebCont* bfCont{*bfContHdl}; + return (0x1 << LArBadFebEnum::ProblemType::deadAllBit) & (bfCont->status(febId)).packedData(); +} + +bool LArBadFebMasker::shouldbeMasked(const HWIdentifier& febId) const{ + + if(!m_doMasking) return false; + + SG::ReadCondHandle<LArBadFebCont> bfContHdl{m_bfContKey}; + const LArBadFebCont* bfCont{*bfContHdl}; + return m_bitMask & (bfCont->status(febId)).packedData(); +} + +LArBadFeb LArBadFebMasker::febStatus(const HWIdentifier& febId) const{ + + SG::ReadCondHandle<LArBadFebCont> bfContHdl{m_bfContKey}; + const LArBadFebCont* bfCont{*bfContHdl}; + return bfCont->status(febId); +} + +void LArBadFebMasker::buildBitMask() +{ + m_bitMask = 0; + + LArBadFebBitPacking bf_bitPacking; + for(std::vector<std::string>::const_iterator it = m_problemWords.begin(); + it != m_problemWords.end(); ++it) + { + if(bf_bitPacking.setBit(*it,m_bitMask,true)) + ATH_MSG_DEBUG("The problem flag '"<< (*it) << "' was set."); + else + ATH_MSG_WARNING ( "The problem flag '" << (*it) << "' was not recognized." ); + } +} + +const std::vector<std::string>& LArBadFebMasker::defaultProblems() +{ + static std::vector<std::string> defaults; + if(defaults.size() == 0) + { + defaults.reserve(1); + defaults.push_back("deadAllBit"); + } + return defaults; +} + +StatusCode LArBadFebMasker::queryInterface(const InterfaceID& riid, void** ppvIf ) +{ + if(riid == ILArBadFebMasker::interfaceID()) + { + *ppvIf = static_cast<ILArBadFebMasker*>(this); + addRef(); + return StatusCode::SUCCESS; + } + else if(riid == interfaceID()) + { + *ppvIf = this; + addRef(); + return StatusCode::SUCCESS; + } + else return AthAlgTool::queryInterface( riid, ppvIf ); +} + +const InterfaceID& LArBadFebMasker::interfaceID() +{ + static const InterfaceID id("LArBadFebMasker", 1 , 0); + return id; +} + diff --git a/LArCalorimeter/LArBadChannelTool/src/components/LArBadChannelTool_entries.cxx b/LArCalorimeter/LArBadChannelTool/src/components/LArBadChannelTool_entries.cxx index 06163018eab4076df61dddb854941803753ca380..f4a6869ee1da195915d62323a148473695e39c1d 100644 --- a/LArCalorimeter/LArBadChannelTool/src/components/LArBadChannelTool_entries.cxx +++ b/LArCalorimeter/LArBadChannelTool/src/components/LArBadChannelTool_entries.cxx @@ -1,4 +1,3 @@ -#include "LArBadChannelTool/LArBadChanLegacyTool.h" #include "LArBadChannelTool/LArBadChannelMasker.h" #include "LArBadChannelTool/LArBadChannelDBAlg.h" #include "LArBadChannelTool/LArBadChannelTimingAlg.h" @@ -6,8 +5,8 @@ #include "LArBadChannelTool/LArBadFeb2Ascii.h" #include "LArBadChannelTool/LArBadChannelCondAlg.h" #include "LArBadChannelTool/LArBadFebCondAlg.h" +#include "LArBadChannelTool/LArBadFebMasker.h" -DECLARE_COMPONENT( LArBadChanLegacyTool ) DECLARE_COMPONENT( LArBadChannelMasker ) DECLARE_COMPONENT( LArBadChannelDBAlg ) DECLARE_COMPONENT( LArBadChannelTimingAlg ) @@ -15,4 +14,5 @@ DECLARE_COMPONENT( LArBadChannel2Ascii ) DECLARE_COMPONENT( LArBadFeb2Ascii ) DECLARE_COMPONENT( LArBadChannelCondAlg ) DECLARE_COMPONENT( LArBadFebCondAlg ) +DECLARE_COMPONENT( LArBadFebMasker ) diff --git a/LArCalorimeter/LArCafJobs/LArCafJobs/LArHECNoise.h b/LArCalorimeter/LArCafJobs/LArCafJobs/LArHECNoise.h index 6a785be6178ceb67d36dee3a1c7d558bd8031339..d58b0e344de85b1201a4476edd83084844f2a272 100644 --- a/LArCalorimeter/LArCafJobs/LArCafJobs/LArHECNoise.h +++ b/LArCalorimeter/LArCafJobs/LArCafJobs/LArHECNoise.h @@ -28,7 +28,6 @@ #include "LArIdentifier/LArOnlineID.h" #include "LArIdentifier/LArElectrodeID.h" #include "CaloDetDescr/CaloDetDescrManager.h" -#include "CaloIdentifier/CaloIdManager.h" #include "LArElecCalib/ILArPedestal.h" @@ -75,7 +74,6 @@ class LArHECNoise : public AthAlgorithm { /*services*/ const LArOnlineID* m_LArOnlineIDHelper; - const CaloIdManager* m_caloIdMgr; const CaloDetDescrManager* m_calodetdescrmgr; const CaloCell_ID* m_calocell_id; @@ -115,7 +113,7 @@ class LArHECNoise : public AthAlgorithm { std::vector<std::string> m_TriggerLines; int m_MinDigitADC; int m_MaxDeltaT; - const DataHandle<ILArPedestal> m_ped; + const ILArPedestal* m_ped; }; diff --git a/LArCalorimeter/LArCafJobs/LArCafJobs/LArNoiseBursts.h b/LArCalorimeter/LArCafJobs/LArCafJobs/LArNoiseBursts.h index ff34065f8ef926c8c3766c5ba9ea8050a1be962c..a89873a8104405c2b27ce0454a86ff9c8245cf47 100644 --- a/LArCalorimeter/LArCafJobs/LArCafJobs/LArNoiseBursts.h +++ b/LArCalorimeter/LArCafJobs/LArCafJobs/LArNoiseBursts.h @@ -30,7 +30,7 @@ #include "LArIdentifier/LArOnlineID.h" #include "LArIdentifier/LArElectrodeID.h" #include "CaloDetDescr/CaloDetDescrManager.h" -#include "CaloIdentifier/CaloIdManager.h" +#include "CaloIdentifier/CaloCell_ID.h" //#include "LArElecCalib/ILArHVTool.h" // Trigger @@ -55,7 +55,6 @@ class LArOnlineIDStrHelper; class LArEM_ID; class LArHEC_ID; class LArFCAL_ID; -//class CaloIdManager; //class CaloDetDescrManager; class TileTBID; @@ -113,7 +112,6 @@ class LArNoiseBursts : public AthAlgorithm { const LArEM_ID* m_LArEM_IDHelper; const LArFCAL_ID* m_LArFCAL_IDHelper; const LArHEC_ID* m_LArHEC_IDHelper; - const CaloIdManager* m_caloIdMgr; const CaloDetDescrManager* m_calodetdescrmgr; // Electrons diff --git a/LArCalorimeter/LArCafJobs/src/LArHECNoise.cxx b/LArCalorimeter/LArCafJobs/src/LArHECNoise.cxx index 74059869d27846beaaf37efc3fa4f2df8c2ea895..805a379ce1a64c4ade8879c9671bf830739ecfa9 100644 --- a/LArCalorimeter/LArCafJobs/src/LArHECNoise.cxx +++ b/LArCalorimeter/LArCafJobs/src/LArHECNoise.cxx @@ -7,7 +7,6 @@ #include "StoreGate/StoreGateSvc.h" -#include "CaloIdentifier/CaloIdManager.h" #include "CaloIdentifier/CaloCell_ID.h" #include "CaloIdentifier/CaloDM_ID.h" #include "CaloIdentifier/CaloLVL1_ID.h" @@ -32,7 +31,6 @@ #include "NavFourMom/IParticleContainer.h" #include "NavFourMom/INavigable4MomentumCollection.h" -#include "StoreGate/DataHandle.h" #include "CaloDetDescr/CaloDetDescrManager.h" #include "CaloDetDescr/CaloDetectorElements.h" #include "AthenaPoolUtilities/CondAttrListCollection.h" @@ -65,7 +63,6 @@ LArHECNoise::LArHECNoise(const std::string& name, m_tree(0), m_trigDec( "Trig::TrigDecisionTool/TrigDecisionTool" ), m_LArOnlineIDHelper(0), - m_caloIdMgr(0), m_calodetdescrmgr(0), m_calocell_id(nullptr), m_nt_run(0), @@ -95,7 +92,8 @@ LArHECNoise::LArHECNoise(const std::string& name, m_nt_z(0), m_nt_r(0), m_nt_ped(0), - m_nt_pedRMS(0) + m_nt_pedRMS(0), + m_ped(nullptr) { // Trigger @@ -126,16 +124,15 @@ StatusCode LArHECNoise::initialize() { ATH_CHECK( m_cablingKey.initialize() ); // Retrieve online ID helper - const DataHandle<LArOnlineID> LArOnlineIDHelper; + const LArOnlineID* LArOnlineIDHelper = nullptr; ATH_CHECK( detStore()->retrieve(LArOnlineIDHelper, "LArOnlineID") ); m_LArOnlineIDHelper = LArOnlineIDHelper; ATH_MSG_DEBUG( " Found LArOnline Helper"); // Retrieve ID helpers - ATH_CHECK( detStore()->retrieve(m_caloIdMgr) ); - m_calocell_id = m_caloIdMgr->getCaloCell_ID(); + ATH_CHECK( detStore()->retrieve (m_calocell_id, "CaloCell_ID") ); + ATH_CHECK( detStore()->retrieve (m_calodetdescrmgr, "CaloMgr") ); - m_calodetdescrmgr = CaloDetDescrManager::instance(); /** get a handle on the NTuple and histogramming service */ ATH_CHECK( service("THistSvc", m_thistSvc) ); diff --git a/LArCalorimeter/LArCafJobs/src/LArNoiseBursts.cxx b/LArCalorimeter/LArCafJobs/src/LArNoiseBursts.cxx index b76e131e4f2836962909838a2f6d29f8105e8cd1..c121d2e84b089fd99616f2274a67cece02dd77ba 100644 --- a/LArCalorimeter/LArCafJobs/src/LArNoiseBursts.cxx +++ b/LArCalorimeter/LArCafJobs/src/LArNoiseBursts.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /// LArNoiseBursts @@ -13,7 +13,6 @@ #include "StoreGate/StoreGateSvc.h" -#include "CaloIdentifier/CaloIdManager.h" #include "CaloIdentifier/CaloCell_ID.h" #include "CaloIdentifier/CaloDM_ID.h" #include "CaloIdentifier/CaloLVL1_ID.h" @@ -49,7 +48,6 @@ // Lar HV #include "LArElecCalib/ILArHVTool.h" -#include "StoreGate/DataHandle.h" #include "CaloDetDescr/CaloDetDescrManager.h" #include "CaloDetDescr/CaloDetectorElements.h" #include "LArReadoutGeometry/EMBCell.h" @@ -123,7 +121,6 @@ LArNoiseBursts::LArNoiseBursts(const std::string& name, m_LArEM_IDHelper(0), m_LArFCAL_IDHelper(0), m_LArHEC_IDHelper(0), - m_caloIdMgr(0), m_calodetdescrmgr(0), m_CosmicCaloStream(false), m_nb_sat(0), @@ -250,8 +247,6 @@ LArNoiseBursts::LArNoiseBursts(const std::string& name, // Keep cell properties declareProperty("KeepOnlyCellID", m_keepOnlyCellID = false); - - m_calodetdescrmgr = CaloDetDescrManager::instance(); } ///////////////////////////////////////////////////////////////////////////////////// @@ -302,28 +297,31 @@ StatusCode LArNoiseBursts::initialize() { ATH_CHECK( m_BCKey.initialize() ); // Retrieve online ID helper - const DataHandle<LArOnlineID> LArOnlineIDHelper; + const LArOnlineID* LArOnlineIDHelper = nullptr; ATH_CHECK( detStore()->retrieve(LArOnlineIDHelper, "LArOnlineID") ); m_LArOnlineIDHelper = LArOnlineIDHelper; ATH_MSG_DEBUG( " Found LArOnline Helper"); // Retrieve HV line ID helper - const DataHandle<LArHVLineID> LArHVLineIDHelper; - ATH_CHECK( detStore()->retrieve(LArHVLineIDHelper, "LArHVLineID") ); + const LArHVLineID* LArHVLineIDHelper = nullptr; + ATH_CHECK( detStore()->retrieve(LArHVLineIDHelper, "LArHVLineID") ); m_LArHVLineIDHelper = LArHVLineIDHelper; ATH_MSG_DEBUG( " Found LArOnlineIDHelper Helper"); // Retrieve HV electrode ID helper - const DataHandle<LArElectrodeID> LArElectrodeIDHelper; + const LArElectrodeID* LArElectrodeIDHelper = nullptr; ATH_CHECK( detStore()->retrieve(LArElectrodeIDHelper, "LArElectrodeID") ); m_LArElectrodeIDHelper = LArElectrodeIDHelper; ATH_MSG_DEBUG( " Found LArElectrodeIDHelper Helper"); + ATH_CHECK( detStore()->retrieve (m_calodetdescrmgr, "CaloMgr") ); + // Retrieve ID helpers - ATH_CHECK( detStore()->retrieve(m_caloIdMgr) ); - m_LArEM_IDHelper = m_caloIdMgr->getEM_ID(); - m_LArHEC_IDHelper = m_caloIdMgr->getHEC_ID(); - m_LArFCAL_IDHelper = m_caloIdMgr->getFCAL_ID(); + const CaloCell_ID* idHelper = nullptr; + ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_ID") ); + m_LArEM_IDHelper = idHelper->em_idHelper(); + m_LArHEC_IDHelper = idHelper->hec_idHelper(); + m_LArFCAL_IDHelper = idHelper->fcal_idHelper(); if ( m_calo_noise_tool.retrieve().isFailure() ) { ATH_MSG_WARNING ( "Failed to retrieve tool " << m_calo_noise_tool ); diff --git a/LArCalorimeter/LArCafJobs/src/LArShapeDumper.cxx b/LArCalorimeter/LArCafJobs/src/LArShapeDumper.cxx index c991048d7b8a15887ac1e5df3b569ff165b0cc29..d0173a44c4034546914bf0a9b9573d8e13812af8 100755 --- a/LArCalorimeter/LArCafJobs/src/LArShapeDumper.cxx +++ b/LArCalorimeter/LArCafJobs/src/LArShapeDumper.cxx @@ -1,12 +1,11 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "LArCafJobs/LArShapeDumper.h" #include "StoreGate/StoreGateSvc.h" #include "LArRawEvent/LArDigit.h" #include "GaudiKernel/IToolSvc.h" -#include "CaloIdentifier/CaloIdManager.h" #include "GaudiKernel/INTupleSvc.h" #include "GaudiKernel/MsgStream.h" #include "LArRawEvent/LArOFIterResultsContainer.h" diff --git a/LArCalorimeter/LArCafJobs/src/LArShapeDumperTool.cxx b/LArCalorimeter/LArCafJobs/src/LArShapeDumperTool.cxx index b6f701154c16fc78e1b1e1762e74a5090e3e88fc..59daa657da8186d77e17865bb2176cbc3e3f5286 100644 --- a/LArCalorimeter/LArCafJobs/src/LArShapeDumperTool.cxx +++ b/LArCalorimeter/LArCafJobs/src/LArShapeDumperTool.cxx @@ -1,10 +1,10 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "LArCafJobs/LArShapeDumperTool.h" #include "LArRawEvent/LArDigit.h" -#include "CaloIdentifier/CaloIdManager.h" +#include "CaloIdentifier/CaloCell_ID.h" #include "LArElecCalib/ILArShape.h" #include "LArRawConditions/LArPhysWave.h" @@ -44,10 +44,11 @@ StatusCode LArShapeDumperTool::initialize() { //ATH_MSG_DEBUG("in initialize()"); ATH_CHECK(detStore()->retrieve(m_caloDetDescrMgr)); - const CaloIdManager* caloIdMgr = CaloIdManager::instance() ; - m_emId = caloIdMgr->getEM_ID(); - m_hecId = caloIdMgr->getHEC_ID(); - m_fcalId = caloIdMgr->getFCAL_ID(); + const CaloCell_ID* idHelper = nullptr; + ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_ID") ); + m_emId = idHelper->em_idHelper(); + m_hecId = idHelper->hec_idHelper(); + m_fcalId = idHelper->fcal_idHelper(); ATH_CHECK(detStore()->retrieve(m_onlineHelper, "LArOnlineID")); diff --git a/LArCalorimeter/LArCalibTools/LArCalibTools/LArAverages2Ntuple.h b/LArCalorimeter/LArCalibTools/LArCalibTools/LArAverages2Ntuple.h index 2294599dd0f1abd7d912e58b8f9a6d9cc8b6f18d..1c79d78a1a47a4deb4071030861792092ab777cc 100644 --- a/LArCalorimeter/LArCalibTools/LArCalibTools/LArAverages2Ntuple.h +++ b/LArCalorimeter/LArCalibTools/LArCalibTools/LArAverages2Ntuple.h @@ -25,7 +25,6 @@ #include "GaudiKernel/ToolHandle.h" #include "CaloIdentifier/LArEM_ID.h" -#include "CaloIdentifier/CaloIdManager.h" #include "LArIdentifier/LArOnlineID.h" #include "LArCabling/LArOnOffIdMapping.h" #include "LArRecConditions/LArCalibLineMapping.h" diff --git a/LArCalorimeter/LArCalibTools/LArCalibTools/LArCond2NtupleBase.h b/LArCalorimeter/LArCalibTools/LArCalibTools/LArCond2NtupleBase.h index 11a125292f33062cf31458a79289e382c8d4ac6f..9eb8d2c3ecbd6da5de02b4a70cd6441a11aa73e6 100644 --- a/LArCalorimeter/LArCalibTools/LArCalibTools/LArCond2NtupleBase.h +++ b/LArCalorimeter/LArCalibTools/LArCalibTools/LArCond2NtupleBase.h @@ -42,6 +42,8 @@ class LArCond2NtupleBase : public AthAlgorithm { //StatusCode initializeBase(const std::string& path, const std::string& name); bool fillFromIdentifier(const HWIdentifier& id); //returns true if connected + const SG::ReadCondHandleKey<LArOnOffIdMapping>& cablingKey() const; + private: bool m_initialized; diff --git a/LArCalorimeter/LArCalibTools/LArCalibTools/LArGainThresholds2Ntuple.h b/LArCalorimeter/LArCalibTools/LArCalibTools/LArGainThresholds2Ntuple.h index 3ee4f9cd7b364d8e1da38d93f7ab2bd3bd7c2864..6841c9a6c2e94b5cd8da76dcec5e2dbfd4b87142 100644 --- a/LArCalorimeter/LArCalibTools/LArCalibTools/LArGainThresholds2Ntuple.h +++ b/LArCalorimeter/LArCalibTools/LArCalibTools/LArGainThresholds2Ntuple.h @@ -1,14 +1,15 @@ //Dear emacs, this is -*- c++ -*- /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef LARGAINTHRESHOLDS2NTUPLE #define LARGAINTHRESHOLDS2NTUPLE #include "LArCalibTools/LArCond2NtupleBase.h" -#include "LArElecCalib/ILArFEBConfigReader.h" +#include "StoreGate/ReadCondHandleKey.h" +#include "LArRecConditions/LArFebConfig.h" class LArGainThresholds2Ntuple : public LArCond2NtupleBase { @@ -21,7 +22,8 @@ class LArGainThresholds2Ntuple : public LArCond2NtupleBase StatusCode finalize(){return StatusCode::SUCCESS;} StatusCode stop(); private: - ToolHandle<ILArFEBConfigReader> m_febConfigReader; + + SG::ReadCondHandleKey<LArFebConfig> m_configKey{this, "inputKey","LArFebConfig", "Input key for FEB config object"}; }; diff --git a/LArCalorimeter/LArCalibTools/LArCalibTools/LArOFCBinAlg.h b/LArCalorimeter/LArCalibTools/LArCalibTools/LArOFCBinAlg.h index 720fee57e763805905c9029ac6e70ed8a2b0ec95..310e695e8c3836cad987a33bc0facb49a5bb874d 100644 --- a/LArCalorimeter/LArCalibTools/LArCalibTools/LArOFCBinAlg.h +++ b/LArCalorimeter/LArCalibTools/LArCalibTools/LArOFCBinAlg.h @@ -25,7 +25,6 @@ class LArOFCBinAlg: public LArCond2NtupleBase { private: - SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey{this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"}; std::string m_inputContainer; std::string m_outputContainer; std::string m_fileName; diff --git a/LArCalorimeter/LArCalibTools/LArCalibTools/LArReadParamsFromFile.h b/LArCalorimeter/LArCalibTools/LArCalibTools/LArReadParamsFromFile.h index 703219f7ee0aeb01fe6507cd97d929e2c84c9e44..72c356d4c674798cb65854d263aca0827003e65f 100644 --- a/LArCalorimeter/LArCalibTools/LArCalibTools/LArReadParamsFromFile.h +++ b/LArCalorimeter/LArCalibTools/LArCalibTools/LArReadParamsFromFile.h @@ -17,7 +17,7 @@ #define LARREADPARAMSFROMFILE_H #include "AthenaBaseComps/AthAlgorithm.h" //#include "GaudiKernel/SmartDataPtr.h" -#include "CaloIdentifier/CaloIdManager.h" +#include "CaloIdentifier/CaloCell_ID.h" #include <fstream> #include <stdio.h> diff --git a/LArCalorimeter/LArCalibTools/LArCalibTools/LArReadParamsFromFile.icc b/LArCalorimeter/LArCalibTools/LArCalibTools/LArReadParamsFromFile.icc index b39eb1b77cec5437ec3b6a5dd9646f7bbf4f8f4d..405e7163a4c88dc764232384ae23444d3262b28d 100644 --- a/LArCalorimeter/LArCalibTools/LArCalibTools/LArReadParamsFromFile.icc +++ b/LArCalorimeter/LArCalibTools/LArCalibTools/LArReadParamsFromFile.icc @@ -59,10 +59,11 @@ StatusCode LArReadParamsFromFile<DATA>::initialize() { return StatusCode::FAILURE ; } - const CaloIdManager *caloIdMgr=CaloIdManager::instance() ; - m_emId = caloIdMgr->getEM_ID(); - m_hecId = caloIdMgr->getHEC_ID(); - m_fcalId = caloIdMgr->getFCAL_ID(); + const CaloCell_ID* idHelper = nullptr; + ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_ID") ); + m_emId = idHelper->em_idHelper(); + m_hecId = idHelper->hec_idHelper(); + m_fcalId = idHelper->fcal_idHelper(); if (!m_emId) { ATH_MSG_ERROR ( "Could not access lar EM ID helper" ); return StatusCode::FAILURE; diff --git a/LArCalorimeter/LArCalibTools/share/LArGainThresholds2Ntuple.py b/LArCalorimeter/LArCalibTools/share/LArGainThresholds2Ntuple.py index fadd2ca78c7d74d6de9c032b8a93e9e8b12e0c66..44edf30ec9fb013aaef234f47993e537eadb6d03 100644 --- a/LArCalorimeter/LArCalibTools/share/LArGainThresholds2Ntuple.py +++ b/LArCalorimeter/LArCalibTools/share/LArGainThresholds2Ntuple.py @@ -12,7 +12,7 @@ globalflags.DataSource.set_Value_and_Lock('data') globalflags.InputFormat.set_Value_and_Lock('bytestream') from AthenaCommon.JobProperties import jobproperties -jobproperties.Global.DetDescrVersion = "ATLAS-GEO-20-00-00" +jobproperties.Global.DetDescrVersion = "ATLAS-R2-2016-01-00-01" from AthenaCommon.DetFlags import DetFlags DetFlags.Calo_setOff() @@ -28,61 +28,29 @@ from AtlasGeoModel import GeoModelInit #Get identifier mapping (needed by LArConditionsContainer) -svcMgr.IOVDbSvc.GlobalTag="LARCALIB-000-02" +svcMgr.IOVDbSvc.GlobalTag="LARCALIB-RUN2-02" include( "LArConditionsCommon/LArIdMap_comm_jobOptions.py" ) theApp.EvtMax = 1 svcMgr.EventSelector.RunNumber = 500000 svcMgr.EventSelector.InitialTimeStamp=int(time()) -dbname="<db>COOLOFL_LAR/COMP200</db>" - -conddb.addFolder("","/LAR/BadChannelsOfl/BadChannels<key>/LAR/BadChannels/BadChannels</key>"+dbname) -conddb.addFolder("","/LAR/BadChannelsOfl/MissingFEBs<key>/LAR/BadChannels/MissingFEBs</key>"+dbname) -#conddb.addFolder("","/LAR/ElecCalibOfl/PhysCaliTdiff<key>input</key>"+dbname) - -## LArFebConfigFolders=[ -## "/LAR/Configuration/FEBConfig/Physics/EMBA1", -## "/LAR/Configuration/FEBConfig/Physics/EMBA2", -## "/LAR/Configuration/FEBConfig/Physics/EMBA3", -## "/LAR/Configuration/FEBConfig/Physics/EMBA4", -## "/LAR/Configuration/FEBConfig/Physics/EMBC1", -## "/LAR/Configuration/FEBConfig/Physics/EMBC2", -## "/LAR/Configuration/FEBConfig/Physics/EMBC3", -## "/LAR/Configuration/FEBConfig/Physics/EMBC4", -## "/LAR/Configuration/FEBConfig/Physics/EMECA1", -## "/LAR/Configuration/FEBConfig/Physics/EMECA2", -## "/LAR/Configuration/FEBConfig/Physics/EMECA3", -## "/LAR/Configuration/FEBConfig/Physics/EMECC1", -## "/LAR/Configuration/FEBConfig/Physics/EMECC2", -## "/LAR/Configuration/FEBConfig/Physics/EMECC3", -## "/LAR/Configuration/FEBConfig/Physics/FCALA", -## "/LAR/Configuration/FEBConfig/Physics/FCALC", -## "/LAR/Configuration/FEBConfig/Physics/HECA", -## "/LAR/Configuration/FEBConfig/Physics/HECC", -## ] - - -## for f in LArFebConfigFolders: -## conddb.addFolder("LAR_ONL",f) - - -## from LArRecUtils.LArRecUtils import LArFEBConfigReader -## theLArFebConfigReader=LArFEBConfigReader() -## theLArFebConfigReader.OutputLevel=DEBUG -## theLArFebConfigReader.ListOfFolders=LArFebConfigFolders - - - -from LArRecUtils.LArFEBConfigReaderDefault import LArFEBConfigReaderDefault -theLArFebConfigReader=LArFEBConfigReaderDefault() -theLArFebConfigReader.OutputLevel=DEBUG -ToolSvc+=theLArFebConfigReader +dbname="<db>COOLOFL_LAR/CONDBR2</db>" + +#conddb.addFolder("","/LAR/BadChannelsOfl/BadChannels<key>/LAR/BadChannels/BadChannels</key>"+dbname) +#conddb.addFolder("","/LAR/BadChannelsOfl/MissingFEBs<key>/LAR/BadChannels/MissingFEBs</key>"+dbname) +from LArBadChannelTool.LArBadChannelAccess import LArBadChannelAccess +LArBadChannelAccess() +#from LArBadChannelTool.LArBadFebAccess import LArBadFebAccess +#LArBadFebAccess() + +from LArRecUtils.LArFebConfigCondAlgDefault import LArFebConfigCondAlgDefault +LArFebConfigCondAlgDefault() from LArCalibTools.LArCalibToolsConf import LArGainThresholds2Ntuple theLArGainThresholds2Ntuple=LArGainThresholds2Ntuple() theLArGainThresholds2Ntuple.OutputLevel=DEBUG theLArGainThresholds2Ntuple.AddFEBTempInfo=False -theLArGainThresholds2Ntuple.FebConfigReader=theLArFebConfigReader +theLArGainThresholds2Ntuple.isSC=False topSequence+=theLArGainThresholds2Ntuple @@ -96,11 +64,10 @@ svcMgr.NTupleSvc.Output = [ "FILE1 DATAFILE='thresholds.root' OPT='NEW'" ] #svcMgr.MessageSvc.OutputLevel = DEBUG svcMgr.IOVDbSvc.DBInstance="" -svcMgr.PoolSvc.ReadCatalog += ["xmlcatalog_file:/afs/cern.ch/user/l/larcalib/w0/stableConds/PoolCat_stable.xml", - "xmlcatalog_file:/afs/cern.ch/atlas/conditions/poolcond/catalogue/poolcond/PoolCat_comcond_castor.xml", - ] +#svcMgr.PoolSvc.ReadCatalog += ["xmlcatalog_file:/afs/cern.ch/user/l/larcalib/w0/stableConds/PoolCat_stable.xml", +# "xmlcatalog_file:/afs/cern.ch/atlas/conditions/poolcond/catalogue/poolcond/PoolCat_comcond_castor.xml", +# ] svcMgr.MessageSvc.debugLimit = 5000000 - svcMgr.IOVDbSvc.OutputLevel=DEBUG diff --git a/LArCalorimeter/LArCalibTools/src/LArAutoCorrFromStdNtuple.cxx b/LArCalorimeter/LArCalibTools/src/LArAutoCorrFromStdNtuple.cxx index 75317ad34387c3583fb6f3bc29bda5fb2a8bec44..138df466cf6aa97ef048042427b8022bff769e63 100644 --- a/LArCalorimeter/LArCalibTools/src/LArAutoCorrFromStdNtuple.cxx +++ b/LArCalorimeter/LArCalibTools/src/LArAutoCorrFromStdNtuple.cxx @@ -6,7 +6,7 @@ #include "LArIdentifier/LArOnlineID.h" #include "CaloIdentifier/CaloGain.h" -#include "CaloIdentifier/CaloIdManager.h" +#include "CaloIdentifier/CaloCell_ID.h" #include "CaloIdentifier/LArFCAL_ID.h" #include "LArRawConditions/LArAutoCorrMC.h" #include "LArRawConditions/LArAutoCorrComplete.h" @@ -92,9 +92,9 @@ StatusCode LArAutoCorrFromStdNtuple::stop() const LArOnlineID* onlineHelper = nullptr; ATH_CHECK( detStore()->retrieve(onlineHelper, "LArOnlineID") ); // and helper for FCAL - const CaloIdManager* caloId_mgr; - ATH_CHECK( detStore()->retrieve(caloId_mgr, "CaloIdManager") ); - const LArFCAL_ID* fcal_id = caloId_mgr->getFCAL_ID(); + const CaloCell_ID* idHelper = nullptr; + ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_ID") ); + const LArFCAL_ID* fcal_id = idHelper->fcal_idHelper(); SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl{m_cablingKey}; const LArOnOffIdMapping* cabling{*cablingHdl}; diff --git a/LArCalorimeter/LArCalibTools/src/LArAverages2Ntuple.cxx b/LArCalorimeter/LArCalibTools/src/LArAverages2Ntuple.cxx index bf2b7ef96aac9b7d732599de6bf29c6fae45ebdb..e5f01dbe3e5b6cfd46a37e97786da8aca4232274 100644 --- a/LArCalorimeter/LArCalibTools/src/LArAverages2Ntuple.cxx +++ b/LArCalorimeter/LArCalibTools/src/LArAverages2Ntuple.cxx @@ -5,6 +5,7 @@ #include "LArCalibTools/LArAverages2Ntuple.h" #include "LArRawEvent/LArAccumulatedCalibDigitContainer.h" +#include "CaloIdentifier/CaloCell_ID.h" #include "GaudiKernel/ToolHandle.h" @@ -27,8 +28,9 @@ StatusCode LArAverages2Ntuple::initialize() { ATH_MSG_INFO ( "in initialize" ); - const CaloIdManager *caloIdMgr=CaloIdManager::instance() ; - m_emId=caloIdMgr->getEM_ID(); + const CaloCell_ID* idHelper = nullptr; + ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_ID") ); + m_emId = idHelper->em_idHelper(); if (!m_emId) { ATH_MSG_ERROR ( "Could not access lar EM ID helper" ); return StatusCode::FAILURE; diff --git a/LArCalorimeter/LArCalibTools/src/LArCond2NtupleBase.cxx b/LArCalorimeter/LArCalibTools/src/LArCond2NtupleBase.cxx index 03eb8f633ea306eee7c4a0af9e8e77ba42dcaf99..1966aecfb2afcfd5aadbe9fbc00a1d8d149281b4 100644 --- a/LArCalorimeter/LArCalibTools/src/LArCond2NtupleBase.cxx +++ b/LArCalorimeter/LArCalibTools/src/LArCond2NtupleBase.cxx @@ -6,7 +6,6 @@ #include "LArIdentifier/LArOnlineID.h" #include "LArIdentifier/LArOnline_SuperCellID.h" -#include "CaloIdentifier/CaloIdManager.h" #include "CaloIdentifier/CaloCell_ID.h" LArCond2NtupleBase::LArCond2NtupleBase(const std::string& name, ISvcLocator* pSvcLocator): @@ -64,18 +63,17 @@ StatusCode LArCond2NtupleBase::initialize() { m_detStore= &(*detStore()); //for backward compatiblity - const CaloIdManager *caloIdMgr=CaloIdManager::instance() ; + const CaloCell_ID* idHelper = nullptr; if ( m_isSC ){ - m_emId=caloIdMgr->getEM_SuperCell_ID(); - m_fcalId=caloIdMgr->getFCAL_SuperCell_ID(); - m_hecId=caloIdMgr->getHEC_SuperCell_ID(); + ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_SuperCell_ID") ); } - else{ - m_emId=caloIdMgr->getEM_ID(); - m_fcalId=caloIdMgr->getFCAL_ID(); - m_hecId=caloIdMgr->getHEC_ID(); - m_caloId=caloIdMgr->getCaloCell_ID(); + else { + ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_ID") ); + ATH_CHECK( detStore()->retrieve (m_caloId, "CaloCell_ID") ); } + m_emId=idHelper->em_idHelper(); + m_fcalId=idHelper->fcal_idHelper(); + m_hecId=idHelper->hec_idHelper(); if (!m_emId) { msg(MSG::ERROR) << "Could not access lar EM ID helper" << endmsg; @@ -281,7 +279,7 @@ bool LArCond2NtupleBase::fillFromIdentifier(const HWIdentifier& hwid) { return false; } const LArOnOffIdMapping* cabling=nullptr; - if(m_isSC) { + if(!m_isSC) { SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl{m_cablingKey}; cabling = *cablingHdl; } else { @@ -375,3 +373,10 @@ bool LArCond2NtupleBase::fillFromIdentifier(const HWIdentifier& hwid) { return connected; } + + +const SG::ReadCondHandleKey<LArOnOffIdMapping>& +LArCond2NtupleBase::cablingKey() const +{ + return m_cablingKey; +} diff --git a/LArCalorimeter/LArCalibTools/src/LArGainThresholds2Ntuple.cxx b/LArCalorimeter/LArCalibTools/src/LArGainThresholds2Ntuple.cxx index 168e8399b079b0c43143d21a986bed1250198902..e526bd605f6f6829a38b58ee3b2545bb2080a168 100644 --- a/LArCalorimeter/LArCalibTools/src/LArGainThresholds2Ntuple.cxx +++ b/LArCalorimeter/LArCalibTools/src/LArGainThresholds2Ntuple.cxx @@ -1,14 +1,13 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "LArCalibTools/LArGainThresholds2Ntuple.h" #include "LArIdentifier/LArOnlineID.h" LArGainThresholds2Ntuple::LArGainThresholds2Ntuple(const std::string& name, ISvcLocator* pSvcLocator): - LArCond2NtupleBase(name, pSvcLocator), m_febConfigReader("LArFEBConfigReader") { + LArCond2NtupleBase(name, pSvcLocator) { - declareProperty("FebConfigReader",m_febConfigReader); m_ntTitle="Gain Thresholds"; m_ntpath="/NTUPLES/FILE1/GAINTH"; } @@ -16,10 +15,7 @@ LArGainThresholds2Ntuple::LArGainThresholds2Ntuple(const std::string& name, ISvc StatusCode LArGainThresholds2Ntuple::initialize() { - if (m_febConfigReader.retrieve().isFailure()) { - msg(MSG::ERROR) << "Failed to retrieve tool " << m_febConfigReader << endmsg; - return StatusCode::FAILURE; - } + ATH_CHECK(m_configKey.initialize()); return LArCond2NtupleBase::initialize(); } @@ -28,40 +24,35 @@ LArGainThresholds2Ntuple::~LArGainThresholds2Ntuple() {} StatusCode LArGainThresholds2Ntuple::stop() { - StatusCode sc; - NTuple::Item<long> lower; - NTuple::Item<long> upper; + + ATH_MSG_DEBUG(" trying stop"); + + NTuple::Item<long> lower; + NTuple::Item<long> upper; - sc=m_nt->addItem("lower",lower,-1000,5000); - if (sc!=StatusCode::SUCCESS) { - msg(MSG::ERROR) << "addItem 'lower' failed" << endmsg; - return StatusCode::FAILURE; - } - - sc=m_nt->addItem("upper",upper,-1000.,5000.); - if (sc!=StatusCode::SUCCESS) { - msg(MSG::ERROR) << "addItem 'upper' failed" << endmsg; + SG::ReadCondHandle<LArFebConfig> configHdl{m_configKey}; + const LArFebConfig* febConfig = *configHdl; + if (febConfig==nullptr) { + ATH_MSG_ERROR( "Unable to retrieve LArFebConfig with key " << m_configKey.key()); return StatusCode::FAILURE; } + + ATH_CHECK(m_nt->addItem("lower",lower,-1000,5000)); + ATH_CHECK(m_nt->addItem("upper",upper,-1000.,5000.)); std::vector<HWIdentifier>::const_iterator itOnId = m_onlineId->channel_begin(); std::vector<HWIdentifier>::const_iterator itOnIdEnd = m_onlineId->channel_end(); for(; itOnId!=itOnIdEnd;++itOnId){ const HWIdentifier hwid = *itOnId; - lower=m_febConfigReader->lowerGainThreshold(hwid); - upper=m_febConfigReader->upperGainThreshold(hwid); - + lower=febConfig->lowerGainThreshold(hwid); + upper=febConfig->upperGainThreshold(hwid); + fillFromIdentifier(hwid); - sc=ntupleSvc()->writeRecord(m_nt); - if (sc!=StatusCode::SUCCESS) { - (*m_log) << MSG::ERROR << "writeRecord failed" << endmsg; - return StatusCode::FAILURE; - } + ATH_CHECK(ntupleSvc()->writeRecord(m_nt)); } - msg(MSG::INFO) << "LArGainThresholds2Ntuple has finished." << endmsg; + ATH_MSG_INFO("LArGainThresholds2Ntuple has finished."); return StatusCode::SUCCESS; -}// end finalize-method. - +} diff --git a/LArCalorimeter/LArCalibTools/src/LArOFCBinAlg.cxx b/LArCalorimeter/LArCalibTools/src/LArOFCBinAlg.cxx index e8d20445968ef9b1c449c174ef4fe1b132c5bdfe..15c7236617762165e9f9167071979418b3ee0926 100644 --- a/LArCalorimeter/LArCalibTools/src/LArOFCBinAlg.cxx +++ b/LArCalorimeter/LArCalibTools/src/LArOFCBinAlg.cxx @@ -4,7 +4,7 @@ #include "LArCalibTools/LArOFCBinAlg.h" #include "LArRawConditions/LArOFCBinComplete.h" -#include "CaloIdentifier/CaloIdManager.h" +#include "CaloIdentifier/CaloCell_ID.h" //#include <ifstream> #include <fstream> @@ -31,7 +31,6 @@ StatusCode LArOFCBinAlg::initialize() { //} m_ntTitle="Bin"; m_ntpath=std::string("/NTUPLES/FILE1/OFCBINDIFF"); - ATH_CHECK( m_cablingKey.initialize() ); return LArCond2NtupleBase::initialize(); } @@ -98,19 +97,17 @@ StatusCode LArOFCBinAlg::execute() { msg(MSG::ERROR) << "Failed to register container with key " << m_outputContainer << " to StoreGate" << endmsg; } - SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl{m_cablingKey}; + SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl{cablingKey()}; const LArOnOffIdMapping* cabling{*cablingHdl}; if(!cabling) { - ATH_MSG_ERROR( "Do not have cabling mapping from key " << m_cablingKey.key() ); + ATH_MSG_ERROR( "Do not have cabling mapping from key " << cablingKey().key() ); return StatusCode::FAILURE; } - const LArEM_Base_ID* emId; - const LArHEC_Base_ID* hecId; - const LArFCAL_Base_ID* fcalId; - const CaloIdManager *caloIdMgr=CaloIdManager::instance(); - emId=caloIdMgr->getEM_ID(); - fcalId=caloIdMgr->getFCAL_ID(); - hecId=caloIdMgr->getHEC_ID(); + const CaloCell_ID* idHelper = nullptr; + ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_ID") ); + const LArEM_Base_ID* emId = idHelper->em_idHelper(); + const LArHEC_Base_ID* hecId = idHelper->hec_idHelper(); + const LArFCAL_Base_ID* fcalId = idHelper->fcal_idHelper(); for (int gain=0;gain<3;++gain) { msg(MSG::INFO) << "Working on gain " << gain << endmsg; diff --git a/LArCalorimeter/LArCalibTools/src/LArRamps2Ntuple.cxx b/LArCalorimeter/LArCalibTools/src/LArRamps2Ntuple.cxx index 8967672890733e91c4b08585dddfa124805bb197..22e4567a181e223955de09c0fb3577f670811707 100755 --- a/LArCalorimeter/LArCalibTools/src/LArRamps2Ntuple.cxx +++ b/LArCalorimeter/LArCalibTools/src/LArRamps2Ntuple.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "LArCalibTools/LArRamps2Ntuple.h" @@ -7,8 +7,6 @@ #include "LArRawConditions/LArRampComplete.h" #include "LArRawConditions/LArRampSym.h" -//#include "CaloIdentifier/CaloIdManager.h" - #include <math.h> LArRamps2Ntuple::LArRamps2Ntuple(const std::string& name, ISvcLocator* pSvcLocator): diff --git a/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArCaliWaveAverage.h b/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArCaliWaveAverage.h index 847db4e91e82797e80414fba4edd522d6204feb5..d5a8b73d1b91df0845383f0e584840aa8b21f427 100644 --- a/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArCaliWaveAverage.h +++ b/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArCaliWaveAverage.h @@ -11,7 +11,6 @@ #include "AthenaBaseComps/AthAlgorithm.h" #include "GaudiKernel/ICondSvc.h" #include "StoreGate/StoreGateSvc.h" -#include "CaloIdentifier/CaloIdManager.h" #include "CaloIdentifier/LArEM_ID.h" #include "Identifier/HWIdentifier.h" #include "LArRawConditions/LArCaliWave.h" diff --git a/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArDigitOscillationCorrTool.h b/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArDigitOscillationCorrTool.h index bb902f0ec8fd3fc29aad6384e3ef85a604736bf4..73d87a16f9d00e6320b60b47da9242e1c3cb7aa5 100644 --- a/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArDigitOscillationCorrTool.h +++ b/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArDigitOscillationCorrTool.h @@ -16,8 +16,6 @@ #include "GaudiKernel/IIncidentListener.h" #include "GaudiKernel/ToolHandle.h" -#include "StoreGate/DataHandle.h" - #include "LArElecCalib/ILArDigitOscillationCorrTool.h" #include "LArElecCalib/ILArH6Oscillation.h" #include "LArElecCalib/ILArRamp.h" diff --git a/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArFill.h b/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArFill.h index a88dd674d2c9774d89e615dc71d70e2d47b178a3..e295ac88af741d731d27e8cabc59890b2c2a7231 100644 --- a/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArFill.h +++ b/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArFill.h @@ -25,7 +25,6 @@ CREATED: Jan. 2004 #include "LArElecCalib/ILArDAC2uA.h" #include "LArElecCalib/ILAruA2MeV.h" -#include "StoreGate/DataHandle.h" #include "StoreGate/StoreGateSvc.h" #include "AthenaKernel/IOVSvcDefs.h" @@ -53,10 +52,6 @@ class LArFill : public AthAlgorithm LArDAC2uAComplete* m_dac2ua; LAruA2MeVComplete* m_ua2mev; - const DataHandle<ILArRamp> m_dd_ADC2DAC; - const DataHandle<ILArDAC2uA> m_dd_DAC2uA; - const DataHandle<ILAruA2MeV> m_dd_uA2MeV; - std::string m_ADC2MeVToolName; std::string m_keyADC2DAC, m_keyDAC2uA, m_keyuA2MeV; ILArADC2MeVTool* m_ADC2MeVtool; diff --git a/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArOFCAlg.h b/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArOFCAlg.h index f7274f8ece42bce0ff5d8ee2ac9150955b9c2c31..1d7a06e3950b2e59dea9eaac7328a59e62543e9d 100644 --- a/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArOFCAlg.h +++ b/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArOFCAlg.h @@ -26,7 +26,6 @@ #include "LArCabling/LArOnOffIdMapping.h" #include "StoreGate/ReadCondHandleKey.h" -#include "StoreGate/DataHandle.h" #include "AthenaBaseComps/AthAlgorithm.h" diff --git a/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArOFPhaseFill.h b/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArOFPhaseFill.h index f979e1f6ac9249b062f45a07305f85a2712b6d5d..0c2a01e8ad3e4c7b0f31ac3eda0516bb2bd35e78 100644 --- a/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArOFPhaseFill.h +++ b/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArOFPhaseFill.h @@ -22,7 +22,6 @@ Use a Tshaper raw conditions - reusing existing class instead of writing new #include "LArRawConditions/LArOFCBinComplete.h" -#include "StoreGate/DataHandle.h" #include "AthenaKernel/IOVSvcDefs.h" diff --git a/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArPhysWaveBuilder.h b/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArPhysWaveBuilder.h index 279ed15e8afb07a8add849fe2a956ee742c3cc01..f8ba009653523e9fefb6366234e71c6f8d89870d 100644 --- a/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArPhysWaveBuilder.h +++ b/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArPhysWaveBuilder.h @@ -24,9 +24,11 @@ #ifndef LARPHYSWAVEBUILDER_H #define LARPHYSWAVEBUILDER_H +#include "LArRawEvent/LArDigitContainer.h" #include "AthenaBaseComps/AthAlgorithm.h" #include "Identifier/Identifier.h" #include "Identifier/HWIdentifier.h" +#include "StoreGate/ReadHandleKey.h" #include "StoreGate/ReadCondHandleKey.h" #include "LArCabling/LArOnOffIdMapping.h" @@ -96,7 +98,8 @@ private: /// === Algorithm properties. /// Storegate key for the @c LArDigitContainer of interest. - std::string m_gainCont; + SG::ReadHandleKey<LArDigitContainer> m_gainCont + { this, "GainCont", "FREE", "" }; /// Number of bins per sample to record. int m_bins_per_sample; diff --git a/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArPhysWaveTool.h b/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArPhysWaveTool.h index bdb6c0ecb4a127804a510cbbca32309d1e374021..a4cab18585ca73607135cf64d7e6d4377e87ae45 100755 --- a/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArPhysWaveTool.h +++ b/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArPhysWaveTool.h @@ -1,7 +1,7 @@ //Dear emacs, this is -*- c++ -*- /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ @@ -9,7 +9,6 @@ #define LARPHYSWAVETOOL_H #include "AthenaBaseComps/AthAlgTool.h" -#include "StoreGate/DataHandle.h" #include "LArRawConditions/LArWFParams.h" #include "LArRawConditions/LArCaliWave.h" diff --git a/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArRampBuilder.h b/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArRampBuilder.h index 434555f3d7edbe9bb1a65f861a6ca6a947091e30..cb6c94aadcbda405ed71882d0d378a4d321cfbbc 100644 --- a/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArRampBuilder.h +++ b/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArRampBuilder.h @@ -133,9 +133,6 @@ private: bool m_dac0sub, m_saveRawRamp,m_saveRecRamp, m_longNtuple, m_satSlope; IntegerProperty m_minDAC; - // datahandle for LArCaliWaveContainer - const DataHandle<LArCaliWaveContainer> m_caliWaveContainer; - int m_DeadChannelCut; std::string m_folderName; int m_shapeMethodDAC; diff --git a/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArTCMFitterTool.h b/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArTCMFitterTool.h index 73edc28e4b3f3010b10d19806dfa640ab65e82b7..7ca574e910639b06a73681dcf56447c211e1e20a 100644 --- a/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArTCMFitterTool.h +++ b/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArTCMFitterTool.h @@ -1,7 +1,7 @@ //Dear emacs, this is -*- c++ -*- /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ @@ -15,8 +15,6 @@ #include "AthenaBaseComps/AthAlgTool.h" -#include "StoreGate/DataHandle.h" - #include "LArRawConditions/LArCaliWave.h" #include "LArRawConditions/LArPhysWave.h" diff --git a/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArTimeTuning.h b/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArTimeTuning.h index 81fd78c866ad43a74a5c0fa41b32c8ba60c6dc2c..d51c6ea9a22d9f0a1c45074121426a22325148c4 100644 --- a/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArTimeTuning.h +++ b/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArTimeTuning.h @@ -5,8 +5,8 @@ */ -#ifndef LARTIMETUNING -#define LARTIMETUNING +#ifndef LARCALIBUTILS_LARTIMETUNING_H +#define LARCALIBUTILS_LARTIMETUNING_H #include "AthenaBaseComps/AthAlgorithm.h" #include "LArElecCalib/ILArOFCTool.h" @@ -18,9 +18,16 @@ #include "GaudiKernel/Bootstrap.h" #include "LArIdentifier/LArOnlineID.h" +#include "LArRawEvent/LArDigitContainer.h" +#include "TBEvent/TBPhase.h" +#include "LArRawConditions/LArGlobalTimeOffset.h" +#include "LArRawConditions/LArFEBTimeOffset.h" +#include "LArRawConditions/LArCellTimeOffset.h" -#include "CaloIdentifier/CaloIdManager.h" +#include "CaloIdentifier/CaloCell_ID.h" #include "CaloIdentifier/LArEM_ID.h" +#include "StoreGate/ReadHandleKey.h" +#include "StoreGate/WriteHandleKey.h" class LArTimeTuning : public AthAlgorithm { @@ -28,17 +35,26 @@ class LArTimeTuning : public AthAlgorithm public: LArTimeTuning (const std::string& name, ISvcLocator* pSvcLocator); - ~LArTimeTuning(); - StatusCode initialize(); - StatusCode execute(); - StatusCode stop(); - StatusCode finalize(){return StatusCode::SUCCESS;} + virtual ~LArTimeTuning(); + virtual StatusCode initialize() override; + virtual StatusCode execute() override; + virtual StatusCode stop() override; private: SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey{this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"}; const LArOnlineID* m_onlineHelper; - std::string m_DataLocation; - std::string m_globalTimeOffsetOut, m_febTimeOffsetOut, m_cellTimeOffsetOut; + SG::ReadHandleKey<LArDigitContainer> m_DataLocation + { this, "DataLocation", "FREE", "" }; + SG::ReadHandleKey<TBPhase> m_tbPhaseReadKey + { this, "TBPhaseReadKey", "TBPhase", "" }; + SG::WriteHandleKey<LArGlobalTimeOffset> m_globalTimeOffsetOut + { this, "GlobalTimeOffsetOutKey", "GlobalTimeOffset", "" }; + SG::WriteHandleKey<LArFEBTimeOffset> m_febTimeOffsetOut + { this, "FebTimeOffsetOutKey", "FebTimeOffset", "" }; + SG::WriteHandleKey<LArCellTimeOffset> m_cellTimeOffsetOut + { this, "CellTimeOffsetOutKey", "CellTimeOffset", "" }; + SG::WriteHandleKey<TBPhase> m_tbPhaseWriteKey + { this, "TBPhaseWriteKey", "TBPhase", "" }; short m_AdcCut; short m_AdcMax; diff --git a/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArTimeTuningNtuple.h b/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArTimeTuningNtuple.h index 9dd1066393bde356ec1090822b5cba694175652a..d6b40be5b54d6833c407633c8742bc4a07c3dead 100644 --- a/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArTimeTuningNtuple.h +++ b/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArTimeTuningNtuple.h @@ -12,6 +12,7 @@ #include "GaudiKernel/INTupleSvc.h" #include "GaudiKernel/NTuple.h" #include "GaudiKernel/SmartDataPtr.h" +#include "StoreGate/ReadHandleKey.h" #include "LArRawConditions/LArGlobalTimeOffset.h" #include "LArRawConditions/LArFEBTimeOffset.h" #include "LArRawConditions/LArCellTimeOffset.h" @@ -29,20 +30,23 @@ class LArTimeTuningNtuple : public AthAlgorithm { public: LArTimeTuningNtuple(const std::string & name, ISvcLocator * pSvcLocator); - ~LArTimeTuningNtuple(); + virtual ~LArTimeTuningNtuple(); //standard algorithm methods - StatusCode initialize(); - StatusCode execute(); - StatusCode stop(); - StatusCode finalize(){return StatusCode::SUCCESS;} + virtual StatusCode initialize() override; + virtual StatusCode execute() override; + virtual StatusCode stop() override; private: SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey{this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"}; SG::ReadCondHandleKey<LArCalibLineMapping> m_CLKey{this, "CalibLineKey", "LArCalibLineMap", "SG calib line key"}; - std::string m_TBPhaseKey; - std::string m_GlobalTimeKey; - std::string m_FebTimeKey; + SG::ReadHandleKey<TBPhase> m_TBPhaseKey + { this, "TBPhaseKey", "", "" }; + SG::ReadHandleKey<LArGlobalTimeOffset> m_GlobalTimeKey + { this, "GlobalTimeOffsetKey", "", "" }; + SG::ReadHandleKey<LArFEBTimeOffset> m_FebTimeKey + { this, "FebTimeOffsetKey", "", "" }; + std::string m_CellTimeOffsetKey; NTuple::Item<float> m_phaseNt; diff --git a/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArWFParamTool.h b/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArWFParamTool.h index 8442c03ef75d5fd2530cca805eb70d77019030d9..0496182c9f0dd4a112bbe4fa9c162e3af78d882a 100644 --- a/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArWFParamTool.h +++ b/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArWFParamTool.h @@ -12,7 +12,6 @@ #include "GaudiKernel/ToolHandle.h" #include "StoreGate/StoreGateSvc.h" -#include "StoreGate/DataHandle.h" #include "CaloIdentifier/CaloGain.h" #include "LArRawConditions/LArWFParams.h" diff --git a/LArCalorimeter/LArCalibUtils/src/LArAccumulatedCalibDigitContSplitter.cxx b/LArCalorimeter/LArCalibUtils/src/LArAccumulatedCalibDigitContSplitter.cxx index a871b5ac74c52c8e7e4eee02e4ea04daecc4ba19..e5c3770a083e8be899baf8af9f21c409617998ee 100644 --- a/LArCalorimeter/LArCalibUtils/src/LArAccumulatedCalibDigitContSplitter.cxx +++ b/LArCalorimeter/LArCalibUtils/src/LArAccumulatedCalibDigitContSplitter.cxx @@ -7,7 +7,6 @@ #include "GaudiKernel/IIncidentSvc.h" #include "GaudiKernel/MsgStream.h" -#include "CaloIdentifier/CaloIdManager.h" #include "CaloIdentifier/LArEM_ID.h" #include "LArIdentifier/LArOnlineID.h" diff --git a/LArCalorimeter/LArCalibUtils/src/LArCaliWaveAverage.cxx b/LArCalorimeter/LArCalibUtils/src/LArCaliWaveAverage.cxx index 93f50230f4e40f2cd6b96d682d1a6dd61c0feef9..2704b113ce7f56170fa485d672d2dbb73967648a 100644 --- a/LArCalorimeter/LArCalibUtils/src/LArCaliWaveAverage.cxx +++ b/LArCalorimeter/LArCalibUtils/src/LArCaliWaveAverage.cxx @@ -32,18 +32,19 @@ LArCaliWaveAverage::LArCaliWaveAverage(const std::string& name, ISvcLocator* pSv LArCaliWaveAverage::~LArCaliWaveAverage() {} StatusCode LArCaliWaveAverage::initialize() { - const CaloIdManager *caloIdMgr = CaloIdManager::instance(); - m_emId = caloIdMgr->getEM_ID(); + const CaloCell_ID* idHelper = nullptr; + ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_ID") ); + m_emId = idHelper->em_idHelper(); if (!m_emId) { ATH_MSG_ERROR ( "Could not get lar EM ID helper!" ); return StatusCode::FAILURE; } - m_fcalId=caloIdMgr->getFCAL_ID(); + m_fcalId=idHelper->fcal_idHelper(); if (!m_fcalId) { ATH_MSG_ERROR ( "Could not get lar FCAL ID helper" ); return StatusCode::FAILURE; } - m_hecId=caloIdMgr->getHEC_ID(); + m_hecId=idHelper->hec_idHelper(); if (!m_hecId) { ATH_MSG_ERROR ( "Could not get lar HEC ID helper" ); return StatusCode::FAILURE; diff --git a/LArCalorimeter/LArCalibUtils/src/LArCaliWaveBuilderXtalk.cxx b/LArCalorimeter/LArCalibUtils/src/LArCaliWaveBuilderXtalk.cxx index 7dc3e30788e477bea3683c84bc3ae254e808fd85..faccf5b5dd3b0bff2851aad6816fc8327a648b9a 100644 --- a/LArCalorimeter/LArCalibUtils/src/LArCaliWaveBuilderXtalk.cxx +++ b/LArCalorimeter/LArCalibUtils/src/LArCaliWaveBuilderXtalk.cxx @@ -9,7 +9,6 @@ #include "LArRawConditions/LArWaveHelper.h" -#include "CaloIdentifier/CaloIdManager.h" #include "Identifier/IdentifierHash.h" #include "TString.h" diff --git a/LArCalorimeter/LArCalibUtils/src/LArCaliWaveSelector.cxx b/LArCalorimeter/LArCalibUtils/src/LArCaliWaveSelector.cxx index 9fd0101ed799fc1e09aabe21f60176042448d423..762099e8ac87d81846bae296922939dc83d36b24 100644 --- a/LArCalorimeter/LArCalibUtils/src/LArCaliWaveSelector.cxx +++ b/LArCalorimeter/LArCalibUtils/src/LArCaliWaveSelector.cxx @@ -9,7 +9,6 @@ #include "AthenaKernel/errorcheck.h" -#include "CaloIdentifier/CaloIdManager.h" #include "CaloIdentifier/CaloCell_ID.h" #include "LArIdentifier/LArOnlineID.h" #include "CaloIdentifier/CaloGain.h" @@ -47,11 +46,7 @@ StatusCode LArCaliWaveSelector::initialize() if (!m_keyList.size()) { m_keyList.push_back("LArCaliWave"); } parseSelection(); - // retrieve CaloMgr - const CaloIdManager* caloMgr = nullptr; - ATH_CHECK( detStore()->retrieve(caloMgr) ); - - m_cellID = caloMgr->getCaloCell_ID(); + ATH_CHECK( detStore()->retrieve (m_cellID, "CaloCell_ID") ); if (!m_cellID) { ATH_MSG_ERROR ( "Could not access CaloCell_ID helper" ); return StatusCode::FAILURE; diff --git a/LArCalorimeter/LArCalibUtils/src/LArCalibDigitMaker.cxx b/LArCalorimeter/LArCalibUtils/src/LArCalibDigitMaker.cxx index 9baf30332230d565a6a18e65f45a95a2cbc30f9a..18db2b1676671e7c6f663227e199bae6331cf9a1 100644 --- a/LArCalorimeter/LArCalibUtils/src/LArCalibDigitMaker.cxx +++ b/LArCalorimeter/LArCalibUtils/src/LArCalibDigitMaker.cxx @@ -8,7 +8,6 @@ #include "xAODEventInfo/EventInfo.h" -#include "CaloIdentifier/CaloIdManager.h" #include "CLHEP/Units/SystemOfUnits.h" #include "LArRawEvent/LArCalibDigitContainer.h" @@ -91,6 +90,8 @@ StatusCode LArCalibDigitMaker::execute() { if (m_dontRun) return StatusCode::SUCCESS; + const EventContext& ctx = Gaudi::Hive::currentContext(); + SG::ReadCondHandle<LArCalibLineMapping> clHdl{m_calibMapKey}; const LArCalibLineMapping* clcabling{*clHdl}; if(!clcabling) { @@ -102,7 +103,7 @@ StatusCode LArCalibDigitMaker::execute() { ATH_CHECK( evtStore()->retrieve(thisEventInfo) ); // Modif J. Labbe from JF. Marchand - Nov. 2009 // const unsigned eventNb=thisEventInfo->event_ID()->event_number(); - const unsigned eventNb=(thisEventInfo->eventNumber())&0xffffff ; + const unsigned eventNb=(ctx.eventID().event_number())&0xffffff ; ATH_MSG_DEBUG ( "======== executing event "<< eventNb << " ========" ); const LArCalibParams* calibParams = nullptr; diff --git a/LArCalorimeter/LArCalibUtils/src/LArDigitOscillationCorrTool.cxx b/LArCalorimeter/LArCalibUtils/src/LArDigitOscillationCorrTool.cxx index ba4a6a4ad6274ce5bb038278bf9f90dfa9b8e738..277bc048de8df6c1ce662f8a44e2fd058406d5c8 100644 --- a/LArCalorimeter/LArCalibUtils/src/LArDigitOscillationCorrTool.cxx +++ b/LArCalorimeter/LArCalibUtils/src/LArDigitOscillationCorrTool.cxx @@ -12,7 +12,7 @@ #include "LArElecCalib/ILArPedestal.h" #include "LArElecCalib/ILArH6Oscillation.h" #include "LArRawEvent/LArDigitContainer.h" -#include "CaloIdentifier/CaloIdManager.h" +#include "CaloIdentifier/CaloCell_ID.h" #include <sstream> #include <iostream> @@ -47,10 +47,11 @@ StatusCode LArDigitOscillationCorrTool::initialize() ATH_CHECK( detStore()->retrieve(m_lar_on_id,"LArOnlineID") ); - const CaloIdManager *caloIdMgr=CaloIdManager::instance(); - m_emId = caloIdMgr->getEM_ID(); - m_fcalId = caloIdMgr->getFCAL_ID(); - m_hecId = caloIdMgr->getHEC_ID(); + const CaloCell_ID* idHelper = nullptr; + ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_ID") ); + m_emId = idHelper->em_idHelper(); + m_fcalId = idHelper->fcal_idHelper(); + m_hecId = idHelper->hec_idHelper(); ATH_CHECK( m_cablingKey.initialize() ); diff --git a/LArCalorimeter/LArCalibUtils/src/LArDumpShapes.cxx b/LArCalorimeter/LArCalibUtils/src/LArDumpShapes.cxx index b570e38e1c49370c8b120afa1b76d4210ca7b985..4db34ba9fb1d54be29ac9217f16809b779b610f1 100644 --- a/LArCalorimeter/LArCalibUtils/src/LArDumpShapes.cxx +++ b/LArCalorimeter/LArCalibUtils/src/LArDumpShapes.cxx @@ -12,10 +12,9 @@ #include "LArCalibUtils/LArDumpShapes.h" #include "LArElecCalib/ILArShape.h" -#include "CaloIdentifier/CaloIdManager.h" +#include "CaloIdentifier/CaloCell_ID.h" #include "CaloIdentifier/CaloGain.h" #include "StoreGate/StoreGateSvc.h" -#include "StoreGate/DataHandle.h" #include "AthenaKernel/errorcheck.h" #include "TFile.h" #include "TH1.h" @@ -59,7 +58,7 @@ StatusCode LArDumpShapes::execute() return StatusCode::SUCCESS; // Get the shapes from the detector store. - const DataHandle<ILArShape> dd_shape; + const ILArShape* dd_shape; CHECK( detStore()->retrieve (dd_shape) ); SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl{m_cablingKey}; @@ -69,7 +68,9 @@ StatusCode LArDumpShapes::execute() return StatusCode::FAILURE; } // Get the calorimeter identifier helper. - const LArEM_ID* em_id = CaloIdManager::instance()->getEM_ID(); + const CaloCell_ID* idHelper = nullptr; + ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_ID") ); + const LArEM_ID* em_id = idHelper->em_idHelper(); // Open the ROOT file. TFile f (m_filename.c_str(), "RECREATE"); diff --git a/LArCalorimeter/LArCalibUtils/src/LArMasterWaveBuilder.cxx b/LArCalorimeter/LArCalibUtils/src/LArMasterWaveBuilder.cxx index 2f6e0ca435aaccc892b8df133da4546c419a507d..6ba796b5d5cd101678983529e70a73466d4f7654 100644 --- a/LArCalorimeter/LArCalibUtils/src/LArMasterWaveBuilder.cxx +++ b/LArCalorimeter/LArCalibUtils/src/LArMasterWaveBuilder.cxx @@ -6,7 +6,7 @@ #include "GaudiKernel/ToolHandle.h" #include "LArRawConditions/LArCaliWaveContainer.h" -#include "CaloIdentifier/CaloIdManager.h" +#include "CaloIdentifier/CaloCell_ID.h" #include "CaloIdentifier/CaloGain.h" #include <stdio.h> @@ -150,8 +150,9 @@ StatusCode LArMasterWaveBuilder::stop() } ATH_CHECK( detStore()->retrieve(onlineHelper, "LArOnlineID") ); - const CaloIdManager* caloIdMgr=CaloIdManager::instance(); - emId=caloIdMgr->getEM_ID(); + const CaloCell_ID* idHelper = nullptr; + ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_ID") ); + emId = idHelper->em_idHelper(); msg() << MSG::INFO << "Check on ADC saturation: " ; if ( m_ADCsatur > 0 ) { diff --git a/LArCalorimeter/LArCalibUtils/src/LArPedestalInPhysicsMaker.cxx b/LArCalorimeter/LArCalibUtils/src/LArPedestalInPhysicsMaker.cxx index d1ae6ffefe252ff4cb2f1d29ca249357b6fa88c0..4a492c9aefcca905c90071d514260bff6a95d909 100755 --- a/LArCalorimeter/LArCalibUtils/src/LArPedestalInPhysicsMaker.cxx +++ b/LArCalorimeter/LArCalibUtils/src/LArPedestalInPhysicsMaker.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /******************************************************************** @@ -25,7 +25,6 @@ //#include "GaudiKernel/ListItem.h" #include "GaudiKernel/IIncidentSvc.h" -#include "StoreGate/DataHandle.h" #include "LArIdentifier/LArOnlineID.h" #include "xAODEventInfo/EventInfo.h" @@ -101,6 +100,7 @@ StatusCode LArPedestalInPhysicsMaker::initialize() StatusCode LArPedestalInPhysicsMaker::execute() //--------------------------------------------------------------------------- { + const EventContext& ctx = Gaudi::Hive::currentContext(); int write=0; if (m_keylist.size()==0) { ATH_MSG_ERROR ( "Key list is empty! No containers to process!" ); @@ -108,15 +108,8 @@ StatusCode LArPedestalInPhysicsMaker::execute() } // Retrieve EventInfo - const DataHandle<xAOD::EventInfo> thisEventInfo; - StatusCode sc=evtStore()->retrieve(thisEventInfo); - int eventnumber=0; - if (sc!=StatusCode::SUCCESS) - ATH_MSG_WARNING ( "No EventInfo object found!" ); - else { - if(m_run==0) m_run=thisEventInfo->runNumber(); - eventnumber=thisEventInfo->eventNumber(); - } + if(m_run==0) m_run = ctx.eventID().run_number(); + int eventnumber = ctx.eventID().event_number(); // // Retrieve the TBScintillators // const TBScintillatorCont * theTBScint; @@ -166,7 +159,7 @@ StatusCode LArPedestalInPhysicsMaker::execute() //Retrieve the TBTriggerPatternUnit const TBTriggerPatternUnit* theTBTriggerPatternUnit; - sc = evtStore()->retrieve(theTBTriggerPatternUnit, "TBTrigPat"); + StatusCode sc = evtStore()->retrieve(theTBTriggerPatternUnit, "TBTrigPat"); unsigned int trigger=1; if (sc.isFailure()) { diff --git a/LArCalorimeter/LArCalibUtils/src/LArPhaseToolMC.cxx b/LArCalorimeter/LArCalibUtils/src/LArPhaseToolMC.cxx index 212fb6b13d271bb86938da42cb05c40f248d7a0b..f798e2e2bf5df1050f21f575f47dbf00417dd89c 100755 --- a/LArCalorimeter/LArCalibUtils/src/LArPhaseToolMC.cxx +++ b/LArCalorimeter/LArCalibUtils/src/LArPhaseToolMC.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // $Id: LArPhaseToolMC.cxx,v 1.1 2006-06-27 18:32:08 ssnyder Exp $ @@ -16,7 +16,6 @@ #include "LArSimEvent/LArHitContainer.h" #include "CaloDetDescr/CaloDetDescrManager.h" #include "CaloIdentifier/CaloCell_ID.h" -#include "StoreGate/DataHandle.h" #include "StoreGate/StoreGateSvc.h" #include "AthenaKernel/ITriggerTime.h" #include "AthenaKernel/errorcheck.h" @@ -132,7 +131,7 @@ StatusCode LArPhaseToolMC::fill_phases () // Scan over all hit containers. for (unsigned int icont=0; icont < m_container_names.size(); ++icont) { - const DataHandle<LArHitContainer> hit_container; + const LArHitContainer* hit_container = nullptr; if (evtStore()->retrieve (hit_container, m_container_names[icont]) . isSuccess()) { diff --git a/LArCalorimeter/LArCalibUtils/src/LArPhysWaveBuilder.cxx b/LArCalorimeter/LArCalibUtils/src/LArPhysWaveBuilder.cxx index a6ee439f3cf702a77f98504fae94e772957b3910..03918b5072d98f2adc06a67bc3ad767893f2c722 100644 --- a/LArCalorimeter/LArCalibUtils/src/LArPhysWaveBuilder.cxx +++ b/LArCalorimeter/LArCalibUtils/src/LArPhysWaveBuilder.cxx @@ -15,13 +15,14 @@ #include "StoreGate/StoreGateSvc.h" #include "LArRawEvent/LArDigit.h" #include "LArRawEvent/LArDigitContainer.h" -#include "CaloIdentifier/CaloIdManager.h" +#include "CaloIdentifier/CaloCell_ID.h" #include "CaloIdentifier/CaloGain.h" #include "LArRawConditions/LArPhysWaveContainer.h" #include "LArRecUtils/LArParabolaPeakRecoTool.h" #include "LArElecCalib/ILArADC2MeVTool.h" #include "LArElecCalib/ILArPhaseTool.h" #include "LArElecCalib/ILArPedestal.h" +#include "StoreGate/ReadHandle.h" #include "Identifier/HWIdentifier.h" #include "AthenaKernel/errorcheck.h" #include "CLHEP/Units/SystemOfUnits.h" @@ -195,9 +196,6 @@ LArPhysWaveBuilder::LArPhysWaveBuilder (const std::string& name, /// Algorithm properties. - // Storegate key for the @c LArDigitContainer of interest. - declareProperty("GainCont", m_gainCont = "FREE"); - // Number of bins per sample to record. declareProperty("BinsPerSample", m_bins_per_sample = 24); @@ -289,6 +287,8 @@ StatusCode LArPhysWaveBuilder::initialize() m_hlaymax[i] = new TH1F (buf, buf, 500, 0, 500); } + ATH_CHECK( m_gainCont.initialize() ); + return StatusCode::SUCCESS; } @@ -298,6 +298,7 @@ StatusCode LArPhysWaveBuilder::initialize() */ StatusCode LArPhysWaveBuilder::execute() { + const EventContext& ctx = Gaudi::Hive::currentContext(); ATH_MSG_DEBUG ( "LArPhysWaveBuilder in execute()" ); // Retrieve cabling @@ -309,11 +310,12 @@ StatusCode LArPhysWaveBuilder::execute() } // Get the identifier helper. - const LArEM_ID* emId = CaloIdManager::instance()->getEM_ID(); + const CaloCell_ID* idHelper = nullptr; + ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_ID") ); + const LArEM_ID* emId = idHelper->em_idHelper(); // Our input data. - const LArDigitContainer* digcontainer = - evtStore()->retrieve<const LArDigitContainer> (m_gainCont); + SG::ReadHandle<LArDigitContainer> digcontainer (m_gainCont, ctx); // Get the pedestal information. const ILArPedestal* larPedestal = @@ -323,18 +325,15 @@ StatusCode LArPhysWaveBuilder::execute() const LArOnlineID* online_helper = detStore()->retrieve<const LArOnlineID> ("LArOnlineID"); - if (!digcontainer || !online_helper) { + if (!online_helper) { REPORT_ERROR (StatusCode::FAILURE) << "Cannot find storegate inputs"; return StatusCode::SUCCESS; } // Loop on LArDigits - LArDigitContainer::const_iterator iterd = digcontainer->begin(); - LArDigitContainer::const_iterator iendd = digcontainer->end(); - for(; iterd != iendd; iterd++) { + for (const LArDigit* p_lardigit : *digcontainer) { // Get data from LArDigit - const LArDigit* p_lardigit = *iterd; HWIdentifier chid = p_lardigit->hardwareID(); // Convert the gain from an enum to an index in our tables. @@ -657,7 +656,9 @@ StatusCode LArPhysWaveBuilder::write_root (LArPhysWaveContainer* larPhysWaveContainer) { // Get ID translators. - const LArEM_ID* emId = CaloIdManager::instance()->getEM_ID(); + const CaloCell_ID* idHelper = nullptr; + ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_ID") ); + const LArEM_ID* emId = idHelper->em_idHelper(); // Retrieve cabling SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl{m_cablingKey}; diff --git a/LArCalorimeter/LArCalibUtils/src/LArPhysWavePredictor.cxx b/LArCalorimeter/LArCalibUtils/src/LArPhysWavePredictor.cxx index f935343acd23db5465a62afaa42762339c4dca12..574ca4e3a1cd79d3eabf67e78c17fc1b282ed1cb 100644 --- a/LArCalorimeter/LArCalibUtils/src/LArPhysWavePredictor.cxx +++ b/LArCalorimeter/LArCalibUtils/src/LArPhysWavePredictor.cxx @@ -6,7 +6,7 @@ #include "GaudiKernel/ToolHandle.h" #include "LArRecConditions/ILArBadChannelMasker.h" -#include "CaloIdentifier/CaloIdManager.h" +#include "CaloIdentifier/CaloCell_ID.h" #include "LArRawConditions/LArCaliWave.h" #include "LArRawConditions/LArCaliWaveContainer.h" @@ -187,8 +187,9 @@ StatusCode LArPhysWavePredictor::stop() return sc; }} - const CaloIdManager *caloIdMgr = CaloIdManager::instance() ; - const LArEM_ID* emId = caloIdMgr->getEM_ID(); + const CaloCell_ID* idHelper = nullptr; + ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_ID") ); + const LArEM_ID* emId = idHelper->em_idHelper(); if (!emId) { ATH_MSG_ERROR( "Could not access lar EM ID helper" ); return StatusCode::FAILURE; diff --git a/LArCalorimeter/LArCalibUtils/src/LArRampBuilder.cxx b/LArCalorimeter/LArCalibUtils/src/LArRampBuilder.cxx index 8bdaac7ec791a440f69591587b681a1c814ef8fe..2641cd8e0fd43ee26b68d97da6732dc399b2dfb0 100644 --- a/LArCalorimeter/LArCalibUtils/src/LArRampBuilder.cxx +++ b/LArCalorimeter/LArCalibUtils/src/LArRampBuilder.cxx @@ -3,7 +3,6 @@ */ #include "LArCalibUtils/LArRampBuilder.h" -#include "CaloIdentifier/CaloIdManager.h" #include "LArRawEvent/LArFebErrorSummary.h" #include "LArCalibTriggerAccumulator.h" #include "LArRawConditions/LArRampComplete.h" @@ -140,8 +139,10 @@ void LArRampBuilder::chooseRecoMode() { if(m_correctBias){ // if using parabola, get offlineID helper to obtain the layer (needed for correction) - const CaloIdManager *caloIdMgr=CaloIdManager::instance() ; - m_emId=caloIdMgr->getEM_ID(); + const CaloCell_ID* idHelper = nullptr; + if ( detStore()->retrieve (idHelper, "CaloCell_ID").isSuccess() ) { + m_emId = idHelper->em_idHelper(); + } if (!m_emId) { ATH_MSG_ERROR( "Could not access lar EM ID helper" ); return ; @@ -300,7 +301,7 @@ StatusCode LArRampBuilder::execute() ATH_MSG_WARNING("Cannot remove LArCaliWaveContainer from StoreGate ! "); return StatusCode::FAILURE; } - ATH_MSG_DEBUG("Succefully removed LArCaliWaveContainer from StoreGate "); + ATH_MSG_DEBUG("Successfully removed LArCaliWaveContainer from StoreGate "); } // m_ipassShape diff --git a/LArCalorimeter/LArCalibUtils/src/LArTCMPhysWavePredictor.cxx b/LArCalorimeter/LArCalibUtils/src/LArTCMPhysWavePredictor.cxx index b5eeb2884332473c3b9ce1c14a76d8c3b0526ab0..07f59464eee4f78aeee832892d4d481715e6e76f 100644 --- a/LArCalorimeter/LArCalibUtils/src/LArTCMPhysWavePredictor.cxx +++ b/LArCalorimeter/LArCalibUtils/src/LArTCMPhysWavePredictor.cxx @@ -10,8 +10,6 @@ #include "LArRawConditions/LArCaliWaveContainer.h" #include "LArRawConditions/LArPhysWaveContainer.h" -#include "CaloIdentifier/CaloIdManager.h" - #include <iostream> #include <fstream> #include "TFile.h" @@ -79,10 +77,10 @@ StatusCode LArTCMPhysWavePredictor::stop() larTCMFitterTool->setminuitoutputlevel(m_minuitoutputlevel); - const LArEM_ID* emId; - const CaloIdManager *caloIdMgr=CaloIdManager::instance() ; - emId = caloIdMgr->getEM_ID(); + const CaloCell_ID* idHelper = nullptr; + ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_ID") ); + const LArEM_ID* emId = idHelper->em_idHelper(); if (!emId) { ATH_MSG_ERROR ( "Could not access lar EM ID helper" ); return StatusCode::FAILURE; diff --git a/LArCalorimeter/LArCalibUtils/src/LArTimePhysPrediction.cxx b/LArCalorimeter/LArCalibUtils/src/LArTimePhysPrediction.cxx index e7fe62465b44d60a9407fd6f215d504da611a129..2365408c544085b1719035c588e8884c4f5e7b34 100644 --- a/LArCalorimeter/LArCalibUtils/src/LArTimePhysPrediction.cxx +++ b/LArCalorimeter/LArCalibUtils/src/LArTimePhysPrediction.cxx @@ -9,7 +9,6 @@ #include "LArRawConditions/LArWaveHelper.h" #include "CaloDetDescr/CaloDepthTool.h" #include "GaudiKernel/ToolHandle.h" -#include "CaloIdentifier/CaloIdManager.h" #include "CaloIdentifier/CaloCell_ID.h" #include "CaloDetDescr/CaloDetDescrManager.h" #include "CaloDetDescr/CaloDetDescriptor.h" @@ -176,7 +175,8 @@ StatusCode LArTimePhysPrediction::stop() //Calo DDM gives "detector description" //including real positions of cells - const CaloDetDescrManager* caloDDM = CaloDetDescrManager::instance() ; + const CaloDetDescrManager* caloDDM = nullptr; + ATH_CHECK( detStore()->retrieve (caloDDM, "CaloMgr") ); if ( ! caloDDM->isInitialized() ) { ATH_MSG_ERROR @@ -184,13 +184,12 @@ StatusCode LArTimePhysPrediction::stop() return StatusCode::FAILURE; } - //const CaloCell_ID* m_caloCID = m_caloDDM->getCaloCell_ID(); - const CaloIdManager *caloIdMgr=CaloIdManager::instance() ; + const CaloCell_ID* caloCID = caloDDM->getCaloCell_ID(); //Get identifiers - const LArEM_ID* emId = caloIdMgr->getEM_ID(); - const LArHEC_ID* hecId = caloIdMgr->getHEC_ID(); - const LArFCAL_ID* fcalId = caloIdMgr->getFCAL_ID(); + const LArEM_ID* emId = caloCID->em_idHelper(); + const LArHEC_ID* hecId = caloCID->hec_idHelper(); + const LArFCAL_ID* fcalId = caloCID->fcal_idHelper(); //------------------------------------------------------------------------------------------------------------------------------ //--------------Start to loop on the LArCaliWaveContainer------------------------------------------------------------------------ diff --git a/LArCalorimeter/LArCalibUtils/src/LArTimeTuning.cxx b/LArCalorimeter/LArCalibUtils/src/LArTimeTuning.cxx index 1aa9583f09b95cf7dd67ff3e7ccd09b1fa5d763b..42c69bb8ca65fc4af2d48f9bbabca70c3bf4352f 100644 --- a/LArCalorimeter/LArCalibUtils/src/LArTimeTuning.cxx +++ b/LArCalorimeter/LArCalibUtils/src/LArTimeTuning.cxx @@ -6,6 +6,8 @@ #include "GaudiKernel/ToolHandle.h" #include "StoreGate/StoreGateSvc.h" +#include "StoreGate/ReadHandle.h" +#include "StoreGate/WriteHandle.h" #include "LArRawEvent/LArDigitContainer.h" #include "TBEvent/TBPhase.h" @@ -30,7 +32,6 @@ using CLHEP::megahertz; LArTimeTuning::LArTimeTuning (const std::string& name, ISvcLocator* pSvcLocator): AthAlgorithm(name, pSvcLocator), m_onlineHelper(0), - m_DataLocation("FREE"), m_AdcCut(1300), m_AdcMax(4095), m_Nevents(0), @@ -45,8 +46,6 @@ LArTimeTuning::LArTimeTuning (const std::string& name, ISvcLocator* pSvcLocator) m_gain(), m_scope(GLOBAL) { - declareProperty("DataLocation", m_DataLocation ); - declareProperty("ADCCut", m_AdcCut ); declareProperty("ADCMax", m_AdcMax ); @@ -68,10 +67,6 @@ LArTimeTuning::LArTimeTuning (const std::string& name, ISvcLocator* pSvcLocator) declareProperty("CorrectionSign", m_corrSign = +1); declareProperty("GainSelection", m_gainSel = "NO"); declareProperty("LayerSelection", m_layerSel = -1 ); - //StoreGateKeys - declareProperty("GlobalTimeOffsetOutKey",m_globalTimeOffsetOut = "GlobalTimeOffset"); - declareProperty("FebTimeOffsetOutKey", m_febTimeOffsetOut = "FebTimeOffset"); - declareProperty("CellTimeOffsetOutKey", m_cellTimeOffsetOut = "CellTimeOffset"); } LArTimeTuning::~LArTimeTuning() @@ -82,8 +77,9 @@ StatusCode LArTimeTuning::initialize(){ ATH_CHECK( m_cablingKey.initialize() ); - const CaloIdManager *caloIdMgr=CaloIdManager::instance() ; - m_emId = caloIdMgr->getEM_ID(); + const CaloCell_ID* idHelper = nullptr; + ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_ID") ); + m_emId = idHelper->em_idHelper(); if (!m_emId) { ATH_MSG_ERROR ( "Could not access lar EM ID helper" ); return StatusCode::FAILURE; @@ -134,7 +130,14 @@ StatusCode LArTimeTuning::initialize(){ ATH_MSG_INFO ( " *** Sampling Periode Limits: ( " << m_SamplingPeriodeLowerLimit << ", " << m_SamplingPeriodeUpperLimit << " ) ns" ); - m_nIterAverage = 0 ; + m_nIterAverage = 0 ; + + ATH_CHECK( m_DataLocation.initialize() ); + ATH_CHECK( m_tbPhaseReadKey.initialize (m_scope != PHASE) ); + ATH_CHECK( m_globalTimeOffsetOut.initialize (m_scope == GLOBAL) ); + ATH_CHECK( m_febTimeOffsetOut.initialize (m_scope == FEB) ); + ATH_CHECK( m_cellTimeOffsetOut.initialize (m_scope == FEB) ); + ATH_CHECK( m_tbPhaseWriteKey.initialize (m_scope == CELL) ); return StatusCode::SUCCESS; } @@ -142,14 +145,12 @@ StatusCode LArTimeTuning::initialize(){ StatusCode LArTimeTuning::execute() { + const EventContext& ctx = Gaudi::Hive::currentContext(); m_Nevents++; - const LArDigitContainer* larDigitContainer=NULL; const ILArPedestal* larPedestal; const ILArOFC* larOFC; - TBPhase *theTBPhase; - LArGlobalTimeOffset *larGlobalTimeOffset; LArGlobalTimeOffset *larGlobalTimeOffset_corr; @@ -170,7 +171,7 @@ StatusCode LArTimeTuning::execute() { std::map<HWIdentifier,double> cellTimeOffset; // DigitContainer - ATH_CHECK( evtStore()->retrieve(larDigitContainer,m_DataLocation) ); + SG::ReadHandle<LArDigitContainer> larDigitContainer (m_DataLocation, ctx); ATH_CHECK( detStore()->retrieve(larPedestal) ); ATH_CHECK( detStore()->retrieve(larOFC) ); @@ -182,8 +183,9 @@ StatusCode LArTimeTuning::execute() { } if (m_scope==GLOBAL) { - larGlobalTimeOffset_corr = new LArGlobalTimeOffset(); - ATH_CHECK( evtStore()->record(larGlobalTimeOffset_corr,m_globalTimeOffsetOut) ); + auto larGlobalTimeOffset_p = std::make_unique<LArGlobalTimeOffset>(); + larGlobalTimeOffset_corr = larGlobalTimeOffset_p.get(); + ATH_CHECK( SG::makeHandle (m_globalTimeOffsetOut, ctx).record (std::move (larGlobalTimeOffset_p)) ); } else larGlobalTimeOffset_corr = &dummyGlobalTimeOffset; @@ -196,16 +198,17 @@ StatusCode LArTimeTuning::execute() { if (m_scope==FEB) { //Get Feb to Feb Time Offset - larFebTimeOffset_corr = new LArFEBTimeOffset(); - ATH_CHECK( evtStore()->record(larFebTimeOffset_corr,m_febTimeOffsetOut) ); + auto larFebTimeOffset_p = std::make_unique<LArFEBTimeOffset>(); + larFebTimeOffset_corr = larFebTimeOffset_p.get(); + ATH_CHECK( SG::makeHandle (m_febTimeOffsetOut, ctx).record (std::move (larFebTimeOffset_p)) ); } else larFebTimeOffset_corr = &dummyFebTimeOffset; if (m_scope!=PHASE) { - //Get TB TDC Phase - sc = evtStore()->retrieve(theTBPhase,"TBPhase"); - if (sc.isFailure()) { + //Get TB TDC Phase + SG::ReadHandle<TBPhase> theTBPhase (m_tbPhaseReadKey, ctx); + if (!theTBPhase.isValid()) { // this should be only a 'warning', since TBPhase can miss due to Guard Cut... ATH_MSG_WARNING ( "cannot allocate TBPhase with key <TBPhase>. Exiting."); if (m_scope==GLOBAL) { @@ -250,18 +253,15 @@ StatusCode LArTimeTuning::execute() { err_timePeak = 0; err_Peak = 0; - LArDigitContainer::const_iterator cell_it=larDigitContainer->begin(); - LArDigitContainer::const_iterator cell_it_e=larDigitContainer->end(); - //Loop over all cells - for (;cell_it!=cell_it_e;cell_it++) { + for (const LArDigit* digit : *larDigitContainer) { int OFCTimeBin=0; - const std::vector<short>& samples=(*cell_it)->samples(); + const std::vector<short>& samples=digit->samples(); const unsigned nSamples=samples.size(); - const HWIdentifier chid=(*cell_it)->channelID(); - const CaloGain::CaloGain gain=(*cell_it)->gain(); + const HWIdentifier chid=digit->channelID(); + const CaloGain::CaloGain gain=digit->gain(); const HWIdentifier febid=m_onlineHelper->feb_Id(chid); if ( m_layerSel >=0 ) { @@ -426,7 +426,7 @@ StatusCode LArTimeTuning::execute() { ATH_MSG_DEBUG ( "Channel: " << MSG::hex << chid.get_compact() << MSG::dec << " - TimeOffsetSum = " << timeOffsetSum << " - TimeSampleShift = " << timeSampleShift << " timeOffsetSteps=" <<timeOffsetSteps - << " Corr: " << tauPeak/ADCPeak << " Peak=" << (int)ADCPeak << " G=" << (*cell_it)->gain() ); + << " Corr: " << tauPeak/ADCPeak << " Peak=" << (int)ADCPeak << " G=" << digit->gain() ); //remaining error (for loop conditions) err_Peak += ADCPeak; @@ -524,10 +524,8 @@ StatusCode LArTimeTuning::execute() { if(m_scope==PHASE) { const short phaseIndex=(int)round(phaseTime/m_NOFCTimeBins); - TBPhase* thePhase=new TBPhase(phaseTime,phaseIndex); - sc=evtStore()->record(thePhase,"TBPhase"); - if (sc.isFailure()) - ATH_MSG_ERROR ( "Could not record TBPhase with key 'TBPhase' to StoreGate" ); + auto thePhase = std::make_unique<TBPhase>(phaseTime,phaseIndex); + ATH_CHECK( SG::makeHandle(m_tbPhaseWriteKey, ctx).record (std::move (thePhase)) ); } else if (m_scope==CELL) { //Fill cell time offset map member variable WeightedAverageMAP::const_iterator it=CellTimeMap.begin(); @@ -549,7 +547,7 @@ StatusCode LArTimeTuning::execute() { StatusCode LArTimeTuning::stop() { if (m_scope==CELL) { - LArCellTimeOffset *cellTimeOffset=new LArCellTimeOffset(); + auto cellTimeOffset = std::make_unique<LArCellTimeOffset>(); WeightedAverageMAP::const_iterator it=m_CellTimeAverage.begin(); WeightedAverageMAP::const_iterator it_e=m_CellTimeAverage.end(); for (;it!=it_e;it++) { @@ -557,9 +555,7 @@ StatusCode LArTimeTuning::stop() ATH_MSG_DEBUG ( "Ch = " << std::hex << it->first.get_compact() << std::dec << " Time = " << cellTimeOffset->TimeOffset(it->first) ); } - StatusCode sc=evtStore()->record(cellTimeOffset,m_cellTimeOffsetOut); - if (sc.isFailure()) - ATH_MSG_ERROR ( "Could not record LArCellTimeOffset with key '" << m_cellTimeOffsetOut << "' to StoreGate" ); + ATH_CHECK( SG::makeHandle(m_cellTimeOffsetOut).record (std::move (cellTimeOffset)) ); } diff --git a/LArCalorimeter/LArCalibUtils/src/LArTimeTuningNtuple.cxx b/LArCalorimeter/LArCalibUtils/src/LArTimeTuningNtuple.cxx index b424a5a7cae09219ad65fb59d783bbf22194906c..e4712138d9318a228581ee7190069068f36c00bd 100644 --- a/LArCalorimeter/LArCalibUtils/src/LArTimeTuningNtuple.cxx +++ b/LArCalorimeter/LArCalibUtils/src/LArTimeTuningNtuple.cxx @@ -4,16 +4,14 @@ #include "LArCalibUtils/LArTimeTuningNtuple.h" #include "CaloIdentifier/LArEM_ID.h" -#include "CaloIdentifier/CaloIdManager.h" +#include "CaloIdentifier/CaloCell_ID.h" +#include "StoreGate/ReadHandle.h" LArTimeTuningNtuple::LArTimeTuningNtuple (const std::string& name, ISvcLocator* pSvcLocator): AthAlgorithm(name, pSvcLocator), m_ntuplePtr(0), m_larOnlineHelper(0) { - declareProperty("TBPhaseKey",m_TBPhaseKey=""); - declareProperty("GlobalTimeOffsetKey",m_GlobalTimeKey=""); - declareProperty("FebTimeOffsetKey",m_FebTimeKey=""); declareProperty("CellTimeOffsetKey",m_CellTimeOffsetKey); } @@ -34,13 +32,13 @@ StatusCode LArTimeTuningNtuple::initialize(){ ATH_MSG_ERROR ( "Booking of NTuple failed" ); return StatusCode::FAILURE; } - if (m_GlobalTimeKey.length()>0) { + if (!m_GlobalTimeKey.empty()) { ATH_CHECK( nt->addItem("GlobalTimeOffset",m_globalTimeNt,-100.0,100.0) ); } - if (m_TBPhaseKey.length()) { + if (!m_TBPhaseKey.empty()) { ATH_CHECK( nt->addItem("PhaseTimeOffset",m_phaseNt,-100.0,100.0) ); } - if (m_FebTimeKey.length()) { + if (!m_FebTimeKey.empty()) { ATH_CHECK( nt->addItem("FebIndex",m_nFebNt,0,1500) ); ATH_CHECK( nt->addItem("FebTimeOffset",m_nFebNt,m_febTimeNt) ); ATH_CHECK( nt->addItem("FebSlot",m_nFebNt,m_febSlotNt) ); @@ -48,7 +46,7 @@ StatusCode LArTimeTuningNtuple::initialize(){ ATH_CHECK( nt->addItem("FebID",m_nFebNt,m_febIDNt) ); } - if (m_CellTimeOffsetKey.length()) { + if (!m_CellTimeOffsetKey.empty()) { ATH_CHECK( nt->addItem("CellIndex",m_nCellNt,0,1500) ); ATH_CHECK( nt->addItem("CellTimeOffset",m_nCellNt,m_cellTimeNt) ); ATH_CHECK( nt->addItem("CellSlot",m_nCellNt,m_cellSlotNt) ); @@ -62,7 +60,12 @@ StatusCode LArTimeTuningNtuple::initialize(){ ATH_CHECK( nt->addItem("CellChannel",m_nCellNt,m_cellChannelNt) ); ATH_CHECK( nt->addItem("CellCalibLine",m_nCellNt,m_cellCalibLineNt) ); } - + + + ATH_CHECK( m_GlobalTimeKey.initialize (SG::AllowEmpty) ); + ATH_CHECK( m_TBPhaseKey.initialize (SG::AllowEmpty) ); + ATH_CHECK( m_FebTimeKey.initialize (SG::AllowEmpty) ); + m_ntuplePtr=nt; ATH_CHECK( m_cablingKey.initialize() ); @@ -73,41 +76,34 @@ StatusCode LArTimeTuningNtuple::initialize(){ StatusCode LArTimeTuningNtuple::execute() -{ - if (m_GlobalTimeKey.length()>0) { - const LArGlobalTimeOffset* larGlobalTimeOffset; - StatusCode sc=evtStore()->retrieve(larGlobalTimeOffset,m_GlobalTimeKey); - if (sc.isSuccess()) { - m_globalTimeNt=larGlobalTimeOffset->TimeOffset(); - //std::cout << "Global Time Offset= " << m_globalTimeNt << std::endl; - } - else { - ATH_MSG_WARNING ( "Could not retrieve LArGlobalTimeOffset with key '" << m_GlobalTimeKey << "'" ); - m_globalTimeNt=-999; - } +{ + const EventContext& ctx = Gaudi::Hive::currentContext(); + if (!m_GlobalTimeKey.empty()) { + SG::ReadHandle<LArGlobalTimeOffset> larGlobalTimeOffset + (m_GlobalTimeKey, ctx); + m_globalTimeNt = larGlobalTimeOffset->TimeOffset(); + //std::cout << "Global Time Offset= " << m_globalTimeNt << std::endl; + } + else { + m_globalTimeNt = -1; } - if (m_TBPhaseKey.length()>0) { - const TBPhase* tbPhase; - StatusCode sc=evtStore()->retrieve(tbPhase,m_TBPhaseKey); - if (sc.isSuccess()) - m_phaseNt=tbPhase->getPhase(); - else { - ATH_MSG_WARNING ( "Could not retrieve TBPhase with key '" << m_TBPhaseKey << "'" ); - m_phaseNt=-999; - } + if (!m_TBPhaseKey.empty()) { + SG::ReadHandle<TBPhase> tbPhase (m_TBPhaseKey, ctx); + m_phaseNt = tbPhase->getPhase(); + } + else { + m_phaseNt = -999; } - if (m_FebTimeKey.length()>0) { - LArFEBTimeOffset* larFebTimeOffset; - StatusCode sc=evtStore()->retrieve(larFebTimeOffset,m_FebTimeKey); - if (sc.isSuccess() && larFebTimeOffset->size()>0) { - larFebTimeOffset->setDefaultReturnValue(-999); + if (!m_FebTimeKey.empty()) { + SG::ReadHandle<LArFEBTimeOffset> larFebTimeOffset (m_FebTimeKey, ctx); + if (larFebTimeOffset->size()>0) { std::vector<HWIdentifier>::const_iterator it=m_larOnlineHelper->feb_begin(); std::vector<HWIdentifier>::const_iterator it_e=m_larOnlineHelper->feb_end(); m_nFebNt=0; for (;it!=it_e;it++) { - m_febTimeNt[m_nFebNt] = larFebTimeOffset->TimeOffset(*it); + m_febTimeNt[m_nFebNt] = larFebTimeOffset->TimeOffset(*it, -999); m_febSlotNt[m_nFebNt] = m_larOnlineHelper->slot(*it); m_febFTNt[m_nFebNt] = m_larOnlineHelper->feedthrough(*it); m_febIDNt[m_nFebNt] = (*it).get_identifier32().get_compact(); @@ -125,9 +121,9 @@ StatusCode LArTimeTuningNtuple::execute() StatusCode LArTimeTuningNtuple::stop(){ - const LArEM_ID* emId; - const CaloIdManager *caloIdMgr=CaloIdManager::instance() ; - emId=caloIdMgr->getEM_ID(); + const CaloCell_ID* idHelper = nullptr; + ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_ID") ); + const LArEM_ID* emId = idHelper->em_idHelper(); if (!emId) { ATH_MSG_ERROR ( "Could not get lar EM ID helper" ); return StatusCode::FAILURE; diff --git a/LArCalorimeter/LArCnv/LArByteStream/LArByteStream/Hid2RESrcID.h b/LArCalorimeter/LArCnv/LArByteStream/LArByteStream/Hid2RESrcID.h index de7eb0bf108ec43dd54a76bbd7304ab8a47b93a7..61387bc893a4ea83de81aec2cfe010dd1a6549ae 100644 --- a/LArCalorimeter/LArCnv/LArByteStream/LArByteStream/Hid2RESrcID.h +++ b/LArCalorimeter/LArCnv/LArByteStream/LArByteStream/Hid2RESrcID.h @@ -45,27 +45,27 @@ public: StatusCode initialize(); - bool isInitialized(){ return m_initialized;} + bool isInitialized() const { return m_initialized;} /** make a ROD SrcID for a HWIdentifier */ - uint32_t getRodID (const HWIdentifier& hid); + uint32_t getRodID (const HWIdentifier& hid) const ; /** make a ROD SrcID for a COLLECTION_ID */ - uint32_t getRodIDFromROM (const COLLECTION_ID& hid); + uint32_t getRodIDFromROM (const COLLECTION_ID& hid) const; /** Make a ROB Source ID from a ROD source ID */ - uint32_t getRobID ( uint32_t rod_id); + uint32_t getRobID ( uint32_t rod_id) const; /** Make a ROS Source ID from a ROB source ID */ - uint32_t getRosID ( uint32_t rob_id); + uint32_t getRosID ( uint32_t rob_id) const; /** Make a SubDetector ID from ROS source ID */ - uint32_t getDetID ( uint32_t ros_id); + uint32_t getDetID ( uint32_t ros_id) const; private: bool m_initialized; diff --git a/LArCalorimeter/LArCnv/LArByteStream/src/Hid2RESrcID.cxx b/LArCalorimeter/LArCnv/LArByteStream/src/Hid2RESrcID.cxx index c683c145751265e3acdf251040053b36efd2dc47..ecbcc88b7dacab9d82406da0c598e9be50e0f03a 100644 --- a/LArCalorimeter/LArCnv/LArByteStream/src/Hid2RESrcID.cxx +++ b/LArCalorimeter/LArCnv/LArByteStream/src/Hid2RESrcID.cxx @@ -99,7 +99,7 @@ StatusCode Hid2RESrcID::initialize() SourceIdentifier sid = SourceIdentifier(detid,m); uint32_t rod_id = sid.code(); - assert( m_coll2ROD.count(mId) == 0 ) ; + assert( m_coll2ROD.count(mId) == 0 ); m_coll2ROD[ mId ]=rod_id; } @@ -111,7 +111,7 @@ StatusCode Hid2RESrcID::initialize() } -uint32_t Hid2RESrcID::getRodIDFromROM(const COLLECTION_ID& id) +uint32_t Hid2RESrcID::getRodIDFromROM(const COLLECTION_ID& id) const { // this method returns a RESrcID for the ROD, for a given COLLECTION_ID COLL_MAP::const_iterator it = m_coll2ROD.find( id ); @@ -124,7 +124,7 @@ uint32_t Hid2RESrcID::getRodIDFromROM(const COLLECTION_ID& id) } -uint32_t Hid2RESrcID::getRodID(const HWIdentifier& hid) +uint32_t Hid2RESrcID::getRodID(const HWIdentifier& hid) const { // this method returns a RESrcID for the ROD, for a given LArOnlineID // channel number is ignored. HWIdentifier febId = m_onlineHelper->feb_Id(hid) ; @@ -136,36 +136,36 @@ uint32_t Hid2RESrcID::getRodID(const HWIdentifier& hid) /** mapping SrcID from ROD to ROB */ -uint32_t Hid2RESrcID::getRobID( uint32_t rod_id) +uint32_t Hid2RESrcID::getRobID( uint32_t rod_id) const { // Change Module Type to ROB - SourceIdentifier id = SourceIdentifier(rod_id) ; - SourceIdentifier id2 = SourceIdentifier(id.subdetector_id(), id.module_id()) ; - return id2.code() ; + SourceIdentifier id = SourceIdentifier(rod_id); + SourceIdentifier id2 = SourceIdentifier(id.subdetector_id(), id.module_id()); + return id2.code(); } /** mapping SrcID from ROB to ROS */ -uint32_t Hid2RESrcID::getRosID( uint32_t rob_id) +uint32_t Hid2RESrcID::getRosID( uint32_t rob_id) const { // Change Module Type to ROS, moduleid = 0 SourceIdentifier id = SourceIdentifier(rob_id); - SourceIdentifier id2 = SourceIdentifier(id.subdetector_id(), 0) ; - return id2.code() ; + SourceIdentifier id2 = SourceIdentifier(id.subdetector_id(), 0); + return id2.code(); } /** mapping SrcID from ROS to Det */ -uint32_t Hid2RESrcID::getDetID ( uint32_t ros_id) +uint32_t Hid2RESrcID::getDetID ( uint32_t ros_id) const { // ROS to DET SourceIdentifier id = SourceIdentifier(ros_id); - SourceIdentifier id2 = SourceIdentifier(id.subdetector_id(), 0) ; - return id2.code() ; + SourceIdentifier id2 = SourceIdentifier(id.subdetector_id(), 0); + return id2.code(); } diff --git a/LArCalorimeter/LArCnv/LArSimEventTPCnv/LArSimEventTPCnv/LArHitContainerCnv_p2.h b/LArCalorimeter/LArCnv/LArSimEventTPCnv/LArSimEventTPCnv/LArHitContainerCnv_p2.h index 114c8c53763b57b595f0feb0e3d3a8f018da9a04..5804926db6d2f98ba24f139b4788137ad3a3aff4 100644 --- a/LArCalorimeter/LArCnv/LArSimEventTPCnv/LArSimEventTPCnv/LArHitContainerCnv_p2.h +++ b/LArCalorimeter/LArCnv/LArSimEventTPCnv/LArSimEventTPCnv/LArHitContainerCnv_p2.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef LARTPCNV_LARHITCONTAINERCNV_P2_H @@ -9,15 +9,19 @@ #include "LArSimEvent/LArHitContainer.h" #include "AthenaPoolCnvSvc/T_AthenaPoolTPConverter.h" +class CaloCell_ID; + class LArHitContainerCnv_p2 : public T_AthenaPoolTPCnvBase<LArHitContainer, LArHitContainer_p2> { public: - LArHitContainerCnv_p2() {}; + LArHitContainerCnv_p2(); - virtual void persToTrans(const LArHitContainer_p2* persColl, LArHitContainer* transColl, MsgStream &log) ; - virtual void transToPers(const LArHitContainer* transColl, LArHitContainer_p2* persColl, MsgStream &log) ; - private: + virtual void persToTrans(const LArHitContainer_p2* persColl, LArHitContainer* transColl, MsgStream &log) override; + virtual void transToPers(const LArHitContainer* transColl, LArHitContainer_p2* persColl, MsgStream &log) override; + +private: + const CaloCell_ID* m_cellIdHelper; }; #endif // not LARTPCNV_LARHITCONTAINERCNV_P2_H diff --git a/LArCalorimeter/LArCnv/LArSimEventTPCnv/LArSimEventTPCnv/LArHitFloatContainerCnv_p2.h b/LArCalorimeter/LArCnv/LArSimEventTPCnv/LArSimEventTPCnv/LArHitFloatContainerCnv_p2.h index 1a4c90b4b5c0c0730b71f99cf837f250e1146522..c2b081ae5e428c4ca4750aa26b0291a64f7f9ec8 100644 --- a/LArCalorimeter/LArCnv/LArSimEventTPCnv/LArSimEventTPCnv/LArHitFloatContainerCnv_p2.h +++ b/LArCalorimeter/LArCnv/LArSimEventTPCnv/LArSimEventTPCnv/LArHitFloatContainerCnv_p2.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef LARTPCNV_LARHITFLOATCONTAINERCNV_p2_H @@ -10,14 +10,19 @@ #include "AthenaPoolCnvSvc/T_AthenaPoolTPConverter.h" +class CaloCell_ID; + + class LArHitFloatContainerCnv_p2 : public T_AthenaPoolTPCnvBase<LArHitFloatContainer, LArHitContainer_p2> { - public: - LArHitFloatContainerCnv_p2() {}; +public: + LArHitFloatContainerCnv_p2(); - virtual void persToTrans(const LArHitContainer_p2* persColl, LArHitFloatContainer* transColl, MsgStream &log) ; - virtual void transToPers(const LArHitFloatContainer* transColl, LArHitContainer_p2* persColl, MsgStream &log) ; - private: + virtual void persToTrans(const LArHitContainer_p2* persColl, LArHitFloatContainer* transColl, MsgStream &log) override; + virtual void transToPers(const LArHitFloatContainer* transColl, LArHitContainer_p2* persColl, MsgStream &log) override; + +private: + const CaloCell_ID* m_cellIdHelper; }; diff --git a/LArCalorimeter/LArCnv/LArSimEventTPCnv/src/LArHitContainerCnv_p2.cxx b/LArCalorimeter/LArCnv/LArSimEventTPCnv/src/LArHitContainerCnv_p2.cxx index a891c916b69dbf48c47b7e98fa748b65d18ddfd8..e782d98f8c07449a65246eac098ea40d51ce9af5 100644 --- a/LArCalorimeter/LArCnv/LArSimEventTPCnv/src/LArHitContainerCnv_p2.cxx +++ b/LArCalorimeter/LArCnv/LArSimEventTPCnv/src/LArHitContainerCnv_p2.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "LArSimEvent/LArHit.h" @@ -8,7 +8,6 @@ #include "Identifier/IdentifierHash.h" #include "CaloIdentifier/CaloCell_ID.h" -#include "CaloIdentifier/CaloIdManager.h" #include "AthenaPoolCnvSvc/Compressor.h" @@ -16,7 +15,21 @@ // author Ilija Vukotic #include "LArSimEventTPCnv/LArHitContainerCnv_p2.h" -#include "map" +#include "StoreGate/StoreGateSvc.h" +#include "GaudiKernel/ServiceHandle.h" +#include <map> +#include <stdexcept> + + +LArHitContainerCnv_p2::LArHitContainerCnv_p2() + : m_cellIdHelper(nullptr) +{ + ServiceHandle<StoreGateSvc> detStore ("DetectorStore", "LArHitContainerCnv_p2"); + if (detStore->retrieve (m_cellIdHelper, "CaloCell_ID").isFailure()) { + throw std::runtime_error ("LArHitContainerCnv_p2: Can't get CaloCell_ID"); + } +} + void LArHitContainerCnv_p2::transToPers(const LArHitContainer* transCont, LArHitContainer_p2* persCont, MsgStream &log) { //static int ev=0; @@ -28,15 +41,12 @@ void LArHitContainerCnv_p2::transToPers(const LArHitContainer* transCont, LArHit std::vector<float> tempE; tempE.reserve(size); std::vector<float> tempT; tempT.reserve(size); - const CaloCell_ID* cellIdHelper = (CaloIdManager::instance())->getCaloCell_ID();// getDM_ID - - LArHitContainer::const_iterator it = transCont->begin(); std::multimap <unsigned int, unsigned int> map_hashPositions;// first hash ; second its position in container for (unsigned int w=0;w<size;++w){ - IdentifierHash hashId = cellIdHelper->calo_cell_hash((*it)->cellID()); + IdentifierHash hashId = m_cellIdHelper->calo_cell_hash((*it)->cellID()); map_hashPositions.insert(std::pair<unsigned int, int>((unsigned int)hashId, w)); // if (!ev) std::cout<<hashId<<"\t"<<((*it)->cellID())<<std::endl; ++it; @@ -79,9 +89,6 @@ void LArHitContainerCnv_p2::persToTrans(const LArHitContainer_p2* persCont, LArH transCont->setName(persCont->name() ); - const CaloCell_ID* cellIdHelper = (CaloIdManager::instance())->getCaloCell_ID();// getDM_ID - - Compressor A; std::vector<float> tempE; tempE.reserve(cells); std::vector<float> tempT; tempT.reserve(cells); @@ -92,7 +99,7 @@ void LArHitContainerCnv_p2::persToTrans(const LArHitContainer_p2* persCont, LArH for (unsigned int i=0;i<cells;++i){ sum+= persCont->m_channelHash[i]; LArHit* trans=new LArHit - (cellIdHelper->cell_id(sum), + (m_cellIdHelper->cell_id(sum), tempE[i], tempE[i] != 0 ? (double)(tempT[i])/tempE[i] : 0); // if(!dog) std::cout<<"Reading hash: "<< sum <<"\t E: "<< (double)tempE[i]<<"\t T: "<<(tempT[i]) <<std::endl; diff --git a/LArCalorimeter/LArCnv/LArSimEventTPCnv/src/LArHitFloatContainerCnv_p2.cxx b/LArCalorimeter/LArCnv/LArSimEventTPCnv/src/LArHitFloatContainerCnv_p2.cxx index 0ac8161e2610534cc6258ba08225a02c537e38df..57bc15e19d29e477f4e81e130d9da52798ff6807 100644 --- a/LArCalorimeter/LArCnv/LArSimEventTPCnv/src/LArHitFloatContainerCnv_p2.cxx +++ b/LArCalorimeter/LArCnv/LArSimEventTPCnv/src/LArHitFloatContainerCnv_p2.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "LArSimEvent/LArHitFloat.h" @@ -8,7 +8,6 @@ #include "Identifier/IdentifierHash.h" #include "CaloIdentifier/CaloCell_ID.h" -#include "CaloIdentifier/CaloIdManager.h" #include "AthenaPoolCnvSvc/Compressor.h" @@ -16,7 +15,21 @@ // author Ilija Vukotic #include "LArSimEventTPCnv/LArHitFloatContainerCnv_p2.h" -#include "map" +#include "StoreGate/StoreGateSvc.h" +#include "GaudiKernel/ServiceHandle.h" +#include <map> +#include <stdexcept> + + +LArHitFloatContainerCnv_p2::LArHitFloatContainerCnv_p2() + : m_cellIdHelper(nullptr) +{ + ServiceHandle<StoreGateSvc> detStore ("DetectorStore", "LArHitFloatContainerCnv_p2"); + if (detStore->retrieve (m_cellIdHelper, "CaloCell_ID").isFailure()) { + throw std::runtime_error ("LArHitFloatContainerCnv_p2: Can't get CaloCell_ID"); + } +} + void LArHitFloatContainerCnv_p2::transToPers(const LArHitFloatContainer* transCont, LArHitContainer_p2* persCont, MsgStream &log) { //static int ev=0; @@ -28,15 +41,12 @@ void LArHitFloatContainerCnv_p2::transToPers(const LArHitFloatContainer* transCo std::vector<float> tempE; tempE.reserve(size); std::vector<float> tempT; tempT.reserve(size); - const CaloCell_ID* cellIdHelper = (CaloIdManager::instance())->getCaloCell_ID();// getDM_ID - - LArHitFloatContainer::const_iterator it = transCont->begin(); std::multimap <unsigned int, unsigned int> map_hashPositions;// first hash ; second its position in container for (unsigned int w=0;w<size;++w){ - IdentifierHash hashId = cellIdHelper->calo_cell_hash((*it).cellID()); + IdentifierHash hashId = m_cellIdHelper->calo_cell_hash((*it).cellID()); map_hashPositions.insert(std::pair<unsigned int, int>((unsigned int)hashId, w)); // if (!ev) std::cout<<hashId<<"\t"<<((*it)->cellID())<<std::endl; ++it; @@ -77,9 +87,6 @@ void LArHitFloatContainerCnv_p2::persToTrans(const LArHitContainer_p2* persCont, transCont->clear(); transCont->reserve(cells); - const CaloCell_ID* cellIdHelper = (CaloIdManager::instance())->getCaloCell_ID();// getDM_ID - - Compressor A; std::vector<float> tempE; tempE.reserve(cells); std::vector<float> tempT; tempT.reserve(cells); @@ -89,7 +96,7 @@ void LArHitFloatContainerCnv_p2::persToTrans(const LArHitContainer_p2* persCont, unsigned int sum=0; for (unsigned int i=0;i<cells;++i){ sum+= persCont->m_channelHash[i]; - LArHitFloat hit(cellIdHelper->cell_id(sum),tempE[i],tempT[i]); + LArHitFloat hit(m_cellIdHelper->cell_id(sum),tempE[i],tempT[i]); // if(!dog) std::cout<<"Reading hash: "<< sum <<"\t E: "<< (double)tempE[i]<<"\t T: "<<(tempT[i]) <<std::endl; transCont->push_back(hit); } diff --git a/LArCalorimeter/LArCnv/LArSimEventTPCnv/test/LArHitContainerCnv_p2_test.cxx b/LArCalorimeter/LArCnv/LArSimEventTPCnv/test/LArHitContainerCnv_p2_test.cxx index 4da55211f3c5ab62ad8cf7c65725f92175183143..eb2eb850745278cf8368a98c62fdb0f8e2239d5c 100644 --- a/LArCalorimeter/LArCnv/LArSimEventTPCnv/test/LArHitContainerCnv_p2_test.cxx +++ b/LArCalorimeter/LArCnv/LArSimEventTPCnv/test/LArHitContainerCnv_p2_test.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // $Id$ @@ -15,7 +15,6 @@ #include "LArSimEventTPCnv/LArHitContainerCnv_p2.h" #include "StoreGate/StoreGateSvc.h" #include "CaloIdentifier/CaloCell_ID.h" -#include "CaloIdentifier/CaloIdManager.h" #include "IdDictParser/IdDictParser.h" #include "TestTools/initGaudi.h" #include "TestTools/FLOATassert.h" @@ -107,12 +106,9 @@ const CaloCell_ID& make_dd (ISvcLocator* svcLoc) tile_id); assert (calo_id->initialize_from_dictionary (idd) == 0); - CaloIdManager* mgr = new CaloIdManager; - mgr->set_helper (calo_id); - StoreGateSvc* detStore = nullptr; assert (svcLoc->service( "DetectorStore", detStore ).isSuccess()); - assert (detStore->record (mgr, "CaloIdManager").isSuccess()); + assert (detStore->record (calo_id, "CaloCell_ID").isSuccess()); return *calo_id; } diff --git a/LArCalorimeter/LArCnv/LArSimEventTPCnv/test/LArHitFloatContainerCnv_p2_test.cxx b/LArCalorimeter/LArCnv/LArSimEventTPCnv/test/LArHitFloatContainerCnv_p2_test.cxx index 7d666ff5453196a40c19e61830afe107d359a4cf..fc4e3288b3591f8f8cef0a46a153432edc13fcb0 100644 --- a/LArCalorimeter/LArCnv/LArSimEventTPCnv/test/LArHitFloatContainerCnv_p2_test.cxx +++ b/LArCalorimeter/LArCnv/LArSimEventTPCnv/test/LArHitFloatContainerCnv_p2_test.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // $Id$ @@ -15,7 +15,6 @@ #include "LArSimEventTPCnv/LArHitFloatContainerCnv_p2.h" #include "StoreGate/StoreGateSvc.h" #include "CaloIdentifier/CaloCell_ID.h" -#include "CaloIdentifier/CaloIdManager.h" #include "IdDictParser/IdDictParser.h" #include "TestTools/initGaudi.h" #include "TestTools/FLOATassert.h" @@ -106,12 +105,9 @@ const CaloCell_ID& make_dd (ISvcLocator* svcLoc) tile_id); assert (calo_id->initialize_from_dictionary (idd) == 0); - CaloIdManager* mgr = new CaloIdManager; - mgr->set_helper (calo_id); - StoreGateSvc* detStore = nullptr; assert (svcLoc->service( "DetectorStore", detStore ).isSuccess()); - assert (detStore->record (mgr, "CaloIdManager").isSuccess()); + assert (detStore->record (calo_id, "CaloCell_ID").isSuccess()); return *calo_id; } diff --git a/LArCalorimeter/LArDetDescr/LArDetDescr/FCAL_ChannelMap.h b/LArCalorimeter/LArDetDescr/LArDetDescr/FCAL_ChannelMap.h deleted file mode 100755 index 1bb5bc4b2d7a25d5c0f3d3af18a78413f6188b54..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArDetDescr/LArDetDescr/FCAL_ChannelMap.h +++ /dev/null @@ -1,17 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef LARDETDESCR_FCAL_CHANNELMAP_OBS_H -#define LARDETDESCR_FCAL_CHANNELMAP_OBS_H -#warning from FCAL_ChannelMap: you are using an obsolete header file. please migrate you code to the new one asap - -#include "LArReadoutGeometry/FCAL_ChannelMap.h" - -#endif // LARDETDESCR_FCAL_CHANNELMAP_H - - - - - - diff --git a/LArCalorimeter/LArDetDescr/LArDetDescr/LArCellVolumeDB.h b/LArCalorimeter/LArDetDescr/LArDetDescr/LArCellVolumeDB.h deleted file mode 100755 index f4c13272a35ba1b2be2af3d1560e0717fd5b9559..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArDetDescr/LArDetDescr/LArCellVolumeDB.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef LARDETDESCR_LARCELLVOLUMEDB_H -#define LARDETDESCR_LARCELLVOLUMEDB_H - -#include <vector> -#include "Identifier/Identifier.h" - -/** c-struct containing the LArCell volume information : - - thanks to the phi symmetry, in em and hec there is 1 - volume per eta bin ( see class LArCellVolumes.h , where this - class is used ) - - * @author Hong Ma - * @version 0-0-1 , Feb 25, 2004 - -*/ - - -// persistent c-struct -struct LArCellVolumeDB_t{ - Identifier db_channelID; // offline comp_id - float db_volume ; // in mm*3 -}; - -typedef std::vector<LArCellVolumeDB_t> LArCellVolumeDB; - -#include "AthenaKernel/CLASS_DEF.h" -CLASS_DEF(LArCellVolumeDB, 34482670 ,1) - -#endif diff --git a/LArCalorimeter/LArDetDescr/LArDetDescr/LArCellVolumes.h b/LArCalorimeter/LArDetDescr/LArDetDescr/LArCellVolumes.h deleted file mode 100755 index 7471ddb07547648f62356c017df7531e1dfaf53c..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArDetDescr/LArDetDescr/LArCellVolumes.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef LARCELL_VOLUMES_H -#define LARCELL_VOLUMES_H - -#include "RDBAccessSvc/IRDBAccessSvc.h" - -class Identifier; -class CaloCell_ID; - -/** This class builds a vector of LArCellVolumeDB objects, read from - the Oracle database ( see constructor), and uses it to provide - the volume of each LAr cell ( public method CellVolume ) - - Author : V. Tsulaia & C. Adam - may 2005 - -*/ - -#include "LArDetDescr/LArCellVolumeDB.h" - -class LArCellVolumes -{ -public: - - // Constructors: - LArCellVolumes(IRDBRecordset_ptr cellVolRec); - - virtual ~LArCellVolumes(); - - double CellVolume (Identifier cell_id); - - virtual void print(); - -private: - const CaloCell_ID* m_calocell_id ; - - LArCellVolumeDB m_cellVolume; -}; - - -#endif diff --git a/LArCalorimeter/LArDetDescr/LArDetDescr/LArNumberHelper.h b/LArCalorimeter/LArDetDescr/LArDetDescr/LArNumberHelper.h deleted file mode 100755 index 7a5abf79e6c6d25c892d3cfae9ad0ef155be47b5..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArDetDescr/LArDetDescr/LArNumberHelper.h +++ /dev/null @@ -1,256 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef LArNumberHelper_H -#define LArNumberHelper_H - -#include "Identifier/Identifier.h" -#include "RDBAccessSvc/IRDBAccessSvc.h" -class StoreGateSvc; -class LArEM_ID; -class LArHEC_ID; -class LArFCAL_ID; - -class IRDBRecord; -class LArCellVolumes; -class IGeoModelSvc; - -/** - - This class reads all numbers traditionnaly needed and used - to build the read-out geometry part of the LArDetDescrManager : - - - grannularity and region size in eta/phi are taken from the - Identifier dictionnary. These are in "ideal" geometry. - - - the cell depth (in R or Z) comes from the official geometry DB - - The LArMgrInitializer uses these numbers and takes care of the translation - between cylindric/cartesian coordinates if needed. - - Now that the position of each region is taken from the GeoModel, the HepTransforms - are provided by another specific class : LArSubdetPosHelper - - The name Helper was choosen to differentiate such simple classes, which are - exclusively used within the LArDetDescr package, from Tools possibly used by - reconstrcution clients. - -*/ - -class LArNumberHelper -{ -public : - - LArNumberHelper(const std::string geometry); - ~LArNumberHelper(); - - // fill in first, will take care of the user interface after... - - // Warning: - // phi_min is the LAr conventional origin and stays at 0 - // phi_max is the region size in phi and stays equal to 2 pi . - // It is for individual channels that the -pi,pi convention - // is applied. - - int nb_of_em_regions(); - int nb_of_hec_regions(); - int nb_of_fcal_regions(); - - void print_em(); - void print_hec(); - void print_fcal(); - - // em : - Identifier region_id_em(int i); - int n_eta_em(int i); - int n_phi_em(int i); - double deta_em(int i); - double dphi_em(int i); - int sign_em(int i); - double eta_min_em(int i); - double eta_max_em(int i); - double phi_min_em(int i); - double phi_max_em(int i); - int n_depth_em(int i); - double depth_em_in(int i, int j); - double depth_em_out(int i, int j); - - // hec : - Identifier region_id_hec(int i); - int n_eta_hec(int i); - int n_phi_hec(int i); - double deta_hec(int i); - double dphi_hec(int i); - int sign_hec(int i); - double eta_min_hec(int i); - double eta_max_hec(int i); - double phi_min_hec(int i); - double phi_max_hec(int i); - int n_depth_hec(int i); - double depth_hec_in(int i, int j); - double depth_hec_out(int i, int j); - - // fcal : geometry in in x/y, but FCAL_ID works in eta/phi ! - Identifier region_id_fcal(int i); - int n_eta_fcal(int i); - int n_phi_fcal(int i); - double deta_fcal(int i); - double dphi_fcal(int i); - int sign_fcal(int i); - - double x_min_fcal(int i); - double x_max_fcal(int i); - double dx_fcal(int i); - double y_min_fcal(int i); - double y_max_fcal(int i); - double dy_fcal(int i); - double z_min_fcal(int i); - double z_max_fcal(int i); - - double eta_min_fcal(int i); - double eta_max_fcal(int i); - double phi_min_fcal(int i); - double phi_max_fcal(int i); - - int n_depth_fcal(int i); - double depth_fcal_in(int i, int j); - double depth_fcal_out(int i, int j); - - LArCellVolumes* VolumeHelper(); - - // Parameters needed for sagging - void sagging_param( std::vector<double>& Rhocen, std::vector<double>& Sag ); - - private: - - const LArEM_ID* m_em_id; - const LArHEC_ID* m_hec_id; - const LArFCAL_ID* m_fcal_id; - std::string m_geometry; - - StoreGateSvc* m_pDetStore; - - IRDBAccessSvc* m_iAccessSvc; - IRDBRecordset_ptr m_lar; - const IRDBRecord* m_rec; - const IGeoModelSvc* m_geoModelSvc; - - std::string m_tag; - std::string m_node; - - LArCellVolumes* m_cellVolumes; - - void prepare_arrays(); - - void hard_em(); - void db_nb_em(); - - void hard_hec(); - void db_nb_hec(); - - void hard_fcal(); - void db_nb_fcal(); - - void cart_to_cyl ( double x, double y, double z, - double& eta, double& phi, double& r ); - - double eta ( double r, double z ); - - // std::vector <double> z_array; // max dim will be 44 - - // em : info coming from Identifiers - std::vector <Identifier> m_region_id_em; - std::vector <int> m_n_eta_em; - std::vector <int> m_n_phi_em; - std::vector <double> m_deta_em; - std::vector <double> m_dphi_em; - std::vector <int> m_sign_em; - - // em : info coming from the geometry DB - std::vector <double> m_eta_min_em; - std::vector <double> m_eta_max_em; - std::vector <double> m_phi_min_em; - std::vector <double> m_phi_max_em; - std::vector <int> m_n_depth_em; - std::vector < std::vector <double> > m_depth_em_in; - std::vector < std::vector <double> > m_depth_em_out; - - // hec : info coming from Identifiers - std::vector <Identifier> m_region_id_hec; - std::vector <int> m_n_eta_hec; - std::vector <int> m_n_phi_hec; - std::vector <double> m_deta_hec; - std::vector <double> m_dphi_hec; - std::vector <int> m_sign_hec; - - // hec : info coming from the geometry DB - std::vector <double> m_eta_min_hec; - std::vector <double> m_eta_max_hec; - std::vector <double> m_phi_min_hec; - std::vector <double> m_phi_max_hec; - std::vector <int> m_n_depth_hec; - std::vector < std::vector <double> > m_depth_hec_in; - std::vector < std::vector <double> > m_depth_hec_out; - - // fcal : info coming from Identifiers - std::vector <Identifier> m_region_id_fcal; - std::vector <int> m_n_eta_fcal; - std::vector <int> m_n_phi_fcal; - std::vector <double> m_deta_fcal; - std::vector <double> m_dphi_fcal; - std::vector <int> m_sign_fcal; - - // fcal : info coming from FCAL ChannelMap - std::vector <double> m_x_min_fcal; - std::vector <double> m_x_max_fcal; - std::vector <double> m_dx_fcal; - std::vector <double> m_y_min_fcal; - std::vector <double> m_y_max_fcal; - std::vector <double> m_dy_fcal; - std::vector <double> m_z_min_fcal; - std::vector <double> m_z_max_fcal; - std::vector <double> m_eta_min_fcal; - std::vector <double> m_eta_max_fcal; - std::vector <double> m_phi_min_fcal; - std::vector <double> m_phi_max_fcal; - std::vector <int> m_n_depth_fcal; - std::vector < std::vector <double> > m_depth_fcal_in; - std::vector < std::vector <double> > m_depth_fcal_out; - - // these arrays are read in the geometry DB and used internally - - // EMB - double m_emb_psin; - double m_accg_rin_ac; - double m_accg_rout_ac; - std::vector <double> m_acco_rmx12; - std::vector <double> m_acco_ee12; - std::vector <double> m_acco_rmx23; - - // EMEC - double m_endg_zorig; - std::vector <double> m_esep_iw23; - double m_emb_iwout; - double m_emec_psin; - double m_esep_zsep12; - std::vector <double> m_esep_zsep23; - double m_emec_out; - - // HEC - double m_hec_in0; - double m_hec_in1; - double m_hec_in2; - double m_hec_in3; - double m_hec_out; - double m_hec_gap; - - // FCAL: none, its all in the FCALChannelMaps - - // Avoid coverity warnings. - LArNumberHelper (const LArNumberHelper&); - LArNumberHelper& operator= (const LArNumberHelper&); - -}; - -#endif diff --git a/LArCalorimeter/LArDetDescr/src/LArCellVolumes.cxx b/LArCalorimeter/LArDetDescr/src/LArCellVolumes.cxx deleted file mode 100755 index 7637ab32f383cad6380f22f15aa0d6f89708ad17..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArDetDescr/src/LArCellVolumes.cxx +++ /dev/null @@ -1,124 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "LArDetDescr/LArCellVolumes.h" - -#include "CaloIdentifier/CaloIdManager.h" -#include "CaloIdentifier/CaloCell_ID.h" - -#include "RDBAccessSvc/IRDBRecordset.h" -#include "RDBAccessSvc/IRDBRecord.h" - -#include <iostream> -#include <iomanip> -#include <algorithm> - - -namespace { - -struct LArCellVolumeDB_Compare -{ - bool operator() (const LArCellVolumeDB_t& a, const LArCellVolumeDB_t& b) - { return a.db_channelID < b.db_channelID; } - bool operator() (const LArCellVolumeDB_t& a, Identifier b) - { return a.db_channelID < b; } -}; - -} // anonymous namespace - - - -LArCellVolumes::LArCellVolumes(IRDBRecordset_ptr cellVolRec) -{ - // Get Id Helper - m_calocell_id = CaloIdManager::instance()->getCaloCell_ID(); - - // Initialize m_cellVolume vector - for(unsigned int ind = 0; ind < cellVolRec->size(); ind++) - { - const IRDBRecord* currentRec = (*cellVolRec)[ind]; - - int subcalo = currentRec->getInt("SUBCALO"); - int posneg = currentRec->getInt("POSNEG"); - int sampling = currentRec->getInt("SAMPLING"); - int region = currentRec->getInt("REGION"); - int eta = currentRec->getInt("ETA"); - int phi = currentRec->getInt("PHI"); - - Identifier channelID = m_calocell_id->cell_id - (subcalo, posneg, sampling, region, eta, phi); - - LArCellVolumeDB_t cellVol; - cellVol.db_channelID = channelID; - cellVol.db_volume = currentRec->getDouble("VOLUME"); - m_cellVolume.push_back(cellVol); - } - - std::sort (m_cellVolume.begin(), m_cellVolume.end(), - LArCellVolumeDB_Compare()); -} - -LArCellVolumes::~LArCellVolumes() -{ - m_cellVolume.clear(); -} - -double -LArCellVolumes::CellVolume ( Identifier cell_id ) -{ - if (m_cellVolume.size()==0) - std::cerr << "LArCellVolumes::CellVolume(). Problem in LArCellVolumes: no cell volumes...\n"; - else - { - //log << MSG::INFO << "Looking for volume for cell :" << endmsg; - //m_calocell_id->print(cell_id); - - // compute Identifier of Cell with same eta, but phi=0 and pos side - // (except for fcal) - Identifier volId; - - if (!m_calocell_id->is_fcal(cell_id)) { - int subCalo = m_calocell_id->sub_calo(cell_id); - int posneg = std::abs (m_calocell_id->pos_neg(cell_id)); - int sampling = m_calocell_id->sampling(cell_id); - int region = m_calocell_id->region(cell_id); - int eta = m_calocell_id->eta(cell_id); - - volId = m_calocell_id->cell_id - (subCalo, posneg, sampling, region, eta, 0); - } - else - volId = cell_id; - - //m_calocell_id->print( (Identifier) volId ); - - LArCellVolumeDB::const_iterator it = - std::lower_bound (m_cellVolume.begin(), m_cellVolume.end(), volId, - LArCellVolumeDB_Compare()); - if (it != m_cellVolume.end() && it->db_channelID == volId) - return it->db_volume; - } - - return 0.; -} - -void -LArCellVolumes::print () -{ - if (m_cellVolume.size()==0) - std::cerr << "LArCellVolumes::print(). No cell volumes...\n"; - else - { - std::cout << "LArCellVolumes::print(). Number of volumes found: " - << m_cellVolume.size(); - - for ( unsigned int i = 0; i< m_cellVolume.size(); i++) - { - const LArCellVolumeDB_t vol = m_cellVolume[i]; - m_calocell_id->print( (Identifier) vol.db_channelID ); - std::cout << " ==> vol= " - << vol.db_volume << " mm3\n"; - } - } -} diff --git a/LArCalorimeter/LArDetDescr/src/LArNumberHelper.cxx b/LArCalorimeter/LArDetDescr/src/LArNumberHelper.cxx deleted file mode 100755 index c983e296b92ed2d627023accf7c47177fd1476c5..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArDetDescr/src/LArNumberHelper.cxx +++ /dev/null @@ -1,1355 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "LArDetDescr/LArNumberHelper.h" - -#include "GaudiKernel/Bootstrap.h" -#include "GaudiKernel/ISvcLocator.h" -#include "GaudiKernel/IMessageSvc.h" - -#include "StoreGate/StoreGate.h" -#include "StoreGate/DataHandle.h" -#include "GaudiKernel/ISvcLocator.h" -#include "RDBAccessSvc/IRDBAccessSvc.h" -#include "RDBAccessSvc/IRDBRecordset.h" -#include "RDBAccessSvc/IRDBRecord.h" - -#include "CLHEP/Geometry/Point3D.h" - -#include "CaloIdentifier/CaloID.h" -#include "CaloIdentifier/CaloIdManager.h" - -#include "LArDetDescr/LArCellVolumes.h" -#include "GeoModelInterfaces/IGeoModelSvc.h" -#include "GeoModelUtilities/DecodeVersionKey.h" -#include "GaudiKernel/SystemOfUnits.h" - -LArNumberHelper::LArNumberHelper(const std::string geometry) : - m_geometry(geometry), - m_pDetStore(0), - m_iAccessSvc(0), - m_rec(0), - m_geoModelSvc(0), - m_cellVolumes(0), - m_emb_psin(0), - m_accg_rin_ac(0), - m_accg_rout_ac(0), - m_endg_zorig(0), - m_emb_iwout(0), - m_emec_psin(0), - m_esep_zsep12(0), - m_emec_out(0), - m_hec_in0(0), - m_hec_in1(0), - m_hec_in2(0), - m_hec_in3(0), - m_hec_out(0), - m_hec_gap(0) -{ - - IMessageSvc* msgSvc; - - //retrieves helpers - const CaloIdManager* calo_id_man = CaloIdManager::instance(); - m_em_id = calo_id_man->getEM_ID(); - m_hec_id = calo_id_man->getHEC_ID(); - m_fcal_id = calo_id_man->getFCAL_ID(); - - ISvcLocator* svcLoc = Gaudi::svcLocator( ); - StatusCode sc = svcLoc->service( "MessageSvc", msgSvc ); - - if ( sc.isSuccess( ) ) { - - MsgStream log(msgSvc, "LArNumberHelper" ); - - sc = svcLoc->service( "DetectorStore", m_pDetStore ); - - if (!sc.isSuccess() || 0 == m_pDetStore) { - log <<MSG::FATAL <<"Could not find DetectorStore" <<endmsg; - // do not try to go further: nothing will work anyway - return; - } - - // Decode tag ( via GeoModel ) and fix it for TestBeam : - m_tag = "ATLAS-00"; - m_node = "ATLAS"; - m_geoModelSvc = 0; - - sc = svcLoc->service("GeoModelSvc",m_geoModelSvc); - if (sc.isFailure()) - log << MSG::ERROR << "Unable to get pointer to GeoModel service" << endmsg; - else - { - DecodeVersionKey detectorKey = DecodeVersionKey(m_geoModelSvc, "LAr"); - log <<MSG::INFO << "DecodeVersionKey found : " << detectorKey.tag() - << " " << detectorKey.tag()<<endmsg; - - if ( detectorKey.tag() != "LAr-H8-00" && detectorKey.tag() != "LAr-H6-00" - && detectorKey.tag() != "LAr-G3-00") - { - m_tag = detectorKey.tag(); - m_node = detectorKey.node(); - } - } - - log <<MSG::INFO <<"Readout geometry will use : " << m_tag << " " << m_node <<endmsg; - - // Acess the DB service : - - sc = svcLoc->service("RDBAccessSvc",m_iAccessSvc); - if (sc.isFailure()) - { - log << MSG::ERROR << "Unable to get RDBAccessSvc." << endmsg; - } - else - { - log <<MSG::INFO <<" did access RDBAccessSvc " <<endmsg; - - prepare_arrays(); - - db_nb_em(); - db_nb_hec(); - db_nb_fcal(); - - IRDBRecordset_ptr recCellVolumes = m_iAccessSvc->getRecordsetPtr("LArCellVolumes",m_tag,m_node); - - if(recCellVolumes->size()==0) - { - // Error occured in detting the recordset with detectorKey - // That probably means the LArCellVolumes node does not exist for this - // particular version of atlas geometry. Make another try - - recCellVolumes = m_iAccessSvc->getRecordsetPtr("LArCellVolumes","LArCellVolumes-00"); - } - - if(recCellVolumes->size()) - m_cellVolumes = new LArCellVolumes(recCellVolumes); - else - log << MSG::ERROR << "Unable to get LArCellVolumes" << endmsg; - - } - - // now use all the info to finish up : - hard_em(); - hard_hec(); - hard_fcal(); - - //print_em(); - //print_hec(); - //print_fcal(); - } -} - - -LArNumberHelper::~LArNumberHelper() -{ - if(m_cellVolumes) - delete m_cellVolumes; -} - -int -LArNumberHelper::nb_of_em_regions() -{ return m_region_id_em.size(); -} - -int -LArNumberHelper::nb_of_hec_regions() -{ return m_region_id_hec.size(); -} - -int -LArNumberHelper::nb_of_fcal_regions() -{ return m_region_id_fcal.size(); -} - -void -LArNumberHelper::print_em() -{ - - std::cout << "LArNumberHelper::print_em" << std::endl; - - for ( unsigned int i=0; i < m_em_id->region_hash_max(); i++ ) { - - int barrel_ec = abs( m_em_id->barrel_ec (m_region_id_em[i]) ); - int samp = m_em_id->sampling (m_region_id_em[i]); - int region = m_em_id->region (m_region_id_em[i]); - std::cout << "Region #" << i << " is : " << barrel_ec - << " " << samp << " " << region << std::endl; - - std::cout << "number of chan in eta, phi " - << m_n_eta_em[i] << " " << m_n_phi_em[i] << std::endl; - - std::cout << "eta_min eta_max deta phi_min phi_max dphi" - << std::endl; - - std::cout << m_eta_min_em[i] << " " << m_eta_max_em[i] - << " " << m_deta_em[i] << " " - << m_phi_min_em[i] << " " << m_phi_max_em[i] - << " " << m_dphi_em[i] << std::endl; - - if ( m_n_depth_em[i] != 0 ) { - std::cout << "EMEC Z locations : in" ; - for ( int j = 0 ; j < m_n_depth_em[i]; j++ ) - std::cout << m_depth_em_in[i][j] << " " ; - std::cout << std::endl; - - std::cout << "EMEC Z locations : out" ; - for ( int j = 0 ; j < m_n_depth_em[i]; j++ ) - std::cout << m_depth_em_out[i][j] << " " ; - std::cout << std::endl; - } - } -} - -void -LArNumberHelper::print_hec() -{ - - std::cout << "LArNumberHelper::print_hec" << std::endl; - - for ( unsigned int i=0; i < m_hec_id->region_hash_max(); i++ ) { - - int pos_neg = abs( m_hec_id->pos_neg (m_region_id_hec[i]) ); - int samp = m_hec_id->sampling (m_region_id_hec[i]); - int region = m_hec_id->region (m_region_id_hec[i]); - std::cout << "Region #" << i << " is : " << pos_neg - << " " << samp << " " << region << std::endl; - - std::cout << "number of chan in eta, phi " - << m_n_eta_hec[i] << " " << m_n_phi_hec[i] << std::endl; - - std::cout << "eta_min eta_max deta phi_min phi_max dphi" - << std::endl; - - std::cout << m_eta_min_hec[i] << " " << m_eta_max_hec[i] - << " " << m_deta_hec[i] << " " - << m_phi_min_hec[i] << " " << m_phi_max_hec[i] - << " " << m_dphi_hec[i] << std::endl; - - if ( m_n_depth_hec[i] != 0 ) { - std::cout << "HEC Z locations: in" ; - for ( int j = 0 ; j < m_n_depth_hec[i]; j++ ) - std::cout << m_depth_hec_in[i][j] << " " ; - std::cout << std::endl; - std::cout << "HEC Z locations: out" ; - for ( int j = 0 ; j < m_n_depth_hec[i]; j++ ) - std::cout << m_depth_hec_out[i][j] << " " ; - std::cout << std::endl; - } - } -} - -void -LArNumberHelper::print_fcal() -{ - - std::cout << "LArNumberHelper::print_fcal" << std::endl; - - for ( unsigned int i=0; i < m_fcal_id->module_hash_max(); i++ ) { - - int pos_neg = abs( m_fcal_id->pos_neg (m_region_id_fcal[i]) ); - int module = m_fcal_id->module (m_region_id_fcal[i]); - std::cout << "Module #" << i << " is : " << pos_neg - << " " << module << std::endl; - - std::cout << "channels : n_eta, n_phi, deta, dphi " - << m_n_eta_fcal[i] << " " << m_n_phi_fcal[i] << " " - << m_deta_fcal[i] << " " << m_dphi_fcal[i] - << std::endl; - - std::cout << "x_min x_max dx y_min y_max dy " - << std::endl; - - std::cout << m_x_min_fcal[i] << " " << m_x_max_fcal[i] - << " " << m_dx_fcal[i] << " " - << m_y_min_fcal[i] << " " << m_y_max_fcal[i] - << " " << m_dy_fcal[i] << std::endl; - - if ( m_n_depth_fcal[i] != 0 ) { - std::cout << "FCAL Z locations : in" ; - for ( int j = 0 ; j < m_n_depth_fcal[i]; j++ ) - std::cout << m_depth_fcal_in[i][j] << " " ; - std::cout << std::endl; - - std::cout << "FCAL Z locations : out" ; - for ( int j = 0 ; j < m_n_depth_fcal[i]; j++ ) - std::cout << m_depth_fcal_out[i][j] << " " ; - std::cout << std::endl; - } - } -} - -LArCellVolumes* -LArNumberHelper::VolumeHelper() -{ - return m_cellVolumes; -} - -void -LArNumberHelper::prepare_arrays() -{ - // Arrays are ordered by the region hash index. - - // em : 2*18 regions - // EM PS 1 per +- side - // EMB 5 per +- side - // EC PS 1 per +- side - // EMEC 11 per +- side - - int Ntot = (int) m_em_id->region_hash_max(); - //std::cout << "LArNumberHelper::prepare_arrays for em. Ntot = " - // << Ntot << std::endl; - - // these come from the identier package - m_region_id_em.resize(Ntot); - m_n_eta_em.resize(Ntot,0); - m_n_phi_em.resize(Ntot,0); - m_deta_em.resize(Ntot,(double) 0.); - m_dphi_em.resize(Ntot, (double) 0.); - m_eta_min_em.resize(Ntot,(double) 0.); - m_eta_max_em.resize(Ntot,(double) 0.); - m_phi_min_em.resize(Ntot,(double) 0.); - m_phi_max_em.resize(Ntot,(double) 0.); - m_sign_em.resize(Ntot,0); - - // 2 "facts of life" : - // in H8, the EMB module is centered around phi=0 - // = rotated by 1/2 module compared to Atlas - // compute the shift here, using the middle layer, - // and ignore the standard DDDb value. - - double phiEMBShift = 0.; - - if ( m_geometry == "H8" ) { - Identifier id = m_em_id->region_id(1,2,0); - IdentifierHash i = m_em_id->region_hash(id); - double cellnb = m_em_id->phi_max(id) + 1 - m_em_id->phi_min(id); - double cellsize = (double) m_em_id->phiGranularity(i); - phiEMBShift = cellnb * cellsize / 2. ; - } - else { - m_lar = m_iAccessSvc->getRecordsetPtr("BarrelGeometry",m_tag,m_node); - if (m_lar->size()) { - m_rec = (*m_lar)[0]; - phiEMBShift = -1.*m_rec->getDouble("PHIFIRST"); - } - } - - // in G3, the EMEC phi origin was the 1rst absorber, - // in G4, it is defined as the 1rst electrode - double phiEMECShift = 0.; - if ( m_geometry == "Atlas" ) { - Identifier id = m_em_id->region_id(2,2,0); - IdentifierHash i = m_em_id->region_hash(id); - double cellsize = (double) m_em_id->phiGranularity(i); - phiEMECShift = cellsize * (1./ 6.) ; - } - - for ( unsigned int i=0; i < m_em_id->region_hash_max(); i++ ) { - Identifier id = m_em_id->region_id ( i ); - m_region_id_em[i] = id; - m_n_eta_em [i] = m_em_id->eta_max(id) + 1; - m_n_phi_em [i] = m_em_id->phi_max(id) + 1; - m_deta_em [i] = (double) m_em_id->etaGranularity(i); - m_dphi_em [i] = (double) m_em_id->phiGranularity(i); - int barrel_ec = abs( m_em_id->barrel_ec (id) ); - if (barrel_ec == 0) barrel_ec = 1; - m_sign_em[i] = m_em_id->barrel_ec (id) / barrel_ec; - m_eta_min_em [i] = (double) (m_em_id->eta0(i) - - m_em_id->eta_min(id)*m_em_id->etaGranularity(i)); // ideal ! - m_eta_max_em [i] = m_eta_min_em[i] + m_n_eta_em[i]*m_deta_em[i]; - m_phi_min_em [i] = m_em_id->phi0(i) - - m_em_id->phi_min(id)*m_em_id->phiGranularity(i); // ideal !; - m_phi_max_em [i] = m_phi_min_em[i] + m_n_phi_em[i]*m_dphi_em[i] - - 0.01*m_dphi_em[i]; // when = 2pi get rounding pb. - - // apply phi shifts mentioned above : - - if ( m_em_id->barrel_ec (id) == 1 ) { - m_phi_min_em [i] = m_phi_min_em [i] - phiEMBShift ; - m_phi_max_em [i] = m_phi_max_em [i] - phiEMBShift; - } - else if ( m_em_id->barrel_ec (id) == -1) { - m_phi_min_em [i] = m_phi_min_em [i] + phiEMBShift ; - m_phi_max_em [i] = m_phi_max_em [i] + phiEMBShift; - } - else if (m_em_id->barrel_ec (id) < 0) { - m_phi_min_em [i] = m_phi_min_em [i] + phiEMECShift ; - m_phi_max_em [i] = m_phi_max_em [i] + phiEMECShift; - } - else { - m_phi_min_em [i] = m_phi_min_em [i] - phiEMECShift ; - m_phi_max_em [i] = m_phi_max_em [i] - phiEMECShift; - } - } - - // these will come from the geometry numbers - m_n_depth_em.resize(Ntot,0); - m_depth_em_in.resize(Ntot); - m_depth_em_out.resize(Ntot); - - // hec : 2*8 regions - // ------------------ - - Ntot = (int) m_hec_id->region_hash_max(); - //std::cout << "LArNumberHelper::prepare_arrays for hec. Ntot = " - // << Ntot << std::endl; - - // these come from the identier package - m_region_id_hec.resize(Ntot); - m_n_eta_hec.resize(Ntot,0); - m_n_phi_hec.resize(Ntot,0); - m_deta_hec.resize(Ntot,(double) 0.); - m_dphi_hec.resize(Ntot, (double) 0.); - m_eta_min_hec.resize(Ntot,(double) 0.); - m_eta_max_hec.resize(Ntot,(double) 0.); - m_phi_min_hec.resize(Ntot,(double) 0.); - m_phi_max_hec.resize(Ntot,(double) 0.); - m_sign_hec.resize(Ntot,0); - - for ( unsigned int i=0; i < m_hec_id->region_hash_max(); i++ ) { - Identifier id = m_hec_id->region_id ( i ); - m_region_id_hec[i] = id; - m_n_eta_hec [i] = m_hec_id->eta_max(id) + 1; - m_n_phi_hec [i] = m_hec_id->phi_max(id) + 1; - m_deta_hec [i] = (double) m_hec_id->etaGranularity(i); - m_dphi_hec [i] = (double) m_hec_id->phiGranularity(i); - int pos_neg = abs( m_hec_id->pos_neg (id) ); - if (pos_neg == 0) pos_neg = 1; - m_eta_min_hec [i] = (double)(m_hec_id->eta0(i) - - m_hec_id->eta_min(id)*m_hec_id->etaGranularity(i)); // ideal ! - m_eta_max_hec [i] = m_eta_min_hec[i] + m_n_eta_hec[i]*m_deta_hec[i]; - m_phi_min_hec [i] = m_hec_id->phi0(i) - - m_hec_id->phi_min(id)*m_hec_id->phiGranularity(i); // ideal !; - m_phi_max_hec[i] = m_phi_min_hec[i] + m_n_phi_hec[i]*m_dphi_hec[i] - - 0.01*m_dphi_hec[i]; // when = 2pi get rounding pb.; - m_sign_hec[i] = m_hec_id->pos_neg (id) / pos_neg; - } - - // these will come from the geometry numbers - m_n_depth_hec.resize(Ntot,0); - m_depth_hec_in.resize(Ntot); - m_depth_hec_out.resize(Ntot); - - // fcal : 2*3 regions - // --------------------- - // N.B. : FCAL is a mess, because information always came - // from a specific class and FCAL_ID only knows about eta/phi - - Ntot = (int) m_fcal_id->module_hash_max(); - //std::cout << "LArNumberHelper::prepare_arrays for fcal. Ntot = " - // << Ntot << std::endl; - - // these come from the identier package - m_region_id_fcal.resize(Ntot); - m_n_eta_fcal.resize(Ntot,0); - m_n_phi_fcal.resize(Ntot,0); - m_deta_fcal.resize(Ntot,(double) 0.); - m_dphi_fcal.resize(Ntot, (double) 0.); - m_sign_fcal.resize(Ntot,0); - m_n_depth_fcal.resize(Ntot,0); - m_depth_fcal_in.resize(Ntot); - m_depth_fcal_out.resize(Ntot); - - for ( unsigned int i=0; i < m_fcal_id->module_hash_max(); i++ ) { - - Identifier id = m_fcal_id->module_id ( i ); - m_region_id_fcal[i] = id; - - // these are in fact number of channels in eta/phi... - m_n_eta_fcal [i] = m_fcal_id->eta_max(id) + 1; - m_n_phi_fcal [i] = m_fcal_id->phi_max(id) + 1; - m_deta_fcal [i] = (double) m_fcal_id->etaGranularity(i); - m_dphi_fcal [i] = (double) m_fcal_id->phiGranularity(i); - - int pos_neg = abs( m_fcal_id->pos_neg (id) ); - m_sign_fcal[i] = pos_neg ? m_fcal_id->pos_neg (id) / pos_neg : 0; - } - - // these will come from geometry numbers - m_x_min_fcal.resize(Ntot,(double) 0.); - m_x_max_fcal.resize(Ntot,(double) 0.); - m_dx_fcal.resize(Ntot,(double) 0.); - m_y_min_fcal.resize(Ntot,(double) 0.); - m_y_max_fcal.resize(Ntot,(double) 0.); - m_dy_fcal.resize(Ntot, (double) 0.); - m_z_min_fcal.resize(Ntot,(double) 0.); - m_z_max_fcal.resize(Ntot,(double) 0.); - m_eta_min_fcal.resize(Ntot,(double) 0.); - m_eta_max_fcal.resize(Ntot,(double) 0.); - m_phi_min_fcal.resize(Ntot,(double) 0.); - m_phi_max_fcal.resize(Ntot,(double) 0.); - - //std::cout << "LArNumberHelper::prepare_arrays finished " - // << std::endl; -} - -void -LArNumberHelper::db_nb_em() -{ - // ---- Defaults are the values taken from Nova a long time - // ago -> this is where their name comes from - // ---- Now all overwritten by DB value - - //std::cout << " ----- in db_nb_em tags are : " << m_tag << " " << m_node << std::endl; - - // PS - // m_emb_psin = 141.23*Gaudi::Units::cm; // this is the TDR number 1385 mm + 27.3 mm - // ----> overwritten - - m_lar = m_iAccessSvc->getRecordsetPtr("PresamplerGeometry","ATLAS-00","ATLAS"); - - if (m_lar->size()) { - m_rec = (*m_lar)[0]; - m_emb_psin = m_rec->getDouble("RACTIVE")*Gaudi::Units::cm; - } - - // ACCG : - // m_accg_rin_ac = 144.73*Gaudi::Units::cm; // 1385mm + 27.3mm + 35mm - // m_accg_rout_ac = 200.35*Gaudi::Units::cm; // end of active material - // ----> overwritten - m_lar = m_iAccessSvc->getRecordsetPtr("BarrelGeometry",m_tag,m_node); - if (m_lar->size()) { - m_rec = (*m_lar)[0]; - m_accg_rin_ac = m_rec->getDouble("RMIN") *Gaudi::Units::cm; - m_accg_rout_ac = m_rec->getDouble("RMAX") *Gaudi::Units::cm; - } - - // ACCO : - m_acco_rmx12.resize (8,(double) 0.); - // m_acco_rmx12[0] = 158.6*Gaudi::Units::cm; - // m_acco_rmx12[1] = 158.6*Gaudi::Units::cm; - // m_acco_rmx12[2] = 157.07*Gaudi::Units::cm; - // m_acco_rmx12[3] = 157.07*Gaudi::Units::cm; - // m_acco_rmx12[4] = 154.83*Gaudi::Units::cm; - // m_acco_rmx12[5] = 154.83*Gaudi::Units::cm; - // m_acco_rmx12[6] = 153.23*Gaudi::Units::cm; - // m_acco_rmx12[7] = 153.23*Gaudi::Units::cm; - // ----> overwritten - m_lar = m_iAccessSvc->getRecordsetPtr("BarrelLongDiv",m_tag,m_node); - if (m_lar->size()) { - m_rec = (*m_lar)[0]; - m_acco_rmx12[0] = m_rec->getDouble("RMX12_0")*Gaudi::Units::cm; - m_acco_rmx12[1] = m_rec->getDouble("RMX12_1")*Gaudi::Units::cm; - m_acco_rmx12[2] = m_rec->getDouble("RMX12_2")*Gaudi::Units::cm; - m_acco_rmx12[3] = m_rec->getDouble("RMX12_3")*Gaudi::Units::cm; - m_acco_rmx12[4] = m_rec->getDouble("RMX12_4")*Gaudi::Units::cm; - m_acco_rmx12[5] = m_rec->getDouble("RMX12_5")*Gaudi::Units::cm; - m_acco_rmx12[6] = m_rec->getDouble("RMX12_6")*Gaudi::Units::cm; - m_acco_rmx12[7] = m_rec->getDouble("RMX12_7")*Gaudi::Units::cm; - } - - m_acco_ee12.resize (8,(double) 0.); - // m_acco_ee12[0] = 0.; - // m_acco_ee12[1] = 0.275; - // m_acco_ee12[2] = 0.6; - // m_acco_ee12[3] = 0.799; - // m_acco_ee12[4] = 0.8; - // m_acco_ee12[5] = 1.1312; - // m_acco_ee12[6] = 1.3531; - // m_acco_ee12[7] = 1.6; - // ----> overwritten - m_lar = m_iAccessSvc->getRecordsetPtr("BarrelLongDiv",m_tag,m_node); - if (m_lar->size()) { - m_rec = (*m_lar)[0]; - m_acco_ee12[0] = m_rec->getDouble("EE_0"); - m_acco_ee12[1] = m_rec->getDouble("EE_1"); - m_acco_ee12[2] = m_rec->getDouble("EE_2"); - m_acco_ee12[3] = m_rec->getDouble("EE_3"); - m_acco_ee12[4] = m_rec->getDouble("EE_4"); - m_acco_ee12[5] = m_rec->getDouble("EE_5"); - m_acco_ee12[6] = m_rec->getDouble("EE_6"); - m_acco_ee12[7] = m_rec->getDouble("EE_7"); - } - - m_acco_rmx23.resize (53,(double) 0.); - /* - m_acco_rmx23[0] = 192.83*Gaudi::Units::cm; ... up to : - m_acco_rmx23[52] = 178.89*Gaudi::Units::cm; - */ - // ----> overwritten - m_lar = m_iAccessSvc->getRecordsetPtr("BarrelLongDiv",m_tag,m_node); - if (m_lar->size()) { - m_rec = (*m_lar)[0]; - m_acco_rmx23[0] = m_rec->getDouble("RMX23_0")*Gaudi::Units::cm; - m_acco_rmx23[1] = m_rec->getDouble("RMX23_1")*Gaudi::Units::cm; - m_acco_rmx23[2] = m_rec->getDouble("RMX23_2")*Gaudi::Units::cm; - m_acco_rmx23[3] = m_rec->getDouble("RMX23_3")*Gaudi::Units::cm; - m_acco_rmx23[4] = m_rec->getDouble("RMX23_4")*Gaudi::Units::cm; - m_acco_rmx23[5] = m_rec->getDouble("RMX23_5")*Gaudi::Units::cm; - m_acco_rmx23[6] = m_rec->getDouble("RMX23_6")*Gaudi::Units::cm; - m_acco_rmx23[7] = m_rec->getDouble("RMX23_7")*Gaudi::Units::cm; - m_acco_rmx23[8] = m_rec->getDouble("RMX23_8")*Gaudi::Units::cm; - m_acco_rmx23[9] = m_rec->getDouble("RMX23_9")*Gaudi::Units::cm; - m_acco_rmx23[10] = m_rec->getDouble("RMX23_10")*Gaudi::Units::cm; - m_acco_rmx23[11] = m_rec->getDouble("RMX23_11")*Gaudi::Units::cm; - m_acco_rmx23[12] = m_rec->getDouble("RMX23_12")*Gaudi::Units::cm; - m_acco_rmx23[13] = m_rec->getDouble("RMX23_13")*Gaudi::Units::cm; - m_acco_rmx23[14] = m_rec->getDouble("RMX23_14")*Gaudi::Units::cm; - m_acco_rmx23[15] = m_rec->getDouble("RMX23_15")*Gaudi::Units::cm; - m_acco_rmx23[16] = m_rec->getDouble("RMX23_16")*Gaudi::Units::cm; - m_acco_rmx23[17] = m_rec->getDouble("RMX23_17")*Gaudi::Units::cm; - m_acco_rmx23[18] = m_rec->getDouble("RMX23_18")*Gaudi::Units::cm; - m_acco_rmx23[19] = m_rec->getDouble("RMX23_19")*Gaudi::Units::cm; - m_acco_rmx23[20] = m_rec->getDouble("RMX23_20")*Gaudi::Units::cm; - m_acco_rmx23[21] = m_rec->getDouble("RMX23_21")*Gaudi::Units::cm; - m_acco_rmx23[22] = m_rec->getDouble("RMX23_22")*Gaudi::Units::cm; - m_acco_rmx23[23] = m_rec->getDouble("RMX23_23")*Gaudi::Units::cm; - m_acco_rmx23[24] = m_rec->getDouble("RMX23_24")*Gaudi::Units::cm; - m_acco_rmx23[25] = m_rec->getDouble("RMX23_25")*Gaudi::Units::cm; - m_acco_rmx23[26] = m_rec->getDouble("RMX23_26")*Gaudi::Units::cm; - m_acco_rmx23[27] = m_rec->getDouble("RMX23_27")*Gaudi::Units::cm; - m_acco_rmx23[28] = m_rec->getDouble("RMX23_28")*Gaudi::Units::cm; - m_acco_rmx23[29] = m_rec->getDouble("RMX23_29")*Gaudi::Units::cm; - m_acco_rmx23[30] = m_rec->getDouble("RMX23_30")*Gaudi::Units::cm; - m_acco_rmx23[31] = m_rec->getDouble("RMX23_31")*Gaudi::Units::cm; - m_acco_rmx23[32] = m_rec->getDouble("RMX23_32")*Gaudi::Units::cm; - m_acco_rmx23[33] = m_rec->getDouble("RMX23_33")*Gaudi::Units::cm; - m_acco_rmx23[34] = m_rec->getDouble("RMX23_34")*Gaudi::Units::cm; - m_acco_rmx23[35] = m_rec->getDouble("RMX23_35")*Gaudi::Units::cm; - m_acco_rmx23[36] = m_rec->getDouble("RMX23_36")*Gaudi::Units::cm; - m_acco_rmx23[37] = m_rec->getDouble("RMX23_37")*Gaudi::Units::cm; - m_acco_rmx23[38] = m_rec->getDouble("RMX23_38")*Gaudi::Units::cm; - m_acco_rmx23[39] = m_rec->getDouble("RMX23_39")*Gaudi::Units::cm; - m_acco_rmx23[40] = m_rec->getDouble("RMX23_40")*Gaudi::Units::cm; - m_acco_rmx23[41] = m_rec->getDouble("RMX23_41")*Gaudi::Units::cm; - m_acco_rmx23[42] = m_rec->getDouble("RMX23_42")*Gaudi::Units::cm; - m_acco_rmx23[43] = m_rec->getDouble("RMX23_43")*Gaudi::Units::cm; - m_acco_rmx23[44] = m_rec->getDouble("RMX23_44")*Gaudi::Units::cm; - m_acco_rmx23[45] = m_rec->getDouble("RMX23_45")*Gaudi::Units::cm; - m_acco_rmx23[46] = m_rec->getDouble("RMX23_46")*Gaudi::Units::cm; - m_acco_rmx23[47] = m_rec->getDouble("RMX23_47")*Gaudi::Units::cm; - m_acco_rmx23[48] = m_rec->getDouble("RMX23_48")*Gaudi::Units::cm; - m_acco_rmx23[49] = m_rec->getDouble("RMX23_49")*Gaudi::Units::cm; - m_acco_rmx23[50] = m_rec->getDouble("RMX23_50")*Gaudi::Units::cm; - m_acco_rmx23[51] = m_rec->getDouble("RMX23_51")*Gaudi::Units::cm; - m_acco_rmx23[52] = m_rec->getDouble("RMX23_52")*Gaudi::Units::cm; - } - - // ENDG - // m_endg_zorig = 369.1*Gaudi::Units::cm; // this is the NOVA/Oracle number - // m_emb_iwout = 422.7*Gaudi::Units::cm; // 369.1*Gaudi::Units::cm + 53.6*Gaudi::Units::cm is the end of the active part - // m_emec_out = 422.7*Gaudi::Units::cm; // 369.1*Gaudi::Units::cm + 53.6*Gaudi::Units::cm is the end of the active part - m_lar = m_iAccessSvc->getRecordsetPtr("EmecGeometry",m_tag,m_node); - if (m_lar->size()) { - m_rec = (*m_lar)[0]; - m_endg_zorig = m_rec->getDouble("Z1")*Gaudi::Units::cm; - double epaisseurTotale = m_rec->getDouble("ETOT")*Gaudi::Units::cm; - m_emb_iwout = m_endg_zorig + epaisseurTotale; - m_emec_out = m_endg_zorig + epaisseurTotale; - - } - - // Cryostat - // m_emec_psin = 362.5*Gaudi::Units::cm; // notch in cold wall of cryostat - if ( m_geometry == "Atlas" ) { - DecodeVersionKey detectorKeyAtl = DecodeVersionKey(m_geoModelSvc, "ATLAS"); - m_lar = m_iAccessSvc->getRecordsetPtr("PresamplerPosition",detectorKeyAtl.tag(),detectorKeyAtl.node()); - } - else { - m_lar = m_iAccessSvc->getRecordsetPtr("PresamplerPosition",m_tag,m_node); - } - if (m_lar->size()) { - m_rec = (*m_lar)[0]; - m_emec_psin = m_rec->getDouble("ZPOS")*Gaudi::Units::cm; - } - - // ESEP - m_esep_iw23.resize(7, (double) 0.); - // m_esep_iw23[0] = 413.934*Gaudi::Units::cm; - // m_esep_iw23[1] = 412.518*Gaudi::Units::cm; - // m_esep_iw23[2] = 411.792*Gaudi::Units::cm; - // m_esep_iw23[3] = 409.545*Gaudi::Units::cm; - // m_esep_iw23[4] = 407.987*Gaudi::Units::cm; - // m_esep_iw23[5] = 407.510*Gaudi::Units::cm; - // m_esep_iw23[6] = 404.730*Gaudi::Units::cm; - // ----> overwritten - m_lar = m_iAccessSvc->getRecordsetPtr("EmecSamplingSep",m_tag,m_node); - if (m_lar->size()) { - m_rec = (*m_lar)[0]; - m_esep_iw23[0] = m_rec->getDouble("ZIW_0")*Gaudi::Units::cm; - m_esep_iw23[1] = m_rec->getDouble("ZIW_1")*Gaudi::Units::cm; - m_esep_iw23[2] = m_rec->getDouble("ZIW_2")*Gaudi::Units::cm; - m_esep_iw23[3] = m_rec->getDouble("ZIW_3")*Gaudi::Units::cm; - m_esep_iw23[4] = m_rec->getDouble("ZIW_4")*Gaudi::Units::cm; - m_esep_iw23[5] = m_rec->getDouble("ZIW_5")*Gaudi::Units::cm; - m_esep_iw23[6] = m_rec->getDouble("ZIW_6")*Gaudi::Units::cm; -} - - // m_esep_zsep12 = 378.398*Gaudi::Units::cm; - // Note that in the gometryDB this is an array, but - // of very similar numbers -> Zebra was using 1rst value only - // ----> overwritten - m_lar = m_iAccessSvc->getRecordsetPtr("EmecSamplingSep",m_tag,m_node); - if (m_lar->size()) { - m_rec = (*m_lar)[0]; - m_esep_zsep12 = m_rec->getDouble("ZSEP12_0")*Gaudi::Units::cm; - } - - m_esep_zsep23.resize(22, (double) 0.); - /* - m_esep_zsep23 [0] = 999.999*Gaudi::Units::cm; // inheritance from Zebra. - m_esep_zsep23 [1] = 999.999*Gaudi::Units::cm; // will be skipped in hard_em - m_esep_zsep23 [2] = 413.205*Gaudi::Units::cm; ... up to : - m_esep_zsep23 [21] = 401.153*Gaudi::Units::cm; - */ - // ----> overwritten - m_lar = m_iAccessSvc->getRecordsetPtr("EmecSamplingSep",m_tag,m_node); - if (m_lar->size()) { - m_rec = (*m_lar)[0]; - m_esep_zsep23 [0] = m_rec->getDouble("ZSEP23_0")*Gaudi::Units::cm; - m_esep_zsep23 [1] = m_rec->getDouble("ZSEP23_1")*Gaudi::Units::cm; - m_esep_zsep23 [2] = m_rec->getDouble("ZSEP23_2")*Gaudi::Units::cm; - m_esep_zsep23 [3] = m_rec->getDouble("ZSEP23_3")*Gaudi::Units::cm; - m_esep_zsep23 [4] = m_rec->getDouble("ZSEP23_4")*Gaudi::Units::cm; - m_esep_zsep23 [5] = m_rec->getDouble("ZSEP23_5")*Gaudi::Units::cm; - m_esep_zsep23 [6] = m_rec->getDouble("ZSEP23_6")*Gaudi::Units::cm; - m_esep_zsep23 [7] = m_rec->getDouble("ZSEP23_7")*Gaudi::Units::cm; - m_esep_zsep23 [8] = m_rec->getDouble("ZSEP23_8")*Gaudi::Units::cm; - m_esep_zsep23 [9] = m_rec->getDouble("ZSEP23_9")*Gaudi::Units::cm; - m_esep_zsep23 [10] = m_rec->getDouble("ZSEP23_10")*Gaudi::Units::cm; - m_esep_zsep23 [11] = m_rec->getDouble("ZSEP23_11")*Gaudi::Units::cm; - m_esep_zsep23 [12] = m_rec->getDouble("ZSEP23_12")*Gaudi::Units::cm; - m_esep_zsep23 [13] = m_rec->getDouble("ZSEP23_13")*Gaudi::Units::cm; - m_esep_zsep23 [14] = m_rec->getDouble("ZSEP23_14")*Gaudi::Units::cm; - m_esep_zsep23 [15] = m_rec->getDouble("ZSEP23_15")*Gaudi::Units::cm; - m_esep_zsep23 [16] = m_rec->getDouble("ZSEP23_16")*Gaudi::Units::cm; - m_esep_zsep23 [17] = m_rec->getDouble("ZSEP23_17")*Gaudi::Units::cm; - m_esep_zsep23 [18] = m_rec->getDouble("ZSEP23_18")*Gaudi::Units::cm; - m_esep_zsep23 [19] = m_rec->getDouble("ZSEP23_19")*Gaudi::Units::cm; - m_esep_zsep23 [20] = m_rec->getDouble("ZSEP23_20")*Gaudi::Units::cm; - m_esep_zsep23 [21] = m_rec->getDouble("ZSEP23_21")*Gaudi::Units::cm; - } - -} - -void -LArNumberHelper::db_nb_hec() -{ - - // ---- Set default : - /* - m_hec_in0 = 427.70*Gaudi::Units::cm; // z_start - m_hec_in1 = 455.75*Gaudi::Units::cm; // z_start+ 28.05*Gaudi::Units::cm - m_hec_in2 = 513.40*Gaudi::Units::cm; // z_start + 28.05*Gaudi::Units::cm + 26.8*Gaudi::Units::cm + 26.8*Gaudi::Units::cm + 4.05*Gaudi::Units::cm - m_hec_in3 = 562.70*Gaudi::Units::cm; // z_start + 28.05*Gaudi::Units::cm + 26.8*Gaudi::Units::cm + 26.8*Gaudi::Units::cm + 4.05*Gaudi::Units::cm - // + 25.9*Gaudi::Units::cm + 23.4*Gaudi::Units::cm - m_hec_gap = 4.05*Gaudi::Units::cm; // gap between the two HEC wheels - - // Comment from Sven Menke : - // I don't know why the the Nova Z_end is 2.5cm more, but the active - // volume must be the sum of all blocks plus the gap - thus it's 609.5*cm - m_hec_out = 609.5*Gaudi::Units::cm; // z_end - 2.5*Gaudi::Units::cm (or z_orig + all blocks) - */ - - //std::cout << " ----- in db_nb_hec tags are : " << m_tag << " " << m_node << std::endl; - - - // ---- Overwrite with real NOVA/Oracle numbers : - - m_lar = m_iAccessSvc->getRecordsetPtr("HadronicEndcap",m_tag,m_node); - - if (m_lar->size()) { - m_rec = (*m_lar)[0]; - - // HEC0 is Block0 - // Block0 = 1.25 cm Front Plate + - // 8 times (0.85 cm LAr gap + 2.50 cm Plate) = 28.05 cm - double Block0 = ( m_rec->getDouble("PLATE_0")/2. - + 8*(m_rec->getDouble("LARG") + m_rec->getDouble("PLATE_0")))*Gaudi::Units::cm; - - // HEC1 is Block1 + Block2 - // Block1 = 8 times (0.85 cm LAr gap + 2.50 cm Plate) - // = 26.80 cm - double Block1 = 8*(m_rec->getDouble("LARG") + m_rec->getDouble("PLATE_0"))*Gaudi::Units::cm; - double Block2 = Block1 ; - - // Gap = 4.05 cm - m_hec_gap = m_rec->getDouble("GAPWHL") *Gaudi::Units::cm; - - // HEC2 is Block 3 + Block 4 - // Block3 = 2.5 cm Front Plate + - // 4 times (0.85 cm LAr gap + 5.00 cm Plate) = 25.90 cm - double Block3 = ( m_rec->getDouble("PLATE_1")/2. - + 4*(m_rec->getDouble("LARG") + m_rec->getDouble("PLATE_1")))*Gaudi::Units::cm; - - // Block4 = 4 times (0.85 cm LAr gap + 5.00 cm Plate) = 23.40 cm - double Block4 = 4*(m_rec->getDouble("LARG") + m_rec->getDouble("PLATE_1"))*Gaudi::Units::cm; - - // HEC3 is Block 5 + Block 6 - double Block5 = Block4 ; - double Block6 = Block4; - - double zstart = m_rec->getDouble("ZSTART") *Gaudi::Units::cm; - - m_hec_in0 = zstart; - m_hec_in1 = m_hec_in0 + Block0 ; - m_hec_in2 = m_hec_in1 + Block1 + Block2 + m_hec_gap ; - m_hec_in3 = m_hec_in2 + Block3 + Block4; - m_hec_out = m_hec_in3 + Block5 + Block6; - } -} - -void -LArNumberHelper::db_nb_fcal() -{ - // decode_fcal(); // FCAL 3 per +- side - //std::cout << " ----- in db_nb_fcal tags are : " << m_tag << " " << m_node << std::endl; - -} - -void -LArNumberHelper::cart_to_cyl ( double x, double y, double z, - double& eta, double& phi, double& r ) -{ - HepGeom::Point3D<double> pt(x,y,z); - eta = pt.eta(); - phi = pt.phi(); - r = pt.perp(); -} - -double -LArNumberHelper::eta ( double r, double z ) -{ - return -log(tan(atan2(r,z)/2)); -} - - -void -LArNumberHelper::hard_em() -{ - - // Numbers are taken from DB, but still have to define which ones are used - // for what ! - - std::vector <double> z_loc_in; - std::vector <double> z_loc_out; - - for ( unsigned int i=0; i < m_em_id->region_hash_max(); i++ ) { - - int barrel_ec = abs( m_em_id->barrel_ec (m_region_id_em[i]) ); - int samp = m_em_id->sampling (m_region_id_em[i]); - int region = m_em_id->region (m_region_id_em[i]); - //int pos_neg = m_em_id->barrel_ec (m_region_id_em[i]); - - // Default - m_n_depth_em [i] = 0; - z_loc_in.resize( 0 ); - z_loc_out.resize( 0 ); - - // Barrel - if ( barrel_ec == 1 ) { - - if ( samp == 0) { - m_n_depth_em [i] = 1; - z_loc_in.resize( m_n_depth_em [i], (double) 0. ); - z_loc_out.resize( m_n_depth_em [i], (double) 0. ); - - z_loc_in [0] = m_emb_psin; - z_loc_out [0] = m_accg_rin_ac; - - } - - else if ( samp == 1) { - m_n_depth_em [i] = m_n_eta_em [i]; - z_loc_in.resize( m_n_depth_em [i], (double) 0. ); - z_loc_out.resize( m_n_depth_em [i], (double) 0. ); - - for (int n=0; n<m_n_depth_em [i]; n++) { - z_loc_in[n] = m_accg_rin_ac; - double where = m_eta_min_em[i]+n*m_deta_em[i]; - if ( where < m_acco_ee12[1] ) z_loc_out [n] = m_acco_rmx12[0]; - else if ( where < m_acco_ee12[2] ) z_loc_out [n] = m_acco_rmx12[1]; - else if ( where < m_acco_ee12[4] ) z_loc_out [n] = m_acco_rmx12[2]; - else if ( where < m_acco_ee12[5] ) z_loc_out [n] = m_acco_rmx12[4]; - else if ( where < m_acco_ee12[6] ) z_loc_out [n] = m_acco_rmx12[5]; - else z_loc_out[n] = m_acco_rmx12[6]; - } - - } - - else if ( samp == 2) { - m_n_depth_em [i] = m_n_eta_em [i]; - z_loc_in.resize( m_n_depth_em [i], (double) 0. ); - z_loc_out.resize( m_n_depth_em [i], (double) 0. ); - - for (int n=0; n<m_n_depth_em [i]; n++) { - double where = m_eta_min_em[i]+(n+0.5)*m_deta_em[i]; - if ( where < m_acco_ee12[1] ) z_loc_in [n] = m_acco_rmx12[0]; - else if ( where < m_acco_ee12[2] ) z_loc_in [n] = m_acco_rmx12[1]; - else if ( where < m_acco_ee12[4] ) z_loc_in [n] = m_acco_rmx12[2]; - else if ( where < m_acco_ee12[5] ) z_loc_in [n] = m_acco_rmx12[4]; - else if ( where < m_acco_ee12[6] ) z_loc_in [n] = m_acco_rmx12[5]; - else z_loc_in[n] = m_acco_rmx12[6]; - } - - for (int n=0; n<m_n_depth_em [i]; n++) { - if (n<53) z_loc_out[n] = m_acco_rmx23[n]; - else z_loc_out[n] = m_acco_rmx23[52]; - // this is wrong for the last 3 channels (z edge) ! - } - } - - else if ( samp == 3) { - m_n_depth_em [i] = m_n_eta_em [i]; - z_loc_in.resize( m_n_depth_em [i], (double) 0. ); - z_loc_out.resize( m_n_depth_em [i], (double) 0. ); - for (int n=0; n<m_n_depth_em [i]; n++) { - z_loc_out[n] = m_accg_rout_ac; - // this is wrong for the last 2 channels (z edge) ! - if (2*n<52) z_loc_in[n] = - (m_acco_rmx23[2*n]+m_acco_rmx23[2*n+1])/2.; - else z_loc_in[n] = m_acco_rmx23[52]; - } - } - } - - // EMEC-OW : numbers are from RD - - if ( barrel_ec == 2 ) { - - if ( samp == 0 ) { - m_n_depth_em [i] = 1; - z_loc_in.resize( m_n_depth_em [i], (double) 0.); - z_loc_out.resize( m_n_depth_em [i], (double) 0.); - z_loc_in [0] = m_emec_psin; - z_loc_out [0] = m_endg_zorig; - } - - if ( samp == 1 ) { - m_n_depth_em [i] = 1; - z_loc_in.resize( m_n_depth_em [i] , (double) 0.); - z_loc_out.resize( m_n_depth_em [i] , (double) 0.); - z_loc_in [0] = m_endg_zorig; - z_loc_out [0] = m_esep_zsep12; - } - - if ( samp == 2 && region == 0 ) { - m_n_depth_em [i] = 1; - z_loc_in.resize( m_n_depth_em [i] ); - z_loc_out.resize( m_n_depth_em [i] ); - z_loc_in [0] = m_esep_zsep12; - z_loc_out [0] = m_emec_out; - } - - if ( samp == 2 && region != 0 ) { - m_n_depth_em [i] = m_n_eta_em [i]; - z_loc_in.resize( m_n_depth_em [i], (double) 0.); - z_loc_out.resize( m_n_depth_em [i], (double) 0.); - for (int n=0; n<3; n++) { - z_loc_in [n] = m_esep_zsep12; - z_loc_out [n] = m_emec_out; - } - for (int n=3; n<m_n_depth_em [i]; n++) { - z_loc_in [n] = m_esep_zsep12; - int num = (n-3)/2; - if (num<20) z_loc_out [n] = m_esep_zsep23[num+2]; - else z_loc_out [n] = m_esep_zsep23[22]; - } - } - - if ( samp == 3 ) { - m_n_depth_em [i] = m_n_eta_em [i]; - z_loc_in.resize( m_n_depth_em [i], (double) 0.); - z_loc_out.resize( m_n_depth_em [i], (double) 0.); - for (int n=0; n<m_n_depth_em [i]; n++) { - z_loc_out [n] = m_emec_out; - if (n<20) z_loc_in [n] = m_esep_zsep23[n+2]; - else z_loc_in [n] = m_esep_zsep23[22]; - } - } - } - - // EMEC-IW - - if ( barrel_ec == 3 ) { - - if ( samp == 1 ) { - m_n_depth_em [i] = m_n_eta_em [i]; - z_loc_in.resize( m_n_depth_em [i], (double) 0.); - z_loc_out.resize( m_n_depth_em [i], (double) 0.); - for (int n=0; n<m_n_depth_em [i]; n++) { - z_loc_in [n] = m_endg_zorig; - if (n<7) z_loc_out [n] = m_esep_iw23[n]; - else z_loc_out [n] = m_esep_iw23[6]; - } - } - else if ( samp == 2 ) { - m_n_depth_em [i] = m_n_eta_em [i]; - z_loc_in.resize( m_n_depth_em [i], (double) 0.); - z_loc_out.resize( m_n_depth_em [i], (double) 0.); - for (int n=0; n<m_n_depth_em [i]; n++) { - if (n<7) z_loc_in [n] = m_esep_iw23[n]; - else z_loc_in [n] = m_esep_iw23[6]; - z_loc_out [n] = m_emb_iwout; - } - } - } - - // That's it : store result in official arrays - m_depth_em_in [i] = z_loc_in ; - m_depth_em_out [i] = z_loc_out; - - } - //std::cout << "LArNumberHelper::hard_em finished " << std::endl; - -} - -void -LArNumberHelper::hard_hec() -{ - - // Numbers are taken from DB, but still have to define which ones are used - // for what ! - - std::vector <double> z_loc_in; - std::vector <double> z_loc_out; - - for ( unsigned int i=0; i < m_hec_id->region_hash_max(); i++ ) { - - int samp = m_hec_id->sampling (m_region_id_hec[i]); - //int region = m_hec_id->region (m_region_id_hec[i]); - //int pos_neg = m_hec_id->pos_neg (m_region_id_hec[i]); - - m_n_depth_hec [i] = 1; - z_loc_in.resize( 1, (double) 0.); - z_loc_out.resize( 1, (double) 0.); - - if ( samp == 0 ) { - z_loc_in [0] = m_hec_in0; - z_loc_out [0] = m_hec_in1; - - } - else if ( samp == 1 ) { - z_loc_in [0] = m_hec_in1; - z_loc_out [0] = m_hec_in2-m_hec_gap; - - } - else if ( samp == 2 ) { - z_loc_in [0] = m_hec_in2; - z_loc_out [0] = m_hec_in3; - - } - else if ( samp == 3 ) { - z_loc_in [0] = m_hec_in3; - z_loc_out [0] = m_hec_out; - } - - // that's it : - m_depth_hec_in [i] = z_loc_in ; - m_depth_hec_out [i] = z_loc_out; - } -} - -void -LArNumberHelper::hard_fcal() -{ - - // Numbers are taken from DB, but still have to define which ones are used - // for what ! - - std::vector <double> z_loc_in; - z_loc_in.resize( 1, (double) 0.); - std::vector <double> z_loc_out; - z_loc_out.resize( 1, (double) 0.); - - // x and y are taken from drawings in the TDR - for ( unsigned int i=0; i < m_fcal_id->module_hash_max(); i++ ) { - m_x_min_fcal [i] = 8.6*Gaudi::Units::cm; - m_x_max_fcal [i] = 47.5*Gaudi::Units::cm; - m_y_min_fcal [i] = 8.6; - m_y_max_fcal [i] = 47.5*Gaudi::Units::cm; - m_phi_min_fcal[i] = 0.; - m_phi_max_fcal[i] = 6.28; // when too close to 2pi pb - - m_n_depth_fcal [i] = 1; - - int mod = m_fcal_id->module (m_region_id_fcal[i]); - //int pos_neg = m_fcal_id->pos_neg (m_region_id_fcal[i]); - - if ( mod == 1 ) { - m_dx_fcal [i] = 3.*Gaudi::Units::cm; - m_dy_fcal [i] = 2.598*Gaudi::Units::cm; - z_loc_in [0] = 466.85*Gaudi::Units::cm; - z_loc_out [0] = z_loc_in [0]+45.*Gaudi::Units::cm; - - } - else if ( mod == 2 ) { - m_dx_fcal [i] = 3.272*Gaudi::Units::cm; - m_dy_fcal [i] = 4.25*Gaudi::Units::cm; - z_loc_in [0] = 512.3*Gaudi::Units::cm; - z_loc_out [0] = z_loc_in [0]+45.*Gaudi::Units::cm; - - } - else if ( mod == 3 ) { - m_dx_fcal [i] = 5.4*Gaudi::Units::cm; - m_dy_fcal [i] = 4.677*Gaudi::Units::cm; - z_loc_in [0] = 559.75*Gaudi::Units::cm; - z_loc_out [0] = z_loc_in [0]+45.*Gaudi::Units::cm; - - } - else { - m_dx_fcal [i] = 0.; - m_dy_fcal [i] = 0.; - z_loc_in [0] = 0.; - z_loc_out [0] = z_loc_in [0]+45.*Gaudi::Units::cm; - } - - m_z_min_fcal [i] = z_loc_in [0]; - m_z_max_fcal [i] = m_z_min_fcal [i] + 45.*Gaudi::Units::cm ; - - double z = m_z_min_fcal [i]; - double r = m_x_max_fcal [i]; - m_eta_min_fcal[i] = -log(tan(atan2(r,z)/2)); - z = m_z_max_fcal [i]; - r = m_x_min_fcal [i]; - m_eta_max_fcal[i] = -log(tan(atan2(r,z)/2)); - - m_depth_fcal_in [i] = z_loc_in ; - m_depth_fcal_out [i] = z_loc_out; - - } -} - -// Parameters needed for sagging -void -LArNumberHelper::sagging_param( std::vector<double>& Rhocen, std::vector<double>& Sag ) -{ - Rhocen.clear(); - Sag.clear(); - - m_lar = m_iAccessSvc->getRecordsetPtr("BarrelGeometry",m_tag,m_node); - - if (m_lar->size()) { - m_rec = (*m_lar)[0]; - - Rhocen.push_back(m_rec->getDouble("RHOCEN_0")*Gaudi::Units::cm); - Rhocen.push_back(m_rec->getDouble("RHOCEN_1")*Gaudi::Units::cm); - Rhocen.push_back(m_rec->getDouble("RHOCEN_2")*Gaudi::Units::cm); - Rhocen.push_back(m_rec->getDouble("RHOCEN_3")*Gaudi::Units::cm); - Rhocen.push_back(m_rec->getDouble("RHOCEN_4")*Gaudi::Units::cm); - Rhocen.push_back(m_rec->getDouble("RHOCEN_5")*Gaudi::Units::cm); - Rhocen.push_back(m_rec->getDouble("RHOCEN_6")*Gaudi::Units::cm); - Rhocen.push_back(m_rec->getDouble("RHOCEN_7")*Gaudi::Units::cm); - Rhocen.push_back(m_rec->getDouble("RHOCEN_8")*Gaudi::Units::cm); - Rhocen.push_back(m_rec->getDouble("RHOCEN_9")*Gaudi::Units::cm); - Rhocen.push_back(m_rec->getDouble("RHOCEN_10")*Gaudi::Units::cm); - Rhocen.push_back(m_rec->getDouble("RHOCEN_11")*Gaudi::Units::cm); - Rhocen.push_back(m_rec->getDouble("RHOCEN_12")*Gaudi::Units::cm); - Rhocen.push_back(m_rec->getDouble("RHOCEN_13")*Gaudi::Units::cm); - Rhocen.push_back(m_rec->getDouble("RHOCEN_14")*Gaudi::Units::cm); - } - - m_lar = m_iAccessSvc->getRecordsetPtr("BarrelSagging",m_tag,m_node); - - if (m_lar->size()) { - m_rec = (*m_lar)[0]; - - Sag.push_back(m_rec->getDouble("SAG_0")*Gaudi::Units::cm); - Sag.push_back(m_rec->getDouble("SAG_1")*Gaudi::Units::cm); - Sag.push_back(m_rec->getDouble("SAG_2")*Gaudi::Units::cm); - Sag.push_back(m_rec->getDouble("SAG_3")*Gaudi::Units::cm); - Sag.push_back(m_rec->getDouble("SAG_4")*Gaudi::Units::cm); - Sag.push_back(m_rec->getDouble("SAG_5")*Gaudi::Units::cm); - Sag.push_back(m_rec->getDouble("SAG_6")*Gaudi::Units::cm); - Sag.push_back(m_rec->getDouble("SAG_7")*Gaudi::Units::cm); - Sag.push_back(m_rec->getDouble("SAG_8")*Gaudi::Units::cm); - Sag.push_back(m_rec->getDouble("SAG_9")*Gaudi::Units::cm); - Sag.push_back(m_rec->getDouble("SAG_10")*Gaudi::Units::cm); - Sag.push_back(m_rec->getDouble("SAG_11")*Gaudi::Units::cm); - Sag.push_back(m_rec->getDouble("SAG_12")*Gaudi::Units::cm); - Sag.push_back(m_rec->getDouble("SAG_13")*Gaudi::Units::cm); - Sag.push_back(m_rec->getDouble("SAG_14")*Gaudi::Units::cm); - - } - -} - -Identifier -LArNumberHelper::region_id_em(int i) -{ return m_region_id_em[i]; } - -int -LArNumberHelper::n_eta_em(int i) -{ return m_n_eta_em[i]; } - -int -LArNumberHelper::n_phi_em(int i) -{ return m_n_phi_em[i]; } - -double -LArNumberHelper::deta_em(int i) -{ return m_deta_em[i]; } - -double -LArNumberHelper::dphi_em(int i) -{ return m_dphi_em[i]; } - -int -LArNumberHelper::sign_em(int i) -{ return m_sign_em[i]; } - -double -LArNumberHelper::eta_min_em(int i) -{ return m_eta_min_em[i]; } - -double -LArNumberHelper::eta_max_em(int i) -{ return m_eta_max_em[i]; } - -double -LArNumberHelper::phi_min_em(int i) -{ return m_phi_min_em[i]; } - -double -LArNumberHelper::phi_max_em(int i) -{ return m_phi_max_em[i]; } - -int -LArNumberHelper::n_depth_em(int i) -{ return m_n_depth_em[i]; } - -double -LArNumberHelper::depth_em_in(int i, int j) -{ return m_depth_em_in[i][j]; } - -double -LArNumberHelper::depth_em_out(int i, int j) -{ return m_depth_em_out[i][j]; } - -Identifier -LArNumberHelper::region_id_hec(int i) -{ return m_region_id_hec[i]; } - -int -LArNumberHelper::n_eta_hec(int i) -{ return m_n_eta_hec[i]; } - -int -LArNumberHelper::n_phi_hec(int i) -{ return m_n_phi_hec[i]; } - -double -LArNumberHelper::deta_hec(int i) -{ return m_deta_hec[i]; } - -double -LArNumberHelper::dphi_hec(int i) -{ return m_dphi_hec[i]; } - -int -LArNumberHelper::sign_hec(int i) -{ return m_sign_hec[i]; } - -double -LArNumberHelper::eta_min_hec(int i) -{ return m_eta_min_hec[i]; } - -double -LArNumberHelper::eta_max_hec(int i) -{ return m_eta_max_hec[i]; } - -double -LArNumberHelper::phi_min_hec(int i) -{ return m_phi_min_hec[i]; } - -double -LArNumberHelper::phi_max_hec(int i) -{ return m_phi_max_hec[i]; } - -int -LArNumberHelper::n_depth_hec(int i) -{ return m_n_depth_hec[i]; } - -double -LArNumberHelper::depth_hec_in(int i, int j) -{ return m_depth_hec_in[i][j]; } - -double -LArNumberHelper::depth_hec_out(int i, int j) -{ return m_depth_hec_out[i][j]; } - -Identifier -LArNumberHelper::region_id_fcal(int i) -{ return m_region_id_fcal[i]; } - -int -LArNumberHelper::n_eta_fcal(int i) -{ return m_n_eta_fcal[i]; } - -int -LArNumberHelper::n_phi_fcal(int i) -{ return m_n_phi_fcal[i]; } - -double -LArNumberHelper::deta_fcal(int i) -{ return m_deta_fcal[i]; } - -double -LArNumberHelper::dphi_fcal(int i) -{ return m_dphi_fcal[i]; } - -int -LArNumberHelper::sign_fcal(int i) -{ return m_sign_fcal[i]; } - -double -LArNumberHelper::x_min_fcal(int i) -{ return m_x_min_fcal[i]; } - -double -LArNumberHelper::x_max_fcal(int i) -{ return m_x_max_fcal[i]; } - -double -LArNumberHelper::dx_fcal(int i) -{ return m_dx_fcal[i]; } - -double -LArNumberHelper::y_min_fcal(int i) -{ return m_y_min_fcal[i]; } - -double -LArNumberHelper::y_max_fcal(int i) -{ return m_y_max_fcal[i]; } - -double -LArNumberHelper::dy_fcal(int i) -{ return m_dy_fcal[i]; } - -double -LArNumberHelper::z_min_fcal(int i) -{ return m_z_min_fcal[i]; } - -double -LArNumberHelper::z_max_fcal(int i) -{ return m_z_max_fcal[i]; } - -double -LArNumberHelper::eta_min_fcal(int i) -{ return m_eta_min_fcal[i]; } - -double -LArNumberHelper::eta_max_fcal(int i) -{ return m_eta_max_fcal[i]; } - -double -LArNumberHelper::phi_min_fcal(int i) -{ return m_phi_min_fcal[i]; } - -double -LArNumberHelper::phi_max_fcal(int i) -{ return m_phi_max_fcal[i]; } - -int -LArNumberHelper::n_depth_fcal(int i) -{ return m_n_depth_fcal[i]; } - -double -LArNumberHelper::depth_fcal_in(int i, int j) -{ return m_depth_fcal_in[i][j]; } - -double -LArNumberHelper::depth_fcal_out(int i, int j) -{ return m_depth_fcal_out[i][j]; } diff --git a/LArCalorimeter/LArDetDescr/src/LArRecoMaterialTool.cxx b/LArCalorimeter/LArDetDescr/src/LArRecoMaterialTool.cxx index 94b6277869a7f5a098cd9d2179de8cd110afd784..dee1c566cd9722015f8cb730209936e8014ec735 100755 --- a/LArCalorimeter/LArDetDescr/src/LArRecoMaterialTool.cxx +++ b/LArCalorimeter/LArDetDescr/src/LArRecoMaterialTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // *************************************************************************** @@ -22,7 +22,6 @@ #include "GeoModelKernel/Units.h" #include "GaudiKernel/SystemOfUnits.h" -#include "CaloIdentifier/CaloIdManager.h" #include "CaloIdentifier/CaloCell_ID.h" #include "CaloIdentifier/CaloDM_ID.h" @@ -46,10 +45,8 @@ LArRecoMaterialTool::LArRecoMaterialTool(const std::string& type, StatusCode LArRecoMaterialTool::initialize() { - // Retrieve the Id helpers needed - const CaloIdManager* mgr = CaloIdManager::instance(); - m_calo_id = mgr->getCaloCell_ID(); - m_dm_id = mgr->getDM_ID(); + ATH_CHECK( detStore()->retrieve (m_calo_id, "CaloCell_ID") ); + ATH_CHECK( detStore()->retrieve (m_dm_id, "CaloDM_ID") ); // These vectors will contain the results : m_alignvol_number.resize(0); diff --git a/LArCalorimeter/LArDetDescr/src/LArRecoSimpleGeomTool.cxx b/LArCalorimeter/LArDetDescr/src/LArRecoSimpleGeomTool.cxx index 7fd73c48e248926d1256a6a139620b3d5a40d9da..7d6d47655976c45273d8b879259a58966bd5e0f5 100755 --- a/LArCalorimeter/LArDetDescr/src/LArRecoSimpleGeomTool.cxx +++ b/LArCalorimeter/LArDetDescr/src/LArRecoSimpleGeomTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // *************************************************************************** @@ -12,11 +12,9 @@ #include "GaudiKernel/Property.h" #include "GaudiKernel/IService.h" #include "GaudiKernel/IToolSvc.h" -#include "StoreGate/StoreGate.h" #include "StoreGate/StoreGateSvc.h" #include <vector> -#include "CaloIdentifier/CaloIdManager.h" #include "CaloDetDescr/CaloDetDescriptor.h" #include "CaloGeoHelpers/CaloPhiRange.h" @@ -52,9 +50,7 @@ StatusCode LArRecoSimpleGeomTool::initialize() { // Retrieve the Id helpers needed - const CaloIdManager* mgr = CaloIdManager::instance(); - m_calo_id = mgr->getCaloCell_ID(); - + ATH_CHECK( detStore()->retrieve (m_calo_id, "CaloCell_ID") ); // Decode tag ( via GeoModel ) and fix it for TestBeam : m_tag = "ATLAS-00"; diff --git a/LArCalorimeter/LArExample/LArCalibProcessing/CMakeLists.txt b/LArCalorimeter/LArExample/LArCalibProcessing/CMakeLists.txt index b119036e72b99560d8d43e2a1cb495422d13e265..a59ea727020962baa1f7bb168c6bc752e9b0cde7 100644 --- a/LArCalorimeter/LArExample/LArCalibProcessing/CMakeLists.txt +++ b/LArCalorimeter/LArExample/LArCalibProcessing/CMakeLists.txt @@ -9,6 +9,9 @@ atlas_subdir( LArCalibProcessing ) atlas_depends_on_subdirs( PRIVATE TestPolicy ) +# Necessary external(s): +find_package( cx_Oracle ) + # Install files from the package: atlas_install_python_modules( python/*.py ) atlas_install_joboptions( share/*.py ) diff --git a/LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelPresamplerCalculator.cxx b/LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelPresamplerCalculator.cxx index aefc7478944d949c84a20dcfc7d79bed38a17a21..9370663a1c6571f968fca5abcfc6517148f6df84 100644 --- a/LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelPresamplerCalculator.cxx +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/LArBarrelPresamplerCalculator.cxx @@ -301,15 +301,15 @@ G4bool LArBarrelPresamplerCalculator::Process(const G4Step* a_step, std::vector< #ifdef DEBUGSTEP ATH_MSG_DEBUG(" set current map for module " << imodule); #endif - m_psmap->SetMap(imodule); - if (!(m_psmap->Map())) { + CurrMap* cm = m_psmap->GetMap(imodule); + if (!cm) { ATH_MSG_INFO(" LArBarrelPresamplerCalculator: cannot get map for module " << imodule); continue; } double current0,current1,current2,gap; // get information from current map - m_psmap->Map()->GetAll(x0,y0,&gap,¤t0,¤t1,¤t2); + cm->GetAll(x0,y0,&gap,¤t0,¤t1,¤t2); #ifdef DEBUGSTEP ATH_MSG_DEBUG(" module,x0,y0,current0 from map " << imodule << " " << x0 << " " << y0 << " " << current0); #endif diff --git a/LArCalorimeter/LArG4/LArG4Barrel/src/PsMap.cxx b/LArCalorimeter/LArG4/LArG4Barrel/src/PsMap.cxx index e2dd318920697eced6684b4bf511c9098bd6aa8d..ed4ae3aac4ee369ee4ab4782abbdcf6d9d15c7a6 100644 --- a/LArCalorimeter/LArG4/LArG4Barrel/src/PsMap.cxx +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/PsMap.cxx @@ -13,7 +13,6 @@ PsMap* PsMap::s_thePointer=nullptr; PsMap::PsMap() { - m_module=-1; m_directory="/afs/cern.ch/atlas/offline/data/lar/calo_data"; #ifndef LARG4_STAND_ALONE @@ -39,7 +38,6 @@ PsMap::PsMap() int code=imap; m_theMap[code]=cm; } - m_curr=0; } @@ -58,10 +56,8 @@ void PsMap::Reset() } } -void PsMap::SetMap(int module) +CurrMap* PsMap::GetMap(int module) const { - if (m_module==module) return; - m_module=module; // module 0 and 1 have their own maps (code = 0 and 1) // module 2 and 3 have the same map (same geometry) with code 2 // module 4 and 5 have the same map (same geometry) with code 3 @@ -69,11 +65,12 @@ void PsMap::SetMap(int module) int code = -1; if (module==0 || module==1) code=module; if (module > 1 && module < 8) code=(module-2)/2 + 2; - if (m_theMap.find(code) != m_theMap.end()) - m_curr = m_theMap[code]; + auto it = m_theMap.find(code); + if (it != m_theMap.end()) + return it->second; else { - std::cout << " Code " << code << " not found in map ..." << std::endl; - m_curr=0; + std::cout << " Code " << module << " not found in map ..." << std::endl; + return nullptr; } } diff --git a/LArCalorimeter/LArG4/LArG4Barrel/src/PsMap.h b/LArCalorimeter/LArG4/LArG4Barrel/src/PsMap.h index f3bec25de942ce32f7cbc5cdb921196802330252..c5962bfc8bc6cf74ca2146adbf40dddcbbd6d5c4 100644 --- a/LArCalorimeter/LArG4/LArG4Barrel/src/PsMap.h +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/PsMap.h @@ -19,15 +19,11 @@ class PsMap { static PsMap* GetPsMap(); void SetDirectory(std::string dir); void Reset(); - void SetMap(int module); - CurrMap* Map() const {return m_curr;} + CurrMap* GetMap (int module) const; private: PsMap(); static PsMap* s_thePointer; curr_map m_theMap; std::string m_directory; -// current map info - CurrMap* m_curr; - int m_module; }; #endif // LARG4BARREL_PsMap_h diff --git a/LArCalorimeter/LArG4/LArG4FCAL/ATLAS_CHECK_THREAD_SAFETY b/LArCalorimeter/LArG4/LArG4FCAL/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..a12b3f4ada35df049db27a44f000b66583d545a6 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4FCAL/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +LArCalorimeter/LArG4/LArG4FCAL diff --git a/LArCalorimeter/LArG4/LArG4HEC/ATLAS_CHECK_THREAD_SAFETY b/LArCalorimeter/LArG4/LArG4HEC/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..0be6fbada7b1842b477a91b5715ea403130455ab --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4HEC/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +LArCalorimeter/LArG4/LArG4HEC diff --git a/LArCalorimeter/LArG4/LArG4HEC/src/HECGeometry.cc b/LArCalorimeter/LArG4/LArG4HEC/src/HECGeometry.cc index 8c05dccac2bebac10397cfb335a2002e727b3ad6..e0e38363bb59543287f943a8230a64c2bfe5baad 100644 --- a/LArCalorimeter/LArG4/LArG4HEC/src/HECGeometry.cc +++ b/LArCalorimeter/LArG4/LArG4HEC/src/HECGeometry.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // LArG4::HEC::HECGeometry @@ -215,7 +215,7 @@ namespace LArG4 { G4StepPoint* pre_step_point = a_step->GetPreStepPoint(); Point3D<double> globalPosition = pre_step_point->GetPosition(); - G4TouchableHistory* theTouchable = (G4TouchableHistory*) (pre_step_point->GetTouchable()); + const G4TouchableHistory* theTouchable = static_cast<const G4TouchableHistory*>(pre_step_point->GetTouchable()); G4String volumeName = theTouchable->GetVolume()->GetName() ; // Do the following only once - to determine the G4 history-depth of the wheel coordinates diff --git a/LArCalorimeter/LArG4/LArG4HEC/src/LocalCalibrationCalculator.cc b/LArCalorimeter/LArG4/LArG4HEC/src/LocalCalibrationCalculator.cc index 960b2dddb6fe62d8d1bdd8ce6fd22ee07efe52e6..914abae827232da886f6eda77d6c4206fdb6e1c2 100644 --- a/LArCalorimeter/LArG4/LArG4HEC/src/LocalCalibrationCalculator.cc +++ b/LArCalorimeter/LArG4/LArG4HEC/src/LocalCalibrationCalculator.cc @@ -92,7 +92,7 @@ namespace LArG4 { { // Calculate the identifier. G4StepPoint* pre_step_point = step->GetPreStepPoint(); - G4TouchableHistory* theTouchable = (G4TouchableHistory*) (pre_step_point->GetTouchable()); + const G4TouchableHistory* theTouchable = static_cast<const G4TouchableHistory*>(pre_step_point->GetTouchable()); // Volume name G4String hitVolume = theTouchable->GetVolume(0)->GetName(); #ifdef DEBUG_HITS diff --git a/LArCalorimeter/LArG4/LArG4HEC/src/LocalGeometry.cc b/LArCalorimeter/LArG4/LArG4HEC/src/LocalGeometry.cc index 2d00aa44423e5421f0005c57277a0dd3a3700a50..69c7d732701044ab49a970fac91dd3a6941878f2 100644 --- a/LArCalorimeter/LArG4/LArG4HEC/src/LocalGeometry.cc +++ b/LArCalorimeter/LArG4/LArG4HEC/src/LocalGeometry.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // LArG4::HEC::LocalGeometry @@ -192,7 +192,7 @@ namespace LArG4 { // We can extract our position from the copy number of depth and module - G4TouchableHistory* theTouchable = (G4TouchableHistory*) (pre_step_point->GetTouchable()); + const G4TouchableHistory* theTouchable = static_cast<const G4TouchableHistory*>(pre_step_point->GetTouchable()); // Get local coordinates of the step, independently of how it was positioned in World G4AffineTransform transformation; diff --git a/LArCalorimeter/LArG4/LArG4SD/CMakeLists.txt b/LArCalorimeter/LArG4/LArG4SD/CMakeLists.txt index 6862c144102b12f92bf97298ed764c8dcaa1bf29..a325797ad478f818bb31d427a087aac6553b615c 100644 --- a/LArCalorimeter/LArG4/LArG4SD/CMakeLists.txt +++ b/LArCalorimeter/LArG4/LArG4SD/CMakeLists.txt @@ -24,6 +24,11 @@ atlas_add_component( LArG4SD INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} CaloG4SimLib GaudiKernel LArG4Code ) + +atlas_add_test( LArG4SDToolConfig_test + SCRIPT test/LArG4SDToolConfig_test.py + PROPERTIES TIMEOUT 300 ) + # Install files from the package: #atlas_install_headers( LArG4SD ) atlas_install_python_modules( python/*.py ) diff --git a/LArCalorimeter/LArG4/LArG4SD/python/LArG4SDToolConfig.py b/LArCalorimeter/LArG4/LArG4SD/python/LArG4SDToolConfig.py new file mode 100644 index 0000000000000000000000000000000000000000..125467b1d6c1456d49cf899198edd6ecb2a5c5cd --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4SD/python/LArG4SDToolConfig.py @@ -0,0 +1,289 @@ +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + +from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator +from ISF_Algorithms.collection_merger_helpersNew import CollectionMergerCfg + +from LArG4SD.LArG4SDConf import LArG4__EMBSDTool +from LArG4SD.LArG4SDConf import LArG4__EMECSDTool +from LArG4SD.LArG4SDConf import LArG4__FCALSDTool + +def getLArActiveSensitiveDetector(name="LArActiveSensitiveDetector", **kwargs): + ## Main configuration + from G4AtlasApps.SimFlags import simFlags + if simFlags.SimLayout.get_Value() not in ["tb_LArH6_2003","tb_LArH6_2002"]: + kwargs.setdefault("StacVolumes",["LArMgr::LAr::EMB::STAC"]) + kwargs.setdefault("PresamplerVolumes",["LArMgr::LAr::Barrel::Presampler::Module"]) + kwargs.setdefault("NegIWVolumes",["LArMgr::LAr::EMEC::Neg::InnerWheel"]) + kwargs.setdefault("NegOWVolumes",["LArMgr::LAr::EMEC::Neg::OuterWheel"]) + kwargs.setdefault("BOBarretteVolumes",["LArMgr::LAr::EMEC::BackOuterBarrette::Module::Phidiv"]) + kwargs.setdefault("MiniVolumes",["LArMgr::MiniFCAL::Wafer"]) + if simFlags.SimLayout.get_Value()!="tb_LArH6_2003": + kwargs.setdefault("PosIWVolumes",["LArMgr::LAr::EMEC::Pos::InnerWheel"]) + kwargs.setdefault("PosOWVolumes",["LArMgr::LAr::EMEC::Pos::OuterWheel"]) + kwargs.setdefault("PresVolumes", ["LArMgr::LAr::Endcap::Presampler::LiquidArgon"]) + kwargs.setdefault("SliceVolumes",["LArMgr::LAr::HEC::Module::Depth::Slice"]) + if simFlags.SimLayout.get_Value() not in ["tb_LArH6_2002"]: + kwargs.setdefault("FCAL1Volumes",["LArMgr::LAr::FCAL::Module1::Gap"]) + kwargs.setdefault("FCAL2Volumes",["LArMgr::LAr::FCAL::Module2::Gap"]) + kwargs.setdefault("FCAL3Volumes",["LArMgr::LAr::FCAL::Module3::Gap"]) + # Running PID calibration hits? + kwargs.setdefault("ParticleID",simFlags.ParticleID()) + # No effect currently + kwargs.setdefault("OutputCollectionNames", ["LArCalibrationHitActive"]) + return CfgMgr.LArG4__ActiveSDTool(name, **kwargs) + +def getLArDeadSensitiveDetector(name="LArDeadSensitiveDetector", **kwargs): + ## Main configuration + kwargs.setdefault("BarrelCryVolumes", ["LArMgr::LAr::Barrel::Cryostat::InnerWall::Vis", + "LArMgr::LAr::Barrel::Cryostat::Sector::*", + "LArMgr::LAr::Barrel::Cryostat::InnerWall", + "LArMgr::LAr::Barrel::Cryostat::Cylinder::*"]) + kwargs.setdefault("BarrelCryLArVolumes",["LArMgr::LAr::Barrel::Cryostat::ExtraMat*", + "LArMgr::LAr::Barrel::Cryostat::HalfLAr*", + "LArMgr::LAr::Barrel::Cryostat::TotalLAr", + "LArMgr::LAr::Barrel::Cryostat::MotherVolume"]) + kwargs.setdefault("BarrelCryMixVolumes",["LArMgr::LAr::Barrel::Cryostat::InnerEndWall", + "LArMgr::LAr::Barrel::Cryostat::OuterWall", + "LArMgr::LAr::Barrel::Cryostat::Mixed::Cylinder::*"]) + kwargs.setdefault("DeadMaterialVolumes",["LArMgr::LAr::DM::*"]) + kwargs.setdefault("BarrelPresVolumes", ["LArMgr::LAr::Barrel::Presampler", + "LArMgr::LAr::Barrel::Presampler::Sector", + "LArMgr::LAr::Barrel::Presampler::ProtectionShell", + "LArMgr::LAr::Barrel::Presampler::MotherBoard", + "LArMgr::LAr::Barrel::Presampler::Connectics", + "LArMgr::LAr::Barrel::Presampler::Rail", + "LArMgr::LAr::Barrel::Presampler::ProtectionPlate"]) + kwargs.setdefault("BarrelVolumes", ["LArMgr::LAr::EMB::ExtraMat*", + "LArMgr::LAr::EMB::FrontBack::Absorber", + "LArMgr::LAr::EMB::FrontBack::Absorber2", + "LArMgr::LAr::EMB::FrontBack::Steel", + "LArMgr::LAr::EMB::FrontBack::G10", + "LArMgr::LAr::EMB::FrontBack::Electrode", + "LArMgr::LAr::EMB::GTENB", + "LArMgr::LAr::EMB::GTENF", + "LArMgr::LAr::EMB::SUMB", + "LArMgr::LAr::EMB::CAAC", + "LArMgr::LAr::EMB::MOAC", + "LArMgr::LAr::EMB::TELB", + "LArMgr::LAr::EMB::TELF", + "LArMgr::LAr::EMB::ECAM"]) + kwargs.setdefault("ECCryVolumes", ["LArMgr::LAr::Endcap::Cryostat::FcalLAr::Cylinder", + "LArMgr::LAr::Endcap::Cryostat::EmecHecLAr::Sector", + "LArMgr::LAr::Endcap::Cryostat::EmecHecLAr::Cylinder", + "LArMgr::LAr::Endcap::Cryostat::Sector", + "LArMgr::LAr::Endcap::Cryostat::Cone", + "LArMgr::LAr::Endcap::Cryostat::Cylinder"]) + kwargs.setdefault("ECCryLArVolumes", ["LArMgr::Moderator*", + "LArMgr::LAr::Endcap::Cryostat::FcalLAr", + "LArMgr::LAr::Endcap::Cryostat::EmecHecLAr", + "LArMgr::LAr::Endcap::Cryostat::MotherVolume"]) + kwargs.setdefault("ECCryMixVolumes", ["LArMgr::LAr::FCAL::LiquidArgonC", + "LArMgr::LAr::Endcap::Cryostat::EmecHecLAr::Sector::Mixed", + "LArMgr::LAr::Endcap::Cryostat::Sector::Mixed", + "LArMgr::LAr::Endcap::Cryostat::Cone::Mixed", + "LArMgr::LAr::Endcap::Cryostat::ExtraCyl_beforePS", + "LArMgr::LAr::Endcap::Cryostat::Cylinder::Mixed"]) + kwargs.setdefault("ECSupportVolumes", ["LArMgr::LAr::EMEC::ExtraCyl_afterPS", + "LArMgr::LAr::EMEC::InnerTransversalBars", + "LArMgr::LAr::EMEC::InnerAluCone::*", + "LArMgr::LAr::EMEC::OuterTransversalBars", + "LArMgr::LAr::EMEC::OuterSupportMother", + "LArMgr::LAr::EMEC::*Stretchers", + "LArMgr::LAr::EMEC::Top*", + "LArMgr::LAr::EMEC::Back*GTen", + "LArMgr::LAr::EMEC::Back*Hole", + "LArMgr::LAr::EMEC::Back*Bar", + "LArMgr::LAr::EMEC::Back*Ring", + "LArMgr::LAr::EMEC::Back*Ele", + "LArMgr::LAr::EMEC::Back*Abs", + "LArMgr::LAr::EMEC::BackInnerBarrette::Module::Phidiv", + "LArMgr::LAr::EMEC::Back*Barrette::Module", + "LArMgr::LAr::EMEC::Back*Barrettes", + "LArMgr::LAr::EMEC::BackSupport*", + "LArMgr::LAr::EMEC::Front*", + "LArMgr::LAr::EMEC::Mother*"]) + kwargs.setdefault("HECWheelVolumes", ["LArMgr::LAr::HEC::Mother", + "LArMgr::LAr::HEC::LiquidArgon", + "LArMgr::LAr::HEC::Clamp", + "LArMgr::LAr::HEC::Clamp::LiquidArgon", + "LArMgr::LAr::HEC::Module", + "LArMgr::LAr::HEC::FrontModule", + "LArMgr::LAr::HEC::RearModule", + "LArMgr::LAr::HEC::Module::Depth", + "LArMgr::LAr::HEC::Module::Depth::FirstAbsorber", + "LArMgr::LAr::HEC::Module::Depth::FirstAbsorber::TieRod"]) + # Running PID calibration hits? + from G4AtlasApps.SimFlags import simFlags + kwargs.setdefault("ParticleID",simFlags.ParticleID()) + kwargs.setdefault("doEscapedEnergy",simFlags.CalibrationRun.get_Value()!='DeadLAr') + # No effect currently + outputCollectionName = "LArCalibrationHitDeadMaterial" + from G4AtlasApps.SimFlags import simFlags + if simFlags.CalibrationRun.get_Value() in ['LAr', 'LAr+Tile']: + outputCollectionName = "LArCalibrationHitDeadMaterial_DEAD" + kwargs.setdefault("HitCollectionName", outputCollectionName) + return CfgMgr.LArG4__DeadSDTool(name, **kwargs) + +def LArEMBSensitiveDetectorCfg(ConfigFlags,name="LArEMBSensitiveDetector", **kwargs): + + result = ComponentAccumulator() + bare_collection_name = "LArHitEMB" + mergeable_collection_suffix = "_G4" + merger_input_property = "LArEMBHits" + acc, hits_collection_name = CollectionMergerCfg(ConfigFlags, bare_collection_name, + mergeable_collection_suffix, + merger_input_property) + ## Main configuration + kwargs.setdefault("StacVolumes",["LArMgr::LAr::EMB::STAC"]) + kwargs.setdefault("PresamplerVolumes",["LArMgr::LAr::Barrel::Presampler::Module"]) + kwargs.setdefault("OutputCollectionNames", [hits_collection_name]) + + # Hook for fast simulation + #from G4AtlasApps.SimFlags import simFlags + #kwargs.setdefault("UseFrozenShowers", simFlags.LArParameterization()>0) + + #Note - frozen showers to be migrated later + + result.merge(acc) + return result, LArG4__EMBSDTool(name, **kwargs) + +def LArEMECSensitiveDetectorCfg(ConfigFlags, name="LArEMECSensitiveDetector", **kwargs): + result = ComponentAccumulator() + bare_collection_name = "LArHitEMEC" + mergeable_collection_suffix = "_G4" + merger_input_property = "LArEMECHits" + acc, hits_collection_name = CollectionMergerCfg(ConfigFlags, bare_collection_name, + mergeable_collection_suffix, + merger_input_property) + + if ConfigFlags.GeoModel.AtlasVersion not in ["tb_LArH6_2002","tb_LArH6EC_2002"]: + kwargs.setdefault("NegIWVolumes",["LArMgr::LAr::EMEC::Neg::InnerWheel"]) + kwargs.setdefault("NegOWVolumes",["LArMgr::LAr::EMEC::Neg::OuterWheel"]) + kwargs.setdefault("BOBarretteVolumes",["LArMgr::LAr::EMEC::BackOuterBarrette::Module::Phidiv"]) + if ConfigFlags.GeoModel.AtlasVersion !="tb_LArH6EC_2002": + kwargs.setdefault("PosIWVolumes",["LArMgr::LAr::EMEC::Pos::InnerWheel"]) + kwargs.setdefault("PosOWVolumes",["LArMgr::LAr::EMEC::Pos::OuterWheel"]) + kwargs.setdefault("PresVolumes", ["LArMgr::LAr::Endcap::Presampler::LiquidArgon"]) + kwargs.setdefault("OutputCollectionNames", [hits_collection_name]) + + # Hook for fast simulation + #kwargs.setdefault("UseFrozenShowers", simFlags.LArParameterization()>0) + + #Note - frozen showers to be migrated later + + result.merge(acc) + return result, LArG4__EMECSDTool(name, **kwargs) + +def LArFCALSensitiveDetectorCfg(ConfigFlags, name="LArFCALSensitiveDetector", **kwargs): + result = ComponentAccumulator() + bare_collection_name = "LArHitFCAL" + mergeable_collection_suffix = "_G4" + merger_input_property = "LArFCALHits" + acc, hits_collection_name = CollectionMergerCfg(ConfigFlags, bare_collection_name, + mergeable_collection_suffix, + merger_input_property) + kwargs.setdefault("FCAL1Volumes",["LArMgr::LAr::FCAL::Module1::Gap"]) + kwargs.setdefault("FCAL2Volumes",["LArMgr::LAr::FCAL::Module2::Gap"]) + kwargs.setdefault("FCAL3Volumes",["LArMgr::LAr::FCAL::Module3::Gap"]) + # No effect currently + kwargs.setdefault("OutputCollectionNames", [hits_collection_name]) + + # Hook for fast simulation + #from G4AtlasApps.SimFlags import simFlags + #kwargs.setdefault("UseFrozenShowers", simFlags.LArParameterization()>0) + + #Note - frozen showers to be migrated later + + result.merge(acc) + return result, LArG4__FCALSDTool(name, **kwargs) + +def getLArHECSensitiveDetector(name="LArHECSensitiveDetector", **kwargs): + bare_collection_name = "LArHitHEC" + mergeable_collection_suffix = "_G4" + merger_input_property = "LArHECHits" + hits_collection_name = generate_mergeable_collection_name(bare_collection_name, + mergeable_collection_suffix, + merger_input_property) + #kwargs.setdefault("SliceVolumes",["LAr::HEC::Module::Depth::Slice"]) + #kwargs.setdefault("LocalVolumes",["LAr::HEC::Module::Depth::Slice::Local"]) + kwargs.setdefault("WheelVolumes",["LArMgr::LAr::HEC::Module::Depth::Slice"]) + # You might think this should go here, but we don't think so! LAr::HEC::Module::Depth::Slice::Wheel"]) + # No effect currently + kwargs.setdefault("OutputCollectionNames", [hits_collection_name]) + return CfgMgr.LArG4__HECSDTool(name, **kwargs) + +def getLArInactiveSensitiveDetector(name="LArInactiveSensitiveDetector", **kwargs): + ## Main configuration + from G4AtlasApps.SimFlags import simFlags + if simFlags.SimLayout.get_Value() not in ["tb_LArH6_2003","tb_LArH6_2002"]: + kwargs.setdefault("BarrelPreVolumes",["LArMgr::LAr::Barrel::Presampler::Cathode*", + "LArMgr::LAr::Barrel::Presampler::Anode*", + "LArMgr::LAr::Barrel::Presampler::Prep*"]) + kwargs.setdefault("BarrelVolumes",["LArMgr::LAr::EMB::*::Straight", + "LArMgr::LAr::EMB::*::*Fold"]) + kwargs.setdefault("ECPosInVolumes", ["LArMgr::LAr::EMEC::Pos::InnerWheel::Absorber", + "LArMgr::LAr::EMEC::Pos::InnerWheel::Electrode", + "LArMgr::LAr::EMEC::Pos::InnerWheel::Glue", + "LArMgr::LAr::EMEC::Pos::InnerWheel::Lead"]) + kwargs.setdefault("ECPosOutVolumes",["LArMgr::LAr::EMEC::Pos::OuterWheel::Lead", + "LArMgr::LAr::EMEC::Pos::OuterWheel::Glue", + "LArMgr::LAr::EMEC::Pos::OuterWheel::Electrode", + "LArMgr::LAr::EMEC::Pos::OuterWheel::Absorber"]) + kwargs.setdefault("ECNegInVolumes", ["LArMgr::LAr::EMEC::Neg::InnerWheel::Absorber", + "LArMgr::LAr::EMEC::Neg::InnerWheel::Electrode", + "LArMgr::LAr::EMEC::Neg::InnerWheel::Glue", + "LArMgr::LAr::EMEC::Neg::InnerWheel::Lead"]) + kwargs.setdefault("ECNegOutVolumes",["LArMgr::LAr::EMEC::Neg::OuterWheel::Lead", + "LArMgr::LAr::EMEC::Neg::OuterWheel::Glue", + "LArMgr::LAr::EMEC::Neg::OuterWheel::Electrode", + "LArMgr::LAr::EMEC::Neg::OuterWheel::Absorber"]) + #kwargs.setdefault("HECVolumes",["LAr::HEC::Inactive"]) + #kwargs.setdefault("HECLocalVolumes",["LAr::HEC::Local::Inactive"]) + kwargs.setdefault("HECWheelVolumes",["LArMgr::LAr::HEC::Module::Depth::Absorber::TieRod", + "LArMgr::LAr::HEC::Module::Depth::Slice::TieRodDead", + "LArMgr::LAr::HEC::Module::Depth::Absorber", + "LArMgr::LAr::HEC::Module::Depth::Slice::TieRod", + "LArMgr::LAr::HEC::Module::Depth::Slice::Electrode::Copper", + "LArMgr::LAr::HEC::Module::Depth::Slice::Electrode"]) + kwargs.setdefault("MiniMomVolumes",["LArMgr::MiniFCALMother"]) + kwargs.setdefault("MiniVolumes",["LArMgr::MiniFCAL"]) + kwargs.setdefault("MiniLayVolumes",["LArMgr::MiniFCAL::Layer"]) + if simFlags.SimLayout.get_Value()=="tb_LArH6_2002": + kwargs.setdefault("ECPosInVolumes", ["LArMgr::LAr::EMEC::Pos::InnerWheel::Absorber", + "LArMgr::LAr::EMEC::Pos::InnerWheel::Electrode"]) + kwargs.setdefault("ECPosOutVolumes",["LArMgr::LAr::EMEC::Pos::OuterWheel::Electrode", + "LArMgr::LAr::EMEC::Pos::OuterWheel::Absorber"]) + kwargs.setdefault("HECWheelVolumes",["LArMgr::LAr::HEC::Module::Depth::Absorber", + "LArMgr::LAr::HEC::Module::Depth::Slice::Electrode", + "LArMgr::LAr::HEC::Module::Depth::Slice::Electrode::Copper", + "LArMgr::LAr::HEC::Module::Depth::Slice::TieRod"]) + if simFlags.SimLayout.get_Value()!="tb_LArH6_2002": + kwargs.setdefault("FCAL1Volumes",["LArMgr::LAr::FCAL::Module1::CableTrough", + "LArMgr::LAr::FCAL::Module1::Absorber"]) + kwargs.setdefault("FCAL2Volumes",["LArMgr::LAr::FCAL::Module2::CableTrough", + "LArMgr::LAr::FCAL::Module2::Absorber", + "LArMgr::LAr::FCAL::Module2::Rod"]) + kwargs.setdefault("FCAL3Volumes",["LArMgr::LAr::FCAL::Module3::CableTrough", + "LArMgr::LAr::FCAL::Module3::Absorber", + "LArMgr::LAr::FCAL::Module3::Rod"]) + # Running PID calibration hits? + from G4AtlasApps.SimFlags import simFlags + kwargs.setdefault("ParticleID",simFlags.ParticleID()) + # No effect currently + kwargs.setdefault("OutputCollectionNames", ["LArCalibrationHitInactive"]) + return CfgMgr.LArG4__InactiveSDTool(name, **kwargs) + +def getLArMiniFCALSensitiveDetector(name="LArMiniFCALSensitiveDetector", **kwargs): + kwargs.setdefault("MiniVolumes",["LArMgr::MiniFCAL::Wafer"]) + # No effect currently + kwargs.setdefault("OutputCollectionNames", ["LArHitMiniFCAL"]) + return CfgMgr.LArG4__MiniFCALSDTool(name, **kwargs) + +def getCalibrationDefaultCalculator(name="CalibrationDefaultCalculator", **kwargs): + return CfgMgr.LArG4__CalibrationDefaultCalculator(name, **kwargs) + +def getDeadMaterialCalibrationHitMerger(name="DeadMaterialCalibrationHitMerger", **kwargs): + kwargs.setdefault("InputHits",["LArCalibrationHitDeadMaterial_DEAD","LArCalibrationHitActive_DEAD","LArCalibrationHitInactive_DEAD"]) + kwargs.setdefault("OutputHits","LArCalibrationHitDeadMaterial") + return CfgMgr.LArG4__CalibrationHitMerger(name, **kwargs) + diff --git a/LArCalorimeter/LArG4/LArG4SD/test/LArG4SDToolConfig_test.py b/LArCalorimeter/LArG4/LArG4SD/test/LArG4SDToolConfig_test.py new file mode 100755 index 0000000000000000000000000000000000000000..389a87e86016132f56e11a1248fa40e1cb1f48e9 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4SD/test/LArG4SDToolConfig_test.py @@ -0,0 +1,66 @@ +#!/usr/bin/env python +"""Run tests on LArG4SD configuration + +Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +""" +from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator + +if __name__ == '__main__': + + + # Set up logging and config behaviour + from AthenaCommon.Logging import log + from AthenaCommon.Constants import DEBUG + from AthenaCommon.Configurable import Configurable + log.setLevel(DEBUG) + Configurable.configurableRun3Behavior = 1 + + + #import config flags + from AthenaConfiguration.AllConfigFlags import ConfigFlags + ConfigFlags.Sim.ISF.Run = True + + #Provide input + from AthenaConfiguration.TestDefaults import defaultTestFiles + inputDir = defaultTestFiles.d + ConfigFlags.Input.Files = defaultTestFiles.EVNT + + # Finalize + ConfigFlags.lock() + + + ## Initialize a new component accumulator + cfg = ComponentAccumulator() + + + + from LArG4SD.LArG4SDToolConfig import LArEMBSensitiveDetectorCfg + from LArG4SD.LArG4SDToolConfig import LArEMECSensitiveDetectorCfg + from LArG4SD.LArG4SDToolConfig import LArFCALSensitiveDetectorCfg + + #TODO CHECK IF THESE ARE ALL PUBLIC TOOLS! + acc1, tool1 = LArEMBSensitiveDetectorCfg(ConfigFlags) + acc1.addPublicTool(tool1) + cfg.merge(acc1) + + + acc2, tool2 = LArEMECSensitiveDetectorCfg(ConfigFlags) + acc2.addPublicTool(tool2) + cfg.merge(acc2) + + acc3, tool3 = LArFCALSensitiveDetectorCfg(ConfigFlags) + acc3.addPublicTool(tool3) + cfg.merge(acc3) + + + cfg.printConfig(withDetails=True, summariseProps = True) + ConfigFlags.dump() + + f=open("test.pkl","w") + cfg.store(f) + f.close() + + + + print cfg._publicTools + print "-----------------finished----------------------" \ No newline at end of file diff --git a/LArCalorimeter/LArIdentifier/LArIdentifier/LArOnlineID.h b/LArCalorimeter/LArIdentifier/LArIdentifier/LArOnlineID.h index 0cb31483e656c7a3b2757ff2e31af7da74f2de90..177f0ff3fbd663dc72e8ed4e0d358b69e9036f38 100755 --- a/LArCalorimeter/LArIdentifier/LArIdentifier/LArOnlineID.h +++ b/LArCalorimeter/LArIdentifier/LArIdentifier/LArOnlineID.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef LARONLINEID_H @@ -280,13 +280,6 @@ inline HWIdentifier LArOnlineID::calib_module_Id(int barrel_ec, int pos_neg, m_side_impl.pack (pos_neg , result); m_feedthrough_impl.pack(feedthrough , result); m_slot_impl.pack (slot , result); - /* Do checks */ - /* - if(m_do_checks) - { - calib_module_Id_checks ( barrel_ec, pos_neg, feedthrough, slot ); - } - */ return result; } @@ -338,10 +331,6 @@ inline HWIdentifier LArOnlineID::calib_channel_Id( int barrel_ec, int pos_neg, i m_slot_impl.pack (slot , result); m_channel_in_slot_impl.pack(channel , result); - /* Do checks */ - if(m_do_checks) { - //channel_Id_checks( barrel_ec, pos_neg, feedthrough, slot, channel ); - } return result; } @@ -355,10 +344,6 @@ inline HWIdentifier LArOnlineID::calib_channel_Id(const HWIdentifier feedthrough m_slot_impl.pack (slot , result); m_channel_in_slot_impl.pack (channel, result); - /* Do checks */ - if(m_do_checks) { - //channel_Id_checks( feedthroughId, slot, channel ); - } return result; } @@ -370,10 +355,6 @@ inline HWIdentifier LArOnlineID::calib_channel_Id(const HWIdentifier febId, int m_channel_in_slot_impl.reset(result); m_channel_in_slot_impl.pack (channel, result); - /* Do checks */ - if(m_do_checks) { - //channel_Id_checks( febId, channel ); - } return result; } inline HWIdentifier LArOnlineID::calib_channel_Id(IdentifierHash channelHashId) const diff --git a/LArCalorimeter/LArIdentifier/LArIdentifier/LArOnlineID_Base.h b/LArCalorimeter/LArIdentifier/LArIdentifier/LArOnlineID_Base.h index 457d2ba52a9bedd64cdf2b935568116072fe1d71..bbec67b295db663afc6e0a2e2f6a5d8387596951 100755 --- a/LArCalorimeter/LArIdentifier/LArIdentifier/LArOnlineID_Base.h +++ b/LArCalorimeter/LArIdentifier/LArIdentifier/LArOnlineID_Base.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef LARONLINEID_BASE_H @@ -122,7 +122,9 @@ class LArOnlineID_Base : public AtlasDetectorID /** * @brief Create a feedthrough identifier from fields */ - HWIdentifier feedthrough_Id( int barrel_ec, int pos_neg, int feedthrough ) const; + HWIdentifier feedthrough_Id( int barrel_ec, int pos_neg, int feedthrough) const; + HWIdentifier feedthrough_Id( int barrel_ec, int pos_neg, int feedthrough, + bool checks) const; /** * @brief Create a feedthrough identifier from hash_id @@ -147,7 +149,12 @@ class LArOnlineID_Base : public AtlasDetectorID HWIdentifier feb_Id(int barrel_ec, int pos_neg, int feedthrough, - int slot ) const; + int slot) const; + HWIdentifier feb_Id(int barrel_ec, + int pos_neg, + int feedthrough, + int slot, + bool checks) const; /** * @brief create feb identifier from hash id */ @@ -173,7 +180,13 @@ class LArOnlineID_Base : public AtlasDetectorID int pos_neg, int feedthrough, int slot, - int channel ) const; + int channel) const; + HWIdentifier channel_Id(int barrel_ec, + int pos_neg, + int feedthrough, + int slot, + int channel, + bool checks) const; /** * @brief Create channel identifiers from hash id */ @@ -206,11 +219,15 @@ class LArOnlineID_Base : public AtlasDetectorID /** * @brief Define a channel identifier from a feedthrough identifier */ - HWIdentifier channel_Id(const HWIdentifier feedthroughId, int slot, int channel ) const; + HWIdentifier channel_Id(const HWIdentifier feedthroughId, int slot, int channel) const; + HWIdentifier channel_Id(const HWIdentifier feedthroughId, int slot, int channel, + bool checks) const; /** * @brief Define a channel identifier from a feb identifier */ - HWIdentifier channel_Id(const HWIdentifier febId, int channel ) const; + HWIdentifier channel_Id(const HWIdentifier febId, int channel) const; + HWIdentifier channel_Id(const HWIdentifier febId, int channel, + bool checks) const; /** diff --git a/LArCalorimeter/LArIdentifier/src/LArHVLineID.cxx b/LArCalorimeter/LArIdentifier/src/LArHVLineID.cxx index 35b285ac7ecdffbeef2398f99d6c0e2e838225e3..af9e3a62ee68f9e3deae19dfaa35394314bedc63 100755 --- a/LArCalorimeter/LArIdentifier/src/LArHVLineID.cxx +++ b/LArCalorimeter/LArIdentifier/src/LArHVLineID.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "LArIdentifier/LArHVLineID.h" @@ -191,34 +191,6 @@ int LArHVLineID::get_expanded_id (const HWIdentifier& id, return (0); } -/* -//===================================================================================== -void LArHVLineID::hvlineId_checks( int part, int canline, int cannode, int line) const throw(LArOnlID_Exception) -//===================================================================================== -{ - MsgStream log(m_msgSvc, "LArHVLineID" ); - // Fill expanded id - ExpandedIdentifier id(calo_exp()); - id << part << canline << cannode << line; - if( id.last_error () != ExpandedIdentifier::none) { - char * lStr = new char[200]; - std::string errorMessage ; - sprintf(lStr,"Error in LArHVLineID::hvline_id(field values), did not build, partition: %d, canline: %d, can node: %d, hv line: %d ", partition, canline, cannode , line ); - errorMessage += std::string(lStr); - delete[] lStr ; - LArOnlID_Exception except(errorMessage , 2); - throw except ; - } - if (!m_full_atlas_highvoltage_range.match(id)) { - std::string errorMessage = "[LArHVLineID]::hv_lineId() result is not OK: ID, range = " - + std::string(id) + " , " + (std::string)m_full_atlas_highvoltage_range; - LArOnlID_Exception except(errorMessage , 2); - throw except ; - } -} -*/ - - //============================================================================= int LArHVLineID::initLevelsFromDict(void) diff --git a/LArCalorimeter/LArIdentifier/src/LArOnlineID_Base.cxx b/LArCalorimeter/LArIdentifier/src/LArOnlineID_Base.cxx index 5d97bb469d8db427d9ad63c0aa386ed1526deda2..384974915bdcb6b8ddaa8035e6309633c4ccf7b4 100755 --- a/LArCalorimeter/LArIdentifier/src/LArOnlineID_Base.cxx +++ b/LArCalorimeter/LArIdentifier/src/LArOnlineID_Base.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "LArIdentifier/LArOnlineID_Base.h" @@ -685,15 +685,6 @@ void LArOnlineID_Base::channel_Id_checks( int barrel_ec, int pos_neg, int feedth ExpandedIdentifier expId(lar_exp()); expId << s_lar_online_field_value << barrel_ec << pos_neg << feedthrough << slot << channel ; if ( m_this_is_slar ) expId << 1; - if( expId.last_error () != ExpandedIdentifier::none) { - char * l_str = new char[200]; - std::string errorMessage ; - sprintf(l_str,"Error in LArOnlineID_Base::channel_Id_checks(field values) , values ok but did not build , barrel_ec: %d, feedthrough: %d , slot: %d , channel_in_slot: %d ", barrel_ec , feedthrough, slot, channel); - errorMessage += std::string(l_str); - delete[] l_str ; - LArOnlID_Exception except(errorMessage , 99); - throw except ; - } if (!m_full_laronline_range.match(expId)) { std::string errorMessage = "LArOnlineID_Base::channel_Id_checks() result is not OK: ID, range = " @@ -765,16 +756,6 @@ void LArOnlineID_Base::feb_Id_checks( int barrel_ec, int pos_neg, int feedthroug expId << s_lar_online_field_value << barrel_ec << pos_neg << feedthrough << slot ; if ( m_this_is_slar ) expId << 0 << 1; - if( expId.last_error () != ExpandedIdentifier::none ){ - char * l_str = new char[200]; - std::string errorMessage ; - sprintf(l_str,"Error in LArOnlineID_Base::feb_Id_checks , values ok but did not build , barrel_ec: %d , pos_neg: %d , feedthrough: %d , slot: %d", - barrel_ec , pos_neg, feedthrough, slot); - errorMessage += std::string(l_str); - delete[] l_str ; - LArOnlID_Exception except(errorMessage , 99); - throw except ; - } if (!m_full_feedthrough_range.match(expId)) { std::string errorMessage = "LArOnlineID_Base::feb_Id_checks() result is not OK: ID, range = " + std::string(expId) + " , " + (std::string)m_full_feb_range; LArOnlID_Exception except(errorMessage , 99); @@ -792,16 +773,6 @@ void LArOnlineID_Base::feedthrough_Id_checks( int barrel_ec, int pos_neg, int fe expId << s_lar_online_field_value << barrel_ec << pos_neg << feedthrough << 0 << 0 << (int)m_this_is_slar; // if ( m_this_is_slar ) expId << 0 << 0 << 1; - if( expId.last_error () != ExpandedIdentifier::none ){ - char * l_str = new char[200]; - std::string errorMessage ; - sprintf(l_str,"Error in LArOnlineID_Base::feedthrough_Id_checks , values ok but did not build , barrel_ec: %d , pos_neg: %d , feedthrough: %d ", - barrel_ec , pos_neg, feedthrough); - errorMessage += std::string(l_str); - delete[] l_str ; - LArOnlID_Exception except(errorMessage , 99); - throw except ; - } if (!m_full_feedthrough_range.match(expId)) { std::string errorMessage = "LArOnlineID_Base::feedthrough_Id_checks() result is not OK: ID, range = " + std::string(expId) + " , " + (std::string)m_full_feedthrough_range; LArOnlID_Exception except(errorMessage , 99); @@ -1423,7 +1394,9 @@ bool LArOnlineID_Base::isValidId(const HWIdentifier id) const { -HWIdentifier LArOnlineID_Base::feedthrough_Id (int barrel_ec, int pos_neg, int feedthrough ) const +HWIdentifier +LArOnlineID_Base::feedthrough_Id (int barrel_ec, int pos_neg, int feedthrough, + bool checks) const { HWIdentifier result(0); @@ -1437,12 +1410,18 @@ HWIdentifier LArOnlineID_Base::feedthrough_Id (int barrel_ec, int pos_neg, int f m_slar_impl.pack (1 , result); /* Do checks */ - if(m_do_checks) + if(checks) { feedthrough_Id_checks ( barrel_ec, pos_neg, feedthrough ); } return result; } +HWIdentifier +LArOnlineID_Base::feedthrough_Id (int barrel_ec, int pos_neg, int feedthrough) const +{ + return feedthrough_Id (barrel_ec, pos_neg, feedthrough, do_checks()); +} + HWIdentifier LArOnlineID_Base::feedthrough_Id(IdentifierHash feedthroughHashId) const /*=============================================================================== */ @@ -1485,8 +1464,10 @@ std::vector<HWIdentifier>::const_iterator LArOnlineID_Base::feedthrough_end(void /* FEB id */ /*========*/ -HWIdentifier LArOnlineID_Base::feb_Id(int barrel_ec, int pos_neg, - int feedthrough, int slot ) const +HWIdentifier +LArOnlineID_Base::feb_Id(int barrel_ec, int pos_neg, + int feedthrough, int slot, + bool checks ) const /*==================================================================== */ { HWIdentifier result(0); @@ -1502,12 +1483,19 @@ HWIdentifier LArOnlineID_Base::feb_Id(int barrel_ec, int pos_neg, m_slar_impl.pack (1 , result); /* Do checks */ - if(m_do_checks) { + if(checks) { feb_Id_checks ( barrel_ec, pos_neg, feedthrough, slot ); } return result; } +HWIdentifier +LArOnlineID_Base::feb_Id(int barrel_ec, int pos_neg, + int feedthrough, int slot) const +{ + return feb_Id (barrel_ec, pos_neg, feedthrough, slot, do_checks()); +} + HWIdentifier LArOnlineID_Base::feb_Id(const HWIdentifier feedthroughId , int slot) const /*==================================================================================== */ { @@ -1567,8 +1555,10 @@ IdentifierHash LArOnlineID_Base::feb_Hash_binary_search (HWIdentifier febId) con return (0); } -HWIdentifier LArOnlineID_Base::channel_Id( int barrel_ec, int pos_neg, int feedthrough, - int slot, int channel ) const +HWIdentifier +LArOnlineID_Base::channel_Id( int barrel_ec, int pos_neg, int feedthrough, + int slot, int channel, + bool checks) const /*============================================================================== */ { HWIdentifier result(0); @@ -1584,12 +1574,19 @@ HWIdentifier LArOnlineID_Base::channel_Id( int barrel_ec, int pos_neg, int feedt m_slar_impl.pack (1 , result); /* Do checks */ - if(m_do_checks) { + if(checks) { channel_Id_checks( barrel_ec, pos_neg, feedthrough, slot, channel ); } return result; } +HWIdentifier +LArOnlineID_Base::channel_Id( int barrel_ec, int pos_neg, int feedthrough, + int slot, int channel) const +{ + return channel_Id (barrel_ec, pos_neg, feedthrough, slot, channel, + do_checks()); +} HWIdentifier LArOnlineID_Base::channel_Id(IdentifierHash channelHashId) const /*===================================================================*/ @@ -1598,7 +1595,9 @@ HWIdentifier LArOnlineID_Base::channel_Id(IdentifierHash channelHashId) const } -HWIdentifier LArOnlineID_Base::channel_Id(const HWIdentifier feedthroughId,int slot,int channel) const +HWIdentifier +LArOnlineID_Base::channel_Id(const HWIdentifier feedthroughId,int slot,int channel, + bool checks) const /*==================================================================================================== */ { HWIdentifier result(feedthroughId); @@ -1611,13 +1610,21 @@ HWIdentifier LArOnlineID_Base::channel_Id(const HWIdentifier feedthroughId,int s m_slar_impl.pack (1 , result); /* Do checks */ - if(m_do_checks) { + if(checks) { channel_Id_checks( feedthroughId, slot, channel ); } return result; } -HWIdentifier LArOnlineID_Base::channel_Id(const HWIdentifier febId, int channel) const +HWIdentifier +LArOnlineID_Base::channel_Id(const HWIdentifier feedthroughId,int slot,int channel) const +{ + return channel_Id (feedthroughId, slot, channel, do_checks()); +} + +HWIdentifier +LArOnlineID_Base::channel_Id(const HWIdentifier febId, int channel, + bool checks) const /*======================================================================================= */ { HWIdentifier result(febId); @@ -1628,12 +1635,18 @@ HWIdentifier LArOnlineID_Base::channel_Id(const HWIdentifier febId, int channel) m_slar_impl.pack (1, result); /* Do checks */ - if(m_do_checks) { + if(checks) { channel_Id_checks( febId, channel ); } return result; } +HWIdentifier +LArOnlineID_Base::channel_Id(const HWIdentifier febId, int channel) const +{ + return channel_Id (febId, channel, do_checks()); +} + //---------------------------------------------------------------------------- IdentifierHash LArOnlineID_Base::channel_Hash (HWIdentifier channelId) const { diff --git a/LArCalorimeter/LArIdentifier/test/test_laronlineid.cxx b/LArCalorimeter/LArIdentifier/test/test_laronlineid.cxx index 68719095a08d9b2c011a10e4f6ccff7e6726e353..7adcac87fe3d304b1ed1c6e238d9547c391ae34e 100755 --- a/LArCalorimeter/LArIdentifier/test/test_laronlineid.cxx +++ b/LArCalorimeter/LArIdentifier/test/test_laronlineid.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "IdDictParser/IdDictParser.h" @@ -35,10 +35,10 @@ static void check_lar_online_id_decoding(IdDictMgr& idd) } const LArOnlineID* p_laronline_id = &laronline_id; - bool verif = p_laronline_id->do_checks(); + bool verif = laronline_id.do_checks(); std::cout << "[TEST_LARONLINE] [1] Do_check verif0 = " << verif << std::endl; - p_laronline_id->set_do_checks(true); - verif = p_laronline_id->do_checks(); + laronline_id.set_do_checks(true); + verif = laronline_id.do_checks(); std::cout << "[TEST_LARONLINE] [1] Do_Check verif1 = " << verif << std::endl; std::string l_version = laronline_id.dictionaryVersion(); l_version = "fullAtlas"; diff --git a/LArCalorimeter/LArMonitoring/ATLAS_CHECK_THREAD_SAFETY b/LArCalorimeter/LArMonitoring/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/LArCalorimeter/LArMonitoring/CMakeLists.txt b/LArCalorimeter/LArMonitoring/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..bf036da5b6801248927c07c4078d6176033f5112 --- /dev/null +++ b/LArCalorimeter/LArMonitoring/CMakeLists.txt @@ -0,0 +1,48 @@ +################################################################################ +# Package: LArMonitoring +################################################################################ + +# Declare the package name: +atlas_subdir( LArMonitoring ) + +# Declare the package's dependencies: +atlas_depends_on_subdirs( PUBLIC + Calorimeter/CaloDetDescr + Calorimeter/CaloGeoHelpers + Calorimeter/CaloIdentifier + Calorimeter/CaloInterface + Control/AthenaMonitoring + DetectorDescription/Identifier + Event/EventContainers + LArCalorimeter/LArElecCalib + LArCalorimeter/LArIdentifier + LArCalorimeter/LArRawEvent + LArCalorimeter/LArRecConditions + LArCalorimeter/LArCabling + Trigger/TrigAnalysis/TrigDecisionTool + PRIVATE + Calorimeter/CaloConditions + Control/AthenaKernel + Database/AthenaPOOL/AthenaPoolUtilities + Event/xAOD/xAODEventInfo + Trigger/TrigAnalysis/TrigAnalysisInterfaces + LArCalorimeter/LArCOOLConditions + LArCalorimeter/LArRawConditions + LArCalorimeter/LArRecEvent ) + +# External dependencies: +find_package( Boost COMPONENTS filesystem thread system ) +find_package( CLHEP ) +find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread Graf Graf3d Gpad Html Postscript Gui GX11TTF GX11 ) + +# Component(s) in the package: +atlas_add_component( LArMonitoring + src/*.cxx + src/components/*.cxx + INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} + LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} CaloDetDescrLib CaloGeoHelpers CaloIdentifier AthenaMonitoringLib SGtests Identifier LArIdentifier LArRawEvent LArRecConditions LArCablingLib TrigDecisionToolLib CaloConditions AthenaKernel AthenaPoolUtilities xAODEventInfo LArCOOLConditions LArRawConditions LArRecEvent ) + +# Install files from the package: +atlas_install_python_modules( python/*.py ) +atlas_install_joboptions( share/*.txt share/*.py ) + diff --git a/LArCalorimeter/LArMonitoring/README.md b/LArCalorimeter/LArMonitoring/README.md new file mode 100644 index 0000000000000000000000000000000000000000..8fb9e57e44a4ad41b46e2bdaa54fbc8811696a7b --- /dev/null +++ b/LArCalorimeter/LArMonitoring/README.md @@ -0,0 +1,6 @@ +# LArMonitoring: Package containing all LAr classes for online and offline monitoring + +## Introduction + +Created in rel. 22, this package is the successor of LArMonTools, and should contain +MT friendly classes for LAr monitoring diff --git a/LArCalorimeter/LArMonitoring/python/LArMonConfigFlags.py b/LArCalorimeter/LArMonitoring/python/LArMonConfigFlags.py new file mode 100644 index 0000000000000000000000000000000000000000..95ec76c63ef27ff826b405349f017b55c2f5d43f --- /dev/null +++ b/LArCalorimeter/LArMonitoring/python/LArMonConfigFlags.py @@ -0,0 +1,37 @@ +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + +## +## @file LArMonitoring/python/LArMonConfigFlags.py +## @purpose Python module to hold flags to configure LArMonitoring +## + +""" LArMonConfigFlags + Python module to hold flags for LAr DQ monitoring + +""" + +__author__ = "P. Strizenec" +__version__= "$Revision: 0.1 $" +__doc__ = "LArMonConfigFlags" + +__all__ = [ "LArMonConfigFlags" ] + +from AthenaConfiguration.AthConfigFlags import AthConfigFlags + +def createLArMonConfigFlags(): + acf=AthConfigFlags() + acf.addFlag('LArMon.LArDigitKey', 'FREE') + acf.addFlag('LArMon.EventBlockSize', 0) + # individual algos + acf.addFlag('LArMon.doLArRawChannelMon', False) + acf.addFlag('LArMon.doLArCollisionTimeMon', True) + acf.addFlag('LArMon.doLArAffectedRegions', True) + acf.addFlag('LArMon.doLArFEBMon', True) + acf.addFlag('LArMon.doLArHVCorrectionMon', True) + acf.addFlag('LArMon.doLArCosmicsMon', False) + acf.addFlag('LArMon.doLArCoverage', True) + acf.addFlag('LArMon.doLArDigitMon', True) + acf.addFlag('LArMon.doLArNoisyROMon', True) + acf.addFlag('LArMon.doLArRODMon', True) + acf.addFlag('LArMon.doLArNoiseCorrelationMon', False) + return acf diff --git a/LArCalorimeter/LArMonitoring/src/LArTrigStreamMatching.cxx b/LArCalorimeter/LArMonitoring/src/LArTrigStreamMatching.cxx new file mode 100644 index 0000000000000000000000000000000000000000..fb94d49b68a10a8e2d08f8a3fa69604fa3c1c47c --- /dev/null +++ b/LArCalorimeter/LArMonitoring/src/LArTrigStreamMatching.cxx @@ -0,0 +1,27 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#include "LArTrigStreamMatching.h" + +std::vector<unsigned> LArMon::trigStreamMatching(const std::vector<std::string>& streamsFromJobO, const std::vector<xAOD::EventInfo::StreamTag>& streamInEvent) { + + //The return value. Relying on RVO not to copy it when returning to caller + std::vector<unsigned> foundStreams; + const unsigned nStreamsInJobO=streamsFromJobO.size(); + for (unsigned i=0;i<nStreamsInJobO;++i) { + bool found=false; + for (const xAOD::EventInfo::StreamTag& streamTag : streamInEvent) { + if (streamsFromJobO[i]==streamTag.name()) { + foundStreams.push_back(i); + found=true; + break; //inner loop + }//end-if + }//end inner loop (over streamInEvent) + //Not-found case: + if (!found) foundStreams.push_back(nStreamsInJobO); + }//end outer loop (over streamInJobO) + + return foundStreams; +} + diff --git a/LArCalorimeter/LArMonitoring/src/LArTrigStreamMatching.h b/LArCalorimeter/LArMonitoring/src/LArTrigStreamMatching.h new file mode 100644 index 0000000000000000000000000000000000000000..5e089520d96e121039ce2264ce8731dc98308efc --- /dev/null +++ b/LArCalorimeter/LArMonitoring/src/LArTrigStreamMatching.h @@ -0,0 +1,20 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef LARMONTOOLS_LARTRIGSTREAMMACHING +#define LARMONTOOLS_LARTRIGSTREAMMACHING + +#include <vector> +#include <string> + +#include "xAODEventInfo/EventInfo.h" + +namespace LArMon { + +//Returns a vector with the indices of the streamsFromJobO that match an entry in streamsInEvent. For streams that are not part of streamsFromJobO +//streamsFromJobO.size() is added to the return vector +std::vector<unsigned> trigStreamMatching(const std::vector<std::string>& streamsFromJobO, const std::vector<xAOD::EventInfo::StreamTag>& streamInEvent); + +} +#endif diff --git a/LArCalorimeter/LArROD/LArROD/LArRawChannelBuilder.h b/LArCalorimeter/LArROD/LArROD/LArRawChannelBuilder.h index 696acfe4a17f1ba72eca497b85bfb086d5aacc56..e963dd647fb9283eb6bc7a47f7671300082fa7af 100644 --- a/LArCalorimeter/LArROD/LArROD/LArRawChannelBuilder.h +++ b/LArCalorimeter/LArROD/LArROD/LArRawChannelBuilder.h @@ -18,27 +18,30 @@ #define LARRAWCHANNELBUILDER #include "AthenaBaseComps/AthAlgorithm.h" +#include "StoreGate/ReadHandleKey.h" +#include "StoreGate/WriteHandleKey.h" #include "GaudiKernel/ToolHandle.h" #include "GaudiKernel/ServiceHandle.h" #include "LArElecCalib/ILArOFCTool.h" #include "LArElecCalib/ILArADC2MeVTool.h" #include "LArElecCalib/ILArHVCorrTool.h" #include "LArCabling/LArOnOffIdMapping.h" - +#include "LArRawEvent/LArDigitContainer.h" +#include "TBEvent/TBPhase.h" #include "LArRawEvent/LArRawChannelContainer.h" #include "LArIdentifier/LArOnlineID.h" -#include "CaloIdentifier/CaloIdManager.h" +#include "CaloIdentifier/CaloCell_ID.h" class LArRawChannelBuilder : public AthAlgorithm { public: LArRawChannelBuilder (const std::string& name, ISvcLocator* pSvcLocator); - StatusCode initialize(); - StatusCode execute(); - StatusCode finalize(); + virtual StatusCode initialize() override; + virtual StatusCode execute() override; + virtual StatusCode finalize() override; private: //Services & Tools @@ -50,8 +53,13 @@ private: //LArRawOrdering m_larRawOrdering; - //Algo-properties - std::string m_DataLocation, m_ChannelContainerName; + //Algo-properties + SG::ReadHandleKey<LArDigitContainer> m_dataLocation + { this, "DataLocation", "FREE", "" }; + SG::ReadHandleKey<TBPhase> m_tbPhaseLocation + { this, "TBPhaseLocation", "TBPhase", "" }; + SG::WriteHandleKey<LArRawChannelContainer> m_ChannelContainerName + { this, "LArRawChannelContainerName", "LArRawChannels", "" }; bool m_useTDC, m_useOFCTool; float m_Ecut; int m_initialTimeSampleShift; diff --git a/LArCalorimeter/LArROD/LArROD/LArRawChannelSimpleBuilder.h b/LArCalorimeter/LArROD/LArROD/LArRawChannelSimpleBuilder.h index a33bc46ec72700e20b7c45905845a317679a0805..021c8ca6d8d213954de697d4a65265611af6b6e8 100644 --- a/LArCalorimeter/LArROD/LArROD/LArRawChannelSimpleBuilder.h +++ b/LArCalorimeter/LArROD/LArROD/LArRawChannelSimpleBuilder.h @@ -14,9 +14,10 @@ #ifndef LARRAWCHANNELSIMPLEBUILDER #define LARRAWCHANNELSIMPLEBUILDER -#include "AthenaBaseComps/AthAlgorithm.h" +#include "AthenaBaseComps/AthReentrantAlgorithm.h" #include "GaudiKernel/ToolHandle.h" #include "LArRawEvent/LArRawChannelContainer.h" +#include "LArRawEvent/LArDigitContainer.h" #include "CaloIdentifier/LArEM_ID.h" #include "CaloIdentifier/LArFCAL_ID.h" #include "CaloIdentifier/LArHEC_ID.h" @@ -24,19 +25,22 @@ #include "LArRecUtils/LArParabolaPeakRecoTool.h" #include "LArCabling/LArOnOffIdMapping.h" #include "StoreGate/ReadCondHandleKey.h" +#include "StoreGate/ReadHandleKey.h" +#include "StoreGate/WriteHandleKey.h" class LArRawChannelContainer; -class LArRawChannelSimpleBuilder : public AthAlgorithm +class LArRawChannelSimpleBuilder : public AthReentrantAlgorithm { public: LArRawChannelSimpleBuilder (const std::string& name, ISvcLocator* pSvcLocator); - StatusCode initialize(); - StatusCode execute(); - StatusCode finalize(); + virtual StatusCode initialize() override; + virtual StatusCode execute(const EventContext& ctx) const override; + virtual StatusCode finalize() override; + private: //Services & Tools @@ -50,7 +54,10 @@ private: ToolHandle<LArParabolaPeakRecoTool> m_peakParabolaTool; //Algo-properties - std::string m_DataLocation, m_ChannelContainerName; + SG::ReadHandleKey<LArDigitContainer> m_DataLocation + { this, "DataLocation", "FREE", "" }; + SG::WriteHandleKey<LArRawChannelContainer> m_ChannelContainerName + { this, "LArRawChannelContainerName", "LArRawChannels", "" }; int m_imaxSamp; std::string m_mode; std::string m_FCALmodeTime; @@ -65,12 +72,7 @@ private: float m_ADCtoMeVEMECOuter[4]; float m_ADCtoMeVEMB[4]; - //Private Member functions: - void sortChannels(LArRawChannelContainer* container) ; - unsigned int m_iPedestal; - LArRawChannelContainer* m_larRawChannelContainer; - }; #endif diff --git a/LArCalorimeter/LArROD/LArROD/ReadLArDigits.h b/LArCalorimeter/LArROD/LArROD/ReadLArDigits.h index e96d1af282e44572e040ed90802867da1ead6a89..085c2494be507a08f505c378f46183d678e46b74 100644 --- a/LArCalorimeter/LArROD/LArROD/ReadLArDigits.h +++ b/LArCalorimeter/LArROD/LArROD/ReadLArDigits.h @@ -17,7 +17,8 @@ #include "AthenaBaseComps/AthAlgorithm.h" #include "GaudiKernel/ToolHandle.h" #include "GaudiKernel/MsgStream.h" -#include "StoreGate/StoreGateSvc.h" +#include "StoreGate/StoreGateSvc.h" +#include "StoreGate/ReadHandleKey.h" #include "LArRawEvent/LArDigitContainer.h" #include "CaloIdentifier/LArEM_ID.h" #include "GaudiKernel/INTupleSvc.h" @@ -47,7 +48,8 @@ class ReadLArDigits : public AthAlgorithm const LArEM_ID* m_emId; const LArOnlineID* m_onlineHelper; std::ofstream m_outfile; - std::string m_containerKey; + SG::ReadHandleKey<LArDigitContainer> m_containerKey + { this, "ContainerKey", "FREE", "" }; std::string m_dumpFile; bool m_printCellLoc; bool m_printFebChan; diff --git a/LArCalorimeter/LArROD/src/LArCellBuilderDriver.cxx b/LArCalorimeter/LArROD/src/LArCellBuilderDriver.cxx index cdb7c4d305789425e52f7726db7e11fe1dc2f805..9dc48ae19e354f1642b667d73c5d15dcf2d55b0d 100644 --- a/LArCalorimeter/LArROD/src/LArCellBuilderDriver.cxx +++ b/LArCalorimeter/LArROD/src/LArCellBuilderDriver.cxx @@ -12,7 +12,6 @@ #include "LArRawEvent/LArDigitContainer.h" #include "LArRawEvent/LArRawChannelContainer.h" -#include "CaloIdentifier/CaloIdManager.h" #include "Identifier/Identifier.h" #include "CLHEP/Units/SystemOfUnits.h" diff --git a/LArCalorimeter/LArROD/src/LArRawChannelBuilder.cxx b/LArCalorimeter/LArROD/src/LArRawChannelBuilder.cxx index 44a18b9785457ef0d371415b0734914e60738db0..7e51d2cf138b9dfa2c6547be4ac52f4983e8e048 100644 --- a/LArCalorimeter/LArROD/src/LArRawChannelBuilder.cxx +++ b/LArCalorimeter/LArROD/src/LArRawChannelBuilder.cxx @@ -17,6 +17,8 @@ #include "LArElecCalib/ILArFEBTimeOffset.h" #include "CLHEP/Units/SystemOfUnits.h" #include "StoreGate/StoreGateSvc.h" +#include "StoreGate/ReadHandle.h" +#include "StoreGate/WriteHandle.h" #include <math.h> @@ -32,8 +34,6 @@ LArRawChannelBuilder::LArRawChannelBuilder (const std::string& name, ISvcLocator m_hvCorrTool("LArHVCorrTool"), m_onlineHelper(NULL), //m_roiMap("LArRoI_Map"), - m_DataLocation("FREE"), - m_ChannelContainerName("LArRawChannels"), m_useTDC(false), m_useOFCTool(false), m_Ecut(256*MeV), @@ -63,8 +63,6 @@ LArRawChannelBuilder::LArRawChannelBuilder (const std::string& name, ISvcLocator , m_shapesKey("LArShape") { //m_useIntercept={false,false,false,false}; - declareProperty("LArRawChannelContainerName",m_ChannelContainerName); - declareProperty("DataLocation", m_DataLocation ); declareProperty("UseTDC", m_useTDC); declareProperty("UseOFCTool", m_useOFCTool); declareProperty("Ecut", m_Ecut); @@ -95,45 +93,29 @@ LArRawChannelBuilder::LArRawChannelBuilder (const std::string& name, ISvcLocator } -StatusCode LArRawChannelBuilder::initialize(){ - - MsgStream log(msgSvc(), name()); - - StatusCode sc = detStore()->retrieve(m_onlineHelper, "LArOnlineID"); - if (sc.isFailure()) { - log << MSG::ERROR << "Could not get LArOnlineID helper !" << endmsg; - return StatusCode::FAILURE; - } +StatusCode LArRawChannelBuilder::initialize() +{ + ATH_CHECK( detStore()->retrieve(m_onlineHelper, "LArOnlineID") ); if (m_useOFCTool) { - sc = m_OFCTool.retrieve(); - if (sc.isFailure()) { - log << MSG::ERROR << "Unable to find tool for LArOFCTool" << endmsg; - return StatusCode::FAILURE; - } - } - - sc = m_adc2mevTool.retrieve(); - if (sc.isFailure()) { - log << MSG::ERROR << "Unable to find tool for LArADC2MeV" << endmsg; - return StatusCode::FAILURE; + ATH_CHECK( m_OFCTool.retrieve() ); } + ATH_CHECK( m_adc2mevTool.retrieve() ); + + // *** - const CaloIdManager *caloIdMgr=CaloIdManager::instance() ; - m_emId=caloIdMgr->getEM_ID(); + const CaloCell_ID* idHelper = nullptr; + ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_ID") ); + m_emId=idHelper->em_idHelper(); if (!m_emId) { - log << MSG::ERROR << "Could not get lar EM ID helper" << endmsg; + ATH_MSG_ERROR( "Could not get lar EM ID helper" ); return StatusCode::FAILURE; } ATH_CHECK( m_cablingKey.initialize() ); if (m_hvcorr) { - sc = m_hvCorrTool.retrieve(); - if (sc.isFailure()) { - log << MSG::ERROR << "Unable to find tool for LArHVCorrTool" << endmsg; - return StatusCode::FAILURE; - } + ATH_CHECK( m_hvCorrTool.retrieve() ); } @@ -177,21 +159,23 @@ StatusCode LArRawChannelBuilder::initialize(){ m_SamplingPeriodeLowerLimit = 0; } - log << MSG::DEBUG << "Number of OFC time bins per sampling periode=" << m_NOFCTimeBins << endmsg; - log << MSG::DEBUG << "Sampling Periode=" << m_SamplingPeriode << "ns" << endmsg; - log << MSG::DEBUG << "Sampling Periode Limits: (" << m_SamplingPeriodeLowerLimit - << "," << m_SamplingPeriodeUpperLimit << ") ns" << endmsg; + ATH_MSG_DEBUG( "Number of OFC time bins per sampling periode=" << m_NOFCTimeBins ); + ATH_MSG_DEBUG( "Sampling Periode=" << m_SamplingPeriode << "ns" ); + ATH_MSG_DEBUG( "Sampling Periode Limits: (" << m_SamplingPeriodeLowerLimit + << "," << m_SamplingPeriodeUpperLimit << ") ns" ); + + ATH_CHECK( m_dataLocation.initialize() ); + ATH_CHECK( m_tbPhaseLocation.initialize(m_useTDC) ); + ATH_CHECK( m_ChannelContainerName.initialize() ); return StatusCode::SUCCESS; } -StatusCode LArRawChannelBuilder::execute() +StatusCode LArRawChannelBuilder::execute() { - MsgStream log(msgSvc(), name()); - StatusCode sc; - + const EventContext& ctx = Gaudi::Hive::currentContext(); //Counters for errors & warnings per event int noEnergy = 0; // Number of completly failed channels in a given event int BadTiming = 0; // Number of channels with bad timing in a given event @@ -201,8 +185,6 @@ StatusCode LArRawChannelBuilder::execute() int highE = 0; // Number of channels with 'high' (above threshold) energy in a given event int saturation = 0; // Number of saturating channels in a given event - //Pointer to input data container - const LArDigitContainer* digitContainer=NULL;//Pointer to LArDigitContainer //const TBPhase* theTBPhase; //Pointer to Testbeam TDC-Phase object (if needed) float PhaseTime=0; //Testbeam TDC phase (if needed) float globalTimeOffset=0; @@ -220,53 +202,31 @@ StatusCode LArRawChannelBuilder::execute() return StatusCode::FAILURE; } - sc=evtStore()->retrieve(digitContainer,m_DataLocation); - if(sc.isFailure()) { - log << MSG::ERROR << "Can't retrieve LArDigitContainer with key " <<m_DataLocation << "from StoreGate." << endmsg; - return StatusCode::FAILURE; - } + //Pointer to input data container + SG::ReadHandle<LArDigitContainer> digitContainer (m_dataLocation, ctx); //Retrieve calibration data - sc=detStore()->retrieve(larPedestal,m_pedestalKey); - if (sc.isFailure()) { - log << MSG::ERROR << "Can't retrieve LArPedestal from Conditions Store " << m_pedestalKey << endmsg; - return StatusCode::FAILURE; - } - - sc=detStore()->retrieve(larShape,m_shapesKey); - if (sc.isFailure()) { - log << MSG::WARNING << "Can't retrieve LArShape from Conditions Store" << std::endl - << "Quality factor will not be caluclated." << endmsg; - larShape=NULL; - } - log << MSG::DEBUG << "Retrieving LArOFC object" << endmsg; - if (!m_useOFCTool) { //OFC-Conditons object only needed if OFC's not computed on-the-fly - sc=detStore()->retrieve(larOFC); - if (sc.isFailure()) { - log << MSG::ERROR << "Can't retrieve LArOFC from Conditions Store" << endmsg; - return StatusCode::FAILURE; - } + ATH_CHECK( detStore()->retrieve(larPedestal,m_pedestalKey) ); + ATH_CHECK( detStore()->retrieve(larShape,m_shapesKey) ); + ATH_MSG_DEBUG( "Retrieving LArOFC object" ); + if (!m_useOFCTool) { //OFC-Conditions object only needed if OFC's not computed on-the-fly + ATH_CHECK( detStore()->retrieve(larOFC) ); } //retrieve TDC if (m_useTDC) { //All this timing business is only necessary if the readout and the beam are not in phase (Testbeam) - const TBPhase* theTBPhase; const ILArGlobalTimeOffset* larGlobalTimeOffset; - sc = evtStore()->retrieve(theTBPhase,"TBPhase"); - if (sc.isFailure()) { - log << MSG::ERROR << "cannot allocate TBPhase with key <TBPhase>"<< endmsg; - //return StatusCode::FAILURE; - return StatusCode::SUCCESS; - } + SG::ReadHandle<TBPhase> theTBPhase (m_tbPhaseLocation, ctx); + //Get Phase in nanoseconds PhaseTime = theTBPhase->getPhase(); // ### if (m_phaseInv) PhaseTime = m_SamplingPeriode - PhaseTime ; - log << MSG::DEBUG << " *** Phase = " << PhaseTime << endmsg; + ATH_MSG_DEBUG( " *** Phase = " << PhaseTime ); // ### //Get Global Time Offset - sc=detStore()->retrieve(larGlobalTimeOffset); + StatusCode sc=detStore()->retrieve(larGlobalTimeOffset); if (sc.isSuccess()) globalTimeOffset = larGlobalTimeOffset->TimeOffset(); //Get FEB time offset @@ -275,28 +235,17 @@ StatusCode LArRawChannelBuilder::execute() } - LArRawChannelContainer* larRawChannelContainer=new LArRawChannelContainer(); + auto larRawChannelContainer = std::make_unique<LArRawChannelContainer>(); larRawChannelContainer->reserve(digitContainer->size()); - sc = evtStore()->record(larRawChannelContainer,m_ChannelContainerName); - if(sc.isFailure()) { - log << MSG::ERROR << "Can't record LArRawChannelContainer in StoreGate" << endmsg; - } // Average number of LArDigits per event m_nEvents++; m_aveChannels += digitContainer->size(); - bool verbosePrint=false; - if (log.level() <= MSG::VERBOSE) verbosePrint=true; - bool debugPrint=false; - if (log.level() <= MSG::DEBUG) debugPrint=true; - // Now all data is available, start loop over Digit Container - LArDigitContainer::const_iterator cont_it=digitContainer->begin(); - LArDigitContainer::const_iterator cont_it_e=digitContainer->end(); int ntot_raw=0; - for (;cont_it!=cont_it_e;cont_it++) { + for (const LArDigit* digit : *digitContainer) { //Data that goes into RawChannel: float energy=0; @@ -307,23 +256,23 @@ StatusCode LArRawChannelBuilder::execute() int timeSampleShift=m_initialTimeSampleShift; //Get data from LArDigit - const std::vector<short>& samples=(*cont_it)->samples(); + const std::vector<short>& samples=digit->samples(); const unsigned nSamples=samples.size(); - const HWIdentifier chid=(*cont_it)->channelID(); - const CaloGain::CaloGain gain=(*cont_it)->gain(); + const HWIdentifier chid=digit->channelID(); + const CaloGain::CaloGain gain=digit->gain(); // to be used in case of DEBUG output int layer = -99999 ; int eta = -99999 ; int phi = -99999 ; int region = -99999 ; - if (debugPrint) { + if (msgLvl (MSG::DEBUG)) { Identifier id ; try { id = cabling->cnvToIdentifier(chid); } catch ( LArID_Exception & except ) { - log << MSG::DEBUG << "A Cabling exception was caught for channel 0x!" - << MSG::hex << chid.get_compact() << MSG::dec << endmsg; + ATH_MSG_DEBUG( "A Cabling exception was caught for channel 0x!" + << MSG::hex << chid.get_compact() << MSG::dec ); continue ; } layer = m_emId->sampling(id); @@ -344,14 +293,14 @@ StatusCode LArRawChannelBuilder::execute() } } if ( nSatur>-1 ) { - if (debugPrint)log << MSG::DEBUG << "Saturation on channel 0x" << MSG::hex << chid.get_compact() << MSG::dec ; + if (msgLvl (MSG::DEBUG))msg() << MSG::DEBUG << "Saturation on channel 0x" << MSG::hex << chid.get_compact() << MSG::dec ; saturation++; } if ( m_skipSaturCells && nSatur>-1 ) { - log << ". Skipping channel." << endmsg; + msg() << ". Skipping channel." << endmsg; continue; // Ignore this cell, saturation on at least one sample } else if ( nSatur>-1 ) { - log << "." << endmsg; + msg() << "." << endmsg; } //Get conditions data for this channel: @@ -361,18 +310,13 @@ StatusCode LArRawChannelBuilder::execute() float pedestalAverage; if (pedestal <= (1.0+LArElecCalib::ERRORCODE)) { if( m_pedestalFallbackMode >= 1 ) { - if (debugPrint) { - log << MSG::DEBUG << "No pedestal found for channel 0x" << MSG::hex << chid.get_compact() << MSG::dec - << " Gain " << gain <<". Using time sample " << m_iPedestal << endmsg; - } + ATH_MSG_DEBUG( "No pedestal found for channel 0x" << MSG::hex << chid.get_compact() << MSG::dec + << " Gain " << gain <<". Using time sample " << m_iPedestal ); pedestalAverage=samples[m_iPedestal]; } else { - if (debugPrint) { - log << MSG::DEBUG << noEnergy << ". No pedestal found for channel 0x" << MSG::hex << chid.get_compact() << MSG::dec - //<< " Gain " << gain << ". Skipping channel." << endmsg; - << " [ Layer = " << layer << " - Eta = " << eta << " - Phi = " << phi << " - Region = " << region << " ]" - << " Gain = " << gain << ". Skipping channel." << endmsg; - } + ATH_MSG_DEBUG( noEnergy << ". No pedestal found for channel 0x" << MSG::hex << chid.get_compact() << MSG::dec + << " [ Layer = " << layer << " - Eta = " << eta << " - Phi = " << phi << " - Region = " << region << " ]" + << " Gain = " << gain << ". Skipping channel." ); noEnergy++; continue; } @@ -380,10 +324,8 @@ StatusCode LArRawChannelBuilder::execute() if( ( m_pedestalFallbackMode>=2 && gain==CaloGain::LARLOWGAIN ) || ( m_pedestalFallbackMode>=3 && gain==CaloGain::LARMEDIUMGAIN ) || ( m_pedestalFallbackMode>=4 && gain==CaloGain::LARHIGHGAIN ) ) { - if (debugPrint) { - log << MSG::DEBUG << "Forcing pedestal fallback for channel 0x" << MSG::hex << chid.get_compact() - << MSG::dec << " Gain=" << gain << ". Using time sample " << m_iPedestal << endmsg; - } + ATH_MSG_DEBUG( "Forcing pedestal fallback for channel 0x" << MSG::hex << chid.get_compact() + << MSG::dec << " Gain=" << gain << ". Using time sample " << m_iPedestal ); pedestalAverage=samples[m_iPedestal]; } else { //Assume there is only one pedestal value, even the ILArPedestal object returns a vector<float> @@ -404,27 +346,27 @@ StatusCode LArRawChannelBuilder::execute() if (larFebTimeOffset) febTimeOffset=larFebTimeOffset->TimeOffset(febid); double timeShift=PhaseTime+globalTimeOffset+febTimeOffset; - if (verbosePrint) - log << MSG::VERBOSE << "Channel 0x" << MSG::hex << chid.get_compact() << MSG::dec + if (msgLvl (MSG::VERBOSE)) + msg() << MSG::VERBOSE << "Channel 0x" << MSG::hex << chid.get_compact() << MSG::dec << " phase=" << PhaseTime << " Feb=" << febTimeOffset << " Global=" << globalTimeOffset; if (m_useOFCPhase) { const double ofcTimeOffset=larOFC->timeOffset(chid,gain); timeShift+=ofcTimeOffset; - if (verbosePrint) log << MSG::VERBOSE << " OFC=" << ofcTimeOffset; + if (msgLvl (MSG::VERBOSE)) msg() << MSG::VERBOSE << " OFC=" << ofcTimeOffset; } - if (verbosePrint) log << MSG::VERBOSE << " Total=" << timeShift << endmsg; + if (msgLvl (MSG::VERBOSE)) msg() << MSG::VERBOSE << " Total=" << timeShift << endmsg; if (m_allowTimeJump && timeShift >= m_NOFCPhases*m_OFCTimeBin ) { - if (verbosePrint) log << MSG::VERBOSE << "Time Sample jump: +1" << endmsg; + if (msgLvl (MSG::VERBOSE)) msg() << MSG::VERBOSE << "Time Sample jump: +1" << endmsg; timeSampleShift += 1; //timeShift -= m_NOFCTimeBins*m_OFCTimeBin ; timeShift -= m_SamplingPeriode ; } else if (m_allowTimeJump && timeShift < 0 ) { - if (verbosePrint) log << MSG::VERBOSE << "Time Sample jump: -1" << endmsg; + ATH_MSG_VERBOSE( "Time Sample jump: -1" ); timeSampleShift -= 1; //timeShift += m_NOFCTimeBins*m_OFCTimeBin ; timeShift += m_SamplingPeriode ; @@ -433,16 +375,16 @@ StatusCode LArRawChannelBuilder::execute() if (m_allowTimeJump && ( timeShift > m_NOFCPhases*m_OFCTimeBin || timeShift < 0 ) ) { BadTiming++; noEnergy++; - log << MSG::ERROR << noEnergy << ". Time offset out of range for channel 0x" << MSG::hex << chid.get_compact() << MSG::dec - << " Found " << timeShift << ", expected ( 0 - " << m_NOFCPhases*m_OFCTimeBin << ") ns. Skipping channel." << endmsg; + ATH_MSG_ERROR( noEnergy << ". Time offset out of range for channel 0x" << MSG::hex << chid.get_compact() << MSG::dec + << " Found " << timeShift << ", expected ( 0 - " << m_NOFCPhases*m_OFCTimeBin << ") ns. Skipping channel." ); continue; } if (m_allowTimeJump && timeSampleShift < 0) { BadTiming++; noEnergy++; - log << MSG::ERROR << noEnergy << ". Negative time sample (" << timeSampleShift << ") shift for channel 0x" << MSG::hex << chid.get_compact() << MSG::dec - << " Found. Skipping channel." << endmsg; + ATH_MSG_ERROR( noEnergy << ". Negative time sample (" << timeSampleShift << ") shift for channel 0x" << MSG::hex << chid.get_compact() << MSG::dec + << " Found. Skipping channel." ); continue; } @@ -454,13 +396,13 @@ StatusCode LArRawChannelBuilder::execute() //else // OFCTimeBin -= 1 ; - if (verbosePrint) log << MSG::VERBOSE << "OFC bin width = " << m_OFCTimeBin << " - OFCBin = " << OFCTimeBin << " - timeShift = " << timeShift << endmsg; + ATH_MSG_VERBOSE( "OFC bin width = " << m_OFCTimeBin << " - OFCBin = " << OFCTimeBin << " - timeShift = " << timeShift ); if ( OFCTimeBin < 0 ) { - log << MSG::ERROR << "Channel " << MSG::hex << chid.get_compact() << MSG::dec << " asks for OFC bin = " << OFCTimeBin << ". Set to 0." << endmsg; + ATH_MSG_ERROR( "Channel " << MSG::hex << chid.get_compact() << MSG::dec << " asks for OFC bin = " << OFCTimeBin << ". Set to 0." ); OFCTimeBin=0; } else if ( OFCTimeBin >= m_NOFCPhases ) { - log << MSG::ERROR << "Channel " << MSG::hex << chid.get_compact() << MSG::dec << " asks for OFC bin = " << OFCTimeBin << ". Set to (NOFCPhases-1) =" << m_NOFCTimeBins-1 << endmsg; + ATH_MSG_ERROR( "Channel " << MSG::hex << chid.get_compact() << MSG::dec << " asks for OFC bin = " << OFCTimeBin << ". Set to (NOFCPhases-1) =" << m_NOFCTimeBins-1 ); OFCTimeBin = m_NOFCPhases-1; } @@ -471,21 +413,21 @@ StatusCode LArRawChannelBuilder::execute() //Check if we have OFC for this channel and time bin if (ofc_a.size()==0) { noEnergy++; - if (debugPrint) log << MSG::DEBUG << noEnergy << ". No OFC's found for channel 0x" << MSG::hex << chid.get_compact() << MSG::dec - << " [ Layer = " << layer << " - Eta = " << eta << " - Phi = " << phi << " - Region = " << region << " ]" - << " Time bin = " << OFCTimeBin << ", Gain = " << gain << ". Skipping channel." << endmsg; + ATH_MSG_DEBUG( noEnergy << ". No OFC's found for channel 0x" << MSG::hex << chid.get_compact() << MSG::dec + << " [ Layer = " << layer << " - Eta = " << eta << " - Phi = " << phi << " - Region = " << region << " ]" + << " Time bin = " << OFCTimeBin << ", Gain = " << gain << ". Skipping channel." ); continue; } if (ofc_a.size()+timeSampleShift>nSamples) { BadTiming++; noEnergy++; - if (debugPrint) { + if (msgLvl (MSG::DEBUG)) { if (timeSampleShift==0) - log << MSG::DEBUG << "Found LArDigit with " << nSamples << " samples, but OFCs for " - << ofc_a.size() << " samples. Skipping Channel "<< endmsg; + ATH_MSG_DEBUG( "Found LArDigit with " << nSamples << " samples, but OFCs for " + << ofc_a.size() << " samples. Skipping Channel " ); else //have time sample shift - log << MSG::DEBUG << "After time sample shift of " << timeSampleShift << ", " << nSamples-timeSampleShift - << " samples left, but have OFCs for " << ofc_a.size() << " samples. Skipping Channel "<< endmsg; + ATH_MSG_DEBUG( "After time sample shift of " << timeSampleShift << ", " << nSamples-timeSampleShift + << " samples left, but have OFCs for " << ofc_a.size() << " samples. Skipping Channel " ); } continue; } @@ -495,26 +437,25 @@ StatusCode LArRawChannelBuilder::execute() for (unsigned i=0;i<(ofc_a.size());i++) ADCPeak+=(samples[i+timeSampleShift]-pedestalAverage)*ofc_a.at(i); - if (verbosePrint) log << MSG::VERBOSE << "ADC Height calculated " << ADCPeak << " TimeBin=" << OFCTimeBin << endmsg; + ATH_MSG_VERBOSE( "ADC Height calculated " << ADCPeak << " TimeBin=" << OFCTimeBin ); //ADC2MeV (a.k.a. Ramp) const std::vector<float>& ramp=m_adc2mevTool->ADC2MEV(chid,gain); //Check ramp coefficents if (ramp.size()==0) { noEnergy++; - if (debugPrint) log << MSG::DEBUG << noEnergy << ". No ADC2MeV data found for channel 0x" << MSG::hex << chid.get_compact() << MSG::dec - //<< " Gain "<< gain << " Skipping channel." << endmsg; - << " [ Layer = " << layer << " - Eta = " << eta << " - Phi = " << phi << " - Region = " << region << " ]" - << " Gain = " << gain << ". Skipping channel." << endmsg; + ATH_MSG_DEBUG( noEnergy << ". No ADC2MeV data found for channel 0x" << MSG::hex << chid.get_compact() << MSG::dec + << " [ Layer = " << layer << " - Eta = " << eta << " - Phi = " << phi << " - Region = " << region << " ]" + << " Gain = " << gain << ". Skipping channel." ); continue; } - // temporalery fix for bad ramps... should be done in the DB + // temporary fix for bad ramps... should be done in the DB // if(ramp[1]>500 || ramp[1]<0) { if(ramp[1]>m_ramp_max[gain] || ramp[1]<0) { noEnergy++; - if (debugPrint) log << MSG::DEBUG << "Bad ramp for channel " << chid << " (ramp[1] = " << ramp[1] << "): skip this channel" << endmsg; + ATH_MSG_DEBUG( "Bad ramp for channel " << chid << " (ramp[1] = " << ramp[1] << "): skip this channel" ); continue; } @@ -545,14 +486,14 @@ StatusCode LArRawChannelBuilder::execute() else ofc_b=larOFC->OFC_b(chid,gain,OFCTimeBin); if (ofc_b.size() != ofc_a.size()) {//don't have proper number of coefficients - if (debugPrint) { + if (msgLvl (MSG::DEBUG)) { if (ofc_b.size()==0) - log << MSG::DEBUG << "No time-OFC's found for channel 0x" << MSG::hex << chid.get_compact() << MSG::dec - << " Gain "<< gain << " found. Time not calculated." << endmsg; + ATH_MSG_DEBUG( "No time-OFC's found for channel 0x" << MSG::hex << chid.get_compact() << MSG::dec + << " Gain "<< gain << " found. Time not calculated." ); else - log << MSG::DEBUG << "OFC for time size " << ofc_b.size() - << " not equal to OFC for energy size " << ofc_a.size() - << " Time not calculated " << endmsg; + ATH_MSG_DEBUG( "OFC for time size " << ofc_b.size() + << " not equal to OFC for energy size " << ofc_a.size() + << " Time not calculated " ); } noTime++; }else{ @@ -562,7 +503,7 @@ StatusCode LArRawChannelBuilder::execute() // !! Time is now in ns with respect to calibration pulse shape // Used to calculate quality factor } - if (verbosePrint) log << MSG::VERBOSE << "Time calculated " << time << " TimeBin=" << OFCTimeBin << endmsg; + ATH_MSG_VERBOSE( "Time calculated " << time << " TimeBin=" << OFCTimeBin ); //Calculate Quality factor if (larShape) { //Have shape object @@ -582,25 +523,25 @@ StatusCode LArRawChannelBuilder::execute() id = cabling->cnvToIdentifier(chid); if(m_emId->is_lar_hec(id)) { ihecshift=1; - log << MSG::DEBUG << "Setting firstSample to 1 for HEC channel "<< chid.get_compact() << endmsg; + ATH_MSG_DEBUG( "Setting firstSample to 1 for HEC channel "<< chid.get_compact() ); } } catch ( LArID_Exception & except ) { - log << MSG::DEBUG << "A Cabling exception was caught for channel 0x!" - << MSG::hex << chid.get_compact() << MSG::dec << endmsg; + ATH_MSG_DEBUG( "A Cabling exception was caught for channel 0x!" + << MSG::hex << chid.get_compact() << MSG::dec ); } } //Check Shape if ((shape.size()+m_firstSample+ihecshift) < ofc_a.size()) { - if (debugPrint) { + if (msgLvl (MSG::DEBUG)) { if (shape.size()==0) - log << MSG::DEBUG << "No Shape found for channel 0x" << MSG::hex << chid.get_compact() << MSG::dec - << " Gain "<< gain << ". Quality factor not calculated." << endmsg; + ATH_MSG_DEBUG( "No Shape found for channel 0x" << MSG::hex << chid.get_compact() << MSG::dec + << " Gain "<< gain << ". Quality factor not calculated." ); else - log << MSG::DEBUG << "Shape size " << shape.size() - << "smaller than OFC size " << ofc_a.size() - << "for channel 0x" << MSG::hex << chid.get_compact() - << MSG::dec << ". Quality factor not calculated." << endmsg; + ATH_MSG_DEBUG( "Shape size " << shape.size() + << "smaller than OFC size " << ofc_a.size() + << "for channel 0x" << MSG::hex << chid.get_compact() + << MSG::dec << ". Quality factor not calculated." ); } quality=0; //Can't calculate chi^2, assume good hit. noShape++; @@ -608,8 +549,8 @@ StatusCode LArRawChannelBuilder::execute() else {//Shape ok if (time!=0 && shapeDer.size()!=shape.size()) { //Send warning - if (debugPrint) log << MSG::DEBUG << "Shape-Derivative has different size than Shape for channel 0x" << MSG::hex << chid.get_compact() << MSG::dec - << ". Derivative not taken into accout for quality factor." << endmsg; + ATH_MSG_DEBUG( "Shape-Derivative has different size than Shape for channel 0x" << MSG::hex << chid.get_compact() << MSG::dec + << ". Derivative not taken into accout for quality factor." ); noShapeDer++; }//end-if if (time==0 || shapeDer.size()!=shape.size() ) { //Calculate Q without time info @@ -648,25 +589,24 @@ StatusCode LArRawChannelBuilder::execute() LArRawChannel larRawChannel(chid,(int)energy,(int)time,iqual,iprov, gain); larRawChannelContainer->push_back(larRawChannel); //Add to container ntot_raw++; - if (verbosePrint) - log << MSG::VERBOSE << "Got LArRawChannel #" << ntot_raw << ", chid=0x" << MSG::hex << chid.get_compact() << MSG::dec - << " e=" << energy << " t=" << time << " Q=" << quality << endmsg; + ATH_MSG_VERBOSE( "Got LArRawChannel #" << ntot_raw << ", chid=0x" << MSG::hex << chid.get_compact() << MSG::dec + << " e=" << energy << " t=" << time << " Q=" << quality ); } // End loop over LArDigits - if (debugPrint) log << MSG::DEBUG << ntot_raw << " channels successfully processed, (" << highE << " with high energy)" << endmsg; + ATH_MSG_DEBUG( ntot_raw << " channels successfully processed, (" << highE << " with high energy)" ); // deal with bad timing if(BadTiming>=128){ - log<< MSG::ERROR << "Too many channels (" <<BadTiming<< " !) have a bad timing !!" << endmsg; - log<< MSG::ERROR << "OFC time constants should be revisited !!!" << endmsg; - log<< MSG::ERROR << "Event is skipped" << endmsg; + ATH_MSG_ERROR( "Too many channels (" <<BadTiming<< " !) have a bad timing !!" ); + ATH_MSG_ERROR( "OFC time constants should be revisited !!!" ); + ATH_MSG_ERROR( "Event is skipped" ); larRawChannelContainer->clear(); //return StatusCode::SUCCESS; } // in case of at least one saturating cell, skip all event (if selected) if ( saturation && m_skipSaturCells == 2 ) { - log<< MSG::ERROR << saturation << " saturating channels were found. Event is skipped." << endmsg; + ATH_MSG_ERROR( saturation << " saturating channels were found. Event is skipped." ); larRawChannelContainer->clear(); } @@ -726,48 +666,43 @@ StatusCode LArRawChannelBuilder::execute() else msglvl=MSG::INFO; - log << msglvl << " *** Error & Warning summary for this event *** " << std::endl; + msg() << msglvl << " *** Error & Warning summary for this event *** " << std::endl; if ( noEnergy ) { - log << msglvl << " " << noEnergy << " out of " + msg() << msglvl << " " << noEnergy << " out of " << digitContainer->size() << " channel(s) skipped due to a lack of basic calibration constants." << std::endl; } if ( noTime ) { - log << msglvl << " " << noTime << " out of " + msg() << msglvl << " " << noTime << " out of " << highE << " high-enegy channel(s) have no time-info due to a lack of Optimal Filtering Coefficients." << std::endl; } if ( noShape ) { - log << msglvl << " " << noShape << " out of " + msg() << msglvl << " " << noShape << " out of " << highE << " high-enegy channel(s) have no quality factor due to a lack of shape." << std::endl; } if ( noShapeDer ) { - log << msglvl << " " << noShapeDer << " out of " + msg() << msglvl << " " << noShapeDer << " out of " << highE << " high-enegy channel(s) lack the derivative of the shape. Not taken into accout for Quality factor." << std::endl; } if ( saturation ) { if ( m_skipSaturCells == 2 ) - log << MSG::ERROR << " " << saturation << " out of " + msg() << MSG::ERROR << " " << saturation << " out of " << digitContainer->size() << " channel(s) showed saturations. The complete event was skipped." << std::endl; else if ( m_skipSaturCells == 1 ) - log << MSG::ERROR << " " << saturation << " out of " + msg() << MSG::ERROR << " " << saturation << " out of " << digitContainer->size() << " channel(s) showed saturations and were skipped." << std::endl; else - log << MSG::WARNING << " " << saturation << " out of " + msg() << MSG::WARNING << " " << saturation << " out of " << digitContainer->size() << " channel(s) showed saturations." << std::endl; } - log << endmsg; + msg() << endmsg; } - // lock raw channel container - sc = evtStore()->setConst(larRawChannelContainer); - if (sc.isFailure()) { - log << MSG::ERROR << " Cannot lock RawChannel Container " << endmsg; - return(StatusCode::FAILURE); - } + ATH_CHECK( SG::makeHandle(m_ChannelContainerName, ctx).record (std::move (larRawChannelContainer)) ); return StatusCode::SUCCESS; } @@ -791,10 +726,8 @@ StatusCode LArRawChannelBuilder::finalize() // Error and Warning Summary for this job: - MsgStream log(msgSvc(), name()); - - log << MSG::DEBUG << " LArRawChannelBuilder::finalize " - << m_noEnergy << " " << m_noTime << " " << m_noShape << " " << m_noShapeDer << " " << m_saturation << endmsg; + ATH_MSG_DEBUG( " LArRawChannelBuilder::finalize " + << m_noEnergy << " " << m_noTime << " " << m_noShape << " " << m_noShapeDer << " " << m_saturation ); if ( m_noEnergy || m_noTime || m_noShape || m_noShapeDer || m_saturation ) { MSG::Level msglvl; @@ -802,37 +735,37 @@ StatusCode LArRawChannelBuilder::finalize() msglvl=MSG::ERROR; else msglvl=MSG::WARNING; - log << msglvl << " *** Error & Warning Summary for all events *** " << std::endl ; + msg() << msglvl << " *** Error & Warning Summary for all events *** " << std::endl ; if (m_noEnergy) - log << msglvl << " " << m_noEnergy << " events had on average " << (int)round(m_aveNoEnergy) + msg() << msglvl << " " << m_noEnergy << " events had on average " << (int)round(m_aveNoEnergy) << " channels out of " << (int)round(m_aveChannels) << " without basic calibration constants." << std::endl; if (m_noTime) - log << msglvl << " " << m_noTime << " events had on average " << (int)round(m_aveNoTime) + msg() << msglvl << " " << m_noTime << " events had on average " << (int)round(m_aveNoTime) << " channels out of " << (int)round(m_aveChannels) << " without OFCs for timing." << std::endl ; if (m_noShape) - log << msglvl << " " << m_noShape << " events had on average " << (int)round(m_aveNoShape) + msg() << msglvl << " " << m_noShape << " events had on average " << (int)round(m_aveNoShape) << " channels out of " << (int)round(m_aveChannels) << " without shape information." << std::endl; if (m_noShapeDer) - log << msglvl << " " << m_noShapeDer << " events had on average " << (int)round(m_aveNoShapeDer) + msg() << msglvl << " " << m_noShapeDer << " events had on average " << (int)round(m_aveNoShapeDer) << " channels out of " << (int)round(m_aveChannels) << " without shape derivative." << std::endl; if ( m_saturation ) - log << msglvl << " " << m_saturation << " events had on average " << (int)round(m_aveSaturCells) + msg() << msglvl << " " << m_saturation << " events had on average " << (int)round(m_aveSaturCells) << " out of " << (int)round(m_aveChannels) << " saturating channels." << std::endl ; - log << endmsg; + msg() << endmsg; } else - log << MSG::INFO << "LArRawChannelBuilder finished without errors or warnings." << endmsg; + ATH_MSG_INFO( "LArRawChannelBuilder finished without errors or warnings." ); //if (m_larRawChannelContainer) { //m_larRawChannelContainer->release(); diff --git a/LArCalorimeter/LArROD/src/LArRawChannelBuilderADC2EConstants.cxx b/LArCalorimeter/LArROD/src/LArRawChannelBuilderADC2EConstants.cxx index d3377641e7006249f880efb989ef2ed422cdf7e7..165ba8d1f5f655c713f0b1d5d5abfa9bfe31852a 100755 --- a/LArCalorimeter/LArROD/src/LArRawChannelBuilderADC2EConstants.cxx +++ b/LArCalorimeter/LArROD/src/LArRawChannelBuilderADC2EConstants.cxx @@ -1,12 +1,12 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "LArROD/LArRawChannelBuilderADC2EConstants.h" #include "LArROD/LArRawChannelBuilderStatistics.h" -#include "CaloIdentifier/CaloIdManager.h" +#include "CaloIdentifier/CaloCell_ID.h" #include "Identifier/Identifier.h" using CLHEP::MeV; @@ -27,10 +27,11 @@ LArRawChannelBuilderADC2EConstants::LArRawChannelBuilderADC2EConstants(const std StatusCode LArRawChannelBuilderADC2EConstants::initTool() { - const CaloIdManager *caloIdMgr=CaloIdManager::instance() ; - m_emId=caloIdMgr->getEM_ID(); - m_fcalId=caloIdMgr->getFCAL_ID(); - m_hecId=caloIdMgr->getHEC_ID(); + const CaloCell_ID* idHelper = nullptr; + ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_ID") ); + m_emId=idHelper->em_idHelper(); + m_fcalId=idHelper->fcal_idHelper(); + m_hecId=idHelper->hec_idHelper(); return StatusCode::SUCCESS; } diff --git a/LArCalorimeter/LArROD/src/LArRawChannelBuilderADC2EDataBase.cxx b/LArCalorimeter/LArROD/src/LArRawChannelBuilderADC2EDataBase.cxx index 7caf6470f79b36f9595c8734f41702a26cd16304..10257ad0320cd0c81a1f113fa9bfcc3e18a85e22 100755 --- a/LArCalorimeter/LArROD/src/LArRawChannelBuilderADC2EDataBase.cxx +++ b/LArCalorimeter/LArROD/src/LArRawChannelBuilderADC2EDataBase.cxx @@ -1,12 +1,11 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "LArROD/LArRawChannelBuilderADC2EDataBase.h" #include "LArROD/LArRawChannelBuilderStatistics.h" -#include "CaloIdentifier/CaloIdManager.h" #include "Identifier/Identifier.h" #include "StoreGate/StoreGateSvc.h" #include "LArIdentifier/LArOnlineID.h" diff --git a/LArCalorimeter/LArROD/src/LArRawChannelBuilderToolAverage.cxx b/LArCalorimeter/LArROD/src/LArRawChannelBuilderToolAverage.cxx index 58a70dcacb4f475b64a566c85aca9f3693bdf42b..971cbb62ecf510fcbbb61e7c3249161ba2fc3563 100755 --- a/LArCalorimeter/LArROD/src/LArRawChannelBuilderToolAverage.cxx +++ b/LArCalorimeter/LArROD/src/LArRawChannelBuilderToolAverage.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ @@ -9,7 +9,7 @@ #include "LArRawEvent/LArDigit.h" #include "CLHEP/Units/SystemOfUnits.h" -#include "CaloIdentifier/CaloIdManager.h" +#include "CaloIdentifier/CaloCell_ID.h" #include "LArIdentifier/LArOnlineID.h" #include "Identifier/Identifier.h" #include <math.h> @@ -48,17 +48,14 @@ LArRawChannelBuilderToolAverage::LArRawChannelBuilderToolAverage(const std::stri StatusCode LArRawChannelBuilderToolAverage::initTool() { - const CaloIdManager *caloIdMgr=CaloIdManager::instance() ; - m_emId=caloIdMgr->getEM_ID(); - m_fcalId=caloIdMgr->getFCAL_ID(); - m_hecId=caloIdMgr->getHEC_ID(); + const CaloCell_ID* idHelper = nullptr; + ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_ID") ); + m_emId=idHelper->em_idHelper(); + m_fcalId=idHelper->fcal_idHelper(); + m_hecId=idHelper->hec_idHelper(); - if (detStore()->retrieve(m_onlineHelper, "LArOnlineID").isFailure()){ - msg(MSG::ERROR) << "Could not get LArOnlineID m_helper !" << endmsg; - return StatusCode::FAILURE; - } - + ATH_CHECK( detStore()->retrieve(m_onlineHelper, "LArOnlineID") ); return StatusCode::SUCCESS; } diff --git a/LArCalorimeter/LArROD/src/LArRawChannelBuilderToolCubic.cxx b/LArCalorimeter/LArROD/src/LArRawChannelBuilderToolCubic.cxx index 0ec7ae721c5bf428a2d5365a898c2dbeb15b1c6d..5f44db36a1357475a84b9751a75ca1630b351241 100755 --- a/LArCalorimeter/LArROD/src/LArRawChannelBuilderToolCubic.cxx +++ b/LArCalorimeter/LArROD/src/LArRawChannelBuilderToolCubic.cxx @@ -1,12 +1,12 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "LArROD/LArRawChannelBuilderToolCubic.h" #include "GaudiKernel/MsgStream.h" -#include "CaloIdentifier/CaloIdManager.h" +#include "CaloIdentifier/CaloCell_ID.h" #include "Identifier/Identifier.h" #include "LArRawEvent/LArDigit.h" @@ -41,8 +41,9 @@ LArRawChannelBuilderToolCubic::LArRawChannelBuilderToolCubic(const std::string& StatusCode LArRawChannelBuilderToolCubic::initTool() { - const CaloIdManager *caloIdMgr=CaloIdManager::instance() ; - m_fcalId=caloIdMgr->getFCAL_ID(); + const CaloCell_ID* idHelper = nullptr; + ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_ID") ); + m_fcalId=idHelper->fcal_idHelper(); return StatusCode::SUCCESS; } diff --git a/LArCalorimeter/LArROD/src/LArRawChannelBuilderToolParabola.cxx b/LArCalorimeter/LArROD/src/LArRawChannelBuilderToolParabola.cxx index 0b7ff1df4529abfee3afb203439942d6260a852d..59b5bdb1604fe42b2ef7a17785c17d2c9fe908b2 100755 --- a/LArCalorimeter/LArROD/src/LArRawChannelBuilderToolParabola.cxx +++ b/LArCalorimeter/LArROD/src/LArRawChannelBuilderToolParabola.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ @@ -7,7 +7,7 @@ #include "GaudiKernel/MsgStream.h" #include "GaudiKernel/StatusCode.h" -#include "CaloIdentifier/CaloIdManager.h" +#include "CaloIdentifier/CaloCell_ID.h" #include "Identifier/Identifier.h" #include "LArRawEvent/LArDigit.h" @@ -34,15 +34,11 @@ LArRawChannelBuilderToolParabola::LArRawChannelBuilderToolParabola(const std::st StatusCode LArRawChannelBuilderToolParabola::initTool() { - if(m_parabolaRecoTool.retrieve().isFailure() ) - { - MsgStream log(msgSvc(), name()); - log << MSG::ERROR << "Unable to find tool LArParabolaPeakRecoTool" << endmsg; - return StatusCode::FAILURE; - } + ATH_CHECK( m_parabolaRecoTool.retrieve() ); - const CaloIdManager *caloIdMgr=CaloIdManager::instance(); - m_emId=caloIdMgr->getEM_ID(); + const CaloCell_ID* idHelper = nullptr; + ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_ID") ); + m_emId=idHelper->em_idHelper(); return StatusCode::SUCCESS; } diff --git a/LArCalorimeter/LArROD/src/LArRawChannelSimpleBuilder.cxx b/LArCalorimeter/LArROD/src/LArRawChannelSimpleBuilder.cxx index 217bdab9c5f1b6c7cde25585ccd084a005d53bc5..b8af2c7d7e1950b1587ed3d611a7fde6f7e4a6f4 100644 --- a/LArCalorimeter/LArROD/src/LArRawChannelSimpleBuilder.cxx +++ b/LArCalorimeter/LArROD/src/LArRawChannelSimpleBuilder.cxx @@ -5,9 +5,11 @@ #include "LArROD/LArRawChannelSimpleBuilder.h" #include "LArRawEvent/LArDigitContainer.h" #include "CLHEP/Units/SystemOfUnits.h" -#include "CaloIdentifier/CaloIdManager.h" +#include "CaloIdentifier/CaloCell_ID.h" #include "LArIdentifier/LArOnlID_Exception.h" #include "StoreGate/StoreGateSvc.h" +#include "StoreGate/ReadHandle.h" +#include "StoreGate/WriteHandle.h" #include "LArElecCalib/ILArPedestal.h" @@ -18,7 +20,7 @@ using CLHEP::ns; using CLHEP::MeV; LArRawChannelSimpleBuilder::LArRawChannelSimpleBuilder (const std::string& name, ISvcLocator* pSvcLocator): - AthAlgorithm(name, pSvcLocator), + AthReentrantAlgorithm(name, pSvcLocator), // m_roiMap("LArRoI_Map"), m_emId(0), m_fcalId(0), @@ -26,14 +28,9 @@ LArRawChannelSimpleBuilder::LArRawChannelSimpleBuilder (const std::string& name, m_onlineHelper(0), m_adc2mevTool("LArADC2MeVTool"), m_peakParabolaTool("LArParabolaPeakTool"), - m_DataLocation("FREE"), - m_ChannelContainerName("LArRawChannels"), - m_iPedestal(0),// jobO ? - m_larRawChannelContainer(0) + m_iPedestal(0)// jobO ? { //m_useIntercept={false,false,false,false}; - declareProperty("LArRawChannelContainerName",m_ChannelContainerName); - declareProperty("DataLocation", m_DataLocation ); declareProperty("maxSamp",m_imaxSamp=8); declareProperty("RecoMode",m_mode="CUBIC"); declareProperty("CubicRecoTimeModeFCAL",m_FCALmodeTime="LINEAR"); @@ -72,97 +69,64 @@ LArRawChannelSimpleBuilder::LArRawChannelSimpleBuilder (const std::string& name, } -StatusCode LArRawChannelSimpleBuilder::initialize(){ - MsgStream log(msgSvc(), name()); - StatusCode sc; - - log << MSG::DEBUG << "In Initialize." << endmsg; - - /* - if (m_roiMap.retrieve().isFailure()) { - log << MSG::ERROR << "Unable to find tool LArRoI_Map" << endmsg; - return StatusCode::FAILURE; - } - */ +StatusCode LArRawChannelSimpleBuilder::initialize() +{ + ATH_MSG_DEBUG( "In Initialize." ); if (m_useRampDB) { - if (m_adc2mevTool.retrieve().isFailure()) { - log << MSG::ERROR << "Unable to find tool for LArADC2MeV" << endmsg; - return StatusCode::FAILURE; - } + ATH_CHECK( m_adc2mevTool.retrieve() ); } if ( m_mode == "PARABOLA"){ if (m_peakParabolaTool.retrieve().isFailure()) - {log << MSG::ERROR << "Can't get LArParabolaPeakRecoTool" << endmsg; + { + ATH_MSG_ERROR( "Can't get LArParabolaPeakRecoTool" ); return StatusCode::SUCCESS; - } - log << MSG::DEBUG << "LArParabolaPeakRecoTool retrieved with success!" << endmsg ; + } + ATH_MSG_DEBUG( "LArParabolaPeakRecoTool retrieved with success!" ); } - const CaloIdManager *caloIdMgr=CaloIdManager::instance() ; - m_emId=caloIdMgr->getEM_ID(); - m_fcalId=caloIdMgr->getFCAL_ID(); - m_hecId=caloIdMgr->getHEC_ID(); + const CaloCell_ID* idHelper = nullptr; + ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_ID") ); + m_emId=idHelper->em_idHelper(); + m_fcalId=idHelper->fcal_idHelper(); + m_hecId=idHelper->hec_idHelper(); ATH_CHECK(m_cablingKey.initialize()); - sc = detStore()->retrieve(m_onlineHelper, "LArOnlineID"); - if (sc.isFailure()) { - log << MSG::ERROR << "Could not get LArOnlineID helper !" << endmsg; - return StatusCode::FAILURE; - } + ATH_CHECK( detStore()->retrieve(m_onlineHelper, "LArOnlineID") ); - + + ATH_CHECK( m_DataLocation.initialize() ); + ATH_CHECK( m_ChannelContainerName.initialize() ); return StatusCode::SUCCESS; } -StatusCode LArRawChannelSimpleBuilder::execute() { - StatusCode sc; - MsgStream log(msgSvc(), name()); - - log << MSG::DEBUG << "In execute" << endmsg; +StatusCode LArRawChannelSimpleBuilder::execute (const EventContext& ctx) const +{ + ATH_MSG_DEBUG( "In execute" ); - //Pointer to input data container - const LArDigitContainer* digitContainer;//Pointer to LArDigitContainer - //Retrieve Digit Container - log << MSG::DEBUG << "About to retrieve LArDigitContainer with key " << m_DataLocation << endmsg; - sc=evtStore()->retrieve(digitContainer,m_DataLocation); - log << MSG::DEBUG << "1) LArDigitContainer container size = " << digitContainer->size() << endmsg; - if(sc.isFailure()) { - log << MSG::ERROR << "Can't retrieve LArDigitContainer with key " <<m_DataLocation << "from StoreGate." << endmsg; - return StatusCode::FAILURE; - } + ATH_MSG_DEBUG( "About to retrieve LArDigitContainer with key " << m_DataLocation ); + SG::ReadHandle<LArDigitContainer> digitContainer (m_DataLocation, ctx); + ATH_MSG_DEBUG( "1) LArDigitContainer container size = " << digitContainer->size() ); - log << MSG::DEBUG << "2) LArDigitContainer container size = " << digitContainer->size() << endmsg; + ATH_MSG_DEBUG( "2) LArDigitContainer container size = " << digitContainer->size() ); if( digitContainer->size() < 1 ) { - log << MSG::INFO << "Empty LArDigitContainer container." << endmsg; + ATH_MSG_INFO( "Empty LArDigitContainer container." ); return StatusCode::SUCCESS; } - if(!m_larRawChannelContainer) { - //Prepare LArRawChannelContainer - m_larRawChannelContainer = new LArRawChannelContainer(); - } - - m_larRawChannelContainer ->clear(); + auto larRawChannelContainer = std::make_unique<LArRawChannelContainer>(); - // Put this LArRawChannel container in the transient store - sc = evtStore()->record(m_larRawChannelContainer, m_ChannelContainerName); - if(sc.isFailure()) { - log << MSG::INFO << "Can't record LArRawChannelContainer in StoreGate" << endmsg; - } - //Pointer to conditions data objects const ILArPedestal* larPedestal=NULL; if (m_usePedestalDB) { - sc=detStore()->retrieve(larPedestal); - if (sc.isFailure()) { + if (detStore()->retrieve(larPedestal).isFailure()) { larPedestal=NULL; - log << MSG::DEBUG << "No pedestal found in database. Use default values." << endmsg; + ATH_MSG_DEBUG( "No pedestal found in database. Use default values." ); } } @@ -190,17 +154,15 @@ StatusCode LArRawChannelSimpleBuilder::execute() { for(int iloop=0;iloop<2;iloop++) { //Now all data is available, start loop over Digit Container - log << MSG::DEBUG << "Loop over Digit Container " << endmsg; - - LArDigitContainer::const_iterator cont_it=digitContainer->begin(); - LArDigitContainer::const_iterator cont_it_e=digitContainer->end(); - for (;cont_it!=cont_it_e;cont_it++) { + ATH_MSG_DEBUG( "Loop over Digit Container " ); + + for (const LArDigit* digit : *digitContainer) { //Get data from LArDigit - const std::vector<short>& samples = (*cont_it)->samples(); + const std::vector<short>& samples = digit->samples(); unsigned int nSamples = samples.size(); - const HWIdentifier chid = (*cont_it)->channelID(); - const CaloGain::CaloGain gain = (*cont_it)->gain(); + const HWIdentifier chid = digit->channelID(); + const CaloGain::CaloGain gain = digit->gain(); float thePedestal=-1; @@ -211,7 +173,7 @@ StatusCode LArRawChannelSimpleBuilder::execute() { } if (thePedestal<0) { thePedestal = (float)samples[m_iPedestal]; - log << MSG::DEBUG << "No pedestal found for this cell. Use default value " << thePedestal << endmsg; + ATH_MSG_DEBUG( "No pedestal found for this cell. Use default value " << thePedestal ); } //>>>> PL June 20, 2004: subtract pedestal first, assume first sample ->JO? std::vector<float> mySamples; @@ -235,14 +197,13 @@ StatusCode LArRawChannelSimpleBuilder::execute() { GainFactor = 1.0; } else { GainFactor = 1.0; - log << MSG::ERROR << "Channel " << chid << "unknown gain: " << gain << endmsg; + ATH_MSG_ERROR( "Channel " << chid << "unknown gain: " << gain ); } // Get hardware identifier for later use. HWIdentifier FebID = m_onlineHelper->feb_Id(chid); unsigned int channel = m_onlineHelper->channel(chid); - MSG::hex(log) << MSG::DEBUG - << " FebID / chid / channel = " << FebID << " / " << chid << " / " << channel << endmsg; + ATH_MSG_DEBUG( std::hex << " FebID / chid / channel = " << FebID << " / " << chid << " / " << channel ); // And note if this is an FCAL channel with fast pulses (cubic fails) // EM and HEC are also tested to adjust the signal range for averaging @@ -278,7 +239,7 @@ StatusCode LArRawChannelSimpleBuilder::execute() { } //catch( LArOnlID_Exception & except) catch (LArID_Exception & execpt) { - MSG::hex(log) << MSG::DEBUG << " is disconnected." << endmsg; + ATH_MSG_DEBUG (" is disconnected."); // The question now being: do we want to skip this channel??? // Probably yes, so do so. RMcP 9 June 2006 continue; @@ -291,9 +252,9 @@ StatusCode LArRawChannelSimpleBuilder::execute() { // sanity checks if ( nAverage > nSamples ) { - log << MSG::WARNING << " Number of samples to average (" - << nAverage << ") is larger than total number of samples (" - << nSamples << ")! adjusting nAverage ... " << endmsg; + ATH_MSG_WARNING( " Number of samples to average (" + << nAverage << ") is larger than total number of samples (" + << nSamples << ")! adjusting nAverage ... " ); nAverage = nSamples; } @@ -301,7 +262,7 @@ StatusCode LArRawChannelSimpleBuilder::execute() { if ( iloop == 0 ) { if (pSum == 0) { - MSG::hex(log) << MSG::ERROR << " don't have pSum pointer." << endmsg; + ATH_MSG_ERROR( " don't have pSum pointer." ); continue; } @@ -350,7 +311,7 @@ StatusCode LArRawChannelSimpleBuilder::execute() { if(isFCAL && m_mode == "CUBIC" && ! ( CubicFailed = maxADCPeak <= m_cubicAdcCut ) ) { - log << MSG::DEBUG << " Special reconstruction for FCAL." << endmsg; + ATH_MSG_DEBUG( " Special reconstruction for FCAL." ); unsigned int it0; @@ -412,14 +373,14 @@ StatusCode LArRawChannelSimpleBuilder::execute() { int layer = 0; try { const Identifier id = cabling->cnvToIdentifier(chid); - MSG::hex(log) << MSG::DEBUG << " id = " << id << endmsg; + ATH_MSG_DEBUG( std::hex << " id = " << id ); if (m_emId->is_em_barrel(id)) { layer= m_emId->sampling(id); } } catch (LArID_Exception & execpt){ - MSG::hex(log) << MSG::DEBUG - << " Cannot get offline identifier from online ID = " << chid << endmsg; + ATH_MSG_DEBUG( std::hex + << " Cannot get offline identifier from online ID = " << chid ); } std::vector<float> peak =m_peakParabolaTool->peak(samples,layer,thePedestal); @@ -428,12 +389,12 @@ StatusCode LArRawChannelSimpleBuilder::execute() { if (peak.size()==2)time = peak[1]; else time = peak[2]; }else{ - log << MSG::DEBUG << "No pic is computed from Parabola. Use scaled average of selected samples" << endmsg; + ATH_MSG_DEBUG( "No pic is computed from Parabola. Use scaled average of selected samples" ); ADCPeak = averagedADC; time = -99.; } }else{ - log << MSG::FATAL << "No parabola tool available ! Choose another mode" << endmsg; + ATH_MSG_FATAL( "No parabola tool available ! Choose another mode" ); } } @@ -488,20 +449,19 @@ StatusCode LArRawChannelSimpleBuilder::execute() { time = -99. ; } - log << MSG::DEBUG - << "Flag: " - << CubicFailed - << " Detector: " - << (isEM?"EM":(isHEC?"HEC":(isFCAL?"FCAL":"none"))) - << " Mode: " - << m_mode - << " Signal: " - << ADCPeak - << " Peak: " - << maxADCPeak - << " PeakSample: " - << iPeakSamp - << endmsg; + ATH_MSG_DEBUG( "Flag: " + << CubicFailed + << " Detector: " + << (isEM?"EM":(isHEC?"HEC":(isFCAL?"FCAL":"none"))) + << " Mode: " + << m_mode + << " Signal: " + << ADCPeak + << " Peak: " + << maxADCPeak + << " PeakSample: " + << iPeakSamp + ); float energy=-9999; if (m_useRampDB) { @@ -519,7 +479,7 @@ StatusCode LArRawChannelSimpleBuilder::execute() { } } if (energy==-9999) { - log << MSG::DEBUG << "No Ramp found for this cell. Use default values" << endmsg; + ATH_MSG_DEBUG( "No Ramp found for this cell. Use default values" ); //Apply default values // Now must get subdetector ID and feed in here ... float ADCtoMeV = 10.0; @@ -532,7 +492,7 @@ StatusCode LArRawChannelSimpleBuilder::execute() { try { const Identifier id = cabling->cnvToIdentifier(chid); - MSG::hex(log) << MSG::DEBUG << " id = " << id << endmsg; + ATH_MSG_DEBUG( std::hex << " id = " << id ); if (m_emId->is_em_barrel(id)) { const int layer= m_emId->sampling(id); @@ -540,31 +500,31 @@ StatusCode LArRawChannelSimpleBuilder::execute() { ADCtoMeV = m_ADCtoMeVEMB[layer]; if (layer==2 && eta<32) ADCtoMeV=ADCtoMeV*(12./18.); //Correct for lead thickness - log << MSG::DEBUG << " in EMB s="<< layer <<", using ADCtoMeV = " << ADCtoMeV << endmsg; + ATH_MSG_DEBUG( " in EMB s="<< layer <<", using ADCtoMeV = " << ADCtoMeV ); } else if (m_emId->is_em_endcap_inner(id)) { // m_emId->sampling(id); ADCtoMeV = m_ADCtoMeVEMECInner[m_emId->sampling(id)-1]; - log << MSG::DEBUG << " in EMEC inner s="<<m_emId->sampling(id)<<", using ADCtoMeV = " << ADCtoMeV << endmsg; + ATH_MSG_DEBUG( " in EMEC inner s="<<m_emId->sampling(id)<<", using ADCtoMeV = " << ADCtoMeV ); } else if (m_emId->is_em_endcap_outer(id)) { // m_emId->sampling(id); // ADCtoMeV = m_ADCtoMeVEMECOuter[m_emId->sampling(id)-1]; ADCtoMeV = m_ADCtoMeVEMECOuter[m_emId->sampling(id)]; - log << MSG::DEBUG << " in EMEC outer s="<<m_emId->sampling(id)<<", using ADCtoMeV = " << ADCtoMeV << endmsg; + ATH_MSG_DEBUG( " in EMEC outer s="<<m_emId->sampling(id)<<", using ADCtoMeV = " << ADCtoMeV ); } else if (m_fcalId->is_lar_fcal(id)) { // m_fcalId->module(chid); ADCtoMeV = m_ADCtoMeVFCAL[m_fcalId->module(id)-1]; - log << MSG::DEBUG << " in FCAL m=" << m_fcalId->module(id)<<", using ADCtoMeV = " << ADCtoMeV << endmsg; + ATH_MSG_DEBUG( " in FCAL m=" << m_fcalId->module(id)<<", using ADCtoMeV = " << ADCtoMeV ); } else if (m_hecId->is_lar_hec(id)) { // m_layer[m_cellIndex]=m_hecId->sampling(id); ADCtoMeV = m_ADCtoMeVHEC[0]; - log << MSG::DEBUG << " in HEC s="<<m_hecId->sampling(id)<<", using ADCtoMeV = " << ADCtoMeV << endmsg; + ATH_MSG_DEBUG( " in HEC s="<<m_hecId->sampling(id)<<", using ADCtoMeV = " << ADCtoMeV ); } } //catch( LArOnlID_Exception & except) catch (LArID_Exception & execpt) - {MSG::hex(log) << MSG::DEBUG - << " is disconnected. Set ADCtoMeV to 1" << endmsg; - ADCtoMeV=1; + { + ATH_MSG_DEBUG( " is disconnected. Set ADCtoMeV to 1" ); + ADCtoMeV=1; } energy = ADCPeak * ADCtoMeV * GainFactor; } @@ -574,7 +534,7 @@ StatusCode LArRawChannelSimpleBuilder::execute() { time*=1000; //Convert to picoseconds //Make LArRawChannel Object with new data LArRawChannel larRawChannel(chid,(int)energy,(int)time,iquality,iprovenance, gain); - m_larRawChannelContainer->add(larRawChannel); //Add to container + larRawChannelContainer->add(larRawChannel); //Add to container } }// End loop over LArDigits if ( iloop == 0 ) { @@ -589,7 +549,7 @@ StatusCode LArRawChannelSimpleBuilder::execute() { } } if ( fSumEM.size() > 0 ) { - log << MSG::DEBUG << "Found best EM window starting at sample <" << nMinEM << ">" << endmsg; + ATH_MSG_DEBUG( "Found best EM window starting at sample <" << nMinEM << ">" ); } for(i=0;i<fSumHEC.size();i++) { @@ -599,7 +559,7 @@ StatusCode LArRawChannelSimpleBuilder::execute() { } } if ( fSumHEC.size() > 0 ) { - log << MSG::DEBUG << "Found best HEC window starting at sample <" << nMinHEC << ">" << endmsg; + ATH_MSG_DEBUG( "Found best HEC window starting at sample <" << nMinHEC << ">" ); } for(i=0;i<fSumFCAL.size();i++) { @@ -609,29 +569,24 @@ StatusCode LArRawChannelSimpleBuilder::execute() { } } if ( fSumFCAL.size() > 0 ) { - log << MSG::DEBUG << "Found best FCAL window starting at sample <" << nMinFCAL << ">" << endmsg; + ATH_MSG_DEBUG( "Found best FCAL window starting at sample <" << nMinFCAL << ">" ); } } }// End of double loop over Digit containers - log << MSG::DEBUG << "Finished loop over Digit Container " << endmsg; + ATH_MSG_DEBUG( "Finished loop over Digit Container " ); - // lock raw channel container - sc = evtStore()->setConst(m_larRawChannelContainer); - if (sc.isFailure()) { - log << MSG::ERROR << " Cannot lock RawChannel Container " << endmsg; - return(StatusCode::FAILURE); - } + // Put this LArRawChannel container in the transient store + ATH_CHECK( SG::makeHandle (m_ChannelContainerName, ctx).record (std::move (larRawChannelContainer)) ); return StatusCode::SUCCESS; } StatusCode LArRawChannelSimpleBuilder::finalize() {//Error and Warning Summary for this job: - MsgStream log(msgSvc(), name()); - log << MSG::INFO << "LArRawChannelSimpleBuilder finished." << endmsg; + ATH_MSG_INFO( "LArRawChannelSimpleBuilder finished." ); return StatusCode::SUCCESS; } diff --git a/LArCalorimeter/LArROD/src/LArSuperCellBuilderDriver.cxx b/LArCalorimeter/LArROD/src/LArSuperCellBuilderDriver.cxx index fdfd494cdc1a43deb2a867585fb2a0c554b9d277..10c0e2b8225452eb00933ee2bf53291a0bbdf7e6 100644 --- a/LArCalorimeter/LArROD/src/LArSuperCellBuilderDriver.cxx +++ b/LArCalorimeter/LArROD/src/LArSuperCellBuilderDriver.cxx @@ -12,7 +12,6 @@ #include "LArRawEvent/LArDigitContainer.h" #include "LArRawEvent/LArRawChannelContainer.h" -#include "CaloIdentifier/CaloIdManager.h" #include "Identifier/Identifier.h" #include "CaloDetDescr/CaloDetDescrManager.h" #include "CaloEvent/CaloCellContainer.h" diff --git a/LArCalorimeter/LArROD/src/ReadLArDigits.cxx b/LArCalorimeter/LArROD/src/ReadLArDigits.cxx index 6fdeb225a0d49ffff9c9e2f2dbf0f1c5df48acc8..21144d24774173c59e208aec2746e35831611be5 100644 --- a/LArCalorimeter/LArROD/src/ReadLArDigits.cxx +++ b/LArCalorimeter/LArROD/src/ReadLArDigits.cxx @@ -6,7 +6,8 @@ #include "LArRawEvent/LArDigit.h" #include <vector> // #include "GaudiKernel/IToolSvc.h" -#include "CaloIdentifier/CaloIdManager.h" +#include "CaloIdentifier/CaloCell_ID.h" +#include "StoreGate/ReadHandle.h" ReadLArDigits::SortDigits::SortDigits(const LArOnlineID* onlineHelper) @@ -19,7 +20,6 @@ ReadLArDigits::ReadLArDigits(const std::string& name, ISvcLocator* pSvcLocator) m_ntuplePtr(NULL) {m_count=0; - declareProperty("ContainerKey",m_containerKey=""); declareProperty("DumpFile",m_dumpFile=""); declareProperty("PrintCellLocation",m_printCellLoc=false); declareProperty("PrintFebChan",m_printFebChan=true); @@ -31,19 +31,15 @@ ReadLArDigits::~ReadLArDigits() } StatusCode ReadLArDigits::initialize() -{ MsgStream log(msgSvc(), name()); - log << MSG::INFO << "Initialize" << endmsg; +{ + ATH_MSG_INFO( "Initialize" ); - const CaloIdManager *caloIdMgr=CaloIdManager::instance() ; - m_emId=caloIdMgr->getEM_ID(); + const CaloCell_ID* idHelper = nullptr; + ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_ID") ); + m_emId=idHelper->em_idHelper(); ATH_CHECK(m_cablingKey.initialize()); - - StatusCode sc = detStore()->retrieve(m_onlineHelper, "LArOnlineID"); - if (sc.isFailure()) { - log << MSG::ERROR << "Could not get LArOnlineID helper !" << endmsg; - return StatusCode::FAILURE; - } + ATH_CHECK( detStore()->retrieve(m_onlineHelper, "LArOnlineID") ); if (m_dumpFile.size()>0) m_outfile.open(m_dumpFile.c_str(),std::ios::out); @@ -51,138 +47,73 @@ StatusCode ReadLArDigits::initialize() NTupleFilePtr file1(ntupleSvc(),"/NTUPLES/FILE1"); - if (!file1) - {log << MSG::ERROR << "Booking of NTuple failed" << endmsg; + if (!file1) { + ATH_MSG_ERROR( "Booking of NTuple failed" ); return StatusCode::FAILURE; - } + } NTuplePtr nt(ntupleSvc(),"/NTUPLES/FILE1/LARDIGITS"); if (!nt) { nt=ntupleSvc()->book("/NTUPLES/FILE1/LARDIGITS",CLID_ColumnWiseTuple,"LArDigits"); } - if (!nt) - {log << MSG::ERROR << "Booking of NTuple failed" << endmsg; - return StatusCode::FAILURE; - } - - sc=nt->addItem("icell",m_cellIndex,0,3600); - if (sc!=StatusCode::SUCCESS) - {log << MSG::ERROR << "addItem 'Cell Index' failed" << endmsg; - return StatusCode::FAILURE; - } - - //sc=nt->addItem("layer",m_layer,0,4); - sc=nt->addItem("layer",m_cellIndex,m_layer); - if (sc!=StatusCode::SUCCESS) - {log << MSG::ERROR << "addItem 'Layer' failed" << endmsg; - return StatusCode::FAILURE; - } - - //sc=nt->addItem("ieta",m_eta,0,510); - sc=nt->addItem("ieta",m_cellIndex,m_eta); - if (sc!=StatusCode::SUCCESS) - {log << MSG::ERROR << "addItem 'Eta' failed" << endmsg; - return StatusCode::FAILURE; - } - - sc=nt->addItem("iphi",m_cellIndex,m_phi); - if (sc!=StatusCode::SUCCESS) - {log << MSG::ERROR << "addItem 'Phi' failed" << endmsg; - return StatusCode::FAILURE; - } - - sc=nt->addItem("barrel_ec",m_cellIndex,m_barrel_ec); - if (sc!=StatusCode::SUCCESS) - {log << MSG::ERROR << "addItem 'barrel_ec' failed" << endmsg; - return StatusCode::FAILURE; - } - - sc=nt->addItem("pos_neg",m_cellIndex,m_pos_neg); - if (sc!=StatusCode::SUCCESS) - {log << MSG::ERROR << "addItem 'pos_neg' failed" << endmsg; - return StatusCode::FAILURE; - } - - sc=nt->addItem("FT",m_cellIndex,m_FT); - if (sc!=StatusCode::SUCCESS) - {log << MSG::ERROR << "addItem 'FT' failed" << endmsg; - return StatusCode::FAILURE; - } - - sc=nt->addItem("slot",m_cellIndex,m_slot); - if (sc!=StatusCode::SUCCESS) - {log << MSG::ERROR << "addItem 'slot' failed" << endmsg; - return StatusCode::FAILURE; - } - - sc=nt->addItem("channel",m_cellIndex,m_channel); - if (sc!=StatusCode::SUCCESS) - {log << MSG::ERROR << "addItem 'channel' failed" << endmsg; - return StatusCode::FAILURE; - } - - sc=nt->addItem("gain",m_cellIndex,m_gain); - if (sc!=StatusCode::SUCCESS) - {log << MSG::ERROR << "addItem 'Gain' failed" << endmsg; - return StatusCode::FAILURE; - } - - sc=nt->addItem("NSamples",m_Nsamples,0,32); - if (sc!=StatusCode::SUCCESS) { - log << MSG::ERROR << "addItem 'sampleIndex' failed" << endmsg; - return StatusCode::FAILURE; - } - - sc=nt->addItem("Samples",m_cellIndex,m_samples,32); - //sc=nt->addItem("Samples",m_cellIndex,m_samples,m_Nsamples); - if (sc!=StatusCode::SUCCESS) { - log << MSG::ERROR << "addItem failed" << endmsg; + if (!nt) { + ATH_MSG_ERROR( "Booking of NTuple failed" ); return StatusCode::FAILURE; } + + ATH_CHECK( nt->addItem("icell",m_cellIndex,0,3600) ); + ATH_CHECK( nt->addItem("layer",m_cellIndex,m_layer) ); + ATH_CHECK( nt->addItem("ieta",m_cellIndex,m_eta) ); + ATH_CHECK( nt->addItem("iphi",m_cellIndex,m_phi) ); + ATH_CHECK( nt->addItem("barrel_ec",m_cellIndex,m_barrel_ec) ); + ATH_CHECK( nt->addItem("pos_neg",m_cellIndex,m_pos_neg) ); + ATH_CHECK( nt->addItem("FT",m_cellIndex,m_FT) ); + ATH_CHECK( nt->addItem("slot",m_cellIndex,m_slot) ); + ATH_CHECK( nt->addItem("channel",m_cellIndex,m_channel) ); + ATH_CHECK( nt->addItem("gain",m_cellIndex,m_gain) ); + ATH_CHECK( nt->addItem("NSamples",m_Nsamples,0,32) ); + ATH_CHECK( nt->addItem("Samples",m_cellIndex,m_samples,32) ); + + ATH_CHECK( m_containerKey.initialize() ); m_ntuplePtr=nt; m_count=0; - log << MSG::INFO << "======== ReadLArDigits initialize successfully ========" << endmsg; + ATH_MSG_INFO( "======== ReadLArDigits initialize successfully ========" ); return StatusCode::SUCCESS; } StatusCode ReadLArDigits::execute() -{MsgStream log(msgSvc(), name()); +{ m_count++; - StatusCode sc; - log << MSG::VERBOSE << "======== executing event "<< m_count << " ========" << endmsg; - log << MSG::VERBOSE << "Retrieving LArDigitContainer. Key= " << m_containerKey << std::endl; - LArDigitContainer* larDigitCont; - if (m_containerKey.size()) - sc = evtStore()->retrieve(larDigitCont ,m_containerKey); - else - sc = evtStore()->retrieve(larDigitCont); - if (sc.isFailure()) - {log << MSG::FATAL << " Cannot read LArDigitContainer from StoreGate! key=" << m_containerKey << endmsg; - return StatusCode::FAILURE; - } - + ATH_MSG_VERBOSE( "======== executing event "<< m_count << " ========" ); + ATH_MSG_VERBOSE( "Retrieving LArDigitContainer. Key= " << m_containerKey.key() ); + const EventContext& ctx = Gaudi::Hive::currentContext(); + SG::ReadHandle<LArDigitContainer> larDigitContIn (m_containerKey, ctx); + + // View container copy. + LArDigitContainer larDigitCont (*larDigitContIn); + SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl{m_cablingKey}; const LArOnOffIdMapping* cabling{*cablingHdl}; if(!cabling) { ATH_MSG_ERROR("Do not have mapping object " << m_cablingKey.key()); return StatusCode::FAILURE; } + + if (m_outfile.is_open()) { SortDigits sortDigits(m_onlineHelper); - std::sort(larDigitCont->begin(),larDigitCont->end(),sortDigits); + std::sort(larDigitCont.begin(),larDigitCont.end(),sortDigits); } unsigned cellCounter=0; m_cellIndex=0; - LArDigitContainer::const_iterator it=larDigitCont->begin(); - LArDigitContainer::const_iterator it_end=larDigitCont->end(); - if (larDigitCont->size()>0) - m_Nsamples=(*it)->samples().size(); + if (larDigitCont.size()>0) + m_Nsamples=larDigitCont.front()->samples().size(); else m_Nsamples=0; - for (;it!=it_end;it++) - {HWIdentifier chid=(*it)->hardwareID(); - const std::vector<short>& vSamples=(*it)->samples(); + for (const LArDigit* digit : larDigitCont) { + HWIdentifier chid=digit->hardwareID(); + const std::vector<short>& vSamples=digit->samples(); m_cellIndex++; try { const Identifier id=cabling->cnvToIdentifier(chid); @@ -207,7 +138,7 @@ StatusCode ReadLArDigits::execute() m_FT[cellCounter] = m_onlineHelper->feedthrough(chid); m_slot[cellCounter] = m_onlineHelper->slot(chid); m_channel[cellCounter] = m_onlineHelper->channel(chid); - m_gain[cellCounter]=(*it)->gain(); + m_gain[cellCounter]=digit->gain(); int nSamples=vSamples.size(); for (int i=0;i<nSamples && i<32;i++) @@ -231,21 +162,17 @@ StatusCode ReadLArDigits::execute() } cellCounter++; } - sc=ntupleSvc()->writeRecord(m_ntuplePtr); - if (sc!=StatusCode::SUCCESS) { - log << MSG::ERROR << "writeRecord failed" << endmsg; - return StatusCode::FAILURE; - } + ATH_CHECK( ntupleSvc()->writeRecord(m_ntuplePtr) ); if (m_count%1000==0) - log << MSG::INFO << "Event " << m_count << " contains " << cellCounter << " channels\n"; + ATH_MSG_INFO( "Event " << m_count << " contains " << cellCounter << " channels" ); return StatusCode::SUCCESS; } StatusCode ReadLArDigits::finalize() -{ MsgStream log(msgSvc(), name()); +{ if (m_outfile.is_open()) m_outfile.close(); - log << MSG::INFO << "finalize ReadLarDigits" << endmsg; + ATH_MSG_INFO( "finalize ReadLarDigits" ); return StatusCode::SUCCESS; } diff --git a/LArCalorimeter/LArROD/src/ReadLArRaw.cxx b/LArCalorimeter/LArROD/src/ReadLArRaw.cxx index b3cab9bdff4ce0bb474767a6ed592502d938dc3e..8e5d1ee69d4e594fd54376ac1593db2df19b35fc 100644 --- a/LArCalorimeter/LArROD/src/ReadLArRaw.cxx +++ b/LArCalorimeter/LArROD/src/ReadLArRaw.cxx @@ -39,7 +39,7 @@ // #include "LArRawUtils/LArRawRoISelector.h" //#include "LArRawUtils/LArTT_Selector.h" -#include "CaloIdentifier/CaloIdManager.h" +#include "CaloIdentifier/CaloCell_ID.h" using namespace std ; @@ -60,33 +60,18 @@ ReadLArRaw::ReadLArRaw(const std::string& name, ISvcLocator* pSvcLocator) : // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -StatusCode ReadLArRaw::initialize(){ - - MsgStream log(msgSvc(), name()); - log << MSG::INFO << "in initialize()" << endmsg; +StatusCode ReadLArRaw::initialize() +{ + ATH_MSG_INFO( "in initialize()" ); ATH_CHECK(m_cablingKey.initialize()); - StoreGateSvc* detStore; - if (service("DetectorStore", detStore).isFailure()) { - log << MSG::ERROR - << "Unable to access DetectoreStore" << endmsg; - return StatusCode::FAILURE; - } - -// retrieve OnlineID helper from detStore - if (detStore->retrieve(m_onlineID, "LArOnlineID").isFailure()) { - log << MSG::FATAL << "Could not get LArOnlineID helper !" << endmsg; - return StatusCode::FAILURE; - } + ATH_CHECK( detStore()->retrieve(m_onlineID, "LArOnlineID") ); // retrieve helpers for identifier - const DataHandle<CaloIdManager> caloIdMgr; - if (detStore->retrieve(caloIdMgr).isFailure()) { - log << MSG::FATAL << "Could not get CaloIdManager " << endmsg; - return StatusCode::FAILURE; - } - m_larem_id = caloIdMgr->getEM_ID(); + const CaloCell_ID* idHelper = nullptr; + ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_ID") ); + m_larem_id = idHelper->em_idHelper(); @@ -103,16 +88,9 @@ StatusCode ReadLArRaw::initialize(){ StatusCode ReadLArRaw::execute() { - MsgStream log(msgSvc(), name()); - log << MSG::DEBUG << "in execute()" << endmsg; - const DataHandle<LArRawChannelContainer> LArRaw ; - // StatusCode sc_read = StoreGate::retrieve( LArRaw, string( "LArRawChannelContainer" ) ) ; - StatusCode sc_read = StoreGate::instance().retrieve( LArRaw, m_ChannelContainerName ) ; - - if ( !sc_read.isSuccess() ) { - log << MSG::FATAL << "Could not find event" << endmsg; - return StatusCode::FAILURE; - } + ATH_MSG_DEBUG( "in execute()" ); + const LArRawChannelContainer* LArRaw ; + ATH_CHECK( evtStore()->retrieve (LArRaw, m_ChannelContainerName) ); int emax= 0; @@ -139,19 +117,18 @@ StatusCode ReadLArRaw::execute() { emax=it1->energy() ; maxId =ch_id; // use LArOnlineID methods - log << MSG::VERBOSE - << "--barrel_ec : " << m_onlineID->barrel_ec(ch_id) - << " Pos_neg : " << m_onlineID->pos_neg(ch_id) - << " FeedThrough no. : " << m_onlineID->feedthrough(ch_id) - << " slot no. : " << m_onlineID->slot(ch_id) - << " channel no. : " << m_onlineID->channel(ch_id) - << endmsg; + ATH_MSG_VERBOSE( "--barrel_ec : " << m_onlineID->barrel_ec(ch_id) + << " Pos_neg : " << m_onlineID->pos_neg(ch_id) + << " FeedThrough no. : " << m_onlineID->feedthrough(ch_id) + << " slot no. : " << m_onlineID->slot(ch_id) + << " channel no. : " << m_onlineID->channel(ch_id) + ); - log << MSG::DEBUG << "Energy = " << it1->energy() << "; Time = " - << it1->time() - << "; Chi-Square = " << it1->quality() << endmsg ; + ATH_MSG_DEBUG( "Energy = " << it1->energy() << "; Time = " + << it1->time() + << "; Chi-Square = " << it1->quality() ); } - log <<MSG::DEBUG<< " Channel with max energy , maxID = "<< emax<<" "<<maxId.getString() <<endmsg; + ATH_MSG_DEBUG( " Channel with max energy , maxID = "<< emax<<" "<<maxId.getString() ); } return StatusCode::SUCCESS; @@ -161,10 +138,9 @@ StatusCode ReadLArRaw::execute() { StatusCode ReadLArRaw::finalize() { - MsgStream log(msgSvc(), name()); if (m_outFile.is_open()) m_outFile.close(); - log << MSG::INFO << "in finalize()" << endmsg; + ATH_MSG_INFO( "in finalize()" ); return StatusCode::SUCCESS; } diff --git a/LArCalorimeter/LArRawConditions/LArRawConditions/LArFEBTimeOffset.h b/LArCalorimeter/LArRawConditions/LArRawConditions/LArFEBTimeOffset.h index e6e22ec84cbb03156282ca8912012073a89f8c8f..b319967bcfcbe46b60392a64f9e0ea6a66e7736f 100755 --- a/LArCalorimeter/LArRawConditions/LArRawConditions/LArFEBTimeOffset.h +++ b/LArCalorimeter/LArRawConditions/LArRawConditions/LArFEBTimeOffset.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef LARFEBTIMEOFFSET_H @@ -17,6 +17,7 @@ class LArFEBTimeOffset: public ILArFEBTimeOffset{ inline void setTimeOffset(const HWIdentifier fId, const float offset) //Setter {m_febTimeMap[fId]=offset;} inline float TimeOffset(const HWIdentifier fId) const; //Getter + inline float TimeOffset(const HWIdentifier fId, float defVal) const; inline unsigned size() const { return m_febTimeMap.size();} @@ -29,7 +30,8 @@ class LArFEBTimeOffset: public ILArFEBTimeOffset{ float m_defaultReturnValue; }; -inline float LArFEBTimeOffset::TimeOffset(const HWIdentifier fId) const { +inline float LArFEBTimeOffset::TimeOffset(const HWIdentifier fId) const +{ const std::map <HWIdentifier,float>::const_iterator it=m_febTimeMap.find(fId); if (it==m_febTimeMap.end()) return m_defaultReturnValue; @@ -37,6 +39,16 @@ inline float LArFEBTimeOffset::TimeOffset(const HWIdentifier fId) const { return it->second; } +inline float LArFEBTimeOffset::TimeOffset(const HWIdentifier fId, + float defVal) const +{ + const std::map <HWIdentifier,float>::const_iterator it=m_febTimeMap.find(fId); + if (it==m_febTimeMap.end()) + return defVal; + else + return it->second; +} + CLASS_DEF( LArFEBTimeOffset, 83217154, 1) #endif diff --git a/LArCalorimeter/LArRawConditions/src/LArFEBTimeOffset.cxx b/LArCalorimeter/LArRawConditions/src/LArFEBTimeOffset.cxx index 2cd8f0d2744b794bc0c0d4daebce0074b4c3de31..2f743d3796f4d2173dcc2ec91252d2ef2e6f2e8a 100755 --- a/LArCalorimeter/LArRawConditions/src/LArFEBTimeOffset.cxx +++ b/LArCalorimeter/LArRawConditions/src/LArFEBTimeOffset.cxx @@ -1,7 +1,7 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "LArRawConditions/LArFEBTimeOffset.h" -LArFEBTimeOffset::LArFEBTimeOffset() : m_defaultReturnValue(0.0) {} +LArFEBTimeOffset::LArFEBTimeOffset() {} diff --git a/LArCalorimeter/LArRecConditions/CMakeLists.txt b/LArCalorimeter/LArRecConditions/CMakeLists.txt index a2a15271ea40337f57dacea1fdf75285868b895c..e389bfa48984dd33420f6eff05c2a22d9df0166a 100644 --- a/LArCalorimeter/LArRecConditions/CMakeLists.txt +++ b/LArCalorimeter/LArRecConditions/CMakeLists.txt @@ -10,6 +10,7 @@ atlas_depends_on_subdirs( PUBLIC Calorimeter/CaloIdentifier LArCalorimeter/LArIdentifier Control/AthenaKernel + Control/AthenaBaseComps DetectorDescription/Identifier GaudiKernel PRIVATE @@ -24,7 +25,7 @@ atlas_add_library( LArRecConditions src/*.cxx PUBLIC_HEADERS LArRecConditions PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES CaloIdentifier LArIdentifier AthenaKernel Identifier GaudiKernel + LINK_LIBRARIES CaloIdentifier LArIdentifier AthenaKernel Identifier GaudiKernel AthenaBaseComps PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ) atlas_add_dictionary( LArRecConditionsDict diff --git a/LArCalorimeter/LArRecConditions/LArRecConditions/ILArBadChanTool.h b/LArCalorimeter/LArRecConditions/LArRecConditions/ILArBadChanTool.h deleted file mode 100644 index 9967c9a551ececb30b5e5225ae7c1787aa1859de..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArRecConditions/LArRecConditions/ILArBadChanTool.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef ILArBadChanTool_H -#define ILArBadChanTool_H - -#include "Identifier/HWIdentifier.h" -#include "LArRecConditions/LArBadChannel.h" -#include "LArRecConditions/LArBadFeb.h" -#include "GaudiKernel/IAlgTool.h" -#include "AthenaKernel/IOVSvcDefs.h" - - -class ILArBadChanTool : public virtual IAlgTool { -public: - virtual ~ILArBadChanTool() {} - - static const InterfaceID& interfaceID() { - static const InterfaceID IID_ILArBadChanTool("ILArBadChanTool", 1 , 0); - return IID_ILArBadChanTool; - } - - /// status access via LAr hardware identifier - virtual LArBadChannel status( HWIdentifier id) const = 0; - - /// status access via LAr FEB id, and channel number within that FEB (0 to 127) - virtual LArBadChannel status(const HWIdentifier& febId, int chanNumber) const = 0; - - /// status access via offline identifier - virtual LArBadChannel offlineStatus( Identifier id) const = 0; - - /// returns true if the FEB (identified by it's HWIdentifier) is missing - virtual bool febMissing( HWIdentifier febId) const = 0; - - /// returns true if the FEB (identified by it's HWIdentifier) does not have - /// any bad channels - virtual bool febAllGood( HWIdentifier febId) const = 0; - - /// returns the complete FEB status for a FEB HWIdentifier - virtual LArBadFeb febStatus( HWIdentifier febId) const = 0; - - /// returns the HWIdentifiers of all the problematic FEBs, no matter what the FEB problem is - virtual std::vector<HWIdentifier> missingFEBs() const = 0; - - /// returns all the information about problematic FEBs in one container - virtual const std::vector< std::pair<HWIdentifier,LArBadFeb> >& fullBadFebsState() const = 0; - - // Callback functions - virtual StatusCode updateFromDB(IOVSVC_CALLBACK_ARGS) = 0; - virtual StatusCode updateBadFebsFromDB(IOVSVC_CALLBACK_ARGS) = 0; - -}; - - -#endif diff --git a/LArCalorimeter/LArRecConditions/LArRecConditions/ILArBadFebMasker.h b/LArCalorimeter/LArRecConditions/LArRecConditions/ILArBadFebMasker.h new file mode 100644 index 0000000000000000000000000000000000000000..97e83851954b735210e76303f10dcc3658589401 --- /dev/null +++ b/LArCalorimeter/LArRecConditions/LArRecConditions/ILArBadFebMasker.h @@ -0,0 +1,33 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef ILArBadFebMasker_H +#define ILArBadFebMasker_H + +#include "GaudiKernel/IAlgTool.h" +#include "CaloIdentifier/CaloGain.h" + +class HWIdentifier; +class LArBadFeb; + +class ILArBadFebMasker : public virtual IAlgTool +{ +public: + static const InterfaceID& interfaceID() + { + static const InterfaceID IID_ILArBadFebMasker("ILArBadFebMasker", 1, 0); + return IID_ILArBadFebMasker; + } + + virtual ~ILArBadFebMasker() + {} + + virtual bool febMissing(const HWIdentifier& febId) const = 0; + virtual bool shouldbeMasked(const HWIdentifier& febId) const = 0; + virtual LArBadFeb febStatus(const HWIdentifier& febId) const =0; + + virtual bool isMaskingOn() const = 0; +}; + +#endif diff --git a/LArCalorimeter/LArRecConditions/LArRecConditions/LArFebConfig.h b/LArCalorimeter/LArRecConditions/LArRecConditions/LArFebConfig.h new file mode 100644 index 0000000000000000000000000000000000000000..f63cbe0e72c40423a425816536c4a348da03a526 --- /dev/null +++ b/LArCalorimeter/LArRecConditions/LArRecConditions/LArFebConfig.h @@ -0,0 +1,57 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef LARRECCONDITIONS_LARFEBCONFIG_H +#define LARRECCONDITIONS_LARFEBCONFIG_H + +#include "AthenaBaseComps/AthMessaging.h" +#include "Identifier/HWIdentifier.h" +#include "CoralBase/AttributeList.h" +#include "LArElecCalib/LArCalibErrorCode.h" +#include <vector> +#include <mutex> + +class LArOnlineID; + +class LArFebConfig: public AthMessaging { + + friend class LArFEBConfigCondAlg; //The conditions alg filling this object + + public: + LArFebConfig()=delete; + LArFebConfig(const LArOnlineID* onlineId); // we do not own this pointer + + //Accessor methods from ILArFEBConfigReader + short lowerGainThreshold(const HWIdentifier& id) const; + short upperGainThreshold(const HWIdentifier& id) const; + + private: + const LArOnlineID* m_onlineID; + + std::map<HWIdentifier,const coral::AttributeList*> m_attrPerFeb; + mutable std::map<HWIdentifier,const coral::AttributeList*>::const_iterator m_lastIt; + mutable std::mutex m_itMtx; + + short getThreshold(const char* MedLow, const HWIdentifier& chid) const; + + enum {ERRORCODE = LArElecCalib::ERRORCODE}; + +}; + +inline short LArFebConfig::lowerGainThreshold(const HWIdentifier& chid) const { + return getThreshold("lower",chid); +} + + +inline short LArFebConfig::upperGainThreshold(const HWIdentifier& chid) const { + return getThreshold("upper",chid); +} + + +#include "AthenaKernel/CLASS_DEF.h" +CLASS_DEF( LArFebConfig, 155518838 , 1) +#include "AthenaKernel/CondCont.h" +CLASS_DEF( CondCont<LArFebConfig>, 148539538 , 1) + +#endif diff --git a/LArCalorimeter/LArRecConditions/src/LArFebConfig.cxx b/LArCalorimeter/LArRecConditions/src/LArFebConfig.cxx new file mode 100644 index 0000000000000000000000000000000000000000..3c597c620c70af294b7787d7ba1dc1ada722296e --- /dev/null +++ b/LArCalorimeter/LArRecConditions/src/LArFebConfig.cxx @@ -0,0 +1,39 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#include "LArRecConditions/LArFebConfig.h" +#include "LArIdentifier/LArOnlineID.h" +#include "GaudiKernel/ISvcLocator.h" +#include "GaudiKernel/IMessageSvc.h" +#include "CoralBase/Attribute.h" + +LArFebConfig::LArFebConfig(const LArOnlineID* onlineId) : + AthMessaging(Gaudi::svcLocator()->service< IMessageSvc >( "MessageSvc" ),"LArFebConfig"), + m_onlineID(onlineId) + +{ } + +short LArFebConfig::getThreshold(const char* MedLow, const HWIdentifier& chid) const { + + if (m_attrPerFeb.size()==0) { + ATH_MSG_WARNING("FEB treshold cache is empty. Callback not fired?"); + return ERRORCODE; + } + + std::lock_guard<std::mutex> lock(m_itMtx); //Makes sure the following isn't executed concurently + + const HWIdentifier fid=m_onlineID->feb_Id(chid); + const int channel=m_onlineID->channel(chid); + if (m_lastIt==m_attrPerFeb.end() || m_lastIt->first!=fid) + m_lastIt=m_attrPerFeb.find(fid); + + if (m_lastIt==m_attrPerFeb.end()) { + ATH_MSG_DEBUG("Such FEB was not found !"); + return ERRORCODE; + }else { + std::string channame(MedLow,5); + channame += std::to_string(channel+1); + return (short)(*(m_lastIt->second))[channame].data<int32_t>(); //Will throw and exception if channel does not exist + } +} diff --git a/LArCalorimeter/LArRecUtils/python/LArADC2MeVCondAlgDefault.py b/LArCalorimeter/LArRecUtils/python/LArADC2MeVCondAlgDefault.py index 551b7b98c79a37c9069c661e027ccacdf258e1a3..c88ecae5bcdefc01d11b5d2d83facb81758110e4 100644 --- a/LArCalorimeter/LArRecUtils/python/LArADC2MeVCondAlgDefault.py +++ b/LArCalorimeter/LArRecUtils/python/LArADC2MeVCondAlgDefault.py @@ -40,8 +40,8 @@ def LArADC2MeVCondAlgDefault(): theADC2MeVCondAlg.UseFEBGainTresholds=False else: # not MC: - from LArRecUtils.LArFEBConfigReaderDefault import LArFEBConfigReaderDefault - theADC2MeVCondAlg.FebConfigReader=LArFEBConfigReaderDefault() + from LArRecUtils.LArFebConfigCondAlgDefault import LArFebConfigCondAlgDefault + LArFebConfigCondAlgDefault() condSeq+=theADC2MeVCondAlg diff --git a/LArCalorimeter/LArRecUtils/python/LArADC2MeVToolDefault.py b/LArCalorimeter/LArRecUtils/python/LArADC2MeVToolDefault.py index 763d697aaab6267c63d430b8848cdd4127bd5dfe..d258300fd27a78be737781bde23b6d6fa4a74afd 100644 --- a/LArCalorimeter/LArRecUtils/python/LArADC2MeVToolDefault.py +++ b/LArCalorimeter/LArRecUtils/python/LArADC2MeVToolDefault.py @@ -32,11 +32,8 @@ def LArADC2MeVToolDefault (name="LArADC2MeVToolDefault", **kw): tool.UseHVScaleCorr = True if larCondFlags.useLArFEBGainThresholds(): - from LArRecUtils.LArFEBConfigReaderDefault import LArFEBConfigReaderDefault - theLArFebConfigReader=LArFEBConfigReaderDefault() - #theLArFebConfigReader.OutputLevel=DEBUG - ServiceMgr.ToolSvc+=theLArFebConfigReader - tool.FebConfigReader=theLArFebConfigReader + from LArRecUtils.LArFebConfigCondAlgDefault import LArFebConfigCondAlgDefault + LArFebConfigCondAlgDefault() tool.UseFEBGainTresholds=True diff --git a/LArCalorimeter/LArRecUtils/python/LArFEBConfigReaderDefault.py b/LArCalorimeter/LArRecUtils/python/LArFebConfigCondAlgConfig.py similarity index 60% rename from LArCalorimeter/LArRecUtils/python/LArFEBConfigReaderDefault.py rename to LArCalorimeter/LArRecUtils/python/LArFebConfigCondAlgConfig.py index 2368fea78fdb4de02208997164fb7cdd38deb745..5a852542359a327a7a10cffe78673538a5b695e6 100644 --- a/LArCalorimeter/LArRecUtils/python/LArFEBConfigReaderDefault.py +++ b/LArCalorimeter/LArRecUtils/python/LArFebConfigCondAlgConfig.py @@ -1,21 +1,13 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -from IOVDbSvc.CondDB import conddb -from AthenaCommon.Logging import logging -from AthenaCommon.AppMgr import ServiceMgr +from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator +from IOVDbSvc.IOVDbSvcConfig import addFolders +from LArRecUtils.LArRecUtilsConf import LArFEBConfigCondAlg -def LArFEBConfigReaderDefault (name="LArFEBConfigReaderDefault", **kw): - mlog = logging.getLogger( 'LArFEBConfigReaderDefault::__init__ ' ) - if hasattr(ServiceMgr.ToolSvc,name): - mlog.info("LArFEBConfigReader with name" + name + "already known to ToolSvc") - return getattr(ServiceMgr.ToolSvc,name) +def LArFEBConfigCondAlgCfg (configFlags): - - # call base class constructor - from AthenaCommon import CfgMgr - kw['name'] = name - tool = CfgMgr.LArFEBConfigReader (**kw) + result=ComponentAccumulator() LArFebConfigFolders=[ "/LAR/Configuration/FEBConfig/Physics/EMBA1", @@ -41,7 +33,8 @@ def LArFEBConfigReaderDefault (name="LArFEBConfigReaderDefault", **kw): for f in LArFebConfigFolders: conddb.addFolder("LAR_ONL",f) + result.merge(addFolders(configFlags,f,"LAR_ONL",className="CondAttrListCollection")) + + result.addCondAlgo(LArFEBConfigCondAlg(ListOfFolders=LArFebConfigFolders,keyOutput="LArFebConfig")) - tool.ListOfFolders=LArFebConfigFolders return tool - diff --git a/LArCalorimeter/LArRecUtils/python/LArFebConfigCondAlgDefault.py b/LArCalorimeter/LArRecUtils/python/LArFebConfigCondAlgDefault.py new file mode 100644 index 0000000000000000000000000000000000000000..98939d84ad21c0ac59e795b4a355e1490314e94f --- /dev/null +++ b/LArCalorimeter/LArRecUtils/python/LArFebConfigCondAlgDefault.py @@ -0,0 +1,46 @@ +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + +from AthenaCommon.Include import Include, IncludeError, include +from IOVDbSvc.CondDB import conddb +from AthenaCommon.AlgSequence import AthSequencer +from LArRecUtils.LArRecUtilsConf import LArFEBConfigCondAlg + + +def LArFebConfigCondAlgDefault (): + + condSeq = AthSequencer("AthCondSeq") + if hasattr (condSeq,"LArFEBConfigCondAlg"): + return getattr(condSeq,"LArFEBConfigCondAlg") + + theLArFEBConfigCondAlg = LArFEBConfigCondAlg() + + LArFebConfigFolders=[ + "/LAR/Configuration/FEBConfig/Physics/EMBA1", + "/LAR/Configuration/FEBConfig/Physics/EMBA2", + "/LAR/Configuration/FEBConfig/Physics/EMBA3", + "/LAR/Configuration/FEBConfig/Physics/EMBA4", + "/LAR/Configuration/FEBConfig/Physics/EMBC1", + "/LAR/Configuration/FEBConfig/Physics/EMBC2", + "/LAR/Configuration/FEBConfig/Physics/EMBC3", + "/LAR/Configuration/FEBConfig/Physics/EMBC4", + "/LAR/Configuration/FEBConfig/Physics/EMECA1", + "/LAR/Configuration/FEBConfig/Physics/EMECA2", + "/LAR/Configuration/FEBConfig/Physics/EMECA3", + "/LAR/Configuration/FEBConfig/Physics/EMECC1", + "/LAR/Configuration/FEBConfig/Physics/EMECC2", + "/LAR/Configuration/FEBConfig/Physics/EMECC3", + "/LAR/Configuration/FEBConfig/Physics/FCALA", + "/LAR/Configuration/FEBConfig/Physics/FCALC", + "/LAR/Configuration/FEBConfig/Physics/HECA", + "/LAR/Configuration/FEBConfig/Physics/HECC", + ] + + + for f in LArFebConfigFolders: + conddb.addFolder("LAR_ONL",f,className="CondAttrListCollection") + + theLArFEBConfigCondAlg.ListOfFolders=LArFebConfigFolders + theLArFEBConfigCondAlg.keyOutput="LArFebConfig" + + condSeq+=theLArFEBConfigCondAlg + return theLArFEBConfigCondAlg diff --git a/LArCalorimeter/LArRecUtils/python/LArRecUtilsConfigDb.py b/LArCalorimeter/LArRecUtils/python/LArRecUtilsConfigDb.py index 2c13020f134532b5dcce6b5eb769ac5e363b8c02..ecf2c8f6ae15e917bd6f5e1acee2cea5922fcf83 100644 --- a/LArCalorimeter/LArRecUtils/python/LArRecUtilsConfigDb.py +++ b/LArCalorimeter/LArRecUtils/python/LArRecUtilsConfigDb.py @@ -6,6 +6,5 @@ addTool("LArRecUtils.LArOFCToolDefault.LArOFCToolDefault" , "LArOFCToolDefault") addTool("LArRecUtils.LArAutoCorrNoiseToolDefault.LArAutoCorrNoiseToolDefault" , "LArAutoCorrNoiseToolDefault") addTool("LArRecUtils.LArAutoCorrTotalToolDefault.LArAutoCorrTotalToolDefault","LArAutoCorrTotalToolDefault") addTool("LArRecUtils.LArHVCorrToolDefault.LArHVCorrToolDefault","LArHVCorrToolDefault") -addTool("LArRecUtils.LArFEBConfigReaderDefault.LArFEBConfigReaderDefault","LArFEBConfigReaderDefault") addTool("LArRecUtils.LArOFPeakRecoToolDefault.LArOFPeakRecoToolDefault","LArOFPeakRecoToolDefault") addTool("LArRecUtils.LArParabolaPeakRecoToolDefault.LArParabolaPeakRecoToolDefault","LArParabolaPeakRecoToolDefault") diff --git a/LArCalorimeter/LArRecUtils/share/LArFCalTowerBuilderTool.ref b/LArCalorimeter/LArRecUtils/share/LArFCalTowerBuilderTool.ref index f34b7e7551f47055e81379d0e21a4b943a842ac1..75bbc81bbf53a6c650ea41d97ca17732098b8867 100644 --- a/LArCalorimeter/LArRecUtils/share/LArFCalTowerBuilderTool.ref +++ b/LArCalorimeter/LArRecUtils/share/LArFCalTowerBuilderTool.ref @@ -1,14 +1,14 @@ -Thu Dec 6 05:33:31 CET 2018 +Mon Mar 11 15:46:25 CET 2019 Preloading tcmalloc_minimal.so Py:Athena INFO including file "AthenaCommon/Preparation.py" -Py:Athena INFO using release [AthenaWorkDir-22.0.1] [x86_64-slc6-gcc62-opt] [atlas-work3/fa0fd6d0989] -- built on [2018-12-06T0504] +Py:Athena INFO using release [WorkDir-22.0.1] [x86_64-centos7-gcc8-opt] [atlas-work3/27168cb1091] -- built on [2019-03-11T1355] Py:Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" Py:Athena INFO executing ROOT6Setup Py:Athena INFO including file "AthenaCommon/Execution.py" Py:Athena INFO including file "LArRecUtils/LArFCalTowerBuilderTool_test.py" SetGeometryVersion.py obtained major release version 22 Py:Athena INFO including file "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.py" -Py:ConfigurableDb INFO Read module info for 5473 configurables from 53 genConfDb files +Py:ConfigurableDb INFO Read module info for 5462 configurables from 44 genConfDb files Py:ConfigurableDb INFO No duplicates have been found: that's good ! EventInfoMgtInit: Got release version Athena-22.0.1 Py:IOVDbSvc.CondDB INFO Setting up conditions DB access to instance OFLP200 @@ -18,20 +18,19 @@ Py:Athena INFO including file "CaloConditions/LArTTCellMap_ATLAS_jobO Py:Athena INFO including file "CaloConditions/CaloTTIdMap_ATLAS_jobOptions.py" Py:Athena INFO including file "TileIdCnv/TileIdCnv_jobOptions.py" Py:Athena INFO including file "AthenaCommon/runbatch.py" -[?1034hApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 +ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 ApplicationMgr SUCCESS ==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v30r5) - running on lxplus077.cern.ch on Thu Dec 6 05:33:48 2018 + Welcome to ApplicationMgr (GaudiCoreSvc v31r0) + running on lxplus046.cern.ch on Mon Mar 11 15:46:42 2019 ==================================================================================================================================== -ApplicationMgr INFO Successfully loaded modules : AthenaServices ApplicationMgr INFO Application Manager Configured successfully ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 StatusCodeSvc INFO initialize AthDictLoaderSvc INFO in initialize... AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO getRegistryEntries: read 3219 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 3440 CLIDRegistry entries for module ALL CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) CoreDumpSvc INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) MetaDataSvc INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00 @@ -40,8 +39,8 @@ PoolSvc INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.x PoolSvc INFO Set connectionsvc retry/timeout/IDLE timeout to 'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled PoolSvc INFO Frontier compression level set to 5 DBReplicaSvc INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-12-04T2300/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config -DBReplicaSvc INFO Total of 10 servers found for host lxplus077.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] +DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-03-10T2143/Athena/22.0.1/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config +DBReplicaSvc INFO Total of 10 servers found for host lxplus046.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ] PoolSvc INFO Successfully setup replica sorting algorithm PoolSvc INFO Setting up APR FileCatalog and Streams PoolSvc WARNING Unable to locate catalog for prfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables @@ -50,6 +49,7 @@ PoolSvc INFO Resolved path (via ATLAS_POOLCOND_PATH) is /cvmfs/atla PoolSvc INFO POOL WriteCatalog is xmlcatalog_file:PoolFileCatalog.xml DbSession INFO Open DbSession Domain[ROOT_All] INFO > Access DbDomain READ [ROOT_All] +MetaDataSvc INFO Found MetaDataTools = PublicToolHandleArray([]) IOVDbSvc INFO Opened read transaction for POOL PersistencySvc IOVDbSvc INFO Only 5 POOL conditions files will be open at once IOVDbSvc INFO Cache alignment will be done in 3 slices @@ -70,7 +70,7 @@ IOVDbSvc INFO Added taginfo remove for /CALO/Ofl/Identifier/CaloTTOn IOVDbSvc INFO Added taginfo remove for /CALO/Ofl/Identifier/CaloTTPpmRxIdMapAtlas IOVDbSvc INFO Added taginfo remove for /LAR/LArCellPositionShift IOVDbSvc INFO Added taginfo remove for /LAR/Identifier/LArTTCellMapAtlas -ClassIDSvc INFO getRegistryEntries: read 2134 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 2094 CLIDRegistry entries for module ALL ClassIDSvc INFO getRegistryEntries: read 17 CLIDRegistry entries for module ALL ClassIDSvc INFO getRegistryEntries: read 18 CLIDRegistry entries for module ALL DetDescrCnvSvc INFO initializing @@ -125,7 +125,7 @@ BarrelConstruction INFO Use sagging in geometry ? 0 multi-layered version of absorbers activated, mlabs == 1 ================================================ EventPersistenc... INFO Added successfully Conversion service:DetDescrCnvSvc -ClassIDSvc INFO getRegistryEntries: read 5819 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 5624 CLIDRegistry entries for module ALL CaloIDHelper_ID... INFO in createObj: creating a TileTBID helper object in the detector store IdDictDetDescrCnv INFO in initialize IdDictDetDescrCnv INFO in createObj: creating a IdDictManager object in the detector store @@ -164,7 +164,7 @@ TileDddbManager INFO n_tileSwitches = 1 ClassIDSvc INFO getRegistryEntries: read 213 CLIDRegistry entries for module ALL CaloIDHelper_ID... INFO in createObj: creating a TileID helper object in the detector store AtlasDetectorID INFO initialize_from_dictionary - OK -TileNeighbour INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-12-04T2300/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/TileNeighbour_reduced.txt +TileNeighbour INFO Reading file /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/share/TileNeighbour_reduced.txt TileHWIDDetDesc... INFO in createObj: creating a TileHWID helper object in the detector store TileHWID INFO initialize_from_dictionary AtlasDetectorID INFO initialize_from_dictionary - OK @@ -176,21 +176,23 @@ CaloIDHelper_ID... INFO in createObj: creating a LArHEC_ID helper object in th AtlasDetectorID INFO initialize_from_dictionary - OK CaloIDHelper_ID... INFO in createObj: creating a LArFCAL_ID helper object in the detector store AtlasDetectorID INFO initialize_from_dictionary - OK -LArFCAL_Base_ID INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-12-04T2300/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/FCal2DNeighbors-April2011.txt -LArFCAL_Base_ID INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-12-04T2300/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/FCal3DNeighborsNext-April2011.txt -LArFCAL_Base_ID INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-12-04T2300/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/FCal3DNeighborsPrev-April2011.txt +LArFCAL_Base_ID INFO Reading file /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/share/FCal2DNeighbors-April2011.txt +LArFCAL_Base_ID INFO Reading file /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsNext-April2011.txt +LArFCAL_Base_ID INFO Reading file /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/share/FCal3DNeighborsPrev-April2011.txt CaloIDHelper_ID... INFO in createObj: creating a LArMiniFCAL_ID helper object in the detector store AtlasDetectorID INFO initialize_from_dictionary - OK LArMiniFCAL_ID INFO initialize_from_dict - LArCalorimeter dictionary does NOT contain miniFCAL description. Unable to initialize LArMiniFCAL_ID. AtlasDetectorID INFO initialize_from_dictionary - OK TileDetDescrMan... INFO Entering create_elements() -ClassIDSvc INFO getRegistryEntries: read 65 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 66 CLIDRegistry entries for module ALL AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00 CondInputLoader INFO Initializing CondInputLoader... CondInputLoader INFO Adding base classes: CondInputLoader INFO Will create WriteCondHandle dependencies for the following DataObjects: -ClassIDSvc INFO getRegistryEntries: read 8831 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 7104 CLIDRegistry entries for module ALL +CaloMgrDetDescrCnv INFO in createObj: creating a Calo Detector Manager object in the detector store CaloIdMgrDetDes... INFO in createObj: creating a CaloDescrManager object in the detector store +ClassIDSvc INFO getRegistryEntries: read 161 CLIDRegistry entries for module ALL CaloIDHelper_ID... INFO in createObj: creating a CaloDM_ID helper object in the detector store CaloDM_ID INFO initialize_from_dictionary AtlasDetectorID INFO initialize_from_dictionary - OK @@ -207,12 +209,12 @@ CaloIDHelper_ID... INFO in createObj: creating a LArHEC_SuperCell_ID helper ob AtlasDetectorID INFO initialize_from_dictionary - OK CaloIDHelper_ID... INFO in createObj: creating a LArFCAL_SuperCell_ID helper object in the detector store AtlasDetectorID INFO initialize_from_dictionary - OK -LArFCAL_Base_ID INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-12-04T2300/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt -LArFCAL_Base_ID INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-12-04T2300/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt -LArFCAL_Base_ID INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-12-04T2300/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt +LArFCAL_Base_ID INFO Reading file /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt +LArFCAL_Base_ID INFO Reading file /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt +LArFCAL_Base_ID INFO Reading file /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt CaloIDHelper_ID... INFO in createObj: creating a Tile_SuperCell_ID helper object in the detector store AtlasDetectorID INFO initialize_from_dictionary - OK -TileNeighbour INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2018-12-04T2300/Athena/22.0.1/InstallArea/x86_64-slc6-gcc62-opt/share/TileSuperCellNeighbour.txt +TileNeighbour INFO Reading file /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-centos7-gcc8-opt/x86_64-centos7-gcc8-opt/share/TileSuperCellNeighbour.txt AtlasDetectorID INFO initialize_from_dictionary - OK CaloIdMgrDetDes... INFO Finished CaloIdMgrDetDes... INFO Initializing CaloIdMgr from values in CaloIdMgrDetDescrCnv @@ -232,7 +234,6 @@ IOVDbSvc INFO Disconnecting from COOLOFL_LAR/OFLP200 Domain[ROOT_All] INFO -> Access DbDatabase READ [ROOT_All] 06C9EAE8-6F5B-E011-BAAA-003048F0E7AC Domain[ROOT_All] INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000029.gen.COND/cond09_mc.000029.gen.COND._0002.pool.root RootDatabase.open INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000029.gen.COND/cond09_mc.000029.gen.COND._0002.pool.root File version:52200 -CaloMgrDetDescrCnv INFO in createObj: creating a Calo Detector Manager object in the detector store Domain[ROOT_All] INFO -> Access DbDatabase READ [ROOT_All] 8667C6F2-1559-DE11-A611-000423D9A21A Domain[ROOT_All] INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond08/cond08_mc.000003.gen.COND/cond08_mc.000003.gen.COND._0064.pool.root RootDatabase.open INFO /cvmfs/atlas-condb.cern.ch/repo/conditions/cond08/cond08_mc.000003.gen.COND/cond08_mc.000003.gen.COND._0064.pool.root File version:52200 @@ -6640,7 +6641,6 @@ towers 6398 100 63 0 6399 100 64 0 AthenaEventLoopMgr INFO ===>>> done processing event #1, run #1 1 events processed so far <<<=== -MetaDataSvc INFO MetaDataSvc::stop() /cvmfs/atlas-co... INFO Database being retired... Domain[ROOT_All] INFO -> Deaccess DbDatabase READ [ROOT_All] 06C9EAE8-6F5B-E011-BAAA-003048F0E7AC /cvmfs/atlas-co... INFO Database being retired... @@ -6651,25 +6651,25 @@ IncidentProcAlg1 INFO Finalize CondInputLoader INFO Finalizing CondInputLoader... IncidentProcAlg2 INFO Finalize IdDictDetDescrCnv INFO in finalize -IOVDbFolder INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 (( 0.14 ))s +IOVDbFolder INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 (( 1.14 ))s IOVDbFolder INFO Folder /CALO/Ofl/Identifier/CaloTTOnAttrIdMapAtlas (PoolRef) db-read 0/0 objs/chan/bytes 0/1/0 (( 0.00 ))s IOVDbFolder INFO Folder /CALO/Ofl/Identifier/CaloTTOnOffIdMapAtlas (PoolRef) db-read 0/0 objs/chan/bytes 0/1/0 (( 0.00 ))s IOVDbFolder INFO Folder /CALO/Ofl/Identifier/CaloTTPpmRxIdMapAtlas (PoolRef) db-read 0/0 objs/chan/bytes 0/1/0 (( 0.00 ))s -IOVDbFolder INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 (( 0.03 ))s -IOVDbFolder INFO Folder /LAR/Identifier/LArTTCellMapAtlas (PoolRef) db-read 1/0 objs/chan/bytes 1/1/173 (( 0.02 ))s +IOVDbFolder INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 (( 0.76 ))s +IOVDbFolder INFO Folder /LAR/Identifier/LArTTCellMapAtlas (PoolRef) db-read 1/0 objs/chan/bytes 1/1/173 (( 0.89 ))s IOVDbFolder WARNING Folder /LAR/Identifier/LArTTCellMapAtlas is requested but no data retrieved -IOVDbSvc INFO bytes in (( 0.19 ))s +IOVDbSvc INFO bytes in (( 2.79 ))s IOVDbSvc INFO Connection sqlite://;schema=mycool.db;dbname=OFLP200 : nConnect: 0 nFolders: 0 ReadTime: (( 0.00 ))s -IOVDbSvc INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 3 ReadTime: (( 0.19 ))s +IOVDbSvc INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 3 ReadTime: (( 2.79 ))s IOVDbSvc INFO Connection COOLOFL_CALO/OFLP200 : nConnect: 1 nFolders: 3 ReadTime: (( 0.00 ))s AthDictLoaderSvc INFO in finalize... ToolSvc INFO Removing all tools created by ToolSvc *****Chrono***** INFO **************************************************************************************************** *****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) *****Chrono***** INFO **************************************************************************************************** -cObjR_ALL INFO Time User : Tot= 480 [ms] Ave/Min/Max= 240(+- 230)/ 10/ 470 [ms] #= 2 -cObj_ALL INFO Time User : Tot= 0.58 [s] Ave/Min/Max= 0.29(+- 0.25)/ 0.04/ 0.54 [s] #= 2 -ChronoStatSvc INFO Time User : Tot= 3.84 [s] #= 1 +cObjR_ALL INFO Time User : Tot= 450 [ms] Ave/Min/Max= 225(+- 215)/ 10/ 440 [ms] #= 2 +cObj_ALL INFO Time User : Tot= 0.52 [s] Ave/Min/Max= 0.26(+- 0.23)/ 0.03/ 0.49 [s] #= 2 +ChronoStatSvc INFO Time User : Tot= 2.71 [s] #= 1 *****Chrono***** INFO **************************************************************************************************** ChronoStatSvc.f... INFO Service finalized successfully ApplicationMgr INFO Application Manager Finalized successfully diff --git a/LArCalorimeter/LArRecUtils/src/LArADC2MeVCondAlg.cxx b/LArCalorimeter/LArRecUtils/src/LArADC2MeVCondAlg.cxx index 69e4234ac3e6c4a94d8f1c180bd4d34066688944..f7241477e33f1f993f82bbcaada976ff7c51e765 100644 --- a/LArCalorimeter/LArRecUtils/src/LArADC2MeVCondAlg.cxx +++ b/LArCalorimeter/LArRecUtils/src/LArADC2MeVCondAlg.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ @@ -16,8 +16,6 @@ #include "LArIdentifier/LArOnline_SuperCellID.h" #include "CaloIdentifier/CaloGain.h" -#include "LArElecCalib/ILArFEBConfigReader.h" - #include <memory> #include "GaudiKernel/EventIDRange.h" @@ -32,12 +30,10 @@ LArADC2MeVCondAlg::LArADC2MeVCondAlg(const std::string& name, ISvcLocator* pSvcL m_lArHVScaleCorrKey("LArHVScaleCorr"), m_ADC2MeVKey("LArADC2MeV","LArADC2MeV"), m_condSvc("CondSvc",name), - m_febCfgReader("LArFEBConfigReader",this), + m_configKey("LArFebConfig"), m_isSuperCell(false) { - //declareProperty("LArOnlineIDKey",m_larOnlineIDKey,"SG key of LArOnlineID helper obj for regular cells"); - //declareProperty("LArSCOnlineIDKey",m_larSCOnlineIDKey,"SG key of LArOnlineID helper obj for SuperCells"); declareProperty("LArOnOffIdMappingKey",m_cablingKey,"SG key of LArOnOffIdMapping object"); declareProperty("LAruA2MeVKey",m_lAruA2MeVKey,"SG key of uA2MeV object"); declareProperty("LArDAC2uAKey",m_lArDAC2uAKey,"SG key of DAC2uA object"); @@ -46,8 +42,8 @@ LArADC2MeVCondAlg::LArADC2MeVCondAlg(const std::string& name, ISvcLocator* pSvcL declareProperty("LArHVScaleCorrKey",m_lArHVScaleCorrKey,"SG key of HVScaleCorr object (or empty string if no HVScaleCorr)"); declareProperty("LArADC2MeVKey",m_ADC2MeVKey,"SG key of the resulting LArADC2MeV object"); declareProperty("isSuperCell",m_isSuperCell,"switch to true to use the SuperCell Identfier helper"); - declareProperty("FebConfigReader",m_febCfgReader); declareProperty("UseFEBGainTresholds",m_useFEBGainThresholds=true); + declareProperty("inputKey",m_configKey,"SG key for FEB config object"); } LArADC2MeVCondAlg::~LArADC2MeVCondAlg() {} @@ -92,11 +88,8 @@ StatusCode LArADC2MeVCondAlg::initialize() { return StatusCode::FAILURE; } - if (m_useFEBGainThresholds) { - ATH_CHECK(m_febCfgReader.retrieve()); - } else { - m_febCfgReader.disable(); - } + if (m_useFEBGainThresholds) ATH_CHECK(m_configKey.initialize()); + return StatusCode::SUCCESS; } @@ -166,6 +159,17 @@ StatusCode LArADC2MeVCondAlg::execute() { return StatusCode::FAILURE; } + // retrieve LArFebConfig if needed + const LArFebConfig *febConfig=nullptr; + if(m_useFEBGainThresholds) { + SG::ReadCondHandle<LArFebConfig> configHdl{m_configKey}; + febConfig = *configHdl; + if (febConfig==nullptr) { + ATH_MSG_ERROR( "Unable to retrieve LArFebConfig with key " << m_configKey.key()); + return StatusCode::FAILURE; + } + } + rangeOut=EventIDRange::intersect(rangeOut,rangeIn); //The following two are optional (not used for MC and/or SuperCells) @@ -280,7 +284,7 @@ StatusCode LArADC2MeVCondAlg::execute() { } //Determine if the intercept is to be used: - if (igain==0 || (igain==1 && m_useFEBGainThresholds && m_febCfgReader->lowerGainThreshold(chid)<5)) { + if (igain==0 || (igain==1 && febConfig && febConfig->lowerGainThreshold(chid)<5)) { //Don't use ramp intercept in high gain and in medium gain if the no high gain is used //(eg lowerGainThreshold is ~zero) ADC2MeV.push_back(0.); diff --git a/LArCalorimeter/LArRecUtils/src/LArADC2MeVCondAlg.h b/LArCalorimeter/LArRecUtils/src/LArADC2MeVCondAlg.h index 2ad45971f321c7fa33c7dfa6890a02a9a56cee55..992d255c6c1a47baadd0a1a6008c915e66879839 100644 --- a/LArCalorimeter/LArRecUtils/src/LArADC2MeVCondAlg.h +++ b/LArCalorimeter/LArRecUtils/src/LArADC2MeVCondAlg.h @@ -1,7 +1,7 @@ //Dear emacs, this is -*- c++ -*- /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ @@ -13,7 +13,7 @@ #include "StoreGate/ReadCondHandleKey.h" #include "StoreGate/WriteCondHandleKey.h" #include "GaudiKernel/ICondSvc.h" -#include "GaudiKernel/ToolHandle.h" +#include "LArRecConditions/LArFebConfig.h" class LArADC2MeV; class ILAruA2MeV; @@ -23,8 +23,6 @@ class ILArMphysOverMcal; class ILArHVScaleCorr; class LArOnOffIdMapping; -class ILArFEBConfigReader; - class LArADC2MeVCondAlg: public AthAlgorithm { public: @@ -50,10 +48,7 @@ class LArADC2MeVCondAlg: public AthAlgorithm { ServiceHandle<ICondSvc> m_condSvc; - //FIXME: - //The FEB configurations (gain thresholds) are also conditions - //Its stored in 18 COOL folders, so waiting for ReadCondHandleArray for migrating to a cond-algo - ToolHandle<ILArFEBConfigReader> m_febCfgReader; + SG::ReadCondHandleKey<LArFebConfig> m_configKey; bool m_useFEBGainThresholds; size_t m_nGains; diff --git a/LArCalorimeter/LArRecUtils/src/LArADC2MeVTool.cxx b/LArCalorimeter/LArRecUtils/src/LArADC2MeVTool.cxx index 26c58abe2ebc6092cfaa539edd1362980da06c76..d0cb9f9ed5f23f73f5b64b5a4a1c4fc1058dc210 100644 --- a/LArCalorimeter/LArRecUtils/src/LArADC2MeVTool.cxx +++ b/LArCalorimeter/LArRecUtils/src/LArADC2MeVTool.cxx @@ -33,8 +33,7 @@ LArADC2MeVTool::LArADC2MeVTool(const std::string& type, m_useHVScaleCorr(false), m_useFEBGainThresholds(false), m_cacheValid(false), - m_febConfigReader("LArFEBConfigReader") - , m_isSC(false) + m_isSC(false) { declareInterface<ILArADC2MeVTool>(this); @@ -47,7 +46,6 @@ LArADC2MeVTool::LArADC2MeVTool(const std::string& type, declareProperty("UseMphysOverMcal",m_useMphysOverMcal); declareProperty("UseHVScaleCorr",m_useHVScaleCorr); declareProperty("LoadAtBegin",m_loadAtBegin=true); - declareProperty("FebConfigReader",m_febConfigReader); declareProperty("UseFEBGainTresholds",m_useFEBGainThresholds); declareProperty("IsSC",m_isSC); m_ADC2MeV=NULL; @@ -158,7 +156,7 @@ StatusCode LArADC2MeVTool::initialize() { } } - ATH_CHECK( m_febConfigReader.retrieve( DisableTool{ !m_useFEBGainThresholds } )); + if(m_useFEBGainThresholds) ATH_CHECK(m_configKey.initialize()); if (m_loadAtBegin) { ATH_MSG_DEBUG( "Setting callback function to load calibration at begin of run"); @@ -288,6 +286,16 @@ StatusCode LArADC2MeVTool::getADC2MeV() const { unsigned int ngains(3); if ( m_isSC ) ngains=1; + // retrieve LArFebConfig if needed + const LArFebConfig *febConfig=nullptr; + if(m_useFEBGainThresholds) { + SG::ReadCondHandle<LArFebConfig> configHdl{m_configKey}; + febConfig = *configHdl; + if (febConfig==nullptr) { + ATH_MSG_ERROR( "Unable to retrieve LArFebConfig with key " << m_configKey.key()); + return StatusCode::FAILURE; + } + } for(;it!=it_e;++it) { count ++; const HWIdentifier id = *it; @@ -361,7 +369,7 @@ StatusCode LArADC2MeVTool::getADC2MeV() const { const std::size_t iMax = ADC2DAC.size(); vADC2MeV.reserve(iMax); for(unsigned int i=0;i<iMax;i++) { - if (m_useFEBGainThresholds && igain==1 && i==0 && m_febConfigReader->lowerGainThreshold(id)<5) { + if (febConfig && igain==1 && i==0 && febConfig->lowerGainThreshold(id)<5) { //Don't use ramp offset in MED gain offset if HIGH gain is not used ++count8; vADC2MeV.push_back(0.); diff --git a/LArCalorimeter/LArRecUtils/src/LArADC2MeVTool.h b/LArCalorimeter/LArRecUtils/src/LArADC2MeVTool.h index 43f2431852bb9bc78ff1dbaf12fbc0c9db278b33..459bf4174229f87478adfc576267c31b69d8b60c 100644 --- a/LArCalorimeter/LArRecUtils/src/LArADC2MeVTool.h +++ b/LArCalorimeter/LArRecUtils/src/LArADC2MeVTool.h @@ -28,7 +28,9 @@ #include "LArElecCalib/ILAruA2MeV.h" #include "LArElecCalib/ILArMphysOverMcal.h" #include "LArElecCalib/ILArHVScaleCorr.h" -#include "LArElecCalib/ILArFEBConfigReader.h" + +#include "StoreGate/ReadCondHandleKey.h" +#include "LArRecConditions/LArFebConfig.h" #include "StoreGate/DataHandle.h" #include "LArCabling/LArCablingBase.h" @@ -104,7 +106,8 @@ class LArADC2MeVTool: public AthAlgTool, mutable LArConditionsContainer< std::vector<float> >* m_ADC2MeV; mutable std::vector< std::vector < float > > m_ADC2MeV_vec; - ToolHandle<ILArFEBConfigReader> m_febConfigReader; + SG::ReadCondHandleKey<LArFebConfig> m_configKey{this, "inputKey","LArFebConfig", "Input key for FEB config object"}; + bool m_isSC; }; diff --git a/LArCalorimeter/LArRecUtils/src/LArAutoCorrNoiseTool.h b/LArCalorimeter/LArRecUtils/src/LArAutoCorrNoiseTool.h index 479f407611a1e95a44eb45cce4f80c20ca761805..2b772f17eb6ebe12bcbd787d218f32381deb3d2c 100644 --- a/LArCalorimeter/LArRecUtils/src/LArAutoCorrNoiseTool.h +++ b/LArCalorimeter/LArRecUtils/src/LArAutoCorrNoiseTool.h @@ -31,7 +31,6 @@ #include "LArElecCalib/ILArMCSymTool.h" #include "LArIdentifier/LArOnlineID.h" #include "LArIdentifier/LArOnline_SuperCellID.h" -#include "CaloIdentifier/CaloIdManager.h" #include "CaloIdentifier/LArID.h" #include "GaudiKernel/IIncidentListener.h" #include "AthenaPoolUtilities/CondAttrListCollection.h" diff --git a/LArCalorimeter/LArRecUtils/src/LArAutoCorrTotalTool.cxx b/LArCalorimeter/LArRecUtils/src/LArAutoCorrTotalTool.cxx index 2c81adb18e3621283b498780d16bb603d4eb6305..56088671e7f1eb0320d4877d5704f1d8add24fad 100644 --- a/LArCalorimeter/LArRecUtils/src/LArAutoCorrTotalTool.cxx +++ b/LArCalorimeter/LArRecUtils/src/LArAutoCorrTotalTool.cxx @@ -8,6 +8,7 @@ #include "LArIdentifier/LArOnlineID.h" #include "LArIdentifier/LArOnline_SuperCellID.h" #include "LArCabling/LArCablingLegacyService.h" +#include "CaloIdentifier/CaloCell_ID.h" #include <cmath> ///////////////////////////////////////////////////////////////////////////// @@ -23,7 +24,6 @@ LArAutoCorrTotalTool::LArAutoCorrTotalTool(const std::string& type, m_lar_on_id(nullptr), m_cablingService(nullptr), m_larmcsym("LArMCSymTool"),m_adc2mevTool("LArADC2MeVTool"), - m_calo_id_man(nullptr), m_lar_em_id(nullptr), m_lar_hec_id(nullptr), m_lar_fcal_id(nullptr), @@ -77,16 +77,17 @@ StatusCode LArAutoCorrTotalTool::initialize() } //retrieves helpers for LArCalorimeter - m_calo_id_man = CaloIdManager::instance(); + const CaloCell_Base_ID* idHelper = nullptr; if ( m_isSC ) { - m_lar_em_id = m_calo_id_man->getEM_SuperCell_ID(); - m_lar_hec_id = m_calo_id_man->getHEC_SuperCell_ID(); - m_lar_fcal_id = m_calo_id_man->getFCAL_SuperCell_ID(); - } else { - m_lar_em_id = m_calo_id_man->getEM_ID(); - m_lar_hec_id = m_calo_id_man->getHEC_ID(); - m_lar_fcal_id = m_calo_id_man->getFCAL_ID(); - } + ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_SuperCell_ID") ); + } + else { + ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_ID") ); + } + + m_lar_em_id = idHelper->em_idHelper(); + m_lar_hec_id = idHelper->hec_idHelper(); + m_lar_fcal_id = idHelper->fcal_idHelper(); diff --git a/LArCalorimeter/LArRecUtils/src/LArAutoCorrTotalTool.h b/LArCalorimeter/LArRecUtils/src/LArAutoCorrTotalTool.h index c633bc200cb7ab2dd1f849d563f06a880ca7516b..3c099b7f676b801a026e16522a10f4c5756ad019 100644 --- a/LArCalorimeter/LArRecUtils/src/LArAutoCorrTotalTool.h +++ b/LArCalorimeter/LArRecUtils/src/LArAutoCorrTotalTool.h @@ -36,7 +36,6 @@ #include "StoreGate/DataHandle.h" #include "LArElecCalib/ILArMCSymTool.h" #include "LArIdentifier/LArOnlineID.h" -#include "CaloIdentifier/CaloIdManager.h" #include "CaloIdentifier/LArID.h" #include "GaudiKernel/IIncidentListener.h" @@ -104,7 +103,6 @@ class LArAutoCorrTotalTool: public AthAlgTool, ToolHandle<ILArMCSymTool> m_larmcsym; ToolHandle<ILArADC2MeVTool> m_adc2mevTool; - const CaloIdManager* m_calo_id_man; const LArEM_Base_ID* m_lar_em_id; const LArHEC_Base_ID* m_lar_hec_id; const LArFCAL_Base_ID* m_lar_fcal_id; diff --git a/LArCalorimeter/LArRecUtils/src/LArCellFakeProbElectronics.cxx b/LArCalorimeter/LArRecUtils/src/LArCellFakeProbElectronics.cxx index a57a496306f4ec640e7118f7d96e6d4f57e5a220..af68292c7f044327cf787ab2f09e489dc67e3705 100644 --- a/LArCalorimeter/LArRecUtils/src/LArCellFakeProbElectronics.cxx +++ b/LArCalorimeter/LArRecUtils/src/LArCellFakeProbElectronics.cxx @@ -18,7 +18,6 @@ PURPOSE: Scales down the energy of cells due to simulated #include "LArCellFakeProbElectronics.h" #include "CaloEvent/CaloCellContainer.h" -#include "CaloIdentifier/CaloIdManager.h" #include "CaloIdentifier/CaloCell_ID.h" #include "CaloDetDescr/CaloDetDescrManager.h" #include "LArCabling/LArCablingLegacyService.h" @@ -77,12 +76,10 @@ double LArCellFakeProbElectronics::wtCell(const CaloCell * theCell ) const // get calo id helper - const CaloCell_ID* idHelper = CaloIdManager::instance()->getCaloCell_ID(); - if ( idHelper == 0 ) - { - ATH_MSG_ERROR( "cannot allocate CaloCell_ID helper!" ); - return 1; - } + const CaloCell_ID* idHelper = nullptr; + if (detStore()->retrieve (idHelper, "CaloCell_ID").isFailure()) { + return 1; + } HWIdentifier id; try{ diff --git a/LArCalorimeter/LArRecUtils/src/LArFCalTowerBuilderTool.cxx b/LArCalorimeter/LArRecUtils/src/LArFCalTowerBuilderTool.cxx index cc6edfaa6f19ec41cca4246ce8fd5e054618c825..04e29ec37bcb96312efc889bb15dead58a8e9ece 100644 --- a/LArCalorimeter/LArRecUtils/src/LArFCalTowerBuilderTool.cxx +++ b/LArCalorimeter/LArRecUtils/src/LArFCalTowerBuilderTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ @@ -7,8 +7,8 @@ #include "LArFCalTowerStore.h" #include "CaloIdentifier/CaloCell_ID.h" -#include "CaloIdentifier/CaloIdManager.h" #include "CaloIdentifier/LArFCAL_ID.h" +#include "CaloDetDescr/CaloDetDescrManager.h" #include "CaloUtils/CaloTowerBuilderToolBase.h" @@ -28,11 +28,12 @@ LArFCalTowerBuilderTool::LArFCalTowerBuilderTool(const std::string& name, const IInterface* parent) : CaloTowerBuilderToolBase(name,type,parent) , m_minEt(0.) + , m_cellIdHelper(nullptr) + , m_larFCalId(nullptr) + , m_theManager(nullptr) { // Et cut for minicells declareProperty("MinimumEt",m_minEt); - m_larFCalId = (CaloIdManager::instance())->getFCAL_ID(); - // initialize intermediate store } LArFCalTowerBuilderTool::~LArFCalTowerBuilderTool(){ @@ -43,6 +44,11 @@ LArFCalTowerBuilderTool::~LArFCalTowerBuilderTool(){ ///////////////////////////// StatusCode LArFCalTowerBuilderTool::initializeTool(){ + ATH_CHECK( detStore()->retrieve (m_cellIdHelper, "CaloCell_ID") ); + m_larFCalId = m_cellIdHelper->fcal_idHelper(); + + ATH_CHECK( detStore()->retrieve (m_theManager, "CaloMgr") ); + // ignore other input! ATH_MSG_INFO( "CaloTowerBuilder for the FCal initiated" ); @@ -191,7 +197,10 @@ void LArFCalTowerBuilderTool::handle(const Incident&) StatusCode LArFCalTowerBuilderTool::rebuildLookup() { CaloTowerContainer theTowers (towerSeg()); - if ( m_cellStore.buildLookUp(&theTowers) ) { + if ( m_cellStore.buildLookUp(*m_cellIdHelper, + *m_theManager, + &theTowers) ) + { return StatusCode::SUCCESS; } return StatusCode::FAILURE; diff --git a/LArCalorimeter/LArRecUtils/src/LArFCalTowerBuilderTool.h b/LArCalorimeter/LArRecUtils/src/LArFCalTowerBuilderTool.h index d4a2987695160b7b1c6cacc9003d40f614daa6e5..8702d99873f1a323721bbce489de85cb044e7285 100644 --- a/LArCalorimeter/LArRecUtils/src/LArFCalTowerBuilderTool.h +++ b/LArCalorimeter/LArRecUtils/src/LArFCalTowerBuilderTool.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef LARCLUSTERREC_LARFCALTOWERBUILDERTOOL_H @@ -28,6 +28,7 @@ class LArFCalTowerStore; class CaloTowerContainer; class CaloTower; +class CaloDetDescrManager; class LArFCAL_ID; @@ -96,7 +97,9 @@ private: // FCal only static CaloCell_ID::SUBCALO m_caloIndex; + const CaloCell_ID* m_cellIdHelper; const LArFCAL_ID* m_larFCalId; + const CaloDetDescrManager* m_theManager; LArFCalTowerStore m_cellStore; }; diff --git a/LArCalorimeter/LArRecUtils/src/LArFCalTowerStore.cxx b/LArCalorimeter/LArRecUtils/src/LArFCalTowerStore.cxx index 35cde60f2d59b5bb411941050a30dfcd2a5e376d..1b849095818946d7dd157f30b9a8740ed96315e0 100644 --- a/LArCalorimeter/LArRecUtils/src/LArFCalTowerStore.cxx +++ b/LArCalorimeter/LArRecUtils/src/LArFCalTowerStore.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /******************************************************************** @@ -20,8 +20,7 @@ Updated: // include header files #include "Identifier/IdentifierHash.h" -#include "CaloIdentifier/CaloIdManager.h" -//#include "CaloIdentifier/CaloCell_ID.h" +#include "CaloIdentifier/CaloCell_ID.h" #include "CaloIdentifier/LArFCAL_ID.h" #include "CaloDetDescr/CaloDetDescrManager.h" @@ -65,7 +64,9 @@ LArFCalTowerStore::~LArFCalTowerStore(){ // Build LookUp Table // //////////////////////// -bool LArFCalTowerStore::buildLookUp(CaloTowerContainer* theTowers) +bool LArFCalTowerStore::buildLookUp(const CaloCell_ID& cellIdHelper, + const CaloDetDescrManager& theManager, + CaloTowerContainer* theTowers) { /////////////////////// // Store Preparation // @@ -80,19 +81,11 @@ bool LArFCalTowerStore::buildLookUp(CaloTowerContainer* theTowers) MsgStream msg(theMsgSvc,"LArFCalTowerStore"); // get cell id helper - const CaloCell_ID* cellIdHelper = (CaloIdManager::instance())->getCaloCell_ID(); - const LArFCAL_ID* fcalIdHelper = (CaloIdManager::instance())->getFCAL_ID(); - - // get cell description manager - const CaloDetDescrManager* theManager = CaloDetDescrManager::instance(); - if ( ! theManager->isInitialized() ){ - msg << MSG::ERROR<< "CaloDetDescrManager is not initialized, module unusable!" << endmsg; - return false; - } + const LArFCAL_ID& fcalIdHelper = *cellIdHelper.fcal_idHelper(); // find numerical ranges IdentifierHash firstIndex, lastIndex; - cellIdHelper->calo_cell_hash_range((int)CaloCell_ID::LARFCAL, firstIndex, lastIndex); + cellIdHelper.calo_cell_hash_range((int)CaloCell_ID::LARFCAL, firstIndex, lastIndex); m_indxOffset = (size_t)firstIndex; m_indxBound = (size_t)lastIndex; @@ -138,7 +131,7 @@ bool LArFCalTowerStore::buildLookUp(CaloTowerContainer* theTowers) //std::cout<<"cell:"<<anIndex<<std::endl; // get cell geometry - const CaloDetDescrElement* theElement = theManager->get_element(cellIndex); + const CaloDetDescrElement* theElement = theManager.get_element(cellIndex); if (!theElement) { msg << MSG::ERROR<< "Can't find element for index " << cellIndex << endmsg; @@ -151,7 +144,7 @@ bool LArFCalTowerStore::buildLookUp(CaloTowerContainer* theTowers) double dyCell = theElement->dy(); // get cell logical location - int thisModule = fcalIdHelper->module(theElement->identify()); + int thisModule = fcalIdHelper.module(theElement->identify()); // get cell splitting thisModule--; double theXBin = dxCell / (double)m_ndxFCal[thisModule]; diff --git a/LArCalorimeter/LArRecUtils/src/LArFCalTowerStore.h b/LArCalorimeter/LArRecUtils/src/LArFCalTowerStore.h index 089b24b54e92160a6ba5d960dc53736aa9fd7b1d..f54ab5ab29028b1511582ec7925e7893f6bea782 100644 --- a/LArCalorimeter/LArRecUtils/src/LArFCalTowerStore.h +++ b/LArCalorimeter/LArRecUtils/src/LArFCalTowerStore.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef LARRECUTILS_LARFCALTOWERSTORE_H @@ -32,6 +32,8 @@ PACKAGE: offline/LArCalorimeter/LArClusterRec #include <map> #include <vector> +class CaloDetDescrManager; + class LArFCalTowerStore { public: @@ -70,7 +72,9 @@ class LArFCalTowerStore unsigned int towerSize(tower_iterator t) const {return t->size();} /// \brief setup trigger - bool buildLookUp(CaloTowerContainer* theTowers); + bool buildLookUp(const CaloCell_ID& cellIdHelper, + const CaloDetDescrManager& theManager, + CaloTowerContainer* theTowers); /// \brief size of internal data store size_t size() const { return m_TTCmatrix.size(); } diff --git a/LArCalorimeter/LArRecUtils/src/LArFEBConfigCondAlg.cxx b/LArCalorimeter/LArRecUtils/src/LArFEBConfigCondAlg.cxx new file mode 100644 index 0000000000000000000000000000000000000000..3f533c68a93f8e525007149fdb539d05bfd4a1ca --- /dev/null +++ b/LArCalorimeter/LArRecUtils/src/LArFEBConfigCondAlg.cxx @@ -0,0 +1,112 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "LArFEBConfigCondAlg.h" +#include "LArIdentifier/LArOnlineID.h" + + +LArFEBConfigCondAlg::LArFEBConfigCondAlg(const std::string& name, ISvcLocator* pSvcLocator) : + AthReentrantAlgorithm(name,pSvcLocator),m_onlineID(nullptr) { + + declareProperty("ListOfFolders",m_listOfFolders); + +} + + +LArFEBConfigCondAlg::~LArFEBConfigCondAlg() {} + +StatusCode LArFEBConfigCondAlg::initialize() { + + ATH_MSG_DEBUG(" trying initialize"); + + ATH_CHECK(detStore()->retrieve(m_onlineID,"LArOnlineID")); + + if (m_listOfFolders.size()==0) { + ATH_MSG_WARNING( "List of folders is emtpy, do nothing"); + return StatusCode::SUCCESS; + } + + for (size_t i=0;i<m_listOfFolders.size();++i) { + ATH_CHECK(m_listOfFolders[i].initialize()); + }//end loop over folders + + ATH_CHECK(m_configKey.initialize()); + + ATH_MSG_DEBUG("Successfully initialized LArFEBConfigCondAlg"); + return StatusCode::SUCCESS; +} + + + +StatusCode LArFEBConfigCondAlg::execute(const EventContext& ctx) const { + ATH_MSG_DEBUG("executing"); + + SG::WriteCondHandle<LArFebConfig> writeHandle{m_configKey}; + if (writeHandle.isValid()) { + ATH_MSG_DEBUG("Found valid write LArFebConfig handle"); + return StatusCode::SUCCESS; + } + + // Define validity of the output cond object + const EventIDBase start{EventIDBase::UNDEFNUM, EventIDBase::UNDEFEVT, 0, 0, EventIDBase::UNDEFNUM, EventIDBase::UNDEFNUM}; + const EventIDBase stop{EventIDBase::UNDEFNUM, EventIDBase::UNDEFEVT, EventIDBase::UNDEFNUM-1, EventIDBase::UNDEFNUM-1, EventIDBase::UNDEFNUM, EventIDBase::UNDEFNUM}; + EventIDRange rangeW{start, stop}; + + std::vector<const CondAttrListCollection*> attrvec; + + for (auto fldkey: m_listOfFolders) { + SG::ReadCondHandle<CondAttrListCollection> cHdl(fldkey, ctx); + const CondAttrListCollection* cattr = *cHdl; + if(cattr) { + ATH_MSG_DEBUG("Folder: "<<cHdl.key()<<" has size: "<<std::distance(cattr->begin(),cattr->end())); + attrvec.push_back(cattr); + EventIDRange rangeW_tmp; + if(!cHdl.range(rangeW_tmp)) { + ATH_MSG_ERROR("Failed to retrieve validity range for " << cHdl.key()); + return StatusCode::FAILURE; + } + ATH_MSG_DEBUG("and validity range: "<<rangeW_tmp); + rangeW.intersect(rangeW,rangeW_tmp); + } else { + ATH_MSG_WARNING("Why do not have FEB config folder " << fldkey.fullKey()); + } + } + + // Fill LArFebConfig + std::unique_ptr<LArFebConfig> febConfig=std::make_unique<LArFebConfig>(m_onlineID); + LArFebConfig* p_febConfig = febConfig.get(); + + unsigned nFebs=0; + for(auto dh: attrvec){ + CondAttrListCollection::const_iterator chanit=dh->begin(); + CondAttrListCollection::const_iterator chanit_e=dh->end(); + for (;chanit!=chanit_e;++chanit) { + if (chanit->first==0) { + ATH_MSG_DEBUG("Invalid channel number 0, ignoring..."); + continue; + } + const HWIdentifier fid(chanit->first); //COOL channel number == FEB identifier + //const coral::AttributeList& attr = chanit->second; + ATH_MSG_DEBUG("Working on FEB 0x" << std::hex << fid.get_compact() << std::dec << " " << m_onlineID->channel_name(fid)); + p_febConfig->m_attrPerFeb[fid]=std::move(&(chanit->second)); + ++nFebs; + }//End loop over COOL channels + p_febConfig->m_lastIt = p_febConfig->m_attrPerFeb.end(); + } + ATH_MSG_INFO("Read gain thresholds for " << nFebs << " Febs from " << m_listOfFolders.size() << " database folders."); + + // Record output + const EventIDRange crangeW(rangeW); + if(writeHandle.record(crangeW,febConfig.release()).isFailure()) { + ATH_MSG_ERROR("Could not record LArFebConfig object with " << writeHandle.key() + << " with EventRange " << crangeW << " into Conditions Store"); + return StatusCode::FAILURE; + } + + ATH_MSG_INFO("recorded new " << writeHandle.key() << " with range " << crangeW << " into Conditions Store"); + + return StatusCode::SUCCESS; +} + + diff --git a/LArCalorimeter/LArRecUtils/src/LArFEBConfigCondAlg.h b/LArCalorimeter/LArRecUtils/src/LArFEBConfigCondAlg.h new file mode 100644 index 0000000000000000000000000000000000000000..76a6c0d7c933a71d22b5399d9842eb70ab494a37 --- /dev/null +++ b/LArCalorimeter/LArRecUtils/src/LArFEBConfigCondAlg.h @@ -0,0 +1,35 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef LARRECUTILS_LARFEBCONFIGCONDALG +#define LARRECUTILS_LARFEBCONFIGCONDALG + +#include "AthenaBaseComps/AthReentrantAlgorithm.h" +#include "AthenaKernel/IOVSvcDefs.h" +#include "LArRecConditions/LArFebConfig.h" +#include "StoreGate/CondHandleKeyArray.h" +#include "StoreGate/WriteCondHandleKey.h" +#include "AthenaPoolUtilities/CondAttrListCollection.h" + +#include <map> + +class LArOnlineID; + +class LArFEBConfigCondAlg: public AthReentrantAlgorithm { + + public: + LArFEBConfigCondAlg(const std::string& name, ISvcLocator* pSvcLocator); + virtual ~LArFEBConfigCondAlg(); + + virtual StatusCode initialize() override; + virtual StatusCode execute(const EventContext& ctx) const override; + + private: + + const LArOnlineID* m_onlineID; + SG::ReadCondHandleKeyArray<CondAttrListCollection> m_listOfFolders; + SG::WriteCondHandleKey<LArFebConfig> m_configKey{this, "keyOutput", "LArFebConfig", "Output key for LArFebConfig"}; +}; + +#endif diff --git a/LArCalorimeter/LArRecUtils/src/LArFEBConfigReader.cxx b/LArCalorimeter/LArRecUtils/src/LArFEBConfigReader.cxx deleted file mode 100644 index 1baed3e5bf3cdd6220acdff5e82f563db5c6cf69..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArRecUtils/src/LArFEBConfigReader.cxx +++ /dev/null @@ -1,110 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "LArFEBConfigReader.h" -#include "LArIdentifier/LArOnlineID.h" - -LArFEBConfigReader::LArFEBConfigReader(const std::string& type, const std::string& name, const IInterface* parent) : - AthAlgTool(type,name,parent),m_onlineID(NULL) { - - declareInterface<ILArFEBConfigReader>(this); - declareProperty("ListOfFolders",m_listOfFolders); - m_lastIt=m_attrPerFeb.end(); -} - - -LArFEBConfigReader::~LArFEBConfigReader() {} - -StatusCode LArFEBConfigReader::initialize() { - - if (detStore()->retrieve(m_onlineID,"LArOnlineID").isFailure()) { - msg(MSG::ERROR) << "Failed to retrieve LArOnlineID" << endmsg; - return StatusCode::FAILURE; - } - - if (m_listOfFolders.size()==0) { - msg(MSG::WARNING) << "List of folders is emtpy, do nothing" << endmsg; - return StatusCode::SUCCESS; - } - - const size_t nFolders=m_listOfFolders.size(); - m_handles.resize(nFolders); - - for (size_t i=0;i<nFolders;++i) { - const std::string& fn=m_listOfFolders[i]; - const DataHandle<CondAttrListCollection>& chdl=m_handles[i]; - ATH_MSG_DEBUG("Registering callback for folder " << fn); - StatusCode sc=detStore()->regFcn(&ILArFEBConfigReader::loadData,dynamic_cast<ILArFEBConfigReader*>(this), - chdl,fn); - - if (sc.isFailure()) { - msg(MSG::ERROR) << "Failed to register callback for DB folder " << fn << endmsg; - return StatusCode::FAILURE; - } - }//end loop over folders - - msg(MSG::DEBUG) << "Successfully initialized LArFEBConfigReader" << endmsg; - return StatusCode::SUCCESS; -} - - - -StatusCode LArFEBConfigReader::finalize() { - return StatusCode::SUCCESS; -} - - -StatusCode LArFEBConfigReader::loadData(IOVSVC_CALLBACK_ARGS) { - msg(MSG::INFO) << "In IOV callback method..." << endmsg; - m_attrPerFeb.clear(); - unsigned nFebs=0; - const size_t nFolders=m_listOfFolders.size(); - for (size_t i=0;i<nFolders;++i) { - ATH_MSG_DEBUG("Working on folder " << m_listOfFolders[i]); - const DataHandle<CondAttrListCollection> dh; - if (detStore()->retrieve(dh,m_listOfFolders[i]).isFailure()) { - msg(MSG::ERROR) << "Failed to retrieve DataHandle for folder " << m_listOfFolders[i] << endmsg; - return StatusCode::FAILURE; - } - CondAttrListCollection::const_iterator chanit=dh->begin(); - CondAttrListCollection::const_iterator chanit_e=dh->end(); - for (;chanit!=chanit_e;++chanit) { - if (chanit->first==0) { - ATH_MSG_DEBUG("Invalid channel number 0, ignoring..."); - continue; - } - const HWIdentifier fid(chanit->first); //COOL channel number == FEB identifier - //const coral::AttributeList& attr = chanit->second; - ATH_MSG_DEBUG("Working on FEB 0x" << std::hex << fid.get_compact() << std::dec << " " << m_onlineID->channel_name(fid)); - ++nFebs; - m_attrPerFeb[fid]=&(chanit->second); - }//End loop over COOL channels - }//End loop over folders - m_lastIt=m_attrPerFeb.end(); - msg(MSG::INFO) << "Read gain thresholds for " << nFebs << " Febs from " << m_listOfFolders.size() << " database folders." << endmsg; - return StatusCode::SUCCESS; -} - - -short LArFEBConfigReader::getThreshold(const char* MedLow, const HWIdentifier& chid) const { - - if (m_attrPerFeb.size()==0) { - msg(MSG::WARNING) << "FEB treshold cache is empty. Callback not fired?" << endmsg; - return ERRORCODE; - } - - const HWIdentifier fid=m_onlineID->feb_Id(chid); - const int channel=m_onlineID->channel(chid); - if (m_lastIt==m_attrPerFeb.end() || m_lastIt->first!=fid) - m_lastIt=m_attrPerFeb.find(fid); - - if (m_lastIt==m_attrPerFeb.end()) - return ERRORCODE; - else { - char channame[16]; - snprintf(channame,15,"%s%i",MedLow,channel+1); - channame[15]='\n';// Just to be sure... - return (short)(*(m_lastIt->second))[channame].data<int32_t>(); //Will throw and exception if channel does not exist - } -} diff --git a/LArCalorimeter/LArRecUtils/src/LArFEBConfigReader.h b/LArCalorimeter/LArRecUtils/src/LArFEBConfigReader.h deleted file mode 100644 index 6ba3a618e3f01b7f139089970b41555e4475c0ff..0000000000000000000000000000000000000000 --- a/LArCalorimeter/LArRecUtils/src/LArFEBConfigReader.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -//Dear emacs, this is -*-c++-*- -#ifndef LARRECUTILS_LARFEBCONFIGREADERTOOL -#define LARRECUTILS_LARFEBCONFIGREADERTOOL - -#include "AthenaBaseComps/AthAlgTool.h" -#include "LArElecCalib/ILArFEBConfigReader.h" -#include "AthenaKernel/IOVSvcDefs.h" -#include "CoralBase/AttributeList.h" -#include "AthenaPoolUtilities/CondAttrListCollection.h" - -#include "LArRawConditions/LArConditionsContainer.h" - -#include <map> - -class LArOnlineID; - -class LArFEBConfigReader: public AthAlgTool, - virtual public ILArFEBConfigReader { - - public: - LArFEBConfigReader(const std::string& type, const std::string& name, const IInterface* parent); - virtual ~LArFEBConfigReader(); - - StatusCode initialize(); - StatusCode finalize(); - - //Accessor methods from ILArFEBConfigReader - virtual short lowerGainThreshold(const HWIdentifier& id) const; - virtual short upperGainThreshold(const HWIdentifier& id) const; - - //IOV Callback function - virtual StatusCode loadData(IOVSVC_CALLBACK_ARGS); - - static const InterfaceID& interfaceID() { return ILArFEBConfigReader::interfaceID();} - - private: - - const LArOnlineID* m_onlineID; - std::vector<std::string> m_listOfFolders; - - std::map<HWIdentifier,const coral::AttributeList*> m_attrPerFeb; - mutable std::map<HWIdentifier,const coral::AttributeList*>::const_iterator m_lastIt; - - std::vector<DataHandle<CondAttrListCollection> > m_handles; - - short getThreshold(const char* MedLow, const HWIdentifier& chid) const; -}; - - -inline short LArFEBConfigReader::lowerGainThreshold(const HWIdentifier& chid) const { - return getThreshold("lower",chid); -} - - -inline short LArFEBConfigReader::upperGainThreshold(const HWIdentifier& chid) const { - return getThreshold("upper",chid); -} - -#endif diff --git a/LArCalorimeter/LArRecUtils/src/LArHVCondAlg.cxx b/LArCalorimeter/LArRecUtils/src/LArHVCondAlg.cxx index 56284850ad2ed0465d156d7ab188e647de8c7566..5c45c9d1954356224cdc7c28c18190748fa96e81 100755 --- a/LArCalorimeter/LArRecUtils/src/LArHVCondAlg.cxx +++ b/LArCalorimeter/LArRecUtils/src/LArHVCondAlg.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "./LArHVCondAlg.h" @@ -12,7 +12,7 @@ #include "CaloIdentifier/LArEM_ID.h" #include "CaloIdentifier/LArHEC_ID.h" #include "CaloIdentifier/LArFCAL_ID.h" -#include "CaloIdentifier/CaloIdManager.h" +#include "CaloIdentifier/CaloCell_ID.h" #include "CaloDetDescr/CaloDetDescrManager.h" #include "LArReadoutGeometry/EMBCell.h" #include "LArHV/LArHVManager.h" @@ -62,6 +62,7 @@ // constructor LArHVCondAlg::LArHVCondAlg( const std::string& name, ISvcLocator* pSvcLocator ) : AthReentrantAlgorithm(name,pSvcLocator), + m_calodetdescrmgr(nullptr), m_larem_id(nullptr), m_larhec_id(nullptr), m_larfcal_id(nullptr), @@ -81,11 +82,12 @@ LArHVCondAlg::~LArHVCondAlg() //initialize StatusCode LArHVCondAlg::initialize(){ - ATH_CHECK(detStore()->retrieve(m_caloIdMgr)); + const CaloCell_ID* idHelper = nullptr; + ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_ID") ); - m_larem_id = m_caloIdMgr->getEM_ID(); - m_larhec_id = m_caloIdMgr->getHEC_ID(); - m_larfcal_id = m_caloIdMgr->getFCAL_ID(); + m_larem_id = idHelper->em_idHelper(); + m_larhec_id = idHelper->hec_idHelper(); + m_larfcal_id = idHelper->fcal_idHelper(); ATH_CHECK(detStore()->retrieve(m_calodetdescrmgr)); diff --git a/LArCalorimeter/LArRecUtils/src/LArHVCondAlg.h b/LArCalorimeter/LArRecUtils/src/LArHVCondAlg.h index b69427da2f8386b3d278b4c1a96c1d3aaeb7eb0b..a05c11389962bdc8f4743af0538680cdc55a0615 100755 --- a/LArCalorimeter/LArRecUtils/src/LArHVCondAlg.h +++ b/LArCalorimeter/LArRecUtils/src/LArHVCondAlg.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /** @@ -36,7 +36,6 @@ class AthenaAttributeList; class LArEM_ID; class LArHEC_ID; class LArFCAL_ID; -class CaloIdManager; class CaloDetDescrManager; class Identifier; class LArElectrodeID; @@ -77,8 +76,7 @@ class LArHVCondAlg: public AthReentrantAlgorithm // other members: - const DataHandle<CaloIdManager> m_caloIdMgr; - const DataHandle<CaloDetDescrManager> m_calodetdescrmgr; + const CaloDetDescrManager* m_calodetdescrmgr; const LArEM_ID* m_larem_id; const LArHEC_ID* m_larhec_id; const LArFCAL_ID* m_larfcal_id; diff --git a/LArCalorimeter/LArRecUtils/src/LArHVCorrTool.cxx b/LArCalorimeter/LArRecUtils/src/LArHVCorrTool.cxx index c09f3e35d5393b0385bd885a7a66032c2c7adc5e..8893edfe85ac1cb6418984d7252da8a36f9c0120 100644 --- a/LArCalorimeter/LArRecUtils/src/LArHVCorrTool.cxx +++ b/LArCalorimeter/LArRecUtils/src/LArHVCorrTool.cxx @@ -28,18 +28,19 @@ LArHVCorrTool::LArHVCorrTool(const std::string& type, const IInterface* parent) : AthAlgTool(type, name, parent), - m_lar_on_id(NULL), - m_calocell_id(NULL), - m_larem_id(NULL), - m_larhec_id(NULL), - m_larfcal_id(NULL), - m_electrodeID(NULL), + m_lar_on_id(nullptr), + m_calocell_id(nullptr), + m_larem_id(nullptr), + m_larhec_id(nullptr), + m_larfcal_id(nullptr), + m_electrodeID(nullptr), + m_calodetdescrmgr(nullptr), m_cablingService("LArCablingLegacyService"), m_hvtool("LArHVToolMC") { declareInterface<ILArHVCorrTool>(this); - m_Tdrift = NULL; + m_Tdrift = nullptr; m_ownScale = true; m_keyOutput = "LArHVScaleCorr"; m_keyOutputTd = "LArTdrift"; @@ -73,64 +74,22 @@ LArHVCorrTool::~LArHVCorrTool() { StatusCode LArHVCorrTool::initialize() { ATH_MSG_DEBUG("LArHVCorrTool initialize() begin"); - StatusCode sc = detStore()->retrieve(m_lar_on_id,"LArOnlineID"); - if (sc.isFailure()) { - msg(MSG::ERROR) << "Unable to retrieve LArOnlineID from DetectorStore" << endmsg; - return StatusCode::FAILURE; - } - - sc=detStore()->retrieve(m_calocell_id,"CaloCell_ID"); - if (sc.isFailure()) { - msg(MSG::ERROR) << "Unable to retrieve CaloCellID from DetectorStore" << endmsg; - return StatusCode::FAILURE; - } -// retrieve LArEM id helper - - sc = detStore()->retrieve( m_caloIdMgr ); - if (sc.isFailure()) { - msg(MSG::ERROR) << "Unable to retrieve CaloIdMgr " << endmsg; - return sc; - } - - m_larem_id = m_caloIdMgr->getEM_ID(); - m_larhec_id = m_caloIdMgr->getHEC_ID(); - m_larfcal_id = m_caloIdMgr->getFCAL_ID(); + ATH_CHECK( detStore()->retrieve(m_lar_on_id,"LArOnlineID") ); + ATH_CHECK( detStore()->retrieve(m_calocell_id,"CaloCell_ID") ); - if(m_cablingService.retrieve().isFailure()){ - msg(MSG::ERROR) << "Unable to get CablingService " << endmsg; - return StatusCode::FAILURE; - } + m_larem_id = m_calocell_id->em_idHelper(); + m_larhec_id = m_calocell_id->hec_idHelper(); + m_larfcal_id = m_calocell_id->fcal_idHelper(); - sc = detStore()->retrieve(m_calodetdescrmgr); - if (sc.isFailure()) { - msg(MSG::ERROR) << "Unable to get CaloDetDescrManager" << endmsg; - return StatusCode::FAILURE; - } + ATH_CHECK( m_cablingService.retrieve() ); + ATH_CHECK( detStore()->retrieve(m_calodetdescrmgr) ); + ATH_CHECK( detStore()->retrieve(m_electrodeID) ); + ATH_CHECK( m_hvtool.retrieve() ); + ATH_CHECK( detStore()->regFcn(&ILArHVTool::LoadCalibration,dynamic_cast<ILArHVTool*>(&(*m_hvtool)), + &ILArHVCorrTool::LoadCalibration,dynamic_cast<ILArHVCorrTool*>(this)) ); - sc=detStore()->retrieve(m_electrodeID); - if (sc.isFailure()) { - msg(MSG::ERROR) << "Unable to get LArElectrodeID helper" << endmsg; - return sc; - } - - if (m_hvtool.retrieve().isFailure()) { - msg(MSG::ERROR) << "Unable to find tool for LArHVTool" << endmsg; - return StatusCode::FAILURE; - } - - sc = detStore()->regFcn(&ILArHVTool::LoadCalibration,dynamic_cast<ILArHVTool*>(&(*m_hvtool)), - &ILArHVCorrTool::LoadCalibration,dynamic_cast<ILArHVCorrTool*>(this)); - if (sc.isFailure()) { - msg(MSG::ERROR) << "canot register callback " << endmsg; - return sc; - } - - sc = this->buildFixHVList(); - if (sc.isFailure()) { - msg(MSG::ERROR) << " cannot build list to fix HV corrections " << endmsg; - return StatusCode::FAILURE; - } + ATH_CHECK( this->buildFixHVList() ); //Initialize hash-ranges //FIXME: Hardcoded numbers are not ideal @@ -254,7 +213,7 @@ StatusCode LArHVCorrTool::finalize() // *** compute global ADC2MeV factor from subfactors *** StatusCode LArHVCorrTool::getScale(const HASHRANGEVEC& hashranges) const { - if (m_doTdrift && m_Tdrift==NULL) { + if (m_doTdrift && m_Tdrift==nullptr) { m_Tdrift = new LArTdriftComplete(); if( (m_Tdrift->setGroupingType("ExtendedSubDetector",msg())).isFailure()) { msg(MSG::ERROR) << " cannot setGroupingType " << endmsg; diff --git a/LArCalorimeter/LArRecUtils/src/LArHVCorrTool.h b/LArCalorimeter/LArRecUtils/src/LArHVCorrTool.h index bce0b2ae3ca17dd22ce1b9fed9d2e53977b50a06..608689b6a4acd806924f504abb1f16427e14dbe3 100644 --- a/LArCalorimeter/LArRecUtils/src/LArHVCorrTool.h +++ b/LArCalorimeter/LArRecUtils/src/LArHVCorrTool.h @@ -17,7 +17,6 @@ #include "StoreGate/DataHandle.h" #include "LArCabling/LArCablingLegacyService.h" #include "LArIdentifier/LArOnlineID.h" -#include "CaloIdentifier/CaloIdManager.h" #include "CaloIdentifier/LArID.h" #include "CaloDetDescr/CaloDetDescrManager.h" @@ -70,8 +69,7 @@ class LArHVCorrTool: public AthAlgTool, const LArHEC_ID* m_larhec_id; const LArFCAL_ID* m_larfcal_id; const LArElectrodeID* m_electrodeID; - const DataHandle<CaloIdManager> m_caloIdMgr; - const DataHandle<CaloDetDescrManager> m_calodetdescrmgr; + const CaloDetDescrManager* m_calodetdescrmgr; ToolHandle<LArCablingLegacyService> m_cablingService; ToolHandle<ILArHVTool> m_hvtool; diff --git a/LArCalorimeter/LArRecUtils/src/LArHVPathologyDbCondAlg.cxx b/LArCalorimeter/LArRecUtils/src/LArHVPathologyDbCondAlg.cxx index f04294614960bd9512edcede9ce5a6f9d8d4e533..d3eb7dedd5f033cfceef1f1899eece0d93c39e03 100755 --- a/LArCalorimeter/LArRecUtils/src/LArHVPathologyDbCondAlg.cxx +++ b/LArCalorimeter/LArRecUtils/src/LArHVPathologyDbCondAlg.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "LArHVPathologyDbCondAlg.h" @@ -14,7 +14,7 @@ #include "CoralBase/Blob.h" #include "CaloDetDescr/CaloDetDescrManager.h" -#include "CaloIdentifier/CaloIdManager.h" +#include "CaloIdentifier/CaloCell_ID.h" #include "CaloIdentifier/LArEM_ID.h" #include "CaloIdentifier/LArHEC_ID.h" #include "CaloIdentifier/LArFCAL_ID.h" @@ -41,29 +41,15 @@ StatusCode LArHVPathologyDbCondAlg::initialize() ATH_CHECK(m_hvMappingKey.initialize()); ATH_CHECK(m_hvPAthologyKey.initialize()); - StatusCode sc = detStore()->retrieve( m_caloIdMgr ); - if (sc.isFailure()) { - ATH_MSG_ERROR( "Unable to retrieve CaloIdMgr "); - return sc; - } - - m_larem_id = m_caloIdMgr->getEM_ID(); - m_larhec_id = m_caloIdMgr->getHEC_ID(); - m_larfcal_id = m_caloIdMgr->getFCAL_ID(); + const CaloCell_ID* idHelper = nullptr; + ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_ID") ); -// retrieve CaloDetDescrMgr - sc = detStore()->retrieve(m_calodetdescrmgr); - if (sc.isFailure()) { - ATH_MSG_ERROR("Unable to retrieve CaloDetDescrMgr "); - return sc; - } - - sc = detStore()->retrieve(m_laronline_id,"LArOnlineID"); - if (sc.isFailure()) { - ATH_MSG_ERROR("Unable to retrieve LArOnlineID from DetectorStore"); - return sc; - } + m_larem_id = idHelper->em_idHelper(); + m_larhec_id = idHelper->hec_idHelper(); + m_larfcal_id = idHelper->fcal_idHelper(); + ATH_CHECK( detStore()->retrieve (m_calodetdescrmgr, "CaloMgr") ); + ATH_CHECK( detStore()->retrieve(m_laronline_id,"LArOnlineID") ); ATH_CHECK(detStore()->retrieve(m_hvlineHelper,"LArHVLineID")); return StatusCode::SUCCESS; diff --git a/LArCalorimeter/LArRecUtils/src/LArHVPathologyDbCondAlg.h b/LArCalorimeter/LArRecUtils/src/LArHVPathologyDbCondAlg.h index 95c034f44fff15a33dc3e4113eeb82cbb67b4f40..c5bce4d3e10338275cb601db782c12cb028f265c 100755 --- a/LArCalorimeter/LArRecUtils/src/LArHVPathologyDbCondAlg.h +++ b/LArCalorimeter/LArRecUtils/src/LArHVPathologyDbCondAlg.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef LARHVPATHOLOGYDBCONDALG @@ -17,7 +17,6 @@ class LArEM_ID; class LArHEC_ID; class LArFCAL_ID; class LArOnlineID; -class CaloIdManager; class CaloDetDescrManager; class LArHVLineID; class Identifier; @@ -41,8 +40,7 @@ class LArHVPathologyDbCondAlg: public AthReentrantAlgorithm SG::ReadCondHandleKey<LArHVIdMapping> m_hvMappingKey {this, "HVMappingKey", "LArHVIdMap", "Key for mapping object" }; SG::WriteCondHandleKey<LArHVPathology> m_hvPAthologyKey {this, "HVPAthologyKey", "LArHVPathology", "Key for HV pathologies in Cond. store"}; - const DataHandle<CaloIdManager> m_caloIdMgr; - const DataHandle<CaloDetDescrManager> m_calodetdescrmgr; + const CaloDetDescrManager* m_calodetdescrmgr; const LArEM_ID* m_larem_id; const LArHEC_ID* m_larhec_id; const LArFCAL_ID* m_larfcal_id; diff --git a/LArCalorimeter/LArRecUtils/src/LArHVScaleCorrCondAlg.cxx b/LArCalorimeter/LArRecUtils/src/LArHVScaleCorrCondAlg.cxx index 7c4b510f4224ea32988ccf6240251ae6caa05aef..825822bd62c862b13ae6c5b0bab7a6654143d7e7 100644 --- a/LArCalorimeter/LArRecUtils/src/LArHVScaleCorrCondAlg.cxx +++ b/LArCalorimeter/LArRecUtils/src/LArHVScaleCorrCondAlg.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "LArHVScaleCorrCondAlg.h" @@ -30,7 +30,8 @@ LArHVScaleCorrCondAlg::LArHVScaleCorrCondAlg(const std::string& name, ISvcLocato m_larem_id(nullptr), m_larhec_id(nullptr), m_larfcal_id(nullptr), - m_electrodeID(nullptr) + m_electrodeID(nullptr), + m_calodetdescrmgr(nullptr) { m_deltatupdate = 0; @@ -56,11 +57,10 @@ StatusCode LArHVScaleCorrCondAlg::initialize() { // retrieve id helpers ATH_CHECK(detStore()->retrieve(m_lar_on_id,"LArOnlineID")); ATH_CHECK(detStore()->retrieve(m_calocell_id,"CaloCell_ID")); - ATH_CHECK(detStore()->retrieve( m_caloIdMgr )); - m_larem_id = m_caloIdMgr->getEM_ID(); - m_larhec_id = m_caloIdMgr->getHEC_ID(); - m_larfcal_id = m_caloIdMgr->getFCAL_ID(); + m_larem_id = m_calocell_id->em_idHelper(); + m_larhec_id = m_calocell_id->hec_idHelper(); + m_larfcal_id = m_calocell_id->fcal_idHelper(); ATH_CHECK(detStore()->retrieve(m_calodetdescrmgr)); diff --git a/LArCalorimeter/LArRecUtils/src/LArHVScaleCorrCondAlg.h b/LArCalorimeter/LArRecUtils/src/LArHVScaleCorrCondAlg.h index 0e31884e91051b2ebfb37a6f41023f166ded3092..da4f21cfba5cedccf1cab6c066b7e7e1584c575c 100644 --- a/LArCalorimeter/LArRecUtils/src/LArHVScaleCorrCondAlg.h +++ b/LArCalorimeter/LArRecUtils/src/LArHVScaleCorrCondAlg.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // Rewritten from LArHVScaleCorrTool @@ -15,7 +15,6 @@ #include "StoreGate/WriteCondHandleKey.h" #include "LArIdentifier/LArOnlineID.h" -#include "CaloIdentifier/CaloIdManager.h" #include "CaloIdentifier/LArID.h" #include "CaloDetDescr/CaloDetDescrManager.h" #include "LArRecConditions/LArHVData.h" @@ -53,8 +52,7 @@ class LArHVScaleCorrCondAlg: public AthAlgorithm const LArHEC_ID* m_larhec_id; const LArFCAL_ID* m_larfcal_id; const LArElectrodeID* m_electrodeID; - const DataHandle<CaloIdManager> m_caloIdMgr; - const DataHandle<CaloDetDescrManager> m_calodetdescrmgr; + const CaloDetDescrManager* m_calodetdescrmgr; SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey {this,"keyCabling", "LArOnOffIdMap", "Input key for Id mapping"} ; SG::ReadCondHandleKey<LArHVData> m_hvKey {this, "keyHVdata", "LArHVData", "Input key for HV data from DCS"}; diff --git a/LArCalorimeter/LArRecUtils/src/LArOFCTool.cxx b/LArCalorimeter/LArRecUtils/src/LArOFCTool.cxx index dd212ff648a45ab33a257c2ba94cc72c594fed19..f880811e76349f8a270feb72aa3c893a278f72f0 100644 --- a/LArCalorimeter/LArRecUtils/src/LArOFCTool.cxx +++ b/LArCalorimeter/LArRecUtils/src/LArOFCTool.cxx @@ -31,7 +31,6 @@ LArOFCTool::LArOFCTool(const std::string& type, m_lar_on_id(nullptr), m_cablingService(nullptr), m_larmcsym("LArMCSymTool"), - m_calo_id_man(nullptr), m_lar_em_id(nullptr), m_lar_hec_id(nullptr), m_lar_fcal_id(nullptr), @@ -83,16 +82,18 @@ StatusCode LArOFCTool::initialize() } //retrieves helpers for LArCalorimeter - m_calo_id_man = CaloIdManager::instance(); + const CaloCell_Base_ID* idHelper = nullptr; if ( m_isSC ) { - m_lar_em_id = m_calo_id_man->getEM_SuperCell_ID(); - m_lar_hec_id = m_calo_id_man->getHEC_SuperCell_ID(); - m_lar_fcal_id = m_calo_id_man->getFCAL_SuperCell_ID(); - } else { - m_lar_em_id = m_calo_id_man->getEM_ID(); - m_lar_hec_id = m_calo_id_man->getHEC_ID(); - m_lar_fcal_id = m_calo_id_man->getFCAL_ID(); + ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_SuperCell_ID") ); } + else { + ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_ID") ); + } + + m_lar_em_id = idHelper->em_idHelper(); + m_lar_hec_id = idHelper->hec_idHelper(); + m_lar_fcal_id = idHelper->fcal_idHelper(); + IToolSvc* toolSvc = nullptr; ATH_CHECK( service( "ToolSvc",toolSvc ) ); if ( m_isSC ) { diff --git a/LArCalorimeter/LArRecUtils/src/LArOFCTool.h b/LArCalorimeter/LArRecUtils/src/LArOFCTool.h index 92f5e8f80733ade780962ecceb0d4f61adba539c..0698de4b3fe64d3f5f92d4b627543a08b5138f75 100644 --- a/LArCalorimeter/LArRecUtils/src/LArOFCTool.h +++ b/LArCalorimeter/LArRecUtils/src/LArOFCTool.h @@ -42,7 +42,6 @@ #include "LArCabling/LArCablingBase.h" #include "LArElecCalib/ILArMCSymTool.h" #include "LArIdentifier/LArOnlineID_Base.h" -#include "CaloIdentifier/CaloIdManager.h" #include "CaloIdentifier/LArID.h" class StoreGateSvc; @@ -101,7 +100,6 @@ class LArOFCTool: public AthAlgTool, LArCablingBase* m_cablingService; ToolHandle<ILArMCSymTool> m_larmcsym; - const CaloIdManager* m_calo_id_man; const LArEM_Base_ID* m_lar_em_id; const LArHEC_Base_ID* m_lar_hec_id; const LArFCAL_Base_ID* m_lar_fcal_id; diff --git a/LArCalorimeter/LArRecUtils/src/MakeLArCellFromRaw.cxx b/LArCalorimeter/LArRecUtils/src/MakeLArCellFromRaw.cxx index ee6788a58d11ad72d57d1b15591581e508707bce..c20397cb439e890b3a1bd1461188f69379e2ac54 100644 --- a/LArCalorimeter/LArRecUtils/src/MakeLArCellFromRaw.cxx +++ b/LArCalorimeter/LArRecUtils/src/MakeLArCellFromRaw.cxx @@ -11,7 +11,6 @@ #include "CaloDetDescr/CaloDetDescrManager.h" #include "CaloDetDescr/CaloDetDescrElement.h" #include "CaloIdentifier/CaloCell_ID.h" -#include "CaloIdentifier/CaloIdManager.h" #include "CaloIdentifier/LArEM_ID.h" #include "CaloIdentifier/LArHEC_ID.h" #include "CaloIdentifier/LArFCAL_ID.h" @@ -55,7 +54,7 @@ void MakeLArCellFromRaw::initialize( const LArRoI_Map* roiMap , StatusCode sc = svcLoc->service("MessageSvc", m_msgSvc); if (sc.isFailure()) { - std::cout << "MakeLArCellFromRaw ERROR cannot retrieve MessageSvc " << std::endl; + std::cout << "MakeLArCellFromRaw ERROR cannot retrieve MessageSvc " << std::endl; return; } @@ -66,7 +65,19 @@ void MakeLArCellFromRaw::initialize( const LArRoI_Map* roiMap , if(pCorr) log <<MSG::INFO <<" Number of Corrections "<< pCorr->size()<< endmsg ; - const CaloDetDescrManager* man = CaloDetDescrManager::instance(); + StoreGateSvc* detStore = nullptr; + sc = svcLoc->service("DetectorStore", detStore); + if (sc.isFailure()) + { + log << MSG::ERROR << "MakeLArCellFromRaw ERROR cannot retrieve DetectorStore " << endmsg; + return; + } + + const CaloDetDescrManager* man = nullptr; + if ( detStore->retrieve (man, "CaloMgr").isFailure() ) { + log << MSG::ERROR << "MakeLArCellFromRaw ERROR cannot retrieve CaloMgr " << endmsg; + return; + } IToolSvc* p_toolSvc; StatusCode status = svcLoc->service( "ToolSvc",p_toolSvc ); @@ -98,25 +109,14 @@ void MakeLArCellFromRaw::initialize( const LArRoI_Map* roiMap , } - const CaloIdManager* caloCIM = man->getCalo_Mgr(); - const LArEM_ID& em_id = *( caloCIM->getEM_ID() ); - const LArHEC_ID& hec_id = *( caloCIM->getHEC_ID() ); - const LArFCAL_ID& fcal_id = *(caloCIM->getFCAL_ID() ); - -// retrive onlineID helper from detStore + const CaloCell_ID* calo_id = man->getCaloCell_ID(); + const LArEM_ID& em_id = *calo_id->em_idHelper(); + const LArHEC_ID& hec_id = *calo_id->hec_idHelper(); + const LArFCAL_ID& fcal_id = *calo_id->fcal_idHelper(); - StoreGateSvc* detStore; - if (svcLoc->service("DetectorStore", detStore).isFailure()) { - log << MSG::ERROR << "Unable to access DetectoreStoren MakeLArCellFromRaw" << endmsg ; - return; - } - -// retrieve OnlineID helper from detStore - sc = detStore->retrieve(m_onlineID, "LArOnlineID"); - if (sc.isFailure()) { - log << MSG::ERROR << "MakeLArCellFromRaw: Could not get LArOnlineID helper !" << endmsg ; - return; - } + if (detStore->retrieve(m_onlineID, "LArOnlineID").isFailure()) { + log <<MSG::ERROR << "cannot find LArOnlineID in MakeLArCellFromRaw " << endmsg; + } int n_em = 0 ; diff --git a/LArCalorimeter/LArRecUtils/src/components/LArRecUtils_entries.cxx b/LArCalorimeter/LArRecUtils/src/components/LArRecUtils_entries.cxx index b90e8dca174432c6355dc03e1bba50b985cc1883..36d0d4769eeaf1e64350091aee8f77bd269d4e75 100644 --- a/LArCalorimeter/LArRecUtils/src/components/LArRecUtils_entries.cxx +++ b/LArCalorimeter/LArRecUtils/src/components/LArRecUtils_entries.cxx @@ -11,7 +11,6 @@ #include "LArRecUtils/LArShapePeakRecoTool.h" #include "../LArTowerBuilderTool.h" #include "../LArFCalTowerBuilderTool.h" -#include "../LArFEBConfigReader.h" #include "../LArFlatConditionSvc.h" #include "../LArFCalTowerBuilderToolTestAlg.h" #include "../LArFlatConditionsAlg.h" @@ -29,6 +28,7 @@ #include "../LArHVCondAlg.h" #include "../LArHVScaleCorrCondAlg.h" #include "../LArAutoCorrNoiseCondAlg.h" +#include "../LArFEBConfigCondAlg.h" DECLARE_COMPONENT( LArADC2MeVTool ) @@ -44,7 +44,6 @@ DECLARE_COMPONENT( LArParabolaPeakRecoTool ) DECLARE_COMPONENT( LArShapePeakRecoTool ) DECLARE_COMPONENT( LArTowerBuilderTool ) DECLARE_COMPONENT( LArFCalTowerBuilderTool ) -DECLARE_COMPONENT( LArFEBConfigReader ) DECLARE_COMPONENT( LArFlatConditionSvc ) DECLARE_COMPONENT( LArFCalTowerBuilderToolTestAlg ) DECLARE_COMPONENT( LArCondAlgAutoCorrSC ) @@ -90,3 +89,4 @@ DECLARE_COMPONENT( LArOFCCondAlg ) DECLARE_COMPONENT( LArHVCondAlg ) DECLARE_COMPONENT( LArHVScaleCorrCondAlg ) DECLARE_COMPONENT( LArAutoCorrNoiseCondAlg ) +DECLARE_COMPONENT( LArFEBConfigCondAlg ) diff --git a/LArCalorimeter/LArTest/LArCalibTest/LArCalibTest/LArHVTest.h b/LArCalorimeter/LArTest/LArCalibTest/LArCalibTest/LArHVTest.h index 4c0e793f9d1f9e2fba4c76ddf441d255ccde7503..fc54eaa4cbb7fe847d67ec0ee813e4646ee44059 100644 --- a/LArCalorimeter/LArTest/LArCalibTest/LArCalibTest/LArHVTest.h +++ b/LArCalorimeter/LArTest/LArCalibTest/LArCalibTest/LArHVTest.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef LARHVTEST_H @@ -13,9 +13,8 @@ #include "StoreGate/DataHandle.h" #include "LArIdentifier/LArOnlineID.h" -#include "CaloIdentifier/CaloIdManager.h" +#include "CaloIdentifier/CaloCell_ID.h" #include "CaloIdentifier/LArID.h" -#include "CaloDetDescr/CaloDetDescrManager.h" #include "StoreGate/ReadCondHandleKey.h" #include "LArCabling/LArOnOffIdMapping.h" @@ -49,8 +48,6 @@ class LArHVTest: public AthAlgorithm const LArHEC_ID* m_larhec_id; const LArFCAL_ID* m_larfcal_id; const LArElectrodeID* m_electrodeID; - const DataHandle<CaloIdManager> m_caloIdMgr; - const DataHandle<CaloDetDescrManager> m_calodetdescrmgr; ToolHandle<ILArHVTool> m_hvtool; SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey{this, "CablingKey", "LArOnOffIdMap","Mapping key"}; diff --git a/LArCalorimeter/LArTest/LArCalibTest/src/LArCablingChecker.cxx b/LArCalorimeter/LArTest/LArCalibTest/src/LArCablingChecker.cxx index 3a279f3691b924a0a6e324d1e5fa52919f094242..90dafd43614eb4f283fd89ac715b3b6a99cbbf34 100755 --- a/LArCalorimeter/LArTest/LArCalibTest/src/LArCablingChecker.cxx +++ b/LArCalorimeter/LArTest/LArCalibTest/src/LArCablingChecker.cxx @@ -1,10 +1,10 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "LArCalibTest/LArCablingChecker.h" #include "LArRawEvent/LArDigit.h" -#include "CaloIdentifier/CaloIdManager.h" +#include "CaloIdentifier/CaloCell_ID.h" #include "LArRawConditions/LArCalibParams.h" #include "xAODEventInfo/EventInfo.h" #include <algorithm> @@ -55,9 +55,10 @@ StatusCode LArCablingChecker::initialize() { ATH_MSG_ERROR ( "Unable to open output file with name " << m_outFileName ); return StatusCode::FAILURE; } - - const CaloIdManager *caloIdMgr=CaloIdManager::instance() ; - m_emId=caloIdMgr->getEM_ID(); + + const CaloCell_ID* idHelper = nullptr; + ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_ID") ); + m_emId=idHelper->em_idHelper(); m_channelHashMax = m_onlineHelper->channelHashMax(); diff --git a/LArCalorimeter/LArTest/LArCalibTest/src/LArHVTest.cxx b/LArCalorimeter/LArTest/LArCalibTest/src/LArHVTest.cxx index 5107de16298d05d518e1fad67a306c33b72317f1..a38405bf9956f314bcb22eb72ea9affd7e62210d 100644 --- a/LArCalorimeter/LArTest/LArCalibTest/src/LArHVTest.cxx +++ b/LArCalorimeter/LArTest/LArCalibTest/src/LArHVTest.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "LArCalibTest/LArHVTest.h" @@ -49,40 +49,19 @@ StatusCode LArHVTest::initialize() { msg(MSG::ERROR) << "Unable to retrieve CaloCellID from DetectorStore" << endmsg; return StatusCode::FAILURE; } -// retrieve LArEM id helper - sc = detStore()->retrieve( m_caloIdMgr ); - if (sc.isFailure()) { - msg(MSG::ERROR) << "Unable to retrieve CaloIdMgr " << endmsg; - return sc; - } - - m_larem_id = m_caloIdMgr->getEM_ID(); - m_larhec_id = m_caloIdMgr->getHEC_ID(); - m_larfcal_id = m_caloIdMgr->getFCAL_ID(); - - sc = detStore()->retrieve(m_calodetdescrmgr); - if (sc.isFailure()) { - msg(MSG::ERROR) << "Unable to get CaloDetDescrManager" << endmsg; - return StatusCode::FAILURE; - } - - - sc=detStore()->retrieve(m_electrodeID); - if (sc.isFailure()) { - msg(MSG::ERROR) << "Unable to get LArElectrodeID helper" << endmsg; - return sc; - } - - if (m_hvtool.retrieve().isFailure()) { - msg(MSG::ERROR) << "Unable to find tool for LArHVTool" << endmsg; - return StatusCode::FAILURE; - } + const CaloCell_ID* idHelper = nullptr; + ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_ID") ); + m_larem_id = idHelper->em_idHelper(); + m_larhec_id = idHelper->hec_idHelper(); + m_larfcal_id = idHelper->fcal_idHelper(); - ATH_CHECK(m_cablingKey.initialize()); - ATH_CHECK(m_hvmapKey.initialize()); - ATH_CHECK(m_hvdataKey.initialize()); + ATH_CHECK( detStore()->retrieve(m_electrodeID) ); + ATH_CHECK( m_hvtool.retrieve() ); + ATH_CHECK( m_cablingKey.initialize() ); + ATH_CHECK( m_hvmapKey.initialize()) ; + ATH_CHECK( m_hvdataKey.initialize() ); ATH_MSG_DEBUG("LArHVTest initialize() end"); return StatusCode::SUCCESS; diff --git a/LArCalorimeter/LArTest/LArEventTest/src/DumpLArDigits.cxx b/LArCalorimeter/LArTest/LArEventTest/src/DumpLArDigits.cxx index 8b180c1c30550c3e80f767555fe6e3cee8a5bb50..bcb61b34c50abe3c73da70a3b3e2c07f7f37e7b8 100644 --- a/LArCalorimeter/LArTest/LArEventTest/src/DumpLArDigits.cxx +++ b/LArCalorimeter/LArTest/LArEventTest/src/DumpLArDigits.cxx @@ -3,7 +3,7 @@ */ #include "LArEventTest/DumpLArDigits.h" -#include "CaloIdentifier/CaloIdManager.h" +#include "CaloIdentifier/CaloCell_ID.h" #include "LArRawEvent/LArDigitContainer.h" #include "xAODEventInfo/EventInfo.h" //#include "testpack/compdigit.h" @@ -31,12 +31,9 @@ StatusCode DumpLArDigits::initialize() ATH_CHECK( detStore()->retrieve(m_onlineHelper, "LArOnlineID") ); ATH_MSG_DEBUG ( " Found the LArOnlineID helper. " ); - const CaloIdManager *caloIdMgr=CaloIdManager::instance() ; - if (!caloIdMgr) { - ATH_MSG_ERROR ( "Unable to get instance of CaloIdManager" ); - return StatusCode::FAILURE; - } - m_emId=caloIdMgr->getEM_ID(); + const CaloCell_ID* idHelper = nullptr; + ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_ID") ); + m_emId=idHelper->em_idHelper(); if (!m_emId) { ATH_MSG_ERROR ( "Unable to get EM_ID" ); return StatusCode::FAILURE; diff --git a/LArCalorimeter/LArTest/LArEventTest/src/DumpLArRawChannels.cxx b/LArCalorimeter/LArTest/LArEventTest/src/DumpLArRawChannels.cxx index 5f24d41fab9470d5980e2c39ab23493b522052ca..819ed17fae8f2b3742c0fb401852e3eb76970f16 100644 --- a/LArCalorimeter/LArTest/LArEventTest/src/DumpLArRawChannels.cxx +++ b/LArCalorimeter/LArTest/LArEventTest/src/DumpLArRawChannels.cxx @@ -3,7 +3,7 @@ */ #include "LArEventTest/DumpLArRawChannels.h" -#include "CaloIdentifier/CaloIdManager.h" +#include "CaloIdentifier/CaloCell_ID.h" #include "xAODEventInfo/EventInfo.h" //#include "testpack/compdigit.h" #include <stdlib.h> @@ -33,12 +33,9 @@ StatusCode DumpLArRawChannels::initialize() ATH_CHECK( detStore()->retrieve(m_onlineHelper, "LArOnlineID") ); ATH_MSG_DEBUG ( " Found the LArOnlineID helper. " ); - const CaloIdManager *caloIdMgr=CaloIdManager::instance() ; - if (!caloIdMgr) { - ATH_MSG_ERROR ( "Unable to get instance of CaloIdManager" ); - return StatusCode::FAILURE; - } - m_emId=caloIdMgr->getEM_ID(); + const CaloCell_ID* idHelper = nullptr; + ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_ID") ); + m_emId=idHelper->em_idHelper(); if (!m_emId) { ATH_MSG_ERROR ( "Unable to get EM_ID" ); return StatusCode::FAILURE; diff --git a/LArCalorimeter/LArTest/LArEventTest/src/FindDuplicatedLArDigits.cxx b/LArCalorimeter/LArTest/LArEventTest/src/FindDuplicatedLArDigits.cxx index 7ff71f7f3ee5a3785064042a0231d3f86d9662c8..a7d96677a6949595f6242e226fb674c089dfce16 100644 --- a/LArCalorimeter/LArTest/LArEventTest/src/FindDuplicatedLArDigits.cxx +++ b/LArCalorimeter/LArTest/LArEventTest/src/FindDuplicatedLArDigits.cxx @@ -7,7 +7,7 @@ #include "xAODEventInfo/EventInfo.h" #include "GaudiKernel/SmartDataPtr.h" -#include "CaloIdentifier/CaloIdManager.h" +#include "CaloIdentifier/CaloCell_ID.h" #include "LArRawEvent/LArDigitContainer.h" #include "LArRawEvent/LArFebHeaderContainer.h" #include "TBEvent/TBPhase.h" @@ -36,11 +36,11 @@ FindDuplicatedLArDigits::~FindDuplicatedLArDigits() StatusCode FindDuplicatedLArDigits::initialize() { - //Use CaloIdManager to access detector info - const CaloIdManager *caloIdMgr=CaloIdManager::instance() ; - m_emId=caloIdMgr->getEM_ID(); - m_fcalId=caloIdMgr->getFCAL_ID(); - m_hecId=caloIdMgr->getHEC_ID(); + const CaloCell_ID* idHelper = nullptr; + ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_ID") ); + m_emId=idHelper->em_idHelper(); + m_fcalId=idHelper->fcal_idHelper(); + m_hecId=idHelper->hec_idHelper(); if (!m_emId) { ATH_MSG_ERROR ( "Could not access lar EM ID helper" ); diff --git a/LArCalorimeter/LArTest/LArEventTest/src/LArDigitsToNtuple.cxx b/LArCalorimeter/LArTest/LArEventTest/src/LArDigitsToNtuple.cxx index af466f6886a2d15d7f9bb09938f638902f3e3857..bf0823a29dc455d025acf5e8054660238a0cd347 100644 --- a/LArCalorimeter/LArTest/LArEventTest/src/LArDigitsToNtuple.cxx +++ b/LArCalorimeter/LArTest/LArEventTest/src/LArDigitsToNtuple.cxx @@ -7,7 +7,7 @@ #include "xAODEventInfo/EventInfo.h" #include "GaudiKernel/SmartDataPtr.h" -#include "CaloIdentifier/CaloIdManager.h" +#include "CaloIdentifier/CaloCell_ID.h" #include "LArRawEvent/LArDigitContainer.h" #include "LArRawEvent/LArFebHeaderContainer.h" #include "TBEvent/TBPhase.h" @@ -53,11 +53,11 @@ LArDigitsToNtuple::~LArDigitsToNtuple() StatusCode LArDigitsToNtuple::initialize() { - //Use CaloIdManager to access detector info - const CaloIdManager *caloIdMgr=CaloIdManager::instance() ; - m_emId=caloIdMgr->getEM_ID(); - m_fcalId=caloIdMgr->getFCAL_ID(); - m_hecId=caloIdMgr->getHEC_ID(); + const CaloCell_ID* idHelper = nullptr; + ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_ID") ); + m_emId=idHelper->em_idHelper(); + m_fcalId=idHelper->fcal_idHelper(); + m_hecId=idHelper->hec_idHelper(); if (!m_emId) { ATH_MSG_ERROR ( "Could not access lar EM ID helper" ); diff --git a/LArCalorimeter/LArTest/LArEventTest/src/TriggerPatternCount.cxx b/LArCalorimeter/LArTest/LArEventTest/src/TriggerPatternCount.cxx index 6cb303ce923ec9cafcb21058fc2cde6c090bc4b6..e287ebd8cb87a3b043c061548394598100c8e248 100755 --- a/LArCalorimeter/LArTest/LArEventTest/src/TriggerPatternCount.cxx +++ b/LArCalorimeter/LArTest/LArEventTest/src/TriggerPatternCount.cxx @@ -1,12 +1,11 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "LArEventTest/TriggerPatternCount.h" #include "CaloIdentifier/CaloGain.h" #include "GaudiKernel/SmartDataPtr.h" -#include "CaloIdentifier/CaloIdManager.h" #include "TBEvent/TBTriggerPatternUnit.h" #include <fstream> #include <stdlib.h> diff --git a/LumiBlock/LumiBlockComps/LumiBlockComps/CreateLumiBlockCollectionFromFile.h b/LumiBlock/LumiBlockComps/LumiBlockComps/CreateLumiBlockCollectionFromFile.h index 59883a86d7401c9e4608fd825c311627a01fba03..db81311b0db0db1020790ce387f6fb0b12b4f9ae 100644 --- a/LumiBlock/LumiBlockComps/LumiBlockComps/CreateLumiBlockCollectionFromFile.h +++ b/LumiBlock/LumiBlockComps/LumiBlockComps/CreateLumiBlockCollectionFromFile.h @@ -29,6 +29,8 @@ #include "GaudiKernel/IIoComponent.h" #include "AthenaKernel/IOVSvcDefs.h" +#include "xAODEventInfo/EventInfo.h" + class StoreGateSvc; class CreateLumiBlockCollectionFromFile:public AthAlgorithm, virtual public IIncidentListener, @@ -50,6 +52,8 @@ public: protected: + SG::ReadHandleKey<xAOD::EventInfo> m_eventInfoKey{this,"EventInfoKey","EventInfo","RHK for EventInfo"}; + /// Fill metaDataStore and ntuples void finishUp(); diff --git a/LumiBlock/LumiBlockComps/LumiBlockComps/LumiBlockMuWriter.h b/LumiBlock/LumiBlockComps/LumiBlockComps/LumiBlockMuWriter.h deleted file mode 100644 index 17d26166e7c0b37d9d6256bdb2ee24aef373d597..0000000000000000000000000000000000000000 --- a/LumiBlock/LumiBlockComps/LumiBlockComps/LumiBlockMuWriter.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef XAOD_ANALYSIS - -/** - @class LumiBlockMuWriter - @brief Algorithm to write interactions per crossing (mu) into EventInfo - @author E.Torrence -**/ - -#ifndef LUMIBLOCKCOMPS_LumiBlockMuWriter_H -#define LUMIBLOCKCOMPS_LumiBlockMuWriter_H - -#include "AthenaBaseComps/AthAlgorithm.h" -#include "GaudiKernel/ToolHandle.h" -#include "LumiBlockComps/ILuminosityTool.h" -#include "LumiCalc/CoolQuery.h" - -#include <string> - -class LumiBlockMuWriter: public AthAlgorithm { - public: - LumiBlockMuWriter(const std::string& name, ISvcLocator* pSvcLocator); - - StatusCode initialize(); - StatusCode execute(); - StatusCode finalize(); - - private: - ToolHandle<ILuminosityTool> m_lumiTool; - - // Direct DB access properties for pileup events - bool m_writePileupEvents; // Attempt to write mu values into pileup (overlay) events. Default is FALSE - StringProperty m_lumiDatabase; - StringProperty m_lumiFolder; - StringProperty m_lumiTag; - unsigned int m_lumiChannel; - - CoolQuery* m_lumiDB; - - CoolQuery::LumiFolderData getDBLuminosity(unsigned int run, unsigned int lb); - - -}; - -#endif - -#endif - diff --git a/LumiBlock/LumiBlockComps/LumiBlockComps/LumiBlockTester.h b/LumiBlock/LumiBlockComps/LumiBlockComps/LumiBlockTester.h index 595ff38267913cb7edb3d0e13d43ccb5d39a4b85..70b759a3ef9a06b1bb825734210ff09e39760b7b 100644 --- a/LumiBlock/LumiBlockComps/LumiBlockComps/LumiBlockTester.h +++ b/LumiBlock/LumiBlockComps/LumiBlockComps/LumiBlockTester.h @@ -17,6 +17,8 @@ #include "LumiBlockComps/ITrigLivefractionTool.h" #include "LumiBlockComps/ILumiBlockMuTool.h" +#include "xAODEventInfo/EventInfo.h" + #include <string> class LumiBlockTester: public AthAlgorithm { @@ -30,7 +32,9 @@ class LumiBlockTester: public AthAlgorithm { ToolHandle<ILuminosityTool> m_lumiTool; ToolHandle<ITrigLivefractionTool> m_liveTool; ToolHandle<ILumiBlockMuTool> m_muTool; - + + SG::ReadHandleKey<xAOD::EventInfo> m_eventInfoKey{this,"EventInfoKey","EventInfo","RHK for EventInfo"}; + }; #endif diff --git a/LumiBlock/LumiBlockComps/LumiBlockComps/LuminosityTool.h b/LumiBlock/LumiBlockComps/LumiBlockComps/LuminosityTool.h index 9cd2921932cd343d680cafa52dc256c150e7a6f8..03e5054085f97f7dc761718cdd529ccc5e17b32d 100644 --- a/LumiBlock/LumiBlockComps/LumiBlockComps/LuminosityTool.h +++ b/LumiBlock/LumiBlockComps/LumiBlockComps/LuminosityTool.h @@ -29,6 +29,8 @@ #include "CoralBase/Blob.h" +#include "xAODEventInfo/EventInfo.h" + #include <string> #include <vector> #include <map> @@ -81,6 +83,8 @@ class LuminosityTool: public AthAlgTool, virtual public ILuminosityTool { private: + SG::ReadHandleKey<xAOD::EventInfo> m_eventInfoKey{this,"EventInfoKey","EventInfo","RHK for EventInfo"}; + // Callback functions virtual StatusCode updateAvgLumi(IOVSVC_CALLBACK_ARGS); virtual StatusCode updateLBLB(IOVSVC_CALLBACK_ARGS); diff --git a/LumiBlock/LumiBlockComps/LumiBlockComps/TrigLivefractionTool.h b/LumiBlock/LumiBlockComps/LumiBlockComps/TrigLivefractionTool.h index e6e15ca796804d97052b6f9385e477058e14b4a5..cf2822f09592e6c248ce342a892c13b334b9ade9 100644 --- a/LumiBlock/LumiBlockComps/LumiBlockComps/TrigLivefractionTool.h +++ b/LumiBlock/LumiBlockComps/LumiBlockComps/TrigLivefractionTool.h @@ -23,6 +23,8 @@ #include "GaudiKernel/ToolHandle.h" #include "LumiBlockComps/ILuminosityTool.h" +#include "xAODEventInfo/EventInfo.h" + #include <string> #include <vector> @@ -75,8 +77,10 @@ class TrigLivefractionTool: public AthAlgTool, virtual public ITrigLivefractionT // Flag to indicate that cached data has changed bool m_recalcLumiLivefraction; - // Tool handle for luminosity - ToolHandle<ILuminosityTool> m_lumiTool; + // Tool handle for luminosity ### NEEDS UPDTING + PublicToolHandle<ILuminosityTool> m_lumiTool{this, "LuminosityTool", ""}; + + SG::ReadHandleKey<xAOD::EventInfo> m_eventInfoKey{this,"EventInfoKey","EventInfo","RHK for EventInfo"}; // Number of turns in this lumi block unsigned int m_turnCounter; @@ -86,7 +90,7 @@ class TrigLivefractionTool: public AthAlgTool, virtual public ITrigLivefractionT std::vector<float> m_livefractionLow; // Folder name - std::string m_deadtimeFolderName; + Gaudi::Property<std::string> m_deadtimeFolderName{this,"DeadtimeFolderName", ""}; void fillVector(std::vector<float>& livevec, const coral::Blob& blob); diff --git a/LumiBlock/LumiBlockComps/share/LumiBlockMuWriterExample.py b/LumiBlock/LumiBlockComps/share/LumiBlockMuWriterExample.py deleted file mode 100644 index 1da119ea674e9b253c4d5e54e32e320c4e29c8c8..0000000000000000000000000000000000000000 --- a/LumiBlock/LumiBlockComps/share/LumiBlockMuWriterExample.py +++ /dev/null @@ -1,58 +0,0 @@ -from AthenaCommon.GlobalFlags import globalflags -from AthenaCommon.AthenaCommonFlags import athenaCommonFlags as af -af.FilesInput = [ - - "/afs/cern.ch/atlas/maxidisk/d36/lumiJuly2010/data10_7TeV.00152166.physics_MinBias.merge.AOD.r1239_p134_tid129143_00/AOD.129143._000120.pool.root.1" - - ] - -af.EvtMax=-1 # number of event to process - -#====================================================================================== - -# Adding a public version of our new tool which will read from EventInfo -from LumiBlockComps.LumiBlockCompsConf import LumiBlockMuTool -ToolSvc += LumiBlockMuTool("LumiBlockMuTool") - -from RecExConfig.RecFlags import rec -rec.AutoConfiguration = ['everything'] -rec.readRDO = False -rec.readESD = True -rec.readAOD = True -rec.doCBNT = False -rec.doWriteESD = False -rec.doWriteAOD = False -rec.doWriteTAG = False -rec.doDPD = True -rec.doFileMetaData = True - -# Output log setting -OutputLevel = INFO - -# main jobOption - must always be included -include ("RecExCommon/RecExCommon_topOptions.py") - -# add LumiCalcMuWriter, should only be done in RAW->ESD transform -from LumiBlockComps.LuminosityToolDefault import LuminosityToolDefault - -lumiTool = LuminosityToolDefault() -lumiTool.OutputLevel = DEBUG -ToolSvc += lumiTool - -from LumiBlockComps.LumiBlockCompsConf import LumiBlockMuWriter -muWriter = LumiBlockMuWriter("LumiBlockMuWriter") -muWriter.OutputLevel = DEBUG -#muWriter.LuminosityTool = ToolSvc.LuminosityTool - -from AthenaCommon.AlgSequence import AlgSequence -topSequence = AlgSequence() -topSequence += muWriter - -# this switches off performance monitoring ntuples creation -from PerfMonComps.PerfMonFlags import jobproperties as jp -jp.PerfMonFlags.doMonitoring = False -jp.PerfMonFlags.doFastMon = False - - - - diff --git a/LumiBlock/LumiBlockComps/share/LumiBlockMuWriter_jobOptions.py b/LumiBlock/LumiBlockComps/share/LumiBlockMuWriter_jobOptions.py deleted file mode 100644 index 0bf9391c7ac7096c853f9b0b0b017440162e234d..0000000000000000000000000000000000000000 --- a/LumiBlock/LumiBlockComps/share/LumiBlockMuWriter_jobOptions.py +++ /dev/null @@ -1,28 +0,0 @@ -""" Configuration for LumiBlockMuWriter to write mu from LumiDB into EventInfo -""" -# -# -__author__ = 'E.Torrrence' -# -# -# Configure folder access - -from LumiBlockComps.LuminosityToolDefault import LuminosityToolDefault -lumiTool = LuminosityToolDefault() # Also configures DB -# lumiTool.OutputLevel = DEBUG -from AthenaCommon.AppMgr import ToolSvc -ToolSvc += lumiTool - -# Configure MuWriter algorithm -from LumiBlockComps.LumiBlockCompsConf import LumiBlockMuWriter -muWriter = LumiBlockMuWriter("LumiBlockMuWriter") -muWriter.LuminosityTool = lumiTool; -#muWriter.PileupLuminosityTag = "OflLumi-UPD2-005" - -# muWriter.OutputLevel = DEBUG - -# Add this to the top-level sequence -from AthenaCommon.AlgSequence import AlgSequence -topSequence = AlgSequence() -topSequence += muWriter - diff --git a/LumiBlock/LumiBlockComps/src/CreateLumiBlockCollectionFromFile.cxx b/LumiBlock/LumiBlockComps/src/CreateLumiBlockCollectionFromFile.cxx index c79607ea0e65aa93f9c318ca1a1867a9fc56c1d2..d2784caa27b225a0002b2887ead45339fd73000c 100644 --- a/LumiBlock/LumiBlockComps/src/CreateLumiBlockCollectionFromFile.cxx +++ b/LumiBlock/LumiBlockComps/src/CreateLumiBlockCollectionFromFile.cxx @@ -7,8 +7,6 @@ #include "GaudiKernel/ISvcLocator.h" #include "GaudiKernel/IIncidentSvc.h" #include "GaudiKernel/IIoComponentMgr.h" -#include "EventInfo/EventInfo.h" -#include "EventInfo/EventID.h" #include "StoreGate/StoreGateSvc.h" #include "xAODLuminosity/LumiBlockRangeContainer.h" @@ -37,7 +35,9 @@ StatusCode CreateLumiBlockCollectionFromFile::initialize(){ //******************************************************* ATH_MSG_INFO( "initialize() and create listeners" ); - + + ATH_CHECK(m_eventInfoKey.initialize()); + // Locate the StoreGateSvc and initialize our local ptr // **************************************************** ATH_CHECK( m_metaStore.retrieve() ); @@ -82,30 +82,36 @@ StatusCode CreateLumiBlockCollectionFromFile::execute() { ATH_MSG_VERBOSE( "execute()" ); // Check for event header - const DataHandle<EventInfo> evt; - ATH_CHECK( evtStore()->retrieve(evt) ); - if(m_lastRun!=evt->event_ID()->run_number() || - m_lastLumiBlock!=evt->event_ID()->lumi_block()) { - - IOVTime iovtime(evt->event_ID()->run_number(),evt->event_ID()->lumi_block()); - RLBMap::iterator mitr; - mitr=m_LumiBlockInfo.find(iovtime); - if (mitr==m_LumiBlockInfo.end()) { - ATH_MSG_INFO( "Fill LumiBlockInfo with numExpected="<<m_numExpected ); - inOut lbInOut(m_numExpected,1); - m_LumiBlockInfo[iovtime] = lbInOut; - } - else { - m_LumiBlockInfo[iovtime].second++; - } - - m_lastRun=evt->event_ID()->run_number(); - m_lastLumiBlock=evt->event_ID()->lumi_block(); - m_lastIOVTime=iovtime; - } - else { - m_LumiBlockInfo[m_lastIOVTime].second++; - } + SG::ReadHandle<xAOD::EventInfo> evt(m_eventInfoKey); + + // check is only useful for serial running; remove when MT scheduler used + if(!evt.isValid()) { + ATH_MSG_FATAL("Failed to retrieve "<< m_eventInfoKey.key()); + return StatusCode::FAILURE; + } + + if(m_lastRun!=evt->runNumber() || + m_lastLumiBlock!=evt->lumiBlock()) { + + IOVTime iovtime(evt->runNumber(),evt->lumiBlock()); + RLBMap::iterator mitr; + mitr=m_LumiBlockInfo.find(iovtime); + if (mitr==m_LumiBlockInfo.end()) { + ATH_MSG_INFO( "Fill LumiBlockInfo with numExpected="<<m_numExpected ); + inOut lbInOut(m_numExpected,1); + m_LumiBlockInfo[iovtime] = lbInOut; + } + else { + m_LumiBlockInfo[iovtime].second++; + } + + m_lastRun=evt->runNumber(); + m_lastLumiBlock=evt->lumiBlock(); + m_lastIOVTime=iovtime; + } + else { + m_LumiBlockInfo[m_lastIOVTime].second++; + } return (StatusCode::SUCCESS); } diff --git a/LumiBlock/LumiBlockComps/src/LumiBlockMuWriter.cxx b/LumiBlock/LumiBlockComps/src/LumiBlockMuWriter.cxx deleted file mode 100644 index 0d66d9f135eff30603a131ed46ca076ec690329e..0000000000000000000000000000000000000000 --- a/LumiBlock/LumiBlockComps/src/LumiBlockMuWriter.cxx +++ /dev/null @@ -1,161 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "LumiBlockComps/LumiBlockMuWriter.h" - -#include "EventInfo/EventID.h" -#include "EventInfo/EventInfo.h" -#include "EventInfo/PileUpEventInfo.h" - -#include "GaudiKernel/MsgStream.h" -#include "AthenaKernel/errorcheck.h" - -//-------------------------------------------------- -LumiBlockMuWriter::LumiBlockMuWriter(const std::string& name, ISvcLocator* pSvcLocator): - AthAlgorithm(name,pSvcLocator), - m_lumiTool("LuminosityTool"), - m_writePileupEvents(false), - m_lumiDatabase("COOLOFL_TRIGGER/COMP200"), - m_lumiFolder("/TRIGGER/OFLLUMI/LBLESTOFL"), - m_lumiTag("OflLumi-UPD2-005"), - m_lumiChannel(0), - m_lumiDB(NULL) -{ - declareProperty("LuminosityTool", m_lumiTool); - declareProperty("WritePileupEvents", m_writePileupEvents); - declareProperty("PileupLuminosityDatabase", m_lumiDatabase); - declareProperty("PileupLuminosityFolder", m_lumiFolder); - declareProperty("PileupLuminosityTag", m_lumiTag); - declareProperty("PileupLuminosityChannel", m_lumiChannel); -} - -StatusCode -LumiBlockMuWriter::initialize() -{ - ATH_MSG_INFO("LumiBlockMuWriter::initialize()"); - - // Get the luminosity tool - CHECK(m_lumiTool.retrieve()); - - ATH_MSG_INFO("LumiBlockMuWriter::initialize() done"); - - return StatusCode::SUCCESS; -} - -StatusCode -LumiBlockMuWriter::execute() -{ - ATH_MSG_DEBUG("LumiBlockMuWriter::execute()"); - - const EventInfo* eventInfo_c=0; - CHECK(evtStore()->retrieve(eventInfo_c)); - - unsigned int lumiblock = eventInfo_c->event_ID()->lumi_block(); - ATH_MSG_DEBUG(" lumiblock " << lumiblock); - - // Try to write mu back into EventInfo - EventInfo* eventInfo=0; - eventInfo = const_cast<EventInfo*>(eventInfo_c); - - if (eventInfo) { - - // float avgmu = m_muToolDB->averageInteractionsPerCrossing(); - // float instmu = m_muToolDB->actualInteractionsPerCrossing(); - - float avgmu = m_lumiTool->lbAverageInteractionsPerCrossing(); - float instmu = 0.; - - if (m_lumiTool->muToLumi() > 0.) - instmu = m_lumiTool->lbLuminosityPerBCID()/m_lumiTool->muToLumi(); - - eventInfo->setAverageInteractionsPerCrossing(avgmu); - eventInfo->setActualInteractionsPerCrossing(instmu); - - ATH_MSG_DEBUG(" called eventInfo::setAverageInteractionsPerCrossing("<<avgmu<<")"); - ATH_MSG_DEBUG(" called eventInfo::setActualInteractionsPerCrossing("<<instmu<<")"); - - // Some debugging - // float lbTime = m_lumiTool->lbDuration(); - // ATH_MSG_DEBUG(" lbtime: " << lbTime); - - } else { - ATH_MSG_WARNING(" cannot get non-const eventInfo pointer! "); - } - - if (m_writePileupEvents) { - - // Also try to write pile-up event info if it exists - const PileUpEventInfo* puEventInfo_c = 0; - CHECK(evtStore()->retrieve(puEventInfo_c)); - - PileUpEventInfo::SubEvent::const_iterator s = puEventInfo_c->beginSubEvt(); - while (s != puEventInfo_c->endSubEvt()) { - if (s->type()==4){ // Zero bias events, only ones with 'luminosity' - - unsigned int run = s->pSubEvt->event_ID()->run_number(); - unsigned int lb = s->pSubEvt->event_ID()->lumi_block(); - ATH_MSG_INFO("ACH9 sub event of type 4 with run/lb:" << run << "/" << lb); - - CoolQuery::LumiFolderData lumi = this->getDBLuminosity(run, lb); - - // And write this into the pileup event header - s->pSubEvt->setAverageInteractionsPerCrossing(lumi.LBAvEvtsPerBX); - - } - ++s; - } - } - - ATH_MSG_DEBUG("LumiBlockMuWriter::execute() done"); - return StatusCode::SUCCESS; -} - -// Hack to access offline luminosity folder for arbitrary run/LB IOV -CoolQuery::LumiFolderData -LumiBlockMuWriter::getDBLuminosity(unsigned int run, unsigned int lb) { - - CoolQuery::LumiFolderData lumi; - - // First check if we have a DB connection established - if (m_lumiDB == NULL) { - m_lumiDB = new CoolQuery(m_lumiDatabase, std::string()); - if (!m_lumiDB->openDbConn()) { - ATH_MSG_WARNING(" failed to open luminosity DB folder " << m_lumiDatabase); - delete m_lumiDB; - return lumi; - } - } - - // Specify the IOV - cool::ValidityKey start = run; - start = (start<<32)+lb; - cool::ValidityKey end = run; - end = (end<<32) + lb + 1; - - m_lumiDB->setIOV(start, end); - - // And read the data - std::map<cool::ValidityKey, CoolQuery::LumiFolderData> lumiDataMap; - lumiDataMap.clear(); - lumiDataMap = m_lumiDB->getLumiFolderData(m_lumiFolder, m_lumiTag, m_lumiChannel); - if (lumiDataMap.find(start) == lumiDataMap.end()) { - // Didn't find our IOV - ATH_MSG_WARNING(" failed to find luminosity for run/LB: " << run << "/" << lb); - } - - return lumiDataMap[start]; // Will create default LumiFolderData if not found -} - -StatusCode -LumiBlockMuWriter::finalize() -{ - ATH_MSG_DEBUG("LumiBlockMuWriter::finalize()"); - - if (m_lumiDB != NULL) delete m_lumiDB; - - ATH_MSG_INFO("LumiBlockMuWriter::finalize() done"); - - return StatusCode::SUCCESS; -} - diff --git a/LumiBlock/LumiBlockComps/src/LumiBlockTester.cxx b/LumiBlock/LumiBlockComps/src/LumiBlockTester.cxx index 00e820711a3d8041f826d838075cb24d7de0c929..db311e023f6f0ff15edac91913b7a30f27ad435c 100644 --- a/LumiBlock/LumiBlockComps/src/LumiBlockTester.cxx +++ b/LumiBlock/LumiBlockComps/src/LumiBlockTester.cxx @@ -3,8 +3,6 @@ */ #include "LumiBlockComps/LumiBlockTester.h" -#include "EventInfo/EventID.h" -#include "EventInfo/EventInfo.h" #include "GaudiKernel/MsgStream.h" #include "AthenaKernel/errorcheck.h" @@ -25,6 +23,8 @@ LumiBlockTester::initialize() { ATH_MSG_INFO("LumiBlockTester::initialize()"); + ATH_CHECK(m_eventInfoKey.initialize()); + // Get the luminosity tool CHECK(m_lumiTool.retrieve()); @@ -44,11 +44,16 @@ LumiBlockTester::execute() { ATH_MSG_DEBUG("LumiBlockTester::execute()"); - const EventInfo* eventInfo_c=0; - CHECK(evtStore()->retrieve(eventInfo_c)); + SG::ReadHandle<xAOD::EventInfo> eventInfo(m_eventInfoKey); + + // only there for serial running; remove when only doing MT + if(!eventInfo.isValid()) { + ATH_MSG_FATAL("Failed to retrieve "<< m_eventInfoKey.key()); + return StatusCode::FAILURE; + } - unsigned int lumiblock = eventInfo_c->event_ID()->lumi_block(); - unsigned int bcid = eventInfo_c->event_ID()->bunch_crossing_id(); + unsigned int lumiblock = eventInfo->lumiBlock(); + unsigned int bcid = eventInfo->bcid(); ATH_MSG_DEBUG(" lumiblock " << lumiblock << " BCID " << bcid); @@ -69,8 +74,6 @@ LumiBlockTester::execute() instmu = m_muTool->actualInteractionsPerCrossing(); ATH_MSG_INFO( "From muTool - <mu>: " << avgmu << " mu: " << instmu); - const EventInfo* eventInfo; - CHECK(evtStore()->retrieve(eventInfo)); instmu = eventInfo->actualInteractionsPerCrossing(); avgmu = eventInfo->averageInteractionsPerCrossing(); ATH_MSG_INFO( "From EvInfo - <mu>: " << avgmu << " mu: " << instmu); diff --git a/LumiBlock/LumiBlockComps/src/LuminosityTool.cxx b/LumiBlock/LumiBlockComps/src/LuminosityTool.cxx index 1af08217284b58e456e44df3848939be47107bee..bae3a202df4805d2e305d663149925655efaa5da 100644 --- a/LumiBlock/LumiBlockComps/src/LuminosityTool.cxx +++ b/LumiBlock/LumiBlockComps/src/LuminosityTool.cxx @@ -6,10 +6,6 @@ #include "LumiBlockComps/LuminosityTool.h" -#include "EventInfo/EventID.h" -#include "EventInfo/EventInfo.h" -#include "EventInfo/EventType.h" - #include "CoolKernel/IObject.h" #include "AthenaPoolUtilities/CondAttrListCollection.h" #include "AthenaPoolUtilities/AthenaAttributeList.h" @@ -70,6 +66,8 @@ LuminosityTool::initialize() { ATH_MSG_DEBUG("LuminosityTool::initialize() begin"); + ATH_CHECK(m_eventInfoKey.initialize()); + ATH_MSG_INFO("LuminosityTool::initialize() registering " << m_lumiFolderName); // In addition to local, private callback functions, also set up callbacks to updateCache any time @@ -206,16 +204,16 @@ LuminosityTool::lbLuminosityPerBCIDVector() { float LuminosityTool::lbLuminosityPerBCID() { - const EventInfo* eventInfo; - StatusCode sc = evtStore()->retrieve(eventInfo); - if (sc.isFailure()) { - ATH_MSG_WARNING( "Cannot access event info " ); - return 0.; + SG::ReadHandle<xAOD::EventInfo> eventInfo(m_eventInfoKey); + // check is only useful for serial running; remove when MT scheduler used + if(!eventInfo.isValid()) { + ATH_MSG_FATAL("Failed to retrieve "<< m_eventInfoKey.key()); + return 0; } - float lumi = lbLuminosityPerBCID(eventInfo->event_ID()->bunch_crossing_id()); + float lumi = lbLuminosityPerBCID(eventInfo->bcid()); - ATH_MSG_DEBUG( "From DB, LB " << eventInfo->event_ID()->lumi_block() << " bcid " << eventInfo->event_ID()->bunch_crossing_id() << " -> " << lumi << " ub-1 s-1" ); + ATH_MSG_DEBUG( "From DB, LB " << eventInfo->lumiBlock() << " bcid " << eventInfo->bcid() << " -> " << lumi << " ub-1 s-1" ); return lumi; } diff --git a/LumiBlock/LumiBlockComps/src/TrigLivefractionTool.cxx b/LumiBlock/LumiBlockComps/src/TrigLivefractionTool.cxx index 755aa746d3c4241f104ff3f6dacd8e88e16619b6..947349c6c085dcb8678d3491ffca22e0fa61d64b 100644 --- a/LumiBlock/LumiBlockComps/src/TrigLivefractionTool.cxx +++ b/LumiBlock/LumiBlockComps/src/TrigLivefractionTool.cxx @@ -4,10 +4,6 @@ #include "LumiBlockComps/TrigLivefractionTool.h" -#include "EventInfo/EventID.h" -#include "EventInfo/EventInfo.h" -#include "EventInfo/EventType.h" - #include "AthenaPoolUtilities/AthenaAttributeList.h" #include "AthenaKernel/errorcheck.h" @@ -22,15 +18,11 @@ TrigLivefractionTool::TrigLivefractionTool(const std::string& type, const IInterface* parent) : AthAlgTool(type, name, parent), m_recalcLumiLivefraction(true), - m_lumiTool(""), // "LuminosityTool"), m_turnCounter(0), - m_deadtimeFolderName(""), // "/TRIGGER/LUMI/PerBcidDeadtime"), m_lumiLiveFractionLo(1.), m_lumiLiveFractionHi(1.) { declareInterface<ITrigLivefractionTool>(this); - declareProperty("DeadtimeFolderName", m_deadtimeFolderName); - declareProperty("LuminosityTool", m_lumiTool); // Initialize to 1 so we don't have divide by zero if there is no data m_livefractionHigh = std::vector<float>(TOTAL_LHC_BCIDS, 1.); @@ -41,6 +33,7 @@ StatusCode TrigLivefractionTool::initialize() { ATH_MSG_DEBUG("TrigLivefractionTool::initialize() begin"); + ATH_CHECK(m_eventInfoKey.initialize()); if (m_deadtimeFolderName.empty()) { // May not be configured, could be OK @@ -110,16 +103,17 @@ TrigLivefractionTool::l1LivefractionVector(bool highPriority) const { float TrigLivefractionTool::livefractionPerBCID(bool highPriority) const { - const EventInfo* eventInfo; - StatusCode sc = evtStore()->retrieve(eventInfo); - if (sc.isFailure()) { - ATH_MSG_WARNING( "Cannot access event info " ); - return 0.; + SG::ReadHandle<xAOD::EventInfo> eventInfo(m_eventInfoKey); + + // check is only useful for serial running; remove when MT scheduler used + if(!eventInfo.isValid()) { + ATH_MSG_FATAL("Failed to retrieve "<< m_eventInfoKey.key()); + return 0; } - float frac = livefractionPerBCID(eventInfo->event_ID()->bunch_crossing_id(), highPriority); + float frac = livefractionPerBCID(eventInfo->bcid(), highPriority); - ATH_MSG_DEBUG( "LB " << eventInfo->event_ID()->lumi_block() << " bcid " << eventInfo->event_ID()->bunch_crossing_id() << " -> Livefrac = " << frac << " for highPriority = " << highPriority); + ATH_MSG_DEBUG( "LB " << eventInfo->lumiBlock() << " bcid " << eventInfo->bcid() << " -> Livefrac = " << frac << " for highPriority = " << highPriority); return frac; } diff --git a/LumiBlock/LumiBlockComps/src/components/LumiBlockComps_entries.cxx b/LumiBlock/LumiBlockComps/src/components/LumiBlockComps_entries.cxx index b1a196e09d667425bf98b54db8317e3635e96237..780dd362d12a5697d932c2c91e1f2467312a467c 100644 --- a/LumiBlock/LumiBlockComps/src/components/LumiBlockComps_entries.cxx +++ b/LumiBlock/LumiBlockComps/src/components/LumiBlockComps_entries.cxx @@ -8,14 +8,12 @@ #include "LumiBlockComps/LuminosityTool.h" #include "LumiBlockComps/TrigLivefractionTool.h" #include "LumiBlockComps/LumiCalcSvc.h" -#include "LumiBlockComps/LumiBlockMuWriter.h" #include "LumiBlockComps/LumiBlockTester.h" #endif DECLARE_COMPONENT( CreateLumiBlockCollectionFromFile ) //DECLARE_COMPONENT( CreateAANTFromLumiBlockCollection ) #ifndef XAOD_ANALYSIS -DECLARE_COMPONENT( LumiBlockMuWriter ) DECLARE_COMPONENT( LumiBlockTester ) DECLARE_COMPONENT( LumiBlockMuTool ) DECLARE_COMPONENT( LuminosityTool ) diff --git a/MuonSpectrometer/MuonAlignment/MuonAlignError/MuonAlignErrorTool/CMakeLists.txt b/MuonSpectrometer/MuonAlignment/MuonAlignError/MuonAlignErrorTool/CMakeLists.txt index 44ece2d7c242972c4f713e377a42ae1f72a2fca2..0727b257a3c48a13827f0fc27880aa5f911fe94e 100644 --- a/MuonSpectrometer/MuonAlignment/MuonAlignError/MuonAlignErrorTool/CMakeLists.txt +++ b/MuonSpectrometer/MuonAlignment/MuonAlignError/MuonAlignErrorTool/CMakeLists.txt @@ -27,6 +27,7 @@ atlas_depends_on_subdirs( PUBLIC find_package( Boost COMPONENTS filesystem thread system ) find_package( Eigen ) find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread MathMore Minuit Minuit2 Matrix Physics HistPainter Rint ) +find_package( cx_Oracle ) # Component(s) in the package: atlas_add_component( MuonAlignErrorTool diff --git a/MuonSpectrometer/MuonCalib/CscCalib/CscCalibTools/CscCalibTools/ICscCalibTool.h b/MuonSpectrometer/MuonCalib/CscCalib/CscCalibTools/CscCalibTools/ICscCalibTool.h index ac325341b247a630c6a95274b8e35e86118c425f..410ef527bbb0cf748046700c770f8b019f694078 100644 --- a/MuonSpectrometer/MuonCalib/CscCalib/CscCalibTools/CscCalibTools/ICscCalibTool.h +++ b/MuonSpectrometer/MuonCalib/CscCalib/CscCalibTools/CscCalibTools/ICscCalibTool.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef MUONCALIBTOOLS_ICSCCALIBTOOL @@ -11,7 +11,7 @@ Author : Ketevi A. Assamagan Created : March 2005 - DESCRIPTION: + DESCRIPTION: Abstract interface for run CSC calibration tools. Theses need the conditions data. The Tools to write and read the conditions data are elsewhere *********************************************************************************/ @@ -21,85 +21,83 @@ #include <vector> -static const InterfaceID IID_IICscCalibTool("ICscCalibTool", 1, 0); - class ICscCalibTool : virtual public IAlgTool { - public: - - static const InterfaceID& interfaceID(); - - /** given a charge on the CSC strip, convert that to ADC counts - this is needed in the digitization for example where it is the charges - on the strips that are simulated first and converter to AOD samples in - a subsequent step. */ - virtual int femtoCoulombToADCCount (uint32_t stripHashId, const double femtoCoulombs) const = 0; - - /** Here the charge on the CSC strip is given in number of equivalent electrons; - conversion to ADC counts */ - virtual int numberOfElectronsToADCCount(uint32_t stripHashId, const int numberOfElecEquiv) const = 0; - - /** given one CSC ADC sample value, convert that to charge in femtoCoulomb */ - virtual double adcCountToFemtoCoulomb (const float adcValue, const float slope) const = 0; - virtual double adcCountToFemtoCoulomb (uint32_t stripHashId, const float adcValue) const = 0; - - /** given one CSC ADC sample value, convert that to charge in number of equivalent electrons */ - virtual double adcCountToNumberOfElectrons (const float adcValue, const float slope) const = 0; - virtual double adcCountToNumberOfElectrons (uint32_t stripHashId, const float adcValue) const = 0; - - /** Conversion of ADC value to charge - - Here the charges is returned in numbers of equivalent electrons */ - virtual bool adcToCharge(const std::vector<uint16_t>& samples, uint32_t stripHashId, - std::vector<float>& charges) const = 0; - - /** Given sampling values for a CSC strip, find the corresponding charge by fitting the time - samples. By default, a parabolic fit is done. The charge and the time are returned. - The time is calculated with respect to the time of the first sample */ - virtual bool findCharge(const float samplingTime, const unsigned int samplingPhase, - const std::vector<float>& samples, double & charge, double & time) const = 0; - - /** return the noise (sigma) on the readout strip in ADC counts or Number of Electrons - - number of electrons by default: convert=true */ - virtual double stripNoise ( uint32_t stripHashId, const bool convert=true ) const = 0; - - /** return the RMS on the readout strip in ADC counts or Number of Electrons - - number of electrons by default: convert=true */ - virtual double stripRMS ( uint32_t stripHashId, const bool convert=true ) const = 0; - - /** return the F001 on the readout strip in ADC counts or Number of Electrons - - number of electrons by default: convert=true */ - virtual double stripF001 ( uint32_t stripHashId, const bool convert=true ) const = 0; - - /** return the pedestal on the readout strip in ADC counts or Number of Electrons - - in number of electrons by default: convert=true */ - virtual double stripPedestal ( uint32_t stripHashId, const bool convert=true ) const = 0; - - /** return the status of this strip, good channel, dead channel, noisy channel - - it will return true for strip that working fine, false is returned for dead/noisy channels */ - virtual bool isGood ( uint32_t stripHashId ) const = 0; - virtual int stripStatusBit ( uint32_t stripHashId ) const =0; - - /** these function used in the AOD <-> conversion; may not be needed once we integrate the calibration - service */ - virtual double func (const double x, const float slope) const = 0; - virtual double func_prime (const double x, const float slope) const = 0; - - virtual double signal (const double z) const=0; - virtual double signal_amplitude (const double driftTime, const double samplingTime) const=0; - virtual double getZ0() const=0; - virtual double getSamplingTime() const=0; - virtual double getSignalWidth() const=0; - virtual double getTimeOffset() const=0; - virtual double getNumberOfIntegration() const=0; - virtual double getNumberOfIntegration2() const=0; - - virtual bool stripT0phase ( uint32_t stripHashId ) const =0; - virtual double stripT0base ( uint32_t stripHashId ) const =0; - - - virtual std::pair<double,double> addBipfunc(const double driftTime0, const double stripCharge0, +public: + + DeclareInterfaceID(ICscCalibTool, 1, 0); + + /** given a charge on the CSC strip, convert that to ADC counts + this is needed in the digitization for example where it is the charges + on the strips that are simulated first and converter to AOD samples in + a subsequent step. */ + virtual int femtoCoulombToADCCount (uint32_t stripHashId, const double femtoCoulombs) const = 0; + + /** Here the charge on the CSC strip is given in number of equivalent electrons; + conversion to ADC counts */ + virtual int numberOfElectronsToADCCount(uint32_t stripHashId, const int numberOfElecEquiv) const = 0; + + /** given one CSC ADC sample value, convert that to charge in femtoCoulomb */ + virtual double adcCountToFemtoCoulomb (const float adcValue, const float slope) const = 0; + virtual double adcCountToFemtoCoulomb (uint32_t stripHashId, const float adcValue) const = 0; + + /** given one CSC ADC sample value, convert that to charge in number of equivalent electrons */ + virtual double adcCountToNumberOfElectrons (const float adcValue, const float slope) const = 0; + virtual double adcCountToNumberOfElectrons (uint32_t stripHashId, const float adcValue) const = 0; + + /** Conversion of ADC value to charge - + Here the charges is returned in numbers of equivalent electrons */ + virtual bool adcToCharge(const std::vector<uint16_t>& samples, uint32_t stripHashId, + std::vector<float>& charges) const = 0; + + /** Given sampling values for a CSC strip, find the corresponding charge by fitting the time + samples. By default, a parabolic fit is done. The charge and the time are returned. + The time is calculated with respect to the time of the first sample */ + virtual bool findCharge(const float samplingTime, const unsigned int samplingPhase, + const std::vector<float>& samples, double & charge, double & time) const = 0; + + /** return the noise (sigma) on the readout strip in ADC counts or Number of Electrons + - number of electrons by default: convert=true */ + virtual double stripNoise ( uint32_t stripHashId, const bool convert=true ) const = 0; + + /** return the RMS on the readout strip in ADC counts or Number of Electrons + - number of electrons by default: convert=true */ + virtual double stripRMS ( uint32_t stripHashId, const bool convert=true ) const = 0; + + /** return the F001 on the readout strip in ADC counts or Number of Electrons + - number of electrons by default: convert=true */ + virtual double stripF001 ( uint32_t stripHashId, const bool convert=true ) const = 0; + + /** return the pedestal on the readout strip in ADC counts or Number of Electrons + - in number of electrons by default: convert=true */ + virtual double stripPedestal ( uint32_t stripHashId, const bool convert=true ) const = 0; + + /** return the status of this strip, good channel, dead channel, noisy channel - + it will return true for strip that working fine, false is returned for dead/noisy channels */ + virtual bool isGood ( uint32_t stripHashId ) const = 0; + virtual int stripStatusBit ( uint32_t stripHashId ) const =0; + + /** these function used in the AOD <-> conversion; may not be needed once we integrate the calibration + service */ + virtual double func (const double x, const float slope) const = 0; + virtual double func_prime (const double x, const float slope) const = 0; + + virtual double signal (const double z) const=0; + virtual double signal_amplitude (const double driftTime, const double samplingTime) const=0; + virtual double getZ0() const=0; + virtual double getSamplingTime() const=0; + virtual double getSignalWidth() const=0; + virtual double getTimeOffset() const=0; + virtual double getNumberOfIntegration() const=0; + virtual double getNumberOfIntegration2() const=0; + + virtual bool stripT0phase ( uint32_t stripHashId ) const =0; + virtual double stripT0base ( uint32_t stripHashId ) const =0; + + + virtual std::pair<double,double> addBipfunc(const double driftTime0, const double stripCharge0, const double driftTime1, const double stripCharge1) const =0; - virtual std::string getDetDescr() const =0; + virtual std::string getDetDescr() const =0; virtual std::vector<float> getSamplesFromBipolarFunc(const double driftTime0, const double stripCharge0) const =0; virtual double getLatency() const =0; @@ -108,12 +106,4 @@ protected: }; -inline const InterfaceID& ICscCalibTool::interfaceID() { - return IID_IICscCalibTool; -} - #endif // MUONCALIBTOOLS_ICSCCALIBTOOL - - - - diff --git a/MuonSpectrometer/MuonCalib/CscCalib/CscCalibTools/src/CscCalibTool.cxx b/MuonSpectrometer/MuonCalib/CscCalib/CscCalibTools/src/CscCalibTool.cxx index 8e83524fe0a99a78bdbb70eae1b25d7c4abd3d4e..9caf26b6e67dd82e6c75079d31a997290b27e573 100644 --- a/MuonSpectrometer/MuonCalib/CscCalib/CscCalibTools/src/CscCalibTool.cxx +++ b/MuonSpectrometer/MuonCalib/CscCalib/CscCalibTools/src/CscCalibTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /** Author: Ketevi A. Assamagan */ @@ -17,11 +17,9 @@ using std::setw; CscCalibTool::CscCalibTool ( const std::string& t, const std::string& n, const IInterface* p ) - : AthAlgTool(t,n,p), + : base_class(t,n,p), m_cscCoolStrSvc("MuonCalib::CscCoolStrSvc", n) { - declareInterface<ICscCalibTool>(this); - declareProperty( "Slope", m_slope = 0.19 ); declareProperty( "Noise", m_noise = 3.5 ); declareProperty( "Pedestal", m_pedestal = 2048.0 ); @@ -45,14 +43,6 @@ CscCalibTool::CscCalibTool declareProperty( "Use2Samples", m_use2Samples = false); // force 2 sample } -CscCalibTool::~CscCalibTool() {} - -StatusCode CscCalibTool::finalize() { - return StatusCode::SUCCESS; -} - - - // ROOT USER Function Double_t bipfunc(const Double_t *x, const Double_t *par){ if (x[0] < par[1]) return 0.; diff --git a/MuonSpectrometer/MuonCalib/CscCalib/CscCalibTools/src/CscCalibTool.h b/MuonSpectrometer/MuonCalib/CscCalib/CscCalibTools/src/CscCalibTool.h index e3c46795db208aa1cf901f07f8f72a526345a03f..94db810e3919bc9586c9dd3c698bf0ff099631ea 100644 --- a/MuonSpectrometer/MuonCalib/CscCalib/CscCalibTools/src/CscCalibTool.h +++ b/MuonSpectrometer/MuonCalib/CscCalib/CscCalibTools/src/CscCalibTool.h @@ -11,8 +11,8 @@ Author : Ketevi A. Assamagan Created : March 2005 - DESCRIPTION: - This class is the base class for run time CSC calibration tools. + DESCRIPTION: + This class is the base class for run time CSC calibration tools. These calibration tools need theCSC conditions data. The conditions data are written and read with a different set of tools. The production of the conditions data can be done via ATHENA or standalone @@ -30,88 +30,87 @@ #include "TH1.h" -class CscCalibTool : virtual public ICscCalibTool, public AthAlgTool { +class CscCalibTool : public extends<AthAlgTool, ICscCalibTool> { public: CscCalibTool(const std::string&, const std::string&, const IInterface*); - virtual ~CscCalibTool (); - - virtual StatusCode initialize(); - virtual StatusCode finalize (); - + virtual ~CscCalibTool () = default; + + virtual StatusCode initialize() override final; + /** given a charge on the CSC strip, convert that to ADC counts this is needed in the digitization for example where it is the charges on the strips that are simulated first and converter to AOD samples in a subsequent step. */ - virtual int femtoCoulombToADCCount (uint32_t stripHashId, const double femtoCoulombs) const ; - + virtual int femtoCoulombToADCCount (uint32_t stripHashId, const double femtoCoulombs) const override final; + /** Here the charge on the CSC strip is given in number of equivalent electrons; conversion to ADC counts */ - virtual int numberOfElectronsToADCCount(uint32_t stripHashId, const int numberOfElecEquiv) const ; - - /** given one CSC ADC sample value, convert that to charge in femtoCoulomb */ - virtual double adcCountToFemtoCoulomb (const float adcCounts, const float slope) const ; - virtual double adcCountToFemtoCoulomb (uint32_t stripHashId, const float adcCounts) const; - + virtual int numberOfElectronsToADCCount(uint32_t stripHashId, const int numberOfElecEquiv) const override final; + + /** given one CSC ADC sample value, convert that to charge in femtoCoulomb */ + virtual double adcCountToFemtoCoulomb (const float adcCounts, const float slope) const override final; + virtual double adcCountToFemtoCoulomb (uint32_t stripHashId, const float adcCounts) const override final; + /** given one CSC ADC sample value, convert that to charge in number of equivalent electrons */ - virtual double adcCountToNumberOfElectrons (const float adcValue, const float slope) const; - virtual double adcCountToNumberOfElectrons (uint32_t stripHashId, const float adcValue) const ; - + virtual double adcCountToNumberOfElectrons (const float adcValue, const float slope) const override final; + virtual double adcCountToNumberOfElectrons (uint32_t stripHashId, const float adcValue) const override final; + /** Conversion of ADC value to charge - Here the charges is returned in numbers of equivalent electrons */ virtual bool adcToCharge(const std::vector<uint16_t>& samples, uint32_t stripHashId, - std::vector<float>& charges) const; - + std::vector<float>& charges) const override final; + /** Given sampling values for a CSC strip, find the corresponding charge by fitting the time samples. By default, a parabolic fit is done. The charge and the time are returned. The time is calculated with respect to the time of the first sample. */ virtual bool findCharge(const float samplingTime, const unsigned int samplingPhase, - const std::vector<float>& samples,double & charge, double & time) const; - - - /** return the noise(sigma) on the readout strip in ADC counts or Number of Electrons + const std::vector<float>& samples,double & charge, double & time) const override final; + + + /** return the noise(sigma) on the readout strip in ADC counts or Number of Electrons number of electrons by default: convert=true */ - virtual double stripNoise ( uint32_t stripHashId, const bool convert=true ) const; + virtual double stripNoise ( uint32_t stripHashId, const bool convert=true ) const override final; - /** return the RMS on the readout strip in ADC counts or Number of Electrons + /** return the RMS on the readout strip in ADC counts or Number of Electrons number of electrons by default: convert=true */ - virtual double stripRMS ( uint32_t stripHashId, const bool convert=true ) const; - - /** return the F001 on the readout strip in ADC counts or Number of Electrons + virtual double stripRMS ( uint32_t stripHashId, const bool convert=true ) const override final; + + /** return the F001 on the readout strip in ADC counts or Number of Electrons number of electrons by default: convert=true */ - virtual double stripF001 ( uint32_t stripHashId, const bool convert=true ) const; - - /** return the pedestal on the readout strip in ADC counts or Number of Electrons + virtual double stripF001 ( uint32_t stripHashId, const bool convert=true ) const override final; + + /** return the pedestal on the readout strip in ADC counts or Number of Electrons - number of electrons by default: convert=true */ - virtual double stripPedestal ( uint32_t stripHashId, const bool convert=true ) const; + virtual double stripPedestal ( uint32_t stripHashId, const bool convert=true ) const override final; - /** return the status of this strip, good channel, dead channel, noisy channel - + /** return the status of this strip, good channel, dead channel, noisy channel - it will return true for strip that working fine, false is returned for dead/noisy channels */ - virtual bool isGood ( uint32_t stripHashId ) const; + virtual bool isGood ( uint32_t stripHashId ) const override final; /** return status bit **/ - virtual int stripStatusBit ( uint32_t stripHashId ) const; + virtual int stripStatusBit ( uint32_t stripHashId ) const override final; /** return T0phase related to 5 ASM. For convenience, we use stripHashId to get it **/ - virtual bool stripT0phase ( uint32_t stripHashId ) const ; + virtual bool stripT0phase ( uint32_t stripHashId ) const override final; /** return T0base related to 5 ASM. For convenience, we use stripHashId to get it **/ - virtual double stripT0base ( uint32_t stripHashId ) const ; + virtual double stripT0base ( uint32_t stripHashId ) const override final; - /** these function used in the AOD <-> conversion; may not be needed once + /** these function used in the AOD <-> conversion; may not be needed once we integrate the calibration service */ - virtual double func (const double x, const float slope) const; - virtual double func_prime (const double x, const float slope) const; - - virtual double signal (const double z) const; - virtual double signal_amplitude (const double driftTime, const double samplingTime) const; - virtual double getZ0() const; - - virtual double getSamplingTime() const; - virtual double getTimeOffset() const; - virtual double getSignalWidth() const; - virtual double getNumberOfIntegration() const; - virtual double getNumberOfIntegration2() const; + virtual double func (const double x, const float slope) const override final; + virtual double func_prime (const double x, const float slope) const override final; + + virtual double signal (const double z) const override final; + virtual double signal_amplitude (const double driftTime, const double samplingTime) const override final; + virtual double getZ0() const override final; + + virtual double getSamplingTime() const override final; + virtual double getTimeOffset() const override final; + virtual double getSignalWidth() const override final; + virtual double getNumberOfIntegration() const override final; + virtual double getNumberOfIntegration2() const override final; // virtual Double_t bipfunc (const Double_t *x, const Double_t *par); // virtual Double_t dualbipfunc (const Double_t *x, const Double_t *par); @@ -119,12 +118,12 @@ public: // To add bipolar functions and extract drftTime and stripCharge after addition, // this function is defined. Return value is pair and the first one is driftTime. virtual std::pair<double,double> addBipfunc(const double driftTime0, const double stripCharge0, - const double driftTime1, const double stripCharge1) const; - virtual std::string getDetDescr() const; + const double driftTime1, const double stripCharge1) const override final; + virtual std::string getDetDescr() const override final; // 09/2010 - virtual std::vector<float> getSamplesFromBipolarFunc(const double driftTime0, const double stripCharge0) const; - virtual double getLatency() const; + virtual std::vector<float> getSamplesFromBipolarFunc(const double driftTime0, const double stripCharge0) const override final; + virtual double getLatency() const override final; mutable int m_messageCnt_t0base; @@ -138,15 +137,15 @@ public: private: float getPSlope(uint32_t stripHashId) const; - - + + protected: - + ServiceHandle<MuonCalib::CscICoolStrSvc> m_cscCoolStrSvc; bool m_readFromDatabase; bool m_slopeFromDatabase; - + float m_slope; float m_noise; float m_pedestal; @@ -165,16 +164,14 @@ protected: float m_latency; // new in 2010....latency may be controlled in CscCalibTool. float m_latencyInDigitization; // new in 12/2010 for New Digitization package... - - unsigned int m_nSamples; + + unsigned int m_nSamples; mutable TF1* m_addedfunc; mutable TF1* m_bipolarFunc; bool m_onlineHLT; bool m_use2Samples; // for the use of only 2 samples for strip charge - + }; #endif - - diff --git a/MuonSpectrometer/MuonCalib/MuonCalibDbOperations/CMakeLists.txt b/MuonSpectrometer/MuonCalib/MuonCalibDbOperations/CMakeLists.txt index bf01de165d603446f0a8c330dd2c176f57bc4081..63562f078ee7bbe1d45d9e16d84f5281abc5ec2e 100644 --- a/MuonSpectrometer/MuonCalib/MuonCalibDbOperations/CMakeLists.txt +++ b/MuonSpectrometer/MuonCalib/MuonCalibDbOperations/CMakeLists.txt @@ -25,8 +25,7 @@ atlas_depends_on_subdirs( PUBLIC find_package( COOL COMPONENTS CoolKernel CoolApplication ) find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) - -# tag NEEDS_CORAL_BASE was not recognized in automatic conversion in cmt2cmake +find_package( cx_Oracle ) # Component(s) in the package: atlas_add_library( MuonCalibDbOperationsLib diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/python/MuonByteStreamCnvTestConfig.py b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/python/MuonByteStreamCnvTestConfig.py index a9070f20eeb2be61825ee390352d5f681dcb6195..b486572625cd4396e1e8a6e903c11a957c38b172 100644 --- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/python/MuonByteStreamCnvTestConfig.py +++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/python/MuonByteStreamCnvTestConfig.py @@ -71,6 +71,11 @@ def getSigTgcDigitToTgcRDO(name="SigTgcDigitToTgcRDO", **kwargs): return CfgMgr.TgcDigitToTgcRDO(name, **kwargs) +def getOverlayCscDigitToCscRDO(name="OverlayCscDigitToCscRDO", **kwargs): + kwargs.setdefault("CscDigitToRDOTool","CscDigitToCscRDOTool4") + return CfgMgr.CscDigitToCscRDO(name, **kwargs) + + def getOverlayMdtDigitToMdtRDO(name="OverlayMdtDigitToMdtRDO", **kwargs): from OverlayCommonAlgs.OverlayFlags import overlayFlags kwargs.setdefault("InputObjectName",overlayFlags.outputStore()+"+MDT_DIGITS") diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/python/MuonByteStreamCnvTestConfigDb.py b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/python/MuonByteStreamCnvTestConfigDb.py index 2e976381d2ba75b03741940ad95aec69c6caee89..585691bf4ca1fd4009a33ceab2bdbf050ff3e57c 100644 --- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/python/MuonByteStreamCnvTestConfigDb.py +++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/python/MuonByteStreamCnvTestConfigDb.py @@ -12,6 +12,7 @@ addAlgorithm("MuonByteStreamCnvTest.MuonByteStreamCnvTestConfig.getTgcRdoToTgcDi addAlgorithm("MuonByteStreamCnvTest.MuonByteStreamCnvTestConfig.getSigMdtDigitToMdtRDO" , "SigMdtDigitToMdtRDO") addAlgorithm("MuonByteStreamCnvTest.MuonByteStreamCnvTestConfig.getSigRpcDigitToRpcRDO" , "SigRpcDigitToRpcRDO") addAlgorithm("MuonByteStreamCnvTest.MuonByteStreamCnvTestConfig.getSigTgcDigitToTgcRDO" , "SigTgcDigitToTgcRDO") +addAlgorithm("MuonByteStreamCnvTest.MuonByteStreamCnvTestConfig.getOverlayCscDigitToCscRDO" , "OverlayCscDigitToCscRDO") addAlgorithm("MuonByteStreamCnvTest.MuonByteStreamCnvTestConfig.getOverlayMdtDigitToMdtRDO" , "OverlayMdtDigitToMdtRDO") addAlgorithm("MuonByteStreamCnvTest.MuonByteStreamCnvTestConfig.getOverlayRpcDigitToRpcRDO" , "OverlayRpcDigitToRpcRDO") addAlgorithm("MuonByteStreamCnvTest.MuonByteStreamCnvTestConfig.getOverlayTgcDigitToTgcRDO" , "OverlayTgcDigitToTgcRDO") diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MdtDigitToMdtRDO.cxx b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MdtDigitToMdtRDO.cxx index 82f7b729e323de575a6f681a25f52104c60bbc28..e6d041843ebb39613b3f181ec34b22effbe87a00 100644 --- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MdtDigitToMdtRDO.cxx +++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MdtDigitToMdtRDO.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "MuonDigitContainer/MdtDigitContainer.h" @@ -12,7 +12,6 @@ #include "MuonByteStreamCnvTest/MdtDigitToMdtRDO.h" -#include "EventInfo/TagInfo.h" #include "EventInfoMgt/ITagInfoMgr.h" #include <algorithm> diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/RpcDigitToRpcRDO.cxx b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/RpcDigitToRpcRDO.cxx index 3e17338099b58167341a88a971703001320a63d7..9ca4c0cb6dc1191de1b88a9439b6adb023a07afd 100644 --- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/RpcDigitToRpcRDO.cxx +++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/RpcDigitToRpcRDO.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ @@ -12,7 +12,6 @@ #include "MuonDigitContainer/RpcDigitCollection.h" #include "MuonDigitContainer/RpcDigit.h" -#include "EventInfo/TagInfo.h" #include "EventInfoMgt/ITagInfoMgr.h" //#include "RPCcablingInterface/RpcPadIdHash.h" diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/TgcDigitToTgcRDO.cxx b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/TgcDigitToTgcRDO.cxx index db906a51c503ce23b592e48129363783d2ef5b2f..e6cf541215f0aa89fa4c8384d948e403f21f8e87 100644 --- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/TgcDigitToTgcRDO.cxx +++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/TgcDigitToTgcRDO.cxx @@ -1,10 +1,9 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "StoreGate/StoreGateSvc.h" -#include "EventInfo/TagInfo.h" #include "EventInfoMgt/ITagInfoMgr.h" #include "TGCcablingInterface/ITGCcablingServerSvc.h" diff --git a/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/MuonCSC_CnvTools/ICSC_RDO_Decoder.h b/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/MuonCSC_CnvTools/ICSC_RDO_Decoder.h index cc5e86686802383085324169a6c1be71121be70e..12c7102ccdf899365fa11978f582d96a1a89676b 100644 --- a/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/MuonCSC_CnvTools/ICSC_RDO_Decoder.h +++ b/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/MuonCSC_CnvTools/ICSC_RDO_Decoder.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef MUONCSC_CNVTOOL_ICSC_RDO_Decoder_H @@ -10,8 +10,6 @@ class Identifier; class CscRawData; -static const InterfaceID IID_ICSC_RDO_Decoder("Muon::ICSC_RDO_Decoder", 1, 0); - namespace Muon { /** This class provides conversion from RDO data to CSC RDO @@ -21,16 +19,15 @@ namespace Muon { class ICSC_RDO_Decoder : virtual public IAlgTool { -public: - static const InterfaceID& interfaceID( ) { return IID_ICSC_RDO_Decoder; }; - - virtual void getDigit(const CscRawData * rawData, Identifier& moduleId, +public: + DeclareInterfaceID(ICSC_RDO_Decoder, 1, 0); + + virtual void getDigit(const CscRawData * rawData, Identifier& moduleId, Identifier& channelId, double& adc, double& time) const=0; virtual Identifier stationIdentifier(const CscRawData* rawData) const=0; virtual Identifier channelIdentifier(const CscRawData * rawData, int j) const=0; -}; +}; } #endif - diff --git a/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CSC_RawDataProviderTool.cxx b/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CSC_RawDataProviderTool.cxx index 8d02fe1992f9cfe40980f5675915ea0c86ff279a..c512769a624b904a2b02b600b5f3bb729139aca6 100644 --- a/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CSC_RawDataProviderTool.cxx +++ b/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CSC_RawDataProviderTool.cxx @@ -52,22 +52,10 @@ Muon::CSC_RawDataProviderTool::~CSC_RawDataProviderTool() StatusCode Muon::CSC_RawDataProviderTool::initialize() { - if (detStore()->retrieve( m_muonMgr ).isFailure()) { - ATH_MSG_ERROR ( " Cannot retrieve MuonReadoutGeometry " ); - return StatusCode::FAILURE; - } - - // get the cabling service - if (m_cabling.retrieve().isFailure()) { - ATH_MSG_ERROR ( "Can't get CSCcablingSvc " ); - return StatusCode::FAILURE; - } - - if (m_robDataProvider.retrieve().isFailure()) { - ATH_MSG_FATAL ( "Failed to retrieve serive " << m_robDataProvider ); - return StatusCode::FAILURE; - } else - ATH_MSG_INFO ( "Retrieved service " << m_robDataProvider ); + ATH_CHECK( detStore()->retrieve( m_muonMgr ) ); + ATH_CHECK( m_cabling.retrieve() ); + ATH_CHECK( m_robDataProvider.retrieve() ); + ATH_MSG_INFO ( "Retrieved service " << m_robDataProvider ); const CscIdHelper* idHelper = m_muonMgr->cscIdHelper(); diff --git a/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CscRDO_Decoder.cxx b/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CscRDO_Decoder.cxx index d536894fec7ad9f7880469fcd13e06f9dfa85cd2..15e2806e5d6f4c99f072c63f101f48b38d4ba55a 100644 --- a/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CscRDO_Decoder.cxx +++ b/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CscRDO_Decoder.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "CscRDO_Decoder.h" @@ -10,20 +10,14 @@ /** constructor */ Muon::CscRDO_Decoder::CscRDO_Decoder ( const std::string& type, const std::string& name,const IInterface* parent ) - : AthAlgTool(type,name,parent), + : base_class(type,name,parent), m_cscHelper(0), m_cabling( "CSCcablingSvc" ,name), m_cscCalibTool( "CscCalibTool") { - declareInterface<ICSC_RDO_Decoder>( this ); declareProperty("CscCalibTool", m_cscCalibTool ); } -/** destructor -*/ -Muon::CscRDO_Decoder::~CscRDO_Decoder() -{} - StatusCode Muon::CscRDO_Decoder::initialize() { diff --git a/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CscRDO_Decoder.h b/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CscRDO_Decoder.h index 5b04a6f73f37a282af3517e17b5e6ab7e87a3bd8..f27223083c3772e46ac19943d65bf2685e8084b4 100644 --- a/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CscRDO_Decoder.h +++ b/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CscRDO_Decoder.h @@ -1,11 +1,11 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef MUONCSC_CNVTOOLS_CSCRDO_DECODER_H #define MUONCSC_CNVTOOLS_CSCRDO_DECODER_H -#include "MuonCSC_CnvTools/ICSC_RDO_Decoder.h" +#include "MuonCSC_CnvTools/ICSC_RDO_Decoder.h" #include "CscCalibTools/ICscCalibTool.h" #include "AthenaBaseComps/AthAlgTool.h" @@ -30,27 +30,26 @@ class CscRawData; * BNL January 24 2004 */ namespace Muon { - - class CscRDO_Decoder : virtual public ICSC_RDO_Decoder, public AthAlgTool { - + + class CscRDO_Decoder : public extends<AthAlgTool, ICSC_RDO_Decoder> { + public: - - /** constructor + + /** constructor */ CscRDO_Decoder(const std::string& type, const std::string& name, const IInterface* parent ) ; - - /** destructor + + /** destructor */ - ~CscRDO_Decoder(); - - virtual StatusCode initialize(); - virtual StatusCode finalize() { return StatusCode::SUCCESS; } + virtual ~CscRDO_Decoder() = default; - void getDigit(const CscRawData * rawData, Identifier& moduleId, - Identifier& channelId, double& adc, double& time) const; - Identifier stationIdentifier(const CscRawData* rawData) const; - Identifier channelIdentifier(const CscRawData * rawData, int j) const; + virtual StatusCode initialize() override final; + + virtual void getDigit(const CscRawData * rawData, Identifier& moduleId, + Identifier& channelId, double& adc, double& time) const override final; + virtual Identifier stationIdentifier(const CscRawData* rawData) const override final; + virtual Identifier channelIdentifier(const CscRawData * rawData, int j) const override final; private: std::string m_detdescr; @@ -68,6 +67,3 @@ namespace Muon { #endif // MUONCSC_CNVTOOL_CSCRDO_DECODER_H - - - diff --git a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/CMakeLists.txt b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/CMakeLists.txt index 8e9abc47c0ed1268921fb2b8faebc42e61aebd5b..99fb34c2e1a2d5f08c1242f38ea8d3baaac80ead 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/CMakeLists.txt +++ b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/CMakeLists.txt @@ -75,7 +75,7 @@ find_package( AthenaPoolUtilitiesTest ) if( ATHENAPOOLUTILITIESTEST_FOUND ) set( MUONEVENTATHENAPOOL_REFERENCE_TAG - MuonEventAthenaPoolReference-01-00-00 ) + MuonEventAthenaPoolReference-02-00-00 ) run_tpcnv_test( MuonEventTPCnv_17.0.0 ESD-17.0.0 REFERENCE_TAG ${MUONEVENTATHENAPOOL_REFERENCE_TAG} ) run_tpcnv_test( MuonEventTPCnv_20.1.7.2 ESD-20.1.7.2 diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/CscSimDataCnv_p1_test.ref b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/CscSimDataCnv_p1_test.ref index 6a0927bf3bfd71b47909f10725590944a6daf6ef..eebebda9e1c21057cb9e97fc3b87abf511644ffd 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/CscSimDataCnv_p1_test.ref +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/CscSimDataCnv_p1_test.ref @@ -13,4 +13,4 @@ test1 ClassIDSvc INFO getRegistryEntries: read 1130 CLIDRegistry entries for module ALL ProxyProviderSvc INFO Initializing ProxyProviderSvc - package version SGComps-00-00-00 ClassIDSvc INFO getRegistryEntries: read 869 CLIDRegistry entries for module ALL -HepMcParticleLink INFO find_hostkey: Using TruthEvent as McEventCollection key for this job +HepMcParticleLink INFO find_proxy: Using TruthEvent as McEventCollection key for this job diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/CscSimDataCnv_p2_test.ref b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/CscSimDataCnv_p2_test.ref index 6a0927bf3bfd71b47909f10725590944a6daf6ef..eebebda9e1c21057cb9e97fc3b87abf511644ffd 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/CscSimDataCnv_p2_test.ref +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/CscSimDataCnv_p2_test.ref @@ -13,4 +13,4 @@ test1 ClassIDSvc INFO getRegistryEntries: read 1130 CLIDRegistry entries for module ALL ProxyProviderSvc INFO Initializing ProxyProviderSvc - package version SGComps-00-00-00 ClassIDSvc INFO getRegistryEntries: read 869 CLIDRegistry entries for module ALL -HepMcParticleLink INFO find_hostkey: Using TruthEvent as McEventCollection key for this job +HepMcParticleLink INFO find_proxy: Using TruthEvent as McEventCollection key for this job diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/CscSimDataCollectionCnv_p1_test.ref b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/CscSimDataCollectionCnv_p1_test.ref index 8633d8ace9b4883a00f6e29e68937582b9b5e684..4a7c11977bb121447c32603da54a83a704e8898b 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/CscSimDataCollectionCnv_p1_test.ref +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/CscSimDataCollectionCnv_p1_test.ref @@ -5,4 +5,4 @@ HistogramPersis...WARNING Histograms saving not required. ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr Ready test1 -HepMcParticleLink INFO find_hostkey: Using TruthEvent as McEventCollection key for this job +HepMcParticleLink INFO find_proxy: Using TruthEvent as McEventCollection key for this job diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/CscSimDataCollectionCnv_p2_test.ref b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/CscSimDataCollectionCnv_p2_test.ref index 1a2f833e338b04a5ace0e0654a15001a4191f03a..6285c85d63ae1a9436248da818a348fd8629d490 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/CscSimDataCollectionCnv_p2_test.ref +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/CscSimDataCollectionCnv_p2_test.ref @@ -5,5 +5,5 @@ HistogramPersis...WARNING Histograms saving not required. ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr Ready test1 -HepMcParticleLink INFO find_hostkey: Using TruthEvent as McEventCollection key for this job +HepMcParticleLink INFO find_proxy: Using TruthEvent as McEventCollection key for this job diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/MuonSimDataCnv_p1_test.ref b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/MuonSimDataCnv_p1_test.ref index 8633d8ace9b4883a00f6e29e68937582b9b5e684..4a7c11977bb121447c32603da54a83a704e8898b 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/MuonSimDataCnv_p1_test.ref +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/MuonSimDataCnv_p1_test.ref @@ -5,4 +5,4 @@ HistogramPersis...WARNING Histograms saving not required. ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr Ready test1 -HepMcParticleLink INFO find_hostkey: Using TruthEvent as McEventCollection key for this job +HepMcParticleLink INFO find_proxy: Using TruthEvent as McEventCollection key for this job diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/MuonSimDataCnv_p2_test.ref b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/MuonSimDataCnv_p2_test.ref index 8633d8ace9b4883a00f6e29e68937582b9b5e684..4a7c11977bb121447c32603da54a83a704e8898b 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/MuonSimDataCnv_p2_test.ref +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/MuonSimDataCnv_p2_test.ref @@ -5,4 +5,4 @@ HistogramPersis...WARNING Histograms saving not required. ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr Ready test1 -HepMcParticleLink INFO find_hostkey: Using TruthEvent as McEventCollection key for this job +HepMcParticleLink INFO find_proxy: Using TruthEvent as McEventCollection key for this job diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/MuonSimDataCollectionCnv_p1_test.ref b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/MuonSimDataCollectionCnv_p1_test.ref index 8633d8ace9b4883a00f6e29e68937582b9b5e684..4a7c11977bb121447c32603da54a83a704e8898b 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/MuonSimDataCollectionCnv_p1_test.ref +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/MuonSimDataCollectionCnv_p1_test.ref @@ -5,4 +5,4 @@ HistogramPersis...WARNING Histograms saving not required. ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr Ready test1 -HepMcParticleLink INFO find_hostkey: Using TruthEvent as McEventCollection key for this job +HepMcParticleLink INFO find_proxy: Using TruthEvent as McEventCollection key for this job diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/MuonSimDataCollectionCnv_p2_test.ref b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/MuonSimDataCollectionCnv_p2_test.ref index 8633d8ace9b4883a00f6e29e68937582b9b5e684..4a7c11977bb121447c32603da54a83a704e8898b 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/MuonSimDataCollectionCnv_p2_test.ref +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/share/MuonSimDataCollectionCnv_p2_test.ref @@ -5,4 +5,4 @@ HistogramPersis...WARNING Histograms saving not required. ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr Ready test1 -HepMcParticleLink INFO find_hostkey: Using TruthEvent as McEventCollection key for this job +HepMcParticleLink INFO find_proxy: Using TruthEvent as McEventCollection key for this job diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscSimDataCnv_p1_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscSimDataCnv_p1_test.cxx index 2d7ec36480d032f453e392cab357ec7f77790b16..dad2128062fda600e02e0ab591cf399656eb0969 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscSimDataCnv_p1_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscSimDataCnv_p1_test.cxx @@ -28,6 +28,7 @@ void compare (const HepMcParticleLink& p1, assert ( p1.isValid() == p2.isValid() ); assert ( p1.barcode() == p2.barcode() ); assert ( p1.eventIndex() == p2.eventIndex() ); + assert ( p1.getEventCollectionAsChar() == p2.getEventCollectionAsChar() ); assert ( p1.cptr() == p2.cptr() ); assert ( p1 == p2 ); } diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscSimDataCnv_p2_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscSimDataCnv_p2_test.cxx index 0ac3952866a1e9ed2e372e8485a5ee8fcb426642..1a30c5f76f99ff0b98fc6c9b2f41e0a112162e0c 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscSimDataCnv_p2_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscSimDataCnv_p2_test.cxx @@ -29,6 +29,7 @@ void compare (const HepMcParticleLink& p1, assert ( p1.isValid() == p2.isValid() ); assert ( p1.barcode() == p2.barcode() ); assert ( p1.eventIndex() == p2.eventIndex() ); + assert ( p1.getEventCollectionAsChar() == p2.getEventCollectionAsChar() ); assert ( p1.cptr() == p2.cptr() ); assert ( p1 == p2 ); } diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscSimDataCollectionCnv_p1_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscSimDataCollectionCnv_p1_test.cxx index 53a5486e523ca7a415490b52be3773e2aea77e5a..6f48a617c144f61f86299a8b2e233280eab15ae2 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscSimDataCollectionCnv_p1_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscSimDataCollectionCnv_p1_test.cxx @@ -29,6 +29,7 @@ void compare (const HepMcParticleLink& p1, assert ( p1.isValid() == p2.isValid() ); assert ( p1.barcode() == p2.barcode() ); assert ( p1.eventIndex() == p2.eventIndex() ); + assert ( p1.getEventCollectionAsChar() == p2.getEventCollectionAsChar() ); assert ( p1.cptr() == p2.cptr() ); assert ( p1 == p2 ); } diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscSimDataCollectionCnv_p2_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscSimDataCollectionCnv_p2_test.cxx index 3a6eb294ab88f097fa87785188d7ee47d677b300..8a6a88634795450af30f0ffe57f2c9e44f23ab5b 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscSimDataCollectionCnv_p2_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscSimDataCollectionCnv_p2_test.cxx @@ -29,6 +29,7 @@ void compare (const HepMcParticleLink& p1, assert ( p1.isValid() == p2.isValid() ); assert ( p1.barcode() == p2.barcode() ); assert ( p1.eventIndex() == p2.eventIndex() ); + assert ( p1.getEventCollectionAsChar() == p2.getEventCollectionAsChar() ); assert ( p1.cptr() == p2.cptr() ); assert ( p1 == p2 ); } diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MuonSimDataCnv_p1_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MuonSimDataCnv_p1_test.cxx index ec68ac382cc046b12b28d1ae08949998a6298ba9..4013457cc4bf96a9a5f166ac841fcb8c75ae4a6c 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MuonSimDataCnv_p1_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MuonSimDataCnv_p1_test.cxx @@ -29,6 +29,7 @@ void compare (const HepMcParticleLink& p1, assert ( p1.isValid() == p2.isValid() ); assert ( p1.barcode() == p2.barcode() ); assert ( p1.eventIndex() == p2.eventIndex() ); + assert ( p1.getEventCollectionAsChar() == p2.getEventCollectionAsChar() ); assert ( p1.cptr() == p2.cptr() ); assert ( p1 == p2 ); } diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MuonSimDataCnv_p2_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MuonSimDataCnv_p2_test.cxx index d16345206215f6497b4d49b97c0e85a4a0668cfd..b5a8e95a730541e634c5a679c40afac0e08d18e2 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MuonSimDataCnv_p2_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MuonSimDataCnv_p2_test.cxx @@ -29,6 +29,7 @@ void compare (const HepMcParticleLink& p1, assert ( p1.isValid() == p2.isValid() ); assert ( p1.barcode() == p2.barcode() ); assert ( p1.eventIndex() == p2.eventIndex() ); + assert ( p1.getEventCollectionAsChar() == p2.getEventCollectionAsChar() ); assert ( p1.cptr() == p2.cptr() ); assert ( p1 == p2 ); } diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MuonSimDataCollectionCnv_p1_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MuonSimDataCollectionCnv_p1_test.cxx index 0a45237534431f9ce0d92bf1d46a1abbeba89511..0cbe905b0efa439541f8fcc0105ceeb2d3ecb959 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MuonSimDataCollectionCnv_p1_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MuonSimDataCollectionCnv_p1_test.cxx @@ -29,6 +29,7 @@ void compare (const HepMcParticleLink& p1, assert ( p1.isValid() == p2.isValid() ); assert ( p1.barcode() == p2.barcode() ); assert ( p1.eventIndex() == p2.eventIndex() ); + assert ( p1.getEventCollectionAsChar() == p2.getEventCollectionAsChar() ); assert ( p1.cptr() == p2.cptr() ); assert ( p1 == p2 ); } diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MuonSimDataCollectionCnv_p2_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MuonSimDataCollectionCnv_p2_test.cxx index ff51f024e515bdc893b2aacd9f68935ad442102c..bda5460d5a6955d3938048b668486b3fe992d584 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MuonSimDataCollectionCnv_p2_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MuonSimDataCollectionCnv_p2_test.cxx @@ -28,6 +28,7 @@ void compare (const HepMcParticleLink& p1, assert ( p1.isValid() == p2.isValid() ); assert ( p1.barcode() == p2.barcode() ); assert ( p1.eventIndex() == p2.eventIndex() ); + assert ( p1.getEventCollectionAsChar() == p2.getEventCollectionAsChar() ); assert ( p1.cptr() == p2.cptr() ); assert ( p1 == p2 ); } diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventAthenaPool/CMakeLists.txt b/MuonSpectrometer/MuonCnv/MuonSimEventAthenaPool/CMakeLists.txt index b79622617bc6301e31a2e05c16b3621c60185d5d..697abfeef1002ec7d1a0291d47ea13f9f7aea86c 100644 --- a/MuonSpectrometer/MuonCnv/MuonSimEventAthenaPool/CMakeLists.txt +++ b/MuonSpectrometer/MuonCnv/MuonSimEventAthenaPool/CMakeLists.txt @@ -37,7 +37,7 @@ find_package( AthenaPoolUtilitiesTest ) if( ATHENAPOOLUTILITIESTEST_FOUND ) set( MUONSIMEVENTATHENAPOOL_REFERENCE_TAG - MuonSimEventAthenaPoolReference-01-00-00 ) + MuonSimEventAthenaPoolReference-02-00-00 ) run_tpcnv_test( MuonSimEventTPCnv_HITS HITS.04919495._000416 REFERENCE_TAG ${MUONSIMEVENTATHENAPOOL_REFERENCE_TAG} ) else() diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/CSCSimHitCollectionCnv_p1_test.ref b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/CSCSimHitCollectionCnv_p1_test.ref index 8633d8ace9b4883a00f6e29e68937582b9b5e684..4a7c11977bb121447c32603da54a83a704e8898b 100644 --- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/CSCSimHitCollectionCnv_p1_test.ref +++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/CSCSimHitCollectionCnv_p1_test.ref @@ -5,4 +5,4 @@ HistogramPersis...WARNING Histograms saving not required. ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr Ready test1 -HepMcParticleLink INFO find_hostkey: Using TruthEvent as McEventCollection key for this job +HepMcParticleLink INFO find_proxy: Using TruthEvent as McEventCollection key for this job diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/CSCSimHitCollectionCnv_p2_test.ref b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/CSCSimHitCollectionCnv_p2_test.ref index 8633d8ace9b4883a00f6e29e68937582b9b5e684..4a7c11977bb121447c32603da54a83a704e8898b 100644 --- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/CSCSimHitCollectionCnv_p2_test.ref +++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/CSCSimHitCollectionCnv_p2_test.ref @@ -5,4 +5,4 @@ HistogramPersis...WARNING Histograms saving not required. ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr Ready test1 -HepMcParticleLink INFO find_hostkey: Using TruthEvent as McEventCollection key for this job +HepMcParticleLink INFO find_proxy: Using TruthEvent as McEventCollection key for this job diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/CSCSimHitCollectionCnv_p3_test.ref b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/CSCSimHitCollectionCnv_p3_test.ref index 8633d8ace9b4883a00f6e29e68937582b9b5e684..4a7c11977bb121447c32603da54a83a704e8898b 100644 --- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/CSCSimHitCollectionCnv_p3_test.ref +++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/CSCSimHitCollectionCnv_p3_test.ref @@ -5,4 +5,4 @@ HistogramPersis...WARNING Histograms saving not required. ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr Ready test1 -HepMcParticleLink INFO find_hostkey: Using TruthEvent as McEventCollection key for this job +HepMcParticleLink INFO find_proxy: Using TruthEvent as McEventCollection key for this job diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/GenericMuonSimHitCollectionCnv_p1_test.ref b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/GenericMuonSimHitCollectionCnv_p1_test.ref index 8633d8ace9b4883a00f6e29e68937582b9b5e684..4a7c11977bb121447c32603da54a83a704e8898b 100644 --- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/GenericMuonSimHitCollectionCnv_p1_test.ref +++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/GenericMuonSimHitCollectionCnv_p1_test.ref @@ -5,4 +5,4 @@ HistogramPersis...WARNING Histograms saving not required. ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr Ready test1 -HepMcParticleLink INFO find_hostkey: Using TruthEvent as McEventCollection key for this job +HepMcParticleLink INFO find_proxy: Using TruthEvent as McEventCollection key for this job diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/GenericMuonSimHitCollectionCnv_p2_test.ref b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/GenericMuonSimHitCollectionCnv_p2_test.ref index 8633d8ace9b4883a00f6e29e68937582b9b5e684..4a7c11977bb121447c32603da54a83a704e8898b 100644 --- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/GenericMuonSimHitCollectionCnv_p2_test.ref +++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/GenericMuonSimHitCollectionCnv_p2_test.ref @@ -5,4 +5,4 @@ HistogramPersis...WARNING Histograms saving not required. ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr Ready test1 -HepMcParticleLink INFO find_hostkey: Using TruthEvent as McEventCollection key for this job +HepMcParticleLink INFO find_proxy: Using TruthEvent as McEventCollection key for this job diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/MDTSimHitCollectionCnv_p1_test.ref b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/MDTSimHitCollectionCnv_p1_test.ref index 8633d8ace9b4883a00f6e29e68937582b9b5e684..4a7c11977bb121447c32603da54a83a704e8898b 100644 --- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/MDTSimHitCollectionCnv_p1_test.ref +++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/MDTSimHitCollectionCnv_p1_test.ref @@ -5,4 +5,4 @@ HistogramPersis...WARNING Histograms saving not required. ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr Ready test1 -HepMcParticleLink INFO find_hostkey: Using TruthEvent as McEventCollection key for this job +HepMcParticleLink INFO find_proxy: Using TruthEvent as McEventCollection key for this job diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/MDTSimHitCollectionCnv_p2_test.ref b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/MDTSimHitCollectionCnv_p2_test.ref index 8633d8ace9b4883a00f6e29e68937582b9b5e684..4a7c11977bb121447c32603da54a83a704e8898b 100644 --- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/MDTSimHitCollectionCnv_p2_test.ref +++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/MDTSimHitCollectionCnv_p2_test.ref @@ -5,4 +5,4 @@ HistogramPersis...WARNING Histograms saving not required. ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr Ready test1 -HepMcParticleLink INFO find_hostkey: Using TruthEvent as McEventCollection key for this job +HepMcParticleLink INFO find_proxy: Using TruthEvent as McEventCollection key for this job diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/MDTSimHitCollectionCnv_p3_test.ref b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/MDTSimHitCollectionCnv_p3_test.ref index 8633d8ace9b4883a00f6e29e68937582b9b5e684..4a7c11977bb121447c32603da54a83a704e8898b 100644 --- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/MDTSimHitCollectionCnv_p3_test.ref +++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/MDTSimHitCollectionCnv_p3_test.ref @@ -5,4 +5,4 @@ HistogramPersis...WARNING Histograms saving not required. ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr Ready test1 -HepMcParticleLink INFO find_hostkey: Using TruthEvent as McEventCollection key for this job +HepMcParticleLink INFO find_proxy: Using TruthEvent as McEventCollection key for this job diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/MMSimHitCollectionCnv_p1_test.ref b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/MMSimHitCollectionCnv_p1_test.ref index 8633d8ace9b4883a00f6e29e68937582b9b5e684..4a7c11977bb121447c32603da54a83a704e8898b 100644 --- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/MMSimHitCollectionCnv_p1_test.ref +++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/MMSimHitCollectionCnv_p1_test.ref @@ -5,4 +5,4 @@ HistogramPersis...WARNING Histograms saving not required. ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr Ready test1 -HepMcParticleLink INFO find_hostkey: Using TruthEvent as McEventCollection key for this job +HepMcParticleLink INFO find_proxy: Using TruthEvent as McEventCollection key for this job diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/MMSimHitCollectionCnv_p2_test.ref b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/MMSimHitCollectionCnv_p2_test.ref index 8633d8ace9b4883a00f6e29e68937582b9b5e684..4a7c11977bb121447c32603da54a83a704e8898b 100644 --- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/MMSimHitCollectionCnv_p2_test.ref +++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/MMSimHitCollectionCnv_p2_test.ref @@ -5,4 +5,4 @@ HistogramPersis...WARNING Histograms saving not required. ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr Ready test1 -HepMcParticleLink INFO find_hostkey: Using TruthEvent as McEventCollection key for this job +HepMcParticleLink INFO find_proxy: Using TruthEvent as McEventCollection key for this job diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/RPCSimHitCollectionCnv_p1_test.ref b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/RPCSimHitCollectionCnv_p1_test.ref index cebc950724d358be04ad11c1bd5cec289bbb2681..236530a42820d9b407c4ad18405c3113319ef90a 100644 --- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/RPCSimHitCollectionCnv_p1_test.ref +++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/RPCSimHitCollectionCnv_p1_test.ref @@ -5,5 +5,5 @@ HistogramPersis...WARNING Histograms saving not required. ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr Ready test1 -HepMcParticleLink INFO find_hostkey: Using TruthEvent as McEventCollection key for this job +HepMcParticleLink INFO find_proxy: Using TruthEvent as McEventCollection key for this job test INFO Processing diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/RPCSimHitCollectionCnv_p2_test.ref b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/RPCSimHitCollectionCnv_p2_test.ref index 8633d8ace9b4883a00f6e29e68937582b9b5e684..4a7c11977bb121447c32603da54a83a704e8898b 100644 --- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/RPCSimHitCollectionCnv_p2_test.ref +++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/RPCSimHitCollectionCnv_p2_test.ref @@ -5,4 +5,4 @@ HistogramPersis...WARNING Histograms saving not required. ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr Ready test1 -HepMcParticleLink INFO find_hostkey: Using TruthEvent as McEventCollection key for this job +HepMcParticleLink INFO find_proxy: Using TruthEvent as McEventCollection key for this job diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/RPCSimHitCollectionCnv_p3_test.ref b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/RPCSimHitCollectionCnv_p3_test.ref index 8633d8ace9b4883a00f6e29e68937582b9b5e684..4a7c11977bb121447c32603da54a83a704e8898b 100644 --- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/RPCSimHitCollectionCnv_p3_test.ref +++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/RPCSimHitCollectionCnv_p3_test.ref @@ -5,4 +5,4 @@ HistogramPersis...WARNING Histograms saving not required. ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr Ready test1 -HepMcParticleLink INFO find_hostkey: Using TruthEvent as McEventCollection key for this job +HepMcParticleLink INFO find_proxy: Using TruthEvent as McEventCollection key for this job diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/TGCSimHitCollectionCnv_p1_test.ref b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/TGCSimHitCollectionCnv_p1_test.ref index 8633d8ace9b4883a00f6e29e68937582b9b5e684..4a7c11977bb121447c32603da54a83a704e8898b 100644 --- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/TGCSimHitCollectionCnv_p1_test.ref +++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/TGCSimHitCollectionCnv_p1_test.ref @@ -5,4 +5,4 @@ HistogramPersis...WARNING Histograms saving not required. ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr Ready test1 -HepMcParticleLink INFO find_hostkey: Using TruthEvent as McEventCollection key for this job +HepMcParticleLink INFO find_proxy: Using TruthEvent as McEventCollection key for this job diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/TGCSimHitCollectionCnv_p2_test.ref b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/TGCSimHitCollectionCnv_p2_test.ref index 8633d8ace9b4883a00f6e29e68937582b9b5e684..4a7c11977bb121447c32603da54a83a704e8898b 100644 --- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/TGCSimHitCollectionCnv_p2_test.ref +++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/TGCSimHitCollectionCnv_p2_test.ref @@ -5,4 +5,4 @@ HistogramPersis...WARNING Histograms saving not required. ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr Ready test1 -HepMcParticleLink INFO find_hostkey: Using TruthEvent as McEventCollection key for this job +HepMcParticleLink INFO find_proxy: Using TruthEvent as McEventCollection key for this job diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/TGCSimHitCollectionCnv_p3_test.ref b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/TGCSimHitCollectionCnv_p3_test.ref index 8633d8ace9b4883a00f6e29e68937582b9b5e684..4a7c11977bb121447c32603da54a83a704e8898b 100644 --- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/TGCSimHitCollectionCnv_p3_test.ref +++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/TGCSimHitCollectionCnv_p3_test.ref @@ -5,4 +5,4 @@ HistogramPersis...WARNING Histograms saving not required. ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr Ready test1 -HepMcParticleLink INFO find_hostkey: Using TruthEvent as McEventCollection key for this job +HepMcParticleLink INFO find_proxy: Using TruthEvent as McEventCollection key for this job diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/TGCSimHitCollectionCnv_p4_test.ref b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/TGCSimHitCollectionCnv_p4_test.ref index 8633d8ace9b4883a00f6e29e68937582b9b5e684..4a7c11977bb121447c32603da54a83a704e8898b 100644 --- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/TGCSimHitCollectionCnv_p4_test.ref +++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/TGCSimHitCollectionCnv_p4_test.ref @@ -5,4 +5,4 @@ HistogramPersis...WARNING Histograms saving not required. ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr Ready test1 -HepMcParticleLink INFO find_hostkey: Using TruthEvent as McEventCollection key for this job +HepMcParticleLink INFO find_proxy: Using TruthEvent as McEventCollection key for this job diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/sTGCSimHitCollectionCnv_p1_test.ref b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/sTGCSimHitCollectionCnv_p1_test.ref index f00f0d56df77a8077aa1229f53326f1ec6e5dccc..0bc5f1e19168b9f9cda76980d7b9f9ea7ef2cac3 100644 --- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/sTGCSimHitCollectionCnv_p1_test.ref +++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/sTGCSimHitCollectionCnv_p1_test.ref @@ -11,4 +11,4 @@ ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr Ready ClassIDSvc INFO getRegistryEntries: read 2754 CLIDRegistry entries for module ALL test1 -HepMcParticleLink INFO find_hostkey: Using TruthEvent as McEventCollection key for this job +HepMcParticleLink INFO find_proxy: Using TruthEvent as McEventCollection key for this job diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/sTGCSimHitCollectionCnv_p2_test.ref b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/sTGCSimHitCollectionCnv_p2_test.ref index 8dae6c25e691f24d3e197a2ecb4a0f82db7dd25e..657d3812c19ad67a3431806d3872d1be141b715f 100644 --- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/sTGCSimHitCollectionCnv_p2_test.ref +++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/share/sTGCSimHitCollectionCnv_p2_test.ref @@ -11,4 +11,4 @@ ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr Ready ClassIDSvc INFO getRegistryEntries: read 2754 CLIDRegistry entries for module ALL test1 -HepMcParticleLink INFO find_hostkey: Using TruthEvent as McEventCollection key for this job +HepMcParticleLink INFO find_proxy: Using TruthEvent as McEventCollection key for this job diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/CSCSimHitCollectionCnv_p1_test.cxx b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/CSCSimHitCollectionCnv_p1_test.cxx index bc6b72cb6f8e8aa219d81ba9f1295fc28f5508ec..eab8744c11246e9b8dfdab8ede3fbaa3ca6dbaa2 100644 --- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/CSCSimHitCollectionCnv_p1_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/CSCSimHitCollectionCnv_p1_test.cxx @@ -28,6 +28,7 @@ void compare (const HepMcParticleLink& p1, assert ( p1.isValid() == p2.isValid() ); assert ( p1.barcode() == p2.barcode() ); assert ( p1.eventIndex() == p2.eventIndex() ); + assert ( p1.getEventCollectionAsChar() == p2.getEventCollectionAsChar() ); assert ( p1.cptr() == p2.cptr() ); assert ( p1 == p2 ); } diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/CSCSimHitCollectionCnv_p2_test.cxx b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/CSCSimHitCollectionCnv_p2_test.cxx index 692c225e1646c74107380d4dc48944b862e24d91..5b16c50c5bdc9b196fe9322169f4a8dd4780e922 100644 --- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/CSCSimHitCollectionCnv_p2_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/CSCSimHitCollectionCnv_p2_test.cxx @@ -28,6 +28,7 @@ void compare (const HepMcParticleLink& p1, assert ( p1.isValid() == p2.isValid() ); assert ( p1.barcode() == p2.barcode() ); assert ( p1.eventIndex() == p2.eventIndex() ); + assert ( p1.getEventCollectionAsChar() == p2.getEventCollectionAsChar() ); assert ( p1.cptr() == p2.cptr() ); assert ( p1 == p2 ); } diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/CSCSimHitCollectionCnv_p3_test.cxx b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/CSCSimHitCollectionCnv_p3_test.cxx index ca87a4dfd3c305444c61f896aee23662417c5808..25addc7f0293e85dee192c53f84a885504f09059 100644 --- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/CSCSimHitCollectionCnv_p3_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/CSCSimHitCollectionCnv_p3_test.cxx @@ -28,6 +28,7 @@ void compare (const HepMcParticleLink& p1, assert ( p1.isValid() == p2.isValid() ); assert ( p1.barcode() == p2.barcode() ); assert ( p1.eventIndex() == p2.eventIndex() ); + assert ( p1.getEventCollectionAsChar() == p2.getEventCollectionAsChar() ); assert ( p1.cptr() == p2.cptr() ); assert ( p1 == p2 ); } diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/GenericMuonSimHitCollectionCnv_p1_test.cxx b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/GenericMuonSimHitCollectionCnv_p1_test.cxx index 834e29f59d5de6f42a65a8240a3bf65b45569ddd..c6af7c665391ad7bc2a838fbf92a7becd4f823eb 100644 --- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/GenericMuonSimHitCollectionCnv_p1_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/GenericMuonSimHitCollectionCnv_p1_test.cxx @@ -28,6 +28,7 @@ void compare (const HepMcParticleLink& p1, assert ( p1.isValid() == p2.isValid() ); assert ( p1.barcode() == p2.barcode() ); assert ( p1.eventIndex() == p2.eventIndex() ); + assert ( p1.getEventCollectionAsChar() == p2.getEventCollectionAsChar() ); assert ( p1.cptr() == p2.cptr() ); assert ( p1 == p2 ); } diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/GenericMuonSimHitCollectionCnv_p2_test.cxx b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/GenericMuonSimHitCollectionCnv_p2_test.cxx index a17aca581dddb8b8a7a537fab82686af9c91c2a8..ca40dd29e9b50ec18ad32f4ee100d5e8312d1bd7 100644 --- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/GenericMuonSimHitCollectionCnv_p2_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/GenericMuonSimHitCollectionCnv_p2_test.cxx @@ -27,6 +27,7 @@ void compare (const HepMcParticleLink& p1, assert ( p1.isValid() == p2.isValid() ); assert ( p1.barcode() == p2.barcode() ); assert ( p1.eventIndex() == p2.eventIndex() ); + assert ( p1.getEventCollectionAsChar() == p2.getEventCollectionAsChar() ); assert ( p1.cptr() == p2.cptr() ); assert ( p1 == p2 ); } diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/MDTSimHitCollectionCnv_p1_test.cxx b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/MDTSimHitCollectionCnv_p1_test.cxx index 9f12d9f79450db9d1a7ae262aa7ae7cd32b9059c..ca4d16d12f6f725f9049a08ee284183edd511434 100644 --- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/MDTSimHitCollectionCnv_p1_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/MDTSimHitCollectionCnv_p1_test.cxx @@ -28,6 +28,7 @@ void compare (const HepMcParticleLink& p1, assert ( p1.isValid() == p2.isValid() ); assert ( p1.barcode() == p2.barcode() ); assert ( p1.eventIndex() == p2.eventIndex() ); + assert ( p1.getEventCollectionAsChar() == p2.getEventCollectionAsChar() ); assert ( p1.cptr() == p2.cptr() ); assert ( p1 == p2 ); } diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/MDTSimHitCollectionCnv_p2_test.cxx b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/MDTSimHitCollectionCnv_p2_test.cxx index 9b3aeb2dbca8bb82d407a58c25412c0847bf7f87..a5ff003523f4b5e509a7e7336ab7499fbcf11b15 100644 --- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/MDTSimHitCollectionCnv_p2_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/MDTSimHitCollectionCnv_p2_test.cxx @@ -28,6 +28,7 @@ void compare (const HepMcParticleLink& p1, assert ( p1.isValid() == p2.isValid() ); assert ( p1.barcode() == p2.barcode() ); assert ( p1.eventIndex() == p2.eventIndex() ); + assert ( p1.getEventCollectionAsChar() == p2.getEventCollectionAsChar() ); assert ( p1.cptr() == p2.cptr() ); assert ( p1 == p2 ); } diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/MDTSimHitCollectionCnv_p3_test.cxx b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/MDTSimHitCollectionCnv_p3_test.cxx index a18618673f315be844f2cb73858ae0cd102de571..9aaea2e3d299cd64d256a7194e6c8cc039d71149 100644 --- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/MDTSimHitCollectionCnv_p3_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/MDTSimHitCollectionCnv_p3_test.cxx @@ -28,6 +28,7 @@ void compare (const HepMcParticleLink& p1, assert ( p1.isValid() == p2.isValid() ); assert ( p1.barcode() == p2.barcode() ); assert ( p1.eventIndex() == p2.eventIndex() ); + assert ( p1.getEventCollectionAsChar() == p2.getEventCollectionAsChar() ); assert ( p1.cptr() == p2.cptr() ); assert ( p1 == p2 ); } diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/RPCSimHitCollectionCnv_p1_test.cxx b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/RPCSimHitCollectionCnv_p1_test.cxx index 5fad00aaaeacb81c9d1ef05dfa049c0251abdbe2..b674908b80536f89444593590371f5f454b08028 100644 --- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/RPCSimHitCollectionCnv_p1_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/RPCSimHitCollectionCnv_p1_test.cxx @@ -28,6 +28,7 @@ void compare (const HepMcParticleLink& p1, assert ( p1.isValid() == p2.isValid() ); assert ( p1.barcode() == p2.barcode() ); assert ( p1.eventIndex() == p2.eventIndex() ); + assert ( p1.getEventCollectionAsChar() == p2.getEventCollectionAsChar() ); assert ( p1.cptr() == p2.cptr() ); assert ( p1 == p2 ); } diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/RPCSimHitCollectionCnv_p2_test.cxx b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/RPCSimHitCollectionCnv_p2_test.cxx index 98501c7383dd278c6e53293132ba3e86ef7f6aad..d4d4a66e1a6397cdf2508076c82d20ff79f1bd16 100644 --- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/RPCSimHitCollectionCnv_p2_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/RPCSimHitCollectionCnv_p2_test.cxx @@ -28,6 +28,7 @@ void compare (const HepMcParticleLink& p1, assert ( p1.isValid() == p2.isValid() ); assert ( p1.barcode() == p2.barcode() ); assert ( p1.eventIndex() == p2.eventIndex() ); + assert ( p1.getEventCollectionAsChar() == p2.getEventCollectionAsChar() ); assert ( p1.cptr() == p2.cptr() ); assert ( p1 == p2 ); } diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/RPCSimHitCollectionCnv_p3_test.cxx b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/RPCSimHitCollectionCnv_p3_test.cxx index b42dbf0fab2621c5088c96763aa54cbf141afbf5..f9e0b39b12329ad48071489467948a2870d6a9b5 100644 --- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/RPCSimHitCollectionCnv_p3_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/RPCSimHitCollectionCnv_p3_test.cxx @@ -28,6 +28,7 @@ void compare (const HepMcParticleLink& p1, assert ( p1.isValid() == p2.isValid() ); assert ( p1.barcode() == p2.barcode() ); assert ( p1.eventIndex() == p2.eventIndex() ); + assert ( p1.getEventCollectionAsChar() == p2.getEventCollectionAsChar() ); assert ( p1.cptr() == p2.cptr() ); assert ( p1 == p2 ); } diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/TGCSimHitCollectionCnv_p1_test.cxx b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/TGCSimHitCollectionCnv_p1_test.cxx index f601db0c1d2b67e60062d6d9594df9103b2f49e5..88da4f2b7b12f27ea751a162aba06c1b01081dd5 100644 --- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/TGCSimHitCollectionCnv_p1_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/TGCSimHitCollectionCnv_p1_test.cxx @@ -28,6 +28,7 @@ void compare (const HepMcParticleLink& p1, assert ( p1.isValid() == p2.isValid() ); assert ( p1.barcode() == p2.barcode() ); assert ( p1.eventIndex() == p2.eventIndex() ); + assert ( p1.getEventCollectionAsChar() == p2.getEventCollectionAsChar() ); assert ( p1.cptr() == p2.cptr() ); assert ( p1 == p2 ); } diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/TGCSimHitCollectionCnv_p2_test.cxx b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/TGCSimHitCollectionCnv_p2_test.cxx index f7adcfbce9de148b590c8ebe2c3e28fd16f146bb..9a75089345e8d48adb8d09b8e0eb9b9309af0762 100644 --- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/TGCSimHitCollectionCnv_p2_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/TGCSimHitCollectionCnv_p2_test.cxx @@ -28,6 +28,7 @@ void compare (const HepMcParticleLink& p1, assert ( p1.isValid() == p2.isValid() ); assert ( p1.barcode() == p2.barcode() ); assert ( p1.eventIndex() == p2.eventIndex() ); + assert ( p1.getEventCollectionAsChar() == p2.getEventCollectionAsChar() ); assert ( p1.cptr() == p2.cptr() ); assert ( p1 == p2 ); } diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/TGCSimHitCollectionCnv_p3_test.cxx b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/TGCSimHitCollectionCnv_p3_test.cxx index c3baa29f0e6132c1e5f2edb101edfa0f4858c3d7..e81dceff1a47057a602fd16ab08232c711fac8e8 100644 --- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/TGCSimHitCollectionCnv_p3_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/TGCSimHitCollectionCnv_p3_test.cxx @@ -28,6 +28,7 @@ void compare (const HepMcParticleLink& p1, assert ( p1.isValid() == p2.isValid() ); assert ( p1.barcode() == p2.barcode() ); assert ( p1.eventIndex() == p2.eventIndex() ); + assert ( p1.getEventCollectionAsChar() == p2.getEventCollectionAsChar() ); assert ( p1.cptr() == p2.cptr() ); assert ( p1 == p2 ); } diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/TGCSimHitCollectionCnv_p4_test.cxx b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/TGCSimHitCollectionCnv_p4_test.cxx index 1ab0281b7f1754f55470206f1b5778e1e0c141f2..d2994015bcb234fee30d2f71c737a714eb6a42d8 100644 --- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/TGCSimHitCollectionCnv_p4_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/TGCSimHitCollectionCnv_p4_test.cxx @@ -28,6 +28,7 @@ void compare (const HepMcParticleLink& p1, assert ( p1.isValid() == p2.isValid() ); assert ( p1.barcode() == p2.barcode() ); assert ( p1.eventIndex() == p2.eventIndex() ); + assert ( p1.getEventCollectionAsChar() == p2.getEventCollectionAsChar() ); assert ( p1.cptr() == p2.cptr() ); assert ( p1 == p2 ); } diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/sTGCSimHitCollectionCnv_p1_test.cxx b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/sTGCSimHitCollectionCnv_p1_test.cxx index 7bf1e66c66711b238947cbb9e22e8e17d2efceab..7db92b3901bb47ee400bee2684c29d1135c11cf7 100644 --- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/sTGCSimHitCollectionCnv_p1_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/sTGCSimHitCollectionCnv_p1_test.cxx @@ -27,6 +27,7 @@ void compare (const HepMcParticleLink& p1, assert ( p1.isValid() == p2.isValid() ); assert ( p1.barcode() == p2.barcode() ); assert ( p1.eventIndex() == p2.eventIndex() ); + assert ( p1.getEventCollectionAsChar() == p2.getEventCollectionAsChar() ); assert ( p1.cptr() == p2.cptr() ); assert ( p1 == p2 ); } diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/sTGCSimHitCollectionCnv_p2_test.cxx b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/sTGCSimHitCollectionCnv_p2_test.cxx index 04918d01d9cb2d9c868344f3ae1f2cb169fd709f..0fbca4423c99526b4118f93cc2847e5e1d79ebcf 100644 --- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/sTGCSimHitCollectionCnv_p2_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/test/sTGCSimHitCollectionCnv_p2_test.cxx @@ -35,6 +35,7 @@ void compare (const HepMcParticleLink& p1, assert ( p1.isValid() == p2.isValid() ); assert ( p1.barcode() == p2.barcode() ); assert ( p1.eventIndex() == p2.eventIndex() ); + assert ( p1.getEventCollectionAsChar() == p2.getEventCollectionAsChar() ); assert ( p1.cptr() == p2.cptr() ); assert ( p1 == p2 ); } diff --git a/MuonSpectrometer/MuonConfig/python/MuonBytestreamDecodeConfig.py b/MuonSpectrometer/MuonConfig/python/MuonBytestreamDecodeConfig.py index c955ef8947c05c0b99a72d72b31bdaa652e182ee..d16cc4169b8486afd87ac7d278634a00a1b516ce 100644 --- a/MuonSpectrometer/MuonConfig/python/MuonBytestreamDecodeConfig.py +++ b/MuonSpectrometer/MuonConfig/python/MuonBytestreamDecodeConfig.py @@ -24,7 +24,7 @@ def MuonCacheCfg(): RpcCacheKey = MuonCacheNames.RpcCache, TgcCacheKey = MuonCacheNames.TgcCache) acc.addEventAlgo( cacheCreator ) - return acc, cacheCreator + return acc ## This configuration function sets up everything for decoding RPC bytestream data into RDOs @@ -139,9 +139,6 @@ def MdtBytestreamDecodeCfg(flags, forTrigger=False): Decoder = MDTRodDecoder) if forTrigger: - # Trigger the creation of cache containers - cacheAcc,cacheAlg = MuonCacheCfg() - acc.merge( cacheAcc ) # tell the raw data provider tool to use the cache MuonMdtRawDataProviderTool.CsmContainerCacheKey = MuonCacheNames.MdtCsmCache @@ -179,9 +176,6 @@ def CscBytestreamDecodeCfg(flags, forTrigger=False): MuonCscRawDataProviderTool = Muon__CSC_RawDataProviderTool(name = "CSC_RawDataProviderTool", Decoder = CSCRodDecoder) if forTrigger: - # Trigger the creation of cache containers - cacheAcc,cacheAlg = MuonCacheCfg() - acc.merge( cacheAcc ) # tell the raw data provider tool to use the cache MuonCscRawDataProviderTool.CscContainerCacheKey = MuonCacheNames.CscCache diff --git a/MuonSpectrometer/MuonConfig/python/MuonRdoDecodeConfig.py b/MuonSpectrometer/MuonConfig/python/MuonRdoDecodeConfig.py index 241ef97febf3a4c2ef1c7353805595d8aef9e7c3..2dd797cbcca278bfc20caabcadad6bef26006bb5 100644 --- a/MuonSpectrometer/MuonConfig/python/MuonRdoDecodeConfig.py +++ b/MuonSpectrometer/MuonConfig/python/MuonRdoDecodeConfig.py @@ -174,6 +174,11 @@ def muonRdoDecodeTestData( forTrigger = False ): from ByteStreamCnvSvc.ByteStreamConfig import TrigBSReadCfg cfg.merge(TrigBSReadCfg(ConfigFlags )) + if forTrigger: + # cache creators loaded independently + from MuonConfig.MuonBytestreamDecodeConfig import MuonCacheCfg + cfg.merge( MuonCacheCfg() ) + # Schedule Rpc bytestream data decoding - once mergeAll is working can simplify these lines from MuonConfig.MuonBytestreamDecodeConfig import RpcBytestreamDecodeCfg rpcdecodingAcc, rpcdecodingAlg = RpcBytestreamDecodeCfg( ConfigFlags, forTrigger ) diff --git a/MuonSpectrometer/MuonConfig/share/MuonDataDecodeTest.ref b/MuonSpectrometer/MuonConfig/share/MuonDataDecodeTest.ref index 11fd69c71ab98abecbd458bd4d626478a0a80bc5..9ad83eb8eb9f444bba4c86a9221666c6382c17b1 100644 --- a/MuonSpectrometer/MuonConfig/share/MuonDataDecodeTest.ref +++ b/MuonSpectrometer/MuonConfig/share/MuonDataDecodeTest.ref @@ -1,44 +1,9 @@ Flag Name : Value -Beam.BunchSpacing : 25 -Beam.Energy : [function] -Beam.NumberOfCollisions : 0 -Beam.Type : 'collisions' -Beam.estimatedLuminosity : [function] -Calo.Noise.fixedLumiForNoise : -1 -Calo.Noise.useCaloNoiseLumi : True -Calo.TopoCluster.doTreatEnergyCutAsAbsol : False -Calo.TopoCluster.doTwoGaussianNoise : True -Common.Project : 'Athena' -Common.isOnline : False -Concurrency.NumConcurrentEvents : 0 -Concurrency.NumProcs : 0 -Concurrency.NumThreads : 0 -GeoModel.Align.Dynamic : [function] -GeoModel.AtlasVersion : 'ATLAS-R2-2016-01-00-01' -GeoModel.Layout : 'atlas' -GeoModel.Run : 'RUN2' -GeoModel.StripGeoType : 'GMX' -IOVDb.DatabaseInstance : [function] -IOVDb.GlobalTag : 'CONDBR2-BLKPA-2018-13' -Input.Files : ['/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1'] -Input.ProjectName : [function] -Input.RunNumber : [function] -Input.isMC : [function] -Output.AODFileName : 'myAOD.pool.root' -Output.ESDFileName : 'myESD.pool.root' -Output.EVNTFileName : 'myEVNT.pool.root' -Output.HISTFileName : 'myHIST.root' -Output.HITSFileName : 'myHITS.pool.root' -Output.RDOFileName : 'myROD.pool.root' -Output.doESD : False -Scheduler.CheckDependencies : True -Scheduler.ShowControlFlow : False -Scheduler.ShowDataDeps : False -Scheduler.ShowDataFlow : False Flag categories that can be loaded dynamically Category : Generator name : Defined in DQ : __dq : AthenaConfiguration/AllConfigFlags.py Detector : __detector : AthenaConfiguration/AllConfigFlags.py +Egamma : __egamma : AthenaConfiguration/AllConfigFlags.py LAr : __lar : AthenaConfiguration/AllConfigFlags.py Muon : __muon : AthenaConfiguration/AllConfigFlags.py Sim : __simulation : AthenaConfiguration/AllConfigFlags.py @@ -71,116 +36,12 @@ Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderS Py:ComponentAccumulator DEBUG Adding component ByteStreamAttListMetadataSvc/ByteStreamAttListMetadataSvc to the job Py:ComponentAccumulator DEBUG Adding component IOVDbMetaDataTool/IOVDbMetaDataTool to the job Py:ComponentAccumulator DEBUG Adding component ByteStreamMetadataTool/ByteStreamMetadataTool to the job -Py:Athena INFO using release [AthenaExternals-22.0.1] [x86_64-slc6-gcc8-opt] [2.0.22/2840e19] -- built on [2019-02-26T2109] dynamically loading the flag Detector Flag Name : Value -Beam.BunchSpacing : 25 -Beam.Energy : [function] -Beam.NumberOfCollisions : 0 -Beam.Type : 'collisions' -Beam.estimatedLuminosity : [function] -Calo.Noise.fixedLumiForNoise : -1 -Calo.Noise.useCaloNoiseLumi : True -Calo.TopoCluster.doTreatEnergyCutAsAbsol : False -Calo.TopoCluster.doTwoGaussianNoise : True -Common.Project : 'Athena' -Common.isOnline : False -Concurrency.NumConcurrentEvents : 0 -Concurrency.NumProcs : 0 -Concurrency.NumThreads : 0 -Detector.Geometry : [function] -Detector.GeometryAFP : False -Detector.GeometryALFA : False -Detector.GeometryBCM : False -Detector.GeometryBpipe : False -Detector.GeometryCSC : False -Detector.GeometryCalo : [function] -Detector.GeometryCavern : False -Detector.GeometryDBM : False -Detector.GeometryForward : [function] -Detector.GeometryFwdRegion : False -Detector.GeometryID : [function] -Detector.GeometryLAr : False -Detector.GeometryLucid : False -Detector.GeometryMDT : False -Detector.GeometryMM : False -Detector.GeometryMuon : [function] -Detector.GeometryPixel : False -Detector.GeometryRPC : False -Detector.GeometrySCT : False -Detector.GeometryTGC : False -Detector.GeometryTRT : False -Detector.GeometryTile : False -Detector.GeometryZDC : False -Detector.GeometrysTGC : False -Detector.Overlay : [function] -Detector.OverlayBCM : False -Detector.OverlayCSC : False -Detector.OverlayCalo : [function] -Detector.OverlayDBM : False -Detector.OverlayID : [function] -Detector.OverlayLAr : False -Detector.OverlayMDT : False -Detector.OverlayMM : False -Detector.OverlayMuon : [function] -Detector.OverlayPixel : False -Detector.OverlayRPC : False -Detector.OverlaySCT : False -Detector.OverlayTGC : False -Detector.OverlayTRT : False -Detector.OverlayTile : False -Detector.OverlaysTGC : False -Detector.Simulate : [function] -Detector.SimulateAFP : False -Detector.SimulateALFA : False -Detector.SimulateBCM : False -Detector.SimulateBpipe : False -Detector.SimulateCSC : False -Detector.SimulateCalo : [function] -Detector.SimulateCavern : False -Detector.SimulateDBM : False -Detector.SimulateForward : [function] -Detector.SimulateFwdRegion : False -Detector.SimulateHGTD : False -Detector.SimulateID : [function] -Detector.SimulateLAr : False -Detector.SimulateLucid : False -Detector.SimulateMDT : False -Detector.SimulateMM : False -Detector.SimulateMuon : [function] -Detector.SimulatePixel : False -Detector.SimulateRPC : False -Detector.SimulateSCT : False -Detector.SimulateTGC : False -Detector.SimulateTRT : False -Detector.SimulateTile : False -Detector.SimulateZDC : False -Detector.SimulatesTGC : False -GeoModel.Align.Dynamic : [function] -GeoModel.AtlasVersion : 'ATLAS-R2-2016-01-00-01' -GeoModel.Layout : 'atlas' -GeoModel.Run : 'RUN2' -GeoModel.StripGeoType : 'GMX' -IOVDb.DatabaseInstance : [function] -IOVDb.GlobalTag : 'CONDBR2-BLKPA-2018-13' -Input.Files : ['/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1'] -Input.ProjectName : [function] -Input.RunNumber : [function] -Input.isMC : False -Output.AODFileName : 'myAOD.pool.root' -Output.ESDFileName : 'myESD.pool.root' -Output.EVNTFileName : 'myEVNT.pool.root' -Output.HISTFileName : 'myHIST.root' -Output.HITSFileName : 'myHITS.pool.root' -Output.RDOFileName : 'myROD.pool.root' -Output.doESD : False -Scheduler.CheckDependencies : True -Scheduler.ShowControlFlow : False -Scheduler.ShowDataDeps : False -Scheduler.ShowDataFlow : False Flag categories that can be loaded dynamically Category : Generator name : Defined in DQ : __dq : AthenaConfiguration/AllConfigFlags.py +Egamma : __egamma : AthenaConfiguration/AllConfigFlags.py LAr : __lar : AthenaConfiguration/AllConfigFlags.py Muon : __muon : AthenaConfiguration/AllConfigFlags.py Sim : __simulation : AthenaConfiguration/AllConfigFlags.py @@ -192,15 +53,12 @@ Py:ComponentAccumulator DEBUG Adding component TagInfoMgr/TagInfoMgr to the jo Py:ComponentAccumulator DEBUG Adding component EvtPersistencySvc/EventPersistencySvc to the job Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job Py:ComponentAccumulator DEBUG Adding component TagInfoMgr/TagInfoMgr to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component TagInfoMgr -Py:ComponentAccumulator DEBUG Reconciled configuration of component EventPersistencySvc Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job Py:ComponentAccumulator DEBUG Adding component GeoModelSvc/GeoModelSvc to the job Py:ComponentAccumulator DEBUG Adding component DetDescrCnvSvc/DetDescrCnvSvc to the job Py:ComponentAccumulator DEBUG Adding component EvtPersistencySvc/EventPersistencySvc to the job Py:ComponentAccumulator DEBUG Adding component TagInfoMgr/TagInfoMgr to the job Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component GeoModelSvc Py:ComponentAccumulator DEBUG Adding component Muon::MuonIdHelperTool/Muon::MuonIdHelperTool to the job Py:ComponentAccumulator DEBUG Adding component GeoModelSvc/GeoModelSvc to the job Py:ComponentAccumulator DEBUG Adding component DetDescrCnvSvc/DetDescrCnvSvc to the job @@ -219,7 +77,6 @@ Py:ComponentAccumulator DEBUG Adding component CondInputLoader/CondInputLoader Py:ComponentAccumulator DEBUG Adding component IOVDbSvc/IOVDbSvc to the job Py:ComponentAccumulator DEBUG Adding component PoolSvc/PoolSvc to the job Py:ComponentAccumulator DEBUG Adding component CondSvc/CondSvc to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component ProxyProviderSvc Py:ComponentAccumulator DEBUG Adding component DBReplicaSvc/DBReplicaSvc to the job Py:ComponentAccumulator DEBUG Adding component RPCCablingDbTool/RPCCablingDbTool to the job Py:ComponentAccumulator DEBUG Adding component MuonRPC_CablingSvc/MuonRPC_CablingSvc to the job @@ -244,37 +101,25 @@ Py:ComponentAccumulator DEBUG Adding component TagInfoMgr/TagInfoMgr to the jo Py:ComponentAccumulator DEBUG Adding component EvtPersistencySvc/EventPersistencySvc to the job Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job Py:ComponentAccumulator DEBUG Adding component TagInfoMgr/TagInfoMgr to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component TagInfoMgr -Py:ComponentAccumulator DEBUG Reconciled configuration of component EventPersistencySvc Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job Py:ComponentAccumulator DEBUG Adding component GeoModelSvc/GeoModelSvc to the job Py:ComponentAccumulator DEBUG Adding component DetDescrCnvSvc/DetDescrCnvSvc to the job Py:ComponentAccumulator DEBUG Adding component EvtPersistencySvc/EventPersistencySvc to the job Py:ComponentAccumulator DEBUG Adding component TagInfoMgr/TagInfoMgr to the job Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component GeoModelSvc Py:ComponentAccumulator DEBUG Adding component Muon::MuonIdHelperTool/Muon::MuonIdHelperTool to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component GeoModelSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component DetDescrCnvSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component EventPersistencySvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component TagInfoMgr -Py:ComponentAccumulator DEBUG Reconciled configuration of component ProxyProviderSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component ToolSvc.Muon::MuonIdHelperTool Py:ComponentAccumulator DEBUG Adding component ROBDataProviderSvc/ROBDataProviderSvc to the job Py:ComponentAccumulator DEBUG Adding component Muon::RPC_RawDataProviderTool/RPC_RawDataProviderTool to the job Py:ComponentAccumulator DEBUG Adding component CondInputLoader/CondInputLoader to the job Py:ComponentAccumulator DEBUG Adding component GeoModelSvc/GeoModelSvc to the job Py:ComponentAccumulator DEBUG Adding component DetDescrCnvSvc/DetDescrCnvSvc to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component EventPersistencySvc Py:ComponentAccumulator DEBUG Adding component TagInfoMgr/TagInfoMgr to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component ProxyProviderSvc Py:ComponentAccumulator DEBUG Adding component RPCcablingServerSvc/RPCcablingServerSvc to the job Py:ComponentAccumulator DEBUG Adding component IOVDbSvc/IOVDbSvc to the job Py:ComponentAccumulator DEBUG Adding component PoolSvc/PoolSvc to the job Py:ComponentAccumulator DEBUG Adding component CondSvc/CondSvc to the job Py:ComponentAccumulator DEBUG Adding component DBReplicaSvc/DBReplicaSvc to the job Py:ComponentAccumulator DEBUG Adding component MuonRPC_CablingSvc/MuonRPC_CablingSvc to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component ROBDataProviderSvc Py:ComponentAccumulator DEBUG Adding component Muon::MuonIdHelperTool/Muon::MuonIdHelperTool to the job Py:ComponentAccumulator DEBUG Adding component RPCCablingDbTool/RPCCablingDbTool to the job Py:ComponentAccumulator DEBUG Adding component Muon::RPC_RawDataProviderTool/RPC_RawDataProviderTool to the job @@ -285,15 +130,12 @@ Py:ComponentAccumulator DEBUG Adding component TagInfoMgr/TagInfoMgr to the jo Py:ComponentAccumulator DEBUG Adding component EvtPersistencySvc/EventPersistencySvc to the job Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job Py:ComponentAccumulator DEBUG Adding component TagInfoMgr/TagInfoMgr to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component TagInfoMgr -Py:ComponentAccumulator DEBUG Reconciled configuration of component EventPersistencySvc Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job Py:ComponentAccumulator DEBUG Adding component GeoModelSvc/GeoModelSvc to the job Py:ComponentAccumulator DEBUG Adding component DetDescrCnvSvc/DetDescrCnvSvc to the job Py:ComponentAccumulator DEBUG Adding component EvtPersistencySvc/EventPersistencySvc to the job Py:ComponentAccumulator DEBUG Adding component TagInfoMgr/TagInfoMgr to the job Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component GeoModelSvc Py:ComponentAccumulator DEBUG Adding component Muon::MuonIdHelperTool/Muon::MuonIdHelperTool to the job Py:ComponentAccumulator DEBUG Adding component GeoModelSvc/GeoModelSvc to the job Py:ComponentAccumulator DEBUG Adding component DetDescrCnvSvc/DetDescrCnvSvc to the job @@ -313,7 +155,6 @@ Py:ComponentAccumulator DEBUG Adding component CondInputLoader/CondInputLoader Py:ComponentAccumulator DEBUG Adding component IOVDbSvc/IOVDbSvc to the job Py:ComponentAccumulator DEBUG Adding component PoolSvc/PoolSvc to the job Py:ComponentAccumulator DEBUG Adding component CondSvc/CondSvc to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component ProxyProviderSvc Py:ComponentAccumulator DEBUG Adding component DBReplicaSvc/DBReplicaSvc to the job Py:ComponentAccumulator DEBUG Adding component CondInputLoader/CondInputLoader to the job Py:ComponentAccumulator DEBUG Adding component GeoModelSvc/GeoModelSvc to the job @@ -335,38 +176,17 @@ Py:ComponentAccumulator DEBUG Adding component TagInfoMgr/TagInfoMgr to the jo Py:ComponentAccumulator DEBUG Adding component EvtPersistencySvc/EventPersistencySvc to the job Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job Py:ComponentAccumulator DEBUG Adding component TagInfoMgr/TagInfoMgr to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component TagInfoMgr -Py:ComponentAccumulator DEBUG Reconciled configuration of component EventPersistencySvc Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job Py:ComponentAccumulator DEBUG Adding component GeoModelSvc/GeoModelSvc to the job Py:ComponentAccumulator DEBUG Adding component DetDescrCnvSvc/DetDescrCnvSvc to the job Py:ComponentAccumulator DEBUG Adding component EvtPersistencySvc/EventPersistencySvc to the job Py:ComponentAccumulator DEBUG Adding component TagInfoMgr/TagInfoMgr to the job Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component GeoModelSvc Py:ComponentAccumulator DEBUG Adding component Muon::MuonIdHelperTool/Muon::MuonIdHelperTool to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component GeoModelSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component DetDescrCnvSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component EventPersistencySvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component TagInfoMgr -Py:ComponentAccumulator DEBUG Reconciled configuration of component ProxyProviderSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component ToolSvc.Muon::MuonIdHelperTool Py:ComponentAccumulator DEBUG Adding component ROBDataProviderSvc/ROBDataProviderSvc to the job Py:ComponentAccumulator DEBUG Adding component Muon::TGC_RawDataProviderTool/TGC_RawDataProviderTool to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component CondInputLoader -Py:ComponentAccumulator DEBUG Reconciled configuration of component GeoModelSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component DetDescrCnvSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component EventPersistencySvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component TagInfoMgr -Py:ComponentAccumulator DEBUG Reconciled configuration of component ProxyProviderSvc Py:ComponentAccumulator DEBUG Adding component LVL1TGC::TGCRecRoiSvc/LVL1TGC::TGCRecRoiSvc to the job Py:ComponentAccumulator DEBUG Adding component TGCcablingServerSvc/TGCcablingServerSvc to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component IOVDbSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component PoolSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component CondSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component DBReplicaSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component ROBDataProviderSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component ToolSvc.Muon::MuonIdHelperTool Py:ComponentAccumulator DEBUG Adding component Muon::TGC_RawDataProviderTool/TGC_RawDataProviderTool to the job Py:ComponentAccumulator DEBUG Adding component GeoModelSvc/GeoModelSvc to the job Py:ComponentAccumulator DEBUG Adding component DetDescrCnvSvc/DetDescrCnvSvc to the job @@ -375,15 +195,12 @@ Py:ComponentAccumulator DEBUG Adding component TagInfoMgr/TagInfoMgr to the jo Py:ComponentAccumulator DEBUG Adding component EvtPersistencySvc/EventPersistencySvc to the job Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job Py:ComponentAccumulator DEBUG Adding component TagInfoMgr/TagInfoMgr to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component TagInfoMgr -Py:ComponentAccumulator DEBUG Reconciled configuration of component EventPersistencySvc Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job Py:ComponentAccumulator DEBUG Adding component GeoModelSvc/GeoModelSvc to the job Py:ComponentAccumulator DEBUG Adding component DetDescrCnvSvc/DetDescrCnvSvc to the job Py:ComponentAccumulator DEBUG Adding component EvtPersistencySvc/EventPersistencySvc to the job Py:ComponentAccumulator DEBUG Adding component TagInfoMgr/TagInfoMgr to the job Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component GeoModelSvc Py:ComponentAccumulator DEBUG Adding component Muon::MuonIdHelperTool/Muon::MuonIdHelperTool to the job Py:ComponentAccumulator DEBUG Adding component GeoModelSvc/GeoModelSvc to the job Py:ComponentAccumulator DEBUG Adding component DetDescrCnvSvc/DetDescrCnvSvc to the job @@ -403,10 +220,8 @@ Py:ComponentAccumulator DEBUG Adding component CondInputLoader/CondInputLoader Py:ComponentAccumulator DEBUG Adding component IOVDbSvc/IOVDbSvc to the job Py:ComponentAccumulator DEBUG Adding component PoolSvc/PoolSvc to the job Py:ComponentAccumulator DEBUG Adding component CondSvc/CondSvc to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component ProxyProviderSvc Py:ComponentAccumulator DEBUG Adding component DBReplicaSvc/DBReplicaSvc to the job Py:ComponentAccumulator DEBUG Adding component AthenaPoolCnvSvc/AthenaPoolCnvSvc to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component EventPersistencySvc Py:ComponentAccumulator DEBUG Adding component MuonMDT_CablingAlg/MuonMDT_CablingAlg to the job Py:ComponentAccumulator DEBUG Adding component MDTCablingDbTool/MDTCablingDbTool to the job Py:ComponentAccumulator DEBUG Adding component MuonMDT_CablingSvc/MuonMDT_CablingSvc to the job @@ -447,12 +262,6 @@ Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderS Py:ComponentAccumulator DEBUG Adding component DBReplicaSvc/DBReplicaSvc to the job Py:ComponentAccumulator DEBUG Adding component AthenaPoolCnvSvc/AthenaPoolCnvSvc to the job Py:ComponentAccumulator DEBUG Adding component EvtPersistencySvc/EventPersistencySvc to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component CondInputLoader -Py:ComponentAccumulator DEBUG Reconciled configuration of component IOVDbSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component PoolSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component CondSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component ProxyProviderSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component DBReplicaSvc Py:ComponentAccumulator DEBUG Adding component AthenaPoolCnvSvc/AthenaPoolCnvSvc to the job Py:ComponentAccumulator DEBUG Adding component EvtPersistencySvc/EventPersistencySvc to the job Py:ComponentAccumulator DEBUG Adding component MagField::AtlasFieldSvc/AtlasFieldSvc to the job @@ -467,169 +276,10 @@ Py:ComponentAccumulator DEBUG Adding component EvtPersistencySvc/EventPersiste Py:ComponentAccumulator DEBUG Adding component MagField::AtlasFieldSvc/AtlasFieldSvc to the job dynamically loading the flag Muon Flag Name : Value -Beam.BunchSpacing : 25 -Beam.Energy : [function] -Beam.NumberOfCollisions : 0 -Beam.Type : 'collisions' -Beam.estimatedLuminosity : [function] -Calo.Noise.fixedLumiForNoise : -1 -Calo.Noise.useCaloNoiseLumi : True -Calo.TopoCluster.doTreatEnergyCutAsAbsol : False -Calo.TopoCluster.doTwoGaussianNoise : True -Common.Project : 'Athena' -Common.isOnline : False -Concurrency.NumConcurrentEvents : 0 -Concurrency.NumProcs : 0 -Concurrency.NumThreads : 0 -Detector.Geometry : [function] -Detector.GeometryAFP : False -Detector.GeometryALFA : False -Detector.GeometryBCM : False -Detector.GeometryBpipe : False -Detector.GeometryCSC : False -Detector.GeometryCalo : [function] -Detector.GeometryCavern : False -Detector.GeometryDBM : False -Detector.GeometryForward : [function] -Detector.GeometryFwdRegion : False -Detector.GeometryID : [function] -Detector.GeometryLAr : False -Detector.GeometryLucid : False -Detector.GeometryMDT : False -Detector.GeometryMM : False -Detector.GeometryMuon : [function] -Detector.GeometryPixel : False -Detector.GeometryRPC : False -Detector.GeometrySCT : False -Detector.GeometryTGC : False -Detector.GeometryTRT : False -Detector.GeometryTile : False -Detector.GeometryZDC : False -Detector.GeometrysTGC : False -Detector.Overlay : [function] -Detector.OverlayBCM : False -Detector.OverlayCSC : False -Detector.OverlayCalo : [function] -Detector.OverlayDBM : False -Detector.OverlayID : [function] -Detector.OverlayLAr : False -Detector.OverlayMDT : False -Detector.OverlayMM : False -Detector.OverlayMuon : [function] -Detector.OverlayPixel : False -Detector.OverlayRPC : False -Detector.OverlaySCT : False -Detector.OverlayTGC : False -Detector.OverlayTRT : False -Detector.OverlayTile : False -Detector.OverlaysTGC : False -Detector.Simulate : False -Detector.SimulateAFP : False -Detector.SimulateALFA : False -Detector.SimulateBCM : False -Detector.SimulateBpipe : False -Detector.SimulateCSC : False -Detector.SimulateCalo : False -Detector.SimulateCavern : False -Detector.SimulateDBM : False -Detector.SimulateForward : False -Detector.SimulateFwdRegion : False -Detector.SimulateHGTD : False -Detector.SimulateID : False -Detector.SimulateLAr : False -Detector.SimulateLucid : False -Detector.SimulateMDT : False -Detector.SimulateMM : False -Detector.SimulateMuon : False -Detector.SimulatePixel : False -Detector.SimulateRPC : False -Detector.SimulateSCT : False -Detector.SimulateTGC : False -Detector.SimulateTRT : False -Detector.SimulateTile : False -Detector.SimulateZDC : False -Detector.SimulatesTGC : False -GeoModel.Align.Dynamic : [function] -GeoModel.AtlasVersion : 'ATLAS-R2-2016-01-00-01' -GeoModel.Layout : 'atlas' -GeoModel.Run : 'RUN2' -GeoModel.StripGeoType : 'GMX' -IOVDb.DatabaseInstance : 'CONDBR2' -IOVDb.GlobalTag : 'CONDBR2-BLKPA-2018-13' -Input.Files : ['/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1'] -Input.ProjectName : 'data17_13TeV' -Input.RunNumber : [function] -Input.isMC : False -Muon.Align.UseALines : False -Muon.Align.UseAsBuilt : False -Muon.Align.UseBLines : 'none' -Muon.Align.UseILines : False -Muon.Calib.CscF001FromLocalFile : False -Muon.Calib.CscNoiseFromLocalFile : False -Muon.Calib.CscPSlopeFromLocalFile : False -Muon.Calib.CscPedFromLocalFile : False -Muon.Calib.CscRmsFromLocalFile : False -Muon.Calib.CscStatusFromLocalFile : False -Muon.Calib.CscT0BaseFromLocalFile : False -Muon.Calib.CscT0PhaseFromLocalFile : False -Muon.Calib.EventTag : 'MoMu' -Muon.Calib.applyRtScaling : True -Muon.Calib.correctMdtRtForBField : False -Muon.Calib.correctMdtRtForTimeSlewing : False -Muon.Calib.correctMdtRtWireSag : False -Muon.Calib.mdtCalibrationSource : 'MDT' -Muon.Calib.mdtMode : 'ntuple' -Muon.Calib.mdtPropagationSpeedBeta : 0.85 -Muon.Calib.readMDTCalibFromBlob : True -Muon.Calib.useMLRt : True -Muon.Chi2NDofCut : 20.0 -Muon.createTrackParticles : True -Muon.doCSCs : True -Muon.doDigitization : True -Muon.doFastDigitization : False -Muon.doMDTs : True -Muon.doMSVertex : False -Muon.doMicromegas : False -Muon.doPseudoTracking : False -Muon.doRPCClusterSegmentFinding : False -Muon.doRPCs : True -Muon.doSegmentT0Fit : False -Muon.doTGCClusterSegmentFinding : False -Muon.doTGCs : True -Muon.dosTGCs : False -Muon.enableCurvedSegmentFinding : False -Muon.enableErrorTuning : False -Muon.optimiseMomentumResolutionUsingChi2 : False -Muon.patternsOnly : False -Muon.prdToxAOD : False -Muon.printSummary : False -Muon.refinementTool : 'Moore' -Muon.rpcRawToxAOD : False -Muon.segmentOrigin : 'Muon' -Muon.straightLineFitMomentum : 2000.0 -Muon.strategy : [] -Muon.trackBuilder : 'Moore' -Muon.updateSegmentSecondCoordinate : [function] -Muon.useAlignmentCorrections : False -Muon.useLooseErrorTuning : False -Muon.useSegmentMatching : [function] -Muon.useTGCPriorNextBC : False -Muon.useTrackSegmentMatching : True -Muon.useWireSagCorrections : False -Output.AODFileName : 'myAOD.pool.root' -Output.ESDFileName : 'myESD.pool.root' -Output.EVNTFileName : 'myEVNT.pool.root' -Output.HISTFileName : 'myHIST.root' -Output.HITSFileName : 'myHITS.pool.root' -Output.RDOFileName : 'myROD.pool.root' -Output.doESD : False -Scheduler.CheckDependencies : True -Scheduler.ShowControlFlow : False -Scheduler.ShowDataDeps : False -Scheduler.ShowDataFlow : False Flag categories that can be loaded dynamically Category : Generator name : Defined in DQ : __dq : AthenaConfiguration/AllConfigFlags.py +Egamma : __egamma : AthenaConfiguration/AllConfigFlags.py LAr : __lar : AthenaConfiguration/AllConfigFlags.py Sim : __simulation : AthenaConfiguration/AllConfigFlags.py Trigger : __trigger : AthenaConfiguration/AllConfigFlags.py @@ -652,30 +302,12 @@ Py:ComponentAccumulator DEBUG Adding component CondSvc/CondSvc to the job Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job Py:ComponentAccumulator DEBUG Adding component DBReplicaSvc/DBReplicaSvc to the job Py:IOVDbSvc.CondDB DEBUG Loading basic services for CondDBSetup... -Py:ConfigurableDb DEBUG loading confDb files... -Py:ConfigurableDb DEBUG -loading [/home/ppe/i/iconnell/projects/MuonTriggerAthenaMT/build_RPC/x86_64-slc6-gcc8-opt/lib/libMuonRPC_CnvTools.confdb]... -Py:ConfigurableDb DEBUG -loading [/home/ppe/i/iconnell/projects/MuonTriggerAthenaMT/build_RPC/x86_64-slc6-gcc8-opt/lib/WorkDir.confdb]... -Py:ConfigurableDb DEBUG -loading [/cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-02-26T2150/GAUDI/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/lib/Gaudi.confdb]... -Py:ConfigurableDb DEBUG -loading [/cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-02-26T2150/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/lib/Athena.confdb]... -Py:ConfigurableDb DEBUG loading confDb files... [DONE] -Py:ConfigurableDb DEBUG loaded 1103 confDb packages -Py:ConfigurableDb INFO Read module info for 5460 configurables from 4 genConfDb files -Py:ConfigurableDb INFO No duplicates have been found: that's good ! -Py:ConfigurableDb DEBUG : Found configurable <class 'GaudiCoreSvc.GaudiCoreSvcConf.MessageSvc'> in module GaudiCoreSvc.GaudiCoreSvcConf Py:loadBasicAthenaPool DEBUG Loading basic services for AthenaPool... -Py:ConfigurableDb DEBUG : Found configurable <class 'PoolSvc.PoolSvcConf.PoolSvc'> in module PoolSvc.PoolSvcConf -Py:ConfigurableDb DEBUG : Found configurable <class 'AthenaPoolCnvSvc.AthenaPoolCnvSvcConf.AthenaPoolCnvSvc'> in module AthenaPoolCnvSvc.AthenaPoolCnvSvcConf -Py:ConfigurableDb DEBUG : Found configurable <class 'SGComps.SGCompsConf.ProxyProviderSvc'> in module SGComps.SGCompsConf -Py:ConfigurableDb DEBUG : Found configurable <class 'AthenaServices.AthenaServicesConf.MetaDataSvc'> in module AthenaServices.AthenaServicesConf -Py:ConfigurableDb DEBUG : Found configurable <class 'StoreGate.StoreGateConf.StoreGateSvc'> in module StoreGate.StoreGateConf Py:loadBasicAthenaPool DEBUG Loading basic services for AthenaPool... [DONE] Py:loadBasicIOVDb DEBUG Loading basic services for IOVDbSvc... -Py:ConfigurableDb DEBUG : Found configurable <class 'SGComps.SGCompsConf.ProxyProviderSvc'> in module SGComps.SGCompsConf Py:Configurable ERROR attempt to add a duplicate (ServiceManager.ProxyProviderSvc) ... dupe ignored Py:loadBasicEventInfoMgt DEBUG Loading basic services for EventInfoMgt... -EventInfoMgtInit: Got release version Athena-22.0.1 Py:Configurable ERROR attempt to add a duplicate (ServiceManager.EventPersistencySvc) ... dupe ignored -Py:ConfigurableDb DEBUG : Found configurable <class 'SGComps.SGCompsConf.ProxyProviderSvc'> in module SGComps.SGCompsConf Py:Configurable ERROR attempt to add a duplicate (ServiceManager.ProxyProviderSvc) ... dupe ignored Py:loadBasicEventInfoMgt DEBUG Loading basic services for EventInfoMgt... [DONE] Py:loadBasicIOVDb DEBUG Loading basic services for IOVDb... [DONE] @@ -691,23 +323,9 @@ Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderS Py:ComponentAccumulator DEBUG Adding component DBReplicaSvc/DBReplicaSvc to the job Py:ComponentAccumulator DEBUG Adding component MuonCalib::MdtCalibDbCoolStrTool/MuonCalib::MdtCalibDbCoolStrTool to the job Py:ComponentAccumulator DEBUG Adding component MdtCalibrationDbSvc/MdtCalibrationDbSvc to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component CondInputLoader -Py:ComponentAccumulator DEBUG Reconciled configuration of component IOVDbSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component PoolSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component CondSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component ProxyProviderSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component DBReplicaSvc Py:ComponentAccumulator DEBUG Adding component MdtCalibrationDbSvc/MdtCalibrationDbSvc to the job Py:ComponentAccumulator DEBUG Adding component MuonCalib::MdtCalibDbCoolStrTool/MuonCalib::MdtCalibDbCoolStrTool to the job Py:ComponentAccumulator DEBUG Adding component MdtCalibrationSvc/MdtCalibrationSvc to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component CondInputLoader -Py:ComponentAccumulator DEBUG Reconciled configuration of component IOVDbSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component PoolSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component CondSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component ProxyProviderSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component DBReplicaSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component AthenaPoolCnvSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component EventPersistencySvc Py:ComponentAccumulator DEBUG Adding component MagField::AtlasFieldSvc/AtlasFieldSvc to the job Py:ComponentAccumulator DEBUG Adding component MdtCalibrationDbSvc/MdtCalibrationDbSvc to the job Py:ComponentAccumulator DEBUG Adding component MdtCalibrationSvc/MdtCalibrationSvc to the job @@ -719,42 +337,21 @@ Py:ComponentAccumulator DEBUG Adding component TagInfoMgr/TagInfoMgr to the jo Py:ComponentAccumulator DEBUG Adding component EvtPersistencySvc/EventPersistencySvc to the job Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job Py:ComponentAccumulator DEBUG Adding component TagInfoMgr/TagInfoMgr to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component TagInfoMgr -Py:ComponentAccumulator DEBUG Reconciled configuration of component EventPersistencySvc Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job Py:ComponentAccumulator DEBUG Adding component GeoModelSvc/GeoModelSvc to the job Py:ComponentAccumulator DEBUG Adding component DetDescrCnvSvc/DetDescrCnvSvc to the job Py:ComponentAccumulator DEBUG Adding component EvtPersistencySvc/EventPersistencySvc to the job Py:ComponentAccumulator DEBUG Adding component TagInfoMgr/TagInfoMgr to the job Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component GeoModelSvc Py:ComponentAccumulator DEBUG Adding component Muon::MuonIdHelperTool/Muon::MuonIdHelperTool to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component GeoModelSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component DetDescrCnvSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component EventPersistencySvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component TagInfoMgr -Py:ComponentAccumulator DEBUG Reconciled configuration of component ProxyProviderSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component ToolSvc.Muon::MuonIdHelperTool Py:ComponentAccumulator DEBUG Adding component ROBDataProviderSvc/ROBDataProviderSvc to the job Py:ComponentAccumulator DEBUG Adding component Muon::MDT_RawDataProviderTool/MDT_RawDataProviderTool to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component CondInputLoader Py:ComponentAccumulator DEBUG Adding component MuonMDT_CablingAlg/MuonMDT_CablingAlg to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component GeoModelSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component DetDescrCnvSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component EventPersistencySvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component TagInfoMgr -Py:ComponentAccumulator DEBUG Reconciled configuration of component ProxyProviderSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component IOVDbSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component PoolSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component CondSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component DBReplicaSvc Py:ComponentAccumulator DEBUG Adding component AthenaPoolCnvSvc/AthenaPoolCnvSvc to the job Py:ComponentAccumulator DEBUG Adding component MuonMDT_CablingSvc/MuonMDT_CablingSvc to the job Py:ComponentAccumulator DEBUG Adding component MagField::AtlasFieldSvc/AtlasFieldSvc to the job Py:ComponentAccumulator DEBUG Adding component MdtCalibrationDbSvc/MdtCalibrationDbSvc to the job Py:ComponentAccumulator DEBUG Adding component MdtCalibrationSvc/MdtCalibrationSvc to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component ROBDataProviderSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component ToolSvc.Muon::MuonIdHelperTool Py:ComponentAccumulator DEBUG Adding component MDTCablingDbTool/MDTCablingDbTool to the job Py:ComponentAccumulator DEBUG Adding component MuonCalib::MdtCalibDbCoolStrTool/MuonCalib::MdtCalibDbCoolStrTool to the job Py:ComponentAccumulator DEBUG Adding component Muon::MDT_RawDataProviderTool/MDT_RawDataProviderTool to the job @@ -765,15 +362,12 @@ Py:ComponentAccumulator DEBUG Adding component TagInfoMgr/TagInfoMgr to the jo Py:ComponentAccumulator DEBUG Adding component EvtPersistencySvc/EventPersistencySvc to the job Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job Py:ComponentAccumulator DEBUG Adding component TagInfoMgr/TagInfoMgr to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component TagInfoMgr -Py:ComponentAccumulator DEBUG Reconciled configuration of component EventPersistencySvc Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job Py:ComponentAccumulator DEBUG Adding component GeoModelSvc/GeoModelSvc to the job Py:ComponentAccumulator DEBUG Adding component DetDescrCnvSvc/DetDescrCnvSvc to the job Py:ComponentAccumulator DEBUG Adding component EvtPersistencySvc/EventPersistencySvc to the job Py:ComponentAccumulator DEBUG Adding component TagInfoMgr/TagInfoMgr to the job Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component GeoModelSvc Py:ComponentAccumulator DEBUG Adding component Muon::MuonIdHelperTool/Muon::MuonIdHelperTool to the job Py:ComponentAccumulator DEBUG Adding component GeoModelSvc/GeoModelSvc to the job Py:ComponentAccumulator DEBUG Adding component DetDescrCnvSvc/DetDescrCnvSvc to the job @@ -796,32 +390,16 @@ Py:ComponentAccumulator DEBUG Adding component TagInfoMgr/TagInfoMgr to the jo Py:ComponentAccumulator DEBUG Adding component EvtPersistencySvc/EventPersistencySvc to the job Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job Py:ComponentAccumulator DEBUG Adding component TagInfoMgr/TagInfoMgr to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component TagInfoMgr -Py:ComponentAccumulator DEBUG Reconciled configuration of component EventPersistencySvc Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job Py:ComponentAccumulator DEBUG Adding component GeoModelSvc/GeoModelSvc to the job Py:ComponentAccumulator DEBUG Adding component DetDescrCnvSvc/DetDescrCnvSvc to the job Py:ComponentAccumulator DEBUG Adding component EvtPersistencySvc/EventPersistencySvc to the job Py:ComponentAccumulator DEBUG Adding component TagInfoMgr/TagInfoMgr to the job Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component GeoModelSvc Py:ComponentAccumulator DEBUG Adding component Muon::MuonIdHelperTool/Muon::MuonIdHelperTool to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component GeoModelSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component DetDescrCnvSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component EventPersistencySvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component TagInfoMgr -Py:ComponentAccumulator DEBUG Reconciled configuration of component ProxyProviderSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component ToolSvc.Muon::MuonIdHelperTool Py:ComponentAccumulator DEBUG Adding component ROBDataProviderSvc/ROBDataProviderSvc to the job Py:ComponentAccumulator DEBUG Adding component Muon::CSC_RawDataProviderTool/CSC_RawDataProviderTool to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component GeoModelSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component DetDescrCnvSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component EventPersistencySvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component TagInfoMgr -Py:ComponentAccumulator DEBUG Reconciled configuration of component ProxyProviderSvc Py:ComponentAccumulator DEBUG Adding component CSCcablingSvc/CSCcablingSvc to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component ROBDataProviderSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component ToolSvc.Muon::MuonIdHelperTool Py:ComponentAccumulator DEBUG Adding component Muon::CSC_RawDataProviderTool/CSC_RawDataProviderTool to the job Py:ComponentAccumulator DEBUG Adding component GeoModelSvc/GeoModelSvc to the job Py:ComponentAccumulator DEBUG Adding component DetDescrCnvSvc/DetDescrCnvSvc to the job @@ -830,15 +408,12 @@ Py:ComponentAccumulator DEBUG Adding component TagInfoMgr/TagInfoMgr to the jo Py:ComponentAccumulator DEBUG Adding component EvtPersistencySvc/EventPersistencySvc to the job Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job Py:ComponentAccumulator DEBUG Adding component TagInfoMgr/TagInfoMgr to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component TagInfoMgr -Py:ComponentAccumulator DEBUG Reconciled configuration of component EventPersistencySvc Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job Py:ComponentAccumulator DEBUG Adding component GeoModelSvc/GeoModelSvc to the job Py:ComponentAccumulator DEBUG Adding component DetDescrCnvSvc/DetDescrCnvSvc to the job Py:ComponentAccumulator DEBUG Adding component EvtPersistencySvc/EventPersistencySvc to the job Py:ComponentAccumulator DEBUG Adding component TagInfoMgr/TagInfoMgr to the job Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component GeoModelSvc Py:ComponentAccumulator DEBUG Adding component Muon::MuonIdHelperTool/Muon::MuonIdHelperTool to the job Py:ComponentAccumulator DEBUG Adding component GeoModelSvc/GeoModelSvc to the job Py:ComponentAccumulator DEBUG Adding component DetDescrCnvSvc/DetDescrCnvSvc to the job @@ -857,7 +432,6 @@ Py:ComponentAccumulator DEBUG Adding component CondInputLoader/CondInputLoader Py:ComponentAccumulator DEBUG Adding component IOVDbSvc/IOVDbSvc to the job Py:ComponentAccumulator DEBUG Adding component PoolSvc/PoolSvc to the job Py:ComponentAccumulator DEBUG Adding component CondSvc/CondSvc to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component ProxyProviderSvc Py:ComponentAccumulator DEBUG Adding component DBReplicaSvc/DBReplicaSvc to the job Py:ComponentAccumulator DEBUG Adding component RPCCablingDbTool/RPCCablingDbTool to the job Py:ComponentAccumulator DEBUG Adding component MuonRPC_CablingSvc/MuonRPC_CablingSvc to the job @@ -882,38 +456,14 @@ Py:ComponentAccumulator DEBUG Adding component TagInfoMgr/TagInfoMgr to the jo Py:ComponentAccumulator DEBUG Adding component EvtPersistencySvc/EventPersistencySvc to the job Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job Py:ComponentAccumulator DEBUG Adding component TagInfoMgr/TagInfoMgr to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component TagInfoMgr -Py:ComponentAccumulator DEBUG Reconciled configuration of component EventPersistencySvc Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job Py:ComponentAccumulator DEBUG Adding component GeoModelSvc/GeoModelSvc to the job Py:ComponentAccumulator DEBUG Adding component DetDescrCnvSvc/DetDescrCnvSvc to the job Py:ComponentAccumulator DEBUG Adding component EvtPersistencySvc/EventPersistencySvc to the job Py:ComponentAccumulator DEBUG Adding component TagInfoMgr/TagInfoMgr to the job Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component GeoModelSvc Py:ComponentAccumulator DEBUG Adding component Muon::MuonIdHelperTool/Muon::MuonIdHelperTool to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component GeoModelSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component DetDescrCnvSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component EventPersistencySvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component TagInfoMgr -Py:ComponentAccumulator DEBUG Reconciled configuration of component ProxyProviderSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component ToolSvc.Muon::MuonIdHelperTool -Py:ConfigurableDb DEBUG : Found configurable <class 'MuonRPC_CnvTools.MuonRPC_CnvToolsConf.Muon__RpcRDO_Decoder'> in module MuonRPC_CnvTools.MuonRPC_CnvToolsConf Py:ComponentAccumulator DEBUG Adding component Muon::RpcRdoToPrepDataTool/RpcRdoToRpcPrepDataTool to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component CondInputLoader -Py:ComponentAccumulator DEBUG Reconciled configuration of component GeoModelSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component DetDescrCnvSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component EventPersistencySvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component TagInfoMgr -Py:ComponentAccumulator DEBUG Reconciled configuration of component ProxyProviderSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component RPCcablingServerSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component IOVDbSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component PoolSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component CondSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component DBReplicaSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component MuonRPC_CablingSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component ToolSvc.Muon::MuonIdHelperTool -Py:ComponentAccumulator DEBUG Reconciled configuration of component ToolSvc.RPCCablingDbTool Py:ComponentAccumulator DEBUG Adding component Muon::RpcRdoToPrepDataTool/RpcRdoToRpcPrepDataTool to the job Py:ComponentAccumulator DEBUG Adding component GeoModelSvc/GeoModelSvc to the job Py:ComponentAccumulator DEBUG Adding component DetDescrCnvSvc/DetDescrCnvSvc to the job @@ -922,15 +472,12 @@ Py:ComponentAccumulator DEBUG Adding component TagInfoMgr/TagInfoMgr to the jo Py:ComponentAccumulator DEBUG Adding component EvtPersistencySvc/EventPersistencySvc to the job Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job Py:ComponentAccumulator DEBUG Adding component TagInfoMgr/TagInfoMgr to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component TagInfoMgr -Py:ComponentAccumulator DEBUG Reconciled configuration of component EventPersistencySvc Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job Py:ComponentAccumulator DEBUG Adding component GeoModelSvc/GeoModelSvc to the job Py:ComponentAccumulator DEBUG Adding component DetDescrCnvSvc/DetDescrCnvSvc to the job Py:ComponentAccumulator DEBUG Adding component EvtPersistencySvc/EventPersistencySvc to the job Py:ComponentAccumulator DEBUG Adding component TagInfoMgr/TagInfoMgr to the job Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component GeoModelSvc Py:ComponentAccumulator DEBUG Adding component Muon::MuonIdHelperTool/Muon::MuonIdHelperTool to the job Py:ComponentAccumulator DEBUG Adding component GeoModelSvc/GeoModelSvc to the job Py:ComponentAccumulator DEBUG Adding component DetDescrCnvSvc/DetDescrCnvSvc to the job @@ -950,7 +497,6 @@ Py:ComponentAccumulator DEBUG Adding component CondInputLoader/CondInputLoader Py:ComponentAccumulator DEBUG Adding component IOVDbSvc/IOVDbSvc to the job Py:ComponentAccumulator DEBUG Adding component PoolSvc/PoolSvc to the job Py:ComponentAccumulator DEBUG Adding component CondSvc/CondSvc to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component ProxyProviderSvc Py:ComponentAccumulator DEBUG Adding component DBReplicaSvc/DBReplicaSvc to the job Py:ComponentAccumulator DEBUG Adding component CondInputLoader/CondInputLoader to the job Py:ComponentAccumulator DEBUG Adding component GeoModelSvc/GeoModelSvc to the job @@ -972,36 +518,14 @@ Py:ComponentAccumulator DEBUG Adding component TagInfoMgr/TagInfoMgr to the jo Py:ComponentAccumulator DEBUG Adding component EvtPersistencySvc/EventPersistencySvc to the job Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job Py:ComponentAccumulator DEBUG Adding component TagInfoMgr/TagInfoMgr to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component TagInfoMgr -Py:ComponentAccumulator DEBUG Reconciled configuration of component EventPersistencySvc Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job Py:ComponentAccumulator DEBUG Adding component GeoModelSvc/GeoModelSvc to the job Py:ComponentAccumulator DEBUG Adding component DetDescrCnvSvc/DetDescrCnvSvc to the job Py:ComponentAccumulator DEBUG Adding component EvtPersistencySvc/EventPersistencySvc to the job Py:ComponentAccumulator DEBUG Adding component TagInfoMgr/TagInfoMgr to the job Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component GeoModelSvc Py:ComponentAccumulator DEBUG Adding component Muon::MuonIdHelperTool/Muon::MuonIdHelperTool to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component GeoModelSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component DetDescrCnvSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component EventPersistencySvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component TagInfoMgr -Py:ComponentAccumulator DEBUG Reconciled configuration of component ProxyProviderSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component ToolSvc.Muon::MuonIdHelperTool Py:ComponentAccumulator DEBUG Adding component Muon::TgcRdoToPrepDataTool/TgcRdoToTgcPrepDataTool to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component CondInputLoader -Py:ComponentAccumulator DEBUG Reconciled configuration of component GeoModelSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component DetDescrCnvSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component EventPersistencySvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component TagInfoMgr -Py:ComponentAccumulator DEBUG Reconciled configuration of component ProxyProviderSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component LVL1TGC::TGCRecRoiSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component TGCcablingServerSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component IOVDbSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component PoolSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component CondSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component DBReplicaSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component ToolSvc.Muon::MuonIdHelperTool Py:ComponentAccumulator DEBUG Adding component Muon::TgcRdoToPrepDataTool/TgcRdoToTgcPrepDataTool to the job Py:ComponentAccumulator DEBUG Adding component GeoModelSvc/GeoModelSvc to the job Py:ComponentAccumulator DEBUG Adding component DetDescrCnvSvc/DetDescrCnvSvc to the job @@ -1010,15 +534,12 @@ Py:ComponentAccumulator DEBUG Adding component TagInfoMgr/TagInfoMgr to the jo Py:ComponentAccumulator DEBUG Adding component EvtPersistencySvc/EventPersistencySvc to the job Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job Py:ComponentAccumulator DEBUG Adding component TagInfoMgr/TagInfoMgr to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component TagInfoMgr -Py:ComponentAccumulator DEBUG Reconciled configuration of component EventPersistencySvc Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job Py:ComponentAccumulator DEBUG Adding component GeoModelSvc/GeoModelSvc to the job Py:ComponentAccumulator DEBUG Adding component DetDescrCnvSvc/DetDescrCnvSvc to the job Py:ComponentAccumulator DEBUG Adding component EvtPersistencySvc/EventPersistencySvc to the job Py:ComponentAccumulator DEBUG Adding component TagInfoMgr/TagInfoMgr to the job Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component GeoModelSvc Py:ComponentAccumulator DEBUG Adding component Muon::MuonIdHelperTool/Muon::MuonIdHelperTool to the job Py:ComponentAccumulator DEBUG Adding component GeoModelSvc/GeoModelSvc to the job Py:ComponentAccumulator DEBUG Adding component DetDescrCnvSvc/DetDescrCnvSvc to the job @@ -1038,10 +559,8 @@ Py:ComponentAccumulator DEBUG Adding component CondInputLoader/CondInputLoader Py:ComponentAccumulator DEBUG Adding component IOVDbSvc/IOVDbSvc to the job Py:ComponentAccumulator DEBUG Adding component PoolSvc/PoolSvc to the job Py:ComponentAccumulator DEBUG Adding component CondSvc/CondSvc to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component ProxyProviderSvc Py:ComponentAccumulator DEBUG Adding component DBReplicaSvc/DBReplicaSvc to the job Py:ComponentAccumulator DEBUG Adding component AthenaPoolCnvSvc/AthenaPoolCnvSvc to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component EventPersistencySvc Py:ComponentAccumulator DEBUG Adding component MuonMDT_CablingAlg/MuonMDT_CablingAlg to the job Py:ComponentAccumulator DEBUG Adding component MDTCablingDbTool/MDTCablingDbTool to the job Py:ComponentAccumulator DEBUG Adding component MuonMDT_CablingSvc/MuonMDT_CablingSvc to the job @@ -1080,12 +599,6 @@ Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderS Py:ComponentAccumulator DEBUG Adding component DBReplicaSvc/DBReplicaSvc to the job Py:ComponentAccumulator DEBUG Adding component AthenaPoolCnvSvc/AthenaPoolCnvSvc to the job Py:ComponentAccumulator DEBUG Adding component EvtPersistencySvc/EventPersistencySvc to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component CondInputLoader -Py:ComponentAccumulator DEBUG Reconciled configuration of component IOVDbSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component PoolSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component CondSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component ProxyProviderSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component DBReplicaSvc Py:ComponentAccumulator DEBUG Adding component AthenaPoolCnvSvc/AthenaPoolCnvSvc to the job Py:ComponentAccumulator DEBUG Adding component EvtPersistencySvc/EventPersistencySvc to the job Py:ComponentAccumulator DEBUG Adding component MagField::AtlasFieldSvc/AtlasFieldSvc to the job @@ -1125,23 +638,9 @@ Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderS Py:ComponentAccumulator DEBUG Adding component DBReplicaSvc/DBReplicaSvc to the job Py:ComponentAccumulator DEBUG Adding component MuonCalib::MdtCalibDbCoolStrTool/MuonCalib::MdtCalibDbCoolStrTool to the job Py:ComponentAccumulator DEBUG Adding component MdtCalibrationDbSvc/MdtCalibrationDbSvc to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component CondInputLoader -Py:ComponentAccumulator DEBUG Reconciled configuration of component IOVDbSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component PoolSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component CondSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component ProxyProviderSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component DBReplicaSvc Py:ComponentAccumulator DEBUG Adding component MdtCalibrationDbSvc/MdtCalibrationDbSvc to the job Py:ComponentAccumulator DEBUG Adding component MuonCalib::MdtCalibDbCoolStrTool/MuonCalib::MdtCalibDbCoolStrTool to the job Py:ComponentAccumulator DEBUG Adding component MdtCalibrationSvc/MdtCalibrationSvc to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component CondInputLoader -Py:ComponentAccumulator DEBUG Reconciled configuration of component IOVDbSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component PoolSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component CondSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component ProxyProviderSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component DBReplicaSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component AthenaPoolCnvSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component EventPersistencySvc Py:ComponentAccumulator DEBUG Adding component MagField::AtlasFieldSvc/AtlasFieldSvc to the job Py:ComponentAccumulator DEBUG Adding component MdtCalibrationDbSvc/MdtCalibrationDbSvc to the job Py:ComponentAccumulator DEBUG Adding component MdtCalibrationSvc/MdtCalibrationSvc to the job @@ -1153,42 +652,14 @@ Py:ComponentAccumulator DEBUG Adding component TagInfoMgr/TagInfoMgr to the jo Py:ComponentAccumulator DEBUG Adding component EvtPersistencySvc/EventPersistencySvc to the job Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job Py:ComponentAccumulator DEBUG Adding component TagInfoMgr/TagInfoMgr to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component TagInfoMgr -Py:ComponentAccumulator DEBUG Reconciled configuration of component EventPersistencySvc Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job Py:ComponentAccumulator DEBUG Adding component GeoModelSvc/GeoModelSvc to the job Py:ComponentAccumulator DEBUG Adding component DetDescrCnvSvc/DetDescrCnvSvc to the job Py:ComponentAccumulator DEBUG Adding component EvtPersistencySvc/EventPersistencySvc to the job Py:ComponentAccumulator DEBUG Adding component TagInfoMgr/TagInfoMgr to the job Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component GeoModelSvc Py:ComponentAccumulator DEBUG Adding component Muon::MuonIdHelperTool/Muon::MuonIdHelperTool to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component GeoModelSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component DetDescrCnvSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component EventPersistencySvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component TagInfoMgr -Py:ComponentAccumulator DEBUG Reconciled configuration of component ProxyProviderSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component ToolSvc.Muon::MuonIdHelperTool Py:ComponentAccumulator DEBUG Adding component Muon::MdtRdoToPrepDataTool/MdtRdoToMdtPrepDataTool to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component CondInputLoader -Py:ComponentAccumulator DEBUG Reconciled configuration of component MuonMDT_CablingAlg -Py:ComponentAccumulator DEBUG Reconciled configuration of component GeoModelSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component DetDescrCnvSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component EventPersistencySvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component TagInfoMgr -Py:ComponentAccumulator DEBUG Reconciled configuration of component ProxyProviderSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component IOVDbSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component PoolSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component CondSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component DBReplicaSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component AthenaPoolCnvSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component MuonMDT_CablingSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component AtlasFieldSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component MdtCalibrationDbSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component MdtCalibrationSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component ToolSvc.Muon::MuonIdHelperTool -Py:ComponentAccumulator DEBUG Reconciled configuration of component ToolSvc.MDTCablingDbTool -Py:ComponentAccumulator DEBUG Reconciled configuration of component ToolSvc.MuonCalib::MdtCalibDbCoolStrTool Py:ComponentAccumulator DEBUG Adding component Muon::MdtRdoToPrepDataTool/MdtRdoToMdtPrepDataTool to the job Py:ComponentAccumulator DEBUG Adding component GeoModelSvc/GeoModelSvc to the job Py:ComponentAccumulator DEBUG Adding component DetDescrCnvSvc/DetDescrCnvSvc to the job @@ -1197,15 +668,12 @@ Py:ComponentAccumulator DEBUG Adding component TagInfoMgr/TagInfoMgr to the jo Py:ComponentAccumulator DEBUG Adding component EvtPersistencySvc/EventPersistencySvc to the job Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job Py:ComponentAccumulator DEBUG Adding component TagInfoMgr/TagInfoMgr to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component TagInfoMgr -Py:ComponentAccumulator DEBUG Reconciled configuration of component EventPersistencySvc Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job Py:ComponentAccumulator DEBUG Adding component GeoModelSvc/GeoModelSvc to the job Py:ComponentAccumulator DEBUG Adding component DetDescrCnvSvc/DetDescrCnvSvc to the job Py:ComponentAccumulator DEBUG Adding component EvtPersistencySvc/EventPersistencySvc to the job Py:ComponentAccumulator DEBUG Adding component TagInfoMgr/TagInfoMgr to the job Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component GeoModelSvc Py:ComponentAccumulator DEBUG Adding component Muon::MuonIdHelperTool/Muon::MuonIdHelperTool to the job Py:ComponentAccumulator DEBUG Adding component GeoModelSvc/GeoModelSvc to the job Py:ComponentAccumulator DEBUG Adding component DetDescrCnvSvc/DetDescrCnvSvc to the job @@ -1252,12 +720,6 @@ Py:ComponentAccumulator DEBUG Adding component PoolSvc/PoolSvc to the job Py:ComponentAccumulator DEBUG Adding component CondSvc/CondSvc to the job Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job Py:ComponentAccumulator DEBUG Adding component DBReplicaSvc/DBReplicaSvc to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component CondInputLoader -Py:ComponentAccumulator DEBUG Reconciled configuration of component IOVDbSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component PoolSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component CondSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component ProxyProviderSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component DBReplicaSvc Py:ComponentAccumulator DEBUG Adding component CondInputLoader/CondInputLoader to the job Py:ComponentAccumulator DEBUG Adding component IOVDbSvc/IOVDbSvc to the job Py:ComponentAccumulator DEBUG Adding component PoolSvc/PoolSvc to the job @@ -1270,12 +732,6 @@ Py:ComponentAccumulator DEBUG Adding component PoolSvc/PoolSvc to the job Py:ComponentAccumulator DEBUG Adding component CondSvc/CondSvc to the job Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job Py:ComponentAccumulator DEBUG Adding component DBReplicaSvc/DBReplicaSvc to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component CondInputLoader -Py:ComponentAccumulator DEBUG Reconciled configuration of component IOVDbSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component PoolSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component CondSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component ProxyProviderSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component DBReplicaSvc Py:ComponentAccumulator DEBUG Adding component CondInputLoader/CondInputLoader to the job Py:ComponentAccumulator DEBUG Adding component IOVDbSvc/IOVDbSvc to the job Py:ComponentAccumulator DEBUG Adding component PoolSvc/PoolSvc to the job @@ -1288,12 +744,6 @@ Py:ComponentAccumulator DEBUG Adding component PoolSvc/PoolSvc to the job Py:ComponentAccumulator DEBUG Adding component CondSvc/CondSvc to the job Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job Py:ComponentAccumulator DEBUG Adding component DBReplicaSvc/DBReplicaSvc to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component CondInputLoader -Py:ComponentAccumulator DEBUG Reconciled configuration of component IOVDbSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component PoolSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component CondSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component ProxyProviderSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component DBReplicaSvc Py:ComponentAccumulator DEBUG Adding component CondInputLoader/CondInputLoader to the job Py:ComponentAccumulator DEBUG Adding component IOVDbSvc/IOVDbSvc to the job Py:ComponentAccumulator DEBUG Adding component PoolSvc/PoolSvc to the job @@ -1306,12 +756,6 @@ Py:ComponentAccumulator DEBUG Adding component PoolSvc/PoolSvc to the job Py:ComponentAccumulator DEBUG Adding component CondSvc/CondSvc to the job Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job Py:ComponentAccumulator DEBUG Adding component DBReplicaSvc/DBReplicaSvc to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component CondInputLoader -Py:ComponentAccumulator DEBUG Reconciled configuration of component IOVDbSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component PoolSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component CondSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component ProxyProviderSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component DBReplicaSvc Py:ComponentAccumulator DEBUG Adding component CondInputLoader/CondInputLoader to the job Py:ComponentAccumulator DEBUG Adding component IOVDbSvc/IOVDbSvc to the job Py:ComponentAccumulator DEBUG Adding component PoolSvc/PoolSvc to the job @@ -1324,12 +768,6 @@ Py:ComponentAccumulator DEBUG Adding component PoolSvc/PoolSvc to the job Py:ComponentAccumulator DEBUG Adding component CondSvc/CondSvc to the job Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job Py:ComponentAccumulator DEBUG Adding component DBReplicaSvc/DBReplicaSvc to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component CondInputLoader -Py:ComponentAccumulator DEBUG Reconciled configuration of component IOVDbSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component PoolSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component CondSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component ProxyProviderSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component DBReplicaSvc Py:ComponentAccumulator DEBUG Adding component CondInputLoader/CondInputLoader to the job Py:ComponentAccumulator DEBUG Adding component IOVDbSvc/IOVDbSvc to the job Py:ComponentAccumulator DEBUG Adding component PoolSvc/PoolSvc to the job @@ -1342,12 +780,6 @@ Py:ComponentAccumulator DEBUG Adding component PoolSvc/PoolSvc to the job Py:ComponentAccumulator DEBUG Adding component CondSvc/CondSvc to the job Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job Py:ComponentAccumulator DEBUG Adding component DBReplicaSvc/DBReplicaSvc to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component CondInputLoader -Py:ComponentAccumulator DEBUG Reconciled configuration of component IOVDbSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component PoolSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component CondSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component ProxyProviderSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component DBReplicaSvc Py:ComponentAccumulator DEBUG Adding component CondInputLoader/CondInputLoader to the job Py:ComponentAccumulator DEBUG Adding component IOVDbSvc/IOVDbSvc to the job Py:ComponentAccumulator DEBUG Adding component PoolSvc/PoolSvc to the job @@ -1360,18 +792,11 @@ Py:ComponentAccumulator DEBUG Adding component PoolSvc/PoolSvc to the job Py:ComponentAccumulator DEBUG Adding component CondSvc/CondSvc to the job Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job Py:ComponentAccumulator DEBUG Adding component DBReplicaSvc/DBReplicaSvc to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component CondInputLoader -Py:ComponentAccumulator DEBUG Reconciled configuration of component IOVDbSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component PoolSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component CondSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component ProxyProviderSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component DBReplicaSvc Py:ComponentAccumulator DEBUG Adding component CondInputLoader/CondInputLoader to the job Py:ComponentAccumulator DEBUG Adding component MuonCalib::CscCoolStrSvc/MuonCalib::CscCoolStrSvc to the job Py:ComponentAccumulator DEBUG Adding component IOVDbSvc/IOVDbSvc to the job Py:ComponentAccumulator DEBUG Adding component PoolSvc/PoolSvc to the job Py:ComponentAccumulator DEBUG Adding component CondSvc/CondSvc to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component ProxyProviderSvc Py:ComponentAccumulator DEBUG Adding component DBReplicaSvc/DBReplicaSvc to the job Py:ComponentAccumulator DEBUG Adding component GeoModelSvc/GeoModelSvc to the job Py:ComponentAccumulator DEBUG Adding component DetDescrCnvSvc/DetDescrCnvSvc to the job @@ -1380,48 +805,19 @@ Py:ComponentAccumulator DEBUG Adding component TagInfoMgr/TagInfoMgr to the jo Py:ComponentAccumulator DEBUG Adding component EvtPersistencySvc/EventPersistencySvc to the job Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job Py:ComponentAccumulator DEBUG Adding component TagInfoMgr/TagInfoMgr to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component TagInfoMgr -Py:ComponentAccumulator DEBUG Reconciled configuration of component EventPersistencySvc Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job Py:ComponentAccumulator DEBUG Adding component GeoModelSvc/GeoModelSvc to the job Py:ComponentAccumulator DEBUG Adding component DetDescrCnvSvc/DetDescrCnvSvc to the job Py:ComponentAccumulator DEBUG Adding component EvtPersistencySvc/EventPersistencySvc to the job Py:ComponentAccumulator DEBUG Adding component TagInfoMgr/TagInfoMgr to the job Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderSvc to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component GeoModelSvc Py:ComponentAccumulator DEBUG Adding component Muon::MuonIdHelperTool/Muon::MuonIdHelperTool to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component GeoModelSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component DetDescrCnvSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component EventPersistencySvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component TagInfoMgr -Py:ComponentAccumulator DEBUG Reconciled configuration of component ProxyProviderSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component ToolSvc.Muon::MuonIdHelperTool -Py:ConfigurableDb DEBUG : Found configurable <class 'MuonCSC_CnvTools.MuonCSC_CnvToolsConf.Muon__CscRDO_Decoder'> in module MuonCSC_CnvTools.MuonCSC_CnvToolsConf -Py:ConfigurableDb DEBUG : Found configurable <class 'CscCalibTools.CscCalibToolsConf.CscCalibTool'> in module CscCalibTools.CscCalibToolsConf Py:ComponentAccumulator DEBUG Adding component Muon::CscRdoToCscPrepDataTool/CscRdoToCscPrepDataTool to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component CondInputLoader -Py:ComponentAccumulator DEBUG Reconciled configuration of component GeoModelSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component DetDescrCnvSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component EventPersistencySvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component TagInfoMgr -Py:ComponentAccumulator DEBUG Reconciled configuration of component ProxyProviderSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component CSCcablingSvc Py:ComponentAccumulator DEBUG Adding component MuonCalib::CscCoolStrSvc/MuonCalib::CscCoolStrSvc to the job -Py:ComponentAccumulator DEBUG Reconciled configuration of component IOVDbSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component PoolSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component CondSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component DBReplicaSvc -Py:ComponentAccumulator DEBUG Reconciled configuration of component ToolSvc.Muon::MuonIdHelperTool Py:ComponentAccumulator DEBUG Adding component Muon::CscRdoToCscPrepDataTool/CscRdoToCscPrepDataTool to the job Py:ComponentAccumulator DEBUG Adding component CscThresholdClusterBuilderTool/CscThesholdClusterBuilderTool to the job Py:ComponentAccumulator DEBUG Adding component CscThresholdClusterBuilderTool/CscThesholdClusterBuilderTool to the job -Py:ConfigurableDb DEBUG : Found configurable <class 'AthenaPoolCnvSvc.AthenaPoolCnvSvcConf.AthenaPoolCnvSvc'> in module AthenaPoolCnvSvc.AthenaPoolCnvSvcConf -Py:ComponentAccumulator DEBUG Reconciled configuration of component AthenaPoolCnvSvc Py:Athena INFO Print Config -Py:ComponentAccumulator INFO Event Inputs -Py:ComponentAccumulator INFO set([]) -Py:ComponentAccumulator INFO Event Algorithm Sequences -Py:ComponentAccumulator INFO /***** Algorithm AthSequencer/AthAlgSeq ************************************************************ |-Atomic = False |-AuditAlgorithms = False |-AuditBeginRun = False @@ -1433,29 +829,20 @@ Py:ComponentAccumulator INFO /***** Algorithm AthSequencer/AthAlgSeq ******** |-AuditRestart = False |-AuditStart = False |-AuditStop = False -|-Cardinality = 0 |-ContinueEventloopOnFPE = False -|-DetStore @0x7fb6097b9e50 = ServiceHandle('StoreGateSvc/DetectorStore') |-Enable = True |-ErrorCounter = 0 |-ErrorMax = 1 -|-EvtStore @0x7fb6097b9dd0 = ServiceHandle('StoreGateSvc') -|-ExtraInputs @0x7fb607cefb00 = [] (default: []) -|-ExtraOutputs @0x7fb607cefc68 = [] (default: []) |-FilterCircularDependencies = True |-IgnoreFilterPassed = False |-IsIOBound = False -|-Members @0x7fb607cef9e0 = ['Muon::RpcRawDataProvider/RpcRawDataProvider', 'Muon::TgcRawDataProvider/TgcRawDataProvider', 'Muon::MdtRawDataProvider/MdtRawDataProvider', 'Muon::CscRawDataProvider/CscRawDataProvider', 'RpcRdoToRpcPrepData/RpcRdoToRpcPrepData', 'TgcRdoToTgcPrepData/TgcRdoToTgcPrepData', 'MdtRdoToMdtPrepData/MdtRdoToMdtPrepData', 'CscRdoToCscPrepData/CscRdoToCscPrepData', 'CscThresholdClusterBuilder/CscThesholdClusterBuilder'] | (default: []) |-ModeOR = False |-MonitorService = 'MonitorSvc' -|-NeededResources @0x7fb607cefd40 = [] (default: []) |-OutputLevel = 0 |-RegisterForContextService = False -|-Sequential = False |-StopOverride = False |-TimeOut = 0.0 -|-Timeline = True |=/***** Algorithm Muon::RpcRawDataProvider/RpcRawDataProvider *************************************** | |-AuditAlgorithms = False | |-AuditBeginRun = False @@ -1467,27 +854,161 @@ Py:ComponentAccumulator INFO /***** Algorithm AthSequencer/AthAlgSeq ******** | |-AuditRestart = False | |-AuditStart = False | |-AuditStop = False -| |-Cardinality = 1 -| |-DetStore @0x7fb6082c0690 = ServiceHandle('StoreGateSvc/DetectorStore') | |-DoSeededDecoding = False | |-Enable = True | |-ErrorCounter = 0 | |-ErrorMax = 1 -| |-EvtStore @0x7fb6082c0610 = ServiceHandle('StoreGateSvc') -| |-ExtraInputs @0x7fb607cefdd0 = [] (default: []) -| |-ExtraOutputs @0x7fb607cefea8 = [] (default: []) | |-FilterCircularDependencies = True | |-IsIOBound = False | |-MonitorService = 'MonitorSvc' -| |-NeededResources @0x7fb607cefd88 = [] (default: []) | |-OutputLevel = 0 -| |-ProviderTool @0x7fb608438550 = PrivateToolHandle('Muon::RPC_RawDataProviderTool/RPC_RawDataProviderTool') | | (default: 'Muon::RPC_RawDataProviderTool/RpcRawDataProviderTool') -| |-RegionSelectionSvc @0x7fb6082c0710 = ServiceHandle('RegSelSvc') | |-RegisterForContextService = False | |-RoIs = 'StoreGateSvc+OutputRoIs' -| |-Timeline = True | |=/***** Private AlgTool Muon::RPC_RawDataProviderTool/RpcRawDataProvider.RPC_RawDataProviderTool ***** +| | |-AuditFinalize = False +| | |-AuditInitialize = False +| | |-AuditReinitialize = False +| | |-AuditRestart = False +| | |-AuditStart = False +| | |-AuditStop = False +| | |-AuditTools = False +| | |-MonitorService = 'MonitorSvc' +| | |-OutputLevel = 0 +| | |-RPCSec = 'StoreGateSvc+RPC_SECTORLOGIC' +| | |-RdoLocation = 'StoreGateSvc+RPCPAD' +| | |=/***** Private AlgTool Muon::RpcROD_Decoder/RpcRawDataProvider.RPC_RawDataProviderTool.RpcROD_Decoder ***** +| | | |-AuditFinalize = False +| | | |-AuditInitialize = False +| | | |-AuditReinitialize = False +| | | |-AuditRestart = False +| | | |-AuditStart = False +| | | |-AuditStop = False +| | | |-AuditTools = False +| | | |-DataErrorPrintLimit = 1000 +| | | |-MonitorService = 'MonitorSvc' +| | | |-OutputLevel = 0 +| | | |-Sector13Data = False +| | | |-SpecialROBNumber = -1 +| | | \----- (End of Private AlgTool Muon::RpcROD_Decoder/RpcRawDataProvider.RPC_RawDataProviderTool.RpcROD_Decoder) ----- +| | \----- (End of Private AlgTool Muon::RPC_RawDataProviderTool/RpcRawDataProvider.RPC_RawDataProviderTool) ----- +| \----- (End of Algorithm Muon::RpcRawDataProvider/RpcRawDataProvider) ------------------------------ +|=/***** Algorithm Muon::TgcRawDataProvider/TgcRawDataProvider *************************************** +| |-AuditAlgorithms = False +| |-AuditBeginRun = False +| |-AuditEndRun = False +| |-AuditExecute = False +| |-AuditFinalize = False +| |-AuditInitialize = False +| |-AuditReinitialize = False +| |-AuditRestart = False +| |-AuditStart = False +| |-AuditStop = False +| |-Enable = True +| |-ErrorCounter = 0 +| |-ErrorMax = 1 +| |-FilterCircularDependencies = True +| |-IsIOBound = False +| |-MonitorService = 'MonitorSvc' +| |-OutputLevel = 0 +| | (default: 'Muon::TGC_RawDataProviderTool/TgcRawDataProviderTool') +| |-RegisterForContextService = False +| |=/***** Private AlgTool Muon::TGC_RawDataProviderTool/TgcRawDataProvider.TGC_RawDataProviderTool ***** +| | |-AuditFinalize = False +| | |-AuditInitialize = False +| | |-AuditReinitialize = False +| | |-AuditRestart = False +| | |-AuditStart = False +| | |-AuditStop = False +| | |-AuditTools = False +| | | (default: 'Muon::TGC_RodDecoderReadout/TGC_RodDecoderReadout') +| | |-MonitorService = 'MonitorSvc' +| | |-OutputLevel = 0 +| | |-RdoLocation = 'StoreGateSvc+TGCRDO' +| | |=/***** Private AlgTool Muon::TGC_RodDecoderReadout/TgcRawDataProvider.TGC_RawDataProviderTool.TgcROD_Decoder ***** +| | | |-AuditFinalize = False +| | | |-AuditInitialize = False +| | | |-AuditReinitialize = False +| | | |-AuditRestart = False +| | | |-AuditStart = False +| | | |-AuditStop = False +| | | |-AuditTools = False +| | | |-MonitorService = 'MonitorSvc' +| | | |-OutputLevel = 0 +| | | |-ShowStatusWords = False +| | | |-SkipCoincidence = False +| | | \----- (End of Private AlgTool Muon::TGC_RodDecoderReadout/TgcRawDataProvider.TGC_RawDataProviderTool.TgcROD_Decoder) ----- +| | \----- (End of Private AlgTool Muon::TGC_RawDataProviderTool/TgcRawDataProvider.TGC_RawDataProviderTool) ----- +| \----- (End of Algorithm Muon::TgcRawDataProvider/TgcRawDataProvider) ------------------------------ +|=/***** Algorithm Muon::MdtRawDataProvider/MdtRawDataProvider *************************************** +| |-AuditAlgorithms = False +| |-AuditBeginRun = False +| |-AuditEndRun = False +| |-AuditExecute = False +| |-AuditFinalize = False +| |-AuditInitialize = False +| |-AuditReinitialize = False +| |-AuditRestart = False +| |-AuditStart = False +| |-AuditStop = False +| |-Enable = True +| |-ErrorCounter = 0 +| |-ErrorMax = 1 +| |-FilterCircularDependencies = True +| |-IsIOBound = False +| |-MonitorService = 'MonitorSvc' +| |-OutputLevel = 0 +| | (default: 'Muon::MDT_RawDataProviderTool/MdtRawDataProviderTool') +| |-RegisterForContextService = False +| |=/***** Private AlgTool Muon::MDT_RawDataProviderTool/MdtRawDataProvider.MDT_RawDataProviderTool ***** +| | |-AuditFinalize = False +| | |-AuditInitialize = False +| | |-AuditReinitialize = False +| | |-AuditRestart = False +| | |-AuditStart = False +| | |-AuditStop = False +| | |-AuditTools = False +| | |-CsmContainerCacheKey = 'StoreGateSvc+' +| | |-MonitorService = 'MonitorSvc' +| | |-OutputLevel = 0 +| | |-RdoLocation = 'StoreGateSvc+MDTCSM' +| | |-ReadKey = 'ConditionStore+MuonMDT_CablingMap' +| | |=/***** Private AlgTool MdtROD_Decoder/MdtRawDataProvider.MDT_RawDataProviderTool.MdtROD_Decoder ***** +| | | |-AuditFinalize = False +| | | |-AuditInitialize = False +| | | |-AuditReinitialize = False +| | | |-AuditRestart = False +| | | |-AuditStart = False +| | | |-AuditStop = False +| | | |-AuditTools = False +| | | |-MonitorService = 'MonitorSvc' +| | | |-OutputLevel = 0 +| | | |-ReadKey = 'ConditionStore+MuonMDT_CablingMap' +| | | |-SpecialROBNumber = -1 +| | | \----- (End of Private AlgTool MdtROD_Decoder/MdtRawDataProvider.MDT_RawDataProviderTool.MdtROD_Decoder) ----- +| | \----- (End of Private AlgTool Muon::MDT_RawDataProviderTool/MdtRawDataProvider.MDT_RawDataProviderTool) ----- +| \----- (End of Algorithm Muon::MdtRawDataProvider/MdtRawDataProvider) ------------------------------ +|=/***** Algorithm Muon::CscRawDataProvider/CscRawDataProvider *************************************** +| |-AuditAlgorithms = False +| |-AuditBeginRun = False +| |-AuditEndRun = False +| |-AuditExecute = False +| |-AuditFinalize = False +| |-AuditInitialize = False +| |-AuditReinitialize = False +| |-AuditRestart = False +| |-AuditStart = False +| |-AuditStop = False +| |-Enable = True +| |-ErrorCounter = 0 +| |-ErrorMax = 1 +| |-FilterCircularDependencies = True +| |-IsIOBound = False +| |-MonitorService = 'MonitorSvc' +| |-OutputLevel = 0 +| | (default: 'Muon::CSC_RawDataProviderTool/CscRawDataProviderTool') +| |-RegisterForContextService = False +| |=/***** Private AlgTool Muon::CSC_RawDataProviderTool/CscRawDataProvider.CSC_RawDataProviderTool ***** | | |-AuditFinalize = False | | |-AuditInitialize = False | | |-AuditReinitialize = False @@ -1495,16 +1016,345 @@ Py:ComponentAccumulator INFO /***** Algorithm AthSequencer/AthAlgSeq ******** | | |-AuditStart = False | | |-AuditStop = False | | |-AuditTools = False -| | |-Decoder @0x7fb60874b810 = PrivateToolHandle('Muon::RpcROD_Decoder/RpcROD_Decoder') -| | |-DetStore @0x7fb608268510 = ServiceHandle('StoreGateSvc/DetectorStore') -| | |-EvtStore @0x7fb6082684d0 = ServiceHandle('StoreGateSvc') -| | |-ExtraInputs @0x7fb6082ab290 = [] (default: []) -| | |-ExtraOutputs @0x7fb6082ab170 = [] (default: []) +| | |-CscContainerCacheKey = 'StoreGateSvc+' +| | |-EventInfoKey = 'StoreGateSvc+EventInfo' | | |-MonitorService = 'MonitorSvc' | | |-OutputLevel = 0 -| | |-RPCSec = 'StoreGateSvc+RPC_SECTORLOGIC' -| | |-RdoLocation = 'StoreGateSvc+RPCPAD' -| | |-RpcContainerCacheKey = 'StoreGateSvc+' +| | |-RdoLocation = 'StoreGateSvc+CSCRDO' +| | |=/***** Private AlgTool Muon::CscROD_Decoder/CscRawDataProvider.CSC_RawDataProviderTool.CscROD_Decoder ***** +| | | |-AuditFinalize = False +| | | |-AuditInitialize = False +| | | |-AuditReinitialize = False +| | | |-AuditRestart = False +| | | |-AuditStart = False +| | | |-AuditStop = False +| | | |-AuditTools = False +| | | |-IsCosmics = False +| | | |-IsOldCosmics = False +| | | |-MonitorService = 'MonitorSvc' +| | | |-OutputLevel = 0 +| | | \----- (End of Private AlgTool Muon::CscROD_Decoder/CscRawDataProvider.CSC_RawDataProviderTool.CscROD_Decoder) ----- +| | \----- (End of Private AlgTool Muon::CSC_RawDataProviderTool/CscRawDataProvider.CSC_RawDataProviderTool) ----- +| \----- (End of Algorithm Muon::CscRawDataProvider/CscRawDataProvider) ------------------------------ +|=/***** Algorithm RpcRdoToRpcPrepData/RpcRdoToRpcPrepData ******************************************* +| |-AuditAlgorithms = False +| |-AuditBeginRun = False +| |-AuditEndRun = False +| |-AuditExecute = False +| |-AuditFinalize = False +| |-AuditInitialize = False +| |-AuditReinitialize = False +| |-AuditRestart = False +| |-AuditStart = False +| |-AuditStop = False +| | (default: 'Muon::RpcRdoToPrepDataTool/RpcRdoToPrepDataTool') +| |-DoSeededDecoding = False +| |-Enable = True +| |-ErrorCounter = 0 +| |-ErrorMax = 1 +| |-FilterCircularDependencies = True +| |-IsIOBound = False +| |-MonitorService = 'MonitorSvc' +| |-OutputCollection = 'StoreGateSvc+RPC_Measurements' +| |-OutputLevel = 0 +| |-PrintInputRdo = False +| |-RegisterForContextService = False +| |-RoIs = 'StoreGateSvc+OutputRoIs' +| |=/***** Private AlgTool Muon::RpcRdoToPrepDataTool/RpcRdoToRpcPrepData.RpcRdoToRpcPrepDataTool ****** +| | |-AuditFinalize = False +| | |-AuditInitialize = False +| | |-AuditReinitialize = False +| | |-AuditRestart = False +| | |-AuditStart = False +| | |-AuditStop = False +| | |-AuditTools = False +| | |-DecodeData = True +| | |-InputCollection = 'StoreGateSvc+RPC_triggerHits' +| | |-MonitorService = 'MonitorSvc' +| | |-OutputCollection = 'StoreGateSvc+RPCPAD' +| | |-OutputLevel = 0 +| | |-RPCInfoFromDb = False +| | | (default: 'Muon::RpcRDO_Decoder') +| | |-TriggerOutputCollection = 'StoreGateSvc+RPC_Measurements' +| | |-etaphi_coincidenceTime = 20.0 +| | |-overlap_timeTolerance = 10.0 +| | |-processingData = False +| | |-produceRpcCoinDatafromTriggerWords = True +| | |-reduceCablingOverlap = True +| | |-solvePhiAmbiguities = True +| | |-timeShift = -12.5 +| | |=/***** Private AlgTool Muon::RpcRDO_Decoder/RpcRdoToRpcPrepData.RpcRdoToRpcPrepDataTool.Muon::RpcRDO_Decoder ***** +| | | |-AuditFinalize = False +| | | |-AuditInitialize = False +| | | |-AuditReinitialize = False +| | | |-AuditRestart = False +| | | |-AuditStart = False +| | | |-AuditStop = False +| | | |-AuditTools = False +| | | |-MonitorService = 'MonitorSvc' +| | | |-OutputLevel = 0 +| | | \----- (End of Private AlgTool Muon::RpcRDO_Decoder/RpcRdoToRpcPrepData.RpcRdoToRpcPrepDataTool.Muon::RpcRDO_Decoder) ----- +| | \----- (End of Private AlgTool Muon::RpcRdoToPrepDataTool/RpcRdoToRpcPrepData.RpcRdoToRpcPrepDataTool) ----- +| \----- (End of Algorithm RpcRdoToRpcPrepData/RpcRdoToRpcPrepData) ---------------------------------- +|=/***** Algorithm TgcRdoToTgcPrepData/TgcRdoToTgcPrepData ******************************************* +| |-AuditAlgorithms = False +| |-AuditBeginRun = False +| |-AuditEndRun = False +| |-AuditExecute = False +| |-AuditFinalize = False +| |-AuditInitialize = False +| |-AuditReinitialize = False +| |-AuditRestart = False +| |-AuditStart = False +| |-AuditStop = False +| | (default: 'Muon::TgcRdoToPrepDataTool/TgcPrepDataProviderTool') +| |-DoSeededDecoding = False +| |-Enable = True +| |-ErrorCounter = 0 +| |-ErrorMax = 1 +| |-FilterCircularDependencies = True +| |-IsIOBound = False +| |-MonitorService = 'MonitorSvc' +| |-OutputCollection = 'StoreGateSvc+TGC_Measurements' +| |-OutputLevel = 0 +| |-PrintInputRdo = False +| |-RegisterForContextService = False +| |-RoIs = 'StoreGateSvc+OutputRoIs' +| |-Setting = 0 +| |=/***** Private AlgTool Muon::TgcRdoToPrepDataTool/TgcRdoToTgcPrepData.TgcRdoToTgcPrepDataTool ****** +| | |-AuditFinalize = False +| | |-AuditInitialize = False +| | |-AuditReinitialize = False +| | |-AuditRestart = False +| | |-AuditStart = False +| | |-AuditStop = False +| | |-AuditTools = False +| | |-DecodeData = True +| | |-FillCoinData = True +| | |-MonitorService = 'MonitorSvc' +| | |-OutputCoinCollection = 'TrigT1CoinDataCollection' +| | |-OutputCollection = 'TGC_Measurements' +| | |-OutputLevel = 0 +| | |-RDOContainer = 'StoreGateSvc+TGCRDO' +| | |-TGCHashIdOffset = 26000 +| | |-dropPrdsWithZeroWidth = True +| | | (default: ['StoreGateSvc+dummy', 'StoreGateSvc+dummy', 'StoreGateSvc+dummy']) +| | | (default: ['StoreGateSvc+dummy', 'StoreGateSvc+dummy', 'StoreGateSvc+dummy', 'StoreGateSvc+dummy']) +| | |-show_warning_level_invalid_A09_SSW6_hit = False +| | \----- (End of Private AlgTool Muon::TgcRdoToPrepDataTool/TgcRdoToTgcPrepData.TgcRdoToTgcPrepDataTool) ----- +| \----- (End of Algorithm TgcRdoToTgcPrepData/TgcRdoToTgcPrepData) ---------------------------------- +|=/***** Algorithm MdtRdoToMdtPrepData/MdtRdoToMdtPrepData ******************************************* +| |-AuditAlgorithms = False +| |-AuditBeginRun = False +| |-AuditEndRun = False +| |-AuditExecute = False +| |-AuditFinalize = False +| |-AuditInitialize = False +| |-AuditReinitialize = False +| |-AuditRestart = False +| |-AuditStart = False +| |-AuditStop = False +| | (default: 'Muon::MdtRdoToPrepDataTool/MdtPrepDataProviderTool') +| |-DoSeededDecoding = False +| |-Enable = True +| |-ErrorCounter = 0 +| |-ErrorMax = 1 +| |-FilterCircularDependencies = True +| |-IsIOBound = False +| |-MonitorService = 'MonitorSvc' +| |-OutputCollection = 'StoreGateSvc+MDT_DriftCircles' +| |-OutputLevel = 0 +| |-PrintInputRdo = False +| |-RegisterForContextService = False +| |-RoIs = 'StoreGateSvc+OutputRoIs' +| |=/***** Private AlgTool Muon::MdtRdoToPrepDataTool/MdtRdoToMdtPrepData.MdtRdoToMdtPrepDataTool ****** +| | |-AuditFinalize = False +| | |-AuditInitialize = False +| | |-AuditReinitialize = False +| | |-AuditRestart = False +| | |-AuditStart = False +| | |-AuditStop = False +| | |-AuditTools = False +| | |-CalibratePrepData = True +| | |-DecodeData = True +| | |-DiscardSecondaryHitTwin = False +| | |-DoPropagationCorrection = False +| | |-DoTofCorrection = True +| | |-MonitorService = 'MonitorSvc' +| | |-OutputCollection = 'StoreGateSvc+MDT_DriftCircles' +| | |-OutputLevel = 0 +| | |-RDOContainer = 'StoreGateSvc+MDTCSM' +| | |-ReadKey = 'ConditionStore+MuonMDT_CablingMap' +| | |-SortPrepData = False +| | |-TimeWindowLowerBound = -1000000.0 +| | |-TimeWindowSetting = 2 +| | |-TimeWindowUpperBound = -1000000.0 +| | |-TwinCorrectSlewing = False +| | |-Use1DPrepDataTwin = False +| | |-UseAllBOLTwin = False +| | |-UseTwin = True +| | \----- (End of Private AlgTool Muon::MdtRdoToPrepDataTool/MdtRdoToMdtPrepData.MdtRdoToMdtPrepDataTool) ----- +| \----- (End of Algorithm MdtRdoToMdtPrepData/MdtRdoToMdtPrepData) ---------------------------------- +|=/***** Algorithm CscRdoToCscPrepData/CscRdoToCscPrepData ******************************************* +| |-AuditAlgorithms = False +| |-AuditBeginRun = False +| |-AuditEndRun = False +| |-AuditExecute = False +| |-AuditFinalize = False +| |-AuditInitialize = False +| |-AuditReinitialize = False +| |-AuditRestart = False +| |-AuditStart = False +| |-AuditStop = False +| | (default: 'Muon::CscRdoToCscPrepDataTool/CscRdoToPrepDataTool') +| |-DoSeededDecoding = False +| |-Enable = True +| |-ErrorCounter = 0 +| |-ErrorMax = 1 +| |-FilterCircularDependencies = True +| |-IsIOBound = False +| |-MonitorService = 'MonitorSvc' +| |-OutputCollection = 'StoreGateSvc+CSC_Measurements' +| |-OutputLevel = 0 +| |-PrintInputRdo = False +| |-RegisterForContextService = False +| |-RoIs = 'StoreGateSvc+OutputRoIs' +| |=/***** Private AlgTool Muon::CscRdoToCscPrepDataTool/CscRdoToCscPrepData.CscRdoToCscPrepDataTool ***** +| | |-AuditFinalize = False +| | |-AuditInitialize = False +| | |-AuditReinitialize = False +| | |-AuditRestart = False +| | |-AuditStart = False +| | |-AuditStop = False +| | |-AuditTools = False +| | |-CSCHashIdOffset = 22000 +| | |-DecodeData = True +| | |-MonitorService = 'MonitorSvc' +| | |-OutputCollection = 'StoreGateSvc+CSC_Measurements' +| | |-OutputLevel = 0 +| | |-RDOContainer = 'StoreGateSvc+CSCRDO' +| | |=/***** Private AlgTool CscCalibTool/CscRdoToCscPrepData.CscRdoToCscPrepDataTool.CscCalibTool ******* +| | | |-AuditFinalize = False +| | | |-AuditInitialize = False +| | | |-AuditReinitialize = False +| | | |-AuditRestart = False +| | | |-AuditStart = False +| | | |-AuditStop = False +| | | |-AuditTools = False +| | | |-IsOnline = True +| | | |-Latency = 100.0 +| | | |-MonitorService = 'MonitorSvc' +| | | |-NSamples = 4 +| | | |-Noise = 3.5 +| | | |-OutputLevel = 0 +| | | |-Pedestal = 2048.0 +| | | |-ReadFromDatabase = True +| | | |-Slope = 0.19 +| | | |-SlopeFromDatabase = False +| | | |-TimeOffsetRange = 1.0 +| | | |-Use2Samples = False +| | | |-integrationNumber = 12.0 +| | | |-integrationNumber2 = 11.66 +| | | |-samplingTime = 50.0 +| | | |-signalWidth = 14.4092 +| | | |-timeOffset = 46.825 +| | | \----- (End of Private AlgTool CscCalibTool/CscRdoToCscPrepData.CscRdoToCscPrepDataTool.CscCalibTool) ----- +| | |=/***** Private AlgTool Muon::CscRDO_Decoder/CscRdoToCscPrepData.CscRdoToCscPrepDataTool.CscRDO_Decoder ***** +| | | |-AuditFinalize = False +| | | |-AuditInitialize = False +| | | |-AuditReinitialize = False +| | | |-AuditRestart = False +| | | |-AuditStart = False +| | | |-AuditStop = False +| | | |-AuditTools = False +| | | |-MonitorService = 'MonitorSvc' +| | | |-OutputLevel = 0 +| | | \----- (End of Private AlgTool Muon::CscRDO_Decoder/CscRdoToCscPrepData.CscRdoToCscPrepDataTool.CscRDO_Decoder) ----- +| | \----- (End of Private AlgTool Muon::CscRdoToCscPrepDataTool/CscRdoToCscPrepData.CscRdoToCscPrepDataTool) ----- +| \----- (End of Algorithm CscRdoToCscPrepData/CscRdoToCscPrepData) ---------------------------------- +|=/***** Algorithm CscThresholdClusterBuilder/CscThesholdClusterBuilder ****************************** +| |-AuditAlgorithms = False +| |-AuditBeginRun = False +| |-AuditEndRun = False +| |-AuditExecute = False +| |-AuditFinalize = False +| |-AuditInitialize = False +| |-AuditReinitialize = False +| |-AuditRestart = False +| |-AuditStart = False +| |-AuditStop = False +| |-Enable = True +| |-ErrorCounter = 0 +| |-ErrorMax = 1 +| |-FilterCircularDependencies = True +| |-IsIOBound = False +| |-MonitorService = 'MonitorSvc' +| |-OutputLevel = 0 +| |-RegisterForContextService = False +| | (default: 'CscThresholdClusterBuilderTool/CscThresholdClusterBuilderTool') +| \----- (End of Algorithm CscThresholdClusterBuilder/CscThesholdClusterBuilder) --------------------- +\----- (End of Algorithm AthSequencer/AthAlgSeq) --------------------------------------------------- +Py:Athena INFO Save Config +/***** Algorithm AthSequencer/AthAlgSeq ************************************************************ +|-Atomic = False +|-AuditAlgorithms = False +|-AuditBeginRun = False +|-AuditEndRun = False +|-AuditExecute = False +|-AuditFinalize = False +|-AuditInitialize = False +|-AuditReinitialize = False +|-AuditRestart = False +|-AuditStart = False +|-AuditStop = False +|-ContinueEventloopOnFPE = False +|-Enable = True +|-ErrorCounter = 0 +|-ErrorMax = 1 +|-FilterCircularDependencies = True +|-IgnoreFilterPassed = False +|-IsIOBound = False +| (default: []) +|-ModeOR = False +|-MonitorService = 'MonitorSvc' +|-OutputLevel = 0 +|-RegisterForContextService = False +|-StopOverride = False +|-TimeOut = 0.0 +|=/***** Algorithm Muon::RpcRawDataProvider/RpcRawDataProvider *************************************** +| |-AuditAlgorithms = False +| |-AuditBeginRun = False +| |-AuditEndRun = False +| |-AuditExecute = False +| |-AuditFinalize = False +| |-AuditInitialize = False +| |-AuditReinitialize = False +| |-AuditRestart = False +| |-AuditStart = False +| |-AuditStop = False +| |-DoSeededDecoding = False +| |-Enable = True +| |-ErrorCounter = 0 +| |-ErrorMax = 1 +| |-FilterCircularDependencies = True +| |-IsIOBound = False +| |-MonitorService = 'MonitorSvc' +| |-OutputLevel = 0 +| | (default: 'Muon::RPC_RawDataProviderTool/RpcRawDataProviderTool') +| |-RegisterForContextService = False +| |-RoIs = 'StoreGateSvc+OutputRoIs' +| |=/***** Private AlgTool Muon::RPC_RawDataProviderTool/RpcRawDataProvider.RPC_RawDataProviderTool ***** +| | |-AuditFinalize = False +| | |-AuditInitialize = False +| | |-AuditReinitialize = False +| | |-AuditRestart = False +| | |-AuditStart = False +| | |-AuditStop = False +| | |-AuditTools = False +| | |-MonitorService = 'MonitorSvc' +| | |-OutputLevel = 0 +| | |-RPCSec = 'StoreGateSvc+RPC_SECTORLOGIC' +| | |-RdoLocation = 'StoreGateSvc+RPCPAD' | | |=/***** Private AlgTool Muon::RpcROD_Decoder/RpcRawDataProvider.RPC_RawDataProviderTool.RpcROD_Decoder ***** | | | |-AuditFinalize = False | | | |-AuditInitialize = False @@ -1514,10 +1364,6 @@ Py:ComponentAccumulator INFO /***** Algorithm AthSequencer/AthAlgSeq ******** | | | |-AuditStop = False | | | |-AuditTools = False | | | |-DataErrorPrintLimit = 1000 -| | | |-DetStore @0x7fb6082685d0 = ServiceHandle('StoreGateSvc/DetectorStore') -| | | |-EvtStore @0x7fb608268610 = ServiceHandle('StoreGateSvc') -| | | |-ExtraInputs @0x7fb6082ab200 = [] (default: []) -| | | |-ExtraOutputs @0x7fb6082ab1b8 = [] (default: []) | | | |-MonitorService = 'MonitorSvc' | | | |-OutputLevel = 0 | | | |-Sector13Data = False @@ -1536,23 +1382,15 @@ Py:ComponentAccumulator INFO /***** Algorithm AthSequencer/AthAlgSeq ******** | |-AuditRestart = False | |-AuditStart = False | |-AuditStop = False -| |-Cardinality = 1 -| |-DetStore @0x7fb6082ce650 = ServiceHandle('StoreGateSvc/DetectorStore') | |-Enable = True | |-ErrorCounter = 0 | |-ErrorMax = 1 -| |-EvtStore @0x7fb6082ce5d0 = ServiceHandle('StoreGateSvc') -| |-ExtraInputs @0x7fb607cf6128 = [] (default: []) -| |-ExtraOutputs @0x7fb607cf6200 = [] (default: []) | |-FilterCircularDependencies = True | |-IsIOBound = False | |-MonitorService = 'MonitorSvc' -| |-NeededResources @0x7fb607cf6170 = [] (default: []) | |-OutputLevel = 0 -| |-ProviderTool @0x7fb6095638c0 = PrivateToolHandle('Muon::TGC_RawDataProviderTool/TGC_RawDataProviderTool') | | (default: 'Muon::TGC_RawDataProviderTool/TgcRawDataProviderTool') | |-RegisterForContextService = False -| |-Timeline = True | |=/***** Private AlgTool Muon::TGC_RawDataProviderTool/TgcRawDataProvider.TGC_RawDataProviderTool ***** | | |-AuditFinalize = False | | |-AuditInitialize = False @@ -1561,12 +1399,7 @@ Py:ComponentAccumulator INFO /***** Algorithm AthSequencer/AthAlgSeq ******** | | |-AuditStart = False | | |-AuditStop = False | | |-AuditTools = False -| | |-Decoder @0x7fb6095639b0 = PrivateToolHandle('Muon::TGC_RodDecoderReadout/TgcROD_Decoder') | | | (default: 'Muon::TGC_RodDecoderReadout/TGC_RodDecoderReadout') -| | |-DetStore @0x7fb60820bb10 = ServiceHandle('StoreGateSvc/DetectorStore') -| | |-EvtStore @0x7fb60820bb50 = ServiceHandle('StoreGateSvc') -| | |-ExtraInputs @0x7fb608210560 = [] (default: []) -| | |-ExtraOutputs @0x7fb6082103b0 = [] (default: []) | | |-MonitorService = 'MonitorSvc' | | |-OutputLevel = 0 | | |-RdoLocation = 'StoreGateSvc+TGCRDO' @@ -1578,10 +1411,6 @@ Py:ComponentAccumulator INFO /***** Algorithm AthSequencer/AthAlgSeq ******** | | | |-AuditStart = False | | | |-AuditStop = False | | | |-AuditTools = False -| | | |-DetStore @0x7fb60820bc10 = ServiceHandle('StoreGateSvc/DetectorStore') -| | | |-EvtStore @0x7fb60820bc50 = ServiceHandle('StoreGateSvc') -| | | |-ExtraInputs @0x7fb608210200 = [] (default: []) -| | | |-ExtraOutputs @0x7fb608210368 = [] (default: []) | | | |-MonitorService = 'MonitorSvc' | | | |-OutputLevel = 0 | | | |-ShowStatusWords = False @@ -1600,23 +1429,15 @@ Py:ComponentAccumulator INFO /***** Algorithm AthSequencer/AthAlgSeq ******** | |-AuditRestart = False | |-AuditStart = False | |-AuditStop = False -| |-Cardinality = 1 -| |-DetStore @0x7fb608290890 = ServiceHandle('StoreGateSvc/DetectorStore') | |-Enable = True | |-ErrorCounter = 0 | |-ErrorMax = 1 -| |-EvtStore @0x7fb608290810 = ServiceHandle('StoreGateSvc') -| |-ExtraInputs @0x7fb607cf6248 = [] (default: []) -| |-ExtraOutputs @0x7fb607cf62d8 = [] (default: []) | |-FilterCircularDependencies = True | |-IsIOBound = False | |-MonitorService = 'MonitorSvc' -| |-NeededResources @0x7fb607cf61b8 = [] (default: []) | |-OutputLevel = 0 -| |-ProviderTool @0x7fb608438c50 = PrivateToolHandle('Muon::MDT_RawDataProviderTool/MDT_RawDataProviderTool') | | (default: 'Muon::MDT_RawDataProviderTool/MdtRawDataProviderTool') | |-RegisterForContextService = False -| |-Timeline = True | |=/***** Private AlgTool Muon::MDT_RawDataProviderTool/MdtRawDataProvider.MDT_RawDataProviderTool ***** | | |-AuditFinalize = False | | |-AuditInitialize = False @@ -1626,11 +1447,6 @@ Py:ComponentAccumulator INFO /***** Algorithm AthSequencer/AthAlgSeq ******** | | |-AuditStop = False | | |-AuditTools = False | | |-CsmContainerCacheKey = 'StoreGateSvc+' -| | |-Decoder @0x7fb609563c80 = PrivateToolHandle('MdtROD_Decoder/MdtROD_Decoder') -| | |-DetStore @0x7fb607dc9c10 = ServiceHandle('StoreGateSvc/DetectorStore') -| | |-EvtStore @0x7fb607dc9c50 = ServiceHandle('StoreGateSvc') -| | |-ExtraInputs @0x7fb607dd0560 = [] (default: []) -| | |-ExtraOutputs @0x7fb607dd05f0 = [] (default: []) | | |-MonitorService = 'MonitorSvc' | | |-OutputLevel = 0 | | |-RdoLocation = 'StoreGateSvc+MDTCSM' @@ -1643,10 +1459,6 @@ Py:ComponentAccumulator INFO /***** Algorithm AthSequencer/AthAlgSeq ******** | | | |-AuditStart = False | | | |-AuditStop = False | | | |-AuditTools = False -| | | |-DetStore @0x7fb607dc9d10 = ServiceHandle('StoreGateSvc/DetectorStore') -| | | |-EvtStore @0x7fb607dc9d50 = ServiceHandle('StoreGateSvc') -| | | |-ExtraInputs @0x7fb607dd04d0 = [] (default: []) -| | | |-ExtraOutputs @0x7fb607dd0488 = [] (default: []) | | | |-MonitorService = 'MonitorSvc' | | | |-OutputLevel = 0 | | | |-ReadKey = 'ConditionStore+MuonMDT_CablingMap' @@ -1665,23 +1477,15 @@ Py:ComponentAccumulator INFO /***** Algorithm AthSequencer/AthAlgSeq ******** | |-AuditRestart = False | |-AuditStart = False | |-AuditStop = False -| |-Cardinality = 1 -| |-DetStore @0x7fb6082a9d90 = ServiceHandle('StoreGateSvc/DetectorStore') | |-Enable = True | |-ErrorCounter = 0 | |-ErrorMax = 1 -| |-EvtStore @0x7fb6082a9cd0 = ServiceHandle('StoreGateSvc') -| |-ExtraInputs @0x7fb607cf6320 = [] (default: []) -| |-ExtraOutputs @0x7fb607cf6368 = [] (default: []) | |-FilterCircularDependencies = True | |-IsIOBound = False | |-MonitorService = 'MonitorSvc' -| |-NeededResources @0x7fb607cf6098 = [] (default: []) | |-OutputLevel = 0 -| |-ProviderTool @0x7fb608438e50 = PrivateToolHandle('Muon::CSC_RawDataProviderTool/CSC_RawDataProviderTool') | | (default: 'Muon::CSC_RawDataProviderTool/CscRawDataProviderTool') | |-RegisterForContextService = False -| |-Timeline = True | |=/***** Private AlgTool Muon::CSC_RawDataProviderTool/CscRawDataProvider.CSC_RawDataProviderTool ***** | | |-AuditFinalize = False | | |-AuditInitialize = False @@ -1691,12 +1495,7 @@ Py:ComponentAccumulator INFO /***** Algorithm AthSequencer/AthAlgSeq ******** | | |-AuditStop = False | | |-AuditTools = False | | |-CscContainerCacheKey = 'StoreGateSvc+' -| | |-Decoder @0x7fb609563e60 = PrivateToolHandle('Muon::CscROD_Decoder/CscROD_Decoder') -| | |-DetStore @0x7fb607d8cad0 = ServiceHandle('StoreGateSvc/DetectorStore') | | |-EventInfoKey = 'StoreGateSvc+EventInfo' -| | |-EvtStore @0x7fb607d8cb10 = ServiceHandle('StoreGateSvc') -| | |-ExtraInputs @0x7fb607d89c68 = [] (default: []) -| | |-ExtraOutputs @0x7fb607d89ef0 = [] (default: []) | | |-MonitorService = 'MonitorSvc' | | |-OutputLevel = 0 | | |-RdoLocation = 'StoreGateSvc+CSCRDO' @@ -1708,10 +1507,6 @@ Py:ComponentAccumulator INFO /***** Algorithm AthSequencer/AthAlgSeq ******** | | | |-AuditStart = False | | | |-AuditStop = False | | | |-AuditTools = False -| | | |-DetStore @0x7fb607d8cbd0 = ServiceHandle('StoreGateSvc/DetectorStore') -| | | |-EvtStore @0x7fb607d8cc10 = ServiceHandle('StoreGateSvc') -| | | |-ExtraInputs @0x7fb607d89dd0 = [] (default: []) -| | | |-ExtraOutputs @0x7fb607d89d88 = [] (default: []) | | | |-IsCosmics = False | | | |-IsOldCosmics = False | | | |-MonitorService = 'MonitorSvc' @@ -1730,29 +1525,19 @@ Py:ComponentAccumulator INFO /***** Algorithm AthSequencer/AthAlgSeq ******** | |-AuditRestart = False | |-AuditStart = False | |-AuditStop = False -| |-Cardinality = 1 -| |-DecodingTool @0x7fb608434d20 = PrivateToolHandle('Muon::RpcRdoToPrepDataTool/RpcRdoToRpcPrepDataTool') | | (default: 'Muon::RpcRdoToPrepDataTool/RpcRdoToPrepDataTool') -| |-DetStore @0x7fb607cc6590 = ServiceHandle('StoreGateSvc/DetectorStore') | |-DoSeededDecoding = False | |-Enable = True | |-ErrorCounter = 0 | |-ErrorMax = 1 -| |-EvtStore @0x7fb607cc6510 = ServiceHandle('StoreGateSvc') -| |-ExtraInputs @0x7fb607cf60e0 = [] (default: []) -| |-ExtraOutputs @0x7fb607cf6440 = [] (default: []) | |-FilterCircularDependencies = True | |-IsIOBound = False | |-MonitorService = 'MonitorSvc' -| |-NeededResources @0x7fb607cf6488 = [] (default: []) | |-OutputCollection = 'StoreGateSvc+RPC_Measurements' | |-OutputLevel = 0 | |-PrintInputRdo = False -| |-PrintPrepData @0x7fb60ae66b20 = False (default: False) -| |-RegionSelectionSvc @0x7fb607cc6610 = ServiceHandle('RegSelSvc') | |-RegisterForContextService = False | |-RoIs = 'StoreGateSvc+OutputRoIs' -| |-Timeline = True | |=/***** Private AlgTool Muon::RpcRdoToPrepDataTool/RpcRdoToRpcPrepData.RpcRdoToRpcPrepDataTool ****** | | |-AuditFinalize = False | | |-AuditInitialize = False @@ -1762,16 +1547,11 @@ Py:ComponentAccumulator INFO /***** Algorithm AthSequencer/AthAlgSeq ******** | | |-AuditStop = False | | |-AuditTools = False | | |-DecodeData = True -| | |-DetStore @0x7fb607d2e750 = ServiceHandle('StoreGateSvc/DetectorStore') -| | |-EvtStore @0x7fb607d2e7d0 = ServiceHandle('StoreGateSvc') -| | |-ExtraInputs @0x7fb607d9b638 = [] (default: []) -| | |-ExtraOutputs @0x7fb607d9b7e8 = [] (default: []) | | |-InputCollection = 'StoreGateSvc+RPC_triggerHits' | | |-MonitorService = 'MonitorSvc' | | |-OutputCollection = 'StoreGateSvc+RPCPAD' | | |-OutputLevel = 0 | | |-RPCInfoFromDb = False -| | |-RdoDecoderTool @0x7fb6080a53d0 = PrivateToolHandle('Muon::RpcRDO_Decoder/Muon::RpcRDO_Decoder') | | | (default: 'Muon::RpcRDO_Decoder') | | |-TriggerOutputCollection = 'StoreGateSvc+RPC_Measurements' | | |-etaphi_coincidenceTime = 20.0 @@ -1789,10 +1569,6 @@ Py:ComponentAccumulator INFO /***** Algorithm AthSequencer/AthAlgSeq ******** | | | |-AuditStart = False | | | |-AuditStop = False | | | |-AuditTools = False -| | | |-DetStore @0x7fb607d2e850 = ServiceHandle('StoreGateSvc/DetectorStore') -| | | |-EvtStore @0x7fb607d2e890 = ServiceHandle('StoreGateSvc') -| | | |-ExtraInputs @0x7fb607d9b908 = [] (default: []) -| | | |-ExtraOutputs @0x7fb607d9b8c0 = [] (default: []) | | | |-MonitorService = 'MonitorSvc' | | | |-OutputLevel = 0 | | | \----- (End of Private AlgTool Muon::RpcRDO_Decoder/RpcRdoToRpcPrepData.RpcRdoToRpcPrepDataTool.Muon::RpcRDO_Decoder) ----- @@ -1809,30 +1585,20 @@ Py:ComponentAccumulator INFO /***** Algorithm AthSequencer/AthAlgSeq ******** | |-AuditRestart = False | |-AuditStart = False | |-AuditStop = False -| |-Cardinality = 1 -| |-DecodingTool @0x7fb607d3b050 = PrivateToolHandle('Muon::TgcRdoToPrepDataTool/TgcRdoToTgcPrepDataTool') | | (default: 'Muon::TgcRdoToPrepDataTool/TgcPrepDataProviderTool') -| |-DetStore @0x7fb607d20490 = ServiceHandle('StoreGateSvc/DetectorStore') | |-DoSeededDecoding = False | |-Enable = True | |-ErrorCounter = 0 | |-ErrorMax = 1 -| |-EvtStore @0x7fb607d20410 = ServiceHandle('StoreGateSvc') -| |-ExtraInputs @0x7fb607cf6290 = [] (default: []) -| |-ExtraOutputs @0x7fb607cf64d0 = [] (default: []) | |-FilterCircularDependencies = True | |-IsIOBound = False | |-MonitorService = 'MonitorSvc' -| |-NeededResources @0x7fb607cf6518 = [] (default: []) | |-OutputCollection = 'StoreGateSvc+TGC_Measurements' | |-OutputLevel = 0 | |-PrintInputRdo = False -| |-PrintPrepData @0x7fb60ae66b20 = False (default: False) -| |-RegionSelectorSvc @0x7fb607d20510 = ServiceHandle('RegSelSvc') | |-RegisterForContextService = False | |-RoIs = 'StoreGateSvc+OutputRoIs' | |-Setting = 0 -| |-Timeline = True | |=/***** Private AlgTool Muon::TgcRdoToPrepDataTool/TgcRdoToTgcPrepData.TgcRdoToTgcPrepDataTool ****** | | |-AuditFinalize = False | | |-AuditInitialize = False @@ -1842,10 +1608,6 @@ Py:ComponentAccumulator INFO /***** Algorithm AthSequencer/AthAlgSeq ******** | | |-AuditStop = False | | |-AuditTools = False | | |-DecodeData = True -| | |-DetStore @0x7fb607d2e610 = ServiceHandle('StoreGateSvc/DetectorStore') -| | |-EvtStore @0x7fb607d2e950 = ServiceHandle('StoreGateSvc') -| | |-ExtraInputs @0x7fb607d3e8c0 = [] (default: []) -| | |-ExtraOutputs @0x7fb607d3e758 = [] (default: []) | | |-FillCoinData = True | | |-MonitorService = 'MonitorSvc' | | |-OutputCoinCollection = 'TrigT1CoinDataCollection' @@ -1854,9 +1616,7 @@ Py:ComponentAccumulator INFO /***** Algorithm AthSequencer/AthAlgSeq ******** | | |-RDOContainer = 'StoreGateSvc+TGCRDO' | | |-TGCHashIdOffset = 26000 | | |-dropPrdsWithZeroWidth = True -| | |-outputCoinKey @0x7fb607d3e680 = ['StoreGateSvc+dummy', 'StoreGateSvc+dummy', 'StoreGateSvc+dummy'] | | | (default: ['StoreGateSvc+dummy', 'StoreGateSvc+dummy', 'StoreGateSvc+dummy']) -| | |-prepDataKeys @0x7fb607d3e098 = ['StoreGateSvc+dummy', 'StoreGateSvc+dummy', 'StoreGateSvc+dummy', 'StoreGateSvc+dummy'] | | | (default: ['StoreGateSvc+dummy', 'StoreGateSvc+dummy', 'StoreGateSvc+dummy', 'StoreGateSvc+dummy']) | | |-show_warning_level_invalid_A09_SSW6_hit = False | | \----- (End of Private AlgTool Muon::TgcRdoToPrepDataTool/TgcRdoToTgcPrepData.TgcRdoToTgcPrepDataTool) ----- @@ -1872,29 +1632,19 @@ Py:ComponentAccumulator INFO /***** Algorithm AthSequencer/AthAlgSeq ******** | |-AuditRestart = False | |-AuditStart = False | |-AuditStop = False -| |-Cardinality = 1 -| |-DecodingTool @0x7fb60a6e0890 = PrivateToolHandle('Muon::MdtRdoToPrepDataTool/MdtRdoToMdtPrepDataTool') | | (default: 'Muon::MdtRdoToPrepDataTool/MdtPrepDataProviderTool') -| |-DetStore @0x7fb607cba450 = ServiceHandle('StoreGateSvc/DetectorStore') | |-DoSeededDecoding = False | |-Enable = True | |-ErrorCounter = 0 | |-ErrorMax = 1 -| |-EvtStore @0x7fb607cba3d0 = ServiceHandle('StoreGateSvc') -| |-ExtraInputs @0x7fb607cf65a8 = [] (default: []) -| |-ExtraOutputs @0x7fb607cf6638 = [] (default: []) | |-FilterCircularDependencies = True | |-IsIOBound = False | |-MonitorService = 'MonitorSvc' -| |-NeededResources @0x7fb607cf65f0 = [] (default: []) | |-OutputCollection = 'StoreGateSvc+MDT_DriftCircles' | |-OutputLevel = 0 | |-PrintInputRdo = False -| |-PrintPrepData @0x7fb60ae66b20 = False (default: False) -| |-RegionSelectionSvc @0x7fb607cba4d0 = ServiceHandle('RegSelSvc') | |-RegisterForContextService = False | |-RoIs = 'StoreGateSvc+OutputRoIs' -| |-Timeline = True | |=/***** Private AlgTool Muon::MdtRdoToPrepDataTool/MdtRdoToMdtPrepData.MdtRdoToMdtPrepDataTool ****** | | |-AuditFinalize = False | | |-AuditInitialize = False @@ -1905,13 +1655,9 @@ Py:ComponentAccumulator INFO /***** Algorithm AthSequencer/AthAlgSeq ******** | | |-AuditTools = False | | |-CalibratePrepData = True | | |-DecodeData = True -| | |-DetStore @0x7fb607d2ebd0 = ServiceHandle('StoreGateSvc/DetectorStore') | | |-DiscardSecondaryHitTwin = False | | |-DoPropagationCorrection = False | | |-DoTofCorrection = True -| | |-EvtStore @0x7fb607d2ec90 = ServiceHandle('StoreGateSvc') -| | |-ExtraInputs @0x7fb607d48ef0 = [] (default: []) -| | |-ExtraOutputs @0x7fb607d48d88 = [] (default: []) | | |-MonitorService = 'MonitorSvc' | | |-OutputCollection = 'StoreGateSvc+MDT_DriftCircles' | | |-OutputLevel = 0 @@ -1938,29 +1684,19 @@ Py:ComponentAccumulator INFO /***** Algorithm AthSequencer/AthAlgSeq ******** | |-AuditRestart = False | |-AuditStart = False | |-AuditStop = False -| |-Cardinality = 1 -| |-CscRdoToCscPrepDataTool @0x7fb6084155a0 = PrivateToolHandle('Muon::CscRdoToCscPrepDataTool/CscRdoToCscPrepDataTool') | | (default: 'Muon::CscRdoToCscPrepDataTool/CscRdoToPrepDataTool') -| |-DetStore @0x7fb607d3ca50 = ServiceHandle('StoreGateSvc/DetectorStore') | |-DoSeededDecoding = False | |-Enable = True | |-ErrorCounter = 0 | |-ErrorMax = 1 -| |-EvtStore @0x7fb607d3c950 = ServiceHandle('StoreGateSvc') -| |-ExtraInputs @0x7fb607cf6710 = [] (default: []) -| |-ExtraOutputs @0x7fb607cf63b0 = [] (default: []) | |-FilterCircularDependencies = True | |-IsIOBound = False | |-MonitorService = 'MonitorSvc' -| |-NeededResources @0x7fb607cf6680 = [] (default: []) | |-OutputCollection = 'StoreGateSvc+CSC_Measurements' | |-OutputLevel = 0 | |-PrintInputRdo = False -| |-PrintPrepData @0x7fb60ae66b20 = False (default: False) -| |-RegionSelectionSvc @0x7fb607d3cad0 = ServiceHandle('RegSelSvc') | |-RegisterForContextService = False | |-RoIs = 'StoreGateSvc+OutputRoIs' -| |-Timeline = True | |=/***** Private AlgTool Muon::CscRdoToCscPrepDataTool/CscRdoToCscPrepData.CscRdoToCscPrepDataTool ***** | | |-AuditFinalize = False | | |-AuditInitialize = False @@ -1970,13 +1706,7 @@ Py:ComponentAccumulator INFO /***** Algorithm AthSequencer/AthAlgSeq ******** | | |-AuditStop = False | | |-AuditTools = False | | |-CSCHashIdOffset = 22000 -| | |-CscCalibTool @0x7fb60a74ab10 = PrivateToolHandle('CscCalibTool/CscCalibTool') -| | |-CscRdoDecoderTool @0x7fb607d46b30 = PrivateToolHandle('Muon::CscRDO_Decoder/CscRDO_Decoder') | | |-DecodeData = True -| | |-DetStore @0x7fb607d2e790 = ServiceHandle('StoreGateSvc/DetectorStore') -| | |-EvtStore @0x7fb607d2ef10 = ServiceHandle('StoreGateSvc') -| | |-ExtraInputs @0x7fb607d3e2d8 = [] (default: []) -| | |-ExtraOutputs @0x7fb607d3eef0 = [] (default: []) | | |-MonitorService = 'MonitorSvc' | | |-OutputCollection = 'StoreGateSvc+CSC_Measurements' | | |-OutputLevel = 0 @@ -1989,10 +1719,6 @@ Py:ComponentAccumulator INFO /***** Algorithm AthSequencer/AthAlgSeq ******** | | | |-AuditStart = False | | | |-AuditStop = False | | | |-AuditTools = False -| | | |-DetStore @0x7fb607d2ef50 = ServiceHandle('StoreGateSvc/DetectorStore') -| | | |-EvtStore @0x7fb607d2ef90 = ServiceHandle('StoreGateSvc') -| | | |-ExtraInputs @0x7fb607d3ef80 = [] (default: []) -| | | |-ExtraOutputs @0x7fb608210cb0 = [] (default: []) | | | |-IsOnline = True | | | |-Latency = 100.0 | | | |-MonitorService = 'MonitorSvc' @@ -2019,11 +1745,6 @@ Py:ComponentAccumulator INFO /***** Algorithm AthSequencer/AthAlgSeq ******** | | | |-AuditStart = False | | | |-AuditStop = False | | | |-AuditTools = False -| | | |-CscCalibTool @0x7fb607d2ee90 = PublicToolHandle('CscCalibTool') -| | | |-DetStore @0x7fb607d2e8d0 = ServiceHandle('StoreGateSvc/DetectorStore') -| | | |-EvtStore @0x7fb607d2eed0 = ServiceHandle('StoreGateSvc') -| | | |-ExtraInputs @0x7fb607d3e050 = [] (default: []) -| | | |-ExtraOutputs @0x7fb607d3eab8 = [] (default: []) | | | |-MonitorService = 'MonitorSvc' | | | |-OutputLevel = 0 | | | \----- (End of Private AlgTool Muon::CscRDO_Decoder/CscRdoToCscPrepData.CscRdoToCscPrepDataTool.CscRDO_Decoder) ----- @@ -2040,449 +1761,29 @@ Py:ComponentAccumulator INFO /***** Algorithm AthSequencer/AthAlgSeq ******** | |-AuditRestart = False | |-AuditStart = False | |-AuditStop = False -| |-Cardinality = 1 -| |-DetStore @0x7fb607c3a290 = ServiceHandle('StoreGateSvc/DetectorStore') | |-Enable = True | |-ErrorCounter = 0 | |-ErrorMax = 1 -| |-EvtStore @0x7fb607c3a210 = ServiceHandle('StoreGateSvc') -| |-ExtraInputs @0x7fb607cf6758 = [] (default: []) -| |-ExtraOutputs @0x7fb607cf67a0 = [] (default: []) | |-FilterCircularDependencies = True | |-IsIOBound = False | |-MonitorService = 'MonitorSvc' -| |-NeededResources @0x7fb607cf67e8 = [] (default: []) | |-OutputLevel = 0 | |-RegisterForContextService = False -| |-Timeline = True -| |-cluster_builder @0x7fb607cebb90 = PublicToolHandle('CscThresholdClusterBuilderTool/CscThesholdClusterBuilderTool') | | (default: 'CscThresholdClusterBuilderTool/CscThresholdClusterBuilderTool') | \----- (End of Algorithm CscThresholdClusterBuilder/CscThesholdClusterBuilder) --------------------- \----- (End of Algorithm AthSequencer/AthAlgSeq) --------------------------------------------------- -Py:ComponentAccumulator INFO Condition Algorithms -Py:ComponentAccumulator INFO ['CondInputLoader', 'MuonMDT_CablingAlg'] -Py:ComponentAccumulator INFO Services -Py:ComponentAccumulator INFO ['EventSelector', 'ByteStreamInputSvc', 'EventPersistencySvc', 'ByteStreamCnvSvc', 'ROBDataProviderSvc', 'ByteStreamAddressProviderSvc', 'MetaDataStore', 'InputMetaDataStore', 'MetaDataSvc', 'ProxyProviderSvc', 'ByteStreamAttListMetadataSvc', 'GeoModelSvc', 'DetDescrCnvSvc', 'TagInfoMgr', 'RPCcablingServerSvc', 'IOVDbSvc', 'PoolSvc', 'CondSvc', 'DBReplicaSvc', 'MuonRPC_CablingSvc', 'LVL1TGC::TGCRecRoiSvc', 'TGCcablingServerSvc', 'AthenaPoolCnvSvc', 'MuonMDT_CablingSvc', 'AtlasFieldSvc', 'MdtCalibrationDbSvc', 'MdtCalibrationSvc', 'CSCcablingSvc', 'MuonCalib::CscCoolStrSvc'] -Py:ComponentAccumulator INFO Outputs -Py:ComponentAccumulator INFO {} -Py:ComponentAccumulator INFO Public Tools -Py:ComponentAccumulator INFO [ -Py:ComponentAccumulator INFO IOVDbMetaDataTool/IOVDbMetaDataTool, -Py:ComponentAccumulator INFO ByteStreamMetadataTool/ByteStreamMetadataTool, -Py:ComponentAccumulator INFO Muon::MuonIdHelperTool/Muon::MuonIdHelperTool, -Py:ComponentAccumulator INFO RPCCablingDbTool/RPCCablingDbTool, -Py:ComponentAccumulator INFO Muon::RPC_RawDataProviderTool/RPC_RawDataProviderTool, -Py:ComponentAccumulator INFO Muon::TGC_RawDataProviderTool/TGC_RawDataProviderTool, -Py:ComponentAccumulator INFO MDTCablingDbTool/MDTCablingDbTool, -Py:ComponentAccumulator INFO MuonCalib::MdtCalibDbCoolStrTool/MuonCalib::MdtCalibDbCoolStrTool, -Py:ComponentAccumulator INFO Muon::MDT_RawDataProviderTool/MDT_RawDataProviderTool, -Py:ComponentAccumulator INFO Muon::CSC_RawDataProviderTool/CSC_RawDataProviderTool, -Py:ComponentAccumulator INFO Muon::RpcRdoToPrepDataTool/RpcRdoToRpcPrepDataTool, -Py:ComponentAccumulator INFO Muon::TgcRdoToPrepDataTool/TgcRdoToTgcPrepDataTool, -Py:ComponentAccumulator INFO Muon::MdtRdoToPrepDataTool/MdtRdoToMdtPrepDataTool, -Py:ComponentAccumulator INFO Muon::CscRdoToCscPrepDataTool/CscRdoToCscPrepDataTool, -Py:ComponentAccumulator INFO CscThresholdClusterBuilderTool/CscThesholdClusterBuilderTool, -Py:ComponentAccumulator INFO ] -Py:Athena INFO Save Config -RpcRawDataProvider ExtraOutputs [] -RpcRawDataProvider EvtStore StoreGateSvc -RpcRawDataProvider ExtraInputs [] -RpcRawDataProvider RegionSelectionSvc RegSelSvc -RpcRawDataProvider ProviderTool Muon::RPC_RawDataProviderTool/RPC_RawDataProviderTool -RpcRawDataProvider NeededResources [] -RpcRawDataProvider DetStore StoreGateSvc/DetectorStore -RpcRawDataProvider.RPC_RawDataProviderTool ExtraOutputs [] -RpcRawDataProvider.RPC_RawDataProviderTool EvtStore StoreGateSvc -RpcRawDataProvider.RPC_RawDataProviderTool ExtraInputs [] -RpcRawDataProvider.RPC_RawDataProviderTool DetStore StoreGateSvc/DetectorStore -RpcRawDataProvider.RPC_RawDataProviderTool Decoder Muon::RpcROD_Decoder/RpcROD_Decoder -RpcRawDataProvider.RPC_RawDataProviderTool.RpcROD_Decoder ExtraOutputs [] -RpcRawDataProvider.RPC_RawDataProviderTool.RpcROD_Decoder EvtStore StoreGateSvc -RpcRawDataProvider.RPC_RawDataProviderTool.RpcROD_Decoder ExtraInputs [] -RpcRawDataProvider.RPC_RawDataProviderTool.RpcROD_Decoder DetStore StoreGateSvc/DetectorStore -TgcRawDataProvider ExtraOutputs [] -TgcRawDataProvider EvtStore StoreGateSvc -TgcRawDataProvider ExtraInputs [] -TgcRawDataProvider NeededResources [] -TgcRawDataProvider ProviderTool Muon::TGC_RawDataProviderTool/TGC_RawDataProviderTool -TgcRawDataProvider DetStore StoreGateSvc/DetectorStore -TgcRawDataProvider.TGC_RawDataProviderTool ExtraOutputs [] -TgcRawDataProvider.TGC_RawDataProviderTool EvtStore StoreGateSvc -TgcRawDataProvider.TGC_RawDataProviderTool ExtraInputs [] -TgcRawDataProvider.TGC_RawDataProviderTool DetStore StoreGateSvc/DetectorStore -TgcRawDataProvider.TGC_RawDataProviderTool Decoder Muon::TGC_RodDecoderReadout/TgcROD_Decoder -TgcRawDataProvider.TGC_RawDataProviderTool.TgcROD_Decoder ExtraOutputs [] -TgcRawDataProvider.TGC_RawDataProviderTool.TgcROD_Decoder EvtStore StoreGateSvc -TgcRawDataProvider.TGC_RawDataProviderTool.TgcROD_Decoder ExtraInputs [] -TgcRawDataProvider.TGC_RawDataProviderTool.TgcROD_Decoder DetStore StoreGateSvc/DetectorStore -MdtRawDataProvider ExtraOutputs [] -MdtRawDataProvider EvtStore StoreGateSvc -MdtRawDataProvider ExtraInputs [] -MdtRawDataProvider NeededResources [] -MdtRawDataProvider ProviderTool Muon::MDT_RawDataProviderTool/MDT_RawDataProviderTool -MdtRawDataProvider DetStore StoreGateSvc/DetectorStore -MdtRawDataProvider.MDT_RawDataProviderTool ExtraOutputs [] -MdtRawDataProvider.MDT_RawDataProviderTool EvtStore StoreGateSvc -MdtRawDataProvider.MDT_RawDataProviderTool ExtraInputs [] -MdtRawDataProvider.MDT_RawDataProviderTool DetStore StoreGateSvc/DetectorStore -MdtRawDataProvider.MDT_RawDataProviderTool Decoder MdtROD_Decoder/MdtROD_Decoder -MdtRawDataProvider.MDT_RawDataProviderTool.MdtROD_Decoder ExtraOutputs [] -MdtRawDataProvider.MDT_RawDataProviderTool.MdtROD_Decoder EvtStore StoreGateSvc -MdtRawDataProvider.MDT_RawDataProviderTool.MdtROD_Decoder ExtraInputs [] -MdtRawDataProvider.MDT_RawDataProviderTool.MdtROD_Decoder DetStore StoreGateSvc/DetectorStore -CscRawDataProvider ExtraOutputs [] -CscRawDataProvider EvtStore StoreGateSvc -CscRawDataProvider ExtraInputs [] -CscRawDataProvider NeededResources [] -CscRawDataProvider ProviderTool Muon::CSC_RawDataProviderTool/CSC_RawDataProviderTool -CscRawDataProvider DetStore StoreGateSvc/DetectorStore -CscRawDataProvider.CSC_RawDataProviderTool ExtraOutputs [] -CscRawDataProvider.CSC_RawDataProviderTool EvtStore StoreGateSvc -CscRawDataProvider.CSC_RawDataProviderTool ExtraInputs [] -CscRawDataProvider.CSC_RawDataProviderTool DetStore StoreGateSvc/DetectorStore -CscRawDataProvider.CSC_RawDataProviderTool Decoder Muon::CscROD_Decoder/CscROD_Decoder -CscRawDataProvider.CSC_RawDataProviderTool.CscROD_Decoder ExtraOutputs [] -CscRawDataProvider.CSC_RawDataProviderTool.CscROD_Decoder EvtStore StoreGateSvc -CscRawDataProvider.CSC_RawDataProviderTool.CscROD_Decoder ExtraInputs [] -CscRawDataProvider.CSC_RawDataProviderTool.CscROD_Decoder DetStore StoreGateSvc/DetectorStore -RpcRdoToRpcPrepData ExtraOutputs [] -RpcRdoToRpcPrepData DecodingTool Muon::RpcRdoToPrepDataTool/RpcRdoToRpcPrepDataTool -RpcRdoToRpcPrepData EvtStore StoreGateSvc -RpcRdoToRpcPrepData ExtraInputs [] -RpcRdoToRpcPrepData PrintPrepData False -RpcRdoToRpcPrepData RegionSelectionSvc RegSelSvc -RpcRdoToRpcPrepData NeededResources [] -RpcRdoToRpcPrepData DetStore StoreGateSvc/DetectorStore -RpcRdoToRpcPrepData.RpcRdoToRpcPrepDataTool ExtraOutputs [] -RpcRdoToRpcPrepData.RpcRdoToRpcPrepDataTool EvtStore StoreGateSvc -RpcRdoToRpcPrepData.RpcRdoToRpcPrepDataTool ExtraInputs [] -RpcRdoToRpcPrepData.RpcRdoToRpcPrepDataTool RdoDecoderTool Muon::RpcRDO_Decoder/Muon::RpcRDO_Decoder -RpcRdoToRpcPrepData.RpcRdoToRpcPrepDataTool DetStore StoreGateSvc/DetectorStore -RpcRdoToRpcPrepData.RpcRdoToRpcPrepDataTool.Muon::RpcRDO_Decoder ExtraOutputs [] -RpcRdoToRpcPrepData.RpcRdoToRpcPrepDataTool.Muon::RpcRDO_Decoder EvtStore StoreGateSvc -RpcRdoToRpcPrepData.RpcRdoToRpcPrepDataTool.Muon::RpcRDO_Decoder ExtraInputs [] -RpcRdoToRpcPrepData.RpcRdoToRpcPrepDataTool.Muon::RpcRDO_Decoder DetStore StoreGateSvc/DetectorStore -TgcRdoToTgcPrepData ExtraOutputs [] -TgcRdoToTgcPrepData DecodingTool Muon::TgcRdoToPrepDataTool/TgcRdoToTgcPrepDataTool -TgcRdoToTgcPrepData EvtStore StoreGateSvc -TgcRdoToTgcPrepData RegionSelectorSvc RegSelSvc -TgcRdoToTgcPrepData ExtraInputs [] -TgcRdoToTgcPrepData PrintPrepData False -TgcRdoToTgcPrepData NeededResources [] -TgcRdoToTgcPrepData DetStore StoreGateSvc/DetectorStore -TgcRdoToTgcPrepData.TgcRdoToTgcPrepDataTool ExtraOutputs [] -TgcRdoToTgcPrepData.TgcRdoToTgcPrepDataTool prepDataKeys ['StoreGateSvc+dummy', 'StoreGateSvc+dummy', 'StoreGateSvc+dummy', 'StoreGateSvc+dummy'] -TgcRdoToTgcPrepData.TgcRdoToTgcPrepDataTool EvtStore StoreGateSvc -TgcRdoToTgcPrepData.TgcRdoToTgcPrepDataTool outputCoinKey ['StoreGateSvc+dummy', 'StoreGateSvc+dummy', 'StoreGateSvc+dummy'] -TgcRdoToTgcPrepData.TgcRdoToTgcPrepDataTool ExtraInputs [] -TgcRdoToTgcPrepData.TgcRdoToTgcPrepDataTool DetStore StoreGateSvc/DetectorStore -MdtRdoToMdtPrepData ExtraOutputs [] -MdtRdoToMdtPrepData DecodingTool Muon::MdtRdoToPrepDataTool/MdtRdoToMdtPrepDataTool -MdtRdoToMdtPrepData EvtStore StoreGateSvc -MdtRdoToMdtPrepData ExtraInputs [] -MdtRdoToMdtPrepData PrintPrepData False -MdtRdoToMdtPrepData RegionSelectionSvc RegSelSvc -MdtRdoToMdtPrepData NeededResources [] -MdtRdoToMdtPrepData DetStore StoreGateSvc/DetectorStore -MdtRdoToMdtPrepData.MdtRdoToMdtPrepDataTool ExtraOutputs [] -MdtRdoToMdtPrepData.MdtRdoToMdtPrepDataTool EvtStore StoreGateSvc -MdtRdoToMdtPrepData.MdtRdoToMdtPrepDataTool ExtraInputs [] -MdtRdoToMdtPrepData.MdtRdoToMdtPrepDataTool DetStore StoreGateSvc/DetectorStore -CscRdoToCscPrepData ExtraOutputs [] -CscRdoToCscPrepData CscRdoToCscPrepDataTool Muon::CscRdoToCscPrepDataTool/CscRdoToCscPrepDataTool -CscRdoToCscPrepData EvtStore StoreGateSvc -CscRdoToCscPrepData ExtraInputs [] -CscRdoToCscPrepData PrintPrepData False -CscRdoToCscPrepData RegionSelectionSvc RegSelSvc -CscRdoToCscPrepData NeededResources [] -CscRdoToCscPrepData DetStore StoreGateSvc/DetectorStore -CscRdoToCscPrepData.CscRdoToCscPrepDataTool ExtraOutputs [] -CscRdoToCscPrepData.CscRdoToCscPrepDataTool CscCalibTool CscCalibTool/CscCalibTool -CscRdoToCscPrepData.CscRdoToCscPrepDataTool EvtStore StoreGateSvc -CscRdoToCscPrepData.CscRdoToCscPrepDataTool CscRdoDecoderTool Muon::CscRDO_Decoder/CscRDO_Decoder -CscRdoToCscPrepData.CscRdoToCscPrepDataTool ExtraInputs [] -CscRdoToCscPrepData.CscRdoToCscPrepDataTool DetStore StoreGateSvc/DetectorStore -CscRdoToCscPrepData.CscRdoToCscPrepDataTool.CscRDO_Decoder ExtraOutputs [] -CscRdoToCscPrepData.CscRdoToCscPrepDataTool.CscRDO_Decoder EvtStore StoreGateSvc -CscRdoToCscPrepData.CscRdoToCscPrepDataTool.CscRDO_Decoder ExtraInputs [] -CscRdoToCscPrepData.CscRdoToCscPrepDataTool.CscRDO_Decoder CscCalibTool CscCalibTool -CscRdoToCscPrepData.CscRdoToCscPrepDataTool.CscRDO_Decoder DetStore StoreGateSvc/DetectorStore -CscRdoToCscPrepData.CscRdoToCscPrepDataTool.CscCalibTool ExtraOutputs [] -CscRdoToCscPrepData.CscRdoToCscPrepDataTool.CscCalibTool EvtStore StoreGateSvc -CscRdoToCscPrepData.CscRdoToCscPrepDataTool.CscCalibTool ExtraInputs [] -CscRdoToCscPrepData.CscRdoToCscPrepDataTool.CscCalibTool DetStore StoreGateSvc/DetectorStore -CscThesholdClusterBuilder ExtraOutputs [] -CscThesholdClusterBuilder EvtStore StoreGateSvc -CscThesholdClusterBuilder ExtraInputs [] -CscThesholdClusterBuilder cluster_builder CscThresholdClusterBuilderTool/CscThesholdClusterBuilderTool -CscThesholdClusterBuilder NeededResources [] -CscThesholdClusterBuilder DetStore StoreGateSvc/DetectorStore -CondInputLoader ExtraOutputs [] -CondInputLoader Load [('CondAttrListCollection', '/MDT/CABLING/MEZZANINE_SCHEMA'), ('CondAttrListCollection', '/EXT/DCS/MAGNETS/SENSORDATA'), ('CondAttrListCollection', '/MDT/CABLING/MAP_SCHEMA')] -CondInputLoader EvtStore StoreGateSvc -CondInputLoader ExtraInputs [] -CondInputLoader NeededResources [] -CondInputLoader DetStore StoreGateSvc/DetectorStore -MuonMDT_CablingAlg ExtraOutputs [] -MuonMDT_CablingAlg EvtStore StoreGateSvc -MuonMDT_CablingAlg ExtraInputs [] -MuonMDT_CablingAlg NeededResources [] -MuonMDT_CablingAlg DetStore StoreGateSvc/DetectorStore -MuonMDT_CablingAlg MezzanineFolders /MDT/CABLING/MEZZANINE_SCHEMA -MuonMDT_CablingAlg MapFolders /MDT/CABLING/MAP_SCHEMA -ToolSvc.IOVDbMetaDataTool ExtraOutputs [] -ToolSvc.IOVDbMetaDataTool FoldersToBeModified ['/Simulation/Parameters'] -ToolSvc.IOVDbMetaDataTool MinMaxRunNumbers [] -ToolSvc.IOVDbMetaDataTool EvtStore StoreGateSvc -ToolSvc.IOVDbMetaDataTool AttributesToBeRemoved ['RandomSeedOffset'] -ToolSvc.IOVDbMetaDataTool ExtraInputs [] -ToolSvc.IOVDbMetaDataTool DetStore StoreGateSvc/DetectorStore -ToolSvc.ByteStreamMetadataTool ExtraOutputs [] -ToolSvc.ByteStreamMetadataTool EvtStore StoreGateSvc -ToolSvc.ByteStreamMetadataTool ExtraInputs [] -ToolSvc.ByteStreamMetadataTool DetStore StoreGateSvc/DetectorStore -ToolSvc.Muon::MuonIdHelperTool ExtraOutputs [] -ToolSvc.Muon::MuonIdHelperTool EvtStore StoreGateSvc -ToolSvc.Muon::MuonIdHelperTool ExtraInputs [] -ToolSvc.Muon::MuonIdHelperTool DetStore StoreGateSvc/DetectorStore -ToolSvc.RPCCablingDbTool ExtraOutputs [] -ToolSvc.RPCCablingDbTool EvtStore StoreGateSvc -ToolSvc.RPCCablingDbTool ExtraInputs [] -ToolSvc.RPCCablingDbTool DetStore StoreGateSvc/DetectorStore -ToolSvc.RPCCablingDbTool MapCorrectionFolder /RPC/CABLING/MAP_SCHEMA_CORR -ToolSvc.RPCCablingDbTool MapConfigurationFolder /RPC/CABLING/MAP_SCHEMA -ToolSvc.RPC_RawDataProviderTool ExtraOutputs [] -ToolSvc.RPC_RawDataProviderTool EvtStore StoreGateSvc -ToolSvc.RPC_RawDataProviderTool ExtraInputs [] -ToolSvc.RPC_RawDataProviderTool DetStore StoreGateSvc/DetectorStore -ToolSvc.RPC_RawDataProviderTool Decoder Muon::RpcROD_Decoder/RpcROD_Decoder -ToolSvc.RPC_RawDataProviderTool.RpcROD_Decoder ExtraOutputs [] -ToolSvc.RPC_RawDataProviderTool.RpcROD_Decoder EvtStore StoreGateSvc -ToolSvc.RPC_RawDataProviderTool.RpcROD_Decoder ExtraInputs [] -ToolSvc.RPC_RawDataProviderTool.RpcROD_Decoder DetStore StoreGateSvc/DetectorStore -ToolSvc.TGC_RawDataProviderTool ExtraOutputs [] -ToolSvc.TGC_RawDataProviderTool EvtStore StoreGateSvc -ToolSvc.TGC_RawDataProviderTool ExtraInputs [] -ToolSvc.TGC_RawDataProviderTool DetStore StoreGateSvc/DetectorStore -ToolSvc.TGC_RawDataProviderTool Decoder Muon::TGC_RodDecoderReadout/TgcROD_Decoder -ToolSvc.TGC_RawDataProviderTool.TgcROD_Decoder ExtraOutputs [] -ToolSvc.TGC_RawDataProviderTool.TgcROD_Decoder EvtStore StoreGateSvc -ToolSvc.TGC_RawDataProviderTool.TgcROD_Decoder ExtraInputs [] -ToolSvc.TGC_RawDataProviderTool.TgcROD_Decoder DetStore StoreGateSvc/DetectorStore -ToolSvc.MDTCablingDbTool ExtraOutputs [] -ToolSvc.MDTCablingDbTool EvtStore StoreGateSvc -ToolSvc.MDTCablingDbTool ExtraInputs [] -ToolSvc.MDTCablingDbTool DetStore StoreGateSvc/DetectorStore -ToolSvc.MDTCablingDbTool MezzanineFolders /MDT/CABLING/MEZZANINE_SCHEMA -ToolSvc.MDTCablingDbTool MapFolders /MDT/CABLING/MAP_SCHEMA -ToolSvc.MuonCalib::MdtCalibDbCoolStrTool ExtraOutputs [] -ToolSvc.MuonCalib::MdtCalibDbCoolStrTool RT_InputFiles ['Muon_RT_default.data'] -ToolSvc.MuonCalib::MdtCalibDbCoolStrTool TimeSlewingCorrection False -ToolSvc.MuonCalib::MdtCalibDbCoolStrTool RtFolder /MDT/RTBLOB -ToolSvc.MuonCalib::MdtCalibDbCoolStrTool MeanCorrectionVsR [-5.45973, -4.57559, -3.71995, -3.45051, -3.4505, -3.4834, -3.59509, -3.74869, -3.92066, -4.10799, -4.35237, -4.61329, -4.84111, -5.14524] -ToolSvc.MuonCalib::MdtCalibDbCoolStrTool defaultT0 40 -ToolSvc.MuonCalib::MdtCalibDbCoolStrTool ExtraInputs [] -ToolSvc.MuonCalib::MdtCalibDbCoolStrTool UseMLRt True -ToolSvc.MuonCalib::MdtCalibDbCoolStrTool PropagationSpeedBeta 0.85 -ToolSvc.MuonCalib::MdtCalibDbCoolStrTool DetStore StoreGateSvc/DetectorStore -ToolSvc.MuonCalib::MdtCalibDbCoolStrTool TubeFolder /MDT/T0BLOB -ToolSvc.MuonCalib::MdtCalibDbCoolStrTool EvtStore StoreGateSvc -ToolSvc.MDT_RawDataProviderTool ExtraOutputs [] -ToolSvc.MDT_RawDataProviderTool EvtStore StoreGateSvc -ToolSvc.MDT_RawDataProviderTool ExtraInputs [] -ToolSvc.MDT_RawDataProviderTool DetStore StoreGateSvc/DetectorStore -ToolSvc.MDT_RawDataProviderTool Decoder MdtROD_Decoder/MdtROD_Decoder -ToolSvc.MDT_RawDataProviderTool.MdtROD_Decoder ExtraOutputs [] -ToolSvc.MDT_RawDataProviderTool.MdtROD_Decoder EvtStore StoreGateSvc -ToolSvc.MDT_RawDataProviderTool.MdtROD_Decoder ExtraInputs [] -ToolSvc.MDT_RawDataProviderTool.MdtROD_Decoder DetStore StoreGateSvc/DetectorStore -ToolSvc.CSC_RawDataProviderTool ExtraOutputs [] -ToolSvc.CSC_RawDataProviderTool EvtStore StoreGateSvc -ToolSvc.CSC_RawDataProviderTool ExtraInputs [] -ToolSvc.CSC_RawDataProviderTool DetStore StoreGateSvc/DetectorStore -ToolSvc.CSC_RawDataProviderTool Decoder Muon::CscROD_Decoder/CscROD_Decoder -ToolSvc.CSC_RawDataProviderTool.CscROD_Decoder ExtraOutputs [] -ToolSvc.CSC_RawDataProviderTool.CscROD_Decoder EvtStore StoreGateSvc -ToolSvc.CSC_RawDataProviderTool.CscROD_Decoder ExtraInputs [] -ToolSvc.CSC_RawDataProviderTool.CscROD_Decoder DetStore StoreGateSvc/DetectorStore -ToolSvc.RpcRdoToRpcPrepDataTool ExtraOutputs [] -ToolSvc.RpcRdoToRpcPrepDataTool EvtStore StoreGateSvc -ToolSvc.RpcRdoToRpcPrepDataTool ExtraInputs [] -ToolSvc.RpcRdoToRpcPrepDataTool RdoDecoderTool Muon::RpcRDO_Decoder/Muon::RpcRDO_Decoder -ToolSvc.RpcRdoToRpcPrepDataTool DetStore StoreGateSvc/DetectorStore -ToolSvc.RpcRdoToRpcPrepDataTool.Muon::RpcRDO_Decoder ExtraOutputs [] -ToolSvc.RpcRdoToRpcPrepDataTool.Muon::RpcRDO_Decoder EvtStore StoreGateSvc -ToolSvc.RpcRdoToRpcPrepDataTool.Muon::RpcRDO_Decoder ExtraInputs [] -ToolSvc.RpcRdoToRpcPrepDataTool.Muon::RpcRDO_Decoder DetStore StoreGateSvc/DetectorStore -ToolSvc.TgcRdoToTgcPrepDataTool ExtraOutputs [] -ToolSvc.TgcRdoToTgcPrepDataTool prepDataKeys ['StoreGateSvc+dummy', 'StoreGateSvc+dummy', 'StoreGateSvc+dummy', 'StoreGateSvc+dummy'] -ToolSvc.TgcRdoToTgcPrepDataTool EvtStore StoreGateSvc -ToolSvc.TgcRdoToTgcPrepDataTool outputCoinKey ['StoreGateSvc+dummy', 'StoreGateSvc+dummy', 'StoreGateSvc+dummy'] -ToolSvc.TgcRdoToTgcPrepDataTool ExtraInputs [] -ToolSvc.TgcRdoToTgcPrepDataTool DetStore StoreGateSvc/DetectorStore -ToolSvc.MdtRdoToMdtPrepDataTool ExtraOutputs [] -ToolSvc.MdtRdoToMdtPrepDataTool EvtStore StoreGateSvc -ToolSvc.MdtRdoToMdtPrepDataTool ExtraInputs [] -ToolSvc.MdtRdoToMdtPrepDataTool DetStore StoreGateSvc/DetectorStore -ToolSvc.CscRdoToCscPrepDataTool ExtraOutputs [] -ToolSvc.CscRdoToCscPrepDataTool CscCalibTool CscCalibTool/CscCalibTool -ToolSvc.CscRdoToCscPrepDataTool EvtStore StoreGateSvc -ToolSvc.CscRdoToCscPrepDataTool CscRdoDecoderTool Muon::CscRDO_Decoder/CscRDO_Decoder -ToolSvc.CscRdoToCscPrepDataTool ExtraInputs [] -ToolSvc.CscRdoToCscPrepDataTool DetStore StoreGateSvc/DetectorStore -ToolSvc.CscRdoToCscPrepDataTool.CscRDO_Decoder ExtraOutputs [] -ToolSvc.CscRdoToCscPrepDataTool.CscRDO_Decoder EvtStore StoreGateSvc -ToolSvc.CscRdoToCscPrepDataTool.CscRDO_Decoder ExtraInputs [] -ToolSvc.CscRdoToCscPrepDataTool.CscRDO_Decoder CscCalibTool CscCalibTool -ToolSvc.CscRdoToCscPrepDataTool.CscRDO_Decoder DetStore StoreGateSvc/DetectorStore -ToolSvc.CscRdoToCscPrepDataTool.CscCalibTool ExtraOutputs [] -ToolSvc.CscRdoToCscPrepDataTool.CscCalibTool EvtStore StoreGateSvc -ToolSvc.CscRdoToCscPrepDataTool.CscCalibTool ExtraInputs [] -ToolSvc.CscRdoToCscPrepDataTool.CscCalibTool DetStore StoreGateSvc/DetectorStore -ToolSvc.CscThesholdClusterBuilderTool ExtraOutputs [] -ToolSvc.CscThesholdClusterBuilderTool split_fitter CscSplitClusterFitter/CscSplitClusterFitter -ToolSvc.CscThesholdClusterBuilderTool strip_fitter CalibCscStripFitter/CalibCscStripFitter -ToolSvc.CscThesholdClusterBuilderTool cscCalibTool CscCalibTool/CscCalibTool -ToolSvc.CscThesholdClusterBuilderTool default_fitter SimpleCscClusterFitter/SimpleCscClusterFitter -ToolSvc.CscThesholdClusterBuilderTool precision_fitter QratCscClusterFitter/QratCscClusterFitter -ToolSvc.CscThesholdClusterBuilderTool EvtStore StoreGateSvc -ToolSvc.CscThesholdClusterBuilderTool ExtraInputs [] -ToolSvc.CscThesholdClusterBuilderTool DetStore StoreGateSvc/DetectorStore -EventSelector SharedMemoryTool -EventSelector SkipEventSequence [] -EventSelector CounterTool -EventSelector Input [] -EventSelector ByteStreamInputSvc ByteStreamInputSvc -EventSelector.xAODMaker::EventInfoSelectorTool ExtraOutputs [] -EventSelector.xAODMaker::EventInfoSelectorTool EvtStore StoreGateSvc -EventSelector.xAODMaker::EventInfoSelectorTool BeamCondSvc BeamCondSvc -EventSelector.xAODMaker::EventInfoSelectorTool ExtraInputs [] -EventSelector.xAODMaker::EventInfoSelectorTool LuminosityTool LuminosityTool -EventSelector.xAODMaker::EventInfoSelectorTool DetStore StoreGateSvc/DetectorStore -ByteStreamInputSvc EventStore StoreGateSvc -ByteStreamInputSvc FullFileName ['/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1'] -ByteStreamInputSvc AttributeListKeys [] -ByteStreamInputSvc MetaDataStore StoreGateSvc/InputMetaDataStore -EventPersistencySvc CnvServices ['ByteStreamCnvSvc', 'AthenaPoolCnvSvc/AthenaPoolCnvSvc', 'DetDescrCnvSvc', 'TagInfoMgr', 'AthenaPoolCnvSvc'] -ByteStreamCnvSvc InitCnvs ['EventInfo', 'ROIB::RoIBResult', 'HLT::HLTResult'] -ByteStreamCnvSvc EventStore StoreGateSvc -ByteStreamCnvSvc ROD2ROBmap [] -ByteStreamCnvSvc ByteStreamOutputSvcList [] -ByteStreamCnvSvc GetDetectorMask True -ROBDataProviderSvc filterRobWithStatus [] -ROBDataProviderSvc filterSubDetWithStatus [] -ByteStreamAddressProviderSvc TypeNames ['TileCellIDC/TileCellIDC', 'MdtDigitContainer/MDT_DIGITS', 'RpcDigitContainer/RPC_DIGITS', 'TgcDigitContainer/TGC_DIGITS', 'CscDigitContainer/CSC_DIGITS', 'ROIB::RecRoIBResult/RecRoIBResult', 'MuCTPI_RIO/MUCTPI_RIO', 'CTP_RIO/CTP_RIO', 'LArRawChannelContainer/LArRawChannels', 'TileRawChannelContainer/TileRawChannelCnt', 'ROIB::RoIBResult/RoIBResult', 'MuCTPI_RDO/MUCTPI_RDO', 'HLT::HLTResult/HLTResult_L2', 'HLT::HLTResult/HLTResult_EF', 'CTP_RDO/CTP_RDO', 'L1TopoRDOCollection/L1TopoRDOCollection'] -ByteStreamAddressProviderSvc TopoProcModuleID [129, 145] -ByteStreamAddressProviderSvc JetProcModuleID [172, 173] -ByteStreamAddressProviderSvc CaloClusterProcModuleID [168, 169, 170, 171] -MetaDataStore IncidentSvc IncidentSvc -MetaDataStore ProxyProviderSvc ProxyProviderSvc -InputMetaDataStore IncidentSvc IncidentSvc -InputMetaDataStore ProxyProviderSvc ProxyProviderSvc -MetaDataSvc MetaDataContainer MetaDataHdr -MetaDataSvc CnvSvc AthenaPoolCnvSvc -ProxyProviderSvc ProviderNames ['ByteStreamAddressProviderSvc', 'IOVDbSvc', 'MetaDataSvc', 'TagInfoMgr'] -GeoModelSvc SupportedGeometry 22 -GeoModelSvc AtlasVersion ATLAS-R2-2016-01-00-01 -GeoModelSvc.MuonDetectorTool ExtraOutputs [] -GeoModelSvc.MuonDetectorTool TheMuonAlignmentTool -GeoModelSvc.MuonDetectorTool EvtStore StoreGateSvc -GeoModelSvc.MuonDetectorTool UseConditionDb 1 -GeoModelSvc.MuonDetectorTool ExtraInputs [] -GeoModelSvc.MuonDetectorTool UseIlinesFromGM 1 -GeoModelSvc.MuonDetectorTool SelectedStJff [] -GeoModelSvc.MuonDetectorTool DetStore StoreGateSvc/DetectorStore -GeoModelSvc.MuonDetectorTool SelectedStations [] -GeoModelSvc.MuonDetectorTool SelectedStJzz [] -DetDescrCnvSvc IdDictFromRDB True -DetDescrCnvSvc IdDictName IdDictParser/ATLAS_IDS.xml -DetDescrCnvSvc DetectorNodes [] -DetDescrCnvSvc DetectorManagers [] -TagInfoMgr ExtraTagValuePairs ['AtlasRelease', 'Athena-22.0.1'] -RPCcablingServerSvc Atlas True -RPCcablingServerSvc useMuonRPC_CablingSvc True -RPCcablingServerSvc forcedUse True -IOVDbSvc Folders ['/MDT/CABLING/MEZZANINE_SCHEMA<db>COOLONL_MDT/CONDBR2</db>', '/RPC/TRIGGER/CM_THR_ETA<db>COOLONL_RPC/CONDBR2</db>', '/MDT/RTBLOB<db>COOLOFL_MDT/CONDBR2</db>', '/MDT/T0BLOB<db>COOLOFL_MDT/CONDBR2</db>', '/CSC/STAT <key>CSC_STAT</key> <db>COOLOFL_CSC/CONDBR2</db>', '/CSC/NOISE <key>CSC_NOISE</key> <db>COOLOFL_CSC/CONDBR2</db>', '/CSC/PED <key>CSC_PED</key> <db>COOLOFL_CSC/CONDBR2</db>', '/CSC/RMS <key>CSC_RMS</key> <db>COOLOFL_CSC/CONDBR2</db>', '/GLOBAL/BField/Maps <noover/><db>COOLONL_GLOBAL/CONDBR2</db>', '/CSC/T0PHASE <key>CSC_T0PHASE</key> <db>COOLOFL_CSC/CONDBR2</db>', '/TGC/CABLING/MAP_SCHEMA<db>COOLONL_TGC/CONDBR2</db>', '/EXT/DCS/MAGNETS/SENSORDATA<db>COOLOFL_DCS/CONDBR2</db>', '/RPC/CABLING/MAP_SCHEMA_CORR<db>COOLONL_RPC/CONDBR2</db>', '/MDT/CABLING/MAP_SCHEMA<db>COOLONL_MDT/CONDBR2</db>', '/RPC/TRIGGER/CM_THR_PHI<db>COOLONL_RPC/CONDBR2</db>', '/CSC/PSLOPE <key>CSC_PSLOPE</key> <db>COOLOFL_CSC/CONDBR2</db>', '/RPC/CABLING/MAP_SCHEMA<db>COOLONL_RPC/CONDBR2</db>', '/CSC/T0BASE <key>CSC_T0BASE</key> <db>COOLOFL_CSC/CONDBR2</db>', '/CSC/FTHOLD <key>CSC_FTHOLD</key> <db>COOLOFL_CSC/CONDBR2</db>'] -IOVDbSvc CacheAlign 3 -IOVDbSvc dbConnection sqlite://;schema=mycool.db;dbname=CONDBR2 -IOVDbSvc GlobalTag CONDBR2-BLKPA-2018-13 -IOVDbSvc FoldersToMetaData ['/GLOBAL/BField/Maps'] -IOVDbSvc DBInstance CONDBR2 -IOVDbSvc overrideTags [] -PoolSvc FrontierRefreshSchema [] -PoolSvc ReadCatalog ['apcfile:poolcond/PoolFileCatalog.xml', 'prfile:poolcond/PoolCat_oflcond.xml', 'apcfile:poolcond/PoolCat_oflcond.xml', 'prfile:poolcond/PoolCat_comcond.xml', 'apcfile:poolcond/PoolCat_comcond.xml'] -PoolSvc MaxFilesOpen 0 -DBReplicaSvc COOLSQLiteVetoPattern /DBRelease/ -MuonRPC_CablingSvc ConfFilePath MuonRPC_Cabling/ -MuonRPC_CablingSvc TheRpcTriggerDbTool RPCTriggerDbTool -MuonRPC_CablingSvc ConfFileName LVL1confAtlas.data -MuonRPC_CablingSvc FeetPadThresolds [] -MuonRPC_CablingSvc TheRpcCablingDbTool RPCCablingDbTool/RPCCablingDbTool -MuonRPC_CablingSvc RPCTriggerRoadsfromCool True -MuonRPC_CablingSvc CorrFileName LVL1confAtlas.corr -MuonRPC_CablingSvc CosmicConfiguration True -TGCcablingServerSvc Atlas True -TGCcablingServerSvc useMuonTGC_CablingSvc True -TGCcablingServerSvc forcedUse True -AthenaPoolCnvSvc InputPoolAttributes [] -AthenaPoolCnvSvc PoolAttributes [] -AthenaPoolCnvSvc PrintInputAttrPerEvt [] -AthenaPoolCnvSvc InputStreamingTool -AthenaPoolCnvSvc OutputPoolFileAllocator [] -AthenaPoolCnvSvc MaxFileSizes [] -MuonMDT_CablingSvc DBTool MDTCablingDbTool/MDTCablingDbTool -MuonMDT_CablingSvc TagInfoManager TagInfoMgr -MuonMDT_CablingSvc ForcedUse True -MuonMDT_CablingSvc UseOldCabling False -AtlasFieldSvc UseDCS True -MdtCalibrationDbSvc CreateSlewingFunctions False -MdtCalibrationDbSvc DBTool MuonCalib::MdtCalibDbAsciiTool -MdtCalibrationDbSvc CreateBFieldFunctions False -MdtCalibrationDbSvc CreateWireSagFunctions False -MdtCalibrationSvc DoTofCorrection True -MdtCalibrationSvc MagFieldSvc AtlasFieldSvc -MdtCalibrationSvc DoWireSagCorrection False -MdtCalibrationSvc TimeWindowSetting 2 -MdtCalibrationSvc DoSlewingCorrection False -MdtCalibrationSvc DoTemperatureCorrection True -MuonCalib::CscCoolStrSvc ParSGKeys ['CSC_PED', 'CSC_NOISE', 'CSC_PSLOPE', 'CSC_STAT', 'CSC_RMS', 'CSC_FTHOLD', 'CSC_T0BASE', 'CSC_T0PHASE'] -MuonCalib::CscCoolStrSvc ParDefaults ['2048', '3.5', '0.189', '0', '2.56', '0', '0', '0'] -MuonCalib::CscCoolStrSvc ParDataTypes ['float', 'float', 'float', 'uint32_t', 'float', 'float', 'float', 'float'] -MuonCalib::CscCoolStrSvc ParFolders ['/CSC/PED', '/CSC/NOISE', '/CSC/PSLOPE', '/CSC/STAT', '/CSC/RMS', '/CSC/FTHOLD', '/CSC/T0BASE', '/CSC/T0PHASE'] -MuonCalib::CscCoolStrSvc ParCats ['CHANNEL', 'CHANNEL', 'CHANNEL', 'CHANNEL', 'CHANNEL', 'CHANNEL', 'CHANNEL', 'ASM'] -MuonCalib::CscCoolStrSvc ParNames ['ped', 'noise', 'pslope', 'status', 'rms', 'f001', 't0base', 't0phase'] JOs reading stage finished, launching Athena from pickle file -Wed Feb 27 17:18:53 GMT 2019 -Preloading tcmalloc_minimal.so -Py:Athena INFO using release [AthenaExternals-22.0.1] [x86_64-slc6-gcc8-opt] [2.0.22/2840e19] -- built on [2019-02-26T2109] -Py:Athena INFO including file "AthenaCommon/Preparation.py" -Py:Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py" Py:Athena INFO executing ROOT6Setup Py:Athena INFO configuring AthenaHive with [1] concurrent threads and [1] concurrent events Py:AlgScheduler INFO setting up AvalancheSchedulerSvc/AvalancheSchedulerSvc with 1 threads -Py:Athena INFO including file "AthenaCommon/Execution.py" Py:Athena INFO now loading MuonRdoDecode.pkl ... -Py:ConfigurableDb INFO Read module info for 5460 configurables from 4 genConfDb files -Py:ConfigurableDb INFO No duplicates have been found: that's good ! -[?1034hApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 -ApplicationMgr SUCCESS -==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v31r0) - running on ppevm02.ppe.gla.ac.uk on Wed Feb 27 17:19:08 2019 -==================================================================================================================================== ApplicationMgr INFO Application Manager Configured successfully -ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0 -Py:Athena INFO including file "AthenaCommon/runbatch.py" -StatusCodeSvc INFO initialize AthDictLoaderSvc INFO in initialize... AthDictLoaderSvc INFO acquired Dso-registry -ClassIDSvc INFO getRegistryEntries: read 3383 CLIDRegistry entries for module ALL CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) CoreDumpSvc INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) -ByteStreamAddre... INFO Initializing ByteStreamAddressProviderSvc - package version ByteStreamCnvSvcBase-00-00-00 -ROBDataProviderSvc INFO Initializing ROBDataProviderSvc - package version ByteStreamCnvSvcBase-00-00-00 ROBDataProviderSvc INFO ---> Filter out empty ROB fragments = 'filterEmptyROB':False ROBDataProviderSvc INFO ---> Filter out specific ROBs by Status Code: # ROBs = 0 ROBDataProviderSvc INFO ---> Filter out Sub Detector ROBs by Status Code: # Sub Detectors = 0 @@ -2497,10 +1798,6 @@ ByteStreamAddre... INFO -- Will fill Store with id = 0 PoolSvc INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.xml) [ok] PoolSvc INFO Set connectionsvc retry/timeout/IDLE timeout to 'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled PoolSvc INFO Frontier compression level set to 5 -DBReplicaSvc INFO Frontier server at (serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://frontier-atlas.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data -DBReplicaSvc INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-02-26T2150/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/share/dbreplica.config -DBReplicaSvc INFO Total of 1 servers found for host ppevm02.ppe.gla.ac.uk [ATLF ] -DBReplicaSvc INFO COOL SQLite replicas will be excluded if matching pattern /DBRelease/ PoolSvc INFO Successfully setup replica sorting algorithm PoolSvc INFO Setting up APR FileCatalog and Streams PoolSvc INFO Resolved path (via ATLAS_POOLCOND_PATH) is /cvmfs/atlas-condb.cern.ch/repo/conditions/poolcond/PoolFileCatalog.xml @@ -2509,26 +1806,13 @@ PoolSvc WARNING Unable to locate catalog for apcfile:poolcond/PoolCat_ PoolSvc WARNING Unable to locate catalog for prfile:poolcond/PoolCat_comcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables PoolSvc WARNING Unable to locate catalog for apcfile:poolcond/PoolCat_comcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables PoolSvc INFO POOL WriteCatalog is xmlcatalog_file:PoolFileCatalog.xml -DbSession INFO Open DbSession -Domain[ROOT_All] INFO > Access DbDomain READ [ROOT_All] IOVDbSvc INFO Opened read transaction for POOL PersistencySvc IOVDbSvc INFO Only 5 POOL conditions files will be open at once -IOVDbSvc INFO Cache alignment will be done in 3 slices IOVDbSvc INFO Global tag: CONDBR2-BLKPA-2018-13 set from joboptions IOVDbFolder INFO Inputfile tag override disabled for /GLOBAL/BField/Maps -IOVDbSvc INFO Folder /GLOBAL/BField/Maps will be written to file metadata IOVDbSvc INFO Initialised with 8 connections and 19 folders IOVDbSvc INFO Service IOVDbSvc initialised successfully -MetaDataSvc INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00 -AthenaPoolCnvSvc INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00 -ToolSvc.ByteStr... INFO Initializing ToolSvc.ByteStreamMetadataTool - package version ByteStreamCnvSvc-00-00-00 -MetaDataSvc INFO Found MetaDataTools = PublicToolHandleArray(['IOVDbMetaDataTool/IOVDbMetaDataTool','ByteStreamMetadataTool/ByteStreamMetadataTool']) IOVDbSvc INFO Opening COOL connection for COOLONL_MDT/CONDBR2 -ClassIDSvc INFO getRegistryEntries: read 3291 CLIDRegistry entries for module ALL -ClassIDSvc INFO getRegistryEntries: read 163 CLIDRegistry entries for module ALL -ClassIDSvc INFO getRegistryEntries: read 4012 CLIDRegistry entries for module ALL -ClassIDSvc INFO getRegistryEntries: read 129 CLIDRegistry entries for module ALL -ClassIDSvc INFO getRegistryEntries: read 3031 CLIDRegistry entries for module ALL IOVSvc INFO No IOVSvcTool associated with store "StoreGateSvc" IOVSvcTool INFO IOVRanges will be checked at every Event IOVDbSvc INFO Opening COOL connection for COOLONL_RPC/CONDBR2 @@ -2609,10 +1893,6 @@ GeoModelSvc::RD...WARNING Getting PixTBMatComponents with default tag GeoModelSvc::RD...WARNING Getting PixTBMaterials with default tag GeoModelSvc::RD...WARNING Getting InDetMatComponents with default tag GeoModelSvc::RD...WARNING Getting InDetMaterials with default tag -GeoModelSvc.Muo... INFO create MuonDetectorTool - package version = MuonGeoModel-00-00-00 -GeoModelSvc.Muo... INFO (from GeoModelSvc) AtlasVersion = <ATLAS-R2-2016-01-00-01> MuonVersion = <> -GeoModelSvc.Muo... INFO Keys for Muon Switches are (key) ATLAS-R2-2016-01-00-01 (node) ATLAS -GeoModelSvc.Muo... INFO (from GeoModelSvc) in AtlasVersion = <ATLAS-R2-2016-01-00-01> default MuonVersion is <MuonSpectrometer-R.08.01> GeoModelSvc.Muo... INFO Properties have been set as follows: GeoModelSvc.Muo... INFO LayoutName R GeoModelSvc.Muo... INFO IncludeCutouts 0 @@ -2727,7 +2007,6 @@ AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! MuGM:MuonFactory INFO MMIDHELPER retrieved from DetStore MuGM:MuonFactory INFO **************** MuonDetectorFactory001 ************************ MuGM:MuonFactory INFO *** Start building the Muon Geometry Tree ********************** -MuGM:RDBReadAtlas INFO Start retriving dbObjects with tag = <ATLAS-R2-2016-01-00-01> node <ATLAS> RDBAccessSvc WARNING Could not get the tag for XtomoData node. Returning 0 pointer to IRDBQuery MuGM:RDBReadAtlas INFO After getQuery XtomoData In DblQ00Xtomo(data) @@ -2757,7 +2036,6 @@ MuGM:ProcCutouts INFO Processing Cutouts DONE MuGM:RDBReadAtlas INFO ProcessTGCreadout - version 7 wirespacing 1.8 MuGM:RDBReadAtlas INFO Intermediate Objects built from primary numbers MuGM:MuonFactory INFO theMaterialManager retrieven successfully from the DetStore -MuGM:MuonFactory INFO MuonSystem description from OracleTag=<ATLAS-R2-2016-01-00-01> and node=<ATLAS> MuGM:MuonFactory INFO TreeTop added to the Manager MuGM:MuonFactory INFO Muon Layout R.08.01 MuGM:MuonFactory INFO Fine Clash Fixing disabled: (should be ON/OFF for Simulation/Reconstruction) @@ -2781,13 +2059,9 @@ MuGM:MuonFactory INFO ***************************************************** MGM::MuonDetect... INFO Init A/B Line Containers - done - size is respectively 1758/0 MGM::MuonDetect... INFO No Aline for CSC wire layers loaded -GeoModelSvc INFO GeoModelSvc.MuonDetectorTool SZ= 45912Kb Time = 1.01S GeoModelSvc.Muo... INFO CondAttrListCollection not found in the DetectorStore GeoModelSvc.Muo... INFO Unable to register callback on CondAttrListCollection for any folder in the list GeoModelSvc.Muo... INFO This is OK unless you expect to read alignment and deformations from COOL -ClassIDSvc INFO getRegistryEntries: read 1455 CLIDRegistry entries for module ALL -AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00 -ClassIDSvc INFO getRegistryEntries: read 1794 CLIDRegistry entries for module ALL CondInputLoader INFO Initializing CondInputLoader... CondInputLoader INFO Adding base classes: + ( 'CondAttrListCollection' , 'ConditionStore+/EXT/DCS/MAGNETS/SENSORDATA' ) -> @@ -2797,17 +2071,12 @@ CondInputLoader INFO Will create WriteCondHandle dependencies for the follo + ( 'CondAttrListCollection' , 'ConditionStore+/EXT/DCS/MAGNETS/SENSORDATA' ) + ( 'CondAttrListCollection' , 'ConditionStore+/MDT/CABLING/MAP_SCHEMA' ) + ( 'CondAttrListCollection' , 'ConditionStore+/MDT/CABLING/MEZZANINE_SCHEMA' ) -ClassIDSvc INFO getRegistryEntries: read 1370 CLIDRegistry entries for module ALL -ClassIDSvc INFO getRegistryEntries: read 743 CLIDRegistry entries for module ALL RpcRawDataProvider INFO RpcRawDataProvider::initialize RpcRawDataProvider INFO 'DoSeededDecoding':False -ClassIDSvc INFO getRegistryEntries: read 1699 CLIDRegistry entries for module ALL -MuonRPC_CablingSvc INFO Initializing MuonRPC_CablingSvc - package version MuonRPC_Cabling-00-00-00 ToolSvc.RPCCabl... INFO Initializing - folders names are: conf /RPC/CABLING/MAP_SCHEMA / corr /RPC/CABLING/MAP_SCHEMA_CORR MuonRPC_CablingSvc INFO RPCCablingDbTool retrieved with statusCode = SUCCESS with handle TheRpcCablingDbTool = PublicToolHandle('RPCCablingDbTool/RPCCablingDbTool') MuonRPC_CablingSvc INFO Register call-back against 2 folders listed below MuonRPC_CablingSvc INFO Folder n. 1 </RPC/CABLING/MAP_SCHEMA> found in the DetStore -ClassIDSvc INFO getRegistryEntries: read 501 CLIDRegistry entries for module ALL MuonRPC_CablingSvc INFO initMappingModel registered for call-back against folder </RPC/CABLING/MAP_SCHEMA> MuonRPC_CablingSvc INFO Folder n. 2 </RPC/CABLING/MAP_SCHEMA_CORR> found in the DetStore MuonRPC_CablingSvc INFO initMappingModel registered for call-back against folder </RPC/CABLING/MAP_SCHEMA_CORR> @@ -2822,32 +2091,25 @@ RpcRawDataProvi... INFO Retrieved service ServiceHandle('ROBDataProviderSvc') RpcRawDataProvi... INFO Tool = RpcRawDataProvider.RPC_RawDataProviderTool is connected to JobOptionsSvc Service = JobOptionsSvc RpcRawDataProvi... INFO initialize() successful in RpcRawDataProvider.RPC_RawDataProviderTool TgcRawDataProvider INFO TgcRawDataProvider::initialize -ClassIDSvc INFO getRegistryEntries: read 878 CLIDRegistry entries for module ALL TgcRawDataProvi... INFO initialize() successful in TgcRawDataProvider.TGC_RawDataProviderTool.TgcROD_Decoder TgcRawDataProvi... INFO Retrieved tool Decoder = PrivateToolHandle('Muon::TGC_RodDecoderReadout/TgcROD_Decoder') TgcRawDataProvi... INFO Retrieved service ServiceHandle('ROBDataProviderSvc') TgcRawDataProvi... INFO Tool = TgcRawDataProvider.TGC_RawDataProviderTool is connected to JobOptionsSvc Service = JobOptionsSvc MuonTGC_CablingSvc INFO for 1/12 sector initialize ToolSvc.TGCCabl... INFO initialize -ClassIDSvc INFO getRegistryEntries: read 273 CLIDRegistry entries for module ALL -IOVSvcTool INFO Still in initialize phase, not tiggering callback for MuonTGC_CablingSvc[0x16e5ec00]+219 bound to CondAttrListCollection[/TGC/CABLING/MAP_SCHEMA] TgcRawDataProvi... INFO initialize() successful in TgcRawDataProvider.TGC_RawDataProviderTool MdtRawDataProvider INFO MdtRawDataProvider::initialize -ClassIDSvc INFO getRegistryEntries: read 922 CLIDRegistry entries for module ALL MdtRawDataProvi... INFO Retrieved service ServiceHandle('ROBDataProviderSvc') MdtRawDataProvi... INFO Processing configuration for layouts with BME chambers. MdtRawDataProvi... INFO Processing configuration for layouts with BMG chambers. MdtRawDataProvi... INFO Retrieved tool Decoder = PrivateToolHandle('MdtROD_Decoder/MdtROD_Decoder') MdtRawDataProvi... INFO Tool = MdtRawDataProvider.MDT_RawDataProviderTool is connected to JobOptionsSvc Service = JobOptionsSvc MdtRawDataProvi... INFO initialize() successful in MdtRawDataProvider.MDT_RawDataProviderTool -ClassIDSvc INFO getRegistryEntries: read 658 CLIDRegistry entries for module ALL CscRawDataProvi... INFO Retrieved service ServiceHandle('ROBDataProviderSvc') CscRawDataProvi... INFO Tool = CscRawDataProvider.CSC_RawDataProviderTool is connected to JobOptionsSvc Service = JobOptionsSvc CscRawDataProvi... INFO Retrieved tool Decoder = PrivateToolHandle('Muon::CscROD_Decoder/CscROD_Decoder') CscRawDataProvi... INFO The Muon Geometry version is R.08.01 CscRawDataProvi... INFO initialize() successful in CscRawDataProvider.CSC_RawDataProviderTool -ClassIDSvc INFO getRegistryEntries: read 53 CLIDRegistry entries for module ALL -RpcRdoToRpcPrep... INFO package version = MuonRPC_CnvTools-00-00-00 RpcRdoToRpcPrep... INFO properties are RpcRdoToRpcPrep... INFO processingData 0 RpcRdoToRpcPrep... INFO produceRpcCoinDatafromTriggerWords 1 @@ -2862,31 +2124,18 @@ RpcRdoToRpcPrep... INFO Retrieved DecodingTool = PrivateToolHandle('Muon::RpcR TgcRdoToTgcPrep... INFO initialize() successful in TgcRdoToTgcPrepData.TgcRdoToTgcPrepDataTool TgcRdoToTgcPrep... INFO Retrieved DecodingTool = PrivateToolHandle('Muon::TgcRdoToPrepDataTool/TgcRdoToTgcPrepDataTool') MdtCalibrationSvc INFO Processing configuration for layouts with BMG chambers. -ClassIDSvc INFO getRegistryEntries: read 194 CLIDRegistry entries for module ALL AtlasFieldSvc INFO initialize() ... AtlasFieldSvc INFO maps will be chosen reading COOL folder /GLOBAL/BField/Maps -ClassIDSvc INFO getRegistryEntries: read 163 CLIDRegistry entries for module ALL AtlasFieldSvc INFO magnet currents will be read from COOL folder /EXT/DCS/MAGNETS/SENSORDATA AtlasFieldSvc INFO Booked callback for /EXT/DCS/MAGNETS/SENSORDATA AtlasFieldSvc INFO initialize() successful MdtRdoToMdtPrep... INFO Processing configuration for layouts with BME chambers. MdtRdoToMdtPrep... INFO Processing configuration for layouts with BMG chambers. MdtRdoToMdtPrep... INFO Retrieved DecodingTool = PrivateToolHandle('Muon::MdtRdoToPrepDataTool/MdtRdoToMdtPrepDataTool') -ClassIDSvc INFO getRegistryEntries: read 60 CLIDRegistry entries for module ALL CscRdoToCscPrep... INFO The Geometry version is MuonSpectrometer-R.08.01 MuonCalib::CscC... INFO Initializing CscCoolStrSvc -ClassIDSvc INFO getRegistryEntries: read 181 CLIDRegistry entries for module ALL -IOVSvcTool INFO Still in initialize phase, not tiggering callback for MuonCalib::CscCoolStrSvc[0x1af89a00]+259 bound to CondAttrListCollection[CSC_PED] -IOVSvcTool INFO Still in initialize phase, not tiggering callback for MuonCalib::CscCoolStrSvc[0x1af89a00]+259 bound to CondAttrListCollection[CSC_NOISE] -IOVSvcTool INFO Still in initialize phase, not tiggering callback for MuonCalib::CscCoolStrSvc[0x1af89a00]+259 bound to CondAttrListCollection[CSC_PSLOPE] -IOVSvcTool INFO Still in initialize phase, not tiggering callback for MuonCalib::CscCoolStrSvc[0x1af89a00]+259 bound to CondAttrListCollection[CSC_STAT] -IOVSvcTool INFO Still in initialize phase, not tiggering callback for MuonCalib::CscCoolStrSvc[0x1af89a00]+259 bound to CondAttrListCollection[CSC_RMS] -IOVSvcTool INFO Still in initialize phase, not tiggering callback for MuonCalib::CscCoolStrSvc[0x1af89a00]+259 bound to CondAttrListCollection[CSC_FTHOLD] -IOVSvcTool INFO Still in initialize phase, not tiggering callback for MuonCalib::CscCoolStrSvc[0x1af89a00]+259 bound to CondAttrListCollection[CSC_T0BASE] -IOVSvcTool INFO Still in initialize phase, not tiggering callback for MuonCalib::CscCoolStrSvc[0x1af89a00]+259 bound to CondAttrListCollection[CSC_T0PHASE] CscRdoToCscPrep... INFO Retrieved CscRdoToCscPrepDataTool = PrivateToolHandle('Muon::CscRdoToCscPrepDataTool/CscRdoToCscPrepDataTool') HistogramPersis...WARNING Histograms saving not required. -EventSelector INFO Initializing EventSelector - package version ByteStreamCnvSvc-00-00-00 EventSelector WARNING InputCollections not properly set, checking EventStorageInputSvc properties EventSelector INFO Retrieved StoreGateSvc name of '':StoreGateSvc EventSelector INFO reinitialization... @@ -2898,12 +2147,10 @@ ToolSvc.Luminos... INFO BunchLumisTool.empty() is TRUE, skipping... ToolSvc.Luminos... INFO BunchGroupTool.empty() is TRUE, skipping... ToolSvc.Luminos... INFO LBLBFolderName is empty, skipping... EventSelector INFO Retrieved InputCollections from InputSvc -ByteStreamInputSvc INFO Initializing ByteStreamInputSvc - package version ByteStreamCnvSvc-00-00-00 EventSelector INFO reinitialization... AthenaEventLoopMgr INFO Setup EventSelector service EventSelector ApplicationMgr INFO Application Manager Initialized successfully ByteStreamInputSvc INFO Picked valid file: /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1 -ClassIDSvc INFO getRegistryEntries: read 1159 CLIDRegistry entries for module ALL CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/EXT/DCS/MAGNETS/SENSORDATA' CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/MDT/CABLING/MAP_SCHEMA' CondInputLoader INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/MDT/CABLING/MEZZANINE_SCHEMA' @@ -2981,7 +2228,6 @@ phi high-pt mu11 mu15 mu15 RPCcabling INFO CablingRPC---InitMaps from COOL: going to read configuration -RPCcabling INFO CablingRPC--->> RPC cabling map from COOL << RPCcabling INFO CablingRPC--- ReadConf: map has size 222202 RPCcabling INFO CablingRPC--- ReadConf: map n. of lines read is 924 RPCcabling INFO CablingRPC--- ReadConf: version is 5.0 Atlas R_07_03_RUN2ver104 @@ -3019,19 +2265,13 @@ AtlasFieldSvc INFO Trying to read from DCS: [channel name, index, value] AtlasFieldSvc INFO Trying to read from DCS: [channel name, index, value] Toroids_SCurrent , 4 , 20397.7 AtlasFieldSvc INFO Currents read from DCS: solenoid 7729.99 toroid 20399.9 AtlasFieldSvc INFO Initializing the field map (solenoidCurrent=7729.99 toroidCurrent=20399.9) -AtlasFieldSvc INFO reading the map from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/atlas/offline/ReleaseData/v20/MagneticFieldMaps/bfieldmap_7730_20400_14m.root -AtlasFieldSvc INFO Initialized the field map from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/atlas/offline/ReleaseData/v20/MagneticFieldMaps/bfieldmap_7730_20400_14m.root -ClassIDSvc INFO getRegistryEntries: read 672 CLIDRegistry entries for module ALL AthenaEventLoopMgr INFO ===>>> start processing event #186525031, run #327265 0 events processed so far <<<=== IOVDbSvc INFO Opening COOL connection for COOLONL_MDT/CONDBR2 IOVDbFolder INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to MDTCablingMapSchema_BMG_01 for folder /MDT/CABLING/MAP_SCHEMA IOVDbFolder INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to MDTCablingMezzanineSchema_M5-RUN2 for folder /MDT/CABLING/MEZZANINE_SCHEMA IOVDbSvc INFO Disconnecting from COOLONL_MDT/CONDBR2 MuonMDT_CablingAlg INFO Size of CondAttrListCollection ( 'CondAttrListCollection' , 'ConditionStore+/MDT/CABLING/MEZZANINE_SCHEMA' ) readCdoMez->size()= 24 -MuonMDT_CablingAlg INFO Range of input is {[0,l:0] - [INVALID]} MuonMDT_CablingAlg INFO Size of CondAttrListCollection ( 'CondAttrListCollection' , 'ConditionStore+/MDT/CABLING/MAP_SCHEMA' ) readCdoMap->size()= 2312 -MuonMDT_CablingAlg INFO Range of input is {[327264,l:4294640031] - [327265,l:4294640030]} -MuonMDT_CablingAlg INFO recorded new MuonMDT_CablingMap with range {[327264,l:4294640031] - [327265,l:4294640030]} into Conditions Store AthenaEventLoopMgr INFO ===>>> done processing event #186525031, run #327265 1 events processed so far <<<=== AthenaEventLoopMgr INFO ===>>> start processing event #186524665, run #327265 1 events processed so far <<<=== AthenaEventLoopMgr INFO ===>>> done processing event #186524665, run #327265 2 events processed so far <<<=== @@ -3071,42 +2311,11 @@ AthenaEventLoopMgr INFO ===>>> start processing event #186568452, run #3272 AthenaEventLoopMgr INFO ===>>> done processing event #186568452, run #327265 19 events processed so far <<<=== AthenaEventLoopMgr INFO ===>>> start processing event #186580451, run #327265 19 events processed so far <<<=== AthenaEventLoopMgr INFO ===>>> done processing event #186580451, run #327265 20 events processed so far <<<=== -Domain[ROOT_All] INFO > Deaccess DbDomain READ [ROOT_All] ApplicationMgr INFO Application Manager Stopped successfully -IncidentProcAlg1 INFO Finalize CondInputLoader INFO Finalizing CondInputLoader... -IncidentProcAlg2 INFO Finalize AtlasFieldSvc INFO finalize() successful EventInfoByteSt... INFO finalize IdDictDetDescrCnv INFO in finalize -IOVDbFolder INFO Folder /EXT/DCS/MAGNETS/SENSORDATA (AttrListColl) db-read 1/2 objs/chan/bytes 4/4/25 (( 0.26 ))s -IOVDbFolder INFO Folder /GLOBAL/BField/Maps (AttrListColl) db-read 1/1 objs/chan/bytes 3/3/271 (( 0.59 ))s -IOVDbFolder INFO Folder /MDT/CABLING/MAP_SCHEMA (AttrListColl) db-read 1/1 objs/chan/bytes 2312/2437/216598 (( 0.84 ))s -IOVDbFolder INFO Folder /MDT/CABLING/MEZZANINE_SCHEMA (AttrListColl) db-read 1/1 objs/chan/bytes 24/24/300 (( 0.43 ))s -IOVDbFolder INFO Folder /MDT/RTBLOB (AttrListColl) db-read 0/0 objs/chan/bytes 0/1186/0 (( 0.00 ))s -IOVDbFolder INFO Folder /MDT/T0BLOB (AttrListColl) db-read 0/0 objs/chan/bytes 0/1186/0 (( 0.00 ))s -IOVDbFolder INFO Folder /RPC/CABLING/MAP_SCHEMA (AttrListColl) db-read 1/1 objs/chan/bytes 1/1/444470 (( 0.62 ))s -IOVDbFolder INFO Folder /RPC/CABLING/MAP_SCHEMA_CORR (AttrListColl) db-read 1/1 objs/chan/bytes 1/1/58804 (( 0.42 ))s -IOVDbFolder INFO Folder /RPC/TRIGGER/CM_THR_ETA (AttrListColl) db-read 1/1 objs/chan/bytes 1613/1613/7562972 (( 0.94 ))s -IOVDbFolder INFO Folder /RPC/TRIGGER/CM_THR_PHI (AttrListColl) db-read 1/1 objs/chan/bytes 1612/1612/8101322 (( 0.77 ))s -IOVDbFolder INFO Folder /TGC/CABLING/MAP_SCHEMA (AttrListColl) db-read 1/1 objs/chan/bytes 1/1/7408 (( 0.56 ))s -IOVDbFolder INFO Folder /CSC/FTHOLD (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/331329 (( 0.67 ))s -IOVDbFolder INFO Folder /CSC/NOISE (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/359591 (( 0.50 ))s -IOVDbFolder INFO Folder /CSC/PED (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/422629 (( 0.56 ))s -IOVDbFolder INFO Folder /CSC/PSLOPE (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/363009 (( 0.47 ))s -IOVDbFolder INFO Folder /CSC/RMS (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/422831 (( 0.58 ))s -IOVDbFolder INFO Folder /CSC/STAT (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/236289 (( 0.48 ))s -IOVDbFolder INFO Folder /CSC/T0BASE (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/322855 (( 0.53 ))s -IOVDbFolder INFO Folder /CSC/T0PHASE (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/3234 (( 0.36 ))s -IOVDbSvc INFO bytes in (( 9.58 ))s -IOVDbSvc INFO Connection sqlite://;schema=mycool.db;dbname=CONDBR2 : nConnect: 0 nFolders: 0 ReadTime: (( 0.00 ))s -IOVDbSvc INFO Connection COOLONL_MDT/CONDBR2 : nConnect: 2 nFolders: 2 ReadTime: (( 1.26 ))s -IOVDbSvc INFO Connection COOLONL_RPC/CONDBR2 : nConnect: 2 nFolders: 4 ReadTime: (( 2.75 ))s -IOVDbSvc INFO Connection COOLOFL_MDT/CONDBR2 : nConnect: 1 nFolders: 2 ReadTime: (( 0.00 ))s -IOVDbSvc INFO Connection COOLOFL_CSC/CONDBR2 : nConnect: 2 nFolders: 8 ReadTime: (( 4.15 ))s -IOVDbSvc INFO Connection COOLONL_GLOBAL/CONDBR2 : nConnect: 2 nFolders: 1 ReadTime: (( 0.59 ))s -IOVDbSvc INFO Connection COOLONL_TGC/CONDBR2 : nConnect: 2 nFolders: 1 ReadTime: (( 0.56 ))s -IOVDbSvc INFO Connection COOLOFL_DCS/CONDBR2 : nConnect: 2 nFolders: 1 ReadTime: (( 0.26 ))s AthDictLoaderSvc INFO in finalize... ToolSvc INFO Removing all tools created by ToolSvc ToolSvc.ByteStr... INFO in finalize() @@ -3130,8 +2339,6 @@ ToolSvc.TGCCabl... INFO finalize *****Chrono***** INFO **************************************************************************************************** *****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) *****Chrono***** INFO **************************************************************************************************** -cObj_ALL INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 18 -ChronoStatSvc INFO Time User : Tot= 11.1 [s] #= 1 *****Chrono***** INFO **************************************************************************************************** ChronoStatSvc.f... INFO Service finalized successfully ApplicationMgr INFO Application Manager Finalized successfully diff --git a/MuonSpectrometer/MuonConfig/share/MuonDataDecodeTest_Cache.ref b/MuonSpectrometer/MuonConfig/share/MuonDataDecodeTest_Cache.ref index 5c116b9ab32b1a8e8c1aa90b511e872fa1841750..bca879f265a777080aeb63bf51fd090d83231f5a 100644 --- a/MuonSpectrometer/MuonConfig/share/MuonDataDecodeTest_Cache.ref +++ b/MuonSpectrometer/MuonConfig/share/MuonDataDecodeTest_Cache.ref @@ -3,8 +3,10 @@ Flag categories that can be loaded dynamically Category : Generator name : Defined in DQ : __dq : AthenaConfiguration/AllConfigFlags.py Detector : __detector : AthenaConfiguration/AllConfigFlags.py +Egamma : __egamma : AthenaConfiguration/AllConfigFlags.py LAr : __lar : AthenaConfiguration/AllConfigFlags.py Muon : __muon : AthenaConfiguration/AllConfigFlags.py +Sim : __simulation : AthenaConfiguration/AllConfigFlags.py Trigger : __trigger : AthenaConfiguration/AllConfigFlags.py Py:Athena INFO About to setup Rpc Raw data decoding Py:ComponentAccumulator DEBUG Adding component EventSelectorByteStream/EventSelector to the job @@ -34,13 +36,16 @@ Py:ComponentAccumulator DEBUG Adding component ProxyProviderSvc/ProxyProviderS Py:ComponentAccumulator DEBUG Adding component ByteStreamAttListMetadataSvc/ByteStreamAttListMetadataSvc to the job Py:ComponentAccumulator DEBUG Adding component IOVDbMetaDataTool/IOVDbMetaDataTool to the job Py:ComponentAccumulator DEBUG Adding component ByteStreamMetadataTool/ByteStreamMetadataTool to the job +Py:ComponentAccumulator DEBUG Merging algorithm MuonCacheCreator to a sequence AthAlgSeq dynamically loading the flag Detector Flag Name : Value Flag categories that can be loaded dynamically Category : Generator name : Defined in DQ : __dq : AthenaConfiguration/AllConfigFlags.py +Egamma : __egamma : AthenaConfiguration/AllConfigFlags.py LAr : __lar : AthenaConfiguration/AllConfigFlags.py Muon : __muon : AthenaConfiguration/AllConfigFlags.py +Sim : __simulation : AthenaConfiguration/AllConfigFlags.py Trigger : __trigger : AthenaConfiguration/AllConfigFlags.py Py:ComponentAccumulator DEBUG Adding component GeoModelSvc/GeoModelSvc to the job Py:ComponentAccumulator DEBUG Adding component DetDescrCnvSvc/DetDescrCnvSvc to the job @@ -327,7 +332,9 @@ Flag Name : Value Flag categories that can be loaded dynamically Category : Generator name : Defined in DQ : __dq : AthenaConfiguration/AllConfigFlags.py +Egamma : __egamma : AthenaConfiguration/AllConfigFlags.py LAr : __lar : AthenaConfiguration/AllConfigFlags.py +Sim : __simulation : AthenaConfiguration/AllConfigFlags.py Trigger : __trigger : AthenaConfiguration/AllConfigFlags.py Py:ComponentAccumulator DEBUG Adding component CondInputLoader/CondInputLoader to the job Py:ComponentAccumulator DEBUG Adding component IOVDbSvc/IOVDbSvc to the job @@ -414,9 +421,7 @@ Py:ComponentAccumulator DEBUG Reconciled configuration of component TagInfoMgr Py:ComponentAccumulator DEBUG Reconciled configuration of component ProxyProviderSvc Py:ComponentAccumulator DEBUG Reconciled configuration of component ToolSvc.Muon::MuonIdHelperTool Py:ComponentAccumulator DEBUG Adding component ROBDataProviderSvc/ROBDataProviderSvc to the job -Py:ComponentAccumulator DEBUG Merging algorithm MuonCacheCreator to a sequence AthAlgSeq Py:ComponentAccumulator DEBUG Adding component Muon::MDT_RawDataProviderTool/MDT_RawDataProviderTool to the job -Py:ComponentAccumulator DEBUG Merging algorithm MuonCacheCreator to a sequence AthAlgSeq Py:ComponentAccumulator DEBUG Reconciled configuration of component CondInputLoader Py:ComponentAccumulator DEBUG Adding component MuonMDT_CablingAlg/MuonMDT_CablingAlg to the job Py:ComponentAccumulator DEBUG Reconciled configuration of component GeoModelSvc @@ -493,7 +498,6 @@ Py:ComponentAccumulator DEBUG Reconciled configuration of component TagInfoMgr Py:ComponentAccumulator DEBUG Reconciled configuration of component ProxyProviderSvc Py:ComponentAccumulator DEBUG Reconciled configuration of component ToolSvc.Muon::MuonIdHelperTool Py:ComponentAccumulator DEBUG Adding component ROBDataProviderSvc/ROBDataProviderSvc to the job -Py:ComponentAccumulator DEBUG Merging algorithm MuonCacheCreator to a sequence AthAlgSeq Py:ComponentAccumulator DEBUG Adding component Muon::CSC_RawDataProviderTool/CSC_RawDataProviderTool to the job Py:ComponentAccumulator DEBUG Reconciled configuration of component GeoModelSvc Py:ComponentAccumulator DEBUG Reconciled configuration of component DetDescrCnvSvc @@ -1118,9 +1122,29 @@ Py:Athena INFO Print Config |-MonitorService = 'MonitorSvc' |-OutputLevel = 0 |-RegisterForContextService = False -|-Sequential = False |-StopOverride = False |-TimeOut = 0.0 +|=/***** Algorithm MuonCacheCreator/MuonCacheCreator ************************************************* +| |-AuditAlgorithms = False +| |-AuditBeginRun = False +| |-AuditEndRun = False +| |-AuditExecute = False +| |-AuditFinalize = False +| |-AuditInitialize = False +| |-AuditReinitialize = False +| |-AuditRestart = False +| |-AuditStart = False +| |-AuditStop = False +| |-DisableViewWarning = False +| |-Enable = True +| |-ErrorCounter = 0 +| |-ErrorMax = 1 +| |-FilterCircularDependencies = True +| |-IsIOBound = False +| |-MonitorService = 'MonitorSvc' +| |-OutputLevel = 0 +| |-RegisterForContextService = False +| \----- (End of Algorithm MuonCacheCreator/MuonCacheCreator) ---------------------------------------- |=/***** Algorithm Muon::RpcRawDataProvider/RpcRawDataProvider *************************************** | |-AuditAlgorithms = False | |-AuditBeginRun = False @@ -1218,6 +1242,383 @@ Py:Athena INFO Print Config | | | \----- (End of Private AlgTool Muon::TGC_RodDecoderReadout/TgcRawDataProvider.TGC_RawDataProviderTool.TgcROD_Decoder) ----- | | \----- (End of Private AlgTool Muon::TGC_RawDataProviderTool/TgcRawDataProvider.TGC_RawDataProviderTool) ----- | \----- (End of Algorithm Muon::TgcRawDataProvider/TgcRawDataProvider) ------------------------------ +|=/***** Algorithm Muon::MdtRawDataProvider/MdtRawDataProvider *************************************** +| |-AuditAlgorithms = False +| |-AuditBeginRun = False +| |-AuditEndRun = False +| |-AuditExecute = False +| |-AuditFinalize = False +| |-AuditInitialize = False +| |-AuditReinitialize = False +| |-AuditRestart = False +| |-AuditStart = False +| |-AuditStop = False +| |-Enable = True +| |-ErrorCounter = 0 +| |-ErrorMax = 1 +| |-FilterCircularDependencies = True +| |-IsIOBound = False +| |-MonitorService = 'MonitorSvc' +| |-OutputLevel = 0 +| | (default: 'Muon::MDT_RawDataProviderTool/MdtRawDataProviderTool') +| |-RegisterForContextService = False +| |=/***** Private AlgTool Muon::MDT_RawDataProviderTool/MdtRawDataProvider.MDT_RawDataProviderTool ***** +| | |-AuditFinalize = False +| | |-AuditInitialize = False +| | |-AuditReinitialize = False +| | |-AuditRestart = False +| | |-AuditStart = False +| | |-AuditStop = False +| | |-AuditTools = False +| | |-MonitorService = 'MonitorSvc' +| | |-RdoLocation = 'StoreGateSvc+MDTCSM' +| | |-ReadKey = 'ConditionStore+MuonMDT_CablingMap' +| | |=/***** Private AlgTool MdtROD_Decoder/MdtRawDataProvider.MDT_RawDataProviderTool.MdtROD_Decoder ***** +| | | |-AuditFinalize = False +| | | |-AuditInitialize = False +| | | |-AuditReinitialize = False +| | | |-AuditRestart = False +| | | |-AuditStart = False +| | | |-AuditStop = False +| | | |-AuditTools = False +| | | |-MonitorService = 'MonitorSvc' +| | | |-OutputLevel = 0 +| | | |-ReadKey = 'ConditionStore+MuonMDT_CablingMap' +| | | |-SpecialROBNumber = -1 +| | | \----- (End of Private AlgTool MdtROD_Decoder/MdtRawDataProvider.MDT_RawDataProviderTool.MdtROD_Decoder) ----- +| | \----- (End of Private AlgTool Muon::MDT_RawDataProviderTool/MdtRawDataProvider.MDT_RawDataProviderTool) ----- +| \----- (End of Algorithm Muon::MdtRawDataProvider/MdtRawDataProvider) ------------------------------ +|=/***** Algorithm Muon::CscRawDataProvider/CscRawDataProvider *************************************** +| |-AuditAlgorithms = False +| |-AuditBeginRun = False +| |-AuditEndRun = False +| |-AuditExecute = False +| |-AuditFinalize = False +| |-AuditInitialize = False +| |-AuditReinitialize = False +| |-AuditRestart = False +| |-AuditStart = False +| |-AuditStop = False +| |-Enable = True +| |-ErrorCounter = 0 +| |-ErrorMax = 1 +| |-FilterCircularDependencies = True +| |-IsIOBound = False +| |-MonitorService = 'MonitorSvc' +| |-OutputLevel = 0 +| | (default: 'Muon::CSC_RawDataProviderTool/CscRawDataProviderTool') +| |-RegisterForContextService = False +| |=/***** Private AlgTool Muon::CSC_RawDataProviderTool/CscRawDataProvider.CSC_RawDataProviderTool ***** +| | |-AuditFinalize = False +| | |-AuditInitialize = False +| | |-AuditReinitialize = False +| | |-AuditRestart = False +| | |-AuditStart = False +| | |-AuditStop = False +| | |-AuditTools = False +| | |-EventInfoKey = 'StoreGateSvc+EventInfo' +| | |-MonitorService = 'MonitorSvc' +| | |-RdoLocation = 'StoreGateSvc+CSCRDO' +| | |=/***** Private AlgTool Muon::CscROD_Decoder/CscRawDataProvider.CSC_RawDataProviderTool.CscROD_Decoder ***** +| | | |-AuditFinalize = False +| | | |-AuditInitialize = False +| | | |-AuditReinitialize = False +| | | |-AuditRestart = False +| | | |-AuditStart = False +| | | |-AuditStop = False +| | | |-AuditTools = False +| | | |-IsCosmics = False +| | | |-IsOldCosmics = False +| | | |-MonitorService = 'MonitorSvc' +| | | |-OutputLevel = 0 +| | | \----- (End of Private AlgTool Muon::CscROD_Decoder/CscRawDataProvider.CSC_RawDataProviderTool.CscROD_Decoder) ----- +| | \----- (End of Private AlgTool Muon::CSC_RawDataProviderTool/CscRawDataProvider.CSC_RawDataProviderTool) ----- +| \----- (End of Algorithm Muon::CscRawDataProvider/CscRawDataProvider) ------------------------------ +|=/***** Algorithm RpcRdoToRpcPrepData/RpcRdoToRpcPrepData ******************************************* +| |-AuditAlgorithms = False +| |-AuditBeginRun = False +| |-AuditEndRun = False +| |-AuditExecute = False +| |-AuditFinalize = False +| |-AuditInitialize = False +| |-AuditReinitialize = False +| |-AuditRestart = False +| |-AuditStart = False +| |-AuditStop = False +| | (default: 'Muon::RpcRdoToPrepDataTool/RpcRdoToPrepDataTool') +| |-DoSeededDecoding = False +| |-Enable = True +| |-ErrorCounter = 0 +| |-ErrorMax = 1 +| |-FilterCircularDependencies = True +| |-IsIOBound = False +| |-MonitorService = 'MonitorSvc' +| |-OutputCollection = 'StoreGateSvc+RPC_Measurements' +| |-OutputLevel = 0 +| |-PrintInputRdo = False +| |-RegisterForContextService = False +| |-RoIs = 'StoreGateSvc+OutputRoIs' +| |=/***** Private AlgTool Muon::RpcRdoToPrepDataTool/RpcRdoToRpcPrepData.RpcRdoToRpcPrepDataTool ****** +| | |-AuditFinalize = False +| | |-AuditInitialize = False +| | |-AuditReinitialize = False +| | |-AuditRestart = False +| | |-AuditStart = False +| | |-AuditStop = False +| | |-AuditTools = False +| | |-DecodeData = True +| | |-InputCollection = 'StoreGateSvc+RPC_triggerHits' +| | |-MonitorService = 'MonitorSvc' +| | |-OutputCollection = 'StoreGateSvc+RPCPAD' +| | |-OutputLevel = 0 +| | |-RPCInfoFromDb = False +| | | (default: 'Muon::RpcRDO_Decoder') +| | |-TriggerOutputCollection = 'StoreGateSvc+RPC_Measurements' +| | |-etaphi_coincidenceTime = 20.0 +| | |-overlap_timeTolerance = 10.0 +| | |-processingData = False +| | |-produceRpcCoinDatafromTriggerWords = True +| | |-reduceCablingOverlap = True +| | |-solvePhiAmbiguities = True +| | |-timeShift = -12.5 +| | |=/***** Private AlgTool Muon::RpcRDO_Decoder/RpcRdoToRpcPrepData.RpcRdoToRpcPrepDataTool.Muon::RpcRDO_Decoder ***** +| | | |-AuditFinalize = False +| | | |-AuditInitialize = False +| | | |-AuditReinitialize = False +| | | |-AuditRestart = False +| | | |-AuditStart = False +| | | |-AuditStop = False +| | | |-AuditTools = False +| | | |-MonitorService = 'MonitorSvc' +| | | |-OutputLevel = 0 +| | | \----- (End of Private AlgTool Muon::RpcRDO_Decoder/RpcRdoToRpcPrepData.RpcRdoToRpcPrepDataTool.Muon::RpcRDO_Decoder) ----- +| | \----- (End of Private AlgTool Muon::RpcRdoToPrepDataTool/RpcRdoToRpcPrepData.RpcRdoToRpcPrepDataTool) ----- +| \----- (End of Algorithm RpcRdoToRpcPrepData/RpcRdoToRpcPrepData) ---------------------------------- +|=/***** Algorithm TgcRdoToTgcPrepData/TgcRdoToTgcPrepData ******************************************* +| |-AuditAlgorithms = False +| |-AuditBeginRun = False +| |-AuditEndRun = False +| |-AuditExecute = False +| |-AuditFinalize = False +| |-AuditInitialize = False +| |-AuditReinitialize = False +| |-AuditRestart = False +| |-AuditStart = False +| |-AuditStop = False +| | (default: 'Muon::TgcRdoToPrepDataTool/TgcPrepDataProviderTool') +| |-DoSeededDecoding = False +| |-Enable = True +| |-ErrorCounter = 0 +| |-ErrorMax = 1 +| |-FilterCircularDependencies = True +| |-IsIOBound = False +| |-MonitorService = 'MonitorSvc' +| |-OutputCollection = 'StoreGateSvc+TGC_Measurements' +| |-OutputLevel = 0 +| |-PrintInputRdo = False +| |-RegisterForContextService = False +| |-RoIs = 'StoreGateSvc+OutputRoIs' +| |-Setting = 0 +| |=/***** Private AlgTool Muon::TgcRdoToPrepDataTool/TgcRdoToTgcPrepData.TgcRdoToTgcPrepDataTool ****** +| | |-AuditFinalize = False +| | |-AuditInitialize = False +| | |-AuditReinitialize = False +| | |-AuditRestart = False +| | |-AuditStart = False +| | |-AuditStop = False +| | |-AuditTools = False +| | |-DecodeData = True +| | |-FillCoinData = True +| | |-MonitorService = 'MonitorSvc' +| | |-OutputCoinCollection = 'TrigT1CoinDataCollection' +| | |-OutputCollection = 'TGC_Measurements' +| | |-OutputLevel = 0 +| | |-RDOContainer = 'StoreGateSvc+TGCRDO' +| | |-TGCHashIdOffset = 26000 +| | |-dropPrdsWithZeroWidth = True +| | | (default: ['StoreGateSvc+dummy', 'StoreGateSvc+dummy', 'StoreGateSvc+dummy']) +| | | (default: ['StoreGateSvc+dummy', 'StoreGateSvc+dummy', 'StoreGateSvc+dummy', 'StoreGateSvc+dummy']) +| | |-show_warning_level_invalid_A09_SSW6_hit = False +| | \----- (End of Private AlgTool Muon::TgcRdoToPrepDataTool/TgcRdoToTgcPrepData.TgcRdoToTgcPrepDataTool) ----- +| \----- (End of Algorithm TgcRdoToTgcPrepData/TgcRdoToTgcPrepData) ---------------------------------- +|=/***** Algorithm MdtRdoToMdtPrepData/MdtRdoToMdtPrepData ******************************************* +| |-AuditAlgorithms = False +| |-AuditBeginRun = False +| |-AuditEndRun = False +| |-AuditExecute = False +| |-AuditFinalize = False +| |-AuditInitialize = False +| |-AuditReinitialize = False +| |-AuditRestart = False +| |-AuditStart = False +| |-AuditStop = False +| | (default: 'Muon::MdtRdoToPrepDataTool/MdtPrepDataProviderTool') +| |-DoSeededDecoding = False +| |-Enable = True +| |-ErrorCounter = 0 +| |-ErrorMax = 1 +| |-FilterCircularDependencies = True +| |-IsIOBound = False +| |-MonitorService = 'MonitorSvc' +| |-OutputCollection = 'StoreGateSvc+MDT_DriftCircles' +| |-OutputLevel = 0 +| |-PrintInputRdo = False +| |-RegisterForContextService = False +| |-RoIs = 'StoreGateSvc+OutputRoIs' +| |=/***** Private AlgTool Muon::MdtRdoToPrepDataTool/MdtRdoToMdtPrepData.MdtRdoToMdtPrepDataTool ****** +| | |-AuditFinalize = False +| | |-AuditInitialize = False +| | |-AuditReinitialize = False +| | |-AuditRestart = False +| | |-AuditStart = False +| | |-AuditStop = False +| | |-AuditTools = False +| | |-CalibratePrepData = True +| | |-DecodeData = True +| | |-DiscardSecondaryHitTwin = False +| | |-DoPropagationCorrection = False +| | |-DoTofCorrection = True +| | |-MonitorService = 'MonitorSvc' +| | |-OutputCollection = 'StoreGateSvc+MDT_DriftCircles' +| | |-OutputLevel = 0 +| | |-RDOContainer = 'StoreGateSvc+MDTCSM' +| | |-ReadKey = 'ConditionStore+MuonMDT_CablingMap' +| | |-SortPrepData = False +| | |-TimeWindowLowerBound = -1000000.0 +| | |-TimeWindowSetting = 2 +| | |-TimeWindowUpperBound = -1000000.0 +| | |-TwinCorrectSlewing = False +| | |-Use1DPrepDataTwin = False +| | |-UseAllBOLTwin = False +| | |-UseTwin = True +| | \----- (End of Private AlgTool Muon::MdtRdoToPrepDataTool/MdtRdoToMdtPrepData.MdtRdoToMdtPrepDataTool) ----- +| \----- (End of Algorithm MdtRdoToMdtPrepData/MdtRdoToMdtPrepData) ---------------------------------- +|=/***** Algorithm CscRdoToCscPrepData/CscRdoToCscPrepData ******************************************* +| |-AuditAlgorithms = False +| |-AuditBeginRun = False +| |-AuditEndRun = False +| |-AuditExecute = False +| |-AuditFinalize = False +| |-AuditInitialize = False +| |-AuditReinitialize = False +| |-AuditRestart = False +| |-AuditStart = False +| |-AuditStop = False +| | (default: 'Muon::CscRdoToCscPrepDataTool/CscRdoToPrepDataTool') +| |-DoSeededDecoding = False +| |-Enable = True +| |-ErrorCounter = 0 +| |-ErrorMax = 1 +| |-FilterCircularDependencies = True +| |-IsIOBound = False +| |-MonitorService = 'MonitorSvc' +| |-OutputCollection = 'StoreGateSvc+CSC_Measurements' +| |-OutputLevel = 0 +| |-PrintInputRdo = False +| |-RegisterForContextService = False +| |-RoIs = 'StoreGateSvc+OutputRoIs' +| |=/***** Private AlgTool Muon::CscRdoToCscPrepDataTool/CscRdoToCscPrepData.CscRdoToCscPrepDataTool ***** +| | |-AuditFinalize = False +| | |-AuditInitialize = False +| | |-AuditReinitialize = False +| | |-AuditRestart = False +| | |-AuditStart = False +| | |-AuditStop = False +| | |-AuditTools = False +| | |-CSCHashIdOffset = 22000 +| | |-DecodeData = True +| | |-MonitorService = 'MonitorSvc' +| | |-OutputCollection = 'StoreGateSvc+CSC_Measurements' +| | |-OutputLevel = 0 +| | |-RDOContainer = 'StoreGateSvc+CSCRDO' +| | |=/***** Private AlgTool CscCalibTool/CscRdoToCscPrepData.CscRdoToCscPrepDataTool.CscCalibTool ******* +| | | |-AuditFinalize = False +| | | |-AuditInitialize = False +| | | |-AuditReinitialize = False +| | | |-AuditRestart = False +| | | |-AuditStart = False +| | | |-AuditStop = False +| | | |-AuditTools = False +| | | |-IsOnline = True +| | | |-Latency = 100.0 +| | | |-MonitorService = 'MonitorSvc' +| | | |-NSamples = 4 +| | | |-Noise = 3.5 +| | | |-OutputLevel = 0 +| | | |-Pedestal = 2048.0 +| | | |-ReadFromDatabase = True +| | | |-Slope = 0.19 +| | | |-SlopeFromDatabase = False +| | | |-TimeOffsetRange = 1.0 +| | | |-Use2Samples = False +| | | |-integrationNumber = 12.0 +| | | |-integrationNumber2 = 11.66 +| | | |-samplingTime = 50.0 +| | | |-signalWidth = 14.4092 +| | | |-timeOffset = 46.825 +| | | \----- (End of Private AlgTool CscCalibTool/CscRdoToCscPrepData.CscRdoToCscPrepDataTool.CscCalibTool) ----- +| | |=/***** Private AlgTool Muon::CscRDO_Decoder/CscRdoToCscPrepData.CscRdoToCscPrepDataTool.CscRDO_Decoder ***** +| | | |-AuditFinalize = False +| | | |-AuditInitialize = False +| | | |-AuditReinitialize = False +| | | |-AuditRestart = False +| | | |-AuditStart = False +| | | |-AuditStop = False +| | | |-AuditTools = False +| | | |-MonitorService = 'MonitorSvc' +| | | |-OutputLevel = 0 +| | | \----- (End of Private AlgTool Muon::CscRDO_Decoder/CscRdoToCscPrepData.CscRdoToCscPrepDataTool.CscRDO_Decoder) ----- +| | \----- (End of Private AlgTool Muon::CscRdoToCscPrepDataTool/CscRdoToCscPrepData.CscRdoToCscPrepDataTool) ----- +| \----- (End of Algorithm CscRdoToCscPrepData/CscRdoToCscPrepData) ---------------------------------- +|=/***** Algorithm CscThresholdClusterBuilder/CscThesholdClusterBuilder ****************************** +| |-AuditAlgorithms = False +| |-AuditBeginRun = False +| |-AuditEndRun = False +| |-AuditExecute = False +| |-AuditFinalize = False +| |-AuditInitialize = False +| |-AuditReinitialize = False +| |-AuditRestart = False +| |-AuditStart = False +| |-AuditStop = False +| |-Enable = True +| |-ErrorCounter = 0 +| |-ErrorMax = 1 +| |-FilterCircularDependencies = True +| |-IsIOBound = False +| |-MonitorService = 'MonitorSvc' +| |-OutputLevel = 0 +| |-RegisterForContextService = False +| | (default: 'CscThresholdClusterBuilderTool/CscThresholdClusterBuilderTool') +| \----- (End of Algorithm CscThresholdClusterBuilder/CscThesholdClusterBuilder) --------------------- +\----- (End of Algorithm AthSequencer/AthAlgSeq) --------------------------------------------------- +Py:Athena INFO Save Config +/***** Algorithm AthSequencer/AthAlgSeq ************************************************************ +|-Atomic = False +|-AuditAlgorithms = False +|-AuditBeginRun = False +|-AuditEndRun = False +|-AuditExecute = False +|-AuditFinalize = False +|-AuditInitialize = False +|-AuditReinitialize = False +|-AuditRestart = False +|-AuditStart = False +|-AuditStop = False +|-ContinueEventloopOnFPE = False +|-Enable = True +|-ErrorCounter = 0 +|-ErrorMax = 1 +|-FilterCircularDependencies = True +|-IgnoreFilterPassed = False +|-IsIOBound = False +| (default: []) +|-ModeOR = False +|-MonitorService = 'MonitorSvc' +|-OutputLevel = 0 +|-RegisterForContextService = False +|-StopOverride = False +|-TimeOut = 0.0 |=/***** Algorithm MuonCacheCreator/MuonCacheCreator ************************************************* | |-AuditAlgorithms = False | |-AuditBeginRun = False @@ -1239,6 +1640,103 @@ Py:Athena INFO Print Config | |-OutputLevel = 0 | |-RegisterForContextService = False | \----- (End of Algorithm MuonCacheCreator/MuonCacheCreator) ---------------------------------------- +|=/***** Algorithm Muon::RpcRawDataProvider/RpcRawDataProvider *************************************** +| |-AuditAlgorithms = False +| |-AuditBeginRun = False +| |-AuditEndRun = False +| |-AuditExecute = False +| |-AuditFinalize = False +| |-AuditInitialize = False +| |-AuditReinitialize = False +| |-AuditRestart = False +| |-AuditStart = False +| |-AuditStop = False +| |-DoSeededDecoding = False +| |-Enable = True +| |-ErrorCounter = 0 +| |-ErrorMax = 1 +| |-FilterCircularDependencies = True +| |-IsIOBound = False +| |-MonitorService = 'MonitorSvc' +| |-OutputLevel = 0 +| | (default: 'Muon::RPC_RawDataProviderTool/RpcRawDataProviderTool') +| |-RegisterForContextService = False +| |-RoIs = 'StoreGateSvc+OutputRoIs' +| |=/***** Private AlgTool Muon::RPC_RawDataProviderTool/RpcRawDataProvider.RPC_RawDataProviderTool ***** +| | |-AuditFinalize = False +| | |-AuditInitialize = False +| | |-AuditReinitialize = False +| | |-AuditRestart = False +| | |-AuditStart = False +| | |-AuditStop = False +| | |-AuditTools = False +| | |-MonitorService = 'MonitorSvc' +| | |-OutputLevel = 0 +| | |-RPCSec = 'StoreGateSvc+RPC_SECTORLOGIC' +| | |-RdoLocation = 'StoreGateSvc+RPCPAD' +| | |=/***** Private AlgTool Muon::RpcROD_Decoder/RpcRawDataProvider.RPC_RawDataProviderTool.RpcROD_Decoder ***** +| | | |-AuditFinalize = False +| | | |-AuditInitialize = False +| | | |-AuditReinitialize = False +| | | |-AuditRestart = False +| | | |-AuditStart = False +| | | |-AuditStop = False +| | | |-AuditTools = False +| | | |-DataErrorPrintLimit = 1000 +| | | |-MonitorService = 'MonitorSvc' +| | | |-OutputLevel = 0 +| | | |-Sector13Data = False +| | | |-SpecialROBNumber = -1 +| | | \----- (End of Private AlgTool Muon::RpcROD_Decoder/RpcRawDataProvider.RPC_RawDataProviderTool.RpcROD_Decoder) ----- +| | \----- (End of Private AlgTool Muon::RPC_RawDataProviderTool/RpcRawDataProvider.RPC_RawDataProviderTool) ----- +| \----- (End of Algorithm Muon::RpcRawDataProvider/RpcRawDataProvider) ------------------------------ +|=/***** Algorithm Muon::TgcRawDataProvider/TgcRawDataProvider *************************************** +| |-AuditAlgorithms = False +| |-AuditBeginRun = False +| |-AuditEndRun = False +| |-AuditExecute = False +| |-AuditFinalize = False +| |-AuditInitialize = False +| |-AuditReinitialize = False +| |-AuditRestart = False +| |-AuditStart = False +| |-AuditStop = False +| |-Enable = True +| |-ErrorCounter = 0 +| |-ErrorMax = 1 +| |-FilterCircularDependencies = True +| |-IsIOBound = False +| |-MonitorService = 'MonitorSvc' +| |-OutputLevel = 0 +| | (default: 'Muon::TGC_RawDataProviderTool/TgcRawDataProviderTool') +| |-RegisterForContextService = False +| |=/***** Private AlgTool Muon::TGC_RawDataProviderTool/TgcRawDataProvider.TGC_RawDataProviderTool ***** +| | |-AuditFinalize = False +| | |-AuditInitialize = False +| | |-AuditReinitialize = False +| | |-AuditRestart = False +| | |-AuditStart = False +| | |-AuditStop = False +| | |-AuditTools = False +| | | (default: 'Muon::TGC_RodDecoderReadout/TGC_RodDecoderReadout') +| | |-MonitorService = 'MonitorSvc' +| | |-OutputLevel = 0 +| | |-RdoLocation = 'StoreGateSvc+TGCRDO' +| | |=/***** Private AlgTool Muon::TGC_RodDecoderReadout/TgcRawDataProvider.TGC_RawDataProviderTool.TgcROD_Decoder ***** +| | | |-AuditFinalize = False +| | | |-AuditInitialize = False +| | | |-AuditReinitialize = False +| | | |-AuditRestart = False +| | | |-AuditStart = False +| | | |-AuditStop = False +| | | |-AuditTools = False +| | | |-MonitorService = 'MonitorSvc' +| | | |-OutputLevel = 0 +| | | |-ShowStatusWords = False +| | | |-SkipCoincidence = False +| | | \----- (End of Private AlgTool Muon::TGC_RodDecoderReadout/TgcRawDataProvider.TGC_RawDataProviderTool.TgcROD_Decoder) ----- +| | \----- (End of Private AlgTool Muon::TGC_RawDataProviderTool/TgcRawDataProvider.TGC_RawDataProviderTool) ----- +| \----- (End of Algorithm Muon::TgcRawDataProvider/TgcRawDataProvider) ------------------------------ |=/***** Algorithm Muon::MdtRawDataProvider/MdtRawDataProvider *************************************** | |-AuditAlgorithms = False | |-AuditBeginRun = False @@ -1589,7 +2087,6 @@ Py:Athena INFO Print Config | | (default: 'CscThresholdClusterBuilderTool/CscThresholdClusterBuilderTool') | \----- (End of Algorithm CscThresholdClusterBuilder/CscThesholdClusterBuilder) --------------------- \----- (End of Algorithm AthSequencer/AthAlgSeq) --------------------------------------------------- -Py:Athena INFO Save Config JOs reading stage finished, launching Athena from pickle file @@ -3130,7 +3627,6 @@ CscRawDataProvi... DEBUG Before processing numColls=0 CscRawDataProvi... DEBUG vector of ROB ID to decode: size = 32 CscRawDataProvi... DEBUG After processing numColls=32 AthenaEventLoopMgr INFO ===>>> done processing event #186580451, run #327265 20 events processed so far <<<=== -Domain[ROOT_All] INFO > Deaccess DbDomain READ [ROOT_All] ApplicationMgr INFO Application Manager Stopped successfully CondInputLoader INFO Finalizing CondInputLoader... AtlasFieldSvc INFO finalize() successful diff --git a/MuonSpectrometer/MuonDigitization/CSC_Digitization/python/CSC_DigitizationConfig.py b/MuonSpectrometer/MuonDigitization/CSC_Digitization/python/CSC_DigitizationConfig.py index 9adf4b92eda48125edb44aa3947ea7543b0b61c8..aa8aefa876eef8074ef2afe73df6a7040a8c0289 100644 --- a/MuonSpectrometer/MuonDigitization/CSC_Digitization/python/CSC_DigitizationConfig.py +++ b/MuonSpectrometer/MuonDigitization/CSC_Digitization/python/CSC_DigitizationConfig.py @@ -26,7 +26,7 @@ def getCscRange(name="CscRange", **kwargs): return CfgMgr.PileUpXingFolder(name, **kwargs) -def CscDigitizationTool(name="CscDigitizationTool", **kwargs): +def getCscDigitizationTool(name="CscDigitizationTool", **kwargs): if jobproperties.Digitization.doXingByXingPileUp(): # PileUpTool approach # This should match the range for the CSC in Simulation/Digitization/share/MuonDigitization.py kwargs.setdefault("FirstXing", CSC_FirstXing() ) @@ -45,10 +45,14 @@ def CscDigitizationTool(name="CscDigitizationTool", **kwargs): return CfgMgr.CscDigitizationTool(name, **kwargs) -def Csc_OverlayDigitizationTool(name="Csc_OverlayDigitizationTool",**kwargs): +def getCscOverlayDigitizationTool(name="CscOverlayDigitizationTool",**kwargs): from OverlayCommonAlgs.OverlayFlags import overlayFlags kwargs.setdefault("EvtStore", overlayFlags.evtStore()) kwargs.setdefault("OutputObjectName",overlayFlags.evtStore()+"+CSC_DIGITS") if not overlayFlags.isDataOverlay(): kwargs.setdefault("CSCSimDataCollectionOutputName",overlayFlags.evtStore()+"+CSC_SDO") - return CscDigitizationTool(name,**kwargs) + return CfgMgr.CscDigitizationTool(name,**kwargs) + +def getCscOverlayDigitBuilder(name="CscOverlayDigitBuilder", **kwargs): + kwargs.setdefault("DigitizationTool","CscOverlayDigitizationTool") + return CfgMgr.CscDigitBuilder(name,**kwargs) diff --git a/MuonSpectrometer/MuonDigitization/CSC_Digitization/python/CSC_DigitizationConfigDb.py b/MuonSpectrometer/MuonDigitization/CSC_Digitization/python/CSC_DigitizationConfigDb.py index f79021dbd8de8c614d082728720e8d5a5578bb45..5c655be0badfbb79fd2cfa7fb9a89496b8e58aab 100644 --- a/MuonSpectrometer/MuonDigitization/CSC_Digitization/python/CSC_DigitizationConfigDb.py +++ b/MuonSpectrometer/MuonDigitization/CSC_Digitization/python/CSC_DigitizationConfigDb.py @@ -2,6 +2,7 @@ from AthenaCommon.CfgGetter import addTool -addTool("CSC_Digitization.CSC_DigitizationConfig.CscDigitizationTool" , "CscDigitizationTool") -addTool("CSC_Digitization.CSC_DigitizationConfig.Csc_OverlayDigitizationTool" , "Csc_OverlayDigitizationTool") +addTool("CSC_Digitization.CSC_DigitizationConfig.getCscDigitizationTool" , "CscDigitizationTool") +addTool("CSC_Digitization.CSC_DigitizationConfig.getCscOverlayDigitizationTool" , "CscOverlayDigitizationTool") +addTool("CSC_Digitization.CSC_DigitizationConfig.getCscOverlayDigitBuilder" , "CscOverlayDigitBuilder") addTool("CSC_Digitization.CSC_DigitizationConfig.getCscRange" , "CscRange") diff --git a/MuonSpectrometer/MuonDigitization/MDT_Digitization/MDT_Digitization/RT_Relation_DB_DigiTool.h b/MuonSpectrometer/MuonDigitization/MDT_Digitization/MDT_Digitization/RT_Relation_DB_DigiTool.h index 19d4232d28a468b549f228a34007895129c8a03f..5021f574c833fa7a874ed6c6837e2322dbc4b0ad 100644 --- a/MuonSpectrometer/MuonDigitization/MDT_Digitization/MDT_Digitization/RT_Relation_DB_DigiTool.h +++ b/MuonSpectrometer/MuonDigitization/MDT_Digitization/MDT_Digitization/RT_Relation_DB_DigiTool.h @@ -42,7 +42,7 @@ class RT_Relation_DB_DigiTool : public AthAlgTool, virtual public IMDT_Digitizat RT_Relation_DB_DigiTool( const std::string& type, const std::string& name, const IInterface* parent ); //Methods - StatusCode initialize(); + virtual StatusCode initialize() override; virtual MdtDigiToolOutput digitize(const MdtDigiToolInput& input, CLHEP::HepRandomEngine *rndmEngine) override final; bool initializeTube(); diff --git a/MuonSpectrometer/MuonDigitization/MDT_Digitization/MDT_Digitization/RT_Relation_DigiTool.h b/MuonSpectrometer/MuonDigitization/MDT_Digitization/MDT_Digitization/RT_Relation_DigiTool.h index 6cce27f63a527ba460d389b75896639963536b41..8c004f60c83ae7d799d05f5311203bc57498d832 100644 --- a/MuonSpectrometer/MuonDigitization/MDT_Digitization/MDT_Digitization/RT_Relation_DigiTool.h +++ b/MuonSpectrometer/MuonDigitization/MDT_Digitization/MDT_Digitization/RT_Relation_DigiTool.h @@ -36,7 +36,7 @@ class RT_Relation_DigiTool : public AthAlgTool, virtual MdtDigiToolOutput digitize(const MdtDigiToolInput& input,CLHEP::HepRandomEngine *rndmEngine) override final; - StatusCode initialize(); + virtual StatusCode initialize() override; bool initializeTube(); diff --git a/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h b/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h index 74ac47149c300fa5f5addb6495d2d51760cf0308..19635ce53b58a08d1c3b27a0b533bf205d602c09 100644 --- a/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h +++ b/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef MM_DIGITIZATIONTOOL_H @@ -39,8 +39,8 @@ #include "MagFieldInterfaces/IMagFieldSvc.h" // 15/06/2015 T.Saito #include "HitManagement/TimedHitCollection.h" -#include "MuonSimEvent/GenericMuonSimHitCollection.h" -#include "MuonSimEvent/GenericMuonSimHit.h" +#include "MuonSimEvent/MMSimHitCollection.h" +#include "MuonSimEvent/MMSimHit.h" #include "PileUpTools/PileUpToolBase.h" #include "Identifier/Identifier.h" @@ -139,7 +139,7 @@ class MM_DigitizationTool : virtual public IMuonDigitizationTool, public PileUpT StatusCode getNextEvent(); StatusCode doDigitization(); - bool checkMMSimHit(const GenericMuonSimHit& /* hit */ ) const; + bool checkMMSimHit(const MMSimHit& /* hit */ ) const; MM_ElectronicsToolInput combinedStripResponseAllHits(const std::vector< MM_ElectronicsToolInput > & v_stripDigitOutput); // Services @@ -163,13 +163,13 @@ class MM_DigitizationTool : virtual public IMuonDigitizationTool, public PileUpT const MmIdHelper* m_idHelper; MicromegasHitIdHelper* m_muonHelper; const MuonGM::MuonDetectorManager* m_MuonGeoMgr; - std::list<GenericMuonSimHitCollection*> m_MMHitCollList; + std::list<MMSimHitCollection*> m_MMHitCollList; // Settings double m_energyThreshold; int m_maskMultiplet; bool m_writeOutputFile; - TimedHitCollection<GenericMuonSimHit>* m_timedHitCollection_MM; // the pileup hits + TimedHitCollection<MMSimHit>* m_timedHitCollection_MM; // the pileup hits std::string m_inputObjectName; // name of the input objects std::string m_outputObjectName; // name of the output digits @@ -183,7 +183,6 @@ class MM_DigitizationTool : virtual public IMuonDigitizationTool, public PileUpT double m_timeWindowLowerOffset; double m_timeWindowUpperOffset; - double m_DiffMagSecondMuonHit; // StripsResponse stuff... MM_StripsResponseSimulation *m_StripsResponseSimulation; diff --git a/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_SortedHitVector.h b/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_SortedHitVector.h index ec8abb2862bd4385435264ba4bcc7de184e9ab3d..b7f51815ceb549ff040e4575cf50a1bcb6627b5e 100644 --- a/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_SortedHitVector.h +++ b/MuonSpectrometer/MuonDigitization/MM_Digitization/MM_Digitization/MM_SortedHitVector.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef MM_DIGITIZATION_MMSORTEDHITVECTOR_H @@ -7,7 +7,7 @@ /*******************************************************************************/ class micromegas_hit_info { public: - micromegas_hit_info(Identifier i,double t,int ch,double strP,const TimedHitPtr<GenericMuonSimHit>* aHit) : + micromegas_hit_info(Identifier i,double t,int ch,double strP,const TimedHitPtr<MMSimHit>* aHit) : id(i),time(t),charge(ch),stripPos(strP),simhit(aHit) {} micromegas_hit_info(Identifier i,double t,int ch) : id(i),time(t),charge(ch),stripPos(0),simhit(0) {} micromegas_hit_info() : time(0.),charge(0),stripPos(0),simhit(0) {} @@ -15,7 +15,7 @@ class micromegas_hit_info { double time; int charge; double stripPos; - const TimedHitPtr<GenericMuonSimHit>* simhit; + const TimedHitPtr<MMSimHit>* simhit; bool operator < (const micromegas_hit_info& aInfo) const { if(id < aInfo.id) diff --git a/MuonSpectrometer/MuonDigitization/MM_Digitization/python/MM_DigitizationConfig.py b/MuonSpectrometer/MuonDigitization/MM_Digitization/python/MM_DigitizationConfig.py index 40e2bc3f08a847966894f5aab734034235e8ac90..256dc13ed03f9f20aa70746edb4f73206cc7ca91 100644 --- a/MuonSpectrometer/MuonDigitization/MM_Digitization/python/MM_DigitizationConfig.py +++ b/MuonSpectrometer/MuonDigitization/MM_Digitization/python/MM_DigitizationConfig.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration # # Import MM_Digitization job properties @@ -41,7 +41,7 @@ def getMMRange(name="MMRange", **kwargs): kwargs.setdefault('FirstXing', MM_FirstXing() ) kwargs.setdefault('LastXing', MM_LastXing() ) kwargs.setdefault('CacheRefreshFrequency', 1.0 ) #default 0 no dataproxy reset - kwargs.setdefault('ItemList', ["GenericMuonSimHitCollection#MicromegasSensitiveDetector"] ) + kwargs.setdefault('ItemList', ["MMSimHitCollection#MicromegasSensitiveDetector"] ) return CfgMgr.PileUpXingFolder(name, **kwargs) diff --git a/MuonSpectrometer/MuonDigitization/MM_Digitization/src/MM_DigitizationTool.cxx b/MuonSpectrometer/MuonDigitization/MM_Digitization/src/MM_DigitizationTool.cxx index f1463d8a85c1449d954cf5e06b49ad860e640c2f..93a34261ee79c2c390417f9baa4c3b6700238fa6 100644 --- a/MuonSpectrometer/MuonDigitization/MM_Digitization/src/MM_DigitizationTool.cxx +++ b/MuonSpectrometer/MuonDigitization/MM_Digitization/src/MM_DigitizationTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ //////////////////////////////////////////////////////////////////////////////// @@ -124,7 +124,6 @@ MM_DigitizationTool::MM_DigitizationTool(const std::string& type, const std::str m_timeWindowLowerOffset(0), m_timeWindowUpperOffset(0), - m_DiffMagSecondMuonHit (0), // Strip Response m_StripsResponseSimulation(0), @@ -198,7 +197,6 @@ MM_DigitizationTool::MM_DigitizationTool(const std::string& type, const std::str declareProperty("UseTimeWindow", m_useTimeWindow = true); declareProperty("WindowLowerOffset", m_timeWindowLowerOffset = -300.); // processBunchXing between -250 and 150 ns (look at config file) declareProperty("WindowUpperOffset", m_timeWindowUpperOffset = +300.); - declareProperty("DiffMagSecondMuonHit",m_DiffMagSecondMuonHit = 0.1); // Constants vars for the MM_StripsResponseSimulation class // qThreshold=2e, we accept a good strip if the charge is >=2e @@ -376,7 +374,7 @@ StatusCode MM_DigitizationTool::prepareEvent(unsigned int nInputEvents) { m_MMHitCollList.clear(); if(!m_timedHitCollection_MM) { - m_timedHitCollection_MM = new TimedHitCollection<GenericMuonSimHit>(); + m_timedHitCollection_MM = new TimedHitCollection<MMSimHit>(); } else { ATH_MSG_ERROR ( "m_timedHitCollection_MM is not null" ); return StatusCode::FAILURE; @@ -385,49 +383,48 @@ StatusCode MM_DigitizationTool::prepareEvent(unsigned int nInputEvents) { return StatusCode::SUCCESS; } /*******************************************************************************/ - StatusCode MM_DigitizationTool::processBunchXing(int bunchXing, - SubEventIterator bSubEvents, - SubEventIterator eSubEvents) { +StatusCode MM_DigitizationTool::processBunchXing(int bunchXing, + SubEventIterator bSubEvents, + SubEventIterator eSubEvents) { + + ATH_MSG_DEBUG ( "MM_DigitizationTool::in processBunchXing()" << bunchXing ); + + typedef PileUpMergeSvc::TimedList<MMSimHitCollection>::type TimedHitCollList; + TimedHitCollList hitCollList; + + if (!(m_mergeSvc->retrieveSubSetEvtData(m_inputObjectName, hitCollList, bunchXing, + bSubEvents, eSubEvents).isSuccess()) && + hitCollList.size() == 0) { + ATH_MSG_ERROR("Could not fill TimedHitCollList"); + return StatusCode::FAILURE; + } else { + ATH_MSG_VERBOSE(hitCollList.size() << " MMSimHitCollection with key " << + m_inputObjectName << " found"); + } + + TimedHitCollList::iterator iColl(hitCollList.begin()); + TimedHitCollList::iterator endColl(hitCollList.end()); + + // Iterating over the list of collections + for( ; iColl != endColl; iColl++){ + + MMSimHitCollection *hitCollPtr = new MMSimHitCollection(*iColl->second); + PileUpTimeEventIndex timeIndex(iColl->first); + + ATH_MSG_DEBUG("MMSimHitCollection found with " << hitCollPtr->size() << + " hits"); + ATH_MSG_VERBOSE("time index info. time: " << timeIndex.time() + << " index: " << timeIndex.index() + << " type: " << timeIndex.type()); + + m_timedHitCollection_MM->insert(timeIndex, hitCollPtr); + m_MMHitCollList.push_back(hitCollPtr); + + } - ATH_MSG_DEBUG ( "MM_DigitizationTool::in processBunchXing()" << bunchXing ); - - typedef PileUpMergeSvc::TimedList<GenericMuonSimHitCollection>::type TimedHitCollList; - TimedHitCollList hitCollList; - - if (!(m_mergeSvc->retrieveSubSetEvtData(m_inputObjectName, hitCollList, bunchXing, - bSubEvents, eSubEvents).isSuccess()) && - hitCollList.size() == 0) { - ATH_MSG_ERROR("Could not fill TimedHitCollList"); - return StatusCode::FAILURE; - } else { - ATH_MSG_VERBOSE(hitCollList.size() << " GenericMuonSimHitCollection with key " << - m_inputObjectName << " found"); - } - - TimedHitCollList::iterator iColl(hitCollList.begin()); - TimedHitCollList::iterator endColl(hitCollList.end()); - - // Iterating over the list of collections - for( ; iColl != endColl; iColl++){ - - GenericMuonSimHitCollection *hitCollPtr = new GenericMuonSimHitCollection(*iColl->second); - PileUpTimeEventIndex timeIndex(iColl->first); - - ATH_MSG_DEBUG("GenericMuonSimHitCollection found with " << hitCollPtr->size() << - " hits"); - ATH_MSG_VERBOSE("time index info. time: " << timeIndex.time() - << " index: " << timeIndex.index() - << " type: " << timeIndex.type()); - - m_timedHitCollection_MM->insert(timeIndex, hitCollPtr); - m_MMHitCollList.push_back(hitCollPtr); - - } - - return StatusCode::SUCCESS; + return StatusCode::SUCCESS; } - /*******************************************************************************/ StatusCode MM_DigitizationTool::getNextEvent() { @@ -441,9 +438,9 @@ StatusCode MM_DigitizationTool::getNextEvent() { } // get the container(s) - typedef PileUpMergeSvc::TimedList<GenericMuonSimHitCollection>::type TimedHitCollList; + typedef PileUpMergeSvc::TimedList<MMSimHitCollection>::type TimedHitCollList; - //this is a list<info<time_t, DataLink<GenericMuonSimHitCollection> > > + //this is a list<info<time_t, DataLink<MMSimHitCollection> > > TimedHitCollList hitCollList; ATH_CHECK( m_mergeSvc->retrieveSubEvtsData(m_inputObjectName, hitCollList) ); @@ -457,7 +454,7 @@ StatusCode MM_DigitizationTool::getNextEvent() { // create a new hits collection - Define Hit Collection if(!m_timedHitCollection_MM) { - m_timedHitCollection_MM = new TimedHitCollection<GenericMuonSimHit>(); + m_timedHitCollection_MM = new TimedHitCollection<MMSimHit>(); }else{ ATH_MSG_ERROR ( "m_timedHitCollection_MM is not null" ); return StatusCode::FAILURE; @@ -469,7 +466,7 @@ StatusCode MM_DigitizationTool::getNextEvent() { // loop on the hit collections while(iColl != endColl) { - const GenericMuonSimHitCollection* tmpColl(iColl->second); + const MMSimHitCollection* tmpColl(iColl->second); m_timedHitCollection_MM->insert(iColl->first, tmpColl); ATH_MSG_DEBUG ( "MMSimHitCollection found with " << tmpColl->size() << " hits" ); ++iColl; @@ -493,8 +490,8 @@ StatusCode MM_DigitizationTool::mergeEvent() { } // remove cloned one in processBunchXing...... - std::list<GenericMuonSimHitCollection*>::iterator MMHitColl = m_MMHitCollList.begin(); - std::list<GenericMuonSimHitCollection*>::iterator MMHitCollEnd = m_MMHitCollList.end(); + std::list<MMSimHitCollection*>::iterator MMHitColl = m_MMHitCollList.begin(); + std::list<MMSimHitCollection*>::iterator MMHitCollEnd = m_MMHitCollList.end(); while(MMHitColl!=MMHitCollEnd) { delete (*MMHitColl); ++MMHitColl; @@ -565,11 +562,11 @@ StatusCode MM_DigitizationTool::recordDigitAndSdoContainers() { StatusCode MM_DigitizationTool::doDigitization() { - GenericMuonSimHitCollection* inputSimHitColl=nullptr; + MMSimHitCollection* inputSimHitColl=nullptr; IdentifierHash detectorElementHash=0; - inputSimHitColl = new GenericMuonSimHitCollection("MicromegasSensitiveDetector"); + inputSimHitColl = new MMSimHitCollection("MicromegasSensitiveDetector"); ATH_CHECK( m_storeGateService->record(inputSimHitColl,"InputMicroMegasHits") ); if( m_maskMultiplet == 3 ) { @@ -587,8 +584,7 @@ StatusCode MM_DigitizationTool::doDigitization() { v_stripDigitOutput.clear(); //iterate over hits and fill id-keyed drift time map - TimedHitCollection< GenericMuonSimHit >::const_iterator i, e; - const GenericMuonSimHit* previousHit = nullptr; + TimedHitCollection< MMSimHit >::const_iterator i, e; std::map<Identifier,int> hitsPerChannel; int nhits = 0; @@ -606,28 +602,17 @@ StatusCode MM_DigitizationTool::doDigitization() { // - TimedHitPtr<GenericMuonSimHit> phit = *i++; + TimedHitPtr<MMSimHit> phit = *i++; m_eventTime = phit.eventTime(); - const GenericMuonSimHit& hit(*phit); - - if( previousHit && abs(hit.particleEncoding())==13 && abs(previousHit->particleEncoding())==13 ) { - Amg::Vector3D diff = previousHit->localPosition() - hit.localPrePosition(); - ATH_MSG_DEBUG("Second hit from a muon: prev " - << previousHit->localPosition() - << " current " - << hit.localPrePosition() - << " diff " - << diff - ); - if( diff.mag() < m_DiffMagSecondMuonHit ) continue; - } + const MMSimHit& hit(*phit); + m_n_hitPDGId = hit.particleEncoding(); m_n_hitDepositEnergy = hit.depositEnergy(); m_n_hitKineticEnergy = hit.kineticEnergy(); const Amg::Vector3D globalHitPosition = hit.globalPosition(); - m_globalHitTime = hit.globalpreTime(); + m_globalHitTime = hit.globalTime(); m_tofCorrection = globalHitPosition.mag()/CLHEP::c_light; m_bunchTime = m_globalHitTime - m_tofCorrection + m_eventTime; @@ -650,16 +635,16 @@ StatusCode MM_DigitizationTool::doDigitization() { m_n_StrRespCharge.clear(); m_n_StrRespTime.clear(); - const int hitID = hit.GenericId(); + const int hitID = hit.MMId(); // the G4 time or TOF from IP // double G4Time(hit.globalTime()); - // see what are the members of GenericMuonSimHit + // see what are the members of MMSimHit // convert sim id helper to offline id MM_SimIdToOfflineId simToOffline(*m_idHelper); //get the hit Identifier and info - int simId=hit.GenericId(); + int simId=hit.MMId(); layerID = simToOffline.convert(simId); // Read the information about the Micro Megas hit @@ -689,18 +674,13 @@ StatusCode MM_DigitizationTool::doDigitization() { // For collection of inputs to throw back in SG - GenericMuonSimHit* copyHit = new GenericMuonSimHit( hitID, + MMSimHit* copyHit = new MMSimHit( hitID, m_globalHitTime+m_eventTime, - m_eventTime, globalHitPosition, - hit.localPosition(), - hit.globalPrePosition(), - hit.localPrePosition(), hit.particleEncoding(), hit.kineticEnergy(), hit.globalDirection(), hit.depositEnergy(), - hit.StepLength(), hit.trackNumber() ); @@ -933,35 +913,35 @@ StatusCode MM_DigitizationTool::doDigitization() { const MuonGM::MuonChannelDesign* mmChannelDesign = detectorReadoutElement->getDesign(digitID); - // As of September 12 2018, to reduce the number of errors and warnings in MM digitization, - // we assign the strips in the dead regions stripNumber=1 (short term fix). - // The distToChannel validation breaks when we do this so we must add another if statement - // These changes should be reverted once we arrive to a proper solution for these dead strips - // Alexandre Laurier 12 Sept 2018 - double distToChannelWithStripID; - double distToChannel; - if (stripNumber ==1){ - distToChannelWithStripID =0.; - distToChannel =0.; - } - else{ - distToChannelWithStripID = mmChannelDesign->distanceToChannel(positionOnSurface, stripNumber); - distToChannel = mmChannelDesign->distanceToChannel(positionOnSurface); - } - ATH_MSG_DEBUG(" looking up collection using detectorElementHash " - << (int)detectorElementHash - << " " - << m_idHelper->print_to_string(layerID) - << " digitID: " - << m_idHelper->print_to_string(digitID) - ); - - if ( fabs(distToChannelWithStripID - distToChannel) > mmChannelDesign->channelWidth(positionOnSurface)) { - ATH_MSG_WARNING( "Found: distToChannelWithStripID: " << distToChannelWithStripID << " != distToChannel: " << distToChannel ); - m_exitcode = 12; - if(m_writeOutputFile) m_ntuple->Fill(); - continue; - } + // As of September 12 2018, to reduce the number of errors and warnings in MM digitization, + // we assign the strips in the dead regions stripNumber=1 (short term fix). + // The distToChannel validation breaks when we do this so we must add another if statement + // These changes should be reverted once we arrive to a proper solution for these dead strips + // Alexandre Laurier 12 Sept 2018 + double distToChannelWithStripID; + double distToChannel; + if (stripNumber ==1){ + distToChannelWithStripID =0.; + distToChannel =0.; + } + else{ + distToChannelWithStripID = mmChannelDesign->distanceToChannel(positionOnSurface, stripNumber); + distToChannel = mmChannelDesign->distanceToChannel(positionOnSurface); + } + ATH_MSG_DEBUG(" looking up collection using detectorElementHash " + << (int)detectorElementHash + << " " + << m_idHelper->print_to_string(layerID) + << " digitID: " + << m_idHelper->print_to_string(digitID) + ); + + if ( fabs(distToChannelWithStripID - distToChannel) > mmChannelDesign->channelWidth(positionOnSurface)) { + ATH_MSG_WARNING( "Found: distToChannelWithStripID: " << distToChannelWithStripID << " != distToChannel: " << distToChannel ); + m_exitcode = 12; + if(m_writeOutputFile) m_ntuple->Fill(); + continue; + } // Obtain Magnetic Field At Detector Surface Amg::Vector3D hitOnSurfaceGlobal = surf.transform()*hitOnSurface; @@ -1044,7 +1024,7 @@ StatusCode MM_DigitizationTool::doDigitization() { } } } - } + } v_stripDigitOutput.push_back(stripDigitOutput); @@ -1054,7 +1034,6 @@ StatusCode MM_DigitizationTool::doDigitization() { // //////////////////////////////////////////////////////////////////// - previousHit = &hit; } // Hit Loop @@ -1250,6 +1229,6 @@ MM_ElectronicsToolInput MM_DigitizationTool::combinedStripResponseAllHits(const return stripDigitOutputAllHits; } /*******************************************************************************/ -bool MM_DigitizationTool::checkMMSimHit( const GenericMuonSimHit& /*hit*/ ) const { +bool MM_DigitizationTool::checkMMSimHit( const MMSimHit& /*hit*/ ) const { return true; } diff --git a/MuonSpectrometer/MuonDigitization/TGC_Digitization/CMakeLists.txt b/MuonSpectrometer/MuonDigitization/TGC_Digitization/CMakeLists.txt index 3625119cac8fb4ee688bf2be4be20e28a8cd3ab6..2e3b90e3c30db1c55b36016f977366d4fe9245f7 100644 --- a/MuonSpectrometer/MuonDigitization/TGC_Digitization/CMakeLists.txt +++ b/MuonSpectrometer/MuonDigitization/TGC_Digitization/CMakeLists.txt @@ -12,7 +12,6 @@ atlas_depends_on_subdirs( PUBLIC Control/PileUpTools DetectorDescription/GeoPrimitives DetectorDescription/Identifier - Event/EventInfo GaudiKernel MuonSpectrometer/MuonSimEvent Simulation/HitManagement @@ -38,10 +37,9 @@ atlas_add_component( TGC_Digitization src/*.cxx src/components/*.cxx INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} AthenaBaseComps AthenaKernel PileUpToolsLib GeoPrimitives Identifier EventInfo GaudiKernel MuonSimEvent HitManagement xAODEventInfo GeneratorObjects MuonReadoutGeometry MuonDigitContainer MuonIdHelpersLib MuonSimData PathResolver ) + LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} AthenaBaseComps AthenaKernel PileUpToolsLib GeoPrimitives Identifier GaudiKernel MuonSimEvent HitManagement xAODEventInfo GeneratorObjects MuonReadoutGeometry MuonDigitContainer MuonIdHelpersLib MuonSimData PathResolver ) # Install files from the package: -atlas_install_headers( TGC_Digitization ) atlas_install_python_modules( python/*.py ) atlas_install_joboptions( share/*.py ) atlas_install_runtime( share/*.dat ) diff --git a/MuonSpectrometer/MuonDigitization/TGC_Digitization/src/TGCDigitizer.cxx b/MuonSpectrometer/MuonDigitization/TGC_Digitization/src/TGCDigitizer.cxx index 1374ee8a0281db23a1d9968c4928b56c2d6eb48e..26cd90d476aaac157ad5bbb9a2b5c0b387d46b4e 100644 --- a/MuonSpectrometer/MuonDigitization/TGC_Digitization/src/TGCDigitizer.cxx +++ b/MuonSpectrometer/MuonDigitization/TGC_Digitization/src/TGCDigitizer.cxx @@ -2,7 +2,7 @@ Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ -#include "TGC_Digitization/TGCDigitizer.h" +#include "TGCDigitizer.h" #include "PileUpTools/IPileUpTool.h" diff --git a/MuonSpectrometer/MuonDigitization/TGC_Digitization/TGC_Digitization/TGCDigitizer.h b/MuonSpectrometer/MuonDigitization/TGC_Digitization/src/TGCDigitizer.h similarity index 100% rename from MuonSpectrometer/MuonDigitization/TGC_Digitization/TGC_Digitization/TGCDigitizer.h rename to MuonSpectrometer/MuonDigitization/TGC_Digitization/src/TGCDigitizer.h diff --git a/MuonSpectrometer/MuonDigitization/TGC_Digitization/src/TgcDigitMaker.cxx b/MuonSpectrometer/MuonDigitization/TGC_Digitization/src/TgcDigitMaker.cxx index 4be755864c1b075bede923c100ab34b35079e2d5..368f8dd73994dc0ee77c8bd89c00a772603adc9b 100644 --- a/MuonSpectrometer/MuonDigitization/TGC_Digitization/src/TgcDigitMaker.cxx +++ b/MuonSpectrometer/MuonDigitization/TGC_Digitization/src/TgcDigitMaker.cxx @@ -8,7 +8,7 @@ // Y. HASEGAWA //----------------------------------------------------- -#include "TGC_Digitization/TgcDigitMaker.h" +#include "TgcDigitMaker.h" #include <iostream> #include <fstream> diff --git a/MuonSpectrometer/MuonDigitization/TGC_Digitization/TGC_Digitization/TgcDigitMaker.h b/MuonSpectrometer/MuonDigitization/TGC_Digitization/src/TgcDigitMaker.h similarity index 100% rename from MuonSpectrometer/MuonDigitization/TGC_Digitization/TGC_Digitization/TgcDigitMaker.h rename to MuonSpectrometer/MuonDigitization/TGC_Digitization/src/TgcDigitMaker.h diff --git a/MuonSpectrometer/MuonDigitization/TGC_Digitization/src/TgcDigitizationTool.cxx b/MuonSpectrometer/MuonDigitization/TGC_Digitization/src/TgcDigitizationTool.cxx index 250efe6adc64cc119febade0575c6e1f45705307..588785dda04b9f92a982fb5473735d19bf2540dc 100644 --- a/MuonSpectrometer/MuonDigitization/TGC_Digitization/src/TgcDigitizationTool.cxx +++ b/MuonSpectrometer/MuonDigitization/TGC_Digitization/src/TgcDigitizationTool.cxx @@ -2,7 +2,7 @@ Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ -#include "TGC_Digitization/TgcDigitizationTool.h" +#include "TgcDigitizationTool.h" #include "AthenaKernel/errorcheck.h" #include "AthenaKernel/RNGWrapper.h" @@ -17,10 +17,7 @@ #include "MuonIdHelpers/TgcIdHelper.h" #include "MuonSimEvent/TgcHitIdHelper.h" -#include "TGC_Digitization/TgcDigitMaker.h" - -// for the tool -//#include "GaudiKernel/IToolSvc.h" +#include "TgcDigitMaker.h" #include "PileUpTools/PileUpMergeSvc.h" #include "PileUpTools/IPileUpTool.h" // for SubEventIterator diff --git a/MuonSpectrometer/MuonDigitization/TGC_Digitization/TGC_Digitization/TgcDigitizationTool.h b/MuonSpectrometer/MuonDigitization/TGC_Digitization/src/TgcDigitizationTool.h similarity index 98% rename from MuonSpectrometer/MuonDigitization/TGC_Digitization/TGC_Digitization/TgcDigitizationTool.h rename to MuonSpectrometer/MuonDigitization/TGC_Digitization/src/TgcDigitizationTool.h index bc3fbb319e00bb4c9a0d2c6c27ce6d25bd374d68..68353408e2cb79e1db45bd0c0f4f08750deb2727 100644 --- a/MuonSpectrometer/MuonDigitization/TGC_Digitization/TGC_Digitization/TgcDigitizationTool.h +++ b/MuonSpectrometer/MuonDigitization/TGC_Digitization/src/TgcDigitizationTool.h @@ -13,8 +13,6 @@ #include "PileUpTools/PileUpToolBase.h" -#include "EventInfo/PileUpEventInfo.h" /*SubEvent*/ - #include "GaudiKernel/ServiceHandle.h" #include "AthenaKernel/IAthRNGSvc.h" diff --git a/MuonSpectrometer/MuonDigitization/TGC_Digitization/src/components/TGC_Digitization_entries.cxx b/MuonSpectrometer/MuonDigitization/TGC_Digitization/src/components/TGC_Digitization_entries.cxx index fefdfeefb00b8cedac1fa3c5eb3234e8b21a6651..a605a1273fef7efab3c770698138dffc2ede0be7 100644 --- a/MuonSpectrometer/MuonDigitization/TGC_Digitization/src/components/TGC_Digitization_entries.cxx +++ b/MuonSpectrometer/MuonDigitization/TGC_Digitization/src/components/TGC_Digitization_entries.cxx @@ -1,5 +1,5 @@ -#include "TGC_Digitization/TGCDigitizer.h" -#include "TGC_Digitization/TgcDigitizationTool.h" +#include "../TGCDigitizer.h" +#include "../TgcDigitizationTool.h" DECLARE_COMPONENT( TGCDigitizer ) DECLARE_COMPONENT( TgcDigitizationTool ) diff --git a/MuonSpectrometer/MuonOverlay/CscOverlay/CMakeLists.txt b/MuonSpectrometer/MuonOverlay/CscOverlay/CMakeLists.txt index 4fdc2018cc20aa77e7a2a8d4cf53c9c3f6cb82b9..811d08d73c01f1bfe33f3474b00acd46b0433a82 100644 --- a/MuonSpectrometer/MuonOverlay/CscOverlay/CMakeLists.txt +++ b/MuonSpectrometer/MuonOverlay/CscOverlay/CMakeLists.txt @@ -8,11 +8,9 @@ atlas_subdir( CscOverlay ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC Control/AthenaKernel - Control/PileUpTools GaudiKernel MuonSpectrometer/MuonCalib/CscCalib/CscCalibTools MuonSpectrometer/MuonCnv/MuonCSC_CnvTools - MuonSpectrometer/MuonOverlay/MuonOverlayBase MuonSpectrometer/MuonRDO PRIVATE Control/StoreGate @@ -27,7 +25,7 @@ atlas_add_component( CscOverlay src/*.cxx src/components/*.cxx INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaKernel GaudiKernel MuonOverlayBase MuonRDO StoreGateLib SGtests MuonIdHelpersLib ) + LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaKernel GaudiKernel MuonRDO StoreGateLib SGtests MuonIdHelpersLib ) # Install files from the package: atlas_install_headers( CscOverlay ) diff --git a/MuonSpectrometer/MuonOverlay/CscOverlay/CscOverlay/CscOverlay.h b/MuonSpectrometer/MuonOverlay/CscOverlay/CscOverlay/CscOverlay.h index d22064bfeb17a7da7e9d757e0c6e48b70dc43272..66d185126505cc42181bbff0a9b18efe3a1594ce 100644 --- a/MuonSpectrometer/MuonOverlay/CscOverlay/CscOverlay/CscOverlay.h +++ b/MuonSpectrometer/MuonOverlay/CscOverlay/CscOverlay/CscOverlay.h @@ -11,12 +11,9 @@ #ifndef CSCOVERLAY_CSCOVERLAY_H #define CSCOVERLAY_CSCOVERLAY_H -#include <string> #include "GaudiKernel/ToolHandle.h" -#include "MuonOverlayBase/MuonOverlayBase.h" -#include "MuonDigToolInterfaces/IMuonDigitizationTool.h" -#include "PileUpTools/IPileUpTool.h" +#include "AthenaBaseComps/AthAlgorithm.h" #include "MuonRDO/CscRawDataContainer.h" @@ -26,39 +23,39 @@ #include "AthenaKernel/IAthRNGSvc.h" #include <vector> +#include <string> #include <map> class CscIdHelper; -namespace std { template<typename _Tp> class auto_ptr; } - namespace CLHEP { class HepRandomEngine; } -class CscOverlay : public MuonOverlayBase { +class CscOverlay : public AthAlgorithm { public: CscOverlay(const std::string &name,ISvcLocator *pSvcLocator); - /** Framework implemenrtation for the event loop */ - virtual StatusCode overlayInitialize(); - virtual StatusCode overlayExecute(); - virtual StatusCode overlayFinalize(); + virtual StatusCode initialize() override final; + virtual StatusCode execute() override final; - /** given 2 container of data - zero bias real data and the simulation, - do the merging */ - void overlayContainer(const CscRawDataContainer* main, const CscRawDataContainer* overlay); - void overlayContainer(std::auto_ptr<CscRawDataContainer>& data, const CscRawDataContainer* mc) { - this->overlayContainer(data.get(), mc); - } +private: - /** if the 2 container do overlay, - loop over the container and do the overlap collection by collection */ - void mergeCollections(CscRawDataCollection *out_coll, const CscRawDataCollection *orig_coll, - const CscRawDataCollection *ovl_coll, CLHEP::HepRandomEngine* rndmEngine); + /// @brief Overlay signal on the background container and record to the output one + StatusCode overlayContainer(const CscRawDataContainer *bkgContainer, + const CscRawDataContainer *signalContainer, + CscRawDataContainer *outputContainer); -private: + /// @brief Copy CscRawDataCollection, optionally only copy properties + std::unique_ptr<CscRawDataCollection> copyCollection(const CscRawDataCollection *collection, + bool propertiesOnly = false) const; + + /// @brief In case of overlap merge signal and background collections + void mergeCollections(const CscRawDataCollection *bkgCollection, + const CscRawDataCollection *signalCollection, + CscRawDataCollection *outputCollection, + CLHEP::HepRandomEngine *rndmEngine); /** get the data in one SPU of a chamber */ void spuData( const CscRawDataCollection * coll, const uint16_t spuID, std::vector<const CscRawData*>& data); @@ -85,24 +82,18 @@ private: //Whether the data needs to be fliped by 49-strip for bug#56002 bool needtoflip(const int address) const; - // Copying CscRawDataCollection properties - void copyCscRawDataCollectionProperties(const CscRawDataCollection& sourceColl, CscRawDataCollection& outColl) const; - // ---------------------------------------------------------------- // jO controllable properties. // "Main" containers are read, have data from "overlay" containers added, // and written out with the original SG keys. - SG::ReadHandleKey<CscRawDataContainer> m_inputDataRDOKey{this,"InputDataRDOKey","OriginalEvent_SG+CSCRDO",""}; - SG::ReadHandleKey<CscRawDataContainer> m_inputOverlayRDOKey{this,"InputOverlayRDOKey","BkgEvent_0_SG+CSCRDO",""}; - SG::WriteHandleKey<CscRawDataContainer> m_outputContainerKey{this,"OutputContainerKey","StoreGateSvc+CSCRDO",""}; + SG::ReadHandleKey<CscRawDataContainer> m_bkgInputKey{this,"BkgInputKey","OriginalEvent_SG+CSCRDO",""}; + SG::ReadHandleKey<CscRawDataContainer> m_signalInputKey{this,"SignalInputKey","BkgEvent_0_SG+CSCRDO",""}; + SG::WriteHandleKey<CscRawDataContainer> m_outputKey{this,"OutputKey","StoreGateSvc+CSCRDO",""}; const CscIdHelper * m_cscHelper{nullptr}; ToolHandle<ICscCalibTool> m_cscCalibTool{this, "CalibTool", "CscCalibTool", ""}; - ToolHandle<IPileUpTool> m_digTool{this, "DigitizationTool", "CscDigitizationTool", ""}; - ToolHandle<IMuonDigitizationTool> m_rdoTool2{this, "MakeRDOTool2", "CscDigitToCscRDOTool2", ""}; - ToolHandle<IMuonDigitizationTool> m_rdoTool4{this, "MakeRDOTool4", "CscDigitToCscRDOTool4", ""}; PublicToolHandle<Muon::ICSC_RDO_Decoder> m_cscRdoDecoderTool{this, "CscRdoDecoderTool", "Muon::CscRDO_Decoder", ""}; ServiceHandle <IAthRNGSvc> m_rndmSvc{this, "RndmSvc", "AthRNGSvc", "Random Number Service"}; // Random number service diff --git a/MuonSpectrometer/MuonOverlay/CscOverlay/python/CscOverlayConfig.py b/MuonSpectrometer/MuonOverlay/CscOverlay/python/CscOverlayConfig.py index 4be3e3aa0db4138312bc24d68b5662372926cfec..5135ff83567d6b1a2af30769b0d9d5ed15053dc1 100644 --- a/MuonSpectrometer/MuonOverlay/CscOverlay/python/CscOverlayConfig.py +++ b/MuonSpectrometer/MuonOverlay/CscOverlay/python/CscOverlayConfig.py @@ -1,14 +1,9 @@ def getCscOverlay(name="CscOverlay", **kwargs): from OverlayCommonAlgs.OverlayFlags import overlayFlags - kwargs.setdefault("InputDataRDOKey", overlayFlags.dataStore()+"+CSCRDO") - kwargs.setdefault("InputOverlayRDOKey", overlayFlags.evtStore()+"+CSCRDO") - kwargs.setdefault("OutputContainerKey", "StoreGateSvc+CSCRDO") - kwargs.setdefault("DigitizationTool", "Csc_OverlayDigitizationTool") - kwargs.setdefault("MakeRDOTool2", "CscDigitToCscRDOTool2") - kwargs.setdefault("MakeRDOTool4", "CscDigitToCscRDOTool4") - kwargs.setdefault("MCStore", overlayFlags.evtStore()) - kwargs.setdefault("DataStore", overlayFlags.dataStore()) + kwargs.setdefault("BkgInputKey", overlayFlags.dataStore()+"+CSCRDO") + kwargs.setdefault("SignalInputKey", overlayFlags.evtStore()+"+CSCRDO") + kwargs.setdefault("OutputKey", "StoreGateSvc+CSCRDO") from AthenaCommon import CfgMgr return CfgMgr.CscOverlay(name,**kwargs) diff --git a/MuonSpectrometer/MuonOverlay/CscOverlay/src/CscOverlay.cxx b/MuonSpectrometer/MuonOverlay/CscOverlay/src/CscOverlay.cxx index 1358ced7a0ff61186b6a2aff30522f7b32d7eefc..97dde499aad284f73e63aea39da2aaed03314772 100644 --- a/MuonSpectrometer/MuonOverlay/CscOverlay/src/CscOverlay.cxx +++ b/MuonSpectrometer/MuonOverlay/CscOverlay/src/CscOverlay.cxx @@ -4,7 +4,6 @@ #include "CscOverlay/CscOverlay.h" -#include "StoreGate/StoreGateSvc.h" #include "StoreGate/ReadHandle.h" #include "StoreGate/WriteHandle.h" @@ -14,21 +13,20 @@ #include "CLHEP/Random/RandomEngine.h" #include "CLHEP/Random/RandGauss.h" -#include <iostream> -#include <typeinfo> - -constexpr uint16_t MAX_AMPL = 4095; // 12-bit ADC +namespace { + constexpr uint16_t MAX_AMPL = 4095; // 12-bit ADC +} //================================================================ CscOverlay::CscOverlay(const std::string &name, ISvcLocator *pSvcLocator) : - MuonOverlayBase(name, pSvcLocator) + AthAlgorithm(name, pSvcLocator) { } //================================================================ -StatusCode CscOverlay::overlayInitialize() +StatusCode CscOverlay::initialize() { - ATH_MSG_INFO("CscOverlay initialized"); + ATH_MSG_DEBUG("CscOverlay initialized"); /** access to the CSC Identifier helper */ ATH_CHECK(detStore()->retrieve(m_cscHelper, "CSCIDHELPER")); @@ -40,262 +38,227 @@ StatusCode CscOverlay::overlayInitialize() // get cscRdoDecoderTool ATH_CHECK(m_cscRdoDecoderTool.retrieve()); - ATH_CHECK(m_digTool.retrieve()); - ATH_MSG_DEBUG("Retrieved CSC Digitization Tool."); - - ATH_CHECK(m_rdoTool2.retrieve()); - ATH_MSG_DEBUG("Retrieved CSC Digit -> RDO Tool 2."); - - ATH_CHECK(m_rdoTool4.retrieve()); - ATH_MSG_DEBUG("Retrieved CSC Digit -> RDO Tool 4."); - //random number initialization ATH_CHECK(m_rndmSvc.retrieve()); - ATH_CHECK( m_inputDataRDOKey.initialize() ); - ATH_CHECK( m_inputOverlayRDOKey.initialize() ); - ATH_CHECK( m_outputContainerKey.initialize() ); + ATH_CHECK( m_bkgInputKey.initialize() ); + ATH_CHECK( m_signalInputKey.initialize() ); + ATH_CHECK( m_outputKey.initialize() ); return StatusCode::SUCCESS; } //================================================================ -StatusCode CscOverlay::overlayFinalize() -{ - ATH_MSG_INFO("CscOverlay finalized"); - return StatusCode::SUCCESS; -} +StatusCode CscOverlay::execute() { + ATH_MSG_DEBUG("execute() begin"); -//================================================================ -StatusCode CscOverlay::overlayExecute() { - ATH_MSG_DEBUG("CscOverlay::execute() begin"); - //---------------------------------------------------------------- - unsigned int numsamples=0;//to be determined from the data - SG::ReadHandle<CscRawDataContainer> inputDataRDO(m_inputDataRDOKey); - if(!inputDataRDO.isValid()) { - ATH_MSG_WARNING("Could not get data CscRawDataContainer \"" << inputDataRDO.name() << "\" in " << inputDataRDO.store()); - return StatusCode::SUCCESS; - } - ATH_MSG_VERBOSE("Found CscRawDataContainer \"" << inputDataRDO.name() << "\" in " << inputDataRDO.store()); - if ((inputDataRDO->begin()==inputDataRDO->end()) || !*(inputDataRDO->begin())){ - ATH_MSG_WARNING("Could not get nsamples, inputDataRDO empty?"); - } - else{ - numsamples=inputDataRDO->begin()->numSamples(); - } - /** in the simulation stream, run digitization of the fly - and make RDO - this will be used as input to the overlay job */ - if ( m_digTool->processAllSubEvents().isFailure() ) { - ATH_MSG_WARNING("On the fly CSC digitization failed "); - return StatusCode::SUCCESS; + SG::ReadHandle<CscRawDataContainer> bkgContainer(m_bkgInputKey); + if(!bkgContainer.isValid()) { + ATH_MSG_ERROR("Could not get background CscRawDataContainer called " << bkgContainer.name() << " from store " << bkgContainer.store()); + return StatusCode::FAILURE; } + ATH_MSG_DEBUG("Found background CscRawDataContainer called " << bkgContainer.name() << " in store " << bkgContainer.store()); - if (numsamples==2) { - if ( m_rdoTool2->digitize().isFailure() ) { - ATH_MSG_WARNING("On the fly CSC Digit -> RDO 2 failed "); - return StatusCode::SUCCESS; - } - ATH_MSG_DEBUG("Digitizing with 2 samples"); + SG::ReadHandle<CscRawDataContainer> signalContainer(m_signalInputKey); + if(!signalContainer.isValid()) { + ATH_MSG_ERROR("Could not get signal CscRawOverlayContainer called " << signalContainer.name() << " from store " << signalContainer.store()); + return StatusCode::FAILURE; } - else if (numsamples==4) { - if ( m_rdoTool4->digitize().isFailure() ) { - ATH_MSG_WARNING("On the fly CSC Digit -> RDO 4 failed "); - return StatusCode::SUCCESS; - } - ATH_MSG_DEBUG("Digitizing with 4 samples"); - } - else{ - ATH_MSG_WARNING("On the fly CSC Digit -> RDO failed - not 2 or 4 samples!"); - //return StatusCode::SUCCESS; + ATH_MSG_DEBUG("Found signal CscRawOverlayContainer called " << signalContainer.name() << " in store " << signalContainer.store()); + + SG::WriteHandle<CscRawDataContainer> outputContainer(m_outputKey); + ATH_CHECK(outputContainer.record(std::make_unique<CscRawDataContainer>(bkgContainer->size()))); + if (!outputContainer.isValid()) { + ATH_MSG_ERROR("Could not record output CscRawOverlayContainer called " << outputContainer.name() << " to store " << outputContainer.store()); + return StatusCode::FAILURE; } + ATH_MSG_DEBUG("Recorded output CscRawOverlayContainer called " << outputContainer.name() << " in store " << outputContainer.store()); - if (numsamples>0) { - ATH_MSG_DEBUG("Retrieving MC input CSC container"); - SG::ReadHandle<CscRawDataContainer> inputOverlayRDO(m_inputOverlayRDOKey); - if(!inputOverlayRDO.isValid()) { - ATH_MSG_WARNING("Could not get overlay CscRawDataContainer \"" << inputOverlayRDO.name() << "\" in " << inputOverlayRDO.store()); - return StatusCode::SUCCESS; - } - ATH_MSG_VERBOSE("Found CscRawOverlayContainer \"" << inputOverlayRDO.name() << "\" in " << inputOverlayRDO.store()); + // now do the overlay + ATH_CHECK(overlayContainer(bkgContainer.cptr(), signalContainer.cptr(), outputContainer.ptr())); - /* now do the overlay - reading real data from the data stream - and reading simulated RDO produced in the previous steps - from the simulation stream */ - this->overlayContainer(inputDataRDO.cptr(), inputOverlayRDO.cptr()); - } - //---------------------------------------------------------------- - ATH_MSG_DEBUG("CscOverlay::execute() end"); + ATH_MSG_DEBUG("execute() end"); return StatusCode::SUCCESS; } //================================================================ -void CscOverlay::overlayContainer(const CscRawDataContainer *main, - const CscRawDataContainer *overlay) +StatusCode CscOverlay::overlayContainer(const CscRawDataContainer *bkgContainer, + const CscRawDataContainer *signalContainer, + CscRawDataContainer *outputContainer) { - ATH_MSG_DEBUG("overlayContainer<>() begin"); - - SG::WriteHandle<CscRawDataContainer> outputContainer(m_outputContainerKey); - if (outputContainer.record(std::make_unique<CscRawDataContainer>()).isFailure()) { - ATH_MSG_ERROR("Failed to record " << m_outputContainerKey); + ATH_MSG_DEBUG("overlayContainer() begin"); + + // Get all the hashes for the signal and background containers + const std::vector<IdentifierHash> bkgHashes = bkgContainer->GetAllCurrentHashes(); + const std::vector<IdentifierHash> signalHashes = signalContainer->GetAllCurrentHashes(); + + // The MC signal container should typically be smaller than bkgContainer, + // because the latter contains all the noise, minimum bias and pile up. + // Thus we firstly iterate over signal hashes and store them in a map. + std::map<IdentifierHash, bool> overlapMap; + for (const IdentifierHash &hashId : signalHashes) { + overlapMap.emplace(hashId, false); } - /** Add data from the main container to the output one */ - CscRawDataContainer::const_iterator p_main = main->begin(); - CscRawDataContainer::const_iterator p_main_end = main->end(); - for(; p_main != p_main_end; ) { - const CscRawDataCollection& mainColl(**p_main); - //Deep-copy CscRawDataCollection - //FIXME Write a copy-constructor for CscRawDataCollection!! - auto p_newColl = std::make_unique<CscRawDataCollection>(mainColl.identify()); - this->copyCscRawDataCollectionProperties(mainColl, *p_newColl); - for(auto rawData : **p_main) { - auto newData = std::make_unique<CscRawData>(*rawData); // TODO confirm implicit copy-constructor works as expected - p_newColl->push_back(newData.release()); - } - if ( outputContainer->addCollection(p_newColl.release(), p_main.hashId()).isFailure() ) { - ATH_MSG_WARNING("addCollection failed for main"); - } - else { - ATH_MSG_DEBUG("data overlayContainer() added overlaid RDO"); + // Now loop through the background hashes and copy unique ones over + for (const IdentifierHash &hashId : bkgHashes) { + auto search = overlapMap.find(hashId); + if (search == overlapMap.end()) { + // Copy the background collection + std::unique_ptr<CscRawDataCollection> bkgCollection + = copyCollection(bkgContainer->indexFindPtr(hashId)); + + if (outputContainer->addCollection(bkgCollection.get(), hashId).isFailure()) { + ATH_MSG_ERROR("Adding background Collection with hashId " << hashId << " failed"); + return StatusCode::FAILURE; + } else { + bkgCollection.release(); + } + } else { + // Flip the overlap flag + search->second = true; } - ++p_main; } + // Setup random engine ATHRNG::RNGWrapper* rngWrapper = m_rndmSvc->getEngine(this); rngWrapper->setSeed( name(), Gaudi::Hive::currentContext() ); CLHEP::HepRandomEngine *rndmEngine(*rngWrapper); - /** Add data from the ovl container to the output one */ - CscRawDataContainer::const_iterator p_ovl = overlay->begin(); - CscRawDataContainer::const_iterator p_ovl_end = overlay->end(); - - for(; p_ovl != p_ovl_end; ) { + // Finally loop through the map and process the signal and overlay if + // necessary + for (const auto &[hashId, overlap] : overlapMap) { + // Retrieve the signal collection + const CscRawDataCollection *signalCollection = signalContainer->indexFindPtr(hashId); - const CscRawDataCollection *coll_ovl = *p_ovl; - const uint16_t coll_id = (*p_ovl)->identify(); + // Output collection + std::unique_ptr<CscRawDataCollection> outputCollection{}; - /** The newly created stuff will go to the output EventStore SG */ - auto out_coll = std::make_unique<CscRawDataCollection>( coll_id ); + if (overlap) { // Do overlay + // Retrieve the background collection + const CscRawDataCollection *bkgCollection = bkgContainer->indexFindPtr(hashId); - /** Look for the same ID in the main StoreGate EventStore */ - CscRawDataContainer::const_iterator q = outputContainer->indexFind(coll_id); + // Create the output collection with background collection as a base + // TODO: should it be signal collection? + outputCollection = copyCollection(bkgCollection, true); - if( q != outputContainer->end() ) { - /** Need to merge the collections - Retrieve q */ + // Merge the collections + mergeCollections(bkgCollection, signalCollection, outputCollection.get(), rndmEngine); + } else { + // Create the output collection with signal collection as a base + outputCollection = copyCollection(signalCollection, true); - const CscRawDataCollection *coll_data = *q; - this->copyCscRawDataCollectionProperties(*coll_data, *out_coll); - this->mergeCollections(out_coll.get(), coll_data, coll_ovl, rndmEngine); + uint16_t numSamples = signalCollection->numSamples(); - /** Here the new collection is created, but not yet registered. - Put it in IDC in place of the original collection. - */ - - outputContainer->removeCollection(p_ovl.hashId()); - if(outputContainer->addCollection(out_coll.release(), p_ovl.hashId()).isFailure()) { - ATH_MSG_WARNING("addCollection failed "); - } - else { - ATH_MSG_DEBUG("overlayContainer() added overlaid RDO"); - } - } - else { - /** Copy the complete collection from ovl to output, - hopefully preserving the "most derived" type of its raw data */ - this->copyCscRawDataCollectionProperties(*coll_ovl, *out_coll); - - /** Copy the complete collection from ovl to output, - hopefully preserving the "most derived" type of its raw data */ - unsigned int numSamples = coll_ovl->numSamples(); - for(CscRawDataCollection::const_iterator i=coll_ovl->begin(); i!=coll_ovl->end(); i++) { - - /** Put Digit into Collection */ - const CscRawData *data = ( *i ); - if( !data ) { + for (const CscRawData *data : *signalCollection) { + if (!data) { ATH_MSG_WARNING("NULL pointer to Digit!"); continue; } - else{ - /** The new RDO goes to m_storeGateOutput - no need to mess with the pedestal, but add in noise */ - uint16_t width = data->width(); - uint32_t hashOffset = data->hashId(); - std::vector<uint16_t> all_samples; - for (unsigned int j=0; j<width; ++j) { - uint32_t stripHash = hashOffset+j; - double noise = m_cscCalibTool->stripNoise( stripHash, false ); - //double pedestal = m_cscCalibTool->stripPedestal( stripHash, false ); - std::vector<uint16_t> samples; - bool extractSamples = data->samples(j, numSamples, samples); - if (!extractSamples) { - ATH_MSG_WARNING("Unable to extract samples for strip " << j - << " Online Cluster width = " << width - << " for number of Samples = " << numSamples - << " continuing ..."); - } - else { - for (unsigned int k=0; k<samples.size(); ++k) { - double theNoise = CLHEP::RandGauss::shoot(rndmEngine, 0.0, noise); - float adcCount = samples[k] + theNoise; - if ( adcCount > MAX_AMPL ) { - ATH_MSG_DEBUG("value out of range (copying over signal): " << adcCount << " " - << " Setting it to max value = " << MAX_AMPL - << " IdentifierHash is " << stripHash); - adcCount = MAX_AMPL; - } - all_samples.push_back( (uint16_t) rint(adcCount) ); + + // Copy the digit and add noise + std::vector<uint16_t> samples; + + uint16_t width = data->width(); + uint32_t hashOffset = data->hashId(); + + // Loop over width + for (uint16_t j = 0; j < width; ++j) { + uint32_t stripHash = hashOffset + j; + double stripNoise = m_cscCalibTool->stripNoise(stripHash, false); + // Get the samples + std::vector<uint16_t> stripSamples; + bool extractSamplesStatus = data->samples(j, numSamples, stripSamples); + if (!extractSamplesStatus) { + ATH_MSG_WARNING("Unable to extract samples for strip " << j + << " Online Cluster width = " << width + << " for number of Samples = " << numSamples + << " continuing ..."); + } else { + for (uint16_t sample : stripSamples) { + double sampleNoise = CLHEP::RandGauss::shoot(rndmEngine, 0.0, stripNoise); + // TODO: rounding issue - some strange type conversion is going on + // uint16_t adcCount = sample + std::lrint(sampleNoise); + float adcCount = sample + sampleNoise; + if (adcCount > MAX_AMPL) { + ATH_MSG_DEBUG("value out of range (copying over signal): " << adcCount << " " + << " Setting it to max value = " << MAX_AMPL + << " IdentifierHash is " << stripHash); + adcCount = MAX_AMPL; } + // TODO: rounding issue + // samples.push_back(adcCount); + samples.push_back( (uint16_t) rint(adcCount) ); } } - auto rdo = std::make_unique<CscRawData>( all_samples, data->address(), data->identify(), data->rpuID(), data->width() ); - rdo->setHashID( data->hashId() );//ACH - was "width()" ??? - rdo->setTime( data->time() );//ACH - was absent + } - //perform some checks - bool good=true; - for (unsigned int j=0; j<width; ++j) { - const Identifier channelId = m_cscRdoDecoderTool->channelIdentifier(rdo.get(), j); - if(!(m_cscHelper->valid(channelId))) { - ATH_MSG_WARNING("Invalid CSC Identifier! - skipping " << channelId); - good=false; - } - } - if (good){ - out_coll->push_back( rdo.release() ); + // Copy over the digit with the updated samples + auto rdo = std::make_unique<CscRawData>(samples, data->address(), data->identify(), data->time(), data->rpuID(), data->width(), data->hashId()); + + // Perform some checks + bool good = true; + for (uint16_t j = 0; j < width; ++j) { + const Identifier channelId = m_cscRdoDecoderTool->channelIdentifier(rdo.get(), j); + if (!m_cscHelper->valid(channelId)) { + ATH_MSG_WARNING("Invalid CSC Identifier! - skipping " << channelId); + good = false; + break; } } - } - - /** The new collection goes to m_storeGateOutput */ - if(outputContainer->addCollection(out_coll.release(), out_coll->identify()).isFailure()) { - ATH_MSG_WARNING("overlayContainer(): Problem in outputContainer->addCollection(Identifier)"); - } - else { - ATH_MSG_DEBUG("overlayContainer() added new RDO"); + if (good) { + outputCollection->push_back(rdo.release()); + } } } - ++p_ovl; + if (outputContainer->addCollection(outputCollection.get(), hashId).isFailure()) { + ATH_MSG_ERROR("Adding overlaid Collection with hashId " << hashId << " failed"); + return StatusCode::FAILURE; + } else { + outputCollection.release(); + } } - ATH_MSG_DEBUG("overlayContainer<>() end"); + ATH_MSG_DEBUG("overlayContainer>() end"); + return StatusCode::SUCCESS; } -// Copying CscRawDataCollection properties - void CscOverlay::copyCscRawDataCollectionProperties(const CscRawDataCollection& sourceColl, CscRawDataCollection& outColl) const { - /** copy a few things to the new collection */ - outColl.setIdentifyHash( sourceColl.identifyHash() ); - outColl.set_eventType( sourceColl.eventType() ); - outColl.setRodId ( sourceColl.rodId() ); - outColl.setSubDetectorId ( sourceColl.subDetectorId() ); - if (sourceColl.samplingPhase()) { outColl.set_samplingPhase(); } - if (sourceColl.triggerType()) { outColl.set_triggerType(); } - outColl.set_firstBitSummary( sourceColl.firstBitSummary() ); - outColl.set_scaAddress( sourceColl.scaAddress() ); - for (auto dataType : sourceColl.dataType()) { outColl.addDataType( dataType ); } - } +// Copy CscRawDataCollection +std::unique_ptr<CscRawDataCollection> +CscOverlay::copyCollection(const CscRawDataCollection *collection, + bool propertiesOnly) const +{ + auto outputCollection = std::make_unique<CscRawDataCollection>(collection->identify()); + + // Copy property values to the new collection + outputCollection->setIdentifyHash(collection->identifyHash()); + outputCollection->set_eventType(collection->eventType()); + outputCollection->setRodId(collection->rodId()); + outputCollection->setSubDetectorId(collection->subDetectorId()); + outputCollection->set_samplingPhase(collection->samplingPhase()); + outputCollection->set_triggerType(collection->triggerType()); + outputCollection->set_firstBitSummary(collection->firstBitSummary()); + outputCollection->set_scaAddress(collection->scaAddress()); + for (uint8_t dataType : collection->dataType()) { + outputCollection->addDataType(dataType); + } + + // Return if only properties requested + if (propertiesOnly) { + return outputCollection; + } + + for (const CscRawData *existingDatum : *collection) { + // Owned by the collection + auto *datumCopy = new CscRawData(*existingDatum); + outputCollection->push_back(datumCopy); + } + + return outputCollection; +} void CscOverlay::spuData( const CscRawDataCollection * coll, const uint16_t spuID, std::vector<const CscRawData*>& data) { data.clear(); if ( !coll ) return; @@ -316,36 +279,33 @@ bool CscOverlay::needtoflip(const int address) const { return false; } -// -// -// -// + //================================================================ -void CscOverlay::mergeCollections(CscRawDataCollection *out_coll, - const CscRawDataCollection *data_coll, - const CscRawDataCollection *ovl_coll, - CLHEP::HepRandomEngine* rndmEngine) +void CscOverlay::mergeCollections(const CscRawDataCollection *bkgCollection, + const CscRawDataCollection *signalCollection, + CscRawDataCollection *outputCollection, + CLHEP::HepRandomEngine *rndmEngine) { - ATH_MSG_DEBUG("mergeCollection<>() begin"); + ATH_MSG_DEBUG("mergeCollection() begin"); // number of ADC samples in the both data stream - unsigned int nSigSamples = data_coll->numSamples(); - unsigned int nOvlSamples = ovl_coll->numSamples(); + unsigned int nSigSamples = bkgCollection->numSamples(); + unsigned int nOvlSamples = signalCollection->numSamples(); // sampling times in both data streams - unsigned int dataSamplingTime = data_coll->rate(); - unsigned int ovlSamplingTime = ovl_coll->rate(); + unsigned int dataSamplingTime = bkgCollection->rate(); + unsigned int ovlSamplingTime = signalCollection->rate(); if ( dataSamplingTime != ovlSamplingTime ) { - ATH_MSG_WARNING("Overlay of inconsistent data - sampling times not the same " - << dataSamplingTime << " ns " << ovlSamplingTime << " ns"); - return; + ATH_MSG_ERROR("Overlay of inconsistent data - sampling times not the same " + << dataSamplingTime << " ns " << ovlSamplingTime << " ns"); + throw std::runtime_error("mergeCollections(): sampling time mismatch"); } if ( nSigSamples != nOvlSamples ) { - ATH_MSG_WARNING("Overlay of inconsistent data - number of samples not the same " - << nSigSamples << " " << nOvlSamples); - return; + ATH_MSG_ERROR("Overlay of inconsistent data - number of samples not the same " + << nSigSamples << " " << nOvlSamples); + throw std::runtime_error("mergeCollections(): number of samples mismatch"); } /** loop over the SPU - collecting thr data by layer @@ -355,10 +315,10 @@ void CscOverlay::mergeCollections(CscRawDataCollection *out_coll, for ( uint16_t spuID=0; spuID<10; ++spuID) { std::vector<const CscRawData*> sigData; // real data - this->spuData(data_coll, spuID, sigData); + this->spuData(bkgCollection, spuID, sigData); std::vector<const CscRawData*> ovlData; // simulation - this->spuData(ovl_coll, spuID, ovlData); + this->spuData(signalCollection, spuID, ovlData); /** for the non-precision strips, all the 4 layers in a chamber are in the same SPU, we need to recover the data by chamber layer */ @@ -409,7 +369,7 @@ void CscOverlay::mergeCollections(CscRawDataCollection *out_coll, for (std::map< int,std::vector<uint16_t> >::const_iterator s=sigSamples.begin(); s!=sigSamples.end(); ++s){readstrips.insert(s->first);} for (std::map< int,std::vector<uint16_t> >::const_iterator si=ovlSamples.begin(); si!=ovlSamples.end(); ++si){readstrips.insert(si->first);} - std::vector<CscRawData*> datums = this->overlay(sigSamples, ovlSamples,address, spuID, out_coll->identify(), hash, rndmEngine); + std::vector<CscRawData*> datums = this->overlay(sigSamples, ovlSamples,address, spuID, outputCollection->identify(), hash, rndmEngine); if ( datums.size()==0 ) { ATH_MSG_WARNING("datums is size 0!"); } for (unsigned int di=0; di<datums.size(); ++di){ CscRawData* datum=datums[di]; @@ -456,7 +416,7 @@ void CscOverlay::mergeCollections(CscRawDataCollection *out_coll, } else{ATH_MSG_DEBUG("Valid CSC Identifier in merge " << channelId);} } - if (good){ out_coll->push_back(datum); } + if (good){ outputCollection->push_back(datum); } else{ continue; } //keep count @@ -474,8 +434,8 @@ void CscOverlay::mergeCollections(CscRawDataCollection *out_coll, } } - for (unsigned int i=0; i<10; ++i) out_coll->set_spuCount(i,clusterCounts[i]); - for (unsigned int i=0; i<2; ++i) { if (rpuCount[i] != 0) out_coll->addRPU(rpuCount[i]); } + for (unsigned int i=0; i<10; ++i) outputCollection->set_spuCount(i,clusterCounts[i]); + for (unsigned int i=0; i<2; ++i) { if (rpuCount[i] != 0) outputCollection->addRPU(rpuCount[i]); } // FIXME --- need to be able to reset the dataType - should add a new method to CscRawDataCollection for this ATH_MSG_DEBUG("mergeCollection<>() end "); } diff --git a/MuonSpectrometer/MuonOverlay/MdtOverlay/CMakeLists.txt b/MuonSpectrometer/MuonOverlay/MdtOverlay/CMakeLists.txt index a41637f19347d125c95268a81c4f30d259fcc9a8..214994f7d26cf1083588eb42c743618e3f6e5a3b 100644 --- a/MuonSpectrometer/MuonOverlay/MdtOverlay/CMakeLists.txt +++ b/MuonSpectrometer/MuonOverlay/MdtOverlay/CMakeLists.txt @@ -11,10 +11,20 @@ atlas_depends_on_subdirs( PUBLIC MuonSpectrometer/MuonDigitContainer MuonSpectrometer/MuonOverlay/MuonOverlayBase PRIVATE + AtlasTest/TestTools Control/StoreGate MuonSpectrometer/MuonDigitization/MuonDigToolInterfaces MuonSpectrometer/MuonIdHelpers ) +#External dependencies: +find_package( GTest ) + +atlas_add_test( MdtOverlay_test + SOURCES src/*.cxx test/MdtOverlay_test.cxx + INCLUDE_DIRS ${GTEST_INCLUDE_DIRS} + LINK_LIBRARIES GaudiKernel TestTools MuonDigitContainer MuonOverlayBase StoreGateLib SGtests MuonIdHelpersLib ${GTEST_LIBRARIES} + EXTRA_PATTERNS "[0-9]+ ms") + # Component(s) in the package: atlas_add_component( MdtOverlay src/*.cxx diff --git a/MuonSpectrometer/MuonOverlay/MdtOverlay/MdtOverlay/MdtOverlay.h b/MuonSpectrometer/MuonOverlay/MdtOverlay/MdtOverlay/MdtOverlay.h index a0bf16beed45e3072bf30e27c694149efc5e8a3d..b5909d1cc3214046ce75697141bd2d4e69abac5e 100644 --- a/MuonSpectrometer/MuonOverlay/MdtOverlay/MdtOverlay/MdtOverlay.h +++ b/MuonSpectrometer/MuonOverlay/MdtOverlay/MdtOverlay/MdtOverlay.h @@ -7,9 +7,7 @@ // Overlaying MdtDigits from two different events for MDT subdetectors. // // Andrei Gaponenko <agaponenko@lbl.gov>, 2006, 2007 - // Ketevi A. Assamagan <ketevi@bnl.gov>, March 2008 - // Piyali Banerjee <Piyali.Banerjee@cern.ch>, March 2011 #ifndef MDTOVERLAY_H @@ -17,38 +15,27 @@ #include <string> -#include "MuonOverlayBase/MuonOverlayBase.h" -#include "MuonDigitContainer/MdtDigitContainer.h" - -class MdtIdHelper; - +#include <MuonOverlayBase/IDC_MuonOverlayBase.h> +#include <MuonDigitContainer/MdtDigitContainer.h> -class MdtOverlay : public MuonOverlayBase { +class MdtOverlay : public IDC_MuonOverlayBase +{ public: - MdtOverlay(const std::string &name,ISvcLocator *pSvcLocator); - /** Framework implemenrtation for the event loop */ - virtual StatusCode overlayInitialize(); - virtual StatusCode overlayExecute(); - virtual StatusCode overlayFinalize(); + virtual StatusCode initialize() override final; + virtual StatusCode execute() override final; - float adcIntegrationWindow() const { return m_adcIntegrationWindow; } + float adcIntegrationWindow() const { return m_adcIntegrationWindow.value(); } private: - // ---------------------------------------------------------------- - - // jO controllable properties. - // "Main" containers are read, have data from "overlay" containers added, - // and written out with the original SG keys. - SG::ReadHandleKey<MdtDigitContainer> m_mainInputDigitKey{this,"MainInputDigitKey","OriginalEvent_SG+MDT_DIGITS","ReadHandleKey for Main Input MdtDigitContainer"}; - SG::ReadHandleKey<MdtDigitContainer> m_overlayInputDigitKey{this,"OverlayInputDigitKey","BkgEvent_0_SG+MDT_DIGITS","ReadHandleKey for Overlay Input MdtDigitContainer"}; - SG::WriteHandleKey<MdtDigitContainer> m_outputDigitKey{this,"OutputDigitKey","StoreGateSvc+MDT_DIGITS","WriteHandleKey for Output MdtDigitContainer"}; - - float m_adcIntegrationWindow{20.0}; // in ns - const MdtIdHelper * m_mdtHelper{nullptr}; - bool m_clean_overlay_data{false}; - bool m_clean_overlay_signal{false}; + SG::ReadHandleKey<MdtDigitContainer> m_bkgInputKey{this, "BkgInputKey", "OriginalEvent_SG+MDT_DIGITS", "ReadHandleKey for Background Input MdtDigitContainer"}; + SG::ReadHandleKey<MdtDigitContainer> m_signalInputKey{this, "SignalInputKey", "BkgEvent_0_SG+MDT_DIGITS", "ReadHandleKey for Signal Input MdtDigitContainer"}; + SG::WriteHandleKey<MdtDigitContainer> m_outputKey{this, "OutputKey", "StoreGateSvc+MDT_DIGITS", "WriteHandleKey for Output MdtDigitContainer"}; + + BooleanProperty m_includeBkg { this, "includeBkg", true, "Include Background RDO Container" }; + FloatProperty m_adcIntegrationWindow { this, "IntegrationWindow", 20.0, "ADC Integration Window" }; + }; #endif/* MDTOVERLAY_H */ diff --git a/MuonSpectrometer/MuonOverlay/MdtOverlay/python/MdtOverlayConfig.py b/MuonSpectrometer/MuonOverlay/MdtOverlay/python/MdtOverlayConfig.py index ed8d3fd6983a7290eacaddce2e62219bfa0d5419..4a83973ea5d4b084d1da90613623836196d3d3fe 100644 --- a/MuonSpectrometer/MuonOverlay/MdtOverlay/python/MdtOverlayConfig.py +++ b/MuonSpectrometer/MuonOverlay/MdtOverlay/python/MdtOverlayConfig.py @@ -1,13 +1,14 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration from AthenaCommon import CfgMgr def getMdtOverlay(name="MdtOverlay", **kwargs): from OverlayCommonAlgs.OverlayFlags import overlayFlags - kwargs.setdefault("MainInputDigitKey",overlayFlags.dataStore()+"+MDT_DIGITS") - kwargs.setdefault("OverlayInputDigitKey",overlayFlags.evtStore()+"+MDT_DIGITS") - kwargs.setdefault("OutputDigitKey",overlayFlags.outputStore()+"+MDT_DIGITS") + + kwargs.setdefault("BkgInputKey", overlayFlags.dataStore() + "+MDT_DIGITS") + kwargs.setdefault("SignalInputKey", overlayFlags.evtStore() + "+MDT_DIGITS") + kwargs.setdefault("OutputKey", overlayFlags.outputStore() + "+MDT_DIGITS") + kwargs.setdefault("IntegrationWindow", 20) # in ns - kwargs.setdefault("MCStore",overlayFlags.evtStore()) - kwargs.setdefault("DataStore", overlayFlags.dataStore()) + return CfgMgr.MdtOverlay(name, **kwargs) diff --git a/MuonSpectrometer/MuonOverlay/MdtOverlay/src/MdtOverlay.cxx b/MuonSpectrometer/MuonOverlay/MdtOverlay/src/MdtOverlay.cxx index 7138030a272cafd23c6c8218ca6629d5a6c28185..44806dc8a710f314ef44570fbe3e6cd796aa3e55 100644 --- a/MuonSpectrometer/MuonOverlay/MdtOverlay/src/MdtOverlay.cxx +++ b/MuonSpectrometer/MuonOverlay/MdtOverlay/src/MdtOverlay.cxx @@ -3,166 +3,132 @@ */ // Andrei Gaponenko <agaponenko@lbl.gov>, 2006, 2007 - // Ketevi A. Assamagan <ketevi@bnl.gov>, March 2008 - // Piyali Banerjee <Piyali.Banerjee@cern.ch>, March 2011 -#include "MdtOverlay/MdtOverlay.h" +#include <MdtOverlay/MdtOverlay.h> -#include "StoreGate/StoreGateSvc.h" -#include "StoreGate/DataHandle.h" -#include "StoreGate/ReadHandle.h" -#include "StoreGate/WriteHandle.h" +#include <StoreGate/ReadHandle.h> +#include <StoreGate/WriteHandle.h> -#include "MuonIdHelpers/MdtIdHelper.h" -#include "MuonDigitContainer/MdtDigitContainer.h" +#include <IDC_OverlayBase/IDC_OverlayHelpers.h> -#include <iostream> -#include <typeinfo> -#include <stdexcept> //================================================================ -namespace Overlay { +namespace Overlay +{ /** template specialization function to add 2 MDT Digits - basically the operator+= * A declaration of the specialization must happen before the template is used from * the overlayContainer() method. So we just put this implementation at the beginning * of this file. */ - template<> void mergeChannelData(MdtDigit& mainDigit, const MdtDigit& ovlDigit, IDC_OverlayBase *baseParent) { - MdtOverlay* parent = dynamic_cast<MdtOverlay*>(baseParent); - if(!parent) { - throw std::runtime_error("Overlay::mergeChannelData<MdtDigit>(): ERROR: calling alg is not MdtOverlay."); + template<> + void mergeChannelData(MdtDigit& signalDigit, + const MdtDigit& bkgDigit, + IDC_MuonOverlayBase *algorithm) + { + // We want to use the integration window provided by MdtOverlay, thus the constraint + MdtOverlay *parent = dynamic_cast<MdtOverlay *>(algorithm); + if (!parent) { + throw std::runtime_error("mergeChannelData<MdtDigit>() called by a wrong parent algorithm? Must be MdtOverlay."); } - // ---------------------------------------------------------------- - // confirm that the specialization is being used by printing out... - static bool first_time = true; - if(first_time) { - first_time = false; - parent->msg(MSG::INFO)<<"Overlay::mergeChannelData<MdtDigit>(): " - <<"MDT specific code is called for " - <<typeid(MdtDigit).name() - <<endmsg; - } + int sig_tdc = signalDigit.tdc(); + int bkg_tdc = bkgDigit.tdc(); - // ---------------------------------------------------------------- - // the real merging happens here - int main_tdc = mainDigit.tdc(); - int ovl_tdc = ovlDigit.tdc(); - - /** background masks Physics hit - no correction to the ADC - FIXME: Probably should return the maksed hit as well */ - if ( abs(main_tdc-ovl_tdc) > parent->adcIntegrationWindow() && main_tdc < ovl_tdc ) { - // do nothing - keep mainDigit. + /** signal masks the background - no correction to the ADC + FIXME: Probably should return the masked hit as well */ + if ( abs(sig_tdc - bkg_tdc) > parent->adcIntegrationWindow() && sig_tdc < bkg_tdc ) { + // do nothing - keep baseDigit. } /** Physics hit masks the background hit - no correct to the AOD FIXME: Probably should return the masked hit as well */ - else if ( abs(main_tdc-ovl_tdc) > parent->adcIntegrationWindow() && main_tdc > ovl_tdc ) { - // Use ovlDigit as the final answer - mainDigit = ovlDigit; + else if ( abs(sig_tdc - bkg_tdc) > parent->adcIntegrationWindow() && sig_tdc > bkg_tdc ) { + // Use the background digit as the final answer + signalDigit = bkgDigit; } /** the 2 hits overlap withing the ADC integration window the ADC will add partially the TDC is from the first hit that crosses the threshold FIXME: how to add partially for correct - for now just add the ADD total */ - else if ( abs(main_tdc-ovl_tdc) < parent->adcIntegrationWindow() ) { - int tdc = std::min( mainDigit.tdc(), ovlDigit.tdc() ); - int adc = mainDigit.adc() + ovlDigit.adc(); - mainDigit = MdtDigit(mainDigit.identify(), tdc, adc ); + else if ( abs(sig_tdc - bkg_tdc) < parent->adcIntegrationWindow() ) { + int tdc = std::min( signalDigit.tdc(), bkgDigit.tdc() ); + int adc = signalDigit.adc() + bkgDigit.adc(); + signalDigit = MdtDigit(signalDigit.identify(), tdc, adc); } } +} // namespace Overlay -} //================================================================ -MdtOverlay::MdtOverlay(const std::string &name, ISvcLocator *pSvcLocator) : - MuonOverlayBase(name, pSvcLocator) +MdtOverlay::MdtOverlay(const std::string &name, ISvcLocator *pSvcLocator) + : IDC_MuonOverlayBase(name, pSvcLocator) { - - /** modifiable properties in job options */ - declareProperty("IntegrationWindow", m_adcIntegrationWindow); // in ns - declareProperty("CleanOverlayData", m_clean_overlay_data);//clean out the overlay data before doing overlay, so you only get MC hits in the output overlay - declareProperty("CleanOverlaySignal", m_clean_overlay_signal);//clean out the signal MC before doing overlay } //================================================================ -StatusCode MdtOverlay::overlayInitialize() +StatusCode MdtOverlay::initialize() { - ATH_MSG_INFO("MdtOverlay initialized"); + ATH_MSG_DEBUG("Initializing..."); - ATH_CHECK(detStore()->retrieve(m_mdtHelper, "MDTIDHELPER")); - ATH_MSG_DEBUG(" Found the MdtIdHelper. "); + if (!m_includeBkg) { + ATH_MSG_DEBUG("Disabling use of background RDOs..."); + ATH_CHECK( m_bkgInputKey.assign("") ); + } - ATH_CHECK(m_mainInputDigitKey.initialize()); - ATH_MSG_VERBOSE("Initialized ReadHandleKey: " << m_mainInputDigitKey ); - ATH_CHECK(m_overlayInputDigitKey.initialize()); - ATH_MSG_VERBOSE("Initialized ReadHandleKey: " << m_overlayInputDigitKey ); - ATH_CHECK(m_outputDigitKey.initialize()); - ATH_MSG_VERBOSE("Initialized WriteHandleKey: " << m_outputDigitKey ); + // Check and initialize keys + ATH_CHECK( m_bkgInputKey.initialize(!m_bkgInputKey.key().empty()) ); + ATH_MSG_VERBOSE("Initialized ReadHandleKey: " << m_bkgInputKey ); + ATH_CHECK(m_signalInputKey.initialize()); + ATH_MSG_VERBOSE("Initialized ReadHandleKey: " << m_signalInputKey ); + ATH_CHECK(m_outputKey.initialize()); + ATH_MSG_VERBOSE("Initialized WriteHandleKey: " << m_outputKey ); return StatusCode::SUCCESS; } //================================================================ -StatusCode MdtOverlay::overlayFinalize() -{ - ATH_MSG_INFO("MdtOverlay finalized"); - return StatusCode::SUCCESS; -} +StatusCode MdtOverlay::execute() { + ATH_MSG_DEBUG("execute() begin"); -//================================================================ -StatusCode MdtOverlay::overlayExecute() { - ATH_MSG_DEBUG("MdtOverlay::execute() begin"); - //---------------------------------------------------------------- - ATH_MSG_VERBOSE("Retrieving data input MDT container"); + const MdtDigitContainer *bkgContainerPtr = nullptr; + if (m_includeBkg) { + SG::ReadHandle<MdtDigitContainer> bkgContainer (m_bkgInputKey); + if (!bkgContainer.isValid()) { + ATH_MSG_ERROR("Could not get background MDT container " << bkgContainer.name() << " from store " << bkgContainer.store()); + return StatusCode::FAILURE; + } + bkgContainerPtr = bkgContainer.cptr(); - SG::ReadHandle<MdtDigitContainer> dataContainer (m_mainInputDigitKey); - if (!dataContainer.isValid()) { - ATH_MSG_ERROR("Could not get data MDT container " << dataContainer.name() << " from store " << dataContainer.store()); - return StatusCode::FAILURE; + ATH_MSG_DEBUG("Found background MdtDigitContainer called " << bkgContainer.name() << " in store " << bkgContainer.store()); + ATH_MSG_DEBUG("MDT Background = " << Overlay::debugPrint(bkgContainer.cptr())); + ATH_MSG_VERBOSE("MDT background has digit_size " << bkgContainer->digit_size()); } - ATH_MSG_DEBUG("Found data MdtDigitContainer called " << dataContainer.name() << " in store " << dataContainer.store()); - ATH_MSG_INFO("MDT Data = "<<shortPrint(dataContainer.cptr())); - ATH_MSG_VERBOSE("Retrieving MC input MDT container"); - SG::ReadHandle<MdtDigitContainer> mcContainer(m_overlayInputDigitKey); - if(!mcContainer.isValid() ) { - ATH_MSG_ERROR("Could not get overlay MDT container " << mcContainer.name() << " from store " << mcContainer.store()); + SG::ReadHandle<MdtDigitContainer> signalContainer(m_signalInputKey); + if(!signalContainer.isValid() ) { + ATH_MSG_ERROR("Could not get signal MDT container " << signalContainer.name() << " from store " << signalContainer.store()); + return StatusCode::FAILURE; + } + ATH_MSG_DEBUG("Found signal MdtDigitContainer called " << signalContainer.name() << " in store " << signalContainer.store()); + ATH_MSG_DEBUG("MDT Signal = " << Overlay::debugPrint(signalContainer.cptr())); + ATH_MSG_VERBOSE("MDT signal has digit_size " << signalContainer->digit_size()); + + SG::WriteHandle<MdtDigitContainer> outputContainer(m_outputKey); + ATH_CHECK(outputContainer.record(std::make_unique<MdtDigitContainer>(signalContainer->size()))); + if (!outputContainer.isValid()) { + ATH_MSG_ERROR("Could not record output MdtDigitContainer called " << outputContainer.name() << " to store " << outputContainer.store()); return StatusCode::FAILURE; } - ATH_MSG_DEBUG("Found overlay MdtDigitContainer called " << mcContainer.name() << " in store " << mcContainer.store()); - ATH_MSG_INFO("MDT MC = "<<shortPrint(mcContainer.cptr())); - - ATH_MSG_VERBOSE("MDT data has digit_size "<<dataContainer->digit_size()); - - ATH_MSG_VERBOSE("MDT signal data has digit_size "<<mcContainer->digit_size()); - - SG::WriteHandle<MdtDigitContainer> outputContainer(m_outputDigitKey); - ATH_CHECK(outputContainer.record(std::make_unique<MdtDigitContainer>(dataContainer->size()))); ATH_MSG_DEBUG("Recorded output MdtDigitContainer called " << outputContainer.name() << " in store " << outputContainer.store()); - if(dataContainer.isValid() && mcContainer.isValid() && outputContainer.isValid()) { - if(!m_clean_overlay_data && !m_clean_overlay_signal){ - //Do the actual overlay - this->overlayContainer(dataContainer.cptr(), mcContainer.cptr(), outputContainer.ptr()); - } - else if (m_clean_overlay_data) { - MdtDigitContainer nobkg(0); - this->overlayContainer(&nobkg , mcContainer.cptr() , outputContainer.ptr()); - } - else if (m_clean_overlay_signal) { - MdtDigitContainer nomc(0); - this->overlayContainer(dataContainer.cptr(), &nomc , outputContainer.ptr()); - } - } - ATH_MSG_INFO("MDT Result = "<<shortPrint(outputContainer.cptr())); + // Do the actual overlay + ATH_CHECK(overlayContainer(bkgContainerPtr, signalContainer.cptr(), outputContainer.ptr())); + ATH_MSG_DEBUG("MDT Result = " << Overlay::debugPrint(outputContainer.cptr())); - //---------------------------------------------------------------- - ATH_MSG_DEBUG("MdtOverlay::execute() end"); + + ATH_MSG_DEBUG("execute() end"); return StatusCode::SUCCESS; } - -//================================================================ diff --git a/MuonSpectrometer/MuonOverlay/MdtOverlay/test/MdtOverlay_test.cxx b/MuonSpectrometer/MuonOverlay/MdtOverlay/test/MdtOverlay_test.cxx new file mode 100644 index 0000000000000000000000000000000000000000..60838f8adb3fceb70528b652523800c4821850be --- /dev/null +++ b/MuonSpectrometer/MuonOverlay/MdtOverlay/test/MdtOverlay_test.cxx @@ -0,0 +1,446 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +/** + * @author John Chapman + * @brief Tests for MdtOverlay. + */ + +#undef NDEBUG + +// Framework +#include "TestTools/initGaudi.h" + +// Google Test +#include "gtest/gtest.h" + +// Tested AthAlgorithm +#include "../MdtOverlay/MdtOverlay.h" + +namespace OverlayTesting { + + // needed every time an AthAlgorithm, AthAlgTool or AthService is instantiated + ISvcLocator* g_svcLoc = nullptr; + + // global test environment takes care of setting up Gaudi + class GaudiEnvironment : public ::testing::Environment { + protected: + virtual void SetUp() override { + Athena_test::initGaudi(OverlayTesting::g_svcLoc); + } + }; + + class MdtOverlay_test : public ::testing::Test { + + protected: + virtual void SetUp() override { + m_alg = new MdtOverlay{"MdtOverlay", g_svcLoc}; + ASSERT_TRUE( m_alg->setProperties().isSuccess() ); + } + + virtual void TearDown() override { + ASSERT_TRUE( m_alg->finalize().isSuccess() ); + delete m_alg; + } + + MdtOverlay* m_alg; + }; // MdtOverlay_test fixture + + + TEST_F(MdtOverlay_test, set_properties) { + // ordering A, C, B is on purpose to test for unintended alphabetic ordering + std::string inputSigPropertyValue = "'StoreGateSvc+MDT_DIGITS_SIG'"; + std::string inputBkgPropertyValue = "'StoreGateSvc+MDT_DIGITS_BKG'"; + std::string outputPropertyValue = "'StoreGateSvc+MDT_DIGITS'"; + ASSERT_TRUE( m_alg->setProperty( "BkgInputKey", inputBkgPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "SignalInputKey", inputSigPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->initialize().isSuccess() ); + ASSERT_TRUE( m_alg->execute().isFailure() ); //inputs don't exist + } + + TEST_F(MdtOverlay_test, empty_containers_alg_execute) { + SG::WriteHandle<MdtDigitContainer> inputSigDataHandle{"StoreGateSvc+MDT_DIGITS_SIG"}; + const unsigned int containerSize(1188); + inputSigDataHandle = std::make_unique<MdtDigitContainer>(containerSize); + SG::WriteHandle<MdtDigitContainer> inputBkgDataHandle{"StoreGateSvc+MDT_DIGITS_BKG"}; + inputBkgDataHandle = std::make_unique<MdtDigitContainer>(containerSize); + + // ordering A, C, B is on purpose to test for unintended alphabetic ordering + std::string inputSigPropertyValue = "'StoreGateSvc+MDT_DIGITS_SIG'"; + std::string inputBkgPropertyValue = "'StoreGateSvc+MDT_DIGITS_BKG'"; + std::string outputPropertyValue = "'StoreGateSvc+MDT_DIGITS'"; + ASSERT_TRUE( m_alg->setProperty( "BkgInputKey", inputBkgPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "SignalInputKey", inputSigPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->initialize().isSuccess() ); + ASSERT_TRUE( m_alg->execute().isSuccess() ); + } + + TEST_F(MdtOverlay_test, containers_with_matching_empty_collections) { + SG::WriteHandle<MdtDigitContainer> inputSigDataHandle{"StoreGateSvc+MDT_DIGITS_SIG1"}; + const unsigned int containerSize(1188); + IdentifierHash sigElementHash(1); + IdentifierHash bkgElementHash(1); + inputSigDataHandle = std::make_unique<MdtDigitContainer>(containerSize); + std::unique_ptr<MdtDigitCollection> sigCollection = std::make_unique<MdtDigitCollection>(Identifier(1234),sigElementHash); + ASSERT_TRUE(inputSigDataHandle->addCollection(sigCollection.get(),sigElementHash).isSuccess()); + sigCollection.release(); // Now owned by inputSigDataHandle + SG::WriteHandle<MdtDigitContainer> inputBkgDataHandle{"StoreGateSvc+MDT_DIGITS_BKG1"}; + inputBkgDataHandle = std::make_unique<MdtDigitContainer>(containerSize); + std::unique_ptr<MdtDigitCollection> bkgCollection = std::make_unique<MdtDigitCollection>(Identifier(1234),bkgElementHash); + ASSERT_TRUE(inputBkgDataHandle->addCollection(bkgCollection.get(),bkgElementHash).isSuccess()); + bkgCollection.release(); // Now owned by inputBkgDataHandle + + // ordering A, C, B is on purpose to test for unintended alphabetic ordering + std::string inputSigPropertyValue = "'StoreGateSvc+MDT_DIGITS_SIG1'"; + std::string inputBkgPropertyValue = "'StoreGateSvc+MDT_DIGITS_BKG1'"; + std::string outputPropertyValue = "'StoreGateSvc+MDT_DIGITS1'"; + ASSERT_TRUE( m_alg->setProperty( "BkgInputKey", inputBkgPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "SignalInputKey", inputSigPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->initialize().isSuccess() ); + ASSERT_TRUE( m_alg->execute().isSuccess() ); + // check output makes sense + SG::ReadHandle<MdtDigitContainer> outputDataHandle{"StoreGateSvc+MDT_DIGITS1"}; + ASSERT_TRUE( outputDataHandle.isValid() ); + const MdtDigitCollection *outputCollection = outputDataHandle->indexFindPtr(sigElementHash); + ASSERT_TRUE( outputCollection!=nullptr ); + ASSERT_TRUE( outputCollection->empty() ); + } + + TEST_F(MdtOverlay_test, containers_with_different_empty_collections) { + SG::WriteHandle<MdtDigitContainer> inputSigDataHandle{"StoreGateSvc+MDT_DIGITS_SIG2"}; + const unsigned int containerSize(1188); + IdentifierHash sigElementHash(1); + IdentifierHash bkgElementHash(2); + inputSigDataHandle = std::make_unique<MdtDigitContainer>(containerSize); + std::unique_ptr<MdtDigitCollection> sigCollection = std::make_unique<MdtDigitCollection>(Identifier(1234),sigElementHash); + ASSERT_TRUE(inputSigDataHandle->addCollection(sigCollection.get(),sigElementHash).isSuccess()); + sigCollection.release(); // Now owned by inputSigDataHandle + SG::WriteHandle<MdtDigitContainer> inputBkgDataHandle{"StoreGateSvc+MDT_DIGITS_BKG2"}; + inputBkgDataHandle = std::make_unique<MdtDigitContainer>(containerSize); + std::unique_ptr<MdtDigitCollection> bkgCollection = std::make_unique<MdtDigitCollection>(Identifier(1234),bkgElementHash); + ASSERT_TRUE(inputBkgDataHandle->addCollection(bkgCollection.get(),bkgElementHash).isSuccess()); + bkgCollection.release(); // Now owned by inputBkgDataHandle + + // ordering A, C, B is on purpose to test for unintended alphabetic ordering + std::string inputSigPropertyValue = "'StoreGateSvc+MDT_DIGITS_SIG2'"; + std::string inputBkgPropertyValue = "'StoreGateSvc+MDT_DIGITS_BKG2'"; + std::string outputPropertyValue = "'StoreGateSvc+MDT_DIGITS2'"; + ASSERT_TRUE( m_alg->setProperty( "BkgInputKey", inputBkgPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "SignalInputKey", inputSigPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->initialize().isSuccess() ); + ASSERT_TRUE( m_alg->execute().isSuccess() ); + // check output makes sense + SG::ReadHandle<MdtDigitContainer> outputDataHandle{"StoreGateSvc+MDT_DIGITS2"}; + ASSERT_TRUE( outputDataHandle.isValid() ); + const MdtDigitCollection *outputCollection1 = outputDataHandle->indexFindPtr(sigElementHash); + ASSERT_TRUE( outputCollection1!=nullptr ); + ASSERT_TRUE( outputCollection1->empty() ); + const MdtDigitCollection *outputCollection2 = outputDataHandle->indexFindPtr(bkgElementHash); + ASSERT_TRUE( outputCollection2!=nullptr ); + ASSERT_TRUE( outputCollection2->empty() ); + } + + TEST_F(MdtOverlay_test, containers_with_matching_collections_one_with_a_digit) { + SG::WriteHandle<MdtDigitContainer> inputSigDataHandle{"StoreGateSvc+MDT_DIGITS_SIG3"}; + const unsigned int containerSize(1188); + const IdentifierHash sigElementHash(1); + const IdentifierHash bkgElementHash(1); + const int sigTDC(12); + const int sigADC(13); + inputSigDataHandle = std::make_unique<MdtDigitContainer>(containerSize); + std::unique_ptr<MdtDigitCollection> sigCollection = std::make_unique<MdtDigitCollection>(Identifier(1234),sigElementHash); + //Add an MdtDigit + std::unique_ptr<MdtDigit> sigDigit = std::make_unique<MdtDigit>(Identifier(12),sigTDC,sigADC,false); + sigCollection->push_back(sigDigit.release()); + ASSERT_TRUE(inputSigDataHandle->addCollection(sigCollection.get(),sigElementHash).isSuccess()); + sigCollection.release(); // Now owned by inputSigDataHandle + SG::WriteHandle<MdtDigitContainer> inputBkgDataHandle{"StoreGateSvc+MDT_DIGITS_BKG3"}; + inputBkgDataHandle = std::make_unique<MdtDigitContainer>(containerSize); + std::unique_ptr<MdtDigitCollection> bkgCollection = std::make_unique<MdtDigitCollection>(Identifier(1234),bkgElementHash); + ASSERT_TRUE(inputBkgDataHandle->addCollection(bkgCollection.get(),bkgElementHash).isSuccess()); + bkgCollection.release(); // Now owned by inputBkgDataHandle + + // ordering A, C, B is on purpose to test for unintended alphabetic ordering + std::string inputSigPropertyValue = "'StoreGateSvc+MDT_DIGITS_SIG3'"; + std::string inputBkgPropertyValue = "'StoreGateSvc+MDT_DIGITS_BKG3'"; + std::string outputPropertyValue = "'StoreGateSvc+MDT_DIGITS3'"; + ASSERT_TRUE( m_alg->setProperty( "BkgInputKey", inputBkgPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "SignalInputKey", inputSigPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->initialize().isSuccess() ); + ASSERT_TRUE( m_alg->execute().isSuccess() ); + // check output makes sense + SG::ReadHandle<MdtDigitContainer> outputDataHandle{"StoreGateSvc+MDT_DIGITS3"}; + ASSERT_TRUE( outputDataHandle.isValid() ); + const MdtDigitCollection *outputCollection1 = outputDataHandle->indexFindPtr(sigElementHash); + ASSERT_TRUE( outputCollection1!=nullptr ); + ASSERT_TRUE( outputCollection1->size()==1 ); + const MdtDigit* outputDigit1 = outputCollection1->at(0); + ASSERT_TRUE( outputDigit1!=nullptr ); + ASSERT_TRUE( outputDigit1->tdc()==sigTDC ); + ASSERT_TRUE( outputDigit1->adc()==sigADC ); + ASSERT_TRUE( outputDigit1->is_masked()==false ); + } + + TEST_F(MdtOverlay_test, containers_with_different_collections_one_digit_each) { + SG::WriteHandle<MdtDigitContainer> inputSigDataHandle{"StoreGateSvc+MDT_DIGITS_SIG4"}; + const unsigned int containerSize(1188); + const IdentifierHash sigElementHash(1); + const IdentifierHash bkgElementHash(2); + const int sigTDC(12); + const int bkgTDC(13); + const int sigADC(13); + const int bkgADC(14); + inputSigDataHandle = std::make_unique<MdtDigitContainer>(containerSize); + std::unique_ptr<MdtDigitCollection> sigCollection = std::make_unique<MdtDigitCollection>(Identifier(1234),sigElementHash); + //Add an MdtDigit + std::unique_ptr<MdtDigit> sigDigit = std::make_unique<MdtDigit>(Identifier(12),sigTDC,sigADC,false); + sigCollection->push_back(sigDigit.release()); + ASSERT_TRUE(inputSigDataHandle->addCollection(sigCollection.get(),sigElementHash).isSuccess()); + sigCollection.release(); // Now owned by inputSigDataHandle + SG::WriteHandle<MdtDigitContainer> inputBkgDataHandle{"StoreGateSvc+MDT_DIGITS_BKG4"}; + inputBkgDataHandle = std::make_unique<MdtDigitContainer>(containerSize); + std::unique_ptr<MdtDigitCollection> bkgCollection = std::make_unique<MdtDigitCollection>(Identifier(1234),bkgElementHash); + //Add an MdtDigit + std::unique_ptr<MdtDigit> bkgDigit = std::make_unique<MdtDigit>(Identifier(12),bkgTDC,bkgADC,false); + bkgCollection->push_back(bkgDigit.release()); + ASSERT_TRUE(inputBkgDataHandle->addCollection(bkgCollection.get(),bkgElementHash).isSuccess()); + bkgCollection.release(); // Now owned by inputBkgDataHandle + + // ordering A, C, B is on purpose to test for unintended alphabetic ordering + std::string inputSigPropertyValue = "'StoreGateSvc+MDT_DIGITS_SIG4'"; + std::string inputBkgPropertyValue = "'StoreGateSvc+MDT_DIGITS_BKG4'"; + std::string outputPropertyValue = "'StoreGateSvc+MDT_DIGITS4'"; + ASSERT_TRUE( m_alg->setProperty( "BkgInputKey", inputBkgPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "SignalInputKey", inputSigPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->initialize().isSuccess() ); + ASSERT_TRUE( m_alg->execute().isSuccess() ); + // check output makes sense + SG::ReadHandle<MdtDigitContainer> outputDataHandle{"StoreGateSvc+MDT_DIGITS4"}; + ASSERT_TRUE( outputDataHandle.isValid() ); + const MdtDigitCollection *outputCollection1 = outputDataHandle->indexFindPtr(sigElementHash); + ASSERT_TRUE( outputCollection1!=nullptr ); + ASSERT_TRUE( outputCollection1->size()==1 ); + const MdtDigit* outputDigit1 = outputCollection1->at(0); + ASSERT_TRUE( outputDigit1!=nullptr ); + ASSERT_TRUE( outputDigit1->tdc()==sigTDC ); + ASSERT_TRUE( outputDigit1->adc()==sigADC ); + ASSERT_TRUE( outputDigit1->is_masked()==false ); + const MdtDigitCollection *outputCollection2 = outputDataHandle->indexFindPtr(bkgElementHash); + ASSERT_TRUE( outputCollection2!=nullptr ); + ASSERT_TRUE( outputCollection2->size()==1 ); + const MdtDigit* outputDigit2 = outputCollection2->at(0); + ASSERT_TRUE( outputDigit2!=nullptr ); + ASSERT_TRUE( outputDigit2->tdc()==bkgTDC ); + ASSERT_TRUE( outputDigit2->adc()==bkgADC ); + ASSERT_TRUE( outputDigit2->is_masked()==false ); + } + + TEST_F(MdtOverlay_test, containers_with_matching_collections_one_different_digit_each) { + SG::WriteHandle<MdtDigitContainer> inputSigDataHandle{"StoreGateSvc+MDT_DIGITS_SIG5"}; + const unsigned int containerSize(1188); + const IdentifierHash sigElementHash(1); + const IdentifierHash bkgElementHash(1); + const int sigTDC(12); + const int bkgTDC(12); + const int sigADC(13); + const int bkgADC(13); + inputSigDataHandle = std::make_unique<MdtDigitContainer>(containerSize); + std::unique_ptr<MdtDigitCollection> sigCollection = std::make_unique<MdtDigitCollection>(Identifier(1234),sigElementHash); + //Add an MdtDigit + std::unique_ptr<MdtDigit> sigDigit = std::make_unique<MdtDigit>(Identifier(12),sigTDC,sigADC,false); + sigCollection->push_back(sigDigit.release()); + ASSERT_TRUE(inputSigDataHandle->addCollection(sigCollection.get(),sigElementHash).isSuccess()); + sigCollection.release(); // Now owned by inputSigDataHandle + SG::WriteHandle<MdtDigitContainer> inputBkgDataHandle{"StoreGateSvc+MDT_DIGITS_BKG5"}; + inputBkgDataHandle = std::make_unique<MdtDigitContainer>(containerSize); + std::unique_ptr<MdtDigitCollection> bkgCollection = std::make_unique<MdtDigitCollection>(Identifier(1234),bkgElementHash); + //Add an MdtDigit + std::unique_ptr<MdtDigit> bkgDigit = std::make_unique<MdtDigit>(Identifier(13),bkgTDC,bkgADC,false); + bkgCollection->push_back(bkgDigit.release()); + ASSERT_TRUE(inputBkgDataHandle->addCollection(bkgCollection.get(),bkgElementHash).isSuccess()); + bkgCollection.release(); // Now owned by inputBkgDataHandle + + // ordering A, C, B is on purpose to test for unintended alphabetic ordering + std::string inputSigPropertyValue = "'StoreGateSvc+MDT_DIGITS_SIG5'"; + std::string inputBkgPropertyValue = "'StoreGateSvc+MDT_DIGITS_BKG5'"; + std::string outputPropertyValue = "'StoreGateSvc+MDT_DIGITS5'"; + ASSERT_TRUE( m_alg->setProperty( "BkgInputKey", inputBkgPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "SignalInputKey", inputSigPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->initialize().isSuccess() ); + ASSERT_TRUE( m_alg->execute().isSuccess() ); + // check output makes sense + SG::ReadHandle<MdtDigitContainer> outputDataHandle{"StoreGateSvc+MDT_DIGITS5"}; + ASSERT_TRUE( outputDataHandle.isValid() ); + const MdtDigitCollection *outputCollection = outputDataHandle->indexFindPtr(sigElementHash); + ASSERT_TRUE( outputCollection!=nullptr ); + ASSERT_TRUE( outputCollection->size()==2 ); + const MdtDigit* outputDigit1 = outputCollection->at(0); + ASSERT_TRUE( outputDigit1!=nullptr ); + ASSERT_TRUE( outputDigit1->tdc()==sigTDC ); + ASSERT_TRUE( outputDigit1->adc()==sigADC ); + ASSERT_TRUE( outputDigit1->is_masked()==false ); + const MdtDigit* outputDigit2 = outputCollection->at(1); + ASSERT_TRUE( outputDigit2!=nullptr ); + ASSERT_TRUE( outputDigit2->tdc()==sigTDC ); + ASSERT_TRUE( outputDigit2->adc()==sigADC ); + ASSERT_TRUE( outputDigit2->is_masked()==false ); + } + + TEST_F(MdtOverlay_test, containers_with_matching_collections_one_matching_digit_each) { + SG::WriteHandle<MdtDigitContainer> inputSigDataHandle{"StoreGateSvc+MDT_DIGITS_SIG6"}; + const unsigned int containerSize(1188); + const IdentifierHash sigElementHash(1); + const IdentifierHash bkgElementHash(1); + const int sigTDC(12); + const int bkgTDC(12); + const int sigADC(13); + const int bkgADC(13); + inputSigDataHandle = std::make_unique<MdtDigitContainer>(containerSize); + std::unique_ptr<MdtDigitCollection> sigCollection = std::make_unique<MdtDigitCollection>(Identifier(1234),sigElementHash); + //Add an MdtDigit + std::unique_ptr<MdtDigit> sigDigit = std::make_unique<MdtDigit>(Identifier(12),sigTDC,sigADC,false); + sigCollection->push_back(sigDigit.release()); + ASSERT_TRUE(inputSigDataHandle->addCollection(sigCollection.get(),sigElementHash).isSuccess()); + sigCollection.release(); // Now owned by inputSigDataHandle + SG::WriteHandle<MdtDigitContainer> inputBkgDataHandle{"StoreGateSvc+MDT_DIGITS_BKG6"}; + inputBkgDataHandle = std::make_unique<MdtDigitContainer>(containerSize); + std::unique_ptr<MdtDigitCollection> bkgCollection = std::make_unique<MdtDigitCollection>(Identifier(1234),bkgElementHash); + //Add an MdtDigit + std::unique_ptr<MdtDigit> bkgDigit = std::make_unique<MdtDigit>(Identifier(12),bkgTDC,bkgADC,false); + bkgCollection->push_back(bkgDigit.release()); + ASSERT_TRUE(inputBkgDataHandle->addCollection(bkgCollection.get(),bkgElementHash).isSuccess()); + bkgCollection.release(); // Now owned by inputBkgDataHandle + + // ordering A, C, B is on purpose to test for unintended alphabetic ordering + std::string inputSigPropertyValue = "'StoreGateSvc+MDT_DIGITS_SIG6'"; + std::string inputBkgPropertyValue = "'StoreGateSvc+MDT_DIGITS_BKG6'"; + std::string outputPropertyValue = "'StoreGateSvc+MDT_DIGITS6'"; + ASSERT_TRUE( m_alg->setProperty( "BkgInputKey", inputBkgPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "SignalInputKey", inputSigPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->initialize().isSuccess() ); + ASSERT_TRUE( m_alg->execute().isSuccess() ); + // check output makes sense + SG::ReadHandle<MdtDigitContainer> outputDataHandle{"StoreGateSvc+MDT_DIGITS6"}; + ASSERT_TRUE( outputDataHandle.isValid() ); + const MdtDigitCollection *outputCollection = outputDataHandle->indexFindPtr(sigElementHash); + ASSERT_TRUE( outputCollection!=nullptr ); + ASSERT_TRUE( outputCollection->size()==1 ); + const MdtDigit* outputDigit = outputCollection->at(0); + ASSERT_TRUE( outputDigit!=nullptr ); + ASSERT_TRUE( outputDigit->tdc()==sigTDC ); // TDC values were the same for both digits + ASSERT_TRUE( outputDigit->adc()==sigADC+bkgADC ); // Adds up the ADC values on matching digits + ASSERT_TRUE( outputDigit->is_masked()==false ); + } + + TEST_F(MdtOverlay_test, two_digits_with_matching_id_signal_first) { + SG::WriteHandle<MdtDigitContainer> inputSigDataHandle{"StoreGateSvc+MDT_DIGITS_SIG7"}; + const unsigned int containerSize(1188); + const IdentifierHash sigElementHash(1); + const IdentifierHash bkgElementHash(1); + const int sigTDC(11); + const int bkgTDC(12); + const int sigADC(13); + const int bkgADC(13); + inputSigDataHandle = std::make_unique<MdtDigitContainer>(containerSize); + std::unique_ptr<MdtDigitCollection> sigCollection = std::make_unique<MdtDigitCollection>(Identifier(1234),sigElementHash); + //Add an MdtDigit + std::unique_ptr<MdtDigit> sigDigit = std::make_unique<MdtDigit>(Identifier(12),sigTDC,sigADC,false); + sigCollection->push_back(sigDigit.release()); + ASSERT_TRUE(inputSigDataHandle->addCollection(sigCollection.get(),sigElementHash).isSuccess()); + sigCollection.release(); // Now owned by inputSigDataHandle + SG::WriteHandle<MdtDigitContainer> inputBkgDataHandle{"StoreGateSvc+MDT_DIGITS_BKG7"}; + inputBkgDataHandle = std::make_unique<MdtDigitContainer>(containerSize); + std::unique_ptr<MdtDigitCollection> bkgCollection = std::make_unique<MdtDigitCollection>(Identifier(1234),bkgElementHash); + //Add an MdtDigit + std::unique_ptr<MdtDigit> bkgDigit = std::make_unique<MdtDigit>(Identifier(12),bkgTDC,bkgADC,false); + bkgCollection->push_back(bkgDigit.release()); + ASSERT_TRUE(inputBkgDataHandle->addCollection(bkgCollection.get(),bkgElementHash).isSuccess()); + bkgCollection.release(); // Now owned by inputBkgDataHandle + + // ordering A, C, B is on purpose to test for unintended alphabetic ordering + std::string inputSigPropertyValue = "'StoreGateSvc+MDT_DIGITS_SIG7'"; + std::string inputBkgPropertyValue = "'StoreGateSvc+MDT_DIGITS_BKG7'"; + std::string outputPropertyValue = "'StoreGateSvc+MDT_DIGITS7'"; + ASSERT_TRUE( m_alg->setProperty( "BkgInputKey", inputBkgPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "SignalInputKey", inputSigPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->initialize().isSuccess() ); + ASSERT_TRUE( m_alg->execute().isSuccess() ); + // check output makes sense + SG::ReadHandle<MdtDigitContainer> outputDataHandle{"StoreGateSvc+MDT_DIGITS7"}; + ASSERT_TRUE( outputDataHandle.isValid() ); + const MdtDigitCollection *outputCollection = outputDataHandle->indexFindPtr(sigElementHash); + ASSERT_TRUE( outputCollection!=nullptr ); + ASSERT_TRUE( outputCollection->size()==1 ); + const MdtDigit* outputDigit = outputCollection->at(0); + ASSERT_TRUE( outputDigit!=nullptr ); + ASSERT_TRUE( outputDigit->tdc()==sigTDC ); // Use lowest TDC value + ASSERT_TRUE( outputDigit->adc()==sigADC+bkgADC ); // Adds up the ADC values on matching digits + ASSERT_TRUE( outputDigit->is_masked()==false ); + } + + TEST_F(MdtOverlay_test, two_digits_with_matching_id_bkg_first) { + SG::WriteHandle<MdtDigitContainer> inputSigDataHandle{"StoreGateSvc+MDT_DIGITS_SIG8"}; + const unsigned int containerSize(1188); + const IdentifierHash sigElementHash(1); + const IdentifierHash bkgElementHash(1); + const int sigTDC(12); + const int bkgTDC(11); + const int sigADC(13); + const int bkgADC(13); + inputSigDataHandle = std::make_unique<MdtDigitContainer>(containerSize); + std::unique_ptr<MdtDigitCollection> sigCollection = std::make_unique<MdtDigitCollection>(Identifier(1234),sigElementHash); + //Add an MdtDigit + std::unique_ptr<MdtDigit> sigDigit = std::make_unique<MdtDigit>(Identifier(12),sigTDC,sigADC,false); + sigCollection->push_back(sigDigit.release()); + ASSERT_TRUE(inputSigDataHandle->addCollection(sigCollection.get(),sigElementHash).isSuccess()); + sigCollection.release(); // Now owned by inputSigDataHandle + SG::WriteHandle<MdtDigitContainer> inputBkgDataHandle{"StoreGateSvc+MDT_DIGITS_BKG8"}; + inputBkgDataHandle = std::make_unique<MdtDigitContainer>(containerSize); + std::unique_ptr<MdtDigitCollection> bkgCollection = std::make_unique<MdtDigitCollection>(Identifier(1234),bkgElementHash); + //Add an MdtDigit + std::unique_ptr<MdtDigit> bkgDigit = std::make_unique<MdtDigit>(Identifier(12),bkgTDC,bkgADC,false); + bkgCollection->push_back(bkgDigit.release()); + ASSERT_TRUE(inputBkgDataHandle->addCollection(bkgCollection.get(),bkgElementHash).isSuccess()); + bkgCollection.release(); // Now owned by inputBkgDataHandle + + // ordering A, C, B is on purpose to test for unintended alphabetic ordering + std::string inputSigPropertyValue = "'StoreGateSvc+MDT_DIGITS_SIG8'"; + std::string inputBkgPropertyValue = "'StoreGateSvc+MDT_DIGITS_BKG8'"; + std::string outputPropertyValue = "'StoreGateSvc+MDT_DIGITS8'"; + ASSERT_TRUE( m_alg->setProperty( "BkgInputKey", inputBkgPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "SignalInputKey", inputSigPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->initialize().isSuccess() ); + ASSERT_TRUE( m_alg->execute().isSuccess() ); + // check output makes sense + SG::ReadHandle<MdtDigitContainer> outputDataHandle{"StoreGateSvc+MDT_DIGITS8"}; + ASSERT_TRUE( outputDataHandle.isValid() ); + const MdtDigitCollection *outputCollection = outputDataHandle->indexFindPtr(sigElementHash); + ASSERT_TRUE( outputCollection!=nullptr ); + ASSERT_TRUE( outputCollection->size()==1 ); + const MdtDigit* outputDigit = outputCollection->at(0); + ASSERT_TRUE( outputDigit!=nullptr ); + ASSERT_TRUE( outputDigit->tdc()==bkgTDC ); // Use lowest TDC value + ASSERT_TRUE( outputDigit->adc()==sigADC+bkgADC ); // Adds up the ADC values on matching digits + ASSERT_TRUE( outputDigit->is_masked()==false ); + } + +} // <-- namespace OverlayTesting + + +int main(int argc, char *argv[]) +{ + ::testing::InitGoogleTest( &argc, argv ); + ::testing::AddGlobalTestEnvironment( new OverlayTesting::GaudiEnvironment ); + return RUN_ALL_TESTS(); +} diff --git a/MuonSpectrometer/MuonOverlay/MuonOverlayBase/CMakeLists.txt b/MuonSpectrometer/MuonOverlay/MuonOverlayBase/CMakeLists.txt index cbcce39fb69dbd050e6985a59df53f2e63af4bcf..ad4acd746af6c4d603f6566521352b2593662350 100644 --- a/MuonSpectrometer/MuonOverlay/MuonOverlayBase/CMakeLists.txt +++ b/MuonSpectrometer/MuonOverlay/MuonOverlayBase/CMakeLists.txt @@ -7,16 +7,9 @@ atlas_subdir( MuonOverlayBase ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC - Control/AthenaBaseComps - Control/AthContainers - Control/StoreGate - DetectorDescription/Identifier - Event/EventOverlay/IDC_OverlayBase - Event/EventOverlay/OverlayAlgBase - GaudiKernel ) + Event/EventOverlay/IDC_OverlayBase ) # Component(s) in the package: atlas_add_library( MuonOverlayBase PUBLIC_HEADERS MuonOverlayBase - LINK_LIBRARIES AthenaBaseComps AthContainers Identifier IDC_OverlayBase OverlayAlgBase GaudiKernel StoreGateLib SGtests ) - + LINK_LIBRARIES IDC_OverlayBase ) diff --git a/MuonSpectrometer/MuonOverlay/MuonOverlayBase/MuonOverlayBase/IDC_MultiHitOverlayBase.h b/MuonSpectrometer/MuonOverlay/MuonOverlayBase/MuonOverlayBase/IDC_MultiHitOverlayBase.h deleted file mode 100644 index 2634e61ea7f58e08ff1f0dcd63d532db848f57c4..0000000000000000000000000000000000000000 --- a/MuonSpectrometer/MuonOverlay/MuonOverlayBase/MuonOverlayBase/IDC_MultiHitOverlayBase.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -/** - * @file - * - * Common base class and generic overlaying code for boolean-like hits. - * Multi hit overlay n1 hits + n hits -> m hits - * - * @author Ketevi A. Assamagan, 2009 - * - */ - -#ifndef IDC_MULTIHITOVERLAYBASE_H -#define IDC_MULTIHITOVERLAYBASE_H - -#include <string> -#include <vector> - -#include "OverlayAlgBase/OverlayAlgBase.h" -#include "IDC_OverlayBase/IDC_OverlayCommon.h" - -class IDC_MultiHitOverlayBase; - -namespace Overlay { - - /** - * Merging of hits on the same channel. Modifies the first argument by adding data from the second.. - * Implementations can assume that the arguments have the same Id. (That is, correspond to the same readout channel.) - * - * A generic implementation of this template is provided in this package, - * but subdetectors can provide specializations suitable for their RDO type. - * A simple example of providing a specialization is in InDetOverlay.cxx (for TRT_RDORawData). - * A more elaborate implementation can be found e.g. in MdtOverlay.cxx - * Here we general same channel hit merging to the case where we have - n1 hits + n2 Hits -> n3 Hits. This may corresponds to the cases of the RPC and TGC - * - */ - template<class Datum> - void mergeMultiHits(std::vector<Datum*>& dataHits, std::vector<Datum*>& mcHits, - std::vector<Datum*>& outHits, IDC_MultiHitOverlayBase* parent); -} - - -class IDC_MultiHitOverlayBase : public OverlayAlgBase { -public: - - IDC_MultiHitOverlayBase(const std::string &name, ISvcLocator *pSvcLocator) - : OverlayAlgBase(name, pSvcLocator) - {} - - /** - * Transfers all collections from the first and second arguments to the output the first merging where necessary. - */ - template<class IDC_Container> void overlayContainer(const IDC_Container* data, const IDC_Container* mc, IDC_Container* output) { - Overlay::overlayContainer(data, mc, output, this); - } - - template<class IDC_Container> std::string shortPrint(const IDC_Container *container, unsigned numprint = 25) { - return Overlay::shortPrint(container, numprint); - } - - /** - * Adds data from the second collection to the first merging where necessary. - * After this call the "data" collection contains all information, and the "mc" - * collection is empty. - */ - template<class Collection> void mergeCollections(Collection *mc_coll, Collection *data_coll, Collection *out_coll); - -}; - -#include "MuonOverlayBase/IDC_MultiHitOverlayBase.icc" - -#endif/*IDC_MULTIHITOVERLAYBASE_H*/ diff --git a/MuonSpectrometer/MuonOverlay/MuonOverlayBase/MuonOverlayBase/IDC_MultiHitOverlayBase.icc b/MuonSpectrometer/MuonOverlay/MuonOverlayBase/MuonOverlayBase/IDC_MultiHitOverlayBase.icc deleted file mode 100644 index ccaf2c43b48e01daa421af146267d90decb04022..0000000000000000000000000000000000000000 --- a/MuonSpectrometer/MuonOverlay/MuonOverlayBase/MuonOverlayBase/IDC_MultiHitOverlayBase.icc +++ /dev/null @@ -1,117 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - - -// Ketevi A. Assamagan, 2009 - -#include "Identifier/Identifier.h" -#include "Identifier/IdentifierHash.h" - -#include "AthenaBaseComps/AthMsgStreamMacros.h" - -#include "AthContainers/DataVector.h" - -#include "StoreGate/StoreGateSvc.h" -#include <memory> - -#include <sstream> - -#include <set> - -//================================================================ -namespace Overlay { - - template<class Datum> - void mergeMultiHits(std::vector<Datum*>& dataHits, - std::vector<Datum*>& mcHits, - std::vector<Datum*>& outHits, IDC_MultiHitOverlayBase* parent) { - - parent->msg(MSG::DEBUG) << "Overlay::mergeMultiHits() : " << typeid(Datum).name() << endmsg; - - outHits.clear(); - - /** here we take all the hits. SubSystems can to more sophisticated selections - in their template specializations */ - for (unsigned int i=0; i<dataHits.size(); ++i) outHits.push_back( dataHits.at(i) ); - for (unsigned int j=0; j<mcHits.size(); ++j) outHits.push_back( mcHits.at(j) ); - } -} - -//================================================================ -template<class Collection> -void IDC_MultiHitOverlayBase::mergeCollections(Collection *mc_coll, - Collection *data_coll, - Collection *out_coll) -{ - DataVector<typename Collection::base_value_type> mc; - mc_coll->swap(mc); - - DataVector<typename Collection::base_value_type> data; - data_coll->swap(data); - - //################################################################ - // Merge by copying ptrs from data and mc to mc_coll - - typename Collection::size_type idata = 0; - typename Collection::size_type imc = 0; - typename Collection::size_type j; - typename Collection::size_type k; - - /** this is the set of the all the hits treated - when all is done, it should be the union of data and MC hits */ - std::set<Identifier> ids; - - /** merge hits on the same channel */ - while ( imc < mc.size() ) { - /** collect all the mc hits of a given Identifer id */ - typename Collection::base_value_type *p_rdo(0); - std::vector<typename Collection::base_value_type *> vect1; - if ( !mc[imc] ) { imc++; continue; } - Identifier id = mc[imc]->identify(); - if(!(ids.insert(id)).second) { imc++; continue; } // this Id already treated -> move on - mc.swapElement(imc++, 0, p_rdo); - vect1.push_back(p_rdo); - for ( j=imc; j<mc.size(); j++ ) { - if ( !mc[j] ) continue; - if ( mc[j]->identify() == id ) { - mc.swapElement(j, 0, p_rdo); - vect1.push_back(p_rdo); - } - } - - /** collect all the data hits of the same Identifier id */ - typename Collection::base_value_type *p_data(0); - std::vector<typename Collection::base_value_type *> vect2; - for ( k=0; k<data.size(); k++ ) { - if ( !data[k] ) continue; - if ( data[k]->identify() == id ) { - data.swapElement(k, 0, p_data); - vect2.push_back(p_data); - } - } - - /** now we have vect1 and vect2 for same Id channels, - call the multi hit overlay and save the merged hits */ - if ( vect2.size() > 0 ) { // no need to merge hits if data in empty - std::vector<typename Collection::base_value_type *> vect; - Overlay::mergeMultiHits(vect1,vect2,vect,this); - for (unsigned int n=0; n<vect.size(); ++n) out_coll->push_back( vect.at(n) ); - } else { // copy directly mc if data is empty - for (unsigned int n=0; n<vect1.size(); ++n) out_coll->push_back( vect1.at(n) ); - } - } - - /** now there must be some hits in the data that are not treated yet - - deal with those at this time. These should be the hit Ids that - are in the data but not found in the MC */ - while( idata < data.size() ) { - if ( !data[idata] ) { idata++; continue; } - Identifier id = data[idata]->identify(); - if(!(ids.insert(id)).second) { idata++; continue; } // this Id was found and treated already above -> continue - typename Collection::base_value_type *p_data(0); - data.swapElement(idata++, 0, p_data); - out_coll->push_back( p_data ); - } - -} diff --git a/MuonSpectrometer/MuonOverlay/MuonOverlayBase/MuonOverlayBase/IDC_MultiHitOverlayCommon.h b/MuonSpectrometer/MuonOverlay/MuonOverlayBase/MuonOverlayBase/IDC_MultiHitOverlayCommon.h new file mode 100644 index 0000000000000000000000000000000000000000..717f06b32043f74e8c9cd9c2ffadbe2cbe38a5a0 --- /dev/null +++ b/MuonSpectrometer/MuonOverlay/MuonOverlayBase/MuonOverlayBase/IDC_MultiHitOverlayCommon.h @@ -0,0 +1,47 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +/** + * @file + * + * Common base class and generic overlaying code for boolean-like hits. + * Multi hit overlay n1 hits + n hits -> m hits + * + * @author Tadej Novak + * @author Ketevi A. Assamagan, 2009 + */ + +#ifndef IDC_MULTIHITOVERLAYCOMMON_H +#define IDC_MULTIHITOVERLAYCOMMON_H + +#include <vector> + +namespace Overlay +{ + +/** + * Merging of hits on the same channel. Modifies the first argument by adding + data from the second.. + * Implementations can assume that the arguments have the same Id. (That is, + correspond to the same readout channel.) + * + * A generic implementation of this template is provided in this package, + * but subdetectors can provide specializations suitable for their RDO type. + * + * As a Collection is usually based on the DataVector elements are not const. + */ +template <class Datum> +void mergeMultiHits(const std::vector<Datum *> &bkgHits, + const std::vector<Datum *> &signalHits, + std::vector<Datum *> &outputHits); + +template <class Collection> +void mergeMultiHitCollections(Collection *bkgCollection, + Collection *signalCollection, + Collection *outputCollection); +} // namespace Overlay + +#include "MuonOverlayBase/IDC_MultiHitOverlayCommon.icc" + +#endif diff --git a/MuonSpectrometer/MuonOverlay/MuonOverlayBase/MuonOverlayBase/IDC_MultiHitOverlayCommon.icc b/MuonSpectrometer/MuonOverlay/MuonOverlayBase/MuonOverlayBase/IDC_MultiHitOverlayCommon.icc new file mode 100644 index 0000000000000000000000000000000000000000..6456569a61994414d5360b035ecdaa08988e1511 --- /dev/null +++ b/MuonSpectrometer/MuonOverlay/MuonOverlayBase/MuonOverlayBase/IDC_MultiHitOverlayCommon.icc @@ -0,0 +1,128 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +// Ketevi A. Assamagan, 2009 + +#include <Identifier/Identifier.h> +#include <Identifier/IdentifierHash.h> + +#include <set> + +namespace Overlay +{ + +template <class Datum> +void mergeMultiHits(const std::vector<Datum *> &bkgHits, + const std::vector<Datum *> &signalHits, + std::vector<Datum *> &outputHits) +{ + outputHits.clear(); + outputHits.insert(outputHits.end(), bkgHits.begin(), bkgHits.end()); + outputHits.insert(outputHits.end(), signalHits.begin(), signalHits.end()); +} + + + +template <class Collection> +void mergeMultiHitCollections(Collection *bkgCollection, + Collection *signalCollection, + Collection *outputCollection) +{ + typedef typename Collection::base_value_type Datum; + typedef typename Collection::size_type size_type; + + /** this is the set of the all the hits treated + when all is done, it should be the union of signal and background hits */ + std::set<Identifier> ids; + + /** merge hits on the same channel */ + size_type ibkg = 0; + while (ibkg < bkgCollection->size()) { + // collect all the background hits of a given Identifer id + std::vector<Datum *> vectBkg; + Datum *element = bkgCollection->at(ibkg); + if (!element) { + // element already processed, continue + ibkg++; + continue; + } + + // Identify the element and check if we already processed it + Identifier id = element->identify(); + if (!ids.insert(id).second) { + // this Id already treated -> move on + ibkg++; + continue; + } + + // Swap out the element + Datum *tmpRdo{}; + bkgCollection->swapElement(ibkg++, nullptr, tmpRdo); + vectBkg.push_back(tmpRdo); + + // Process the rest with the same Identifier id + for (size_type i = ibkg; i < bkgCollection->size(); i++) { + Datum *element = bkgCollection->at(i); + if (!element) // already processed, continue + continue; + if (element->identify() == id) { + // Swap out the element + Datum *tmpRdo{}; + bkgCollection->swapElement(i, nullptr, tmpRdo); + vectBkg.push_back(tmpRdo); + } + } + + // Collect all the signal hits of the same Identifier id + std::vector<Datum *> vectSig; + for (size_type i = 0; i < signalCollection->size(); i++) { + Datum *element = signalCollection->at(i); + if (!element) // already processed, continue + continue; + if (element->identify() == id) { + Datum *tmpRdo{}; + signalCollection->swapElement(i, nullptr, tmpRdo); + vectSig.push_back(tmpRdo); + } + } + + /** now we have vectBkg and vectSig for same Id channels, + call the multi hit overlay and save the merged hits */ + if (!vectSig.empty()) { // no need to merge hits if signal not empty + std::vector<Datum *> vect; + Overlay::mergeMultiHits(vectBkg, vectSig, vect); + for (Datum *element : vect) + outputCollection->push_back(element); + } else { // copy directly background if signal is empty + for (Datum *element : vectBkg) + outputCollection->push_back(element); + } + } + + /** now there must be some hits in the signal collection that are not treated yet - + deal with those at this time. These should be the hit Ids that + are in the signal but not found in the background */ + size_type isig = 0; + while (isig < signalCollection->size()) { + Datum *element = signalCollection->at(isig); + if (!element) { + // element already processed, continue + isig++; + continue; + } + + Identifier id = element->identify(); + if (!ids.insert(id).second) { + // this Id already treated -> move on + isig++; + continue; + } + + Datum *tmpRdo{}; + signalCollection->swapElement(isig++, 0, tmpRdo); + outputCollection->push_back(tmpRdo); + } +} + +} // namespace Overlay diff --git a/MuonSpectrometer/MuonOverlay/MuonOverlayBase/MuonOverlayBase/IDC_MuonOverlayBase.h b/MuonSpectrometer/MuonOverlay/MuonOverlayBase/MuonOverlayBase/IDC_MuonOverlayBase.h new file mode 100644 index 0000000000000000000000000000000000000000..0c8d02681eb79321de88c00398b59bacb6c47ebc --- /dev/null +++ b/MuonSpectrometer/MuonOverlay/MuonOverlayBase/MuonOverlayBase/IDC_MuonOverlayBase.h @@ -0,0 +1,64 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +// Dear emacs, this is -*-c++-*- + +/** + * @file + * + * Overlaying of Identifiable Containers. Functions common to the + * single-hit-per-readout-channel-in-an-event case and the + * possible-multiple-hits-on-a-channel case are declared in this file. + * + * @author Tadej Novak <tadej@cern.ch> + * @author Andrei Gaponenko <agaponenko@lbl.gov>, 2009 + * + */ + +#ifndef IDC_MUONOVERLAYCOMMON_H +#define IDC_MUONOVERLAYCOMMON_H + +#include <AthenaBaseComps/AthAlgorithm.h> +#include <Identifier/IdentifierHash.h> + + +class IDC_MuonOverlayBase : public AthAlgorithm +{ +public: + IDC_MuonOverlayBase(const std::string &name, ISvcLocator *pSvcLocator) + : AthAlgorithm(name, pSvcLocator) {} + +protected: + template <class IDC_Container> + StatusCode overlayContainer(const IDC_Container *bkgContainer, + const IDC_Container *signalContainer, + IDC_Container *outputContainer) + { + return overlayContainerBase(bkgContainer, signalContainer, outputContainer, false); + } + + template <class IDC_Container> + StatusCode overlayMultiHitContainer(const IDC_Container *bkgContainer, + const IDC_Container *signalContainer, + IDC_Container *outputContainer) + { + return overlayContainerBase(bkgContainer, signalContainer, outputContainer, true); + } + +private: + template <class IDC_Container> + StatusCode overlayContainerBase(const IDC_Container *bkgContainer, + const IDC_Container *signalContainer, + IDC_Container *outputContainer, + bool isMultiHitCollection); + + template <class Collection> + std::unique_ptr<Collection> copyCollection(const IdentifierHash &hashId, + const Collection *collection); + +}; + +#include "IDC_MuonOverlayBase.icc" + +#endif diff --git a/MuonSpectrometer/MuonOverlay/MuonOverlayBase/MuonOverlayBase/IDC_MuonOverlayBase.icc b/MuonSpectrometer/MuonOverlay/MuonOverlayBase/MuonOverlayBase/IDC_MuonOverlayBase.icc new file mode 100644 index 0000000000000000000000000000000000000000..dbbb840edd239e6429fb60fed26815552149def1 --- /dev/null +++ b/MuonSpectrometer/MuonOverlay/MuonOverlayBase/MuonOverlayBase/IDC_MuonOverlayBase.icc @@ -0,0 +1,131 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +// Generic overlaying code for Muon Identifiable Containers. +// Tadej Novak +// Andrei Gaponenko <agaponenko@lbl.gov>, 2006-2009 + +#include <Identifier/Identifier.h> + +#include <IDC_OverlayBase/IDC_OverlayCommon.h> +#include <MuonOverlayBase/IDC_MultiHitOverlayCommon.h> + + +template <class Collection> +std::unique_ptr<Collection> IDC_MuonOverlayBase::copyCollection(const IdentifierHash &hashId, + const Collection *collection) +{ + typedef typename Collection::base_value_type Datum; + + auto outputCollection = std::make_unique<Collection>(collection->identify(), hashId); + + for (const Datum *existingDatum : *collection) { + // Owned by the collection + Datum *datumCopy = new Datum(*existingDatum); + outputCollection->push_back(datumCopy); + } + + return outputCollection; +} + + + +template <class IDC_Container> +StatusCode IDC_MuonOverlayBase::overlayContainerBase(const IDC_Container *bkgContainer, + const IDC_Container *signalContainer, + IDC_Container *outputContainer, + bool isMultiHitCollection) +{ + typedef typename IDC_Container::base_value_type Collection; + + ATH_MSG_DEBUG("overlayContainer<>() begin"); + + // Get all the hashes for the signal container + const std::vector<IdentifierHash> signalHashes = signalContainer->GetAllCurrentHashes(); + + // There are some use cases where background is empty + if (!bkgContainer) { + // Only loop through the signal collections and copy them over + for (const IdentifierHash &hashId : signalHashes) { + // Copy the signal collection + std::unique_ptr<Collection> signalCollection = copyCollection(hashId, signalContainer->indexFindPtr(hashId)); + + if (outputContainer->addCollection(signalCollection.get(), hashId).isFailure()) { + ATH_MSG_ERROR("Adding signal Collection with hashId " << hashId << " failed"); + return StatusCode::FAILURE; + } else { + signalCollection.release(); + } + } + + return StatusCode::SUCCESS; + } + + // Get all the hashes for the background container + const std::vector<IdentifierHash> bkgHashes = bkgContainer->GetAllCurrentHashes(); + + // The MC signal container should typically be smaller than bkgContainer, + // because the latter contains all the noise, minimum bias and pile up. + // Thus we firstly iterate over signal hashes and store them in a map. + std::map<IdentifierHash, bool> overlapMap; + for (const IdentifierHash &hashId : signalHashes) { + overlapMap.emplace(hashId, false); + } + + // Now loop through the background hashes and copy unique ones over + for (const IdentifierHash &hashId : bkgHashes) { + auto search = overlapMap.find(hashId); + if (search == overlapMap.end()) { + // Copy the background collection + std::unique_ptr<Collection> bkgCollection = copyCollection(hashId, bkgContainer->indexFindPtr(hashId)); + + if (outputContainer->addCollection(bkgCollection.get(), hashId).isFailure()) { + ATH_MSG_ERROR("Adding background Collection with hashId " << hashId << " failed"); + return StatusCode::FAILURE; + } else { + bkgCollection.release(); + } + } else { + // Flip the overlap flag + search->second = true; + } + } + + // Finally loop through the map and process the signal and overlay if + // necessary + for (const auto &[hashId, overlap] : overlapMap) { + // Copy the signal collection + std::unique_ptr<Collection> signalCollection = copyCollection(hashId, signalContainer->indexFindPtr(hashId)); + + if (overlap) { // Do overlay + // Create the output collection + auto outputCollection = std::make_unique<Collection>(signalCollection->identify(), hashId); + // Copy the background collection + std::unique_ptr<Collection> bkgCollection = copyCollection(hashId, bkgContainer->indexFindPtr(hashId)); + + // Merge collections + if (isMultiHitCollection) { + Overlay::mergeMultiHitCollections(bkgCollection.get(), signalCollection.get(), outputCollection.get()); + } else { + Overlay::mergeCollections(bkgCollection.get(), signalCollection.get(), outputCollection.get(), this); + } + + if (outputContainer->addCollection(outputCollection.get(), hashId).isFailure()) { + ATH_MSG_ERROR("Adding overlaid Collection with hashId " << hashId << " failed"); + return StatusCode::FAILURE; + } else { + outputCollection.release(); + } + } else { // Only write signal out + if (outputContainer->addCollection(signalCollection.get(), hashId).isFailure()) { + ATH_MSG_ERROR("Adding signal Collection with hashId " << hashId << " failed"); + return StatusCode::FAILURE; + } else { + signalCollection.release(); + } + } + } + + return StatusCode::SUCCESS; +} diff --git a/MuonSpectrometer/MuonOverlay/MuonOverlayBase/MuonOverlayBase/MuonOverlayBase.h b/MuonSpectrometer/MuonOverlay/MuonOverlayBase/MuonOverlayBase/MuonOverlayBase.h deleted file mode 100644 index 697ebb5ec3279a357a6ee867ee61486ca483e230..0000000000000000000000000000000000000000 --- a/MuonSpectrometer/MuonOverlay/MuonOverlayBase/MuonOverlayBase/MuonOverlayBase.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -// Dear emacs, this is -*-c++-*- - -// Generic overlaying code for boolean-like hits. -// Factored out from InDetOverlay. -// -// Andrei Gaponenko <agaponenko@lbl.gov>, 2006-2008 - -// Ketevi A. Assamagan <ketevi@bnl.gov>, March 2008 - -// Piyali Banerjee <Piyali.Banerjee@cern.ch>, March 2011 - -#ifndef MUONOVERLAYBASE_H -#define MUONOVERLAYBASE_H - -#include <string> -#include "IDC_OverlayBase/IDC_OverlayBase.h" - -class ISvcLocator; -class StoreGateSvc; - -class MuonOverlayBase : public IDC_OverlayBase { -public: - - MuonOverlayBase(const std::string &name, ISvcLocator *pSvcLocator) - : IDC_OverlayBase(name, pSvcLocator) {} - -}; - -#endif /* MUONOVERLAYBASE_H */ diff --git a/MuonSpectrometer/MuonOverlay/MuonOverlayBase/MuonOverlayBase/MuonOverlayBase.icc b/MuonSpectrometer/MuonOverlay/MuonOverlayBase/MuonOverlayBase/MuonOverlayBase.icc deleted file mode 100644 index 79036b3d749c16108b6f70930d4770a786526ae3..0000000000000000000000000000000000000000 --- a/MuonSpectrometer/MuonOverlay/MuonOverlayBase/MuonOverlayBase/MuonOverlayBase.icc +++ /dev/null @@ -1,52 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// Generic overlaying code for Muon Digits -// Factored out from InDetOverlay. -// -// Andrei Gaponenko <agaponenko@lbl.gov>, 2006-2008 - -// Ketevi A. Assamagan <ketevi@bnl.gov>, March 2008 - -// Piyali Banerjee <Piyali.Banerjee@cern.ch>, March 2011 - -#include "GaudiKernel/MsgStream.h" -#include "StoreGate/StoreGateSvc.h" -#include <memory> - -//================================================================ - -template<class TypeToBeCopied, class Datum> -TypeToBeCopied* MuonOverlayBase::copyMuonDigitContainer(const TypeToBeCopied* oldObject) -{ - - typedef typename TypeToBeCopied::base_value_type Collection; - const std::string templateClassName = typeid(TypeToBeCopied).name(); - - if (oldObject == 0) { - ATH_MSG_WARNING("copyMuonDigitContainer<"<<templateClassName<<">(): oldObject is a NULL pointer"); - return 0; - } - - TypeToBeCopied *newObject = 0; - - newObject = new TypeToBeCopied (oldObject->size()); - typename TypeToBeCopied::const_iterator iFirst = oldObject->begin(); - typename TypeToBeCopied::const_iterator iLast = oldObject->end(); - for (; iFirst != iLast; ++iFirst ) { - Collection *element = new Collection ((*iFirst)->identify(), (*iFirst)->identifierHash()); - typename TypeToBeCopied::base_value_type::const_iterator firstData = (*iFirst)->begin(); - typename TypeToBeCopied::base_value_type::const_iterator lastData = (*iFirst)->end(); - for (; firstData != lastData; ++firstData) { - Datum * newData = new Datum (*(dynamic_cast<const Datum*>(*firstData))); - element->push_back(newData); - } - if ( newObject->addCollection ( element, (*iFirst)->identifierHash() ).isFailure() ) { - ATH_MSG_WARNING("copyMuonDigitCongtainer<"<<templateClassName<<">(): problem adding collection with "<<"hash="<<(*iFirst)->identifierHash() ); - } - } - - return newObject; - -} diff --git a/MuonSpectrometer/MuonOverlay/RpcOverlay/CMakeLists.txt b/MuonSpectrometer/MuonOverlay/RpcOverlay/CMakeLists.txt index b67846b51e2d7f797fc9ad49095c8291b9cd5bd9..7981783a5ab5e72c6ac2f935d09dff4473240aa0 100644 --- a/MuonSpectrometer/MuonOverlay/RpcOverlay/CMakeLists.txt +++ b/MuonSpectrometer/MuonOverlay/RpcOverlay/CMakeLists.txt @@ -11,10 +11,20 @@ atlas_depends_on_subdirs( PUBLIC MuonSpectrometer/MuonDigitContainer MuonSpectrometer/MuonOverlay/MuonOverlayBase PRIVATE + AtlasTest/TestTools Control/StoreGate MuonSpectrometer/MuonDigitization/MuonDigToolInterfaces MuonSpectrometer/MuonIdHelpers ) +#External dependencies: +find_package( GTest ) + +atlas_add_test( RpcOverlay_test + SOURCES src/*.cxx test/RpcOverlay_test.cxx + INCLUDE_DIRS ${GTEST_INCLUDE_DIRS} + LINK_LIBRARIES GaudiKernel TestTools MuonDigitContainer MuonOverlayBase StoreGateLib SGtests MuonIdHelpersLib ${GTEST_LIBRARIES} + EXTRA_PATTERNS "[0-9]+ ms") + # Component(s) in the package: atlas_add_component( RpcOverlay src/*.cxx diff --git a/MuonSpectrometer/MuonOverlay/RpcOverlay/RpcOverlay/RpcOverlay.h b/MuonSpectrometer/MuonOverlay/RpcOverlay/RpcOverlay/RpcOverlay.h index 482a6b51129c079a8d8a5b88cd24003e8e2a070b..a14a251415f1250a8206198f24c7543086aa7fbe 100644 --- a/MuonSpectrometer/MuonOverlay/RpcOverlay/RpcOverlay/RpcOverlay.h +++ b/MuonSpectrometer/MuonOverlay/RpcOverlay/RpcOverlay/RpcOverlay.h @@ -7,9 +7,7 @@ // Overlaying RpcDigits from two different events for RPC subdetectors. // // Andrei Gaponenko <agaponenko@lbl.gov>, 2006, 2007 - // Ketevi A. Assamagan <ketevi@bnl.gov>, March 2008 - // Piyali Banerjee <Piyali.Banerjee@cern.ch>, March 2011 #ifndef RPCOVERLAY_H @@ -17,32 +15,23 @@ #include <string> -#include "MuonOverlayBase/IDC_MultiHitOverlayBase.h" -#include "MuonDigitContainer/RpcDigitContainer.h" +#include <MuonDigitContainer/RpcDigitContainer.h> +#include <MuonOverlayBase/IDC_MuonOverlayBase.h> -class RpcIdHelper; -class RpcOverlay : public IDC_MultiHitOverlayBase { +class RpcOverlay : public IDC_MuonOverlayBase +{ public: - RpcOverlay(const std::string &name,ISvcLocator *pSvcLocator); + RpcOverlay(const std::string &name, ISvcLocator *pSvcLocator); - /** Framework implemenrtation for the event loop */ - virtual StatusCode overlayInitialize(); - virtual StatusCode overlayExecute(); - virtual StatusCode overlayFinalize(); + virtual StatusCode initialize() override final; + virtual StatusCode execute() override final; private: - // ---------------------------------------------------------------- - - // jO controllable properties. - // "Main" containers are read, have data from "overlay" containers added, - // and written out with the original SG keys. - SG::ReadHandleKey<RpcDigitContainer> m_mainInputDigitKey{this,"MainInputDigitKey","OriginalEvent_SG+RPC_DIGITS","ReadHandleKey for Main Input RpcDigitContainer"}; - SG::ReadHandleKey<RpcDigitContainer> m_overlayInputDigitKey{this,"OverlayInputDigitKey","BkgEvent_0_SG+RPC_DIGITS","ReadHandleKey for Overlay Input RpcDigitContainer"}; - SG::WriteHandleKey<RpcDigitContainer> m_outputDigitKey{this,"OutputDigitKey","StoreGateSvc+RPC_DIGITS","WriteHandleKey for Output RpcDigitContainer"}; - - const RpcIdHelper * m_rpcHelper{nullptr}; + SG::ReadHandleKey<RpcDigitContainer> m_bkgInputKey{ this, "BkgInputKey", "OriginalEvent_SG+RPC_DIGITS", "ReadHandleKey for Background Input RpcDigitContainer" }; + SG::ReadHandleKey<RpcDigitContainer> m_signalInputKey{ this, "SignalInputKey", "BkgEvent_0_SG+RPC_DIGITS", "ReadHandleKey for Signal Input RpcDigitContainer" }; + SG::WriteHandleKey<RpcDigitContainer> m_outputKey{ this, "OutputKey","StoreGateSvc+RPC_DIGITS", "WriteHandleKey for Output RpcDigitContainer" }; }; diff --git a/MuonSpectrometer/MuonOverlay/RpcOverlay/python/RpcOverlayConfig.py b/MuonSpectrometer/MuonOverlay/RpcOverlay/python/RpcOverlayConfig.py index bc7d41075ff4b874d6c74c981af8914284bef8c0..37bd4ef3f7e42261bc0f5919ef7c86fb6c9031d2 100644 --- a/MuonSpectrometer/MuonOverlay/RpcOverlay/python/RpcOverlayConfig.py +++ b/MuonSpectrometer/MuonOverlay/RpcOverlay/python/RpcOverlayConfig.py @@ -1,12 +1,12 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration from AthenaCommon import CfgMgr def getRpcOverlay(name="RpcOverlay", **kwargs): from OverlayCommonAlgs.OverlayFlags import overlayFlags - kwargs.setdefault("MainInputDigitKey",overlayFlags.dataStore()+"+RPC_DIGITS") - kwargs.setdefault("OverlayInputDigitKey",overlayFlags.evtStore()+"+RPC_DIGITS") - kwargs.setdefault("OutputDigitKey",overlayFlags.outputStore()+"+RPC_DIGITS") - kwargs.setdefault("MCStore",overlayFlags.evtStore()) - kwargs.setdefault("DataStore", overlayFlags.dataStore()) + + kwargs.setdefault("BkgInputKey", overlayFlags.dataStore() + "+RPC_DIGITS") + kwargs.setdefault("SignalInputKey", overlayFlags.evtStore() + "+RPC_DIGITS") + kwargs.setdefault("OutputKey", overlayFlags.outputStore() + "+RPC_DIGITS") + return CfgMgr.RpcOverlay(name, **kwargs) diff --git a/MuonSpectrometer/MuonOverlay/RpcOverlay/src/RpcOverlay.cxx b/MuonSpectrometer/MuonOverlay/RpcOverlay/src/RpcOverlay.cxx index bfeeb0d07e13c13a72f8bd7284c73f4b782d506e..a1ff92f5eeb7a5cf98bd1cb99d0d5cfb3a575e57 100644 --- a/MuonSpectrometer/MuonOverlay/RpcOverlay/src/RpcOverlay.cxx +++ b/MuonSpectrometer/MuonOverlay/RpcOverlay/src/RpcOverlay.cxx @@ -3,98 +3,76 @@ */ // Andrei Gaponenko <agaponenko@lbl.gov>, 2006, 2007 - // Ketevi A. Assamagan <ketevi@bnl.gov>, March 2008 - // Piyali Banerjee <Piyali.Banerjee@cern.ch>, March 2011 -#include "RpcOverlay/RpcOverlay.h" +#include <RpcOverlay/RpcOverlay.h> -#include "StoreGate/StoreGateSvc.h" -#include "StoreGate/DataHandle.h" -#include "StoreGate/ReadHandle.h" -#include "StoreGate/WriteHandle.h" +#include <StoreGate/ReadHandle.h> +#include <StoreGate/WriteHandle.h> -#include "MuonIdHelpers/RpcIdHelper.h" -#include "MuonDigitContainer/RpcDigitContainer.h" - -#include <iostream> -#include <typeinfo> +#include <IDC_OverlayBase/IDC_OverlayHelpers.h> //================================================================ RpcOverlay::RpcOverlay(const std::string &name, ISvcLocator *pSvcLocator) : - IDC_MultiHitOverlayBase(name, pSvcLocator) + IDC_MuonOverlayBase(name, pSvcLocator) { } //================================================================ -StatusCode RpcOverlay::overlayInitialize() +StatusCode RpcOverlay::initialize() { - ATH_MSG_INFO("RpcOverlay initialized"); - - /** access to the CSC Identifier helper */ - ATH_CHECK(detStore()->retrieve(m_rpcHelper, "RPCIDHELPER")); - ATH_MSG_DEBUG(" Found the RpcIdHelper. "); + ATH_MSG_DEBUG("Initializing..."); - ATH_CHECK(m_mainInputDigitKey.initialize()); - ATH_MSG_VERBOSE("Initialized ReadHandleKey: " << m_mainInputDigitKey ); - ATH_CHECK(m_overlayInputDigitKey.initialize()); - ATH_MSG_VERBOSE("Initialized ReadHandleKey: " << m_overlayInputDigitKey ); - ATH_CHECK(m_outputDigitKey.initialize()); - ATH_MSG_VERBOSE("Initialized WriteHandleKey: " << m_outputDigitKey ); + ATH_CHECK(m_bkgInputKey.initialize()); + ATH_MSG_VERBOSE("Initialized ReadHandleKey: " << m_bkgInputKey ); + ATH_CHECK(m_signalInputKey.initialize()); + ATH_MSG_VERBOSE("Initialized ReadHandleKey: " << m_signalInputKey ); + ATH_CHECK(m_outputKey.initialize()); + ATH_MSG_VERBOSE("Initialized WriteHandleKey: " << m_outputKey ); return StatusCode::SUCCESS; } //================================================================ -StatusCode RpcOverlay::overlayFinalize() +StatusCode RpcOverlay::execute() { - ATH_MSG_INFO("RpcOverlay finalized"); - return StatusCode::SUCCESS; -} - -//================================================================ -StatusCode RpcOverlay::overlayExecute() { ATH_MSG_DEBUG("RpcOverlay::execute() begin"); - //---------------------------------------------------------------- - SG::ReadHandle<RpcDigitContainer> dataContainer (m_mainInputDigitKey); - if (!dataContainer.isValid()) { - ATH_MSG_ERROR("Could not get data RPC container " << dataContainer.name() << " from store " << dataContainer.store()); + SG::ReadHandle<RpcDigitContainer> bkgContainer (m_bkgInputKey); + if (!bkgContainer.isValid()) { + ATH_MSG_ERROR("Could not get background RPC container " << bkgContainer.name() << " from store " << bkgContainer.store()); return StatusCode::FAILURE; } - ATH_MSG_DEBUG("Found data RpcDigitContainer called " << dataContainer.name() << " in store " << dataContainer.store()); - ATH_MSG_INFO("RPC Data = "<<shortPrint(dataContainer.cptr())); + ATH_MSG_DEBUG("Found background RpcDigitContainer called " << bkgContainer.name() << " in store " << bkgContainer.store()); + ATH_MSG_DEBUG("RPC Background = " << Overlay::debugPrint(bkgContainer.cptr())); + ATH_MSG_VERBOSE("RPC background has digit_size " << bkgContainer->digit_size()); - ATH_MSG_VERBOSE("Retrieving MC input RPC container"); - SG::ReadHandle<RpcDigitContainer> mcContainer(m_overlayInputDigitKey); - if(!mcContainer.isValid() ) { - ATH_MSG_ERROR("Could not get overlay RPC container " << mcContainer.name() << " from store " << mcContainer.store()); + SG::ReadHandle<RpcDigitContainer> signalContainer(m_signalInputKey); + if (!signalContainer.isValid() ) { + ATH_MSG_ERROR("Could not get signal RPC container " << signalContainer.name() << " from store " << signalContainer.store()); + return StatusCode::FAILURE; + } + ATH_MSG_DEBUG("Found signal RpcDigitContainer called " << signalContainer.name() << " in store " << signalContainer.store()); + ATH_MSG_DEBUG("RPC Signal = " << Overlay::debugPrint(signalContainer.cptr())); + ATH_MSG_VERBOSE("RPC signal has digit_size " << signalContainer->digit_size()); + + SG::WriteHandle<RpcDigitContainer> outputContainer(m_outputKey); + ATH_CHECK(outputContainer.record(std::make_unique<RpcDigitContainer>(bkgContainer->size()))); + if (!outputContainer.isValid()) { + ATH_MSG_ERROR("Could not record output RpcDigitContainer called " << outputContainer.name() << " to store " << outputContainer.store()); return StatusCode::FAILURE; } - ATH_MSG_DEBUG("Found overlay RpcDigitContainer called " << mcContainer.name() << " in store " << mcContainer.store()); - ATH_MSG_INFO("RPC MC = "<<shortPrint(mcContainer.cptr())); - - ATH_MSG_VERBOSE("RPC data has digit_size "<<dataContainer->digit_size()); - - ATH_MSG_VERBOSE("RPC signal data has digit_size "<<mcContainer->digit_size()); - - SG::WriteHandle<RpcDigitContainer> outputContainer(m_outputDigitKey); - ATH_CHECK(outputContainer.record(std::make_unique<RpcDigitContainer>(dataContainer->size()))); ATH_MSG_DEBUG("Recorded output RpcDigitContainer called " << outputContainer.name() << " in store " << outputContainer.store()); - //Do the actual overlay - if(dataContainer.isValid() && mcContainer.isValid() && outputContainer.isValid()) { - this->overlayContainer(dataContainer.cptr(), mcContainer.cptr(), outputContainer.ptr()); - } - ATH_MSG_INFO("RPC Result = "<<shortPrint(outputContainer.cptr())); + // Do the actual overlay + ATH_CHECK(overlayMultiHitContainer(bkgContainer.cptr(), signalContainer.cptr(), outputContainer.ptr())); + ATH_MSG_DEBUG("RPC Result = " << Overlay::debugPrint(outputContainer.cptr())); + - //---------------------------------------------------------------- ATH_MSG_DEBUG("RpcOverlay::execute() end"); return StatusCode::SUCCESS; } - -// EOF diff --git a/MuonSpectrometer/MuonOverlay/RpcOverlay/test/RpcOverlay_test.cxx b/MuonSpectrometer/MuonOverlay/RpcOverlay/test/RpcOverlay_test.cxx new file mode 100644 index 0000000000000000000000000000000000000000..3e8a50e7133deb7815d827d6ff8bb8944156c757 --- /dev/null +++ b/MuonSpectrometer/MuonOverlay/RpcOverlay/test/RpcOverlay_test.cxx @@ -0,0 +1,428 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +/** + * @author John Chapman + * @brief Tests for RpcOverlay. + */ + +#undef NDEBUG + +// Framework +#include "TestTools/initGaudi.h" + +// Google Test +#include "gtest/gtest.h" + +// Tested AthAlgorithm +#include "../RpcOverlay/RpcOverlay.h" + +namespace OverlayTesting { + + // needed every time an AthAlgorithm, AthAlgTool or AthService is instantiated + ISvcLocator* g_svcLoc = nullptr; + + // global test environment takes care of setting up Gaudi + class GaudiEnvironment : public ::testing::Environment { + protected: + virtual void SetUp() override { + Athena_test::initGaudi(OverlayTesting::g_svcLoc); + } + }; + + class RpcOverlay_test : public ::testing::Test { + + protected: + virtual void SetUp() override { + m_alg = new RpcOverlay{"RpcOverlay", g_svcLoc}; + ASSERT_TRUE( m_alg->setProperties().isSuccess() ); + } + + virtual void TearDown() override { + ASSERT_TRUE( m_alg->finalize().isSuccess() ); + delete m_alg; + } + + RpcOverlay* m_alg; + }; // RpcOverlay_test fixture + + + TEST_F(RpcOverlay_test, set_properties) { + // ordering A, C, B is on purpose to test for unintended alphabetic ordering + std::string inputSigPropertyValue = "'StoreGateSvc+RPC_DIGITS_SIG'"; + std::string inputBkgPropertyValue = "'StoreGateSvc+RPC_DIGITS_BKG'"; + std::string outputPropertyValue = "'StoreGateSvc+RPC_DIGITS'"; + ASSERT_TRUE( m_alg->setProperty( "SignalInputKey", inputSigPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "BkgInputKey", inputBkgPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->initialize().isSuccess() ); + ASSERT_TRUE( m_alg->execute().isFailure() ); //inputs don't exist + } + + TEST_F(RpcOverlay_test, empty_containers_alg_execute) { + SG::WriteHandle<RpcDigitContainer> inputSigDataHandle{"StoreGateSvc+RPC_DIGITS_SIG"}; + const unsigned int containerSize(1188); + inputSigDataHandle = std::make_unique<RpcDigitContainer>(containerSize); + SG::WriteHandle<RpcDigitContainer> inputBkgDataHandle{"StoreGateSvc+RPC_DIGITS_BKG"}; + inputBkgDataHandle = std::make_unique<RpcDigitContainer>(containerSize); + + // ordering A, C, B is on purpose to test for unintended alphabetic ordering + std::string inputSigPropertyValue = "'StoreGateSvc+RPC_DIGITS_SIG'"; + std::string inputBkgPropertyValue = "'StoreGateSvc+RPC_DIGITS_BKG'"; + std::string outputPropertyValue = "'StoreGateSvc+RPC_DIGITS'"; + ASSERT_TRUE( m_alg->setProperty( "SignalInputKey", inputSigPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "BkgInputKey", inputBkgPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->initialize().isSuccess() ); + ASSERT_TRUE( m_alg->execute().isSuccess() ); + } + + TEST_F(RpcOverlay_test, containers_with_matching_empty_collections) { + SG::WriteHandle<RpcDigitContainer> inputSigDataHandle{"StoreGateSvc+RPC_DIGITS_SIG1"}; + const unsigned int containerSize(1188); + IdentifierHash sigElementHash(1); + IdentifierHash bkgElementHash(1); + inputSigDataHandle = std::make_unique<RpcDigitContainer>(containerSize); + std::unique_ptr<RpcDigitCollection> sigCollection = std::make_unique<RpcDigitCollection>(Identifier(1234),sigElementHash); + ASSERT_TRUE(inputSigDataHandle->addCollection(sigCollection.get(),sigElementHash).isSuccess()); + sigCollection.release(); // Now owned by inputSigDataHandle + SG::WriteHandle<RpcDigitContainer> inputBkgDataHandle{"StoreGateSvc+RPC_DIGITS_BKG1"}; + inputBkgDataHandle = std::make_unique<RpcDigitContainer>(containerSize); + std::unique_ptr<RpcDigitCollection> bkgCollection = std::make_unique<RpcDigitCollection>(Identifier(1234),bkgElementHash); + ASSERT_TRUE(inputBkgDataHandle->addCollection(bkgCollection.get(),bkgElementHash).isSuccess()); + bkgCollection.release(); // Now owned by inputBkgDataHandle + + // ordering A, C, B is on purpose to test for unintended alphabetic ordering + std::string inputSigPropertyValue = "'StoreGateSvc+RPC_DIGITS_SIG1'"; + std::string inputBkgPropertyValue = "'StoreGateSvc+RPC_DIGITS_BKG1'"; + std::string outputPropertyValue = "'StoreGateSvc+RPC_DIGITS1'"; + ASSERT_TRUE( m_alg->setProperty( "SignalInputKey", inputSigPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "BkgInputKey", inputBkgPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->initialize().isSuccess() ); + ASSERT_TRUE( m_alg->execute().isSuccess() ); + // check output makes sense + SG::ReadHandle<RpcDigitContainer> outputDataHandle{"StoreGateSvc+RPC_DIGITS1"}; + ASSERT_TRUE( outputDataHandle.isValid() ); + const RpcDigitCollection *outputCollection = outputDataHandle->indexFindPtr(sigElementHash); + ASSERT_TRUE( outputCollection!=nullptr ); + ASSERT_TRUE( outputCollection->empty() ); + } + + TEST_F(RpcOverlay_test, containers_with_different_empty_collections) { + SG::WriteHandle<RpcDigitContainer> inputSigDataHandle{"StoreGateSvc+RPC_DIGITS_SIG2"}; + const unsigned int containerSize(1188); + IdentifierHash sigElementHash(1); + IdentifierHash bkgElementHash(2); + inputSigDataHandle = std::make_unique<RpcDigitContainer>(containerSize); + std::unique_ptr<RpcDigitCollection> sigCollection = std::make_unique<RpcDigitCollection>(Identifier(1234),sigElementHash); + ASSERT_TRUE(inputSigDataHandle->addCollection(sigCollection.get(),sigElementHash).isSuccess()); + sigCollection.release(); // Now owned by inputSigDataHandle + SG::WriteHandle<RpcDigitContainer> inputBkgDataHandle{"StoreGateSvc+RPC_DIGITS_BKG2"}; + inputBkgDataHandle = std::make_unique<RpcDigitContainer>(containerSize); + std::unique_ptr<RpcDigitCollection> bkgCollection = std::make_unique<RpcDigitCollection>(Identifier(1234),bkgElementHash); + ASSERT_TRUE(inputBkgDataHandle->addCollection(bkgCollection.get(),bkgElementHash).isSuccess()); + bkgCollection.release(); // Now owned by inputBkgDataHandle + + // ordering A, C, B is on purpose to test for unintended alphabetic ordering + std::string inputSigPropertyValue = "'StoreGateSvc+RPC_DIGITS_SIG2'"; + std::string inputBkgPropertyValue = "'StoreGateSvc+RPC_DIGITS_BKG2'"; + std::string outputPropertyValue = "'StoreGateSvc+RPC_DIGITS2'"; + ASSERT_TRUE( m_alg->setProperty( "SignalInputKey", inputSigPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "BkgInputKey", inputBkgPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->initialize().isSuccess() ); + ASSERT_TRUE( m_alg->execute().isSuccess() ); + // check output makes sense + SG::ReadHandle<RpcDigitContainer> outputDataHandle{"StoreGateSvc+RPC_DIGITS2"}; + ASSERT_TRUE( outputDataHandle.isValid() ); + const RpcDigitCollection *outputCollection1 = outputDataHandle->indexFindPtr(sigElementHash); + ASSERT_TRUE( outputCollection1!=nullptr ); + ASSERT_TRUE( outputCollection1->empty() ); + const RpcDigitCollection *outputCollection2 = outputDataHandle->indexFindPtr(bkgElementHash); + ASSERT_TRUE( outputCollection2!=nullptr ); + ASSERT_TRUE( outputCollection2->empty() ); + } + + TEST_F(RpcOverlay_test, containers_with_matching_collections_one_with_a_digit) { + SG::WriteHandle<RpcDigitContainer> inputSigDataHandle{"StoreGateSvc+RPC_DIGITS_SIG3"}; + const unsigned int containerSize(1188); + const IdentifierHash sigElementHash(1); + const IdentifierHash bkgElementHash(1); + const int sigTime(12); + inputSigDataHandle = std::make_unique<RpcDigitContainer>(containerSize); + std::unique_ptr<RpcDigitCollection> sigCollection = std::make_unique<RpcDigitCollection>(Identifier(1234),sigElementHash); + //Add an RpcDigit + std::unique_ptr<RpcDigit> sigDigit = std::make_unique<RpcDigit>(Identifier(12),sigTime); + sigCollection->push_back(sigDigit.release()); + ASSERT_TRUE(inputSigDataHandle->addCollection(sigCollection.get(),sigElementHash).isSuccess()); + sigCollection.release(); // Now owned by inputSigDataHandle + SG::WriteHandle<RpcDigitContainer> inputBkgDataHandle{"StoreGateSvc+RPC_DIGITS_BKG3"}; + inputBkgDataHandle = std::make_unique<RpcDigitContainer>(containerSize); + std::unique_ptr<RpcDigitCollection> bkgCollection = std::make_unique<RpcDigitCollection>(Identifier(1234),bkgElementHash); + ASSERT_TRUE(inputBkgDataHandle->addCollection(bkgCollection.get(),bkgElementHash).isSuccess()); + bkgCollection.release(); // Now owned by inputBkgDataHandle + + // ordering A, C, B is on purpose to test for unintended alphabetic ordering + std::string inputSigPropertyValue = "'StoreGateSvc+RPC_DIGITS_SIG3'"; + std::string inputBkgPropertyValue = "'StoreGateSvc+RPC_DIGITS_BKG3'"; + std::string outputPropertyValue = "'StoreGateSvc+RPC_DIGITS3'"; + ASSERT_TRUE( m_alg->setProperty( "SignalInputKey", inputSigPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "BkgInputKey", inputBkgPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->initialize().isSuccess() ); + ASSERT_TRUE( m_alg->execute().isSuccess() ); + // check output makes sense + SG::ReadHandle<RpcDigitContainer> outputDataHandle{"StoreGateSvc+RPC_DIGITS3"}; + ASSERT_TRUE( outputDataHandle.isValid() ); + const RpcDigitCollection *outputCollection1 = outputDataHandle->indexFindPtr(sigElementHash); + ASSERT_TRUE( outputCollection1!=nullptr ); + ASSERT_TRUE( outputCollection1->size()==1 ); + const RpcDigit* outputDigit1 = outputCollection1->at(0); + ASSERT_TRUE( outputDigit1!=nullptr ); + ASSERT_TRUE( outputDigit1->time()==sigTime ); + } + + TEST_F(RpcOverlay_test, containers_with_different_collections_one_digit_each) { + SG::WriteHandle<RpcDigitContainer> inputSigDataHandle{"StoreGateSvc+RPC_DIGITS_SIG4"}; + const unsigned int containerSize(1188); + const IdentifierHash sigElementHash(1); + const IdentifierHash bkgElementHash(2); + const int sigTime(12); + const int bkgTime(13); + inputSigDataHandle = std::make_unique<RpcDigitContainer>(containerSize); + std::unique_ptr<RpcDigitCollection> sigCollection = std::make_unique<RpcDigitCollection>(Identifier(1234),sigElementHash); + //Add an RpcDigit + std::unique_ptr<RpcDigit> sigDigit = std::make_unique<RpcDigit>(Identifier(12),sigTime); + sigCollection->push_back(sigDigit.release()); + ASSERT_TRUE(inputSigDataHandle->addCollection(sigCollection.get(),sigElementHash).isSuccess()); + sigCollection.release(); // Now owned by inputSigDataHandle + SG::WriteHandle<RpcDigitContainer> inputBkgDataHandle{"StoreGateSvc+RPC_DIGITS_BKG4"}; + inputBkgDataHandle = std::make_unique<RpcDigitContainer>(containerSize); + std::unique_ptr<RpcDigitCollection> bkgCollection = std::make_unique<RpcDigitCollection>(Identifier(1234),bkgElementHash); + //Add an RpcDigit + std::unique_ptr<RpcDigit> bkgDigit = std::make_unique<RpcDigit>(Identifier(12),bkgTime); + bkgCollection->push_back(bkgDigit.release()); + ASSERT_TRUE(inputBkgDataHandle->addCollection(bkgCollection.get(),bkgElementHash).isSuccess()); + bkgCollection.release(); // Now owned by inputBkgDataHandle + + // ordering A, C, B is on purpose to test for unintended alphabetic ordering + std::string inputSigPropertyValue = "'StoreGateSvc+RPC_DIGITS_SIG4'"; + std::string inputBkgPropertyValue = "'StoreGateSvc+RPC_DIGITS_BKG4'"; + std::string outputPropertyValue = "'StoreGateSvc+RPC_DIGITS4'"; + ASSERT_TRUE( m_alg->setProperty( "SignalInputKey", inputSigPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "BkgInputKey", inputBkgPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->initialize().isSuccess() ); + ASSERT_TRUE( m_alg->execute().isSuccess() ); + // check output makes sense + SG::ReadHandle<RpcDigitContainer> outputDataHandle{"StoreGateSvc+RPC_DIGITS4"}; + ASSERT_TRUE( outputDataHandle.isValid() ); + const RpcDigitCollection *outputCollection1 = outputDataHandle->indexFindPtr(sigElementHash); + ASSERT_TRUE( outputCollection1!=nullptr ); + ASSERT_TRUE( outputCollection1->size()==1 ); + const RpcDigit* outputDigit1 = outputCollection1->at(0); + ASSERT_TRUE( outputDigit1!=nullptr ); + ASSERT_TRUE( outputDigit1->time()==sigTime ); + const RpcDigitCollection *outputCollection2 = outputDataHandle->indexFindPtr(bkgElementHash); + ASSERT_TRUE( outputCollection2!=nullptr ); + ASSERT_TRUE( outputCollection2->size()==1 ); + const RpcDigit* outputDigit2 = outputCollection2->at(0); + ASSERT_TRUE( outputDigit2!=nullptr ); + ASSERT_TRUE( outputDigit2->time()==bkgTime ); + } + + TEST_F(RpcOverlay_test, containers_with_matching_collections_one_different_digit_each) { + SG::WriteHandle<RpcDigitContainer> inputSigDataHandle{"StoreGateSvc+RPC_DIGITS_SIG5"}; + const unsigned int containerSize(1188); + const IdentifierHash sigElementHash(1); + const IdentifierHash bkgElementHash(1); + const int sigTime(12); + const int bkgTime(12); + inputSigDataHandle = std::make_unique<RpcDigitContainer>(containerSize); + std::unique_ptr<RpcDigitCollection> sigCollection = std::make_unique<RpcDigitCollection>(Identifier(1234),sigElementHash); + //Add an RpcDigit + std::unique_ptr<RpcDigit> sigDigit = std::make_unique<RpcDigit>(Identifier(12),sigTime); + sigCollection->push_back(sigDigit.release()); + ASSERT_TRUE(inputSigDataHandle->addCollection(sigCollection.get(),sigElementHash).isSuccess()); + sigCollection.release(); // Now owned by inputSigDataHandle + SG::WriteHandle<RpcDigitContainer> inputBkgDataHandle{"StoreGateSvc+RPC_DIGITS_BKG5"}; + inputBkgDataHandle = std::make_unique<RpcDigitContainer>(containerSize); + std::unique_ptr<RpcDigitCollection> bkgCollection = std::make_unique<RpcDigitCollection>(Identifier(1234),bkgElementHash); + //Add an RpcDigit + std::unique_ptr<RpcDigit> bkgDigit = std::make_unique<RpcDigit>(Identifier(13),bkgTime); + bkgCollection->push_back(bkgDigit.release()); + ASSERT_TRUE(inputBkgDataHandle->addCollection(bkgCollection.get(),bkgElementHash).isSuccess()); + bkgCollection.release(); // Now owned by inputBkgDataHandle + + // ordering A, C, B is on purpose to test for unintended alphabetic ordering + std::string inputSigPropertyValue = "'StoreGateSvc+RPC_DIGITS_SIG5'"; + std::string inputBkgPropertyValue = "'StoreGateSvc+RPC_DIGITS_BKG5'"; + std::string outputPropertyValue = "'StoreGateSvc+RPC_DIGITS5'"; + ASSERT_TRUE( m_alg->setProperty( "SignalInputKey", inputSigPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "BkgInputKey", inputBkgPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->initialize().isSuccess() ); + ASSERT_TRUE( m_alg->execute().isSuccess() ); + // check output makes sense + SG::ReadHandle<RpcDigitContainer> outputDataHandle{"StoreGateSvc+RPC_DIGITS5"}; + ASSERT_TRUE( outputDataHandle.isValid() ); + const RpcDigitCollection *outputCollection = outputDataHandle->indexFindPtr(sigElementHash); + ASSERT_TRUE( outputCollection!=nullptr ); + ASSERT_TRUE( outputCollection->size()==2 ); + const RpcDigit* outputDigit1 = outputCollection->at(0); + ASSERT_TRUE( outputDigit1!=nullptr ); + ASSERT_TRUE( outputDigit1->time()==sigTime ); + const RpcDigit* outputDigit2 = outputCollection->at(1); + ASSERT_TRUE( outputDigit2!=nullptr ); + ASSERT_TRUE( outputDigit2->time()==sigTime ); + } + + TEST_F(RpcOverlay_test, containers_with_matching_collections_one_matching_digit_each) { + SG::WriteHandle<RpcDigitContainer> inputSigDataHandle{"StoreGateSvc+RPC_DIGITS_SIG6"}; + const unsigned int containerSize(1188); + const IdentifierHash sigElementHash(1); + const IdentifierHash bkgElementHash(1); + const int sigTime(12); + const int bkgTime(12); + inputSigDataHandle = std::make_unique<RpcDigitContainer>(containerSize); + std::unique_ptr<RpcDigitCollection> sigCollection = std::make_unique<RpcDigitCollection>(Identifier(1234),sigElementHash); + //Add an RpcDigit + std::unique_ptr<RpcDigit> sigDigit = std::make_unique<RpcDigit>(Identifier(12),sigTime); + sigCollection->push_back(sigDigit.release()); + ASSERT_TRUE(inputSigDataHandle->addCollection(sigCollection.get(),sigElementHash).isSuccess()); + sigCollection.release(); // Now owned by inputSigDataHandle + SG::WriteHandle<RpcDigitContainer> inputBkgDataHandle{"StoreGateSvc+RPC_DIGITS_BKG6"}; + inputBkgDataHandle = std::make_unique<RpcDigitContainer>(containerSize); + std::unique_ptr<RpcDigitCollection> bkgCollection = std::make_unique<RpcDigitCollection>(Identifier(1234),bkgElementHash); + //Add an RpcDigit + std::unique_ptr<RpcDigit> bkgDigit = std::make_unique<RpcDigit>(Identifier(12),bkgTime); + bkgCollection->push_back(bkgDigit.release()); + ASSERT_TRUE(inputBkgDataHandle->addCollection(bkgCollection.get(),bkgElementHash).isSuccess()); + bkgCollection.release(); // Now owned by inputBkgDataHandle + + // ordering A, C, B is on purpose to test for unintended alphabetic ordering + std::string inputSigPropertyValue = "'StoreGateSvc+RPC_DIGITS_SIG6'"; + std::string inputBkgPropertyValue = "'StoreGateSvc+RPC_DIGITS_BKG6'"; + std::string outputPropertyValue = "'StoreGateSvc+RPC_DIGITS6'"; + ASSERT_TRUE( m_alg->setProperty( "SignalInputKey", inputSigPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "BkgInputKey", inputBkgPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->initialize().isSuccess() ); + ASSERT_TRUE( m_alg->execute().isSuccess() ); + // check output makes sense + SG::ReadHandle<RpcDigitContainer> outputDataHandle{"StoreGateSvc+RPC_DIGITS6"}; + ASSERT_TRUE( outputDataHandle.isValid() ); + const RpcDigitCollection *outputCollection = outputDataHandle->indexFindPtr(sigElementHash); + ASSERT_TRUE( outputCollection!=nullptr ); + ASSERT_TRUE( outputCollection->size()==2 ); //FIXME Is this the correct behaviour? + const RpcDigit* outputDigit1 = outputCollection->at(0); + ASSERT_TRUE( outputDigit1!=nullptr ); + ASSERT_TRUE( outputDigit1->time()==sigTime ); // Time values were the same for both digits + const RpcDigit* outputDigit2 = outputCollection->at(1); + ASSERT_TRUE( outputDigit2!=nullptr ); + ASSERT_TRUE( outputDigit2->time()==bkgTime ); // Time values were the same for both digits + } + + TEST_F(RpcOverlay_test, two_digits_with_matching_id_signal_first) { + SG::WriteHandle<RpcDigitContainer> inputSigDataHandle{"StoreGateSvc+RPC_DIGITS_SIG7"}; + const unsigned int containerSize(1188); + const IdentifierHash sigElementHash(1); + const IdentifierHash bkgElementHash(1); + const int sigTime(11); + const int bkgTime(12); + inputSigDataHandle = std::make_unique<RpcDigitContainer>(containerSize); + std::unique_ptr<RpcDigitCollection> sigCollection = std::make_unique<RpcDigitCollection>(Identifier(1234),sigElementHash); + //Add an RpcDigit + std::unique_ptr<RpcDigit> sigDigit = std::make_unique<RpcDigit>(Identifier(12),sigTime); + sigCollection->push_back(sigDigit.release()); + ASSERT_TRUE(inputSigDataHandle->addCollection(sigCollection.get(),sigElementHash).isSuccess()); + sigCollection.release(); // Now owned by inputSigDataHandle + SG::WriteHandle<RpcDigitContainer> inputBkgDataHandle{"StoreGateSvc+RPC_DIGITS_BKG7"}; + inputBkgDataHandle = std::make_unique<RpcDigitContainer>(containerSize); + std::unique_ptr<RpcDigitCollection> bkgCollection = std::make_unique<RpcDigitCollection>(Identifier(1234),bkgElementHash); + //Add an RpcDigit + std::unique_ptr<RpcDigit> bkgDigit = std::make_unique<RpcDigit>(Identifier(12),bkgTime); + bkgCollection->push_back(bkgDigit.release()); + ASSERT_TRUE(inputBkgDataHandle->addCollection(bkgCollection.get(),bkgElementHash).isSuccess()); + bkgCollection.release(); // Now owned by inputBkgDataHandle + + // ordering A, C, B is on purpose to test for unintended alphabetic ordering + std::string inputSigPropertyValue = "'StoreGateSvc+RPC_DIGITS_SIG7'"; + std::string inputBkgPropertyValue = "'StoreGateSvc+RPC_DIGITS_BKG7'"; + std::string outputPropertyValue = "'StoreGateSvc+RPC_DIGITS7'"; + ASSERT_TRUE( m_alg->setProperty( "SignalInputKey", inputSigPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "BkgInputKey", inputBkgPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->initialize().isSuccess() ); + ASSERT_TRUE( m_alg->execute().isSuccess() ); + // check output makes sense + SG::ReadHandle<RpcDigitContainer> outputDataHandle{"StoreGateSvc+RPC_DIGITS7"}; + ASSERT_TRUE( outputDataHandle.isValid() ); + const RpcDigitCollection *outputCollection = outputDataHandle->indexFindPtr(sigElementHash); + ASSERT_TRUE( outputCollection!=nullptr ); + ASSERT_TRUE( outputCollection->size()==2 ); //FIXME Is this the correct behaviour? + const RpcDigit* outputDigit1 = outputCollection->at(0); + ASSERT_TRUE( outputDigit1!=nullptr ); + ASSERT_TRUE( outputDigit1->time()==bkgTime ); + const RpcDigit* outputDigit2 = outputCollection->at(1); + ASSERT_TRUE( outputDigit2!=nullptr ); + ASSERT_TRUE( outputDigit2->time()==sigTime ); //FIXME?? Digits are not time ordered? + } + + TEST_F(RpcOverlay_test, two_digits_with_matching_id_bkg_first) { + SG::WriteHandle<RpcDigitContainer> inputSigDataHandle{"StoreGateSvc+RPC_DIGITS_SIG8"}; + const unsigned int containerSize(1188); + const IdentifierHash sigElementHash(1); + const IdentifierHash bkgElementHash(1); + const int sigTime(12); + const int bkgTime(11); + inputSigDataHandle = std::make_unique<RpcDigitContainer>(containerSize); + std::unique_ptr<RpcDigitCollection> sigCollection = std::make_unique<RpcDigitCollection>(Identifier(1234),sigElementHash); + //Add an RpcDigit + std::unique_ptr<RpcDigit> sigDigit = std::make_unique<RpcDigit>(Identifier(12),sigTime); + sigCollection->push_back(sigDigit.release()); + ASSERT_TRUE(inputSigDataHandle->addCollection(sigCollection.get(),sigElementHash).isSuccess()); + sigCollection.release(); // Now owned by inputSigDataHandle + SG::WriteHandle<RpcDigitContainer> inputBkgDataHandle{"StoreGateSvc+RPC_DIGITS_BKG8"}; + inputBkgDataHandle = std::make_unique<RpcDigitContainer>(containerSize); + std::unique_ptr<RpcDigitCollection> bkgCollection = std::make_unique<RpcDigitCollection>(Identifier(1234),bkgElementHash); + //Add an RpcDigit + std::unique_ptr<RpcDigit> bkgDigit = std::make_unique<RpcDigit>(Identifier(12),bkgTime); + bkgCollection->push_back(bkgDigit.release()); + ASSERT_TRUE(inputBkgDataHandle->addCollection(bkgCollection.get(),bkgElementHash).isSuccess()); + bkgCollection.release(); // Now owned by inputBkgDataHandle + + // ordering A, C, B is on purpose to test for unintended alphabetic ordering + std::string inputSigPropertyValue = "'StoreGateSvc+RPC_DIGITS_SIG8'"; + std::string inputBkgPropertyValue = "'StoreGateSvc+RPC_DIGITS_BKG8'"; + std::string outputPropertyValue = "'StoreGateSvc+RPC_DIGITS8'"; + ASSERT_TRUE( m_alg->setProperty( "SignalInputKey", inputSigPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "BkgInputKey", inputBkgPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->initialize().isSuccess() ); + ASSERT_TRUE( m_alg->execute().isSuccess() ); + // check output makes sense + SG::ReadHandle<RpcDigitContainer> outputDataHandle{"StoreGateSvc+RPC_DIGITS8"}; + ASSERT_TRUE( outputDataHandle.isValid() ); + const RpcDigitCollection *outputCollection = outputDataHandle->indexFindPtr(sigElementHash); + ASSERT_TRUE( outputCollection!=nullptr ); + ASSERT_TRUE( outputCollection->size()==2 ); //FIXME Is this the correct behaviour? + const RpcDigit* outputDigit1 = outputCollection->at(0); + ASSERT_TRUE( outputDigit1!=nullptr ); + ASSERT_TRUE( outputDigit1->time()==bkgTime ); + const RpcDigit* outputDigit2 = outputCollection->at(1); + ASSERT_TRUE( outputDigit2!=nullptr ); + ASSERT_TRUE( outputDigit2->time()==sigTime ); + } + +} // <-- namespace OverlayTesting + + +int main(int argc, char *argv[]) +{ + ::testing::InitGoogleTest( &argc, argv ); + ::testing::AddGlobalTestEnvironment( new OverlayTesting::GaudiEnvironment ); + return RUN_ALL_TESTS(); +} diff --git a/MuonSpectrometer/MuonOverlay/TgcOverlay/CMakeLists.txt b/MuonSpectrometer/MuonOverlay/TgcOverlay/CMakeLists.txt index c69910fe4bf3edebf0a15100197058ddb1982000..37a45e0064fb5a9f800b151c9f0863f3ddb74c24 100644 --- a/MuonSpectrometer/MuonOverlay/TgcOverlay/CMakeLists.txt +++ b/MuonSpectrometer/MuonOverlay/TgcOverlay/CMakeLists.txt @@ -11,11 +11,21 @@ atlas_depends_on_subdirs( PUBLIC MuonSpectrometer/MuonDigitContainer MuonSpectrometer/MuonOverlay/MuonOverlayBase PRIVATE + AtlasTest/TestTools Control/AthenaKernel Control/StoreGate MuonSpectrometer/MuonDigitization/MuonDigToolInterfaces MuonSpectrometer/MuonIdHelpers ) +#External dependencies: +find_package( GTest ) + +atlas_add_test( TgcOverlay_test + SOURCES src/*.cxx test/TgcOverlay_test.cxx + INCLUDE_DIRS ${GTEST_INCLUDE_DIRS} + LINK_LIBRARIES GaudiKernel TestTools MuonDigitContainer MuonOverlayBase AthenaKernel StoreGateLib SGtests MuonIdHelpersLib ${GTEST_LIBRARIES} + EXTRA_PATTERNS "[0-9]+ ms") + # Component(s) in the package: atlas_add_component( TgcOverlay src/*.cxx diff --git a/MuonSpectrometer/MuonOverlay/TgcOverlay/TgcOverlay/TgcOverlay.h b/MuonSpectrometer/MuonOverlay/TgcOverlay/TgcOverlay/TgcOverlay.h index 636940126dae5aaf6c3f84c3960777f010fb0fbd..40c313805af912e5c709947afaa916ce234b18ac 100644 --- a/MuonSpectrometer/MuonOverlay/TgcOverlay/TgcOverlay/TgcOverlay.h +++ b/MuonSpectrometer/MuonOverlay/TgcOverlay/TgcOverlay/TgcOverlay.h @@ -7,42 +7,29 @@ // Overlaying TgcDigits from two different events for TGC subdetectors. // // Andrei Gaponenko <agaponenko@lbl.gov>, 2006, 2007 - // Ketevi A. Assamagan <ketevi@bnl.gov>, March 2008 - // Piyali Banerjee <Piyali.Banerjee@cern.ch>, March 2011 #ifndef TGCOVERLAY_H #define TGCOVERLAY_H -#include <string> - -#include "MuonOverlayBase/IDC_MultiHitOverlayBase.h" -#include "MuonDigitContainer/TgcDigitContainer.h" +#include <MuonDigitContainer/TgcDigitContainer.h> +#include <MuonOverlayBase/IDC_MuonOverlayBase.h> -class TgcIdHelper; -class TgcOverlay : public IDC_MultiHitOverlayBase { +class TgcOverlay : public IDC_MuonOverlayBase +{ public: - TgcOverlay(const std::string &name,ISvcLocator *pSvcLocator); + TgcOverlay(const std::string &name, ISvcLocator *pSvcLocator); - /** Framework implemenrtation for the event loop */ - virtual StatusCode overlayInitialize(); - virtual StatusCode overlayExecute(); - virtual StatusCode overlayFinalize(); + virtual StatusCode initialize() override final; + virtual StatusCode execute() override final; private: - // ---------------------------------------------------------------- - - // jO controllable properties. - // "Main" containers are read, have data from "overlay" containers added, - // and written out with the original SG keys. - SG::ReadHandleKey<TgcDigitContainer> m_mainInputDigitKey{this,"MainInputDigitKey","OriginalEvent_SG+TGC_DIGITS","ReadHandleKey for Main Input TgcDigitContainer"}; - SG::ReadHandleKey<TgcDigitContainer> m_overlayInputDigitKey{this,"OverlayInputDigitKey","BkgEvent_0_SG+TGC_DIGITS","ReadHandleKey for Overlay Input TgcDigitContainer"}; - SG::WriteHandleKey<TgcDigitContainer> m_outputDigitKey{this,"OutputDigitKey","StoreGateSvc+TGC_DIGITS","WriteHandleKey for Output TgcDigitContainer"}; - - const TgcIdHelper * m_tgcHelper{nullptr}; + SG::ReadHandleKey<TgcDigitContainer> m_bkgInputKey{ this, "BkgInputKey", "OriginalEvent_SG+TGC_DIGITS", "ReadHandleKey for Background Input TgcDigitContainer" }; + SG::ReadHandleKey<TgcDigitContainer> m_signalInputKey{ this, "SignalInputKey", "BkgEvent_0_SG+TGC_DIGITS", "ReadHandleKey for Signal Input TgcDigitContainer" }; + SG::WriteHandleKey<TgcDigitContainer> m_outputKey{ this, "OutputKey", "StoreGateSvc+TGC_DIGITS", "WriteHandleKey for Output TgcDigitContainer" }; }; diff --git a/MuonSpectrometer/MuonOverlay/TgcOverlay/python/TgcOverlayConfig.py b/MuonSpectrometer/MuonOverlay/TgcOverlay/python/TgcOverlayConfig.py index 3384f69168eafeb9743029c2038eafa4d23c033d..d4d92780c519bee10f6e6d4deff59e98c634686f 100644 --- a/MuonSpectrometer/MuonOverlay/TgcOverlay/python/TgcOverlayConfig.py +++ b/MuonSpectrometer/MuonOverlay/TgcOverlay/python/TgcOverlayConfig.py @@ -1,12 +1,12 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration from AthenaCommon import CfgMgr def getTgcOverlay(name="TgcOverlay", **kwargs): from OverlayCommonAlgs.OverlayFlags import overlayFlags - kwargs.setdefault("MainInputDigitKey",overlayFlags.dataStore()+"+TGC_DIGITS") - kwargs.setdefault("OverlayInputDigitKey",overlayFlags.evtStore()+"+TGC_DIGITS") - kwargs.setdefault("OutputDigitKey",overlayFlags.outputStore()+"+TGC_DIGITS") - kwargs.setdefault("MCStore",overlayFlags.evtStore()) - kwargs.setdefault("DataStore", overlayFlags.dataStore()) + + kwargs.setdefault("BkgInputKey", overlayFlags.dataStore() + "+TGC_DIGITS") + kwargs.setdefault("SignalInputKey", overlayFlags.evtStore() + "+TGC_DIGITS") + kwargs.setdefault("OutputKey", overlayFlags.outputStore() + "+TGC_DIGITS") + return CfgMgr.TgcOverlay(name, **kwargs) diff --git a/MuonSpectrometer/MuonOverlay/TgcOverlay/src/TgcOverlay.cxx b/MuonSpectrometer/MuonOverlay/TgcOverlay/src/TgcOverlay.cxx index 2d0681498b815d9d6586b0da196371fc11829adb..2fea1d3c1cbfa65aee94007302fea6cf543156de 100644 --- a/MuonSpectrometer/MuonOverlay/TgcOverlay/src/TgcOverlay.cxx +++ b/MuonSpectrometer/MuonOverlay/TgcOverlay/src/TgcOverlay.cxx @@ -3,97 +3,75 @@ */ // Andrei Gaponenko <agaponenko@lbl.gov>, 2006, 2007 - // Ketevi A. Assamagan <ketevi@bnl.gov>, March 2008 - // Piyali Banerjee <Piyali.Banerjee@cern.ch>, March 2011 -#include "TgcOverlay/TgcOverlay.h" +#include <TgcOverlay/TgcOverlay.h> -#include "StoreGate/StoreGateSvc.h" -#include "StoreGate/DataHandle.h" -#include "StoreGate/ReadHandle.h" -#include "StoreGate/WriteHandle.h" +#include <StoreGate/ReadHandle.h> +#include <StoreGate/WriteHandle.h> -#include "MuonIdHelpers/TgcIdHelper.h" -#include "MuonDigitContainer/TgcDigitContainer.h" +#include <IDC_OverlayBase/IDC_OverlayHelpers.h> -#include <iostream> -#include <typeinfo> //================================================================ TgcOverlay::TgcOverlay(const std::string &name, ISvcLocator *pSvcLocator) : - IDC_MultiHitOverlayBase(name, pSvcLocator) + IDC_MuonOverlayBase(name, pSvcLocator) { } //================================================================ -StatusCode TgcOverlay::overlayInitialize() +StatusCode TgcOverlay::initialize() { - ATH_MSG_INFO("TgcOverlay initialized"); - - /** access to the TGC Identifier helper */ - ATH_CHECK(detStore()->retrieve(m_tgcHelper, "TGCIDHELPER")); - ATH_MSG_DEBUG(" Found the TgcIdHelper. "); - - ATH_CHECK(m_mainInputDigitKey.initialize()); - ATH_MSG_VERBOSE("Initialized ReadHandleKey: " << m_mainInputDigitKey ); - ATH_CHECK(m_overlayInputDigitKey.initialize()); - ATH_MSG_VERBOSE("Initialized ReadHandleKey: " << m_overlayInputDigitKey ); - ATH_CHECK(m_outputDigitKey.initialize()); - ATH_MSG_VERBOSE("Initialized WriteHandleKey: " << m_outputDigitKey ); + ATH_MSG_DEBUG("Initializing..."); - return StatusCode::SUCCESS; -} + ATH_CHECK(m_bkgInputKey.initialize()); + ATH_MSG_VERBOSE("Initialized ReadHandleKey: " << m_bkgInputKey ); + ATH_CHECK(m_signalInputKey.initialize()); + ATH_MSG_VERBOSE("Initialized ReadHandleKey: " << m_signalInputKey ); + ATH_CHECK(m_outputKey.initialize()); + ATH_MSG_VERBOSE("Initialized WriteHandleKey: " << m_outputKey ); -//================================================================ -StatusCode TgcOverlay::overlayFinalize() -{ - ATH_MSG_INFO("TgcOverlay finalized"); return StatusCode::SUCCESS; } //================================================================ -StatusCode TgcOverlay::overlayExecute() { +StatusCode TgcOverlay::execute() { ATH_MSG_DEBUG("TgcOverlay::execute() begin"); - //---------------------------------------------------------------- - SG::ReadHandle<TgcDigitContainer> dataContainer (m_mainInputDigitKey); - if (!dataContainer.isValid()) { - ATH_MSG_ERROR("Could not get data TGC container " << dataContainer.name() << " from store " << dataContainer.store()); + SG::ReadHandle<TgcDigitContainer> bkgContainer (m_bkgInputKey); + if (!bkgContainer.isValid()) { + ATH_MSG_ERROR("Could not get background TgcDigitContainer called " << bkgContainer.name() << " from store " << bkgContainer.store()); return StatusCode::FAILURE; } - ATH_MSG_DEBUG("Found data TgcDigitContainer called " << dataContainer.name() << " in store " << dataContainer.store()); - ATH_MSG_INFO("TGC Data = "<<shortPrint(dataContainer.cptr())); + ATH_MSG_DEBUG("Found background TgcDigitContainer called " << bkgContainer.name() << " in store " << bkgContainer.store()); + ATH_MSG_DEBUG("TGC Background = " << Overlay::debugPrint(bkgContainer.cptr())); + ATH_MSG_VERBOSE("TGC background has digit_size " << bkgContainer->digit_size()); - ATH_MSG_VERBOSE("Retrieving MC input TGC container"); - SG::ReadHandle<TgcDigitContainer> mcContainer(m_overlayInputDigitKey); - if(!mcContainer.isValid() ) { - ATH_MSG_ERROR("Could not get overlay TGC container " << mcContainer.name() << " from store " << mcContainer.store()); + SG::ReadHandle<TgcDigitContainer> signalContainer(m_signalInputKey); + if (!signalContainer.isValid() ) { + ATH_MSG_ERROR("Could not get signal TgcDigitContainer called " << signalContainer.name() << " from store " << signalContainer.store()); + return StatusCode::FAILURE; + } + ATH_MSG_DEBUG("Found overlay TgcDigitContainer called " << signalContainer.name() << " in store " << signalContainer.store()); + ATH_MSG_DEBUG("TGC Signal = " << Overlay::debugPrint(signalContainer.cptr())); + ATH_MSG_VERBOSE("TGC signal has digit_size " << signalContainer->digit_size()); + + SG::WriteHandle<TgcDigitContainer> outputContainer(m_outputKey); + ATH_CHECK(outputContainer.record(std::make_unique<TgcDigitContainer>(bkgContainer->size()))); + if (!outputContainer.isValid()) { + ATH_MSG_ERROR("Could not record output TgcDigitContainer called " << outputContainer.name() << " to store " << outputContainer.store()); return StatusCode::FAILURE; } - ATH_MSG_DEBUG("Found overlay TgcDigitContainer called " << mcContainer.name() << " in store " << mcContainer.store()); - ATH_MSG_INFO("TGC MC = "<<shortPrint(mcContainer.cptr())); - - ATH_MSG_VERBOSE("TGC data has digit_size "<<dataContainer->digit_size()); - - ATH_MSG_VERBOSE("TGC signal data has digit_size "<<mcContainer->digit_size()); - - SG::WriteHandle<TgcDigitContainer> outputContainer(m_outputDigitKey); - ATH_CHECK(outputContainer.record(std::make_unique<TgcDigitContainer>(dataContainer->size()))); ATH_MSG_DEBUG("Recorded output TgcDigitContainer called " << outputContainer.name() << " in store " << outputContainer.store()); - //Do the actual overlay - if(dataContainer.isValid() && mcContainer.isValid() && outputContainer.isValid()) { - this->overlayContainer(dataContainer.cptr(), mcContainer.cptr(), outputContainer.ptr()); - } - ATH_MSG_INFO("TGC Result = "<<shortPrint(outputContainer.cptr())); + // Do the actual overlay + ATH_CHECK(overlayMultiHitContainer(bkgContainer.cptr(), signalContainer.cptr(), outputContainer.ptr())); + ATH_MSG_DEBUG("TGC Result = " << Overlay::debugPrint(outputContainer.cptr())); + - //---------------------------------------------------------------- ATH_MSG_DEBUG("TgcOverlay::execute() end"); return StatusCode::SUCCESS; } - -// EOF diff --git a/MuonSpectrometer/MuonOverlay/TgcOverlay/test/TgcOverlay_test.cxx b/MuonSpectrometer/MuonOverlay/TgcOverlay/test/TgcOverlay_test.cxx new file mode 100644 index 0000000000000000000000000000000000000000..a3f335719e89489d76f6446e97afd5af81afe0a7 --- /dev/null +++ b/MuonSpectrometer/MuonOverlay/TgcOverlay/test/TgcOverlay_test.cxx @@ -0,0 +1,428 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +/** + * @author John Chapman + * @brief Tests for TgcOverlay. + */ + +#undef NDEBUG + +// Framework +#include "TestTools/initGaudi.h" + +// Google Test +#include "gtest/gtest.h" + +// Tested AthAlgorithm +#include "../TgcOverlay/TgcOverlay.h" + +namespace OverlayTesting { + + // needed every time an AthAlgorithm, AthAlgTool or AthService is instantiated + ISvcLocator* g_svcLoc = nullptr; + + // global test environment takes care of setting up Gaudi + class GaudiEnvironment : public ::testing::Environment { + protected: + virtual void SetUp() override { + Athena_test::initGaudi(OverlayTesting::g_svcLoc); + } + }; + + class TgcOverlay_test : public ::testing::Test { + + protected: + virtual void SetUp() override { + m_alg = new TgcOverlay{"TgcOverlay", g_svcLoc}; + ASSERT_TRUE( m_alg->setProperties().isSuccess() ); + } + + virtual void TearDown() override { + ASSERT_TRUE( m_alg->finalize().isSuccess() ); + delete m_alg; + } + + TgcOverlay* m_alg; + }; // TgcOverlay_test fixture + + + TEST_F(TgcOverlay_test, set_properties) { + // ordering A, C, B is on purpose to test for unintended alphabetic ordering + std::string inputSigPropertyValue = "'StoreGateSvc+TGC_DIGITS_SIG'"; + std::string inputBkgPropertyValue = "'StoreGateSvc+TGC_DIGITS_BKG'"; + std::string outputPropertyValue = "'StoreGateSvc+TGC_DIGITS'"; + ASSERT_TRUE( m_alg->setProperty( "SignalInputKey", inputSigPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "BkgInputKey", inputBkgPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->initialize().isSuccess() ); + ASSERT_TRUE( m_alg->execute().isFailure() ); //inputs don't exist + } + + TEST_F(TgcOverlay_test, empty_containers_alg_execute) { + SG::WriteHandle<TgcDigitContainer> inputSigDataHandle{"StoreGateSvc+TGC_DIGITS_SIG"}; + const unsigned int containerSize(1188); + inputSigDataHandle = std::make_unique<TgcDigitContainer>(containerSize); + SG::WriteHandle<TgcDigitContainer> inputBkgDataHandle{"StoreGateSvc+TGC_DIGITS_BKG"}; + inputBkgDataHandle = std::make_unique<TgcDigitContainer>(containerSize); + + // ordering A, C, B is on purpose to test for unintended alphabetic ordering + std::string inputSigPropertyValue = "'StoreGateSvc+TGC_DIGITS_SIG'"; + std::string inputBkgPropertyValue = "'StoreGateSvc+TGC_DIGITS_BKG'"; + std::string outputPropertyValue = "'StoreGateSvc+TGC_DIGITS'"; + ASSERT_TRUE( m_alg->setProperty( "SignalInputKey", inputSigPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "BkgInputKey", inputBkgPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->initialize().isSuccess() ); + ASSERT_TRUE( m_alg->execute().isSuccess() ); + } + + TEST_F(TgcOverlay_test, containers_with_matching_empty_collections) { + SG::WriteHandle<TgcDigitContainer> inputSigDataHandle{"StoreGateSvc+TGC_DIGITS_SIG1"}; + const unsigned int containerSize(1188); + IdentifierHash sigElementHash(1); + IdentifierHash bkgElementHash(1); + inputSigDataHandle = std::make_unique<TgcDigitContainer>(containerSize); + std::unique_ptr<TgcDigitCollection> sigCollection = std::make_unique<TgcDigitCollection>(Identifier(1234),sigElementHash); + ASSERT_TRUE(inputSigDataHandle->addCollection(sigCollection.get(),sigElementHash).isSuccess()); + sigCollection.release(); // Now owned by inputSigDataHandle + SG::WriteHandle<TgcDigitContainer> inputBkgDataHandle{"StoreGateSvc+TGC_DIGITS_BKG1"}; + inputBkgDataHandle = std::make_unique<TgcDigitContainer>(containerSize); + std::unique_ptr<TgcDigitCollection> bkgCollection = std::make_unique<TgcDigitCollection>(Identifier(1234),bkgElementHash); + ASSERT_TRUE(inputBkgDataHandle->addCollection(bkgCollection.get(),bkgElementHash).isSuccess()); + bkgCollection.release(); // Now owned by inputBkgDataHandle + + // ordering A, C, B is on purpose to test for unintended alphabetic ordering + std::string inputSigPropertyValue = "'StoreGateSvc+TGC_DIGITS_SIG1'"; + std::string inputBkgPropertyValue = "'StoreGateSvc+TGC_DIGITS_BKG1'"; + std::string outputPropertyValue = "'StoreGateSvc+TGC_DIGITS1'"; + ASSERT_TRUE( m_alg->setProperty( "SignalInputKey", inputSigPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "BkgInputKey", inputBkgPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->initialize().isSuccess() ); + ASSERT_TRUE( m_alg->execute().isSuccess() ); + // check output makes sense + SG::ReadHandle<TgcDigitContainer> outputDataHandle{"StoreGateSvc+TGC_DIGITS1"}; + ASSERT_TRUE( outputDataHandle.isValid() ); + const TgcDigitCollection *outputCollection = outputDataHandle->indexFindPtr(sigElementHash); + ASSERT_TRUE( outputCollection!=nullptr ); + ASSERT_TRUE( outputCollection->empty() ); + } + + TEST_F(TgcOverlay_test, containers_with_different_empty_collections) { + SG::WriteHandle<TgcDigitContainer> inputSigDataHandle{"StoreGateSvc+TGC_DIGITS_SIG2"}; + const unsigned int containerSize(1188); + IdentifierHash sigElementHash(1); + IdentifierHash bkgElementHash(2); + inputSigDataHandle = std::make_unique<TgcDigitContainer>(containerSize); + std::unique_ptr<TgcDigitCollection> sigCollection = std::make_unique<TgcDigitCollection>(Identifier(1234),sigElementHash); + ASSERT_TRUE(inputSigDataHandle->addCollection(sigCollection.get(),sigElementHash).isSuccess()); + sigCollection.release(); // Now owned by inputSigDataHandle + SG::WriteHandle<TgcDigitContainer> inputBkgDataHandle{"StoreGateSvc+TGC_DIGITS_BKG2"}; + inputBkgDataHandle = std::make_unique<TgcDigitContainer>(containerSize); + std::unique_ptr<TgcDigitCollection> bkgCollection = std::make_unique<TgcDigitCollection>(Identifier(1234),bkgElementHash); + ASSERT_TRUE(inputBkgDataHandle->addCollection(bkgCollection.get(),bkgElementHash).isSuccess()); + bkgCollection.release(); // Now owned by inputBkgDataHandle + + // ordering A, C, B is on purpose to test for unintended alphabetic ordering + std::string inputSigPropertyValue = "'StoreGateSvc+TGC_DIGITS_SIG2'"; + std::string inputBkgPropertyValue = "'StoreGateSvc+TGC_DIGITS_BKG2'"; + std::string outputPropertyValue = "'StoreGateSvc+TGC_DIGITS2'"; + ASSERT_TRUE( m_alg->setProperty( "SignalInputKey", inputSigPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "BkgInputKey", inputBkgPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->initialize().isSuccess() ); + ASSERT_TRUE( m_alg->execute().isSuccess() ); + // check output makes sense + SG::ReadHandle<TgcDigitContainer> outputDataHandle{"StoreGateSvc+TGC_DIGITS2"}; + ASSERT_TRUE( outputDataHandle.isValid() ); + const TgcDigitCollection *outputCollection1 = outputDataHandle->indexFindPtr(sigElementHash); + ASSERT_TRUE( outputCollection1!=nullptr ); + ASSERT_TRUE( outputCollection1->empty() ); + const TgcDigitCollection *outputCollection2 = outputDataHandle->indexFindPtr(bkgElementHash); + ASSERT_TRUE( outputCollection2!=nullptr ); + ASSERT_TRUE( outputCollection2->empty() ); + } + + TEST_F(TgcOverlay_test, containers_with_matching_collections_one_with_a_digit) { + SG::WriteHandle<TgcDigitContainer> inputSigDataHandle{"StoreGateSvc+TGC_DIGITS_SIG3"}; + const unsigned int containerSize(1188); + const IdentifierHash sigElementHash(1); + const IdentifierHash bkgElementHash(1); + const int sigBCTAG(12); + inputSigDataHandle = std::make_unique<TgcDigitContainer>(containerSize); + std::unique_ptr<TgcDigitCollection> sigCollection = std::make_unique<TgcDigitCollection>(Identifier(1234),sigElementHash); + //Add an TgcDigit + std::unique_ptr<TgcDigit> sigDigit = std::make_unique<TgcDigit>(Identifier(12),sigBCTAG); + sigCollection->push_back(sigDigit.release()); + ASSERT_TRUE(inputSigDataHandle->addCollection(sigCollection.get(),sigElementHash).isSuccess()); + sigCollection.release(); // Now owned by inputSigDataHandle + SG::WriteHandle<TgcDigitContainer> inputBkgDataHandle{"StoreGateSvc+TGC_DIGITS_BKG3"}; + inputBkgDataHandle = std::make_unique<TgcDigitContainer>(containerSize); + std::unique_ptr<TgcDigitCollection> bkgCollection = std::make_unique<TgcDigitCollection>(Identifier(1234),bkgElementHash); + ASSERT_TRUE(inputBkgDataHandle->addCollection(bkgCollection.get(),bkgElementHash).isSuccess()); + bkgCollection.release(); // Now owned by inputBkgDataHandle + + // ordering A, C, B is on purpose to test for unintended alphabetic ordering + std::string inputSigPropertyValue = "'StoreGateSvc+TGC_DIGITS_SIG3'"; + std::string inputBkgPropertyValue = "'StoreGateSvc+TGC_DIGITS_BKG3'"; + std::string outputPropertyValue = "'StoreGateSvc+TGC_DIGITS3'"; + ASSERT_TRUE( m_alg->setProperty( "SignalInputKey", inputSigPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "BkgInputKey", inputBkgPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->initialize().isSuccess() ); + ASSERT_TRUE( m_alg->execute().isSuccess() ); + // check output makes sense + SG::ReadHandle<TgcDigitContainer> outputDataHandle{"StoreGateSvc+TGC_DIGITS3"}; + ASSERT_TRUE( outputDataHandle.isValid() ); + const TgcDigitCollection *outputCollection1 = outputDataHandle->indexFindPtr(sigElementHash); + ASSERT_TRUE( outputCollection1!=nullptr ); + ASSERT_TRUE( outputCollection1->size()==1 ); + const TgcDigit* outputDigit1 = outputCollection1->at(0); + ASSERT_TRUE( outputDigit1!=nullptr ); + ASSERT_TRUE( outputDigit1->bcTag()==sigBCTAG ); + } + + TEST_F(TgcOverlay_test, containers_with_different_collections_one_digit_each) { + SG::WriteHandle<TgcDigitContainer> inputSigDataHandle{"StoreGateSvc+TGC_DIGITS_SIG4"}; + const unsigned int containerSize(1188); + const IdentifierHash sigElementHash(1); + const IdentifierHash bkgElementHash(2); + const int sigBCTAG(12); + const int bkgBCTAG(13); + inputSigDataHandle = std::make_unique<TgcDigitContainer>(containerSize); + std::unique_ptr<TgcDigitCollection> sigCollection = std::make_unique<TgcDigitCollection>(Identifier(1234),sigElementHash); + //Add an TgcDigit + std::unique_ptr<TgcDigit> sigDigit = std::make_unique<TgcDigit>(Identifier(12),sigBCTAG); + sigCollection->push_back(sigDigit.release()); + ASSERT_TRUE(inputSigDataHandle->addCollection(sigCollection.get(),sigElementHash).isSuccess()); + sigCollection.release(); // Now owned by inputSigDataHandle + SG::WriteHandle<TgcDigitContainer> inputBkgDataHandle{"StoreGateSvc+TGC_DIGITS_BKG4"}; + inputBkgDataHandle = std::make_unique<TgcDigitContainer>(containerSize); + std::unique_ptr<TgcDigitCollection> bkgCollection = std::make_unique<TgcDigitCollection>(Identifier(1234),bkgElementHash); + //Add an TgcDigit + std::unique_ptr<TgcDigit> bkgDigit = std::make_unique<TgcDigit>(Identifier(12),bkgBCTAG); + bkgCollection->push_back(bkgDigit.release()); + ASSERT_TRUE(inputBkgDataHandle->addCollection(bkgCollection.get(),bkgElementHash).isSuccess()); + bkgCollection.release(); // Now owned by inputBkgDataHandle + + // ordering A, C, B is on purpose to test for unintended alphabetic ordering + std::string inputSigPropertyValue = "'StoreGateSvc+TGC_DIGITS_SIG4'"; + std::string inputBkgPropertyValue = "'StoreGateSvc+TGC_DIGITS_BKG4'"; + std::string outputPropertyValue = "'StoreGateSvc+TGC_DIGITS4'"; + ASSERT_TRUE( m_alg->setProperty( "SignalInputKey", inputSigPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "BkgInputKey", inputBkgPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->initialize().isSuccess() ); + ASSERT_TRUE( m_alg->execute().isSuccess() ); + // check output makes sense + SG::ReadHandle<TgcDigitContainer> outputDataHandle{"StoreGateSvc+TGC_DIGITS4"}; + ASSERT_TRUE( outputDataHandle.isValid() ); + const TgcDigitCollection *outputCollection1 = outputDataHandle->indexFindPtr(sigElementHash); + ASSERT_TRUE( outputCollection1!=nullptr ); + ASSERT_TRUE( outputCollection1->size()==1 ); + const TgcDigit* outputDigit1 = outputCollection1->at(0); + ASSERT_TRUE( outputDigit1!=nullptr ); + ASSERT_TRUE( outputDigit1->bcTag()==sigBCTAG ); + const TgcDigitCollection *outputCollection2 = outputDataHandle->indexFindPtr(bkgElementHash); + ASSERT_TRUE( outputCollection2!=nullptr ); + ASSERT_TRUE( outputCollection2->size()==1 ); + const TgcDigit* outputDigit2 = outputCollection2->at(0); + ASSERT_TRUE( outputDigit2!=nullptr ); + ASSERT_TRUE( outputDigit2->bcTag()==bkgBCTAG ); + } + + TEST_F(TgcOverlay_test, containers_with_matching_collections_one_different_digit_each) { + SG::WriteHandle<TgcDigitContainer> inputSigDataHandle{"StoreGateSvc+TGC_DIGITS_SIG5"}; + const unsigned int containerSize(1188); + const IdentifierHash sigElementHash(1); + const IdentifierHash bkgElementHash(1); + const int sigBCTAG(12); + const int bkgBCTAG(12); + inputSigDataHandle = std::make_unique<TgcDigitContainer>(containerSize); + std::unique_ptr<TgcDigitCollection> sigCollection = std::make_unique<TgcDigitCollection>(Identifier(1234),sigElementHash); + //Add an TgcDigit + std::unique_ptr<TgcDigit> sigDigit = std::make_unique<TgcDigit>(Identifier(12),sigBCTAG); + sigCollection->push_back(sigDigit.release()); + ASSERT_TRUE(inputSigDataHandle->addCollection(sigCollection.get(),sigElementHash).isSuccess()); + sigCollection.release(); // Now owned by inputSigDataHandle + SG::WriteHandle<TgcDigitContainer> inputBkgDataHandle{"StoreGateSvc+TGC_DIGITS_BKG5"}; + inputBkgDataHandle = std::make_unique<TgcDigitContainer>(containerSize); + std::unique_ptr<TgcDigitCollection> bkgCollection = std::make_unique<TgcDigitCollection>(Identifier(1234),bkgElementHash); + //Add an TgcDigit + std::unique_ptr<TgcDigit> bkgDigit = std::make_unique<TgcDigit>(Identifier(13),bkgBCTAG); + bkgCollection->push_back(bkgDigit.release()); + ASSERT_TRUE(inputBkgDataHandle->addCollection(bkgCollection.get(),bkgElementHash).isSuccess()); + bkgCollection.release(); // Now owned by inputBkgDataHandle + + // ordering A, C, B is on purpose to test for unintended alphabetic ordering + std::string inputSigPropertyValue = "'StoreGateSvc+TGC_DIGITS_SIG5'"; + std::string inputBkgPropertyValue = "'StoreGateSvc+TGC_DIGITS_BKG5'"; + std::string outputPropertyValue = "'StoreGateSvc+TGC_DIGITS5'"; + ASSERT_TRUE( m_alg->setProperty( "SignalInputKey", inputSigPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "BkgInputKey", inputBkgPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->initialize().isSuccess() ); + ASSERT_TRUE( m_alg->execute().isSuccess() ); + // check output makes sense + SG::ReadHandle<TgcDigitContainer> outputDataHandle{"StoreGateSvc+TGC_DIGITS5"}; + ASSERT_TRUE( outputDataHandle.isValid() ); + const TgcDigitCollection *outputCollection = outputDataHandle->indexFindPtr(sigElementHash); + ASSERT_TRUE( outputCollection!=nullptr ); + ASSERT_TRUE( outputCollection->size()==2 ); + const TgcDigit* outputDigit1 = outputCollection->at(0); + ASSERT_TRUE( outputDigit1!=nullptr ); + ASSERT_TRUE( outputDigit1->bcTag()==bkgBCTAG ); // bkg digit first in collection + const TgcDigit* outputDigit2 = outputCollection->at(1); + ASSERT_TRUE( outputDigit2!=nullptr ); + ASSERT_TRUE( outputDigit2->bcTag()==sigBCTAG ); // sig digits added to end of collection + } + + TEST_F(TgcOverlay_test, containers_with_matching_collections_one_matching_digit_each) { + SG::WriteHandle<TgcDigitContainer> inputSigDataHandle{"StoreGateSvc+TGC_DIGITS_SIG6"}; + const unsigned int containerSize(1188); + const IdentifierHash sigElementHash(1); + const IdentifierHash bkgElementHash(1); + const int sigBCTAG(12); + const int bkgBCTAG(12); + inputSigDataHandle = std::make_unique<TgcDigitContainer>(containerSize); + std::unique_ptr<TgcDigitCollection> sigCollection = std::make_unique<TgcDigitCollection>(Identifier(1234),sigElementHash); + //Add an TgcDigit + std::unique_ptr<TgcDigit> sigDigit = std::make_unique<TgcDigit>(Identifier(12),sigBCTAG); + sigCollection->push_back(sigDigit.release()); + ASSERT_TRUE(inputSigDataHandle->addCollection(sigCollection.get(),sigElementHash).isSuccess()); + sigCollection.release(); // Now owned by inputSigDataHandle + SG::WriteHandle<TgcDigitContainer> inputBkgDataHandle{"StoreGateSvc+TGC_DIGITS_BKG6"}; + inputBkgDataHandle = std::make_unique<TgcDigitContainer>(containerSize); + std::unique_ptr<TgcDigitCollection> bkgCollection = std::make_unique<TgcDigitCollection>(Identifier(1234),bkgElementHash); + //Add an TgcDigit + std::unique_ptr<TgcDigit> bkgDigit = std::make_unique<TgcDigit>(Identifier(12),bkgBCTAG); + bkgCollection->push_back(bkgDigit.release()); + ASSERT_TRUE(inputBkgDataHandle->addCollection(bkgCollection.get(),bkgElementHash).isSuccess()); + bkgCollection.release(); // Now owned by inputBkgDataHandle + + // ordering A, C, B is on purpose to test for unintended alphabetic ordering + std::string inputSigPropertyValue = "'StoreGateSvc+TGC_DIGITS_SIG6'"; + std::string inputBkgPropertyValue = "'StoreGateSvc+TGC_DIGITS_BKG6'"; + std::string outputPropertyValue = "'StoreGateSvc+TGC_DIGITS6'"; + ASSERT_TRUE( m_alg->setProperty( "SignalInputKey", inputSigPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "BkgInputKey", inputBkgPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->initialize().isSuccess() ); + ASSERT_TRUE( m_alg->execute().isSuccess() ); + // check output makes sense + SG::ReadHandle<TgcDigitContainer> outputDataHandle{"StoreGateSvc+TGC_DIGITS6"}; + ASSERT_TRUE( outputDataHandle.isValid() ); + const TgcDigitCollection *outputCollection = outputDataHandle->indexFindPtr(sigElementHash); + ASSERT_TRUE( outputCollection!=nullptr ); + ASSERT_TRUE( outputCollection->size()==2 ); // FIXME Is this the correct behaviour? + const TgcDigit* outputDigit1 = outputCollection->at(0); + ASSERT_TRUE( outputDigit1!=nullptr ); + ASSERT_TRUE( outputDigit1->bcTag()==bkgBCTAG ); // bkg digit first in collection + const TgcDigit* outputDigit2 = outputCollection->at(1); + ASSERT_TRUE( outputDigit2!=nullptr ); + ASSERT_TRUE( outputDigit2->bcTag()==sigBCTAG ); // sig digits added to end of collection + } + + TEST_F(TgcOverlay_test, two_digits_with_matching_id_signal_first) { + SG::WriteHandle<TgcDigitContainer> inputSigDataHandle{"StoreGateSvc+TGC_DIGITS_SIG7"}; + const unsigned int containerSize(1188); + const IdentifierHash sigElementHash(1); + const IdentifierHash bkgElementHash(1); + const int sigBCTAG(11); + const int bkgBCTAG(12); + inputSigDataHandle = std::make_unique<TgcDigitContainer>(containerSize); + std::unique_ptr<TgcDigitCollection> sigCollection = std::make_unique<TgcDigitCollection>(Identifier(1234),sigElementHash); + //Add an TgcDigit + std::unique_ptr<TgcDigit> sigDigit = std::make_unique<TgcDigit>(Identifier(12),sigBCTAG); + sigCollection->push_back(sigDigit.release()); + ASSERT_TRUE(inputSigDataHandle->addCollection(sigCollection.get(),sigElementHash).isSuccess()); + sigCollection.release(); // Now owned by inputSigDataHandle + SG::WriteHandle<TgcDigitContainer> inputBkgDataHandle{"StoreGateSvc+TGC_DIGITS_BKG7"}; + inputBkgDataHandle = std::make_unique<TgcDigitContainer>(containerSize); + std::unique_ptr<TgcDigitCollection> bkgCollection = std::make_unique<TgcDigitCollection>(Identifier(1234),bkgElementHash); + //Add an TgcDigit + std::unique_ptr<TgcDigit> bkgDigit = std::make_unique<TgcDigit>(Identifier(12),bkgBCTAG); + bkgCollection->push_back(bkgDigit.release()); + ASSERT_TRUE(inputBkgDataHandle->addCollection(bkgCollection.get(),bkgElementHash).isSuccess()); + bkgCollection.release(); // Now owned by inputBkgDataHandle + + // ordering A, C, B is on purpose to test for unintended alphabetic ordering + std::string inputSigPropertyValue = "'StoreGateSvc+TGC_DIGITS_SIG7'"; + std::string inputBkgPropertyValue = "'StoreGateSvc+TGC_DIGITS_BKG7'"; + std::string outputPropertyValue = "'StoreGateSvc+TGC_DIGITS7'"; + ASSERT_TRUE( m_alg->setProperty( "SignalInputKey", inputSigPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "BkgInputKey", inputBkgPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->initialize().isSuccess() ); + ASSERT_TRUE( m_alg->execute().isSuccess() ); + // check output makes sense + SG::ReadHandle<TgcDigitContainer> outputDataHandle{"StoreGateSvc+TGC_DIGITS7"}; + ASSERT_TRUE( outputDataHandle.isValid() ); + const TgcDigitCollection *outputCollection = outputDataHandle->indexFindPtr(sigElementHash); + ASSERT_TRUE( outputCollection!=nullptr ); + ASSERT_TRUE( outputCollection->size()==2 ); // FIXME Is this the correct behaviour? + const TgcDigit* outputDigit1 = outputCollection->at(0); + ASSERT_TRUE( outputDigit1!=nullptr ); + ASSERT_TRUE( outputDigit1->bcTag()==bkgBCTAG ); // bkg digit first in collection + const TgcDigit* outputDigit2 = outputCollection->at(1); + ASSERT_TRUE( outputDigit2!=nullptr ); + ASSERT_TRUE( outputDigit2->bcTag()==sigBCTAG ); // sig digits added to end of collection + } + + TEST_F(TgcOverlay_test, two_digits_with_matching_id_bkg_first) { + SG::WriteHandle<TgcDigitContainer> inputSigDataHandle{"StoreGateSvc+TGC_DIGITS_SIG8"}; + const unsigned int containerSize(1188); + const IdentifierHash sigElementHash(1); + const IdentifierHash bkgElementHash(1); + const int sigBCTAG(12); + const int bkgBCTAG(11); + inputSigDataHandle = std::make_unique<TgcDigitContainer>(containerSize); + std::unique_ptr<TgcDigitCollection> sigCollection = std::make_unique<TgcDigitCollection>(Identifier(1234),sigElementHash); + //Add an TgcDigit + std::unique_ptr<TgcDigit> sigDigit = std::make_unique<TgcDigit>(Identifier(12),sigBCTAG); + sigCollection->push_back(sigDigit.release()); + ASSERT_TRUE(inputSigDataHandle->addCollection(sigCollection.get(),sigElementHash).isSuccess()); + sigCollection.release(); // Now owned by inputSigDataHandle + SG::WriteHandle<TgcDigitContainer> inputBkgDataHandle{"StoreGateSvc+TGC_DIGITS_BKG8"}; + inputBkgDataHandle = std::make_unique<TgcDigitContainer>(containerSize); + std::unique_ptr<TgcDigitCollection> bkgCollection = std::make_unique<TgcDigitCollection>(Identifier(1234),bkgElementHash); + //Add an TgcDigit + std::unique_ptr<TgcDigit> bkgDigit = std::make_unique<TgcDigit>(Identifier(12),bkgBCTAG); + bkgCollection->push_back(bkgDigit.release()); + ASSERT_TRUE(inputBkgDataHandle->addCollection(bkgCollection.get(),bkgElementHash).isSuccess()); + bkgCollection.release(); // Now owned by inputBkgDataHandle + + // ordering A, C, B is on purpose to test for unintended alphabetic ordering + std::string inputSigPropertyValue = "'StoreGateSvc+TGC_DIGITS_SIG8'"; + std::string inputBkgPropertyValue = "'StoreGateSvc+TGC_DIGITS_BKG8'"; + std::string outputPropertyValue = "'StoreGateSvc+TGC_DIGITS8'"; + ASSERT_TRUE( m_alg->setProperty( "SignalInputKey", inputSigPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "BkgInputKey", inputBkgPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->setProperty( "OutputKey", outputPropertyValue).isSuccess() ); + ASSERT_TRUE( m_alg->initialize().isSuccess() ); + ASSERT_TRUE( m_alg->execute().isSuccess() ); + // check output makes sense + SG::ReadHandle<TgcDigitContainer> outputDataHandle{"StoreGateSvc+TGC_DIGITS8"}; + ASSERT_TRUE( outputDataHandle.isValid() ); + const TgcDigitCollection *outputCollection = outputDataHandle->indexFindPtr(sigElementHash); + ASSERT_TRUE( outputCollection!=nullptr ); + ASSERT_TRUE( outputCollection->size()==2 ); // FIXME Is this the correct behaviour? + const TgcDigit* outputDigit1 = outputCollection->at(0); + ASSERT_TRUE( outputDigit1!=nullptr ); + ASSERT_TRUE( outputDigit1->bcTag()==bkgBCTAG ); // bkg digit first in collection + const TgcDigit* outputDigit2 = outputCollection->at(1); + ASSERT_TRUE( outputDigit2!=nullptr ); + ASSERT_TRUE( outputDigit2->bcTag()==sigBCTAG ); // sig digits added to end of collection + } + +} // <-- namespace OverlayTesting + + +int main(int argc, char *argv[]) +{ + ::testing::InitGoogleTest( &argc, argv ); + ::testing::AddGlobalTestEnvironment( new OverlayTesting::GaudiEnvironment ); + return RUN_ALL_TESTS(); +} diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonRIO_OnTrack/MuonRIO_OnTrack/MDTRIO_OnTrackErrorScaling.h b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonRIO_OnTrack/MuonRIO_OnTrack/MDTRIO_OnTrackErrorScaling.h index 2ce586665d74c21abd7812c09fc53e4d1875f27e..0eb7c4fe2e706fea928f38e8d8872b1561ae7e9a 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonRIO_OnTrack/MuonRIO_OnTrack/MDTRIO_OnTrackErrorScaling.h +++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonRIO_OnTrack/MuonRIO_OnTrack/MDTRIO_OnTrackErrorScaling.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef _MDTRIO_OnTrackErrorScaling_H_ #define _MDTRIO_OnTrackErrorScaling_H_ @@ -20,10 +20,10 @@ public: kEndcap, kNParamTypes}; - static const char **paramNames() { return s_names; } + static const char* const* paramNames() { return s_names; } virtual bool postProcess() override; protected: - static const char *s_names[kNParamTypes]; + static const char* const s_names[kNParamTypes]; }; CLASS_DEF( MDTRIO_OnTrackErrorScaling , 100992927, 1 ) diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonRIO_OnTrack/MuonRIO_OnTrack/MuonEtaPhiRIO_OnTrackErrorScaling.h b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonRIO_OnTrack/MuonRIO_OnTrack/MuonEtaPhiRIO_OnTrackErrorScaling.h index 8b3634e1307e7283f2fe16e5f84a263b4ae96262..1c703be8197b1bee0ed11b18283f67736183a69d 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonRIO_OnTrack/MuonRIO_OnTrack/MuonEtaPhiRIO_OnTrackErrorScaling.h +++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonRIO_OnTrack/MuonRIO_OnTrack/MuonEtaPhiRIO_OnTrackErrorScaling.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef _MUONETAPHIRIO_OnTrackErrorScaling_H_ #define _MUONETAPHIRIO_OnTrackErrorScaling_H_ @@ -20,10 +20,10 @@ public: kEta, kNParamTypes}; - static const char **paramNames() { return s_names; } + static const char* const* paramNames() { return s_names; } virtual bool postProcess() override; protected: - static const char *s_names[kNParamTypes]; + static const char* const s_names[kNParamTypes]; }; CLASS_DEF( MuonEtaPhiRIO_OnTrackErrorScaling , 92816455, 1 ) diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonRIO_OnTrack/src/MDTRIO_OnTrackErrorScaling.cxx b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonRIO_OnTrack/src/MDTRIO_OnTrackErrorScaling.cxx index b2d59f77eb69e684d8aeb840a7385bb4cf460ac4..1c11d76fa6e9d73428623ed2917cfec290e0ecde 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonRIO_OnTrack/src/MDTRIO_OnTrackErrorScaling.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonRIO_OnTrack/src/MDTRIO_OnTrackErrorScaling.cxx @@ -1,10 +1,10 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "MuonRIO_OnTrack/MDTRIO_OnTrackErrorScaling.h" #include <iostream> -const char *MDTRIO_OnTrackErrorScaling::s_names[MDTRIO_OnTrackErrorScaling::kNParamTypes]={ +const char* const MDTRIO_OnTrackErrorScaling::s_names[MDTRIO_OnTrackErrorScaling::kNParamTypes]={ "MDT Barrel", "MDT Endcap" }; diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonRIO_OnTrack/src/MuonEtaPhiRIO_OnTrackErrorScaling.cxx b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonRIO_OnTrack/src/MuonEtaPhiRIO_OnTrackErrorScaling.cxx index 64c2024ff693c83f0c2e93ada8fb48a1c38ad61e..207935704b4761ed420abcc9a89da203122c28ce 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonRIO_OnTrack/src/MuonEtaPhiRIO_OnTrackErrorScaling.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonRIO_OnTrack/src/MuonEtaPhiRIO_OnTrackErrorScaling.cxx @@ -1,10 +1,10 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "MuonRIO_OnTrack/MuonEtaPhiRIO_OnTrackErrorScaling.h" #include <iostream> -const char *MuonEtaPhiRIO_OnTrackErrorScaling::s_names[MuonEtaPhiRIO_OnTrackErrorScaling::kNParamTypes]={ +const char* const MuonEtaPhiRIO_OnTrackErrorScaling::s_names[MuonEtaPhiRIO_OnTrackErrorScaling::kNParamTypes]={ "Phi", "Eta" }; diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonRecFlags.py b/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonRecFlags.py index 0fc394c6532b5546935691c38afc6a8e9a6f8589..99b0c627f50ab77917594dda53e98396f24e30ac 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonRecFlags.py +++ b/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonRecFlags.py @@ -419,7 +419,7 @@ class MuonRec(JobPropertyContainer): setDefault(self.useAlignmentCorrections,DetFlags.detdescr.Muon_on() and rec.doMuon()) setDefault(self.writeSDOs, rec.doWriteESD() and globalflags.DataSource != 'data') setDefault(self.useTGCPriorNextBC,True) - setDefault(self.doMuonIso,False) + setDefault(self.doMuonIso,True) if beamFlags.beamType == 'cosmics' or beamFlags.beamType == 'singlebeam': setDefault(self.doSegmentT0Fit,True) diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTrackSummaryHelperTool/MuonTrackSummaryHelperTool/MuonTrackSummaryHelperTool.h b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTrackSummaryHelperTool/MuonTrackSummaryHelperTool/MuonTrackSummaryHelperTool.h index dd3954b4c074bce290123f5abc6f61d7b7815971..33b75ecea632a4b8981f48893cdfa886b15b21c3 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTrackSummaryHelperTool/MuonTrackSummaryHelperTool/MuonTrackSummaryHelperTool.h +++ b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTrackSummaryHelperTool/MuonTrackSummaryHelperTool/MuonTrackSummaryHelperTool.h @@ -26,6 +26,9 @@ class RpcIdHelper; class TgcIdHelper; class CscIdHelper; class MdtIdHelper; +// New Small Wheel +class MmIdHelper; +class sTgcIdHelper; class Identifier; @@ -89,6 +92,9 @@ private: const TgcIdHelper* m_tgcId; const CscIdHelper* m_cscId; const MdtIdHelper* m_mdtId; + //New Small Wheel + const sTgcIdHelper* m_stgcId; + const MmIdHelper* m_mmId; /** tool used to do hole search */ ToolHandle<Trk::ITrackHoleSearchTool> m_muonTgTool; diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTrackSummaryHelperTool/src/MuonTrackSummaryHelperTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTrackSummaryHelperTool/src/MuonTrackSummaryHelperTool.cxx index 21896b4c3f42b0ab5f0ae2baee3e3c66ff0d1e5d..d6823fcb0b06e0b0b9c475a1c80c08fd145645ef 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTrackSummaryHelperTool/src/MuonTrackSummaryHelperTool.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTrackSummaryHelperTool/src/MuonTrackSummaryHelperTool.cxx @@ -72,6 +72,7 @@ Muon::MuonTrackSummaryHelperTool::MuonTrackSummaryHelperTool( declareProperty("CalculateCloseHits", m_calculateCloseHits = false ); declareProperty("RoadWidth", m_roadWidth = 135.,"width used to calculate hits within the road (mm)"); declareProperty("Extrapolator", m_extrapolator); + declareProperty("MdtPrepDataContainer", m_mdtKey="MDT_DriftCircles"); declareProperty("HoleOnTrackTool", m_muonTgTool); declareProperty("TrackingGeometryName", m_trackingGeometryName); } @@ -102,6 +103,20 @@ StatusCode Muon::MuonTrackSummaryHelperTool::initialize() muonOkay=false; } + sc = detStore()->retrieve(m_stgcId); + if (sc.isFailure()) + { + msg (MSG::WARNING) << "Could not get STGC ID helper !" << endmsg; + muonOkay=false; + } + + sc = detStore()->retrieve(m_mmId); + if (sc.isFailure()) + { + msg (MSG::WARNING) << "Could not get MM ID helper !" << endmsg; + muonOkay=false; + } + sc = detStore()->retrieve(m_cscId); if (sc.isFailure()) { @@ -214,13 +229,13 @@ void Muon::MuonTrackSummaryHelperTool::analyse( else increment(information[numberOfTgcEtaHits]); }else if(m_mdtId->is_mdt(id)){ increment(information[numberOfMdtHits]); - }else if(m_mdtId->is_mm(id) ){ - increment(information[numberOfCscUnspoiltEtaHits]); - }else if(m_mdtId->is_stgc(id)){ - int chType = m_idHelperTool->stgcIdHelper().channelType(id); - if( chType == 2 ) increment(information[numberOfCscPhiHits]); - else if( chType == 1 ) increment(information[numberOfCscEtaHits]); - else increment(information[numberOfCscPhiHoles]); + }else if(m_stgcId->is_stgc(id) ){ + // strip = measuresPhi + if( m_stgcId->measuresPhi(id) ) increment(information[numberOfStgcPhiHits]); + // we do not discriminate between pads or wires + else increment(information[numberOfStgcEtaHits]); + }else if(m_mmId->is_mm(id)){ + increment(information[numberOfMmHits]); }else{ msg (MSG::ERROR) << "Unknown muon detector type " << endmsg; msg (MSG::ERROR) << "Dumping TrackStateOnSurface "<<*tsos << endmsg; @@ -378,11 +393,11 @@ void Muon::MuonTrackSummaryHelperTool::addDetailedTrackSummary( const Trk::Track Identifier id = pars->associatedSurface().associatedDetectorElement()->identify(); bool issTgc = m_idHelperTool->issTgc(id); if(issTgc) { -// get the identifier for phi or eta holes + // get the identifier for phi or eta holes Identifier idh = pars->associatedSurface().associatedDetectorElementIdentifier(); if(idh.is_valid()) { id = idh; -// ATH_MSG_VERBOSE(" For sTGC hole use associatedDetectorElementIdentifier "); + // ATH_MSG_VERBOSE(" For sTGC hole use associatedDetectorElementIdentifier "); } } if( !id.is_valid() || !m_idHelperTool->isMuon(id) ) continue; @@ -494,6 +509,18 @@ void Muon::MuonTrackSummaryHelperTool::addDetailedTrackSummary( const Trk::Track goodLayIds.insert(layId); } } + else if(m_idHelperTool->isCsc(id)){ + const Muon::CscClusterOnTrack* cscClus = dynamic_cast<const Muon::CscClusterOnTrack*>(rot); + if(cscClus->status()==0 || cscClus->status()==10) goodLayIds.insert(layId); + } + else if(m_idHelperTool->isMM(id)) { + // MM quality requirements to be inserted here if needed + goodLayIds.insert(layId); + } + else if(m_idHelperTool->issTgc(id)) { + // sTGC quality requirements to be inserted here if needed + goodLayIds.insert(layId); + } }else{ const Muon::CompetingMuonClustersOnTrack* crot = dynamic_cast<const Muon::CompetingMuonClustersOnTrack*>(meas); if( crot ){ @@ -509,6 +536,10 @@ void Muon::MuonTrackSummaryHelperTool::addDetailedTrackSummary( const Trk::Track // get layer Identifier and insert it into set Identifier layId = m_idHelperTool->layerId( (*clit)->identify() ); layIds.insert(layId); + if(m_idHelperTool->isCsc(id)){ + const Muon::CscClusterOnTrack* cscClus = dynamic_cast<const Muon::CscClusterOnTrack*>(rot); + if(cscClus->status()==0 || cscClus->status()==10) goodLayIds.insert(layId); + } } }else{ continue; diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MooSegmentFinderAlg.cxx b/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MooSegmentFinderAlg.cxx index a8b32b9951542a10c439b20528c378d332bbbcf9..65cf2b00cbaba2413d583ee1b0d8e15969b54dfe 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MooSegmentFinderAlg.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MooSegmentFinderAlg.cxx @@ -108,15 +108,24 @@ StatusCode MooSegmentFinderAlg::execute() SG::WriteHandle<MuonPatternCombinationCollection> patHandle(m_patternCombiLocation); - if( patHandle.record(std::make_unique<MuonPatternCombinationCollection>()).isSuccess() ){ - ATH_MSG_VERBOSE("stored MuonPatternCombinationCollection at " << m_patternCombiLocation.key()); - }else{ - ATH_MSG_ERROR("Failed to store MuonPatternCombinationCollection at " << m_patternCombiLocation.key()); - } - output.patternCombinations=patHandle.ptr(); - m_segmentFinder->findSegments( mdtCols, cscCols, tgcCols, rpcCols, output ); + if(output.patternCombinations){ + if( patHandle.record(std::make_unique<MuonPatternCombinationCollection>(std::move(*(output.patternCombinations)))).isSuccess() ){ + ATH_MSG_VERBOSE("stored MuonPatternCombinationCollection at " << m_patternCombiLocation.key()); + }else{ + ATH_MSG_ERROR("Failed to store MuonPatternCombinationCollection at " << m_patternCombiLocation.key()); + } + delete output.patternCombinations; + } + else{ + if( patHandle.record(std::make_unique<MuonPatternCombinationCollection>()).isSuccess() ){ + ATH_MSG_VERBOSE("stored MuonPatternCombinationCollection at " << m_patternCombiLocation.key()); + }else{ + ATH_MSG_ERROR("Failed to store MuonPatternCombinationCollection at " << m_patternCombiLocation.key()); + } + } + //do cluster based segment finding if (m_doTGCClust || m_doRPCClust){ const PRD_MultiTruthCollection* tgcTruthColl=0; diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/TGC_LinearSegmentMakerTool/src/TGC_LinearSegmentMakerTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/TGC_LinearSegmentMakerTool/src/TGC_LinearSegmentMakerTool.cxx index df63b2f8a9ba38798571ce6b9e068e41b2ba2737..3af876cd36ae0278cc8e1ca9b04927da3a7b67c1 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/TGC_LinearSegmentMakerTool/src/TGC_LinearSegmentMakerTool.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/TGC_LinearSegmentMakerTool/src/TGC_LinearSegmentMakerTool.cxx @@ -255,7 +255,7 @@ void TGC_LinearSegmentMakerTool::find(const Trk::TrackRoad& road, goto done; } Trk::TrackSurfaceIntersection baseIsect(pos, dir, 0.0); - const Trk::TrackSurfaceIntersection* pNewBaseIsect = m_pIntersector.unConst()->intersectSurface(surface, &baseIsect, 0.0); + const Trk::TrackSurfaceIntersection* pNewBaseIsect = m_pIntersector->intersectSurface(surface, &baseIsect, 0.0); Amg::Vector2D pSegPos; bool loc_pos_ok(false); if(pNewBaseIsect) { diff --git a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonTrackScoringTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonTrackScoringTool.cxx index 57610a5fd1a733745034dd6ae32cc679ab5dfbfa..778c34870d26159225ec794ec74c82e04618687e 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonTrackScoringTool.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonTrackScoringTool.cxx @@ -58,6 +58,10 @@ namespace Muon { m_summaryTypeScore[Trk::numberOfCscEtaHits] = 5; m_summaryTypeScore[Trk::numberOfRpcPhiHits] = 5; m_summaryTypeScore[Trk::numberOfRpcEtaHits] = 5; + // New Small Wheel + m_summaryTypeScore[Trk::numberOfStgcPhiHits] = 5; + m_summaryTypeScore[Trk::numberOfStgcEtaHits] = 5; + m_summaryTypeScore[Trk::numberOfMmHits] = 5; } MuonTrackScoringTool::~MuonTrackScoringTool() diff --git a/MuonSpectrometer/MuonValidation/MuonRecValidation/MuonRecRTT/test/test_muonrecrtt_cosmic.sh b/MuonSpectrometer/MuonValidation/MuonRecValidation/MuonRecRTT/test/test_muonrecrtt_cosmic.sh index 4fb827732a31adc544b7f6d633674632649ffaae..d3e499f22a6d684e86b4ececcb799bc531332e14 100755 --- a/MuonSpectrometer/MuonValidation/MuonRecValidation/MuonRecRTT/test/test_muonrecrtt_cosmic.sh +++ b/MuonSpectrometer/MuonValidation/MuonRecValidation/MuonRecRTT/test/test_muonrecrtt_cosmic.sh @@ -12,4 +12,4 @@ set -x echo "List of files = " ${ArtInFile} -Reco_tf.py --maxEvents=9000 --conditionsTag RAWtoESD:CONDBR2-BLKPA-2017-12 --geometryVersion ATLAS-R2-2016-01-00-01 --inputBSFile=${ArtInFile} --outputAODFile=MuonCosmic_Reco.AOD.pool.root --preExec 'from RecExConfig.RecFlags import rec; rec.doTrigger=False; import MuonCombinedRecExample.MuonCombinedRecOnlySetup' --postExec 'r2e:topSequence.BeamBackgroundFiller.Enable = False' +Reco_tf.py --maxEvents=9000 --conditionsTag RAWtoESD:CONDBR2-BLKPA-2017-12 --geometryVersion ATLAS-R2-2016-01-00-01 --inputBSFile=${ArtInFile} --outputAODFile=MuonCosmic_Reco.AOD.pool.root --preExec 'from RecExConfig.RecFlags import rec; rec.doTrigger=False; import MuonCombinedRecExample.MuonCombinedRecOnlySetup;from MuonRecExample.MuonRecFlags import muonRecFlags; muonRecFlags.doMuonIso.set_Value_and_Lock(False)' --postExec 'r2e:topSequence.BeamBackgroundFiller.Enable = False' diff --git a/PhysicsAnalysis/AnalysisCommon/IsolationSelection/Root/IsolationSelectionTool.cxx b/PhysicsAnalysis/AnalysisCommon/IsolationSelection/Root/IsolationSelectionTool.cxx index c04e13ce2179b7ae4d6c6594d13229da9605c5b5..f9e0fb8307d0716ed4c2a0c8d7c492912cd06dca 100644 --- a/PhysicsAnalysis/AnalysisCommon/IsolationSelection/Root/IsolationSelectionTool.cxx +++ b/PhysicsAnalysis/AnalysisCommon/IsolationSelection/Root/IsolationSelectionTool.cxx @@ -163,25 +163,25 @@ namespace CP { addCutToWP(wp, m_muWPKey, xAOD::Iso::ptvarcone30, "99"); } else if (muWPname == "Loose") { addCutToWP(wp, m_muWPKey, xAOD::Iso::ptvarcone30, "99"); - addCutToWP(wp, m_muWPKey, xAOD::Iso::topoetcone20, "99"); + //addCutToWP(wp, m_muWPKey, xAOD::Iso::topoetcone20, "99"); } else if (muWPname == "Tight") { ATH_MSG_WARNING("Obsolete muon WP " << muWPname << ". Check Twiki " << m_TwikiLoc); addCutToWP(wp, m_muWPKey, xAOD::Iso::ptvarcone30, "99"); - addCutToWP(wp, m_muWPKey, xAOD::Iso::topoetcone20, "96"); + //addCutToWP(wp, m_muWPKey, xAOD::Iso::topoetcone20, "96"); // For gradient efficiency in pT } else if (muWPname == "Gradient") { addCutToWP(wp, m_muWPKey, xAOD::Iso::ptvarcone30, "0.1143*x+92.14"); - addCutToWP(wp, m_muWPKey, xAOD::Iso::topoetcone20, "0.1143*x+92.14"); + //addCutToWP(wp, m_muWPKey, xAOD::Iso::topoetcone20, "0.1143*x+92.14"); } else if (muWPname == "GradientLoose") { addCutToWP(wp, m_muWPKey, xAOD::Iso::ptvarcone30, "0.057*x+95.57"); - addCutToWP(wp, m_muWPKey, xAOD::Iso::topoetcone20, "0.057*x+95.57"); + ///addCutToWP(wp, m_muWPKey, xAOD::Iso::topoetcone20, "0.057*x+95.57"); } else if (muWPname == "GradientT1") { addCutToWP(wp, m_muWPKey, xAOD::Iso::ptvarcone30, "0.1713*x+88.71"); - addCutToWP(wp, m_muWPKey, xAOD::Iso::topoetcone20, "0.1713*x+88.71"); + //addCutToWP(wp, m_muWPKey, xAOD::Iso::topoetcone20, "0.1713*x+88.71"); ATH_MSG_WARNING("Obsolete muon WP " << muWPname << ". Check Twiki " << m_TwikiLoc); } else if (muWPname == "GradientT2") { addCutToWP(wp, m_muWPKey, xAOD::Iso::ptvarcone30, "0.2283*x+85.28"); - addCutToWP(wp, m_muWPKey, xAOD::Iso::topoetcone20, "0.2283*x+85.28"); + //addCutToWP(wp, m_muWPKey, xAOD::Iso::topoetcone20, "0.2283*x+85.28"); ATH_MSG_WARNING("Obsolete muon WP " << muWPname << ". Check Twiki " << m_TwikiLoc); // Using fixed cuts } else if (muWPname == "FixedCutTightTrackOnly") { diff --git a/PhysicsAnalysis/D3PDMaker/CaloSysD3PDMaker/src/LArDigitFillerTool.cxx b/PhysicsAnalysis/D3PDMaker/CaloSysD3PDMaker/src/LArDigitFillerTool.cxx index 54007c6d6d6b87938c23f4449a4bdaaa44886d7c..4a91ecf984f81be54919cd4c533ef0fa5e2996d4 100644 --- a/PhysicsAnalysis/D3PDMaker/CaloSysD3PDMaker/src/LArDigitFillerTool.cxx +++ b/PhysicsAnalysis/D3PDMaker/CaloSysD3PDMaker/src/LArDigitFillerTool.cxx @@ -17,10 +17,10 @@ #include "StoreGate/StoreGateSvc.h" #include "LArRawEvent/LArDigit.h" #include "GaudiKernel/IToolSvc.h" -#include "CaloIdentifier/CaloIdManager.h" #include "LArRawEvent/LArFebHeaderContainer.h" #include "LArRawEvent/LArOFIterResultsContainer.h" #include "LArIdentifier/LArOnlineID.h" +#include "CaloIdentifier/CaloCell_ID.h" #include "CaloIdentifier/LArEM_ID.h" #include "CaloIdentifier/LArHEC_ID.h" #include "CaloIdentifier/LArFCAL_ID.h" @@ -115,17 +115,16 @@ StatusCode LArDigitFillerTool::book() { ATH_MSG_DEBUG( "in book()" ); - const CaloIdManager *caloIdMgr=CaloIdManager::instance() ; - m_emId=caloIdMgr->getEM_ID(); - m_hecId=caloIdMgr->getHEC_ID(); - m_fcalId=caloIdMgr->getFCAL_ID(); + const CaloCell_ID* idHelper = nullptr; + ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_ID") ); + m_emId=idHelper->em_idHelper(); + m_hecId=idHelper->hec_idHelper(); + m_fcalId=idHelper->fcal_idHelper(); CHECK( m_cablingKey.initialize() ); - StoreGateSvc* detStore = 0; - CHECK( service("DetectorStore", detStore) ); - CHECK( detStore->retrieve(m_onlineHelper, "LArOnlineID") ); + CHECK( detStore()->retrieve(m_onlineHelper, "LArOnlineID") ); // CHECK(addVariable ("icell",m_cellIndex)); diff --git a/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/share/PhysValTrigEgamma_jobOptions.py b/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/share/PhysValTrigEgamma_jobOptions.py index e7d5cfca43415bdd7a860eebe877dd7376957a4d..a9f349ee4e9efaaf042a48001eb998108b62de41 100644 --- a/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/share/PhysValTrigEgamma_jobOptions.py +++ b/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/share/PhysValTrigEgamma_jobOptions.py @@ -1,8 +1,9 @@ from TrigEgammaMonitoring.TrigEgammaMonitoringConfig import TrigEgammaMonitoringTool -for tool1 in TrigEgammaMonitoringTool(): +tools = TrigEgammaMonitoringTool() +for tool1 in tools: tool1.EnableLumi = False tool1.OutputLevel = WARNING #tool1.DetailLevel = 10 tool1.EnableLumi = False - monMan.AthenaMonTools += [tool1] + #monMan.AthenaMonTools += [tool1] diff --git a/PhysicsAnalysis/TruthParticleID/McParticleTools/src/TruthParticleCnvTool.cxx b/PhysicsAnalysis/TruthParticleID/McParticleTools/src/TruthParticleCnvTool.cxx index 50f81de551060b8bce632c7f080e8759ca6aee7b..7e5e49dc655a0da665941b73b06779b4ff93035e 100755 --- a/PhysicsAnalysis/TruthParticleID/McParticleTools/src/TruthParticleCnvTool.cxx +++ b/PhysicsAnalysis/TruthParticleID/McParticleTools/src/TruthParticleCnvTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -286,7 +286,7 @@ TruthParticleCnvTool::convert( const McEventCollection * mcCollection, << hepMcPart->barcode() << " !!"); } //bcToMcPart[ hepMcPart->barcoade() ] = mcPart; - HepMcParticleLink mcLink( hepMcPart->barcode(), genEventIndex, sg ); + HepMcParticleLink mcLink( hepMcPart->barcode(), genEventIndex, EBC_MAINEVCOLL, HepMcParticleLink::IS_POSITION, sg ); // FIXME assuming that we are using the hard-scatter McEventCollection - would need to pass this info as an argument to the convert function. bcToMcPart[ mcLink.compress() ] = mcPart; }//> end loop over particles diff --git a/Projects/AnalysisBase/externals.txt b/Projects/AnalysisBase/externals.txt index d997d78201e64dd63c20933cfe8b45f5334f7036..4454336bc6a902ba725b0889efa721252d924700 100644 --- a/Projects/AnalysisBase/externals.txt +++ b/Projects/AnalysisBase/externals.txt @@ -6,4 +6,4 @@ # forbidden. # The version of atlas/atlasexternals to use: -AnalysisBaseExternalsVersion = 2.0.22 +AnalysisBaseExternalsVersion = 2.0.25 diff --git a/Projects/AnalysisTop/externals.txt b/Projects/AnalysisTop/externals.txt index 512940671ae0c7ee270f66c3133ea31ddb457e59..397ba201f2a8bbe30f986659194da5c9bd5774cc 100644 --- a/Projects/AnalysisTop/externals.txt +++ b/Projects/AnalysisTop/externals.txt @@ -1,4 +1,4 @@ # Versions of the various externals to build before starting the build of # this project, when doing a full stack nightly build. -AnalysisBaseExternalsVersion = 2.0.22 +AnalysisBaseExternalsVersion = 2.0.25 diff --git a/Projects/AthDataQuality/externals.txt b/Projects/AthDataQuality/externals.txt index 5c4945ab8452c032ef94b10302f85552b5337195..fa8d37a6e0337a47c44a60e60760c7acc87a0ebf 100644 --- a/Projects/AthDataQuality/externals.txt +++ b/Projects/AthDataQuality/externals.txt @@ -5,4 +5,4 @@ # an "origin/" prefix before it. For tags however this is explicitly # forbidden. -AtlasExternalsVersion = 2.0.22 +AtlasExternalsVersion = 2.0.25 diff --git a/Projects/AthSimulation/externals.txt b/Projects/AthSimulation/externals.txt index dc776ca5b195a687639edd227d4a3f0f0b7aaeb4..28b4bfa25b07772d638426f4917023f18805a30f 100644 --- a/Projects/AthSimulation/externals.txt +++ b/Projects/AthSimulation/externals.txt @@ -6,7 +6,7 @@ # forbidden. # The version of atlas/atlasexternals to use: -AthSimulationExternalsVersion = 2.0.22 +AthSimulationExternalsVersion = 2.0.25 # The version of atlas/Gaudi to use: GaudiVersion = v31r0.002 diff --git a/Projects/Athena/CMakeLists.txt b/Projects/Athena/CMakeLists.txt index fc404a6add229d0658b3dff58e60f7a328ec4f1d..0a91181108611269999f628082917cc67a002ded 100644 --- a/Projects/Athena/CMakeLists.txt +++ b/Projects/Athena/CMakeLists.txt @@ -26,9 +26,9 @@ if( LCG_NIGHTLY ) set( TDAQ_VERSION "99-00-00" CACHE STRING "The version of tdaq to use for the build" ) else() - set( TDAQ-COMMON_VERSION "03-00-00" CACHE STRING + set( TDAQ-COMMON_VERSION "03-02-00" CACHE STRING "The version of tdaq-common to use for the build" ) - set( TDAQ_VERSION "08-01-02" CACHE STRING + set( TDAQ_VERSION "08-02-00" CACHE STRING "The version of tdaq to use for the build" ) endif() @@ -52,6 +52,7 @@ find_package( Gaudi REQUIRED ) # Find some auxiliary packages: find_package( Doxygen ) find_package( PNG ) +find_package( VDT ) # Load all the files from the externals/ subdirectory: file( GLOB _externals "${CMAKE_CURRENT_SOURCE_DIR}/externals/*.cmake" ) diff --git a/Projects/Athena/build_externals.sh b/Projects/Athena/build_externals.sh index 377572460861f8b2bf9bb642fef3cf6233c09591..bdd649acd15e1a9f0b1313245f5bfebeade178de 100755 --- a/Projects/Athena/build_externals.sh +++ b/Projects/Athena/build_externals.sh @@ -22,7 +22,7 @@ BUILDDIR="" BUILDTYPE="RelWithDebInfo" FORCE="" CI="" -EXTRACMAKE=(-DLCG_VERSION_NUMBER=94 -DLCG_VERSION_POSTFIX="a") +EXTRACMAKE=(-DLCG_VERSION_NUMBER=95 -DLCG_VERSION_POSTFIX="") while getopts ":t:b:x:fch" opt; do case $opt in t) diff --git a/Projects/Athena/externals.txt b/Projects/Athena/externals.txt index 2b9bbe042be624d146b061191f03b6e6aed53110..d03228bfb6118bbfb083e9d6d57a2068a77ee174 100644 --- a/Projects/Athena/externals.txt +++ b/Projects/Athena/externals.txt @@ -6,7 +6,7 @@ # forbidden. # The version of atlas/atlasexternals to use: -AthenaExternalsVersion = 2.0.22 +AthenaExternalsVersion = 2.0.25 # The version of atlas/Gaudi to use: GaudiVersion = v31r0.002 diff --git a/Projects/Athena/externals/HEPUtils.cmake b/Projects/Athena/externals/HEPUtils.cmake index 27acb546c018a84bbefb77daf190b94a47cde026..8344158ac506661512518cc490a53e012719bfd0 100644 --- a/Projects/Athena/externals/HEPUtils.cmake +++ b/Projects/Athena/externals/HEPUtils.cmake @@ -2,6 +2,6 @@ # File specifying the location of HEPUtils to use. # -set( HEPUTILS_LCGVERSION 1.1.0 ) +set( HEPUTILS_LCGVERSION 1.3.2 ) set( HEPUTILS_LCGROOT ${LCG_RELEASE_DIR}/MCGenerators/heputils/${HEPUTILS_LCGVERSION}/${LCG_PLATFORM} ) diff --git a/Projects/WorkDir/Doxyfile.in b/Projects/WorkDir/Doxyfile.in index 8b4f83debe58b561de06270a5bfc02da9007a915..4f86f96918a684fdfcf886915423108a887417a0 100644 --- a/Projects/WorkDir/Doxyfile.in +++ b/Projects/WorkDir/Doxyfile.in @@ -17,5 +17,5 @@ RECURSIVE = YES SOURCE_BROWSER = YES INLINE_SOURCES = YES GENERATE_LATEX = NO -DOT_PATH = @GRAPHVIZ_DIR@/bin +DOT_PATH = @GRAPHVIZ_LCGROOT@/bin HAVE_DOT = YES diff --git a/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetVertexFractionTool.h b/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetVertexFractionTool.h index 68c9e910b6bf3360a5e419af166b291cd9e097b9..ac3f1931fd7854756e6d5707c7443aa9d1b64d32 100644 --- a/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetVertexFractionTool.h +++ b/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetVertexFractionTool.h @@ -119,6 +119,8 @@ private: // methods const std::vector<const xAOD::TrackParticle*>&, const jet::TrackVertexAssociation*) const; +protected: + bool m_isTrigger; }; diff --git a/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetVertexTaggerTool.h b/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetVertexTaggerTool.h index 68823c71171b86f9d1b415adfaecbf6141650083..2e4f378941523e14340527aee93cc9ce332c6a38 100644 --- a/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetVertexTaggerTool.h +++ b/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetVertexTaggerTool.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // JetVertexTaggerTool.h @@ -55,7 +55,6 @@ #include "xAODTracking/TrackParticle.h" #include "xAODTracking/TrackParticleContainer.h" -#include "JetInterface/IJetTrackSelector.h" #include "JetRec/JetModifierBase.h" #include "JetEDM/TrackVertexAssociation.h" #include "JetInterface/IJetModifier.h" @@ -105,15 +104,12 @@ public: private: // data // Configurable parameters - std::string m_assocTracksName; - std::string m_tvaName; - std::string m_tracksName; + std::string m_verticesName; std::string m_jvfCorrName; std::string m_sumPtTrkName; std::string m_jvtlikelihoodHistName; std::string m_jvtfileName; std::string m_jvtName; - ToolHandle<IJetTrackSelector> m_htsel; TString m_fn; TFile * m_jvtfile; TH2F * m_jvthisto; diff --git a/Reconstruction/Jet/JetMomentTools/Root/JetVertexFractionTool.cxx b/Reconstruction/Jet/JetMomentTools/Root/JetVertexFractionTool.cxx index 06ce33713eb9a25f4dca955ce3366e1bfdfd1e2f..695f73a27b774bcb25e7af7e400e00bff3ac5397 100644 --- a/Reconstruction/Jet/JetMomentTools/Root/JetVertexFractionTool.cxx +++ b/Reconstruction/Jet/JetMomentTools/Root/JetVertexFractionTool.cxx @@ -22,6 +22,7 @@ JetVertexFractionTool::JetVertexFractionTool(const std::string& name) declareProperty("VertexContainer", m_vertexContainer_key); declareProperty("TrackVertexAssociation", m_tva_key); declareProperty("TrackParticleContainer",m_tracksCont_key); + declareProperty("IsTrigger",m_isTrigger =false); } //********************************************************************** @@ -166,7 +167,7 @@ int JetVertexFractionTool::modify(xAOD::JetContainer& jetCont) const { std::vector<float> vsumpttrk = jet->getAttribute<std::vector<float> >(m_sumPtTrkName); float sumpttrk_all = tracksums.first; float sumpttrk_nonPV = tracksums.second; - float sumpttrk_PV = vsumpttrk[HSvertex->index()]; + float sumpttrk_PV = vsumpttrk[HSvertex->index() - (*vertices)[0]->index()]; // Get and set the JVF vector std::vector<float> jvf(vertices->size()); @@ -176,9 +177,10 @@ int JetVertexFractionTool::modify(xAOD::JetContainer& jetCont) const { jet->setAttribute(m_jvfname, jvf); // Get and set the highest JVF vertex - jet->setAttribute("Highest" + m_jvfname + "Vtx",getMaxJetVertexFraction(vertices,jvf)); - - // Calculate RpT and JVFCorr + if(!m_isTrigger) { + jet->setAttribute("Highest" + m_jvfname + "Vtx",getMaxJetVertexFraction(vertices,jvf)); + } + // Calculate RpT and JVFCorr // Default JVFcorr to -1 when no tracks are associated. float jvfcorr = -999.; if(sumpttrk_PV + sumpttrk_nonPV > 0) { @@ -286,15 +288,19 @@ int JetVertexFractionTool::getPileupTrackCount(const xAOD::Vertex* vertex, const xAOD::Vertex* JetVertexFractionTool::findHSVertex(const xAOD::VertexContainer*& vertices) const { - for ( size_t iVertex = 0; iVertex < vertices->size(); ++iVertex ) { - if(vertices->at(iVertex)->vertexType() == xAOD::VxType::PriVtx) { - - ATH_MSG_VERBOSE("JetVertexFractionTool " << name() << " Found HS vertex at index: "<< iVertex); - return vertices->at(iVertex); - } + const xAOD::Vertex* primvert = nullptr; + for (const xAOD::Vertex* pv : *vertices) { + if (pv->vertexType() == xAOD::VxType::PriVtx ) { + primvert = pv; + ATH_MSG_VERBOSE("JetVertexFractionTool " << name() << " Found HS vertex."); + break; + } + } + if (primvert == nullptr ) { + ATH_MSG_VERBOSE("There is no vertex of type PriVx. Taking default vertex."); + primvert = *(vertices->begin()); } - ATH_MSG_VERBOSE("There is no vertex of type PriVx. Taking default vertex."); - return vertices->at(0); + return primvert; } //********************************************************************** diff --git a/Reconstruction/Jet/JetMomentTools/Root/JetVertexTaggerTool.cxx b/Reconstruction/Jet/JetMomentTools/Root/JetVertexTaggerTool.cxx index 09e0fd97d5c7dceea9714e01714da16d96ce58fe..6c4a709b2f737b9c7c1368232d4b78fd03dc432c 100644 --- a/Reconstruction/Jet/JetMomentTools/Root/JetVertexTaggerTool.cxx +++ b/Reconstruction/Jet/JetMomentTools/Root/JetVertexTaggerTool.cxx @@ -1,7 +1,7 @@ ///////////////////////// -*- C++ -*- //////////////////////////// /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // JetVertexTaggerTool.cxx @@ -21,14 +21,12 @@ JetVertexTaggerTool::JetVertexTaggerTool(const std::string& name) : asg::AsgTool(name) , m_jvtlikelihoodHistName("") , m_jvtfileName("") -, m_htsel("") { declareProperty("JVFCorrName", m_jvfCorrName="JVFCorr"); declareProperty("SumPtTrkName", m_sumPtTrkName="SumPtTrkPt500"); declareProperty("JVTFileName",m_jvtfileName = "JVTlikelihood_20140805.root"); declareProperty("JVTLikelihoodHistName",m_jvtlikelihoodHistName = "JVTRootCore_kNN100trim_pt20to50_Likelihood"); - declareProperty("TrackSelector", m_htsel); declareProperty("JVTName", m_jvtName ="Jvt"); declareProperty("VertexContainer", m_vertexContainer_key="PrimaryVertices"); @@ -41,12 +39,6 @@ StatusCode JetVertexTaggerTool::initialize() { ATH_MSG_DEBUG("initializing version with data handles"); ATH_MSG_INFO("Initializing JetVertexTaggerTool " << name()); - if ( m_htsel.empty() ) { - ATH_MSG_INFO(" No track selector."); - } else { - ATH_MSG_INFO(" Track selector: " << m_htsel->name()); - } - // Use the Path Resolver to find the jvt file and retrieve the likelihood histogram m_fn = PathResolverFindCalibFile(m_jvtfileName); ATH_MSG_INFO(" Reading JVT file from:\n " << m_jvtfileName << "\n"); @@ -101,7 +93,7 @@ int JetVertexTaggerTool::modify(xAOD::JetContainer& jetCont) const { // Default JVFcorr to -1 when no tracks are associated. float jvfcorr = jet->getAttribute<float>(m_jvfCorrName); std::vector<float> sumpttrkpt500 = jet->getAttribute<std::vector<float> >(m_sumPtTrkName); - const float rpt = sumpttrkpt500[HSvertex->index()]/jet->pt(); + const float rpt = sumpttrkpt500[HSvertex->index() - (*vertices)[0]->index()]/jet->pt(); float jvt = evaluateJvt(rpt, jvfcorr); jet->setAttribute(m_jvtName+"Rpt",rpt); diff --git a/Reconstruction/Jet/JetRec/Root/IParticleExtractor.cxx b/Reconstruction/Jet/JetRec/Root/IParticleExtractor.cxx index 2e3ed355f62fa11faa8148dbedb62a4f5a58ddd7..f1fdd906fd70a2386e92d8d7d2eaab77b37fa1b7 100644 --- a/Reconstruction/Jet/JetRec/Root/IParticleExtractor.cxx +++ b/Reconstruction/Jet/JetRec/Root/IParticleExtractor.cxx @@ -55,7 +55,7 @@ void IParticleExtractor::addToJet(xAOD::Jet& jet, [](double sumPt, const xAOD::IParticle* p){ return sumPt + p->pt();}); - if (!m_isTrigger){jet.setAssociatedObjects(m_label, constituents);} + if ( (!m_isTrigger) || (m_label == "GhostTrack") ){jet.setAssociatedObjects(m_label, constituents);} jet.setAttribute<float>(m_label + "Pt", ptSum); jet.setAttribute<int>(m_label+"Count", constituents.size()); } else { diff --git a/Reconstruction/Jet/JetRecTools/JetRecTools/JetConstituentModSequence.h b/Reconstruction/Jet/JetRecTools/JetRecTools/JetConstituentModSequence.h index 50ded5fd4265ce7eda3aa91cbff5fa26053994ac..f14d27742687e2ba58de93c443b940e2bbc7ebe0 100644 --- a/Reconstruction/Jet/JetRecTools/JetRecTools/JetConstituentModSequence.h +++ b/Reconstruction/Jet/JetRecTools/JetRecTools/JetConstituentModSequence.h @@ -75,6 +75,12 @@ protected: StatusCode copyModRecord(const SG::ReadHandleKey<T>&, const SG::WriteHandleKey<T>&) const; + + // temporary trigger helper needed until we can + // decommission TrigHLTJetRec classes + template<class T, class Taux, class Tsingle> + StatusCode + copyModForTrigger(const T&) const; }; template<class T> @@ -106,5 +112,28 @@ JetConstituentModSequence::copyModRecord(const SG::ReadHandleKey<T>& inKey, return StatusCode::SUCCESS; } +template<class T, class Taux, class Tsingle> +StatusCode +JetConstituentModSequence::copyModForTrigger(const T& originals) const +{ + + // This is the trigger case, revert to a deep copy of the input container. + // Create the new container and its auxiliary store. + T* constitCopy = new T(); + Taux* constitCopyAux = new Taux(); + constitCopy->setStore( constitCopyAux ); //< Connect the two + + for(const Tsingle* orig_constit : originals) { + Tsingle* theconstit = new Tsingle(); + constitCopy->push_back( theconstit ); + *theconstit= *orig_constit; // copies auxdata from one auxstore to the other + } + + for (auto t : m_modifiers) {ATH_CHECK(t->process(constitCopy));} + + // Update the output container pointer + m_trigOutputConstits = constitCopy; + return StatusCode::SUCCESS; +} #endif diff --git a/Reconstruction/Jet/JetRecTools/Root/JetConstituentModSequence.cxx b/Reconstruction/Jet/JetRecTools/Root/JetConstituentModSequence.cxx index 4a8b4b1b0fd3e7f84616d2f8c523a55970f7f09d..e2e17de28ffb820351aed16c8bf60521156e1391 100644 --- a/Reconstruction/Jet/JetRecTools/Root/JetConstituentModSequence.cxx +++ b/Reconstruction/Jet/JetRecTools/Root/JetConstituentModSequence.cxx @@ -7,6 +7,7 @@ // Will later add the intermediate step #include "JetRecTools/JetConstituentModSequence.h" +#include "xAODCaloEvent/CaloClusterAuxContainer.h" JetConstituentModSequence::JetConstituentModSequence(const std::string &name): asg::AsgTool(name), @@ -19,7 +20,7 @@ JetConstituentModSequence::JetConstituentModSequence(const std::string &name): declareProperty("OutputContainer", m_outputContainer, "The output container for the sequence."); declareProperty("InputType", m_inputType, "The xAOD type name for the input container."); declareProperty("Modifiers", m_modifiers, "List of IJet tools."); - declareProperty("Trigger", m_trigger=false); + declareProperty("Trigger", m_trigger=false); declareProperty("SaveAsShallow", m_saveAsShallow=true, "Save as shallow copy"); } @@ -72,19 +73,29 @@ StatusCode JetConstituentModSequence::initialize() { } int JetConstituentModSequence::execute() const { - if (m_trigger){return 0;} // Create the shallow copy according to the input type switch(m_inputType){ case xAOD::Type::CaloCluster: { - auto sc = copyModRecord(m_inClusterKey, - m_outClusterKey); - if(!sc.isSuccess()){return 1;} + if (m_trigger){ + auto clustersin = dynamic_cast<const xAOD::CaloClusterContainer*>(m_trigInputConstits); + if(clustersin==nullptr) { + ATH_MSG_ERROR("Failed to cast trigInputConstits to CaloCluster"); + return(3); + } + auto sc = copyModForTrigger<xAOD::CaloClusterContainer,xAOD::CaloClusterAuxContainer,xAOD::CaloCluster>(*clustersin); + if(!sc.isSuccess()){return 1;} + } else { + auto sc = copyModRecord(m_inClusterKey, + m_outClusterKey); + if(!sc.isSuccess()){return 1;} + } break; } case xAOD::Type::ParticleFlow: { + if (m_trigger){return 2;} auto sc = copyModRecordPFO(); if(!sc.isSuccess()){return 1;} break; diff --git a/Reconstruction/MVAUtils/CMakeLists.txt b/Reconstruction/MVAUtils/CMakeLists.txt index 7774cf602d8dcfc71378f87acd9fff466491adb5..3b392df10ad2b57945adc42d884db32c433fdbd5 100644 --- a/Reconstruction/MVAUtils/CMakeLists.txt +++ b/Reconstruction/MVAUtils/CMakeLists.txt @@ -5,6 +5,10 @@ # Declare the package name: atlas_subdir( MVAUtils ) +atlas_depends_on_subdirs( + PRIVATE + Control/CxxUtils ) + # External dependencies: find_package( ROOT COMPONENTS Tree TreePlayer TMVA XMLIO Core MathCore Hist RIO pthread ) diff --git a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCombinedStacoTagTool.cxx b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCombinedStacoTagTool.cxx index 65b24990ca82541f731870bd9cc45c0bae45bfd2..64c4acc58c8a2e89d3a7e8abf0f5a1428ac02186 100644 --- a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCombinedStacoTagTool.cxx +++ b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCombinedStacoTagTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ ////////////////////////////////////////////////////////////////////////////// @@ -26,14 +26,16 @@ namespace MuonCombined { MuonCombinedStacoTagTool::MuonCombinedStacoTagTool (const std::string& type, const std::string& name, const IInterface* parent) : AthAlgTool(type, name, parent), - m_printer("Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"), - m_tagTool("MuonCombined::MuonTrackTagTestTool/MuonTrackTagTestTool"), - m_extrapolator ("Trk::Extrapolator/AtlasExtrapolator") + m_printer("Muon::MuonEDMPrinterTool/MuonEDMPrinterTool",this), + m_tagTool("MuonCombined::MuonTrackTagTestTool/MuonTrackTagTestTool",this), + m_extrapolator("Trk::Extrapolator/AtlasExtrapolator"), + m_caloExtTool("Trk::ParticleCaloExtensionTool/ParticleCaloExtensionTool",this) { declareInterface<IMuonCombinedTagTool>(this); declareProperty("Printer",m_printer ); declareProperty("TagTool",m_tagTool ); declareProperty("Extrapolator",m_extrapolator ); + declareProperty("ParticleCaloExtensionTool", m_caloExtTool); } MuonCombinedStacoTagTool::~MuonCombinedStacoTagTool() @@ -47,6 +49,7 @@ namespace MuonCombined { ATH_CHECK(m_printer.retrieve()); ATH_CHECK(m_tagTool.retrieve()); ATH_CHECK(m_extrapolator.retrieve()); + ATH_CHECK(m_caloExtTool.retrieve()); return StatusCode::SUCCESS; } @@ -78,6 +81,11 @@ namespace MuonCombined { // ensure that also the id has a perigee with covariance if( !idTP->indetTrackParticle().perigeeParameters().covariance() ) continue; + //ensure that id tp can be extrapolated to something + std::unique_ptr<Trk::CaloExtension> caloExtension = m_caloExtTool->caloExtension(idTP->indetTrackParticle()); + if(!caloExtension) continue; + if(caloExtension->caloLayerIntersections().empty()) continue; + const Trk::Perigee* idPer = &idTP->indetTrackParticle().perigeeParameters(); const Trk::Perigee* msPer = muonCandidate.extrapolatedTrack()->perigeeParameters(); diff --git a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCombinedStacoTagTool.h b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCombinedStacoTagTool.h index 0bc7e2be2bdec16eb68d8e740ec7eb9aee4e471c..e718b4a7348ac2c9683455b9387cfc1c2d8b3ca1 100644 --- a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCombinedStacoTagTool.h +++ b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCombinedStacoTagTool.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef MUONCOMBINEDBASETOOLS_MUONCOMBINEDSTACOTAGTOOL_H @@ -14,6 +14,7 @@ #include "TrkTrack/TrackCollection.h" #include "TrkParameters/TrackParameters.h" #include "TrkSegment/SegmentCollection.h" +#include "RecoToolInterfaces/IParticleCaloExtensionTool.h" #include <vector> //<<<<<< CLASS DECLARATIONS >>>>>> @@ -55,6 +56,7 @@ namespace MuonCombined { ToolHandle<Muon::MuonEDMPrinterTool> m_printer; ToolHandle<MuonCombined::IMuonTrackTagTool> m_tagTool; ToolHandle<Trk::IExtrapolator> m_extrapolator; + ToolHandle<Trk::IParticleCaloExtensionTool> m_caloExtTool; }; diff --git a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonDressingTool.cxx b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonDressingTool.cxx index f5eabbd88d559b7b4deb2d6d44b54dfc34e7bd88..3f754ab3a863744c330204f591163b5e2c5d0481 100644 --- a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonDressingTool.cxx +++ b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonDressingTool.cxx @@ -15,475 +15,550 @@ #include "TrkTrackSummary/MuonTrackSummary.h" namespace MuonCombined { - - //<<<<<< CLASS STRUCTURE INITIALIZATION >>>>>> - - MuonDressingTool::MuonDressingTool (const std::string& type, const std::string& name, const IInterface* parent) - : AthAlgTool(type, name, parent), - m_hitSummaryTool("Muon::MuonHitSummaryTool/MuonHitSummaryTool"), - m_idHelper("Muon::MuonIdHelperTool/MuonIdHelperTool") - - { - declareInterface<xAOD::IMuonDressingTool>(this); - declareProperty("MuonHitSummaryTool",m_hitSummaryTool ); - declareProperty("MuonIdHelperTool",m_idHelper ); - } - - MuonDressingTool::~MuonDressingTool() - {} - - //<<<<<< PUBLIC MEMBER FUNCTION DEFINITIONS >>>>>> - StatusCode MuonDressingTool::initialize() { - - ATH_CHECK(m_hitSummaryTool.retrieve()); - ATH_CHECK(m_idHelper.retrieve()); - - return StatusCode::SUCCESS; +//<<<<<< CLASS STRUCTURE INITIALIZATION >>>>>> + +MuonDressingTool::MuonDressingTool (const std::string& type, const std::string& name, const IInterface* parent) + : AthAlgTool(type, name, parent), + m_hitSummaryTool("Muon::MuonHitSummaryTool/MuonHitSummaryTool"), + m_idHelper("Muon::MuonIdHelperTool/MuonIdHelperTool") + +{ + declareInterface<xAOD::IMuonDressingTool>(this); + declareProperty("MuonHitSummaryTool", m_hitSummaryTool ); + declareProperty("MuonIdHelperTool", m_idHelper ); +} + +MuonDressingTool::~MuonDressingTool() +{} + +//<<<<<< PUBLIC MEMBER FUNCTION DEFINITIONS >>>>>> + +StatusCode MuonDressingTool::initialize() { + + ATH_CHECK(m_hitSummaryTool.retrieve()); + ATH_CHECK(m_idHelper.retrieve()); + + return StatusCode::SUCCESS; +} + +StatusCode MuonDressingTool::finalize() { + return StatusCode::SUCCESS; +} + +void MuonDressingTool::addMuonHitSummary( xAOD::Muon& muon, const Trk::TrackSummary* trackSummary ) const { + + uint8_t mainSector = 0; + uint8_t secondSector = 0; + + uint8_t innerSmallHits = 0; + uint8_t innerLargeHits = 0; + uint8_t middleSmallHits = 0; + uint8_t middleLargeHits = 0; + uint8_t outerSmallHits = 0; + uint8_t outerLargeHits = 0; + uint8_t extendedSmallHits = 0; + uint8_t extendedLargeHits = 0; + + uint8_t innerSmallHoles = 0; + uint8_t innerLargeHoles = 0; + uint8_t middleSmallHoles = 0; + uint8_t middleLargeHoles = 0; + uint8_t outerSmallHoles = 0; + uint8_t outerLargeHoles = 0; + uint8_t extendedSmallHoles = 0; + uint8_t extendedLargeHoles = 0; + + uint8_t phiLayer1Hits = 0; + uint8_t phiLayer2Hits = 0; + uint8_t phiLayer3Hits = 0; + uint8_t phiLayer4Hits = 0; + + uint8_t etaLayer1Hits = 0; + uint8_t etaLayer2Hits = 0; + uint8_t etaLayer3Hits = 0; + uint8_t etaLayer4Hits = 0; + + uint8_t phiLayer1Holes = 0; + uint8_t phiLayer2Holes = 0; + uint8_t phiLayer3Holes = 0; + uint8_t phiLayer4Holes = 0; + + uint8_t etaLayer1Holes = 0; + uint8_t etaLayer2Holes = 0; + uint8_t etaLayer3Holes = 0; + uint8_t etaLayer4Holes = 0; + + uint8_t phiLayer1RPCHits = 0; + uint8_t phiLayer2RPCHits = 0; + uint8_t phiLayer3RPCHits = 0; + uint8_t phiLayer4RPCHits = 0; + + uint8_t etaLayer1RPCHits = 0; + uint8_t etaLayer2RPCHits = 0; + uint8_t etaLayer3RPCHits = 0; + uint8_t etaLayer4RPCHits = 0; + + uint8_t phiLayer1RPCHoles = 0; + uint8_t phiLayer2RPCHoles = 0; + uint8_t phiLayer3RPCHoles = 0; + uint8_t phiLayer4RPCHoles = 0; + + uint8_t etaLayer1RPCHoles = 0; + uint8_t etaLayer2RPCHoles = 0; + uint8_t etaLayer3RPCHoles = 0; + uint8_t etaLayer4RPCHoles = 0; + + uint8_t phiLayer1TGCHits = 0; + uint8_t phiLayer2TGCHits = 0; + uint8_t phiLayer3TGCHits = 0; + uint8_t phiLayer4TGCHits = 0; + + uint8_t etaLayer1TGCHits = 0; + uint8_t etaLayer2TGCHits = 0; + uint8_t etaLayer3TGCHits = 0; + uint8_t etaLayer4TGCHits = 0; + + uint8_t phiLayer1TGCHoles = 0; + uint8_t phiLayer2TGCHoles = 0; + uint8_t phiLayer3TGCHoles = 0; + uint8_t phiLayer4TGCHoles = 0; + + uint8_t etaLayer1TGCHoles = 0; + uint8_t etaLayer2TGCHoles = 0; + uint8_t etaLayer3TGCHoles = 0; + uint8_t etaLayer4TGCHoles = 0; + + // New Small Wheel + // STGC + uint8_t phiLayer1STGCHits = 0; + uint8_t phiLayer2STGCHits = 0; + + uint8_t etaLayer1STGCHits = 0; + uint8_t etaLayer2STGCHits = 0; + + uint8_t phiLayer1STGCHoles = 0; + uint8_t phiLayer2STGCHoles = 0; + + uint8_t etaLayer1STGCHoles = 0; + uint8_t etaLayer2STGCHoles = 0; + + // MM + uint8_t MMHits = 0; + uint8_t MMHoles = 0; + // Note: there is currently no MuonStationIndex for the two MM layers + // In the future it might be needed to add them in order to have + // separate counters as follows + // uint8_t Layer1MMHits = 0; + // uint8_t Layer2MMHits = 0; + // uint8_t Layer1MMHoles = 0; + // uint8_t Layer2MMHoles = 0; + + + uint8_t innerCloseHits = 0; + uint8_t middleCloseHits = 0; + uint8_t outerCloseHits = 0; + uint8_t extendedCloseHits = 0; + + uint8_t innerOutBoundsHits = 0; + uint8_t middleOutBoundsHits = 0; + uint8_t outerOutBoundsHits = 0; + uint8_t extendedOutBoundsHits = 0; + + uint8_t combinedTrackOutBoundsHits = 0; + + uint8_t numberOfPrecisionLayers = 0; + uint8_t numberOfPrecisionHoleLayers = 0; + uint8_t numberOfPhiLayers = 0; + uint8_t numberOfPhiHoleLayers = 0; + uint8_t numberOfTriggerEtaLayers = 0; + uint8_t numberOfTriggerEtaHoleLayers = 0; + uint8_t numberOfGoodPrecisionLayers = 0; + + uint8_t isEndcap = 0; + uint8_t isSmall = 0; + + uint8_t cscEtaHits = 0; + uint8_t cscUnspoiledEtaHits = 0; + + const Trk::TrackSummary* mstpTrackSummary = 0; + + if ( !trackSummary ) { + // get link to track particle + ElementLink< xAOD::TrackParticleContainer > tpLink = muon.combinedTrackParticleLink(); + if ( !tpLink.isValid() ) tpLink = muon.muonSpectrometerTrackParticleLink(); + if ( tpLink.isValid() ) { + + // check link to track + if ( (*tpLink)->trackLink().isValid() ) trackSummary = (*tpLink)->track()->trackSummary(); + } } - StatusCode MuonDressingTool::finalize() { - return StatusCode::SUCCESS; - } + if ( trackSummary ) { - void MuonDressingTool::addMuonHitSummary( xAOD::Muon& muon, const Trk::TrackSummary* trackSummary ) const { - - uint8_t mainSector = 0; - uint8_t secondSector = 0; - - uint8_t innerSmallHits = 0; - uint8_t innerLargeHits = 0; - uint8_t middleSmallHits = 0; - uint8_t middleLargeHits = 0; - uint8_t outerSmallHits = 0; - uint8_t outerLargeHits = 0; - uint8_t extendedSmallHits = 0; - uint8_t extendedLargeHits = 0; - - uint8_t innerSmallHoles = 0; - uint8_t innerLargeHoles = 0; - uint8_t middleSmallHoles = 0; - uint8_t middleLargeHoles = 0; - uint8_t outerSmallHoles = 0; - uint8_t outerLargeHoles = 0; - uint8_t extendedSmallHoles = 0; - uint8_t extendedLargeHoles = 0; - - uint8_t phiLayer1Hits = 0; - uint8_t phiLayer2Hits = 0; - uint8_t phiLayer3Hits = 0; - uint8_t phiLayer4Hits = 0; - - uint8_t etaLayer1Hits = 0; - uint8_t etaLayer2Hits = 0; - uint8_t etaLayer3Hits = 0; - uint8_t etaLayer4Hits = 0; - - uint8_t phiLayer1Holes = 0; - uint8_t phiLayer2Holes = 0; - uint8_t phiLayer3Holes = 0; - uint8_t phiLayer4Holes = 0; - - uint8_t etaLayer1Holes = 0; - uint8_t etaLayer2Holes = 0; - uint8_t etaLayer3Holes = 0; - uint8_t etaLayer4Holes = 0; - - uint8_t phiLayer1RPCHits = 0; - uint8_t phiLayer2RPCHits = 0; - uint8_t phiLayer3RPCHits = 0; - - uint8_t etaLayer1RPCHits = 0; - uint8_t etaLayer2RPCHits = 0; - uint8_t etaLayer3RPCHits = 0; - - uint8_t phiLayer1RPCHoles = 0; - uint8_t phiLayer2RPCHoles = 0; - uint8_t phiLayer3RPCHoles = 0; - - uint8_t etaLayer1RPCHoles = 0; - uint8_t etaLayer2RPCHoles = 0; - uint8_t etaLayer3RPCHoles = 0; - - uint8_t phiLayer1TGCHits = 0; - uint8_t phiLayer2TGCHits = 0; - uint8_t phiLayer3TGCHits = 0; - uint8_t phiLayer4TGCHits = 0; - - uint8_t etaLayer1TGCHits = 0; - uint8_t etaLayer2TGCHits = 0; - uint8_t etaLayer3TGCHits = 0; - uint8_t etaLayer4TGCHits = 0; - - uint8_t phiLayer1TGCHoles = 0; - uint8_t phiLayer2TGCHoles = 0; - uint8_t phiLayer3TGCHoles = 0; - uint8_t phiLayer4TGCHoles = 0; - - uint8_t etaLayer1TGCHoles = 0; - uint8_t etaLayer2TGCHoles = 0; - uint8_t etaLayer3TGCHoles = 0; - uint8_t etaLayer4TGCHoles = 0; - - uint8_t innerCloseHits = 0; - uint8_t middleCloseHits = 0; - uint8_t outerCloseHits = 0; - uint8_t extendedCloseHits = 0; - - uint8_t innerOutBoundsHits = 0; - uint8_t middleOutBoundsHits = 0; - uint8_t outerOutBoundsHits = 0; - uint8_t extendedOutBoundsHits = 0; - - uint8_t combinedTrackOutBoundsHits = 0; - - uint8_t numberOfPrecisionLayers = 0; - uint8_t numberOfPrecisionHoleLayers = 0; - uint8_t numberOfPhiLayers = 0; - uint8_t numberOfPhiHoleLayers = 0; - uint8_t numberOfTriggerEtaLayers = 0; - uint8_t numberOfTriggerEtaHoleLayers = 0; - uint8_t numberOfGoodPrecisionLayers = 0; - - uint8_t isEndcap = 0; - uint8_t isSmall = 0; - - const Trk::TrackSummary* mstpTrackSummary=0; - - if( !trackSummary ){ - // get link to track particle - ElementLink< xAOD::TrackParticleContainer > tpLink = muon.combinedTrackParticleLink(); - if( !tpLink.isValid() ) tpLink = muon.muonSpectrometerTrackParticleLink(); - if( tpLink.isValid() ){ - - // check link to track - if( (*tpLink)->trackLink().isValid() ) trackSummary = (*tpLink)->track()->trackSummary(); - } + Muon::IMuonHitSummaryTool::CompactSummary summary = m_hitSummaryTool->summary(*trackSummary); + mainSector = summary.mainSector; + secondSector = mainSector; + for ( auto sec : summary.sectors ) { + if ( sec != summary.mainSector ) secondSector = sec; } - - if( trackSummary ) { - - Muon::IMuonHitSummaryTool::CompactSummary summary = m_hitSummaryTool->summary(*trackSummary); - mainSector = summary.mainSector; - secondSector = mainSector; - for( auto sec : summary.sectors ){ - if( sec != summary.mainSector ) secondSector = sec; - } - numberOfPrecisionLayers = summary.nprecisionLayers; - numberOfPrecisionHoleLayers = summary.nprecisionHoleLayers; - numberOfPhiLayers = summary.nphiLayers; - numberOfPhiHoleLayers = summary.nphiHoleLayers; - numberOfTriggerEtaLayers = summary.ntrigEtaLayers; - numberOfTriggerEtaHoleLayers = summary.ntrigEtaHoleLayers; - numberOfGoodPrecisionLayers = summary.nprecisionGoodLayers; - //std::cout<<"isEndcap starts as "<<(int)isEndcap<<" and isSmall as "<<(int)isSmall<<std::endl; - if(summary.isEndcap){ isEndcap=1; /*std::cout<<"now, isEndcap is "<<(int)isEndcap<<std::endl;*/} - if(summary.isSmall){ isSmall=1; /*std::cout<<"now, isSmall is "<<(int)isSmall<<std::endl;*/} - - for(auto layer : summary.stationLayers){ - combinedTrackOutBoundsHits+=layer.second.noutBoundsHits; - if(layer.first==Muon::MuonStationIndex::BI || layer.first==Muon::MuonStationIndex::EI){ - innerCloseHits+=layer.second.nprecisionCloseHits; - } - if(layer.first==Muon::MuonStationIndex::BM || layer.first==Muon::MuonStationIndex::EM){ - middleCloseHits+=layer.second.nprecisionCloseHits; - } - if(layer.first==Muon::MuonStationIndex::BO || layer.first==Muon::MuonStationIndex::EO){ - outerCloseHits+=layer.second.nprecisionCloseHits; - } - if(layer.first==Muon::MuonStationIndex::BE || layer.first==Muon::MuonStationIndex::EE){ - extendedCloseHits+=layer.second.nprecisionCloseHits; - } + numberOfPrecisionLayers = summary.nprecisionLayers; + numberOfPrecisionHoleLayers = summary.nprecisionHoleLayers; + numberOfPhiLayers = summary.nphiLayers; + numberOfPhiHoleLayers = summary.nphiHoleLayers; + numberOfTriggerEtaLayers = summary.ntrigEtaLayers; + numberOfTriggerEtaHoleLayers = summary.ntrigEtaHoleLayers; + numberOfGoodPrecisionLayers = summary.nprecisionGoodLayers; + + if (summary.isEndcap) isEndcap = 1; + if (summary.isSmall) isSmall = 1; + + for (auto layer : summary.stationLayers) { + combinedTrackOutBoundsHits += layer.second.noutBoundsHits; + if (layer.first == Muon::MuonStationIndex::BI || layer.first == Muon::MuonStationIndex::EI) { + innerCloseHits += layer.second.nprecisionCloseHits; } - - //get out-of-bounds from ME track, shouldn't be any on combined track anyway - ElementLink< xAOD::TrackParticleContainer > mstpLink = muon.muonSpectrometerTrackParticleLink(); - if(mstpLink.isValid()){ - if( (*mstpLink)->trackLink().isValid() ) mstpTrackSummary = (*mstpLink)->track()->trackSummary(); - - if(mstpTrackSummary){ - for(auto layer : m_hitSummaryTool->summary(*mstpTrackSummary).stationLayers){ - if(layer.first==Muon::MuonStationIndex::BI || layer.first==Muon::MuonStationIndex::EI){ - innerOutBoundsHits+=layer.second.noutBoundsHits; - } - if(layer.first==Muon::MuonStationIndex::BM || layer.first==Muon::MuonStationIndex::EM){ - middleOutBoundsHits+=layer.second.noutBoundsHits; - } - if(layer.first==Muon::MuonStationIndex::BO || layer.first==Muon::MuonStationIndex::EO){ - outerOutBoundsHits+=layer.second.noutBoundsHits; - } - if(layer.first==Muon::MuonStationIndex::BE || layer.first==Muon::MuonStationIndex::EE){ - extendedOutBoundsHits+=layer.second.noutBoundsHits; - } - } - } + if (layer.first == Muon::MuonStationIndex::BM || layer.first == Muon::MuonStationIndex::EM) { + middleCloseHits += layer.second.nprecisionCloseHits; } - - // hack for now to get hit counts onto the track particle - /* - ElementLink< xAOD::TrackParticleContainer > tpLink = muon.combinedTrackParticleLink(); - if( !tpLink.isValid() ) tpLink = muon.muonSpectrometerTrackParticleLink(); - if( tpLink.isValid() ){ - xAOD::TrackParticle* tp = const_cast<xAOD::TrackParticle*>(*tpLink); - if( tp ){ - uint8_t numberOfPrecisionLayers = summary.nprecisionLayers; - uint8_t numberOfPrecisionHoleLayers = summary.nprecisionHoleLayers; - uint8_t numberOfPhiLayers = summary.nphiLayers; - uint8_t numberOfPhiHoleLayers = summary.nphiHoleLayers; - uint8_t numberOfTriggerEtaLayers = summary.ntrigEtaLayers; - uint8_t numberOfTriggerEtaHoleLayers = summary.ntrigEtaHoleLayers; - tp->setSummaryValue(numberOfPrecisionLayers,xAOD::numberOfPrecisionLayers); - tp->setSummaryValue(numberOfPrecisionHoleLayers,xAOD::numberOfPrecisionHoleLayers); - tp->setSummaryValue(numberOfPhiLayers,xAOD::numberOfPhiLayers); - tp->setSummaryValue(numberOfPhiHoleLayers,xAOD::numberOfPhiHoleLayers); - tp->setSummaryValue(numberOfTriggerEtaLayers,xAOD::numberOfTriggerEtaLayers); - tp->setSummaryValue(numberOfTriggerEtaHoleLayers,xAOD::numberOfTriggerEtaHoleLayers); - } + if (layer.first == Muon::MuonStationIndex::BO || layer.first == Muon::MuonStationIndex::EO) { + outerCloseHits += layer.second.nprecisionCloseHits; } - */ - - if( trackSummary->muonTrackSummary() ){ - const Trk::MuonTrackSummary& mts = *trackSummary->muonTrackSummary(); - - // loop over chambers - std::vector<Trk::MuonTrackSummary::ChamberHitSummary>::const_iterator chit = mts.chamberHitSummary().begin(); - std::vector<Trk::MuonTrackSummary::ChamberHitSummary>::const_iterator chit_end = mts.chamberHitSummary().end(); - for( ;chit!=chit_end;++chit ) { - const Identifier& chId = chit->chamberId(); - bool isMdt = m_idHelper->isMdt(chId); - bool isCsc = m_idHelper->isCsc(chId); - bool isMM = m_idHelper->isMM(chId); - bool issTgc = m_idHelper->issTgc(chId); - if( isMdt || isMM || isCsc || issTgc ){ - Muon::MuonStationIndex::ChIndex index = m_idHelper->chamberIndex(chId); - uint8_t* hits = 0; - uint8_t* holes = 0; - if( index == Muon::MuonStationIndex::BIS || index == Muon::MuonStationIndex::EIS || index == Muon::MuonStationIndex::CSS ) { - hits = &innerSmallHits; - holes = &innerSmallHoles; - }else if( index == Muon::MuonStationIndex::BIL || index == Muon::MuonStationIndex::EIL || index == Muon::MuonStationIndex::CSL ){ - hits = &innerLargeHits; - holes = &innerLargeHoles; - }else if( index == Muon::MuonStationIndex::BMS || index == Muon::MuonStationIndex::EMS ){ - hits = &middleSmallHits; - holes = &middleSmallHoles; - }else if( index == Muon::MuonStationIndex::BML || index == Muon::MuonStationIndex::EML ){ - hits = &middleLargeHits; - holes = &middleLargeHoles; - }else if( index == Muon::MuonStationIndex::BOS || index == Muon::MuonStationIndex::EOS ){ - hits = &outerSmallHits; - holes = &outerSmallHoles; - }else if( index == Muon::MuonStationIndex::BOL || index == Muon::MuonStationIndex::EOL ){ - hits = &outerLargeHits; - holes = &outerLargeHoles; - }else if( index == Muon::MuonStationIndex::BEE || index == Muon::MuonStationIndex::EES ){ - hits = &extendedSmallHits; - holes = &extendedSmallHoles; - }else if( index == Muon::MuonStationIndex::EEL ){ - hits = &extendedLargeHits; - holes = &extendedLargeHoles; - }else{ - ATH_MSG_WARNING("Unknown ChamberIndex" << Muon::MuonStationIndex::chName(index) ); - } - if( hits ){ - if(isMdt){ - *hits += chit->nhits(); - *holes += chit->nholes(); - } - else{ - *hits += chit->netaHits(); - *holes += chit->etaProjection().nholes; - } - } - } - if( !isMdt && !isMM ){ - - uint8_t* phiHits = 0; - uint8_t* phiHoles = 0; - uint8_t* etaHits = 0; - uint8_t* etaHoles = 0; - Muon::MuonStationIndex::PhiIndex index = m_idHelper->phiIndex(chId); - if( index == Muon::MuonStationIndex::BM1 || index == Muon::MuonStationIndex::T4 || - index == Muon::MuonStationIndex::CSC || index == Muon::MuonStationIndex::STGC1 || - index == Muon::MuonStationIndex::STGC2 ) { - phiHits = &phiLayer1Hits; - phiHoles = &phiLayer1Holes; - etaHits = &etaLayer1Hits; - etaHoles = &etaLayer1Holes; - }else if( index == Muon::MuonStationIndex::BM2 || index == Muon::MuonStationIndex::T1 ){ - phiHits = &phiLayer2Hits; - phiHoles = &phiLayer2Holes; - etaHits = &etaLayer2Hits; - etaHoles = &etaLayer2Holes; - }else if( index == Muon::MuonStationIndex::BO1 || index == Muon::MuonStationIndex::T2 ){ - phiHits = &phiLayer3Hits; - phiHoles = &phiLayer3Holes; - etaHits = &etaLayer3Hits; - etaHoles = &etaLayer3Holes; - }else if( index == Muon::MuonStationIndex::BO2 || index == Muon::MuonStationIndex::T3 ){ - phiHits = &phiLayer4Hits; - phiHoles = &phiLayer4Holes; - etaHits = &etaLayer4Hits; - etaHoles = &etaLayer4Holes; - }else{ - ATH_MSG_WARNING("Unknown ChamberIndex" << Muon::MuonStationIndex::phiName(index) ); - } - // split into RPC and TGC - if (index == Muon::MuonStationIndex::BM1){ - phiLayer1RPCHits += chit->nphiHits(); - etaLayer1RPCHits += chit->netaHits(); - phiLayer1RPCHoles += chit->phiProjection().nholes; - etaLayer1RPCHoles += chit->etaProjection().nholes; - } - else if (index == Muon::MuonStationIndex::BM2){ - phiLayer2RPCHits += chit->nphiHits(); - etaLayer2RPCHits += chit->netaHits(); - phiLayer2RPCHoles += chit->phiProjection().nholes; - etaLayer2RPCHoles += chit->etaProjection().nholes; - } - else if (index == Muon::MuonStationIndex::BO1){ - phiLayer3RPCHits += chit->nphiHits(); - etaLayer3RPCHits += chit->netaHits(); - phiLayer3RPCHoles += chit->phiProjection().nholes; - etaLayer3RPCHoles += chit->etaProjection().nholes; - } - else if (index == Muon::MuonStationIndex::T4){ - phiLayer1TGCHits += chit->nphiHits(); - etaLayer1TGCHits += chit->netaHits(); - phiLayer1TGCHoles += chit->phiProjection().nholes; - etaLayer1TGCHoles += chit->etaProjection().nholes; - } - else if (index == Muon::MuonStationIndex::T1){ - phiLayer2TGCHits += chit->nphiHits(); - etaLayer2TGCHits += chit->netaHits(); - phiLayer2TGCHoles += chit->phiProjection().nholes; - etaLayer2TGCHoles += chit->etaProjection().nholes; - } - else if (index == Muon::MuonStationIndex::T2){ - phiLayer3TGCHits += chit->nphiHits(); - etaLayer3TGCHits += chit->netaHits(); - phiLayer3TGCHoles += chit->phiProjection().nholes; - etaLayer3TGCHoles += chit->etaProjection().nholes; - } - else if (index == Muon::MuonStationIndex::T3){ - phiLayer4TGCHits += chit->nphiHits(); - etaLayer4TGCHits += chit->netaHits(); - phiLayer4TGCHoles += chit->phiProjection().nholes; - etaLayer4TGCHoles += chit->etaProjection().nholes; - } - if( phiHits ){ - *phiHits += chit->nphiHits(); - *phiHoles += chit->phiProjection().nholes; - } - if( etaHits && !isCsc && !issTgc ){ - *etaHits += chit->netaHits(); - *etaHoles += chit->etaProjection().nholes; - } - } - } + if (layer.first == Muon::MuonStationIndex::BE || layer.first == Muon::MuonStationIndex::EE) { + extendedCloseHits += layer.second.nprecisionCloseHits; } } - muon.setSummaryValue(numberOfPrecisionLayers,xAOD::numberOfPrecisionLayers); - muon.setSummaryValue(numberOfPrecisionHoleLayers,xAOD::numberOfPrecisionHoleLayers); - muon.setSummaryValue(numberOfPhiLayers,xAOD::numberOfPhiLayers); - muon.setSummaryValue(numberOfPhiHoleLayers,xAOD::numberOfPhiHoleLayers); - muon.setSummaryValue(numberOfTriggerEtaLayers,xAOD::numberOfTriggerEtaLayers); - muon.setSummaryValue(numberOfTriggerEtaHoleLayers,xAOD::numberOfTriggerEtaHoleLayers); - muon.setSummaryValue(numberOfGoodPrecisionLayers,xAOD::numberOfGoodPrecisionLayers); - - muon.setSummaryValue(mainSector,xAOD::primarySector); - muon.setSummaryValue(secondSector,xAOD::secondarySector); - muon.setSummaryValue(innerSmallHits,xAOD::innerSmallHits); - muon.setSummaryValue(innerLargeHits,xAOD::innerLargeHits); - muon.setSummaryValue(middleSmallHits,xAOD::middleSmallHits); - muon.setSummaryValue(middleLargeHits,xAOD::middleLargeHits); - muon.setSummaryValue(outerSmallHits,xAOD::outerSmallHits); - muon.setSummaryValue(outerLargeHits,xAOD::outerLargeHits); - muon.setSummaryValue(extendedSmallHits,xAOD::extendedSmallHits); - muon.setSummaryValue(extendedLargeHits,xAOD::extendedLargeHits); - - muon.setSummaryValue(innerSmallHoles,xAOD::innerSmallHoles); - muon.setSummaryValue(innerLargeHoles,xAOD::innerLargeHoles); - muon.setSummaryValue(middleSmallHoles,xAOD::middleSmallHoles); - muon.setSummaryValue(middleLargeHoles,xAOD::middleLargeHoles); - muon.setSummaryValue(outerSmallHoles,xAOD::outerSmallHoles); - muon.setSummaryValue(outerLargeHoles,xAOD::outerLargeHoles); - muon.setSummaryValue(extendedSmallHoles,xAOD::extendedSmallHoles); - muon.setSummaryValue(extendedLargeHoles,xAOD::extendedLargeHoles); - - muon.setSummaryValue(phiLayer1Hits,xAOD::phiLayer1Hits); - muon.setSummaryValue(phiLayer2Hits,xAOD::phiLayer2Hits); - muon.setSummaryValue(phiLayer3Hits,xAOD::phiLayer3Hits); - muon.setSummaryValue(phiLayer4Hits,xAOD::phiLayer4Hits); - - muon.setSummaryValue(etaLayer1Hits,xAOD::etaLayer1Hits); - muon.setSummaryValue(etaLayer2Hits,xAOD::etaLayer2Hits); - muon.setSummaryValue(etaLayer3Hits,xAOD::etaLayer3Hits); - muon.setSummaryValue(etaLayer4Hits,xAOD::etaLayer4Hits); - - muon.setSummaryValue(phiLayer1Holes,xAOD::phiLayer1Holes); - muon.setSummaryValue(phiLayer2Holes,xAOD::phiLayer2Holes); - muon.setSummaryValue(phiLayer3Holes,xAOD::phiLayer3Holes); - muon.setSummaryValue(phiLayer4Holes,xAOD::phiLayer4Holes); - - muon.setSummaryValue(etaLayer1Holes,xAOD::etaLayer1Holes); - muon.setSummaryValue(etaLayer2Holes,xAOD::etaLayer2Holes); - muon.setSummaryValue(etaLayer3Holes,xAOD::etaLayer3Holes); - muon.setSummaryValue(etaLayer4Holes,xAOD::etaLayer4Holes); - - muon.setSummaryValue(phiLayer1RPCHits, xAOD::phiLayer1RPCHits); - muon.setSummaryValue(phiLayer2RPCHits, xAOD::phiLayer2RPCHits); - muon.setSummaryValue(phiLayer3RPCHits, xAOD::phiLayer3RPCHits); - - muon.setSummaryValue(etaLayer1RPCHits, xAOD::etaLayer1RPCHits); - muon.setSummaryValue(etaLayer2RPCHits, xAOD::etaLayer2RPCHits); - muon.setSummaryValue(etaLayer3RPCHits, xAOD::etaLayer3RPCHits); - - muon.setSummaryValue(phiLayer1RPCHoles, xAOD::phiLayer1RPCHoles); - muon.setSummaryValue(phiLayer2RPCHoles, xAOD::phiLayer2RPCHoles); - muon.setSummaryValue(phiLayer3RPCHoles, xAOD::phiLayer3RPCHoles); - - muon.setSummaryValue(etaLayer1RPCHoles, xAOD::etaLayer1RPCHoles); - muon.setSummaryValue(etaLayer2RPCHoles, xAOD::etaLayer2RPCHoles); - muon.setSummaryValue(etaLayer3RPCHoles, xAOD::etaLayer3RPCHoles); - - muon.setSummaryValue(phiLayer1TGCHits, xAOD::phiLayer1TGCHits); - muon.setSummaryValue(phiLayer2TGCHits, xAOD::phiLayer2TGCHits); - muon.setSummaryValue(phiLayer3TGCHits, xAOD::phiLayer3TGCHits); - muon.setSummaryValue(phiLayer4TGCHits, xAOD::phiLayer4TGCHits); - - muon.setSummaryValue(etaLayer1TGCHits, xAOD::etaLayer1TGCHits); - muon.setSummaryValue(etaLayer2TGCHits, xAOD::etaLayer2TGCHits); - muon.setSummaryValue(etaLayer3TGCHits, xAOD::etaLayer3TGCHits); - muon.setSummaryValue(etaLayer4TGCHits, xAOD::etaLayer4TGCHits); - - muon.setSummaryValue(phiLayer1TGCHoles, xAOD::phiLayer1TGCHoles); - muon.setSummaryValue(phiLayer2TGCHoles, xAOD::phiLayer2TGCHoles); - muon.setSummaryValue(phiLayer3TGCHoles, xAOD::phiLayer3TGCHoles); - muon.setSummaryValue(phiLayer4TGCHoles, xAOD::phiLayer4TGCHoles); - - muon.setSummaryValue(etaLayer1TGCHoles, xAOD::etaLayer1TGCHoles); - muon.setSummaryValue(etaLayer2TGCHoles, xAOD::etaLayer2TGCHoles); - muon.setSummaryValue(etaLayer3TGCHoles, xAOD::etaLayer3TGCHoles); - muon.setSummaryValue(etaLayer4TGCHoles, xAOD::etaLayer4TGCHoles); - - muon.setSummaryValue(innerCloseHits,xAOD::innerClosePrecisionHits); - muon.setSummaryValue(middleCloseHits,xAOD::middleClosePrecisionHits); - muon.setSummaryValue(outerCloseHits,xAOD::outerClosePrecisionHits); - muon.setSummaryValue(extendedCloseHits,xAOD::extendedClosePrecisionHits); - - muon.setSummaryValue(innerOutBoundsHits,xAOD::innerOutBoundsPrecisionHits); - muon.setSummaryValue(middleOutBoundsHits,xAOD::middleOutBoundsPrecisionHits); - muon.setSummaryValue(outerOutBoundsHits,xAOD::outerOutBoundsPrecisionHits); - muon.setSummaryValue(extendedOutBoundsHits,xAOD::extendedOutBoundsPrecisionHits); - - muon.setSummaryValue(combinedTrackOutBoundsHits,xAOD::combinedTrackOutBoundsPrecisionHits); - - muon.setSummaryValue(isEndcap,xAOD::isEndcapGoodLayers); - muon.setSummaryValue(isSmall,xAOD::isSmallGoodSectors); + //get out-of-bounds from ME track, shouldn't be any on combined track anyway + ElementLink< xAOD::TrackParticleContainer > mstpLink = muon.muonSpectrometerTrackParticleLink(); + if (mstpLink.isValid()) { + if ( (*mstpLink)->trackLink().isValid() ) mstpTrackSummary = (*mstpLink)->track()->trackSummary(); + + if (mstpTrackSummary) { + for (auto layer : m_hitSummaryTool->summary(*mstpTrackSummary).stationLayers) { + if (layer.first == Muon::MuonStationIndex::BI || layer.first == Muon::MuonStationIndex::EI) { + innerOutBoundsHits += layer.second.noutBoundsHits; + } + if (layer.first == Muon::MuonStationIndex::BM || layer.first == Muon::MuonStationIndex::EM) { + middleOutBoundsHits += layer.second.noutBoundsHits; + } + if (layer.first == Muon::MuonStationIndex::BO || layer.first == Muon::MuonStationIndex::EO) { + outerOutBoundsHits += layer.second.noutBoundsHits; + } + if (layer.first == Muon::MuonStationIndex::BE || layer.first == Muon::MuonStationIndex::EE) { + extendedOutBoundsHits += layer.second.noutBoundsHits; + } + } + } + } + if ( trackSummary->muonTrackSummary() ) { + const Trk::MuonTrackSummary& mts = *trackSummary->muonTrackSummary(); + + // loop over chambers + std::vector<Trk::MuonTrackSummary::ChamberHitSummary>::const_iterator chit = mts.chamberHitSummary().begin(); + std::vector<Trk::MuonTrackSummary::ChamberHitSummary>::const_iterator chit_end = mts.chamberHitSummary().end(); + for ( ; chit != chit_end; ++chit ) { + const Identifier& chId = chit->chamberId(); + bool isMdt = m_idHelper->isMdt(chId); + bool isCsc = m_idHelper->isCsc(chId); + bool isMM = m_idHelper->isMM(chId); + bool issTgc = m_idHelper->issTgc(chId); + if ( isMdt || isMM || isCsc || issTgc ) { + Muon::MuonStationIndex::ChIndex index = m_idHelper->chamberIndex(chId); + uint8_t* hits = 0; + uint8_t* holes = 0; + if ( index == Muon::MuonStationIndex::BIS || index == Muon::MuonStationIndex::EIS || index == Muon::MuonStationIndex::CSS ) { + hits = &innerSmallHits; + holes = &innerSmallHoles; + } else if ( index == Muon::MuonStationIndex::BIL || index == Muon::MuonStationIndex::EIL || index == Muon::MuonStationIndex::CSL ) { + hits = &innerLargeHits; + holes = &innerLargeHoles; + } else if ( index == Muon::MuonStationIndex::BMS || index == Muon::MuonStationIndex::EMS ) { + hits = &middleSmallHits; + holes = &middleSmallHoles; + } else if ( index == Muon::MuonStationIndex::BML || index == Muon::MuonStationIndex::EML ) { + hits = &middleLargeHits; + holes = &middleLargeHoles; + } else if ( index == Muon::MuonStationIndex::BOS || index == Muon::MuonStationIndex::EOS ) { + hits = &outerSmallHits; + holes = &outerSmallHoles; + } else if ( index == Muon::MuonStationIndex::BOL || index == Muon::MuonStationIndex::EOL ) { + hits = &outerLargeHits; + holes = &outerLargeHoles; + } else if ( index == Muon::MuonStationIndex::BEE || index == Muon::MuonStationIndex::EES ) { + hits = &extendedSmallHits; + holes = &extendedSmallHoles; + } else if ( index == Muon::MuonStationIndex::EEL ) { + hits = &extendedLargeHits; + holes = &extendedLargeHoles; + } else { + ATH_MSG_WARNING("Unknown ChamberIndex" << Muon::MuonStationIndex::chName(index) ); + } + if ( hits ) { + if (isMdt || isMM) { + // MM does not have netaHits(), but only nHits() as Mdt + *hits += chit->nhits(); + *holes += chit->nholes(); + } else { // any other technology + *hits += chit->netaHits(); + *holes += chit->etaProjection().nholes; + } + } + } + // Fill MM hits and holes + if (isMM) { + MMHits += chit->nhits(); + MMHoles += chit->nholes(); + } + if (isCsc) { + cscEtaHits += chit->etaProjection().nhits; + cscUnspoiledEtaHits += chit->etaProjection().ngoodHits; + } + + if ( !isMdt && !isMM ) { + + uint8_t* phiHits = 0; + uint8_t* phiHoles = 0; + uint8_t* etaHits = 0; + uint8_t* etaHoles = 0; + Muon::MuonStationIndex::PhiIndex index = m_idHelper->phiIndex(chId); + if ( index == Muon::MuonStationIndex::BM1 || index == Muon::MuonStationIndex::T4 || + index == Muon::MuonStationIndex::CSC || index == Muon::MuonStationIndex::STGC1 ) { + phiHits = &phiLayer1Hits; + phiHoles = &phiLayer1Holes; + etaHits = &etaLayer1Hits; + etaHoles = &etaLayer1Holes; + } else if ( index == Muon::MuonStationIndex::BM2 || index == Muon::MuonStationIndex::T1 || + index == Muon::MuonStationIndex::STGC2 ) { + phiHits = &phiLayer2Hits; + phiHoles = &phiLayer2Holes; + etaHits = &etaLayer2Hits; + etaHoles = &etaLayer2Holes; + } else if ( index == Muon::MuonStationIndex::BO1 || index == Muon::MuonStationIndex::T2 ) { + phiHits = &phiLayer3Hits; + phiHoles = &phiLayer3Holes; + etaHits = &etaLayer3Hits; + etaHoles = &etaLayer3Holes; + } else if ( index == Muon::MuonStationIndex::BO2 || index == Muon::MuonStationIndex::T3 ) { + phiHits = &phiLayer4Hits; + phiHoles = &phiLayer4Holes; + etaHits = &etaLayer4Hits; + etaHoles = &etaLayer4Holes; + } else { + ATH_MSG_WARNING("Unknown ChamberIndex" << Muon::MuonStationIndex::phiName(index) ); + } + // split into RPC and TGC + // First RPC layer + if (index == Muon::MuonStationIndex::BM1) { + phiLayer1RPCHits += chit->nphiHits(); + etaLayer1RPCHits += chit->netaHits(); + phiLayer1RPCHoles += chit->phiProjection().nholes; + etaLayer1RPCHoles += chit->etaProjection().nholes; + } + // Second RPC layer + else if (index == Muon::MuonStationIndex::BM2) { + phiLayer2RPCHits += chit->nphiHits(); + etaLayer2RPCHits += chit->netaHits(); + phiLayer2RPCHoles += chit->phiProjection().nholes; + etaLayer2RPCHoles += chit->etaProjection().nholes; + } + // Third RPC layer + else if (index == Muon::MuonStationIndex::BO1) { + phiLayer3RPCHits += chit->nphiHits(); + etaLayer3RPCHits += chit->netaHits(); + phiLayer3RPCHoles += chit->phiProjection().nholes; + etaLayer3RPCHoles += chit->etaProjection().nholes; + } + // Fourth RPC layer + else if (index == Muon::MuonStationIndex::BO2) { + phiLayer4RPCHits += chit->nphiHits(); + etaLayer4RPCHits += chit->netaHits(); + phiLayer4RPCHoles += chit->phiProjection().nholes; + etaLayer4RPCHoles += chit->etaProjection().nholes; + } + // First TGC layer + else if (index == Muon::MuonStationIndex::T4) { + phiLayer1TGCHits += chit->nphiHits(); + etaLayer1TGCHits += chit->netaHits(); + phiLayer1TGCHoles += chit->phiProjection().nholes; + etaLayer1TGCHoles += chit->etaProjection().nholes; + } + // Second TGC layer + else if (index == Muon::MuonStationIndex::T1) { + phiLayer2TGCHits += chit->nphiHits(); + etaLayer2TGCHits += chit->netaHits(); + phiLayer2TGCHoles += chit->phiProjection().nholes; + etaLayer2TGCHoles += chit->etaProjection().nholes; + } + // Third TGC layer + else if (index == Muon::MuonStationIndex::T2) { + phiLayer3TGCHits += chit->nphiHits(); + etaLayer3TGCHits += chit->netaHits(); + phiLayer3TGCHoles += chit->phiProjection().nholes; + etaLayer3TGCHoles += chit->etaProjection().nholes; + } + // Fourth TGC layer + else if (index == Muon::MuonStationIndex::T3) { + phiLayer4TGCHits += chit->nphiHits(); + etaLayer4TGCHits += chit->netaHits(); + phiLayer4TGCHoles += chit->phiProjection().nholes; + etaLayer4TGCHoles += chit->etaProjection().nholes; + } + // First STGC layer + else if (index == Muon::MuonStationIndex::STGC1) { + phiLayer1STGCHits += chit->nphiHits(); + etaLayer1STGCHits += chit->netaHits(); + phiLayer1STGCHoles += chit->phiProjection().nholes; + etaLayer1STGCHoles += chit->etaProjection().nholes; + } + // Second STGC layer + else if (index == Muon::MuonStationIndex::STGC2) { + phiLayer2STGCHits += chit->nphiHits(); + etaLayer2STGCHits += chit->netaHits(); + phiLayer2STGCHoles += chit->phiProjection().nholes; + etaLayer2STGCHoles += chit->etaProjection().nholes; + } + + if ( phiHits ) { + *phiHits += chit->nphiHits(); + *phiHoles += chit->phiProjection().nholes; + } + if ( etaHits && !isCsc && !issTgc ) { + *etaHits += chit->netaHits(); + *etaHoles += chit->etaProjection().nholes; + } + } + } + } } -} // end of namespace + muon.setSummaryValue(numberOfPrecisionLayers, xAOD::numberOfPrecisionLayers); + muon.setSummaryValue(numberOfPrecisionHoleLayers, xAOD::numberOfPrecisionHoleLayers); + muon.setSummaryValue(numberOfPhiLayers, xAOD::numberOfPhiLayers); + muon.setSummaryValue(numberOfPhiHoleLayers, xAOD::numberOfPhiHoleLayers); + muon.setSummaryValue(numberOfTriggerEtaLayers, xAOD::numberOfTriggerEtaLayers); + muon.setSummaryValue(numberOfTriggerEtaHoleLayers, xAOD::numberOfTriggerEtaHoleLayers); + muon.setSummaryValue(numberOfGoodPrecisionLayers, xAOD::numberOfGoodPrecisionLayers); + + muon.setSummaryValue(mainSector, xAOD::primarySector); + muon.setSummaryValue(secondSector, xAOD::secondarySector); + muon.setSummaryValue(innerSmallHits, xAOD::innerSmallHits); + muon.setSummaryValue(innerLargeHits, xAOD::innerLargeHits); + muon.setSummaryValue(middleSmallHits, xAOD::middleSmallHits); + muon.setSummaryValue(middleLargeHits, xAOD::middleLargeHits); + muon.setSummaryValue(outerSmallHits, xAOD::outerSmallHits); + muon.setSummaryValue(outerLargeHits, xAOD::outerLargeHits); + muon.setSummaryValue(extendedSmallHits, xAOD::extendedSmallHits); + muon.setSummaryValue(extendedLargeHits, xAOD::extendedLargeHits); + + muon.setSummaryValue(innerSmallHoles, xAOD::innerSmallHoles); + muon.setSummaryValue(innerLargeHoles, xAOD::innerLargeHoles); + muon.setSummaryValue(middleSmallHoles, xAOD::middleSmallHoles); + muon.setSummaryValue(middleLargeHoles, xAOD::middleLargeHoles); + muon.setSummaryValue(outerSmallHoles, xAOD::outerSmallHoles); + muon.setSummaryValue(outerLargeHoles, xAOD::outerLargeHoles); + muon.setSummaryValue(extendedSmallHoles, xAOD::extendedSmallHoles); + muon.setSummaryValue(extendedLargeHoles, xAOD::extendedLargeHoles); + + muon.setSummaryValue(phiLayer1Hits, xAOD::phiLayer1Hits); + muon.setSummaryValue(phiLayer2Hits, xAOD::phiLayer2Hits); + muon.setSummaryValue(phiLayer3Hits, xAOD::phiLayer3Hits); + muon.setSummaryValue(phiLayer4Hits, xAOD::phiLayer4Hits); + + muon.setSummaryValue(etaLayer1Hits, xAOD::etaLayer1Hits); + muon.setSummaryValue(etaLayer2Hits, xAOD::etaLayer2Hits); + muon.setSummaryValue(etaLayer3Hits, xAOD::etaLayer3Hits); + muon.setSummaryValue(etaLayer4Hits, xAOD::etaLayer4Hits); + + muon.setSummaryValue(phiLayer1Holes, xAOD::phiLayer1Holes); + muon.setSummaryValue(phiLayer2Holes, xAOD::phiLayer2Holes); + muon.setSummaryValue(phiLayer3Holes, xAOD::phiLayer3Holes); + muon.setSummaryValue(phiLayer4Holes, xAOD::phiLayer4Holes); + + muon.setSummaryValue(etaLayer1Holes, xAOD::etaLayer1Holes); + muon.setSummaryValue(etaLayer2Holes, xAOD::etaLayer2Holes); + muon.setSummaryValue(etaLayer3Holes, xAOD::etaLayer3Holes); + muon.setSummaryValue(etaLayer4Holes, xAOD::etaLayer4Holes); + + muon.setSummaryValue(phiLayer1RPCHits, xAOD::phiLayer1RPCHits); + muon.setSummaryValue(phiLayer2RPCHits, xAOD::phiLayer2RPCHits); + muon.setSummaryValue(phiLayer3RPCHits, xAOD::phiLayer3RPCHits); + muon.setSummaryValue(phiLayer4RPCHits, xAOD::phiLayer4RPCHits); + + muon.setSummaryValue(etaLayer1RPCHits, xAOD::etaLayer1RPCHits); + muon.setSummaryValue(etaLayer2RPCHits, xAOD::etaLayer2RPCHits); + muon.setSummaryValue(etaLayer3RPCHits, xAOD::etaLayer3RPCHits); + muon.setSummaryValue(etaLayer4RPCHits, xAOD::etaLayer4RPCHits); + + muon.setSummaryValue(phiLayer1RPCHoles, xAOD::phiLayer1RPCHoles); + muon.setSummaryValue(phiLayer2RPCHoles, xAOD::phiLayer2RPCHoles); + muon.setSummaryValue(phiLayer3RPCHoles, xAOD::phiLayer3RPCHoles); + muon.setSummaryValue(phiLayer4RPCHoles, xAOD::phiLayer4RPCHoles); + + muon.setSummaryValue(etaLayer1RPCHoles, xAOD::etaLayer1RPCHoles); + muon.setSummaryValue(etaLayer2RPCHoles, xAOD::etaLayer2RPCHoles); + muon.setSummaryValue(etaLayer3RPCHoles, xAOD::etaLayer3RPCHoles); + muon.setSummaryValue(etaLayer4RPCHoles, xAOD::etaLayer4RPCHoles); + + muon.setSummaryValue(phiLayer1TGCHits, xAOD::phiLayer1TGCHits); + muon.setSummaryValue(phiLayer2TGCHits, xAOD::phiLayer2TGCHits); + muon.setSummaryValue(phiLayer3TGCHits, xAOD::phiLayer3TGCHits); + muon.setSummaryValue(phiLayer4TGCHits, xAOD::phiLayer4TGCHits); + + muon.setSummaryValue(etaLayer1TGCHits, xAOD::etaLayer1TGCHits); + muon.setSummaryValue(etaLayer2TGCHits, xAOD::etaLayer2TGCHits); + muon.setSummaryValue(etaLayer3TGCHits, xAOD::etaLayer3TGCHits); + muon.setSummaryValue(etaLayer4TGCHits, xAOD::etaLayer4TGCHits); + + muon.setSummaryValue(phiLayer1TGCHoles, xAOD::phiLayer1TGCHoles); + muon.setSummaryValue(phiLayer2TGCHoles, xAOD::phiLayer2TGCHoles); + muon.setSummaryValue(phiLayer3TGCHoles, xAOD::phiLayer3TGCHoles); + muon.setSummaryValue(phiLayer4TGCHoles, xAOD::phiLayer4TGCHoles); + + muon.setSummaryValue(etaLayer1TGCHoles, xAOD::etaLayer1TGCHoles); + muon.setSummaryValue(etaLayer2TGCHoles, xAOD::etaLayer2TGCHoles); + muon.setSummaryValue(etaLayer3TGCHoles, xAOD::etaLayer3TGCHoles); + muon.setSummaryValue(etaLayer4TGCHoles, xAOD::etaLayer4TGCHoles); + + // New Small Wheel + // STGC + muon.setSummaryValue(phiLayer1STGCHits, xAOD::phiLayer1STGCHits); + muon.setSummaryValue(phiLayer2STGCHits, xAOD::phiLayer2STGCHits); + + muon.setSummaryValue(etaLayer1STGCHits, xAOD::etaLayer1STGCHits); + muon.setSummaryValue(etaLayer2STGCHits, xAOD::etaLayer2STGCHits); + + muon.setSummaryValue(phiLayer1STGCHoles, xAOD::phiLayer1STGCHoles); + muon.setSummaryValue(phiLayer2STGCHoles, xAOD::phiLayer2STGCHoles); + + muon.setSummaryValue(etaLayer1STGCHoles, xAOD::etaLayer1STGCHoles); + muon.setSummaryValue(etaLayer2STGCHoles, xAOD::etaLayer2STGCHoles); + + // MM + muon.setSummaryValue(MMHits, xAOD::MMHits); + muon.setSummaryValue(MMHoles, xAOD::MMHoles); + + + muon.setSummaryValue(innerCloseHits, xAOD::innerClosePrecisionHits); + muon.setSummaryValue(middleCloseHits, xAOD::middleClosePrecisionHits); + muon.setSummaryValue(outerCloseHits, xAOD::outerClosePrecisionHits); + muon.setSummaryValue(extendedCloseHits, xAOD::extendedClosePrecisionHits); + + muon.setSummaryValue(innerOutBoundsHits, xAOD::innerOutBoundsPrecisionHits); + muon.setSummaryValue(middleOutBoundsHits, xAOD::middleOutBoundsPrecisionHits); + muon.setSummaryValue(outerOutBoundsHits, xAOD::outerOutBoundsPrecisionHits); + muon.setSummaryValue(extendedOutBoundsHits, xAOD::extendedOutBoundsPrecisionHits); + + muon.setSummaryValue(combinedTrackOutBoundsHits, xAOD::combinedTrackOutBoundsPrecisionHits); + + muon.setSummaryValue(isEndcap, xAOD::isEndcapGoodLayers); + muon.setSummaryValue(isSmall, xAOD::isSmallGoodSectors); + + muon.setSummaryValue(cscEtaHits, xAOD::cscEtaHits); + muon.setSummaryValue(cscUnspoiledEtaHits, xAOD::cscUnspoiledEtaHits); + +} + +} // end of namespace diff --git a/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py b/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py index 99e4adfc42f313c75dcefa867a8af9ffa848c7d0..0bd34f4164fad55607e5e01b97a112ec5011217e 100644 --- a/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py +++ b/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py @@ -653,15 +653,8 @@ if globalflags.InputFormat.is_bytestream(): pass pass -### write mu values into EventInfo -if rec.doESD() and rec.readRDO() and not (globalflags.DataSource()=='geant4') and jobproperties.Beam.beamType()=="collisions" and not athenaCommonFlags.isOnline(): - try: - include ("LumiBlockComps/LumiBlockMuWriter_jobOptions.py") - except Exception: - treatException("Could not load LumiBlockMuWriter_jobOptions.py") - pass -# muWriter.OutputLevel=DEBUG - pass +### Writing of mu values to xAOD::EventInfo is done in the converter step; +### It's no longer necessary to write it in the old EventInfo if rec.doMonitoring(): try: diff --git a/Reconstruction/RecExample/RecExRecoTest/share/RecExRecoTest_ART_muons_fromESD.py b/Reconstruction/RecExample/RecExRecoTest/share/RecExRecoTest_ART_muons_fromESD.py new file mode 100644 index 0000000000000000000000000000000000000000..428977e8310dea2b817e3f54e6ca906a0d461be5 --- /dev/null +++ b/Reconstruction/RecExample/RecExRecoTest/share/RecExRecoTest_ART_muons_fromESD.py @@ -0,0 +1,94 @@ +#Based on MuonRecExample/MuonRec_myTopOptions.py +from MuonRecExample.MuonRecFlags import muonRecFlags +from RecExConfig.RecFlags import rec +from RecExConfig.RecAlgsFlags import recAlgs +from AthenaCommon.AthenaCommonFlags import athenaCommonFlags +from MuonRecExample.MuonStandaloneFlags import muonStandaloneFlags + +## flag to set number of events to be processed +EvtMax = 10 + +#-------------------------------------------------------------------------------- +# Input +#-------------------------------------------------------------------------------- +athenaCommonFlags.FilesInput = ["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecExRecoTest/mc16_13TeV.361022.Pythia8EvtGen_A14NNPDF23LO_jetjet_JZ2W.recon.ESD.e3668_s3170_r10572_homeMade.pool.root"] + +# in Standalone mode, don't allow any configuration errors +athenaCommonFlags.AllowIgnoreConfigError = False + +# configure flags so that only Muon Standalone reco is run +import MuonRecExample.MuonRecStandaloneOnlySetup + +#import MuonCombinedRecExample.MuonCombinedRecOnlySetup +from MuonCombinedRecExample.MuonCombinedRecFlags import muonCombinedRecFlags + +from MuonRecExample import MuonRecUtils +from MuonRecExample.MuonRecUtils import assertCastorStager,hasJobPropertyBeenSet + +#Need the beam spot for the TrackParticleCreator +if not ('conddb' in dir()): + IOVDbSvc = Service("IOVDbSvc") + from IOVDbSvc.CondDB import conddb +conddb.addFolderSplitOnline("INDET", "/Indet/Onl/Beampos", "/Indet/Beampos", className="AthenaAttributeList") + +from AthenaCommon.AlgSequence import AthSequencer +condSeq = AthSequencer("AthCondSeq") +if not hasattr(condSeq, "BeamSpotCondAlg"): + from BeamSpotConditions.BeamSpotConditionsConf import BeamSpotCondAlg + condSeq += BeamSpotCondAlg( "BeamSpotCondAlg" ) + +#ToolSvc += MDTCablingDbTool +import MuonCnvExample.MuonCablingConfig + +#-------------------------------------------------------------------------------- +# Output +#-------------------------------------------------------------------------------- +muonRecFlags.doCalibNtuple = False # write calibration ntuple? +### + +#Set to false, because re-reco of muon truth does not work. Lock it because downstream python alters its value to True otherwise. +rec.doTruth.set_Value_and_Lock(False) + +rec.doTrigger = False + +muonRecFlags.doStandalone.set_Value_and_Lock(True) +muonRecFlags.doTrackPerformance = True +muonRecFlags.TrackPerfSummaryLevel = 2 +muonRecFlags.TrackPerfDebugLevel = 5 +muonRecFlags.doCSCs = True +muonRecFlags.doNSWNewThirdChain = True + +muonStandaloneFlags.printSummary = True +muonCombinedRecFlags.doTrackPerformance = True +muonCombinedRecFlags.doMuGirl = True +muonCombinedRecFlags.printSummary = True + + +##### no more flags after this line ##### +try: + include("MuonRecExample/MuonRec_topOptions.py") + ###### put any user finetuning after this line ##### + + + ##### DO NOT ADD ANYTHING AFTER THIS LINE ##### +except: + # print the stacktrace (saving could fail, and would then obscure the real problem) + import traceback + print traceback.format_exc().rstrip() + + # always write config so far for debugging + from AthenaCommon.ConfigurationShelve import saveToAscii + saveToAscii("config.txt") + # add DetFlags + from MuonRecExample.MuonRecUtils import dumpDetFlags + dumpDetFlags("config.txt") + # but still exit with error + import sys + sys.exit(10) +else: + # and write config to include user changes after topOptions + from AthenaCommon.ConfigurationShelve import saveToAscii + saveToAscii("config.txt") + # add DetFlags + from MuonRecExample.MuonRecUtils import dumpDetFlags + dumpDetFlags("config.txt") diff --git a/Reconstruction/RecExample/RecExRecoTest/test/test_recexreco_art_muons_fromesd.sh b/Reconstruction/RecExample/RecExRecoTest/test/test_recexreco_art_muons_fromesd.sh new file mode 100755 index 0000000000000000000000000000000000000000..d0924c5818b594582615aa4c6d91ee98261535b3 --- /dev/null +++ b/Reconstruction/RecExample/RecExRecoTest/test/test_recexreco_art_muons_fromesd.sh @@ -0,0 +1,12 @@ +#!/bin/sh +# +# art-description: Athena runs topoclustering from an ESD file +# art-type: grid +# art-include: 21.0/Athena +# art-include: 21.0-TrigMC/Athena +# art-include: master/Athena +# art-include: 21.3/Athena +# art-include: 21.9/Athena + +athena RecExRecoTest/RecExRecoTest_ART_muons_fromESD.py +echo "art-result: $?" diff --git a/Reconstruction/RecExample/RecExRecoTest/test/test_recexreco_art_muons_fromesd_MT_oneThread.sh b/Reconstruction/RecExample/RecExRecoTest/test/test_recexreco_art_muons_fromesd_MT_oneThread.sh new file mode 100755 index 0000000000000000000000000000000000000000..38a1a7c6d9cb28d1cd094916efa5ac0e6af580d0 --- /dev/null +++ b/Reconstruction/RecExample/RecExRecoTest/test/test_recexreco_art_muons_fromesd_MT_oneThread.sh @@ -0,0 +1,8 @@ +#!/bin/sh +# +# art-description: Athena runs topoclustering from an ESD file +# art-type: grid +# art-include: master/Athena + +athena --threads=1 RecExRecoTest/RecExRecoTest_ART_muons_fromESD.py +echo "art-result: $?" diff --git a/Reconstruction/RecoAlgs/IsolationAlgs/python/IsoGetter.py b/Reconstruction/RecoAlgs/IsolationAlgs/python/IsoGetter.py index 4e97081babe227a33a007e3bf958b49a3c51112e..541f6067a3a931d5d30408c8d45120a1f2d5014f 100644 --- a/Reconstruction/RecoAlgs/IsolationAlgs/python/IsoGetter.py +++ b/Reconstruction/RecoAlgs/IsolationAlgs/python/IsoGetter.py @@ -264,8 +264,7 @@ if doPFlow: IsoCorEg.append([ isoPar.coreCone, isoPar.pileupCorrection ]) IsoCorEgExtra.append([isoPar.ptCorrection]) IsoCorMu.append([ isoPar.coreCone, isoPar.pileupCorrection ]) - IsoCorMuExtra.append([isoPar.ptCorrection]) - + IsoCorMuExtra.append([]) from IsolationAlgs.IsolationAlgsConf import IsolationBuilder isoBuilder = AlgFactory(IsolationBuilder, diff --git a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/CMakeLists.txt b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/CMakeLists.txt index 879eba5ca6396016873c1eeca1560dd728efbad7..036d10a76047b1f9dc35c603c54c29688e17b7d7 100644 --- a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/CMakeLists.txt +++ b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/CMakeLists.txt @@ -16,7 +16,6 @@ atlas_depends_on_subdirs( PUBLIC Event/xAOD/xAODTruth Event/xAOD/xAODEventInfo Event/xAOD/xAODPFlow - Event/EventInfo GaudiKernel InnerDetector/InDetValidation/InDetPhysValMonitoring Tracking/TrkValidation/TrkValHistUtils @@ -45,10 +44,7 @@ atlas_add_component( TrackCaloClusterRecValidation INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} LINK_LIBRARIES ${ROOT_LIBRARIES} ${XERCESC_LIBRARIES} ${Boost_LIBRARIES} ${EIGEN_LIBRARIES} AthenaBaseComps AthenaMonitoringLib xAODCore xAODTracking xAODTruth xAODPFlow GaudiKernel TrkValHistUtils InDetPhysValMonitoringLib - AsgTools AthenaKernel GeoPrimitives EventPrimitives xAODBase xAODParticleEvent xAODEventInfo EventInfo xAODJet PathResolver) + AsgTools AthenaKernel GeoPrimitives EventPrimitives xAODBase xAODParticleEvent xAODEventInfo xAODJet PathResolver) # Install files from the package: -atlas_install_headers( TrackCaloClusterRecValidation ) -#atlas_install_python_modules( python/*.py ) -#atlas_install_runtime( share/*.hdef share/*.xml share/*.xsl} ) atlas_install_runtime( share/*.xml share/*.xsl ) -#atlas_install_runtime( test/TrackCaloClusterRecValidation_TestConfiguration.xml ) \ No newline at end of file + diff --git a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/src/CalibrationNtupleMakerTool.cxx b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/src/CalibrationNtupleMakerTool.cxx index b432633df7da185e711c27d4165f8b91084b1107..970fa1863c59c0fcee90b81e1507b9d699e8b8e8 100644 --- a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/src/CalibrationNtupleMakerTool.cxx +++ b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/src/CalibrationNtupleMakerTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ @@ -7,15 +7,9 @@ // CalibrationNtupleMakerTool.cxx, (c) ATLAS Detector software /////////////////////////////////////////////////////////////////// -#include "TrackCaloClusterRecValidation/CalibrationNtupleMakerTool.h" +#include "CalibrationNtupleMakerTool.h" #include "xAODJet/JetContainer.h" -#include "xAODEventInfo/EventInfo.h" -#include "xAODEventInfo/EventAuxInfo.h" - -#include "EventInfo/EventInfo.h" -#include "EventInfo/EventType.h" - #include "xAODPFlow/TrackCaloClusterContainer.h" #include "xAODParticleEvent/IParticleLink.h" @@ -89,6 +83,8 @@ StatusCode CalibrationNtupleMakerTool::initialize() return StatusCode::FAILURE; } + ATH_CHECK( m_evt.initialize() ); + return StatusCode::SUCCESS; } @@ -165,14 +161,12 @@ StatusCode CalibrationNtupleMakerTool::execute() { m_h_events->Fill(0); - const EventInfo* info = nullptr; - if (evtStore()->retrieve(info).isFailure()){ + SG::ReadHandle<xAOD::EventInfo> evt(m_evt); + if(!evt.isValid()) { ATH_MSG_FATAL( "Unable to retrieve Event Info" ); - return StatusCode::FAILURE; } + float ev_weight = evt->mcEventWeight(); - float ev_weight = info->event_type()->mc_event_weight(); - const auto truths = getContainer<xAOD::JetContainer>(m_truthJetContainerName); if (not truths) return StatusCode::FAILURE; @@ -180,7 +174,7 @@ StatusCode CalibrationNtupleMakerTool::execute() if (not vertices) return StatusCode::FAILURE; // get mu - float mu= info->averageInteractionsPerCrossing(); + float mu= evt->averageInteractionsPerCrossing(); //get NPV float npv = 0.; diff --git a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/TrackCaloClusterRecValidation/CalibrationNtupleMakerTool.h b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/src/CalibrationNtupleMakerTool.h similarity index 93% rename from Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/TrackCaloClusterRecValidation/CalibrationNtupleMakerTool.h rename to Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/src/CalibrationNtupleMakerTool.h index 60418e47ef7903393e537ee3424e751050847988..8fcc0509407140248058c837c838095b87331dec 100644 --- a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/TrackCaloClusterRecValidation/CalibrationNtupleMakerTool.h +++ b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/src/CalibrationNtupleMakerTool.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef TRACKCALOCLUSTERREC_TRACKCALOCLUSTERRECVALIDATION_CALIBRATIONNTUPLEMAKERTOOL_H #define TRACKCALOCLUSTERREC_TRACKCALOCLUSTERRECVALIDATION_CALIBRATIONNTUPLEMAKERTOOL_H @@ -7,6 +7,8 @@ #include "AthenaBaseComps/AthAlgorithm.h" #include "xAODJet/JetContainer.h" +#include "StoreGate/ReadHandleKey.h" +#include "xAODEventInfo/EventInfo.h" #include <vector> @@ -87,6 +89,8 @@ private: std::vector < double >* m_eTrue; std::vector < double >* m_mTrue; + // EventInfo + SG::ReadHandleKey<xAOD::EventInfo> m_evt {this, "EvtInfo", "EventInfo", "EventInfo name"}; }; diff --git a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/src/TrackCaloClusterRecValidationTool.cxx b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/src/TrackCaloClusterRecValidationTool.cxx index 482ead05926f67f819865811143a7457fda4cba9..8480da339ffc789fb88359752e9789214a921020 100644 --- a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/src/TrackCaloClusterRecValidationTool.cxx +++ b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/src/TrackCaloClusterRecValidationTool.cxx @@ -1,18 +1,10 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ -#include "TrackCaloClusterRecValidation/TrackCaloClusterRecValidationTool.h" +#include "TrackCaloClusterRecValidationTool.h" // #include "xAODTruth/TruthParticle.h" #include "xAODJet/JetContainer.h" -#include "xAODEventInfo/EventInfo.h" -#include "xAODEventInfo/EventAuxInfo.h" - -#include "EventInfo/EventInfo.h" -#include "EventInfo/EventID.h" -#include "EventInfo/EventType.h" -#include "EventInfo/PileUpEventInfo.h" -#include "EventInfo/PileUpTimeEventIndex.h" #include "xAODCaloEvent/CaloClusterContainer.h" #include "xAODCore/ShallowCopy.h" @@ -26,7 +18,6 @@ #include <algorithm> #include <limits> #include <cmath> // to get std::isnan(), std::abs etc. -// #include <functional> // to get std::plus #include <utility> #include <cstdlib> // to getenv #include <vector> @@ -129,17 +120,19 @@ TrackCaloClusterRecValidationTool::initialize() { } } + ATH_CHECK( m_evt.initialize() ); + return StatusCode::SUCCESS; } StatusCode TrackCaloClusterRecValidationTool::fillHistograms() { - - const EventInfo* info = nullptr; - if (evtStore()->retrieve(info).isFailure()){ + + SG::ReadHandle<xAOD::EventInfo> evt(m_evt); + if(!evt.isValid()) { ATH_MSG_FATAL( "Unable to retrieve Event Info" ); } - float mcEventWeight = info->event_type()->mc_event_weight(); + float mcEventWeight = evt->mcEventWeight(); if (m_saveJetInfo) { ATH_MSG_DEBUG("Filling hists " << name() << "..."); @@ -474,4 +467,4 @@ const xAOD::JetContainer* TrackCaloClusterRecValidationTool::calibrateAndRecordS } return jetContainerShallowCopy; -} \ No newline at end of file +} diff --git a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/TrackCaloClusterRecValidation/TrackCaloClusterRecValidationTool.h b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/src/TrackCaloClusterRecValidationTool.h similarity index 92% rename from Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/TrackCaloClusterRecValidation/TrackCaloClusterRecValidationTool.h rename to Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/src/TrackCaloClusterRecValidationTool.h index f74b647bebd45974ad6726cdbcfa93dbd6de4721..7f6aa4213750ba06f0dcf9fd46c04b763d30015b 100644 --- a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/TrackCaloClusterRecValidation/TrackCaloClusterRecValidationTool.h +++ b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/src/TrackCaloClusterRecValidationTool.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef TRACKCALOCLUSTERREC_TRACKCALOCLUSTERRECVALIDATION_TRACKCALOCLUSTERRECVALIDATIONTOOL_H #define TRACKCALOCLUSTERREC_TRACKCALOCLUSTERRECVALIDATION_TRACKCALOCLUSTERRECVALIDATIONTOOL_H @@ -23,7 +23,8 @@ #include <vector> #include "xAODJet/JetContainer.h" -#include "GaudiKernel/ToolHandle.h" +#include "StoreGate/ReadHandleKey.h" +#include "xAODEventInfo/EventInfo.h" class TCCPlots; class IJetCalibrationTool; @@ -108,6 +109,9 @@ private: //histograms std::map<std::string, TCCPlots*> m_tccPlots; + + // EventInfo + SG::ReadHandleKey<xAOD::EventInfo> m_evt {this, "EvtInfo", "EventInfo", "EventInfo name"}; }; template<class T> @@ -119,4 +123,4 @@ inline const T* TrackCaloClusterRecValidationTool::getContainer(const std::strin return ptr; } -#endif //TRACKCALOCLUSTERREC_TRACKCALOCLUSTERRECVALIDATION_TRACKCALOCLUSTERRECVALIDATIONTOOL_H \ No newline at end of file +#endif //TRACKCALOCLUSTERREC_TRACKCALOCLUSTERRECVALIDATION_TRACKCALOCLUSTERRECVALIDATIONTOOL_H diff --git a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/src/components/TrackCaloClusterRecValidation_entries.cxx b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/src/components/TrackCaloClusterRecValidation_entries.cxx index b4fa76c4ece9880433184ad959164f47badc4fdd..0fe6cec787a922543bce134e64ab7592e3791417 100644 --- a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/src/components/TrackCaloClusterRecValidation_entries.cxx +++ b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/src/components/TrackCaloClusterRecValidation_entries.cxx @@ -1,5 +1,5 @@ -#include "TrackCaloClusterRecValidation/TrackCaloClusterRecValidationTool.h" -#include "TrackCaloClusterRecValidation/CalibrationNtupleMakerTool.h" +#include "../TrackCaloClusterRecValidationTool.h" +#include "../CalibrationNtupleMakerTool.h" DECLARE_COMPONENT( TrackCaloClusterRecValidationTool ) DECLARE_COMPONENT( CalibrationNtupleMakerTool ) diff --git a/Reconstruction/TrackParticleTruthTPCnv/share/TrackParticleTruthCollectionCnv_p1_test.ref b/Reconstruction/TrackParticleTruthTPCnv/share/TrackParticleTruthCollectionCnv_p1_test.ref index 416e0ab738c89705625827e7f2135f75e393d69b..5179cef48bd3af17785553d95af988620debeb3a 100644 --- a/Reconstruction/TrackParticleTruthTPCnv/share/TrackParticleTruthCollectionCnv_p1_test.ref +++ b/Reconstruction/TrackParticleTruthTPCnv/share/TrackParticleTruthCollectionCnv_p1_test.ref @@ -13,4 +13,4 @@ ClassIDSvc INFO getRegistryEntries: read 1684 CLIDRegistry entries fo ProxyProviderSvc INFO Initializing ProxyProviderSvc - package version SGComps-00-00-00 test1 ClassIDSvc INFO getRegistryEntries: read 359 CLIDRegistry entries for module ALL -HepMcParticleLink INFO find_hostkey: Using TruthEvent as McEventCollection key for this job +HepMcParticleLink INFO find_proxy: Using TruthEvent as McEventCollection key for this job diff --git a/Reconstruction/TrackParticleTruthTPCnv/share/TrackParticleTruthCollectionCnv_p2_test.ref b/Reconstruction/TrackParticleTruthTPCnv/share/TrackParticleTruthCollectionCnv_p2_test.ref index 15b0f8802aa26b7a3f64465fab4e96e9cd6a04d7..49ab8717b836629a473a3f342bb34ee435e0856f 100644 --- a/Reconstruction/TrackParticleTruthTPCnv/share/TrackParticleTruthCollectionCnv_p2_test.ref +++ b/Reconstruction/TrackParticleTruthTPCnv/share/TrackParticleTruthCollectionCnv_p2_test.ref @@ -10,4 +10,4 @@ HistogramPersis...WARNING Histograms saving not required. ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr Ready test1 -HepMcParticleLink INFO find_hostkey: Using TruthEvent as McEventCollection key for this job +HepMcParticleLink INFO find_proxy: Using TruthEvent as McEventCollection key for this job diff --git a/Reconstruction/TrackParticleTruthTPCnv/test/TrackParticleTruthCollectionCnv_p1_test.cxx b/Reconstruction/TrackParticleTruthTPCnv/test/TrackParticleTruthCollectionCnv_p1_test.cxx index 17e9ccbe68e74179a93274f456fda04a9a7f74f7..b9365fda41e3b7caa66f1d1774ce35fcf726d6c1 100644 --- a/Reconstruction/TrackParticleTruthTPCnv/test/TrackParticleTruthCollectionCnv_p1_test.cxx +++ b/Reconstruction/TrackParticleTruthTPCnv/test/TrackParticleTruthCollectionCnv_p1_test.cxx @@ -30,6 +30,7 @@ void compare (const HepMcParticleLink& p1, assert ( p1.isValid() == p2.isValid() ); assert ( p1.barcode() == p2.barcode() ); assert ( p1.eventIndex() == p2.eventIndex() ); + assert ( p1.getEventCollectionAsChar() == p2.getEventCollectionAsChar() ); assert ( p1.cptr() == p2.cptr() ); assert ( p1 == p2 ); } diff --git a/Reconstruction/TrackParticleTruthTPCnv/test/TrackParticleTruthCollectionCnv_p2_test.cxx b/Reconstruction/TrackParticleTruthTPCnv/test/TrackParticleTruthCollectionCnv_p2_test.cxx index df5bf61d34fe8a9a8dcb547714963842e8aaf383..16620b0e2af99e0163c32b32d707528eeab87810 100644 --- a/Reconstruction/TrackParticleTruthTPCnv/test/TrackParticleTruthCollectionCnv_p2_test.cxx +++ b/Reconstruction/TrackParticleTruthTPCnv/test/TrackParticleTruthCollectionCnv_p2_test.cxx @@ -29,6 +29,7 @@ void compare (const HepMcParticleLink& p1, assert ( p1.isValid() == p2.isValid() ); assert ( p1.barcode() == p2.barcode() ); assert ( p1.eventIndex() == p2.eventIndex() ); + assert ( p1.getEventCollectionAsChar() == p2.getEventCollectionAsChar() ); assert ( p1.cptr() == p2.cptr() ); assert ( p1 == p2 ); } diff --git a/Reconstruction/egamma/egammaCaloTools/python/egammaCaloToolsConfig.py b/Reconstruction/egamma/egammaCaloTools/python/egammaCaloToolsConfig.py new file mode 100644 index 0000000000000000000000000000000000000000..a40efe7b4efb2c562e0104eb06a17625a00cf455 --- /dev/null +++ b/Reconstruction/egamma/egammaCaloTools/python/egammaCaloToolsConfig.py @@ -0,0 +1,20 @@ +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + +__doc__ = "Tool configuration to instantiate all egammaCaloTools with default configuration." + +#--------------------------------------- +from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator + +def CaloFillRectangularClusterCfg(flags): + result=ComponentAccumulator() + + from CaloClusterCorrection.CaloClusterCorrectionConf import CaloFillRectangularCluster + caloFillRectangularCluster = CaloFillRectangularCluster(eta_size = 5, + phi_size = 7, + cells_name = flags.Egamma.Keys.Input.Cells) + + result.addPrivateTool(caloFillRectangularCluster) + return result + +#--------------------------------------- + diff --git a/Reconstruction/egamma/egammaCaloTools/src/egammaCheckEnergyDepositTool.h b/Reconstruction/egamma/egammaCaloTools/src/egammaCheckEnergyDepositTool.h index ea8e84026ef1af3463dbb9a9626b9f086c90f99b..7c35efb887ba17bc7880775786dbb46aa492932c 100644 --- a/Reconstruction/egamma/egammaCaloTools/src/egammaCheckEnergyDepositTool.h +++ b/Reconstruction/egamma/egammaCaloTools/src/egammaCheckEnergyDepositTool.h @@ -52,7 +52,7 @@ class egammaCheckEnergyDepositTool : virtual public IegammaCheckEnergyDepositToo "Threshold on maximum fraction of energy reconstructed in 2nd sampling"}; /** @brief Threshold on maximum fraction of energy reconstructed in 3rd sampling */ - Gaudi::Property<double> m_thrF3max {this, "ThrF3max", 0.65, + Gaudi::Property<double> m_thrF3max {this, "ThrF3max", 0.8, "Threshold on maximum fraction of energy reconstructed in 3rd sampling"}; }; diff --git a/Reconstruction/egamma/egammaConfig/CMakeLists.txt b/Reconstruction/egamma/egammaConfig/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..4148e8dde886b5b21f2834be2f5c516eaa255f89 --- /dev/null +++ b/Reconstruction/egamma/egammaConfig/CMakeLists.txt @@ -0,0 +1,13 @@ +################################################################################ +# Package: egammaConfig +################################################################################ + +# Declare the package name: +atlas_subdir( egammaConfig ) + +# Install files from the package: +atlas_install_python_modules( python/*.py ) + +atlas_add_test( egammaConfigFlagsTest + SCRIPT python -m unittest -v egammaConfig.egammaConfigFlags + POST_EXEC_SCRIPT nopost.sh ) diff --git a/Reconstruction/egamma/egammaConfig/doc/packagedoc.h b/Reconstruction/egamma/egammaConfig/doc/packagedoc.h new file mode 100644 index 0000000000000000000000000000000000000000..67c105d03339e4338e4dd0b8f18293bd683e5441 --- /dev/null +++ b/Reconstruction/egamma/egammaConfig/doc/packagedoc.h @@ -0,0 +1,32 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +/** + +@page egammaConfig_page egammaConfig Package + +This package is responsible for configuring the electron and photon reconstruction and identification algorithms in the new style. + +The following reconstruction algorithms are implemented (Text below needs updating) + + - The old one, implemented in egammaBuilder and managed through the python script egammaGetter, which is seeded from the electromagnetic (EM) calorimeters, starts from clusters reconstructed in the calorimeters by the SlidingWindowFinder (https://twiki.cern.ch/twiki/bin/view/Atlas/SlidingWindowClustering#Sliding_Window_Clustering). For each cluster, with ET(seed)>3GeV in the cluster container the best inner detector track is searched for within a given E/p range. The complexity of the extrapolation (coordinate systems, etc) is hidden in ExtrapolateToCaloTool. It then builds identification variables. As of release 21 this is no longer run. + + - An alternative algorithm, implemented by topoEgammaBuilder and also managed by the python script egammaGetter, is based on topoclusters. It attempts to recover electrons that emit brem photons by creating "superclusters." Superclusters can also be used in photons to especially help converted photons. This is the default egamma algorithm for central electrons and photons as of release 21. + + - An algorithm, implemented in egammaForwardBuilder and managed through the python script egammaForwardGetter, is dedicated to the reconstruction and identification of electrons in the forward region of ATLAS (2.5<|eta|<4.9). In contrast to the egamma and topoEgamma builders, this algorithm can use only the information from the calorimeters, as the tracking system is limited to |eta|<2.5, and the topological clusters (instead of SW clusters). The pre-selection and ID are done in the same algorithm. The variables used to discriminant between electron and hadrons are defined as the topo cluster moments or combination of them. This is done separately in two eta bins: the EMEC IW and the FCal using a cut based technic. + +The EDM for the electrons and photons is defined in Event/xAOD/xAODEgamma. Three collections are produced in the xAOD, Electrons, Photons, and ForwardElectrons. + +@author H. Ma <hma@bnl.gov> +@author A. Poppleton <Alan.Poppleton@cern.ch> +@author S. Rajagopalan <srinir@bnl.gov> +@author M. Wielers <Monika.Wielers@cern.ch> +@author A. Khodinov <khodinov@bnl.gov> +@author F. Derue <derue@lpnhe.in2p3.fr> +@author T. Koffas <Thomas.Koffas@cern.ch> +@author J. Mitrevski <Jovan.Mitrevski@cern.ch> +@author C. Anastopoulos <Christos.Anastopoulos@cern.ch> +@author D. Divalentino <david.di.valentino@cern.ch> +@author R. Naranjo <Roger.Naranjo@cern.ch> +*/ diff --git a/Reconstruction/egamma/egammaConfig/python/__init__.py b/Reconstruction/egamma/egammaConfig/python/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..862aa9246de6a7925dac6d5160ed6a82a9f12b70 --- /dev/null +++ b/Reconstruction/egamma/egammaConfig/python/__init__.py @@ -0,0 +1 @@ +# Needed to find properly diff --git a/Reconstruction/egamma/egammaConfig/python/egammaConfigFlags.py b/Reconstruction/egamma/egammaConfig/python/egammaConfigFlags.py new file mode 100644 index 0000000000000000000000000000000000000000..a91c9ea861218cd7806e4aa1e86684f9b3ea1125 --- /dev/null +++ b/Reconstruction/egamma/egammaConfig/python/egammaConfigFlags.py @@ -0,0 +1,108 @@ +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + +# this is based on MuonConfigFlags as a guide + +from AthenaConfiguration.AthConfigFlags import AthConfigFlags + +def createEgammaConfigFlags(): + egcf=AthConfigFlags() + + # enable/disable the full egamma + egcf.addFlag("Egamma.enabled",True) + + # do standard cluster-based egamma algorithm + egcf.addFlag("Egamma.doCaloSeeded",True) + egcf.addFlag("Egamma.doSuperclusters",True) # if true, do superculsers, false is SW + egcf.addFlag("Egamma.doTopoSeeded",True) # if doing SW, also add toposeeded electrons + + # do forward egamma + egcf.addFlag("Egamma.doForwardSeeded",True) + + # do egamma truth association when running on MC + egcf.addFlag("Egamma.doTruthAssociation",True) + + # run the GSF refitting + egcf.addFlag("Egamma.doGSF",True) + + # build conversion vertices + egcf.addFlag("Egamma.doConversionBuilding",True) + + # The cluster corrections/calib + egcf.addFlag("Egamma.Calib.ClusterCorrectionVersion", 'v12phiflip_noecorrnogap') + egcf.addFlag("Egamma.Calib.MVAVersion", 'egammaMVACalib/offline/v7') + + ################################################## + # The keys: should update to use file peeking info + # Also not sure what's the best way to do this, might want to revisit + # one idea is to make the keys have tuples with type, name, etc + ################################################## + + egcf.addFlag("Egamma.Keys.Input.Cells","AllCalo") #should make a lambda + egcf.addFlag("Egamma.Keys.Input.TopoClusters",'CaloTopoCluster') #input topoclusters + egcf.addFlag("Egamma.Keys.Input.TruthParticles", 'TruthParticles') + egcf.addFlag("Egamma.Keys.Input.TruthEvents", 'TruthEvents') + + # the topoclusters selected for egamma from the input topoclusters + egcf.addFlag("Egamma.Keys.Internal.EgammaTopoClusters",'egammaTopoClusters') + egcf.addFlag("Egamma.Keys.Internal.EgammaRecs", 'egammaRecCollection') + egcf.addFlag("Egamma.Keys.Internal.PhotonSuperRecs", 'PhotonSuperRecCollection') + egcf.addFlag("Egamma.Keys.Internal.ElectronSuperRecs", 'ElectronSuperRecCollection') + + egcf.addFlag("Egamma.Keys.Output.ConversionVertices", 'GSFConversionVertices') + egcf.addFlag("Egamma.Keys.Output.ConversionVerticesSuppESD", '-vxTrackAtVertex') + egcf.addFlag("Egamma.Keys.Output.ConversionVerticesSuppAOD", '-vxTrackAtVertex') + + egcf.addFlag("Egamma.Keys.Output.CaloClusters", 'egammaClusters') + egcf.addFlag("Egamma.Keys.Output.CaloClustersSuppESD", '') + egcf.addFlag("Egamma.Keys.Output.CaloClustersSuppAOD", '') + + egcf.addFlag("Egamma.Keys.Output.TopoSeededClusters", 'egammaTopoSeededClusters') + egcf.addFlag("Egamma.Keys.Output.TopoSeededClustersSuppESD", '') + egcf.addFlag("Egamma.Keys.Output.TopoSeededClustersSuppAOD", '-CellLink') + + egcf.addFlag("Egamma.Keys.Output.Electrons",'Electrons') + egcf.addFlag("Egamma.Keys.Output.ElectronsSuppESD",'') + egcf.addFlag("Egamma.Keys.Output.ElectronsSuppAOD", + '-e033.-e011.-e333.-e335.-e337.-e377.-isEMLHLoose.-isEMLHTight.-isEMLHMedium.-isEMLoose.-isEMMultiLepton.-isEMMedium.-isEMTight') + + egcf.addFlag("Egamma.Keys.Output.ForwardElectrons", 'ForwardElectrons') + egcf.addFlag("Egamma.Keys.Output.ForwardElectronsSuppESD", '') + egcf.addFlag("Egamma.Keys.Output.ForwardElectronsSuppAOD", + '-isEMTight.-isEMMedium.-isEMLoose') + + egcf.addFlag("Egamma.Keys.Output.ForwardClusters", 'ForwardElectronClusters') + egcf.addFlag("Egamma.Keys.Output.ForwardClustersSuppESD", '-SisterCluster') + egcf.addFlag("Egamma.Keys.Output.ForwardClustersSuppAOD", + '-SisterCluster.-CellLink') + + egcf.addFlag("Egamma.Keys.Output.Photons", 'Photons') + egcf.addFlag("Egamma.Keys.Output.PhotonsSuppESD", '') + egcf.addFlag("Egamma.Keys.Output.PhotonsSuppAOD", + '-e033.-e011.-e333.-e335.-e337.-e377.-isEMLoose.-isEMTight') + + egcf.addFlag("Egamma.Keys.Output.GSFTrackParticles", 'GSFTrackParticles') + egcf.addFlag("Egamma.Keys.Output.GSFTrackParticlesSuppESD", + '-caloExtension.-cellAssociation.-perigeeExtrapEta.-perigeeExtrapPhi') + egcf.addFlag("Egamma.Keys.Output.GSFTrackParticlesSuppAOD", + '-caloExtension.-cellAssociation.-perigeeExtrapEta.-perigeeExtrapPhi') + + # not xAOD + egcf.addFlag("Egamma.Keys.Output.GSFTracks", 'GSFTracks') + + egcf.addFlag("Egamma.Keys.Output.TruthParticles", 'egammaTruthParticles') + egcf.addFlag("Egamma.Keys.Output.TruthParticlesSuppESD", '-caloExtension') + egcf.addFlag("Egamma.Keys.Output.TruthParticlesSuppAOD", '-caloExtension') + + return egcf + +# self test +import unittest + +class TestEgammaConfigFlags(unittest.TestCase): + def runTest(self): + flags = createEgammaConfigFlags() + self.assertEqual(flags.Egamma.Keys.Output.Photons, "Photons") + self.assertEqual(flags._get("Egamma.Keys.Output.Photons"), "Photons") + +if __name__ == "__main__": + unittest.main() diff --git a/Reconstruction/egamma/egammaRec/python/EMCommonRefitter.py b/Reconstruction/egamma/egammaRec/python/EMCommonRefitter.py index c42ebc0cd12e249bcc95e5d23a0993a064d07a81..88c83ee17639ccf259a63f704406706caa8aa30f 100644 --- a/Reconstruction/egamma/egammaRec/python/EMCommonRefitter.py +++ b/Reconstruction/egamma/egammaRec/python/EMCommonRefitter.py @@ -28,7 +28,7 @@ def CreateEgammaRotCreator(): # --- since a correction is needed to fix biases when running on new run 2 compatible calibation if not hasattr(ToolSvc, "PixelLorentzAngleTool"): - from SiLorentzAngleSvc.PixelLorentzAngleToolSetup import PixelLorentzAngleToolSetup + from SiLorentzAngleTool.PixelLorentzAngleToolSetup import PixelLorentzAngleToolSetup pixelLorentzAngleToolSetup = PixelLorentzAngleToolSetup() from SiClusterizationTool.SiClusterizationToolConf import InDet__NnClusterizationFactory @@ -61,7 +61,7 @@ def CreateEgammaRotCreator(): # load Pixel ROT creator, we overwrite the defaults for the # tool to always make conservative pixel cluster errors if not hasattr(ToolSvc, "PixelLorentzAngleTool"): - from SiLorentzAngleSvc.PixelLorentzAngleToolSetup import PixelLorentzAngleToolSetup + from SiLorentzAngleTool.PixelLorentzAngleToolSetup import PixelLorentzAngleToolSetup pixelLorentzAngleToolSetup = PixelLorentzAngleToolSetup() from SiClusterOnTrackTool.SiClusterOnTrackToolConf import InDet__PixelClusterOnTrackTool @@ -80,7 +80,7 @@ def CreateEgammaRotCreator(): if DetFlags.haveRIO.SCT_on(): # SiLorentzAngleTool - from SiLorentzAngleSvc.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup + from SiLorentzAngleTool.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup sctLorentzAngleToolSetup = SCTLorentzAngleToolSetup() from SiClusterOnTrackTool.SiClusterOnTrackToolConf import InDet__SCT_ClusterOnTrackTool egSCT_ClusterOnTrackTool = InDet__SCT_ClusterOnTrackTool ("egSCT_ClusterOnTrackTool", diff --git a/Simulation/Barcode/BarcodeInterfaces/BarcodeInterfaces/IBarcodeSvc.h b/Simulation/Barcode/BarcodeInterfaces/BarcodeInterfaces/IBarcodeSvc.h index f90638831cdd0b0df0d4b158dc42d8fc5d5414e8..542b9e7b4c5c0a85078da27ad216eb0ef2fe404c 100644 --- a/Simulation/Barcode/BarcodeInterfaces/BarcodeInterfaces/IBarcodeSvc.h +++ b/Simulation/Barcode/BarcodeInterfaces/BarcodeInterfaces/IBarcodeSvc.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -75,7 +75,7 @@ namespace Barcode { virtual Barcode::ParticleBarcode particleGenerationIncrement() const = 0; /** return bit calculator for encoding extra barcode info */ - virtual BitCalculator* getBitCalculator() const { return 0; } + virtual const BitCalculator* getBitCalculator() const { return nullptr; } virtual bool hasBitCalculator() const { return false; } }; diff --git a/Simulation/Barcode/BarcodeServices/ATLAS_CHECK_THREAD_SAFETY b/Simulation/Barcode/BarcodeServices/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..46d370fe483f522fc0b46272e48d90492027e095 --- /dev/null +++ b/Simulation/Barcode/BarcodeServices/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Simulation/Barcode/BarcodeServices diff --git a/Simulation/Barcode/BarcodeServices/BarcodeServices/BitCalculator.h b/Simulation/Barcode/BarcodeServices/BarcodeServices/BitCalculator.h index 5e16773da11320794f0b837050d88007743af01f..9f44f30059c725ed63f356b090218920890af5a2 100644 --- a/Simulation/Barcode/BarcodeServices/BarcodeServices/BitCalculator.h +++ b/Simulation/Barcode/BarcodeServices/BarcodeServices/BitCalculator.h @@ -1,9 +1,9 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ -#ifndef __BARCODE_BITCALCULATOR_H__ -#define __BARCODE_BITCALCULATOR_H__ +#ifndef __BARCODESERVICES_BITCALCULATOR_H__ +#define __BARCODESERVICES_BITCALCULATOR_H__ #include "TObject.h" #include <vector> @@ -15,24 +15,24 @@ namespace Barcode { public: BitCalculator(); - virtual ~BitCalculator(); - - int GetParentID(const int& barcode); - int GetPIDofParent(const int& barcode); - int GetBCID(const int& barcode); - int GetHS(const int& barcode); - int GetSimulator(const int& barcode); - - void SetParentID(int& barcode, const int& parentID); - void SetPIDofParent(int& barcode, const int& parentPID); - void SetBCID(int& barcode, const int& bcid); - void SetHS(int& barcode, const int& hs); - void SetSimulator(int& barcode, const int& simulator); - - inline void SetHS(int& barcode, const bool& hs) { return SetHS(barcode,(int)hs); } - - void PrintBits(const int& barcode); - void Summary(const int& barcode); + virtual ~BitCalculator() = default; + + int GetParentID(const int& barcode) const; + int GetPIDofParent(const int& barcode) const; + int GetBCID(const int& barcode) const; + int GetHS(const int& barcode) const; + int GetSimulator(const int& barcode) const; + + void SetParentID(int& barcode, const int& parentID) const; + void SetPIDofParent(int& barcode, const int& parentPID) const; + void SetBCID(int& barcode, const int& bcid) const; + void SetHS(int& barcode, const int& hs) const; + void SetSimulator(int& barcode, const int& simulator) const; + + inline void SetHS(int& barcode, const bool& hs) const { return SetHS(barcode,(int)hs); } + + void PrintBits(const int& barcode) const; + void Summary(const int& barcode) const; private: @@ -41,16 +41,15 @@ namespace Barcode { const int m_nbitshs; const int m_nbitssimulator; const int m_nbitsbcid; - + int m_parentOne; int m_pidOne; int m_hsOne; int m_simulatorOne; int m_bcidOne; - + ClassDef(BitCalculator,1) }; } -#endif //> __BARCODE_BITCALCULATOR_H__ - +#endif //> __BARCODESERVICES_BITCALCULATOR_H__ diff --git a/Simulation/Barcode/BarcodeServices/BarcodeServices/GlobalBarcodeSvc.h b/Simulation/Barcode/BarcodeServices/BarcodeServices/GlobalBarcodeSvc.h index 0e7b401eda99a30d2c31af2d10c66524012bb5a9..a344240218854c863f065d4d07bf34cc395072b9 100644 --- a/Simulation/Barcode/BarcodeServices/BarcodeServices/GlobalBarcodeSvc.h +++ b/Simulation/Barcode/BarcodeServices/BarcodeServices/GlobalBarcodeSvc.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -88,7 +88,7 @@ namespace Barcode { /** Return the barcode increment for each generation of updated particles */ virtual Barcode::ParticleBarcode particleGenerationIncrement() const; - virtual inline Barcode::BitCalculator* getBitCalculator() const { return m_bitcalculator; } + virtual inline const Barcode::BitCalculator* getBitCalculator() const { return m_bitcalculator; } virtual inline bool hasBitCalculator() const { return (m_bitcalculator!=0); } private: diff --git a/Simulation/Barcode/BarcodeServices/BarcodeServices/LegacyBarcodeSvc.h b/Simulation/Barcode/BarcodeServices/BarcodeServices/LegacyBarcodeSvc.h index ff638d292b035c9ffd6205b3cb3aa13e082d9dce..9f5309537338501dfc52c95c8f044fb81b49949d 100644 --- a/Simulation/Barcode/BarcodeServices/BarcodeServices/LegacyBarcodeSvc.h +++ b/Simulation/Barcode/BarcodeServices/BarcodeServices/LegacyBarcodeSvc.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -89,7 +89,7 @@ namespace Barcode { virtual Barcode::ParticleBarcode particleGenerationIncrement() const override; /** handles to get barcode bitcalculator */ - virtual inline Barcode::BitCalculator* getBitCalculator() const override { return m_bitcalculator; } + virtual inline const Barcode::BitCalculator* getBitCalculator() const override { return m_bitcalculator; } virtual inline bool hasBitCalculator() const override { return (m_bitcalculator!=0); } private: diff --git a/Simulation/Barcode/BarcodeServices/Root/BitCalculator.cxx b/Simulation/Barcode/BarcodeServices/Root/BitCalculator.cxx index de9ea92c7db05bdbd2b2ee74bd620ad5de086e76..fe749eba2fd35174ea1b4de9ae6a03ae93f66c3e 100644 --- a/Simulation/Barcode/BarcodeServices/Root/BitCalculator.cxx +++ b/Simulation/Barcode/BarcodeServices/Root/BitCalculator.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "BarcodeServices/BitCalculator.h" @@ -54,54 +54,48 @@ Barcode::BitCalculator::BitCalculator() } -Barcode::BitCalculator::~BitCalculator() -{ - // delete collisions grl -} - - -int -Barcode::BitCalculator::GetParentID(const int& barcode) +int +Barcode::BitCalculator::GetParentID(const int& barcode) const { return (barcode&m_parentOne)>>(0); } -int -Barcode::BitCalculator::GetPIDofParent(const int& barcode) +int +Barcode::BitCalculator::GetPIDofParent(const int& barcode) const { return (barcode&m_pidOne)>>(m_nbitsparent); } -int -Barcode::BitCalculator::GetHS(const int& barcode) +int +Barcode::BitCalculator::GetHS(const int& barcode) const { return (barcode&m_hsOne)>>(m_nbitsparent+m_nbitspid); } int -Barcode::BitCalculator::GetSimulator(const int& barcode) +Barcode::BitCalculator::GetSimulator(const int& barcode) const { return (barcode&m_simulatorOne)>>(m_nbitsparent+m_nbitspid+m_nbitshs); } -int -Barcode::BitCalculator::GetBCID(const int& barcode) +int +Barcode::BitCalculator::GetBCID(const int& barcode) const { // MB this works for both int and unsigned int int negTest = 1<<(8*sizeof(int)-1); bool isNeg(false); - if ((barcode&negTest)!=0) { isNeg = true; } + if ((barcode&negTest)!=0) { isNeg = true; } int bc(barcode); if (isNeg) { bc &= ~negTest; } // turn off last bit, for bit shifting bc = (bc&m_bcidOne)>>(m_nbitsparent+m_nbitspid+m_nbitshs+m_nbitssimulator); - if (isNeg) { // turn on 'last, shifted hs bit' again + if (isNeg) { // turn on 'last, shifted hs bit' again //int lastBit = 1<<(m_nbitsbcid-1); //bc |= lastBit; bc = -bc; @@ -115,7 +109,7 @@ Barcode::BitCalculator::GetBCID(const int& barcode) void -Barcode::BitCalculator::SetParentID(int& barcode, const int& parentID) +Barcode::BitCalculator::SetParentID(int& barcode, const int& parentID) const { if (parentID<0) { std::cerr << "ERROR: parent-ID is negative: " << parentID << " Only accepting positive number." << std::endl; @@ -134,15 +128,15 @@ Barcode::BitCalculator::SetParentID(int& barcode, const int& parentID) } -void -Barcode::BitCalculator::SetPIDofParent(int& barcode, const int& parentPID) +void +Barcode::BitCalculator::SetPIDofParent(int& barcode, const int& parentPID) const { if (parentPID<0) { std::cerr << "ERROR: PID is negative: " << parentPID << " Only accepting positive number." << std::endl; return; } - int shifted = parentPID << (m_nbitsparent); + int shifted = parentPID << (m_nbitsparent); if (parentPID>=(1<<m_nbitspid)) { std::cerr << "ERROR: parentPID too big for barcode: " << parentPID << " (limit = " << (1<<m_nbitspid)-1 << "). Reset to zero." << std::endl; @@ -154,8 +148,8 @@ Barcode::BitCalculator::SetPIDofParent(int& barcode, const int& parentPID) } -void -Barcode::BitCalculator::SetHS(int& barcode, const int& hs) +void +Barcode::BitCalculator::SetHS(int& barcode, const int& hs) const { if (hs<0) { std::cerr << "ERROR: hard scatter: " << hs << " Only accepting positive number." << std::endl; @@ -175,7 +169,7 @@ Barcode::BitCalculator::SetHS(int& barcode, const int& hs) void -Barcode::BitCalculator::SetSimulator(int& barcode, const int& simulator) +Barcode::BitCalculator::SetSimulator(int& barcode, const int& simulator) const { int shifted = simulator << (m_nbitsparent+m_nbitspid+m_nbitshs); @@ -189,8 +183,8 @@ Barcode::BitCalculator::SetSimulator(int& barcode, const int& simulator) } -void -Barcode::BitCalculator::SetBCID(int& barcode, const int& bcid) // also to set negative bcid +void +Barcode::BitCalculator::SetBCID(int& barcode, const int& bcid) const // also to set negative bcid { bool isNeg = (bcid<0) ; int bcidpositive = (isNeg ? -bcid : bcid); @@ -209,8 +203,8 @@ Barcode::BitCalculator::SetBCID(int& barcode, const int& bcid) // also to set ne } -void -Barcode::BitCalculator::PrintBits(const int& barcode) +void +Barcode::BitCalculator::PrintBits(const int& barcode) const { for (int i = sizeof(int)*8 -1 ; i>=0; --i) { int j = 1<<i; @@ -222,14 +216,13 @@ Barcode::BitCalculator::PrintBits(const int& barcode) void -Barcode::BitCalculator::Summary(const int& barcode) +Barcode::BitCalculator::Summary(const int& barcode) const { std::cout << "Barcode: " << barcode << "\n" - << "Bits: "; PrintBits(barcode); + << "Bits: "; PrintBits(barcode); std::cout << "Parent ID: " << GetParentID(barcode) << "\n" - << "Parent PID: " << GetPIDofParent(barcode) << "\n" - << "Hard scatter: " << GetHS(barcode) << "\n" - << "Simulator: " << GetSimulator(barcode) << "\n" - << "BCID: " << GetBCID(barcode) << std::endl; + << "Parent PID: " << GetPIDofParent(barcode) << "\n" + << "Hard scatter: " << GetHS(barcode) << "\n" + << "Simulator: " << GetSimulator(barcode) << "\n" + << "BCID: " << GetBCID(barcode) << std::endl; } - diff --git a/Simulation/Digitization/python/PileUpConfig.py b/Simulation/Digitization/python/PileUpConfig.py index 710bae408a64b0ad2c2986fc674f31997f3bfd9e..411a89a702c674801bb8be189a6480467809c24f 100644 --- a/Simulation/Digitization/python/PileUpConfig.py +++ b/Simulation/Digitization/python/PileUpConfig.py @@ -116,7 +116,7 @@ def getHighPtMinBiasCache(name="HighPtMinBiasCache", **kwargs): from AthenaCommon.BeamFlags import jobproperties kwargs.setdefault('CollPerXing', digitizationFlags.numberOfHighPtMinBias() ) from Digitization import PileUpEventType - kwargs.setdefault('PileUpEventType', PileUpEventType.MinimumBias ) # may need to have a separate type in the future + kwargs.setdefault('PileUpEventType', PileUpEventType.HighPtMinimumBias ) # may need to have a separate type in the future kwargs.setdefault('ReadDownscaleFactor', 1 ) kwargs.setdefault('EventSelector', getService('HighPtMinBiasEventSelector') ) kwargs.setdefault('OccupationFraction', float(digitizationFlags.bunchSpacing.get_Value())/float(jobproperties.Beam.bunchSpacing.get_Value()) ) diff --git a/Simulation/Digitization/python/PileUpEventType.py b/Simulation/Digitization/python/PileUpEventType.py index 604475194b9754431407355835f468ad22cc2083..b4534b4cab1062e42776306497aa34e6b53a2483 100644 --- a/Simulation/Digitization/python/PileUpEventType.py +++ b/Simulation/Digitization/python/PileUpEventType.py @@ -2,6 +2,7 @@ Signal=0 MinimumBias=1 -Cavern=2 +Cavern=2 HaloGas=3 -ZeroBias=4 +HighPtMinimumBias=4 +ZeroBias=5 diff --git a/Simulation/Digitization/test/test_MC16a_Digi_tf_configuration.py b/Simulation/Digitization/test/test_MC16a_Digi_tf_configuration.py index 834c41c170b28bf5ec902ce47b6d3a40787e4223..72963b2a87971bfa66450b07923f5b38496ce0c3 100755 --- a/Simulation/Digitization/test/test_MC16a_Digi_tf_configuration.py +++ b/Simulation/Digitization/test/test_MC16a_Digi_tf_configuration.py @@ -212,7 +212,7 @@ class TestDigitizationMC16a(unittest.TestCase): def test___BCM_DigitizationTool_properties(self): tested_configurable_name = 'ToolSvc.BCM_DigitizationTool' - expected_property_list = ['DetStore', 'EffDistanceParam', 'EffSharpnessParam', 'EvtStore', 'ExtraInputs', 'ExtraOutputs', 'FirstXing', 'HitCollName', 'LastXing', 'MIPDeposit', 'ModNoise', 'ModSignal', 'NinoThr', 'RndmSvc', 'TimeDelay'] + expected_property_list = ['DetStore', 'EffDistanceParam', 'EffSharpnessParam', 'EvtStore', 'ExtraInputs', 'ExtraOutputs', 'FirstXing', 'HitCollName', 'LastXing', 'MIPDeposit', 'ModNoise', 'ModSignal', 'NinoThr', 'OutputRDOKey', 'OutputSDOKey', 'RndmSvc', 'TimeDelay'] expected_nonstring_properties = {'LastXing': '0', 'FirstXing': '-25'} expected_string_properties = {'HitCollName': 'BCMHits'} self._detailed_ConfigurablePropertiesCheck( diff --git a/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasAlg.cxx b/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasAlg.cxx index ab1f781b9a55c00cec0b0f8af454445a9441843e..6a5c481c75f9c03ece913e148bfe2c29e23f976d 100644 --- a/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasAlg.cxx +++ b/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasAlg.cxx @@ -36,6 +36,7 @@ #include "MCTruthBase/TruthStrategyManager.h" #include "GeoModelInterfaces/IGeoModelSvc.h" #include "GaudiKernel/IThreadInitTool.h" +#include "GeneratorObjects/HepMcParticleLink.h" // call_once mutexes #include <mutex> @@ -312,7 +313,7 @@ StatusCode G4AtlasAlg::execute() } ATH_MSG_DEBUG("Recorded output GenEvent collection " << outputTruthCollection.name() << " in store " << outputTruthCollection.store()); G4Event *inputEvent{}; - ATH_CHECK( m_inputConverter->convertHepMCToG4Event(*outputTruthCollection, inputEvent, false) ); + ATH_CHECK( m_inputConverter->convertHepMCToG4Event(*outputTruthCollection, inputEvent, HepMcParticleLink::find_enumFromKey(outputTruthCollection.name())) ); bool abort = false; // Worker run manager diff --git a/Simulation/G4Atlas/G4AtlasApps/test/test_AtlasG4_cosmics_configuration.py b/Simulation/G4Atlas/G4AtlasApps/test/test_AtlasG4_cosmics_configuration.py index 9f299d6467c8b786f4ac3634282ba22ec3dc0f20..5732423f86e1d8690cff3bf73645607120a62901 100755 --- a/Simulation/G4Atlas/G4AtlasApps/test/test_AtlasG4_cosmics_configuration.py +++ b/Simulation/G4Atlas/G4AtlasApps/test/test_AtlasG4_cosmics_configuration.py @@ -112,7 +112,8 @@ class TestAtlasG4Cosmics(unittest.TestCase): def test___CosmicGenerator_is_at_start_of_AthAlgSeq(self): ath_alg_sequence_as_str = self._job_config_dict['AthAlgSeq']['Members'] # need to evaluate to obtain actual Python object - ath_alg_sequence_list = eval(ath_alg_sequence_as_str) + ignore_Algs = ['EventInfoTagBuilder/EventInfoTagBuilder'] + ath_alg_sequence_list = [ alg for alg in eval(ath_alg_sequence_as_str) if alg not in ignore_Algs ] actual_last_ath_alg_sequence_entry = ath_alg_sequence_list[1] # xAODMaker::EventInfoCnvAlg/xAODMaker::EventInfoCnvAlg is in position 0 in master now. expected_last_ath_alg_sequence_entry = "CosmicGenerator/CosmicGenerator" self.assertEqual(expected_last_ath_alg_sequence_entry, @@ -197,7 +198,8 @@ class TestAtlasG4Cosmics(unittest.TestCase): def test___BeamEffectsAlg_is_before_G4AtlasAlg_in_AthAlgSeq(self): ath_alg_sequence_as_str = self._job_config_dict['AthAlgSeq']['Members'] # need to evaluate to obtain actual Python object - ath_alg_sequence_list = eval(ath_alg_sequence_as_str) + ignore_Algs = ['EventInfoTagBuilder/EventInfoTagBuilder'] + ath_alg_sequence_list = [ alg for alg in eval(ath_alg_sequence_as_str) if alg not in ignore_Algs ] actual_last_ath_alg_sequence_entry = ath_alg_sequence_list[3] # Position 1 is the Sim Timer Alg, xAODMaker::EventInfoCnvAlg/xAODMaker::EventInfoCnvAlg is in position 0 in master now expected_last_ath_alg_sequence_entry = "Simulation::BeamEffectsAlg/BeamEffectsAlg" self.assertEqual(expected_last_ath_alg_sequence_entry, diff --git a/Simulation/G4Atlas/G4AtlasApps/test/test_AtlasG4_tf_configuration.py b/Simulation/G4Atlas/G4AtlasApps/test/test_AtlasG4_tf_configuration.py index 940f7f1cdc115f07ee4d53c9a321b96c51815c4b..5b678c6c698d0b5dd32f5b58a9f334a68a20e0a5 100755 --- a/Simulation/G4Atlas/G4AtlasApps/test/test_AtlasG4_tf_configuration.py +++ b/Simulation/G4Atlas/G4AtlasApps/test/test_AtlasG4_tf_configuration.py @@ -106,10 +106,11 @@ class TestAtlasG4(unittest.TestCase): def test___BeamEffectsAlg_is_before_G4AtlasAlg_in_AthAlgSeq(self): - ath_alg_seqence_as_str = self._job_config_dict['AthAlgSeq']['Members'] + ath_alg_sequence_as_str = self._job_config_dict['AthAlgSeq']['Members'] # need to evaluate to obtain actual Python object - ath_alg_seqence_list = eval(ath_alg_seqence_as_str) - actual_last_ath_alg_sequence_entry = ath_alg_seqence_list[1] #Position 0 should be the timer alg + ignore_Algs = ['EventInfoTagBuilder/EventInfoTagBuilder'] + ath_alg_sequence_list = [ alg for alg in eval(ath_alg_sequence_as_str) if alg not in ignore_Algs ] + actual_last_ath_alg_sequence_entry = ath_alg_sequence_list[1] #Position 0 should be the timer alg expected_last_ath_alg_sequence_entry = "Simulation::BeamEffectsAlg/BeamEffectsAlg" self.assertEqual(expected_last_ath_alg_sequence_entry, actual_last_ath_alg_sequence_entry) @@ -141,11 +142,11 @@ class TestAtlasG4(unittest.TestCase): def test___G4AtlasAlg_is_at_end_of_AthAlgSeq(self): - ath_alg_seqence_as_str = self._job_config_dict['AthAlgSeq']['Members'] + ath_alg_sequence_as_str = self._job_config_dict['AthAlgSeq']['Members'] # need to evaluate to obtain actual Python object - ath_alg_seqence_list = eval(ath_alg_seqence_as_str) + ath_alg_sequence_list = eval(ath_alg_sequence_as_str) - actual_last_ath_alg_sequence_entry = ath_alg_seqence_list[-1] + actual_last_ath_alg_sequence_entry = ath_alg_sequence_list[-1] expected_last_ath_alg_sequence_entry = "G4AtlasAlg/G4AtlasAlg" self.assertEqual(expected_last_ath_alg_sequence_entry, actual_last_ath_alg_sequence_entry) diff --git a/Simulation/G4Atlas/G4AtlasApps/test/test_TestBeam_tf_configuration.py b/Simulation/G4Atlas/G4AtlasApps/test/test_TestBeam_tf_configuration.py index c1c7f9b86d2b2f5d3f2a478833cb41a61c725c53..62154cb5ff66bd7dbcd9374abb8a36bd0a349ca2 100755 --- a/Simulation/G4Atlas/G4AtlasApps/test/test_TestBeam_tf_configuration.py +++ b/Simulation/G4Atlas/G4AtlasApps/test/test_TestBeam_tf_configuration.py @@ -106,7 +106,8 @@ class TestTestBeam(unittest.TestCase): def test___ParticleGun_is_before_CopyEventWeight_in_AthAlgSeq(self): ath_alg_sequence_as_str = self._job_config_dict['AthAlgSeq']['Members'] # need to evaluate to obtain actual Python object - ath_alg_sequence_list = eval(ath_alg_sequence_as_str) + ignore_Algs = ['EventInfoTagBuilder/EventInfoTagBuilder'] + ath_alg_sequence_list = [ alg for alg in eval(ath_alg_sequence_as_str) if alg not in ignore_Algs ] actual_last_ath_alg_sequence_entry = ath_alg_sequence_list[1] # xAODMaker::EventInfoCnvAlg/xAODMaker::EventInfoCnvAlg is in position 0 in master now expected_last_ath_alg_sequence_entry = "PyAthena::Alg/ParticleGun" self.assertEqual(expected_last_ath_alg_sequence_entry, @@ -116,7 +117,8 @@ class TestTestBeam(unittest.TestCase): def test___CopyEventWeight_is_before_BeamEffectsAlg_in_AthAlgSeq(self): ath_alg_sequence_as_str = self._job_config_dict['AthAlgSeq']['Members'] # need to evaluate to obtain actual Python object - ath_alg_sequence_list = eval(ath_alg_sequence_as_str) + ignore_Algs = ['EventInfoTagBuilder/EventInfoTagBuilder'] + ath_alg_sequence_list = [ alg for alg in eval(ath_alg_sequence_as_str) if alg not in ignore_Algs ] actual_last_ath_alg_sequence_entry = ath_alg_sequence_list[2] # xAODMaker::EventInfoCnvAlg/xAODMaker::EventInfoCnvAlg is in position 0 in master now expected_last_ath_alg_sequence_entry = "CopyEventWeight/CopyEventWeight" self.assertEqual(expected_last_ath_alg_sequence_entry, @@ -126,7 +128,8 @@ class TestTestBeam(unittest.TestCase): def test___BeamEffectsAlg_is_before_G4AtlasAlg_in_AthAlgSeq(self): ath_alg_sequence_as_str = self._job_config_dict['AthAlgSeq']['Members'] # need to evaluate to obtain actual Python object - ath_alg_sequence_list = eval(ath_alg_sequence_as_str) + ignore_Algs = ['EventInfoTagBuilder/EventInfoTagBuilder'] + ath_alg_sequence_list = [ alg for alg in eval(ath_alg_sequence_as_str) if alg not in ignore_Algs ] actual_last_ath_alg_sequence_entry = ath_alg_sequence_list[3] # xAODMaker::EventInfoCnvAlg/xAODMaker::EventInfoCnvAlg is in position 0 in master now expected_last_ath_alg_sequence_entry = "Simulation::BeamEffectsAlg/BeamEffectsAlg" self.assertEqual(expected_last_ath_alg_sequence_entry, diff --git a/Simulation/G4Atlas/G4AtlasServices/ATLAS_CHECK_THREAD_SAFETY b/Simulation/G4Atlas/G4AtlasServices/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..18a2d31b00ffc5836732948ba1a1afff6dae93dd --- /dev/null +++ b/Simulation/G4Atlas/G4AtlasServices/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Simulation/G4Atlas/G4AtlasServices diff --git a/Simulation/G4Atlas/G4AtlasTests/scripts/sim_parse_prof.py b/Simulation/G4Atlas/G4AtlasTests/scripts/sim_parse_prof.py old mode 100755 new mode 100644 index 61e98d6bc274c8a7fa3c9192ca19b31166df8389..1bab65b8ea7423c7625fc71a8479d59bb8744d39 --- a/Simulation/G4Atlas/G4AtlasTests/scripts/sim_parse_prof.py +++ b/Simulation/G4Atlas/G4AtlasTests/scripts/sim_parse_prof.py @@ -260,8 +260,8 @@ class LibraryEstimator: ('InDetDD::SCT_BarrelModuleSide','InDetReadoutGeometry'), ('InDetDD::SCT_ForwardModuleSide','InDetReadoutGeometry'), ('InDetDD::SCT_ForwardFrameTransformation','InDetReadoutGeometry'), - ('SiPropertiesSvc','SiPropertiesSvc'), - ('SiliconProperties','SiPropertiesSvc'), + ('SiPropertiesTool','SiPropertiesTool'), + ('SiliconProperties','SiPropertiesTool'), ('dsfmt','AtlasCLHEP_RandomGenerators'), ('CLHEP::dSFMTEngine','AtlasCLHEP_RandomGenerators'), ('CLHEP::RandGaussZiggurat','AtlasCLHEP_RandomGenerators'), diff --git a/Simulation/G4Extensions/G4CosmicFilter/ATLAS_CHECK_THREAD_SAFETY b/Simulation/G4Extensions/G4CosmicFilter/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..2196b482db3ca6b4a6983581b1ab6d33b54868ab --- /dev/null +++ b/Simulation/G4Extensions/G4CosmicFilter/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Simulation/G4Extensions/G4CosmicFilter diff --git a/Simulation/G4Extensions/G4CosmicFilter/CMakeLists.txt b/Simulation/G4Extensions/G4CosmicFilter/CMakeLists.txt index f0a7998d54bf98b859da3fd46516a3bff599ddab..c339ad433beb7f3f33cd378d39fc002697e6914c 100644 --- a/Simulation/G4Extensions/G4CosmicFilter/CMakeLists.txt +++ b/Simulation/G4Extensions/G4CosmicFilter/CMakeLists.txt @@ -13,7 +13,6 @@ atlas_depends_on_subdirs( PUBLIC Simulation/G4Atlas/G4AtlasInterfaces Simulation/G4Atlas/G4AtlasTools PRIVATE - Control/CxxUtils Simulation/G4Sim/MCTruth Simulation/G4Sim/TrackRecord ) @@ -27,7 +26,7 @@ atlas_add_component( G4CosmicFilter src/*.cxx src/components/*.cxx INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} AthenaBaseComps StoreGateLib SGtests GaudiKernel G4AtlasInterfaces G4AtlasToolsLib CxxUtils MCTruth ) + LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} AthenaBaseComps StoreGateLib SGtests GaudiKernel G4AtlasInterfaces G4AtlasToolsLib MCTruth ) # Install files from the package: atlas_install_headers( G4CosmicFilter ) diff --git a/Simulation/G4Extensions/G4CosmicFilter/G4CosmicFilter/G4CosmicAndFilter.h b/Simulation/G4Extensions/G4CosmicFilter/G4CosmicFilter/G4CosmicAndFilter.h index 82eda2b4f971fe76b6ce3dd7d014a7c93ac07e31..81232767e99ffa1f8414c2a23b26507cb9f38791 100644 --- a/Simulation/G4Extensions/G4CosmicFilter/G4CosmicFilter/G4CosmicAndFilter.h +++ b/Simulation/G4Extensions/G4CosmicFilter/G4CosmicFilter/G4CosmicAndFilter.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef G4COSMICFILTER_G4CosmicAndFilter_H @@ -8,9 +8,6 @@ #include "G4UserEventAction.hh" #include "AthenaBaseComps/AthMessaging.h" -#include "StoreGate/StoreGateSvc.h" -#include "GaudiKernel/ServiceHandle.h" - namespace G4UA { @@ -52,12 +49,6 @@ namespace G4UA Config m_config; Report m_report; - typedef ServiceHandle<StoreGateSvc> StoreGateSvc_t; - /// Pointer to StoreGate (event store by default) - mutable StoreGateSvc_t m_evtStore; - /// Pointer to StoreGate (detector store by default) - mutable StoreGateSvc_t m_detStore; - }; // class G4CosmicFilter } // namespace G4UA diff --git a/Simulation/G4Extensions/G4CosmicFilter/G4CosmicFilter/G4CosmicFilter.h b/Simulation/G4Extensions/G4CosmicFilter/G4CosmicFilter/G4CosmicFilter.h index 2080889d766f09755ee31df596cb3de117fa53c8..a72e73248e87a5053819ec39ac91fd3a48df762c 100644 --- a/Simulation/G4Extensions/G4CosmicFilter/G4CosmicFilter/G4CosmicFilter.h +++ b/Simulation/G4Extensions/G4CosmicFilter/G4CosmicFilter/G4CosmicFilter.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef G4COSMICFILTER_G4CosmicFilter_H @@ -8,10 +8,6 @@ #include "G4UserEventAction.hh" #include "AthenaBaseComps/AthMessaging.h" -#include "StoreGate/StoreGateSvc.h" -#include "GaudiKernel/ServiceHandle.h" - - namespace G4UA { @@ -22,43 +18,37 @@ namespace G4UA class G4CosmicFilter: public AthMessaging, public G4UserEventAction { - public: - - struct Config - { - std::string collectionName = "CaloEntryLayer"; - int PDGId = 0; - double ptMin = -1; - double ptMax = -1; - }; + public: - struct Report - { - int ntot = 0; - int npass = 0; - void merge(const Report& rep){ - ntot += rep.ntot; - npass += rep.npass; - } - }; + struct Config + { + std::string collectionName = "CaloEntryLayer"; + int PDGId = 0; + double ptMin = -1; + double ptMax = -1; + }; - G4CosmicFilter(const Config& config); + struct Report + { + int ntot = 0; + int npass = 0; + void merge(const Report& rep){ + ntot += rep.ntot; + npass += rep.npass; + } + }; - const Report& getReport() const - { return m_report; } + G4CosmicFilter(const Config& config); - virtual void EndOfEventAction(const G4Event*) override; + const Report& getReport() const + { return m_report; } - private: + virtual void EndOfEventAction(const G4Event*) override; - Config m_config; - Report m_report; + private: - typedef ServiceHandle<StoreGateSvc> StoreGateSvc_t; - /// Pointer to StoreGate (event store by default) - mutable StoreGateSvc_t m_evtStore; - /// Pointer to StoreGate (detector store by default) - mutable StoreGateSvc_t m_detStore; + Config m_config; + Report m_report; }; // class G4CosmicFilter diff --git a/Simulation/G4Extensions/G4CosmicFilter/G4CosmicFilter/G4CosmicOrFilter.h b/Simulation/G4Extensions/G4CosmicFilter/G4CosmicFilter/G4CosmicOrFilter.h index 1d148bc043e6dd777ab774bba22380db01e0e34f..432bbf80d7471af37e0ea6512eb0f47677ff0559 100644 --- a/Simulation/G4Extensions/G4CosmicFilter/G4CosmicFilter/G4CosmicOrFilter.h +++ b/Simulation/G4Extensions/G4CosmicFilter/G4CosmicFilter/G4CosmicOrFilter.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef G4COSMICFILTER_G4CosmicOrFilter_H @@ -8,9 +8,6 @@ #include "G4UserEventAction.hh" #include "AthenaBaseComps/AthMessaging.h" -#include "StoreGate/StoreGateSvc.h" -#include "GaudiKernel/ServiceHandle.h" - namespace G4UA { @@ -52,12 +49,6 @@ namespace G4UA Config m_config; Report m_report; - typedef ServiceHandle<StoreGateSvc> StoreGateSvc_t; - /// Pointer to StoreGate (event store by default) - mutable StoreGateSvc_t m_evtStore; - /// Pointer to StoreGate (detector store by default) - mutable StoreGateSvc_t m_detStore; - }; // class G4CosmicOrFilter } // namespace G4UA diff --git a/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicAndFilter.cxx b/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicAndFilter.cxx index 16d57f88b3d87cee8f129bdb242116a05c9b2f77..c5e6771cb96a59e52ae0277eecf25c233d3fb237 100644 --- a/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicAndFilter.cxx +++ b/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicAndFilter.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "G4CosmicFilter/G4CosmicAndFilter.h" @@ -19,9 +19,7 @@ namespace G4UA G4CosmicAndFilter::G4CosmicAndFilter(const Config& config) : AthMessaging(Gaudi::svcLocator()->service< IMessageSvc >( "MessageSvc" ), "G4CosmicAndFilter"), - m_config(config), m_report(), - m_evtStore("StoreGateSvc/StoreGateSvc", "G4CosmicAndFilter"), - m_detStore("StoreGateSvc/DetectorStore", "G4CosmicAndFilter") + m_config(config), m_report() { } @@ -33,35 +31,35 @@ namespace G4UA SG::ReadHandle <TrackRecordCollection> coll(m_config.collectionName); if (! coll.isValid()) { - ATH_MSG_WARNING( "Cannot retrieve TrackRecordCollection " << m_config.collectionName); + ATH_MSG_WARNING( "Cannot retrieve TrackRecordCollection " << m_config.collectionName); } else { - counter = coll->size(); + counter = coll->size(); } if (counter==0) { - ATH_MSG_INFO("aborting event due to failing AND filter"); - G4RunManager::GetRunManager()->AbortEvent(); - return; + ATH_MSG_INFO("aborting event due to failing AND filter"); + G4RunManager::GetRunManager()->AbortEvent(); + return; } SG::ReadHandle <TrackRecordCollection> coll2(m_config.collectionName2); if (! coll2.isValid()) - { - ATH_MSG_INFO( "Cannot retrieve TrackRecordCollection " << m_config.collectionName2 ); - } + { + ATH_MSG_INFO( "Cannot retrieve TrackRecordCollection " << m_config.collectionName2 ); + } else { - counter = coll2->size(); + counter = coll2->size(); } if (counter==0) { - ATH_MSG_INFO("aborting event due to failing AND filter"); - G4RunManager::GetRunManager()->AbortEvent(); - return; + ATH_MSG_INFO("aborting event due to failing AND filter"); + G4RunManager::GetRunManager()->AbortEvent(); + return; } m_report.npass++; diff --git a/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicAndFilterTool.cxx b/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicAndFilterTool.cxx index 09f041d9707d7fc19b5870d22370f3c43eb32c00..ae790053e18026ff100268ca0b8fdb9bdaf45958 100644 --- a/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicAndFilterTool.cxx +++ b/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicAndFilterTool.cxx @@ -1,8 +1,7 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ -#include "CxxUtils/make_unique.h" #include "G4CosmicFilter/G4CosmicAndFilterTool.h" namespace G4UA @@ -21,7 +20,7 @@ namespace G4UA G4CosmicAndFilterTool::makeAndFillAction(G4AtlasUserActions& actionList) { ATH_MSG_DEBUG("Constructing a G4CosmicAndFilter"); - auto action = CxxUtils::make_unique<G4CosmicAndFilter>(m_config); + auto action = std::make_unique<G4CosmicAndFilter>(m_config); actionList.eventActions.push_back( action.get() ); return action; } diff --git a/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicFilter.cxx b/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicFilter.cxx index 2d419bfefc907396caf1169d394137764b8dc4b8..9115d6337912d5648b6d504e8dfe202ba21b8ba1 100644 --- a/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicFilter.cxx +++ b/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicFilter.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "G4CosmicFilter/G4CosmicFilter.h" @@ -20,9 +20,7 @@ namespace G4UA G4CosmicFilter::G4CosmicFilter(const Config& config) : AthMessaging(Gaudi::svcLocator()->service< IMessageSvc >( "MessageSvc" ), "G4CosmicFilter"), - m_config(config), m_report(), - m_evtStore("StoreGateSvc/StoreGateSvc","G4CosmicFilter"), - m_detStore("StoreGateSvc/DetectorStore","G4CosmicFilter") + m_config(config), m_report() { } @@ -35,31 +33,31 @@ namespace G4UA SG::ReadHandle <TrackRecordCollection> coll(m_config.collectionName); if (! coll.isValid() ) { - ATH_MSG_WARNING( "Cannot retrieve TrackRecordCollection " << m_config.collectionName ); - G4RunManager::GetRunManager()->AbortEvent(); - return; + ATH_MSG_WARNING( "Cannot retrieve TrackRecordCollection " << m_config.collectionName ); + G4RunManager::GetRunManager()->AbortEvent(); + return; } counter = coll->size(); if (m_config.PDGId!=0 || m_config.ptMin>0 || m_config.ptMax>0) { - counter=0; - for (const auto& a_tr : *coll) - { - if (m_config.PDGId!=0 && m_config.PDGId != fabs(a_tr.GetPDGCode())) continue; - if (m_config.ptMin>0 && m_config.ptMin > a_tr.GetMomentum().perp() ) continue; - if (m_config.ptMax>0 && m_config.ptMax < a_tr.GetMomentum().perp() ) continue; - counter++; - } + counter=0; + for (const auto& a_tr : *coll) + { + if (m_config.PDGId!=0 && m_config.PDGId != fabs(a_tr.GetPDGCode())) continue; + if (m_config.ptMin>0 && m_config.ptMin > a_tr.GetMomentum().perp() ) continue; + if (m_config.ptMax>0 && m_config.ptMax < a_tr.GetMomentum().perp() ) continue; + counter++; + } } //std::cout << "EndOfEventAction counter is "<<counter<<std::endl; if (counter==0) { - ATH_MSG_INFO("aborting event due to failing filter"); - G4RunManager::GetRunManager()->AbortEvent(); - return; + ATH_MSG_INFO("aborting event due to failing filter"); + G4RunManager::GetRunManager()->AbortEvent(); + return; } m_report.npass++; diff --git a/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicFilterTool.cxx b/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicFilterTool.cxx index dc9d6e2cc27c3558e7ce743824b52898e4139209..a9b9f35ed14a2bf27905eea9980e55bcc0a7a54c 100644 --- a/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicFilterTool.cxx +++ b/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicFilterTool.cxx @@ -1,8 +1,7 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ -#include "CxxUtils/make_unique.h" #include "G4CosmicFilter/G4CosmicFilterTool.h" namespace G4UA @@ -23,7 +22,7 @@ namespace G4UA G4CosmicFilterTool::makeAndFillAction(G4AtlasUserActions& actionList) { ATH_MSG_DEBUG("Constructing a G4CosmicFilter"); - auto action = CxxUtils::make_unique<G4CosmicFilter>(m_config); + auto action = std::make_unique<G4CosmicFilter>(m_config); actionList.eventActions.push_back( action.get() ); return action; } diff --git a/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicOrFilter.cxx b/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicOrFilter.cxx index 3553e940a59176aa128382556dceaf0644db6461..355352aa787d7a855f7d8f030e3313e46ed84c44 100644 --- a/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicOrFilter.cxx +++ b/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicOrFilter.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "G4CosmicFilter/G4CosmicOrFilter.h" @@ -18,9 +18,7 @@ namespace G4UA G4CosmicOrFilter::G4CosmicOrFilter(const Config& config) : AthMessaging(Gaudi::svcLocator()->service< IMessageSvc >("MessageSvc"), "G4CosmicOrFilter"), - m_config(config), m_report(), - m_evtStore("StoreGateSvc/StoreGateSvc","G4CosmicOrFilter"), - m_detStore("StoreGateSvc/DetectorStore","G4CosmicOrFilter") + m_config(config), m_report() { } diff --git a/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicOrFilterTool.cxx b/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicOrFilterTool.cxx index 0e5bae175fd217d7bd7be35b981f4f7768165612..83cb65643ca3535f058aaf7fac3118438dae9e5c 100644 --- a/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicOrFilterTool.cxx +++ b/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicOrFilterTool.cxx @@ -1,8 +1,7 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ -#include "CxxUtils/make_unique.h" #include "G4CosmicFilter/G4CosmicOrFilterTool.h" namespace G4UA @@ -22,7 +21,7 @@ namespace G4UA G4CosmicOrFilterTool::makeAndFillAction(G4AtlasUserActions& actionList) { ATH_MSG_DEBUG("Constructing a G4CosmicFilter"); - auto action = CxxUtils::make_unique<G4CosmicOrFilter>(m_config); + auto action = std::make_unique<G4CosmicOrFilter>(m_config); actionList.eventActions.push_back( action.get() ); return action; } diff --git a/Simulation/G4Extensions/G4HitFilter/ATLAS_CHECK_THREAD_SAFETY b/Simulation/G4Extensions/G4HitFilter/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..a842c9e8394390582d1e135facc7aa43e29632c9 --- /dev/null +++ b/Simulation/G4Extensions/G4HitFilter/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Simulation/G4Extensions/G4HitFilter diff --git a/Simulation/G4Extensions/G4ScoringProcess/ATLAS_CHECK_THREAD_SAFETY b/Simulation/G4Extensions/G4ScoringProcess/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..e006b33ce287b5b6134280ad986e92fc663078ed --- /dev/null +++ b/Simulation/G4Extensions/G4ScoringProcess/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Simulation/G4Extensions/G4ScoringProcess diff --git a/Simulation/G4Utilities/G4UserActions/G4UserActions/RadiationMapsMaker.h b/Simulation/G4Utilities/G4UserActions/G4UserActions/RadiationMapsMaker.h index b46283480096e78d1c2643f8577c6a5eb5809831..34dfd248d8b47391143ed5ee3d6c8254572fe98a 100644 --- a/Simulation/G4Utilities/G4UserActions/G4UserActions/RadiationMapsMaker.h +++ b/Simulation/G4Utilities/G4UserActions/G4UserActions/RadiationMapsMaker.h @@ -65,6 +65,10 @@ namespace G4UA std::vector<double> m_rz_niel; /// vector of >20 MeV hadron flux seen by thread in zoomed area std::vector<double> m_rz_h20; + /// vector of >100 keV hadron flux seen by thread in zoomed area + std::vector<double> m_rz_neut; + /// vector of charged hadron flux seen by thread in zoomed area + std::vector<double> m_rz_chad; /// next two vectors are used only in case maps are needed for a particular material instead of all @@ -81,6 +85,10 @@ namespace G4UA std::vector<double> m_full_rz_niel; /// vector of >20 MeV hadron flux seen by thread in full area std::vector<double> m_full_rz_h20; + /// vector of >100 keV hadron flux seen by thread in full area + std::vector<double> m_full_rz_neut; + /// vector of charged hadron flux seen by thread in full area + std::vector<double> m_full_rz_chad; /// next two vectors are used only in case maps are needed for a particular material instead of all @@ -97,6 +105,10 @@ namespace G4UA std::vector<double> m_3d_niel; /// vector of >20 MeV hadron flux seen by thread in 3d std::vector<double> m_3d_h20; + /// vector of >100 keV hadron flux seen by thread in 3d + std::vector<double> m_3d_neut; + /// vector of charged hadron flux seen by thread in 3d + std::vector<double> m_3d_chad; /// next two vectors are used only in case maps are needed for a particular material instead of all diff --git a/Simulation/G4Utilities/G4UserActions/src/RadiationMapsMaker.cxx b/Simulation/G4Utilities/G4UserActions/src/RadiationMapsMaker.cxx index 701557681083877277b30c1bab7b3db1c23e7792..1647b4bec839528694d45faa8bf1e75c65bcc21b 100644 --- a/Simulation/G4Utilities/G4UserActions/src/RadiationMapsMaker.cxx +++ b/Simulation/G4Utilities/G4UserActions/src/RadiationMapsMaker.cxx @@ -74,12 +74,16 @@ namespace G4UA{ m_rz_eion[i] += maps.m_rz_eion[i]; m_rz_niel[i] += maps.m_rz_niel[i]; m_rz_h20 [i] += maps.m_rz_h20 [i]; + m_rz_neut[i] += maps.m_rz_neut[i]; + m_rz_chad[i] += maps.m_rz_chad[i]; // full 2d m_full_rz_tid [i] += maps.m_full_rz_tid [i]; m_full_rz_eion[i] += maps.m_full_rz_eion[i]; m_full_rz_niel[i] += maps.m_full_rz_niel[i]; m_full_rz_h20 [i] += maps.m_full_rz_h20 [i]; + m_full_rz_neut[i] += maps.m_full_rz_neut[i]; + m_full_rz_chad[i] += maps.m_full_rz_chad[i]; } for(unsigned int i=0;i<maps.m_rz_vol.size();i++) { @@ -97,6 +101,8 @@ namespace G4UA{ m_3d_eion[i] += maps.m_3d_eion[i]; m_3d_niel[i] += maps.m_3d_niel[i]; m_3d_h20 [i] += maps.m_3d_h20 [i]; + m_3d_neut[i] += maps.m_3d_neut[i]; + m_3d_chad[i] += maps.m_3d_chad[i]; } for(unsigned int i=0;i<maps.m_3d_vol.size();i++) { @@ -114,16 +120,22 @@ namespace G4UA{ m_maps.m_rz_eion.resize(0); m_maps.m_rz_niel.resize(0); m_maps.m_rz_h20 .resize(0); + m_maps.m_rz_neut.resize(0); + m_maps.m_rz_chad.resize(0); m_maps.m_full_rz_tid .resize(0); m_maps.m_full_rz_eion.resize(0); m_maps.m_full_rz_niel.resize(0); m_maps.m_full_rz_h20 .resize(0); + m_maps.m_full_rz_neut.resize(0); + m_maps.m_full_rz_chad.resize(0); m_maps.m_3d_tid .resize(0); m_maps.m_3d_eion.resize(0); m_maps.m_3d_niel.resize(0); m_maps.m_3d_h20 .resize(0); + m_maps.m_3d_neut.resize(0); + m_maps.m_3d_chad.resize(0); if (!m_config.material.empty()) { // need volume fraction only if particular material is selected @@ -141,16 +153,22 @@ namespace G4UA{ m_maps.m_rz_eion.resize(m_config.nBinsz*m_config.nBinsr,0.0); m_maps.m_rz_niel.resize(m_config.nBinsz*m_config.nBinsr,0.0); m_maps.m_rz_h20 .resize(m_config.nBinsz*m_config.nBinsr,0.0); + m_maps.m_rz_neut.resize(m_config.nBinsz*m_config.nBinsr,0.0); + m_maps.m_rz_chad.resize(m_config.nBinsz*m_config.nBinsr,0.0); m_maps.m_full_rz_tid .resize(m_config.nBinsz*m_config.nBinsr,0.0); m_maps.m_full_rz_eion.resize(m_config.nBinsz*m_config.nBinsr,0.0); m_maps.m_full_rz_niel.resize(m_config.nBinsz*m_config.nBinsr,0.0); m_maps.m_full_rz_h20 .resize(m_config.nBinsz*m_config.nBinsr,0.0); + m_maps.m_full_rz_neut.resize(m_config.nBinsz*m_config.nBinsr,0.0); + m_maps.m_full_rz_chad.resize(m_config.nBinsz*m_config.nBinsr,0.0); m_maps.m_3d_tid .resize(m_config.nBinsz3d*m_config.nBinsr3d*m_config.nBinsphi3d,0.0); m_maps.m_3d_eion.resize(m_config.nBinsz3d*m_config.nBinsr3d*m_config.nBinsphi3d,0.0); m_maps.m_3d_niel.resize(m_config.nBinsz3d*m_config.nBinsr3d*m_config.nBinsphi3d,0.0); m_maps.m_3d_h20 .resize(m_config.nBinsz3d*m_config.nBinsr3d*m_config.nBinsphi3d,0.0); + m_maps.m_3d_neut.resize(m_config.nBinsz3d*m_config.nBinsr3d*m_config.nBinsphi3d,0.0); + m_maps.m_3d_chad.resize(m_config.nBinsz3d*m_config.nBinsr3d*m_config.nBinsphi3d,0.0); if (!m_config.material.empty()) { // need volume fraction only if particular material is selected @@ -223,8 +241,7 @@ namespace G4UA{ aStep->GetTrack()->GetDefinition()==G4KaonZeroLong::Definition() || aStep->GetTrack()->GetDefinition()==G4KaonZero::Definition() || aStep->GetTrack()->GetDefinition()==G4AntiKaonZero::Definition() || - aStep->GetTrack()->GetDefinition()==G4PionZero::Definition() || - aStep->GetTrack()->GetDefinition()==G4KaonPlus::Definition()){ + aStep->GetTrack()->GetDefinition()==G4PionZero::Definition()){ pdgid=8; // particles not charged pions treated as charged pions for NIEL } else if (aStep->GetTrack()->GetDefinition()==G4AntiProton::Definition() || @@ -259,12 +276,14 @@ namespace G4UA{ pdgid = 9; } } - // process NIEL, h20 and Edep particles only + // process NIEL, h20, Edep, NEUT and CHAD particles only if ( pdgid == 1 || pdgid == 2 || pdgid == 4 || pdgid == 5 || pdgid == 6 || pdgid == 7 || pdgid == 8 || pdgid == 9 || /* NIEL & h20*/ aStep->GetTotalEnergyDeposit() > 0 || pdgid == 999) { + double absq = fabs(aStep->GetTrack()->GetDefinition()->GetPDGCharge()); + double rho = aStep->GetTrack()->GetMaterial()->GetDensity()/CLHEP::g*CLHEP::cm3; bool goodMaterial(false); @@ -333,7 +352,8 @@ namespace G4UA{ double dE_NIEL = aStep->GetNonIonizingEnergyDeposit()/nStep; double dE_ION = dE_TOT-dE_NIEL; - if ( weight > 0 || eKin > 20 || dE_TOT > 0 || pdgid == 999) { + // NIEL SEE TID NEUT CHAD geantino + if ( weight > 0 || eKin > 20 || dE_TOT > 0 || ((pdgid == 6 || pdgid == 7) && eKin > 0.1) || (absq>0 && (pdgid == 1 || pdgid == 2 || pdgid == 8 || pdgid == 9)) || pdgid == 999 ) { for(unsigned int i=0;i<nStep;i++) { double absz = fabs(z0+dz*(i+0.5)); @@ -395,6 +415,7 @@ namespace G4UA{ } } + // TID & EION if ( goodMaterial && vBinZoom >=0 ) { if ( pdgid == 999 ) { m_maps.m_rz_tid [vBinZoom] += 1; @@ -425,9 +446,9 @@ namespace G4UA{ m_maps.m_3d_eion[vBin3d] += dE_ION; } } - + if ( goodMaterial && (pdgid == 1 || pdgid == 2 || pdgid == 4 || pdgid == 5 || pdgid == 6 || pdgid == 7 || pdgid == 8 || pdgid == 9 )) { - + // NIEL if ( weight > 0 ) { if ( vBinZoom >=0 ) { m_maps.m_rz_niel [vBinZoom] += weight*dl; @@ -439,6 +460,7 @@ namespace G4UA{ m_maps.m_3d_niel [vBin3d] += weight*dl; } } + // SEE if ( eKin > 20 && (pdgid == 1 || pdgid == 2 || pdgid == 6 || pdgid == 7 || pdgid == 8 || pdgid == 9) ) { if ( vBinZoom >=0 ) { m_maps.m_rz_h20 [vBinZoom] += dl; @@ -450,6 +472,30 @@ namespace G4UA{ m_maps.m_3d_h20 [vBin3d] += dl; } } + // NEUT + if ( eKin > 0.1 && (pdgid == 6 || pdgid == 7 ) ) { + if ( vBinZoom >=0 ) { + m_maps.m_rz_neut [vBinZoom] += dl; + } + if ( vBinFull >=0 ) { + m_maps.m_full_rz_neut [vBinFull] += dl; + } + if ( vBin3d >=0 ) { + m_maps.m_3d_neut [vBin3d] += dl; + } + } + // CHAD + if ( absq > 0 && (pdgid == 1 || pdgid == 2 || pdgid == 8 || pdgid == 9 ) ) { + if ( vBinZoom >=0 ) { + m_maps.m_rz_chad [vBinZoom] += dl; + } + if ( vBinFull >=0 ) { + m_maps.m_full_rz_chad [vBinFull] += dl; + } + if ( vBin3d >=0 ) { + m_maps.m_3d_chad [vBin3d] += dl; + } + } } if (!m_config.material.empty()) { // need volume fraction only if particular material is selected diff --git a/Simulation/G4Utilities/G4UserActions/src/RadiationMapsMakerTool.cxx b/Simulation/G4Utilities/G4UserActions/src/RadiationMapsMakerTool.cxx index 1f4b7074090eaf435a1a920b658578847da91ece..de6c9f17a0fab0ed75757f9b4dd34cdc5a0670b7 100644 --- a/Simulation/G4Utilities/G4UserActions/src/RadiationMapsMakerTool.cxx +++ b/Simulation/G4Utilities/G4UserActions/src/RadiationMapsMakerTool.cxx @@ -81,16 +81,22 @@ namespace G4UA{ maps.m_rz_eion.resize(0); maps.m_rz_niel.resize(0); maps.m_rz_h20 .resize(0); + maps.m_rz_neut.resize(0); + maps.m_rz_chad.resize(0); maps.m_full_rz_tid .resize(0); maps.m_full_rz_eion.resize(0); maps.m_full_rz_niel.resize(0); maps.m_full_rz_h20 .resize(0); + maps.m_full_rz_neut.resize(0); + maps.m_full_rz_chad.resize(0); maps.m_3d_tid .resize(0); maps.m_3d_eion.resize(0); maps.m_3d_niel.resize(0); maps.m_3d_h20 .resize(0); + maps.m_3d_neut.resize(0); + maps.m_3d_chad.resize(0); if (!m_config.material.empty()) { // need volume fraction only if particular material is selected @@ -111,16 +117,22 @@ namespace G4UA{ maps.m_rz_eion.resize(m_config.nBinsz*m_config.nBinsr,0.0); maps.m_rz_niel.resize(m_config.nBinsz*m_config.nBinsr,0.0); maps.m_rz_h20 .resize(m_config.nBinsz*m_config.nBinsr,0.0); + maps.m_rz_neut.resize(m_config.nBinsz*m_config.nBinsr,0.0); + maps.m_rz_chad.resize(m_config.nBinsz*m_config.nBinsr,0.0); maps.m_full_rz_tid .resize(m_config.nBinsz*m_config.nBinsr,0.0); maps.m_full_rz_eion.resize(m_config.nBinsz*m_config.nBinsr,0.0); maps.m_full_rz_niel.resize(m_config.nBinsz*m_config.nBinsr,0.0); maps.m_full_rz_h20 .resize(m_config.nBinsz*m_config.nBinsr,0.0); + maps.m_full_rz_neut.resize(m_config.nBinsz*m_config.nBinsr,0.0); + maps.m_full_rz_chad.resize(m_config.nBinsz*m_config.nBinsr,0.0); maps.m_3d_tid .resize(m_config.nBinsz3d*m_config.nBinsr3d*m_config.nBinsphi3d,0.0); maps.m_3d_eion.resize(m_config.nBinsz3d*m_config.nBinsr3d*m_config.nBinsphi3d,0.0); maps.m_3d_niel.resize(m_config.nBinsz3d*m_config.nBinsr3d*m_config.nBinsphi3d,0.0); maps.m_3d_h20 .resize(m_config.nBinsz3d*m_config.nBinsr3d*m_config.nBinsphi3d,0.0); + maps.m_3d_neut.resize(m_config.nBinsz3d*m_config.nBinsr3d*m_config.nBinsphi3d,0.0); + maps.m_3d_chad.resize(m_config.nBinsz3d*m_config.nBinsr3d*m_config.nBinsphi3d,0.0); if (!m_config.material.empty()) { // need volume fraction only if particular material is selected @@ -146,66 +158,92 @@ namespace G4UA{ TH2D * h_rz_eion = new TH2D("rz_eion","rz_eion",m_config.nBinsz,m_config.zMinZoom,m_config.zMaxZoom,m_config.nBinsr,m_config.rMinZoom,m_config.rMaxZoom); TH2D * h_rz_niel = new TH2D("rz_niel","rz_niel",m_config.nBinsz,m_config.zMinZoom,m_config.zMaxZoom,m_config.nBinsr,m_config.rMinZoom,m_config.rMaxZoom); TH2D * h_rz_h20 = new TH2D("rz_h20" ,"rz_h20" ,m_config.nBinsz,m_config.zMinZoom,m_config.zMaxZoom,m_config.nBinsr,m_config.rMinZoom,m_config.rMaxZoom); + TH2D * h_rz_neut = new TH2D("rz_neut","rz_neut",m_config.nBinsz,m_config.zMinZoom,m_config.zMaxZoom,m_config.nBinsr,m_config.rMinZoom,m_config.rMaxZoom); + TH2D * h_rz_chad = new TH2D("rz_chad","rz_chad",m_config.nBinsz,m_config.zMinZoom,m_config.zMaxZoom,m_config.nBinsr,m_config.rMinZoom,m_config.rMaxZoom); h_rz_tid ->SetXTitle("|z| [cm]"); h_rz_eion ->SetXTitle("|z| [cm]"); h_rz_niel ->SetXTitle("|z| [cm]"); h_rz_h20 ->SetXTitle("|z| [cm]"); + h_rz_neut ->SetXTitle("|z| [cm]"); + h_rz_chad ->SetXTitle("|z| [cm]"); h_rz_tid ->SetYTitle("r [cm]"); h_rz_eion ->SetYTitle("r [cm]"); h_rz_niel ->SetYTitle("r [cm]"); h_rz_h20 ->SetYTitle("r [cm]"); + h_rz_neut ->SetYTitle("r [cm]"); + h_rz_chad ->SetYTitle("r [cm]"); h_rz_tid ->SetZTitle("TID [Gy]"); h_rz_eion ->SetZTitle("E_{ion}/V [MeV/cm^{3}]"); h_rz_niel ->SetZTitle("NIEL [n_{eq}/cm^{2}]"); h_rz_h20 ->SetZTitle("SEE [h_{>20 MeV}/cm^{2}]"); + h_rz_neut ->SetZTitle("FLUX [n_{>100 keV}/cm^{2}]"); + h_rz_chad ->SetZTitle("FLUX [h_{charged}/cm^{2}]"); TH2D *h_full_rz_tid = new TH2D("full_rz_tid" ,"full_rz_tid" ,m_config.nBinsz,m_config.zMinFull,m_config.zMaxFull,m_config.nBinsr,m_config.rMinFull,m_config.rMaxFull); TH2D *h_full_rz_eion = new TH2D("full_rz_eion","full_rz_eion",m_config.nBinsz,m_config.zMinFull,m_config.zMaxFull,m_config.nBinsr,m_config.rMinFull,m_config.rMaxFull); TH2D *h_full_rz_niel = new TH2D("full_rz_niel","full_rz_niel",m_config.nBinsz,m_config.zMinFull,m_config.zMaxFull,m_config.nBinsr,m_config.rMinFull,m_config.rMaxFull); TH2D *h_full_rz_h20 = new TH2D("full_rz_h20" ,"full_rz_h20" ,m_config.nBinsz,m_config.zMinFull,m_config.zMaxFull,m_config.nBinsr,m_config.rMinFull,m_config.rMaxFull); + TH2D *h_full_rz_neut = new TH2D("full_rz_neut","full_rz_neut",m_config.nBinsz,m_config.zMinFull,m_config.zMaxFull,m_config.nBinsr,m_config.rMinFull,m_config.rMaxFull); + TH2D *h_full_rz_chad = new TH2D("full_rz_chad","full_rz_chad",m_config.nBinsz,m_config.zMinFull,m_config.zMaxFull,m_config.nBinsr,m_config.rMinFull,m_config.rMaxFull); h_full_rz_tid ->SetXTitle("|z| [cm]"); h_full_rz_eion ->SetXTitle("|z| [cm]"); h_full_rz_niel ->SetXTitle("|z| [cm]"); h_full_rz_h20 ->SetXTitle("|z| [cm]"); + h_full_rz_neut ->SetXTitle("|z| [cm]"); + h_full_rz_chad ->SetXTitle("|z| [cm]"); h_full_rz_tid ->SetYTitle("r [cm]"); h_full_rz_eion ->SetYTitle("r [cm]"); h_full_rz_niel ->SetYTitle("r [cm]"); h_full_rz_h20 ->SetYTitle("r [cm]"); + h_full_rz_neut ->SetYTitle("r [cm]"); + h_full_rz_chad ->SetYTitle("r [cm]"); h_full_rz_tid ->SetZTitle("TID [Gy]"); h_full_rz_eion ->SetZTitle("E_{ion}/V [MeV/cm^{3}]"); h_full_rz_niel ->SetZTitle("NIEL [n_{eq}/cm^{2}]"); h_full_rz_h20 ->SetZTitle("SEE [h_{>20 MeV}/cm^{2}]"); + h_full_rz_neut ->SetZTitle("FLUX [n_{>100 keV}/cm^{2}]"); + h_full_rz_chad ->SetZTitle("FLUX [h_{charged}/cm^{2}]"); TH3D * h_3d_tid = new TH3D("h3d_tid" ,"h3d_tid" ,m_config.nBinsz3d,m_config.zMinZoom,m_config.zMaxZoom,m_config.nBinsr3d,m_config.rMinZoom,m_config.rMaxZoom,m_config.nBinsphi3d,m_config.phiMinZoom,m_config.phiMaxZoom); TH3D * h_3d_eion = new TH3D("h3d_eion","h3d_eion",m_config.nBinsz3d,m_config.zMinZoom,m_config.zMaxZoom,m_config.nBinsr3d,m_config.rMinZoom,m_config.rMaxZoom,m_config.nBinsphi3d,m_config.phiMinZoom,m_config.phiMaxZoom); TH3D * h_3d_niel = new TH3D("h3d_niel","h3d_niel",m_config.nBinsz3d,m_config.zMinZoom,m_config.zMaxZoom,m_config.nBinsr3d,m_config.rMinZoom,m_config.rMaxZoom,m_config.nBinsphi3d,m_config.phiMinZoom,m_config.phiMaxZoom); TH3D * h_3d_h20 = new TH3D("h3d_h20" ,"h3d_h20" ,m_config.nBinsz3d,m_config.zMinZoom,m_config.zMaxZoom,m_config.nBinsr3d,m_config.rMinZoom,m_config.rMaxZoom,m_config.nBinsphi3d,m_config.phiMinZoom,m_config.phiMaxZoom); + TH3D * h_3d_neut = new TH3D("h3d_neut","h3d_neut",m_config.nBinsz3d,m_config.zMinZoom,m_config.zMaxZoom,m_config.nBinsr3d,m_config.rMinZoom,m_config.rMaxZoom,m_config.nBinsphi3d,m_config.phiMinZoom,m_config.phiMaxZoom); + TH3D * h_3d_chad = new TH3D("h3d_chad","h3d_chad",m_config.nBinsz3d,m_config.zMinZoom,m_config.zMaxZoom,m_config.nBinsr3d,m_config.rMinZoom,m_config.rMaxZoom,m_config.nBinsphi3d,m_config.phiMinZoom,m_config.phiMaxZoom); h_3d_tid ->SetXTitle("|z| [cm]"); h_3d_eion ->SetXTitle("|z| [cm]"); h_3d_niel ->SetXTitle("|z| [cm]"); h_3d_h20 ->SetXTitle("|z| [cm]"); + h_3d_neut ->SetXTitle("|z| [cm]"); + h_3d_chad ->SetXTitle("|z| [cm]"); h_3d_tid ->SetYTitle("r [cm]"); h_3d_eion ->SetYTitle("r [cm]"); h_3d_niel ->SetYTitle("r [cm]"); h_3d_h20 ->SetYTitle("r [cm]"); + h_3d_neut ->SetYTitle("r [cm]"); + h_3d_chad ->SetYTitle("r [cm]"); h_3d_tid ->SetZTitle("#phi [#circ]"); h_3d_eion ->SetZTitle("#phi [#circ]"); h_3d_niel ->SetZTitle("#phi [#circ]"); h_3d_h20 ->SetZTitle("#phi [#circ]"); + h_3d_neut ->SetZTitle("#phi [#circ]"); + h_3d_chad ->SetZTitle("#phi [#circ]"); h_3d_tid ->SetTitle("TID [Gy]"); h_3d_eion ->SetTitle("E_{ion}/V [MeV/cm^{3}]"); h_3d_niel ->SetTitle("NIEL [n_{eq}/cm^{2}]"); h_3d_h20 ->SetTitle("SEE [h_{>20 MeV}/cm^{2}]"); + h_3d_neut ->SetTitle("FLUX [n_{>100 keV}/cm^{2}]"); + h_3d_chad ->SetTitle("FLUX [h_{charged}/cm^{2}]"); TH2D * h_rz_vol = 0; TH2D * h_rz_norm = 0; @@ -278,6 +316,12 @@ namespace G4UA{ // SEE val =maps.m_rz_h20[vBin]; h_rz_h20->SetBinContent(iBin,val/vol); + // NEUT + val =maps.m_rz_neut[vBin]; + h_rz_neut->SetBinContent(iBin,val/vol); + // CHAD + val =maps.m_rz_chad[vBin]; + h_rz_chad->SetBinContent(iBin,val/vol); if (!m_config.material.empty()) { // need volume fraction only if particular material is selected // VOL @@ -293,6 +337,8 @@ namespace G4UA{ h_rz_eion->Write(); h_rz_niel->Write(); h_rz_h20->Write(); + h_rz_neut->Write(); + h_rz_chad->Write(); // normalize to volume element per bin for(int i=0;i<h_full_rz_tid->GetNbinsX();i++) { @@ -317,6 +363,12 @@ namespace G4UA{ // SEE val =maps.m_full_rz_h20[vBin]; h_full_rz_h20->SetBinContent(iBin,val/vol); + // NEUT + val =maps.m_full_rz_neut[vBin]; + h_full_rz_neut->SetBinContent(iBin,val/vol); + // CHAD + val =maps.m_full_rz_chad[vBin]; + h_full_rz_chad->SetBinContent(iBin,val/vol); if (!m_config.material.empty()) { // need volume fraction only if particular material is selected // VOL @@ -332,6 +384,8 @@ namespace G4UA{ h_full_rz_eion->Write(); h_full_rz_niel->Write(); h_full_rz_h20->Write(); + h_full_rz_neut->Write(); + h_full_rz_chad->Write(); // normalize to volume element per bin for(int i=0;i<h_3d_tid->GetNbinsX();i++) { /* |z| */ @@ -364,6 +418,12 @@ namespace G4UA{ // SEE val =maps.m_3d_h20[vBin]; h_3d_h20->SetBinContent(iBin,val/vol); + // NEUT + val =maps.m_3d_neut[vBin]; + h_3d_neut->SetBinContent(iBin,val/vol); + // CHAD + val =maps.m_3d_chad[vBin]; + h_3d_chad->SetBinContent(iBin,val/vol); if (!m_config.material.empty()) { // need volume fraction only if particular material is selected // VOL @@ -380,6 +440,8 @@ namespace G4UA{ h_3d_eion->Write(); h_3d_niel->Write(); h_3d_h20->Write(); + h_3d_neut->Write(); + h_3d_chad->Write(); if (!m_config.material.empty()) { // need volume fraction only if particular material is selected diff --git a/Simulation/HitManagement/HitManagement/TimedHitCollection.icc b/Simulation/HitManagement/HitManagement/TimedHitCollection.icc index 481d14e9ccc6c837303eb1410e866ef5d23900a6..dc029648da45d1e02872426192bc71b8ed38075d 100755 --- a/Simulation/HitManagement/HitManagement/TimedHitCollection.icc +++ b/Simulation/HitManagement/HitManagement/TimedHitCollection.icc @@ -7,15 +7,15 @@ #include <algorithm> #include <exception> template <class HIT> -void +void TimedHitCollection<HIT>::insert(const PileUpTimeEventIndex& timeEventIndex, - const AtlasHitsVector<HIT>* inputCollection) { + const AtlasHitsVector<HIT>* inputCollection) { if (!inputCollection){ - throw("Empty input collection!"); + throw("Empty input collection!"); } typename AtlasHitsVector<HIT>::const_iterator i(inputCollection->begin()); typename AtlasHitsVector<HIT>::const_iterator e(inputCollection->end()); - while (i!=e) m_hits.push_back(TimedHitPtr<HIT>(timeEventIndex.time(), timeEventIndex.index(), &(*i++) )); + while (i!=e) m_hits.push_back(TimedHitPtr<HIT>(timeEventIndex.time(), timeEventIndex.index(), &(*i++), timeEventIndex.type() )); if (m_sorted) { m_sorted=false; throw SortedException(); @@ -23,11 +23,11 @@ TimedHitCollection<HIT>::insert(const PileUpTimeEventIndex& timeEventIndex, } template <class HIT> -void -TimedHitCollection<HIT>::insert(float evtTime, - const AtlasHitsVector<HIT>* inputCollection) { +void +TimedHitCollection<HIT>::insert(float evtTime, + const AtlasHitsVector<HIT>* inputCollection) { if (!inputCollection){ - throw("Empty input collection!"); + throw("Empty input collection!"); } typename AtlasHitsVector<HIT>::const_iterator i(inputCollection->begin()); typename AtlasHitsVector<HIT>::const_iterator e(inputCollection->end()); @@ -39,15 +39,15 @@ TimedHitCollection<HIT>::insert(float evtTime, } template <class HIT> -void +void TimedHitCollection<HIT>::reserve(unsigned int numberOfHits) { m_hits.reserve(numberOfHits); return; } ///returns an iterator range with the hits of current detector element -template <class HIT> -bool +template <class HIT> +bool TimedHitCollection<HIT>::nextDetectorElement(const_iterator& b, const_iterator& e) const { if (!m_sorted) sortVector(); b = m_currentHit; @@ -55,12 +55,11 @@ TimedHitCollection<HIT>::nextDetectorElement(const_iterator& b, const_iterator& e = m_currentHit; return (b != e); } - + template <class HIT> -void +void TimedHitCollection<HIT>::sortVector() const { std::stable_sort(m_hits.begin(), m_hits.end()); m_currentHit = m_hits.begin(); m_sorted=true; } - diff --git a/Simulation/HitManagement/HitManagement/TimedHitPtr.h b/Simulation/HitManagement/HitManagement/TimedHitPtr.h index 5cfa88d49609cb35e9757b59f710cc7582ff6ccb..a0ef033aa4255c51dbd69261459f7faa8e33f0b1 100755 --- a/Simulation/HitManagement/HitManagement/TimedHitPtr.h +++ b/Simulation/HitManagement/HitManagement/TimedHitPtr.h @@ -16,20 +16,20 @@ template <class HIT> class TimedHitPtr { public: ///STL required constructors - TimedHitPtr() : m_eventTime(0), m_eventId(0), m_pHit(0) {} + TimedHitPtr() : m_eventTime(0), m_eventId(0), m_pileupType(0), m_pHit(nullptr) {} TimedHitPtr(const TimedHitPtr<HIT>& rhs) : - m_eventTime(rhs.m_eventTime), m_eventId(rhs.m_eventId), m_pHit(rhs.m_pHit) {} + m_eventTime(rhs.m_eventTime), m_eventId(rhs.m_eventId), m_pileupType(rhs.m_pileupType), m_pHit(rhs.m_pHit) {} ///minimal constructor: pass only t0 offset of bunch xing - TimedHitPtr(float eventTime, const HIT* pHit) : - m_eventTime(eventTime), m_eventId(0), m_pHit(pHit) {} + TimedHitPtr(float eventTime, const HIT* pHit, int pileupType=0) : + m_eventTime(eventTime), m_eventId(0), m_pileupType(pileupType), m_pHit(pHit) {} ///use this constructor when hit has a PileUpTimeEventIndex - TimedHitPtr(float eventTime, unsigned short eventId, const HIT* pHit) : - m_eventTime(eventTime), m_eventId(eventId), m_pHit(pHit) {} + TimedHitPtr(float eventTime, unsigned short eventId, const HIT* pHit, int pileupType=0) : + m_eventTime(eventTime), m_eventId(eventId), m_pileupType(pileupType), m_pHit(pHit) {} ///assignment operator TimedHitPtr<HIT>& operator=(const TimedHitPtr<HIT>& rhs) { - if(&rhs != this) { m_eventTime = rhs.m_eventTime; m_eventId = rhs.m_eventId; m_pHit = rhs.m_pHit; } + if(&rhs != this) { m_eventTime = rhs.m_eventTime; m_eventId = rhs.m_eventId; m_pileupType = rhs.m_pileupType; m_pHit = rhs.m_pHit; } return *this; } @@ -41,6 +41,10 @@ public: ///to navigate back to the parent event unsigned short eventId() const { return m_eventId; } + ///the type of event which the hit came from (signal, low pt + ///minbias, high pt minbias, cavern bg, etc.) + int pileupType() const { return m_pileupType; } + /// t0 offset of the bunch xing containing the hit in ns. This is an integer /// multiple of the bunch xing distance for a certain event (e.g. N*25ns) float eventTime() const { return m_eventTime; } @@ -51,6 +55,7 @@ private: float m_eventTime; ///the index in PileUpEventInfo of the component event hosting this hit unsigned short m_eventId; + int m_pileupType; const HIT* m_pHit; //don't own template <class FHIT> diff --git a/Simulation/HitManagement/HitManagement/TimedHitPtrCollection.icc b/Simulation/HitManagement/HitManagement/TimedHitPtrCollection.icc index eed7aa5b19e5c33608999c8d44f44e3d3a3180c7..79bd381d75019d5b05151f182d35505c386c3684 100755 --- a/Simulation/HitManagement/HitManagement/TimedHitPtrCollection.icc +++ b/Simulation/HitManagement/HitManagement/TimedHitPtrCollection.icc @@ -11,7 +11,7 @@ TimedHitPtrCollection<HIT>::insert(const PileUpTimeEventIndex& timeEventIndex, assert(inputCollection); typename AthenaHitsVector<HIT>::const_iterator i(inputCollection->begin()); typename AthenaHitsVector<HIT>::const_iterator e(inputCollection->end()); - while (i!=e) m_hits.push_back(TimedHitPtr<HIT>(timeEventIndex.time(), timeEventIndex.index(),*i++)); + while (i!=e) m_hits.push_back(TimedHitPtr<HIT>(timeEventIndex.time(), timeEventIndex.index(),*i++, timeEventIndex.type())); if (m_sorted) { m_sorted=false; throw SortedException(); diff --git a/Simulation/ISF/ISF_Config/python/ISF_ConfigConfigDb.py b/Simulation/ISF/ISF_Config/python/ISF_ConfigConfigDb.py index 2169138f6ba8693c1ba9dad3784ba2939a6b322a..d0265dae67ae6a7eaa73ac292debc14ce4c9eb01 100644 --- a/Simulation/ISF/ISF_Config/python/ISF_ConfigConfigDb.py +++ b/Simulation/ISF/ISF_Config/python/ISF_ConfigConfigDb.py @@ -46,7 +46,6 @@ addAlgorithm("ISF_Config.ISF_MainConfig.getKernel_ATLFASTIIF_IDOnly", "ISF_Ker addAlgorithm("ISF_Config.ISF_MainConfig.getKernel_ATLFASTIIF_IDCalo", "ISF_Kernel_ATLFASTIIF_IDCalo") addAlgorithm("ISF_Config.ISF_MainConfig.getKernel_G4FastCalo", "ISF_Kernel_G4FastCalo") addAlgorithm("ISF_Config.ISF_MainConfig.getKernel_G4FastCaloDNN", "ISF_Kernel_G4FastCaloDNN") -addAlgorithm("ISF_Config.ISF_MainConfig.getKernel_G4FastCalo", "ISF_Kernel_G4FastCalo") addAlgorithm("ISF_Config.ISF_MainConfig.getKernel_G4FastCaloMT", "ISF_Kernel_G4FastCaloMT") addAlgorithm("ISF_Config.ISF_MainConfig.getKernel_Fatras_newExtrapolation","ISF_Kernel_Fatras_newExtrapolation") addAlgorithm("ISF_Config.ISF_MainConfig.getKernel_Fatras_newExtrapolation_IDOnly","ISF_Kernel_Fatras_newExtrapolation_IDOnly") diff --git a/Simulation/ISF/ISF_Config/test/test_FullG4_Sim_tf_configuration.py b/Simulation/ISF/ISF_Config/test/test_FullG4_Sim_tf_configuration.py index ce305ad1aa53731c10a557bfac4fba301a6e559c..99b8da866a5fd659c3f8e8c136a146e9f19c2abd 100755 --- a/Simulation/ISF/ISF_Config/test/test_FullG4_Sim_tf_configuration.py +++ b/Simulation/ISF/ISF_Config/test/test_FullG4_Sim_tf_configuration.py @@ -102,21 +102,23 @@ class TestFullG4(unittest.TestCase): def test___SimKernel_is_at_end_of_AthAlgSeq(self): - ath_alg_seqence_as_str = self._job_config_dict['AthAlgSeq']['Members'] + ath_alg_sequence_as_str = self._job_config_dict['AthAlgSeq']['Members'] # need to evaluate to obtain actual Python object - ath_alg_seqence_list = eval(ath_alg_seqence_as_str) + ignore_Algs = ['EventInfoTagBuilder/EventInfoTagBuilder'] + ath_alg_sequence_list = [ alg for alg in eval(ath_alg_sequence_as_str) if alg not in ignore_Algs ] - actual_last_ath_alg_sequence_entry = ath_alg_seqence_list[-1] + actual_last_ath_alg_sequence_entry = ath_alg_sequence_list[-1] expected_last_ath_alg_sequence_entry = "ISF::SimKernel/ISF_Kernel_FullG4" self.assertEqual(expected_last_ath_alg_sequence_entry, actual_last_ath_alg_sequence_entry) def test___BeamEffectsAlg_is_before_SimKernel_in_AthAlgSeq(self): - ath_alg_seqence_as_str = self._job_config_dict['AthAlgSeq']['Members'] + ath_alg_sequence_as_str = self._job_config_dict['AthAlgSeq']['Members'] # need to evaluate to obtain actual Python object - ath_alg_seqence_list = eval(ath_alg_seqence_as_str) - actual_last_ath_alg_sequence_entry = ath_alg_seqence_list[1] #Position 0 should be the timer alg + ignore_Algs = ['EventInfoTagBuilder/EventInfoTagBuilder'] + ath_alg_sequence_list = [ alg for alg in eval(ath_alg_sequence_as_str) if alg not in ignore_Algs ] + actual_last_ath_alg_sequence_entry = ath_alg_sequence_list[1] #Position 0 should be the timer alg expected_last_ath_alg_sequence_entry = "Simulation::BeamEffectsAlg/BeamEffectsAlg" self.assertEqual(expected_last_ath_alg_sequence_entry, actual_last_ath_alg_sequence_entry) diff --git a/Simulation/ISF/ISF_Core/ISF_Algorithms/src/SimKernel.cxx b/Simulation/ISF/ISF_Core/ISF_Algorithms/src/SimKernel.cxx index b97decb5d82dd8cb7df4803ba0d41468aa7d3785..c101a89fb33e6856f1ff21d8381629e1661177f6 100644 --- a/Simulation/ISF/ISF_Core/ISF_Algorithms/src/SimKernel.cxx +++ b/Simulation/ISF/ISF_Core/ISF_Algorithms/src/SimKernel.cxx @@ -23,8 +23,9 @@ #include "TTree.h" // DetectorDescription #include "AtlasDetDescr/AtlasRegionHelper.h" -// McEventCollection +// GeneratorObjects #include "GeneratorObjects/McEventCollection.h" +#include "GeneratorObjects/HepMcParticleLink.h" /////////////////////////////////////////////////////////////////// // Public methods: @@ -322,8 +323,7 @@ StatusCode ISF::SimKernel::execute() ATH_CHECK( prepareInput(m_inputHardScatterEvgen, m_outputHardScatterTruth, simParticles) ); // b. pileup if (!m_inputPileupEvgen.key().empty()) { - bool isPileup = true; - ATH_CHECK( prepareInput(m_inputPileupEvgen, m_outputPileupTruth, simParticles, isPileup) ); + ATH_CHECK( prepareInput(m_inputPileupEvgen, m_outputPileupTruth, simParticles) ); } // ----------------------------------------------------------------------------------------------- @@ -479,8 +479,7 @@ StatusCode ISF::SimKernel::execute() generator truth collection into output simulation truth collection */ StatusCode ISF::SimKernel::prepareInput(SG::ReadHandle<McEventCollection>& inputTruth, SG::WriteHandle<McEventCollection>& outputTruth, - ISFParticleContainer& simParticles, - bool isPileup) const { + ISFParticleContainer& simParticles) const { if (!inputTruth.isValid()) { ATH_MSG_FATAL("Unable to read input GenEvent collection '" << inputTruth.key() << "'"); @@ -490,7 +489,7 @@ StatusCode ISF::SimKernel::prepareInput(SG::ReadHandle<McEventCollection>& input // create copy outputTruth = CxxUtils::make_unique<McEventCollection>(*inputTruth); - ATH_CHECK( m_inputConverter->convert(*outputTruth, simParticles, isPileup) ); + ATH_CHECK( m_inputConverter->convert(*outputTruth, simParticles, HepMcParticleLink::find_enumFromKey(outputTruth.name())) ); return StatusCode::SUCCESS; } diff --git a/Simulation/ISF/ISF_Core/ISF_Algorithms/src/SimKernel.h b/Simulation/ISF/ISF_Core/ISF_Algorithms/src/SimKernel.h index 32669eacd764f59936e3f38fc93039c07726a3d3..3854d8a831eed2b80957c69528d8876dfa7db078 100644 --- a/Simulation/ISF/ISF_Core/ISF_Algorithms/src/SimKernel.h +++ b/Simulation/ISF/ISF_Core/ISF_Algorithms/src/SimKernel.h @@ -85,8 +85,7 @@ namespace ISF { generator truth collection into output simulation truth collection */ StatusCode prepareInput(SG::ReadHandle<McEventCollection>& inputTruth, SG::WriteHandle<McEventCollection>& outputTruth, - ISFParticleContainer& simParticles, - bool isPileup=false) const; + ISFParticleContainer& simParticles) const; /** Input/output truth collections and input conversion */ diff --git a/Simulation/ISF/ISF_Core/ISF_Algorithms/src/SimKernelMT.cxx b/Simulation/ISF/ISF_Core/ISF_Algorithms/src/SimKernelMT.cxx index 3ee6b49b963b6d48f5727c58526cf9fe99935289..ff5f2eade0c8c64e03b55e6594f65d6e4f446df4 100644 --- a/Simulation/ISF/ISF_Core/ISF_Algorithms/src/SimKernelMT.cxx +++ b/Simulation/ISF/ISF_Core/ISF_Algorithms/src/SimKernelMT.cxx @@ -151,8 +151,7 @@ StatusCode ISF::SimKernelMT::execute() { // read and convert input ISFParticleContainer simParticles; // particles for ISF simulation - bool isPileup = false; - ATH_CHECK( m_inputConverter->convert(*outputTruth, simParticles, isPileup) ); + ATH_CHECK( m_inputConverter->convert(*outputTruth, simParticles, HepMcParticleLink::find_enumFromKey(outputTruth.name())) ); // loop until there are no more particles to simulate while (simParticles.size() ) { diff --git a/Simulation/ISF/ISF_Core/ISF_Algorithms/test/SimKernelMT_test.cxx b/Simulation/ISF/ISF_Core/ISF_Algorithms/test/SimKernelMT_test.cxx index 780f54f2eead4b2891ff5588566e6838a04b51e4..41ab53d26355e4ba14c9d9b93ce1d18300a87b70 100644 --- a/Simulation/ISF/ISF_Core/ISF_Algorithms/test/SimKernelMT_test.cxx +++ b/Simulation/ISF/ISF_Core/ISF_Algorithms/test/SimKernelMT_test.cxx @@ -56,10 +56,10 @@ namespace ISFTesting { MOCK_METHOD0(finalize, StatusCode()); MOCK_CONST_METHOD3(convert, StatusCode(const McEventCollection&, ISF::ISFParticleContainer&, - bool)); + EBC_EVCOLL kindOfCollection)); MOCK_CONST_METHOD3(convertHepMCToG4Event, StatusCode(McEventCollection&, G4Event*&, - bool)); + EBC_EVCOLL kindOfCollection)); MOCK_CONST_METHOD2(ISF_to_G4Event, G4Event*(const std::vector<const ISF::ISFParticle*>&, HepMC::GenEvent*)); diff --git a/Simulation/ISF/ISF_Core/ISF_Event/CMakeLists.txt b/Simulation/ISF/ISF_Core/ISF_Event/CMakeLists.txt index bb781fbf861f29d362b1017b63856a7571a74fe7..6319de575682ca253d24edee4ffd117a04a03bdb 100644 --- a/Simulation/ISF/ISF_Core/ISF_Event/CMakeLists.txt +++ b/Simulation/ISF/ISF_Core/ISF_Event/CMakeLists.txt @@ -11,6 +11,7 @@ atlas_depends_on_subdirs( PUBLIC Control/AthenaBaseComps DetectorDescription/AtlasDetDescr DetectorDescription/GeoPrimitives + Generators/GeneratorObjects GaudiKernel Simulation/Barcode/BarcodeEvent ) @@ -25,11 +26,10 @@ atlas_add_library( ISF_Event PUBLIC_HEADERS ISF_Event INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES ${CLHEP_LIBRARIES} ${HEPMC_LIBRARIES} ${EIGEN_LIBRARIES} TestTools AthenaBaseComps AtlasDetDescr GeoPrimitives GaudiKernel ) + LINK_LIBRARIES ${CLHEP_LIBRARIES} ${HEPMC_LIBRARIES} ${EIGEN_LIBRARIES} TestTools AthenaBaseComps AtlasDetDescr GeoPrimitives GeneratorObjects GaudiKernel ) atlas_add_test( ISFParticle_test SOURCES test/ISFParticle_test.cxx INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} - LINK_LIBRARIES ${CLHEP_LIBRARIES} ${HEPMC_LIBRARIES} ${EIGEN_LIBRARIES} TestTools AthenaBaseComps AtlasDetDescr GeoPrimitives GaudiKernel ISF_Event ) - + LINK_LIBRARIES ${CLHEP_LIBRARIES} ${HEPMC_LIBRARIES} ${EIGEN_LIBRARIES} TestTools AthenaBaseComps AtlasDetDescr GeoPrimitives GeneratorObjects GaudiKernel ISF_Event ) diff --git a/Simulation/ISF/ISF_Core/ISF_Event/ISF_Event/ISFParticle.h b/Simulation/ISF/ISF_Core/ISF_Event/ISF_Event/ISFParticle.h index 3d28b5328ebcaeb4b0718da13ba2931829938225..be5dff4aa2efde1306f3fa65848f485239f84aa9 100644 --- a/Simulation/ISF/ISF_Core/ISF_Event/ISF_Event/ISFParticle.h +++ b/Simulation/ISF/ISF_Core/ISF_Event/ISF_Event/ISFParticle.h @@ -25,6 +25,8 @@ // CHLEP classes #include "CLHEP/Geometry/Point3D.h" #include "CLHEP/Geometry/Vector3D.h" +// Common classes +#include "GeneratorObjects/HepMcParticleLink.h" namespace ISF { @@ -56,7 +58,8 @@ namespace ISF { double time, const ISFParticle &parent, Barcode::ParticleBarcode barcode = Barcode::fUndefinedBarcode, - TruthBinding* truth = nullptr ); + TruthBinding* truth = nullptr, + const HepMcParticleLink * partLink = nullptr ); /** CLHEP-compatible constructor */ ISFParticle(const HepGeom::Point3D<double>& pos, @@ -67,7 +70,8 @@ namespace ISF { double time, const ISFParticle &parent, Barcode::ParticleBarcode barcode = Barcode::fUndefinedBarcode, - TruthBinding* truth = nullptr ); + TruthBinding* truth = nullptr, + const HepMcParticleLink * partLink = nullptr ); /** this constructor should only be used for event read-in */ ISFParticle(const Amg::Vector3D& pos, @@ -79,7 +83,8 @@ namespace ISF { const DetRegionSvcIDPair &origin, int bcid, Barcode::ParticleBarcode barcode = Barcode::fUndefinedBarcode, - TruthBinding* truth = nullptr ); + TruthBinding* truth = nullptr, + const HepMcParticleLink * partLink = nullptr ); /** Copy constructor */ ISFParticle(const ISFParticle& isfp); @@ -152,6 +157,8 @@ namespace ISF { /** set a new barcode */ void setBarcode(Barcode::ParticleBarcode bc); + /** set a new barcode and update the HepMcParticleLink */ + void setBarcodeAndUpdateHepMcParticleLink(Barcode::ParticleBarcode bc); /** bunch-crossing identifier */ int getBCID() const; @@ -163,6 +170,10 @@ namespace ISF { TruthBinding* getTruthBinding() const; void setTruthBinding(TruthBinding *truth); + /** HepMcParticleLink accessors */ + inline const HepMcParticleLink* getParticleLink() const {return m_partLink;}; + inline void setParticleLink(const HepMcParticleLink* partLink) {m_partLink=partLink;}; + /** return the particle order (eg used to assure ID->Calo->MS simulation order) */ ParticleOrder getOrder() const; void setOrder(ParticleOrder order); @@ -188,6 +199,7 @@ namespace ISF { TruthBinding* m_truth; ParticleOrder m_order; //!< particle simulation order mutable ParticleUserInformation *m_userInfo; //!< user information stored with the ISFParticle + const HepMcParticleLink* m_partLink; }; // Overload of << operator for MsgStream for debug output diff --git a/Simulation/ISF/ISF_Core/ISF_Event/ISF_Event/ISFParticle.icc b/Simulation/ISF/ISF_Core/ISF_Event/ISF_Event/ISFParticle.icc index 04f443e2599d9d45a05bdbaefcf67a94f58d3461..ec181bc1cdf2867079b5962d2094ad67485c432b 100644 --- a/Simulation/ISF/ISF_Core/ISF_Event/ISF_Event/ISFParticle.icc +++ b/Simulation/ISF/ISF_Core/ISF_Event/ISF_Event/ISFParticle.icc @@ -6,80 +6,88 @@ namespace ISF { -// inline methods, nomen est omen -// -inline const Amg::Vector3D& ISFParticle::position() const { return m_position; } -inline const Amg::Vector3D& ISFParticle::momentum() const { return m_momentum; } -inline void ISFParticle::updatePosition(const Amg::Vector3D& position) { m_position=position; } -inline void ISFParticle::updateMomentum(const Amg::Vector3D& momentum) { m_momentum=momentum; } + // inline methods, nomen est omen + // + inline const Amg::Vector3D& ISFParticle::position() const { return m_position; } + inline const Amg::Vector3D& ISFParticle::momentum() const { return m_momentum; } + inline void ISFParticle::updatePosition(const Amg::Vector3D& position) { m_position=position; } + inline void ISFParticle::updateMomentum(const Amg::Vector3D& momentum) { m_momentum=momentum; } -inline double ISFParticle::mass() const { return m_mass; } -inline double ISFParticle::charge() const { return m_charge; } -inline double ISFParticle::timeStamp() const { return m_tstamp; } -inline int ISFParticle::pdgCode() const { return m_pdgCode; } + inline double ISFParticle::mass() const { return m_mass; } + inline double ISFParticle::charge() const { return m_charge; } + inline double ISFParticle::timeStamp() const { return m_tstamp; } + inline int ISFParticle::pdgCode() const { return m_pdgCode; } -inline double ISFParticle::ekin() const { return sqrt( m_momentum.mag2() + m_mass*m_mass ) - m_mass; } + inline double ISFParticle::ekin() const { return sqrt( m_momentum.mag2() + m_mass*m_mass ) - m_mass; } -// history methods -// -inline const ParticleHistory& ISFParticle::history() const { return m_history; } -inline AtlasDetDescr::AtlasRegion ISFParticle::originGeoID() const { return m_history.front().first; } -inline SimSvcID ISFParticle::originSimID() const { return m_history.front().second; } -inline AtlasDetDescr::AtlasRegion ISFParticle::prevGeoID() const { return (m_history.end()-1)->first; } -inline SimSvcID ISFParticle::prevSimID() const { return (m_history.end()-1)->second; } -inline AtlasDetDescr::AtlasRegion ISFParticle::nextGeoID() const { return m_history.back().first; } -inline SimSvcID ISFParticle::nextSimID() const { return m_history.back().second; } -inline void ISFParticle::setNextGeoID( AtlasDetDescr::AtlasRegion geoID) { m_history.back().first = geoID; } -inline void ISFParticle::setNextSimID( SimSvcID simID) { m_history.back().second = simID;} + // history methods + // + inline const ParticleHistory& ISFParticle::history() const { return m_history; } + inline AtlasDetDescr::AtlasRegion ISFParticle::originGeoID() const { return m_history.front().first; } + inline SimSvcID ISFParticle::originSimID() const { return m_history.front().second; } + inline AtlasDetDescr::AtlasRegion ISFParticle::prevGeoID() const { return (m_history.end()-1)->first; } + inline SimSvcID ISFParticle::prevSimID() const { return (m_history.end()-1)->second; } + inline AtlasDetDescr::AtlasRegion ISFParticle::nextGeoID() const { return m_history.back().first; } + inline SimSvcID ISFParticle::nextSimID() const { return m_history.back().second; } + inline void ISFParticle::setNextGeoID( AtlasDetDescr::AtlasRegion geoID) { m_history.back().first = geoID; } + inline void ISFParticle::setNextSimID( SimSvcID simID) { m_history.back().second = simID;} -// barcode methods -// -inline Barcode::ParticleBarcode ISFParticle::barcode() const { return m_barcode; } -inline void ISFParticle::setBarcode(Barcode::ParticleBarcode bc) { m_barcode = bc; } + // barcode methods + // + inline Barcode::ParticleBarcode ISFParticle::barcode() const { return m_barcode; } + inline void ISFParticle::setBarcode(Barcode::ParticleBarcode bc) { m_barcode = bc; } -// truth methods -// -inline TruthBinding* ISFParticle::getTruthBinding() const { return m_truth; } -inline void ISFParticle::setTruthBinding(TruthBinding *truth) { m_truth = truth; } + // truth methods + // + inline TruthBinding* ISFParticle::getTruthBinding() const { return m_truth; } + inline void ISFParticle::setTruthBinding(TruthBinding *truth) { m_truth = truth; } -// particle order methods -// -inline int ISFParticle::getOrder() const { return m_order; } -inline void ISFParticle::setOrder( ParticleOrder order ) { m_order = order; } + // particle order methods + // + inline int ISFParticle::getOrder() const { return m_order; } + inline void ISFParticle::setOrder( ParticleOrder order ) { m_order = order; } -// set ParticleUserInformation -inline ParticleUserInformation *ISFParticle::getUserInformation() const { return m_userInfo; } -inline void ISFParticle::setUserInformation(ParticleUserInformation *userInfo) -{ - if ( m_userInfo==0 ) { m_userInfo = userInfo; } - else { - m_userInfo->setGeneration( userInfo->generation() ); - m_userInfo->setProcess( userInfo->process() ); - // don't overwrite barcode + // set ParticleUserInformation + inline ParticleUserInformation *ISFParticle::getUserInformation() const { return m_userInfo; } + inline void ISFParticle::setUserInformation(ParticleUserInformation *userInfo) + { + if ( m_userInfo==0 ) { m_userInfo = userInfo; } + else { + m_userInfo->setGeneration( userInfo->generation() ); + m_userInfo->setProcess( userInfo->process() ); + // don't overwrite barcode + } } -} -// bunch-crossing identifier -inline int ISFParticle::getBCID() const { - return m_bcid; -} -inline void ISFParticle::setBCID(int bcid) { - m_bcid = bcid; -} + // bunch-crossing identifier + inline int ISFParticle::getBCID() const { + return m_bcid; + } + inline void ISFParticle::setBCID(int bcid) { + m_bcid = bcid; + } -// printout methods -inline MsgStream& ISFParticle::dump( MsgStream& out ) const - { out << "ISFP pdg=" << m_pdgCode << " p=" << m_momentum.mag() - << " xyz=(" << m_position.x() << "," << m_position.y() << "," << m_position.z() << ")" - << " r=" << m_position.perp() << " eta=" << m_position.eta() << " phi=" << m_position.phi() - << " barcode=" << m_barcode << " mass=" << m_mass << " BCID=" << m_bcid << " order=" << m_order; - return out;} + // printout methods + inline MsgStream& ISFParticle::dump( MsgStream& out ) const + { out << "ISFP pdg=" << m_pdgCode << " p=" << m_momentum.mag() + << " xyz=(" << m_position.x() << "," << m_position.y() << "," << m_position.z() << ")" + << " r=" << m_position.perp() << " eta=" << m_position.eta() << " phi=" << m_position.phi() + << " barcode=" << m_barcode << " mass=" << m_mass << " order=" << m_order << " bcid=" << m_bcid; + if (m_partLink) + out << " (" << *m_partLink << ")"; + else + out << " (No assoc. HMPL)"; + return out;} -inline std::ostream& ISFParticle::dump( std::ostream& out ) const - { out << "ISFP pdg=" << m_pdgCode << " p=" << m_momentum.mag() - << " xyz=(" << m_position.x() << "," << m_position.y() << "," << m_position.z() << ")" - << " r=" << m_position.perp() << " eta=" << m_position.eta() << " phi=" << m_position.phi() - << " barcode=" << m_barcode << " mass=" << m_mass << " BCID=" << m_bcid << " order=" << m_order; - return out;} + inline std::ostream& ISFParticle::dump( std::ostream& out ) const + { out << "ISFP pdg=" << m_pdgCode << " p=" << m_momentum.mag() + << " xyz=(" << m_position.x() << "," << m_position.y() << "," << m_position.z() << ")" + << " r=" << m_position.perp() << " eta=" << m_position.eta() << " phi=" << m_position.phi() + << " barcode=" << m_barcode << " mass=" << m_mass << " order=" << m_order << " bcid=" << m_bcid; + if (m_partLink) + out << " (" << *m_partLink << ")"; + else + out << " (No assoc. HMPL)"; + return out;} } // end ISF namespace diff --git a/Simulation/ISF/ISF_Core/ISF_Event/ISF_Event/ITruthIncident.h b/Simulation/ISF/ISF_Core/ISF_Event/ISF_Event/ITruthIncident.h index 69c949f2cc8566dcee01fdfe28e7dac548cd7afa..840d890fce5b9b0ccfda323458ad3c006c4d3155 100644 --- a/Simulation/ISF/ISF_Core/ISF_Event/ISF_Event/ITruthIncident.h +++ b/Simulation/ISF/ISF_Core/ISF_Event/ISF_Event/ITruthIncident.h @@ -51,9 +51,9 @@ namespace ISF { class ITruthIncident { public: ITruthIncident(AtlasDetDescr::AtlasRegion geoID, unsigned short numChildren): m_geoID(geoID), - m_numChildren(numChildren), - m_passWholeVertex(true), - m_childPassedFilters(numChildren,false) { }; + m_numChildren(numChildren), + m_passWholeVertex(true), + m_childPassedFilters(numChildren,false) { }; /** Return the SimGeoID corresponding to the vertex of the truth incident */ AtlasDetDescr::AtlasRegion geoID() { return m_geoID; }; @@ -79,8 +79,8 @@ namespace ISF { virtual HepMC::GenParticle* parentParticle() const = 0; /** Return the barcode of the parent particle */ virtual Barcode::ParticleBarcode parentBarcode() const = 0; - /** Return the extra barcode of the parent particle */ - virtual Barcode::ParticleBarcode parentBCID() const = 0; + /** Return the bunch-crossing identifier of the parent particle */ + virtual int parentBCID() const { return 0; } /** Return a boolean whether or not the parent particle survives the incident */ virtual bool parentSurvivesIncident() const = 0; /** Return the parent particle after the TruthIncident vertex (and assign diff --git a/Simulation/ISF/ISF_Core/ISF_Event/ISF_Event/TruthBinding.h b/Simulation/ISF/ISF_Core/ISF_Event/ISF_Event/TruthBinding.h index 31eb53c1de2a34d017def640ee34ee274fb570f9..c430edc63066757ed60c2c0e7ef05c394e669c8f 100644 --- a/Simulation/ISF/ISF_Core/ISF_Event/ISF_Event/TruthBinding.h +++ b/Simulation/ISF/ISF_Core/ISF_Event/ISF_Event/TruthBinding.h @@ -15,53 +15,53 @@ namespace ISF { /** - @class TruthBinding - @author Andreas.Salzburger -at- cern.ch , Elmar.Ritsch -at- cern.ch - */ - -class TruthBinding { - public: - /** default constructor */ - TruthBinding() = delete; - - /** constructor setting all truth particle pointers to the given particle */ - inline TruthBinding(HepMC::GenParticle* allTruthP); - /** constructor setting all truth particle pointers individually */ - inline TruthBinding(HepMC::GenParticle* truthP, HepMC::GenParticle* primaryTruthP, HepMC::GenParticle* genZeroTruthP); - - /** copy constructors */ - inline TruthBinding(const TruthBinding& rhs); - inline TruthBinding(TruthBinding&& rhs); - - /** assignment operators */ - inline TruthBinding& operator=(const TruthBinding& rhs); - inline TruthBinding& operator=(TruthBinding&& rhs); - - /** destructor */ - inline ~TruthBinding(); - - /** comparisons */ - inline bool operator==(const TruthBinding& rhs) const; - inline bool isEqual(const TruthBinding& rhs) const; - inline bool isIdent(const TruthBinding& rhs) const; - - /** pointer to the particle in the simulation truth */ - inline HepMC::GenParticle* getTruthParticle() const; - inline void setTruthParticle(HepMC::GenParticle* p); - - /** pointer to the primary particle in the simulation truth */ - inline HepMC::GenParticle* getPrimaryTruthParticle() const; - - /** pointer to the simulation truth particle before any regeneration happened (eg. brem) */ - inline HepMC::GenParticle* getGenerationZeroTruthParticle() const; - inline void setGenerationZeroTruthParticle(HepMC::GenParticle* p); - - private: - HepMC::GenParticle* m_truthParticle; //!< pointer to particle in MC truth - HepMC::GenParticle* m_primaryTruthParticle; //!< pointer to corresponding primary (generator) particle - HepMC::GenParticle* m_generationZeroTruthParticle; //!< pointer to corresponding truth particle before any regenration -}; - + @class TruthBinding + @author Andreas.Salzburger -at- cern.ch , Elmar.Ritsch -at- cern.ch + */ + + class TruthBinding { + public: + /** No default constructor */ + TruthBinding() = delete; + + /** constructor setting all truth particle pointers to the given particle */ + inline TruthBinding(HepMC::GenParticle* allTruthP); + /** constructor setting all truth particle pointers individually */ + inline TruthBinding(HepMC::GenParticle* truthP, HepMC::GenParticle* primaryTruthP, HepMC::GenParticle* genZeroTruthP); + + /** copy constructors */ + inline TruthBinding(const TruthBinding &rhs); + inline TruthBinding(TruthBinding&& rhs); + + //** assignment operators */ + inline TruthBinding& operator=(const TruthBinding &rhs); + inline TruthBinding& operator=(TruthBinding&& rhs); + + /** comparisons */ + inline bool operator==(const TruthBinding& rhs) const; + inline bool isEqual(const TruthBinding& rhs) const; + inline bool isIdent(const TruthBinding& rhs) const; + + /** destructor */ + inline ~TruthBinding(); + + /** pointer to the particle in the simulation truth */ + inline HepMC::GenParticle* getTruthParticle() const; + inline void setTruthParticle(HepMC::GenParticle* p); + + /** pointer to the primary particle in the simulation truth */ + inline HepMC::GenParticle* getPrimaryTruthParticle() const; + + /** pointer to the simulation truth particle before any regeneration happened (eg. brem) */ + inline HepMC::GenParticle* getGenerationZeroTruthParticle() const; + inline void setGenerationZeroTruthParticle(HepMC::GenParticle* p); + + private: + HepMC::GenParticle* m_truthParticle; //!< pointer to particle in MC truth + HepMC::GenParticle* m_primaryTruthParticle; //!< pointer to corresponding primary (generator) particle + HepMC::GenParticle* m_generationZeroTruthParticle; //!< pointer to corresponding truth particle before any regenration + }; + } // end of namespace /* implementation for inlined methods */ diff --git a/Simulation/ISF/ISF_Core/ISF_Event/ISF_Event/TruthBinding.icc b/Simulation/ISF/ISF_Core/ISF_Event/ISF_Event/TruthBinding.icc index cad6789526d8c1025a3f72182681ea67e5829e85..b97272c450be06a523487819c89296ce977169b3 100644 --- a/Simulation/ISF/ISF_Core/ISF_Event/ISF_Event/TruthBinding.icc +++ b/Simulation/ISF/ISF_Core/ISF_Event/ISF_Event/TruthBinding.icc @@ -5,100 +5,100 @@ // this file contains all ITruthBinding inline methods namespace ISF { -/** constructor setting all truth particle pointers to the given particle */ -TruthBinding::TruthBinding(HepMC::GenParticle* allTruthP) : - m_truthParticle(allTruthP), - m_primaryTruthParticle(allTruthP), - m_generationZeroTruthParticle(allTruthP) { } - -/** constructor setting all truth particle pointers individually */ -TruthBinding::TruthBinding(HepMC::GenParticle* truthP, HepMC::GenParticle* primaryTruthP, HepMC::GenParticle* genZeroTruthP) : - m_truthParticle(truthP), - m_primaryTruthParticle(primaryTruthP), - m_generationZeroTruthParticle(genZeroTruthP) { } - -/** copy constructor */ -TruthBinding::TruthBinding(const TruthBinding& rhs) : - m_truthParticle(rhs.getTruthParticle()), - m_primaryTruthParticle(rhs.getPrimaryTruthParticle()), - m_generationZeroTruthParticle(rhs.getGenerationZeroTruthParticle()) { } - -/** move copy constructor */ -TruthBinding::TruthBinding(TruthBinding&& rhs) : - m_truthParticle(rhs.getTruthParticle()), - m_primaryTruthParticle(rhs.getPrimaryTruthParticle()), - m_generationZeroTruthParticle(rhs.getGenerationZeroTruthParticle()) { } - -/** assignment operator */ -TruthBinding& TruthBinding::operator=(const TruthBinding& rhs) { - m_truthParticle=rhs.getTruthParticle(); - m_primaryTruthParticle=rhs.getPrimaryTruthParticle(); - m_generationZeroTruthParticle=rhs.getGenerationZeroTruthParticle(); - return *this; -} - -/** move assignment operator */ -TruthBinding& TruthBinding::operator=(TruthBinding&& rhs) { - m_truthParticle=rhs.getTruthParticle(); - m_primaryTruthParticle=rhs.getPrimaryTruthParticle(); - m_generationZeroTruthParticle=rhs.getGenerationZeroTruthParticle(); - return *this; -} - -/** destructor */ -TruthBinding::~TruthBinding() { } - -/** comparison operator */ -bool TruthBinding::operator==(const TruthBinding& rhs) const { - return isEqual(rhs); -} - -/** check equality */ -bool TruthBinding::isEqual(const TruthBinding& rhs) const { - bool pass = true; - - const auto rhsTruth = rhs.getTruthParticle(); - if (m_truthParticle && rhsTruth) { - pass &= *m_truthParticle == *rhsTruth; - } else { - return false; + /** constructor setting all truth particle pointers to the given particle */ + TruthBinding::TruthBinding(HepMC::GenParticle* allTruthP) : + m_truthParticle(allTruthP), + m_primaryTruthParticle(allTruthP), + m_generationZeroTruthParticle(allTruthP) { } + + /** constructor setting all truth particle pointers individually */ + TruthBinding::TruthBinding(HepMC::GenParticle* truthP, HepMC::GenParticle* primaryTruthP, HepMC::GenParticle* genZeroTruthP) : + m_truthParticle(truthP), + m_primaryTruthParticle(primaryTruthP), + m_generationZeroTruthParticle(genZeroTruthP) { } + + /** copy constructor */ + TruthBinding::TruthBinding(const TruthBinding &rhs) : + m_truthParticle(rhs.getTruthParticle()), + m_primaryTruthParticle(rhs.getPrimaryTruthParticle()), + m_generationZeroTruthParticle(rhs.getGenerationZeroTruthParticle()) { } + + /** move copy constructor */ + TruthBinding::TruthBinding(TruthBinding&& rhs) : + m_truthParticle(rhs.getTruthParticle()), + m_primaryTruthParticle(rhs.getPrimaryTruthParticle()), + m_generationZeroTruthParticle(rhs.getGenerationZeroTruthParticle()) { } + + /** assignment operator */ + TruthBinding& TruthBinding::operator=(const TruthBinding &rhs) { + m_truthParticle=rhs.getTruthParticle(); + m_primaryTruthParticle=rhs.getPrimaryTruthParticle(); + m_generationZeroTruthParticle=rhs.getGenerationZeroTruthParticle(); + return *this; } - const auto rhsPrimary = rhs.getPrimaryTruthParticle(); - if (m_primaryTruthParticle && rhsPrimary) { - pass &= *m_primaryTruthParticle == *rhsPrimary; - } else { - return false; + /** move assignment operator */ + TruthBinding& TruthBinding::operator=(TruthBinding&& rhs) { + m_truthParticle=rhs.getTruthParticle(); + m_primaryTruthParticle=rhs.getPrimaryTruthParticle(); + m_generationZeroTruthParticle=rhs.getGenerationZeroTruthParticle(); + return *this; } - const auto rhsGenZero = rhs.getGenerationZeroTruthParticle(); - if (m_generationZeroTruthParticle && rhsGenZero) { - pass &= *m_generationZeroTruthParticle == *rhsGenZero; - } else { - return false; + /** destructor */ + TruthBinding::~TruthBinding() { } + + /** comparison operator */ + bool TruthBinding::operator==(const TruthBinding& rhs) const { + return isEqual(rhs); } - return pass; -} + /** check equality */ + bool TruthBinding::isEqual(const TruthBinding& rhs) const { + bool pass = true; + + const auto rhsTruth = rhs.getTruthParticle(); + if (m_truthParticle && rhsTruth) { + pass &= *m_truthParticle == *rhsTruth; + } else { + return false; + } + + const auto rhsPrimary = rhs.getPrimaryTruthParticle(); + if (m_primaryTruthParticle && rhsPrimary) { + pass &= *m_primaryTruthParticle == *rhsPrimary; + } else { + return false; + } + + const auto rhsGenZero = rhs.getGenerationZeroTruthParticle(); + if (m_generationZeroTruthParticle && rhsGenZero) { + pass &= *m_generationZeroTruthParticle == *rhsGenZero; + } else { + return false; + } + + return pass; + } -/** check identity */ -bool TruthBinding::isIdent(const TruthBinding& rhs) const { - bool pass = true; - pass &= m_truthParticle == rhs.getTruthParticle(); - pass &= m_primaryTruthParticle == rhs.getPrimaryTruthParticle(); - pass &= m_generationZeroTruthParticle == rhs.getGenerationZeroTruthParticle(); - return pass; -} + /** check identity */ + bool TruthBinding::isIdent(const TruthBinding& rhs) const { + bool pass = true; + pass &= m_truthParticle == rhs.getTruthParticle(); + pass &= m_primaryTruthParticle == rhs.getPrimaryTruthParticle(); + pass &= m_generationZeroTruthParticle == rhs.getGenerationZeroTruthParticle(); + return pass; + } -/** pointer to the particle in the simulation truth */ -HepMC::GenParticle* TruthBinding::getTruthParticle() const { return m_truthParticle; } -void TruthBinding::setTruthParticle(HepMC::GenParticle* p) { m_truthParticle = p; } + /** pointer to the particle in the simulation truth */ + HepMC::GenParticle* TruthBinding::getTruthParticle() const { return m_truthParticle; } + void TruthBinding::setTruthParticle(HepMC::GenParticle* p) { m_truthParticle = p; } -/** pointer to the primary particle in the simulation truth */ -HepMC::GenParticle* TruthBinding::getPrimaryTruthParticle() const { return m_primaryTruthParticle; } + /** pointer to the primary particle in the simulation truth */ + HepMC::GenParticle* TruthBinding::getPrimaryTruthParticle() const { return m_primaryTruthParticle; } -/** pointer to the simulation truth particle before any regeneration (eg. brem) */ -HepMC::GenParticle* TruthBinding::getGenerationZeroTruthParticle() const { return m_generationZeroTruthParticle; } -void TruthBinding::setGenerationZeroTruthParticle(HepMC::GenParticle* p) { m_generationZeroTruthParticle = p; } + /** pointer to the simulation truth particle before any regeneration (eg. brem) */ + HepMC::GenParticle* TruthBinding::getGenerationZeroTruthParticle() const { return m_generationZeroTruthParticle; } + void TruthBinding::setGenerationZeroTruthParticle(HepMC::GenParticle* p) { m_generationZeroTruthParticle = p; } } // end ISF namespace diff --git a/Simulation/ISF/ISF_Core/ISF_Event/src/ISFParticle.cxx b/Simulation/ISF/ISF_Core/ISF_Event/src/ISFParticle.cxx index e64c118a036a3f746e83e369dff638c38a9954e5..e78d8db5349bae7cc357a5459c40dd498fe225c8 100644 --- a/Simulation/ISF/ISF_Core/ISF_Event/src/ISFParticle.cxx +++ b/Simulation/ISF/ISF_Core/ISF_Event/src/ISFParticle.cxx @@ -11,85 +11,90 @@ #include <cmath> // fabs ISF::ISFParticle::ISFParticle( - const Amg::Vector3D& pos, - const Amg::Vector3D& mom, - double mass, - double charge, - int pdgCode, - double time, - const ISFParticle &parent, - Barcode::ParticleBarcode barcode, - TruthBinding* truth): - m_position(pos), - m_momentum(mom), - m_mass(mass), - m_charge(charge), - m_pdgCode(pdgCode), - m_tstamp(time), - m_history(parent.history()), - m_barcode(barcode), - m_bcid(parent.getBCID()), - m_truth(truth), - m_order(ISF::DefaultParticleOrder), - m_userInfo(nullptr) + const Amg::Vector3D& pos, + const Amg::Vector3D& mom, + double mass, + double charge, + int pdgCode, + double time, + const ISFParticle &parent, + Barcode::ParticleBarcode barcode, + TruthBinding* truth, + const HepMcParticleLink* partLink): + m_position(pos), + m_momentum(mom), + m_mass(mass), + m_charge(charge), + m_pdgCode(pdgCode), + m_tstamp(time), + m_history(parent.history()), + m_barcode(barcode), + m_bcid(parent.getBCID()), + m_truth(truth), + m_order(ISF::DefaultParticleOrder), + m_userInfo(nullptr), + m_partLink(partLink) { } ISF::ISFParticle::ISFParticle( - const HepGeom::Point3D<double>& pos, - const HepGeom::Vector3D<double>& mom, - double mass, - double charge, - int pdgCode, - double time, - const ISFParticle &parent, - Barcode::ParticleBarcode barcode, - TruthBinding* truth): - m_position( pos.x(), pos.y(), pos.z()), - m_momentum( mom.x(), mom.y(), mom.z()), - m_mass(mass), - m_charge(charge), - m_pdgCode(pdgCode), - m_tstamp(time), - m_history(parent.history()), - m_barcode(barcode), - m_bcid(parent.getBCID()), - m_truth(truth), - m_order(ISF::DefaultParticleOrder), - m_userInfo(nullptr) + const HepGeom::Point3D<double>& pos, + const HepGeom::Vector3D<double>& mom, + double mass, + double charge, + int pdgCode, + double time, + const ISFParticle &parent, + Barcode::ParticleBarcode barcode, + TruthBinding* truth, + const HepMcParticleLink* partLink): + m_position( pos.x(), pos.y(), pos.z()), + m_momentum( mom.x(), mom.y(), mom.z()), + m_mass(mass), + m_charge(charge), + m_pdgCode(pdgCode), + m_tstamp(time), + m_history(parent.history()), + m_barcode(barcode), + m_bcid(parent.getBCID()), + m_truth(truth), + m_order(ISF::DefaultParticleOrder), + m_userInfo(nullptr), + m_partLink(partLink) { } ISF::ISFParticle::ISFParticle( - const Amg::Vector3D& pos, - const Amg::Vector3D& mom, - double mass, - double charge, - int pdgCode, - double time, - const DetRegionSvcIDPair &origin, - int bcid, - Barcode::ParticleBarcode barcode, - TruthBinding* truth): - m_position(pos), - m_momentum(mom), - m_mass(mass), - m_charge(charge), - m_pdgCode(pdgCode), - m_tstamp(time), - m_history(1, origin), - m_barcode(barcode), - m_bcid(bcid), - m_truth(truth), - m_order(ISF::DefaultParticleOrder), - m_userInfo(nullptr) + const Amg::Vector3D& pos, + const Amg::Vector3D& mom, + double mass, + double charge, + int pdgCode, + double time, + const DetRegionSvcIDPair &origin, + int bcid, + Barcode::ParticleBarcode barcode, + TruthBinding* truth, + const HepMcParticleLink* partLink): + m_position(pos), + m_momentum(mom), + m_mass(mass), + m_charge(charge), + m_pdgCode(pdgCode), + m_tstamp(time), + m_history(1, origin), + m_barcode(barcode), + m_bcid(bcid), + m_truth(truth), + m_order(ISF::DefaultParticleOrder), + m_userInfo(nullptr), + m_partLink(partLink) { } - ISF::ISFParticle::ISFParticle(const ISFParticle& isfp): m_position(isfp.position()), m_momentum(isfp.momentum()), @@ -106,8 +111,9 @@ ISF::ISFParticle::ISFParticle(const ISFParticle& isfp): { TruthBinding *truth = isfp.getTruthBinding(); if (truth) { - m_truth = new TruthBinding(*truth); + m_truth = new TruthBinding(*truth); } + m_partLink = ((isfp.getParticleLink()) ? new HepMcParticleLink(*isfp.getParticleLink()) : nullptr); } ISF::ISFParticle::ISFParticle(ISFParticle&& isfp): @@ -122,17 +128,20 @@ ISF::ISFParticle::ISFParticle(ISFParticle&& isfp): m_bcid(isfp.getBCID()), m_truth(isfp.getTruthBinding()), m_order(isfp.getOrder()), - m_userInfo(isfp.getUserInformation()) + m_userInfo(isfp.getUserInformation()), + m_partLink(isfp.getParticleLink()) { } ISF::ISFParticle::~ISFParticle() { delete m_truth; delete m_userInfo; + if (m_partLink) delete m_partLink; } ISF::ISFParticle& ISF::ISFParticle::operator=(const ISF::ISFParticle& rhs) { + if (this != &rhs) { m_position = rhs.position(); m_momentum = rhs.momentum(); @@ -149,8 +158,9 @@ ISF::ISFParticle& ISF::ISFParticle::operator=(const ISF::ISFParticle& rhs) TruthBinding *rhsTruth = rhs.getTruthBinding(); if (rhsTruth) { - m_truth = new TruthBinding(*rhsTruth); + m_truth = new TruthBinding(*rhsTruth); } + m_partLink = ((rhs.getParticleLink()) ? new HepMcParticleLink(*rhs.getParticleLink()): nullptr); delete m_userInfo; m_userInfo = nullptr; @@ -174,6 +184,8 @@ ISF::ISFParticle& ISF::ISFParticle::operator=(ISF::ISFParticle&& rhs) m_truth = rhs.getTruthBinding(); delete m_userInfo; m_userInfo = rhs.getUserInformation(); + if (m_partLink) delete m_partLink; + m_partLink = rhs.getParticleLink(); return *this; } @@ -216,6 +228,14 @@ bool ISF::ISFParticle::isEqual(const ISF::ISFParticle& rhs) const } } + { + const auto rhsPartLinkPtr = rhs.getParticleLink(); + if(m_partLink && rhsPartLinkPtr) { + pass &= *m_partLink == *rhsPartLinkPtr; + } else { + pass &= m_partLink == rhsPartLinkPtr; // must be both nullptr to pass + } + } return pass; } @@ -233,5 +253,21 @@ bool ISF::ISFParticle::isIdent(const ISF::ISFParticle& rhs) const pass &= m_bcid == rhs.getBCID(); pass &= m_truth && rhs.getTruthBinding(); pass &= m_userInfo == rhs.getUserInformation(); + pass &= m_partLink == rhs.getParticleLink(); return pass; } + +void ISF::ISFParticle::setBarcodeAndUpdateHepMcParticleLink( Barcode::ParticleBarcode bc) { + // set a new barcode + setBarcode(bc); + + //creating/changing the ISFParticle's HepMcParticleLink + HepMcParticleLink* newHMPL = nullptr; + if (m_partLink) { + newHMPL = new HepMcParticleLink(bc, m_partLink->eventIndex(), m_partLink->getEventCollection()); + delete m_partLink; + } else { + newHMPL = new HepMcParticleLink(bc); + } + m_partLink = newHMPL; +} diff --git a/Simulation/ISF/ISF_Core/ISF_Event/src/ISFTruthIncident.cxx b/Simulation/ISF/ISF_Core/ISF_Event/src/ISFTruthIncident.cxx index 6cd8494cc1433363c3364aeae0b5bc699ebc09cb..484384db43bcbd4c2f15f40b8eee373d27312667 100644 --- a/Simulation/ISF/ISF_Core/ISF_Event/src/ISFTruthIncident.cxx +++ b/Simulation/ISF/ISF_Core/ISF_Event/src/ISFTruthIncident.cxx @@ -78,8 +78,7 @@ int ISF::ISFTruthIncident::parentPdgCode() const { } HepMC::GenParticle* ISF::ISFTruthIncident::parentParticle() const { - - if ( m_parent.getTruthBinding() ) { + if ( m_parent.getTruthBinding() || m_parent.getParticleLink()) { return getHepMCTruthParticle(m_parent); } else { return updateHepMCTruthParticle(m_parent, &m_parent); @@ -104,8 +103,10 @@ HepMC::GenParticle* ISF::ISFTruthIncident::parentParticleAfterIncident(Barcode:: // only update the parent particle, if it survived the interaction + // set a new barcode m_parent.setBarcode( newBC ); + // and update truth info (including the ISFParticle's HMPL) return updateHepMCTruthParticle(m_parent, &m_parent); } @@ -136,6 +137,7 @@ HepMC::GenParticle* ISF::ISFTruthIncident::childParticle(unsigned short index, sec->setBarcode( bc); } + // and update truth info (including the ISFParticle's HMPL) return updateHepMCTruthParticle( *sec, &m_parent ); } @@ -151,8 +153,8 @@ void ISF::ISFTruthIncident::setAllChildrenBarcodes(Barcode::ParticleBarcode bc) // the current particle ISF::ISFParticle *p = m_children[i]; - // set a new barcode - p->setBarcode( bc); + // set a new barcode and update the ISFParticle's HMPL + p->setBarcodeAndUpdateHepMcParticleLink(bc); } return; @@ -164,6 +166,13 @@ HepMC::GenParticle* ISF::ISFTruthIncident::getHepMCTruthParticle( const ISF::ISF auto* truthBinding = particle.getTruthBinding(); auto* hepTruthParticle = truthBinding ? truthBinding->getTruthParticle() : nullptr; + // HepMC::GenParticle not in TruthBinding -> see if the HepMcParticleLink can retrieve it + if (!hepTruthParticle) { + const HepMcParticleLink* oldHMPL = particle.getParticleLink(); + if (oldHMPL && oldHMPL->cptr()) + hepTruthParticle = const_cast<HepMC::GenParticle*>(oldHMPL->cptr()); + } + return hepTruthParticle; } @@ -184,6 +193,16 @@ HepMC::GenParticle* ISF::ISFTruthIncident::updateHepMCTruthParticle( ISF::ISFPar particle.setTruthBinding(truthBinding); } + //register the new GenParticle as HepMcParticleLink, copying over some old properties if present + const HepMcParticleLink* oldHMPL = particle.getParticleLink(); + HepMcParticleLink* newHMPL = nullptr; + if (oldHMPL) { + newHMPL = new HepMcParticleLink(hepTruthParticle, oldHMPL->eventIndex(), oldHMPL->getEventCollection()); + delete oldHMPL; + } else { + newHMPL = new HepMcParticleLink(hepTruthParticle); + } + particle.setParticleLink(newHMPL); + return hepTruthParticle; } - diff --git a/Simulation/ISF/ISF_Core/ISF_Interfaces/CMakeLists.txt b/Simulation/ISF/ISF_Core/ISF_Interfaces/CMakeLists.txt index 5925a11fd646fd75e3ab098377e8860514fab678..782f95e97f05026f86b7410358a4723b5f1cdec7 100644 --- a/Simulation/ISF/ISF_Core/ISF_Interfaces/CMakeLists.txt +++ b/Simulation/ISF/ISF_Core/ISF_Interfaces/CMakeLists.txt @@ -12,6 +12,7 @@ atlas_depends_on_subdirs( PUBLIC Control/StoreGate DetectorDescription/AtlasDetDescr DetectorDescription/GeoPrimitives + Generators/GeneratorObjects GaudiKernel Generators/GeneratorObjects Simulation/Barcode/BarcodeEvent diff --git a/Simulation/ISF/ISF_Core/ISF_Interfaces/ISF_Interfaces/IInputConverter.h b/Simulation/ISF/ISF_Core/ISF_Interfaces/ISF_Interfaces/IInputConverter.h index 26ca2d55d57e81f666175a7ee391babb434a926d..13b2bc773567f8692365e8df191c37f39ed7599f 100644 --- a/Simulation/ISF/ISF_Core/ISF_Interfaces/ISF_Interfaces/IInputConverter.h +++ b/Simulation/ISF/ISF_Core/ISF_Interfaces/ISF_Interfaces/IInputConverter.h @@ -12,6 +12,9 @@ // Gaudi #include "GaudiKernel/IInterface.h" +//GeneratorObjects +#include "GeneratorObjects/HepMcParticleLink.h" + // StoreGate #include "StoreGate/ReadHandle.h" #include "StoreGate/WriteHandle.h" @@ -52,13 +55,13 @@ namespace ISF { and push them into the given ISFParticleContainer */ virtual StatusCode convert(const McEventCollection& inputGenEvents, ISFParticleContainer& simParticles, - bool isPileup) const = 0; + EBC_EVCOLL kindOfCollection=EBC_MAINEVCOLL) const = 0; /** Convert selected particles from the given McEventCollection into G4PrimaryParticles and push them into the given G4Event */ virtual StatusCode convertHepMCToG4Event(McEventCollection& inputGenEvents, G4Event*& outputG4Event, - bool isPileup) const = 0; + EBC_EVCOLL kindOfCollection=EBC_MAINEVCOLL) const = 0; /** Converts vector of ISF::ISFParticles to G4Event */ virtual G4Event* ISF_to_G4Event(const std::vector<const ISF::ISFParticle*>& isp, HepMC::GenEvent *genEvent) const = 0; diff --git a/Simulation/ISF/ISF_Core/ISF_Interfaces/ISF_Interfaces/IParticleHelper.h b/Simulation/ISF/ISF_Core/ISF_Interfaces/ISF_Interfaces/IParticleHelper.h index 3baa725c72d507e95abedc592fecf9ff6071946d..1ae95863f0ac3e636977424779dcde3e022db7e5 100644 --- a/Simulation/ISF/ISF_Core/ISF_Interfaces/ISF_Interfaces/IParticleHelper.h +++ b/Simulation/ISF/ISF_Core/ISF_Interfaces/ISF_Interfaces/IParticleHelper.h @@ -11,36 +11,39 @@ // Gaudi #include "GaudiKernel/IAlgTool.h" - + // Simulation includes -#include "ISF_Event/SimSvcID.h" +#include "ISF_Event/SimSvcID.h" // Barcode includes #include "BarcodeEvent/Barcode.h" // Amg includes #include "GeoPrimitives/GeoPrimitives.h" - + // CLHEP includes #include "CLHEP/Geometry/Vector3D.h" #include "CLHEP/Geometry/Point3D.h" +// McEventCollection +#include "GeneratorObjects/HepMcParticleLink.h" + namespace ISF { class ISFParticle; class TruthBinding; /** - @class IParticleHelper - - Interface to create a particle from primary information, - allows to reduce dependency on actual StackParticle implementation - - Could make use of a Data POOL eventually - - @author Andreas.Salzburger -at- cern.ch - */ - + @class IParticleHelper + + Interface to create a particle from primary information, + allows to reduce dependency on actual StackParticle implementation + + Could make use of a Data POOL eventually + + @author Andreas.Salzburger -at- cern.ch + */ + class IParticleHelper : virtual public IAlgTool { public: @@ -59,7 +62,8 @@ namespace ISF { double pTime, const ISFParticle &parent, Barcode::ParticleBarcode bc = Barcode::fUndefinedBarcode, - TruthBinding* tBinding = nullptr) const = 0; + TruthBinding* tBinding = nullptr, + const HepMcParticleLink * partLink = nullptr) const = 0; /** Create a new particle */ virtual ISFParticle* createParticle( const Amg::Vector3D& x, @@ -70,7 +74,8 @@ namespace ISF { double pTime, const ISFParticle &parent, Barcode::ParticleBarcode bc = Barcode::fUndefinedBarcode, - TruthBinding* tBinding = nullptr) const = 0; + TruthBinding* tBinding = nullptr, + const HepMcParticleLink * partLink = nullptr) const = 0; /** Create a new particle */ virtual ISFParticle* createParticle( const HepGeom::Point3D<double>& x, @@ -81,7 +86,8 @@ namespace ISF { double pTime, const ISFParticle &parent, Barcode::ParticleBarcode bc = Barcode::fUndefinedBarcode, - TruthBinding* tBinding = nullptr) const = 0; + TruthBinding* tBinding = nullptr, + const HepMcParticleLink * partLink = nullptr) const = 0; /** An updated particle (e.g. after transport) */ virtual ISFParticle* updatedParticle( const ISFParticle& origIsp, diff --git a/Simulation/ISF/ISF_Core/ISF_Services/src/InputConverter.cxx b/Simulation/ISF/ISF_Core/ISF_Services/src/InputConverter.cxx index 725ce48699ba783242a781a727488570c701a944..9005d9b755b76ab13fe00fda4976ffb470b87227 100644 --- a/Simulation/ISF/ISF_Core/ISF_Services/src/InputConverter.cxx +++ b/Simulation/ISF/ISF_Core/ISF_Services/src/InputConverter.cxx @@ -133,16 +133,12 @@ ISF::InputConverter::finalize() StatusCode ISF::InputConverter::convert(const McEventCollection& inputGenEvents, ISF::ISFParticleContainer& simParticles, - bool isPileup) const + EBC_EVCOLL kindOfCollection) const { for ( const auto& eventPtr : inputGenEvents ) { // skip empty events if (eventPtr == nullptr) { continue; } - // @FIXME: set the bunch-crossing identifier for pileup dynamically - // rather than a constant '1' (e.g. could use GenEvent index for that?) - int bcid = isPileup ? 1 : 0; - ATH_MSG_DEBUG("Starting conversion of GenEvent with" " signal_process_id=" << eventPtr->signal_process_id() << " and event_number=" << eventPtr->event_number() ); @@ -157,7 +153,7 @@ ISF::InputConverter::convert(const McEventCollection& inputGenEvents, for ( auto& genPartPtr : passedGenParticles ) { ATH_MSG_VERBOSE("Picking up following GenParticle for conversion to ISFParticle: " << *genPartPtr); - auto *simParticlePtr = this->convertParticle(genPartPtr, bcid); + auto simParticlePtr = convertParticle(genPartPtr, kindOfCollection); if (!simParticlePtr) { ATH_MSG_ERROR("Error while trying to convert input generator particles. Aborting."); return StatusCode::FAILURE; @@ -176,10 +172,10 @@ ISF::InputConverter::convert(const McEventCollection& inputGenEvents, StatusCode ISF::InputConverter::convertHepMCToG4Event(McEventCollection& inputGenEvents, G4Event*& outputG4Event, - bool isPileup) const + EBC_EVCOLL kindOfCollection) const { ISF::ISFParticleContainer simParticleList{}; // particles for ISF simulation - ATH_CHECK(this->convert(inputGenEvents, simParticleList, isPileup)); + ATH_CHECK(this->convert(inputGenEvents, simParticleList, kindOfCollection)); //Convert from ISFParticleContainer to ConstISFParticleVector ISF::ConstISFParticleVector simParticleVector{std::make_move_iterator(std::begin(simParticleList)), std::make_move_iterator(std::end(simParticleList))}; @@ -227,10 +223,14 @@ ISF::InputConverter::getSelectedParticles(const HepMC::GenEvent& evnt, bool lega /** get all generator particles which pass filters */ ISF::ISFParticle* -ISF::InputConverter::convertParticle(HepMC::GenParticle* genPartPtr, int bcid) const { +ISF::InputConverter::convertParticle(HepMC::GenParticle* genPartPtr, EBC_EVCOLL kindOfCollection) const { if (!genPartPtr) { return nullptr; } auto& genPart = *genPartPtr; + // @FIXME: set the bunch-crossing identifier for pile-up dynamically + // rather than a constant '1' (e.g. could use GenEvent index for that?) + const int bcid = (kindOfCollection==EBC_MAINEVCOLL) ? 0 : 1; + HepMC::GenVertex* pVertex = genPart.production_vertex(); if (!pVertex) { ATH_MSG_ERROR("Unable to convert following generator particle due to missing " @@ -249,19 +249,26 @@ ISF::InputConverter::convertParticle(HepMC::GenParticle* genPartPtr, int bcid) c /// particle origin (TODO: add proper GeoID, collision/cosmics) DetRegionSvcIDPair origin(AtlasDetDescr::fUndefinedAtlasRegion, ISF::fEventGeneratorSimID); const auto pBarcode = genPart.barcode(); - ISF::TruthBinding* tBinding = new ISF::TruthBinding(genPartPtr); - - auto* sParticle = new ISF::ISFParticle( std::move(pos), - std::move(mom), - pMass, - charge, - pPdgId, - pTime, - origin, - bcid, - pBarcode, - tBinding ); - return sParticle; + auto tBinding = std::make_unique<ISF::TruthBinding>(genPartPtr); + + auto *parentEvent = genPart.parent_event(); + if(!parentEvent) { + ATH_MSG_ERROR("Cannot convert a GenParticle without a parent GenEvent into an ISFParticle!!!"); + return nullptr; + } + auto hmpl = std::make_unique<HepMcParticleLink>(&genPart, parentEvent->event_number(), kindOfCollection); + auto sParticle = std::make_unique<ISF::ISFParticle>( std::move(pos), + std::move(mom), + pMass, + charge, + pPdgId, + pTime, + origin, + bcid, + pBarcode, + tBinding.release(), + hmpl.release() ); + return sParticle.release(); } diff --git a/Simulation/ISF/ISF_Core/ISF_Services/src/InputConverter.h b/Simulation/ISF/ISF_Core/ISF_Services/src/InputConverter.h index ec7ad7425b90ee3f4828f12371f04f7accbd0abd..5f57a516d138d60e4339e6a4876183a992eaca32 100644 --- a/Simulation/ISF/ISF_Core/ISF_Services/src/InputConverter.h +++ b/Simulation/ISF/ISF_Core/ISF_Services/src/InputConverter.h @@ -70,12 +70,12 @@ namespace ISF { and push them into the given ISFParticleContainer */ virtual StatusCode convert(const McEventCollection& inputGenEvents, ISF::ISFParticleContainer& simParticles, - bool isPileup=false) const override final; + EBC_EVCOLL kindOfCollection=EBC_MAINEVCOLL) const override final; /** */ virtual StatusCode convertHepMCToG4Event(McEventCollection& inputGenEvents, G4Event*& outputG4Event, - bool isPileup) const override final; + EBC_EVCOLL kindOfCollection=EBC_MAINEVCOLL) const override final; /** Converts vector of ISF::ISFParticles to G4Event */ G4Event* ISF_to_G4Event(const std::vector<const ISF::ISFParticle*>& isp, HepMC::GenEvent *genEvent) const override final; @@ -103,7 +103,7 @@ namespace ISF { bool passesFilters(const HepMC::GenParticle& p) const; /** convert GenParticle to ISFParticle */ - ISF::ISFParticle* convertParticle(HepMC::GenParticle* genPartPtr, int bcid) const; + ISF::ISFParticle* convertParticle(HepMC::GenParticle* genPartPtr, EBC_EVCOLL kindOfCollection=EBC_MAINEVCOLL) const; /** ParticlePropertyService and ParticleDataTable */ ServiceHandle<IPartPropSvc> m_particlePropSvc; //!< particle properties svc to retrieve PDT diff --git a/Simulation/ISF/ISF_Core/ISF_Services/test/InputConverter_test.cxx b/Simulation/ISF/ISF_Core/ISF_Services/test/InputConverter_test.cxx index 2affadff16cfc62fd6796aa337cc8486a99f5827..0eae9414b916853507312aa3f0d1668d3cfd7144 100644 --- a/Simulation/ISF/ISF_Core/ISF_Services/test/InputConverter_test.cxx +++ b/Simulation/ISF/ISF_Core/ISF_Services/test/InputConverter_test.cxx @@ -10,9 +10,6 @@ #undef NDEBUG -// Tested service -#include "../src/InputConverter.h" - // Framework #include "GaudiKernel/PhysicalConstants.h" //#include "GaudiKernel/DeclareFactoryEntries.h" @@ -42,10 +39,14 @@ // HepMC #include "HepMC/GenParticle.h" #include "HepMC/GenVertex.h" +#include "GeneratorObjects/HepMcParticleLink.h" +#include "GeneratorObjects/McEventCollection.h" // STL includes #include <cstdlib> // quick_exit +// Tested service +#include "../src/InputConverter.h" namespace ISFTesting { @@ -152,8 +153,7 @@ TEST_F(InputConverter_test, initialize_empty) { TEST_F(InputConverter_test, convertParticle_nullptr) { ISF::ISFParticle* expected = nullptr; - int bcid = 1; - ASSERT_EQ( expected, convertParticle(nullptr, bcid) ); + ASSERT_EQ( expected, convertParticle(nullptr, EBC_MAINEVCOLL) ); } @@ -164,8 +164,7 @@ TEST_F(InputConverter_test, convertParticle_without_production_vertex) { 1 // status ); ISF::ISFParticle* expected = nullptr; - int bcid = 99; - ASSERT_EQ( expected, convertParticle(genPart, bcid) ); + ASSERT_EQ( expected, convertParticle(genPart, EBC_FIRSTPUEVCOLL) ); delete genPart; } @@ -174,6 +173,7 @@ TEST_F(InputConverter_test, convertParticle_using_generated_mass) { m_svc->setProperty("UseGeneratedParticleMass", "True"); ASSERT_TRUE( m_svc->initialize().isSuccess() ); + const int particleBarcode(546); HepMC::FourVector mom(12.3, 45.6, 78.9, 0.12); // dynamic allocation necessary as particle ownership is // handed over to a HepMC::GenVertex later @@ -182,17 +182,28 @@ TEST_F(InputConverter_test, convertParticle_using_generated_mass) { 1 // status ); genPart->set_generated_mass(1234.56); - genPart->suggest_barcode(9876352); + genPart->suggest_barcode(particleBarcode); HepMC::FourVector pos(9.8, 7.65, 4.3, 0.321); // NB: 4th component is time*c int vtx_id = -123; - HepMC::GenVertex prodVtx(pos, vtx_id); - prodVtx.add_particle_out(genPart); + HepMC::GenVertex *prodVtx = new HepMC::GenVertex(pos, vtx_id); + prodVtx->add_particle_out(genPart); + + // create dummy input McEventCollection containing a dummy GenEvent + SG::WriteHandle<McEventCollection> inputTestDataHandle{"GEN_EVENT_HighPtPU"}; + inputTestDataHandle = std::make_unique<McEventCollection>(); + inputTestDataHandle->push_back(new HepMC::GenEvent()); + HepMC::GenEvent& ge = *(inputTestDataHandle->at(0)); + ge.add_vertex( prodVtx ); + HepMcParticleLink* trackLink = new HepMcParticleLink(particleBarcode, 0, EBC_SECONDPUEVCOLL); Amg::Vector3D expectedPos(9.8, 7.65, 4.3); Amg::Vector3D expectedMom(12.3, 45.6, 78.9); ISF::DetRegionSvcIDPair expectedHistory(AtlasDetDescr::fUndefinedAtlasRegion, ISF::fEventGeneratorSimID); auto expectedTruthBinding = new ISF::TruthBinding(genPart); + const int expectedBCID(1); // FIXME for now convertParticle forces + // the bcid for pile-up + // McEventCollections to be 1. ISF::ISFParticle expected(expectedPos, expectedMom, 1234.56, @@ -200,14 +211,13 @@ TEST_F(InputConverter_test, convertParticle_using_generated_mass) { 11, // pdg id 0.321/Gaudi::Units::c_light, // time expectedHistory, - 563, // bcid - 9876352, // barcode - expectedTruthBinding - ); + expectedBCID, // bcid + particleBarcode, // barcode + expectedTruthBinding, + trackLink); - int bcid = 563; // call the InputConverter's private method - ISF::ISFParticle* returned = convertParticle(genPart, bcid); + ISF::ISFParticle* returned = convertParticle(genPart, EBC_SECONDPUEVCOLL); ASSERT_TRUE( returned ); ASSERT_EQ( expected, *returned ); @@ -218,6 +228,7 @@ TEST_F(InputConverter_test, convertParticle_using_particleDataTable_photon) { m_svc->setProperty("UseGeneratedParticleMass", "False"); ASSERT_TRUE( m_svc->initialize().isSuccess() ); + const int particleBarcode(546); HepMC::FourVector mom(12.3, 45.6, 78.9, 0.12); // dynamic allocation necessary as particle ownership is // handed over to a HepMC::GenVertex later @@ -226,17 +237,26 @@ TEST_F(InputConverter_test, convertParticle_using_particleDataTable_photon) { 1 // status ); genPart->set_generated_mass(1234.56); // should be ignored later on - genPart->suggest_barcode(9876352); + genPart->suggest_barcode(particleBarcode); HepMC::FourVector pos(9.8, 7.65, 4.3, 0.321); // NB: 4th component is time*c int vtx_id = -123; - HepMC::GenVertex prodVtx(pos, vtx_id); - prodVtx.add_particle_out(genPart); + HepMC::GenVertex *prodVtx = new HepMC::GenVertex(pos, vtx_id); + prodVtx->add_particle_out(genPart); + + // create dummy input McEventCollection containing a dummy GenEvent + SG::WriteHandle<McEventCollection> inputTestDataHandle{"GEN_EVENT"}; + inputTestDataHandle = std::make_unique<McEventCollection>(); + inputTestDataHandle->push_back(new HepMC::GenEvent()); + HepMC::GenEvent& ge = *(inputTestDataHandle->at(0)); + ge.add_vertex( prodVtx ); + HepMcParticleLink* trackLink = new HepMcParticleLink(particleBarcode); Amg::Vector3D expectedPos(9.8, 7.65, 4.3); Amg::Vector3D expectedMom(12.3, 45.6, 78.9); ISF::DetRegionSvcIDPair expectedHistory(AtlasDetDescr::fUndefinedAtlasRegion, ISF::fEventGeneratorSimID); auto expectedTruthBinding = new ISF::TruthBinding(genPart); + const int expectedBCID(0); ISF::ISFParticle expected(expectedPos, expectedMom, 0., // mass from ParticleDataTable @@ -244,14 +264,14 @@ TEST_F(InputConverter_test, convertParticle_using_particleDataTable_photon) { 22, // pdg id 0.321/Gaudi::Units::c_light, // time expectedHistory, - 0, // bcid - 9876352, // barcode - expectedTruthBinding + expectedBCID, // bcid + particleBarcode, // barcode + expectedTruthBinding, + trackLink ); - int bcid = 0; // call the InputConverter's private method - ISF::ISFParticle* returned = convertParticle(genPart, bcid); + ISF::ISFParticle* returned = convertParticle(genPart, EBC_MAINEVCOLL); ASSERT_TRUE( returned ); ASSERT_EQ( expected, *returned ); @@ -262,6 +282,7 @@ TEST_F(InputConverter_test, convertParticle_using_particleDataTable_electron) { m_svc->setProperty("UseGeneratedParticleMass", "False"); ASSERT_TRUE( m_svc->initialize().isSuccess() ); + const int particleBarcode(546); HepMC::FourVector mom(12.3, 45.6, 78.9, 0.12); // dynamic allocation necessary as particle ownership is // handed over to a HepMC::GenVertex later @@ -270,17 +291,28 @@ TEST_F(InputConverter_test, convertParticle_using_particleDataTable_electron) { 1 // status ); genPart->set_generated_mass(1234.56); // should be ignored later on - genPart->suggest_barcode(9876352); + genPart->suggest_barcode(particleBarcode); HepMC::FourVector pos(9.8, 7.65, 4.3, 0.321); // NB: 4th component is time*c int vtx_id = -123; - HepMC::GenVertex prodVtx(pos, vtx_id); - prodVtx.add_particle_out(genPart); + HepMC::GenVertex *prodVtx = new HepMC::GenVertex(pos, vtx_id); + prodVtx->add_particle_out(genPart); + + // create dummy input McEventCollection containing a dummy GenEvent + SG::WriteHandle<McEventCollection> inputTestDataHandle{"GEN_EVENT_PU"}; + inputTestDataHandle = std::make_unique<McEventCollection>(); + inputTestDataHandle->push_back(new HepMC::GenEvent()); + HepMC::GenEvent& ge = *(inputTestDataHandle->at(0)); + ge.add_vertex( prodVtx ); + HepMcParticleLink* trackLink = new HepMcParticleLink(particleBarcode, 0, EBC_FIRSTPUEVCOLL); Amg::Vector3D expectedPos(9.8, 7.65, 4.3); Amg::Vector3D expectedMom(12.3, 45.6, 78.9); ISF::DetRegionSvcIDPair expectedHistory(AtlasDetDescr::fUndefinedAtlasRegion, ISF::fEventGeneratorSimID); auto expectedTruthBinding = new ISF::TruthBinding(genPart); + const int expectedBCID(1); // FIXME for now convertParticle forces + // the bcid for pile-up + // McEventCollections to be 1. ISF::ISFParticle expected(expectedPos, expectedMom, 0.51099891/Gaudi::Units::MeV, // from particle @@ -288,14 +320,14 @@ TEST_F(InputConverter_test, convertParticle_using_particleDataTable_electron) { 11, // pdg id 0.321/Gaudi::Units::c_light, // time expectedHistory, - 11, // bcid - 9876352, // barcode - expectedTruthBinding + expectedBCID, // bcid + particleBarcode, // barcode + expectedTruthBinding, + trackLink ); - int bcid = 11; // call the InputConverter's private method - ISF::ISFParticle* returned = convertParticle(genPart, bcid); + ISF::ISFParticle* returned = convertParticle(genPart, EBC_FIRSTPUEVCOLL); ASSERT_TRUE( returned ); ASSERT_EQ( expected, *returned ); @@ -313,13 +345,14 @@ TEST_F(InputConverter_test, passesFilters_empty_filters_defaultconstructed_genpa TEST_F(InputConverter_test, passesFilters_empty_filters) { ASSERT_TRUE( m_svc->initialize().isSuccess() ); + const int particleBarcode(546); HepMC::FourVector mom(12.3, 45.6, 78.9, 0.12); HepMC::GenParticle genPart(mom, 11, // pdg id (e-) 1 // status ); genPart.set_generated_mass(1234.56); - genPart.suggest_barcode(9876352); + genPart.suggest_barcode(particleBarcode); const HepMC::GenParticle constGenPart(std::move(genPart)); ASSERT_TRUE( passesFilters(constGenPart) ); diff --git a/Simulation/ISF/ISF_Core/ISF_Tools/CMakeLists.txt b/Simulation/ISF/ISF_Core/ISF_Tools/CMakeLists.txt index 82deeb407848eccea14a37eb3ad102490f5628a6..c9c207a85b401d447f45429591f26fb8c8acf146 100644 --- a/Simulation/ISF/ISF_Core/ISF_Tools/CMakeLists.txt +++ b/Simulation/ISF/ISF_Core/ISF_Tools/CMakeLists.txt @@ -14,6 +14,7 @@ atlas_depends_on_subdirs( PUBLIC Simulation/Barcode/BarcodeEvent Simulation/Barcode/BarcodeInterfaces Simulation/G4Sim/TrackRecord + Generators/GeneratorObjects Simulation/ISF/ISF_Core/ISF_Event Simulation/ISF/ISF_Core/ISF_Interfaces ) @@ -21,7 +22,7 @@ atlas_depends_on_subdirs( PUBLIC atlas_add_component( ISF_Tools src/*.cxx src/components/*.cxx - LINK_LIBRARIES GaudiKernel AthenaBaseComps AtlasDetDescr ISF_Event ISF_Interfaces ) + LINK_LIBRARIES GaudiKernel AthenaBaseComps AtlasDetDescr GeneratorObjects ISF_Event ISF_Interfaces ) # Install files from the package: atlas_install_headers( ISF_Tools ) diff --git a/Simulation/ISF/ISF_Core/ISF_Tools/src/ParticleHelper.cxx b/Simulation/ISF/ISF_Core/ISF_Tools/src/ParticleHelper.cxx index 2d4facec823d267f06c9077a708b5d03c63bcba6..e0adba399831f5b73d82a480aaa05afae78715ce 100644 --- a/Simulation/ISF/ISF_Core/ISF_Tools/src/ParticleHelper.cxx +++ b/Simulation/ISF/ISF_Core/ISF_Tools/src/ParticleHelper.cxx @@ -15,6 +15,8 @@ // Barcode #include "BarcodeInterfaces/IBarcodeSvc.h" +// HMPL +#include "GeneratorObjects/HepMcParticleLink.h" /** Constructor **/ ISF::ParticleHelper::ParticleHelper(const std::string& t, const std::string& n, const IInterface* p) : @@ -44,7 +46,8 @@ ISF::ISFParticle* ISF::ParticleHelper::createParticle(double x, double y, double double pTime, const ISFParticle &parent, Barcode::ParticleBarcode bc, - TruthBinding* tBinding) const { + TruthBinding* tBinding, + const HepMcParticleLink * partLink) const { return new ISF::ISFParticle( Amg::Vector3D(x,y,z), Amg::Vector3D(px,py,pz), pMass, @@ -53,7 +56,8 @@ ISF::ISFParticle* ISF::ParticleHelper::createParticle(double x, double y, double pTime, parent, bc, - tBinding); + tBinding, + partLink); } @@ -66,7 +70,8 @@ ISF::ISFParticle* ISF::ParticleHelper::createParticle( const Amg::Vector3D& x, double pTime, const ISFParticle &parent, Barcode::ParticleBarcode bc, - TruthBinding* tBinding) const { + TruthBinding* tBinding, + const HepMcParticleLink * partLink) const { return new ISF::ISFParticle( x, p, pMass, @@ -75,7 +80,8 @@ ISF::ISFParticle* ISF::ParticleHelper::createParticle( const Amg::Vector3D& x, pTime, parent, bc, - tBinding); + tBinding, + partLink); } /** Create a new particle */ @@ -87,7 +93,8 @@ ISF::ISFParticle* ISF::ParticleHelper::createParticle( const HepGeom::Point3D<do double pTime, const ISFParticle &parent, Barcode::ParticleBarcode bc, - TruthBinding* tBinding) const { + TruthBinding* tBinding, + const HepMcParticleLink * partLink) const { return createParticle( pos.x(), pos.y(), pos.z(), mom.x(), mom.y(), mom.z(), pMass, @@ -96,7 +103,8 @@ ISF::ISFParticle* ISF::ParticleHelper::createParticle( const HepGeom::Point3D<do pTime, parent, bc, - tBinding ); + tBinding, + partLink); } /** Returns the Particle Stack, should register truth */ @@ -113,7 +121,8 @@ ISF::ISFParticle* ISF::ParticleHelper::updatedParticle(const ISFParticle& origIs origIsp.timeStamp()+deltaTime, origIsp, origIsp.barcode(), - origIsp.getTruthBinding() ? new TruthBinding(*origIsp.getTruthBinding()) : nullptr); + origIsp.getTruthBinding() ? new TruthBinding(*origIsp.getTruthBinding()) : nullptr, + origIsp.getParticleLink() ? new HepMcParticleLink(*origIsp.getParticleLink()) : nullptr); } /** Returns the Particle Stack, should register truth */ @@ -130,7 +139,8 @@ ISF::ISFParticle* ISF::ParticleHelper::updatedParticle(const ISFParticle& origIs origIsp.timeStamp()+deltaTime, origIsp, origIsp.barcode(), - origIsp.getTruthBinding() ? new TruthBinding(*origIsp.getTruthBinding()) : nullptr); + origIsp.getTruthBinding() ? new TruthBinding(*origIsp.getTruthBinding()) : nullptr, + origIsp.getParticleLink() ? new HepMcParticleLink(*origIsp.getParticleLink()) : nullptr); } diff --git a/Simulation/ISF/ISF_Core/ISF_Tools/src/ParticleHelper.h b/Simulation/ISF/ISF_Core/ISF_Tools/src/ParticleHelper.h index de3625bd38fa69e96ad2595e69ed738861f7ac81..5f95411d0029431fcba0bd91ded9ec44d4f00bcf 100644 --- a/Simulation/ISF/ISF_Core/ISF_Tools/src/ParticleHelper.h +++ b/Simulation/ISF/ISF_Core/ISF_Tools/src/ParticleHelper.h @@ -49,7 +49,7 @@ namespace ISF { StatusCode finalize(); /** Create a new particle */ - ISFParticle* createParticle( double x, double y, double z, + virtual ISFParticle* createParticle( double x, double y, double z, double px, double py, double pz, double pMass, double pCharge, @@ -57,10 +57,11 @@ namespace ISF { double pTime, const ISFParticle &parent, Barcode::ParticleBarcode bc, - TruthBinding* tBinding = nullptr) const override final; + TruthBinding* tBinding = nullptr, + const HepMcParticleLink * partLink = nullptr) const override final; /** Create a new particle */ - ISFParticle* createParticle( const Amg::Vector3D& x, + virtual ISFParticle* createParticle( const Amg::Vector3D& x, const Amg::Vector3D& p, double pMass, double pCharge, @@ -68,10 +69,11 @@ namespace ISF { double pTime, const ISFParticle &parent, Barcode::ParticleBarcode bc, - TruthBinding* tBinding = nullptr) const override final; + TruthBinding* tBinding = nullptr, + const HepMcParticleLink * partLink = nullptr) const override final; /** Create a new particle */ - ISFParticle* createParticle( const HepGeom::Point3D<double>& x, + virtual ISFParticle* createParticle( const HepGeom::Point3D<double>& x, const HepGeom::Vector3D<double>& p, double pMass, double pCharge, @@ -79,16 +81,17 @@ namespace ISF { double pTime, const ISFParticle &parent, Barcode::ParticleBarcode bc, - TruthBinding* tBinding = nullptr) const override final; + TruthBinding* tBinding = nullptr, + const HepMcParticleLink * partLink = nullptr) const override final; /** An updated particle (e.g. after transport) */ - ISFParticle* updatedParticle( const ISFParticle& origIsp, + virtual ISFParticle* updatedParticle( const ISFParticle& origIsp, const Amg::Vector3D& updatedPos, const Amg::Vector3D& updatedMom, double deltaTime = 0.) const override final; /** An updated particle (e.g. after transport) */ - ISFParticle* updatedParticle( const ISFParticle& origIsp, + virtual ISFParticle* updatedParticle( const ISFParticle& origIsp, const HepGeom::Point3D<double>& updatedPos, const HepGeom::Vector3D<double>& updatedMom, double deltaTime = 0.) const override final; diff --git a/Simulation/ISF/ISF_Example/python/ISF_Output.py b/Simulation/ISF/ISF_Example/python/ISF_Output.py index becc859f4eb3e5aa4be89c98eb8d17791a23c3f0..2209375f0ca86a3f097db60a5c4082ca513b62b0 100644 --- a/Simulation/ISF/ISF_Example/python/ISF_Output.py +++ b/Simulation/ISF/ISF_Example/python/ISF_Output.py @@ -153,7 +153,7 @@ class ISF_HITSStream: stream1 = None if athenaCommonFlags.PoolHitsOutput.statusOn: output_file = athenaCommonFlags.PoolHitsOutput() - stream1 = AthenaPoolOutputStream("StreamHITS", output_file, noTag=True) + stream1 = AthenaPoolOutputStream("StreamHITS", output_file) stream1.ForceRead = True stream1.ItemList = getHITSStreamItemList() ## Make stream aware of aborted events @@ -165,7 +165,7 @@ class ISF_HITSStream: xAODStream = None if simFlags.SimulationFlavour == "ParametricSimulation": output_file = athenaCommonFlags.PoolAODOutput() - xAODStream = AthenaPoolOutputStream("StreamAOD", output_file, noTag=True) + xAODStream = AthenaPoolOutputStream("StreamAOD", output_file) xAODStream.ForceRead = True xAODStream.ItemList = getAODStreamItemList() ## Make stream aware of aborted events diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSHistoLateralShapeParametrization.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSHistoLateralShapeParametrization.cxx index fc78ae5ea4af8310be9d80ffd93d97798bb36de8..e7b62b40d5d01c535faa81a1fc7ba48fe7570121 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSHistoLateralShapeParametrization.cxx +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSHistoLateralShapeParametrization.cxx @@ -45,7 +45,7 @@ void TFCSHistoLateralShapeParametrization::set_number_of_hits(float nhits) m_nhits=nhits; } -FCSReturnCode TFCSHistoLateralShapeParametrization::simulate_hit(Hit &hit, TFCSSimulationState &simulstate, const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol) +FCSReturnCode TFCSHistoLateralShapeParametrization::simulate_hit(Hit &hit, TFCSSimulationState &simulstate, const TFCSTruthState* truth, const TFCSExtrapolationState* /*extrapol*/) { if (!simulstate.randomEngine()) { return FCSFatal; diff --git a/Simulation/ISF/ISF_HepMC/ISF_HepMC_Tools/python/ISF_HepMC_ToolsConfig.py b/Simulation/ISF/ISF_HepMC/ISF_HepMC_Tools/python/ISF_HepMC_ToolsConfig.py index 87d00a7c3f629b0825c93180107d1446bad18aad..0bc48a4f18a00d44bcbbc2380c735e50d8d536b5 100644 --- a/Simulation/ISF/ISF_HepMC/ISF_HepMC_Tools/python/ISF_HepMC_ToolsConfig.py +++ b/Simulation/ISF/ISF_HepMC/ISF_HepMC_Tools/python/ISF_HepMC_ToolsConfig.py @@ -91,9 +91,9 @@ def getGenParticleInteractingFilter(name="ISF_GenParticleInteractingFilter", **k from G4AtlasApps.SimFlags import simFlags simdict = simFlags.specialConfiguration.get_Value() if simdict is not None and "InteractingPDGCodes" in simdict: - kwargs.setdefault('AdditionalInteractingParticleTypes', simdict["InteractingPDGCodes"]) + kwargs.setdefault('AdditionalInteractingParticleTypes', eval(simdict["InteractingPDGCodes"])) if simdict is not None and "NonInteractingPDGCodes" in simdict: - kwargs.setdefault('AdditionalNonInteractingParticleTypes', simdict["InteractingNonPDGCodes"]) + kwargs.setdefault('AdditionalNonInteractingParticleTypes', eval(simdict["InteractingNonPDGCodes"])) return CfgMgr.ISF__GenParticleInteractingFilter(name, **kwargs) def getEtaPhiFilter(name="ISF_EtaPhiFilter", **kwargs): diff --git a/Simulation/SimulationJobOptions/share/heavyIons/postInclude.HijingPars.py b/Simulation/SimulationJobOptions/share/heavyIons/postInclude.HijingPars.py index 1bbfad8d37edbec2ed84ebd1f14f339d2ef27d95..63306936398ca6ba9f1839e3485ff2becc88aab1 100644 --- a/Simulation/SimulationJobOptions/share/heavyIons/postInclude.HijingPars.py +++ b/Simulation/SimulationJobOptions/share/heavyIons/postInclude.HijingPars.py @@ -39,7 +39,10 @@ else: streamAlgs = ['StreamHITS','StreamRDO','StreamESD','StreamAOD'] streamSeq = AlgSequence("Streams") for stream in streamAlgs: - outStream = getattr(streamSeq, stream, None) - if outStream is not None: - outStream.ItemList += [ "HijingEventParams#Hijing_event_params" ] - + sSoutStream = getattr(streamSeq, stream, None) + tSoutStream = getattr(topSequence, stream, None) + if tSoutStream is not None: + tSoutStream.ItemList += [ "HijingEventParams#Hijing_event_params" ] + else: + if sSoutStream is not None: + sSoutStream.ItemList += [ "HijingEventParams#Hijing_event_params" ] diff --git a/Simulation/SimulationJobOptions/share/specialConfig/preInclude.Monopole.py b/Simulation/SimulationJobOptions/share/specialConfig/preInclude.Monopole.py index b9af8ac2960dd5148392247dfee48d938aa98b54..eff6164861f06f339351ff4d0439b54a2c2589a6 100644 --- a/Simulation/SimulationJobOptions/share/specialConfig/preInclude.Monopole.py +++ b/Simulation/SimulationJobOptions/share/specialConfig/preInclude.Monopole.py @@ -48,7 +48,7 @@ try: else: from G4AtlasApps.SimFlags import simFlags if not "InteractingPDGCodes" in simFlags.specialConfiguration.get_Value(): - simFlags.specialConfiguration.get_Value()['InteractingPDGCodes'] = [4110000,-4110000] + simFlags.specialConfiguration.get_Value()['InteractingPDGCodes'] = str([4110000,-4110000]) simdict = simFlags.specialConfiguration.get_Value() except: from G4AtlasApps.SimFlags import simFlags diff --git a/Simulation/SimulationJobOptions/share/specialConfig/preInclude.Qball.py b/Simulation/SimulationJobOptions/share/specialConfig/preInclude.Qball.py index 723fe396f295114a896be0ca6038b2869b8b457a..5b686b1ad2cf673707c0f7c731608f891c3f97bf 100644 --- a/Simulation/SimulationJobOptions/share/specialConfig/preInclude.Qball.py +++ b/Simulation/SimulationJobOptions/share/specialConfig/preInclude.Qball.py @@ -37,6 +37,8 @@ def load_files_for_qball_scenario(MASS, CHARGE): del BLINE1 del BLINE2 +assert "MASS" in simdict +assert "CHARGE" in simdict doG4SimConfig = True from AthenaCommon.AthenaCommonFlags import athenaCommonFlags import PyUtils.AthFile as af @@ -49,13 +51,14 @@ try: doG4SimConfig = False else: from G4AtlasApps.SimFlags import simFlags + if not "InteractingPDGCodes" in simFlags.specialConfiguration.get_Value(): + CODE=10000000+int(float(simdict["CHARGE"])*100) + simFlags.specialConfiguration.get_Value()['InteractingPDGCodes'] = str([CODE,-1*CODE]) simdict = simFlags.specialConfiguration.get_Value() except: from G4AtlasApps.SimFlags import simFlags simdict = simFlags.specialConfiguration.get_Value() -assert "MASS" in simdict -assert "CHARGE" in simdict load_files_for_qball_scenario(simdict["MASS"], simdict["CHARGE"]) if doG4SimConfig: diff --git a/TestBeam/TBCnv/src/ReadTBLArDigits.cxx b/TestBeam/TBCnv/src/ReadTBLArDigits.cxx index e17b71acc2a1d11cd8bfed8cb1674df9f3279f2a..551d6f9935ac79e07dcb0b561009a6bb340fff3e 100644 --- a/TestBeam/TBCnv/src/ReadTBLArDigits.cxx +++ b/TestBeam/TBCnv/src/ReadTBLArDigits.cxx @@ -6,7 +6,7 @@ #include "LArRawEvent/LArDigit.h" #include <vector> #include "GaudiKernel/IToolSvc.h" -#include "CaloIdentifier/CaloIdManager.h" +#include "CaloIdentifier/CaloCell_ID.h" ReadTBLArDigits::SortDigits::SortDigits(const LArOnlineID* onlineHelper) { @@ -37,28 +37,16 @@ ReadTBLArDigits::~ReadTBLArDigits() StatusCode ReadTBLArDigits::initialize() { MsgStream log(msgSvc(), name()); log << MSG::INFO << "Initialize" << endmsg; - const CaloIdManager *caloIdMgr=CaloIdManager::instance() ; - m_emId=caloIdMgr->getEM_ID(); - m_fcalId=caloIdMgr->getFCAL_ID(); - m_hecId=caloIdMgr->getHEC_ID(); - IToolSvc* toolSvc; - StatusCode sc=service( "ToolSvc",toolSvc ); - if (sc.isFailure()) { - log << MSG::ERROR << "Unable to retrieve ToolSvc" << endmsg; - return StatusCode::FAILURE; - } - sc=toolSvc->retrieveTool("LArCablingLegacyService",m_larCablingSvc); - if (sc.isFailure()) { - log << MSG::ERROR << "Unable to retrieve LArCablingService" << endmsg; - return StatusCode::FAILURE; - } + const CaloCell_ID* idHelper = nullptr; + ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_ID") ); + m_emId=idHelper->em_idHelper(); + m_fcalId=idHelper->fcal_idHelper(); + m_hecId=idHelper->hec_idHelper(); - sc = detStore()->retrieve(m_onlineHelper, "LArOnlineID"); - if (sc.isFailure()) { - log << MSG::ERROR << "Could not get LArOnlineID helper !" << endmsg; - return StatusCode::FAILURE; - } + ATH_CHECK( detStore()->retrieve(m_onlineHelper, "LArOnlineID") ); + + ATH_CHECK( toolSvc()->retrieveTool("LArCablingLegacyService",m_larCablingSvc) ); if (m_dumpFile.size()>0) m_outfile.open(m_dumpFile.c_str(),std::ios::out); @@ -79,80 +67,18 @@ StatusCode ReadTBLArDigits::initialize() return StatusCode::FAILURE; } - sc=nt->addItem("icell",m_cellIndex,0,3600); - if (sc!=StatusCode::SUCCESS) - {log << MSG::ERROR << "addItem 'Cell Index' failed" << endmsg; - return StatusCode::FAILURE; - } - - //sc=nt->addItem("layer",m_layer,0,4); - sc=nt->addItem("layer",m_cellIndex,m_layer); - if (sc!=StatusCode::SUCCESS) - {log << MSG::ERROR << "addItem 'Layer' failed" << endmsg; - return StatusCode::FAILURE; - } - - //sc=nt->addItem("ieta",m_eta,0,510); - sc=nt->addItem("ieta",m_cellIndex,m_eta); - if (sc!=StatusCode::SUCCESS) - {log << MSG::ERROR << "addItem 'Eta' failed" << endmsg; - return StatusCode::FAILURE; - } - - sc=nt->addItem("iphi",m_cellIndex,m_phi); - if (sc!=StatusCode::SUCCESS) - {log << MSG::ERROR << "addItem 'Phi' failed" << endmsg; - return StatusCode::FAILURE; - } - - sc=nt->addItem("barrel_ec",m_cellIndex,m_barrel_ec); - if (sc!=StatusCode::SUCCESS) - {log << MSG::ERROR << "addItem 'barrel_ec' failed" << endmsg; - return StatusCode::FAILURE; - } - - sc=nt->addItem("pos_neg",m_cellIndex,m_pos_neg); - if (sc!=StatusCode::SUCCESS) - {log << MSG::ERROR << "addItem 'pos_neg' failed" << endmsg; - return StatusCode::FAILURE; - } - - sc=nt->addItem("FT",m_cellIndex,m_FT); - if (sc!=StatusCode::SUCCESS) - {log << MSG::ERROR << "addItem 'FT' failed" << endmsg; - return StatusCode::FAILURE; - } - - sc=nt->addItem("slot",m_cellIndex,m_slot); - if (sc!=StatusCode::SUCCESS) - {log << MSG::ERROR << "addItem 'slot' failed" << endmsg; - return StatusCode::FAILURE; - } - - sc=nt->addItem("channel",m_cellIndex,m_channel); - if (sc!=StatusCode::SUCCESS) - {log << MSG::ERROR << "addItem 'channel' failed" << endmsg; - return StatusCode::FAILURE; - } - - sc=nt->addItem("gain",m_cellIndex,m_gain); - if (sc!=StatusCode::SUCCESS) - {log << MSG::ERROR << "addItem 'Gain' failed" << endmsg; - return StatusCode::FAILURE; - } - - sc=nt->addItem("NSamples",m_Nsamples,0,32); - if (sc!=StatusCode::SUCCESS) { - log << MSG::ERROR << "addItem 'sampleIndex' failed" << endmsg; - return StatusCode::FAILURE; - } - - sc=nt->addItem("Samples",m_cellIndex,m_samples,32); - //sc=nt->addItem("Samples",m_cellIndex,m_samples,m_Nsamples); - if (sc!=StatusCode::SUCCESS) { - log << MSG::ERROR << "addItem failed" << endmsg; - return StatusCode::FAILURE; - } + ATH_CHECK( nt->addItem("icell",m_cellIndex,0,3600) ); + ATH_CHECK( nt->addItem("layer",m_cellIndex,m_layer) ); + ATH_CHECK( nt->addItem("ieta",m_cellIndex,m_eta) ); + ATH_CHECK( nt->addItem("iphi",m_cellIndex,m_phi) ); + ATH_CHECK( nt->addItem("barrel_ec",m_cellIndex,m_barrel_ec) ); + ATH_CHECK( nt->addItem("pos_neg",m_cellIndex,m_pos_neg) ); + ATH_CHECK( nt->addItem("FT",m_cellIndex,m_FT) ); + ATH_CHECK( nt->addItem("slot",m_cellIndex,m_slot) ); + ATH_CHECK( nt->addItem("channel",m_cellIndex,m_channel) ); + ATH_CHECK( nt->addItem("gain",m_cellIndex,m_gain) ); + ATH_CHECK( nt->addItem("NSamples",m_Nsamples,0,32) ); + ATH_CHECK( nt->addItem("Samples",m_cellIndex,m_samples,32) ); m_ntuplePtr=nt; m_count=0; diff --git a/TestBeam/TBMonitoring/src/TBCaloResponseMonTool.cxx b/TestBeam/TBMonitoring/src/TBCaloResponseMonTool.cxx index f9ad09ab611e3ff53ab5ec58980a2704bcc8cb35..9159b89f6abb72ab0520fe0747a2ab04f06edf6a 100755 --- a/TestBeam/TBMonitoring/src/TBCaloResponseMonTool.cxx +++ b/TestBeam/TBMonitoring/src/TBCaloResponseMonTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ @@ -17,7 +17,6 @@ #include "StoreGate/StoreGateSvc.h" #include "CaloIdentifier/CaloCell_ID.h" -#include "CaloIdentifier/CaloIdManager.h" #include "CaloEvent/CaloCell.h" #include "CaloEvent/CaloCellContainer.h" @@ -308,27 +307,8 @@ StatusCode TBCaloResponseMonTool::setupAction() // messaging MsgStream report(msgSvc(),name()); - // get calo cell helper - const CaloIdManager* idManager = CaloIdManager::instance(); - // problem - if ( idManager == 0 ) - { - report << MSG::ERROR - << "cannot allocate CaloCell Id manager object" - << endmsg; - return StatusCode::FAILURE; - } - // get cell id helper - m_caloCellHelper = idManager->getCaloCell_ID(); - // check - if ( m_caloCellHelper == 0 ) - { - report << MSG::ERROR - << "cannot allocate CaloCell_ID helper" - << endmsg; - return StatusCode::FAILURE; - } + ATH_CHECK( detStore()->retrieve (m_caloCellHelper, "CaloCell_ID") ); // get calorimeter modules and regions std::vector<std::string>::const_iterator firstCalo = diff --git a/TestBeam/TBMonitoring/src/TBPhaseMonTool.cxx b/TestBeam/TBMonitoring/src/TBPhaseMonTool.cxx index 1b80dbb5fb3396236c287075d0ff965356e079b3..932961a965eb7be8810ae9e975b99dffe267494b 100644 --- a/TestBeam/TBMonitoring/src/TBPhaseMonTool.cxx +++ b/TestBeam/TBMonitoring/src/TBPhaseMonTool.cxx @@ -22,7 +22,6 @@ #include "CaloEvent/CaloCellContainer.h" #include "CaloIdentifier/CaloCell_ID.h" -#include "CaloIdentifier/CaloIdManager.h" // #include "CaloUtils/CaloSamplingHelper.h" diff --git a/TestBeam/TBRec/src/CBNT_CaloH6.cxx b/TestBeam/TBRec/src/CBNT_CaloH6.cxx index 1429de8253d324f421c85706df03d294253ca3e6..a575bfdf20a4b5ef7d600e3e9d80c74057ffe51e 100644 --- a/TestBeam/TBRec/src/CBNT_CaloH6.cxx +++ b/TestBeam/TBRec/src/CBNT_CaloH6.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ //##################################################### @@ -16,13 +16,8 @@ #include "CaloIdentifier/CaloCell_ID.h" #include "CaloEvent/CaloCellContainer.h" - -//#include "CaloUtils/ICaloNoiseTool.h" #include "CaloInterface/ICaloNoiseTool.h" -#include "CaloIdentifier/CaloIdManager.h" -// #include "CaloDetDescr/CaloDetDescrManager.h" - #include "Identifier/Identifier.h" @@ -66,22 +61,22 @@ StatusCode CBNT_CaloH6::CBNT_initialize() // return sc; // } - //obtainine Identifier helpers - // m_hecID_help = m_larMgr->get_hec_id(); - m_hecID_help = CaloIdManager::instance()->getHEC_ID(); + // Identifier helpers + const CaloCell_ID* idHelper = nullptr; + ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_ID") ); + m_hecID_help = idHelper->hec_idHelper(); if (!m_hecID_help) { ATH_MSG_ERROR ( "unable to obtain hec id " ); return StatusCode::FAILURE; } - // m_emecID_help = m_larMgr->get_em_id(); - m_emecID_help = CaloIdManager::instance()->getEM_ID(); + + m_emecID_help = idHelper->em_idHelper(); if (!m_emecID_help) { ATH_MSG_ERROR ( "unable to obtain emec id " ); return StatusCode::FAILURE; } - // m_fcalID_help = m_larMgr->get_fcal_id(); - m_fcalID_help = CaloIdManager::instance()->getFCAL_ID(); + m_fcalID_help = idHelper->fcal_idHelper(); if (!m_fcalID_help) { ATH_MSG_ERROR ( "unable to obtain fcal id " ); return StatusCode::FAILURE; diff --git a/TestBeam/TBRec/src/CBNT_TBRecBase.cxx b/TestBeam/TBRec/src/CBNT_TBRecBase.cxx index feecf4e6ebde9b0219322b56081dc06a9b793fc4..30dcb2cd63ca782db5d03857dcf1e483e1a8594f 100644 --- a/TestBeam/TBRec/src/CBNT_TBRecBase.cxx +++ b/TestBeam/TBRec/src/CBNT_TBRecBase.cxx @@ -5,7 +5,7 @@ #include "CBNT_TBRecBase.h" #include "LArIdentifier/LArOnlineID.h" -#include "CaloIdentifier/CaloIdManager.h" +#include "CaloIdentifier/CaloCell_ID.h" #include "GaudiKernel/ITHistSvc.h" @@ -30,10 +30,11 @@ StatusCode CBNT_TBRecBase::initialize() { return sc; } - const CaloIdManager *caloIdMgr=CaloIdManager::instance() ; - m_emId=caloIdMgr->getEM_ID(); - m_fcalId=caloIdMgr->getFCAL_ID(); - m_hecId=caloIdMgr->getHEC_ID(); + const CaloCell_ID* idHelper = nullptr; + ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_ID") ); + m_emId=idHelper->em_idHelper(); + m_fcalId=idHelper->fcal_idHelper(); + m_hecId=idHelper->hec_idHelper(); if (!m_emId) { diff --git a/TestBeam/TBRec/src/CBNT_Timing.cxx b/TestBeam/TBRec/src/CBNT_Timing.cxx index 7f97df4ae5fdaba914394dc02839c7404011c98b..439e7572b11f5101a113881568d233760db0263a 100644 --- a/TestBeam/TBRec/src/CBNT_Timing.cxx +++ b/TestBeam/TBRec/src/CBNT_Timing.cxx @@ -9,7 +9,7 @@ #include "CaloEvent/CaloCell.h" #include "CaloEvent/CaloCellContainer.h" -#include "CaloIdentifier/CaloIdManager.h" +#include "CaloIdentifier/CaloCell_ID.h" #include "LArIdentifier/LArOnlineID.h" #include "TBEvent/TBScintillatorCont.h" @@ -64,8 +64,9 @@ StatusCode CBNT_Timing::CBNT_initialize() { ATH_MSG_DEBUG ( "CBNT_Timing in initialize()" ); - const CaloIdManager *caloIdMgr=CaloIdManager::instance() ; - m_emId=caloIdMgr->getEM_ID(); + const CaloCell_ID* idHelper = nullptr; + ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_ID") ); + m_emId=idHelper->em_idHelper(); ATH_CHECK( m_cablingKey.initialize() ); ATH_CHECK( detStore()->retrieve(m_onlineHelper, "LArOnlineID") ); diff --git a/TestBeam/TBRec/src/TBBeamQualityEMFractionTool.cxx b/TestBeam/TBRec/src/TBBeamQualityEMFractionTool.cxx index 88d4fb110275e7bffd8aabaac356b5de0cfbf104..d58d3aa42ebafd837df9c004bd165f93db5038f0 100644 --- a/TestBeam/TBRec/src/TBBeamQualityEMFractionTool.cxx +++ b/TestBeam/TBRec/src/TBBeamQualityEMFractionTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ //##################################################### @@ -25,7 +25,6 @@ TBBeamQualityEMFractionTool::TBBeamQualityEMFractionTool(const std::string& name : TBBeamQualityTool(name,type,parent), m_StoreGate(nullptr), m_detStore(nullptr), - m_caloMgr(nullptr), m_emecID_help(nullptr), m_hecID_help(nullptr), m_fcalID_help(nullptr), @@ -99,26 +98,22 @@ StatusCode TBBeamQualityEMFractionTool::initializeTool() // retrieve detector description manager for LAr subsystem - const DataHandle<CaloIdManager> m_caloMgr; - sc = m_detStore->retrieve(m_caloMgr); - if (sc.isFailure()) { - log << MSG::ERROR << "unable to retrieve CaloIdManager from detector store"<< endmsg; - return sc; - } + const CaloCell_ID* idHelper = nullptr; + ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_ID") ); //obtainine Identifier helpers - m_hecID_help = m_caloMgr->getHEC_ID(); + m_hecID_help = idHelper->hec_idHelper(); if (!m_hecID_help) { log << MSG::ERROR << "unable to obtain hec id " << endmsg; return StatusCode::FAILURE; } - m_emecID_help = m_caloMgr->getEM_ID(); + m_emecID_help = idHelper->em_idHelper(); if (!m_emecID_help) { log << MSG::ERROR << "unable to obtain emec id " << endmsg; return StatusCode::FAILURE; } - m_fcalID_help = m_caloMgr->getFCAL_ID(); + m_fcalID_help = idHelper->fcal_idHelper(); if (!m_fcalID_help) { log << MSG::ERROR << "unable to obtain fcal id " << endmsg; return StatusCode::FAILURE; diff --git a/TestBeam/TBRec/src/TBBeamQualityEMFractionTool.h b/TestBeam/TBRec/src/TBBeamQualityEMFractionTool.h index 27c67b0191e661cf880c2e8c41f5500128831f31..9b06e9242cb4c8cceb8ae57974e75625d587dd5b 100644 --- a/TestBeam/TBRec/src/TBBeamQualityEMFractionTool.h +++ b/TestBeam/TBRec/src/TBBeamQualityEMFractionTool.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ //##################################################### @@ -20,7 +20,6 @@ //#include "LArDetDescr/LArDetDescrManager.h" #include "CaloIdentifier/CaloID.h" -#include "CaloIdentifier/CaloIdManager.h" class TBBeamQualityEMFractionTool : public TBBeamQualityTool { @@ -42,8 +41,6 @@ class TBBeamQualityEMFractionTool : public TBBeamQualityTool //LArDetDescrManager* m_larMgr; - CaloIdManager* m_caloMgr; - // Identifier Pointers const LArEM_ID* m_emecID_help; const LArHEC_ID* m_hecID_help; diff --git a/TestBeam/TBRec/src/TBECLArRawChannelBuilder.cxx b/TestBeam/TBRec/src/TBECLArRawChannelBuilder.cxx index 9d878dbaac4a2a5d6cf2dc10bb61ce56c3e125bb..4ac9cf8ce191547fe1f3d520dcf60f210bad4172 100644 --- a/TestBeam/TBRec/src/TBECLArRawChannelBuilder.cxx +++ b/TestBeam/TBRec/src/TBECLArRawChannelBuilder.cxx @@ -111,7 +111,7 @@ StatusCode TBECLArRawChannelBuilder::initialize(){ ATH_CHECK( m_adc2mevTool.retrieve() ); } else { // pointer to detector manager: - m_calo_dd_man = CaloDetDescrManager::instance(); + ATH_CHECK( detStore()->retrieve (m_calo_dd_man, "CaloMgr") ); m_calo_id = m_calo_dd_man->getCaloCell_ID(); for (int i=0; i<30; i++) { m_adc2mev[i] = 0; @@ -126,13 +126,8 @@ StatusCode TBECLArRawChannelBuilder::initialize(){ } // *** - - const CaloIdManager *caloIdMgr=CaloIdManager::instance() ; - m_emId=caloIdMgr->getEM_ID(); - if (!m_emId) { - ATH_MSG_ERROR ( "Could not get lar EM ID helper" ); - return StatusCode::FAILURE; - } + + m_emId=m_calo_id->em_idHelper(); // translate offline ID into online ID ATH_CHECK( m_cablingKey.initialize() ); diff --git a/TestBeam/TBRec/src/TBECLArRawChannelBuilder.h b/TestBeam/TBRec/src/TBECLArRawChannelBuilder.h index 67a28d003b0abd51ef71eea144891fb5efcd7bf9..71af529c7844be2bef52effe6b2f77944f5e4b70 100644 --- a/TestBeam/TBRec/src/TBECLArRawChannelBuilder.h +++ b/TestBeam/TBRec/src/TBECLArRawChannelBuilder.h @@ -20,7 +20,7 @@ #include "LArIdentifier/LArOnlineID.h" -#include "CaloIdentifier/CaloIdManager.h" +#include "CaloIdentifier/CaloCell_ID.h" #include "StoreGate/ReadCondHandle.h" #include "LArCabling/LArOnOffIdMapping.h" #include "LArElecCalib/ILArHVScaleCorr.h" diff --git a/TestBeam/TBRec/src/TBLArRawChannelBuilder.cxx b/TestBeam/TBRec/src/TBLArRawChannelBuilder.cxx index c0fd74b537a865aeffde990d75b993077f285314..7411105fa6a5cea50e63b9bd6a22dbc31845918a 100644 --- a/TestBeam/TBRec/src/TBLArRawChannelBuilder.cxx +++ b/TestBeam/TBRec/src/TBLArRawChannelBuilder.cxx @@ -50,10 +50,12 @@ StatusCode TBLArRawChannelBuilder::initialize(){ return StatusCode::FAILURE; } - const CaloIdManager *caloIdMgr=CaloIdManager::instance() ; - m_emId=caloIdMgr->getEM_ID(); - m_fcalId=caloIdMgr->getFCAL_ID(); - m_hecId=caloIdMgr->getHEC_ID(); + + const CaloCell_ID* caloId = nullptr; + ATH_CHECK( detStore()->retrieve (caloId, "CaloCell_ID") ); + m_emId=caloId->em_idHelper(); + m_fcalId=caloId->fcal_idHelper(); + m_hecId=caloId->hec_idHelper(); ATH_CHECK( m_cablingKey.initialize() ); diff --git a/TestBeam/TBRec/src/TBLArRawChannelBuilder.h b/TestBeam/TBRec/src/TBLArRawChannelBuilder.h index db994c499ed25029adf6fce13ea65d5ccd37e980..142ba5d5ddfaf503e6ad630f3537860964a670d1 100644 --- a/TestBeam/TBRec/src/TBLArRawChannelBuilder.h +++ b/TestBeam/TBRec/src/TBLArRawChannelBuilder.h @@ -14,7 +14,7 @@ #include "LArRawEvent/LArRawChannelContainer.h" #include "LArCabling/LArOnOffIdMapping.h" -#include "CaloIdentifier/CaloIdManager.h" +#include "CaloIdentifier/CaloCell_ID.h" #include "CaloIdentifier/LArEM_ID.h" #include "CaloIdentifier/LArFCAL_ID.h" #include "CaloIdentifier/LArHEC_ID.h" diff --git a/TestBeam/TBRec/src/TBTree_CaloClusterH6.cxx b/TestBeam/TBRec/src/TBTree_CaloClusterH6.cxx index 6a0e92d734e3537ac3695263191ec45b7b7c973f..762cd037dcbc605c6a8c6581803f88c5e5c0f791 100644 --- a/TestBeam/TBRec/src/TBTree_CaloClusterH6.cxx +++ b/TestBeam/TBRec/src/TBTree_CaloClusterH6.cxx @@ -20,7 +20,6 @@ #include "CaloDetDescr/CaloDetDescrManager.h" #include "CaloIdentifier/CaloCell_ID.h" -#include "CaloIdentifier/CaloIdManager.h" #include "CaloIdentifier/CaloGain.h" #include "CaloGeoHelpers/CaloSampling.h" #include "CaloEvent/CaloCell.h" diff --git a/TestBeam/TBRec/src/TBXMLCaloCellWriterTool.cxx b/TestBeam/TBRec/src/TBXMLCaloCellWriterTool.cxx index 6c584eecfb5ff8d1a93fd347004fffa91e9e722d..f713b71d9af5bd9e26c9e04910fd0ed8054f4b4e 100644 --- a/TestBeam/TBRec/src/TBXMLCaloCellWriterTool.cxx +++ b/TestBeam/TBRec/src/TBXMLCaloCellWriterTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ @@ -17,7 +17,6 @@ #include "CaloDetDescr/CaloDetDescrManager.h" #include "CaloDetDescr/CaloDetDescrElement.h" -#include "CaloIdentifier/CaloIdManager.h" #include "CaloIdentifier/CaloCell_ID.h" #include "CaloGeoHelpers/CaloSampling.h" @@ -323,7 +322,8 @@ TBXMLCaloCellWriterTool::writeRunFiles(const std::string& fileDir, // Write Run Geometry // //////////////////////// - const CaloDetDescrManager* caloDetMgr = CaloDetDescrManager::instance(); + const CaloDetDescrManager* caloDetMgr = nullptr; + ATH_CHECK( detStore()->retrieve (caloDetMgr, "CaloMgr") ); IdentifierHash firstIndex, lastIndex, safeIndex; m_idHelper->calo_cell_hash_range((int)CaloCell_ID::LARFCAL, @@ -431,14 +431,7 @@ TBXMLCaloCellWriterTool::convertProperties() MsgStream log(msgSvc(),name()); // get calo id helper - m_idHelper = CaloIdManager::instance()->getCaloCell_ID(); - if ( m_idHelper == 0 ) - { - log << MSG::ERROR - << "cannot allocate CaloCell_ID helper!" - << endmsg; - return StatusCode::FAILURE; - } + ATH_CHECK( detStore()->retrieve (m_idHelper, "CaloCell_ID") ); ////////////////////// // Get Calo Indices // diff --git a/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileCisDefaultCalibTool.h b/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileCisDefaultCalibTool.h index d6552cf73d9137cbe772f0796410c2cd030d4b40..11052fd715bcbe971367c7b3573d6f76d812e17b 100644 --- a/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileCisDefaultCalibTool.h +++ b/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileCisDefaultCalibTool.h @@ -21,6 +21,7 @@ #include "TileEvent/TileRawChannelContainer.h" #include "TileEvent/TileDigitsContainer.h" #include "TileCalibBlobObjs/TileCalibUtils.h" +#include "TileMonitoring/ITileStuckBitsProbsTool.h" #include "TString.h" @@ -37,7 +38,6 @@ class TileCablingSvc; class TFile; class TileRawChannelContainer; class TMap; -class ITileStuckBitsProbsTool; class TileCisDefaultCalibTool: public AthAlgTool , virtual public ITileCalibTool { @@ -92,9 +92,10 @@ class TileCisDefaultCalibTool: public AthAlgTool const TileHWID* m_tileHWID; const TileCablingService* m_cabling; ServiceHandle<TileCablingSvc> m_cablingSvc; - ToolHandle<ITileStuckBitsProbsTool> m_stuckBitsProbs; - SG::ReadHandleKey<TileDQstatus> m_dqStatusKey; + ToolHandle<ITileStuckBitsProbsTool> m_stuckBitsProbs{this, + "StuckBitsProbsTool","","Tile stuck bits probabilities tool"}; + SG::ReadHandleKey<TileDQstatus> m_dqStatusKey; SG::ReadHandleKey<TileDigitsContainer> m_digitsContainerKey{this, "TileDigitsContainer", "TileDigitsCnt", "Tile digits container"}; SG::ReadHandleKey<TileRawChannelContainer> m_rawChannelContainerKey{this, diff --git a/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileDigiNoiseCalibAlg.h b/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileDigiNoiseCalibAlg.h index 578c8e39092fa679a727fb03c8a4aa0ae898d862..abd64064d1fe712014e08e07dd73251e8134900d 100644 --- a/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileDigiNoiseCalibAlg.h +++ b/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileDigiNoiseCalibAlg.h @@ -28,6 +28,7 @@ #include "TileEvent/TileDQstatus.h" #include "TileEvent/TileDigitsContainer.h" #include "TileCalibBlobObjs/TileCalibUtils.h" +#include "TileRecUtils/TileRawChannelBuilderFlatFilter.h" #include <cmath> #include <vector> @@ -40,7 +41,6 @@ // Forward declaration class TileHWID; class TileBeamElemContByteStreamCnv; -class TileRawChannelBuilderFlatFilter; class TileOFCorrelation; class TileDigiNoiseCalibAlg: public AthAlgorithm { @@ -94,7 +94,8 @@ class TileDigiNoiseCalibAlg: public AthAlgorithm { "EventInfo", "EventInfo", "EventInfo key"}; // Tools / storegate info - ToolHandle<TileRawChannelBuilderFlatFilter> m_adderFilterAlgTool; + ToolHandle<TileRawChannelBuilderFlatFilter> m_adderFilterAlgTool{this, + "TileAdderFlatFilter","TileRawChannelBuilderFlatFilter/TileAdderFlatFilter","Tile adder flat filter"}; TileBeamElemContByteStreamCnv* m_beamCnv; const TileCablingService* m_cabling; TileOFCorrelation* m_tileOFCorrelation; diff --git a/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileExpertDump.h b/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileExpertDump.h index 97362699bf6013b3614f0257f13e1e833b4501d4..8f0a9f65da3fcb067b39c8a7c8e0c218dd419be4 100755 --- a/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileExpertDump.h +++ b/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileExpertDump.h @@ -24,8 +24,8 @@ #include "StoreGate/ReadHandleKey.h" #include "TileIdentifier/TileEmscaleCalibOptions.h" +#include "TileConditions/TileExpertToolEmscale.h" -class TileExpertToolEmscale; class TileHWID; /** @@ -69,7 +69,8 @@ class TileExpertDump: public AthAlgorithm { "EventInfo", "EventInfo", "EventInfo key"}; //=== non-property members - ToolHandle<TileExpertToolEmscale> m_tileExpertToolEmscale; + ToolHandle<TileExpertToolEmscale> m_tileExpertToolEmscale{this, + "TileExpertToolEmscale","TileExpertToolEmscale", "Tile expert tool em scale"}; const TileHWID* m_tileHWID; }; diff --git a/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileInfoDump.h b/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileInfoDump.h index cf9c19f4601b1d61ee4c7e19751e5ab040cbdc8e..9fa334b64d475ee161ff6f46bc08839abfe9774c 100755 --- a/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileInfoDump.h +++ b/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileInfoDump.h @@ -22,18 +22,18 @@ #include "AthenaBaseComps/AthAlgorithm.h" #include "xAODEventInfo/EventInfo.h" #include "StoreGate/ReadHandleKey.h" +#include "TileConditions/ITileBadChanTool.h" +#include "TileConditions/TileCondToolEmscale.h" +#include "TileConditions/TileCondToolIntegrator.h" +#include "TileConditions/TileCondToolTiming.h" +#include "TileConditions/TileCondToolPulseShape.h" +#include "TileConditions/TileCondToolNoiseSample.h" +#include "TileConditions/TileCondToolNoiseRawChn.h" +#include "TileConditions/TileCondToolOfcCool.h" +#include "TileConditions/TileCondToolMuID.h" +#include "TileConditions/TileCondToolAutoCr.h" + -class ITileBadChanTool; -class TileCondToolEmscale; -class TileCondToolIntegrator; -class TileCondToolTiming; -class TileCondToolPulseShape; -class TileCondToolNoiseSample; -class TileCondToolNoiseRawChn; -class TileCondToolOfcCool; -class TileCondToolMuID; - -class TileCondToolAutoCr; class ITHistSvc; class TileHWID; class TileID; @@ -97,16 +97,26 @@ class TileInfoDump: public AthAlgorithm { "EventInfo", "EventInfo", "EventInfo key"}; //=== Non-property members - ToolHandle<ITileBadChanTool> m_tileBadChanTool; - ToolHandle<TileCondToolEmscale> m_tileToolEmscale; - ToolHandle<TileCondToolIntegrator> m_tileToolIntegrator; - ToolHandle<TileCondToolTiming> m_tileToolTiming; - ToolHandle<TileCondToolPulseShape> m_tileToolPulseShape; - ToolHandle<TileCondToolNoiseSample> m_tileToolNoiseSample; - ToolHandle<TileCondToolAutoCr> m_tileToolAutoCr; - ToolHandle<TileCondToolNoiseRawChn> m_tileToolNoiseRawChn; - ToolHandle<TileCondToolOfcCool> m_tileToolOfcCool; - ToolHandle<TileCondToolMuID> m_tileToolMuID; + ToolHandle<ITileBadChanTool> m_tileBadChanTool{this, + "TileBadChanTool", "TileBadChanTool", "Tile bad channel tool"}; + ToolHandle<TileCondToolEmscale> m_tileToolEmscale{this, + "TileCondToolEmscale", "TileCondToolEmscale", "Tile em scale tool"}; + ToolHandle<TileCondToolIntegrator> m_tileToolIntegrator{this, + "TileCondToolIntegrator", "TileCondToolIntegrator", "Tile integrator tool"}; + ToolHandle<TileCondToolTiming> m_tileToolTiming{this, + "TileCondToolTiming", "TileCondToolTiming", "Tile timing tool"}; + ToolHandle<TileCondToolPulseShape> m_tileToolPulseShape{this, + "TileCondToolPulseShape", "TileCondToolPulseShape", "Tile pulse shape tool"}; + ToolHandle<TileCondToolNoiseSample> m_tileToolNoiseSample{this, + "TileCondToolNoiseSample", "TileCondToolNoiseSample", "Tile noise sample tool"}; + ToolHandle<TileCondToolAutoCr> m_tileToolAutoCr{this, + "TileCondToolAutoCr", "TileCondToolAutoCr", "Tile auto cr tool"}; + ToolHandle<TileCondToolNoiseRawChn> m_tileToolNoiseRawChn{this, + "TileCondToolNoiseRawChn", "TileCondToolNoiseRawChn", "Tile raw channel noise tool"}; + ToolHandle<TileCondToolOfcCool> m_tileToolOfcCool{this, + "TileCondToolOfcCool", "TileCondToolOfcCool", "Tile OfcCool tool"}; + ToolHandle<TileCondToolMuID> m_tileToolMuID{this, + "TileCondToolMuID", "TileCondToolMuID", "Tile MuID tool"}; //=== a handle on the Hist/TTree registration service ITHistSvc* m_thistSvc; diff --git a/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileLaserCalibAlg.h b/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileLaserCalibAlg.h index 343dbe32d2a96baa1b224ae9408295ce0234faab..5185e3e770547e0a219bf06f4f8da3103f679845 100644 --- a/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileLaserCalibAlg.h +++ b/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileLaserCalibAlg.h @@ -12,10 +12,11 @@ // Athena includes #include "AthenaBaseComps/AthAlgorithm.h" +#include "TileCalibAlgs/ITileCalibTool.h" + #include <string> class TFile; -class ITileCalibTool; class IROBDataProviderSvc; class TileLaserCalibAlg: public AthAlgorithm { @@ -23,17 +24,18 @@ class TileLaserCalibAlg: public AthAlgorithm { TileLaserCalibAlg(const std::string& name, ISvcLocator* pSvcLocator); virtual ~TileLaserCalibAlg(); - typedef ToolHandleArray<ITileCalibTool> lastools_t; - // Functions StatusCode initialize(); StatusCode execute(); StatusCode finalize(); - lastools_t m_lasTools; - private: + typedef ToolHandleArray<ITileCalibTool> lastools_t; + + lastools_t m_lasTools{this, + "Tools",{},"Tile laser calibration tools"}; + ServiceHandle<IROBDataProviderSvc> m_RobSvc; // jobOptions diff --git a/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileLaserDefaultCalibTool.h b/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileLaserDefaultCalibTool.h index ef156d3aa8e507cbd50cc8a4d95eb08362668958..a005d5f418ce1ebd7ceae2f563dd55a670d4a223 100644 --- a/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileLaserDefaultCalibTool.h +++ b/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileLaserDefaultCalibTool.h @@ -3,8 +3,7 @@ */ #ifndef TILECALIBALG_TILELASERDEFAULTCALIBTOOL_H -#define TILECALIBALG_TILELASERDEFAULTCALIBTOOL_H - +#define TILECALIBALG_TILELASERDEFAULTCALIBTOOL_H // Tile includes #include "TileCalibAlgs/ITileCalibTool.h" @@ -15,6 +14,9 @@ #include "TileConditions/ITileDCSTool.h" #include "TileEvent/TileRawChannelContainer.h" #include "TileEvent/TileLaserObject.h" +#include "TileConditions/ITileBadChanTool.h" +#include "TileMonitoring/ITileStuckBitsProbsTool.h" + // Athena includes #include "AthenaBaseComps/AthAlgTool.h" @@ -44,7 +46,6 @@ class TileLaserObject; class TileHWID; class TFile; class RunningStat; -class ITileStuckBitsProbsTool; class TileLaserDefaultCalibTool : public AthAlgTool, virtual public ITileCalibTool { @@ -73,11 +74,14 @@ class TileLaserDefaultCalibTool : public AthAlgTool, virtual public ITileCalibTo const TileHWID* m_tileHWID; const TileCablingService* m_cabling; - ToolHandle<TileCondToolEmscale> m_tileToolEmscale; - ToolHandle<ITileBadChanTool> m_tileBadChanTool; - ToolHandle<ITileStuckBitsProbsTool> m_stuckBitsProbs; - SG::ReadHandleKey<TileDQstatus> m_dqStatusKey; + ToolHandle<TileCondToolEmscale> m_tileToolEmscale{this, + "TileCondToolEmscale", "TileCondToolEmscale", "Tile em scale tool"}; + ToolHandle<ITileBadChanTool> m_tileBadChanTool{this, + "TileBadChanTool", "TileBadChanTool", "Tile bad channel tool"}; + ToolHandle<ITileStuckBitsProbsTool> m_stuckBitsProbs{this, + "StuckBitsProbsTool", "", "Tile stuck bits probabilities tool"}; + SG::ReadHandleKey<TileDQstatus> m_dqStatusKey; SG::ReadHandleKey<TileRawChannelContainer> m_rawChannelContainerKey{this, "TileRawChannelContainer", "TileRawChannelOpt2", "Tile raw channel container"}; SG::ReadHandleKey<TileLaserObject> m_laserContainerKey{this, diff --git a/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileLaserLinearityCalibTool.h b/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileLaserLinearityCalibTool.h index 90407429da322ed637fd349d5b5d672de760e6cb..d4838546ae17eaa66a5f967c2e0f936467b4dfde 100644 --- a/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileLaserLinearityCalibTool.h +++ b/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileLaserLinearityCalibTool.h @@ -68,7 +68,8 @@ class TileLaserLinearityCalibTool : public AthAlgTool, virtual public ITileCalib const TileHWID* m_tileHWID; const TileCablingService* m_cabling; - ToolHandle<TileCondToolEmscale> m_tileToolEmscale; + ToolHandle<TileCondToolEmscale> m_tileToolEmscale{this, + "TileCondToolEmscale", "TileCondToolEmscale", "Tile em scale tool"}; // Parameter which will end up in the ROOTuple // diff --git a/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileLaserTimingTool.h b/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileLaserTimingTool.h index f5dfff9eeb44ef33534b8cb892feb4b310ccf99c..8504c2253abe70fb5b4afac538a12ee406f9fd66 100644 --- a/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileLaserTimingTool.h +++ b/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileLaserTimingTool.h @@ -256,7 +256,8 @@ class TileLaserTimingTool: public AthAlgTool, virtual public ITileCalibTool { // Tools info const TileHWID* m_tileHWID; const TileCablingService* m_cabling; - ToolHandle<TileCondToolTiming> m_tileToolTiming; + ToolHandle<TileCondToolTiming> m_tileToolTiming{this, + "TileCondToolTiming", "TileCondToolTiming", "Tile timing tool"}; // jobOptions std::string m_rawChannelContainerName; diff --git a/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileMuId2DBAlg.h b/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileMuId2DBAlg.h index e5db1ef4eb18329ea8fd75be8616e774a32b8264..c93412d8159f9c2405bec2115a78ed93888a0a9f 100644 --- a/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileMuId2DBAlg.h +++ b/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileMuId2DBAlg.h @@ -46,7 +46,8 @@ class TileMuId2DBAlg: public AthAlgorithm { const DataHandle<CaloIdManager> m_caloIdMgr; const DataHandle<CaloDetDescrManager> m_calodetdescrmgr; - ToolHandle<ICaloNoiseTool> m_noiseTool; + PublicToolHandle<ICaloNoiseTool> m_noiseTool{this, + "noiseTool", "CaloNoiseToolDB/calonoisetooldb", "Calo noise tool"}; //float m_eta; //float m_phi; diff --git a/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileOFC2DBAlg.h b/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileOFC2DBAlg.h index d778bc647fea40ead9450b7f8d50c8eb658a6b90..321f04437ddf3f23868de3e8d35618f912bad196 100755 --- a/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileOFC2DBAlg.h +++ b/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileOFC2DBAlg.h @@ -28,9 +28,6 @@ #include "TileConditions/ITileCondToolOfc.h" #include "TileConditions/TileCondToolTiming.h" -#define N_FIXED_PHASES 100 -#define PHASE_STEP 0.5 - class IIOVRegistrationSvc; class TileOFC2DBAlg: public AthAlgorithm { @@ -63,8 +60,10 @@ class TileOFC2DBAlg: public AthAlgorithm { //=== non-property members IIOVRegistrationSvc* m_regSvc; - ToolHandle<TileCondToolTiming> m_tileToolTiming; - ToolHandle<ITileCondToolOfc> m_tileCondToolOfc; + ToolHandle<TileCondToolTiming> m_tileToolTiming{this, + "TileCondToolTiming", "TileCondToolTiming", "Tile timing tool"}; + ToolHandle<ITileCondToolOfc> m_tileCondToolOfc{this, + "TileCondToolOfc", "TileCondToolOfc", "Tile OFC tool"}; //=== store all folders to be registered std::set<std::string> m_folders; diff --git a/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileRawChNoiseCalibAlg.h b/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileRawChNoiseCalibAlg.h index 963fbea9e4dbbd51f2e7080633379f800f13b8ab..fd5e292e95b49d092cf8e93638269b7c1fc0d120 100644 --- a/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileRawChNoiseCalibAlg.h +++ b/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileRawChNoiseCalibAlg.h @@ -117,10 +117,13 @@ class TileRawChNoiseCalibAlg: public AthAlgorithm { // Identifiers const TileID* m_tileID; const TileHWID* m_tileHWID; - ToolHandle<TileCondToolEmscale> m_tileToolEmscale; - ToolHandle<ITileBadChanTool> m_tileBadChanTool; + ToolHandle<TileCondToolEmscale> m_tileToolEmscale{this, + "TileCondToolEmscale", "TileCondToolEmscale", "Tile em scale tool"}; + ToolHandle<ITileBadChanTool> m_tileBadChanTool{this, + "TileBadChanTool", "TileBadChanTool", "Tile bad channel tool"}; SG::ReadHandleKey<TileDQstatus> m_dqStatusKey; - ToolHandle<TileCondIdTransforms> m_tileIdTrans; + ToolHandle<TileCondIdTransforms> m_tileIdTrans{this, + "TileCondIdTransforms", "TileCondIdTransforms", "Tile Id transforms tool"}; const uint32_t* m_cispar; SG::ReadHandleKey<xAOD::EventInfo> m_eventInfoKey{this, diff --git a/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileTopCalibAlg.h b/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileTopCalibAlg.h index 639c7580b2a84d04cf718129314cd283e17fee51..002805b92df496302ea6357b0773fb86dcf971f0 100644 --- a/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileTopCalibAlg.h +++ b/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileTopCalibAlg.h @@ -53,7 +53,8 @@ class TileTopCalibAlg : public AthAlgorithm /** * Vector of algtools to call */ - ToolHandleArray<ITileCalibTool> m_tileCalibToolList; + ToolHandleArray<ITileCalibTool> m_tileCalibToolList{this, + "TileCalibTools", {}, "Tile calib tools"}; /** * Pointer to the ROOT file diff --git a/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileTriggerDefaultCalibTool.h b/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileTriggerDefaultCalibTool.h index 475336635140e1e4453f14a29bef1f9692a060cc..a1d881a47fd9b5460bd403389e3f5e233e5e38ac 100644 --- a/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileTriggerDefaultCalibTool.h +++ b/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileTriggerDefaultCalibTool.h @@ -15,12 +15,12 @@ #include "TileEvent/TileDQstatus.h" #include "TileEvent/TileRawChannelContainer.h" #include "TileCalibBlobObjs/TileCalibUtils.h" +#include "TileConditions/TileCondToolEmscale.h" #include "StoreGate/ReadHandleKey.h" #include <string> class TileCablingService; -class TileCondToolEmscale; class CaloLVL1_ID; class TileHWID; class TileID; @@ -59,7 +59,8 @@ class TileTriggerDefaultCalibTool : public AthAlgTool, virtual public ITileCalib const TileHWID* m_tileHWID; const TileID* m_tileID; const TileCablingService* m_tileCablingService; - ToolHandle<TileCondToolEmscale> m_tileToolEmscale; //!< main Tile Calibration tool + ToolHandle<TileCondToolEmscale> m_tileToolEmscale{this, //!< main Tile Calibration tool + "TileCondToolEmscale", "TileCondToolEmscale", "Tile em scale tool"}; SG::ReadHandleKey<TileDQstatus> m_dqStatusKey; SG::ReadHandleKey<TileRawChannelContainer> m_rawChannelContainerKey{this, "TileRawChannelContainer", "TileRawChannelFit", "Tile raw channel container"}; @@ -107,7 +108,8 @@ class TileTriggerDefaultCalibTool : public AthAlgTool, virtual public ITileCalib std::string m_TileBeamContainerID; //!< Name of the TileBeamElemContainer std::string m_TileTriggerContainerID; //!< Name of the TileTriggerContainer - ToolHandle<LVL1::IL1CaloTTIdTools > m_l1CaloTTIdTools; + ToolHandle<LVL1::IL1CaloTTIdTools > m_l1CaloTTIdTools{this, + "L1CaloTTIdTools", "LVL1::L1CaloTTIdTools/L1CaloTTIdTools", "L1Calo TTId tools"}; // ToolHandle<LVL1::IL1TriggerTowerTool> m_ttTool; uint32_t m_BCID; //!< BCID in LASTROD diff --git a/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileCisDefaultCalibTool.cxx b/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileCisDefaultCalibTool.cxx index 79e5888c4c21448525940be4ebd38d78091dad39..57094e5cf1919e5aba046d62637ddaec02cfe905 100644 --- a/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileCisDefaultCalibTool.cxx +++ b/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileCisDefaultCalibTool.cxx @@ -21,7 +21,6 @@ #include "TileIdentifier/TileHWID.h" #include "TileConditions/TileCablingSvc.h" -#include "TileMonitoring/ITileStuckBitsProbsTool.h" #include "TFile.h" #include "TTree.h" @@ -43,7 +42,6 @@ TileCisDefaultCalibTool::TileCisDefaultCalibTool(const std::string& type, const , m_tileHWID(0) , m_cabling(0) , m_cablingSvc("TileCablingSvc", name) - , m_stuckBitsProbs("") , m_scanMap(0) , m_scanMapRMS(0) { @@ -64,7 +62,6 @@ TileCisDefaultCalibTool::TileCisDefaultCalibTool(const std::string& type, const declareProperty("linfitMinLo", m_linfitMinLo = 300.0); declareProperty("doSampleChecking", m_doSampleChecking = true); // do sample checking by default - declareProperty("StuckBitsProbsTool", m_stuckBitsProbs); declareProperty("TileDQstatus", m_dqStatusKey = "TileDQstatus"); // Initialize arrays for results diff --git a/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileDigiNoiseCalibAlg.cxx b/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileDigiNoiseCalibAlg.cxx index 1a0b457416356309e71c76cf6948fdfd896e89b4..62b9a502598c23baf9bda9179af5a8de5b6109e8 100644 --- a/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileDigiNoiseCalibAlg.cxx +++ b/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileDigiNoiseCalibAlg.cxx @@ -29,7 +29,6 @@ #include "TileEvent/TileDigitsContainer.h" #include "TileEvent/TileBeamElemContainer.h" #include "TileEvent/TileRawChannelContainer.h" -#include "TileRecUtils/TileRawChannelBuilderFlatFilter.h" #include "TileByteStream/TileBeamElemContByteStreamCnv.h" #include "TileCalibAlgs/TileOFCorrelation.h" #include "TileCalibBlobObjs/TileCalibUtils.h" @@ -44,7 +43,6 @@ TileDigiNoiseCalibAlg::TileDigiNoiseCalibAlg(const std::string& name, ISvcLocator* pSvcLocator) : AthAlgorithm(name, pSvcLocator) - , m_adderFilterAlgTool("TileRawChannelBuilderFlatFilter/TileAdderFlatFilter", this) , m_beamCnv(0) , m_cabling(0) , m_tileOFCorrelation(0) @@ -61,7 +59,6 @@ TileDigiNoiseCalibAlg::TileDigiNoiseCalibAlg(const std::string& name, ISvcLocato , m_min(0) , m_trigType(0) { - declareProperty("TileAdderFlatFilter", m_adderFilterAlgTool); declareProperty("TileBeamElemContainer", m_beamElemContainer = "TileBeamElemCnt"); /* declareProperty("TileRawChannelContainerFlat", m_flatRawChannelContainer = "TileRawChannelFlat"); declareProperty("TileRawChannelContainerFit", m_fitRawChannelContainer = ""); // don't create diff --git a/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileExpertDump.cxx b/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileExpertDump.cxx index 89d9759239627d83a42689efabf6204c20f8e6f2..255829916341a8384c8b20bb82457829341fd829 100755 --- a/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileExpertDump.cxx +++ b/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileExpertDump.cxx @@ -11,7 +11,6 @@ #include "TileCalibAlgs/TileExpertDump.h" #include "TileConditions/TileInfoLoader.h" #include "TileConditions/TileInfo.h" -#include "TileConditions/TileExpertToolEmscale.h" #include "TileCalibBlobObjs/TileCalibUtils.h" #include "TileIdentifier/TileHWID.h" #include "TileIdentifier/TileTrigType.h" @@ -27,10 +26,8 @@ TileExpertDump::TileExpertDump(const std::string& name, ISvcLocator* pSvcLocator) : AthAlgorithm(name, pSvcLocator) , m_emExpertOptions(0) - , m_tileExpertToolEmscale("TileExpertToolEmscale") , m_tileHWID(0) { - declareProperty("TileExpertToolEmscale" , m_tileExpertToolEmscale); declareProperty("PrintExpertEmscale" , m_printExpertEmscale=false ,"Switch on expert calibration chain printout"); declareProperty("PrintExpertEmscaleOnl" , m_printExpertEmscaleOnl=false ,"Switch on expert onl calibration chain printout"); diff --git a/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileInfoDump.cxx b/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileInfoDump.cxx index 9e8e3600eabedba54158688f46c53b8486334373..d4df7e21687df0c811c23017661a4fac5e46c2ea 100755 --- a/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileInfoDump.cxx +++ b/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileInfoDump.cxx @@ -23,17 +23,6 @@ #include "TileIdentifier/TileFragHash.h" #include "TileCalibBlobObjs/TileCalibUtils.h" #include "TileConditions/TileCablingService.h" -#include "TileConditions/ITileBadChanTool.h" -#include "TileConditions/TileCondToolEmscale.h" -#include "TileConditions/TileCondToolIntegrator.h" -#include "TileConditions/TileCondToolTiming.h" -#include "TileConditions/TileCondToolPulseShape.h" -#include "TileConditions/TileCondToolNoiseSample.h" -#include "TileConditions/TileCondToolNoiseRawChn.h" -#include "TileConditions/TileCondToolOfcCool.h" -#include "TileConditions/TileCondToolMuID.h" -#include "TileConditions/TileCondToolAutoCr.h" - #include "TH2.h" #include <iomanip> @@ -44,16 +33,6 @@ TileInfoDump::TileInfoDump(const std::string& name, ISvcLocator* pSvcLocator) : AthAlgorithm(name, pSvcLocator) - , m_tileBadChanTool("TileBadChanTool") - , m_tileToolEmscale("TileCondToolEmscale") - , m_tileToolIntegrator("TileCondToolIntegrator") - , m_tileToolTiming("TileCondToolTiming") - , m_tileToolPulseShape("TileCondToolPulseShape") - , m_tileToolNoiseSample("TileCondToolNoiseSample") - , m_tileToolAutoCr("TileCondToolAutoCr") - , m_tileToolNoiseRawChn("TileCondToolNoiseRawChn", this) - , m_tileToolOfcCool("TileCondToolOfcCool") - , m_tileToolMuID("TileCondToolMuID") , m_thistSvc(0) , m_tileHWID(0) , m_tileID(0) @@ -65,15 +44,6 @@ TileInfoDump::TileInfoDump(const std::string& name, ISvcLocator* pSvcLocator) , m_h_badCell(0) { - declareProperty("TileBadChanTool", m_tileBadChanTool); - declareProperty("TileCondToolEmscale", m_tileToolEmscale); - declareProperty("TileCondToolIntegrator", m_tileToolIntegrator); - declareProperty("TileCondToolTiming", m_tileToolTiming); - declareProperty("TileCondToolPulseShape", m_tileToolPulseShape); - declareProperty("TileCondToolOfcCool", m_tileToolOfcCool); - declareProperty("TileCondToolNoiseSample", m_tileToolNoiseSample); - declareProperty("TileCondToolAutoCr", m_tileToolAutoCr); - declareProperty("TileCondToolNoiseRawChn", m_tileToolNoiseRawChn); declareProperty("AthenaIsOnline", m_isOnline = false, "Availability of COOL folders depends on Athena mode"); declareProperty("PrintEmscale", m_printEmscale = false, "Switch on calibration chain printout"); declareProperty("PrintEmscaleOnl", m_printEmscaleOnl = false, "Switch on online calibration chain printout"); diff --git a/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileLaserCalibAlg.cxx b/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileLaserCalibAlg.cxx index e16deaabe86eab8a456c5066d2a2795784a41b4d..8e6db04dc41659b65a16dd8899cb1f3830da1ba6 100644 --- a/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileLaserCalibAlg.cxx +++ b/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileLaserCalibAlg.cxx @@ -12,7 +12,6 @@ // Tile includes #include "TileCalibAlgs/TileLaserCalibAlg.h" -#include "TileCalibAlgs/ITileCalibTool.h" #include "TFile.h" #include <iostream> @@ -37,8 +36,8 @@ TileLaserCalibAlg::TileLaserCalibAlg(const std::string& name, ISvcLocator* pSvcL , m_runNo(0) , m_runType(0) { + declareProperty("FileName", m_fileName); - declareProperty("Tools", m_lasTools); } TileLaserCalibAlg::~TileLaserCalibAlg() { diff --git a/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileLaserDefaultCalibTool.cxx b/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileLaserDefaultCalibTool.cxx index 0a8ec89e5aa248c3b6c10bf59db86799988061fb..2bc770a4dfe7c0595678f6c92e0a670b5bafaeb1 100644 --- a/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileLaserDefaultCalibTool.cxx +++ b/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileLaserDefaultCalibTool.cxx @@ -8,8 +8,6 @@ #include "TileEvent/TileLaserObject.h" #include "TileConditions/TileCablingService.h" #include "TileCalibBlobObjs/TileCalibUtils.h" -#include "TileConditions/ITileBadChanTool.h" -#include "TileMonitoring/ITileStuckBitsProbsTool.h" #include "GaudiKernel/MsgStream.h" @@ -43,9 +41,6 @@ TileLaserDefaultCalibTool::TileLaserDefaultCalibTool(const std::string& type, co m_isLaserCalib(false), m_tileHWID(nullptr), m_cabling(nullptr), - m_tileToolEmscale("TileCondToolEmscale"), - m_tileBadChanTool("TileBadChanTool"), - m_stuckBitsProbs(""), m_toolRunNo(0), m_ADC_problem(0), m_las_filter(0), @@ -72,7 +67,6 @@ TileLaserDefaultCalibTool::TileLaserDefaultCalibTool(const std::string& type, co declareInterface<ITileCalibTool>( this ); declareProperty("toolNtuple", m_toolNtuple="h3000"); declareProperty("pisaMethod2", m_pisaMethod2=true); - declareProperty("StuckBitsProbsTool", m_stuckBitsProbs); declareProperty("TileDQstatus", m_dqStatusKey = "TileDQstatus"); //creating multi-dim arrays on the heap and initialize all elements to zeros @@ -372,8 +366,8 @@ StatusCode TileLaserDefaultCalibTool::execute(){ m_las_time = static_cast<double>(cispar[10])+static_cast<double>(cispar[11])/1000000; // Retrieve laser information - if(laserObj->getDiodeCurrOrd() == 0 || laserObj->getFiltNumber() == 0){ - ATH_MSG_DEBUG ( "No filter number or diode current: wheel moving?" ); + if(laserObj->getDiodeCurrOrd() == 0 || laserObj->getFiltNumber() == 0 || laserObj->getQDCTimeout()){ + ATH_MSG_ERROR ( "No filter number or diode current: wheel moving or QDC timeout" ); return StatusCode::SUCCESS; // This is expected for some events } // IF diff --git a/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileLaserLinearityCalibTool.cxx b/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileLaserLinearityCalibTool.cxx index c0967227e1aeb0f46ed1242d8fe6c30980b47712..8387dc9bec4c9d2f132c4b14b891aab88e90e3a0 100644 --- a/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileLaserLinearityCalibTool.cxx +++ b/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileLaserLinearityCalibTool.cxx @@ -35,7 +35,6 @@ TileLaserLinearityCalibTool::TileLaserLinearityCalibTool(const std::string& type AthAlgTool(type, name, pParent), m_tileHWID (nullptr), m_cabling (nullptr), - m_tileToolEmscale("TileCondToolEmscale"), m_toolRunNo(0), m_ADC_problem(0), m_las_filter(0), diff --git a/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileLaserTimingTool.cxx b/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileLaserTimingTool.cxx index 56619532dd2f1a2d548d4e256f938c550204f00a..763a4b384305bdf292cdf349cc059593b1b4affb 100644 --- a/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileLaserTimingTool.cxx +++ b/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileLaserTimingTool.cxx @@ -123,14 +123,12 @@ TileLaserTimingTool::TileLaserTimingTool(const std::string& type, const std::str : AthAlgTool(type, name, pParent) , m_tileHWID(0) , m_cabling(0) - , m_tileToolTiming("TileCondToolTiming") , m_nevts(0) , m_gaussf(0) { declareInterface<ITileCalibTool>( this ); - declareProperty("TileCondToolTiming", m_tileToolTiming); declareProperty("NtupleID", m_ntupleID = "h3000"); declareProperty("FiberLightSpeed", m_fiberLightSpeed); declareProperty("NSamples", m_nSamples = 9); diff --git a/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileMuId2DBAlg.cxx b/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileMuId2DBAlg.cxx index 282504b378949e6b79c799548b40807bba585a47..07c3b06f144759ae100b583ad2c994b947add529 100644 --- a/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileMuId2DBAlg.cxx +++ b/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileMuId2DBAlg.cxx @@ -34,11 +34,9 @@ using namespace std; TileMuId2DBAlg::TileMuId2DBAlg(const std::string& name, ISvcLocator* pSvcLocator) : AthAlgorithm(name,pSvcLocator), m_calo_id(0), - m_noiseTool("CaloNoiseToolDB/calonoisetooldb"), m_noise(0.0), m_module(0) { - declareProperty("noiseTool", m_noiseTool,"noise tool"); } diff --git a/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileOFC2DBAlg.cxx b/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileOFC2DBAlg.cxx index 7d58ada9abf596572c26cb3ac398aa0b456d6c51..d875848de5667f17498ca1ccf405973c86286fd4 100755 --- a/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileOFC2DBAlg.cxx +++ b/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileOFC2DBAlg.cxx @@ -26,12 +26,8 @@ TileOFC2DBAlg::TileOFC2DBAlg(const std::string& name, ISvcLocator* pSvcLocator) : AthAlgorithm(name, pSvcLocator) , m_regSvc(0) - , m_tileToolTiming("TileCondToolTiming") - , m_tileCondToolOfc("TileCondToolOfc") { - declareProperty("TileCondToolTiming", m_tileToolTiming); - declareProperty("TileCondToolOfc", m_tileCondToolOfc, "TileCondToolOfc"); declareProperty("OF2", m_of2 = true,"true => OF2, false => OF1"); declareProperty("RunIOVSince", m_runIOVSince = IOVTime::MINRUN ); declareProperty("RunIOVUntil", m_runIOVUntil = IOVTime::MAXRUN ); diff --git a/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileRawChNoiseCalibAlg.cxx b/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileRawChNoiseCalibAlg.cxx index 6fd10bdffeca85bcfef2a81943b5966ef0a9b803..37c72be5a3ee44fd16e34ee2dd69edbf5853100c 100644 --- a/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileRawChNoiseCalibAlg.cxx +++ b/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileRawChNoiseCalibAlg.cxx @@ -61,9 +61,6 @@ TileRawChNoiseCalibAlg::TileRawChNoiseCalibAlg(const std::string& name, ISvcLoca , m_cabling(0) , m_tileID(0) , m_tileHWID(0) - , m_tileToolEmscale("TileCondToolEmscale") - , m_tileBadChanTool("TileBadChanTool") - , m_tileIdTrans("TileCondIdTransforms") , m_cispar(0) //, m_nDrawers(0) , m_time(0) @@ -95,8 +92,6 @@ TileRawChNoiseCalibAlg::TileRawChNoiseCalibAlg(const std::string& name, ISvcLoca declareProperty("FileNamePrefix", m_file="RawCh_NoiseCalib"); declareProperty("NtupleID", m_ntupleID="RawCh_NoiseCalib"); declareProperty("TreeSize", m_treeSize = 16000000000LL); - declareProperty("TileCondToolEmscale", m_tileToolEmscale); - declareProperty("TileBadChanTool", m_tileBadChanTool); declareProperty("TileDQstatus", m_dqStatusKey = "TileDQstatus"); m_evtNr=-1; diff --git a/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileTopCalibAlg.cxx b/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileTopCalibAlg.cxx index 1be6391ade1bb74da79fd8a7606b1f1193547531..4403aae41735cf1828951d329db4d1658373b774 100644 --- a/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileTopCalibAlg.cxx +++ b/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileTopCalibAlg.cxx @@ -18,12 +18,10 @@ TileTopCalibAlg::TileTopCalibAlg(const std::string& name, ISvcLocator* pSvcLocat , m_runNumber(0) , m_runType(0) , m_fileName("TileCalibNtuple.root") - , m_tileCalibToolList() , m_rootFile(0) { declareProperty("RunNumber", m_runNumber=0); declareProperty("RunType", m_runType=0); - declareProperty("TileCalibTools",m_tileCalibToolList,"List Of Tools"); declareProperty("FileName",m_fileName="TileCalibNtuple.root"); } diff --git a/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileTriggerDefaultCalibTool.cxx b/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileTriggerDefaultCalibTool.cxx index 7ae6fc6565c58c0358b57a696d91a4f25a389fde..40bf274b4155443303e842e99d538ad972c96b00 100644 --- a/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileTriggerDefaultCalibTool.cxx +++ b/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileTriggerDefaultCalibTool.cxx @@ -26,7 +26,6 @@ #include "TileEvent/TileRawChannelContainer.h" #include "TileEvent/TileBeamElemContainer.h" #include "TileConditions/TileCablingService.h" -#include "TileConditions/TileCondToolEmscale.h" //for the extended CISpar #include "TileIdentifier/TileTBFrag.h" @@ -55,7 +54,6 @@ TileTriggerDefaultCalibTool::TileTriggerDefaultCalibTool(const std::string& type , m_tileHWID(nullptr) , m_tileID(nullptr) , m_tileCablingService(nullptr) - , m_tileToolEmscale("TileCondToolEmscale") , m_DACvalue(0) , m_charge(0) , m_ipmt(0) @@ -63,7 +61,6 @@ TileTriggerDefaultCalibTool::TileTriggerDefaultCalibTool(const std::string& type , m_ipmtOld(0) , m_nEvtGlobal() , m_TileTriggerContainerID("") - , m_l1CaloTTIdTools("LVL1::L1CaloTTIdTools/L1CaloTTIdTools") //, m_ttTool("LVL1::L1TriggerTowerTool/LVL1::L1TriggerTowerTool") , m_BCID(0) , m_trigType(0) @@ -74,7 +71,6 @@ TileTriggerDefaultCalibTool::TileTriggerDefaultCalibTool(const std::string& type declareProperty("NtupleID", m_ntupleID="h3000"); declareProperty("NumEventPerPMT", m_nevpmt=195); // changed from 200 to 195 declareProperty("TileBeamElemContainer",m_TileBeamContainerID); - declareProperty("TileCondToolEmscale", m_tileToolEmscale); declareProperty("TileDQstatus", m_dqStatusKey = "TileDQstatus"); // declareProperty("L1TriggerTowerTool", m_ttTool); diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/CMakeLists.txt b/TileCalorimeter/TileCalib/TileCalibBlobPython/CMakeLists.txt index 25b1468e20c3ca8fecb72570e49831217bb18778..365ea234d0eb78b6383988579086858d9e403cd1 100644 --- a/TileCalorimeter/TileCalib/TileCalibBlobPython/CMakeLists.txt +++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/CMakeLists.txt @@ -5,6 +5,9 @@ # Declare the package name: atlas_subdir( TileCalibBlobPython ) +# Necessary external(s): +find_package( cx_Oracle ) + # Install files from the package: atlas_install_python_modules( python/*.py ) atlas_install_joboptions( share/*.py ) diff --git a/TileCalorimeter/TileDetDescr/TileDetDescr/TileDetDescrManager.h b/TileCalorimeter/TileDetDescr/TileDetDescr/TileDetDescrManager.h index b4275a44e9aba416d6be0a069cafb6ce25bf3651..3fe94129f3d4bd56372e582e7034f982e72ddf93 100755 --- a/TileCalorimeter/TileDetDescr/TileDetDescr/TileDetDescrManager.h +++ b/TileCalorimeter/TileDetDescr/TileDetDescr/TileDetDescrManager.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef TileDetDescrManager_h @@ -176,6 +176,7 @@ class TileDetDescrManager : public GeoVDetectorManager // Create elements void create_elements(); + void create_elements(bool checks); // Insertion void add(TileDetDescrRegion* region); diff --git a/TileCalorimeter/TileDetDescr/src/TileDetDescrManager.cxx b/TileCalorimeter/TileDetDescr/src/TileDetDescrManager.cxx index d337f3b0b09ac9920735c46be8f7509fabad45d8..8fdc6ef949c140106787821659ee25677f05e4e1 100755 --- a/TileCalorimeter/TileDetDescr/src/TileDetDescrManager.cxx +++ b/TileCalorimeter/TileDetDescr/src/TileDetDescrManager.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "TileDetDescr/TileDetDescrManager.h" @@ -137,6 +137,10 @@ void TileDetDescrManager::print() const } void TileDetDescrManager::create_elements() +{ + create_elements (m_tile_id->do_checks()); +} +void TileDetDescrManager::create_elements(bool checks) { MLOG(INFO) << "Entering create_elements()" << endmsg; @@ -336,7 +340,7 @@ void TileDetDescrManager::create_elements() CaloDetDescriptor* modDescr; try { - Identifier id = m_tile_id->module_id(section,side,module); + Identifier id = m_tile_id->module_id(section,side,module, checks); IdentifierHash idhash; /* int result = */ m_tile_id->get_hash(id,idhash,&module_context); modDescr = new CaloDetDescriptor(id,(AtlasDetectorID *)m_tile_id,m_cell_id); @@ -383,7 +387,7 @@ void TileDetDescrManager::create_elements() int tower = (int)((eta + 0.01) * 10); // tower number in 0.1 granularity try { - Identifier id = m_tile_id->cell_id(section,side,module,tower,sample); + Identifier id = m_tile_id->cell_id(section,side,module,tower,sample,checks); IdentifierHash idhash; /* int result = */ m_tile_id->get_hash(id,idhash,&cell_context); @@ -452,7 +456,7 @@ void TileDetDescrManager::create_elements() // Temporary solution for cell volumes if(section == TileID::BARREL && side == -1 && ieta == 0 && sample == 2) - ++volumeIndex; // skip D0 in negagive side + ++volumeIndex; // skip D0 in negative side if(section == TileID::BARREL) elt->set_volume(vBarrelCells[volumeIndex++]); else if(section == TileID::EXTBAR) diff --git a/TileCalorimeter/TileEvent/TileEvent/TileLaserObject.h b/TileCalorimeter/TileEvent/TileEvent/TileLaserObject.h index 7ffb999669f709806fc852afb37e05ba694ebff2..d7c162c5327e21c355b5192df119eb8c17ee3a4a 100644 --- a/TileCalorimeter/TileEvent/TileEvent/TileLaserObject.h +++ b/TileCalorimeter/TileEvent/TileEvent/TileLaserObject.h @@ -99,6 +99,8 @@ public: int getShutter() const; int getInterlock() const; int getAlarm() const; + bool getQDCTimeout() const; + bool getTDCTimeout() const; void setLaser(const int Counter, const int diodeCurrOrd, @@ -143,6 +145,9 @@ public: const int alarm); void setDaqType(const unsigned int daqtype); + + void setTimeouts(const bool qdc, const bool tdc); + enum daqType {daqPedestal=0x10, daqAlpha, daqLed, daqLinearity, daqLaser}; @@ -161,6 +166,8 @@ private: std::vector<TileLaserPmt> m_pmtsHG; std::vector<std::vector<TileLasCalib> > m_lascalib; TileLaserPLC m_plc; + bool m_qdctimeout; + bool m_tdctimeout; int m_daqtype; // DAQ TYPES ARE RELEVANT FOR LASERII @@ -297,6 +304,17 @@ inline int TileLaserObject::getAlarm() const return m_plc.getAlarm(); } +inline bool TileLaserObject::getQDCTimeout() const +{ + return m_qdctimeout; +} + +inline bool TileLaserObject::getTDCTimeout() const +{ + return m_tdctimeout; +} + + inline int TileLaserObject::getDaqType() const { return m_daqtype; diff --git a/TileCalorimeter/TileEvent/src/TileLaserObject.cxx b/TileCalorimeter/TileEvent/src/TileLaserObject.cxx index 39b90319b6b2127c8c7f5e869b21b15c25d13580..4df7013980786c4f5a5bc6763e6d4d9db5548653 100644 --- a/TileCalorimeter/TileEvent/src/TileLaserObject.cxx +++ b/TileCalorimeter/TileEvent/src/TileLaserObject.cxx @@ -23,6 +23,8 @@ TileLaserObject::TileLaserObject() , m_pmtsHG(nbPmts,TileLaserPmt()) , m_lascalib(nbTypes,std::vector<TileLasCalib>(16)) , m_plc() + , m_qdctimeout(false) + , m_tdctimeout(false) , m_daqtype(0) , m_BCID(0) , m_version(0) @@ -287,6 +289,14 @@ void TileLaserObject::setPLC(const int alphaPos, } +void TileLaserObject::setTimeouts(const bool qdc, + const bool tdc) +{ + m_qdctimeout = qdc; + m_tdctimeout = tdc; +} + + void TileLaserObject::setDiode(const unsigned int diode, const int diodeAdc, const double diodePedestal, diff --git a/TileCalorimeter/TileExample/TileRecEx/share/jobOptions_TileCalibRec.py b/TileCalorimeter/TileExample/TileRecEx/share/jobOptions_TileCalibRec.py index 63168433bc3dae0d73873911a9a707b49e37dcd7..577d3fec67355d57b32f882612627f90cdaeecd9 100644 --- a/TileCalorimeter/TileExample/TileRecEx/share/jobOptions_TileCalibRec.py +++ b/TileCalorimeter/TileExample/TileRecEx/share/jobOptions_TileCalibRec.py @@ -1586,7 +1586,6 @@ if doTileCalib: TileCisTool.removePed = True #from AthenaCommon.AppMgr import ToolSvc - ToolSvc += TileCisTool TileCalibAlg.TileCalibTools += [ TileCisTool ] topSequence += TileCalibAlg @@ -1608,7 +1607,6 @@ if doTileCalib: dqStatus.TileRawChannelContainer = 'TileRawChannelCnt' #from AthenaCommon.AppMgr import ToolSvc - ToolSvc += TileTriggerTool TileCalibAlg.TileCalibTools += [ TileTriggerTool ] topSequence += TileCalibAlg @@ -1629,7 +1627,6 @@ if doTileCalib: TileLaserTool.StuckBitsProbsTool = ToolSvc.TileDigitsMon #from AthenaCommon.AppMgr import ToolSvc - ToolSvc += TileLaserTool TileCalibAlg.Tools = [ TileLaserTool ] topSequence += TileCalibAlg diff --git a/TileCalorimeter/TileExample/TileRecEx/share/jobOptions_TileTBDump.py b/TileCalorimeter/TileExample/TileRecEx/share/jobOptions_TileTBDump.py index 69b384fb9acb7789166c817c8134a285e34ecc48..4fbada33a369e484b91eacf4b9a79e290a43ba3e 100644 --- a/TileCalorimeter/TileExample/TileRecEx/share/jobOptions_TileTBDump.py +++ b/TileCalorimeter/TileExample/TileRecEx/share/jobOptions_TileTBDump.py @@ -110,8 +110,10 @@ if not 'InputDirectory' in dir(): Year = 2016 elif RunNumber < 342540: Year = 2017 - else: + elif RunNumber < 367980: Year = 2018 + else: + Year = 2019 if 'RunStream' in dir(): @@ -297,15 +299,6 @@ tileInfoConfigurator.OutputLevel = OutputLevel from AthenaCommon.AppMgr import ToolSvc from TileConditions.TileCondToolConf import * -if TileLasPulse: - tileInfoConfigurator.TileCondToolTiming = getTileCondToolTiming( 'COOL','LAS') - ToolSvc += getTileCondToolOfcCool('COOL', 'LAS') -elif TileCisPulse: - tileInfoConfigurator.TileCondToolTiming = getTileCondToolTiming( 'COOL','CIS') - ToolSvc += getTileCondToolOfcCool('COOL', 'CIS') -else: - tileInfoConfigurator.TileCondToolTiming = getTileCondToolTiming( 'COOL','PHY') - ToolSvc += getTileCondToolOfcCool('COOL', 'PHY') print tileInfoConfigurator diff --git a/TileCalorimeter/TileExample/TileRecEx/share/jobOptions_TileTBStat.py b/TileCalorimeter/TileExample/TileRecEx/share/jobOptions_TileTBStat.py index 991aeb5e1bc29c72090b743d85e0c41b3dd380fd..741868998ab41fb7e907576ecf2db9d4c073155b 100644 --- a/TileCalorimeter/TileExample/TileRecEx/share/jobOptions_TileTBStat.py +++ b/TileCalorimeter/TileExample/TileRecEx/share/jobOptions_TileTBStat.py @@ -111,8 +111,10 @@ if not 'InputDirectory' in dir(): Year = 2016 elif RunNumber < 342540: Year = 2017 - else: + elif RunNumber < 367980: Year = 2018 + else: + Year = 2019 if 'RunStream' in dir(): @@ -300,15 +302,6 @@ tileInfoConfigurator.OutputLevel = OutputLevel from AthenaCommon.AppMgr import ToolSvc from TileConditions.TileCondToolConf import * -if TileLasPulse: - tileInfoConfigurator.TileCondToolTiming = getTileCondToolTiming( 'COOL','LAS') - ToolSvc += getTileCondToolOfcCool('COOL', 'LAS') -elif TileCisPulse: - tileInfoConfigurator.TileCondToolTiming = getTileCondToolTiming( 'COOL','CIS') - ToolSvc += getTileCondToolOfcCool('COOL', 'CIS') -else: - tileInfoConfigurator.TileCondToolTiming = getTileCondToolTiming( 'COOL','PHY') - ToolSvc += getTileCondToolOfcCool('COOL', 'PHY') print tileInfoConfigurator diff --git a/TileCalorimeter/TileG4/TileG4Interfaces/TileG4Interfaces/ITileCalculator.h b/TileCalorimeter/TileG4/TileG4Interfaces/TileG4Interfaces/ITileCalculator.h index fc0aa2be9fa3d433c4a36391712bb2a140ff33bf..436d8147d0cb2da1cfb74fc19f23fcb604d5b1f0 100644 --- a/TileCalorimeter/TileG4/TileG4Interfaces/TileG4Interfaces/ITileCalculator.h +++ b/TileCalorimeter/TileG4/TileG4Interfaces/TileG4Interfaces/ITileCalculator.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ //************************************************************ @@ -79,9 +79,9 @@ class ITileCalculator : virtual public IService { /// Search for the tilecal sub-section, its module and some identifiers virtual G4bool FindTileScinSection(const G4Step*, TileHitData& hitData) const = 0; /// Calculation of pmtID, edep and scin_Time with aStep (Sergey) - virtual G4bool MakePmtEdepTime(const G4Step*, TileHitData& hitData) const = 0; + virtual G4bool MakePmtEdepTime(const G4Step*, TileHitData& hitData, double& deltaTime) const = 0; /// Calculation of pmtID, edep and scin_Time with aStep (Sergey) - virtual G4bool ManageScintHit(TileHitData& hitData) const = 0; + virtual G4bool ManageScintHit(TileHitData& hitData, double deltaTime) const = 0; /// Used by FastCaloSimParamAction virtual TileMicroHit GetTileMicroHit(const G4Step*, TileHitData& hitData) const = 0; /// diff --git a/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4CalibSD.cc b/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4CalibSD.cc index 5ea892a0a56765284c837a011896b6868ab67a05..29fab721b6933319f3e08f1d78d434fa97889308 100644 --- a/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4CalibSD.cc +++ b/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4CalibSD.cc @@ -284,8 +284,9 @@ G4bool TileGeoG4CalibSD::ProcessHits(G4Step* step, G4TouchableHistory* /*ROhist* //BESIDE A CALIBRATION HIT THERE ORDINARY //HITS SHOULD BE ALSO CREATED OR UPDATED if (normalHit) { - m_calc->MakePmtEdepTime(m_aStep, hitData); //calculation of pmtID, edep and scin_Time with aStep - m_calc->ManageScintHit(hitData);//create or update ordinary hit object in the collection + double deltaTime(0); + m_calc->MakePmtEdepTime(m_aStep, hitData, deltaTime); //calculation of pmtID, edep and scin_Time with aStep + m_calc->ManageScintHit(hitData, deltaTime);//create or update ordinary hit object in the collection } this->ScintIDCalculator(hitData); } else { diff --git a/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4CalibSD2.cc b/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4CalibSD2.cc index 5e3e1f26c05461d3c1b2b49ae4071a5c56a68f45..2c53a7118f0f5d4e1218cc3efd1498fd1242b5de 100644 --- a/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4CalibSD2.cc +++ b/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4CalibSD2.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ ///////////////////////////////////////////////////////////////////////// @@ -1096,17 +1096,14 @@ void TileGeoG4CalibSD::DefaultHitIDCalculatorTB(int sample, int region, int eta, //----------------------------------------------------------------------------------- //DM Hit ID MAKER Identifier TileGeoG4CalibSD::DM_ID_Maker(int subDet, int nType, int nSample, int nRegion, int nTower, int nModule) { - G4bool doo_checks = m_caloDM_ID->do_checks(); Identifier caloDMID; try { - m_caloDM_ID->set_do_checks(true); - caloDMID = m_caloDM_ID->zone_id(subDet, nType, nSample, nRegion, nTower, nModule); + caloDMID = m_caloDM_ID->zone_id(subDet, nType, nSample, nRegion, nTower, nModule, true); } catch (const CaloID_Exception & CalEx) { DebugDMCellIDFields(nSample); G4cout << "ERROR: M_ID_Maker() - WRONG ID -> " << CalEx.message() << G4endl; } - m_caloDM_ID->set_do_checks(doo_checks); return caloDMID; } diff --git a/TileCalorimeter/TileG4/TileGeoG4SD/src/TileGeoG4SD.cc b/TileCalorimeter/TileG4/TileGeoG4SD/src/TileGeoG4SD.cc index 8a25912d8624a4b336fbc6fb2b2fe48939c8e4a9..cbd937eececdc5943619a770d3101613a4f26e07 100755 --- a/TileCalorimeter/TileG4/TileGeoG4SD/src/TileGeoG4SD.cc +++ b/TileCalorimeter/TileG4/TileGeoG4SD/src/TileGeoG4SD.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ //************************************************************ @@ -65,7 +65,9 @@ G4bool TileGeoG4SD::ProcessHits(G4Step* aStep, G4TouchableHistory* /*ROhist*/) { return false; } - if ( !(m_calc->MakePmtEdepTime(aStep, hitData)) ) { //calculation of pmtID, edep and scin_Time with aStep (Sergey) + double deltaTime(0); + + if ( !(m_calc->MakePmtEdepTime(aStep, hitData, deltaTime)) ) { //calculation of pmtID, edep and scin_Time with aStep (Sergey) if (verboseLevel >= 10) G4cout << "ProcessHits: wrong pmtID_up,pmtID_down,edep_up,edep_down," @@ -78,7 +80,7 @@ G4bool TileGeoG4SD::ProcessHits(G4Step* aStep, G4TouchableHistory* /*ROhist*/) { return false; } - if ( !(m_calc->ManageScintHit(hitData)) ) { //create or update hit object in the collection + if ( !(m_calc->ManageScintHit(hitData, deltaTime)) ) { //create or update hit object in the collection G4cout << "ProcessHits: TileHit can not be produced; pmtID_up,pmtID_down,edep_up,edep_down," << "scin_Time_up,scin_Time_down:\t" << hitData.pmtID_up diff --git a/TileCalorimeter/TileG4/TileGeoG4SD/src/TileGeoG4SDCalc.cc b/TileCalorimeter/TileG4/TileGeoG4SD/src/TileGeoG4SDCalc.cc index c4fe1e128ced616c10e88f2fe476506524bbce2f..8fb8265c8c769e78ec58900f7714e171df2d6ece 100644 --- a/TileCalorimeter/TileG4/TileGeoG4SD/src/TileGeoG4SDCalc.cc +++ b/TileCalorimeter/TileG4/TileGeoG4SD/src/TileGeoG4SDCalc.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ //************************************************************ @@ -50,6 +50,7 @@ #include <stdexcept> #include <memory> + namespace { thread_local std::unique_ptr<TileGeoG4LookupBuilder> s_lookup(nullptr); @@ -61,6 +62,7 @@ TileGeoG4SDCalc::TileGeoG4SDCalc(const std::string& name, ISvcLocator *pSvcLocat : AthService(name, pSvcLocator) , m_detStore("DetectorStore",name) , m_geoModSvc("GeoModelSvc",name) + , m_keepHitTime(false) { declareProperty( "DetectorStore", m_detStore ); declareProperty( "GeoModelSvc", m_geoModSvc ); @@ -107,16 +109,16 @@ StatusCode TileGeoG4SDCalc::initialize() { // Unpack TileG4SimOptions from DetectorStore // Determine time window for hit to be recorded - m_deltaT = m_options.deltaTHit[m_options.deltaTHit.size() - 1] * CLHEP::ns; + double deltaT = m_options.deltaTHit[m_options.deltaTHit.size() - 1] * CLHEP::ns; // Determine variable time window for hit to be recorded for (int i = m_options.deltaTHit.size() - 1; i > -1; --i) { m_options.deltaTHit[i] *= CLHEP::ns; } // protection agaist wrong vector size - if (m_options.deltaTHit.size() % 3 != 1 || m_deltaT <= 0.0) { + if (m_options.deltaTHit.size() % 3 != 1 || deltaT <= 0.0) { m_options.deltaTHit.resize(1); - m_options.deltaTHit[0] = m_deltaT; + m_options.deltaTHit[0] = deltaT; } // Determine maximum time for hit to be recorded @@ -157,8 +159,8 @@ StatusCode TileGeoG4SDCalc::initialize() { m_options.uShape = 1; } - if (m_deltaT > 0.0) - m_options.timeCut = ((int) (m_options.timeCut / m_deltaT) + 0.5) * m_deltaT; + if (deltaT > 0.0) + m_options.timeCut = ((int) (m_options.timeCut / deltaT) + 0.5) * deltaT; if (m_options.deltaTHit.size() > 1) { G4cout << "Using deltaTHit = "; unsigned int i = 0; @@ -171,7 +173,7 @@ StatusCode TileGeoG4SDCalc::initialize() { } G4cout << "and " << delta / CLHEP::ns << " ns outside this window" << G4endl; } else { - ATH_MSG_INFO("Using deltaTHit = " << m_deltaT / CLHEP::ns << " ns. "); + ATH_MSG_INFO("Using deltaTHit = " << deltaT / CLHEP::ns << " ns. "); } ATH_MSG_INFO("Using timeCut = " << m_options.timeCut / CLHEP::ns << " ns. "); ATH_MSG_INFO("Using doBirk = " << (m_options.doBirk ? "true" : "false")); @@ -179,24 +181,26 @@ StatusCode TileGeoG4SDCalc::initialize() { ATH_MSG_INFO("Using doTileRow = " << (m_options.doTileRow ? "true" : "false")); ATH_MSG_INFO("Using doCalibHitParticleID = " << (m_options.doCalibHitParticleID ? "true" : "false")); - if (! (m_deltaT > 0.0)) { + if (deltaT > 0.0) { + m_keepHitTime = true; + } else { ATH_MSG_WARNING("deltaT is not set, ignore hit time in ProcessHits()"); } m_tileSizeDeltaT = 100000 * CLHEP::ns; // used for doTileRow - if (m_options.timeCut > m_tileSizeDeltaT - m_deltaT) { - m_options.timeCut = m_tileSizeDeltaT - m_deltaT; + if (m_options.timeCut > m_tileSizeDeltaT - deltaT) { + m_options.timeCut = m_tileSizeDeltaT - deltaT; ATH_MSG_WARNING("Reducing timeCut to " << m_options.timeCut / CLHEP::ns << " ns. "); } else if ( ! m_options.doTOFCorrection && m_options.timeCut < 1000*CLHEP::ns ) { // assuming that if TOF correction is disabled, then we are running cosmic simulation // and should not use too restrictive time cut - m_options.timeCut = m_tileSizeDeltaT - m_deltaT; + m_options.timeCut = m_tileSizeDeltaT - deltaT; ATH_MSG_WARNING("TOF correction is disabled, settting time cut to " << m_options.timeCut / CLHEP::ns << " ns. "); } - m_lateHitTime = m_tileSizeDeltaT - m_deltaT; + m_lateHitTime = m_tileSizeDeltaT - deltaT; ATH_MSG_INFO("All hits with time above " << m_options.timeCut / CLHEP::ns << " ns will be stored with time = " << m_lateHitTime / CLHEP::ns << " ns."); @@ -431,7 +435,7 @@ G4bool TileGeoG4SDCalc::FindTileScinSection(const G4Step* aStep, TileHitData& hi return true; } -G4bool TileGeoG4SDCalc::MakePmtEdepTime(const G4Step* aStep, TileHitData& hitData) const +G4bool TileGeoG4SDCalc::MakePmtEdepTime(const G4Step* aStep, TileHitData& hitData, double& deltaTime) const { if (hitData.nrOfPMT == 0) { return false; @@ -581,7 +585,7 @@ G4bool TileGeoG4SDCalc::MakePmtEdepTime(const G4Step* aStep, TileHitData& hitDat G4double totalTime = aStep->GetPostStepPoint()->GetGlobalTime(); //added by Mike - if (m_deltaT > 0.0) { + if (m_keepHitTime) { const G4ThreeVector position = aStep->GetPostStepPoint()->GetPosition(); //position of the hit const double cosTh_hit = position.cosTheta(); const double magn_hit = position.mag(); @@ -660,7 +664,7 @@ G4bool TileGeoG4SDCalc::MakePmtEdepTime(const G4Step* aStep, TileHitData& hitDat ATH_MSG_VERBOSE(" hit time set to " << totalTime); } // calculate unique deltaT bin width for both up and down PMT, ignoring additional deltas - m_deltaT = this->deltaT(totalTime); + deltaTime = this->deltaT(totalTime); const double scin_Time = totalTime + (hitData.tileSize + 1) * m_tileSizeDeltaT; hitData.scin_Time_up = hitData.scin_Time_down = scin_Time; hitData.totalTimeUp = hitData.totalTimeDown = totalTime; @@ -729,8 +733,10 @@ TileMicroHit TileGeoG4SDCalc::GetTileMicroHit(const G4Step* aStep, TileHitData& return microHit; } + double deltaTime(0); + //calculation of pmtID, edep and scin_Time with aStep - if (!this->MakePmtEdepTime(aStep, hitData)) { + if (!this->MakePmtEdepTime(aStep, hitData, deltaTime)) { ATH_MSG_DEBUG("MakePmtEdepTime: wrong pmtID_up,pmtID_down,edep_up," << "edep_down,scin_Time_up,scin_Time_down:\t" << hitData.pmtID_up << "\t" @@ -751,7 +757,7 @@ TileMicroHit TileGeoG4SDCalc::GetTileMicroHit(const G4Step* aStep, TileHitData& return microHit; } -G4bool TileGeoG4SDCalc::ManageScintHit(TileHitData& hitData) const +G4bool TileGeoG4SDCalc::ManageScintHit(TileHitData& hitData, double deltaTime) const { //Having hitData.cell and hitData.nModule (number of current module) we need to //determine if a Hit object already exists for this cell and module. @@ -793,24 +799,24 @@ G4bool TileGeoG4SDCalc::ManageScintHit(TileHitData& hitData) const } if (hitData.edep_up != 0.) { - if (newTileHitUp) { this->CreateScintHit(1, hitData); } - else { this->UpdateScintHit(1, hitData); } + if (newTileHitUp) { this->CreateScintHit(1, hitData, deltaTime); } + else { this->UpdateScintHit(1, hitData, deltaTime); } } if (hitData.edep_down != 0.) { - if (newTileHitDown) { this->CreateScintHit(0, hitData); } - else { this->UpdateScintHit(0, hitData); } + if (newTileHitDown) { this->CreateScintHit(0, hitData, deltaTime); } + else { this->UpdateScintHit(0, hitData, deltaTime); } } return true; } -void TileGeoG4SDCalc::CreateScintHit(int pmt, TileHitData& hitData) const +void TileGeoG4SDCalc::CreateScintHit(int pmt, TileHitData& hitData, double deltaTime) const { if (pmt == 1) { //Upper PMT of Cell - std::unique_ptr<TileSimHit> aHit = std::make_unique<TileSimHit>(hitData.pmtID_up, hitData.edep_up, hitData.totalTimeUp, m_deltaT); + std::unique_ptr<TileSimHit> aHit = std::make_unique<TileSimHit>(hitData.pmtID_up, hitData.edep_up, hitData.totalTimeUp, deltaTime); if (m_options.doTileRow) { - aHit->add(hitData.edep_up, hitData.scin_Time_up, m_deltaT); + aHit->add(hitData.edep_up, hitData.scin_Time_up, deltaTime); } if (hitData.isNegative) { hitData.cell->moduleToHitUpNegative[hitData.nModule - 1] = aHit.release(); @@ -819,9 +825,9 @@ void TileGeoG4SDCalc::CreateScintHit(int pmt, TileHitData& hitData) const hitData.cell->moduleToHitUp[hitData.nModule - 1] = aHit.release(); } } else { //Down PMT of Cell - std::unique_ptr<TileSimHit> aHit = std::make_unique<TileSimHit>(hitData.pmtID_down, hitData.edep_down, hitData.totalTimeDown, m_deltaT); + std::unique_ptr<TileSimHit> aHit = std::make_unique<TileSimHit>(hitData.pmtID_down, hitData.edep_down, hitData.totalTimeDown, deltaTime); if (m_options.doTileRow) { - aHit->add(hitData.edep_down, hitData.scin_Time_down, m_deltaT); + aHit->add(hitData.edep_down, hitData.scin_Time_down, deltaTime); } if (hitData.isNegative) { hitData.cell->moduleToHitDownNegative[hitData.nModule - 1] = aHit.release(); @@ -832,7 +838,7 @@ void TileGeoG4SDCalc::CreateScintHit(int pmt, TileHitData& hitData) const } } -void TileGeoG4SDCalc::UpdateScintHit(int pmt, TileHitData& hitData) const +void TileGeoG4SDCalc::UpdateScintHit(int pmt, TileHitData& hitData, double deltaTime) const { TileSimHit* aHit(nullptr); @@ -843,9 +849,9 @@ void TileGeoG4SDCalc::UpdateScintHit(int pmt, TileHitData& hitData) const else { aHit = hitData.cell->moduleToHitUp[hitData.nModule - 1]; } - aHit->add(hitData.edep_up, hitData.totalTimeUp, m_deltaT); + aHit->add(hitData.edep_up, hitData.totalTimeUp, deltaTime); if (m_options.doTileRow) { - aHit->add(hitData.edep_up, hitData.scin_Time_up, m_deltaT); + aHit->add(hitData.edep_up, hitData.scin_Time_up, deltaTime); } } else { // Down PMT of Cell if (hitData.isNegative) { @@ -854,9 +860,9 @@ void TileGeoG4SDCalc::UpdateScintHit(int pmt, TileHitData& hitData) const else { aHit = hitData.cell->moduleToHitDown[hitData.nModule - 1]; } - aHit->add(hitData.edep_down, hitData.totalTimeDown, m_deltaT); + aHit->add(hitData.edep_down, hitData.totalTimeDown, deltaTime); if (m_options.doTileRow) { - aHit->add(hitData.edep_down, hitData.scin_Time_down, m_deltaT); + aHit->add(hitData.edep_down, hitData.scin_Time_down, deltaTime); } } } diff --git a/TileCalorimeter/TileG4/TileGeoG4SD/src/TileGeoG4SDCalc.hh b/TileCalorimeter/TileG4/TileGeoG4SD/src/TileGeoG4SDCalc.hh index 694a9996ecf4048a77b418aa830ae7eb8c7b2cba..4384455002eb56ccb17929c378dc43bf69a650d2 100644 --- a/TileCalorimeter/TileG4/TileGeoG4SD/src/TileGeoG4SDCalc.hh +++ b/TileCalorimeter/TileG4/TileGeoG4SD/src/TileGeoG4SDCalc.hh @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ //************************************************************ @@ -59,9 +59,9 @@ public: /// Search for the tilecal sub-section, its module and some identifiers virtual G4bool FindTileScinSection(const G4Step*, TileHitData& hitData) const override final; /// Calculation of pmtID, edep and scin_Time with aStep (Sergey) - virtual G4bool MakePmtEdepTime(const G4Step*, TileHitData& hitData) const override final; + virtual G4bool MakePmtEdepTime(const G4Step*, TileHitData& hitData, double& deltaTime) const override final; /// Create or update hit object in the collection - virtual G4bool ManageScintHit(TileHitData& hitData) const override final; + virtual G4bool ManageScintHit(TileHitData& hitData, double deltaTime) const override final; /// Used by FastCaloSimParamAction virtual TileMicroHit GetTileMicroHit(const G4Step*, TileHitData& hitData) const override final; /// @@ -72,8 +72,8 @@ public: /// Method used by TileFastCaloSim/TileFCSmStepToTileHitVec virtual void pmtEdepFromFCS_StepInfo(TileHitData& hitData, double ene, double yLocal, double halfYLocal, double zLocal, int uShape) const override final; private: - void CreateScintHit(int pmt, TileHitData& hitData) const; - void UpdateScintHit(int pmt, TileHitData& hitData) const; + void CreateScintHit(int pmt, TileHitData& hitData, double deltaTime) const; + void UpdateScintHit(int pmt, TileHitData& hitData, double deltaTime) const; int getUshapeFromGM() const; @@ -106,8 +106,8 @@ private: TileSDOptions m_options; - /** @brief granularity in time for hits */ - mutable double m_deltaT; // FIXME set during initialize, then reset during MakePmtEdepTime + /** @brief Keep hit time */ + bool m_keepHitTime; /** @brief Structure holding the attenuation lengths */ std::unique_ptr<TileRow> m_row; diff --git a/TileCalorimeter/TileGeoModel/src/TileDetectorTool.cxx b/TileCalorimeter/TileGeoModel/src/TileDetectorTool.cxx index 80664b0de642c0943c5078cc9aeba846b4b607db..4d0a76296e5493286c1c70df474de8c246fef53d 100755 --- a/TileCalorimeter/TileGeoModel/src/TileDetectorTool.cxx +++ b/TileCalorimeter/TileGeoModel/src/TileDetectorTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "TileGeoModel/TileDetectorTool.h" @@ -216,15 +216,6 @@ StatusCode TileDetectorTool::initIds() StatusCode TileDetectorTool::createElements() { - // ----------------- Fill in the readout part of detector manager ----------- - const TileID* tileID = m_manager->get_id(); - const TileHWID* tileHWID = m_manager->get_hwid(); - bool do_checks = tileID->do_checks(); - - tileID->set_do_checks(true); - m_manager->create_elements(); - tileID->set_do_checks(do_checks); - tileHWID->set_do_checks(false); - + m_manager->create_elements(true); return StatusCode::SUCCESS; } diff --git a/TileCalorimeter/TileRec/TileRec/TileAANtuple.h b/TileCalorimeter/TileRec/TileRec/TileAANtuple.h index cac40af3ffe43c47bdf54628fd0c67e4c760e961..df20a467ffbd94c2b7e09f5538aaa6ec747a581b 100755 --- a/TileCalorimeter/TileRec/TileRec/TileAANtuple.h +++ b/TileCalorimeter/TileRec/TileRec/TileAANtuple.h @@ -247,8 +247,8 @@ class TileAANtuple : public AthAlgorithm { short m_rodBCID[N_ROS][N_MODULES] = {{0}}; short m_fragSize[N_ROS][N_MODULES] = {{0}}; - uint16_t m_dmuMask[N_ROS][N_MODULES][2] = {{0}}; - uint16_t m_slinkCRC[N_ROS][N_MODULES][2] = {{0}}; + uint16_t m_dmuMask[N_ROS][N_MODULES][2] = {{{0}}}; + uint16_t m_slinkCRC[N_ROS][N_MODULES][2] = {{{0}}}; uint32_t m_DMUheader[N_ROS2][N_MODULES][N_DMUS] = {{{0}}}; short m_DMUbcid[N_ROS2][N_MODULES][N_DMUS] = {{{0}}}; @@ -295,8 +295,8 @@ class TileAANtuple : public AthAlgorithm { float m_pedDsp[N_ROS2][N_MODULES][N_CHANS] = {{{0}}}; float m_chi2Dsp[N_ROS2][N_MODULES][N_CHANS] = {{{0}}}; - float m_eMF[N_ROS2][N_MODULES][N_CHANS][N_SAMPLES] = {{{0}}}; - float m_tMF[N_ROS2][N_MODULES][N_CHANS][N_SAMPLES] = {{{0}}}; + float m_eMF[N_ROS2][N_MODULES][N_CHANS][N_SAMPLES] = {{{{0}}}}; + float m_tMF[N_ROS2][N_MODULES][N_CHANS][N_SAMPLES] = {{{{0}}}}; float m_chi2MF[N_ROS2][N_MODULES][N_CHANS] = {{{0}}}; float m_pedMF[N_ROS2][N_MODULES][N_CHANS] = {{{0}}}; diff --git a/TileCalorimeter/TileRecAlgs/share/jobOptions_TileEventSelector.py b/TileCalorimeter/TileRecAlgs/share/jobOptions_TileEventSelector.py index e6bf7df2ea6e85506c8b4d8242c5f8122b27e9d0..f4aca096b0dadc6127000aeccb41ff403f49d16d 100644 --- a/TileCalorimeter/TileRecAlgs/share/jobOptions_TileEventSelector.py +++ b/TileCalorimeter/TileRecAlgs/share/jobOptions_TileEventSelector.py @@ -204,7 +204,7 @@ if not ReadESD: include.block("TrigT1CaloCalibTools/DecorateL1CaloTriggerTowers_prodJobOFragment.py") if 'ForceTimeStamp' in dir(): - include.block("LumiBlockComps/LumiBlockMuWriter_jobOptions.py") + # include.block("LumiBlockComps/LumiBlockMuWriter_jobOptions.py") # this has been removed since not needed for xAOD::EventInfo include.block("RecBackgroundAlgs/RecBackground_jobOptions.py") diff --git a/TileCalorimeter/TileRecUtils/src/TileCellBuilderFromHit.cxx b/TileCalorimeter/TileRecUtils/src/TileCellBuilderFromHit.cxx index 963b10738795350c69f054bd5aab17b574b83724..f9e659bfd78485fda19a243c71c1f0eb12a710c5 100644 --- a/TileCalorimeter/TileRecUtils/src/TileCellBuilderFromHit.cxx +++ b/TileCalorimeter/TileRecUtils/src/TileCellBuilderFromHit.cxx @@ -741,13 +741,6 @@ void TileCellBuilderFromHit::build(TileDrawerEvtStatusArray& drawerEvtStatus, TileCellContainer* MBTSCells, TileCellContainer* E4prCells) const { - // disable checks for TileID and remember previous state - // FIXME: const violation; MT problem. - bool do_checks = m_tileID->do_checks(); - m_tileID->set_do_checks(false); - bool do_checks_tb = m_tileID->do_checks(); - m_tileTBID->set_do_checks(false); - /* zero all counters and sums */ int nTwo = 0; int nCell = 0; @@ -1217,11 +1210,6 @@ void TileCellBuilderFromHit::build(TileDrawerEvtStatusArray& drawerEvtStatus, msg(MSG::DEBUG) << endmsg; } - - m_tileID->set_do_checks(do_checks); - // set back this flag to TileID - m_tileTBID->set_do_checks(do_checks_tb); - } #undef NEWTILECELL diff --git a/TileCalorimeter/TileSimAlgs/TileSimAlgs/TileDigitsFromPulse.h b/TileCalorimeter/TileSimAlgs/TileSimAlgs/TileDigitsFromPulse.h index a9fa8ce47c34323b256b4a17d0fa682e77d72761..d2371cf227ca6e596bd154e442ccc810986ddd18 100644 --- a/TileCalorimeter/TileSimAlgs/TileSimAlgs/TileDigitsFromPulse.h +++ b/TileCalorimeter/TileSimAlgs/TileSimAlgs/TileDigitsFromPulse.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ //**************************************************************************** @@ -74,7 +74,7 @@ class TilePulseShape; class TileHWID; class TileInfo; -class IAtRndmGenSvc; +class IAthRNGSvc; class TH1F; class TFile; @@ -114,8 +114,7 @@ private: SG::WriteHandleKey<TileRawChannelContainer> m_rawChannelContainerKey{this, "TileRawChannelContainer", "TrueAmp", "Output Tile raw channel container key"}; - CLHEP::HepRandomEngine * m_pHRengine; //!< Random number generator engine to use - ServiceHandle <IAtRndmGenSvc> m_rndmSvc; //!< Random number service to use + ServiceHandle <IAthRNGSvc> m_rndmSvc{this, "RndmSvc", "AthRNGSvc", ""}; //!< Random number service to use //Parameters diff --git a/TileCalorimeter/TileSimAlgs/TileSimAlgs/TileDigitsMaker.h b/TileCalorimeter/TileSimAlgs/TileSimAlgs/TileDigitsMaker.h index 870dfbe8050b3c59c7425bb6c90e725b3758e843..fb7fb3ef82635d6e2cce986907499f0dc6348c35 100644 --- a/TileCalorimeter/TileSimAlgs/TileSimAlgs/TileDigitsMaker.h +++ b/TileCalorimeter/TileSimAlgs/TileSimAlgs/TileDigitsMaker.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ //**************************************************************************** @@ -50,7 +50,7 @@ #include "TileEvent/TileHitContainer.h" -class IAtRndmGenSvc; +class IAthRNGSvc; class PileUpMergeSvc; class TileID; class TileTBID; @@ -153,9 +153,7 @@ class TileDigitsMaker: public AthAlgorithm { int m_binTime0Lo; //!< Index of time=0 bin for low gain pulse shape double m_timeStepLo; //!< Time step in low gain pulse shape: 25.0 / nBinsPerXLo - CLHEP::HepRandomEngine * m_pHRengine; //!< Random number generator engine to use - - ServiceHandle<IAtRndmGenSvc> m_rndmSvc; //!< Random number service to use + ServiceHandle<IAthRNGSvc> m_rndmSvc{this, "RndmSvc", "AthRNGSvc", ""}; //!< Random number service to use ToolHandle<TileCondToolNoiseSample> m_tileToolNoiseSample{this, "TileCondToolNoiseSample", "TileCondToolNoiseSample", "Tile sample noise tool"}; diff --git a/TileCalorimeter/TileSimAlgs/TileSimAlgs/TileHitToRawChannel.h b/TileCalorimeter/TileSimAlgs/TileSimAlgs/TileHitToRawChannel.h index f8dda86c1804c6a8d106f8be4759952eb759cd09..a628d57fb737795014f805265f2f2c566dc0f0b8 100644 --- a/TileCalorimeter/TileSimAlgs/TileSimAlgs/TileHitToRawChannel.h +++ b/TileCalorimeter/TileSimAlgs/TileSimAlgs/TileHitToRawChannel.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ //**************************************************************************** @@ -51,7 +51,7 @@ #include <vector> -class IAtRndmGenSvc; +class IAthRNGSvc; class TileID; class TileTBID; class TileHWID; @@ -111,8 +111,7 @@ class TileHitToRawChannel: public AthAlgorithm { double m_threshHi; //!< Value of the mimimal amplitude required to do the conversion to raw channel in high gain (not used for low gain) double m_ampMaxHi; //!< Value of the maximum amplitude to be stored as a high gain channel. For larger amplitudes, the channel is converted to low gain - IAtRndmGenSvc * m_atRndmGenSvc; //!< Random number generator engine to use - CLHEP::HepRandomEngine * m_pHRengine; //!< Random number service to use + ServiceHandle<IAthRNGSvc> m_atRndmGenSvc{this, "RndmSvc", "AthRNGSvc", ""}; //!< Random number generator engine to use ToolHandle<TileCondToolEmscale> m_tileToolEmscale{this, "TileCondToolEmscale", "TileCondToolEmscale", "Tile EM scale calibration tool"}; diff --git a/TileCalorimeter/TileSimAlgs/TileSimAlgs/TileHitToTTL1.h b/TileCalorimeter/TileSimAlgs/TileSimAlgs/TileHitToTTL1.h index d40163eb4a7a44e0eaa39b6c41afb770779c6354..faae77d0af7d8772c2247aafc70e5ec7b5b2ff64 100644 --- a/TileCalorimeter/TileSimAlgs/TileSimAlgs/TileHitToTTL1.h +++ b/TileCalorimeter/TileSimAlgs/TileSimAlgs/TileHitToTTL1.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ //**************************************************************************** @@ -42,11 +42,9 @@ #include "GaudiKernel/ToolHandle.h" #include "GaudiKernel/ServiceHandle.h" -#include "CLHEP/Random/RandomEngine.h" - #include <string> -class IAtRndmGenSvc; +class IAthRNGSvc; class TileID; class TileTBID; class TileHWID; @@ -118,9 +116,7 @@ class TileHitToTTL1: public AthAlgorithm { bool m_tileNoise; //!< If true => generate noise for the TileTTL1 creation bool m_tileThresh; //!< If true => apply threshold on the conversion to TileTTL1 - CLHEP::HepRandomEngine* m_pHRengine; //!< Random number service to use - - ServiceHandle<IAtRndmGenSvc> m_rndmSvc; //!< Random number generator engine to use + ServiceHandle<IAthRNGSvc> m_rndmSvc{this, "RndmSvc", "AthRNGSvc", ""}; //!< Random number generator engine to use ToolHandle<TileCondToolEmscale> m_tileToolEmscale{this, "TileCondToolEmscale", "TileCondToolEmscale", "Tile EM scale calibration tool"}; diff --git a/TileCalorimeter/TileSimAlgs/TileSimAlgs/TileHitVecToCntTool.h b/TileCalorimeter/TileSimAlgs/TileSimAlgs/TileHitVecToCntTool.h index fa3f0d0525305535c99cdd1fb39d3f20b761d091..a8a7ed378dae47b0427f4d299aa044eb8d677fd6 100644 --- a/TileCalorimeter/TileSimAlgs/TileSimAlgs/TileHitVecToCntTool.h +++ b/TileCalorimeter/TileSimAlgs/TileSimAlgs/TileHitVecToCntTool.h @@ -37,7 +37,8 @@ // Athena includes #include "PileUpTools/PileUpToolBase.h" #include "StoreGate/WriteHandleKey.h" -#include "AthenaKernel/IAtRndmGenSvc.h" +#include "AthenaKernel/IAthRNGSvc.h" + #include "AthenaKernel/ITriggerTime.h" // Gaudi includes @@ -94,8 +95,8 @@ class TileHitVecToCntTool: public PileUpToolBase { StatusCode createContainers(); void processHitVectorForOverlay(const TileHitVector* inputHits, int& nHit, double& eHitTot); void processHitVectorForPileUp(const TileHitVector* inputHits, double SubEvtTimOffset, int& nHit, double& eHitTot, bool isSignal = false); - void processHitVectorWithoutPileUp(const TileHitVector* inputHits, int& nHit, double& eHitTot, TileHitNonConstContainer* &hitCont); - double applyPhotoStatistics(double energy, Identifier pmt_id); //!< Method to apply photostatistics effect + void processHitVectorWithoutPileUp(const TileHitVector* inputHits, int& nHit, double& eHitTot, TileHitNonConstContainer* &hitCont, CLHEP::HepRandomEngine * engine); + double applyPhotoStatistics(double energy, Identifier pmt_id, CLHEP::HepRandomEngine * engine); //!< Method to apply photostatistics effect void findAndMergeE1(TileHitCollection* coll, int frag_id, TileHitNonConstContainer* &hitCont); void findAndMergeMBTS(TileHitCollection* coll, int frag_id, TileHitNonConstContainer* &hitCont); @@ -131,8 +132,7 @@ class TileHitVecToCntTool: public PileUpToolBase { const TileDetDescrManager* m_tileMgr; //!< Pointer to TileDetDescrManager float m_nPhotoElectrons[7]; //!< number of photo electrons per GeV in samplings - CLHEP::HepRandomEngine* m_pHRengine; //!< Random number service to use - ServiceHandle<IAtRndmGenSvc> m_rndmSvc; //!< Random number generator engine to use + ServiceHandle<IAthRNGSvc> m_rndmSvc{this, "RndmSvc", "AthRNGSvc", ""}; //!< Random number generator engine to use std::vector<TileHit*> m_allHits; //!< vector for all TileHits std::vector<TileHit*> m_allHits_DigiHSTruth; //!< vector for all TileHits diff --git a/TileCalorimeter/TileSimAlgs/TileSimAlgs/TilePulseForTileMuonReceiver.h b/TileCalorimeter/TileSimAlgs/TileSimAlgs/TilePulseForTileMuonReceiver.h index 9d0b66c21b1f513dde75cdc4708c88925fa4c419..ddfa17f2d891f8c1500bfaa2200cce06a27d8daf 100644 --- a/TileCalorimeter/TileSimAlgs/TileSimAlgs/TilePulseForTileMuonReceiver.h +++ b/TileCalorimeter/TileSimAlgs/TileSimAlgs/TilePulseForTileMuonReceiver.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ //**************************************************************************** @@ -53,9 +53,7 @@ #include "GaudiKernel/ToolHandle.h" #include "GaudiKernel/ServiceHandle.h" -#include "CLHEP/Random/RandomEngine.h" - -class IAtRndmGenSvc; +class IAthRNGSvc; class PileUpMergeSvc; class HWIdentifier; @@ -127,8 +125,7 @@ class TilePulseForTileMuonReceiver: public AthAlgorithm { // std::vector<double> m_shapeMuonReceiver;//!< Muon receiver pulse shape - CLHEP::HepRandomEngine* m_pHRengine; //!< Random number generator engine to use - ServiceHandle<IAtRndmGenSvc> m_rndmSvc; //!< Random number service to use + ServiceHandle<IAthRNGSvc> m_rndmSvc{this, "RndmSvc", "AthRNGSvc", ""}; //!< Random number service to use ToolHandle<TileCondToolNoiseSample> m_tileToolNoiseSample{this, "TileCondToolNoiseSample", "TileCondToolNoiseSample", "Tile sample noise tool"}; diff --git a/TileCalorimeter/TileSimAlgs/python/TileDigitsGetter.py b/TileCalorimeter/TileSimAlgs/python/TileDigitsGetter.py index 40dd0f6f39e2d9b9516adb95d01ef47fbfb9e44d..f83c2a867bed519d14ae099b961094e38d0987eb 100644 --- a/TileCalorimeter/TileSimAlgs/python/TileDigitsGetter.py +++ b/TileCalorimeter/TileSimAlgs/python/TileDigitsGetter.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration # Author: J. Poveda (Ximo.Poveda@cern.ch) # TileDigits creation from TileHit @@ -65,10 +65,6 @@ class TileDigitsGetter ( Configured ) : theTileDigitsMaker.CalibrationRun=False - # Random number engine - theTileDigitsMaker.RndmSvc=digitizationFlags.rndmSvc() - digitizationFlags.rndmSeedList.addSeed("Tile_DigitsMaker", 4789899, 989240512) - # Save integer numbers in digits vector if not pile-up premixing theTileDigitsMaker.IntegerDigits = not digitizationFlags.PileUpPremixing() diff --git a/TileCalorimeter/TileSimAlgs/python/TileRawChannelFromHitsGetter.py b/TileCalorimeter/TileSimAlgs/python/TileRawChannelFromHitsGetter.py index 3994a819cf73848589dbb568104229aaf1fbde9c..64e2e6748cf1b227a375197fab71d86e4e702125 100644 --- a/TileCalorimeter/TileSimAlgs/python/TileRawChannelFromHitsGetter.py +++ b/TileCalorimeter/TileSimAlgs/python/TileRawChannelFromHitsGetter.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration # Author: J. Poveda (Ximo.Poveda@cern.ch) # TileRawChannel creation from TileHit @@ -65,11 +65,6 @@ class TileRawChannelFromHitsGetter ( Configured ) : objKeyStore.addStreamESD(self.outputType(),self.outputKey()) - # Random number engine - from Digitization.DigitizationFlags import digitizationFlags - digitizationFlags.rndmSeedList.addSeed("Tile_DigitsMaker", 4789899, 989240512) - - # now add algorithm to topSequence # this should always come at the end diff --git a/TileCalorimeter/TileSimAlgs/python/TileSimAlgsConfig.py b/TileCalorimeter/TileSimAlgs/python/TileSimAlgsConfig.py index 8ffb0575f19fcaa98b137d7c0ba1de109ac9c536..6a5cf4fe333cb50e437618e1c6645133167173c2 100644 --- a/TileCalorimeter/TileSimAlgs/python/TileSimAlgsConfig.py +++ b/TileCalorimeter/TileSimAlgs/python/TileSimAlgsConfig.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration from Digitization.DigitizationFlags import digitizationFlags from AthenaCommon import CfgMgr @@ -40,10 +40,6 @@ def TileHitVecToCntTool(name="TileHitVecToCntTool", **kwargs): kwargs.setdefault("HitTimeFlag", 2) kwargs.setdefault("UseTriggerTime", True) - # Random number engine - kwargs.setdefault("RndmSvc", digitizationFlags.rndmSvc()) - digitizationFlags.rndmSeedList.addSeed("Tile_HitVecToCnt", 4789899, 989240512) - if digitizationFlags.doXingByXingPileUp(): # PileUpTool approach kwargs.setdefault("FirstXing", Tile_FirstXing() ) kwargs.setdefault("LastXing", Tile_LastXing() ) diff --git a/TileCalorimeter/TileSimAlgs/share/TileFitDigitization_jobOptions.py b/TileCalorimeter/TileSimAlgs/share/TileFitDigitization_jobOptions.py index e482a3694fcd210ab8e9f90b42d1ea2f117e649a..a022e6194614af6dd1f22a73f163a67997a4432a 100644 --- a/TileCalorimeter/TileSimAlgs/share/TileFitDigitization_jobOptions.py +++ b/TileCalorimeter/TileSimAlgs/share/TileFitDigitization_jobOptions.py @@ -80,11 +80,6 @@ if doTileHitToDigit: theTileDigitsMaker.UseCoolPulseShapes=False theTileDigitsMaker.MaskBadChannels=False theTileDigitsMaker.RndmEvtOverlay=False - - # Random number engine - from Digitization.DigitizationFlags import jobproperties - theTileDigitsMaker.RndmSvc=jobproperties.Digitization.rndmSvc() - jobproperties.Digitization.rndmSeedList.addSeed("Tile_DigitsMaker", 4789899, 989240512) if doTileDigitToRawChannel: diff --git a/TileCalorimeter/TileSimAlgs/share/TileMuonReceiver_jobOptions.py b/TileCalorimeter/TileSimAlgs/share/TileMuonReceiver_jobOptions.py index 01464381ac2d9c2e6bc233d2908c2b73657b4f2c..32f162bbe779ad08fa9b1413f849f8260dc96e70 100644 --- a/TileCalorimeter/TileSimAlgs/share/TileMuonReceiver_jobOptions.py +++ b/TileCalorimeter/TileSimAlgs/share/TileMuonReceiver_jobOptions.py @@ -48,12 +48,9 @@ topSequence += CfgMgr.TilePulseForTileMuonReceiver('TilePulseForTileMuonReceiver , UseCoolPedestal = False , UseCoolPulseShapes = True , TileCondToolPulseShape = toolSvc.TileCondToolMuRcvPulseShape - , TileRawChannelBuilderMF = toolSvc.TileMuRcvRawChannelBuilderMF - , RndmSvc = jobproperties.Digitization.rndmSvc()) + , TileRawChannelBuilderMF = toolSvc.TileMuRcvRawChannelBuilderMF) -jobproperties.Digitization.rndmSeedList.addSeed("Tile_PulseForTileMuonReceiver", 4789899, 989240512) - topSequence += CfgMgr.TileMuonReceiverDecision('TileMuonReceiverDecision' # , OutputLevel = VERBOSE , MuonReceiverEneThreshCellD6Low = 500 diff --git a/TileCalorimeter/TileSimAlgs/share/TileTTL1_jobOptions.py b/TileCalorimeter/TileSimAlgs/share/TileTTL1_jobOptions.py index 4e40fd9f75e0b20f2e4e938a3994bccdae9cfbbc..41f01c71eac43e94b2a68108d678b2abe997270f 100644 --- a/TileCalorimeter/TileSimAlgs/share/TileTTL1_jobOptions.py +++ b/TileCalorimeter/TileSimAlgs/share/TileTTL1_jobOptions.py @@ -5,8 +5,6 @@ from TileSimAlgs.TileTTL1FromHitsGetter import TileTTL1FromHitsGetter theTileTTL1FromHitsGetter = TileTTL1FromHitsGetter() from Digitization.DigitizationFlags import jobproperties -topSequence.TileHitToTTL1.RndmSvc = jobproperties.Digitization.rndmSvc() -jobproperties.Digitization.rndmSeedList.addSeed("Tile_HitToTTL1", 4789899, 989240512) from AthenaCommon.BeamFlags import jobproperties if jobproperties.Beam.beamType == 'cosmics': @@ -17,7 +15,4 @@ if jobproperties.Beam.beamType == 'cosmics': TileTTL1Container = "TileTTL1CosmicsCnt", TileMBTSTTL1Container = "TileMBTSTTL1CosmicsContainer" ) - theTileTTL1Cosmics.RndmSvc=jobproperties.Digitization.rndmSvc() - jobproperties.Digitization.rndmSeedList.addSeed("Tile_TTL1Cosmics", 4789899, 989240512) - topSequence += theTileTTL1Cosmics diff --git a/TileCalorimeter/TileSimAlgs/src/TileDigitsFromPulse.cxx b/TileCalorimeter/TileSimAlgs/src/TileDigitsFromPulse.cxx index d26dac72a08c3c313a736ed9a639bdebe9c3472b..378bdee6eb5117eab0c39205f6009d58d581edfe 100644 --- a/TileCalorimeter/TileSimAlgs/src/TileDigitsFromPulse.cxx +++ b/TileCalorimeter/TileSimAlgs/src/TileDigitsFromPulse.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ //***************************************************************************** @@ -35,7 +35,8 @@ #include "AthAllocators/DataPool.h" #include "PathResolver/PathResolver.h" //Random number service -#include "AthenaKernel/IAtRndmGenSvc.h" +#include "AthenaKernel/IAthRNGSvc.h" +#include "AthenaKernel/RNGWrapper.h" #include <CLHEP/Random/Randomize.h> #include <CLHEP/Units/SystemOfUnits.h> @@ -60,10 +61,7 @@ using CLHEP::RandFlat; TileDigitsFromPulse::TileDigitsFromPulse(std::string name, ISvcLocator* pSvcLocator) : AthAlgorithm(name, pSvcLocator), m_tileHWID(0), - m_tileInfo(0), - m_pHRengine(0), - m_rndmSvc("AtRndmGenSvc", name) - + m_tileInfo(0) { m_rChUnit = TileRawChannelUnit::ADCcounts; m_rChType = TileFragHash::Default; @@ -205,8 +203,6 @@ StatusCode TileDigitsFromPulse::initialize() { if (!m_rndmSvc.retrieve().isSuccess()) { ATH_MSG_FATAL("Could not initialize find Random Number Service."); return StatusCode::FAILURE; - } else { - m_pHRengine = m_rndmSvc->GetEngine("Tile_DigitsMaker"); } if (m_chanNoise) m_gaussNoise = kFALSE; //Make sure channel noise overrides gaussian noise. @@ -223,6 +219,10 @@ StatusCode TileDigitsFromPulse::execute() { ATH_MSG_DEBUG("in execute()"); + // Prepare RNG service + ATHRNG::RNGWrapper* rngWrapper = m_rndmSvc->getEngine(this); + rngWrapper->setSeed( name(), Gaudi::Hive::currentContext() ); + // Create new container for digits auto digitsContainer = std::make_unique<TileMutableDigitsContainer>(true, TileFragHash::Digitizer, @@ -321,8 +321,8 @@ StatusCode TileDigitsFromPulse::execute() { double Hfn1 = m_tileToolNoiseSample->getHfn1(drawerIdx, channel, gain); double Hfn2 = m_tileToolNoiseSample->getHfn2(drawerIdx, channel, gain); double Norm = m_tileToolNoiseSample->getHfnNorm(drawerIdx, channel, gain); - RandGaussQ::shootArray(m_pHRengine, samples.size(), Rndm, 0.0, 1.0); - RandFlat::shootArray(m_pHRengine, 1, Rndm_dG, 0.0, 1.0); + RandGaussQ::shootArray(*rngWrapper, samples.size(), Rndm, 0.0, 1.0); + RandFlat::shootArray(*rngWrapper, 1, Rndm_dG, 0.0, 1.0); for (unsigned int js = 0; js < samples.size(); ++js) { //using the same gaussian(sigma) for all samples in one channel in one event if (Rndm_dG[0] < Norm) diff --git a/TileCalorimeter/TileSimAlgs/src/TileDigitsMaker.cxx b/TileCalorimeter/TileSimAlgs/src/TileDigitsMaker.cxx index 00da31feb79f25699188b479ddf424a81683845d..0f2e466ac388d999c9239231b1f6f3545bc679f0 100644 --- a/TileCalorimeter/TileSimAlgs/src/TileDigitsMaker.cxx +++ b/TileCalorimeter/TileSimAlgs/src/TileDigitsMaker.cxx @@ -34,7 +34,9 @@ // Atlas include #include "AthenaKernel/errorcheck.h" // For the Athena-based random numbers. -#include "AthenaKernel/IAtRndmGenSvc.h" +#include "AthenaKernel/IAthRNGSvc.h" +#include "AthenaKernel/RNGWrapper.h" + #include "AthenaKernel/Units.h" #include "StoreGate/ReadHandle.h" #include "StoreGate/WriteHandle.h" @@ -87,16 +89,13 @@ TileDigitsMaker::TileDigitsMaker(std::string name, ISvcLocator* pSvcLocator) m_nShapeLo(0), m_nBinsPerXLo(0), m_binTime0Lo(0), - m_timeStepLo(0.0), - m_pHRengine(0), - m_rndmSvc ("AtRndmGenSvc", name) + m_timeStepLo(0.0) { declareProperty("FilterThreshold", m_filterThreshold = 100.0 * MeV, "Threshold on filtered digits (default - 100 MeV)"); declareProperty("FilterThresholdMBTS", m_filterThresholdMBTS = 0.0 * MeV, "Threshold on filtered digits of MBTS (default - 0 MeV)"); declareProperty("TileInfoName", m_infoName = "TileInfo"); declareProperty("IntegerDigits", m_integerDigits = true); declareProperty("CalibrationRun", m_calibRun = false); - declareProperty("RndmSvc", m_rndmSvc, "Random Number Service used in TileDigitsMaker"); declareProperty("RndmEvtOverlay",m_rndmEvtOverlay = false,"Pileup and/or noise added by overlaying random events (default=false)"); declareProperty("UseCoolPulseShapes",m_useCoolPulseShapes = true,"Pulse shapes from database (default=true)"); declareProperty("MaskBadChannels",m_maskBadChannels = false,"Remove channels tagged bad (default=false)"); @@ -173,7 +172,6 @@ StatusCode TileDigitsMaker::initialize() { if (m_tileNoise || m_tileCoherNoise || m_rndmEvtOverlay) { ATH_CHECK( m_rndmSvc.retrieve()); - m_pHRengine = m_rndmSvc->GetEngine("Tile_DigitsMaker"); } ATH_MSG_DEBUG( "Event Overlay: " << ((m_rndmEvtOverlay)?"true":"false")); @@ -361,6 +359,13 @@ StatusCode TileDigitsMaker::execute() { const EventContext& ctx = Gaudi::Hive::currentContext(); + // Prepare RNG service + ATHRNG::RNGWrapper* rngWrapper = nullptr; + if (m_tileNoise || m_tileCoherNoise || m_rndmEvtOverlay) { + rngWrapper = m_rndmSvc->getEngine(this); + rngWrapper->setSeed( name(), ctx ); + } + static bool first = (msgLvl(MSG::VERBOSE) && !m_rndmEvtOverlay ); if (first) { ATH_MSG_VERBOSE( "Dumping 2G noise parameters"); @@ -802,13 +807,13 @@ StatusCode TileDigitsMaker::execute() { //NOTE: ShootArray's inputs are : the engine, the size, the vector, the mean, the standard dev for (int k = 0; k < m_nSamples; ++k) { double * RndmVec = CorrRndmVec[k]; - RandGaussQ::shootArray(m_pHRengine, nchMax, RndmVec, 0.0, 1.0); + RandGaussQ::shootArray(*rngWrapper, nchMax, RndmVec, 0.0, 1.0); } if (m_calibRun) { for (int k = 0; k < m_nSamples; ++k) { double * RndmVecLo = CorrRndmVecLo[k]; - RandGaussQ::shootArray(m_pHRengine, nchMax, RndmVecLo, 0.0, 1.0); + RandGaussQ::shootArray(*rngWrapper, nchMax, RndmVecLo, 0.0, 1.0); } } } @@ -891,11 +896,11 @@ StatusCode TileDigitsMaker::execute() { /* If tileNoise is requested, generate array of random numbers. */ if (tileNoiseLG) { // true if tileNoise is set or noise is needed for low gain in overlay - RandGaussQ::shootArray(m_pHRengine, m_nSamples, Rndm, 0.0, 1.0); - RandFlat::shootArray(m_pHRengine, 1, Rndm_dG, 0.0, 1.0); + RandGaussQ::shootArray(*rngWrapper, m_nSamples, Rndm, 0.0, 1.0); + RandFlat::shootArray(*rngWrapper, 1, Rndm_dG, 0.0, 1.0); if (m_calibRun) { - RandGaussQ::shootArray(m_pHRengine, m_nSamples, RndmLo, 0.0, 1.0); - RandFlat::shootArray(m_pHRengine, 1, RndmLo_dG, 0.0, 1.0); + RandGaussQ::shootArray(*rngWrapper, m_nSamples, RndmLo, 0.0, 1.0); + RandFlat::shootArray(*rngWrapper, 1, RndmLo_dG, 0.0, 1.0); } } diff --git a/TileCalorimeter/TileSimAlgs/src/TileHitToRawChannel.cxx b/TileCalorimeter/TileSimAlgs/src/TileHitToRawChannel.cxx index 8a2a56261508656b374e416529fef978b134a7a6..f42a18023d5222499c0642de261bc541ef471c76 100644 --- a/TileCalorimeter/TileSimAlgs/src/TileHitToRawChannel.cxx +++ b/TileCalorimeter/TileSimAlgs/src/TileHitToRawChannel.cxx @@ -34,7 +34,8 @@ #include "StoreGate/WriteHandle.h" #include "AthenaKernel/errorcheck.h" // For the Athena-based random numbers. -#include "AthenaKernel/IAtRndmGenSvc.h" +#include "AthenaKernel/IAthRNGSvc.h" +#include "AthenaKernel/RNGWrapper.h" //CLHEP includes #include <CLHEP/Random/Randomize.h> @@ -59,8 +60,6 @@ TileHitToRawChannel::TileHitToRawChannel(std::string name, ISvcLocator* pSvcLoca , m_tileThresh(false) , m_threshHi(0.0) , m_ampMaxHi(0.0) - , m_atRndmGenSvc(0) - , m_pHRengine(0) { m_rChUnit = TileRawChannelUnit::ADCcounts; m_rChType = TileFragHash::Default; @@ -103,9 +102,7 @@ StatusCode TileHitToRawChannel::initialize() { ATH_CHECK( m_tileToolNoiseSample.retrieve() ); if (m_tileNoise) { - static const bool CREATEIFNOTTHERE_RNDM(true); - CHECK( service("AtRndmGenSvc", m_atRndmGenSvc, CREATEIFNOTTHERE_RNDM)); - m_pHRengine = m_atRndmGenSvc->GetEngine("Tile_DigitsMaker"); + ATH_CHECK(m_atRndmGenSvc.retrieve()); } m_cabling = TileCablingService::getInstance(); @@ -169,6 +166,9 @@ StatusCode TileHitToRawChannel::execute() { ATH_MSG_DEBUG( "Executing TileHitToRawChannel" ); + ATHRNG::RNGWrapper* rngWrapper = m_atRndmGenSvc->getEngine(this); + rngWrapper->setSeed( name(), Gaudi::Hive::currentContext() ); + // step1: read hits from TES SG::ReadHandle<TileHitContainer> hitContainer(m_hitContainerKey); ATH_CHECK( hitContainer.isValid() ); @@ -226,7 +226,7 @@ StatusCode TileHitToRawChannel::execute() { // If tileNoise is requested, generate random numbers to give noise if (m_tileNoise) { - RandGaussQ::shootArray(m_pHRengine, nChMax, random, 0.0, 1.0); + RandGaussQ::shootArray(*rngWrapper, nChMax, random, 0.0, 1.0); for (ch = 0; ch < nChMax; ++ch) { adc_gain[ch] = TileID::HIGHGAIN; diff --git a/TileCalorimeter/TileSimAlgs/src/TileHitToTTL1.cxx b/TileCalorimeter/TileSimAlgs/src/TileHitToTTL1.cxx index 6d4dd7210bd9871ec9876d6f6abfb28af17294de..a4946a1d371578e53410b4829af9b1ca92910575 100644 --- a/TileCalorimeter/TileSimAlgs/src/TileHitToTTL1.cxx +++ b/TileCalorimeter/TileSimAlgs/src/TileHitToTTL1.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ //***************************************************************************** @@ -40,7 +40,8 @@ #include "StoreGate/WriteHandle.h" #include "AthenaKernel/errorcheck.h" // For the Athena-based random numbers. -#include "AthenaKernel/IAtRndmGenSvc.h" +#include "AthenaKernel/IAthRNGSvc.h" +#include "AthenaKernel/RNGWrapper.h" // Gaudi includes #include "GaudiKernel/ISvcLocator.h" @@ -74,15 +75,12 @@ TileHitToTTL1::TileHitToTTL1(std::string name, ISvcLocator* pSvcLocator) , m_lastTower(0) , m_tileNoise(false) , m_tileThresh(false) - , m_pHRengine(0) - , m_rndmSvc ("AtRndmGenSvc", name) { m_infoName = "TileInfo"; m_TileTTL1Type = "Standard"; declareProperty("TileInfoName", m_infoName); declareProperty("TileTTL1Type", m_TileTTL1Type); - declareProperty("RndmSvc", m_rndmSvc, "Random Number Service used in TileHitToTTL1"); declareProperty("maskBadChannels", m_maskBadChannels = true); } @@ -113,9 +111,8 @@ StatusCode TileHitToTTL1::initialize() { //=== get TileCondToolEmscale CHECK( m_tileToolEmscale.retrieve() ); - CHECK( m_rndmSvc.retrieve() ); - m_pHRengine = m_rndmSvc->GetEngine("Tile_HitToTTL1"); - + //=== Get rndm number service + ATH_CHECK( m_rndmSvc.retrieve() ); m_cabling = TileCablingService::getInstance(); @@ -214,6 +211,10 @@ StatusCode TileHitToTTL1::execute() { // declare array for random number generation for noise in samples. double Rndm[16]; // Can't use variable size array + // Prepare RNG Service + ATHRNG::RNGWrapper* rngWrapper = m_rndmSvc->getEngine(this); + rngWrapper->setSeed( name(), Gaudi::Hive::currentContext() ); + /*........................................................................*/ // Get hit container from TES and create TTL1 and MBTS container // Note that hit container has 256 collections (one for each drawer), @@ -540,7 +541,7 @@ StatusCode TileHitToTTL1::execute() { double ttL1Max = m_tileInfo->MBTSL1Max(MBTS_id); if (m_tileNoise) - RandGaussQ::shootArray(m_pHRengine, m_MBTSnSamples, Rndm); + RandGaussQ::shootArray(*rngWrapper, m_MBTSnSamples, Rndm); for (int jsamp = 0; jsamp < m_MBTSnSamples; ++jsamp) { MBTSAmp[jsamp] *= ttL1Calib; // convert pCb to mV MBTSsamples[jsamp] = MBTSAmp[jsamp] + ttL1Ped; @@ -596,7 +597,7 @@ StatusCode TileHitToTTL1::execute() { } // end loop over samples if (m_tileNoise) - peakAmp += ttL1NoiseSigma * RandGaussQ::shoot(m_pHRengine); + peakAmp += ttL1NoiseSigma * RandGaussQ::shoot(*rngWrapper); ttL1samples[0] = peakAmp; if (m_tileThresh) { if (ttL1samples[0] - ttL1Ped < ttL1Thresh) @@ -622,7 +623,7 @@ StatusCode TileHitToTTL1::execute() { double ttL1Max = m_tileInfo->TTL1Max(ttId[ieta]); if (m_tileNoise) - RandGaussQ::shootArray(m_pHRengine, m_nSamples, Rndm); + RandGaussQ::shootArray(*rngWrapper, m_nSamples, Rndm); for (int jsamp = 0; jsamp < m_nSamples; ++jsamp) { ttAmp[ieta][jsamp] *= ttL1Calib; // convert pCb to mV ttL1samples[jsamp] = ttAmp[ieta][jsamp] + ttL1Ped; diff --git a/TileCalorimeter/TileSimAlgs/src/TileHitVecToCntTool.cxx b/TileCalorimeter/TileSimAlgs/src/TileHitVecToCntTool.cxx index b78f6245c41b7240f4e81bef79c608625b977c36..3ec21273efb0abf08fa410f2ff2f1c003c199a29 100644 --- a/TileCalorimeter/TileSimAlgs/src/TileHitVecToCntTool.cxx +++ b/TileCalorimeter/TileSimAlgs/src/TileHitVecToCntTool.cxx @@ -31,7 +31,9 @@ #include "AthenaKernel/ITriggerTime.h" #include "AthenaKernel/errorcheck.h" // For the Athena-based random numbers. -#include "AthenaKernel/IAtRndmGenSvc.h" +#include "AthenaKernel/IAthRNGSvc.h" +#include "AthenaKernel/RNGWrapper.h" +#include "CLHEP/Random/RandomEngine.h" // Gaudi includes #include "GaudiKernel/SystemOfUnits.h" @@ -69,8 +71,6 @@ TileHitVecToCntTool::TileHitVecToCntTool(const std::string& type, , m_tileTBID(0) , m_tileInfo(0) , m_tileMgr(0) - , m_pHRengine(0) - , m_rndmSvc("AtRndmGenSvc",name) , m_hits(0) , m_hits_DigiHSTruth(0) , m_mbtsOffset(0) @@ -91,7 +91,6 @@ TileHitVecToCntTool::TileHitVecToCntTool(const std::string& type, declareProperty("MaxHitTime", m_maxHitTime, "All sub-hits with time above m_maxHitTime will be ignored"); declareProperty("PhotostatWindow", m_photoStatisticsWindow, "Sum up energy in [-m_photoStatWindow,+m_photoStatWindow] and use it for photostatistics"); declareProperty("PhotostatType", m_photoElectronStatistics, "Method to apply photostatistics (default=2)"); - declareProperty("RndmSvc", m_rndmSvc, "Random Number Service used in TileHitVecToCnt"); declareProperty("SkipNoHit",m_skipNoHit, "Skip events with no Tile hits (default=false)"); declareProperty("RndmEvtOverlay",m_rndmEvtOverlay = false, "Pileup and/or noise added by overlaying random events (default=false)"); declareProperty("DoHSTruthReconstruction",m_doDigiTruth = true, "DigiTruth reconstruction"); @@ -104,8 +103,7 @@ StatusCode TileHitVecToCntTool::initialize() { bool error = false; - CHECK(m_rndmSvc.retrieve()); - m_pHRengine = m_rndmSvc->GetEngine("Tile_HitVecToCnt"); + ATH_CHECK(m_rndmSvc.retrieve()); // retrieve Tile detector manager, TileID helper and TileInfo from det store @@ -377,6 +375,9 @@ StatusCode TileHitVecToCntTool::prepareEvent(unsigned int /*nInputEvents*/) { ATH_MSG_DEBUG("TileHitVecToCntTool prepareEvent finished"); + ATHRNG::RNGWrapper* rngWrapper = m_rndmSvc->getEngine(this); + rngWrapper->setSeed( name(), Gaudi::Hive::currentContext() ); + return StatusCode::SUCCESS; } @@ -556,7 +557,7 @@ void TileHitVecToCntTool::processHitVectorForPileUp(const TileHitVector* inputHi return; } -void TileHitVecToCntTool::processHitVectorWithoutPileUp(const TileHitVector* inputHits, int& nHit, double& eHitTot, TileHitNonConstContainer* &hitCont) { +void TileHitVecToCntTool::processHitVectorWithoutPileUp(const TileHitVector* inputHits, int& nHit, double& eHitTot, TileHitNonConstContainer* &hitCont, CLHEP::HepRandomEngine * engine) { TileHitVecConstIterator inpItr = inputHits->begin(); TileHitVecConstIterator end = inputHits->end(); @@ -673,7 +674,7 @@ void TileHitVecToCntTool::processHitVectorWithoutPileUp(const TileHitVector* inp } } ATH_MSG_DEBUG("Minimal time in input event " << avtime); - double shift = RandFlat::shoot(m_pHRengine, m_triggerTime, 0.0); + double shift = RandFlat::shoot(engine, m_triggerTime, 0.0); ATH_MSG_DEBUG("Minimal time after random shift " << shift); avtime -= shift; // subtracting negative shift value here @@ -760,6 +761,9 @@ StatusCode TileHitVecToCntTool::processBunchXing(int bunchXing ATH_MSG_DEBUG("Inside TileHitVecToCntTool processBunchXing" << bunchXing); // setFilterPassed(true); + ATHRNG::RNGWrapper* rngWrapper = m_rndmSvc->getEngine(this); + CLHEP::HepRandomEngine * engine = *rngWrapper; + SubEventIterator iEvt(bSubEvents); if (m_rndmEvtOverlay && bunchXing != 0) iEvt = eSubEvents; // in overlay skip all events except BC=0 @@ -789,7 +793,7 @@ StatusCode TileHitVecToCntTool::processBunchXing(int bunchXing } else { ATH_MSG_DEBUG(" New HitCont. TimeOffset=" << SubEvtTimOffset << ", size =" << inputHits->size()); this->processHitVectorForOverlay(inputHits, nHit, eHitTot); - //if( m_doDigiTruth && iEvt == bSubEvents) this->processHitVectorWithoutPileUp(inputHits, nHit, eHitTot, m_signalHits); + //if( m_doDigiTruth && iEvt == bSubEvents) this->processHitVectorWithoutPileUp(inputHits, nHit, eHitTot, m_signalHits, engine); } } else if (m_pileUp) { // pileup code bool isSignal = false; @@ -805,8 +809,8 @@ StatusCode TileHitVecToCntTool::processBunchXing(int bunchXing ATH_MSG_ERROR(" Tile Hit container not found for event key " << hitVectorName); } - this->processHitVectorWithoutPileUp(inputHits, nHit, eHitTot, m_hits); - if(m_doDigiTruth) this->processHitVectorWithoutPileUp(inputHits, nHit, eHitTot, m_hits_DigiHSTruth); + this->processHitVectorWithoutPileUp(inputHits, nHit, eHitTot, m_hits, engine); + if(m_doDigiTruth) this->processHitVectorWithoutPileUp(inputHits, nHit, eHitTot, m_hits_DigiHSTruth, engine); } // to pile-up or not } // end of the loop over different input hitVectorNames (normal hits and MBTS hits) @@ -831,6 +835,9 @@ StatusCode TileHitVecToCntTool::processAllSubEvents() { int nHit(0); double eHitTot(0.0); + ATHRNG::RNGWrapper* rngWrapper = m_rndmSvc->getEngine(this); + CLHEP::HepRandomEngine * engine = *rngWrapper; + std::vector<std::string>::const_iterator hitVecNamesItr = m_hitVectorNames.begin(); std::vector<std::string>::const_iterator hitVecNamesEnd = m_hitVectorNames.end(); for (; hitVecNamesItr != hitVecNamesEnd; ++hitVecNamesItr) { @@ -860,7 +867,7 @@ StatusCode TileHitVecToCntTool::processAllSubEvents() { const TileHitVector* inputHits = &(*(iCont->second)); ATH_MSG_DEBUG(" New HitCont. TimeOffset=" << SubEvtTimOffset << ", size =" << inputHits->size()); this->processHitVectorForOverlay(inputHits, nHit, eHitTot); - if(m_doDigiTruth) this->processHitVectorWithoutPileUp(inputHits, nHit, eHitTot, m_hits_DigiHSTruth); + if(m_doDigiTruth) this->processHitVectorWithoutPileUp(inputHits, nHit, eHitTot, m_hits_DigiHSTruth, engine); } } } else if (m_pileUp) { // pileup code @@ -886,8 +893,8 @@ StatusCode TileHitVecToCntTool::processAllSubEvents() { ATH_MSG_WARNING("Hit Vector "<< hitVectorName << " not found in StoreGate"); continue; // continue to the next hit vector } - this->processHitVectorWithoutPileUp(inputHits, nHit, eHitTot, m_hits); - if(m_doDigiTruth) this->processHitVectorWithoutPileUp(inputHits, nHit, eHitTot, m_hits_DigiHSTruth); + this->processHitVectorWithoutPileUp(inputHits, nHit, eHitTot, m_hits, engine); + if(m_doDigiTruth) this->processHitVectorWithoutPileUp(inputHits, nHit, eHitTot, m_hits_DigiHSTruth, engine); } } // end of the loop over different input hitVectorNames (normal hits and MBTS hits) @@ -960,6 +967,9 @@ StatusCode TileHitVecToCntTool::mergeEvent() { //photoelectron statistics. //loop over all hits in TileHitContainer and take energy deposited in certain period of time //std::vector<std::string>::const_iterator hitVecNamesEnd = m_hitVectorNames.end(); + + ATHRNG::RNGWrapper* rngWrapper = m_rndmSvc->getEngine(this); + CLHEP::HepRandomEngine * engine = *rngWrapper; TileHitNonConstContainer::iterator collIt_DigiHSTruth; TileHitNonConstContainer::iterator endColl_DigiHSTruth; @@ -990,7 +1000,7 @@ StatusCode TileHitVecToCntTool::mergeEvent() { //channel_id = m_cabling->s2h_channel_id(pmt_id); } - double scaleFactor = applyPhotoStatistics(ehit, pmt_id); + double scaleFactor = applyPhotoStatistics(ehit, pmt_id, engine); pHit->scale(scaleFactor); if(m_doDigiTruth){ @@ -1071,7 +1081,7 @@ StatusCode TileHitVecToCntTool::finalize() { } -double TileHitVecToCntTool::applyPhotoStatistics(double energy, Identifier pmt_id) { +double TileHitVecToCntTool::applyPhotoStatistics(double energy, Identifier pmt_id, CLHEP::HepRandomEngine * engine) { // pmt_sample = 0-3 for normal cells 4 for inner MBTS, 5 for outer MBTS, 6 for E4' int pmt_sample = (m_tileTBID->is_tiletb(pmt_id)) ? TileID::SAMP_X + m_tileTBID->channel(pmt_id) : m_tileID->sample(pmt_id); @@ -1081,19 +1091,19 @@ double TileHitVecToCntTool::applyPhotoStatistics(double energy, Identifier pmt_i switch (m_photoElectronStatistics) { case 2: if (pe > 20.0) { - RndmPois = std::max(0.0, RandGaussQ::shoot(m_pHRengine, pe, sqrt(pe))); // FIXME CLHEP::RandGaussZiggurat is faster and more accurate. + RndmPois = std::max(0.0, RandGaussQ::shoot(engine, pe, sqrt(pe))); // FIXME CLHEP::RandGaussZiggurat is faster and more accurate. pe_scale = RndmPois / pe; } else { // pe<=20 if (pe > 0.) { double singleMEAN = 1.0; //Parameterization of monoelectron spectra double singleSIGMA = 1.0; - RndmPois = RandPoissonT::shoot(m_pHRengine, pe); + RndmPois = RandPoissonT::shoot(engine, pe); if (RndmPois > 0) { pe_scale = 0; for (int i = 0; i < RndmPois; i++) - pe_scale += 1 / (1.08332) * std::max(0., RandGaussQ::shoot(m_pHRengine, singleMEAN, singleSIGMA)); // FIXME CLHEP::RandGaussZiggurat is faster and more accurate. + pe_scale += 1 / (1.08332) * std::max(0., RandGaussQ::shoot(engine, singleMEAN, singleSIGMA)); // FIXME CLHEP::RandGaussZiggurat is faster and more accurate. pe_scale /= RndmPois; } else @@ -1104,7 +1114,7 @@ double TileHitVecToCntTool::applyPhotoStatistics(double energy, Identifier pmt_i case 0: if (pe > 0.0) { - RndmPois = RandPoissonT::shoot(m_pHRengine, pe); + RndmPois = RandPoissonT::shoot(engine, pe); pe_scale = RndmPois / pe; } break; @@ -1112,7 +1122,7 @@ double TileHitVecToCntTool::applyPhotoStatistics(double energy, Identifier pmt_i case 1: if (pe > 0.0) { if (pe > 10.0) { - RndmPois = std::max(0.0, RandGaussQ::shoot(m_pHRengine, pe, sqrt(pe))); // FIXME CLHEP::RandGaussZiggurat is faster and more accurate. + RndmPois = std::max(0.0, RandGaussQ::shoot(engine, pe, sqrt(pe))); // FIXME CLHEP::RandGaussZiggurat is faster and more accurate. } else { int nn = std::max(10, (int) (pe * 10.0)); double * ProbFunc = new double[nn]; @@ -1121,7 +1131,7 @@ double TileHitVecToCntTool::applyPhotoStatistics(double energy, Identifier pmt_i ProbFunc[i] = ProbFunc[i - 1] * pe / i; } RandGeneral* RandG = new RandGeneral(ProbFunc, nn, 0); - RndmPois = RandG->shoot(m_pHRengine) * nn; + RndmPois = RandG->shoot(engine) * nn; //here RndmPois is continuously distributed random value obtained from Poisson //distribution by approximation. delete RandG; diff --git a/TileCalorimeter/TileSimAlgs/src/TileMuonReceiverDecision.cxx b/TileCalorimeter/TileSimAlgs/src/TileMuonReceiverDecision.cxx index ac75cea888b94fa26a1450a9f037a79a4bb54b1b..8c9fcd54db9288b92175460beeddc56e013808b4 100644 --- a/TileCalorimeter/TileSimAlgs/src/TileMuonReceiverDecision.cxx +++ b/TileCalorimeter/TileSimAlgs/src/TileMuonReceiverDecision.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ //**************************************************************************** @@ -36,8 +36,6 @@ #include "StoreGate/ReadHandle.h" #include "StoreGate/WriteHandle.h" #include "AthenaKernel/errorcheck.h" -#include "AthenaKernel/IAtRndmGenSvc.h" - TileMuonReceiverDecision::TileMuonReceiverDecision(std::string name, ISvcLocator* pSvcLocator) : AthAlgorithm(name, pSvcLocator), diff --git a/TileCalorimeter/TileSimAlgs/src/TilePulseForTileMuonReceiver.cxx b/TileCalorimeter/TileSimAlgs/src/TilePulseForTileMuonReceiver.cxx index c7c9dfec82dbb39f168c53839e7914fda11a1f27..d532b76cb6b57e8073221d0c8fd804da192509f3 100644 --- a/TileCalorimeter/TileSimAlgs/src/TilePulseForTileMuonReceiver.cxx +++ b/TileCalorimeter/TileSimAlgs/src/TilePulseForTileMuonReceiver.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ //*************************************************************************************** @@ -48,7 +48,9 @@ #include "StoreGate/ReadHandle.h" #include "StoreGate/WriteHandle.h" #include "AthenaKernel/errorcheck.h" -#include "AthenaKernel/IAtRndmGenSvc.h" +#include "AthenaKernel/IAthRNGSvc.h" +#include "AthenaKernel/RNGWrapper.h" + // external #include <CLHEP/Random/Randomize.h> @@ -76,8 +78,6 @@ TilePulseForTileMuonReceiver::TilePulseForTileMuonReceiver(std::string name, ISv , m_nBinsPerX(0) , m_binTime0(0) , m_timeStep(0.0) - , m_pHRengine(0) - , m_rndmSvc("AtRndmGenSvc", name) , m_MuRcvBuildTool("TileRawChannelBuilderMF") , m_run2(true) { @@ -89,7 +89,6 @@ TilePulseForTileMuonReceiver::TilePulseForTileMuonReceiver(std::string name, ISv declareProperty("UseCoolPulseShapes" , m_useCoolPulseShapes = false, "Pulse shapes from database (default=false)"); declareProperty("UseCoolNoise" , m_tileNoise = false, "Noise from database (default=false)"); declareProperty("UseCoolPedestal" , m_tilePedestal = false, "Pedestal from database (default=false)"); - declareProperty("RndmSvc" , m_rndmSvc, "Random Number Service used in TilePulseForTileMuonReceiver"); declareProperty("TileRawChannelBuilderMF" , m_MuRcvBuildTool, "The tool by default is the Matched Filter"); } @@ -136,7 +135,7 @@ StatusCode TilePulseForTileMuonReceiver::initialize() { << " ADC saturation value: " << m_adcMax << " TileCal Threshold LOW GAIN: " << m_tileThresh); - m_pHRengine = m_rndmSvc->GetEngine("Tile_PulseForTileMuonReceiver"); + ATH_CHECK(m_rndmSvc.retrieve()); m_nShape = m_tileInfo->MuRcvNBins(); m_nBinsPerX = m_tileInfo->MuRcvBinsPerX(); @@ -263,6 +262,10 @@ StatusCode TilePulseForTileMuonReceiver::execute() { // std::vector<float> digitsBuffer(m_nSamples); + // Prepare RNG service + ATHRNG::RNGWrapper* rngWrapper = m_rndmSvc->getEngine(this); + rngWrapper->setSeed( name(), Gaudi::Hive::currentContext() ); + ///////////////////////////////////////////////////////////////////////////////// // (a.0) iterate over collections in the HIT container: access 'ros' and 'drawer' // @@ -496,7 +499,7 @@ StatusCode TilePulseForTileMuonReceiver::execute() { // Generate an array to randomize the noise for each digit // - RandGaussQ::shootArray(m_pHRengine, m_nSamples, Rndm, 0.0, 1.0); + RandGaussQ::shootArray(*rngWrapper, m_nSamples, Rndm, 0.0, 1.0); ATH_MSG_VERBOSE( "(D.02) Pulse digits [MeV]:" << " " << pDigitSamples[0] @@ -531,7 +534,7 @@ StatusCode TilePulseForTileMuonReceiver::execute() { // Collecting noise from the database // if (m_tileNoise) { - RandFlat::shootArray(m_pHRengine, 1, Rndm_dG, 0.0, 1.0); + RandFlat::shootArray(*rngWrapper, 1, Rndm_dG, 0.0, 1.0); sigma_Hfn1 = m_tileToolNoiseSample->getHfn1(idhash, TMDBchan, TileID::LOWGAIN); sigma_Hfn2 = m_tileToolNoiseSample->getHfn2(idhash, TMDBchan, TileID::LOWGAIN); if (sigma_Hfn1 > 0 || sigma_Hfn2) { diff --git a/TileCalorimeter/TileSvc/TileByteStream/src/TileROD_Decoder.cxx b/TileCalorimeter/TileSvc/TileByteStream/src/TileROD_Decoder.cxx index 17700bc65db9a5144c2eee8c7d1e4e741bb0e61c..fdb83180149714906a05865f330adb564ae49f02 100644 --- a/TileCalorimeter/TileSvc/TileByteStream/src/TileROD_Decoder.cxx +++ b/TileCalorimeter/TileSvc/TileByteStream/src/TileROD_Decoder.cxx @@ -2415,20 +2415,27 @@ void TileROD_Decoder::unpack_frag17(uint32_t /* version */, // p[2] 00 00 00 tt Daq Type // p[3] nn nn nn nn Laser Count // p[4] rr rr mm mm rrrr = Requested Intensity mmmm = measured intensity - // p[5] 00 0f dd dd f = filter dddd = Delay Slama + // p[5] t0 0f dd dd t= timeout (bit 31 and 30) f = filter dddd = Delay Slama // [[6] 00 00 ll ll Linearity DAC Value - laserObject.setLaser(p[3], (p[4]>>16), (p[4] & 0xFFFF), (p[5]>>16) & 0x000F, (p[5] & 0xFFFF), 2); - laserObject.setControl(-99,-99,-99,-99,-99,-99,-99,-99,-99,-99); - laserObject.setPLC(-99,-99,-99,-99,-99,-99); - laserObject.setDaqType(int(p[2])); ATH_MSG_DEBUG("SETTING DAQ TYPE IN DECODER = " << MSG::hex << "0x" << int(p[2]) << " " << MSG::dec << int(p[2])); int countr = p[3]; int idiode = (p[4]>>16); + int intensity = (p[4]&0xFFFF); int filter = (p[5]>>16) & 0x000F; + bool qdctimeout = !((p[5]>>31) & 0x1); + bool tdctimeout = !((p[5]>>30) & 0x1); + int timing = (p[5] & 0xFFFF); int daqtyp = p[2]; + + laserObject.setLaser(countr, idiode, intensity, filter, timing, 2); + laserObject.setControl(-99,-99,-99,-99,-99,-99,-99,-99,-99,-99); + laserObject.setPLC(-99,-99,-99,-99,-99,-99); + laserObject.setDaqType(daqtyp); + laserObject.setTimeouts(qdctimeout, tdctimeout); + if(laserObject.isLASERII()) ATH_MSG_DEBUG("LASERII VERSION IS " << laserObject.getVersion()); else ATH_MSG_DEBUG("LASERI VERSION IS " << laserObject.getVersion()); diff --git a/Tools/PROCTools/python/RunTier0Tests.py b/Tools/PROCTools/python/RunTier0Tests.py index f2a4701eec0fb11d7bc6800c164994c6a679c961..9909377f77b0e443ecb552efdde15104584dbd37 100755 --- a/Tools/PROCTools/python/RunTier0Tests.py +++ b/Tools/PROCTools/python/RunTier0Tests.py @@ -83,7 +83,7 @@ def RunCleanSTest(stest,input_file,pwd,release,extraArg,CleanRunHeadDir,UniqID): s=stest logging.info("Running clean in rel "+release) - logging.info("\"Sim_tf.py --AMIConfig "+s+" --inputEVNTFile "+ input_file + " --outputHITSFile myHITS.pool.root --imf False " + extraArg+"\"") + logging.info("\"Sim_tf.py --AMIConfig "+s+" --inputEVNTFile "+ input_file + " --outputHITSFile myHITS.pool.root --postInclude 'EVNTtoHITS:PyJobTransforms/UseFrontier.py' --imf False " + extraArg+"\"") CleanDirName="clean_run_"+s+"_"+UniqID @@ -92,11 +92,11 @@ def RunCleanSTest(stest,input_file,pwd,release,extraArg,CleanRunHeadDir,UniqID): " mkdir -p " + CleanDirName +" ;" + " cd " + CleanDirName +" ;" + " source $AtlasSetup/scripts/asetup.sh "+release+" >& /dev/null ;" + - " Sim_tf.py --AMIConfig="+s+" --inputEVNTFile "+input_file + " --outputHITSFile myHITS.pool.root --imf False " +extraArg+" > "+s+".log 2>&1" ) + " Sim_tf.py --AMIConfig="+s+" --inputEVNTFile "+input_file + " --outputHITSFile myHITS.pool.root --postInclude 'EVNTtoHITS:PyJobTransforms/UseFrontier.py' --imf False " +extraArg+" > "+s+".log 2>&1" ) subprocess.call(cmd,shell=True) logging.info("Finished clean in rel "+release) - logging.info("\"Sim_tf.py --AMIConfig "+s+" --inputEVNTFile "+ input_file + " --outputHITSFile myHITS.pool.root --imf False " + extraArg+"\"") + logging.info("\"Sim_tf.py --AMIConfig "+s+" --inputEVNTFile "+ input_file + " --outputHITSFile myHITS.pool.root --postInclude 'EVNTtoHITS:PyJobTransforms/UseFrontier.py' --imf False " + extraArg+"\"") pass def RunPatchedSTest(stest,input_file,pwd,release,extraArg,nosetup=False): @@ -106,7 +106,7 @@ def RunPatchedSTest(stest,input_file,pwd,release,extraArg,nosetup=False): s=stest logging.info("Running patched in rel "+release) - logging.info("\"Sim_tf.py --AMIConfig "+s+" --inputEVNTFile "+ input_file + " --outputHITSFile myHITS.pool.root --imf False " + extraArg+"\"") + logging.info("\"Sim_tf.py --AMIConfig "+s+" --inputEVNTFile "+ input_file + " --outputHITSFile myHITS.pool.root --postInclude 'EVNTtoHITS:PyJobTransforms/UseFrontier.py' --imf False " + extraArg+"\"") cmd = " cd "+pwd+" ;" if nosetup: @@ -118,12 +118,12 @@ def RunPatchedSTest(stest,input_file,pwd,release,extraArg,nosetup=False): else : cmd = ( " source $AtlasSetup/scripts/asetup.sh "+release+" >& /dev/null;" ) cmd += " mkdir -p run_"+s+"; cd run_"+s+";" - cmd += " Sim_tf.py --AMIConfig="+s+" --inputEVNTFile "+input_file + " --outputHITSFile myHITS.pool.root --imf False " +extraArg+" > "+s+".log 2>&1" + cmd += " Sim_tf.py --AMIConfig="+s+" --inputEVNTFile "+input_file + " --outputHITSFile myHITS.pool.root --postInclude 'EVNTtoHITS:PyJobTransforms/UseFrontier.py' --imf False " +extraArg+" > "+s+".log 2>&1" subprocess.call(cmd,shell=True) logging.info("Finished patched in rel "+release) - logging.info("\"Sim_tf.py --AMIConfig "+s+" --inputEVNTFile "+ input_file + " --outputHITSFile myHITS.pool.root --imf False " + extraArg+"\"") + logging.info("\"Sim_tf.py --AMIConfig "+s+" --inputEVNTFile "+ input_file + " --outputHITSFile myHITS.pool.root --postInclude 'EVNTtoHITS:PyJobTransforms/UseFrontier.py' --imf False " + extraArg+"\"") pass def RunCleanQTest(qtest,pwd,release,extraArg,CleanRunHeadDir,UniqID, doR2A=False, trigConfig="2017"): diff --git a/Tools/PROCTools/python/RunTier0TestsTools.py b/Tools/PROCTools/python/RunTier0TestsTools.py index ee44df5602114a59b833c04561f86cc082dea31f..467e7d7e23b2e6f6c06d869fef2a42d6c609be6a 100644 --- a/Tools/PROCTools/python/RunTier0TestsTools.py +++ b/Tools/PROCTools/python/RunTier0TestsTools.py @@ -21,8 +21,8 @@ ciRefFileMap = { 's3126-21.0' : 'v1', 's3126-21.3' : 'v1', 's3126-21.9' : 'v1', - 's3126-22.0' : 'v2', + 's3126-22.0' : 'v3', # OverlayTier0Test_required-test 'overlay-d1498-21.0' : 'v1', - 'overlay-d1498-22.0' : 'v7', + 'overlay-d1498-22.0' : 'v11', } diff --git a/Tools/PathResolver/CMakeLists.txt b/Tools/PathResolver/CMakeLists.txt index cbe00bc71671060cfeedb6679bc58f5dfb4abba9..f4bb5b712e3fc70a3be5dc66b76a03e94d7aec1c 100644 --- a/Tools/PathResolver/CMakeLists.txt +++ b/Tools/PathResolver/CMakeLists.txt @@ -16,6 +16,7 @@ endif() atlas_depends_on_subdirs( PUBLIC Control/AthToolSupport/AsgTools + Control/CxxUtils PRIVATE ${extra_deps} ) diff --git a/Tools/PathResolver/PathResolver/ATLAS_CHECK_THREAD_SAFETY b/Tools/PathResolver/PathResolver/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..e8ea8184a2aec26c26a06720e414aaeb63eee7dd --- /dev/null +++ b/Tools/PathResolver/PathResolver/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Tools/PathResolver diff --git a/Tools/PathResolver/PathResolver/PathResolver.h b/Tools/PathResolver/PathResolver/PathResolver.h index ecac7513fba2222311799b36fb868537926802ca..7989bcc0bb6021e004b034d4f4a23930f0d411da 100644 --- a/Tools/PathResolver/PathResolver/PathResolver.h +++ b/Tools/PathResolver/PathResolver/PathResolver.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef PATHRESOLVER_PATHRESOLVER_H @@ -8,6 +8,7 @@ #include "AsgTools/AsgMessaging.h" #include <string> +#include <atomic> class PathResolver @@ -113,9 +114,7 @@ public: std::string& result ); - static bool m_setLevel; //flag to say if the msg level has been set. This is so we can default to info - - + static std::atomic<MSG::Level> m_level; static bool msgLvl( const MSG::Level lvl ) { return asgMsg().msgLvl(lvl); } static MsgStream& msg() { return asgMsg().msg(); } diff --git a/Tools/PathResolver/Root/PathResolver.cxx b/Tools/PathResolver/Root/PathResolver.cxx index c8aae45fb99c965b4fa1ce725795e5cc145fc8d4..6ac69e79509bfb42f55d80c1937deac713f83f4d 100644 --- a/Tools/PathResolver/Root/PathResolver.cxx +++ b/Tools/PathResolver/Root/PathResolver.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "PathResolver/PathResolver.h" @@ -19,6 +19,7 @@ #include <boost/algorithm/string.hpp> #include <boost/algorithm/string/classification.hpp> #include <boost/filesystem.hpp> +#include "CxxUtils/checker_macros.h" @@ -30,14 +31,18 @@ namespace bf = boost::filesystem; using namespace std; -static const char* path_separator = ",:"; -bool PathResolver::m_setLevel=false; +static const char* const path_separator = ",:"; +std::atomic<MSG::Level> PathResolver::m_level=MSG::INFO; PathResolver::PathResolver() { } asg::AsgMessaging& PathResolver::asgMsg() { - if(!m_setLevel) setOutputLevel(MSG::INFO); - static asg::AsgMessaging asgMsg("PathResolver"); +#ifdef ASGTOOL_STANDALONE + static thread_local asg::AsgMessaging asgMsg("PathResolver"); +#else + static asg::AsgMessaging asgMsg ATLAS_THREAD_SAFE ("PathResolver"); +#endif + asgMsg.msg().setLevel (m_level); return asgMsg; } @@ -56,8 +61,6 @@ PathResolver::PR_find( const std::string& logical_file_name, const string& searc PR_file_type file_type, PathResolver::SearchType search_type, string& result ) { - if(!m_setLevel) setOutputLevel(MSG::INFO); - std::string trimmed_logical_file_name = logical_file_name; boost::algorithm::trim(trimmed_logical_file_name); //trim again for extra safety @@ -113,18 +116,20 @@ PathResolver::PR_find( const std::string& logical_file_name, const string& searc } } std::string fileToDownload = addr + "/" + file.string(); - //disable error output from root while attempting to download - long errLevel = gErrorIgnoreLevel; - gErrorIgnoreLevel = kError+1; + //disable error output from root while attempting to download + // FIXME: Disabling errors now commented out because it is not + // thread-safe. Needs changes in ROOT. + //long errLevel = gErrorIgnoreLevel; + //gErrorIgnoreLevel = kError+1; if(!TFile::Cp(fileToDownload.c_str(),(locationToDownloadTo+"/"+file.string()).c_str())) { msg(MSG::DEBUG) <<"Unable to download file : " << fileToDownload << endmsg; } else { msg(MSG::INFO) <<"Successfully downloaded " << fileToDownload << endmsg; result = (locationToDownloadTo+"/"+file.string()).c_str(); - gErrorIgnoreLevel=errLevel; + //gErrorIgnoreLevel=errLevel; return true; } - gErrorIgnoreLevel=errLevel; + //gErrorIgnoreLevel=errLevel; } else if(locationToDownloadTo=="." && itr->find("/afs/cern.ch/atlas/www/")==std::string::npos) { //don't let it ever download back to the www area! //prefer first non-pwd location for downloading to. But must be fully accessible. This should be the local InstallArea in cmt FILE *fp = std::fopen((*itr+"/._pathresolver_dummy").c_str(), "a+"); @@ -310,7 +315,7 @@ std::string PathResolverFindDataFile (const std::string& logical_file_name) std::string PathResolver::find_calib_file (const std::string& logical_file_name) { msg(MSG::DEBUG) << "Trying to locate " << logical_file_name << endmsg; - if(logical_file_name.find("dev/")==0) { + if(logical_file_name.compare(0, 4, "dev/")==0) { #ifdef XAOD_ANALYSIS msg(MSG::WARNING) #else @@ -332,7 +337,7 @@ std::string PathResolver::find_calib_file (const std::string& logical_file_name) std::string PathResolver::find_calib_directory (const std::string& logical_file_name) { msg(MSG::DEBUG) <<"Trying to locate " << logical_file_name << endmsg; - if(logical_file_name.find("dev/")==0) { + if(logical_file_name.compare(0, 4, "dev/")==0) { #ifdef XAOD_ANALYSIS msg(MSG::WARNING) #else @@ -351,8 +356,7 @@ std::string PathResolver::find_calib_directory (const std::string& logical_file_ } void PathResolver::setOutputLevel(MSG::Level level) { - m_setLevel=true; - asgMsg().msg().setLevel(level); + m_level = level; } diff --git a/Tools/PyJobTransforms/CMakeLists.txt b/Tools/PyJobTransforms/CMakeLists.txt index e741394ebc99ec0cea67e58ec4bfc3000ffa2218..ac5258b35021019a8adeb38471aaceeb9482cdd3 100644 --- a/Tools/PyJobTransforms/CMakeLists.txt +++ b/Tools/PyJobTransforms/CMakeLists.txt @@ -7,6 +7,7 @@ atlas_subdir( PyJobTransforms ) # External dependencies: find_package( PythonLibs ) +find_package( cx_Oracle ) # Install files from the package: atlas_install_python_modules( python/*.py ) diff --git a/Tools/Tier0ChainTests/test/test_q220.sh b/Tools/Tier0ChainTests/test/test_q220.sh index bd2d1be252bbd6dcc2a31b129c264445e01a0f6d..29b7b66fa0dc7a09059958e864774149aca6a5e5 100755 --- a/Tools/Tier0ChainTests/test/test_q220.sh +++ b/Tools/Tier0ChainTests/test/test_q220.sh @@ -8,7 +8,8 @@ # art-include: 21.3/Athena # art-include: 21.9/Athena -Reco_tf.py --AMI=q220 --outputTAGFile=myTAG.pool.root --outputAODFile=myAOD.pool.root --outputESDFile=myESD.pool.root --outputHISTFile=myHIST.root --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data15_cos.00251363.physics_IDCosmic.merge.RAW._lb0057._SFO-ALL._0001.1 --imf False +#This test currently has the muon isolation reconstruction switched off. It should be switched back on at a later date. +Reco_tf.py --AMI=q220 --outputTAGFile=myTAG.pool.root --outputAODFile=myAOD.pool.root --outputESDFile=myESD.pool.root --outputHISTFile=myHIST.root --imf False --preExec "r2e:from MuonRecExample.MuonRecFlags import muonRecFlags; muonRecFlags.doMuonIso.set_Value_and_Lock(False)" echo "art-result: $?" ArtPackage=$1 diff --git a/Tools/Tier0ChainTests/test/test_reco_mc16e.sh b/Tools/Tier0ChainTests/test/test_reco_mc16e.sh index f6ae0bf55b4fcf74dbdc7fe73011d88967ae2c2f..df1771ccc85a041cc33f9f283bbe3cc097871d99 100755 --- a/Tools/Tier0ChainTests/test/test_reco_mc16e.sh +++ b/Tools/Tier0ChainTests/test/test_reco_mc16e.sh @@ -8,7 +8,7 @@ # art-include: 21.3/Athena # art-include: 21.9/Athena -Reco_tf.py --digiSteeringConf 'StandardSignalOnlyTruth' --conditionsTag 'default:OFLCOND-MC16-SDR-25' --valid 'True' --pileupFinalBunch '6' --numberOfHighPtMinBias '0.2595392' --autoConfiguration 'everything' --numberOfLowPtMinBias '99.2404608' --steering 'doRDO_TRIG' --preInclude 'HITtoRDO:Digitization/ForceUseOfPileUpTools.py,SimulationJobOptions/preInlcude.PileUpBunchTrainsMC16c_2017_Config1.py,RunDependentSimData/configLumi_run310000.py' --postInclude 'default:PyJobTransforms/UseFrontier.py' --postExec 'all:CfgMgr.MessageSvc().setError+=["HepMcParticleLink"]' "ESDtoAOD:fixedAttrib=[s if \"CONTAINER_SPLITLEVEL = '99'\" not in s else \"\" for s in svcMgr.AthenaPoolCnvSvc.PoolAttributes];svcMgr.AthenaPoolCnvSvc.PoolAttributes=fixedAttrib" "RDOtoRDOTrigger:conddb.addOverride(\"/CALO/Ofl/Noise/PileUpNoiseLumi\",\"CALOOflNoisePileUpNoiseLumi-mc15-mu30-dt25ns\")" 'ESDtoAOD:CILMergeAOD.removeItem("xAOD::CaloClusterAuxContainer#CaloCalTopoClustersAux.LATERAL.LONGITUDINAL.SECOND_R.SECOND_LAMBDA.CENTER_MAG.CENTER_LAMBDA.FIRST_ENG_DENS.ENG_FRAC_MAX.ISOLATION.ENG_BAD_CELLS.N_BAD_CELLS.BADLARQ_FRAC.ENG_BAD_HV_CELLS.N_BAD_HV_CELLS.ENG_POS.SIGNIFICANCE.CELL_SIGNIFICANCE.CELL_SIG_SAMPLING.AVG_LAR_Q.AVG_TILE_Q.EM_PROBABILITY.PTD.BadChannelList");CILMergeAOD.add("xAOD::CaloClusterAuxContainer#CaloCalTopoClustersAux.N_BAD_CELLS.ENG_BAD_CELLS.BADLARQ_FRAC.AVG_TILE_Q.AVG_LAR_Q.CENTER_MAG.ENG_POS.CENTER_LAMBDA.SECOND_LAMBDA.SECOND_R.ISOLATION.EM_PROBABILITY");StreamAOD.ItemList=CILMergeAOD()' --preExec 'all:rec.Commissioning.set_Value_and_Lock(True);from AthenaCommon.BeamFlags import jobproperties;jobproperties.Beam.numberOfCollisions.set_Value_and_Lock(20.0);from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True); from LArDigitization.LArDigitizationFlags import jobproperties;jobproperties.LArDigitizationFlags.useEmecIwHighGain.set_Value_and_Lock(False)' 'ESDtoAOD:from TriggerJobOpts.TriggerFlags import TriggerFlags;TriggerFlags.AODEDMSet.set_Value_and_Lock("AODSLIM");' --triggerConfig 'RDOtoRDOTrigger=MCRECO:DBF:TRIGGERDBMC:2232,86,278' --geometryVersion 'default:ATLAS-R2-2016-01-00-01' --numberOfCavernBkg '0' --inputHITSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.simul.HITS.e4993_s3091/\* --maxEvents=100 --outputAODFile=myAOD.pool.root --outputRDOFile=myRDO.pool.root --outputESDFile=myESD.pool.root --outputTAGFile=myTAG.root --runNumber=410000 --jobNumber=1 --inputLowPtMinbiasHitsFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/mc16_13TeV.361238.Pythia8EvtGen_A3NNPDF23LO_minbias_inelastic_low.merge.HITS.e4981_s3087_s3089/\* --inputHighPtMinbiasHitsFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/mc16_13TeV.361239.Pythia8EvtGen_A3NNPDF23LO_minbias_inelastic_high.merge.HITS.e4981_s3087_s3089/\* +Reco_tf.py --digiSteeringConf 'StandardSignalOnlyTruth' --conditionsTag 'default:OFLCOND-MC16-SDR-25' --valid 'True' --pileupFinalBunch '6' --numberOfHighPtMinBias '0.2595392' --autoConfiguration 'everything' --numberOfLowPtMinBias '99.2404608' --steering 'doRDO_TRIG' --preInclude 'HITtoRDO:Digitization/ForceUseOfPileUpTools.py,SimulationJobOptions/preInlcude.PileUpBunchTrainsMC16c_2017_Config1.py,RunDependentSimData/configLumi_run310000.py' --postInclude 'default:PyJobTransforms/UseFrontier.py' --postExec 'all:CfgMgr.MessageSvc().setError+=["HepMcParticleLink"]' "ESDtoAOD:fixedAttrib=[s if \"CONTAINER_SPLITLEVEL = '99'\" not in s else \"\" for s in svcMgr.AthenaPoolCnvSvc.PoolAttributes];svcMgr.AthenaPoolCnvSvc.PoolAttributes=fixedAttrib" "RDOtoRDOTrigger:conddb.addOverride(\"/CALO/Ofl/Noise/PileUpNoiseLumi\",\"CALOOflNoisePileUpNoiseLumi-mc15-mu30-dt25ns\")" 'ESDtoAOD:CILMergeAOD.removeItem("xAOD::CaloClusterAuxContainer#CaloCalTopoClustersAux.LATERAL.LONGITUDINAL.SECOND_R.SECOND_LAMBDA.CENTER_MAG.CENTER_LAMBDA.FIRST_ENG_DENS.ENG_FRAC_MAX.ISOLATION.ENG_BAD_CELLS.N_BAD_CELLS.BADLARQ_FRAC.ENG_BAD_HV_CELLS.N_BAD_HV_CELLS.ENG_POS.SIGNIFICANCE.CELL_SIGNIFICANCE.CELL_SIG_SAMPLING.AVG_LAR_Q.AVG_TILE_Q.EM_PROBABILITY.PTD.BadChannelList");CILMergeAOD.add("xAOD::CaloClusterAuxContainer#CaloCalTopoClustersAux.N_BAD_CELLS.ENG_BAD_CELLS.BADLARQ_FRAC.AVG_TILE_Q.AVG_LAR_Q.CENTER_MAG.ENG_POS.CENTER_LAMBDA.SECOND_LAMBDA.SECOND_R.ISOLATION.EM_PROBABILITY");StreamAOD.ItemList=CILMergeAOD()' --preExec 'all:rec.Commissioning.set_Value_and_Lock(True);from AthenaCommon.BeamFlags import jobproperties;jobproperties.Beam.numberOfCollisions.set_Value_and_Lock(20.0);from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True); from LArDigitization.LArDigitizationFlags import jobproperties;jobproperties.LArDigitizationFlags.useEmecIwHighGain.set_Value_and_Lock(False)' 'ESDtoAOD:from TriggerJobOpts.TriggerFlags import TriggerFlags;TriggerFlags.AODEDMSet.set_Value_and_Lock("AODSLIM");' --triggerConfig 'RDOtoRDOTrigger=MCRECO:Physics_pp_v7_primaries' --geometryVersion 'default:ATLAS-R2-2016-01-00-01' --numberOfCavernBkg '0' --inputHITSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.simul.HITS.e4993_s3091/\* --maxEvents=100 --outputAODFile=myAOD.pool.root --outputRDOFile=myRDO.pool.root --outputESDFile=myESD.pool.root --outputTAGFile=myTAG.root --runNumber=410000 --jobNumber=1 --inputLowPtMinbiasHitsFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/mc16_13TeV.361238.Pythia8EvtGen_A3NNPDF23LO_minbias_inelastic_low.merge.HITS.e4981_s3087_s3089/\* --inputHighPtMinbiasHitsFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/mc16_13TeV.361239.Pythia8EvtGen_A3NNPDF23LO_minbias_inelastic_high.merge.HITS.e4981_s3087_s3089/\* echo "art-result: $? Reco" diff --git a/Tools/XMLCoreParser/CMakeLists.txt b/Tools/XMLCoreParser/CMakeLists.txt index a47f651d44ba5b3979b82fe7261065e5d281dfb4..70f1ed494bcba85834140b99b4e5d0b679131abc 100644 --- a/Tools/XMLCoreParser/CMakeLists.txt +++ b/Tools/XMLCoreParser/CMakeLists.txt @@ -6,7 +6,9 @@ atlas_subdir( XMLCoreParser ) # Declare the package's dependencies: -atlas_depends_on_subdirs( PRIVATE +atlas_depends_on_subdirs( PUBLIC + Control/CxxUtils + PRIVATE AtlasTest/TestTools ) # External dependencies: diff --git a/Tools/XMLCoreParser/XMLCoreParser/ATLAS_CHECK_THREAD_SAFETY b/Tools/XMLCoreParser/XMLCoreParser/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..2e6525a46833d2e3afcd3d10e2efd91a1dfa3cff --- /dev/null +++ b/Tools/XMLCoreParser/XMLCoreParser/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Tools/XMLCoreParser diff --git a/Tools/XMLCoreParser/XMLCoreParser/XMLCoreParser.h b/Tools/XMLCoreParser/XMLCoreParser/XMLCoreParser.h index 988d43584bde44c6b78242969c74e4f5b8fb3d11..b7dd74a008835ff1a096868d396ad279db262d80 100755 --- a/Tools/XMLCoreParser/XMLCoreParser/XMLCoreParser.h +++ b/Tools/XMLCoreParser/XMLCoreParser/XMLCoreParser.h @@ -1,13 +1,16 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef XMLCoreParser_hpp #define XMLCoreParser_hpp -#include <string> +#include <string> +#include <map> +#include <memory> class XMLCoreParser; +class XMLCoreParserImpl; namespace CoreParser { @@ -17,32 +20,51 @@ namespace CoreParser class XMLCoreNode { public: - XMLCoreNode (CoreParser::DOMNode* node) : m_node (node) - { - } + XMLCoreNode (const CoreParser::DOMNode* node) + : m_node (node), + m_owns (false) + { + } - XMLCoreNode (const XMLCoreNode& other) : m_node (other.m_node) - { - } + XMLCoreNode (std::unique_ptr<CoreParser::DOMNode> node) + : m_node (node.release()), + m_owns (true) + { + } - XMLCoreNode& operator= (const XMLCoreNode& other) - { - m_node = other.m_node; - return *this; - } + XMLCoreNode (const XMLCoreNode& other) + : m_node (other.m_node), + m_owns (false) + { + } + + XMLCoreNode (XMLCoreNode&& other) + : m_node (other.m_node), + m_owns (other.m_owns) + { + other.m_node = nullptr; + other.m_owns = false; + } + + XMLCoreNode& operator= (const XMLCoreNode& other); + + XMLCoreNode& operator= (XMLCoreNode&& other); + + ~XMLCoreNode(); operator const CoreParser::DOMNode& () const { return (*m_node); } - CoreParser::DOMNode& get_node () const + const CoreParser::DOMNode& get_node () const { return (*m_node); } private: - CoreParser::DOMNode* m_node; + const CoreParser::DOMNode* m_node; + bool m_owns; }; class XMLCoreFactory @@ -95,18 +117,28 @@ public: XMLCoreNode parse (const std::string& file_name); void visit (const std::string& file_name); - void initialize_factories (); - void register_factory (const std::string& name, XMLCoreFactory* factory); - void register_default_factory (XMLCoreFactory* factory); + void register_default_factory (std::unique_ptr<XMLCoreFactory> factory); + void register_factory (const std::string& name, + std::unique_ptr<XMLCoreFactory> factory); void register_external_entity (const std::string& name, const std::string& file_name); - void register_text_entity (const std::string& name, const std::string& text); + void register_text_entity (const std::string& name, const std::string& text); + + void up(); + void down(); + int level() const; - static void debug_test (XMLCoreParser& parser, XMLCoreFactory* factory = 0); private: - void visit (const XMLCoreNode& node); + void visit (const XMLCoreNode& node); void terminate (); + XMLCoreFactory* find_factory (const std::string& name); + + + typedef std::map <std::string, std::unique_ptr<XMLCoreFactory> > FactoryMap; + FactoryMap m_factories; + std::unique_ptr<XMLCoreFactory> m_default_factory; + int m_level = 0; }; #endif diff --git a/Tools/XMLCoreParser/src/DOMNode.cxx b/Tools/XMLCoreParser/src/DOMNode.cxx index d2488b2d4ef93c6a86a8117d735431692b740ca1..1474a50737dcc28f981b1a7925a0e965f1788fa3 100755 --- a/Tools/XMLCoreParser/src/DOMNode.cxx +++ b/Tools/XMLCoreParser/src/DOMNode.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ @@ -81,7 +81,7 @@ const std::string& CoreParser::DOMNode::get_value () const return (m_value); } -CoreParser::DOMSiblings& CoreParser::DOMNode::get_siblings() +const CoreParser::DOMSiblings& CoreParser::DOMNode::get_siblings() const { return (m_siblings); } @@ -106,10 +106,9 @@ CoreParser::DOMNode* CoreParser::DOMNode::get_next_sibling () return (*m_it); } -void CoreParser::DOMNode::print (const std::string& header) const +void CoreParser::DOMNode::print (const std::string& header, + int depth /*= 0*/) const { - static int depth = 0; - if (header != "") { std::cout << header << std::endl; @@ -150,9 +149,7 @@ void CoreParser::DOMNode::print (const std::string& header) const { const DOMNode* n = *sit; - depth++; - n->print (); - depth--; + n->print ("", depth+1); } for (i = 0; i < depth; i++) std::cout << " "; diff --git a/Tools/XMLCoreParser/src/DOMNode.h b/Tools/XMLCoreParser/src/DOMNode.h index ffe5fba57b0211b8a25ac607e670d88705d529b6..5fff95c48a4017fa9b9960817be02e6569e3f903 100755 --- a/Tools/XMLCoreParser/src/DOMNode.h +++ b/Tools/XMLCoreParser/src/DOMNode.h @@ -1,9 +1,9 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ -#ifndef __DOMNode_h__ -#define __DOMNode_h__ +#ifndef XMLCOREPARSER_DOMNODE_H +#define XMLCOREPARSER_DOMNODE_H #include <string> #include <vector> @@ -37,11 +37,11 @@ namespace CoreParser const DOMNamedNodeMap& get_attributes() const; const std::string& get_name () const; const std::string& get_value () const; - DOMSiblings& get_siblings(); + const DOMSiblings& get_siblings() const; unsigned int sibling_number () const; DOMNode* get_first_child (); DOMNode* get_next_sibling (); - void print (const std::string& header = "") const; + void print (const std::string& header = "", int depth=0) const; NodeType m_type; std::string m_name; diff --git a/Tools/XMLCoreParser/src/ExpatCoreParser.cxx b/Tools/XMLCoreParser/src/ExpatCoreParser.cxx index 3b922d3c2780594bec6fad7973cdef9ee7e3c7eb..703450dc07dfd1225f22599c42eb2812ce6c4e64 100755 --- a/Tools/XMLCoreParser/src/ExpatCoreParser.cxx +++ b/Tools/XMLCoreParser/src/ExpatCoreParser.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ @@ -18,25 +18,21 @@ #include "ExpatCoreParser.h" +std::mutex ExpatCoreParser::s_mutex; +ExpatCoreParser::ExternalEntityMap ExpatCoreParser::s_entities; +ExpatCoreParser::ExternalEntityMap ExpatCoreParser::s_text_entities; + class ExpatCoreParserDebugger { public: + static bool get_debug_state() + { + return ::getenv ("XMLDEBUG") != 0; + } static bool debug () { - static bool first = true; - static bool debug_state = false; - - if (first) - { - first = false; - - if (::getenv ("XMLDEBUG") != 0) - { - debug_state = true; - } - } - - return (debug_state); + static const bool debug_state = get_debug_state(); + return debug_state; } }; @@ -44,33 +40,33 @@ public: #define BUFFSIZE 1000 -void ExpatCoreParser::start (void* /*user_data*/, const char* el, const char** attr) +void ExpatCoreParser::start (void* user_data, const char* el, const char** attr) { - ExpatCoreParser& me = instance (); + ExpatCoreParser& me = *reinterpret_cast<ExpatCoreParser*> (user_data); me.do_start (el, attr); } -void ExpatCoreParser::end (void* /*user_data*/, const char* el) +void ExpatCoreParser::end (void* user_data, const char* el) { - ExpatCoreParser& me = instance (); + ExpatCoreParser& me = *reinterpret_cast<ExpatCoreParser*> (user_data); me.do_end (el); } -void ExpatCoreParser::char_data (void* /*user_data*/, const XML_Char* s, int len) +void ExpatCoreParser::char_data (void* user_data, const XML_Char* s, int len) { - ExpatCoreParser& me = instance (); + ExpatCoreParser& me = *reinterpret_cast<ExpatCoreParser*> (user_data); me.do_char_data (s, len); } -void ExpatCoreParser::default_handler (void* /*user_data*/, const XML_Char* s, int len) +void ExpatCoreParser::default_handler (void* user_data, const XML_Char* s, int len) { - ExpatCoreParser& me = instance (); + ExpatCoreParser& me = *reinterpret_cast<ExpatCoreParser*> (user_data); me.do_default_handler (s, len); } -void ExpatCoreParser::comment (void* /*userData*/, const XML_Char* s) +void ExpatCoreParser::comment (void* user_data, const XML_Char* s) { - ExpatCoreParser& me = instance (); + ExpatCoreParser& me = *reinterpret_cast<ExpatCoreParser*> (user_data); me.do_comment (s); } @@ -80,7 +76,8 @@ int ExpatCoreParser::external_entity (XML_Parser parser, const XML_Char* systemId, const XML_Char* /*publicId*/) { - ExpatCoreParser& me = instance (); + void* user_data = XML_GetUserData (parser); + ExpatCoreParser& me = *reinterpret_cast<ExpatCoreParser*> (user_data); return (me.do_external_entity (parser, context, systemId)); } @@ -92,8 +89,8 @@ void ExpatCoreParser::register_external_entity (const std::string& name, const s << " file_name=" << file_name << std::endl; } - ExpatCoreParser& me = instance (); - return (me.do_register_external_entity (name, file_name)); + lock_t lock (s_mutex); + s_entities[name] = file_name; } void ExpatCoreParser::register_text_entity (const std::string& name, const std::string& text) @@ -104,8 +101,8 @@ void ExpatCoreParser::register_text_entity (const std::string& name, const std:: << std::endl; } - ExpatCoreParser& me = instance (); - return (me.do_register_text_entity (name, text)); + lock_t lock (s_mutex); + s_text_entities[name] = text; } void ExpatCoreParser::entity (void* /*userData*/, @@ -151,15 +148,16 @@ void ExpatCoreParser::entity (void* /*userData*/, } } -CoreParser::DOMNode* ExpatCoreParser::get_document () +std::unique_ptr<CoreParser::DOMNode> ExpatCoreParser::get_document () { - return (m_top); + return std::move(m_top); } -ExpatCoreParser::ExpatCoreParser () +ExpatCoreParser::ExpatCoreParser (const std::string& prefix) + : m_top (nullptr), + m_last (nullptr), + m_prefix (prefix) { - m_top = 0; - m_last = 0; } void ExpatCoreParser::do_start (const char* el, const char** attr) @@ -168,17 +166,17 @@ void ExpatCoreParser::do_start (const char* el, const char** attr) std::map <std::string, std::string> a; - if (m_top == 0) + if (!m_top) { - m_top = new CoreParser::DOMNode (); - m_last = m_top; + m_top = std::make_unique<CoreParser::DOMNode> (); + m_last = m_top.get(); } CoreParser::DOMNode* node = new CoreParser::DOMNode (CoreParser::DOMNode::ELEMENT_NODE, el, m_last); if (ExpatCoreParserDebugger::debug ()) { - std::cout << "ExpatCoreParser::do_start> el=" << el << " top=" << m_top << " last=" << m_last << " node=" << node << std::endl; + std::cout << "ExpatCoreParser::do_start> el=" << el << " top=" << m_top.get() << " last=" << m_last << " node=" << node << std::endl; } m_last = node; @@ -244,17 +242,17 @@ void ExpatCoreParser::do_default_handler (const XML_Char* s, int len) void ExpatCoreParser::do_comment (const XML_Char* s) { - if (m_top == 0) + if (!m_top) { - m_top = new CoreParser::DOMNode (); - m_last = m_top; + m_top = std::make_unique<CoreParser::DOMNode> (); + m_last = m_top.get(); } CoreParser::DOMNode* node = new CoreParser::DOMNode (CoreParser::DOMNode::COMMENT_NODE, s, m_last); if (ExpatCoreParserDebugger::debug ()) { - std::cout << "ExpatCoreParser::do_comment> s=" << s << " top=" << m_top << " last=" << m_last << " node=" << node << std::endl; + std::cout << "ExpatCoreParser::do_comment> s=" << s << " top=" << m_top.get() << " last=" << m_last << " node=" << node << std::endl; } // Node is owned by m_last. @@ -359,6 +357,7 @@ int ExpatCoreParser::generic_parse (XML_Parser p, const std::string& file_name) XML_SetCharacterDataHandler (p, char_data); XML_SetExternalEntityRefHandler (p, external_entity); XML_SetCommentHandler (p, comment); + XML_SetUserData (p, this); //XML_SetDefaultHandlerExpand (p, default_handler); //XML_SetEntityDeclHandler (p, entity); //XML_UseParserAsHandlerArg (p); @@ -423,6 +422,7 @@ int ExpatCoreParser::generic_text_parse (XML_Parser p, const std::string& text) XML_SetCharacterDataHandler (p, char_data); XML_SetExternalEntityRefHandler (p, external_entity); XML_SetCommentHandler (p, comment); + XML_SetUserData (p, this); //XML_SetDefaultHandlerExpand (p, default_handler); //XML_SetEntityDeclHandler (p, entity); //XML_UseParserAsHandlerArg (p); @@ -523,35 +523,11 @@ int ExpatCoreParser::do_external_entity (XML_Parser parser, return (status); } -void ExpatCoreParser::do_register_external_entity (const std::string& name, const std::string& file_name) -{ - if (ExpatCoreParserDebugger::debug ()) - { - std::cout << "ExpatCoreParser::do_register_external_entity> name=" << name - << " file_name=" << file_name << std::endl; - } - - m_entities[name] = file_name; -} - -void ExpatCoreParser::do_register_text_entity (const std::string& name, const std::string& text) -{ - if (ExpatCoreParserDebugger::debug ()) - { - std::cout << "ExpatCoreParser::do_register_text_entity> name=" << name - << std::endl; - } - - m_text_entities[name] = text; -} - -const std::string& ExpatCoreParser::find_external_entity (const std::string& name) const +const std::string& ExpatCoreParser::find_external_entity (const std::string& name) { - ExternalEntityMap::const_iterator it; - - it = m_entities.find (name); - - if (it == m_entities.end ()) + lock_t lock (s_mutex); + ExternalEntityMap::const_iterator it = s_entities.find (name); + if (it == s_entities.end ()) { static const std::string empty; return (empty); @@ -562,13 +538,11 @@ const std::string& ExpatCoreParser::find_external_entity (const std::string& nam } } -const std::string& ExpatCoreParser::find_text_entity (const std::string& name) const +const std::string& ExpatCoreParser::find_text_entity (const std::string& name) { - ExternalEntityMap::const_iterator it = m_text_entities.begin (); - - it = m_text_entities.find (name); - - if (it == m_text_entities.end ()) + lock_t lock (s_mutex); + ExternalEntityMap::const_iterator it = s_text_entities.find (name); + if (it == s_text_entities.end ()) { static const std::string empty; return (empty); @@ -579,54 +553,32 @@ const std::string& ExpatCoreParser::find_text_entity (const std::string& name) c } } -ExpatCoreParser& ExpatCoreParser::instance () -{ - static ExpatCoreParser me; - - return (me); -} - -CoreParser::DOMNode* ExpatCoreParser::parse (const std::string& file_name) +std::unique_ptr<CoreParser::DOMNode> +ExpatCoreParser::parse (const std::string& file_name) { - static ExpatCoreParser& me = instance (); - std::string name = file_name; std::string::size_type pos = file_name.rfind ('/'); + std::string prefix; if (pos != std::string::npos) { - me.m_prefix = file_name.substr (0, pos); + prefix = file_name.substr (0, pos); name = file_name.substr (pos + 1); } - else - { - me.m_prefix = ""; - } + ExpatCoreParser me (prefix); XML_Parser p = XML_ParserCreate (NULL); if (!p) { std::cout << "ExpatCoreParser::Couldn't allocate memory for parser" << std::endl; - exit(-1); + std::abort(); } - me.clean (); - me.generic_parse (p, name); XML_ParserFree (p); - return (me.get_document ()); + return me.get_document (); } -void ExpatCoreParser::clean () -{ - m_last = 0; - - if (m_top != 0) - { - delete m_top; - m_top = 0; - } -} diff --git a/Tools/XMLCoreParser/src/ExpatCoreParser.h b/Tools/XMLCoreParser/src/ExpatCoreParser.h index ebffc8f194d03b1fa779e93e1ad7479450b1b138..b4155c455d42c4672a5f855c53e28f24548452fc 100755 --- a/Tools/XMLCoreParser/src/ExpatCoreParser.h +++ b/Tools/XMLCoreParser/src/ExpatCoreParser.h @@ -1,13 +1,16 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ -#ifndef __ExpatCoreParser_h__ -#define __ExpatCoreParser_h__ +#ifndef XMLCOREPARSER_EXPATCOREPARSER_H +#define XMLCOREPARSER_EXPATCOREPARSER_H #include <expat.h> #include <map> +#include <mutex> +#include <memory> #include "DOMNode.h" +#include "CxxUtils/checker_macros.h" class ExpatCoreParser { @@ -15,9 +18,24 @@ public: typedef std::map <std::string, std::string> ExternalEntityMap; - static CoreParser::DOMNode* parse (const std::string& file_name); + static std::unique_ptr<CoreParser::DOMNode> parse (const std::string& file_name); - static ExpatCoreParser& instance (); + static void register_external_entity (const std::string& name, const std::string& file_name); + static void register_text_entity (const std::string& name, const std::string& text); + +private: + + ExpatCoreParser (const std::string& prefix); + void do_start (const char* el, const char** attr); + void do_end (const char* el); + void do_char_data (const XML_Char* s, int len); + void do_default_handler (const XML_Char* s, int len); + void do_comment (const XML_Char* s); + int generic_parse (XML_Parser p, const std::string& file_name); + int generic_text_parse (XML_Parser p, const std::string& text); + int do_external_entity (XML_Parser parser, + const XML_Char* context, + const XML_Char* systemId); static void start (void* /*user_data*/, const char* el, const char** attr); static void end (void* /*user_data*/, const char* el); @@ -38,37 +56,21 @@ public: const XML_Char* systemId, const XML_Char* publicId, const XML_Char* /*notationName*/); - CoreParser::DOMNode* get_document (); - - static void register_external_entity (const std::string& name, const std::string& file_name); - static void register_text_entity (const std::string& name, const std::string& text); - -private: - - ExpatCoreParser (); - void do_start (const char* el, const char** attr); - void do_end (const char* el); - void do_char_data (const XML_Char* s, int len); - void do_default_handler (const XML_Char* s, int len); - void do_comment (const XML_Char* s); - int generic_parse (XML_Parser p, const std::string& file_name); - int generic_text_parse (XML_Parser p, const std::string& text); - int do_external_entity (XML_Parser parser, - const XML_Char* context, - const XML_Char* systemId); + std::unique_ptr<CoreParser::DOMNode> get_document (); - void do_register_external_entity (const std::string& name, const std::string& file_name); - void do_register_text_entity (const std::string& name, const std::string& text); - const std::string& find_external_entity (const std::string& name) const; - const std::string& find_text_entity (const std::string& name) const; + static const std::string& find_external_entity (const std::string& name); + static const std::string& find_text_entity (const std::string& name); void clean (); - CoreParser::DOMNode* m_top; + std::unique_ptr<CoreParser::DOMNode> m_top; CoreParser::DOMNode* m_last; std::string m_prefix; - ExternalEntityMap m_entities; - ExternalEntityMap m_text_entities; + + static std::mutex s_mutex; + typedef std::lock_guard<std::mutex> lock_t; + static ExternalEntityMap s_entities ATLAS_THREAD_SAFE; + static ExternalEntityMap s_text_entities ATLAS_THREAD_SAFE; }; #endif diff --git a/Tools/XMLCoreParser/src/XMLCoreParser.cxx b/Tools/XMLCoreParser/src/XMLCoreParser.cxx index 9cf57d5cb65cfe9f3d6dd89d06efbf0cf3dac83b..140d0d93017f2b47d8a338efecbe2bbee3532d99 100755 --- a/Tools/XMLCoreParser/src/XMLCoreParser.cxx +++ b/Tools/XMLCoreParser/src/XMLCoreParser.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ @@ -11,27 +11,48 @@ class XMLCoreParserDebugger { -public: +public: + static bool get_debug_state() + { + return ::getenv ("XMLDEBUG") != 0; + } static bool debug () { - static bool first = true; - static bool debug_state = false; + static const bool debug_state = get_debug_state(); + return debug_state; + } +}; - if (first) - { - first = false; +#include "ExpatCoreParser.h" - if (::getenv ("XMLDEBUG") != 0) - { - debug_state = true; - } - } - return (debug_state); - } -}; +XMLCoreNode& XMLCoreNode::operator= (const XMLCoreNode& other) +{ + if (this != &other) { + if (m_owns) delete m_node; + m_node = other.m_node; + m_owns = false; + } + return *this; +} + +XMLCoreNode& XMLCoreNode::operator= (XMLCoreNode&& other) +{ + if (this != &other) { + if (m_owns) delete m_node; + m_node = other.m_node; + m_owns = other.m_owns; + other.m_node = nullptr; + other.m_owns = false; + } + return *this; +} + +XMLCoreNode::~XMLCoreNode() +{ + if (m_owns) delete m_node; +} -#include "ExpatCoreParser.h" /* * @@ -269,7 +290,7 @@ bool XMLCoreFactory::check_int (const int n, const XMLCoreNode& node, const std: if (nodename != "" ) std::cerr << "for name=" << nodename << std::endl; if (volume != "" ) std::cerr << "for volume=" << volume << std::endl; - exit(4); + std::abort(); } return true; @@ -309,7 +330,7 @@ bool XMLCoreFactory::check_double (const int n, const XMLCoreNode& node, const s if (name1 != "" ) std::cerr << "for name=" << name << std::endl; if (volume != "" ) std::cerr << "for volume=" << volume << std::endl; - exit(4); + std::abort(); } return true; @@ -319,114 +340,8 @@ class DummyFactory : public XMLCoreFactory { }; -class XMLCoreParserImpl -{ -public: - - typedef std::map <std::string, XMLCoreFactory*> FactoryMap; - - static XMLCoreParserImpl& instance () - { - static XMLCoreParserImpl me; - - return (me); - } - - CoreParser::DOMNode* parse (const std::string& file_name) - { - CoreParser::DOMNode* doc = ExpatCoreParser::parse (file_name); - - if (XMLCoreParserDebugger::debug ()) - { - if (doc != 0) doc->print ("============ ALL ============="); - } - - return (doc); - } - - void initialize_factories () - { - m_default_factory = 0; - for (FactoryMap::iterator i = m_factories.begin(); - i != m_factories.end(); - ++i) { - delete i->second; - } - m_factories.clear (); - } - - void register_factory (const std::string& name, XMLCoreFactory* factory) - { - if (XMLCoreParserDebugger::debug ()) - { - std::cout << "XMLCoreFactory::register_factory> name=" << name - << " factory=" << factory << std::endl; - } - - m_factories[name] = factory; - } - - void register_default_factory (XMLCoreFactory* factory) - { - m_default_factory = factory; - } - - XMLCoreFactory* find_factory (const std::string& name) - { - FactoryMap::iterator it; - - it = m_factories.find (name); - - if (it == m_factories.end ()) - { - return (m_default_factory); - } - else - { - return ((*it).second); - } - } - - -private: - - XMLCoreParserImpl () - { - m_initialized = false; - m_default_factory = 0; - initialize (); - } - - ~XMLCoreParserImpl () { - initialize_factories(); - } - - bool initialize () - { - if (m_initialized) return (true); - - m_initialized = true; - - return (true); - } - - void terminate () - { - if (!m_initialized) return; - - m_initialized = false; - } - - bool m_initialized; - - FactoryMap m_factories; - XMLCoreFactory* m_default_factory; -}; - - XMLCoreParser::XMLCoreParser () { - XMLCoreParserImpl::instance (); } XMLCoreParser::~XMLCoreParser () @@ -455,34 +370,15 @@ void XMLCoreParser::set_create_entity_reference_nodes () XMLCoreNode XMLCoreParser::parse (const std::string& file_name) { - XMLCoreParserImpl& p = XMLCoreParserImpl::instance (); - - CoreParser::DOMNode* doc = p.parse (file_name); - - XMLCoreNode n (doc); - - return (n); -} - -void XMLCoreParser::debug_test (XMLCoreParser& parser, XMLCoreFactory* factory) -{ + m_level = 0; + std::unique_ptr<CoreParser::DOMNode> doc = ExpatCoreParser::parse (file_name); if (XMLCoreParserDebugger::debug ()) - { - std::cout << "XMLCoreParser::debug_test " << std::endl; - } - - XMLCoreNode node (0); - - if (factory == 0) - { - XMLCoreParserImpl& p = XMLCoreParserImpl::instance (); - - factory = p.find_factory ("AGDD"); - } - - if (factory != 0) factory->start (parser, node); + { + if (doc != 0) doc->print ("============ ALL ============="); + } + return XMLCoreNode (std::move (doc)); } - + void XMLCoreParser::visit (const std::string& file_name) { if (XMLCoreParserDebugger::debug ()) @@ -491,38 +387,24 @@ void XMLCoreParser::visit (const std::string& file_name) << file_name << std::endl; } - XMLCoreParserImpl& p = XMLCoreParserImpl::instance (); - - CoreParser::DOMNode* doc = p.parse (file_name.c_str ()); - - if (doc != 0) - { - if (XMLCoreParserDebugger::debug ()) - { - doc->print (); - } - - XMLCoreNode n (doc); + XMLCoreNode n = parse (file_name.c_str ()); - if (XMLCoreParserDebugger::debug ()) - { - CoreParser::DOMNode& node = n.get_node(); - CoreParser::DOMNode* nptr = &node; - std::cout << "XMLCoreParser::visit node=" << nptr << std::endl; - } + if (XMLCoreParserDebugger::debug ()) + { + const CoreParser::DOMNode& node = n.get_node(); + const CoreParser::DOMNode* nptr = &node; + std::cout << "XMLCoreParser::visit node=" << nptr << std::endl; + } - visit (n); - } + visit (n); } -void XMLCoreParser::visit (const XMLCoreNode& core_node) +void XMLCoreParser::visit (const XMLCoreNode& core_node) { - XMLCoreParserImpl& p = XMLCoreParserImpl::instance (); - // Get the name and value out for convenience - CoreParser::DOMNode& node = core_node.get_node (); - CoreParser::DOMNode* nptr = &node; + const CoreParser::DOMNode& node = core_node.get_node (); + const CoreParser::DOMNode* nptr = &node; const std::string& nodeName = node.get_name(); const std::string& nodeValue = node.get_value(); @@ -532,7 +414,7 @@ void XMLCoreParser::visit (const XMLCoreNode& core_node) std::cout << "XMLCoreParser::visit node(" << nptr << ") " << nodeName << std::endl; } - XMLCoreFactory* factory = p.find_factory (nodeName); + XMLCoreFactory* factory = find_factory (nodeName); if (XMLCoreParserDebugger::debug ()) { @@ -543,12 +425,8 @@ void XMLCoreParser::visit (const XMLCoreNode& core_node) { case CoreParser::DOMNode::DOCUMENT_NODE : { - CoreParser::DOMSiblings& siblings = node.get_siblings (); - CoreParser::DOMSiblings::iterator it; - - for (it = siblings.begin (); it != siblings.end (); ++it) - { - CoreParser::DOMNode* child = *it; + const CoreParser::DOMSiblings& siblings = node.get_siblings (); + for (const CoreParser::DOMNode* child : siblings) { XMLCoreNode n (child); visit (n); } @@ -569,15 +447,11 @@ void XMLCoreParser::visit (const XMLCoreNode& core_node) { std::cerr << "XMLCoreParser> Cannot find factory for element " << nodeName << std::endl; - register_factory (nodeName, new DummyFactory); + register_factory (nodeName, std::make_unique<DummyFactory>()); } - CoreParser::DOMSiblings& siblings = node.get_siblings (); - CoreParser::DOMSiblings::iterator it; - - for (it = siblings.begin (); it != siblings.end (); ++it) - { - CoreParser::DOMNode* child = *it; + const CoreParser::DOMSiblings& siblings = node.get_siblings (); + for (const CoreParser::DOMNode* child : siblings) { XMLCoreNode n (child); visit (n); } @@ -613,24 +487,23 @@ void XMLCoreParser::visit (const XMLCoreNode& core_node) } } -void XMLCoreParser::initialize_factories () +void XMLCoreParser::register_default_factory (std::unique_ptr<XMLCoreFactory> factory) { - XMLCoreParserImpl& p = XMLCoreParserImpl::instance (); - p.initialize_factories (); + m_default_factory = std::move (factory); } -void XMLCoreParser::register_factory (const std::string& name, XMLCoreFactory* factory) +void XMLCoreParser::register_factory (const std::string& name, + std::unique_ptr<XMLCoreFactory> factory) { - XMLCoreParserImpl& p = XMLCoreParserImpl::instance (); - p.register_factory (name, factory); + if (XMLCoreParserDebugger::debug ()) + { + std::cout << "XMLCoreFactory::register_factory> name=" << name + << " factory=" << factory.get() << std::endl; + } + + m_factories[name] = std::move (factory); } -void XMLCoreParser::register_default_factory (XMLCoreFactory* factory) -{ - XMLCoreParserImpl& p = XMLCoreParserImpl::instance (); - p.register_default_factory (factory); -} - void XMLCoreParser::register_external_entity (const std::string& name, const std::string& file_name) { if (XMLCoreParserDebugger::debug ()) @@ -652,5 +525,32 @@ void XMLCoreParser::register_text_entity (const std::string& name, const std::st ExpatCoreParser::register_text_entity (name, text); } + + +XMLCoreFactory* XMLCoreParser::find_factory (const std::string& name) +{ + FactoryMap::iterator it = m_factories.find (name); + if (it != m_factories.end ()) + { + return (*it).second.get(); + } + return m_default_factory.get(); +} + + +void XMLCoreParser::up() +{ + m_level += 1; +} + +void XMLCoreParser::down() +{ + m_level -= 1; +} + +int XMLCoreParser::level() const +{ + return m_level; +} diff --git a/Tools/XMLCoreParser/src/texpat.cxx b/Tools/XMLCoreParser/src/texpat.cxx index 88dda8849be1a5e54dae69fd1a46608c339cef25..9f36d5f10c46afee732dbe8c2606536b850c9b32 100755 --- a/Tools/XMLCoreParser/src/texpat.cxx +++ b/Tools/XMLCoreParser/src/texpat.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ @@ -8,7 +8,7 @@ int main (int /*argc*/, char* argv[]) { - CoreParser::DOMNode* doc = ExpatCoreParser::parse (argv[1]); + std::unique_ptr<CoreParser::DOMNode> doc = ExpatCoreParser::parse (argv[1]); if (doc != 0) doc->print ("============ ALL ============="); diff --git a/Tools/XMLCoreParser/test/example2_test.cxx b/Tools/XMLCoreParser/test/example2_test.cxx index a885d07997ce125861af3fe3c81a6ac8f1b46d07..ed1a1029f958c013df651d69edba50249b570a72 100755 --- a/Tools/XMLCoreParser/test/example2_test.cxx +++ b/Tools/XMLCoreParser/test/example2_test.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "XMLCoreParser/XMLCoreParser.h" @@ -37,9 +37,8 @@ public: int main (int argc, char* argv[]) { XMLCoreParser p; - Printer printer; - p.register_default_factory (&printer); + p.register_default_factory (std::make_unique<Printer>()); p.register_external_entity ("InnerDetector", "OtherInDet.xml"); p.register_external_entity ("LArCalorimeter", "NULL"); diff --git a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/DiscBounds.h b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/DiscBounds.h index 508607f0f5c3a71cb8d5607ebde1de21dd9b2028..d914e9186d27be3c6e961f1f00dae074c26d8802 100644 --- a/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/DiscBounds.h +++ b/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/DiscBounds.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -60,14 +60,17 @@ namespace Trk { /**Constructor for a symmetric disc around phi != 0*/ DiscBounds(double minrad, double maxrad, double avephi, double hphisec); - /**Copy constructor*/ - DiscBounds(const DiscBounds& discbo); - + /**Default copy constructor*/ + DiscBounds(const DiscBounds&) = default; + /**Destructor*/ virtual ~DiscBounds(); - /**Assignment operator*/ - DiscBounds& operator=(const DiscBounds& discbo); + /**Default move constructor*/ + DiscBounds(DiscBounds&& discbo) = default; + + /**Default move assignment operator*/ + DiscBounds& operator=(DiscBounds&& discbo) = default; /**Equality operator*/ virtual bool operator==(const SurfaceBounds& sbo) const override; diff --git a/Tracking/TrkDetDescr/TrkSurfaces/src/DiscBounds.cxx b/Tracking/TrkDetDescr/TrkSurfaces/src/DiscBounds.cxx index d90628900f37e5af80dfad0be03979866fac76a0..38c88c13b6ebb373b5cc0b3f9dba7903885a655a 100644 --- a/Tracking/TrkDetDescr/TrkSurfaces/src/DiscBounds.cxx +++ b/Tracking/TrkDetDescr/TrkSurfaces/src/DiscBounds.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -40,21 +40,10 @@ Trk::DiscBounds::DiscBounds(double minrad, double maxrad, double avephi, double swap(m_boundValues[DiscBounds::bv_rMin], m_boundValues[DiscBounds::bv_rMax]); } -Trk::DiscBounds::DiscBounds(const DiscBounds& discbo) : - Trk::SurfaceBounds(), - m_boundValues(discbo.m_boundValues) -{} Trk::DiscBounds::~DiscBounds() {} -Trk::DiscBounds& Trk::DiscBounds::operator=(const DiscBounds& discbo) -{ - if (this!=&discbo) - m_boundValues = discbo.m_boundValues; - return *this; -} - bool Trk::DiscBounds::operator==(const Trk::SurfaceBounds& sbo) const { // check the type first not to compare apples with oranges diff --git a/Tracking/TrkEvent/TrkCompetingRIOsOnTrack/TrkCompetingRIOsOnTrack/CompetingRIOsOnTrack.h b/Tracking/TrkEvent/TrkCompetingRIOsOnTrack/TrkCompetingRIOsOnTrack/CompetingRIOsOnTrack.h index da22b4b07b077d1d3157390bca5d3228b7117e94..e9b22fd268d99c03fb5fd13326695c9cc8641fc9 100755 --- a/Tracking/TrkEvent/TrkCompetingRIOsOnTrack/TrkCompetingRIOsOnTrack/CompetingRIOsOnTrack.h +++ b/Tracking/TrkEvent/TrkCompetingRIOsOnTrack/TrkCompetingRIOsOnTrack/CompetingRIOsOnTrack.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -18,6 +18,7 @@ //#include "TrkEventPrimitives/GlobalPosition.h" //#include "TrkEventPrimitives/ErrorMatrix.h" #include "TrkMeasurementBase/MeasurementBase.h" +#include <atomic> #include <ostream> #include <cassert> @@ -109,10 +110,10 @@ protected: friend class ::CompetingRIOsOnTrackCnv_p1; //! index of hightest assignment probability - mutable unsigned int m_indexMaxAssignProb; + mutable std::atomic_uint m_indexMaxAssignProb; //! assignment probabilities of the ROTs - mutable const std::vector<AssignmentProb>* m_assignProb; + const std::vector<AssignmentProb>* m_assignProb; //! used to flag that the m_indexMaxAssignProb hasn't been calculated yet bool m_maxProbCalculated; diff --git a/Tracking/TrkEvent/TrkCompetingRIOsOnTrack/src/CompetingRIOsOnTrack.cxx b/Tracking/TrkEvent/TrkCompetingRIOsOnTrack/src/CompetingRIOsOnTrack.cxx index e010e7a774b6d051ad56b3b8a7ce3c4f0d32f0d8..e1189805e961313475399653787137971de8b008 100755 --- a/Tracking/TrkEvent/TrkCompetingRIOsOnTrack/src/CompetingRIOsOnTrack.cxx +++ b/Tracking/TrkEvent/TrkCompetingRIOsOnTrack/src/CompetingRIOsOnTrack.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -26,11 +26,11 @@ Trk::CompetingRIOsOnTrack::CompetingRIOsOnTrack(): // copy constructor Trk::CompetingRIOsOnTrack::CompetingRIOsOnTrack(const Trk::CompetingRIOsOnTrack& compROT) : - Trk::MeasurementBase(compROT), - m_indexMaxAssignProb(compROT.m_indexMaxAssignProb), - m_assignProb(compROT.m_assignProb ? new std::vector<AssignmentProb>(*compROT.m_assignProb) : 0), - m_maxProbCalculated(compROT.m_maxProbCalculated) + Trk::MeasurementBase(compROT) { + m_indexMaxAssignProb = compROT.m_indexMaxAssignProb.load(); + m_assignProb = compROT.m_assignProb ? new std::vector<AssignmentProb>(*compROT.m_assignProb) : 0; + m_maxProbCalculated = compROT.m_maxProbCalculated; } // constructor with parameters @@ -49,7 +49,7 @@ Trk::CompetingRIOsOnTrack& Trk::CompetingRIOsOnTrack::operator=(const Trk::Compe delete m_assignProb; Trk::MeasurementBase::operator=(compROT); - m_indexMaxAssignProb = compROT.m_indexMaxAssignProb; + m_indexMaxAssignProb = compROT.m_indexMaxAssignProb.load(); m_assignProb = compROT.m_assignProb ? new std::vector<AssignmentProb>(*compROT.m_assignProb) : 0; m_maxProbCalculated = compROT.m_maxProbCalculated; } @@ -64,7 +64,7 @@ Trk::CompetingRIOsOnTrack& Trk::CompetingRIOsOnTrack::operator=(Trk::CompetingRI m_assignProb = compROT.m_assignProb; compROT.m_assignProb = nullptr; - m_indexMaxAssignProb = compROT.m_indexMaxAssignProb; + m_indexMaxAssignProb = compROT.m_indexMaxAssignProb.load(); m_maxProbCalculated = compROT.m_maxProbCalculated; } return (*this); diff --git a/Tracking/TrkEvent/TrkParameters/TrkParameters/ATLAS_CHECK_THREAD_SAFETY b/Tracking/TrkEvent/TrkParameters/TrkParameters/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..c2dcfaf739b6c08edfa9b2e9cf82e4e10b0204a8 --- /dev/null +++ b/Tracking/TrkEvent/TrkParameters/TrkParameters/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Tracking/TrkEvent/TrkParameters diff --git a/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/ATLAS_CHECK_THREAD_SAFETY b/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..a71e3c23e2994f8ddde32173e95e7927bda77575 --- /dev/null +++ b/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Tracking/TrkEvent/TrkParametersBase diff --git a/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/CurvilinearParametersT.h b/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/CurvilinearParametersT.h index adf5f1be2984ed8f44c3869321a85d9a0279311f..c8db11361a0cf1809026ea64eec0087d9d6c656e 100644 --- a/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/CurvilinearParametersT.h +++ b/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/CurvilinearParametersT.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -43,7 +43,6 @@ namespace Trk @author andreas.salzburger@cern.ch */ - template<int DIM,class T, class S> class CurvilinearParametersT : public ParametersT<DIM,T,S> { @@ -80,7 +79,7 @@ namespace Trk CurvilinearParametersT(CurvilinearParametersT<DIM,T,S>&&); /** Destructor */ - virtual ~CurvilinearParametersT() = default; + virtual ~CurvilinearParametersT()=default; /** Assignment operator*/ CurvilinearParametersT<DIM,T,S> &operator=(const CurvilinearParametersT<DIM,T,S>&); @@ -89,22 +88,18 @@ namespace Trk CurvilinearParametersT<DIM,T,S> &operator=(CurvilinearParametersT<DIM,T,S>&&); /** equality operator */ - virtual bool operator==(const ParametersBase<DIM,T>& rhs) const override; + virtual bool operator==(const ParametersBase<DIM,T>& rhs) const override final; /** Pseudo constructor */ - virtual CurvilinearParametersT<DIM,T,S>* clone() const override {return new CurvilinearParametersT<DIM,T,S>(*this);} + virtual CurvilinearParametersT<DIM,T,S>* clone() const override final + {return new CurvilinearParametersT<DIM,T,S>(*this);} /** Return the ParametersType enum */ - virtual ParametersType type() const override {return Trk::Curvilinear;} + virtual ParametersType type() const override + {return Trk::Curvilinear;} - /** Access to the Surface method */ - virtual const S& associatedSurface() const override; - - /** Test to see if there's a surface there. */ - virtual bool hasSurface() const override { return true; } - /** Return the measurementFrame of the parameters */ - virtual const Amg::RotationMatrix3D measurementFrame() const override; + virtual const Amg::RotationMatrix3D measurementFrame() const override final; /**Dumps relevant information about the track parameters into the ostream.*/ virtual MsgStream& dump(MsgStream& out) const override; diff --git a/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/CurvilinearParametersT.icc b/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/CurvilinearParametersT.icc index fa633e7b46a2f2ca4fb39dcc6462a31067cfc0a2..855b690ea1cda044cbca1dfb8c162d7d3e1d69ad 100644 --- a/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/CurvilinearParametersT.icc +++ b/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/CurvilinearParametersT.icc @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -17,12 +17,13 @@ namespace Trk template <int DIM,class T,class S> Trk::CurvilinearParametersT<DIM,T,S>::CurvilinearParametersT(const AmgVector(DIM+2)& parameters, AmgSymMatrix(DIM)* covariance, - unsigned int cIdentifier) : + unsigned int cIdentifier): ParametersT<DIM,T,S>(Amg::Vector3D(parameters[x],parameters[y],parameters[z]), - Amg::Vector3D(parameters[3],parameters[4],parameters[5]), - covariance), + Amg::Vector3D(parameters[3],parameters[4],parameters[5]), + covariance), m_cIdentifier(cIdentifier) { + // flip the charge according to qOverP if (parameters[6] < 0.) this->m_chargeDef.setCharge(-1); // assign the parameters @@ -32,6 +33,9 @@ namespace Trk this->m_parameters[phi] = this->momentum().phi(); this->m_parameters[theta] = this->momentum().theta(); this->m_parameters[qOverP] = parameters[6]/this->momentum().mag(); + + /* we need all the above to be there for the surfac*/ + this->m_surface=new S(this->m_position,curvilinearFrame()); } // Constructor with TP arguments @@ -43,11 +47,10 @@ namespace Trk AmgSymMatrix(DIM)* cov, unsigned int cIdentifier): ParametersT<DIM,T,S>(), - m_cIdentifier(cIdentifier) + m_cIdentifier(cIdentifier) { - this->m_position = pos; - this->m_covariance = cov; - + this->m_covariance =cov; + this->m_position=pos; // flip the charge according to qOverP if(tqOverP < 0.) this->m_chargeDef.setCharge(-1.); @@ -65,6 +68,8 @@ namespace Trk double p = fabs(1./tqOverP); this->m_momentum = Amg::Vector3D(p*cos(tphi)*sin(ttheta),p*sin(tphi)*sin(ttheta),p*cos(ttheta)); + /* we need all the above for the surface*/ + this->m_surface=new S(this->m_position,curvilinearFrame()); } // full global constructor @@ -92,6 +97,9 @@ namespace Trk this->m_parameters[Trk::qOverP] = charge/mom.mag(); this->m_position = pos; this->m_momentum = mom; + + /* we need all the above to be there for the surfac*/ + this->m_surface=new S(this->m_position,curvilinearFrame()); } // copy constructor @@ -170,19 +178,7 @@ namespace Trk // compare equality of base class parts return ParametersT<DIM,T,S>::operator==(rhs); } - - template<int DIM,class T,class S> - const S& CurvilinearParametersT<DIM,T,S>::associatedSurface() const - { - if(!this->m_surface) - { - // create the surface for global position and global rotation - const_cast<S*&>(this->m_surface) = new S(this->position(),curvilinearFrame()); - } - - return (*this->m_surface); - } - + // Screen output dump template<int DIM,class T,class S> MsgStream& CurvilinearParametersT<DIM,T,S>::dump(MsgStream& out) const @@ -208,7 +204,7 @@ namespace Trk template <int DIM,class T,class S> const Amg::RotationMatrix3D CurvilinearParametersT<DIM,T,S>::measurementFrame() const { - static Amg::RotationMatrix3D mFrame; + Amg::RotationMatrix3D mFrame; // the columnes CurvilinearUVT local_curvilinearFrame=curvilinearFrame(); mFrame.col(0) = local_curvilinearFrame.curvU(); @@ -240,7 +236,7 @@ namespace Trk if (updatedCovariance) { if (updatedCovariance != this->m_covariance) - delete this->m_covariance; + delete this->m_covariance; this->m_covariance = updatedCovariance; } diff --git a/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/ParametersBase.h b/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/ParametersBase.h index 51344f3040cad3e7362c6d064d41fd629cd871b3..820742cd0314364b454920931f6b76d9ba6f290c 100644 --- a/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/ParametersBase.h +++ b/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/ParametersBase.h @@ -118,6 +118,10 @@ namespace Trk /** Return the ParametersType enum */ virtual ParametersType type() const = 0; + /** Test to see if there's a surface there. */ + virtual bool hasSurface() const = 0 ; + + /** Returns charge of concrete type (i.e. must be implemented in inheriting classes) */ virtual double charge() const = 0; diff --git a/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/ParametersT.h b/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/ParametersT.h index 42b1e854d1633cdc75edc76c9fd2a6101e181241..a9cd767757739134a03a9ccdde767a27f981e07d 100644 --- a/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/ParametersT.h +++ b/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/ParametersT.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -108,25 +108,25 @@ namespace Trk virtual ParametersType type() const override {return Trk::AtaSurface;} /** Returns charge of track */ - virtual double charge() const override {return m_chargeDef.charge();} + virtual double charge() const override final {return m_chargeDef.charge();} /** Access method for the parameters */ - virtual const AmgVector(DIM)& parameters() const final {return m_parameters;} + virtual const AmgVector(DIM)& parameters() const override final {return m_parameters;} /** Access method for the covariance matrix - 0 if no covariance matrix is given */ - virtual const AmgSymMatrix(DIM)* covariance() const final {return m_covariance;} + virtual const AmgSymMatrix(DIM)* covariance() const override final {return m_covariance;} /** Access to the Surface method */ - virtual const S& associatedSurface() const override {return *m_surface;} + virtual const S& associatedSurface() const override final {return *m_surface;} /** Test to see if there's a surface there. */ - virtual bool hasSurface() const { return m_surface != nullptr; } + virtual bool hasSurface() const override final { return m_surface != nullptr; } /** Access method for the position */ - virtual const Amg::Vector3D& position() const final {return m_position;} + virtual const Amg::Vector3D& position() const override final {return m_position;} /** Access method for the momentum */ - virtual const Amg::Vector3D& momentum() const final {return m_momentum;} + virtual const Amg::Vector3D& momentum() const override final {return m_momentum;} /** Return the measurementFrame of the parameters */ const Amg::RotationMatrix3D measurementFrame() const override; @@ -138,7 +138,7 @@ namespace Trk template <class SURFACE_CNV, class ATA_SURFACE> friend class ::AtaSurfaceCnv_p1; - /** --- PRIVATE CONSTRUCTOR : for persistency purpose only */ + /** --- Protected constructors : for persistency purpose only */ ParametersT (const AmgVector(DIM)& parameters, const S* surface, AmgSymMatrix(DIM)* covariance = 0); diff --git a/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/ParametersT.icc b/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/ParametersT.icc index 5d62f06cc38c78865df7afd8d227ddeaff2d5507..dd7bac520e72a3f707387ea7f69673b8e2a38a3f 100644 --- a/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/ParametersT.icc +++ b/Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/ParametersT.icc @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -19,7 +19,6 @@ namespace Trk static constexpr double INVALID=std::numeric_limits<double>::quiet_NaN(); static constexpr double INVALID_P(10e9); static constexpr double INVALID_QOP(10e-9); - static const Amg::Vector2D INVALID_POSITION(INVALID,INVALID); template<typename T> int sgn(const T& val) @@ -76,8 +75,8 @@ namespace Trk // Constructor with local arguments - uses global <-> local for parameters template<int DIM,class T,class S> ParametersT<DIM,T,S>::ParametersT(const AmgVector(DIM)& parameters, - const S& surface, - AmgSymMatrix(DIM)* cov): + const S& surface, + AmgSymMatrix(DIM)* cov): ParametersBase<DIM,T>(), m_parameters(parameters), m_covariance(cov), @@ -133,7 +132,7 @@ namespace Trk Amg::Vector2D lPosition; const bool ok = m_surface->globalToLocal(position(),momentum(),lPosition); if(not ok) - lPosition = INVALID_POSITION; + lPosition = Amg::Vector2D (INVALID,INVALID); // fill the vector now m_parameters << lPosition[Trk::loc1], lPosition[Trk::loc2], momentum().phi(), @@ -174,7 +173,7 @@ namespace Trk Amg::Vector2D lPosition; const bool ok = m_surface->globalToLocal(position(),momentum(),lPosition); if (not ok) - lPosition = INVALID_POSITION; + lPosition = Amg::Vector2D (INVALID,INVALID); // fill the vector now m_parameters << lPosition[Trk::loc1], lPosition[Trk::loc2], phi, theta, qop; @@ -278,52 +277,7 @@ namespace Trk } } -// PROTECTED Constructor with local arguments - persistency only, ownership of surface given - template <int DIM,class T,class S> - Trk::ParametersT<DIM,T,S>::ParametersT(const AmgVector(DIM)& pars, - const S* surface, - AmgSymMatrix(DIM)* cov) : - ParametersBase<DIM,T>(), - m_parameters(pars), - m_covariance(cov), - m_surface(surface) - { - float qop = m_parameters[Trk::qOverP]; - // decide the sign of the charge - if (qop<0.) m_chargeDef.setCharge(-1); - - double p=0.0; - if (qop!=0.) { - p = fabs(1./qop); - } else { - // qop is unphysical. No momentum measurement. - p = INVALID_P; - qop = INVALID_QOP; - } - // fill momentum & then position using the surface - m_momentum = Amg::Vector3D(p*cos(m_parameters[Trk::phi])*sin(m_parameters[Trk::theta]), - p*sin(m_parameters[Trk::phi])*sin(m_parameters[Trk::theta]), - p*cos(m_parameters[Trk::theta])); - if (m_surface) - m_surface->localToGlobal(this->localPosition(),m_momentum,m_position); - else { - m_momentum.setZero(); - m_position.setZero(); - } - } - - template <int DIM,class T,class S> - Trk::ParametersT<DIM,T,S>::ParametersT(const Amg::Vector3D& pos, - const Amg::Vector3D& mom, - AmgSymMatrix(DIM)* cov): - m_parameters(), - m_covariance(cov), - m_position(pos), - m_momentum(mom), - m_surface(0), - m_chargeDef() - {} - + /** equality operator */ template<int DIM,class T,class S> bool ParametersT<DIM,T,S>::operator==(const ParametersBase<DIM,T>& rhs) const @@ -383,17 +337,17 @@ namespace Trk ParametersT<DIM,T,S>::ParametersT(): ParametersBase<DIM,T>(), m_parameters(), - m_covariance(0), + m_covariance(nullptr), m_position(), m_momentum(), - m_surface(0), + m_surface(nullptr), m_chargeDef() {} // protected update function template<int DIM,class T,class S> void ParametersT<DIM,T,S>::updateParameters(const AmgVector(DIM)& updatedParameters, - AmgSymMatrix(DIM)* updatedCovariance) + AmgSymMatrix(DIM)* updatedCovariance) { // valid to use != here, because value is either copied or modified, bool updatePosition = (updatedParameters[Trk::loc1] != m_parameters[Trk::loc1]) || (updatedParameters[Trk::loc2] != m_parameters[Trk::loc2]); @@ -406,17 +360,17 @@ namespace Trk // update the covariance if (updatedCovariance){ if (updatedCovariance != m_covariance) - delete m_covariance; + delete m_covariance; m_covariance = updatedCovariance; } //position or momentum update needed if (updatePosition){ if(m_surface) - m_surface->localToGlobal(this->localPosition(),m_momentum,m_position); + m_surface->localToGlobal(this->localPosition(),m_momentum,m_position); else { - m_momentum.setZero(); - m_position.setZero(); + m_momentum.setZero(); + m_position.setZero(); } } // momentum update is needed @@ -429,4 +383,53 @@ namespace Trk m_momentum = Amg::Vector3D(p*cos(phi)*sin(theta),p*sin(phi)*sin(theta),p*cos(theta)); } } + +//special C-tor used by the curvilinear parameters + template <int DIM,class T,class S> + Trk::ParametersT<DIM,T,S>::ParametersT(const Amg::Vector3D& pos, + const Amg::Vector3D& mom, + AmgSymMatrix(DIM)* cov): + m_parameters(), + m_covariance(cov), + m_position(pos), + m_momentum(mom), + m_surface(nullptr), + m_chargeDef() + {} + + // Protected Constructor with local arguments - persistency only, ownership of surface given + template <int DIM,class T,class S> + Trk::ParametersT<DIM,T,S>::ParametersT(const AmgVector(DIM)& pars, + const S* surface, + AmgSymMatrix(DIM)* cov) : + ParametersBase<DIM,T>(), + m_parameters(pars), + m_covariance(cov), + m_surface(surface) + { + float qop = m_parameters[Trk::qOverP]; + // decide the sign of the charge + if (qop<0.) m_chargeDef.setCharge(-1); + + double p=0.0; + if (qop!=0.) { + p = fabs(1./qop); + } else { + // qop is unphysical. No momentum measurement. + p = INVALID_P; + qop = INVALID_QOP; + } + // fill momentum & then position using the surface + m_momentum = Amg::Vector3D(p*cos(m_parameters[Trk::phi])*sin(m_parameters[Trk::theta]), + p*sin(m_parameters[Trk::phi])*sin(m_parameters[Trk::theta]), + p*cos(m_parameters[Trk::theta])); + if (m_surface) + m_surface->localToGlobal(this->localPosition(),m_momentum,m_position); + else { + m_momentum.setZero(); + m_position.setZero(); + } + } + + } // end of namespace Trk diff --git a/Tracking/TrkEvent/TrkPrepRawData/TrkPrepRawData/PrepRawData.h b/Tracking/TrkEvent/TrkPrepRawData/TrkPrepRawData/PrepRawData.h index a728e21fb50ad54ad876f1a5f82d7bcf7023a670..883a0c016ed3d5880167dc2874d380d4dae45e7f 100755 --- a/Tracking/TrkEvent/TrkPrepRawData/TrkPrepRawData/PrepRawData.h +++ b/Tracking/TrkEvent/TrkPrepRawData/TrkPrepRawData/PrepRawData.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -119,7 +119,8 @@ namespace Trk{ /**PrepRawData ID, not const because of DataPool*/ Identifier m_clusId; /**see derived classes for definition of meaning of LocalPosition*/ - Amg::Vector2D m_localPos; + // Need to force proper alignment; otherwise cling gets it wrong. + alignas(16) Amg::Vector2D m_localPos; /**Stores the identifiers of the RDOs.*/ std::vector<Identifier> m_rdoList; /**See derived classes for definition of ErrorMatrix */ diff --git a/Tracking/TrkEvent/TrkRIO_OnTrack/TrkRIO_OnTrack/RIO_OnTrackErrorScaling.h b/Tracking/TrkEvent/TrkRIO_OnTrack/TrkRIO_OnTrack/RIO_OnTrackErrorScaling.h index 911f87f0e13f85bd7fa070cf369e03393b2949f9..f246e48a5edb21c5d26a7653c97ea7934dcb36cc 100644 --- a/Tracking/TrkEvent/TrkRIO_OnTrack/TrkRIO_OnTrack/RIO_OnTrackErrorScaling.h +++ b/Tracking/TrkEvent/TrkRIO_OnTrack/TrkRIO_OnTrack/RIO_OnTrackErrorScaling.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /* Dear emacs, this is -*-c++-*- */ #ifndef _RIO_OnTrackErrorScaling_H_ @@ -30,7 +30,7 @@ protected : /// @param n_paramter_sets the number of parameter sets /// @param param_names the names of the parameter sets /// @param n_paramters the number of parameters per set. - void checkParameters(const char *label, unsigned int n_paramter_sets, const char **param_names, unsigned int n_paramters) const; + void checkParameters(const char *label, unsigned int n_paramter_sets, const char* const* param_names, unsigned int n_paramters) const; private: std::vector<std::vector<double> > m_params; }; diff --git a/Tracking/TrkEvent/TrkRIO_OnTrack/src/RIO_OnTrackErrorScaling.cxx b/Tracking/TrkEvent/TrkRIO_OnTrack/src/RIO_OnTrackErrorScaling.cxx index 4042a8554fd4bbb12ad470a873229e5c628274e5..df58b593585145f41a75c11eb3c74d88e91e63d1 100644 --- a/Tracking/TrkEvent/TrkRIO_OnTrack/src/RIO_OnTrackErrorScaling.cxx +++ b/Tracking/TrkEvent/TrkRIO_OnTrack/src/RIO_OnTrackErrorScaling.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "TrkRIO_OnTrack/RIO_OnTrackErrorScaling.h" @@ -13,7 +13,7 @@ CLID RIO_OnTrackErrorScaling::clid() const { void RIO_OnTrackErrorScaling::checkParameters(const char *label, unsigned int n_paramter_sets, - const char **param_names, + const char* const* param_names, unsigned int n_paramters) const { if (params().size() != n_paramter_sets ) { diff --git a/Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h b/Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h index bc8746a378ef2dd5e40799954d73a6ea5dae9236..1b1a5cd0a60c1a3e56bca04e948b7920e9acda1b 100755 --- a/Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h +++ b/Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h @@ -191,10 +191,10 @@ namespace Trk /** * Find perigee in the vector of track parameters. * It can be used to lazy-init the m_perigeeParameters - */ - void findPerigee() const; - - /** + */ + void findPerigee() const; + + /** * A vector of TrackParameters: these can be any of the classes that * derive from Trk::TrackParameters, for example, Perigee, MeasuredPerigee, * AtaCylinder etc. @@ -260,6 +260,13 @@ namespace Trk #ifndef NDEBUG static std::atomic<unsigned int> s_numberOfInstantiations; #endif + private: + /** + * find PerigeeImpl. + * Assumes that Perigee parameters are currently inValid + */ + void findPerigeeImpl() const; + };//end of class definitions @@ -291,7 +298,7 @@ inline const Trk::Perigee* Trk::Track::perigeeParameters() const if(!m_perigeeParameters.isValid()){ //findPerigee performs the setting of the parameters //i.e does the CachedValue set - findPerigee(); + findPerigeeImpl(); } //Here the cached value type is a pointer return *(m_perigeeParameters.ptr()); diff --git a/Tracking/TrkEvent/TrkTrack/src/Track.cxx b/Tracking/TrkEvent/TrkTrack/src/Track.cxx index b18bd9411b24ea539d98d092549a36a3bd05f4b0..91e9b3c9df7a26503f5d986777daa001cdd39d67 100755 --- a/Tracking/TrkEvent/TrkTrack/src/Track.cxx +++ b/Tracking/TrkEvent/TrkTrack/src/Track.cxx @@ -29,15 +29,12 @@ Trk::Track::Track (): m_cachedParameterVector{}, m_cachedMeasurementVector{}, m_cachedOutlierVector{}, - m_trackStateVector( 0 ), - m_perigeeParameters{}, - m_fitQuality(0), - m_trackSummary(0) + m_trackStateVector(nullptr), + m_perigeeParameters{},//default c-tor value to invalid + m_fitQuality(nullptr), + m_trackSummary(nullptr) { if (debug) std::cout<<"Trk::Track Ctor 1 :"<<this<<std::endl; - //perigee parameters are nullptr and invalid - m_perigeeParameters.store(nullptr); - m_perigeeParameters.reset(); #ifndef NDEBUG s_numberOfInstantiations++; // new Track, so increment total count @@ -53,12 +50,12 @@ Trk::Track::Track( const TrackInfo& info, m_trackStateVector(trackStateOnSurfaces), m_perigeeParameters{},//default c-tor value to invalid m_fitQuality(fitQuality), - m_trackSummary(0), + m_trackSummary(nullptr), m_trackInfo( info ) { if (debug) std::cout<<"Trk::Track Ctor 2 :"<<this<<std::endl; //find the Perigee params they will become valid given the outcome - findPerigee(); + findPerigeeImpl(); #ifndef NDEBUG s_numberOfInstantiations++; // new Track, so increment total count #endif @@ -69,10 +66,10 @@ Trk::Track::Track (const Track& rhs): m_cachedParameterVector {}, m_cachedMeasurementVector {}, m_cachedOutlierVector{}, - m_trackStateVector( 0 ), + m_trackStateVector(nullptr), m_perigeeParameters{}, //default c-tor value to invalid - m_fitQuality(0), - m_trackSummary(0) + m_fitQuality(nullptr), + m_trackSummary(nullptr) { if (debug) std::cout<<"Trk::Track Ctor 3 :"<<this<<std::endl; using namespace Trk; @@ -122,9 +119,10 @@ Trk::Track& Trk::Track::operator= (const Track& rhs) if (rhs.trackSummary()!=nullptr){ m_trackSummary = new TrackSummary( *(rhs.m_trackSummary) ); } - //perigee parameters are nullptr and invalid - m_perigeeParameters.store(nullptr); + //perigee parameters set to invalid m_perigeeParameters.reset(); + + //Create the TrackStateVector and the perigeeParamters if( rhs.m_trackStateVector!=0 ) { m_trackStateVector = new DataVector<const TrackStateOnSurface>; @@ -136,13 +134,9 @@ Trk::Track& Trk::Track::operator= (const Track& rhs) TrackStateOnSurface* tsos = (**itTSoS).clone(); m_trackStateVector->push_back( tsos ); if(tsos!=nullptr){ - if(!m_perigeeParameters.isValid()){//should be invalid from above - //Now will contain a ptr and be valid - if (const Trk::Perigee* perigee = - dynamic_cast<const Trk::Perigee*>( tsos->trackParameters())) - { - m_perigeeParameters.store(perigee); - } + const Trk::Perigee* perigee = dynamic_cast<const Trk::Perigee*>(tsos->trackParameters() ) ; + if (perigee!=0 && tsos->type(TrackStateOnSurface::Perigee)){ + m_perigeeParameters.store(perigee);//Now they will be valid } } } @@ -182,7 +176,13 @@ const DataVector<const Trk::TrackParameters>* Trk::Track::trackParameters() cons return m_cachedParameterVector.ptr(); } -void Trk :: Track :: findPerigee() const +void Trk::Track::findPerigee() const { + if (!m_perigeeParameters.isValid()){ + findPerigeeImpl(); + } +} + +void Trk::Track::findPerigeeImpl() const { // loop through all passed parameters and, if there is a Perigee in there, // assign it to Perigee parameters. Obviously there should never be more @@ -191,12 +191,7 @@ void Trk :: Track :: findPerigee() const // there can be other objects, like VertexOnTrack measurements, with // params at a Perigee surface, thus an additional TSoS type check. AS/WL - /* Here I assume, that this is externally wrapped like - * if (!m_perigeeParameters.valid){ - * findPerigee(); - * } - */ - const Trk::Perigee* tmpPerigeeParameters=nullptr; + const Trk::Perigee* tmpPerigeeParameters=nullptr; if (m_trackStateVector!=nullptr){ DataVector<const TrackStateOnSurface>::const_iterator it = m_trackStateVector->begin(); diff --git a/Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h b/Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h index 02c652ec12b20dfc20112f81af39454b3984ae70..a6566b02a90fb52ad15a1ceee25fcb5d8914fc02 100755 --- a/Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h +++ b/Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h @@ -100,6 +100,15 @@ enum SummaryType { numberOfMdtHoles =25, //! number of MDT measurements missing from the track numberOfTgcEtaHoles =26, //! number of TGC Eta measurements missing from the track numberOfTgcPhiHoles =27, //! number of TGC Phi measurements missing from the track + + // New Small Wheel + numberOfStgcEtaHits =67, //! number of TGC Eta measurements missing from the track + numberOfStgcPhiHits =68, //! number of TGC Phi measurements missing from the track + numberOfMmHits =69, //! number of TGC Eta measurements missing from the track + numberOfStgcEtaHoles =70, //! number of TGC Eta measurements missing from the track + numberOfStgcPhiHoles =71, //! number of TGC Phi measurements missing from the track + numberOfMmHoles =72, //! number of TGC Eta measurements missing from the track + numberOfCscUnspoiltEtaHits =45, //! number of unspoilt CSC eta measurements (all CSC phi measurements are by definition spoilt). See Muon::CscClusterStatus for definitions of 'spoiled' hits. numberOfGoodMdtHits =66, //!number of non-deweighted MDT hits. Only here as a placeholder, will be filled only on xAOD::Muon // --- all @@ -115,7 +124,7 @@ enum SummaryType { pixeldEdx_res = 51, //!< the dE/dx estimate, calculated using the pixel clusters [?] // -- numbers... - numberOfTrackSummaryTypes = 67 + numberOfTrackSummaryTypes = 73 }; // Troels.Petersen@cern.ch: diff --git a/Tracking/TrkEvent/TrkTrackSummary/src/TrackSummary.cxx b/Tracking/TrkEvent/TrkTrackSummary/src/TrackSummary.cxx index 67b6efac6b1f322bf651f6709a305af9a0fdcd23..4771af6108a197095aa653d5cdd94ea38b1f0647 100755 --- a/Tracking/TrkEvent/TrkTrackSummary/src/TrackSummary.cxx +++ b/Tracking/TrkEvent/TrkTrackSummary/src/TrackSummary.cxx @@ -160,6 +160,15 @@ T_out& dumpTrackSummary( T_out& out, const TrackSummary& trackSum ) out << " * Number of dead TRT straws : "<<trackSum.get(numberOfTRTDeadStraws)<<"\n"; out << " * Number of MDT hits : "<<trackSum.get(numberOfMdtHits)<<"\n"; out << " * Number of MDT holes : "<<trackSum.get(numberOfMdtHoles)<<"\n"; + + // New Small Wheel + out << " * Number of STGC hits : phi "<<trackSum.get(numberOfStgcPhiHits) + << " eta " <<trackSum.get(numberOfStgcEtaHits)<<"\n"; + out << " * Number of STGC holes : phi "<<trackSum.get(numberOfStgcPhiHoles) + << " eta "<<trackSum.get(numberOfStgcEtaHoles)<<"\n"; + out << " * Number of MM hits : "<<trackSum.get(numberOfMmHits)<<"\n"; + out << " * Number of MM holes : "<<trackSum.get(numberOfMmHoles)<<"\n"; + out << " * Number of TGC hits : phi "<<trackSum.get(numberOfTgcPhiHits) << " eta " <<trackSum.get(numberOfTgcEtaHits)<<"\n"; out << " * Number of TGC holes : phi "<<trackSum.get(numberOfTgcPhiHoles) diff --git a/Tracking/TrkEventCnv/TrkEventTPCnv/src/TrkCompetingRIOsOnTrack/CompetingRIOsOnTrackCnv_p1.cxx b/Tracking/TrkEventCnv/TrkEventTPCnv/src/TrkCompetingRIOsOnTrack/CompetingRIOsOnTrackCnv_p1.cxx index 519567ab78483ba455a054916daabf69c172d6da..02b361bc0691a7289e2fbf3cd5d92b704118a860 100644 --- a/Tracking/TrkEventCnv/TrkEventTPCnv/src/TrkCompetingRIOsOnTrack/CompetingRIOsOnTrackCnv_p1.cxx +++ b/Tracking/TrkEventCnv/TrkEventTPCnv/src/TrkCompetingRIOsOnTrack/CompetingRIOsOnTrackCnv_p1.cxx @@ -19,13 +19,14 @@ void CompetingRIOsOnTrackCnv_p1::persToTrans( const Trk::CompetingRIOsOnTrack_p1 EigenHelpers::vectorToEigenMatrix(dummy.values, transObj->m_localCovariance, "CompetingRIOsOnTrackCnv_p1"); #ifdef UseFloatsIn_CompetingRIOsOnTrack - std::vector<double> tmpVector; + std::vector<double> *tmpVector = new std::vector<double>(); + tmpVector->reserve(persObj->m_assignProb.size()); for (std::vector<float>::const_iterator itr = persObj->m_assignProb.begin() ; itr != persObj->m_assignProb.end() ; ++itr) { - tmpVector.push_back((double)(*itr)); + tmpVector->push_back((double)(*itr)); } - transObj->m_assignProb = new std::vector<double>(tmpVector); + transObj->m_assignProb = tmpVector; #else transObj->m_assignProb = new std::vector<double>(persObj->m_assignProb); #endif @@ -34,7 +35,7 @@ void CompetingRIOsOnTrackCnv_p1::persToTrans( const Trk::CompetingRIOsOnTrack_p1 double maxAssgnProb = 0; unsigned int max = transObj->m_assignProb->size(); typedef std::vector< Trk::CompetingRIOsOnTrack::AssignmentProb > t_probVec; - t_probVec& tProbVec = *(const_cast<t_probVec*>(transObj->m_assignProb)); + const t_probVec& tProbVec = *(transObj->m_assignProb); for (unsigned int i=0; i<max; i++) { if ( tProbVec[i] >= maxAssgnProb) { transObj->m_indexMaxAssignProb=i; diff --git a/Tracking/TrkEventCnv/TrkTruthTPCnv/share/PRD_MultiTruthCollectionCnv_p2_test.ref b/Tracking/TrkEventCnv/TrkTruthTPCnv/share/PRD_MultiTruthCollectionCnv_p2_test.ref index 8633d8ace9b4883a00f6e29e68937582b9b5e684..4a7c11977bb121447c32603da54a83a704e8898b 100644 --- a/Tracking/TrkEventCnv/TrkTruthTPCnv/share/PRD_MultiTruthCollectionCnv_p2_test.ref +++ b/Tracking/TrkEventCnv/TrkTruthTPCnv/share/PRD_MultiTruthCollectionCnv_p2_test.ref @@ -5,4 +5,4 @@ HistogramPersis...WARNING Histograms saving not required. ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr Ready test1 -HepMcParticleLink INFO find_hostkey: Using TruthEvent as McEventCollection key for this job +HepMcParticleLink INFO find_proxy: Using TruthEvent as McEventCollection key for this job diff --git a/Tracking/TrkEventCnv/TrkTruthTPCnv/share/PRD_MultiTruthCollectionCnv_p3_test.ref b/Tracking/TrkEventCnv/TrkTruthTPCnv/share/PRD_MultiTruthCollectionCnv_p3_test.ref index 8633d8ace9b4883a00f6e29e68937582b9b5e684..4a7c11977bb121447c32603da54a83a704e8898b 100644 --- a/Tracking/TrkEventCnv/TrkTruthTPCnv/share/PRD_MultiTruthCollectionCnv_p3_test.ref +++ b/Tracking/TrkEventCnv/TrkTruthTPCnv/share/PRD_MultiTruthCollectionCnv_p3_test.ref @@ -5,4 +5,4 @@ HistogramPersis...WARNING Histograms saving not required. ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr Ready test1 -HepMcParticleLink INFO find_hostkey: Using TruthEvent as McEventCollection key for this job +HepMcParticleLink INFO find_proxy: Using TruthEvent as McEventCollection key for this job diff --git a/Tracking/TrkEventCnv/TrkTruthTPCnv/share/TrackTruthCollectionCnv_p1_test.ref b/Tracking/TrkEventCnv/TrkTruthTPCnv/share/TrackTruthCollectionCnv_p1_test.ref index 8633d8ace9b4883a00f6e29e68937582b9b5e684..4a7c11977bb121447c32603da54a83a704e8898b 100644 --- a/Tracking/TrkEventCnv/TrkTruthTPCnv/share/TrackTruthCollectionCnv_p1_test.ref +++ b/Tracking/TrkEventCnv/TrkTruthTPCnv/share/TrackTruthCollectionCnv_p1_test.ref @@ -5,4 +5,4 @@ HistogramPersis...WARNING Histograms saving not required. ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr Ready test1 -HepMcParticleLink INFO find_hostkey: Using TruthEvent as McEventCollection key for this job +HepMcParticleLink INFO find_proxy: Using TruthEvent as McEventCollection key for this job diff --git a/Tracking/TrkEventCnv/TrkTruthTPCnv/share/TrackTruthCollectionCnv_p2_test.ref b/Tracking/TrkEventCnv/TrkTruthTPCnv/share/TrackTruthCollectionCnv_p2_test.ref index 8633d8ace9b4883a00f6e29e68937582b9b5e684..4a7c11977bb121447c32603da54a83a704e8898b 100644 --- a/Tracking/TrkEventCnv/TrkTruthTPCnv/share/TrackTruthCollectionCnv_p2_test.ref +++ b/Tracking/TrkEventCnv/TrkTruthTPCnv/share/TrackTruthCollectionCnv_p2_test.ref @@ -5,4 +5,4 @@ HistogramPersis...WARNING Histograms saving not required. ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr Ready test1 -HepMcParticleLink INFO find_hostkey: Using TruthEvent as McEventCollection key for this job +HepMcParticleLink INFO find_proxy: Using TruthEvent as McEventCollection key for this job diff --git a/Tracking/TrkEventCnv/TrkTruthTPCnv/share/TruthTrajectoryCnv_p1_test.ref b/Tracking/TrkEventCnv/TrkTruthTPCnv/share/TruthTrajectoryCnv_p1_test.ref index 8633d8ace9b4883a00f6e29e68937582b9b5e684..4a7c11977bb121447c32603da54a83a704e8898b 100644 --- a/Tracking/TrkEventCnv/TrkTruthTPCnv/share/TruthTrajectoryCnv_p1_test.ref +++ b/Tracking/TrkEventCnv/TrkTruthTPCnv/share/TruthTrajectoryCnv_p1_test.ref @@ -5,4 +5,4 @@ HistogramPersis...WARNING Histograms saving not required. ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr Ready test1 -HepMcParticleLink INFO find_hostkey: Using TruthEvent as McEventCollection key for this job +HepMcParticleLink INFO find_proxy: Using TruthEvent as McEventCollection key for this job diff --git a/Tracking/TrkEventCnv/TrkTruthTPCnv/share/TruthTrajectoryCnv_p2_test.ref b/Tracking/TrkEventCnv/TrkTruthTPCnv/share/TruthTrajectoryCnv_p2_test.ref index 8633d8ace9b4883a00f6e29e68937582b9b5e684..4a7c11977bb121447c32603da54a83a704e8898b 100644 --- a/Tracking/TrkEventCnv/TrkTruthTPCnv/share/TruthTrajectoryCnv_p2_test.ref +++ b/Tracking/TrkEventCnv/TrkTruthTPCnv/share/TruthTrajectoryCnv_p2_test.ref @@ -5,4 +5,4 @@ HistogramPersis...WARNING Histograms saving not required. ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr Ready test1 -HepMcParticleLink INFO find_hostkey: Using TruthEvent as McEventCollection key for this job +HepMcParticleLink INFO find_proxy: Using TruthEvent as McEventCollection key for this job diff --git a/Tracking/TrkEventCnv/TrkTruthTPCnv/test/PRD_MultiTruthCollectionCnv_p2_test.cxx b/Tracking/TrkEventCnv/TrkTruthTPCnv/test/PRD_MultiTruthCollectionCnv_p2_test.cxx index 69aafc4c4a3322880b5c49f1b2782e66b0dffe4d..62876f04a91c6cc6f6d2cf7b1da926d7928fead3 100644 --- a/Tracking/TrkEventCnv/TrkTruthTPCnv/test/PRD_MultiTruthCollectionCnv_p2_test.cxx +++ b/Tracking/TrkEventCnv/TrkTruthTPCnv/test/PRD_MultiTruthCollectionCnv_p2_test.cxx @@ -29,6 +29,7 @@ void compare (const HepMcParticleLink& p1, assert ( p1.isValid() == p2.isValid() ); assert ( p1.barcode() == p2.barcode() ); assert ( p1.eventIndex() == p2.eventIndex() ); + assert ( p1.getEventCollectionAsChar() == p2.getEventCollectionAsChar() ); assert ( p1.cptr() == p2.cptr() ); assert ( p1 == p2 ); } diff --git a/Tracking/TrkEventCnv/TrkTruthTPCnv/test/PRD_MultiTruthCollectionCnv_p3_test.cxx b/Tracking/TrkEventCnv/TrkTruthTPCnv/test/PRD_MultiTruthCollectionCnv_p3_test.cxx index 7f951db5a53dd296b76f13cbc55b63e496d90cbe..129ecfe4178ef5d46cf0a11af5351e027db8a465 100644 --- a/Tracking/TrkEventCnv/TrkTruthTPCnv/test/PRD_MultiTruthCollectionCnv_p3_test.cxx +++ b/Tracking/TrkEventCnv/TrkTruthTPCnv/test/PRD_MultiTruthCollectionCnv_p3_test.cxx @@ -29,6 +29,7 @@ void compare (const HepMcParticleLink& p1, assert ( p1.isValid() == p2.isValid() ); assert ( p1.barcode() == p2.barcode() ); assert ( p1.eventIndex() == p2.eventIndex() ); + assert ( p1.getEventCollectionAsChar() == p2.getEventCollectionAsChar() ); assert ( p1.cptr() == p2.cptr() ); assert ( p1 == p2 ); } diff --git a/Tracking/TrkEventCnv/TrkTruthTPCnv/test/TrackTruthCollectionCnv_p1_test.cxx b/Tracking/TrkEventCnv/TrkTruthTPCnv/test/TrackTruthCollectionCnv_p1_test.cxx index 42a0f3b3ae3f477d16999226726ed29fd9e42e63..d8dc05d3765e50e20d0faa20aea9e590cfe104c7 100644 --- a/Tracking/TrkEventCnv/TrkTruthTPCnv/test/TrackTruthCollectionCnv_p1_test.cxx +++ b/Tracking/TrkEventCnv/TrkTruthTPCnv/test/TrackTruthCollectionCnv_p1_test.cxx @@ -28,6 +28,7 @@ void compare (const HepMcParticleLink& p1, assert ( p1.isValid() == p2.isValid() ); assert ( p1.barcode() == p2.barcode() ); assert ( p1.eventIndex() == p2.eventIndex() ); + assert ( p1.getEventCollectionAsChar() == p2.getEventCollectionAsChar() ); assert ( p1.cptr() == p2.cptr() ); assert ( p1 == p2 ); } diff --git a/Tracking/TrkEventCnv/TrkTruthTPCnv/test/TrackTruthCollectionCnv_p2_test.cxx b/Tracking/TrkEventCnv/TrkTruthTPCnv/test/TrackTruthCollectionCnv_p2_test.cxx index d26a7783794d6407b6674637577e32cfb2fe4e0c..27eb48c3bdcb7acfee6d9d2975c4ab04f3131399 100644 --- a/Tracking/TrkEventCnv/TrkTruthTPCnv/test/TrackTruthCollectionCnv_p2_test.cxx +++ b/Tracking/TrkEventCnv/TrkTruthTPCnv/test/TrackTruthCollectionCnv_p2_test.cxx @@ -28,6 +28,7 @@ void compare (const HepMcParticleLink& p1, assert ( p1.isValid() == p2.isValid() ); assert ( p1.barcode() == p2.barcode() ); assert ( p1.eventIndex() == p2.eventIndex() ); + assert ( p1.getEventCollectionAsChar() == p2.getEventCollectionAsChar() ); assert ( p1.cptr() == p2.cptr() ); assert ( p1 == p2 ); } diff --git a/Tracking/TrkEventCnv/TrkTruthTPCnv/test/TruthTrajectoryCnv_p1_test.cxx b/Tracking/TrkEventCnv/TrkTruthTPCnv/test/TruthTrajectoryCnv_p1_test.cxx index e9d28f4fb2397f68c3066ed157956b6bd2c7652e..a934c5d72a0c80395bd69ba5cf0e23acb8932422 100644 --- a/Tracking/TrkEventCnv/TrkTruthTPCnv/test/TruthTrajectoryCnv_p1_test.cxx +++ b/Tracking/TrkEventCnv/TrkTruthTPCnv/test/TruthTrajectoryCnv_p1_test.cxx @@ -28,6 +28,7 @@ void compare (const HepMcParticleLink& p1, assert ( p1.isValid() == p2.isValid() ); assert ( p1.barcode() == p2.barcode() ); assert ( p1.eventIndex() == p2.eventIndex() ); + assert ( p1.getEventCollectionAsChar() == p2.getEventCollectionAsChar() ); assert ( p1.cptr() == p2.cptr() ); assert ( p1 == p2 ); } diff --git a/Tracking/TrkEventCnv/TrkTruthTPCnv/test/TruthTrajectoryCnv_p2_test.cxx b/Tracking/TrkEventCnv/TrkTruthTPCnv/test/TruthTrajectoryCnv_p2_test.cxx index d65640f18d4b4e016fabd44b9664341791bcb8bb..61db3c83735ab38efe375eee3056faa7cc099a98 100644 --- a/Tracking/TrkEventCnv/TrkTruthTPCnv/test/TruthTrajectoryCnv_p2_test.cxx +++ b/Tracking/TrkEventCnv/TrkTruthTPCnv/test/TruthTrajectoryCnv_p2_test.cxx @@ -28,6 +28,7 @@ void compare (const HepMcParticleLink& p1, assert ( p1.isValid() == p2.isValid() ); assert ( p1.barcode() == p2.barcode() ); assert ( p1.eventIndex() == p2.eventIndex() ); + assert ( p1.getEventCollectionAsChar() == p2.getEventCollectionAsChar() ); assert ( p1.cptr() == p2.cptr() ); assert ( p1 == p2 ); } diff --git a/Tracking/TrkExtrapolation/TrkExRungeKuttaIntersector/CMakeLists.txt b/Tracking/TrkExtrapolation/TrkExRungeKuttaIntersector/CMakeLists.txt index dd94301dd40e505f0428bbd14ad78052c3d5cf26..7c05f55b53ade4690009145cf5f67c1f522427a4 100644 --- a/Tracking/TrkExtrapolation/TrkExRungeKuttaIntersector/CMakeLists.txt +++ b/Tracking/TrkExtrapolation/TrkExRungeKuttaIntersector/CMakeLists.txt @@ -15,6 +15,7 @@ atlas_depends_on_subdirs( PUBLIC Tracking/TrkExtrapolation/TrkExInterfaces Tracking/TrkExtrapolation/TrkExUtils PRIVATE + Control/CxxUtils AtlasTest/TestTools Tracking/TrkDetDescr/TrkDetDescrUtils Tracking/TrkDetDescr/TrkGeometry @@ -23,6 +24,8 @@ atlas_depends_on_subdirs( PUBLIC # External dependencies: find_package( Eigen ) +find_package( ROOT ) + # Component(s) in the package: atlas_add_component( TrkExRungeKuttaIntersector @@ -38,7 +41,8 @@ atlas_install_headers( TrkExRungeKuttaIntersector ) atlas_add_test( RungeKuttaIntersector_test SOURCES test/RungeKuttaIntersector_test.cxx - LINK_LIBRARIES TrkExUtils GaudiKernel TestTools + INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} + LINK_LIBRARIES TrkExUtils GaudiKernel TestTools CxxUtils ${ROOT_LIBRARIES} EXTRA_PATTERNS "^AtlasFieldSvc +INFO" ENVIRONMENT "JOBOPTSEARCHPATH=${CMAKE_CURRENT_SOURCE_DIR}/share" ) diff --git a/Tracking/TrkExtrapolation/TrkExRungeKuttaIntersector/test/RungeKuttaIntersector_test.cxx b/Tracking/TrkExtrapolation/TrkExRungeKuttaIntersector/test/RungeKuttaIntersector_test.cxx index 14b0fddb0e2ee14227ba03eac7a14710bffcd754..f0c0809b019ae46ea9c49cf8eec832bbfe0f983c 100644 --- a/Tracking/TrkExtrapolation/TrkExRungeKuttaIntersector/test/RungeKuttaIntersector_test.cxx +++ b/Tracking/TrkExtrapolation/TrkExRungeKuttaIntersector/test/RungeKuttaIntersector_test.cxx @@ -14,9 +14,11 @@ #include "TestTools/initGaudi.h" #include "TestTools/FLOATassert.h" #include "AthenaKernel/Units.h" +#include "CxxUtils/ubsan_suppress.h" #include "GaudiKernel/ToolHandle.h" #include "GaudiKernel/Incident.h" #include "GaudiKernel/IIncidentListener.h" +#include "TInterpreter.h" #include <iostream> #include <cassert> #include <cmath> @@ -269,6 +271,7 @@ void test_perigee (Trk::IIntersector& tool) int main() { std::cout << "RungeKuttaIntersector_test\n"; + CxxUtils::ubsan_suppress ([]() { TInterpreter::Instance(); }); ISvcLocator* svcloc = nullptr; Athena_test::initGaudi ("RungeKuttaIntersector_test.txt", svcloc); ToolHandle<Trk::IIntersector> tool ("Trk::RungeKuttaIntersector"); diff --git a/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/CMakeLists.txt b/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/CMakeLists.txt index 950b28137dd7ed54aa52b716b3af0d89c5111da7..781ce05778678a09f17faa508f6948437a69330f 100644 --- a/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/CMakeLists.txt +++ b/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/CMakeLists.txt @@ -14,12 +14,14 @@ atlas_depends_on_subdirs( PUBLIC Tracking/TrkExtrapolation/TrkExInterfaces Tracking/TrkExtrapolation/TrkExUtils PRIVATE + Control/CxxUtils Event/EventPrimitives Tracking/TrkDetDescr/TrkSurfaces Tracking/TrkEvent/TrkParameters ) # External dependencies: find_package( Eigen ) +find_package( ROOT ) # Component(s) in the package: atlas_add_component( TrkExSolenoidalIntersector @@ -42,7 +44,8 @@ atlas_add_test( SolenoidParametrization_test atlas_add_test( SolenoidalIntersector_test SOURCES test/SolenoidalIntersector_test.cxx - LINK_LIBRARIES TrkExUtils GaudiKernel TestTools + INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} + LINK_LIBRARIES TrkExUtils GaudiKernel TestTools CxxUtils ${ROOT_LIBRARIES} EXTRA_PATTERNS "^AtlasFieldSvc +INFO" ENVIRONMENT "JOBOPTSEARCHPATH=${CMAKE_CURRENT_SOURCE_DIR}/share" ) diff --git a/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/test/SolenoidalIntersector_test.cxx b/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/test/SolenoidalIntersector_test.cxx index b505fe9d4581da7428311dc74e378ae77d673592..75b8181d811a1f0eb5125006bacc9cc2c17bfce6 100644 --- a/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/test/SolenoidalIntersector_test.cxx +++ b/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/test/SolenoidalIntersector_test.cxx @@ -14,9 +14,11 @@ #include "TestTools/initGaudi.h" #include "TestTools/FLOATassert.h" #include "AthenaKernel/Units.h" +#include "CxxUtils/ubsan_suppress.h" #include "GaudiKernel/ToolHandle.h" #include "GaudiKernel/Incident.h" #include "GaudiKernel/IIncidentListener.h" +#include "TInterpreter.h" #include <iostream> #include <cassert> #include <cmath> @@ -283,6 +285,7 @@ void test_perigee (Trk::IIntersector& tool) int main() { std::cout << "SolenoidalIntersector_test\n"; + CxxUtils::ubsan_suppress ([]() { TInterpreter::Instance(); }); ISvcLocator* svcloc = nullptr; Athena_test::initGaudi ("SolenoidalIntersector_test.txt", svcloc); ToolHandle<Trk::IIntersector> tool ("Trk::SolenoidalIntersector"); diff --git a/Tracking/TrkTools/TrkParticleCreator/src/TrackParticleCreatorTool.cxx b/Tracking/TrkTools/TrkParticleCreator/src/TrackParticleCreatorTool.cxx index 0f715ddce3258669c92294d86ee18229d9e3cd07..06de8dc05b8096236d280942d186692a4167696d 100644 --- a/Tracking/TrkTools/TrkParticleCreator/src/TrackParticleCreatorTool.cxx +++ b/Tracking/TrkTools/TrkParticleCreator/src/TrackParticleCreatorTool.cxx @@ -1026,6 +1026,7 @@ void TrackParticleCreatorTool::setTrackSummary( xAOD::TrackParticle& tp, const T if ( i >= offset && i < offset+Trk::numberOfeProbabilityTypes+1){ continue; } + if( i >= Trk::numberOfStgcEtaHits && i <= Trk::numberOfMmHoles) continue; // coverity[mixed_enums] if (i == Trk::numberOfTRTHitsUsedFordEdx ) continue; @@ -1065,21 +1066,21 @@ void TrackParticleCreatorTool::setTrackSummary( xAOD::TrackParticle& tp, const T //muon hit info if(m_useMuonSummaryTool){ - ATH_MSG_DEBUG("now do muon hit info"); - Muon::IMuonHitSummaryTool::CompactSummary msSummary = m_hitSummaryTool->summary(summary); - uint8_t numberOfPrecisionLayers = msSummary.nprecisionLayers; - ATH_MSG_DEBUG("# of prec layers: "<<numberOfPrecisionLayers); - uint8_t numberOfPrecisionHoleLayers = msSummary.nprecisionHoleLayers; - uint8_t numberOfPhiLayers = msSummary.nphiLayers; - uint8_t numberOfPhiHoleLayers = msSummary.nphiHoleLayers; - uint8_t numberOfTriggerEtaLayers = msSummary.ntrigEtaLayers; - uint8_t numberOfTriggerEtaHoleLayers = msSummary.ntrigEtaHoleLayers; - tp.setSummaryValue(numberOfPrecisionLayers,xAOD::numberOfPrecisionLayers); - tp.setSummaryValue(numberOfPrecisionHoleLayers,xAOD::numberOfPrecisionHoleLayers); - tp.setSummaryValue(numberOfPhiLayers,xAOD::numberOfPhiLayers); - tp.setSummaryValue(numberOfPhiHoleLayers,xAOD::numberOfPhiHoleLayers); - tp.setSummaryValue(numberOfTriggerEtaLayers,xAOD::numberOfTriggerEtaLayers); - tp.setSummaryValue(numberOfTriggerEtaHoleLayers,xAOD::numberOfTriggerEtaHoleLayers); + ATH_MSG_DEBUG("now do muon hit info"); + Muon::IMuonHitSummaryTool::CompactSummary msSummary = m_hitSummaryTool->summary(summary); + uint8_t numberOfPrecisionLayers = msSummary.nprecisionLayers; + ATH_MSG_DEBUG("# of prec layers: "<<numberOfPrecisionLayers); + uint8_t numberOfPrecisionHoleLayers = msSummary.nprecisionHoleLayers; + uint8_t numberOfPhiLayers = msSummary.nphiLayers; + uint8_t numberOfPhiHoleLayers = msSummary.nphiHoleLayers; + uint8_t numberOfTriggerEtaLayers = msSummary.ntrigEtaLayers; + uint8_t numberOfTriggerEtaHoleLayers = msSummary.ntrigEtaHoleLayers; + tp.setSummaryValue(numberOfPrecisionLayers,xAOD::numberOfPrecisionLayers); + tp.setSummaryValue(numberOfPrecisionHoleLayers,xAOD::numberOfPrecisionHoleLayers); + tp.setSummaryValue(numberOfPhiLayers,xAOD::numberOfPhiLayers); + tp.setSummaryValue(numberOfPhiHoleLayers,xAOD::numberOfPhiHoleLayers); + tp.setSummaryValue(numberOfTriggerEtaLayers,xAOD::numberOfTriggerEtaLayers); + tp.setSummaryValue(numberOfTriggerEtaHoleLayers,xAOD::numberOfTriggerEtaHoleLayers); } } diff --git a/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingCondAlg.cxx b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingCondAlg.cxx index e610ed532e1b2cc3b22c9a47174a7ad3d5bee8c8..b4be7e0f598c7fd8d41d36ac4cc82f532dbcefff 100644 --- a/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingCondAlg.cxx +++ b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingCondAlg.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "TrkRIO_OnTrack/RIO_OnTrackErrorScaling.h" @@ -71,7 +71,7 @@ StatusCode RIO_OnTrackErrorScalingCondAlg::addErrorScaling(const std::string &ty return StatusCode::FAILURE; } m_kits.push_back(the_kit); - const char **parameters=the_kit->paramNames(); + const char* const* parameters=the_kit->paramNames(); for (unsigned int param_i=0; param_i<the_kit->nParametres(); ++param_i) { registerAttribute( std::string(parameters[param_i]), m_kits.size()-1, param_i); } diff --git a/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingIDKits.cxx b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingIDKits.cxx index 2559917acee3457c206a537e12126d8261be37a9..0011bb440f258894a2edd626695cf03b901cc089 100644 --- a/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingIDKits.cxx +++ b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingIDKits.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "RIO_OnTrackErrorScalingKit.h" #include "InDetRIO_OnTrack/PixelRIO_OnTrackErrorScaling.h" @@ -13,7 +13,7 @@ public: virtual unsigned int nParametres() const override { return PixelRIO_OnTrackErrorScaling::kNParamTypes; } - virtual const char **paramNames() const override { + virtual const char* const* paramNames() const override { return PixelRIO_OnTrackErrorScaling::paramNames(); } @@ -37,7 +37,7 @@ public: virtual unsigned int nParametres() const override { return SCTRIO_OnTrackErrorScaling::kNParamTypes; } - virtual const char **paramNames() const override { + virtual const char* const* paramNames() const override { return SCTRIO_OnTrackErrorScaling::paramNames(); } @@ -50,7 +50,7 @@ public: virtual unsigned int nParametres() const override { return TRTRIO_OnTrackErrorScaling::kNParamTypes; } - virtual const char **paramNames() const override { + virtual const char* const* paramNames() const override { return TRTRIO_OnTrackErrorScaling::paramNames(); } diff --git a/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingKit.cxx b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingKit.cxx index 6b3be9d4d1057c9edaac2e321ea79b19653e7fdd..f13c9214b966404010d0374786771de8281fd056 100644 --- a/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingKit.cxx +++ b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingKit.cxx @@ -1,10 +1,10 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "RIO_OnTrackErrorScalingKit.h" size_t RIO_OnTrackErrorScalingKit::getParamIndex(const std::string &name) const { - const char **param_names = paramNames(); + const char* const* param_names = paramNames(); for(size_t idx=0; idx<nParametres(); ++idx) { if (strcmp(param_names[idx],name.c_str())==0) return idx; } diff --git a/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingKit.h b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingKit.h index cd5e9328d6aa37ac9269b4ab949ef82064a2d5cc..9300a0eb4908fdedca4bcfc0ee0fb8a586172de5 100644 --- a/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingKit.h +++ b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingKit.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef _RIO_OnTrackErrorScalingKit_H_ @@ -14,7 +14,7 @@ public: virtual ~RIO_OnTrackErrorScalingKit() {} virtual unsigned int nParametres() const = 0; - virtual const char **paramNames() const = 0; + virtual const char* const* paramNames() const = 0; virtual size_t getParamIndex(const std::string &name) const; virtual std::unique_ptr<RIO_OnTrackErrorScaling> create() const = 0; diff --git a/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingMuonKits.cxx b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingMuonKits.cxx index 935535ad4ec435efec4ef450c8a8196c8eeb21f4..10cd25b9e8aca41681a0ccd0eff559a08bb34c9f 100644 --- a/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingMuonKits.cxx +++ b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingMuonKits.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "RIO_OnTrackErrorScalingKit.h" #include "MuonRIO_OnTrack/MuonEtaPhiRIO_OnTrackErrorScaling.h" @@ -28,8 +28,8 @@ public: virtual unsigned int nParametres() const override { return MuonEtaPhiRIO_OnTrackErrorScaling::kNParamTypes; } - virtual const char **paramNames() const override { - return const_cast<const char **>(m_names); + virtual const char* const* paramNames() const override { + return const_cast<const char* const*>(m_names); } private: char **m_names; @@ -47,7 +47,7 @@ public: virtual unsigned int nParametres() const override { return MDTRIO_OnTrackErrorScaling::kNParamTypes; } - virtual const char **paramNames() const override { + virtual const char* const* paramNames() const override { return MDTRIO_OnTrackErrorScaling::paramNames(); } }; diff --git a/Tracking/TrkTools/TrkTrackSummaryTool/src/TrackSummaryTool.cxx b/Tracking/TrkTools/TrkTrackSummaryTool/src/TrackSummaryTool.cxx index ec1a7de0e135ddf6faefad28980629e44740f0fa..48dd160c6a967db6048c46f14c374bd136c3a590 100755 --- a/Tracking/TrkTools/TrkTrackSummaryTool/src/TrackSummaryTool.cxx +++ b/Tracking/TrkTools/TrkTrackSummaryTool/src/TrackSummaryTool.cxx @@ -272,6 +272,13 @@ Trk::TrackSummaryTool::createSummary( const Track& track, information[Trk::numberOfRpcPhiHoles] =0; information[Trk::numberOfTgcEtaHoles] =0; information[Trk::numberOfTgcPhiHoles] =0; + // New Small Wheel + information[Trk::numberOfStgcEtaHits] =0; + information[Trk::numberOfStgcPhiHits] =0; + information[Trk::numberOfMmHits] =0; + information[Trk::numberOfStgcEtaHoles] =0; + information[Trk::numberOfStgcPhiHoles] =0; + information[Trk::numberOfMmHoles] =0; } std::bitset<numberOfDetectorTypes> hitPattern; @@ -585,12 +592,17 @@ void Trk::TrackSummaryTool::searchHolesStepWise( const Trk::Track& track, information [numberOfSCTDeadSensors] = -1; information [numberOfTRTHoles] = -1; information [numberOfTRTDeadStraws] = -1; + // NOTE: Eta holes was used twice instead of Phi holes information [numberOfCscEtaHoles] = -1; - information [numberOfCscEtaHoles] = -1; + information [numberOfCscPhiHoles] = -1; information [numberOfRpcEtaHoles] = -1; - information [numberOfRpcEtaHoles] = -1; + information [numberOfRpcPhiHoles] = -1; information [numberOfTgcEtaHoles] = -1; - information [numberOfTgcEtaHoles] = -1; + information [numberOfTgcPhiHoles] = -1; + // New Small Wheel + information [numberOfStgcEtaHoles] = -1; + information [numberOfStgcPhiHoles] = -1; + information [numberOfMmHoles] = -1; return; } else @@ -617,13 +629,17 @@ void Trk::TrackSummaryTool::searchHolesStepWise( const Trk::Track& track, { // now do Muon hole search. It works completely differently to the above, so we need to make this all a bit more general // and probably more efficient. But this hopefully works for now! EJWM - information [numberOfMdtHoles] = 0; + information [numberOfMdtHoles] = 0; information [numberOfCscEtaHoles] = 0; information [numberOfCscPhiHoles] = 0; information [numberOfRpcEtaHoles] = 0; information [numberOfRpcPhiHoles] = 0; information [numberOfTgcEtaHoles] = 0; - information [numberOfTgcPhiHoles] = 0; + information [numberOfTgcPhiHoles] = 0; + // New Small Wheel + information [numberOfStgcEtaHoles] = 0; + information [numberOfStgcPhiHoles] = 0; + information [numberOfMmHoles] = 0; m_muonTool->searchForHoles(track,information,Trk::muon) ; } } diff --git a/Tracking/TrkVertexFitter/TrkVKalVrtFitter/TrkVKalVrtFitter/ITrkVKalVrtFitter.h b/Tracking/TrkVertexFitter/TrkVKalVrtFitter/TrkVKalVrtFitter/ITrkVKalVrtFitter.h index e3092ad7da38fbd9da216cf8b59e06d0075faaae..f367be5cebffa128b478d6c6561dd977223dde51 100755 --- a/Tracking/TrkVertexFitter/TrkVKalVrtFitter/TrkVKalVrtFitter/ITrkVKalVrtFitter.h +++ b/Tracking/TrkVertexFitter/TrkVKalVrtFitter/TrkVKalVrtFitter/ITrkVKalVrtFitter.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // ITrkVKalVrtFitter.h - old VKalVrtInterface @@ -114,7 +114,7 @@ namespace Trk{ virtual void setVertexForConstraint(double,double,double)=0; virtual void setCovVrtForConstraint(double,double,double, double,double,double)=0; - virtual void setMassInputParticles( std::vector<double>& )=0; + virtual void setMassInputParticles( const std::vector<double>& )=0; virtual void setDefault() =0; virtual void setZeroCharge(int)=0; // diff --git a/Tracking/TrkVertexFitter/TrkVKalVrtFitter/TrkVKalVrtFitter/TrkVKalVrtFitter.h b/Tracking/TrkVertexFitter/TrkVKalVrtFitter/TrkVKalVrtFitter/TrkVKalVrtFitter.h index 3d8db24b31c161d4fcaa8e4686e0f2158d0dcb31..b34da3a02783053b17e3073fe84d26e81009fe07 100755 --- a/Tracking/TrkVertexFitter/TrkVKalVrtFitter/TrkVKalVrtFitter/TrkVKalVrtFitter.h +++ b/Tracking/TrkVertexFitter/TrkVKalVrtFitter/TrkVKalVrtFitter/TrkVKalVrtFitter.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // TrkVKalVrtFitter.h @@ -226,7 +226,7 @@ namespace Trk{ void setVertexForConstraint(double,double,double); void setCovVrtForConstraint(double,double,double,double,double,double); - void setMassInputParticles( std::vector<double>& ); + void setMassInputParticles( const std::vector<double>& ); void setMomCovCalc(int); void setDefault(); void setZeroCharge(int); diff --git a/Tracking/TrkVertexFitter/TrkVKalVrtFitter/src/SetFitOptions.cxx b/Tracking/TrkVertexFitter/TrkVKalVrtFitter/src/SetFitOptions.cxx index 00b6aff91ecbaa7911d0c7db6a762d6b7b3fe539..66bc669292adde7807110103d7f70d115748ed0e 100755 --- a/Tracking/TrkVertexFitter/TrkVKalVrtFitter/src/SetFitOptions.cxx +++ b/Tracking/TrkVertexFitter/TrkVKalVrtFitter/src/SetFitOptions.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // Header include @@ -274,7 +274,7 @@ namespace Trk{ m_CovVrtForConstraint.push_back(ZZ); } - void TrkVKalVrtFitter::setMassInputParticles( std::vector<double>& mass) + void TrkVKalVrtFitter::setMassInputParticles( const std::vector<double>& mass) { m_MassInputParticles.clear(); for(int i=0; i<(int)mass.size(); i++) m_MassInputParticles.push_back(fabs(mass[i])); } diff --git a/Tracking/TrkVertexFitter/TrkVertexSeedFinderTools/TrkVertexSeedFinderTools/IndexedCrossDistancesSeedFinder.h b/Tracking/TrkVertexFitter/TrkVertexSeedFinderTools/TrkVertexSeedFinderTools/IndexedCrossDistancesSeedFinder.h index 774b897c6f68cf3a10489d5d3406ca6c5adb2af3..abb137247407d854c4dacff0d0d9c42ba1ac1282 100755 --- a/Tracking/TrkVertexFitter/TrkVertexSeedFinderTools/TrkVertexSeedFinderTools/IndexedCrossDistancesSeedFinder.h +++ b/Tracking/TrkVertexFitter/TrkVertexSeedFinderTools/TrkVertexSeedFinderTools/IndexedCrossDistancesSeedFinder.h @@ -69,7 +69,6 @@ namespace Trk private: bool m_useweights; - int m_typeofweight; float m_trackdistcutoff; int m_trackdistexppower; float m_constraintcutoff; diff --git a/Tracking/TrkVertexFitter/TrkVertexSeedFinderUtils/TrkVertexSeedFinderUtils/IMode3dFinder.h b/Tracking/TrkVertexFitter/TrkVertexSeedFinderUtils/TrkVertexSeedFinderUtils/IMode3dFinder.h index 175a199029282638c12c4c0e074367555ddb8cd5..cb61fa848e8b7bf8f034861e8e6d9854848f1dad 100644 --- a/Tracking/TrkVertexFitter/TrkVertexSeedFinderUtils/TrkVertexSeedFinderUtils/IMode3dFinder.h +++ b/Tracking/TrkVertexFitter/TrkVertexSeedFinderUtils/TrkVertexSeedFinderUtils/IMode3dFinder.h @@ -45,7 +45,7 @@ namespace Trk virtual const Amg::Vector3D getMode(const std::vector<Amg::Vector3D> &) const=0; virtual unsigned int Modes1d(std::vector<float> &, std::vector<float> &, - std::vector<float> &, std::vector<float> &) = 0 ; + std::vector<float> &, std::vector<float> &) const = 0 ; virtual const std::vector<int> & AcceptedCrossingPointsIndices() const = 0 ; virtual void getCorrelationDistance( double &cXY, double &cZ ) = 0 ; diff --git a/Tracking/TrkVertexFitter/TrkVertexSeedFinderUtils/TrkVertexSeedFinderUtils/Mode3dFromFsmw1dFinder.h b/Tracking/TrkVertexFitter/TrkVertexSeedFinderUtils/TrkVertexSeedFinderUtils/Mode3dFromFsmw1dFinder.h index 02a51ff2142086bd086e9c123d944d5ae7eeb06f..40a8b8a6cc1b08d9dcd976da8fdaef30eb2cbbef 100644 --- a/Tracking/TrkVertexFitter/TrkVertexSeedFinderUtils/TrkVertexSeedFinderUtils/Mode3dFromFsmw1dFinder.h +++ b/Tracking/TrkVertexFitter/TrkVertexSeedFinderUtils/TrkVertexSeedFinderUtils/Mode3dFromFsmw1dFinder.h @@ -30,16 +30,16 @@ namespace Trk class Mode3dFromFsmw1dFinder : public AthAlgTool, virtual public IMode3dFinder { public: - StatusCode initialize(); - StatusCode finalize(); + virtual StatusCode initialize() override; + virtual StatusCode finalize() override; //default constructor due to Athena interface Mode3dFromFsmw1dFinder(const std::string& t, const std::string& n, const IInterface* p); //destructor virtual ~Mode3dFromFsmw1dFinder(); - - inline void setPriVtxPosition( double vx, double vy ) + + inline virtual void setPriVtxPosition( double vx, double vy ) override { m_Xprivtx = vx ; m_Yprivtx = vy ; @@ -47,18 +47,18 @@ namespace Trk } ; //obtain the 3d-mode (position) from a list of positions (distribution in space) - virtual const Amg::Vector3D getMode(const std::vector<Trk::PositionAndWeight> &) const; + virtual const Amg::Vector3D getMode(const std::vector<Trk::PositionAndWeight> &) const override; //obtain the 3d-mode (position) from a list of positions (distribution in space) - NO WEIGHTS - virtual const Amg::Vector3D getMode(const std::vector<Amg::Vector3D> &) const; + virtual const Amg::Vector3D getMode(const std::vector<Amg::Vector3D> &) const override; - const std::vector<int> & AcceptedCrossingPointsIndices() const ; + virtual const std::vector<int> & AcceptedCrossingPointsIndices() const override; // Passing some middle result to outside world, useless unless to monitor the tool - unsigned int Modes1d( std::vector<float> &, std::vector<float> &, - std::vector<float> &, std::vector<float> & ) ; + virtual unsigned int Modes1d( std::vector<float> &, std::vector<float> &, + std::vector<float> &, std::vector<float> & ) const override; - inline void getCorrelationDistance( double &cXY, double &cZ ) + inline virtual void getCorrelationDistance( double &cXY, double &cZ ) override { cXY = m_correXY ; cZ = m_correZ ; return ; } private: diff --git a/Tracking/TrkVertexFitter/TrkVertexSeedFinderUtils/TrkVertexSeedFinderUtils/Mode3dTo1dFinder.h b/Tracking/TrkVertexFitter/TrkVertexSeedFinderUtils/TrkVertexSeedFinderUtils/Mode3dTo1dFinder.h index bfd80feb2093c7c9621504f49f9dad64b25bbf2e..3bcfc9c6ea41d965ca5887f7893cb6ab9327c0cb 100644 --- a/Tracking/TrkVertexFitter/TrkVertexSeedFinderUtils/TrkVertexSeedFinderUtils/Mode3dTo1dFinder.h +++ b/Tracking/TrkVertexFitter/TrkVertexSeedFinderUtils/TrkVertexSeedFinderUtils/Mode3dTo1dFinder.h @@ -32,8 +32,8 @@ namespace Trk class Mode3dTo1dFinder : public AthAlgTool, virtual public IMode3dFinder { public: - StatusCode initialize(); - StatusCode finalize(); + virtual StatusCode initialize() override; + virtual StatusCode finalize() override; //default constructor due to Athena interface Mode3dTo1dFinder(const std::string& t, const std::string& n, const IInterface* p); @@ -42,19 +42,19 @@ namespace Trk virtual ~Mode3dTo1dFinder(); //obtain the 3d-mode (position) from a list of positions (distribution in space) - virtual const Amg::Vector3D getMode(const std::vector<Trk::PositionAndWeight> &) const; + virtual const Amg::Vector3D getMode(const std::vector<Trk::PositionAndWeight> &) const override; //obtain the 3d-mode (position) from a list of positions (distribution in space) - NO WEIGHTS - virtual const Amg::Vector3D getMode(const std::vector<Amg::Vector3D> &) const; + virtual const Amg::Vector3D getMode(const std::vector<Amg::Vector3D> &) const override; //The below four functions are dummy functions so that this compiles. The functions are needed in the interface IMode3dFinder.h for Mode3dFromFsmw1dFinder (the seed finder for the Inclusive Secondary Vertex Finder) - virtual void setPriVtxPosition( double, double ); + virtual void setPriVtxPosition( double, double ) override; virtual unsigned int Modes1d(std::vector<float> &, std::vector<float> &, - std::vector<float> &, std::vector<float> &); + std::vector<float> &, std::vector<float> &) const override; - virtual const std::vector<int> & AcceptedCrossingPointsIndices() const; - virtual void getCorrelationDistance( double &cXY, double &cZ ); + virtual const std::vector<int> & AcceptedCrossingPointsIndices() const override; + virtual void getCorrelationDistance( double &cXY, double &cZ ) override; private: diff --git a/Tracking/TrkVertexFitter/TrkVertexSeedFinderUtils/src/Mode3dFromFsmw1dFinder.cxx b/Tracking/TrkVertexFitter/TrkVertexSeedFinderUtils/src/Mode3dFromFsmw1dFinder.cxx index 764bd3c2cfdb917ed51150a1ad43c982efcf2c0e..94c4f736f264989c48580bbb61bcfb0a63df7679 100644 --- a/Tracking/TrkVertexFitter/TrkVertexSeedFinderUtils/src/Mode3dFromFsmw1dFinder.cxx +++ b/Tracking/TrkVertexFitter/TrkVertexSeedFinderUtils/src/Mode3dFromFsmw1dFinder.cxx @@ -716,7 +716,7 @@ const Amg::Vector3D Mode3dFromFsmw1dFinder::Mode2Seed( const VeVecIndices & phi, } unsigned int Mode3dFromFsmw1dFinder::Modes1d( std::vector<float> & phi, - std::vector<float> & radi, std::vector<float> & z, std::vector<float> & wght ) + std::vector<float> & radi, std::vector<float> & z, std::vector<float> & wght ) const { unsigned int min = 0 ; diff --git a/Tracking/TrkVertexFitter/TrkVertexSeedFinderUtils/src/Mode3dTo1dFinder.cxx b/Tracking/TrkVertexFitter/TrkVertexSeedFinderUtils/src/Mode3dTo1dFinder.cxx index 94ac89d40dd7631c7af7bcd729172f38cd3164f9..e6ef09db5b367a4cf11ac8d41f11421d33dab2bb 100644 --- a/Tracking/TrkVertexFitter/TrkVertexSeedFinderUtils/src/Mode3dTo1dFinder.cxx +++ b/Tracking/TrkVertexFitter/TrkVertexSeedFinderUtils/src/Mode3dTo1dFinder.cxx @@ -104,7 +104,7 @@ namespace Trk } unsigned int Mode3dTo1dFinder::Modes1d(std::vector<float> &/* a */, std::vector<float> &/* b */, - std::vector<float> &/* c */, std::vector<float> &/* d */){ + std::vector<float> &/* c */, std::vector<float> &/* d */) const { //implemented to satisfy inheritance return 0; } diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/CMakeLists.txt b/Trigger/TrigAlgorithms/TrigCaloRec/CMakeLists.txt index 942152e38e7292154e0fd00dc36d5a6e13ddecf4..6cbafbe726a1bd25e0c82262f06f0813a4f624fe 100644 --- a/Trigger/TrigAlgorithms/TrigCaloRec/CMakeLists.txt +++ b/Trigger/TrigAlgorithms/TrigCaloRec/CMakeLists.txt @@ -21,6 +21,7 @@ atlas_depends_on_subdirs( PUBLIC Trigger/TrigSteer/TrigInterfaces Trigger/TrigTools/TrigTimeAlgs PRIVATE + Control/CxxUtils Calorimeter/CaloDetDescr Calorimeter/CaloGeoHelpers Calorimeter/CaloIdentifier diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..376c34cc9bf3fb8890525e0743f0fb559e0b0acd --- /dev/null +++ b/Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Trigger/TrigAlgorithms/TrigCaloRec diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/FullCaloCellContMaker.h b/Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/FullCaloCellContMaker.h index f43475dec4ad27031b4cda1145d13e15a9a31a92..d138ce722f7191fec14fe52b51f2092735c9f303 100755 --- a/Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/FullCaloCellContMaker.h +++ b/Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/FullCaloCellContMaker.h @@ -26,6 +26,9 @@ #include "AthenaMonitoring/IMonitorToolBase.h" +#include "CxxUtils/checker_macros.h" +ATLAS_NO_CHECK_FILE_THREAD_SAFETY; // legacy trigger code + class FullCaloCellContMaker : public IAlgToolEFCalo { public: // Constructor diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/RoIFCalEmCellContMaker.h b/Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/RoIFCalEmCellContMaker.h index be14fe27d6cf18082ff57c225eedd894037b5b2a..3ff5374ddf96e29457585d446040c814d4570401 100644 --- a/Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/RoIFCalEmCellContMaker.h +++ b/Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/RoIFCalEmCellContMaker.h @@ -26,6 +26,9 @@ #include "IRegionSelector/IRoiDescriptor.h" +#include "CxxUtils/checker_macros.h" +ATLAS_NO_CHECK_FILE_THREAD_SAFETY; // legacy trigger code + class RoIFCalEmCellContMaker : public IAlgToolEFCalo { public: // Constructor diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/RoIFCalHadCellContMaker.h b/Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/RoIFCalHadCellContMaker.h index c956f81c8ba397715e7ef73d18df303b4e006e6d..d2f1454a8294a63f5465bfcf20b8489bf597563c 100644 --- a/Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/RoIFCalHadCellContMaker.h +++ b/Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/RoIFCalHadCellContMaker.h @@ -26,6 +26,9 @@ #include "IRegionSelector/IRoiDescriptor.h" +#include "CxxUtils/checker_macros.h" +ATLAS_NO_CHECK_FILE_THREAD_SAFETY; // legacy trigger code + class RoIFCalHadCellContMaker : public IAlgToolEFCalo { public: // Constructor diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/RoILArEMCellContMaker.h b/Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/RoILArEMCellContMaker.h index 1e49c39f19619a95ecd573f8ab564301277e5422..fef0c83d82d3398b32cca463e5e49d72116e524e 100644 --- a/Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/RoILArEMCellContMaker.h +++ b/Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/RoILArEMCellContMaker.h @@ -26,6 +26,9 @@ #include "IRegionSelector/IRoiDescriptor.h" +#include "CxxUtils/checker_macros.h" +ATLAS_NO_CHECK_FILE_THREAD_SAFETY; // legacy trigger code + class RoILArEMCellContMaker : public IAlgToolEFCalo { public: diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/RoILArHadCellContMaker.h b/Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/RoILArHadCellContMaker.h index 1d628b1d7a7555b2e458539f6898314eaf7158db..6e967c13b8cee60da0347b718d93dee358451c8a 100644 --- a/Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/RoILArHadCellContMaker.h +++ b/Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/RoILArHadCellContMaker.h @@ -26,6 +26,9 @@ #include "IRegionSelector/IRoiDescriptor.h" +#include "CxxUtils/checker_macros.h" +ATLAS_NO_CHECK_FILE_THREAD_SAFETY; // legacy trigger code + class RoILArHadCellContMaker : public IAlgToolEFCalo { public: // Constructor diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/RoITileCellContMaker.h b/Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/RoITileCellContMaker.h index a8e8e5d18503963f481120b3a4317f33bc82a450..0f848a0e2258e19ed4d35867a9fcdacc07725050 100755 --- a/Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/RoITileCellContMaker.h +++ b/Trigger/TrigAlgorithms/TrigCaloRec/TrigCaloRec/RoITileCellContMaker.h @@ -25,6 +25,9 @@ #include "IRegionSelector/IRoiDescriptor.h" +#include "CxxUtils/checker_macros.h" +ATLAS_NO_CHECK_FILE_THREAD_SAFETY; // legacy trigger code + class RoITileCellContMaker : public IAlgToolEFCalo { public: // Constructor diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/src/FullCaloCellContMaker.cxx b/Trigger/TrigAlgorithms/TrigCaloRec/src/FullCaloCellContMaker.cxx index a9cc4eed17d47cfcf7533533d67dd3e77eab7e48..9ebac24dc3a5d03d9f1841878601737d55c9718d 100755 --- a/Trigger/TrigAlgorithms/TrigCaloRec/src/FullCaloCellContMaker.cxx +++ b/Trigger/TrigAlgorithms/TrigCaloRec/src/FullCaloCellContMaker.cxx @@ -32,6 +32,7 @@ #include <math.h> +ATLAS_NO_CHECK_FILE_THREAD_SAFETY; // legacy trigger code FullCaloCellContMaker::FullCaloCellContMaker(const std::string & type, const std::string & name, // const IInterface* parent): IAlgToolEFCalo(type, name, parent), diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/src/HLTCaloCellMaker.cxx b/Trigger/TrigAlgorithms/TrigCaloRec/src/HLTCaloCellMaker.cxx index 1be6d9bca701b8f605a02cabb398b1128fc7c5b4..0b7ca1ab7f0b5cf3f1062b7775cd6b9bf4f1b7ad 100644 --- a/Trigger/TrigAlgorithms/TrigCaloRec/src/HLTCaloCellMaker.cxx +++ b/Trigger/TrigAlgorithms/TrigCaloRec/src/HLTCaloCellMaker.cxx @@ -70,9 +70,42 @@ StatusCode HLTCaloCellMaker::execute( const EventContext& context ) const { cdv->updateCaloIterators(); } else { + // TT EM PART + for(int sampling=0;sampling<4;sampling++){ LArTT_Selector<LArCellCont> sel; - ATH_CHECK(m_dataAccessSvc->loadCollections( context, *roiDescriptor, TTEM, 2, sel )); + ATH_CHECK(m_dataAccessSvc->loadCollections( context, *roiDescriptor, TTEM, sampling, sel )); for( const auto cell : sel ) {cdv->push_back( cell ); } + } + cdv->setHasCalo(CaloCell_ID::LAREM); + // TT HEC PART + for(int sampling=0;sampling<4;sampling++){ + LArTT_Selector<LArCellCont> sel; + ATH_CHECK(m_dataAccessSvc->loadCollections( context, *roiDescriptor, TTHEC, sampling, sel )); + for( const auto cell : sel ) {cdv->push_back( cell ); } + } + cdv->setHasCalo(CaloCell_ID::LARHEC); + // TILE PART + for(int sampling=0;sampling<4;sampling++){ + TileCellCollection sel; + ATH_CHECK(m_dataAccessSvc->loadCollections( context, *roiDescriptor, sel )); + for( const auto cell : sel ) {cdv->push_back( cell ); } + } + cdv->setHasCalo(CaloCell_ID::TILE); + // TT FCAL EM PART + { + LArTT_Selector<LArCellCont> sel; + ATH_CHECK(m_dataAccessSvc->loadCollections( context, *roiDescriptor, FCALEM, 0, sel )); + for( const auto cell : sel ) {cdv->push_back( cell ); } + } + cdv->setHasCalo(CaloCell_ID::LARFCAL); + // TT FCAL HAD PART + for(int sampling=0;sampling<2;sampling++){ + LArTT_Selector<LArCellCont> sel; + ATH_CHECK(m_dataAccessSvc->loadCollections( context, *roiDescriptor, FCALHAD, sampling, sel )); + for( const auto cell : sel ) {cdv->push_back( cell ); } + } + cdv->setHasCalo(CaloCell_ID::LARFCAL); + cdv->updateCaloIterators(); } ATH_MSG_INFO ("Producing "<<cdv->size()<<" cells"); auto ss = cellContainer.record( std::move(cdv) ); @@ -92,11 +125,44 @@ StatusCode HLTCaloCellMaker::execute( const EventContext& context ) const { cellContainerV->push_back( c.release()->asDataVector() ); } else { - LArTT_Selector<LArCellCont> sel; - ATH_CHECK(m_dataAccessSvc->loadCollections( context, *roiDescriptor, TTEM, 2, sel )); auto c = std::make_unique<CaloConstCellContainer >(SG::VIEW_ELEMENTS); - int cc(0); - for( const auto cell : sel ) {c->push_back( cell ); cc++;} + + // TT EM PART + for(int sampling=0;sampling<4;sampling++){ + LArTT_Selector<LArCellCont> sel; + ATH_CHECK(m_dataAccessSvc->loadCollections( context, *roiDescriptor, TTEM, sampling, sel )); + for( const auto cell : sel ) {c->push_back( cell ); } + } + c->setHasCalo(CaloCell_ID::LAREM); + // TT HEC PART + for(int sampling=0;sampling<4;sampling++){ + LArTT_Selector<LArCellCont> sel; + ATH_CHECK(m_dataAccessSvc->loadCollections( context, *roiDescriptor, TTHEC, sampling, sel )); + for( const auto cell : sel ) {c->push_back( cell ); } + } + c->setHasCalo(CaloCell_ID::LARHEC); + // TILE PART + for(int sampling=0;sampling<4;sampling++){ + TileCellCollection sel; + ATH_CHECK(m_dataAccessSvc->loadCollections( context, *roiDescriptor, sel )); + for( const auto cell : sel ) {c->push_back( cell ); } + } + c->setHasCalo(CaloCell_ID::TILE); + // TT FCAL EM PART + { + LArTT_Selector<LArCellCont> sel; + ATH_CHECK(m_dataAccessSvc->loadCollections( context, *roiDescriptor, FCALEM, 0, sel )); + for( const auto cell : sel ) {c->push_back( cell ); } + } + c->setHasCalo(CaloCell_ID::LARFCAL); + // TT FCAL HAD PART + for(int sampling=0;sampling<2;sampling++){ + LArTT_Selector<LArCellCont> sel; + ATH_CHECK(m_dataAccessSvc->loadCollections( context, *roiDescriptor, FCALHAD, sampling, sel )); + for( const auto cell : sel ) {c->push_back( cell ); } + } + c->setHasCalo(CaloCell_ID::LARFCAL); + c->updateCaloIterators(); cellContainerV->push_back( c.release()->asDataVector() ); } } diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/src/RoIFCalEmCellContMaker.cxx b/Trigger/TrigAlgorithms/TrigCaloRec/src/RoIFCalEmCellContMaker.cxx index 7cd279ad03c502284f11be4fd9363f895103a5fa..591950d7ad7c43eae0db6b16ea5e3baf79e0b9a8 100644 --- a/Trigger/TrigAlgorithms/TrigCaloRec/src/RoIFCalEmCellContMaker.cxx +++ b/Trigger/TrigAlgorithms/TrigCaloRec/src/RoIFCalEmCellContMaker.cxx @@ -33,6 +33,7 @@ #include <math.h> +ATLAS_NO_CHECK_FILE_THREAD_SAFETY; // legacy trigger code RoIFCalEmCellContMaker::RoIFCalEmCellContMaker(const std::string & type, const std::string & name, const IInterface* parent): IAlgToolEFCalo(type, name, parent), diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/src/RoIFCalHadCellContMaker.cxx b/Trigger/TrigAlgorithms/TrigCaloRec/src/RoIFCalHadCellContMaker.cxx index afdf99a2e723da705674ebea637bd3c36da438fa..51d53b6f376fc41b23039c845b74e9f13b6bebd6 100644 --- a/Trigger/TrigAlgorithms/TrigCaloRec/src/RoIFCalHadCellContMaker.cxx +++ b/Trigger/TrigAlgorithms/TrigCaloRec/src/RoIFCalHadCellContMaker.cxx @@ -29,9 +29,9 @@ //#include <Identifier/HWIdentifier.h> #include "CaloInterface/ICalorimeterNoiseTool.h" - #include <math.h> +ATLAS_NO_CHECK_FILE_THREAD_SAFETY; // legacy trigger code RoIFCalHadCellContMaker::RoIFCalHadCellContMaker(const std::string & type, const std::string & name, const IInterface* parent): IAlgToolEFCalo(type, name, parent), diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/src/RoILArEMCellContMaker.cxx b/Trigger/TrigAlgorithms/TrigCaloRec/src/RoILArEMCellContMaker.cxx index 42741598d03f6ab50daeb536cded96e158fc08f3..9ea99b0f6eb695d4b2a9b129528db0f6b26abe46 100644 --- a/Trigger/TrigAlgorithms/TrigCaloRec/src/RoILArEMCellContMaker.cxx +++ b/Trigger/TrigAlgorithms/TrigCaloRec/src/RoILArEMCellContMaker.cxx @@ -31,6 +31,7 @@ #include <math.h> +ATLAS_NO_CHECK_FILE_THREAD_SAFETY; // legacy trigger code RoILArEMCellContMaker::RoILArEMCellContMaker(const std::string & type, const std::string & name, const IInterface* parent): IAlgToolEFCalo(type, name, parent), diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/src/RoILArHadCellContMaker.cxx b/Trigger/TrigAlgorithms/TrigCaloRec/src/RoILArHadCellContMaker.cxx index 1fd077ef110e9f61104a50c2fb4e10ada949b654..331378ba1b3aaaba8133816e20219a9b73b5d234 100644 --- a/Trigger/TrigAlgorithms/TrigCaloRec/src/RoILArHadCellContMaker.cxx +++ b/Trigger/TrigAlgorithms/TrigCaloRec/src/RoILArHadCellContMaker.cxx @@ -29,9 +29,9 @@ //#include <Identifier/HWIdentifier.h> #include "CaloInterface/ICalorimeterNoiseTool.h" - #include <math.h> +ATLAS_NO_CHECK_FILE_THREAD_SAFETY; // legacy trigger code RoILArHadCellContMaker::RoILArHadCellContMaker(const std::string & type, const std::string & name, const IInterface* parent): IAlgToolEFCalo(type, name, parent), diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/src/RoITileCellContMaker.cxx b/Trigger/TrigAlgorithms/TrigCaloRec/src/RoITileCellContMaker.cxx index 3a402d903d07f4f4f95bd0e44e04491404fe56dc..c86ec2a4c276a4e4bd1b0d0d3b08803d2643f86e 100755 --- a/Trigger/TrigAlgorithms/TrigCaloRec/src/RoITileCellContMaker.cxx +++ b/Trigger/TrigAlgorithms/TrigCaloRec/src/RoITileCellContMaker.cxx @@ -27,6 +27,7 @@ #include <math.h> +ATLAS_NO_CHECK_FILE_THREAD_SAFETY; // legacy trigger code RoITileCellContMaker::RoITileCellContMaker(const std::string & type, const std::string & name, const IInterface* parent): IAlgToolEFCalo(type, name, parent), diff --git a/Trigger/TrigAlgorithms/TrigEFMissingET/CMakeLists.txt b/Trigger/TrigAlgorithms/TrigEFMissingET/CMakeLists.txt index 343663d20871fbe2b8843d952166aa516384a496..6c24106d7ae7e51a4f0c96b52594dffef53e1f8f 100644 --- a/Trigger/TrigAlgorithms/TrigEFMissingET/CMakeLists.txt +++ b/Trigger/TrigAlgorithms/TrigEFMissingET/CMakeLists.txt @@ -1,4 +1,3 @@ -# $Id: CMakeLists.txt 800798 2017-03-16 17:29:50Z jburr $ ################################################################################ # Package: TrigEFMissingET ################################################################################ @@ -21,7 +20,6 @@ atlas_depends_on_subdirs( Event/FourMomUtils GaudiKernel LArCalorimeter/LArIdentifier - LArCalorimeter/LArTools Trigger/TrigAlgorithms/TrigT2CaloCommon Trigger/TrigEvent/TrigCaloEvent Trigger/TrigEvent/TrigMissingEtEvent @@ -29,7 +27,6 @@ atlas_depends_on_subdirs( Trigger/TrigSteer/TrigInterfaces Trigger/TrigTools/TrigTimeAlgs PRIVATE - PhysicsAnalysis/AnalysisCommon/PATCore Tools/PathResolver InnerDetector/InDetRecTools/InDetTrackSelectionTool Control/CxxUtils @@ -48,25 +45,17 @@ find_package( ROOT COMPONENTS Core Hist Matrix ) find_package( tdaq-common COMPONENTS eformat ) # Component(s) in the package: -atlas_add_library( TrigEFMissingETLib - TrigEFMissingET/*.h src/*.cxx - PUBLIC_HEADERS TrigEFMissingET - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${FASTJET_INCLUDE_DIRS} - PRIVATE_INCLUDE_DIRS ${TDAQ-COMMON_INCLUDE_DIRS} ${FASTJETCONTRIB_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${FASTJET_LIBRARIES} CaloEvent CaloGeoHelpers CaloIdentifier - AthenaBaseComps xAODCaloEvent xAODJet xAODTrigMissingET GaudiKernel - LArIdentifier TrigCaloEvent TrigMissingEtEvent TrigParticle CaloDetDescrLib - LArToolsLib TrigT2CaloCommonLib TrigInterfacesLib TrigTimeAlgsLib - PRIVATE_LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} ${FASTJETCONTRIB_LIBRARIES} CxxUtils Identifier - EventKernel xAODEventInfo JetEvent TrigMuonEvent TrigSteeringEvent - PathResolver PATCoreLib - TrigT1Interfaces ) - atlas_add_component( TrigEFMissingET + src/*.cxx src/components/*.cxx - LINK_LIBRARIES GaudiKernel TrigEFMissingETLib ${FASTJET_LIBRARIES} - PRIVATE_LINK_LIBRARIES ${FASTJETCONTRIB_LIBRARIES} -) + INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${TDAQ-COMMON_INCLUDE_DIRS} ${FASTJETCONTRIB_INCLUDE_DIRS} ${FASTJET_INCLUDE_DIRS} + LINK_LIBRARIES ${ROOT_LIBRARIES} ${FASTJET_LIBRARIES} ${TDAQ-COMMON_LIBRARIES} ${FASTJETCONTRIB_LIBRARIES} + AthenaBaseComps CaloDetDescrLib CaloEvent CaloGeoHelpers + CaloIdentifier CxxUtils EventKernel GaudiKernel Identifier + JetEvent LArIdentifier PathResolver + TrigCaloEvent TrigInterfacesLib TrigMissingEtEvent TrigMuonEvent + TrigParticle TrigSteeringEvent TrigT1Interfaces TrigT2CaloCommonLib + TrigTimeAlgsLib xAODCaloEvent xAODEventInfo xAODJet xAODTrigMissingET ) # Install files from the package: atlas_install_python_modules( python/*.py ) diff --git a/Trigger/TrigAlgorithms/TrigEFMissingET/TrigEFMissingET/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigAlgorithms/TrigEFMissingET/TrigEFMissingET/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..6423e1bf082f311cec1aca673e2141ba8957dd46 --- /dev/null +++ b/Trigger/TrigAlgorithms/TrigEFMissingET/TrigEFMissingET/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Trigger/TrigAlgorithms/TrigEFMissingET diff --git a/Trigger/TrigAlgorithms/TrigEFMissingET/TrigEFMissingET/EFMissingETFromHelper.h b/Trigger/TrigAlgorithms/TrigEFMissingET/TrigEFMissingET/EFMissingETFromHelper.h index f5ac2f4ffe28c1430dbd7f58355f756bb5fd357e..ce7e81e74759d60f14c2c31c8d4b355db6cf0c18 100644 --- a/Trigger/TrigAlgorithms/TrigEFMissingET/TrigEFMissingET/EFMissingETFromHelper.h +++ b/Trigger/TrigAlgorithms/TrigEFMissingET/TrigEFMissingET/EFMissingETFromHelper.h @@ -18,7 +18,8 @@ PURPOSE: Updates TrigMissingET using TrigMissingETHelper info ********************************************************************/ #include "TrigEFMissingET/EFMissingETBaseTool.h" -//#include "TrigCaloEvent/TrigMissingET.h" +#include "TrigEFMissingET/EFMissingETHelper.h" +// #include "TrigMissingEtEvent/TrigMissingET.h" #include "TrigMissingEtEvent/TrigMissingET.h" @@ -56,6 +57,29 @@ class EFMissingETFromHelper : public EFMissingETBaseTool StatusCode executeMT(xAOD::TrigMissingET *met, TrigEFMissingEtHelper *metHelper); + + class ComponentCopier + { + public: + ComponentCopier(xAOD::TrigMissingET *met, TrigEFMissingEtHelper *metHelper) + { + m_met = met; + m_helper = metHelper; + } + + void addHelperCompToMET(unsigned char helper_i); + void setMETCompFromHelper(unsigned char met_i, unsigned char helper_i); + void addMETCompWithHelper(unsigned char met_i, unsigned char met_add_i, unsigned char helper_i); + void setHelperFromMET(); + + xAOD::TrigMissingET* getMET() {return m_met; } + TrigEFMissingEtHelper* getMETHelper() {return m_helper; } + + private: + xAOD::TrigMissingET *m_met; + TrigEFMissingEtHelper *m_helper; + }; + }; #endif // TRIGEFMISSINGET_EFMISSINGETFROMHELPER diff --git a/Trigger/TrigAlgorithms/TrigEFMissingET/TrigEFMissingET/EFMissingETFromTrackAndClusters.h b/Trigger/TrigAlgorithms/TrigEFMissingET/TrigEFMissingET/EFMissingETFromTrackAndClusters.h index bdd618af34409c27910531b52cfae2c5408eb36d..3f726bd8a7cf89a002d90c6c39d5b5607fff8860 100644 --- a/Trigger/TrigAlgorithms/TrigEFMissingET/TrigEFMissingET/EFMissingETFromTrackAndClusters.h +++ b/Trigger/TrigAlgorithms/TrigEFMissingET/TrigEFMissingET/EFMissingETFromTrackAndClusters.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef TRIGEFMISSINGET_EFMissingETFromTrackAndClusters_H @@ -79,8 +79,8 @@ public: int calculateWeight(xAOD::CaloCluster cl) const; int calculateSplitWeight(xAOD::CaloCluster cl) const; - void RunClusters(std::vector<xAOD::CaloCluster> m_clust) const; - void RunSplitClusters(std::vector<xAOD::CaloCluster> m_clust) const; + void RunClusters(std::vector<xAOD::CaloCluster> m_clust); + void RunSplitClusters(std::vector<xAOD::CaloCluster> m_clust); @@ -112,9 +112,9 @@ private: float m_rapmax; float m_rapminApplied; float m_rapmaxApplied; - mutable double m_minPt; - mutable double m_minPtECal; - mutable double m_minPtHCal; + double m_minPt; + double m_minPtECal; + double m_minPtHCal; float m_deltaR; diff --git a/Trigger/TrigAlgorithms/TrigEFMissingET/TrigEFMissingET/EFMissingETHelper.h b/Trigger/TrigAlgorithms/TrigEFMissingET/TrigEFMissingET/EFMissingETHelper.h index d7de6638206b2f1ff0fe34b42204e6b64d1b0bb6..61fd3b1caefc17c2240ac40aee91b3e9a88ca10c 100644 --- a/Trigger/TrigAlgorithms/TrigEFMissingET/TrigEFMissingET/EFMissingETHelper.h +++ b/Trigger/TrigAlgorithms/TrigEFMissingET/TrigEFMissingET/EFMissingETHelper.h @@ -28,6 +28,40 @@ class TrigEFMissingEtComponent { public: // all attributes are public: like a struct + enum Component : uint + { + PreSamplB = 0 , + EMB1 , EMB2 , EMB3 , // LAr barrel + PreSamplE, EME1 , EME2 , EME3 , // LAr EM endcap + HEC0 , HEC1 , HEC2 , HEC3 , // Hadronic end cap cal. + TileBar0 , TileBar1 , TileBar2 , // Tile barrel + TileGap1 , TileGap2 , TileGap3 , // Tile gap (ITC & scint) + TileExt0 , TileExt1 , TileExt2 , // Tile extended barrel + FCalEM , FCalHad1 , FCalHad2 , // Forward cal endcap + TCLCW , // Topo. clusters Had + TCLCWB1 , TCLCWB2 , // pos. and neg. eta barrel + TCLCWE1 , TCLCWE2 , // pos. and neg. eta endcap + TCEM , // Topo. clusters EM + TCEMB1 , TCEMB2 , // pos. and neg. eta barrel + TCEME1 , TCEME2 , // pos. and neg. eta endcap + JET , // Jet + JETB1 , JETB2 , // + JETE1 , JETE2 , // + TCPUC , // Topo. cluster Fit + TCPUCUnc , // Topo. cluster Fit -- uncorrected + Muons, // Muons + ComponentSize + }; + + + static std::string ComponentToName(const Component c); + + static std::string ComponentToName(const int c) + { + return ComponentToName((Component) c); + }; + + unsigned short m_usedChannels; //<! counter for channels short m_sumOfSigns; //<! sum of energy signs (-1, +1) float m_ex, m_ey, m_ez; //<! 3 components of the missing energy @@ -94,7 +128,6 @@ class TrigEFMissingEtHelper { TrigEFMissingEtComponent* GetComponent(unsigned char c); private: - // (the following 2 integer attributes should be packed into a single word) int m_status; //<! global status flag unsigned char m_elements; //<! length of the vector of components float m_ex, m_ey, m_ez, m_sumEt, m_sumE; //<! global information diff --git a/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFlags.cxx b/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFlags.cxx index 4f6693baaff6d5d508a6254d24c3afc695754201..a0da0b4f20fad43cc9cdf32b8e07d453edfb2b53 100644 --- a/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFlags.cxx +++ b/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFlags.cxx @@ -254,58 +254,58 @@ StatusCode EFMissingETFlags::execute(xAOD::TrigMissingET *met , // compute auxiliary quantities if (i<4) { // EMB - if (Name.substr(0,3)=="EMB" || Name=="PreSamplB" ) { - EM_SumE += sumE; - EMB_SumE += sumE; - } else { - ATH_MSG_WARNING( "Cannot find EMB! Skipping check" ); - break; - } + if (Name.substr(0,3)=="EMB" || Name=="PreSamplB" ) { + EM_SumE += sumE; + EMB_SumE += sumE; + } else { + ATH_MSG_WARNING( "Cannot find EMB! Skipping check" ); + break; + } } else if (i<8) { // EME - if (Name.substr(0,3)=="EME" || Name=="PreSamplE" ) { - EM_SumE += sumE; - EME_SumE += sumE; - } else { - ATH_MSG_WARNING( "Cannot find EME! Skipping check" ); - break; - } + if (Name.substr(0,3)=="EME" || Name=="PreSamplE" ) { + EM_SumE += sumE; + EME_SumE += sumE; + } else { + ATH_MSG_WARNING( "Cannot find EME! Skipping check" ); + break; + } } else if (i<12) { // HEC - if (Name.substr(0,3)=="HEC") { - HEC_SumE += sumE; - } else { - ATH_MSG_WARNING( "Cannot find HEC! Skipping check" ); - break; - } + if (Name.substr(0,3)=="HEC") { + HEC_SumE += sumE; + } else { + ATH_MSG_WARNING( "Cannot find HEC! Skipping check" ); + break; + } } else if (i<15) { // TileBar - if (Name.substr(0,7)=="TileBar") { - TileBar_SumE += sumE; - } else { - ATH_MSG_WARNING( "Cannot find TileBar! Skipping check" ); - break; - } + if (Name.substr(0,7)=="TileBar") { + TileBar_SumE += sumE; + } else { + ATH_MSG_WARNING( "Cannot find TileBar! Skipping check" ); + break; + } } else if (i<18) { // TileGap - if (Name.substr(0,7)=="TileGap") { - TileGap_SumE += sumE; - } else { - ATH_MSG_WARNING( "Cannot find TileGap! Skipping check" ); - break; - } + if (Name.substr(0,7)=="TileGap") { + TileGap_SumE += sumE; + } else { + ATH_MSG_WARNING( "Cannot find TileGap! Skipping check" ); + break; + } } else if (i<21) { // TileExt - if (Name.substr(0,7)=="TileExt") { - TileExt_SumE += sumE; - } else { - ATH_MSG_WARNING( "Cannot find TileExt! Skipping check" ); - break; - } + if (Name.substr(0,7)=="TileExt") { + TileExt_SumE += sumE; + } else { + ATH_MSG_WARNING( "Cannot find TileExt! Skipping check" ); + break; + } } else { // FCal // note: i must be < 28 because i < elem-18 = 42-14 = 28 - if (Name.substr(0,4)=="FCal") { - if (Name == "FCalEM") EM_SumE += sumE; - FCal_SumE += sumE; - } else { - ATH_MSG_WARNING( "Cannot find FCal! Skipping check" ); - break; - } + if (Name.substr(0,4)=="FCal") { + if (Name == "FCalEM") EM_SumE += sumE; + FCal_SumE += sumE; + } else { + ATH_MSG_WARNING( "Cannot find FCal! Skipping check" ); + break; + } } // end loop over i } //end elem == 42 @@ -363,45 +363,45 @@ StatusCode EFMissingETFlags::execute(xAOD::TrigMissingET *met , // flag component if SumE/SumE_subdet is outside the allowed range if (i<4) { if (EMB_SumE != 0) { - float ratio = sumE / EMB_SumE; - if (ratio<m_MinSumEratioInEMB || ratio>m_MaxSumEratioInEMB) { - metComp->m_status |= m_maskBadEnergyRatio; - } + float ratio = sumE / EMB_SumE; + if (ratio<m_MinSumEratioInEMB || ratio>m_MaxSumEratioInEMB) { + metComp->m_status |= m_maskBadEnergyRatio; + } } } else if (i<8) { if (EME_SumE != 0) { - float ratio = sumE / EME_SumE; - if (ratio<m_MinSumEratioInEME || ratio>m_MaxSumEratioInEME) { - metComp->m_status |= m_maskBadEnergyRatio; - } + float ratio = sumE / EME_SumE; + if (ratio<m_MinSumEratioInEME || ratio>m_MaxSumEratioInEME) { + metComp->m_status |= m_maskBadEnergyRatio; + } } } else if (i<12) { if (HEC_SumE != 0) { - float ratio = sumE / HEC_SumE; - if (ratio<m_MinSumEratioInHEC || ratio>m_MaxSumEratioInHEC) { - metComp->m_status |= m_maskBadEnergyRatio; - } + float ratio = sumE / HEC_SumE; + if (ratio<m_MinSumEratioInHEC || ratio>m_MaxSumEratioInHEC) { + metComp->m_status |= m_maskBadEnergyRatio; + } } } else if (i<15) { if (TileBar_SumE != 0) { - float ratio = sumE / TileBar_SumE; - if (ratio<m_MinSumEratioInTileBar || ratio>m_MaxSumEratioInTileBar) { - metComp->m_status |= m_maskBadEnergyRatio; - } + float ratio = sumE / TileBar_SumE; + if (ratio<m_MinSumEratioInTileBar || ratio>m_MaxSumEratioInTileBar) { + metComp->m_status |= m_maskBadEnergyRatio; + } } } else if (i<18) { - if (TileGap_SumE != 0) { - float ratio = sumE / TileGap_SumE; - if (ratio<m_MinSumEratioInTileGap || ratio>m_MaxSumEratioInTileGap) { - metComp->m_status |= m_maskBadEnergyRatio; - } + if (TileGap_SumE != 0) { + float ratio = sumE / TileGap_SumE; + if (ratio<m_MinSumEratioInTileGap || ratio>m_MaxSumEratioInTileGap) { + metComp->m_status |= m_maskBadEnergyRatio; + } } } else if (i<21) { - if (TileExt_SumE != 0) { - float ratio = sumE / TileExt_SumE; - if (ratio<m_MinSumEratioInTileExt || ratio>m_MaxSumEratioInTileExt) { - metComp->m_status |= m_maskBadEnergyRatio; - } + if (TileExt_SumE != 0) { + float ratio = sumE / TileExt_SumE; + if (ratio<m_MinSumEratioInTileExt || ratio>m_MaxSumEratioInTileExt) { + metComp->m_status |= m_maskBadEnergyRatio; + } } } else if (i<24) { if (FCal_SumE != 0) { @@ -475,8 +475,8 @@ StatusCode EFMissingETFlags::execute(xAOD::TrigMissingET *met , for (unsigned char c=0; c<elem; ++c) { TrigEFMissingEtComponent* metComp = metHelper->GetComponent(c); for (int b=0; b<16; ++b) { - unsigned short mask = (1<<b); - if (metComp->m_status & mask) m_hCompFlags->Fill(c,b); + unsigned short mask = (1<<b); + if (metComp->m_status & mask) m_hCompFlags->Fill(c,b); } } } diff --git a/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromHelper.cxx b/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromHelper.cxx index c7b01da03dc299dd02105b216df61babacecb83e..7e7735cdf84e42503615174883ee642895c8679a 100644 --- a/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromHelper.cxx +++ b/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromHelper.cxx @@ -7,10 +7,13 @@ NAME: EFMissingETFromHelper.cxx PACKAGE: Trigger/TrigAlgorithms/TrigEFMissingET -AUTHORS: Gabriel Gallardo, Manfredi Ronzani -CREATED: September 27, 2018 +AUTHORS: Diego Casadei +CREATED: March 12, 2008 -PURPOSE: Updates TrigMissingET using TrigEFMissingETHelper info for AthenaMT. +UPDATERS: Gabriel Gallardo, Manfredi Ronzani +DATE: January 25, 2019 + +PURPOSE: Updates TrigMissingET using TrigEFMissingEtHelper info for AthenaMT. Components are left uncorrected when saved into TrigMissingET as auxiliary information. @@ -29,6 +32,75 @@ TrigMissingET as auxiliary information. using CxxUtils::strformat; +void EFMissingETFromHelper::ComponentCopier::addHelperCompToMET(unsigned char helper_i) +{ + TrigEFMissingEtComponent* metComp = m_helper->GetComponent(helper_i); + + float ex = metComp->m_ex; + float ey = metComp->m_ey; + float ez = metComp->m_ez; + float sumE = metComp->m_sumE; + float sumEt = metComp->m_sumEt; + float c0 = metComp->m_calib0; + float c1 = metComp->m_calib1; + // short status = metComp->m_status; + short sumOfSigns = metComp->m_sumOfSigns; + // unsigned short Ntot = metComp->m_usedChannels; + + m_met->setEx( m_met->ex() + sumOfSigns * c0 + c1 * ex ); + m_met->setEy( m_met->ey() + sumOfSigns * c0 + c1 * ey ); + m_met->setEz( m_met->ez() + sumOfSigns * c0 + c1 * ez ); + m_met->setSumE( m_met->sumE() + sumOfSigns * c0 + c1 * sumE ); + m_met->setSumEt( m_met->sumEt() + sumOfSigns * c0 + c1 * sumEt ); + return; +} + +void EFMissingETFromHelper::ComponentCopier::setMETCompFromHelper(unsigned char met_i, unsigned char helper_i) +{ + TrigEFMissingEtComponent* metComp = m_helper->GetComponent(helper_i); + + m_met->setNameOfComponent( met_i, metComp->m_name ); + m_met->setExComponent( met_i, metComp->m_ex ); + m_met->setEyComponent( met_i, metComp->m_ey ); + m_met->setEzComponent( met_i, metComp->m_ez ); + m_met->setSumEtComponent( met_i, metComp->m_sumEt ); + m_met->setSumEComponent( met_i, metComp->m_sumE ); + m_met->setCalib0Component( met_i, metComp->m_calib0 ); + m_met->setCalib1Component( met_i, metComp->m_calib1 ); + m_met->setStatusComponent( met_i, metComp->m_status ); + m_met->setSumOfSignsComponent( met_i, metComp->m_sumOfSigns ); + m_met->setUsedChannelsComponent( met_i, metComp->m_usedChannels ); + return; +} + +void EFMissingETFromHelper::ComponentCopier::addMETCompWithHelper(unsigned char met_i, unsigned char met_add_i, unsigned char helper_i) +{ + TrigEFMissingEtComponent* metComp = m_helper->GetComponent(helper_i); + + m_met->setExComponent( met_i, metComp->m_ex + m_met->exComponent( met_add_i ) ); + m_met->setEyComponent( met_i, metComp->m_ey + m_met->eyComponent( met_add_i ) ); + m_met->setEzComponent( met_i, metComp->m_ez + m_met->ezComponent( met_add_i ) ); + m_met->setSumEtComponent( met_i, metComp->m_sumEt + m_met->sumEtComponent( met_add_i ) ); + m_met->setSumEComponent( met_i, metComp->m_sumE + m_met->sumEComponent( met_add_i ) ); + m_met->setSumOfSignsComponent( met_i, metComp->m_sumOfSigns + m_met->sumOfSignsComponent( met_add_i ) ); + m_met->setUsedChannelsComponent( met_i, metComp->m_usedChannels + m_met->usedChannelsComponent( met_add_i ) ); + m_met->setStatusComponent( met_i, metComp->m_status | m_met->statusComponent( met_add_i ) ); + m_met->setCalib0Component( met_i, metComp->m_calib0 ); + m_met->setCalib1Component( met_i, metComp->m_calib1 ); + return; +} + +void EFMissingETFromHelper::ComponentCopier::setHelperFromMET() +{ + m_helper->SetEx( m_met->ex() ); + m_helper->SetEy( m_met->ey() ); + m_helper->SetEz( m_met->ez() ); + m_helper->SetSumEt( m_met->sumEt( ) ); + m_helper->SetSumE( m_met->sumE() ); + return; +} +// ----------------------- // + EFMissingETFromHelper::EFMissingETFromHelper(const std::string& type, const std::string& name, const IInterface* parent): @@ -69,8 +141,6 @@ StatusCode EFMissingETFromHelper::finalize() return StatusCode::SUCCESS; } - - StatusCode EFMissingETFromHelper::execute() { return StatusCode::SUCCESS; @@ -95,6 +165,8 @@ StatusCode EFMissingETFromHelper::execute(xAOD::TrigMissingET *met , return StatusCode::FAILURE; } + ComponentCopier copier = ComponentCopier(met, metHelper); + ATH_MSG_DEBUG( "Found this info in the helper class: " << metHelper->getFormattedValues() ); if(m_timersvc) @@ -102,11 +174,11 @@ StatusCode EFMissingETFromHelper::execute(xAOD::TrigMissingET *met , met->setFlag( metHelper->GetStatus() ); - unsigned int comp = met->getNumberOfComponents(); // final no. of aux. compon. - unsigned char elem = metHelper->GetElements(); // no. of transient aux. compon. - if (elem!=42) { - ATH_MSG_WARNING( "Found " << elem << " aux components in the transient helper class. Not supported!" ); - } + uint comp = met->getNumberOfComponents(); // final no. of aux. compon. + uint nHelperComp = metHelper->GetElements(); // no. of transient aux. compon. + if (nHelperComp != static_cast<unsigned char>(TrigEFMissingEtComponent::ComponentSize)) { + ATH_MSG_WARNING( "Found " << nHelperComp << " aux components in the transient helper class. Not supported!" ); + } else ATH_MSG_DEBUG( "Found " << nHelperComp << " aux components in the transient helper class" ); bool skipAuxInfo=false; bool save9comp=false; @@ -140,313 +212,148 @@ StatusCode EFMissingETFromHelper::execute(xAOD::TrigMissingET *met , ATH_MSG_WARNING( "Found " << comp << " aux components in TrigMissingET. Not supported. NOT SAVING AUX INFO" ); skipAuxInfo=true; } + ATH_MSG_DEBUG( "Found " << comp << " aux components in TrigMissingET." ); // Initialize EDM by setting all components to zero met->setEx(0.); met->setEy(0.); met->setEz(0.); met->setSumE(0.); met->setSumEt(0.); // take info from *metHelper and update *met - for (unsigned char i=0; i<elem; ++i) { // loop over transient components - TrigEFMissingEtComponent* metComp = metHelper->GetComponent(i); - - float ex = metComp->m_ex; - float ey = metComp->m_ey; - float ez = metComp->m_ez; - float sumE = metComp->m_sumE; - float sumEt = metComp->m_sumEt; - float c0 = metComp->m_calib0; - float c1 = metComp->m_calib1; - short status = metComp->m_status; - short sumOfSigns = metComp->m_sumOfSigns; - unsigned short Ntot = metComp->m_usedChannels; + for (uint helper_i=0; helper_i<nHelperComp; ++helper_i) { // loop over transient components // basic info - DK calibration - if (i<elem-18){ // skip muon or Had Topo granular or EM Topo correction for all quantities - met->setEx( met->ex() + sumOfSigns * c0 + c1 * ex ); - met->setEy( met->ey() + sumOfSigns * c0 + c1 * ey ); - met->setEz( met->ez() + sumOfSigns * c0 + c1 * ez ); - met->setSumE( met->sumE() + sumOfSigns * c0 + c1 * sumE ); - met->setSumEt( met->sumEt() + sumOfSigns * c0 + c1 * sumEt ); + if (helper_i < nHelperComp-18){ + ATH_MSG_DEBUG( "skip muon or Had Topo granular or EM Topo correction for all quantities" ); + copier.addHelperCompToMET(helper_i); } - if(save9comp && i == 24) { // Save summed HAD MET - met->setEx( met->ex() + sumOfSigns * c0 + c1 * ex ); - met->setEy( met->ey() + sumOfSigns * c0 + c1 * ey ); - met->setEz( met->ez() + sumOfSigns * c0 + c1 * ez ); - met->setSumE( met->sumE() + sumOfSigns * c0 + c1 * sumE ); - met->setSumEt( met->sumEt() + sumOfSigns * c0 + c1 * sumEt ); + if(save9comp && helper_i == static_cast<uint>(TrigEFMissingEtComponent::TCLCW) ) { + ATH_MSG_DEBUG( "Save summed HAD MET" ); + copier.addHelperCompToMET(helper_i); } - if( (save2comp || save6comp) && i == 34) { // Save JET MET - met->setEx( met->ex() + sumOfSigns * c0 + c1 * ex ); - met->setEy( met->ey() + sumOfSigns * c0 + c1 * ey ); - met->setEz( met->ez() + sumOfSigns * c0 + c1 * ez ); - met->setSumE( met->sumE() + sumOfSigns * c0 + c1 * sumE ); - met->setSumEt( met->sumEt() + sumOfSigns * c0 + c1 * sumEt ); + if( (save2comp || save6comp) && helper_i == static_cast<uint>(TrigEFMissingEtComponent::JET)) { + ATH_MSG_DEBUG( "Save JET MET" ); + copier.addHelperCompToMET(helper_i); } - if(save3comp && i == 39) { // Save PUC MET - met->setEx( met->ex() + sumOfSigns * c0 + c1 * ex ); - met->setEy( met->ey() + sumOfSigns * c0 + c1 * ey ); - met->setEz( met->ez() + sumOfSigns * c0 + c1 * ez ); - met->setSumE( met->sumE() + sumOfSigns * c0 + c1 * sumE ); - met->setSumEt( met->sumEt() + sumOfSigns * c0 + c1 * sumEt ); + if(save3comp && helper_i == static_cast<uint>(TrigEFMissingEtComponent::TCPUC)) { + ATH_MSG_DEBUG( "Save PUC MET" ); + copier.addHelperCompToMET(helper_i); } if (skipAuxInfo) continue; // auxiliary info - uncorrected - if (comp == unsigned(elem-17) && i < 24) { // finest granularity - met->setNameOfComponent( i, metComp->m_name ); - met->setExComponent( i, ex ); - met->setEyComponent( i, ey ); - met->setEzComponent( i, ez ); - met->setSumEtComponent( i, sumEt ); - met->setSumEComponent( i, sumE ); - met->setCalib0Component( i, c0 ); - met->setCalib1Component( i, c1 ); - met->setStatusComponent( i, status ); - met->setSumOfSignsComponent( i, sumOfSigns ); - met->setUsedChannelsComponent( i, Ntot ); - } else if(comp == unsigned(elem-17) && i == 41) { // save muons - met->setNameOfComponent( i-17, metComp->m_name ); - met->setExComponent( i-17, ex ); - met->setEyComponent( i-17, ey ); - met->setEzComponent( i-17, ez ); - met->setSumEtComponent( i-17, sumEt ); - met->setSumEComponent( i-17, sumE ); - met->setCalib0Component( i-17, c0 ); - met->setCalib1Component( i-17, c1 ); - met->setStatusComponent( i-17, status ); - met->setSumOfSignsComponent( i-17, sumOfSigns ); - met->setUsedChannelsComponent( i-17, Ntot ); + if (comp == unsigned(nHelperComp-17) && helper_i < 24) { + ATH_MSG_DEBUG( "finest granularity"); + copier.setMETCompFromHelper(helper_i, helper_i); + } else if(comp == unsigned(nHelperComp-17) && helper_i == static_cast<uint>(TrigEFMissingEtComponent::Muons)) { + ATH_MSG_DEBUG( "save muons"); + copier.setMETCompFromHelper(helper_i-17, helper_i); } else if (save6comp) { - if (i>=34 && i < 39) { // Central and Forward Jets - met->setNameOfComponent( i-34, metComp->m_name ); - met->setExComponent( i-34, ex ); - met->setEyComponent( i-34, ey ); - met->setEzComponent( i-34, ez ); - met->setSumEtComponent( i-34, sumEt ); - met->setSumEComponent( i-34, sumE ); - met->setCalib0Component( i-34, c0 ); - met->setCalib1Component( i-34, c1 ); - met->setStatusComponent( i-34, status ); - met->setSumOfSignsComponent( i-34, sumOfSigns ); - met->setUsedChannelsComponent( i-34, Ntot ); + if (helper_i>=34 && helper_i < 39) { + ATH_MSG_DEBUG( "Central and Forward Jets"); + copier.setMETCompFromHelper(helper_i-34, helper_i); } - if (i==41) { // Muons - met->setNameOfComponent( 5, metComp->m_name ); - met->setExComponent( 5, ex ); - met->setEyComponent( 5, ey ); - met->setEzComponent( 5, ez ); - met->setSumEtComponent( 5, sumEt ); - met->setSumEComponent( 5, sumE ); - met->setCalib0Component( 5, c0 ); - met->setCalib1Component( 5, c1 ); - met->setStatusComponent( 5, status ); - met->setSumOfSignsComponent( 5, sumOfSigns ); - met->setUsedChannelsComponent( 5, Ntot ); + if (helper_i == static_cast<uint>(TrigEFMissingEtComponent::Muons)) { + ATH_MSG_DEBUG( "Muons"); + copier.setMETCompFromHelper(5, helper_i); } } else if (save9comp) { - if (i > 24 && i < 29 ) { // HAD scale quantities - met->setNameOfComponent( i-25, metComp->m_name ); - met->setExComponent( i-25, ex ); - met->setEyComponent( i-25, ey ); - met->setEzComponent( i-25, ez ); - met->setSumEtComponent( i-25, sumEt ); - met->setSumEComponent( i-25, sumE ); - met->setCalib0Component( i-25, c0 ); - met->setCalib1Component( i-25, c1 ); - met->setStatusComponent( i-25, status ); - met->setSumOfSignsComponent( i-25, sumOfSigns ); - met->setUsedChannelsComponent( i-25, Ntot ); - } else if( i > 29 && i < 34) { // EM scale quantities - met->setNameOfComponent( i-25-1, metComp->m_name ); - met->setExComponent( i-25-1, ex ); - met->setEyComponent( i-25-1, ey ); - met->setEzComponent( i-25-1, ez ); - met->setSumEtComponent( i-25-1, sumEt ); - met->setSumEComponent( i-25-1, sumE ); - met->setCalib0Component( i-25-1, c0 ); - met->setCalib1Component( i-25-1, c1 ); - met->setStatusComponent( i-25-1, status ); - met->setSumOfSignsComponent( i-25-1, sumOfSigns ); - met->setUsedChannelsComponent( i-25-1, Ntot ); - } else if( i == 41) { // Muon - met->setNameOfComponent( i-25-8, metComp->m_name ); - met->setExComponent( i-25-8, ex ); - met->setEyComponent( i-25-8, ey ); - met->setEzComponent( i-25-8, ez ); - met->setSumEtComponent( i-25-8, sumEt ); - met->setSumEComponent( i-25-8, sumE ); - met->setCalib0Component( i-25-8, c0 ); - met->setCalib1Component( i-25-8, c1 ); - met->setStatusComponent( i-25-8, status ); - met->setSumOfSignsComponent( i-25-8, sumOfSigns ); - met->setUsedChannelsComponent( i-25-8, Ntot ); + if (helper_i > 24 && helper_i < 29 ) { + ATH_MSG_DEBUG( "HAD scale quantities" ); + copier.setMETCompFromHelper(helper_i-25, helper_i); + } else if( helper_i > 29 && helper_i < 34) { + ATH_MSG_DEBUG( "EM scale quantities" ); + copier.setMETCompFromHelper(helper_i-25-1, helper_i); + } else if( helper_i == static_cast<uint>(TrigEFMissingEtComponent::Muons)) { + ATH_MSG_DEBUG( "Muon" ); + copier.setMETCompFromHelper(helper_i-25-8, helper_i); } } else if (save5comp) { - switch (i) { - case 0: case 1: case 2: case 3: // LAr, barrel - met->setExComponent( 0, ex + met->exComponent(1) ); - met->setEyComponent( 0, ey + met->eyComponent(1) ); - met->setEzComponent( 0, ez + met->ezComponent(1) ); - met->setSumEtComponent( 0, sumEt + met->sumEtComponent(1) ); - met->setSumEComponent( 0, sumE + met->sumEComponent(1) ); - met->setSumOfSignsComponent( 0, sumOfSigns + met->sumOfSignsComponent(1) ); - met->setUsedChannelsComponent( 0, Ntot + met->usedChannelsComponent(1) ); - met->setStatusComponent( 0, status | met->statusComponent(1) ); - met->setCalib0Component( 0, c0 ); - met->setCalib1Component( 0, c1 ); + switch (static_cast<TrigEFMissingEtComponent::Component>(helper_i)) { + case TrigEFMissingEtComponent::PreSamplB: case TrigEFMissingEtComponent::EMB1: + case TrigEFMissingEtComponent::EMB2: case TrigEFMissingEtComponent::EMB3: + ATH_MSG_DEBUG("LAr, barrel"); + copier.addMETCompWithHelper(0, 1, helper_i); break; - case 4: case 5: case 6: case 7: // LAr, end-cap - case 21: // + FCalEM - met->setExComponent( 1, ex + met->exComponent(2) ); - met->setEyComponent( 1, ey + met->eyComponent(2) ); - met->setEzComponent( 1, ez + met->ezComponent(2) ); - met->setSumEtComponent( 1, sumEt + met->sumEtComponent(2) ); - met->setSumEComponent( 1, sumE + met->sumEComponent(2) ); - met->setSumOfSignsComponent( 1, sumOfSigns + met->sumOfSignsComponent(2) ); - met->setUsedChannelsComponent( 1, Ntot + met->usedChannelsComponent(2) ); - met->setStatusComponent( 1, status | met->statusComponent(2) ); - met->setCalib0Component( 1, c0 ); - met->setCalib1Component( 1, c1 ); + case TrigEFMissingEtComponent::PreSamplE: case TrigEFMissingEtComponent::EME1: + case TrigEFMissingEtComponent::EME2: case TrigEFMissingEtComponent::EME3: + ATH_MSG_DEBUG("LAr, end-cap"); + /* FALLTHROUGH */ + case TrigEFMissingEtComponent::FCalEM: + ATH_MSG_DEBUG("+ FCalEM"); + copier.addMETCompWithHelper(1, 2, helper_i); break; - case 12: case 13: case 14: // Tile, barrel + - case 18: case 19: case 20: // Tile, extended barrel - met->setExComponent( 2, ex + met->exComponent(3) ); - met->setEyComponent( 2, ey + met->eyComponent(3) ); - met->setEzComponent( 2, ez + met->ezComponent(3) ); - met->setSumEtComponent( 2, sumEt + met->sumEtComponent(3) ); - met->setSumEComponent( 2, sumE + met->sumEComponent(3) ); - met->setSumOfSignsComponent( 2, sumOfSigns + met->sumOfSignsComponent(3) ); - met->setUsedChannelsComponent( 2, Ntot + met->usedChannelsComponent(3) ); - met->setStatusComponent( 2, status | met->statusComponent(3) ); - met->setCalib0Component( 2, c0 ); - met->setCalib1Component( 2, c1 ); + case TrigEFMissingEtComponent::TileBar0: case TrigEFMissingEtComponent::TileBar1: case TrigEFMissingEtComponent::TileBar2: + ATH_MSG_DEBUG("Tile, barrel +"); + /* FALLTHROUGH */ + case TrigEFMissingEtComponent::TileExt0: case TrigEFMissingEtComponent::TileExt1: case TrigEFMissingEtComponent::TileExt2: + ATH_MSG_DEBUG("Tile, extended barrel"); + copier.addMETCompWithHelper(2, 3, helper_i); break; - case 24: case 25: case 26: case 27: case 28: - case 29: case 30: case 31: case 32: case 33: - case 34: case 35: case 36: case 37: case 38: - case 39: case 40 : // Topo. cluster elements or jets - do nothing. + case TrigEFMissingEtComponent::TCLCW: + case TrigEFMissingEtComponent::TCLCWB1: case TrigEFMissingEtComponent::TCLCWB2: + case TrigEFMissingEtComponent::TCLCWE1: case TrigEFMissingEtComponent::TCLCWE2: + case TrigEFMissingEtComponent::TCEM: + case TrigEFMissingEtComponent::TCEMB1: case TrigEFMissingEtComponent::TCEMB2: + case TrigEFMissingEtComponent::TCEME1: case TrigEFMissingEtComponent::TCEME2: + case TrigEFMissingEtComponent::JET: + case TrigEFMissingEtComponent::JETB1: case TrigEFMissingEtComponent::JETB2: + case TrigEFMissingEtComponent::JETE1: case TrigEFMissingEtComponent::JETE2: + case TrigEFMissingEtComponent::TCPUC: case TrigEFMissingEtComponent::TCPUCUnc: + ATH_MSG_DEBUG("Topo. cluster elements or jets - do nothing."); break; - case 41: // muons - met->setExComponent( 4, ex ); - met->setEyComponent( 4, ey ); - met->setEzComponent( 4, ez ); - met->setSumEtComponent( 4, sumEt ); - met->setSumEComponent( 4, sumE ); - met->setCalib0Component( 4, c0 ); - met->setCalib1Component( 4, c1 ); - met->setStatusComponent( 4, status ); - met->setSumOfSignsComponent( 4, sumOfSigns ); - met->setUsedChannelsComponent( 4, Ntot ); + case TrigEFMissingEtComponent::Muons: + ATH_MSG_DEBUG("muons"); + copier.setMETCompFromHelper(4, helper_i); break; - default: // Hadr. end-cap + Tile gap + FCalHad - met->setExComponent( 3, ex + met->exComponent(4) ); - met->setEyComponent( 3, ey + met->eyComponent(4) ); - met->setEzComponent( 3, ez + met->ezComponent(4) ); - met->setSumEtComponent( 3, sumEt + met->sumEtComponent(4) ); - met->setSumEComponent( 3, sumE + met->sumEComponent(4) ); - met->setSumOfSignsComponent( 3, sumOfSigns + met->sumOfSignsComponent(4) ); - met->setUsedChannelsComponent( 3, Ntot + met->usedChannelsComponent(4) ); - met->setStatusComponent( 3, status | met->statusComponent(4) ); - met->setCalib0Component( 3, c0 ); - met->setCalib1Component( 3, c1 ); + default: + ATH_MSG_DEBUG("Hadr. end-cap + Tile gap + FCalHad"); + copier.addMETCompWithHelper(3, 4, helper_i); } } else if (save3comp) { - switch (i) { - case 39: // Corrected MET - met->setNameOfComponent( 0, metComp->m_name ); - met->setExComponent( 0, ex ); - met->setEyComponent( 0, ey ); - met->setEzComponent( 0, ez ); - met->setSumEtComponent( 0, sumEt ); - met->setSumEComponent( 0, sumE ); - met->setCalib0Component( 0, c0 ); - met->setCalib1Component( 0, c1 ); - met->setStatusComponent( 0, status ); - met->setSumOfSignsComponent( 0, sumOfSigns ); - met->setUsedChannelsComponent( 0, Ntot ); + switch (static_cast<TrigEFMissingEtComponent::Component>(helper_i)) { + case TrigEFMissingEtComponent::TCPUC: + ATH_MSG_DEBUG( "Corrected MET" ); + copier.setMETCompFromHelper(0, helper_i); break; - case 40: // Original MET - met->setNameOfComponent( 1, metComp->m_name ); - met->setExComponent( 1, ex ); - met->setEyComponent( 1, ey ); - met->setEzComponent( 1, ez ); - met->setSumEtComponent( 1, sumEt ); - met->setSumEComponent( 1, sumE ); - met->setCalib0Component( 1, c0 ); - met->setCalib1Component( 1, c1 ); - met->setStatusComponent( 1, status ); - met->setSumOfSignsComponent( 1, sumOfSigns ); - met->setUsedChannelsComponent( 1, Ntot ); + case TrigEFMissingEtComponent::TCPUCUnc: + ATH_MSG_DEBUG( "Original MET" ); + copier.setMETCompFromHelper(1, helper_i); break; - case 41: // Muons - met->setNameOfComponent( 2, metComp->m_name ); - met->setExComponent( 2, ex ); - met->setEyComponent( 2, ey ); - met->setEzComponent( 2, ez ); - met->setSumEtComponent( 2, sumEt ); - met->setSumEComponent( 2, sumE ); - met->setCalib0Component( 2, c0 ); - met->setCalib1Component( 2, c1 ); - met->setStatusComponent( 2, status ); - met->setSumOfSignsComponent( 2, sumOfSigns ); - met->setUsedChannelsComponent( 2, Ntot ); - } - } else if (save2comp) { // Jets + muons only - if (i==34) { // Jets - met->setNameOfComponent( 0, metComp->m_name ); - met->setExComponent( 0, ex ); - met->setEyComponent( 0, ey ); - met->setEzComponent( 0, ez ); - met->setSumEtComponent( 0, sumEt ); - met->setSumEComponent( 0, sumE ); - met->setCalib0Component( 0, c0 ); - met->setCalib1Component( 0, c1 ); - met->setStatusComponent( 0, status ); - met->setSumOfSignsComponent( 0, sumOfSigns ); - met->setUsedChannelsComponent( 0, Ntot ); + case TrigEFMissingEtComponent::Muons: + ATH_MSG_DEBUG( "Muons" ); + copier.setMETCompFromHelper(2, helper_i); + default: + ; } - if (i==41) { // Muons - met->setNameOfComponent( 1, metComp->m_name ); - met->setExComponent( 1, ex ); - met->setEyComponent( 1, ey ); - met->setEzComponent( 1, ez ); - met->setSumEtComponent( 1, sumEt ); - met->setSumEComponent( 1, sumE ); - met->setCalib0Component( 1, c0 ); - met->setCalib1Component( 1, c1 ); - met->setStatusComponent( 1, status ); - met->setSumOfSignsComponent( 1, sumOfSigns ); - met->setUsedChannelsComponent( 1, Ntot ); + } else if (save2comp) { + switch(static_cast<TrigEFMissingEtComponent::Component>(helper_i)){ + case TrigEFMissingEtComponent::JET: + ATH_MSG_DEBUG( "Jets+Mu only: Jets"); + copier.setMETCompFromHelper(0, helper_i); + break; + case TrigEFMissingEtComponent::Muons: + ATH_MSG_DEBUG( "Jets+Mu only: Muons"); + copier.setMETCompFromHelper(1, helper_i); + break; + default: + ; } - } else if (save1comp) { // muons only - if (i==41) { // REPLACE WITH A TEST OVER COMP. NAME - met->setNameOfComponent( 0, metComp->m_name ); - met->setExComponent( 0, ex ); - met->setEyComponent( 0, ey ); - met->setEzComponent( 0, ez ); - met->setSumEtComponent( 0, sumEt ); - met->setSumEComponent( 0, sumE ); - met->setCalib0Component( 0, c0 ); - met->setCalib1Component( 0, c1 ); - met->setStatusComponent( 0, status ); - met->setSumOfSignsComponent( 0, sumOfSigns ); - met->setUsedChannelsComponent( 0, Ntot ); + } else if (save1comp) { + if (helper_i == static_cast<uint>(TrigEFMissingEtComponent::Muons)) { // REPLACE WITH A TEST OVER COMP. NAME + ATH_MSG_DEBUG("Muons only"); + copier.setMETCompFromHelper(0, helper_i); } } } // loop over transient components // also update transient helper class, for monitoring - metHelper->SetEx( met->ex() ); - metHelper->SetEy( met->ey() ); - metHelper->SetEz( met->ez() ); - metHelper->SetSumEt( met->sumEt( ) ); - metHelper->SetSumE( met->sumE() ); + copier.setHelperFromMET(); if(m_timersvc) m_glob_timer->stop(); // total time @@ -472,40 +379,32 @@ StatusCode EFMissingETFromHelper::execute(xAOD::TrigMissingET *met , ATH_MSG_DEBUG( message ); } - unsigned int Nc = met->getNumberOfComponents(); - - if (Nc > 0) { - if(msgLvl(MSG::DEBUG)){ - s="REGTEST __name____status_usedChannels__sumOfSigns__calib1_calib0"; - s+="/MeV__ex/MeV_____ey/MeV_____ez/MeV___sumE/MeV__sumEt/CLHEP::MeV"; - ATH_MSG_DEBUG( s ); - } - } - - for(uint j = 0; j < Nc; j++) { - - const char* name = met->nameOfComponent(j).c_str(); - const short status = met->statusComponent(j); - const unsigned short usedChan = met->usedChannelsComponent(j); - const short sumOfSigns = met->sumOfSignsComponent(j); - const float calib0 = met->calib0Component(j); - const float calib1 = met->calib1Component(j); - const float ex = met->exComponent(j); - const float ey = met->eyComponent(j); - const float ez = met->ezComponent(j); - const float sumE = met->sumEComponent(j); - const float sumEt = met->sumEtComponent(j); - - if(msgLvl(MSG::DEBUG)){ - message = strformat ("REGTEST %s %6d %12d %10d %6.2f %6.3f %10.2f %10.2f %10.2f %10.2f %10.2f", - name, status, usedChan, sumOfSigns, calib1, calib0, ex, ey, ez, sumE, sumEt); - ATH_MSG_DEBUG( message ); - } - + if(msgLvl(MSG::DEBUG)){ + unsigned int nMetComp = met->getNumberOfComponents(); + + s="REGTEST __name____status_usedChannels__sumOfSigns__calib1_calib0"; + s+="/MeV__ex/MeV_____ey/MeV_____ez/MeV___sumE/MeV__sumEt/CLHEP::MeV"; + ATH_MSG_DEBUG( s ); + + for(uint j = 0; j < nMetComp; j++) + { + const char* name = met->nameOfComponent(j).c_str(); + const short status = met->statusComponent(j); + const unsigned short usedChan = met->usedChannelsComponent(j); + const short sumOfSigns = met->sumOfSignsComponent(j); + const float calib0 = met->calib0Component(j); + const float calib1 = met->calib1Component(j); + const float ex = met->exComponent(j); + const float ey = met->eyComponent(j); + const float ez = met->ezComponent(j); + const float sumE = met->sumEComponent(j); + const float sumEt = met->sumEtComponent(j); + + message = strformat ("REGTEST %s %6d %12d %10d %6.2f %6.3f %10.2f %10.2f %10.2f %10.2f %10.2f", + name, status, usedChan, sumOfSigns, calib1, calib0, ex, ey, ez, sumE, sumEt); + ATH_MSG_DEBUG( message ); } - - - + } return StatusCode::SUCCESS; } diff --git a/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromJets.cxx b/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromJets.cxx index 7691bec1c7f1372c565b98272a7ad539f1872150..c5bc4ab513d217841948d1b90a9b30fbd2c3f455 100644 --- a/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromJets.cxx +++ b/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromJets.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /******************************************************************** @@ -17,6 +17,7 @@ PURPOSE: Updates TrigMissingETHelper using info from jets #include "TrigTimeAlgs/TrigTimerSvc.h" #include "CxxUtils/sincosf.h" +#include "CxxUtils/checker_macros.h" #include "JetEvent/JetCollection.h" #include "JetEvent/Jet.h" @@ -113,7 +114,12 @@ StatusCode EFMissingETFromJets::execute(xAOD::TrigMissingET *, ATH_MSG_DEBUG( "num of jets: " << MHTJetsVec.size() ); //--- fetching the topo. cluster component - float upperlim[4] = {m_etacut,0,5,-m_etacut}; float lowerlim[4] = {0,-m_etacut,m_etacut,-5}; + float upperlim[4] = {m_etacut,0,5,-m_etacut}; + float lowerlim[4] = {0,-m_etacut,m_etacut,-5}; + + static const xAOD::JetAttributeAccessor::AccessorWrapper< std::vector<float> >& acc_ePerSample ATLAS_THREAD_SAFE = + *xAOD::JetAttributeAccessor::accessor< std::vector<float> >(xAOD::JetAttribute::EnergyPerSampling); + static const xAOD::JetAttributeAccessor::AccessorWrapper<xAOD::JetFourMom_t> acc_uncalibrated("JetConstitScaleMomentum"); for(int i = 0; i < 5; i++) { @@ -125,9 +131,6 @@ StatusCode EFMissingETFromJets::execute(xAOD::TrigMissingET *, float scale = 1.; if (m_applyTileGap3Correction) { // get the uncalibrated energy and tile gap 3 fractions - static const xAOD::JetAttributeAccessor::AccessorWrapper< std::vector<float> >& acc_ePerSample = - *xAOD::JetAttributeAccessor::accessor< std::vector<float> >(xAOD::JetAttribute::EnergyPerSampling); - static xAOD::JetAttributeAccessor::AccessorWrapper<xAOD::JetFourMom_t> acc_uncalibrated("JetConstitScaleMomentum"); const std::vector<float>& eInSampling = acc_ePerSample.getAttribute(*aJet); float e_tileGap3 = eInSampling.at(CaloSampling::TileGap3); scale = 1 - e_tileGap3/acc_uncalibrated.getAttribute(*aJet).E(); diff --git a/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromTrackAndClusters.cxx b/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromTrackAndClusters.cxx index 91ba2e45b4258d91807738f006699081dd4f5565..52d0974627ef74583e8fd5ef83504a7e71b67cc2 100644 --- a/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromTrackAndClusters.cxx +++ b/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromTrackAndClusters.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /******************************************************************** @@ -747,7 +747,7 @@ double EFMissingETFromTrackAndClusters::findMinPt(std::vector<fastjet::PseudoJet } // Reweights clusters (when calo isn't split) -void EFMissingETFromTrackAndClusters::RunClusters(std::vector<xAOD::CaloCluster> clust) const +void EFMissingETFromTrackAndClusters::RunClusters(std::vector<xAOD::CaloCluster> clust) { vector<fastjet::PseudoJet> clustPJ; @@ -763,7 +763,7 @@ void EFMissingETFromTrackAndClusters::RunClusters(std::vector<xAOD::CaloCluster> m_minPt = findMinPt(&clustSK); } -void EFMissingETFromTrackAndClusters::RunSplitClusters(std::vector<xAOD::CaloCluster> clust) const +void EFMissingETFromTrackAndClusters::RunSplitClusters(std::vector<xAOD::CaloCluster> clust) { vector<fastjet::PseudoJet> clustPJ_ECal; vector<fastjet::PseudoJet> clustPJ_HCal; diff --git a/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETHelper.cxx b/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETHelper.cxx index e5878666aa47d446854972f889c4b12f11fd87a0..cda3f6640d46ff68e0faa10a0f3a5d0442fc0c08 100644 --- a/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETHelper.cxx +++ b/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETHelper.cxx @@ -66,6 +66,91 @@ std::string TrigEFMissingEtComponent::getFormattedValues(){ return std::string(buff); } +std::string TrigEFMissingEtComponent::ComponentToName(const Component c) +{ + std::string name; + switch(c) + { + // 00-03 LAr barrel + case PreSamplB: name="PreSamplB"; break; + case EMB1: name="EMB1"; break; + case EMB2: name="EMB2"; break; + case EMB3: name="EMB3"; break; + + // 04-07 LAr EM endcap + case PreSamplE: name="PreSamplE"; break; + case EME1: name="EME1"; break; + case EME2: name="EME2"; break; + case EME3: name="EME3"; break; + + // 08-11 Hadronic end cap cal. + case HEC0: name="HEC0"; break; + case HEC1: name="HEC1"; break; + case HEC2: name="HEC2"; break; + case HEC3: name="HEC3"; break; + + // 12-14 Tile barrel + case TileBar0: name="TileBar0"; break; + case TileBar1: name="TileBar1"; break; + case TileBar2: name="TileBar2"; break; + + // 15-17 Tile gap (ITC & scint) + case TileGap1: name="TileGap1"; break; + case TileGap2: name="TileGap2"; break; + case TileGap3: name="TileGap3"; break; + + // 18-20 Tile extended barrel + case TileExt0: name="TileExt0"; break; + case TileExt1: name="TileExt1"; break; + case TileExt2: name="TileExt2"; break; + + // 21-23 Forward cal endcap + case FCalEM: name="FCalEM"; break; + case FCalHad1: name="FCalHad1"; break; + case FCalHad2: name="FCalHad2"; break; + + // 24 Topo. clusters Had + case TCLCW: name="TCLCW"; break; + + // 25-26 pos. and neg. eta barrel + case TCLCWB1: name="TCLCWB1"; break; + case TCLCWB2: name="TCLCWB2"; break; + + // 27-28 pos. and neg. eta endcap + case TCLCWE1: name="TCLCWE1"; break; + case TCLCWE2: name="TCLCWE2"; break; + + // 29 Topo. clusters EM + case TCEM: name="TCEM"; break; + + // 30-31 pos. and neg. eta barrel + case TCEMB1: name="TCEMB1"; break; + case TCEMB2: name="TCEMB2"; break; + + // 32-33 pos. and neg. eta endcap + case TCEME1: name="TCEME1"; break; + case TCEME2: name="TCEME2"; break; + + // 34-38 Jet + case JET: name="JET"; break; + case JETB1: name="JETB1"; break; + case JETB2: name="JETB2"; break; + case JETE1: name="JETE1"; break; + case JETE2: name="JETE2"; break; + + // 39 Topo. cluster Fit + case TCPUC: name="TCPUC"; break; + + // 40 Topo. cluster Fit -- uncorrected + case TCPUCUnc: name="TCPUCUnc"; break; + + // 41 Muons + case Muons: name="Muons"; break; + + default: name="Unknown"; + } + return name; +} ///////////////////////////////////////////////////////////////////// @@ -77,77 +162,12 @@ TrigEFMissingEtHelper::TrigEFMissingEtHelper(unsigned char len){ len>REASONABLE_MAX ? m_elements=REASONABLE_MAX : m_elements=len; m_vecOfComponents.resize(m_elements); - char names[42][10] = { // from CaloSampling::CaloSample, apart from muons - "PreSamplB", "EMB1 ", "EMB2 ", "EMB3 ", // LAr barrel - "PreSamplE", "EME1 ", "EME2 ", "EME3 ", // LAr EM endcap - "HEC0 ", "HEC1 ", "HEC2 ", "HEC3 ", // Hadronic end cap cal. - "TileBar0 ", "TileBar1 ", "TileBar2 ", // Tile barrel - "TileGap1 ", "TileGap2 ", "TileGap3 ", // Tile gap (ITC & scint) - "TileExt0 ", "TileExt1 ", "TileExt2 ", // Tile extended barrel - "FCalEM ", "FCalHad1 ", "FCalHad2 ", // Forward cal endcap - "TCLCW ", // Topo. clusters Had - "TCLCWB1 ", "TCLCWB2 ", // pos. and neg. eta barrel - "TCLCWE1 ", "TCLCWE2 ", // pos. and neg. eta endcap - "TCEM ", // Topo. clusters EM - "TCEMB1 ", "TCEMB2 ", // pos. and neg. eta barrel - "TCEME1 ", "TCEME2 ", // pos. and neg. eta endcap - "JET ", // Jet - "JETB1 ", "JETB2 ", // - "JETE1 ", "JETE2 ", // - "TCPUC ", // Topo. cluster Fit - "TCPUCUnc ", // Topo. cluster Fit -- uncorrected - "Muons " // Muons - }; - // calibration: constant term, MeV - float c0[42] = { 0.0, 0.0, 0.0, 0.0, // LAr barrel - 0.0, 0.0, 0.0, 0.0, // LAr EM endcap - 0.0, 0.0, 0.0, 0.0, // Hadronic end cap cal. - 0.0, 0.0, 0.0, // Tile barrel - 0.0, 0.0, 0.0, // Tile gap (ITC & scint) - 0.0, 0.0, 0.0, // Tile extended barrel - 0.0, // FCal EM - 0.0, 0.0, // FCal Had - 0.0, // Topo. clusters EM - 0.0, 0.0, // - 0.0, 0.0, // - 0.0, // Topo. clusters Had - 0.0, 0.0, // - 0.0, 0.0, // - 0.0, // Jet - 0.0, 0.0, // - 0.0, 0.0, // - 0.0, // Topo. cluster Fit - 0.0, // Topo. cluster Fit -- uncorrected - 0.0 // Muons - }; - // calibration: linear term (slope) - float c1[42] = { 1.0, 1.0, 1.0, 1.0, // LAr barrel - 1.0, 1.0, 1.0, 1.0, // LAr EM endcap - 1.0, 1.0, 1.0, 1.0, // Hadronic end cap cal. - 1.0, 1.0, 1.0, // Tile barrel - 1.0, 1.0, 1.0, // Tile gap (ITC & scint) - 1.0, 1.0, 1.0, // Tile extended barrel - 1.0, // FCal EM - 1.0, 1.0, // FCal Had - 1.0, // Topo. clusters EM - 1.0, 1.0, // - 1.0, 1.0, // - 1.0, // Topo. clusters Had - 1.0, 1.0, // - 1.0, 1.0, // - 1.0, // Jet - 1.0, 1.0, // - 1.0, 1.0, // - 1.0, // Topo. cluster Fit - 1.0, // Topo. cluster Fit -- uncorrected - 1.0 // Muons - }; - + // Initialize component names and calibration constants (c0, c1) = (0, 1) for (unsigned char i=0; i<m_elements; ++i){ if(m_elements==42){ // finest granularity - std::snprintf(m_vecOfComponents[i].m_name,10, "%s", names[i]); - m_vecOfComponents[i].m_calib0 = c0[i]; - m_vecOfComponents[i].m_calib1 = c1[i]; + std::snprintf(m_vecOfComponents[i].m_name,10, "%s", TrigEFMissingEtComponent::ComponentToName(i).c_str()); + m_vecOfComponents[i].m_calib0 = 0.0; + m_vecOfComponents[i].m_calib1 = 1.0; } else { std::snprintf(m_vecOfComponents[i].m_name,10, "comp%03d ", i); m_vecOfComponents[i].m_calib0 = 0; @@ -174,12 +194,12 @@ void TrigEFMissingEtHelper::Reset(){ //--- - TrigEFMissingEtComponent* TrigEFMissingEtHelper::GetComponent(unsigned char c){ - if (c<m_elements) - return &(m_vecOfComponents[c]); - else - return 0; - } +TrigEFMissingEtComponent* TrigEFMissingEtHelper::GetComponent(unsigned char c){ + if (c<m_elements) + return &(m_vecOfComponents[c]); + else + return 0; +} //--- diff --git a/Trigger/TrigAlgorithms/TrigEgammaRec/CMakeLists.txt b/Trigger/TrigAlgorithms/TrigEgammaRec/CMakeLists.txt index 27eefb6b34e88e81bf86392d18bd9477b40b47a5..13a3ced0d6e4dc30959224e2d00fb35bc8e9fd3a 100644 --- a/Trigger/TrigAlgorithms/TrigEgammaRec/CMakeLists.txt +++ b/Trigger/TrigAlgorithms/TrigEgammaRec/CMakeLists.txt @@ -20,12 +20,14 @@ atlas_depends_on_subdirs( PUBLIC Trigger/TrigSteer/TrigInterfaces PRIVATE Calorimeter/CaloEvent + Calorimeter/CaloUtils Event/xAOD/xAODCaloEvent Event/xAOD/xAODEgammaCnv Event/xAOD/xAODEventShape Event/xAOD/xAODTracking PhysicsAnalysis/Interfaces/EgammaAnalysisInterfaces Reconstruction/egamma/egammaEvent + Reconstruction/egamma/egammaUtils Trigger/TrigTools/TrigTimeAlgs ) # External dependencies: @@ -36,13 +38,13 @@ atlas_add_library( TrigEgammaRecLib src/*.cxx PUBLIC_HEADERS TrigEgammaRec PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES xAODEgamma xAODPrimitives GaudiKernel RecoToolInterfaces egammaRecEvent TrigCaloEvent TrigParticle TrigSteeringEvent LumiBlockCompsLib TrigInterfacesLib EgammaAnalysisInterfacesLib TrigTimeAlgsLib - PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} CaloEvent xAODCaloEvent xAODEventShape xAODTracking egammaEvent ) + LINK_LIBRARIES xAODEgamma xAODPrimitives GaudiKernel CaloUtilsLib RecoToolInterfaces egammaRecEvent TrigCaloEvent TrigParticle TrigSteeringEvent LumiBlockCompsLib TrigInterfacesLib EgammaAnalysisInterfacesLib TrigTimeAlgsLib + PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} CaloEvent xAODCaloEvent xAODEventShape xAODTracking egammaEvent egammaUtils) atlas_add_component( TrigEgammaRec src/components/*.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} xAODEgamma xAODPrimitives GaudiKernel LumiBlockCompsLib RecoToolInterfaces egammaRecEvent TrigCaloEvent TrigParticle TrigSteeringEvent TrigInterfacesLib CaloEvent xAODCaloEvent xAODEventShape xAODTracking EgammaAnalysisInterfacesLib egammaEvent TrigTimeAlgsLib TrigEgammaRecLib ) + LINK_LIBRARIES ${ROOT_LIBRARIES} xAODEgamma xAODPrimitives GaudiKernel CaloUtilsLib LumiBlockCompsLib RecoToolInterfaces egammaRecEvent TrigCaloEvent TrigParticle TrigSteeringEvent TrigInterfacesLib CaloEvent xAODCaloEvent xAODEventShape xAODTracking EgammaAnalysisInterfacesLib egammaEvent egammaUtils TrigTimeAlgsLib TrigEgammaRecLib ) # Install files from the package: atlas_install_python_modules( python/*.py ) diff --git a/Trigger/TrigAlgorithms/TrigEgammaRec/TrigEgammaRec/TrigEgammaRec.h b/Trigger/TrigAlgorithms/TrigEgammaRec/TrigEgammaRec/TrigEgammaRec.h index 5e86e07598dd278d6be45ca9247fa04215c94d38..1a049aed5d7b1b4bdce74615a3246925d7259784 100755 --- a/Trigger/TrigAlgorithms/TrigEgammaRec/TrigEgammaRec/TrigEgammaRec.h +++ b/Trigger/TrigAlgorithms/TrigEgammaRec/TrigEgammaRec/TrigEgammaRec.h @@ -86,6 +86,8 @@ private: ToolHandle<IEMTrackMatchBuilder> m_trackMatchBuilder; ToolHandle<IEMConversionBuilder> m_conversionBuilder; + + ToolHandle<IEMShowerBuilder> m_showerBuilder; // trigger specific ToolHandle<IEMFourMomBuilder> m_fourMomBuilder; // trigger specific ToolHandle<IEGammaAmbiguityTool> m_ambiguityTool; @@ -112,12 +114,13 @@ private: ToolHandle<ILumiBlockMuTool> m_lumiBlockMuTool; // booleans to run specific parts of offline reconstruction bool m_doConversions; + bool m_doBremCollection; bool m_doTrackMatching; bool m_doTrackIsolation; bool m_doCaloCellIsolation; bool m_doTopoIsolation; bool m_useBremAssoc; - + // Allows delete EgammaRecContainer *m_eg_container; // needed for monitoring to work diff --git a/Trigger/TrigAlgorithms/TrigEgammaRec/python/TrigEgammaRecConfig.py b/Trigger/TrigAlgorithms/TrigEgammaRec/python/TrigEgammaRecConfig.py index 40a003b5ac769727addd93030118bfd6afaaa42d..1721caa5a02a8f94876f727f7900c43b6005f5d8 100755 --- a/Trigger/TrigAlgorithms/TrigEgammaRec/python/TrigEgammaRecConfig.py +++ b/Trigger/TrigAlgorithms/TrigEgammaRec/python/TrigEgammaRecConfig.py @@ -56,7 +56,7 @@ TrigEgammaRec = Factory(TrigEgammaRecConf.TrigEgammaRec, name="TrigEgammaRec",do # Tools with non-default configuration TrackMatchBuilderTool = TrigEMTrackMatchBuilder, ShowerBuilderTool = TrigEMShowerBuilder, - + # Set the isolation tools TrackIsolationTool = TrigTrackIsolationTool, CaloCellIsolationTool = TrigCaloIsolationTool, @@ -75,7 +75,6 @@ TrigEgammaRec = Factory(TrigEgammaRecConf.TrigEgammaRec, name="TrigEgammaRec",do PhotonPIDBuilder = TrigPhotonPIDBuilder, # Tools with default configuration -# VertexBuilderTool = EMVertexBuilder, ConversionBuilderTool = EMConversionBuilder.copyPublic("TrigEMConversionBuilder"), AmbiguityTool = EGammaAmbiguityTool.copyPublic("TrigEGammaAmbiguityTool"), FourMomBuilderTool = EMFourMomBuilder.copyPublic("TrigEMFourMomBuilder"), @@ -88,3 +87,4 @@ TrigEgammaRec = Factory(TrigEgammaRecConf.TrigEgammaRec, name="TrigEgammaRec",do postInit = [configureTrigEgammaMonitoring], ) + diff --git a/Trigger/TrigAlgorithms/TrigEgammaRec/python/TrigEgammaToolFactories.py b/Trigger/TrigAlgorithms/TrigEgammaRec/python/TrigEgammaToolFactories.py index befd1e2ce4be958d9ec77d59a054e417441f498c..723459a24f27d63f24a66dace1fe31e23edd7bfc 100644 --- a/Trigger/TrigAlgorithms/TrigEgammaRec/python/TrigEgammaToolFactories.py +++ b/Trigger/TrigAlgorithms/TrigEgammaRec/python/TrigEgammaToolFactories.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- # vim:fenc=utf-8 # -# Copyright @2016 Ryan Mackenzie White <ryan.white@cern.ch> +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration # """ @@ -36,9 +36,11 @@ PhotonPidTools() # Following tools have TrigEgamma factories from egammaTools.egammaToolsFactories import EMTrackMatchBuilder, EMFourMomBuilder, EMShowerBuilder +from egammaTools import egammaToolsConf from egammaTools.egammaToolsConf import EMPIDBuilder from CaloClusterCorrection import CaloClusterCorrectionConf as Cccc +from egammaTrackTools.egammaTrackToolsFactories import EMExtrapolationTools TrigCaloFillRectangularCluster = PublicToolFactory( Cccc.CaloFillRectangularCluster, name = "trigegamma_CaloFillRectangularCluster", eta_size = 5, @@ -118,8 +120,14 @@ TrigEMExtrapolationTools=EMExtrapolationTools.copyPublic(name="TrigEMExtrapolati useCaching=False) +def appendtoTrigEMTrackMatchBuilder(tool): + "add track to calo tool " + if not hasattr(tool,"EMExtrapolationTools"): + tool += EMExtrapolationTools() + TrigEMTrackMatchBuilder = EMTrackMatchBuilder.copyPublic( name = "TrigEMTrackMatchBuilder", + postInit=[appendtoTrigEMTrackMatchBuilder], broadDeltaEta = 0.2, #For offline 0.1 broadDeltaPhi = 0.2, #For offline 0.15 useScoring = False, @@ -134,10 +142,13 @@ TrigEMShowerBuilder = EMShowerBuilder.copyPublic( ) from TriggerMenu.egamma.EgammaSliceFlags import EgammaSliceFlags +from egammaMVACalib.TrigEgammaMVACalibFactories import TrigElectronMVATool, TrigPhotonMVATool + mlog.info("MVA version version %s"%EgammaSliceFlags.calibMVAVersion() ) mlog.info("Cluster Correction version %s"%EgammaSliceFlags.clusterCorrectionVersion() ) EgammaSliceFlags.calibMVAVersion.set_On() + from TrigCaloRec.TrigCaloRecConf import TrigCaloClusterMaker def configureTrigCaloClusterMonitoring(tool): @@ -163,7 +174,6 @@ def configureClusterBuilder(slwAlg): eta_Duplicate = 5, phi_Duplicate = 5 ) - #mlog.info("TrigCaloClusterMaker adding slw tool %s"%trigslw.getFullName()) slwAlg += trigslw slwAlg.ClusterMakerTools=[ trigslw.getFullName() ] @@ -178,7 +188,6 @@ def configureClusterCorrections(slwAlg): if hasattr(slwAlg,clName): continue for tool in make_CaloSwCorrections (cl,version=EgammaSliceFlags.clusterCorrectionVersion()): - #mlog.info("Correction tool %s"%tool.getFullName()) slwAlg += tool slwAlg.ClusterCorrectionTools += [tool.getFullName()] diff --git a/Trigger/TrigAlgorithms/TrigEgammaRec/python/TrigEgammaTrackTools.py b/Trigger/TrigAlgorithms/TrigEgammaRec/python/TrigEgammaTrackTools.py new file mode 100644 index 0000000000000000000000000000000000000000..a5fe6863b36d92a8977f798b8746d99579ff985b --- /dev/null +++ b/Trigger/TrigAlgorithms/TrigEgammaRec/python/TrigEgammaTrackTools.py @@ -0,0 +1,112 @@ +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + +from AthenaCommon.AppMgr import ServiceMgr as svcMgr, ToolSvc + +from SiClusterOnTrackTool.SiClusterOnTrackToolConf import InDet__PixelClusterOnTrackTool +egTrigPixelClusterOnTrackTool = InDet__PixelClusterOnTrackTool("egTrigPixelClusterOnTrackTool", + DisableDistortions = False, + applyNNcorrection = False) +ToolSvc += egTrigPixelClusterOnTrackTool + +from SiClusterOnTrackTool.SiClusterOnTrackToolConf import InDet__SCT_ClusterOnTrackTool +egTrigSCT_ClusterOnTrackTool = InDet__SCT_ClusterOnTrackTool ("egTrigSCT_ClusterOnTrackTool", + CorrectionStrategy = 0, # do correct position bias + ErrorStrategy = 2) # do use phi dependent errors +ToolSvc += egTrigSCT_ClusterOnTrackTool + + + +from TrkRIO_OnTrackCreator.TrkRIO_OnTrackCreatorConf import Trk__RIO_OnTrackCreator +egTrigRotCreator = Trk__RIO_OnTrackCreator(name = 'egTrigRotCreator', + ToolPixelCluster = egTrigPixelClusterOnTrackTool, + ToolSCT_Cluster = egTrigSCT_ClusterOnTrackTool, + Mode = 'indet') +ToolSvc += egTrigRotCreator + + +from TrkDetDescrSvc.AtlasTrackingGeometrySvc import AtlasTrackingGeometrySvc + +from TrkExRungeKuttaPropagator.TrkExRungeKuttaPropagatorConf import Trk__RungeKuttaPropagator as Propagator +egTrigTrkPropagator = Propagator(name = 'egTrigTrkPropagator') +egTrigTrkPropagator.AccuracyParameter = 0.0001 +ToolSvc += egTrigTrkPropagator + +from TrkExSTEP_Propagator.TrkExSTEP_PropagatorConf import Trk__STEP_Propagator as StepPropagator +egTrigTrkStepPropagator = StepPropagator(name = 'egTrigTrkStepPropagator') +ToolSvc += egTrigTrkStepPropagator + +from TrkExTools.TrkExToolsConf import Trk__Navigator +egTrigTrkNavigator = Trk__Navigator(name = 'egTrigTrkNavigator') +ToolSvc += egTrigTrkNavigator + +from TrkExTools.TrkExToolsConf import Trk__MaterialEffectsUpdator +egTrigTrkMaterialUpdator = Trk__MaterialEffectsUpdator(name = "egTrigTrkMaterialEffectsUpdator") +ToolSvc += egTrigTrkMaterialUpdator + +egTrigTrkSubPropagators = [] +egTrigTrkSubUpdators = [] +# -------------------- set it depending on the geometry ---------------------------------------------------- +# default for ID is (Rk,Mat) +egTrigTrkSubPropagators += [ egTrigTrkPropagator.name() ] +egTrigTrkSubUpdators += [ egTrigTrkMaterialUpdator.name() ] +# default for Calo is (Rk,MatLandau) +egTrigTrkSubPropagators += [ egTrigTrkPropagator.name() ] +egTrigTrkSubUpdators += [ egTrigTrkMaterialUpdator.name() ] +# default for MS is (STEP,Mat) +egTrigTrkSubPropagators += [ egTrigTrkStepPropagator.name() ] +egTrigTrkSubUpdators += [ egTrigTrkMaterialUpdator.name() ] +# ---------------------------------------------------------------------------------------------------------- + +from TrkExTools.TrkExToolsConf import Trk__Extrapolator +egTrigTrkExtrapolator = Trk__Extrapolator(name = 'egTrigTrkExtrapolator', + Propagators = [ egTrigTrkPropagator, egTrigTrkStepPropagator ], + MaterialEffectsUpdators = [ egTrigTrkMaterialUpdator ], + Navigator = egTrigTrkNavigator, + SubPropagators = egTrigTrkSubPropagators, + SubMEUpdators = egTrigTrkSubUpdators) +ToolSvc += egTrigTrkExtrapolator + + +# Set up the GSF +from TrkGaussianSumFilter.TrkGaussianSumFilterConf import Trk__GsfMaterialMixtureConvolution +GSFTrigMaterialUpdator = Trk__GsfMaterialMixtureConvolution (name = 'GSFTrigMaterialUpdator') +ToolSvc += GSFTrigMaterialUpdator +# component Reduction +from TrkGaussianSumFilter.TrkGaussianSumFilterConf import Trk__QuickCloseComponentsMultiStateMerger +GSFTrigComponentReduction = Trk__QuickCloseComponentsMultiStateMerger (name = 'GSFTrigComponentReduction', + MaximumNumberOfComponents = 12) +ToolSvc += GSFTrigComponentReduction + +from TrkMeasurementUpdator.TrkMeasurementUpdatorConf import Trk__KalmanUpdator as ConfiguredKalmanUpdator +egTrigTrkUpdator = ConfiguredKalmanUpdator('egTrigTrkUpdator') +ToolSvc += egTrigTrkUpdator + +from TrkGaussianSumFilter.TrkGaussianSumFilterConf import Trk__GsfMeasurementUpdator +GSFTrigMeasurementUpdator = Trk__GsfMeasurementUpdator( name = 'GSFTrigMeasurementUpdator', + Updator = egTrigTrkUpdator ) +ToolSvc += GSFTrigMeasurementUpdator + +from TrkGaussianSumFilter.TrkGaussianSumFilterConf import Trk__GsfExtrapolator +GSFTrigExtrapolator = Trk__GsfExtrapolator(name = 'GSFTrigExtrapolator', + Propagators = [ egTrigTrkPropagator ], + SearchLevelClosestParameters = 10, + StickyConfiguration = True, + Navigator = egTrigTrkNavigator, + GsfMaterialConvolution = GSFTrigMaterialUpdator, + ComponentMerger = GSFTrigComponentReduction, + SurfaceBasedMaterialEffects = False ) +ToolSvc += GSFTrigExtrapolator + + +from TrkGaussianSumFilter.TrkGaussianSumFilterConf import Trk__GaussianSumFitter +GSFTrigTrackFitter = Trk__GaussianSumFitter(name = 'GSFTrigTrackFitter', + ToolForExtrapolation = GSFTrigExtrapolator, + MeasurementUpdatorType = GSFTrigMeasurementUpdator, + ReintegrateOutliers = True, + MakePerigee = True, + RefitOnMeasurementBase = True, + DoHitSorting = True, + ValidationMode = False, + ToolForROTCreation = egTrigRotCreator) +# --- end of fitter loading +ToolSvc += GSFTrigTrackFitter diff --git a/Trigger/TrigAlgorithms/TrigEgammaRec/src/TrigEgammaRec.cxx b/Trigger/TrigAlgorithms/TrigEgammaRec/src/TrigEgammaRec.cxx index 578aa0d87c3fe76507b6c895674f1528e8b1f85a..8b95163cef42217d4667e2e1e546c1264740c7e8 100755 --- a/Trigger/TrigAlgorithms/TrigEgammaRec/src/TrigEgammaRec.cxx +++ b/Trigger/TrigAlgorithms/TrigEgammaRec/src/TrigEgammaRec.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /******************************************************************** @@ -146,6 +146,8 @@ TrigEgammaRec::TrigEgammaRec(const std::string& name,ISvcLocator* pSvcLocator): declareProperty("doTrackMatching",m_doTrackMatching = false, "run TrackMatchBuilder"); // Set flag for conversions declareProperty("doConversions",m_doConversions = false, "run ConversionBuilder"); + /** @brief run GSF refit */ + declareProperty("doBremCollection", m_doBremCollection = false, "run BremCollection"); // Monitoring typedef const DataVector<xAOD::Electron> xAODElectronDV_type; @@ -469,59 +471,59 @@ HLT::ErrorCode TrigEgammaRec::hltInitialize() { if (runIsoType.find(flavName) == runIsoType.end()) runIsoType.insert(flavName); } - // /** @brief Retrieve IsolationTools based on IsoTypes configured */ - // // BROKEN! WORTH FIXING, OR IS THIS FILE NOW OBSOLETE - // if(m_doTrackIsolation){ - // if (!m_trackIsolationTool.empty() && runIsoType.find("ptcone") != runIsoType.end()){ - // ATH_MSG_DEBUG("Retrieve TrackIsolationTool"); - - // if(m_trackIsolationTool.retrieve().isFailure()){ - // ATH_MSG_ERROR("Unable to retrieve " << m_trackIsolationTool); - // return HLT::BAD_JOB_SETUP; - // } - // else { - // ATH_MSG_DEBUG("Retrieved Tool "<<m_trackIsolationTool); - // if (timerSvc()) m_timerIsoTool1 = addTimer("TrackIsolationTool"); - // } - // } - // } else { - m_trackIsolationTool.disable(); - // } - - // if(m_doCaloCellIsolation){ - // if (!m_caloCellIsolationTool.empty() && runIsoType.find("etcone") != runIsoType.end()) { - // ATH_MSG_DEBUG("Retrieve CaloIsolationTool is empty"); - // if(m_caloCellIsolationTool.retrieve().isFailure()){ - // ATH_MSG_ERROR("Unable to retrieve " << m_caloCellIsolationTool); - // return HLT::BAD_JOB_SETUP; - // } - // else { - // ATH_MSG_DEBUG("Retrieved Tool "<<m_caloCellIsolationTool); - // if (timerSvc()) m_timerIsoTool2 = addTimer("CaloCellIsolationTool"); - // } - // } else { - // m_caloCellIsolationTool.disable(); - // } - // } else { - m_caloCellIsolationTool.disable(); - // } - // if(m_doTopoIsolation){ - // if (!m_topoIsolationTool.empty() && runIsoType.find("topoetcone") != runIsoType.end()) { - // ATH_MSG_DEBUG("Retrieve TopoIsolationTool is empty"); - // if(m_topoIsolationTool.retrieve().isFailure()){ - // ATH_MSG_ERROR("Unable to retrieve " << m_topoIsolationTool); - // return HLT::BAD_JOB_SETUP; - // } - // else { - // ATH_MSG_DEBUG("Retrieved Tool "<<m_topoIsolationTool); - // if (timerSvc()) m_timerIsoTool3 = addTimer("topoIsolationTool"); - // } - // } else { - // m_topoIsolationTool.disable(); - // } - // } else { - m_topoIsolationTool.disable(); - // } + /** @brief Retrieve IsolationTools based on IsoTypes configured */ + if(m_doTrackIsolation){ + if (!m_trackIsolationTool.empty() && runIsoType.find("ptcone") != runIsoType.end()){ + ATH_MSG_DEBUG("Retrieve TrackIsolationTool"); + + if(m_trackIsolationTool.retrieve().isFailure()){ + ATH_MSG_ERROR("Unable to retrieve " << m_trackIsolationTool); + return HLT::BAD_JOB_SETUP; + } + else { + ATH_MSG_DEBUG("Retrieved Tool "<<m_trackIsolationTool); + if (timerSvc()) m_timerIsoTool1 = addTimer("TrackIsolationTool"); + } + } + } else { + m_trackIsolationTool.disable(); + } + + if(m_doCaloCellIsolation){ + if (!m_caloCellIsolationTool.empty() && runIsoType.find("etcone") != runIsoType.end()) { + ATH_MSG_DEBUG("Retrieve CaloIsolationTool is empty"); + if(m_caloCellIsolationTool.retrieve().isFailure()){ + ATH_MSG_ERROR("Unable to retrieve " << m_caloCellIsolationTool); + return HLT::BAD_JOB_SETUP; + } + else { + ATH_MSG_DEBUG("Retrieved Tool "<<m_caloCellIsolationTool); + if (timerSvc()) m_timerIsoTool2 = addTimer("CaloCellIsolationTool"); + } + } else { + m_caloCellIsolationTool.disable(); + } + } else { + m_caloCellIsolationTool.disable(); + } + if(m_doTopoIsolation){ + if (!m_topoIsolationTool.empty() && runIsoType.find("topoetcone") != runIsoType.end()) { + ATH_MSG_DEBUG("Retrieve TopoIsolationTool is empty"); + if(m_topoIsolationTool.retrieve().isFailure()){ + ATH_MSG_ERROR("Unable to retrieve " << m_topoIsolationTool); + return HLT::BAD_JOB_SETUP; + } + else { + ATH_MSG_DEBUG("Retrieved Tool "<<m_topoIsolationTool); + if (timerSvc()) m_timerIsoTool3 = addTimer("topoIsolationTool"); + } + } else { + m_topoIsolationTool.disable(); + } + } else { + m_topoIsolationTool.disable(); + } + // <-- //print summary info ATH_MSG_INFO("REGTEST: xAOD Reconstruction for Run2" ); ATH_MSG_INFO("REGTEST: Initialization completed successfully, tools initialized: " ); @@ -546,6 +548,7 @@ HLT::ErrorCode TrigEgammaRec::hltInitialize() { ATH_MSG_DEBUG("REGTEST: Do Track Isolation: " << m_doTrackIsolation); ATH_MSG_DEBUG("REGTEST: Do CaloCell Isolation: "<< m_doCaloCellIsolation); ATH_MSG_DEBUG("REGTEST: Do TopoIsolation: " << m_doTopoIsolation); + ATH_MSG_DEBUG("REGTEST: run bremBuilding: " << m_doBremCollection); ATH_MSG_DEBUG("REGTEST: Use BremAssoc: " << m_useBremAssoc); ATH_MSG_INFO("REGTEST: ElectronContainerName: " << m_electronContainerName ); @@ -635,28 +638,30 @@ HLT::ErrorCode TrigEgammaRec::hltExecute( const HLT::TriggerElement* inputTE, } - // bool topoClusTrue = false; - // std::vector<const xAOD::CaloClusterContainer*> vectorClusterContainerTopo; - // if(m_doTopoIsolation){ - // stat = getFeatures(inputTE, vectorClusterContainerTopo,m_topoClusterContName); + bool topoClusTrue = false; + std::vector<const xAOD::CaloClusterContainer*> vectorClusterContainerTopo; + if(m_doTopoIsolation){ + stat = getFeatures(inputTE, vectorClusterContainerTopo,m_topoClusterContName); - // if ( stat!= HLT::OK ) { - // ATH_MSG_ERROR(" REGTEST: No CaloTopoClusterContainers retrieved for the trigger element"); - // //return HLT::OK; // If you did not get it, it is not a problem, continue! - // } + // -> From here is broken? + if ( stat!= HLT::OK ) { + ATH_MSG_ERROR(" REGTEST: No CaloTopoClusterContainers retrieved for the trigger element"); + //return HLT::OK; // If you did not get it, it is not a problem, continue! + } - // //debug message - // if ( msgLvl() <= MSG::VERBOSE){ - // msg() << MSG::VERBOSE << " REGTEST: Got " << vectorClusterContainerTopo.size() - // << " CaloCTopoclusterContainers associated to the TE " << endmsg; - // } - // // Get the last ClusterContainer - // if ( !vectorClusterContainerTopo.empty() ) { - // const xAOD::CaloClusterContainer* clusContainerTopo = vectorClusterContainerTopo.back(); - // if (clusContainerTopo->size() > 0) topoClusTrue = true; - // ATH_MSG_DEBUG("REGTEST: Number of topo containers : " << clusContainerTopo->size()); - // } // vector of Cluster Container empty?! - // } + //debug message + if ( msgLvl() <= MSG::VERBOSE){ + msg() << MSG::VERBOSE << " REGTEST: Got " << vectorClusterContainerTopo.size() + << " CaloCTopoclusterContainers associated to the TE " << endmsg; + } + // Get the last ClusterContainer + if ( !vectorClusterContainerTopo.empty() ) { + const xAOD::CaloClusterContainer* clusContainerTopo = vectorClusterContainerTopo.back(); + if (clusContainerTopo->size() > 0) topoClusTrue = true; + ATH_MSG_DEBUG("REGTEST: Number of topo containers : " << clusContainerTopo->size()); + } // vector of Cluster Container empty?! + } + // <-- up to here if(msgLvl() <= MSG::DEBUG) msg() << MSG::DEBUG @@ -672,6 +677,7 @@ HLT::ErrorCode TrigEgammaRec::hltExecute( const HLT::TriggerElement* inputTE, std::string electronContSGKey=""; std::string electronKey=""; HLT::ErrorCode sc = getUniqueKey( m_electron_container, electronContSGKey, electronKey); + ATH_MSG_DEBUG("The electron container SG key created is: " << electronContSGKey); if (sc != HLT::OK) { msg() << MSG::DEBUG << "Could not retrieve the electron container key" << endmsg; return sc; @@ -700,7 +706,7 @@ HLT::ErrorCode TrigEgammaRec::hltExecute( const HLT::TriggerElement* inputTE, // Shower Shape & CaloCellContainer const CaloCellContainer* pCaloCellContainer = 0; - //const xAOD::CaloClusterContainer* pTopoClusterContainer = 0; + const xAOD::CaloClusterContainer* pTopoClusterContainer = 0; // Get vector of pointers to all CaloCellContainers from TE std::string clusCollKey=""; @@ -748,7 +754,57 @@ HLT::ErrorCode TrigEgammaRec::hltExecute( const HLT::TriggerElement* inputTE, if ( msgLvl() <= MSG::VERBOSE) msg() << MSG::VERBOSE << "Running m_showerBuilder: " << m_showerBuilder << endmsg; } //pCaloCellContainer } - //if(topoClusTrue) pTopoClusterContainer = vectorClusterContainerTopo.back(); + if(topoClusTrue) pTopoClusterContainer = vectorClusterContainerTopo.back(); + } + + + //******************************************************************************** + xAOD::TrackParticleContainer *GSFTrigTrackParticles = new xAOD::TrackParticleContainer(); + if (m_doBremCollection){ + + ATH_MSG_DEBUG("In m_doBremCollection"); + ATH_MSG_DEBUG(" REGTEST: Got " << vectorClusterContainer.size() << " CaloClusterContainers associated to the TE "); + if (vectorClusterContainer.size() != 1){ + ATH_MSG_ERROR("REGTEST: Size of vectorClusterContainer is not 1, it is: "<< vectorClusterContainer.size()); + return HLT::NAV_ERROR; + } + + // Get the last ClusterContainer + const xAOD::CaloClusterContainer* clusContainer = vectorClusterContainer.back(); + if(!clusContainer){ + return HLT::OK; + } + + ATH_MSG_DEBUG (clusContainer->size() << " calo clusters in container"); + + + std::vector<const xAOD::TrackParticleContainer*> vectorTrackParticleContainer; + stat = getFeatures(inputTE, vectorTrackParticleContainer); + + if (stat != HLT::OK) { + ATH_MSG_DEBUG(" REGTEST: no TrackParticleContainer from TE, m_doBremCollection "); + return HLT::NAV_ERROR; + } + + const xAOD::TrackParticleContainer *tracks = vectorTrackParticleContainer.back(); + if (!tracks || tracks->size()<1){ + return HLT::OK; + } + for (const xAOD::TrackParticle *trk:*tracks) { + ATH_MSG_DEBUG("track pt is: " << trk->pt()); + } + + + + for (const xAOD::TrackParticle *trk:*GSFTrigTrackParticles) { + ATH_MSG_DEBUG("GSFTrigTrackParticles pt is: " << trk->pt()); + } + + if (HLT::OK != attachFeature( outputTE, GSFTrigTrackParticles, "GSFTrigTrackParticles") ){ + ATH_MSG_ERROR("REGTEST: trigger xAOD::TrackParticleContainer for GSF attach to TE and record into StoreGate failed"); + return HLT::NAV_ERROR; + } + } //********************************************************************** @@ -775,8 +831,11 @@ HLT::ErrorCode TrigEgammaRec::hltExecute( const HLT::TriggerElement* inputTE, << " REGTEST: empty TrackParticleContainer from TE, m_trackMatchBuilder: " << m_trackMatchBuilder << endmsg; } else { - // Get the pointer to last TrackParticleContainer - pTrackParticleContainer = vectorTrackParticleContainer.back(); + // Get the pointer to last TrackParticleContainer + if(m_doBremCollection){ + pTrackParticleContainer = GSFTrigTrackParticles; + } + else pTrackParticleContainer = vectorTrackParticleContainer.back(); m_doTrackMatching = true; if(!pTrackParticleContainer){ m_doTrackMatching = false; @@ -796,6 +855,7 @@ HLT::ErrorCode TrigEgammaRec::hltExecute( const HLT::TriggerElement* inputTE, float leadTrkpt=0.0; const xAOD::TrackParticle *leadTrk=NULL; for (const xAOD::TrackParticle *trk:*pTrackParticleContainer) { + ATH_MSG_DEBUG("In track matching, track pt: " << trk->pt()); if(trk->pt() > leadTrkpt) { leadTrkpt = trk->pt(); leadTrk=trk; @@ -894,7 +954,10 @@ HLT::ErrorCode TrigEgammaRec::hltExecute( const HLT::TriggerElement* inputTE, } ElementLinkVector<xAOD::TrackParticleContainer> trackLinks; - stat=getFeaturesLinks< xAOD::TrackParticleContainer, xAOD::TrackParticleContainer > (inputTE, trackLinks, ""); + if(m_doBremCollection){ + stat=getFeaturesLinks< xAOD::TrackParticleContainer, xAOD::TrackParticleContainer > (outputTE, trackLinks, ""); + } + else stat=getFeaturesLinks< xAOD::TrackParticleContainer, xAOD::TrackParticleContainer > (inputTE, trackLinks, ""); if ( stat != HLT::OK ) { ATH_MSG_ERROR("REGTEST: No TrackParticleLinks retrieved for the trigger element"); //May need to add ERROR codes for online debugging @@ -1082,53 +1145,61 @@ HLT::ErrorCode TrigEgammaRec::hltExecute( const HLT::TriggerElement* inputTE, // Isolation // // Calo Isolation types - - // THIS IS NOW BROKEN. IS IT WORTH FIXING, OR WILL THIS BECOME OBSOLETE IN 22.0? - - // if(m_doCaloCellIsolation || m_doTopoIsolation){ - // if (timerSvc()) m_timerIsoTool2->start(); //timer - // std::map<std::string,CaloIsoHelp>::iterator itc = m_egCaloIso.begin(), itcE = m_egCaloIso.end(); - // for (; itc != itcE; itc++) { - // CaloIsoHelp isoH = itc->second; - // std::string flav = itc->first; - // bool bsc = false; - // if (flav == "etcone" && pCaloCellContainer) - // bsc = m_caloCellIsolationTool->decorateParticle_caloCellIso(*eg, isoH.help.isoTypes, isoH.CorrList, pCaloCellContainer); - // /*else if (flav == "topoetcone" ) - // // Add check for topoclusters (when available); - // //bsc = m_topoIsolationTool->decorateParticle_topoClusterIso(*eg, isoH.help.isoTypes, isoH.CorrList, pTopoClusterContainer);*/ - // if (!bsc && flav=="etcone") - // ATH_MSG_WARNING("Call to CaloIsolationTool failed for flavour " << flav); - // } - // ATH_MSG_DEBUG(" REGTEST: etcone20 = " << getIsolation_etcone20(eg)); - // ATH_MSG_DEBUG(" REGTEST: etcone30 = " << getIsolation_etcone30(eg)); - // ATH_MSG_DEBUG(" REGTEST: etcone40 = " << getIsolation_etcone40(eg)); - // if (timerSvc()) m_timerIsoTool2->stop(); //timer - // } - // if(m_doTrackIsolation){ - // ATH_MSG_DEBUG("Running TrackIsolationTool for Electrons"); - - // if (timerSvc()) m_timerIsoTool1->start(); //timer - // if(m_egTrackIso.size() != 0) { - // // Track Isolation types - // std::map<std::string,TrackIsoHelp>::iterator itt = m_egTrackIso.begin(), ittE = m_egTrackIso.end(); - // for (; itt != ittE; itt++) { - // TrackIsoHelp isoH = itt->second; - // std::string flav = itt->first; - // const std::set<const xAOD::TrackParticle*> tracksToExclude = xAOD::EgammaHelpers::getTrackParticles(eg, m_useBremAssoc); // For GSF this may need to be property - // // Need the decorate methods from IsolationTool - // bool bsc = m_trackIsolationTool->decorateParticle(*eg, isoH.help.isoTypes, isoH.CorrList, &leadTrkVtx, &tracksToExclude,pTrackParticleContainer); - // if (!bsc) - // ATH_MSG_WARNING("Call to TrackIsolationTool failed for flavour " << flav); - // } - // ATH_MSG_DEBUG(" REGTEST: ptcone20 = " << getIsolation_ptcone20(eg)); - // ATH_MSG_DEBUG(" REGTEST: ptcone30 = " << getIsolation_ptcone30(eg)); - // ATH_MSG_DEBUG(" REGTEST: ptcone40 = " << getIsolation_ptcone40(eg)); - - // } - // if (timerSvc()) m_timerIsoTool1->stop(); //timer - // } + if(m_doCaloCellIsolation || m_doTopoIsolation){ + if (timerSvc()) m_timerIsoTool2->start(); //timer + std::map<std::string,CaloIsoHelp>::iterator itc = m_egCaloIso.begin(), itcE = m_egCaloIso.end(); + for (; itc != itcE; itc++) { + CaloIsoHelp isoH = itc->second; + std::string flav = itc->first; + bool bsc = false; + bool tbsc = false; + xAOD::CaloIsolation CaloIsoResult; + xAOD::CaloIsolation TopoIsoResult; + if (flav == "etcone" && pCaloCellContainer) { + bsc = m_caloCellIsolationTool->caloCellIsolation(CaloIsoResult, *eg, isoH.help.isoTypes, isoH.CorrList, pCaloCellContainer); + } else if (flav == "topoetcone" && topoClusTrue) { + // Add check for topoclusters (when available); + tbsc = m_topoIsolationTool->caloTopoClusterIsolation(TopoIsoResult, *eg, isoH.help.isoTypes, isoH.CorrList, pTopoClusterContainer); + } + if (!bsc && m_doCaloCellIsolation && flav=="etcone") { + ATH_MSG_WARNING("Call to CaloIsolationTool failed for flavour " << flav); + } + if (!tbsc && m_doTopoIsolation && flav =="topoetcone") { + ATH_MSG_WARNING("Call to CaloTopoIsolationTool failed for flavour " << flav); + } + + ATH_MSG_DEBUG(" REGTEST: etcone " << flav << " = " << CaloIsoResult.etcones[std::distance(m_egCaloIso.begin(), itc)]); + ATH_MSG_DEBUG(" REGTEST: topoetcone40 " << flav << " = " << TopoIsoResult.etcones[std::distance(m_egCaloIso.begin(), itc)]); + + } + if (timerSvc()) m_timerIsoTool2->stop(); //timer + } + if(m_doTrackIsolation){ + ATH_MSG_DEBUG("Running TrackIsolationTool for Electrons"); + + if (timerSvc()) m_timerIsoTool1->start(); //timer + if(m_egTrackIso.size() != 0) { + // Track Isolation types + std::map<std::string,TrackIsoHelp>::iterator itt = m_egTrackIso.begin(), ittE = m_egTrackIso.end(); + xAOD::TrackIsolation isoresult; + for (; itt != ittE; itt++) { + TrackIsoHelp isoH = itt->second; + std::string flav = itt->first; + const std::set<const xAOD::TrackParticle*> tracksToExclude = xAOD::EgammaHelpers::getTrackParticles(eg, m_useBremAssoc); // For GSF this may need to be property + // Need the decorate methods from IsolationTool + bool bsc = m_trackIsolationTool->trackIsolation(isoresult, *eg, isoH.help.isoTypes, isoH.CorrList, &leadTrkVtx, &tracksToExclude,pTrackParticleContainer); + if (!bsc) + ATH_MSG_WARNING("Call to TrackIsolationTool failed for flavour " << flav); + } + ATH_MSG_DEBUG(" REGTEST: ptcone20 = " << isoresult.ptcones[0]); + ATH_MSG_DEBUG(" REGTEST: ptcone30 = " << isoresult.ptcones[1]); + ATH_MSG_DEBUG(" REGTEST: ptcone40 = " << isoresult.ptcones[2]); + + if (timerSvc()) m_timerIsoTool1->stop(); //timer + } + } + // // PID ATH_MSG_DEBUG("about to run execute(eg) for PID"); if (timerSvc()) m_timerPIDTool1->start(); //timer @@ -1169,35 +1240,35 @@ HLT::ErrorCode TrigEgammaRec::hltExecute( const HLT::TriggerElement* inputTE, // Isolation - // BROKEN. WORTH FIXING, OR IS THIS FILE MOVING? - // if(m_doCaloCellIsolation || m_doTopoIsolation){ - // if (timerSvc()) m_timerIsoTool2->start(); //timer - // std::map<std::string,CaloIsoHelp>::iterator itc = m_egCaloIso.begin(), itcE = m_egCaloIso.end(); - // for (; itc != itcE; itc++) { - // CaloIsoHelp isoH = itc->second; - // std::string flav = itc->first; - // bool bsc = false; - // bool tbsc = false; - // if (flav == "etcone" && pCaloCellContainer) - // bsc = m_caloCellIsolationTool->decorateParticle_caloCellIso(*eg, isoH.help.isoTypes, isoH.CorrList, pCaloCellContainer); - // else if (flav == "topoetcone" && topoClusTrue) - // // Add check for topoclusters (when available); - // tbsc = m_topoIsolationTool->decorateParticle_topoClusterIso(*eg, isoH.help.isoTypes, isoH.CorrList, pTopoClusterContainer); - // if (!bsc && m_doCaloCellIsolation && flav=="etcone") - // ATH_MSG_WARNING("Call to CaloIsolationTool failed for flavour " << flav); - // if (!tbsc && m_doTopoIsolation && flav =="topoetcone") - // ATH_MSG_WARNING("Call to CaloTopoIsolationTool failed for flavour " << flav); - // } - // ATH_MSG_DEBUG(" REGTEST: etcone20 = " << getIsolation_etcone20(eg)); - // ATH_MSG_DEBUG(" REGTEST: etcone30 = " << getIsolation_etcone30(eg)); - // ATH_MSG_DEBUG(" REGTEST: etcone40 = " << getIsolation_etcone40(eg)); - // ATH_MSG_DEBUG(" REGTEST: topoetcone20 = " << getIsolation_topoetcone20(eg)); - // ATH_MSG_DEBUG(" REGTEST: topoetcone30 = " << getIsolation_topoetcone30(eg)); - // ATH_MSG_DEBUG(" REGTEST: topoetcone40 = " << getIsolation_topoetcone40(eg)); - - // if (timerSvc()) m_timerIsoTool2->stop(); //timer - // } - + if(m_doCaloCellIsolation || m_doTopoIsolation){ + if (timerSvc()) m_timerIsoTool2->start(); //timer + std::map<std::string,CaloIsoHelp>::iterator itc = m_egCaloIso.begin(), itcE = m_egCaloIso.end(); + for (; itc != itcE; itc++) { + CaloIsoHelp isoH = itc->second; + std::string flav = itc->first; + bool bsc = false; + bool tbsc = false; + xAOD::CaloIsolation CaloIsoResult; + xAOD::CaloIsolation TopoIsoResult; + if (flav == "etcone" && pCaloCellContainer){ + bsc = m_caloCellIsolationTool->caloCellIsolation(CaloIsoResult, *eg, isoH.help.isoTypes, isoH.CorrList, pCaloCellContainer); + } else if (flav == "topoetcone" && topoClusTrue) { + // Add check for topoclusters (when available); + tbsc = m_topoIsolationTool->caloTopoClusterIsolation(TopoIsoResult, *eg, isoH.help.isoTypes, isoH.CorrList, pTopoClusterContainer); + } + if (!bsc && m_doCaloCellIsolation && flav=="etcone") { + ATH_MSG_WARNING("Call to CaloIsolationTool failed for flavour " << flav); + } + if (!tbsc && m_doTopoIsolation && flav =="topoetcone") { + ATH_MSG_WARNING("Call to CaloTopoIsolationTool failed for flavour " << flav); + } + ATH_MSG_DEBUG(" REGTEST: etcone " << flav << " = " << CaloIsoResult.etcones[std::distance(m_egCaloIso.begin(), itc)]); + ATH_MSG_DEBUG(" REGTEST: topoetcone40 " << flav << " = " << TopoIsoResult.etcones[std::distance(m_egCaloIso.begin(), itc)]); + } + + if (timerSvc()) m_timerIsoTool2->stop(); //timer + } + // Particle ID if (timerSvc()) m_timerPIDTool3->start(); //timer if( m_photonPIDBuilder->execute(ctx, eg)){ diff --git a/Trigger/TrigAlgorithms/TrigHLTJetRec/CMakeLists.txt b/Trigger/TrigAlgorithms/TrigHLTJetRec/CMakeLists.txt index 8e60a3038f7a97d9fa84988805446e3948591add..ec07e72ecc6437029c8ec9b59e02660fcae8b858 100644 --- a/Trigger/TrigAlgorithms/TrigHLTJetRec/CMakeLists.txt +++ b/Trigger/TrigAlgorithms/TrigHLTJetRec/CMakeLists.txt @@ -17,6 +17,7 @@ atlas_depends_on_subdirs( PUBLIC Reconstruction/Jet/JetEDM Reconstruction/Jet/JetInterface Reconstruction/Jet/JetRec + Reconstruction/Jet/JetRecTools Trigger/TrigEvent/TrigCaloEvent Trigger/TrigEvent/TrigNavStructure Trigger/TrigEvent/TrigParticle diff --git a/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/ITriggerJetBuildTool.h b/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/ITriggerJetBuildTool.h index 8f7308f1c7dc74e5b4592bc516807c5fe21f3b18..4338415f25305006c97da1f7a29a7c2c375cd27c 100644 --- a/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/ITriggerJetBuildTool.h +++ b/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/ITriggerJetBuildTool.h @@ -34,6 +34,7 @@ public: // set inputs for jet finding. label is a type flag used // for IParticle selection virtual void prime(const xAOD::IParticleContainer*) = 0; + virtual void primeGhost(const xAOD::IParticleContainer*, std::string ghostlabel) = 0; virtual int build(fastjet::ClusterSequence*&, xAOD::JetContainer*&) const = 0; // Allow owner Algorithm to reset the Pseudojets (no managed by the evt store) diff --git a/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/NegativeEnergyRejectionTool.h b/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/NonPositiveEnergyRejectionTool.h similarity index 72% rename from Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/NegativeEnergyRejectionTool.h rename to Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/NonPositiveEnergyRejectionTool.h index e8a4f11838ed64d609fed0ddb7527cf3025a51b0..719ce2933ae7c9f31c2e7abf27ecb09307067325 100644 --- a/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/NegativeEnergyRejectionTool.h +++ b/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/NonPositiveEnergyRejectionTool.h @@ -9,21 +9,21 @@ // P Sherwood March 2018 -/// \class NegativeEnergyRejectionTool +/// \class NonPositiveEnergyRejectionTool /// /// Tool to select IParticles. #include "TrigHLTJetRec/IIParticleRejectionTool.h" #include "AsgTools/AsgTool.h" -class NegativeEnergyRejectionTool : +class NonPositiveEnergyRejectionTool : public asg::AsgTool, virtual public IIParticleRejectionTool{ - ASG_TOOL_CLASS(NegativeEnergyRejectionTool, IIParticleRejectionTool) + ASG_TOOL_CLASS(NonPositiveEnergyRejectionTool, IIParticleRejectionTool) public: - NegativeEnergyRejectionTool(const std::string& name); - virtual ~NegativeEnergyRejectionTool() override {} + NonPositiveEnergyRejectionTool(const std::string& name); + virtual ~NonPositiveEnergyRejectionTool() override {} virtual StatusCode initialize() override; virtual StatusCode finalize() override; @@ -33,7 +33,6 @@ class NegativeEnergyRejectionTool : virtual std::size_t rejected() const override; private: - bool m_skipNegativeEnergy{true}; std::size_t m_tested{0}; std::size_t m_rejected{0}; diff --git a/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/PseudoJetCreatorFunctions.h b/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/PseudoJetCreatorFunctions.h index ea2852bf60295ee36180f51b693399aece7d728c..3e35a299f11632d2a3094ccd9e275fa6c8d80ac0 100644 --- a/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/PseudoJetCreatorFunctions.h +++ b/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/PseudoJetCreatorFunctions.h @@ -34,6 +34,11 @@ namespace PseudoJetCreatorFunctions{ createPseudoJets(const xAOD::IParticleContainer*, xAOD::JetInput::Type, ToolHandle<IIParticleRejectionTool>&); + + // ghost version + std::vector<PseudoJet> + createGhostPseudoJets(const xAOD::IParticleContainer*, + ToolHandle<IIParticleRejectionTool>&); } diff --git a/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/TrigHLTJetRecBase.h b/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/TrigHLTJetRecBase.h index 266fbdeefd1557e6f27e88b70153767ce6f6b8a7..1deb1cf693d998f852e4139ab7c8eccfc33f7489 100644 --- a/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/TrigHLTJetRecBase.h +++ b/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/TrigHLTJetRecBase.h @@ -56,6 +56,7 @@ class TrigHLTJetRecBase: public HLT::FexAlgo { std::string getClusterCalib() const {return m_clusterCalib;} std::string getSecondaryLabel() const {return m_secondarylabel;} bool secondaryLabelisEmpty() const { return m_secondarylabel == ""; } + bool secondaryLabelisTracks() const { return m_secondarylabel.find("Track") != std::string::npos; } // functions and variables for secondary(associated) pseudojets /* @@ -85,6 +86,10 @@ class TrigHLTJetRecBase: public HLT::FexAlgo { HLT::ErrorCode getInputContainer(const HLT::TriggerElement*, const InputContainer*&); + template<typename ghostInputContainer> + HLT::ErrorCode getGhostInputContainer(const HLT::TriggerElement*, + const ghostInputContainer*&); + // IJetBuildTool - offline code to transform pseudojets to xAOD jets // ToolHandle<IJetBuildTool> m_jetbuildTool; // ToolHandle<JetRecTool> m_jetbuildTool; diff --git a/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/TrigHLTJetRecBase_tpl.h b/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/TrigHLTJetRecBase_tpl.h index ac0c3e5483c634b633d1534f5647cf906d37ace4..1c100a4baa0a103ace940580241e792cb47aa7b2 100644 --- a/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/TrigHLTJetRecBase_tpl.h +++ b/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/TrigHLTJetRecBase_tpl.h @@ -141,7 +141,6 @@ TrigHLTJetRecBase<InputContainer>::hltExecute(const HLT::TriggerElement* return status; } - //convert selected inputs to pseudojets // LabelIndex* indexMap = new LabelIndex("PseudoJetLabelMapTrigger"); //PS 3/4/18 jet::LabelIndex* indexMap = new jet::LabelIndex(m_pseudoJetLabelIndexArg); @@ -197,6 +196,26 @@ TrigHLTJetRecBase<InputContainer>::hltExecute(const HLT::TriggerElement* ATH_MSG_DEBUG("Primed jet build Tool"); + if ( !secondaryLabelisEmpty() && secondaryLabelisTracks()) { + // adding secondary ghost TRACK pseudojet container. + const xAOD::TrackParticleContainer* ghostTrackInContainer = nullptr; + //const ghostInputContainer* ghostInContainer = nullptr; + ATH_MSG_DEBUG("Retrieving secondary input container."); + status = this -> getGhostInputContainer(outputTE, ghostTrackInContainer); + if (status == HLT::OK) { + ATH_MSG_DEBUG("Obtained ghost inputs " + << ghostTrackInContainer->size()); + } else { + ATH_MSG_ERROR("Failed to obtain ghost track constituents"); + return status; + } + m_jetBuildTool->primeGhost(ghostTrackInContainer, m_secondarylabel); + ATH_MSG_DEBUG("Created ghost track pseudojet container with constituent label '"<<m_secondarylabel<<"'."); + } + + + + // add in tracks if appropriate and configured. Implemented in subclasses // addTracks(inputTE); @@ -218,6 +237,7 @@ TrigHLTJetRecBase<InputContainer>::hltExecute(const HLT::TriggerElement* unsigned int j_count{0}; for(auto j: *j_container) { + /* ATH_MSG_VERBOSE("EMScale E " << (j->getAttribute<xAOD::JetFourMom_t>("JetEMScaleMomentum")).E()); @@ -225,7 +245,7 @@ TrigHLTJetRecBase<InputContainer>::hltExecute(const HLT::TriggerElement* << j->getAttribute<xAOD::JetFourMom_t>("JetConstitScaleMomentum").E()); */ ++j_count; - + ATH_MSG_DEBUG("jet " << j_count << " E " @@ -323,6 +343,36 @@ TrigHLTJetRecBase<InputContainer>::getInputContainer(const HLT::TriggerElement* return HLT::OK; } +template<typename InputContainer> +template<typename ghostInputContainer> +HLT::ErrorCode +TrigHLTJetRecBase<InputContainer>::getGhostInputContainer(const HLT::TriggerElement* + outputTE, + const ghostInputContainer*& + inContainer){ + + // Get the input Container from input trigger element + + // etablish the contianer type to retrieve from the trigger element + auto hltStatus = getFeature(outputTE, inContainer); + + if (hltStatus == HLT::OK) { + ATH_MSG_DEBUG("Retrieved the input container at address " << inContainer); + } else { + ATH_MSG_ERROR("Failed to retrieve the input container"); + return HLT::ERROR; + } + + if (inContainer == nullptr){ + ATH_MSG_ERROR("The input container address = nullptr, giving up"); + return HLT::ERROR; + } + + ATH_MSG_DEBUG("Number of incoming objects : " << inContainer->size()); + + return HLT::OK; +} + //PS 3/4/18template<typename InputContainer> //PS 3/4/18HLT::ErrorCode diff --git a/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/TrigHLTSoftKiller.h b/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/TrigHLTSoftKiller.h index 31528c321137a192e4f2ff7d658c8112a41bdea1..473e371a60b81f82ef5019606c2b2723dcf82030 100644 --- a/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/TrigHLTSoftKiller.h +++ b/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/TrigHLTSoftKiller.h @@ -8,6 +8,7 @@ #include "GaudiKernel/ToolHandle.h" #include "TrigInterfaces/FexAlgo.h" +#include "JetRecTools/JetConstituentModSequence.h" class TrigHLTSoftKiller : public HLT::FexAlgo { @@ -22,9 +23,11 @@ class TrigHLTSoftKiller : public HLT::FexAlgo HLT::ErrorCode hltFinalize(); private: - // TODO Add SoftKiller ToolHandle and related here - std::string m_outputCollectionLabel; + ToolHandle<IJetConstituentModifier> m_skWeightTool; + ToolHandle<IJetExecuteTool> m_skclustModSeqTool; + std::string m_outputCollectionLabel; + std::string m_clusterCalib; }; diff --git a/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/TriggerJetBuildTool.h b/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/TriggerJetBuildTool.h index 335f8f797d16a1b6b7635ce5764ffdc9a912d438..31e7b477a082c00f3f1738ade0e8d2eeb7d5df3c 100644 --- a/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/TriggerJetBuildTool.h +++ b/Trigger/TrigAlgorithms/TrigHLTJetRec/TrigHLTJetRec/TriggerJetBuildTool.h @@ -42,6 +42,7 @@ class TriggerJetBuildTool : // Set EDM inputs for jet finding virtual void prime(const xAOD::IParticleContainer*) override; + virtual void primeGhost(const xAOD::IParticleContainer*, std::string ghostlabel) override; virtual int build(fastjet::ClusterSequence*&, xAOD::JetContainer*&) const override; diff --git a/Trigger/TrigAlgorithms/TrigHLTJetRec/python/TrigHLTJetRecConfig.py b/Trigger/TrigAlgorithms/TrigHLTJetRec/python/TrigHLTJetRecConfig.py index c7c6a1623160b68cc722c7be7d0b016d7e75e3c0..46246ad5243050656bc997f9cd6659ec3f186c59 100644 --- a/Trigger/TrigAlgorithms/TrigHLTJetRec/python/TrigHLTJetRecConfig.py +++ b/Trigger/TrigAlgorithms/TrigHLTJetRec/python/TrigHLTJetRecConfig.py @@ -12,7 +12,8 @@ from GaudiKernel.Constants import (VERBOSE, import TrigHLTJetRecConf from TrigHLTJetRec.TrigHLTJetRecConf import (IParticleNullRejectionTool, - IParticlePtEtaRejectionTool,) + IParticlePtEtaRejectionTool, + NonPositiveEnergyRejectionTool) # from JetRec.JetRecConf import JetRecTool # from JetRec.JetRecConf import (JetFromPseudojetMT,) @@ -192,6 +193,51 @@ def _getIsData(): from AthenaCommon.GlobalFlags import globalflags return globalflags.DataSource() == 'data' +def addJVFTool(toolname, + tvSGkey, + vcSGkey, + tpcSGkey, ): + + global jtm + + try: + jvfTool = getattr(jtm, toolname) + except AttributeError: + from JetMomentTools.JetMomentToolsConf import JetVertexFractionTool + + # Build the tool : + jvfTool = JetVertexFractionTool(toolname, + VertexContainer = vcSGkey, + AssociatedTracks = "GhostTrack", + TrackVertexAssociation = tvSGkey, + TrackParticleContainer = tpcSGkey, + TrackSelector = jtm.trackselloose, + JVFName = "JVF", + IsTrigger=True,) + + jtm += jvfTool + print 'TrigHLTJetRecConfig.addJVFTool '\ + 'Added jvf tool "%s" to jtm' % toolname + + +def addJVTTool(toolname, + vcSGkey, ): + + global jtm + + try: + jvfTool = getattr(jtm, toolname) + except AttributeError: + from JetMomentTools.JetMomentToolsConf import JetVertexTaggerTool + + # Build the tool : + jvtTool = JetVertexTaggerTool(toolname, + VertexContainer = vcSGkey) + + jtm += jvtTool + print 'TrigHLTJetRecConfig.addJVFTool '\ + 'Added jvt tool "%s" to jtm' % toolname + # *** FTK track moment tool helpers set up *** def configTVassocTool(name, @@ -207,6 +253,7 @@ def configTVassocTool(name, TrackParticleContainer = tpcSGkey, TrackVertexAssociation = tvSGkey, VertexContainer = vcSGkey, + TrackVertexAssoTool = jtm.jetLooseTVAtool, ) # Build the tool : @@ -451,6 +498,7 @@ def _getJetBuildTool2(merge_param, iParticleRejectionTool, name='', secondary_label='', + trkopt = '', outputLabel='', OutputLevel=INFO, fromJet=False @@ -476,7 +524,7 @@ def _getJetBuildTool2(merge_param, # in situ calibration step is only for data, not MC # this string here allows the following code to be data/MC unaware inSitu = 'i' if _getIsData() else '' - + # tell the offline code which calibration is requested calib_str = {'jes': 'calib:j:triggerNoPileup:HLTKt4', 'subjes': 'calib:aj:trigger:HLTKt4', @@ -490,14 +538,27 @@ def _getJetBuildTool2(merge_param, if outputLabel!='triggerTowerjets': #towers don't have cluster moments mymods.append(jtm.clsmoms) if secondary_label == 'GhostTrack': # ghost track association expected, will want track moments. - if not hasattr(jtm, 'trkmoms_GhostTracks'): + if not hasattr(jtm, 'trkmoms_'+trkopt): print "In TrigHLTJetRecConfig._getJetBuildTool: Something went wrong. GhostTrack label set but no track moment tools configured. Continuing without trkmodifers." else: - trkmoms_ghosttrack = getattr(jtm, 'trkmoms_GhostTracks') + trkmoms_ghosttrack = getattr(jtm, 'trkmoms_'+trkopt) trkmoms_ghosttrack.unlock() trkmoms_ghosttrack.AssociatedTracks = secondary_label trkmoms_ghosttrack.lock() mymods.append(trkmoms_ghosttrack) + if not hasattr(jtm, 'jvf_'+trkopt): + print "In TrigHLTJetRecConfig._getJetBuildTool: Something went wrong. GhostTrack label set but no JVF tool configured. Continuing without jvf calculations." + else: + jvf_ghosttrack = getattr(jtm, 'jvf_'+trkopt) + jvf_ghosttrack.unlock() + jvf_ghosttrack.AssociatedTracks = secondary_label + jvf_ghosttrack.lock() + mymods.append(jvf_ghosttrack) + if not hasattr(jtm, 'jvt_'+trkopt): + print "In TrigHLTJetRecConfig._getJetBuildTool: Something went wrong. GhostTrack label set but no JVT tool configured. Continuing without jvt calculations." + else: + jvt_ghosttrack = getattr(jtm, 'jvt_'+trkopt) + mymods.append(jvt_ghosttrack) if not do_minimalist_setup: # add in extra modofiers. This allows monitoring the ability @@ -567,6 +628,7 @@ def _getJetBuildTool2(merge_param, try: # jetBuildTool = jtm.addJetFinderTrigger( + #OutputLevel=VERBOSE jetBuildTool = jtm.addTriggerJetBuildTool( name=name, alg="AntiKt", @@ -1042,6 +1104,31 @@ def _getIParticleNullRejectionTool(toolname, **kwds): return rejecter +def _getNonPositiveEnergyRejectionTool(toolname, **kwds): + + # set up a tool to select all pseudo jets + # declare jtm as global as this function body may modify it + # with the += operator + global jtm + + # Build a new list of jet inputs. original: mygetters = [jtm.lcget] + try: + rejecter = getattr(jtm, toolname) + except AttributeError: + # Add the PseudoJetSelectorAll to the JetTool Manager, + # which pushes it to the ToolSvc in __iadd__ + # This is done in the same as PseudoJetGetter is added in + # JetRecStandardTools.py. + # The 'Label' must be one of the values found in JetContainerInfo.h + rejecter = NonPositiveEnergyRejectionTool( + name=toolname, **kwds) + jtm += rejecter + rejecter = getattr(jtm, toolname) + print 'TrigHLTJetRecConfig._getNonPositiveEnergyRectionTool '\ + 'Added rejecter "%s" to jtm' % toolname + + return rejecter + def _getIParticlePtEtaRejectionTool(toolname, **kwds): @@ -1103,8 +1190,8 @@ class TrigHLTJetRecFromCluster(TrigHLTJetRecConf.TrigHLTJetRecFromCluster): # self.iIParticleSelector = _getIParticleSelectorAll( # 'iIParticleSelectorAll') - iIParticleRejecter = _getIParticleNullRejectionTool( - 'iIParticleNullRejectionTool', OutputLevel=OutputLevel) + iIParticleRejecter = _getNonPositiveEnergyRejectionTool( + 'nonPositiveEnergyRejectionTool', OutputLevel=OutputLevel) secondary_label = '' # FTK specific: do we want FTK? Set label to GhostTrack. @@ -1137,8 +1224,9 @@ class TrigHLTJetRecFromCluster(TrigHLTJetRecConf.TrigHLTJetRecFromCluster): do_substructure=do_substructure, iParticleRejectionTool=iIParticleRejecter, name=name, - secondary_label=secondary_label, # track related modifiers OutputLevel=OutputLevel, + trkopt = trkopt, + secondary_label=secondary_label, # needed for retrieving the track psjgetter and configuring and adding of track modifiers. ) print 'after jetbuild' @@ -1169,7 +1257,7 @@ class TrigHLTJetRecGroomer(TrigHLTJetRecConf.TrigHLTJetRecGroomer): OutputLevel=INFO, ): - # OutputLevel = VERBOSE + #OutputLevel = VERBOSE TrigHLTJetRecConf.TrigHLTJetRecGroomer.__init__(self, name = name) @@ -1183,8 +1271,8 @@ class TrigHLTJetRecGroomer(TrigHLTJetRecConf.TrigHLTJetRecGroomer): # 3/18 IParticle selection moved to TriggerJetBuildTool # self.iIParticleSelector = _getIParticleSelectorAll( # 'iParticleSelectorAll') - iIParticleRejecter = _getIParticleNullRejectionTool( - 'iIParticleNullRejectionTool', OutputLevel=OutputLevel) + iIParticleRejecter = _getNonPositiveEnergyRejectionTool( + 'nonPositiveEnergyRejectionTool', OutputLevel=OutputLevel) # Groomer builds jets from clusters and then grooms them @@ -1201,7 +1289,7 @@ class TrigHLTJetRecGroomer(TrigHLTJetRecConf.TrigHLTJetRecGroomer): do_minimalist_setup=do_minimalist_setup, iParticleRejectionTool=iIParticleRejecter, name=name+'notrim', - do_substructure=do_substructure, + do_substructure=False, #do_substructure, OutputLevel=OutputLevel, ) @@ -1248,15 +1336,14 @@ class TrigHLTJetRecFromJet(TrigHLTJetRecConf.TrigHLTJetRecFromJet): TrigHLTJetRecConf.TrigHLTJetRecFromJet.__init__(self, name=name) self.OutputLevel = OutputLevel - self.OutputLevel = OutputLevel self.cluster_calib = cluster_calib # self.pseudoJetGetter = _getTriggerPseudoJetGetter(cluster_calib) name = 'iIParticleEtaPtRejecter_%d_%d' % (int(10 * etaMaxCut), int(ptMinCut)) - iIParticleRejecter = _getIParticleNullRejectionTool( - 'iIParticleNullRejectionTool', OutputLevel=OutputLevel) + iIParticleRejecter = _getNonPositiveEnergyRejectionTool( + 'nonPositiveEnergyRejectionTool', OutputLevel=OutputLevel) concrete_type = 'Jet' @@ -1313,8 +1400,8 @@ class TrigHLTJetRecFromTriggerTower( # int(ptMinCut)), # **{'etaMax': etaMaxCut, 'ptMin': ptMinCut}) - iIParticleRejecter = _getIParticleNullRejectionTool( - 'iIParticleNullRejectionTool', OutputLevel=OutputLevel) + iIParticleRejecter = _getNonPositiveEnergyRejectionTool( + 'nonPositiveEnergyRejectionTool', OutputLevel=OutputLevel) @@ -1472,6 +1559,8 @@ class TrigHLTEnergyDensity(TrigHLTJetRecConf.TrigHLTEnergyDensity): self.energyDensity = 0 +from JetRecTools.JetRecToolsConf import (JetConstituentModSequence, SoftKillerWeightTool, ClusterAtEMScaleTool, VoronoiWeightTool) + class TrigHLTSoftKiller(TrigHLTJetRecConf.TrigHLTSoftKiller): """Supply a specific grid configuration for SoftKiller""" @@ -1487,12 +1576,43 @@ class TrigHLTSoftKiller(TrigHLTJetRecConf.TrigHLTSoftKiller): TrigHLTJetRecConf.TrigHLTSoftKiller.__init__(self,name=name) self.OutputLevel = OutputLevel - self.output_collection_label = output_collection_label + self.output_collection_label = output_collection_label+ '_' + name + '_'+cluster_calib - # TODO create and configure offline SoftKiller tool here, pass it to our tool # Use cluster_calib, sk_grid_param_eta, and sk_grid_param_phi to configure the offline tool print "SK: %s, %f, %f"%(cluster_calib,sk_grid_param_eta,sk_grid_param_phi) + # Temp hardcode enum value as this is code that will be dropped + xaodtype_calocluster = 1 + + modifiers = [] + # We only want an EM tool if we are working with EM clusters + # The tool should be used before calling SoftKiller (prepend to list) + if cluster_calib == "EM": + emTool = ClusterAtEMScaleTool('emTool_'+name+'_'+cluster_calib, InputType=xaodtype_calocluster) + jtm.add(emTool) + self.emTool = emTool + modifiers.append(self.emTool) + + global jtm + skTool = SoftKillerWeightTool( name+cluster_calib, SKGridSize=0.6, isCaloSplit=False, SKRapMin=0, SKRapMax=2.5, InputType=xaodtype_calocluster) + jtm.add(skTool) + self.skWeightTool = skTool + + voronoiTool = VoronoiWeightTool('voronoiTool'+name+'_'+cluster_calib, doSpread = False, nSigma = 0, InputType=xaodtype_calocluster) + jtm.add(voronoiTool) + self.voronoiTool = voronoiTool + modifiers += [self.voronoiTool, self.skWeightTool] + + skclustModSeq = JetConstituentModSequence('ClustModifSequence_'+name+'_'+cluster_calib, + InputContainer = "CaloCalTopoClusters", + OutputContainer = self.output_collection_label, + InputType=xaodtype_calocluster, + Trigger = True, + Modifiers = modifiers + ) + jtm.add(skclustModSeq) + self.skclustModSeqTool = skclustModSeq + print "SK clusters from clusters" # Track Moment helper class @@ -1502,6 +1622,7 @@ class TrigHLTTrackMomentHelpers(TrigHLTJetRecConf.TrigHLTTrackMomentHelpers): def __init__(self, name, + trkopt, tvassocSGkey, trackSGkey, primVtxSGkey, @@ -1512,7 +1633,7 @@ class TrigHLTTrackMomentHelpers(TrigHLTJetRecConf.TrigHLTTrackMomentHelpers): self.primVtxSGkey = primVtxSGkey #retrieve and configure the TVA tool - tvatoolname = 'tvassoc_GhostTracks' + tvatoolname = 'tvassoc_'+trkopt tvaoptions = dict(tvSGkey=tvassocSGkey, tpcSGkey=trackSGkey, @@ -1522,12 +1643,27 @@ class TrigHLTTrackMomentHelpers(TrigHLTJetRecConf.TrigHLTTrackMomentHelpers): self.tvassocTool = _getTVassocTool(tvatoolname, **tvaoptions) # add a specially configured trkmoms tool to jtm - trkmomstoolname = 'trkmoms_GhostTracks' + trkmomstoolname = 'trkmoms_'+trkopt trkmomsoptions = dict(tvSGkey=tvassocSGkey, vcSGkey=primVtxSGkey, ) addTrkMomsTool(trkmomstoolname, **trkmomsoptions) + + # add a specially configured jvf tool to jtm + jvftoolname = 'jvf_'+trkopt + + jvfoptions = dict(tvSGkey=tvassocSGkey, + tpcSGkey=trackSGkey, + vcSGkey=primVtxSGkey, + ) + addJVFTool(jvftoolname, **jvfoptions) + + # add a specially configured jvt tool to jtm + jvttoolname = 'jvt_'+trkopt + + jvtoptions = dict(vcSGkey=primVtxSGkey) + addJVTTool(jvttoolname, **jvtoptions) # Data scouting algorithm class TrigHLTJetDSSelector(TrigHLTJetRecConf.TrigHLTJetDSSelector): diff --git a/Trigger/TrigAlgorithms/TrigHLTJetRec/src/NegativeEnergyRejectionTool.cxx b/Trigger/TrigAlgorithms/TrigHLTJetRec/src/NegativeEnergyRejectionTool.cxx deleted file mode 100644 index 40d1c344acb0ffa8b382ecca2ea13669c962a075..0000000000000000000000000000000000000000 --- a/Trigger/TrigAlgorithms/TrigHLTJetRec/src/NegativeEnergyRejectionTool.cxx +++ /dev/null @@ -1,39 +0,0 @@ -/* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration -*/ -#include "TrigHLTJetRec/NegativeEnergyRejectionTool.h" - - -NegativeEnergyRejectionTool::NegativeEnergyRejectionTool(const std::string& name): - AsgTool(name) { -} - -StatusCode NegativeEnergyRejectionTool::initialize() { - ATH_MSG_INFO("Initializing " << name() << "."); - return StatusCode::SUCCESS; -} - - -bool NegativeEnergyRejectionTool::operator()(const xAOD::IParticle* ip) { - ATH_MSG_DEBUG("Entering operator()()..."); - - ++m_tested; - - bool null = (ip == 0); - bool negativeE = m_skipNegativeEnergy && ip->e() <= 0.0; - if (null || negativeE){ - ++m_rejected; - return true; - } - return false; -} - - -StatusCode NegativeEnergyRejectionTool::finalize() { - ATH_MSG_INFO("Finalizing " << name() << "."); - return StatusCode::SUCCESS; -} - - -std::size_t NegativeEnergyRejectionTool::tested() const {return m_tested;} -std::size_t NegativeEnergyRejectionTool::rejected() const {return m_rejected;} diff --git a/Trigger/TrigAlgorithms/TrigHLTJetRec/src/NonPositiveEnergyRejectionTool.cxx b/Trigger/TrigAlgorithms/TrigHLTJetRec/src/NonPositiveEnergyRejectionTool.cxx new file mode 100644 index 0000000000000000000000000000000000000000..c48cda14d0ca1092185327cf595737923374842e --- /dev/null +++ b/Trigger/TrigAlgorithms/TrigHLTJetRec/src/NonPositiveEnergyRejectionTool.cxx @@ -0,0 +1,39 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ +#include "TrigHLTJetRec/NonPositiveEnergyRejectionTool.h" + + +NonPositiveEnergyRejectionTool::NonPositiveEnergyRejectionTool(const std::string& name): + AsgTool(name) { +} + +StatusCode NonPositiveEnergyRejectionTool::initialize() { + ATH_MSG_INFO("Initializing " << name() << "."); + return StatusCode::SUCCESS; +} + + +bool NonPositiveEnergyRejectionTool::operator()(const xAOD::IParticle* ip) { + ATH_MSG_DEBUG("Entering operator()()..."); + + ++m_tested; + + bool null = (ip == 0); + bool positiveE = ip->e() > FLT_MIN; + if (null || !positiveE){ + ++m_rejected; + return true; + } + return false; +} + + +StatusCode NonPositiveEnergyRejectionTool::finalize() { + ATH_MSG_INFO("Finalizing " << name() << "."); + return StatusCode::SUCCESS; +} + + +std::size_t NonPositiveEnergyRejectionTool::tested() const {return m_tested;} +std::size_t NonPositiveEnergyRejectionTool::rejected() const {return m_rejected;} diff --git a/Trigger/TrigAlgorithms/TrigHLTJetRec/src/PseudoJetCreatorFunctions.cxx b/Trigger/TrigAlgorithms/TrigHLTJetRec/src/PseudoJetCreatorFunctions.cxx index 070d35ac21b4c815aec040aacb44d5245b4fa70c..6632ec4280dc7751138b2d8ec26a9201d2792bcc 100644 --- a/Trigger/TrigAlgorithms/TrigHLTJetRec/src/PseudoJetCreatorFunctions.cxx +++ b/Trigger/TrigAlgorithms/TrigHLTJetRec/src/PseudoJetCreatorFunctions.cxx @@ -153,6 +153,14 @@ namespace PseudoJetCreatorFunctions{ } }; + ////////////Ghost version//////////////////// + class GhostParticleMomentumGetter: public IMomentumGetter { + virtual xAOD::IParticle::FourMom_t + operator()(const xAOD::IParticle* ip) const override { + return ip->p4()*1e-40; // momentum scaled to near zero. + } + }; + //////////////////////////////// // MomentumGetter Factory @@ -165,6 +173,13 @@ namespace PseudoJetCreatorFunctions{ return std::make_unique<IParticleMomentumGetter>(); } + + ////////////Ghost version//////////////////// + std::unique_ptr<IMomentumGetter> + make_ghostmomentumGetter(){ + + return std::make_unique<GhostParticleMomentumGetter>(); + } //////////////////////////////// // IParticle to PseudoJet converter @@ -253,5 +268,18 @@ namespace PseudoJetCreatorFunctions{ rejecter, std::move(momentumGetter)); } + + ////////////////Ghost version//////////////////////////// + std::vector<PseudoJet> + createGhostPseudoJets(const xAOD::IParticleContainer* ips, + ToolHandle<IIParticleRejectionTool>& rejecter){ + + + auto momentumGetter = make_ghostmomentumGetter(); + + return IParticlesToPseudoJets(ips, + rejecter, + std::move(momentumGetter)); + } } diff --git a/Trigger/TrigAlgorithms/TrigHLTJetRec/src/TrigHLTJetRecGroomer.cxx b/Trigger/TrigAlgorithms/TrigHLTJetRec/src/TrigHLTJetRecGroomer.cxx index 99c57591b6baeb6b47b96bf5acb553cc4757fc1e..6b8018cbe53fd52256e851de9995232ea283ec6e 100644 --- a/Trigger/TrigAlgorithms/TrigHLTJetRec/src/TrigHLTJetRecGroomer.cxx +++ b/Trigger/TrigAlgorithms/TrigHLTJetRec/src/TrigHLTJetRecGroomer.cxx @@ -90,7 +90,7 @@ TrigHLTJetRecGroomer::build(fastjet::ClusterSequence*& cs, ATH_MSG_DEBUG("Ungroomed/groomed jet number " << iJet << " has constituents of " << ungroomedJets->at(iJet)->numConstituents() << "/" << trimmedJets->at(iJet)->numConstituents() << ", pT ratio is " << orig_pt << "/" << trim_pt << " = " << ratio << " , constscale ratio is " << orig_const_pt << "/" << trim_const_pt << " = " << ratio_const << " , emscale ratio is " << orig_em_pt << "/" << trim_em_pt << " = " << ratio_em); } - */ + */ // Get rid of the intermediate (ungroomed) jets auto ungroomedStore = ungroomedJets->getStore(); diff --git a/Trigger/TrigAlgorithms/TrigHLTJetRec/src/TrigHLTSoftKiller.cxx b/Trigger/TrigAlgorithms/TrigHLTJetRec/src/TrigHLTSoftKiller.cxx index 76bfb4d56c46ef2107ca4b3253150c8333597e97..afa60b0044d74a9efdbbe7cc25be9a54f77f3071 100644 --- a/Trigger/TrigAlgorithms/TrigHLTJetRec/src/TrigHLTSoftKiller.cxx +++ b/Trigger/TrigAlgorithms/TrigHLTJetRec/src/TrigHLTSoftKiller.cxx @@ -8,11 +8,13 @@ #include "TrigHLTJetRec/TrigHLTSoftKiller.h" #include "xAODCaloEvent/CaloClusterContainer.h" +#include "xAODBase/IParticleContainer.h" TrigHLTSoftKiller::TrigHLTSoftKiller(const std::string& name, ISvcLocator* pSvcLocator) : HLT::FexAlgo(name, pSvcLocator) { declareProperty( "output_collection_label", m_outputCollectionLabel); + declareProperty("skclustModSeqTool",m_skclustModSeqTool); } TrigHLTSoftKiller::~TrigHLTSoftKiller() @@ -23,7 +25,15 @@ HLT::ErrorCode TrigHLTSoftKiller::hltInitialize() ATH_MSG_INFO("Initializing " << name() << "..."); - // TODO Retrieve any needed ToolHandles here, like the SoftKiller tool + StatusCode sc = m_skclustModSeqTool.retrieve(); + + if (sc.isSuccess()) + ATH_MSG_INFO("Retrieved skclustModSeqTool: " << m_skclustModSeqTool->name()); + else + { + ATH_MSG_ERROR("Failed to retrieve the skclustModSeqTool: " << m_skclustModSeqTool->name()); + return HLT::ERROR; + } ATH_MSG_INFO("Initialization successful"); @@ -47,12 +57,12 @@ HLT::ErrorCode TrigHLTSoftKiller::hltExecute(const HLT::TriggerElement* inputTE, ATH_MSG_DEBUG("inputTE->getId(): " << inputTE->getId()); // Get the input container - const xAOD::CaloClusterContainer* clusters = nullptr; - HLT::ErrorCode status = getFeature(inputTE,clusters); + const xAOD::CaloClusterContainer* inputclusters = nullptr; + HLT::ErrorCode status = getFeature(inputTE,inputclusters); if (status == HLT::OK) { - if (clusters != nullptr) - ATH_MSG_DEBUG("Retrieved input cluster container of size " << clusters->size()); + if (inputclusters != nullptr) + ATH_MSG_DEBUG("Retrieved input cluster container of size " << inputclusters->size()); else { ATH_MSG_ERROR("Retrieved NULL input cluster container"); @@ -65,19 +75,47 @@ HLT::ErrorCode TrigHLTSoftKiller::hltExecute(const HLT::TriggerElement* inputTE, return HLT::ERROR; } + JetConstituentModSequence *skclustModSeqTool = const_cast<JetConstituentModSequence*>(dynamic_cast<const JetConstituentModSequence*>(&*m_skclustModSeqTool)); + const xAOD::IParticleContainer* IP_inputclusters = dynamic_cast<const xAOD::IParticleContainer*> (inputclusters); + skclustModSeqTool->setInputClusterCollection(IP_inputclusters); + //skclustModSeqTool->setInputClusterCollection(inputclusters); + int process_status = skclustModSeqTool->execute(); + const xAOD::CaloClusterContainer* outputclusters = dynamic_cast<const xAOD::CaloClusterContainer*>(skclustModSeqTool->getOutputClusterCollection()); + + if (process_status == 0) + { + if (outputclusters != nullptr) + ATH_MSG_DEBUG("Processed cluster container of size " << outputclusters->size()); + else + { + ATH_MSG_ERROR("SoftKillerWeightTool returned NULL input cluster container"); + return HLT::ERROR; + } + } + else + { + ATH_MSG_ERROR("Failed to retrieve processed cluster container"); + return HLT::ERROR; + } + + ////////// FOR DEBUGGING PURPOSES + //SG::AuxElement::ConstAccessor<float> weightAcc("PUWeight"); // Handle for PU weighting here + //for (size_t icl = 0; icl < outputclusters->size(); ++icl) + // if (weightAcc(*(outputclusters->at(icl))) < 1.e-6) + // ATH_MSG_INFO("Cluster SK weight: " << weightAcc(*(outputclusters->at(icl))) << ", pT = " << outputclusters->at(icl)->pt()); - - // Apply SoftKiller and store the output in clustersSK - const xAOD::CaloClusterContainer* clustersSK = clusters; // TODO change this to the SK cluster output - // TODO add SK here - + ATH_MSG_DEBUG("writing results"); // Write the resulting container + auto auxStore = outputclusters->getStore(); std::string key = ""; - status = recordAndAttachFeature(outputTE,clustersSK,key,m_outputCollectionLabel); + status = recordAndAttachFeature(outputTE,outputclusters,key,m_outputCollectionLabel); if (status == HLT::OK) + { ATH_MSG_DEBUG("Attached SK cluster container to output TE"); + delete auxStore; + } else ATH_MSG_ERROR("Failed to attach SK cluster container to output TE, status " << status); return status; diff --git a/Trigger/TrigAlgorithms/TrigHLTJetRec/src/TriggerJetBuildTool.cxx b/Trigger/TrigAlgorithms/TrigHLTJetRec/src/TriggerJetBuildTool.cxx index 8a3b5e367c03464b252f9f952f2e690302f5de57..94d04a79b290a42ab93c209ea4d6015ddce24f48 100644 --- a/Trigger/TrigAlgorithms/TrigHLTJetRec/src/TriggerJetBuildTool.cxx +++ b/Trigger/TrigAlgorithms/TrigHLTJetRec/src/TriggerJetBuildTool.cxx @@ -178,6 +178,57 @@ void TriggerJetBuildTool::prime(const xAOD::IParticleContainer* inputs){ + PseudoJetContainer pjc(extractor, vpj); + m_inContainer.append(&pjc); +} + +void TriggerJetBuildTool::primeGhost(const xAOD::IParticleContainer* inputs, std::string ghostlabel){ + + + // use the input IParticles to make a PseudoJEtContainer. + // This method may be called more than once per event + // m_label is a string which gives type information. It is used + // to determine the function used to select the incoming IParticles. + ATH_MSG_DEBUG("Entering primeGhost(), call " << ++m_nprime); + + constexpr bool isGhost = true; + IParticleExtractor* extractor = new IParticleExtractor(inputs, + ghostlabel, + isGhost, + m_isTrigger); + + + ATH_MSG_DEBUG("No of ghost IParticle inputs: " << inputs->size()); + + for(const auto& ip : *inputs){ + ATH_MSG_VERBOSE("primeGhost() PseudoJetInputDump" + << ip->e() + << " " + << "ghost constituent label" + << " " + << ghostlabel); + } + + std::vector<PseudoJet> vpj = + PseudoJetCreatorFunctions::createGhostPseudoJets(inputs, + m_iParticleRejecter + ); + + ATH_MSG_DEBUG("No of pseudojets: " << vpj.size()); + for(const auto& pj : vpj){ + ATH_MSG_VERBOSE("prime() PseudoJetDump. index" << " " << pj.user_index() + << " E " << pj.E() + << " " + << " label " + << ghostlabel); + } + + ATH_MSG_DEBUG("So far this job IParticles" + << " tested " << m_iParticleRejecter->tested() + << " rejected " << m_iParticleRejecter->rejected()); + + + PseudoJetContainer pjc(extractor, vpj); m_inContainer.append(&pjc); } diff --git a/Trigger/TrigAlgorithms/TrigHLTJetRec/src/components/TrigHLTJetRec_entries.cxx b/Trigger/TrigAlgorithms/TrigHLTJetRec/src/components/TrigHLTJetRec_entries.cxx index 547893ebbfa1952701514f0796bb6d8749ace510..b07dae3b28f8f95757f120b4df5a0c7aa7e8330b 100644 --- a/Trigger/TrigAlgorithms/TrigHLTJetRec/src/components/TrigHLTJetRec_entries.cxx +++ b/Trigger/TrigAlgorithms/TrigHLTJetRec/src/components/TrigHLTJetRec_entries.cxx @@ -23,18 +23,17 @@ #include "TrigHLTJetRec/TriggerJetBuildTool.h" #include "TrigHLTJetRec/TriggerJetGroomerTool.h" - #include "TrigHLTJetRec/IParticleNullRejectionTool.h" #include "TrigHLTJetRec/IParticlePtEtaRejectionTool.h" #include "TrigHLTJetRec/EMTopoRejectionTool.h" #include "TrigHLTJetRec/PFlowRejectionTool.h" -#include "TrigHLTJetRec/NegativeEnergyRejectionTool.h" +#include "TrigHLTJetRec/NonPositiveEnergyRejectionTool.h" DECLARE_COMPONENT(IParticleNullRejectionTool) DECLARE_COMPONENT(IParticlePtEtaRejectionTool) DECLARE_COMPONENT(EMTopoRejectionTool) DECLARE_COMPONENT(PFlowRejectionTool) -DECLARE_COMPONENT(NegativeEnergyRejectionTool) +DECLARE_COMPONENT(NonPositiveEnergyRejectionTool) DECLARE_COMPONENT( TrigHLTJetRecFromCluster ) DECLARE_COMPONENT( TrigHLTJetRecFromJet ) diff --git a/Trigger/TrigAlgorithms/TrigL2MissingET/TrigL2MissingET/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigAlgorithms/TrigL2MissingET/TrigL2MissingET/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..be5ae8e5940270de0c5b45fdf59ab7a4e24dfb7f --- /dev/null +++ b/Trigger/TrigAlgorithms/TrigL2MissingET/TrigL2MissingET/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Trigger/TrigAlgorithms/TrigL2MissingET diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/CMakeLists.txt b/Trigger/TrigAlgorithms/TrigL2MuonSA/CMakeLists.txt index 453f3f71065a74e8f661dc37ab6007c5837790d4..13f485628aa9d43c153ecd79d86d535f0a1c2c18 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/CMakeLists.txt +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/CMakeLists.txt @@ -33,6 +33,7 @@ atlas_depends_on_subdirs( PUBLIC Trigger/TrigTools/TrigMuonBackExtrapolator Trigger/TrigTools/TrigTimeAlgs PRIVATE + Control/CxxUtils Control/StoreGate Event/EventInfo MuonSpectrometer/MuonCablings/MuonCablingData @@ -59,8 +60,7 @@ atlas_add_library( TrigL2MuonSALib atlas_add_component( TrigL2MuonSA src/*.cxx src/components/*.cxx - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${GSL_INCLUDE_DIRS} ${TDAQ-COMMON_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${GSL_LIBRARIES} ${TDAQ-COMMON_LIBRARIES} ${EIGEN_LIBRARIES} ${CLHEP_LIBRARIES} AthenaBaseComps GeoPrimitives Identifier RegionSelectorLib ByteStreamCnvSvcBaseLib xAODTrigMuon xAODTrigger GaudiKernel MuonMDT_CablingLib MuonTGC_CablingLib RPCcablingInterfaceLib MdtCalibSvcLib MuonRDO CscClusterizationLib MuonPrepRawData MuonRecToolInterfaces TrigMuonEvent TrigSteeringEvent TrigInterfacesLib TrigT1Interfaces TrigT1RPCRecRoiSvcLib TrigTimeAlgsLib StoreGateLib SGtests EventInfo MuonCablingData MuonCalibEvent MuonContainerManager MuonReadoutGeometry MuonIdHelpersLib PathResolver ) + LINK_LIBRARIES TrigL2MuonSALib ) # Install files from the package: atlas_install_headers( TrigL2MuonSA ) diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..71a0ea94ab220d561fefea2aa26831a31ebe4d38 --- /dev/null +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Trigger/TrigAlgorithms/TrigL2MuonSA diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/BarrelRoadData.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/BarrelRoadData.cxx index b02c52a96dda012f5a7fd746bd8042c40b02c261..ad77fe6dbc82d1d50b8c69227b9df1cac7c78065 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/BarrelRoadData.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/BarrelRoadData.cxx @@ -5,7 +5,7 @@ #include "TrigL2MuonSA/BarrelRoadData.h" #include <iostream> -float MuonRoads[2][12][8] = {{ // LOW PT threshold +const float MuonRoads[2][12][8] = {{ // LOW PT threshold /* HP data ... 96 % cut */ { 11.23, 11.22, 10.80, 10.83, 9.73, 9.62, 9.43, 9.24}, // Large Inner st. { 6.00, 5.72, 5.98, 5.18, 5.30, 5.38, 0.00, 0.00}, // Large Middle st. diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuCalStreamerTool.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuCalStreamerTool.cxx index 534705b1ddcb5462224710ebb81d3a5dffd25865..9132782605306fc53510afab2c8e1e51be769945 100644 --- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuCalStreamerTool.cxx +++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuCalStreamerTool.cxx @@ -24,6 +24,7 @@ #include "circ/Circservice.h" #include "AthenaBaseComps/AthMsgStreamMacros.h" +#include "CxxUtils/checker_macros.h" // -------------------------------------------------------------------------------- // -------------------------------------------------------------------------------- @@ -147,8 +148,8 @@ StatusCode TrigL2MuonSA::MuCalStreamerTool::openStream(int calBufferSize) } else { - - m_cid = CircOpenCircConnection(0, (char*)name.c_str(), calBufferSize); + char* chr ATLAS_THREAD_SAFE = const_cast<char*>(name.c_str()); + m_cid = CircOpenCircConnection(0, chr, calBufferSize); if( m_cid == -1 ) { ATH_MSG_WARNING("Could not open muon calibration buffer: name=" << name << " buffer size=" << calBufferSize); @@ -182,7 +183,8 @@ StatusCode TrigL2MuonSA::MuCalStreamerTool::closeStream() m_outputFile = NULL; } else if ( !m_writeToFile && m_cid>-1) { - if (CircCloseCircConnection (0,(char*)name.c_str(),m_cid) != 0 ) { + char* chr ATLAS_THREAD_SAFE = const_cast<char*>(name.c_str()); + if (CircCloseCircConnection (0,chr,m_cid) != 0 ) { ATH_MSG_WARNING("Could not close the muon calibration stream. Stream name: " << m_calBufferName); } else { diff --git a/Trigger/TrigAlgorithms/TrigMissingETMuon/TrigMissingETMuon/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigAlgorithms/TrigMissingETMuon/TrigMissingETMuon/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..11bfe9bfa37cff32b00ea100e3c34225a6c39c1c --- /dev/null +++ b/Trigger/TrigAlgorithms/TrigMissingETMuon/TrigMissingETMuon/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Trigger/TrigAlgorithms/TrigMissingETMuon diff --git a/Trigger/TrigAlgorithms/TrigMissingETMuon/TrigMissingETMuon/TrigMissingETMuon.h b/Trigger/TrigAlgorithms/TrigMissingETMuon/TrigMissingETMuon/TrigMissingETMuon.h index b7a8d2635400474aa2914df77be0e9fd2e2ace94..9d09210b02e98dfb79fabaab62b505f4da9ac43d 100755 --- a/Trigger/TrigAlgorithms/TrigMissingETMuon/TrigMissingETMuon/TrigMissingETMuon.h +++ b/Trigger/TrigAlgorithms/TrigMissingETMuon/TrigMissingETMuon/TrigMissingETMuon.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /********************************************************************************** @@ -12,7 +12,6 @@ * @author Hongtao Yang <Hongtao.Yang@cern.ch> - UW Madsion, USA * * File and Version Information: - * $Id: TrigMissingETMuon.h,v 0.01 2012-03-05 09:00:20 yanght Exp $ **********************************************************************************/ @@ -26,6 +25,9 @@ #include "xAODTrigMissingET/TrigMissingET.h" +#include "CxxUtils/checker_macros.h" +ATLAS_NO_CHECK_FILE_THREAD_SAFETY; // legacy trigger code + namespace HLT { class TriggerElement; } diff --git a/Trigger/TrigAlgorithms/TrigMissingETMuon/src/TrigMissingETMuon.cxx b/Trigger/TrigAlgorithms/TrigMissingETMuon/src/TrigMissingETMuon.cxx index 8d2fd60d94b420c5f0bc941ffe0e0ca363f9109c..a1154fbb719e496896bc235cd21509a25e136dfe 100755 --- a/Trigger/TrigAlgorithms/TrigMissingETMuon/src/TrigMissingETMuon.cxx +++ b/Trigger/TrigAlgorithms/TrigMissingETMuon/src/TrigMissingETMuon.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // ******************************************************************** @@ -38,6 +38,8 @@ #include <cmath> #include <cstdio> +ATLAS_NO_CHECK_FILE_THREAD_SAFETY; // legacy trigger code + TrigMissingETMuon::TrigMissingETMuon(const std::string& name, ISvcLocator* pSvcLocator) : HLT::AllTEAlgo(name, pSvcLocator), m_useCachedResult(false), @@ -69,9 +71,7 @@ HLT::ErrorCode TrigMissingETMuon::hltExecute(std::vector<std::vector<HLT::Trigge // CACHING // first check whether we executed this instance before: if (m_useCachedResult) { - if (msgLvl() <= MSG::DEBUG) { - msg() << MSG::DEBUG << "Executing this xAOD::TrigMissingETMuon " << name() << " in cached mode" << endmsg; - } + ATH_MSG_DEBUG("Executing this xAOD::TrigMissingETMuon " << name() << " in cached mode"); // Only count MET as an input TE (for seeding relation of navigation structure) HLT::TEVec allTEs; if ( (tes_in.size()>0) && (tes_in[0].size()>0) ) allTEs.push_back( tes_in[0][0] ); @@ -99,137 +99,70 @@ HLT::ErrorCode TrigMissingETMuon::hltExecute(std::vector<std::vector<HLT::Trigge m_mu_ey_log = -9e9; m_mu_set_log = -9e9; - unsigned int tes_in_size=tes_in.size(); // = 2 (seeded) or 1 (unseeded). The TrigMissingET object is necessary. - unsigned int muonIndex=0; // = 1 if seeded - unsigned int tes_in0_size=0; // size of result (must be 1) - unsigned int tes_in1_size=0; // size of muon container - - if(msgLvl() <= MSG::DEBUG) { - msg() << MSG::DEBUG << "Executing xAOD::TrigMissingETMuon::hltExecute()" << endmsg; + ATH_MSG_DEBUG("Executing xAOD::TrigMissingETMuon::hltExecute()" ); + ATH_MSG_DEBUG("REGTEST: tes_in.size() = " ); + for (unsigned u=0; u<tes_in.size(); ++u) { + ATH_MSG_DEBUG("REGTEST: tes_in[" << u << "].size() = " << tes_in[u].size()); } - if (msgLvl() <= MSG::DEBUG) { - msg() << MSG::DEBUG << "REGTEST: tes_in.size() = " << tes_in_size << endmsg; - - for (unsigned u=0; u<tes_in_size; ++u) { - msg() << MSG::DEBUG << "REGTEST: tes_in[" << u << "].size() = " << tes_in[u].size() << endmsg; - } - } //algorithm is muon seeded, therefore: // algorithm has TrigMissingET as only seed if in unseeded mode // muon as second seed of in seeded mode //so number of TEs must be 1 or 2 // ====================================================== - switch (tes_in_size) { - - case 1: // unseeded mode with TrigMissingET. - - if (msgLvl() <= MSG::DEBUG) { - msg() << MSG::DEBUG << "Running in unseeded mode" << endmsg; - msg() << MSG::DEBUG - << "No muon feature found: skipping muon correction" << endmsg; - } - tes_in0_size=tes_in[0].size(); - if (tes_in0_size != 1) { - msg() << MSG::WARNING // ERROR - << "Configuration error: expecting exactly 1 TrigMissingET object. Aborting chain" << endmsg; - return HLT::ErrorCode(HLT::Action::ABORT_CHAIN, HLT::Reason::BAD_JOB_SETUP); - } - else{ - std::vector<const xAOD::TrigMissingET*> vectorOfMET; - for (HLT::TEVec::const_iterator met_it = tes_in[0].begin(); met_it != tes_in[0].end(); ++met_it) { - HLT::ErrorCode status = getFeatures( (*met_it) , vectorOfMET); - if(status != HLT::OK) { - msg() << MSG::ERROR - << "no TrigMissingET object found for this TE ... ?!?" - << endmsg; - return HLT::NAV_ERROR; - } - } - if (msgLvl() <= MSG::DEBUG) { - msg() << MSG::DEBUG << "REGTEST: Florian: No muon input. Will save the input TE without updating it " << endmsg; - } - - // Check if EDM is there - if(vectorOfMET.size() == 0) - return HLT::NAV_ERROR; - - const xAOD::TrigMissingET *met_temp=vectorOfMET[0]; - m_met = const_cast<xAOD::TrigMissingET *>(met_temp); - HLT::ErrorCode status = makeOutputTE(tes_in, type_out); - return status; - } - case 2: // Seeded mode - muonIndex=1; - - tes_in0_size=tes_in[0].size(); - tes_in1_size=tes_in[1].size(); + bool seeded = false; + switch(tes_in.size()){ + case 1: seeded = false; ATH_MSG_DEBUG("Running in unseeded mode"); break; + case 2: seeded = true; ATH_MSG_DEBUG("Running in seeded mode"); break; + default: + ATH_MSG_WARNING ( "Configuration error: tes_in.size() is " << tes_in.size() + << " but can only be 2 in seeded mode or 1 in unseeded mode. Aborting chain"); + return HLT::ErrorCode(HLT::Action::ABORT_CHAIN, HLT::Reason::BAD_JOB_SETUP); - if (tes_in0_size != 1) { - msg() << MSG::WARNING // ERROR - << "Configuration error: expecting exactly 1 L2 or EF result. Aborting chain" << endmsg; - return HLT::ErrorCode(HLT::Action::ABORT_CHAIN, HLT::Reason::BAD_JOB_SETUP); - } - if (tes_in1_size == 0) { - if (msgLvl() <= MSG::DEBUG){ - msg() << MSG::DEBUG - << "No muon feature found: skipping muon correction" << endmsg; - } - - // Save ouput TE before leaving. - std::vector<const xAOD::TrigMissingET*> vectorOfMET; - for (HLT::TEVec::const_iterator met_it = tes_in[0].begin(); met_it != tes_in[0].end(); ++met_it) { - HLT::ErrorCode status = getFeatures( (*met_it) , vectorOfMET); - if(status != HLT::OK) { - msg() << MSG::ERROR - << "no TrigMissingET object found for this TE ... ?!?" - << endmsg; - return HLT::NAV_ERROR; - } - } - - // Check if EDM is there - if(vectorOfMET.size() == 0) - return HLT::NAV_ERROR; - - const xAOD::TrigMissingET *met_temp=vectorOfMET[0]; - m_met = const_cast<xAOD::TrigMissingET *>(met_temp); - HLT::ErrorCode status = makeOutputTE(tes_in, type_out); - return status; - } - break; + } - default: - msg() << MSG::WARNING // ERROR - << "Configuration error: tes_in.size() is " << tes_in_size - << " but can only be 1 in seeded mode or 0 in unseeded mode. Aborting chain" << endmsg; + // 0th element in this tes_in vector must have exactly one object + if (tes_in[0].size() != 1) { + ATH_MSG_WARNING("Configuration error: expecting exactly 1 TrigMissingET object. Aborting chain"); return HLT::ErrorCode(HLT::Action::ABORT_CHAIN, HLT::Reason::BAD_JOB_SETUP); } - // First we retrieve the TrigMissingET object + // Muon features? Not present if unseeded, or seeded but tes_in[1].size==0. + if(!seeded || (seeded && tes_in[1].size()==0)) + { + ATH_MSG_DEBUG("No muon feature found: skipping muon correction"); + HLT::ErrorCode status = makeOutputTE(tes_in, type_out); + return status; + } + + /* If muon features are present, + then get the stuff and start doing the stuff + */ + + // Retrieve the TrigMissingET object std::vector<const xAOD::TrigMissingET*> vectorOfMET; for (HLT::TEVec::const_iterator met_it = tes_in[0].begin(); met_it != tes_in[0].end(); ++met_it) { HLT::ErrorCode status = getFeatures( (*met_it) , vectorOfMET); if(status != HLT::OK) { - msg() << MSG::ERROR - << "no TrigMissingET object found for this TE ... ?!?" - << endmsg; + ATH_MSG_ERROR("no TrigMissingET object found for this TE ... ?!?"); return HLT::NAV_ERROR; } } // Check if EDM is there - if(vectorOfMET.size() == 0) - return HLT::NAV_ERROR; + if(vectorOfMET.size() == 0) { + ATH_MSG_ERROR("vectorOfMET.size() == 0 !"); + return HLT::NAV_ERROR; + } // ++++++++++++++++++++++++++++++++++++++++++ const xAOD::TrigMissingET *met_temp=vectorOfMET[0]; m_met = const_cast<xAOD::TrigMissingET *>(met_temp); // ++++++++++++++++++++++++++++++++++++++++++ - msg() << MSG::DEBUG << "xAOD::TrigMissingET object retrieved." <<endmsg; + ATH_MSG_DEBUG("xAOD::TrigMissingET object retrieved."); flag=m_met->flag(); - msg() << MSG::DEBUG << "Flag got." <<endmsg; + ATH_MSG_DEBUG("Flag got."); // Now we loop over all the muons float muon_ex=0; @@ -238,82 +171,68 @@ HLT::ErrorCode TrigMissingETMuon::hltExecute(std::vector<std::vector<HLT::Trigge float muon_sum_et=0; float muon_sum_e=0; //int muon_charge=0; - unsigned int Nmuons=0; + unsigned int nMuons=0; bool MuonError=false; - msg() << MSG::DEBUG << "REGTEST: Ready to access xAOD::MuonContainer muons " << endmsg; + ATH_MSG_DEBUG("REGTEST: Ready to access xAOD::MuonContainer muons "); std::vector<const xAOD::TrackParticle*> vecOfMuonTrk; - if (msgLvl() <= MSG::DEBUG) { - msg() << MSG::DEBUG - << "REGTEST: Using muon pt threshold "<<m_muonptcut<<" GeV."<< endmsg; - } - - for (HLT::TEVec::const_iterator muon_it = tes_in[muonIndex].begin(); - muon_it != tes_in[muonIndex].end(); ++muon_it) { + ATH_MSG_DEBUG("REGTEST: Using muon pt threshold "<<m_muonptcut<<" GeV."); + // Muon TE in tes_in[1] // for some reason \_( )_/ + for (HLT::TEVec::const_iterator muon_it = tes_in[1].begin(); muon_it != tes_in[1].end(); ++muon_it) + { // Get the muon container linked to the TE const xAOD::MuonContainer* muonContainer(0); HLT::ErrorCode status = getFeature( (*muon_it) , muonContainer); - if(status != HLT::OK || muonContainer==0) { - if (msgLvl() <= MSG::DEBUG) { - msg() << MSG::DEBUG - << "no MuonContainer found for this TE ... ?!?" - << endmsg; - } + if(status != HLT::OK || muonContainer==0) + { + ATH_MSG_DEBUG( "no MuonContainer found for this TE ... ?!?"); continue; } - int NofMuons=muonContainer->size(); - // Check that there is at least one muon in TrigMuonEFInfoContainer - if (NofMuons == 0){ - if (msgLvl() <= MSG::DEBUG) { - msg() << MSG::DEBUG << "Size of vectorOfMuons is 0. Skipping muon correction" << endmsg; - } + if (muonContainer->size() == 0) + { + ATH_MSG_DEBUG("Size of vectorOfMuons is 0. Skipping muon correction"); MuonError=true; continue; // return HLT::NAV_ERROR; } - unsigned int kk=0; - for(auto muon : *muonContainer) { - if (msgLvl() <= MSG::DEBUG) { - msg() << MSG::DEBUG << "Looking at muon " << kk << "pt = " << muon->pt() << "eta= " << - muon->eta() << "phi= " << muon->phi() << endmsg; - } - const xAOD::Muon::MuonType muontype = muon->muonType(); - if(muontype == xAOD::Muon::MuonType::Combined || muontype == xAOD::Muon::MuonType::SegmentTagged ) { - // combined or segment tagged muon - - // double counting removal and minimum pt cut - bool sel = true; - float Et = fabs(muon->pt()); - if (Et/CLHEP::GeV < m_muonptcut) sel = false; - if(!sel) continue; - const xAOD::TrackParticle* idtrk = muon->trackParticle( xAOD::Muon::TrackParticleType::InnerDetectorTrackParticle ); + unsigned int kk=0; + for(auto muon : *muonContainer) + { + ATH_MSG_DEBUG("Looking at muon " << kk++ << ": (pt, eta, phi) = (" << muon->pt() << ", " << muon->eta() << ", " << muon->phi() << ")"); - if(idtrk==0) {sel = false;} // Reject muons without IDtracks + // combined or segment tagged muon + if(muon->muonType() == xAOD::Muon::MuonType::Combined + || muon->muonType() == xAOD::Muon::MuonType::SegmentTagged ) + { - if(!sel) continue; + // Minimum pt cut + float Et = fabs(muon->pt()); + if (Et/CLHEP::GeV < m_muonptcut) continue; - for(std::vector<const xAOD::TrackParticle*>::size_type idx=0; idx<vecOfMuonTrk.size(); idx++) { - const xAOD::TrackParticle* idtrk_sel = vecOfMuonTrk[idx]; - //if((*idtrk) == (*idtrk_sel)) { // == operator not defined for this class, so comment it out - if((idtrk) == (idtrk_sel)) { - sel = false; + // Reject muons without IDtracks + const xAOD::TrackParticle* idtrk = muon->trackParticle( xAOD::Muon::TrackParticleType::InnerDetectorTrackParticle ); + if (!idtrk) continue; + + // Skip double counted muons + bool doubleCounted=false; + for(auto existingMuonTrk : vecOfMuonTrk) + if (existingMuonTrk == idtrk) + { + doubleCounted = true; break; } - } //end of loop over stored muon tracks + if(doubleCounted) continue; - if(!sel) continue; + vecOfMuonTrk.push_back(idtrk); // store for double counting prevention - vecOfMuonTrk.push_back(idtrk); // store for testing future muon tracks for double counting prevention - - //int charge = muon->Charge()>0 ? 1 : -1; float eta = muon->eta(); float phi = muon->phi(); float cosPhi, sinPhi; @@ -328,79 +247,68 @@ HLT::ErrorCode TrigMissingETMuon::hltExecute(std::vector<std::vector<HLT::Trigge muon_ez -= Ez; muon_sum_et += Et; muon_sum_e += E; - //muon_charge += charge; - ++Nmuons; - - if (msgLvl() <= MSG::DEBUG) { - msg() << MSG::DEBUG << "REGTEST: Adding muon with pT = " << Et - << " MeV, phi = " << phi << " rad, eta = " << eta << endmsg; - } + ++nMuons; - } // end muon-type if statement - } // end loop over muons - } // end loop over muons te's + ATH_MSG_DEBUG("Adding muon with (pt, eta, phi) = (" << muon->pt() << ", " << muon->eta() << ", " << muon->phi() << ")"); + } // end if muonType + } // end for(muon : muonContainer) + } // end for(te : muonTE's) m_mu_ex = muon_ex; m_mu_ey = muon_ey; m_mu_set = muon_sum_et; - if (msgLvl() <= MSG::DEBUG) { - msg() << MSG::DEBUG << "Muon correction calculated." << endmsg; + ATH_MSG_DEBUG("Muon correction calculated."); + + ATH_MSG_DEBUG("Setting energies and flag"); + + unsigned int muonComp = m_met->getNumberOfComponents() - 1; // Muons are always the last component \_(y)_/ + ATH_MSG_VERBOSE("Outputting met component names:"); + ATH_MSG_VERBOSE("ii \t m_met->nameOfComponent(ii)"); + for(uint ii=0; ii<m_met->getNumberOfComponents(); ii++){ + ATH_MSG_VERBOSE(ii << '\t' << m_met->nameOfComponent(ii)); } - if ( msgLvl() <= MSG::DEBUG ) msg() << MSG::DEBUG << "Setting energies and flag" << endmsg; - unsigned int muonComp = m_met->getNumberOfComponents() - 1; // Suggested by Diego: Checking the component name of the input - if( (m_met->nameOfComponent(muonComp)).substr(0,4)!="Muon") { - msg() << MSG::ERROR << "Could not find MET container with muon information!!! Exit..." << endmsg; + // Turns out to be a good test + if( (m_met->nameOfComponent(muonComp)).substr(0,4)!="Muon") + { + ATH_MSG_ERROR("Could not find MET container with muon information!!! Exit..."); return HLT::ErrorCode(HLT::Action::ABORT_CHAIN, HLT::Reason::BAD_JOB_SETUP); } - // Fetch Muon Components - // Set muon variables + // Fetch Muon Components and set muon variables m_met->setExComponent(muonComp,muon_ex); m_met->setEyComponent(muonComp,muon_ey); m_met->setEzComponent(muonComp,muon_ez); m_met->setSumEtComponent(muonComp,muon_sum_et); m_met->setSumEComponent(muonComp,muon_sum_e); - m_met->setUsedChannelsComponent(muonComp, Nmuons); + m_met->setUsedChannelsComponent(muonComp, nMuons); if (MuonError){ // set muon error bit flag |= m_maskErrMuon; flag |= m_maskCompErrors; } m_met->setFlag(flag); - if ( msgLvl() <= MSG::DEBUG ) msg() << MSG::DEBUG << "Setting energies and flag done." << endmsg; + ATH_MSG_DEBUG( "Setting energies and flag done."); if (msgLvl() <= MSG::DEBUG) { char buff[128]; std::snprintf(buff,128,"REGTEST: (Muon FEX) Event status = 0x%08x", (unsigned)flag); - msg() << MSG::DEBUG << buff << endmsg; - msg() << MSG::DEBUG << "REGTEST: (Muon FEX) Nmuons = " << Nmuons << endmsg; - if (Nmuons>0) { - msg() << MSG::DEBUG << "REGTEST: (Muon FEX) muon_ex = " << muon_ex*1e-3 << " GeV" << endmsg; - msg() << MSG::DEBUG << "REGTEST: (Muon FEX) muon_ey = " << muon_ey*1e-3 << " GeV" << endmsg; - msg() << MSG::DEBUG << "REGTEST: (Muon FEX) muon_ez = " << muon_ez*1e-3 << " GeV" << endmsg; - msg() << MSG::DEBUG << "REGTEST: (Muon FEX) muon_sum_et = " << muon_sum_et*1e-3 << " GeV" << endmsg; - msg() << MSG::DEBUG << "REGTEST: (Muon FEX) muon_sum_e = " << muon_sum_e*1e-3 << " GeV" << endmsg; + ATH_MSG_DEBUG( buff ); + ATH_MSG_DEBUG( "REGTEST: (Muon FEX) nMuons = " << nMuons ); + if (nMuons>0) { + ATH_MSG_DEBUG( "REGTEST: (Muon FEX) muon_ex = " << muon_ex*1e-3 << " GeV" ); + ATH_MSG_DEBUG( "REGTEST: (Muon FEX) muon_ey = " << muon_ey*1e-3 << " GeV" ); + ATH_MSG_DEBUG( "REGTEST: (Muon FEX) muon_ez = " << muon_ez*1e-3 << " GeV" ); + ATH_MSG_DEBUG( "REGTEST: (Muon FEX) muon_sum_et = " << muon_sum_et*1e-3 << " GeV" ); + ATH_MSG_DEBUG( "REGTEST: (Muon FEX) muon_sum_e = " << muon_sum_e*1e-3 << " GeV" ); } } // monitoring: log-scale quantities float epsilon = 1e-6; // 1 keV - - if (fabsf(m_mu_ex)>epsilon) - m_mu_ex_log = copysign(log10(fabsf(m_mu_ex)), m_mu_ex); - else - m_mu_ex_log = 0; - - if (fabsf(m_mu_ey)>epsilon) - m_mu_ey_log = copysign(log10(fabsf(m_mu_ey)), m_mu_ey); - else - m_mu_ey_log = 0; - - if (fabsf(m_mu_set)>epsilon) - m_mu_set_log = copysign(log10(fabsf(m_mu_set)), m_mu_set); - else - m_mu_set_log = 0; + m_mu_ex_log = fabsf( m_mu_ex)>epsilon ? copysign(log10(fabsf( m_mu_ex)), m_mu_ex) : 0; + m_mu_ey_log = fabsf( m_mu_ey)>epsilon ? copysign(log10(fabsf( m_mu_ey)), m_mu_ey) : 0; + m_mu_set_log = fabsf(m_mu_set)>epsilon ? copysign(log10(fabsf(m_mu_set)), m_mu_set) : 0; HLT::ErrorCode status = makeOutputTE(tes_in, type_out); if(status != HLT::OK) return status; @@ -423,25 +331,16 @@ HLT::ErrorCode TrigMissingETMuon::makeOutputTE(std::vector<std::vector<HLT::Trig HLT::ErrorCode status = HLT::OK; m_config->getNavigation()->copyAllFeatures(tes_in[0][0], outputTE); if (status != HLT::OK){ - msg() << MSG::ERROR - << "Write of xAOD::TrigMissingET feature into outputTE failed" - << endmsg; + ATH_MSG_ERROR("Write of xAOD::TrigMissingET feature into outputTE failed"); return status; } - // Some debug output: - if(msgLvl() <= MSG::DEBUG){ - msg() << MSG::DEBUG - << "We assume success, set TE with label " - << " active to signal positive result." - << endmsg; - } + ATH_MSG_DEBUG("We assume success, set TE with label active to signal positive result."); + // CACHING // if we got here, everything was okay. so, we cache the feature for further execution of this instance in e.g. other MET Sequences: - if (msgLvl() <= MSG::DEBUG) { - msg() << MSG::DEBUG << "Updated feature copied to output TE." << endmsg; - } + ATH_MSG_DEBUG("Updated feature copied to output TE."); m_useCachedResult = true; m_cachedTE = outputTE; diff --git a/Trigger/TrigAlgorithms/TrigMuSuperEF/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigAlgorithms/TrigMuSuperEF/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..b3ed46b4372bbd5d2d7e9dc07118e72fcb51257e --- /dev/null +++ b/Trigger/TrigAlgorithms/TrigMuSuperEF/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Trigger/TrigAlgorithms/TrigMuSuperEF diff --git a/Trigger/TrigAlgorithms/TrigMuonEF/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigAlgorithms/TrigMuonEF/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..ff684a30c12c48818dafedba3b245ce0032c827d --- /dev/null +++ b/Trigger/TrigAlgorithms/TrigMuonEF/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Trigger/TrigAlgorithms/TrigMuonEF diff --git a/Trigger/TrigAlgorithms/TrigMuonEF/CMakeLists.txt b/Trigger/TrigAlgorithms/TrigMuonEF/CMakeLists.txt index 7f51581ec6b7dbb1cb193441d53566e3df3ee35a..aee4a3328bcccb1682c7f23d9030e63c3cc1a130 100644 --- a/Trigger/TrigAlgorithms/TrigMuonEF/CMakeLists.txt +++ b/Trigger/TrigAlgorithms/TrigMuonEF/CMakeLists.txt @@ -13,6 +13,7 @@ atlas_depends_on_subdirs( PUBLIC Calorimeter/CaloEvent Control/AthenaBaseComps Control/AthenaKernel + Control/CxxUtils Control/StoreGate DetectorDescription/IRegionSelector Event/EventPrimitives diff --git a/Trigger/TrigAlgorithms/TrigMuonEF/src/InDetTrkRoiMaker.cxx b/Trigger/TrigAlgorithms/TrigMuonEF/src/InDetTrkRoiMaker.cxx index c390b495519e30090d4a71003dd2efc5205ff2fd..1d2d43fdfc1fcee7e8c97b8035f0f678806df614 100644 --- a/Trigger/TrigAlgorithms/TrigMuonEF/src/InDetTrkRoiMaker.cxx +++ b/Trigger/TrigAlgorithms/TrigMuonEF/src/InDetTrkRoiMaker.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include <cstdlib> @@ -8,16 +8,11 @@ #include "InDetTrkRoiMaker.h" #include "TrigSteeringEvent/TrigRoiDescriptor.h" -// can use standard TrigRoiDescriptor for this now -// #include "TrigSteeringEvent/TrigSuperRoi.h" -// #include "IRegionSelector/IRoiDescriptor.h" #include "TrigNavigation/TriggerElement.h" #include "TrigInDetEvent/TrigInDetTrackCollection.h" #include "EventPrimitives/EventPrimitivesHelpers.h" -const char* InDetTrkRoiMaker::s_scanModeNames[InDetTrkRoiMaker::kNumberOfModes] = { "FullScan", "SeededScan", "HybridScan" }; - namespace { inline std::string quote( const std::string& s ) { return "\"" + s + "\""; } } diff --git a/Trigger/TrigAlgorithms/TrigMuonEF/src/InDetTrkRoiMaker.h b/Trigger/TrigAlgorithms/TrigMuonEF/src/InDetTrkRoiMaker.h index 329fb32e13c4264112a53e1e17421d26de2e0e90..84c04b71042dcca177c8a71dede566238e52b4d2 100644 --- a/Trigger/TrigAlgorithms/TrigMuonEF/src/InDetTrkRoiMaker.h +++ b/Trigger/TrigAlgorithms/TrigMuonEF/src/InDetTrkRoiMaker.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef TRIGMUONEF_INDETTRKROIMAKER_H @@ -51,7 +51,7 @@ class InDetTrkRoiMaker : public HLT::FexAlgo { // // static data // - static const char* s_scanModeNames[kNumberOfModes]; + static constexpr const char* s_scanModeNames[kNumberOfModes]{ "FullScan", "SeededScan", "HybridScan" }; // // static functions diff --git a/Trigger/TrigAlgorithms/TrigMuonEF/src/TrigMuonEFCaloIsolation.cxx b/Trigger/TrigAlgorithms/TrigMuonEF/src/TrigMuonEFCaloIsolation.cxx index b49840fbaedeb805708df41e3b8882c29c98e9e2..ea1f2011c0a144a17a48b5991bd95d5957eae9ae 100644 --- a/Trigger/TrigAlgorithms/TrigMuonEF/src/TrigMuonEFCaloIsolation.cxx +++ b/Trigger/TrigAlgorithms/TrigMuonEF/src/TrigMuonEFCaloIsolation.cxx @@ -14,6 +14,8 @@ #include <iostream> #include <deque> +ATLAS_NO_CHECK_FILE_THREAD_SAFETY; // legacy trigger code + // ------------------------------------------------------------------------------------------------------ /** * Standard constructor for the calo isolation algo. diff --git a/Trigger/TrigAlgorithms/TrigMuonEF/src/TrigMuonEFCaloIsolation.h b/Trigger/TrigAlgorithms/TrigMuonEF/src/TrigMuonEFCaloIsolation.h index 6585fbb8dd079f97cf353b4ae4a536197aebc8b4..f7038dc2037422884d5701fdb7410ab2f24bf57f 100644 --- a/Trigger/TrigAlgorithms/TrigMuonEF/src/TrigMuonEFCaloIsolation.h +++ b/Trigger/TrigAlgorithms/TrigMuonEF/src/TrigMuonEFCaloIsolation.h @@ -13,6 +13,9 @@ #include "xAODCaloEvent/CaloClusterContainer.h" #include "CaloEvent/CaloCellContainer.h" +#include "CxxUtils/checker_macros.h" +ATLAS_NO_CHECK_FILE_THREAD_SAFETY; // legacy trigger code + class StoreGateSvc; class IsoMuonFeature; diff --git a/Trigger/TrigAlgorithms/TrigMuonEF/src/TrigMuonEFStandaloneTrackTool.cxx b/Trigger/TrigAlgorithms/TrigMuonEF/src/TrigMuonEFStandaloneTrackTool.cxx index 26f19d9abd6766d0be662700c893d5baab568d6a..ff1e1da6aece8a0d5e2c64226e9216f94ad8ecea 100644 --- a/Trigger/TrigAlgorithms/TrigMuonEF/src/TrigMuonEFStandaloneTrackTool.cxx +++ b/Trigger/TrigAlgorithms/TrigMuonEF/src/TrigMuonEFStandaloneTrackTool.cxx @@ -66,6 +66,8 @@ #include "TrigMuonEFUtils.icc" +ATLAS_NO_CHECK_FILE_THREAD_SAFETY; // legacy trigger code + #if DEBUG_ROI_VS_FULL #include <set> //used in the method sanity_check #endif diff --git a/Trigger/TrigAlgorithms/TrigMuonEF/src/TrigMuonEFStandaloneTrackTool.h b/Trigger/TrigAlgorithms/TrigMuonEF/src/TrigMuonEFStandaloneTrackTool.h index 3bad6a625fdc7862393c02dd2191fe96f1cbff50..a8a7a2660ceed7c5fffde2bd6e30ae6869327e9f 100644 --- a/Trigger/TrigAlgorithms/TrigMuonEF/src/TrigMuonEFStandaloneTrackTool.h +++ b/Trigger/TrigAlgorithms/TrigMuonEF/src/TrigMuonEFStandaloneTrackTool.h @@ -36,6 +36,9 @@ #include "MuonCombinedEvent/MuonCandidateCollection.h" #include <fstream> +#include "CxxUtils/checker_macros.h" +ATLAS_NO_CHECK_FILE_THREAD_SAFETY; // legacy trigger code + #define DEBUG_ROI_VS_FULL false /** diff --git a/Trigger/TrigAlgorithms/TrigPartialEventBuilding/src/PEBInfoWriterAlg.cxx b/Trigger/TrigAlgorithms/TrigPartialEventBuilding/src/PEBInfoWriterAlg.cxx index 42ea4e63556ab3fadf64fb2b6bc80b8ef8f4326f..9b288cf02da0b22b5372f19fbe02e2d015213201 100644 --- a/Trigger/TrigAlgorithms/TrigPartialEventBuilding/src/PEBInfoWriterAlg.cxx +++ b/Trigger/TrigAlgorithms/TrigPartialEventBuilding/src/PEBInfoWriterAlg.cxx @@ -92,7 +92,7 @@ StatusCode PEBInfoWriterAlg::execute(const EventContext& eventContext) const { // Link to new decision newd->setObjectLink("roi", roiEL); newd->setObjectLink("view", viewEL); - linkToPrevious(newd, decisionInput().key(), counter); + linkToPrevious(newd, previousDecision); ATH_MSG_DEBUG("REGTEST: View = " << (*viewEL)); ATH_MSG_DEBUG("REGTEST: RoI = eta/phi = " << (*roiEL)->eta() << "/" << (*roiEL)->phi()); diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/CMakeLists.txt b/Trigger/TrigAlgorithms/TrigT2CaloCommon/CMakeLists.txt index d288348a954ccaeae5e64ee2363fe54b6f9b097c..68614d53f6097cf5bc476f5fcef0cbca6699a3d1 100644 --- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/CMakeLists.txt +++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/CMakeLists.txt @@ -38,6 +38,7 @@ atlas_depends_on_subdirs( PUBLIC Database/AthenaPOOL/AthenaPoolUtilities Event/ByteStreamData LArCalorimeter/LArElecCalib + LArCalorimeter/LArBadChannelTool LArCalorimeter/LArIdentifier LArCalorimeter/LArRecConditions LArCalorimeter/LArRecUtils @@ -51,7 +52,7 @@ atlas_add_library( TrigT2CaloCommonLib src/*.cxx PUBLIC_HEADERS TrigT2CaloCommon INCLUDE_DIRS ${TDAQ-COMMON_INCLUDE_DIRS} - LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} CaloEvent CaloGeoHelpers CaloIdentifier AthenaBaseComps AthenaKernel IRegionSelector Identifier EventInfo xAODTrigCalo ZdcEvent GaudiKernel LArRecEvent TileEvent TrigSteeringEvent StoreGateLib SGtests ByteStreamCnvSvcBaseLib ZdcByteStreamLib ZdcRecLib LArByteStreamLib LArRawUtilsLib LArCablingLib TileByteStreamLib TrigInterfacesLib TrigTimeAlgsLib CaloDetDescrLib CaloUtilsLib ByteStreamData_test LArRecUtilsLib + LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} CaloEvent CaloGeoHelpers CaloIdentifier AthenaBaseComps AthenaKernel IRegionSelector Identifier EventInfo xAODTrigCalo ZdcEvent GaudiKernel LArRecEvent TileEvent TrigSteeringEvent StoreGateLib SGtests ByteStreamCnvSvcBaseLib ZdcByteStreamLib ZdcRecLib LArByteStreamLib LArRawUtilsLib LArCablingLib TileByteStreamLib TrigInterfacesLib TrigTimeAlgsLib CaloDetDescrLib CaloUtilsLib ByteStreamData_test LArRecUtilsLib PRIVATE_LINK_LIBRARIES AthenaPoolUtilities ByteStreamData LArIdentifier LArRecConditions TrigT1Interfaces ) atlas_add_component( TrigT2CaloCommon @@ -65,6 +66,13 @@ atlas_install_joboptions( share/*.py ) atlas_add_test( TestService SCRIPT test/test_dataaccess.sh + POST_EXEC_SCRIPT nopost.sh PROPERTIES TIMEOUT 1200) +atlas_add_test( TestServiceNewJO + SCRIPT test/test_dataaccessNewJO.sh + POST_EXEC_SCRIPT nopost.sh + PROPERTIES TIMEOUT 1200) + + diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/LArCellCont.h b/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/LArCellCont.h index 596b05ff65b39d9e25148ac9cfbf34b7365ac1a6..ab8f291d823c71c8fe2602a505d65d89e59ec177 100644 --- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/LArCellCont.h +++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/LArCellCont.h @@ -23,12 +23,13 @@ #include "LArByteStream/Hid2RESrcID.h" #include "Identifier/HWIdentifier.h" #include "CaloInterface/ICaloLumiBCIDTool.h" + #include <vector> class EventInfo; //class StoreGateSvc; class ILArBadChannelMasker; -class ILArBadChanTool; +class ILArBadFebMasker; static std::vector<float> corrBCIDref_example; /** Class which contains statically allocated LArCellCollections */ @@ -90,7 +91,7 @@ private: /** Hash ID Identifier mapping to collection index. */ LArRodIdHash m_hash; /** Hardware to Source ID conversion */ - mutable Hid2RESrcID m_conv; + Hid2RESrcID m_conv; /** FEB Hardware Identifier for second FEBs in a Collection */ std::vector<HWIdentifier> m_second; @@ -104,9 +105,9 @@ private: std::vector<DataVector<LArCell>*> m_vecs; /** A tool to help mask cells */ - ILArBadChannelMasker* m_masker; + const ILArBadChannelMasker *m_masker; /** A tool to help mask febs */ - ILArBadChanTool* m_badChanTool; + const ILArBadFebMasker *m_badFebMasker; /** List of Missing ROBs to be disabled at the RS */ std::vector<uint32_t> m_MissingROBs; /** hash references to BCID */ diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/python/TrigCaloDataAccessConfig.py b/Trigger/TrigAlgorithms/TrigT2CaloCommon/python/TrigCaloDataAccessConfig.py new file mode 100644 index 0000000000000000000000000000000000000000..79f5d951a4b95863e32b012a84d7989106c552c7 --- /dev/null +++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/python/TrigCaloDataAccessConfig.py @@ -0,0 +1,135 @@ +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator +def createLArRoI_Map( flags ): + acc = ComponentAccumulator() + from LArRawUtils.LArRawUtilsConf import LArRoI_Map + + from IOVDbSvc.IOVDbSvcConfig import addFolders + from LArCabling.LArCablingConfig import LArFebRodMappingCfg, LArCalibIdMappingCfg + # LArOnOffIdMappingCfg, LArOnOffIdMappingSCCfg + + from LArCabling.LArCablingConf import LArCablingLegacyService + cablingTool = LArCablingLegacyService() # this is realy a tool + # needed by above + acc.merge( LArFebRodMappingCfg( flags )[0] ) + acc.merge( LArCalibIdMappingCfg( flags )[0] ) + + from CaloTriggerTool.CaloTriggerToolConf import CaloTriggerTowerService + triggerTowerTool = CaloTriggerTowerService() + acc.merge(addFolders(flags, ['/LAR/Identifier/LArTTCellMapAtlas'], 'LAR')) + acc.merge(addFolders(flags, ['/LAR/Identifier/OnOffIdMap'], 'LAR')) + + acc.merge(addFolders(flags, ['/CALO/Identifier/CaloTTOnOffIdMapAtlas', + '/CALO/Identifier/CaloTTOnAttrIdMapAtlas', + '/CALO/Identifier/CaloTTPpmRxIdMapAtlas'], 'CALO')) + + LArRoI_Map = LArRoI_Map() + LArRoI_Map.CablingSvc = cablingTool + LArRoI_Map.TriggerTowerSvc = triggerTowerTool + acc.addPublicTool( LArRoI_Map ) # should become private tool + + return acc + +def trigCaloDataAccessSvcCfg( flags ): + + acc = ComponentAccumulator() + from TrigT2CaloCommon.TrigT2CaloCommonConf import TrigCaloDataAccessSvc + svc = TrigCaloDataAccessSvc() + + # since the svc depends on calo geometry configure it here + from LArGeoAlgsNV.LArGMConfig import LArGMCfg + acc.merge( LArGMCfg( flags ) ) + + from TileGeoModel.TileGMConfig import TileGMCfg + acc.merge( TileGMCfg( flags ) ) + acc.getService('GeoModelSvc').DetectorTools['TileDetectorTool'].GeometryConfig = 'RECO' + + from RegionSelector.RegSelConfig import RegSelConfig + acc.mergeAll( RegSelConfig( flags ) ) + + acc.merge( createLArRoI_Map( flags ) ) + + # Needed by LArBadChanLegacyTool, refrerenced from LArCellCont. + from IOVDbSvc.IOVDbSvcConfig import addFolders + acc.merge(addFolders(flags, ['/LAR/BadChannels/BadChannels'], 'LAR')) + acc.merge(addFolders(flags, ['/LAR/BadChannels/MissingFEBs'], 'LAR')) + + from TileConditions.TileConditionsConfig import tileCondCfg + acc.merge( tileCondCfg (flags) ) + + from AthenaMonitoring.GenericMonitoringTool import GenericMonitoringTool + import math + mon = GenericMonitoringTool("TrigCaloDataAccessSvcMon") + mon.defineHistogram("TIME_locking_LAr_RoI", + path="EXPERT", + title="Time spent in unlocking the LAr collection", + xbins=100, xmin=0, xmax=100 ), + mon.defineHistogram("roiROBs_LAr", + path="EXPERT", + title="Number of ROBs unpacked in RoI requests", + xbins=20, xmin=0, xmax=20 ), + mon.defineHistogram("TIME_locking_LAr_FullDet", + path="EXPERT", + title="Time spent in unlocking the LAr collection", + xbins=100, xmin=0, xmax=100 ), + mon.defineHistogram("roiEta_LAr,roiPhi_LAr", + type="TH2F", + path="EXPERT", + title="Geometric usage", + xbins=50, xmin=-5, xmax=5, + ybins=64, ymin=-math.pi, ymax=math.pi ) + svc.MonTool = mon + acc.addService( svc ) + return acc + + +if __name__ == "__main__": + from AthenaCommon.Configurable import Configurable + + Configurable.configurableRun3Behavior = True + from AthenaConfiguration.TestDefaults import defaultTestFiles + from AthenaConfiguration.AllConfigFlags import ConfigFlags + from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator + ConfigFlags.Input.Files = defaultTestFiles.RAW + ConfigFlags.Input.isMC=False + ConfigFlags.lock() + acc = ComponentAccumulator() + + from ByteStreamCnvSvc.ByteStreamConfig import TrigBSReadCfg + acc.merge( TrigBSReadCfg( ConfigFlags ) ) + + acc.merge( trigCaloDataAccessSvcCfg( ConfigFlags ) ) + + from TrigT2CaloCommon.TrigT2CaloCommonConf import TestCaloDataAccess + testAlg = TestCaloDataAccess() + acc.addEventAlgo(testAlg) + + # disable RegSel fro ID and muons, will change this to use flags once MR for it is integrated + regSel = acc.getService("RegSelSvc") + + regSel.enableID = False + regSel.enablePixel = False + regSel.enableSCT = False + regSel.enableTRT = False + regSel.enableMuon = False + regSel.enableRPC = False + regSel.enableMDT = False + regSel.enableTGC = False + regSel.enableCSC = False + + #acc.getService("MessageSvc").Format = "% F%60W%S%7W%R%T %0W%M" + #acc.MessageSvc.Format = "% F%60W%S%7W%R%T %0W%M" + + acc.printConfig(True) + + #print acc.getService("TrigCaloDataAccessSvc") + print acc.getPublicTool("LArRoI_Map") + + print "running this configuration" + of = open("test.pkl", "w") + acc.store(of) + of.close() + + + + diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/share/CaloCellMasking.py b/Trigger/TrigAlgorithms/TrigT2CaloCommon/share/CaloCellMasking.py index d39f9c882dafe648b6ee48fbe6abc9a310f03b1b..e38041b52e75eea8070d361e640b00bb7aeffd67 100644 --- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/share/CaloCellMasking.py +++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/share/CaloCellMasking.py @@ -1,18 +1,17 @@ include.block("TrigT2CaloCommon/CaloCellMasking.py") from AthenaCommon.AppMgr import ToolSvc #if not already imported -from LArBadChannelTool.LArBadChannelToolConf import LArBadChanLegacyTool, LArBadChannelMasker +from LArBadChannelTool.LArBadChannelToolConf import LArBadFebMasker, LArBadChannelMasker -ToolSvc+=LArBadChanLegacyTool("MyBadChanTool") -ToolSvc.MyBadChanTool.ReadFromASCII=False #Not necessary if you have already produced a database file -ToolSvc.MyBadChanTool.ComplementaryCoolFolder="/LAR/BadChannels/BadChannelsOnl" -#ToolSvc.MyBadChanTool.OutputLevel=VERBOSE -#ToolSvc.MyBadChanTool.OutputLevel=DEBUG +#The masker tool name must be "LArBadFebMasker", the same as retrieved in LArCellCont.cxx +ToolSvc+=LArBadFebMasker("LArBadFebMasker") +ToolSvc.LArBadFebMasker.DoMasking = False #Masking can easily be turned on and off here. +#ToolSvc.LArBadFebMasker.OutputLevel=DEBUG #The masker tool name must be "LArBadChannelMasker", the same as retrieved in LArCellCont.cxx ToolSvc+=LArBadChannelMasker("LArBadChannelMasker") ToolSvc.LArBadChannelMasker.ProblemsToMask=["unstable", "short", "highNoiseHG", "highNoiseMG","highNoiseLG", "problematicForUnknownReason"] #See LArBadChanBitPacking.cxx for the list of strings that can be used. -ToolSvc.LArBadChannelMasker.DoMasking = True #Masking can easily be turned on and off here. +ToolSvc.LArBadChannelMasker.DoMasking = False #Masking can easily be turned on and off here. #ToolSvc.LArBadChannelMasker.OutputLevel=DEBUG #IOVDbSvc=theApp.service('IOVDbSvc') diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/LArCellCont.cxx b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/LArCellCont.cxx index 746d4c9d5788c297f2dacbbb2e709636e55faf11..3e6ce6c58cfba6200a87d2f89162b9e254abc315 100644 --- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/LArCellCont.cxx +++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/LArCellCont.cxx @@ -11,7 +11,7 @@ #include "LArRawUtils/LArRoI_Map.h" #include "LArRecUtils/MakeLArCellFromRaw.h" #include "LArRecConditions/ILArBadChannelMasker.h" -#include "LArRecConditions/ILArBadChanTool.h" +#include "LArBadChannelTool/LArBadFebMasker.h" #include "CaloUtils/CaloCellCorrection.h" #include "GaudiKernel/ListItem.h" #include "EventInfo/EventInfo.h" @@ -21,7 +21,7 @@ #include <iostream> //#include <time.h> -LArCellCont::LArCellCont() : m_event(0), m_masker(NULL), m_badChanTool(NULL), m_corrBCIDref( corrBCIDref_example ), m_caloLumiBCIDTool(0), m_lumi_block(0), m_bcid(5000), m_larCablingSvc(0), m_BCIDcache(false) +LArCellCont::LArCellCont() : m_event(0), m_corrBCIDref( corrBCIDref_example ), m_caloLumiBCIDTool(nullptr), m_lumi_block(0), m_bcid(5000), m_larCablingSvc(nullptr), m_BCIDcache(false) {} StatusCode @@ -120,15 +120,16 @@ makeCell.initialize( roiMap, &LArCellCorrTools, 0 ); sc = toolSvc->retrieveTool("LArBadChannelMasker", m_masker); bool doCellMasking = sc.isSuccess() && m_masker->isMaskingOn(); -if(!sc.isSuccess()) //not a critical error. LArCellCont can proceed as usual, without masking. - std::cout << "LArCellCont\t\t INFO \t Failed to retrieve LArBadChannelMasker - no masking will be done." << std::endl; +if(!sc.isSuccess()) //not a critical error. LArCellCont can proceed as usual, without masking. + std::cout << "LArCellCont\t\t INFO \t Failed to retrieve LArBadChannelMasker - no masking will be done." << std::endl; +std::cout << "doCellMasking "<<doCellMasking<<std::endl; - -sc = toolSvc->retrieveTool("LArBadChanLegacyTool/MyBadChanTool", m_badChanTool); +sc = toolSvc->retrieveTool("LArBadFebMasker", m_badFebMasker); bool toolAvailable = sc.isSuccess(); -if(!sc.isSuccess()) //not a critical error. LArCellCont can proceed as usual, without masking. - std::cout << "LArCellCont\t\t INFO \t Failed to retrieve LArBadChanTool - no masking will be done." << std::endl; +if(!sc.isSuccess()) //not a critical error. LArCellCont can proceed as usual, without masking. + std::cout << "LArCellCont\t\t INFO \t Failed to retrieve LArBadFebMasker - no masking will be done." << std::endl; +std::cout <<"toolAvailable "<<toolAvailable<<std::endl; std::vector<uint32_t> RobsFromMissingFeb; @@ -172,10 +173,10 @@ m_hashSym.resize(onlineId->febHashMax()); //for(std::vector<HWIdentifier>::const_iterator i=larFEBs.begin();i!=larFEBs.end();i++){ for (unsigned iFeb=0;iFeb<onlineId->febHashMax();++iFeb) { const HWIdentifier febid=onlineId->feb_Id(IdentifierHash(iFeb)); - if( (toolAvailable && (m_badChanTool->febMissing(febid)) ) || !toolAvailable ){ + if( (toolAvailable && (m_badFebMasker->febMissing(febid)) ) || !toolAvailable ){ RobsFromMissingFeb.push_back( m_conv.getRobID( m_conv.getRodID( febid ) ) ); } - if( (toolAvailable && !(m_badChanTool->febMissing(febid)) ) || !toolAvailable ){ + if( (toolAvailable && !(m_badFebMasker->febMissing(febid)) ) || !toolAvailable ){ // get RodID associated with the collection HWIdentifier rodId = m_larCablingSvc->getReadoutModuleID(febid); unsigned int rodId32 = m_conv.getRodIDFromROM(rodId); diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TestCaloDataAccess.cxx b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TestCaloDataAccess.cxx index 99ac204d60a5bcca8c1124f405019def259a745c..c9f6ea6b9e3dcb8bff79169870c70f32e1d43c75 100644 --- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TestCaloDataAccess.cxx +++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TestCaloDataAccess.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include <iostream> #include "tbb/parallel_reduce.h" @@ -16,8 +16,7 @@ // little code to generate random numbers // in gaussian form instead of uniform distribution // used to generate RoIs. mu=mediam; sigma; -double -randn (double mu, double sigma) +double randn (double mu, double sigma) { double U1, U2, W, mult; static double X1, X2; @@ -47,8 +46,8 @@ randn (double mu, double sigma) } -#define DIFF(_name, _a, _b) if ( _a != _b ) \ - m_msg << MSG::WARNING << "Difference in " << _name << " " << _a << " ref " << _b << endmsg; \ +#define DIFF(_name, _a, _b) if ( _a != _b ) \ + m_msg << MSG::WARNING << "Difference in " << _name << " " << _a << " ref " << _b << endmsg; \ else \ m_msg << MSG::DEBUG << "Identical " << _name << " " << _a << " ref " << _b << endmsg; @@ -67,75 +66,78 @@ public: m_svc( svc ), m_msg( msg ), m_roi ( roi ) { - m_colRef = new ConstDataVector<CaloCellContainer>(SG::VIEW_ELEMENTS); - } + m_colRef = new ConstDataVector<CaloCellContainer>(SG::VIEW_ELEMENTS); + } ~AskForRoI() { - if ( m_colRef ) { m_colRef->clear(); delete m_colRef; } + if ( m_colRef ) { m_colRef->clear(); delete m_colRef; } } StatusCode request( LArTT_Selector<LArCellCont>& sel ) const { - if ( m_roi.isFullscan() ){ + if ( m_roi.isFullscan() ){ std::cout << "wrong RoI descriptor used for RoI" << std::endl; return StatusCode::FAILURE; - } - else{ + } + else{ // keep this for test reasons //usleep (5000); return m_svc->loadCollections( m_context, m_roi, TTEM, 2, sel ); - } } + } StatusCode request( ConstDataVector<CaloCellContainer>& c ) const { - if ( m_roi.isFullscan() ){ - m_svc->loadFullCollections( m_context, c ); - return StatusCode::SUCCESS; - } - else{ + if ( m_roi.isFullscan() ){ + return m_svc->loadFullCollections( m_context, c ); + } + else{ std::cout << "wrong RoI descriptor used for FS" << std::endl; return StatusCode::FAILURE; - } } + } // calculate reference quantities in the first call void firstCall() override { + Gaudi::Hive::setCurrentContext (m_context); if ( m_roi.isFullscan() ) { - struct timeval t1,t2; - gettimeofday(&t1,NULL); - m_statusRef = request( *m_colRef ); - gettimeofday(&t2,NULL); - - for ( const auto cell : *m_colRef ) { - if ( !cell ) continue; - m_etSumRef += cell->et(); - m_countRef ++; - m_minEtaRef = std::min( m_minEtaRef, cell->eta() ); - m_maxEtaRef = std::max( m_maxEtaRef, cell->eta() ); - m_minPhiRef = std::min( m_minPhiRef, cell->phi() ); - m_maxPhiRef = std::max( m_maxPhiRef, cell->phi() ); - } - std::cout << "t lFC : " << m_context << " " << m_etSumRef << " " << t1.tv_sec << " " << t1.tv_usec << " " << t2.tv_sec << " " << t2.tv_usec << " " << ((t2.tv_sec-t1.tv_sec)*1e6+(t2.tv_usec-t1.tv_usec) )*1e-6 << std::endl; - + struct timeval t1,t2; + gettimeofday(&t1,NULL); + m_statusRef = request( *m_colRef ); + m_statusRef.ignore(); + gettimeofday(&t2,NULL); + + for ( const auto cell : *m_colRef ) { + if ( !cell ) continue; + m_etSumRef += cell->et(); + m_countRef ++; + m_minEtaRef = std::min( m_minEtaRef, cell->eta() ); + m_maxEtaRef = std::max( m_maxEtaRef, cell->eta() ); + m_minPhiRef = std::min( m_minPhiRef, cell->phi() ); + m_maxPhiRef = std::max( m_maxPhiRef, cell->phi() ); + } + std::cout << "t lFC : " << m_context << " " << m_etSumRef << " " << t1.tv_sec << " " << t1.tv_usec << " " << t2.tv_sec << " " << t2.tv_usec << " " << ((t2.tv_sec-t1.tv_sec)*1e6+(t2.tv_usec-t1.tv_usec) )*1e-6 << std::endl; + } else { - - struct timeval t1,t2; - gettimeofday(&t1,NULL); - m_statusRef = request( m_selRef ); - gettimeofday(&t2,NULL); - - for ( const auto cell : m_selRef ) { - m_etSumRef += cell->et(); - m_countRef ++; - m_minEtaRef = std::min( m_minEtaRef, cell->eta() ); - m_maxEtaRef = std::max( m_maxEtaRef, cell->eta() ); - m_minPhiRef = std::min( m_minPhiRef, cell->phi() ); - m_maxPhiRef = std::max( m_maxPhiRef, cell->phi() ); - } - std::cout << "t RoI : " << m_context << " " << m_etSumRef << " " << t1.tv_sec << " " << t1.tv_usec << " " << t2.tv_sec << " " << t2.tv_usec << " " << ((t2.tv_sec-t1.tv_sec)*1e6+(t2.tv_usec-t1.tv_usec) )*1e-6 << std::endl; + + struct timeval t1,t2; + gettimeofday(&t1,NULL); + m_statusRef = request( m_selRef ); + m_statusRef.ignore(); + gettimeofday(&t2,NULL); + + for ( const auto cell : m_selRef ) { + m_etSumRef += cell->et(); + m_countRef ++; + m_minEtaRef = std::min( m_minEtaRef, cell->eta() ); + m_maxEtaRef = std::max( m_maxEtaRef, cell->eta() ); + m_minPhiRef = std::min( m_minPhiRef, cell->phi() ); + m_maxPhiRef = std::max( m_maxPhiRef, cell->phi() ); + } + std::cout << "t RoI : " << m_context << " " << m_etSumRef << " " << t1.tv_sec << " " << t1.tv_usec << " " << t2.tv_sec << " " << t2.tv_usec << " " << ((t2.tv_sec-t1.tv_sec)*1e6+(t2.tv_usec-t1.tv_usec) )*1e-6 << std::endl; } } bool callAndCompare() const override { + Gaudi::Hive::setCurrentContext (m_context); LArTT_Selector<LArCellCont> sel; ConstDataVector<CaloCellContainer> col(SG::VIEW_ELEMENTS); double etSum = 0; @@ -146,30 +148,32 @@ public: double maxPhi = -100; StatusCode status; if ( m_roi.isFullscan() ) { - status = request( col ); - - for ( const auto cell : col ) { - if ( !cell ) continue; - etSum += cell->et(); - count ++; - minEta = std::min( minEta, cell->eta() ); - maxEta = std::max( maxEta, cell->eta() ); - minPhi = std::min( minPhi, cell->phi() ); - maxPhi = std::max( maxPhi, cell->phi() ); - } + status = request( col ); + status.ignore(); + + for ( const auto cell : col ) { + if ( !cell ) continue; + etSum += cell->et(); + count ++; + minEta = std::min( minEta, cell->eta() ); + maxEta = std::max( maxEta, cell->eta() ); + minPhi = std::min( minPhi, cell->phi() ); + maxPhi = std::max( maxPhi, cell->phi() ); + } } else { - - status = request( sel ); - - for ( const auto cell : sel ) { - etSum += cell->et(); - count ++; - minEta = std::min( minEta, cell->eta() ); - maxEta = std::max( maxEta, cell->eta() ); - minPhi = std::min( minPhi, cell->phi() ); - maxPhi = std::max( maxPhi, cell->phi() ); - } - std::cout << "callAndCompare : " << m_context << " " << count << " " << etSum << " " << minEta << " " << maxEta << " " << minPhi << " " << maxPhi << " " << " " << m_minEtaRef << " " << m_maxEtaRef << " " << m_minPhiRef << " " << m_maxPhiRef << " " << m_etSumRef << " " << m_countRef << std::endl; + + status = request( sel ); + status.ignore(); + + for ( const auto cell : sel ) { + etSum += cell->et(); + count ++; + minEta = std::min( minEta, cell->eta() ); + maxEta = std::max( maxEta, cell->eta() ); + minPhi = std::min( minPhi, cell->phi() ); + maxPhi = std::max( maxPhi, cell->phi() ); + } + std::cout << "callAndCompare : " << m_context << " " << count << " " << etSum << " " << minEta << " " << maxEta << " " << minPhi << " " << maxPhi << " " << " " << m_minEtaRef << " " << m_maxEtaRef << " " << m_minPhiRef << " " << m_maxPhiRef << " " << m_etSumRef << " " << m_countRef << std::endl; } DIFF( "RoI mask", status.getCode(), m_statusRef.getCode() ); @@ -224,7 +228,7 @@ private: }; TestCaloDataAccess::TestCaloDataAccess( const std::string& name, - ISvcLocator* pSvcLocator ) : + ISvcLocator* pSvcLocator ) : ::AthReentrantAlgorithm( name, pSvcLocator ), m_dataAccessSvc( "TrigCaloDataAccessSvc/TrigCaloDataAccessSvc", name ), m_emulateRoIs ( true ), @@ -252,46 +256,46 @@ void TestCaloDataAccess::emulateRoIs( const EventContext& context, std::vector<P double chance = ((double) rand () / RAND_MAX); double width = 0.1; TrigRoiDescriptor roi( RoI_eta1, RoI_eta1-width, RoI_eta1+width, // eta - RoI_phi1, RoI_phi1-width, RoI_phi1+width, // phi - 0 ); + RoI_phi1, RoI_phi1-width, RoI_phi1+width, // phi + 0 ); AskForRoI* afr = new AskForRoI( context, m_dataAccessSvc, msg(), roi ); allRoIs.push_back( afr ); chance = ((double) rand () / RAND_MAX); if ( chance > 0.6 ) { - double RoI_eta2 = -RoI_eta1 + randn(0,0.2); - double RoI_phi2 = -RoI_phi1 + randn(0,0.2); - if ( RoI_eta2 < -2.5 ) RoI_eta2 = -2.5; - if ( RoI_eta2 > 2.5 ) RoI_eta2 = 2.5; - TrigRoiDescriptor roi( RoI_eta2, RoI_eta2-width, RoI_eta2+width, // eta - RoI_phi2, RoI_phi2-width, RoI_phi2+width, // phi - 0 ); - AskForRoI* afr = new AskForRoI( context, m_dataAccessSvc, msg(), roi ); - allRoIs.push_back( afr ); + double RoI_eta2 = -RoI_eta1 + randn(0,0.2); + double RoI_phi2 = -RoI_phi1 + randn(0,0.2); + if ( RoI_eta2 < -2.5 ) RoI_eta2 = -2.5; + if ( RoI_eta2 > 2.5 ) RoI_eta2 = 2.5; + TrigRoiDescriptor roi( RoI_eta2, RoI_eta2-width, RoI_eta2+width, // eta + RoI_phi2, RoI_phi2-width, RoI_phi2+width, // phi + 0 ); + AskForRoI* afr = new AskForRoI( context, m_dataAccessSvc, msg(), roi ); + allRoIs.push_back( afr ); } for(int i=0;i<10;i++){ - chance = ((double) rand () / RAND_MAX); - if ( chance > 0.75 ) { - double RoI_phi3 = M_PI*(-1.0 + ((double) rand () / RAND_MAX) * 2); - double RoI_eta3 = randn(0,1.7); - if ( RoI_eta3 < -2.5 ) RoI_eta3 = -2.5; - if ( RoI_eta3 > 2.5 ) RoI_eta3 = 2.5; - width = 0.1; - if ( chance > 0.8 ) width=0.3; - TrigRoiDescriptor roi( RoI_eta3, RoI_eta3-width, RoI_eta3+width, // eta + chance = ((double) rand () / RAND_MAX); + if ( chance > 0.75 ) { + double RoI_phi3 = M_PI*(-1.0 + ((double) rand () / RAND_MAX) * 2); + double RoI_eta3 = randn(0,1.7); + if ( RoI_eta3 < -2.5 ) RoI_eta3 = -2.5; + if ( RoI_eta3 > 2.5 ) RoI_eta3 = 2.5; + width = 0.1; + if ( chance > 0.8 ) width=0.3; + TrigRoiDescriptor roi( RoI_eta3, RoI_eta3-width, RoI_eta3+width, // eta RoI_phi3, RoI_phi3-width, RoI_phi3+width, // phi 0 ); - AskForRoI* afr = new AskForRoI( context, m_dataAccessSvc, msg(), roi ); - allRoIs.push_back( afr ); - } + AskForRoI* afr = new AskForRoI( context, m_dataAccessSvc, msg(), roi ); + allRoIs.push_back( afr ); + } } chance = ((double) rand () / RAND_MAX); if ( chance > 0.6 ) { - TrigRoiDescriptor roi( true ); - AskForRoI* afr = new AskForRoI( context, m_dataAccessSvc, msg(), roi ); - allRoIs.push_back( afr ); + TrigRoiDescriptor roi( true ); + AskForRoI* afr = new AskForRoI( context, m_dataAccessSvc, msg(), roi ); + allRoIs.push_back( afr ); } } @@ -300,25 +304,25 @@ void TestCaloDataAccess::emulateFixedRoIs( const EventContext& context, std::vec std::vector<TrigRoiDescriptor> rois; TrigRoiDescriptor roi1( 0.7, 0.7-0.1, 0.7+0.1, // eta - 0.1, 0.1-0.1, 0.1+0.1, // phi - 0 ); + 0.1, 0.1-0.1, 0.1+0.1, // phi + 0 ); TrigRoiDescriptor roi2( 0.8, 0.8-0.2, 0.7+0.2, // eta - 0.2, 0.2-0.2, 0.2+0.2, // phi - 0 ); + 0.2, 0.2-0.2, 0.2+0.2, // phi + 0 ); TrigRoiDescriptor roi3( -1.7, -1.7-0.4, -1.7+0.4, // eta - 2.1, 2.1-0.4, 2.1+0.4, // phi - 0 ); + 2.1, 2.1-0.4, 2.1+0.4, // phi + 0 ); TrigRoiDescriptor roi4( -1.0, -1.0-1.4, -1.0+1.4, // eta - 1.1, 1.1-1.4, 1.1+1.4, // phi - 0 ); + 1.1, 1.1-1.4, 1.1+1.4, // phi + 0 ); rois.push_back(roi1); rois.push_back(roi2); rois.push_back(roi3); rois.push_back(roi4); TrigRoiDescriptor roi5( true ); for( int i=0;i<std::min(m_nFixedRoIs,4);++i) { - AskForRoI* t1 = new AskForRoI( context, m_dataAccessSvc, msg(), rois[i]); - allRoIs.push_back(t1); + AskForRoI* t1 = new AskForRoI( context, m_dataAccessSvc, msg(), rois[i]); + allRoIs.push_back(t1); } AskForRoI* t6 = new AskForRoI( context, m_dataAccessSvc, msg(), roi5); // FS allRoIs.push_back(t6); diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigCaloDataAccessSvc.cxx b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigCaloDataAccessSvc.cxx index e12b73cce3791b52afcd162be5b6eb1dfbed55ae..689fda41a0a3de1c7036c0beaf318c8158f049e4 100644 --- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigCaloDataAccessSvc.cxx +++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigCaloDataAccessSvc.cxx @@ -36,8 +36,9 @@ StatusCode TrigCaloDataAccessSvc::finalize() { EventContext ec; ec.setSlot( slot ); HLTCaloEventCache *cache = m_hLTCaloSlot.get( ec ); - cache->larContainer->finalize(); + CHECK( cache->larContainer->finalize() ); delete cache->larContainer; + CHECK( cache->tileContainer->finalize() ); delete cache->tileContainer; cache->lastFSEvent = 0xFFFFFFFF; delete cache->fullcont; @@ -547,7 +548,7 @@ unsigned int TrigCaloDataAccessSvc::prepareLArCollections( const EventContext& c m_robDataProvider->addROBData( requestROBs ); m_robDataProvider->getROBData( context, requestROBs, robFrags ); } - if ( robFrags.empty() ) { + if ( robFrags.empty() && (!requestROBs.empty()) ) { return 0x1; // dummy code } diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/test/test_dataaccessNewJO.sh b/Trigger/TrigAlgorithms/TrigT2CaloCommon/test/test_dataaccessNewJO.sh new file mode 100755 index 0000000000000000000000000000000000000000..1cda679309a46d5459b381e99d6d59650222ac08 --- /dev/null +++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/test/test_dataaccessNewJO.sh @@ -0,0 +1,16 @@ +#!/bin/sh +# art-type: build +# art-ci: master +rm -rf test.pkl +python -m TrigT2CaloCommon.TrigCaloDataAccessConfig +STA=$? +if [ ${STA} -ne 0 ] +then + echo "Failed configuring job, status", ${STA} + exit -1 +fi + +echo "configuration stored in the pickle" +confTool.py --print test.pkl +echo "running athena " +athena test.pkl \ No newline at end of file diff --git a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/python/TrigEgammaProbelist.py b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/python/TrigEgammaProbelist.py index 7a86304b75c82b4998fed73fa60e20203ec8152d..c0e9cfe8cca733442ba604187a026c2f51a0bdcf 100644 --- a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/python/TrigEgammaProbelist.py +++ b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/python/TrigEgammaProbelist.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration # this file contains the useful lists of triggers for quick configuration # and a default monitoring configuration @@ -514,3 +514,38 @@ monitoringTP_electron_extra =[ ] +### Make supproting trigger list for the emulation e/g tool +supportingTriggerList = probeListLowMidPtSupportingTriggers+probeListHighPtSupportingTriggers +# Update the supporting list with very loose chains. This will be used in data collisin matches +for trig in probeListLowMidPtPhysicsTriggers+probeListHighPtPhysicsTriggers: + if 'vloose' in trig: supportingTriggerList.append(trig) + +supportingTriggerList.extend( [ + 'HLT_e24_lhvloose_nod0_L1EM20VH', + 'HLT_e26_lhvloose_nod0_L1EM20VH', + 'HLT_e28_lhvloose_nod0_L1EM20VH', + 'HLT_e140_lhvloose_nod0', + 'HLT_e10_lhvloose_nod0_L1EM7', + 'HLT_e10_lhvloose_nod0_L1EM7', + 'HLT_e15_lhvloose_nod0_L1EM7', + 'HLT_e20_lhvloose_nod0_L1EM12', + 'HLT_e25_lhvloose_nod0_L1EM15', + 'HLT_e30_lhvloose_nod0_L1EM15', + 'HLT_e40_lhvloose_nod0_L1EM15', + 'HLT_e50_lhvloose_nod0_L1EM15', + 'HLT_e70_lhvloose_nod0', + 'HLT_e80_lhvloose_nod0', + 'HLT_e100_lhvloose_nod0', + 'HLT_e120_lhvloose_nod0', + 'HLT_e5_lhvloose_nod0', + 'HLT_e12_lhvloose_nod0_L1EM10VH', + 'HLT_e17_lhvloose_nod0', + 'HLT_e20_lhvloose_nod0', + 'HLT_e40_lhvloose_nod0', + 'HLT_e60_lhvloose_nod0', +] ) + + + + + diff --git a/Trigger/TrigAnalysis/TrigEgammaEmulationTool/Root/TrigEgammaL2CaloRingerSelectorTool.cxx b/Trigger/TrigAnalysis/TrigEgammaEmulationTool/Root/TrigEgammaL2CaloRingerSelectorTool.cxx index cd4c9c9fe1d339518e180bce34cdadfed9127a54..e4fb9df3e559268f9711173cd3580ea423dbb10f 100644 --- a/Trigger/TrigAnalysis/TrigEgammaEmulationTool/Root/TrigEgammaL2CaloRingerSelectorTool.cxx +++ b/Trigger/TrigAnalysis/TrigEgammaEmulationTool/Root/TrigEgammaL2CaloRingerSelectorTool.cxx @@ -35,7 +35,6 @@ TrigEgammaL2CaloRingerSelectorTool( const std::string& myname ) declareProperty("CalibPathThresholds", m_calibPath_thresholds="" ); m_output = 0; - m_reader.setMsgStream(msg()); m_useLumiVar=false; m_useEtaVar=false; diff --git a/Trigger/TrigAnalysis/TrigEgammaEmulationTool/src/components/TrigEgammaEmulationTool_entries.cxx b/Trigger/TrigAnalysis/TrigEgammaEmulationTool/src/components/TrigEgammaEmulationTool_entries.cxx index 48096f245b992d54b05ec3efcd4963030f953c01..34ac185a9d3a9db48aff619f14c253a9738c4c64 100644 --- a/Trigger/TrigAnalysis/TrigEgammaEmulationTool/src/components/TrigEgammaEmulationTool_entries.cxx +++ b/Trigger/TrigAnalysis/TrigEgammaEmulationTool/src/components/TrigEgammaEmulationTool_entries.cxx @@ -24,4 +24,5 @@ DECLARE_COMPONENT( Trig::TrigEgammaEFElectronSelectorTool ) DECLARE_COMPONENT( Trig::TrigEgammaEFPhotonSelectorTool ) DECLARE_COMPONENT( Trig::TrigEgammaEmulationToolTest ) DECLARE_COMPONENT( Trig::TrigEgammaEmulationToolAlg ) +DECLARE_COMPONENT( Trig::TrigEgammaIsolationSelectorTool ) diff --git a/Trigger/TrigConfiguration/TrigConfBase/CMakeLists.txt b/Trigger/TrigConfiguration/TrigConfBase/CMakeLists.txt index 53fda6af915f2811af29b4875104c5bc175f5470..c52c4ed3c685047f0fa246989216787e49e4fa55 100644 --- a/Trigger/TrigConfiguration/TrigConfBase/CMakeLists.txt +++ b/Trigger/TrigConfiguration/TrigConfBase/CMakeLists.txt @@ -1,4 +1,3 @@ -# $Id: CMakeLists.txt 777942 2016-10-12 01:14:44Z krasznaa $ ################################################################################ # Package: TrigConfBase ################################################################################ @@ -7,15 +6,25 @@ atlas_subdir( TrigConfBase ) # External dependencies: -find_package( Boost COMPONENTS regex ) +find_package( Boost COMPONENTS regex thread ) # Component(s) in the package: atlas_add_library( TrigConfBase TrigConfBase/*.h src/*.cxx Root/*.cxx PUBLIC_HEADERS TrigConfBase - PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} - PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ) + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} + LINK_LIBRARIES ${Boost_LIBRARIES} ) -atlas_add_executable( trigconf_msgsvc_test - test/trigconf_msgsvc_test.cxx +atlas_install_joboptions( share/*.py ) + +# Tests: +atlas_add_component( TrigConfBaseTest + test/TrigConfMsgAlg.cxx + LINK_LIBRARIES TrigConfBase AthenaBaseComps ) + +atlas_add_test( trigconf_msg_standalone_test + SOURCES test/trigconf_msgsvc_test.cxx LINK_LIBRARIES TrigConfBase ) + +atlas_add_test( trigconf_msg_athena_test + SCRIPT athena.py TrigConfBase/test_TrigConfMsgAlg.py ) diff --git a/Trigger/TrigConfiguration/TrigConfBase/Root/MsgStream.cxx b/Trigger/TrigConfiguration/TrigConfBase/Root/MsgStream.cxx index 8d508fb7abd69756ba0b7f34e3daa7be19c4c3f5..98b503b93ec84ba15e22b2793821161bc4334436 100644 --- a/Trigger/TrigConfiguration/TrigConfBase/Root/MsgStream.cxx +++ b/Trigger/TrigConfiguration/TrigConfBase/Root/MsgStream.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include <iostream> @@ -15,28 +15,28 @@ using namespace TrigConf; class IMessageSvc; /** Some weak symbol referencing magic... - * These are declared in AthenaKernel/getMessageSvc.h and will be non-NULL in case + * These are declared in AthenaKernel/getMessageSvc.h and will be non-nullptr in case * the GaudiSvc/AthenaKernel shared libraries have been loaded. */ namespace Athena { IMessageSvc* getMessageSvc(bool) __attribute__((weak)); void reportMessage(IMessageSvc*, const std::string&, int, const std::string&) __attribute__((weak)); - int outputLevel(IMessageSvc*, const std::string&) __attribute__((weak)); + int outputLevel(const IMessageSvc*, const std::string&) __attribute__((weak)); void setOutputLevel(IMessageSvc*, const std::string&, int) __attribute__((weak)); } -/** Global pointer to MessageSvc and helper to fill it - */ + namespace { - IMessageSvc* p_msgsvc; - inline void getMessageSvc() { - // If we haven't found a MessageSvc try to find one - if (p_msgsvc==0 && Athena::getMessageSvc!=NULL) { - p_msgsvc = Athena::getMessageSvc(/*quiet=*/true); - } + + /// Helper to get MessageSvc if running in athena environment + static IMessageSvc* getMessageSvc() { + static IMessageSvc* const msgsvc = + Athena::getMessageSvc!=nullptr ? Athena::getMessageSvc(/*quiet=*/true) : nullptr; + return msgsvc; } - const char* levelNames[MSGTC::NUM_LEVELS] = {"NIL","VERBOSE","DEBUG","INFO", - "WARNING","ERROR","FATAL","ALWAYS"}; + + static const char* const levelNames[MSGTC::NUM_LEVELS] = + {"NIL","VERBOSE","DEBUG","INFO","WARNING","ERROR","FATAL","ALWAYS"}; } MsgStreamTC::MsgStreamTC(const std::string& name) : @@ -44,31 +44,25 @@ MsgStreamTC::MsgStreamTC(const std::string& name) : m_msgLevel(MSGTC::INFO), m_name(name) { - getMessageSvc(); // Initialize our own OutputLevel to the global one from the MessageSvc - m_level = (Athena::outputLevel!=NULL) ? MSGTC::Level(Athena::outputLevel(p_msgsvc, m_name)) : MSGTC::INFO; + m_level = (Athena::outputLevel!=nullptr) ? MSGTC::Level(Athena::outputLevel(getMessageSvc(), m_name)) : MSGTC::INFO; } // Set message level of stream void MsgStreamTC::setLevel(MSGTC::Level lvl) { lvl = (lvl >= MSGTC::NUM_LEVELS) ? MSGTC::ALWAYS : (lvl<MSGTC::NIL) ? MSGTC::NIL : lvl; m_level = lvl; - getMessageSvc(); - if (p_msgsvc) { - Athena::setOutputLevel(p_msgsvc, m_name, m_level); + if (getMessageSvc()) { + Athena::setOutputLevel(getMessageSvc(), m_name, m_level); } } - - void MsgStreamTC::doOutput() { - getMessageSvc(); - if (p_msgsvc) { - Athena::reportMessage(p_msgsvc, m_name, m_msgLevel, str()); + if (getMessageSvc()) { + Athena::reportMessage(getMessageSvc(), m_name, m_msgLevel, str()); } else { - // later use ERS here (ERS needs to be a third case, we also need simple cout) std::ios::fmtflags f( std::cout.flags() ); std::cout << std::setw(m_width) << std::left << m_name << " " << levelNames[m_msgLevel] << " " << str() << std::endl; std::cout.flags(f); diff --git a/Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..8f85a4555c6068f30befb609412717d78fe40286 --- /dev/null +++ b/Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Trigger/TrigConfiguration/TrigConfBase diff --git a/Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h b/Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h index 0d8f0590d349d17e2f0a2edba0f4dc7f5b2fc756..32f9b71500356e0fa855d6c9e4e6a1ccb00a7402 100644 --- a/Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h +++ b/Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h @@ -1,17 +1,13 @@ -// -*- C++ -*- - /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef TRIGCONFBASE_MSGSTREAM_H #define TRIGCONFBASE_MSGSTREAM_H 1 /** * @file TrigConfBase/MsgStream.h - * @brief MsgStream for DetCommon + * @brief MsgStream for TrigConf classes * @author Frank Winklmeier - * - * $Id$ */ #include <sstream> @@ -36,19 +32,18 @@ namespace TrigConf { } /** - * MsgStreamTC class to be used in DetCommon equivalant to Gaudi's MsgStream + * MsgStreamTC class to be used in TrigConf equivalent to Gaudi's MsgStream * * The usage and behavior is identical to the default Gaudi message stream. * If the code is run within a Gaudi/Athena environment, the MsgStreamTC will * try to print its messages via the Gaudi MessageSvc. This is achieved via - * weak linking. In a non-Gaudi/Athena environemt ERS will be used. + * weak linking. In a non-Gaudi/Athena environment std::cout will be used. * The class can be used directly or better via inheriting from * TrigConf::TrigConfMessaging, which is the equivalent of AthMessaging. * * Main difference to Gaudi MsgStream: * - OutputLevel cannot be configued via job options, instead the - * gloabal OutputLevel of the MessageSvc is being used - * - Only supports endmsg and not the the deprecated endmsg + * global OutputLevel of the MessageSvc is being used */ class MsgStreamTC : public std::ostringstream { public: diff --git a/Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/TrigConfMessaging.h b/Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/TrigConfMessaging.h index 13ea7dc791b908c109e00d13477d9db41a7889ae..1c4142933e2d9b6e468dc7cedc8c2b0613d8bcf6 100644 --- a/Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/TrigConfMessaging.h +++ b/Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/TrigConfMessaging.h @@ -1,7 +1,5 @@ -// -*- C++ -*- - /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef TRIGCONFBASE_TRIGCONFMESSAGING_H @@ -9,22 +7,23 @@ /** * @file TrigConfMessaging.h - * @brief Messaging base class for DetCommon (copy of AthMessaging) - * @author Frank Winklmeier (original author Sebastien Binet) + * @brief Messaging base class for TrigConf code shared with Lvl1 ( AthMessaging) + * @author Frank Winklmeier * - * $Id$ */ #include <string> +#include <boost/thread/tss.hpp> #include "TrigConfBase/MsgStream.h" #include "TrigConfBase/MsgStreamMacros.h" -namespace TrigConf { +namespace TrigConf { /** - * Class to provide easy access to TrigConf::MsgStream within DetCommon + * Class to provide easy access to TrigConf::MsgStream for TrigConf classes * - * This is a copy&paste of AthMessaging and used in exactly the same way. + * This is a copy&paste of AthMessaging and used in exactly the same way but + * without introducing Gaudi/Athena dependencies. */ class TrigConfMessaging { public: @@ -33,7 +32,6 @@ namespace TrigConf { * @param name Component name used in the messages */ TrigConfMessaging (const std::string& name) : - m_msg(name), m_name(name) {} @@ -48,7 +46,7 @@ namespace TrigConf { bool msgLvl (const MSGTC::Level lvl) const; /** The standard message stream. - * Returns a reference to the default message stream + * Returns a reference to the message stream * May not be invoked before sysInitialize() has been invoked. */ MsgStreamTC& msg() const; @@ -59,21 +57,20 @@ namespace TrigConf { */ MsgStreamTC& msg (const MSGTC::Level lvl) const; - private: - TrigConfMessaging( const TrigConfMessaging& rhs ); //> not implemented - TrigConfMessaging& operator=( const TrigConfMessaging& rhs ); //> not implemented + private: + TrigConfMessaging() = delete; + TrigConfMessaging( const TrigConfMessaging& rhs ) = delete; + TrigConfMessaging& operator=( const TrigConfMessaging& rhs ) = delete; - private: - /// MsgStreamTC instance (a std::cout like with print-out levels) - mutable MsgStreamTC m_msg; + mutable boost::thread_specific_ptr<MsgStreamTC> m_msg_tls; std::string m_name; }; inline bool TrigConfMessaging::msgLvl (const MSGTC::Level lvl) const { - if (m_msg.level() <= lvl) { - m_msg << lvl; + if (msg().level() <= lvl) { + msg() << lvl; return true; } else { @@ -83,12 +80,17 @@ namespace TrigConf { inline MsgStreamTC& TrigConfMessaging::msg() const { - return m_msg; + MsgStreamTC* ms = m_msg_tls.get(); + if (!ms) { + ms = new MsgStreamTC(m_name); + m_msg_tls.reset(ms); + } + return *ms; } inline MsgStreamTC& TrigConfMessaging::msg (const MSGTC::Level lvl) const { - return m_msg << lvl; + return msg() << lvl; } } // namespace TrigConf diff --git a/Trigger/TrigConfiguration/TrigConfBase/share/test_TrigConfMsgAlg.py b/Trigger/TrigConfiguration/TrigConfBase/share/test_TrigConfMsgAlg.py new file mode 100644 index 0000000000000000000000000000000000000000..006a849bb059ead61b88d11c60f58fed61deca9f --- /dev/null +++ b/Trigger/TrigConfiguration/TrigConfBase/share/test_TrigConfMsgAlg.py @@ -0,0 +1,9 @@ +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + +from AthenaCommon.AlgSequence import AlgSequence +job = AlgSequence() + +from TrigConfBase.TrigConfBaseTestConf import TrigConfMsgAlg +job += TrigConfMsgAlg() + +theApp.EvtMax = 2 diff --git a/Trigger/TrigConfiguration/TrigConfBase/share/trigconf_msg_athena_test.ref b/Trigger/TrigConfiguration/TrigConfBase/share/trigconf_msg_athena_test.ref new file mode 100644 index 0000000000000000000000000000000000000000..3fee3247a19a14271a024c917032e73516fe95a9 --- /dev/null +++ b/Trigger/TrigConfiguration/TrigConfBase/share/trigconf_msg_athena_test.ref @@ -0,0 +1,29 @@ +Py:Athena INFO executing ROOT6Setup +ApplicationMgr INFO Application Manager Configured successfully +AthDictLoaderSvc INFO in initialize... +AthDictLoaderSvc INFO acquired Dso-registry +CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1) +CoreDumpSvc INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) +HistogramPersis...WARNING Histograms saving not required. +ApplicationMgr INFO Application Manager Initialized successfully +ApplicationMgr INFO Application Manager Started successfully +AthenaEventLoopMgr INFO ===>>> start of run 1 <<<=== +AthenaEventLoopMgr INFO ===>>> start processing event #1, run #1 0 events processed so far <<<=== +TrigConfMsgAlg INFO Next message is printed via TrigConfMessaging: +TrigConfMsgAlg INFO An INFO message +AthenaEventLoopMgr INFO ===>>> done processing event #1, run #1 1 events processed so far <<<=== +AthenaEventLoopMgr INFO ===>>> start processing event #2, run #1 1 events processed so far <<<=== +TrigConfMsgAlg INFO Next message is printed via TrigConfMessaging: +TrigConfMsgAlg INFO An INFO message +AthenaEventLoopMgr INFO ===>>> done processing event #2, run #1 2 events processed so far <<<=== +ApplicationMgr INFO Application Manager Stopped successfully +AthDictLoaderSvc INFO in finalize... +ToolSvc INFO Removing all tools created by ToolSvc +*****Chrono***** INFO **************************************************************************************************** +*****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) +*****Chrono***** INFO **************************************************************************************************** +*****Chrono***** INFO **************************************************************************************************** +ChronoStatSvc.f... INFO Service finalized successfully +ApplicationMgr INFO Application Manager Finalized successfully +ApplicationMgr INFO Application Manager Terminated successfully +Py:Athena INFO leaving with code 0: "successful run" diff --git a/Trigger/TrigConfiguration/TrigConfBase/share/trigconf_msg_standalone_test.ref b/Trigger/TrigConfiguration/TrigConfBase/share/trigconf_msg_standalone_test.ref new file mode 100644 index 0000000000000000000000000000000000000000..5fddab96d70eed13bfdf65fb5af686ca60bad7a8 --- /dev/null +++ b/Trigger/TrigConfiguration/TrigConfBase/share/trigconf_msg_standalone_test.ref @@ -0,0 +1,4 @@ +MyClass INFO This is a INFO message +MyClass ERROR ERROR message via message stream macros +MyClass WARNING WARNING message +MyData INFO INFO message via MsgStream diff --git a/Trigger/TrigConfiguration/TrigConfBase/test/TrigConfMsgAlg.cxx b/Trigger/TrigConfiguration/TrigConfBase/test/TrigConfMsgAlg.cxx new file mode 100644 index 0000000000000000000000000000000000000000..24ea6bfae540a7485f6225531aca692b1af3f95d --- /dev/null +++ b/Trigger/TrigConfiguration/TrigConfBase/test/TrigConfMsgAlg.cxx @@ -0,0 +1,43 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#include "AthenaBaseComps/AthAlgorithm.h" +#include "TrigConfBase/TrigConfMessaging.h" + +/** + * TrigConfMessaging athena-based testing + * + * Simple testing algorithm to make sure that messages printed via + * TrigConfMessaging are indeed output via the Gaudi MessageSvc. + */ + +class MyClass : public TrigConf::TrigConfMessaging { +public: + MyClass(const std::string& name) : TrigConf::TrigConfMessaging(name) {} + + void print() const { + TRG_MSG_INFO("An INFO message"); + TRG_MSG_DEBUG("A DEBUG message (should not be visible by default)"); + } +}; + +class TrigConfMsgAlg : public AthAlgorithm { +public: + TrigConfMsgAlg(const std::string& name, ISvcLocator* svcLoc) : + AthAlgorithm(name, svcLoc), + m_class(name) + {} + + virtual StatusCode execute() override + { + ATH_MSG_INFO("Next message is printed via TrigConfMessaging:"); + m_class.print(); + return StatusCode::SUCCESS; + } + +private: + MyClass m_class; +}; + +DECLARE_COMPONENT(TrigConfMsgAlg) diff --git a/Trigger/TrigConfiguration/TrigConfData/CMakeLists.txt b/Trigger/TrigConfiguration/TrigConfData/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..c3c71b0df561f13849977389cc0519c09f136074 --- /dev/null +++ b/Trigger/TrigConfiguration/TrigConfData/CMakeLists.txt @@ -0,0 +1,23 @@ +################################################################################ +# Package: TrigConfData +################################################################################ + +# Declare the package name: +atlas_subdir( TrigConfData ) + +# Declare the package's dependencies: +atlas_depends_on_subdirs( CxxUtils ) + +# External dependencies: +find_package( Boost REQUIRED ) + +# Component(s) in the package: +atlas_add_library ( TrigConfData TrigConfData/*.h src/*.cxx + PUBLIC_HEADERS TrigConfData + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} + LINK_LIBRARIES ${Boost_LIBRARIES} ) + +atlas_add_test( ConstIter SOURCES test/itertest.cxx + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} + LINK_LIBRARIES ${Boost_LIBRARIES} TrigConfData + POST_EXEC_SCRIPT nopost.sh ) diff --git a/Trigger/TrigConfiguration/TrigConfData/TrigConfData/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigConfiguration/TrigConfData/TrigConfData/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..b6f30c083c08bb1f1a2c77907f453831c0e82e27 --- /dev/null +++ b/Trigger/TrigConfiguration/TrigConfData/TrigConfData/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Trigger/TrigConfiguration/TrigConfData diff --git a/Trigger/TrigConfiguration/TrigConfData/TrigConfData/ConstIter.h b/Trigger/TrigConfiguration/TrigConfData/TrigConfData/ConstIter.h new file mode 100644 index 0000000000000000000000000000000000000000..9d5cbbee6f3086000b9eea13138ce01abfaa5bd8 --- /dev/null +++ b/Trigger/TrigConfiguration/TrigConfData/TrigConfData/ConstIter.h @@ -0,0 +1,129 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef TRIGCONFDATA_CONSTITER_H +#define TRIGCONFDATA_CONSTITER_H + +/** + * @file TrigConfData/ConstIter.h + * @author J. Stelzer + * @date Feb 2019 + * @brief Forward iterator to traverse the main components of the trigger configuration + */ + +#include "CxxUtils/checker_macros.h" + +#include <functional> + +namespace TrigConf { + + /** + * @brief Forward iterator over an iterable of type @c V returning an object of type @c T + * + * By its nature this is a generator, returning values of type @c T, computed on the fly + * <https://en.wikipedia.org/wiki/Generator_(computer_programming)> + * + * Objects of type @c T must be creatable from @c V::value_type, either by having + * a constuctor T(V::valuetype) or by supplying an explicit conversion function to + * the constructor of the iterator + * + * This is being used by HLTMenu, @c L1Menu, and L1TopoMenu + */ + template<typename V, typename T> + class ConstIter final { + public: + /** + * @brief Constructor + * @param buf Reference to the underlying iterable data container + * @param offset Position of the current element at construction time + * @param f Function to create an object of type @c T from type @c V::value_type, the default calls a contstructor T(V::value_type) + * + * Iterators pointing to the front and back of the container, assuming that T can be created from the elements of V are created like this + *@code + ConstIter<V, T> begin( v ); + ConstIter<V, T> end( v, v.size() ); + @endcode + * + * An example for iterating over chains of an HLTMenu + *@code + ptree & chains = hltmenu.data().get_child("chains"); + ConstIter<ptree, TrigConf::HLTChain> begin( v, 0, [](auto x){return HLTChain(x.second)); + ConstIter<ptree, TrigConf::HLTChain> end( chains, chains.size(), [](auto x){return HLTChain(x.second) ); + *@endcode + */ + ConstIter( const V & buf, size_t offset = 0, + std::function<T(const typename V::value_type &)> f = [](auto x)->T{return {x};}) : + m_buf(buf), + m_offset(offset), + m_data(), + m_valid(false), + m_f(f), + m_bufIt(buf.begin()) + {} + + /** Destructor */ + ~ConstIter() + {} + + /** @brief Comparison operator */ + bool operator==(const ConstIter &i) { + return &i.m_buf == &m_buf && i.m_offset == m_offset; + } + + /** Not-equal operator */ + bool operator!=(const ConstIter &i) { + return !(*this == i); + } + + /** Pre-increment operator */ + ConstIter & operator++() { + ++m_offset; + ++m_bufIt; + m_valid = false; + return *this; + } + + /** Dereference operator + * Creates object of type @c T from the current object in the container on the fly using the creation function @c m_f + */ + const T & operator*() const { + if( ! m_valid ) { + m_data = m_f(*m_bufIt); + m_valid = true; + } + return m_data; + } + + private: + const V & m_buf; //!< Const reference to the underlying data container + std::size_t m_offset; //!< Current position of the iterator + mutable T m_data ATLAS_THREAD_SAFE; //!< Holder of the transformed data + mutable bool m_valid ATLAS_THREAD_SAFE; //!< indicates if data got transformed for current position + std::function<T(const typename V::value_type &)> m_f; //!< Function to turn a single datum from the container into the output type + typename V::const_iterator m_bufIt; //!< Iterator over the container + + }; + +} + +/** + * @brief Iterator traits for the above iterator + * + * note that the @c std::iterator will be deprecated in C++17 + */ +namespace std { + template<typename V, typename T> + class iterator_traits<TrigConf::ConstIter<V,T> > + { + public: + using difference_type = std::ptrdiff_t; + using size_type = std::size_t; + using value_type = const T; + using pointer = const T*; + using reference = const T&; + using iterator_category = std::random_access_iterator_tag; + }; +} + +#endif diff --git a/Trigger/TrigConfiguration/TrigConfData/TrigConfData/DataStructure.h b/Trigger/TrigConfiguration/TrigConfData/TrigConfData/DataStructure.h new file mode 100644 index 0000000000000000000000000000000000000000..3e5c1c35775ce06ed1d1f2bf74569d503bad20fa --- /dev/null +++ b/Trigger/TrigConfiguration/TrigConfData/TrigConfData/DataStructure.h @@ -0,0 +1,125 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef TRIGCONFDATA_DATASTRUCTURE +#define TRIGCONFDATA_DATASTRUCTURE + +/** + * @file TrigConfData/DataStructure.h + * @author J. Stelzer + * @date Feb 2019 + * @brief Base class for Trigger configuration data and wrapper around underlying representation + */ + +#include <iostream> +#include <vector> +#include "boost/property_tree/ptree.hpp" + +namespace TrigConf { + + /** + * @brief Base class for Trigger configuration data and wrapper around underlying representation + * + * Triggger configuration description data uses json format which can be represented + * as boost::ptree (or other formats if ATLAS decides to support those) + * + * The class acts as layer to shield the clients of the trigger configuration from the concrete + * representation of the transient configuration data + * + * Configuration data is typically recursive, meaning that sub-configurations can also be expressed + * as DataStructure objects. Therefore this class also is base class to all other classes describing + * parts of the trigger configuration in this package + * + * Detailed information can be found under + * <https://twiki.cern.ch/twiki/bin/view/Atlas/TriggerConfigurationAccess> + */ + class DataStructure { + public: + + using ptree = boost::property_tree::ptree; + + /** Default constructor, leading to an uninitialized configuration object */ + DataStructure(); + + /** Constructor initialized with configuration data + * @param data Reference to the data container + */ + DataStructure(const ptree &); + + /** Destructor */ + virtual ~DataStructure(); + + /** @brief Setting the configuration data */ + void setData(const ptree & data); + + /** Clearing the configuration data + * + * leads to an uninitialized object + */ + void clear(); + + /** Access to the underlying data, if needed */ + const ptree & data() const { return m_data; } + + /** Access to simple attribute */ + std::string operator[](const std::string & key) const; + + /** Access to array structure + * @param pathToChild The path to the configuration child, relative to the current one in form "path.to.child" + * @param ignoreIfMissing Controls the behavior in case of missing configuration child + * + * In case the child is missing and @c ignoreIfMissing is set to @c true, and empty vector + * will be returned. Otherwise a runtime exception will be thrown. + */ + std::vector<DataStructure> getList(const std::string & pathToChild, bool ignoreIfMissing = false) const; + + /** Access to configuration object + * @param pathToChild The path to the configuration child, relative to the current one + * @param ignoreIfMissing Controls the behavior in case of missing configuration child + * + * In case the child is missing and @c ignoreIfMissing is set to @c true, an uninitialized + * @c DataStructure will be returned. Otherwise a runtime exception will be thrown. + *@code + *bool ignoreIfMissing = true; + *if( const DataStructure & child = ds.getObject("path.to.child", ignoreIfMissing) ) { + * cout << child["key"] << endl; + *} + *@endcode + **/ + DataStructure getObject(const std::string & pathToChild, bool ignoreIfMissing = false) const; + + /** Access to initialized state */ + explicit operator bool() const { return m_initialized; } + + /** Check if children exist */ + bool empty() const { return m_data.empty(); } + + /* Print this object including children + * @param os The output stream + */ + void print(std::ostream & os = std::cout) const; + + /** Static function to print a @c ptree object + * @param key The key of this data as found in the parent structure + * @param data The ptree to print + * @param level The substruture level used to indent the output + * @param os The output stream + */ + static void printElement(const std::string& key, + const ptree & data, + uint level = 0, + std::ostream & os = std::cout); + + protected: + + bool m_initialized { false }; //!< if initialized, the underlying ptree is valid (can be empty) + + ptree m_data; //!< object holding the configuration data + + }; + +} + + +#endif diff --git a/Trigger/TrigConfiguration/TrigConfData/TrigConfData/HLTChain.h b/Trigger/TrigConfiguration/TrigConfData/TrigConfData/HLTChain.h new file mode 100644 index 0000000000000000000000000000000000000000..1ffd558c3057b1c0c05a9d4941158728d989e674 --- /dev/null +++ b/Trigger/TrigConfiguration/TrigConfData/TrigConfData/HLTChain.h @@ -0,0 +1,53 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef TRIGCONFDATA_HLTCHAIN_H +#define TRIGCONFDATA_HLTCHAIN_H + +#include "TrigConfData/DataStructure.h" + +namespace TrigConf { + + /** + * @brief HLT chain configuration + * + * Provides access to the name and counter of the HLT chain, to + * the seeding L1 item and to the connected output streams and chain groups. + */ + class HLTChain final : virtual public DataStructure { + public: + + /** Constructor */ + HLTChain(); + + /** Constructor initialized with configuration data + * @param data The data containing the HLT chain configuration + */ + HLTChain(const boost::property_tree::ptree & data); + + /** Destructor */ + ~HLTChain(); + + /** Accessor to the chain name */ + const std::string & name() const; + + /** Accessor to the chain counter + * + * The chain counter is unique with the menu + */ + unsigned int counter() const; + + /** Accessor to the seeding L1 item */ + const std::string & l1item() const; + + /** Accessor to the connected output streams */ + std::vector<DataStructure> streams() const; + + /** Accessor to the groups this chain belongs to */ + std::vector<std::string> groups() const; + }; + +} + +#endif diff --git a/Trigger/TrigConfiguration/TrigConfData/TrigConfData/HLTMenu.h b/Trigger/TrigConfiguration/TrigConfData/TrigConfData/HLTMenu.h new file mode 100644 index 0000000000000000000000000000000000000000..98433f4c0ebf9650788f98775c8c4985360acd2d --- /dev/null +++ b/Trigger/TrigConfiguration/TrigConfData/TrigConfData/HLTMenu.h @@ -0,0 +1,57 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef TRIGCONFDATA_HLTMENU_H +#define TRIGCONFDATA_HLTMENU_H + +#include "TrigConfData/ConstIter.h" +#include "TrigConfData/DataStructure.h" +#include "TrigConfData/HLTChain.h" + +namespace TrigConf { + + /** + * @brief HLT menu configuration + * + * Provides access to menu attributes like its name and to the trigger chains + */ + class HLTMenu final : virtual public DataStructure { + public: + + /** Constructor */ + HLTMenu(); + + /** Constructor initialized with configuration data + * @param data The data containing the HLT menu + */ + HLTMenu(const ptree & data); + + /** Destructor */ + ~HLTMenu(); + + /** Accessor to the menu name */ + std::string name() const; + + /** Accessor to the number of HLT chains */ + std::size_t size() const; + + /** Iterator over the HLT chains */ + using const_iterator = ConstIter<ptree, HLTChain>; + + /** Begin of the HLT chains list + * + * Needed for range-based loops + */ + const_iterator begin() const; + + /** End of the HLT chains list + * + * Needed for range-based loops + */ + const_iterator end() const; + }; + +} + +#endif diff --git a/Trigger/TrigConfiguration/TrigConfData/TrigConfData/L1Item.h b/Trigger/TrigConfiguration/TrigConfData/TrigConfData/L1Item.h new file mode 100644 index 0000000000000000000000000000000000000000..003ef0a04580bf44756847ebf35fdbd53bbfe196 --- /dev/null +++ b/Trigger/TrigConfiguration/TrigConfData/TrigConfData/L1Item.h @@ -0,0 +1,67 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef TRIGCONFDATA_L1ITEM_H +#define TRIGCONFDATA_L1ITEM_H + +#include "TrigConfData/DataStructure.h" + +namespace TrigConf { + + /** + * @brief L1 threshold configuration + * + * Provides access to the L1 item name and ID and the deadtime settings, + * trigger type, logic, and partition. + */ + class L1Item final : virtual public DataStructure { + public: + + /** Constructor */ + L1Item(); + + /** Constructor initialized with configuration data + * @param data The data containing the L1 item configuration + */ + L1Item(const ptree & data); + + /** Destrutor */ + ~L1Item(); + + /** Accessor to the item name */ + const std::string & name() const; + + /** Accessor to the CTP ID */ + unsigned int ctpId() const; + + /** Accessor to the item definition */ + const std::string & definition() const; + + /** Accessor to the complex deadtime + * + * This can be 0 or 1, but 1 has never been used so far + */ + unsigned int complexDeadtime() const; + + /** Accessor to the item monitoring definition */ + const std::string & monitor() const; + + /** Accessor to the item partition */ + unsigned int partition() const; + + /** Accessor to the item triggerType */ + const std::string & triggerType() const; + + /** Accessor to the item logic + * + * The current description of the logic is rather complex and + * difficult to parse and should be redesigned. + */ + DataStructure logic() const; + + }; + +} + +#endif diff --git a/Trigger/TrigConfiguration/TrigConfData/TrigConfData/L1Menu.h b/Trigger/TrigConfiguration/TrigConfData/TrigConfData/L1Menu.h new file mode 100644 index 0000000000000000000000000000000000000000..b90cf64372d995918202f8bb04dd114b2f5da3b3 --- /dev/null +++ b/Trigger/TrigConfiguration/TrigConfData/TrigConfData/L1Menu.h @@ -0,0 +1,70 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef TRIGCONFDATA_L1MENU_H +#define TRIGCONFDATA_L1MENU_H + +#include "TrigConfData/ConstIter.h" +#include "TrigConfData/DataStructure.h" +#include "TrigConfData/L1Item.h" +#include "TrigConfData/L1Threshold.h" + +#include <vector> + +namespace TrigConf { + + /** + * @brief L1 menu configuration + * + * Provides access to menu name and ctpVersion and to the L1 items and thresholds + */ + class L1Menu final : virtual public DataStructure { + public: + + /** Constructor */ + L1Menu(); + + /** Constructor initialized with configuration data + * @param data The data containing the L1 menu + */ + L1Menu(const ptree & data); + + /** Destructor */ + ~L1Menu(); + + /** Accessor to the menu name */ + std::string name() const; + + /** Accessor to the menu version */ + unsigned int version() const; + + /** Accessor to the version of the CTP format */ + unsigned int ctpVersion() const; + + /** Accessor to the number of L1 items */ + std::size_t size() const; + + /** Iterator over the L1 items */ + using const_iterator = ConstIter<ptree, L1Item>; + + /** Begin of the L1 items list + * + * Needed for range-based loops + */ + const_iterator begin() const; + + /** End of the L1 items list + * + * Needed for range-based loops + */ + const_iterator end() const; + + /** List of L1 thresholds */ + std::vector<TrigConf::L1Threshold> thresholds() const; + + }; + +} + +#endif diff --git a/Trigger/TrigConfiguration/TrigConfData/TrigConfData/L1Threshold.h b/Trigger/TrigConfiguration/TrigConfData/TrigConfData/L1Threshold.h new file mode 100644 index 0000000000000000000000000000000000000000..16c9ab023bee8ec63aeccdb8bdc8b23eec25b29a --- /dev/null +++ b/Trigger/TrigConfiguration/TrigConfData/TrigConfData/L1Threshold.h @@ -0,0 +1,64 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef TRIGCONFDATA_L1THRESHOLD_H +#define TRIGCONFDATA_L1THRESHOLD_H + +#include "TrigConfData/DataStructure.h" +#include <vector> + +namespace TrigConf { + + /** + * @brief L1 threshold configuration + * + * Provides access to the L1Topo algorithm name and type and the selection parameters, + * input and output collections. Can hold sorting and decision algorithms + */ + class L1Threshold final : public DataStructure { + public: + + /** Constructor */ + L1Threshold(); + + /** Constructor initialized with configuration data + * @param data The data containing the L1 threshold + */ + L1Threshold(const ptree & data); + + /** Destructor */ + ~L1Threshold(); + + /** Accessor to the threshold name */ + const std::string & name() const; + + /** Accessor to the threshold type */ + const std::string & type() const; + + /** Accessor to the input board type */ + const std::string & input() const; + + /** Accessor to the mapping number + * + * The mapping is unique within a type + */ + unsigned int mapping() const; + + /** Accessor to the threshold ID */ + unsigned int id() const; + + /** Accessor to the list of threshold values */ + std::vector<DataStructure> thresholdValues() const; + + /** Accessor to the cabling information + * + * If no cabling information is available then bool(cable()) is false + */ + DataStructure cable() const; + + }; + +} + +#endif diff --git a/Trigger/TrigConfiguration/TrigConfData/TrigConfData/L1TopoAlgorithm.h b/Trigger/TrigConfiguration/TrigConfData/TrigConfData/L1TopoAlgorithm.h new file mode 100644 index 0000000000000000000000000000000000000000..c2313c8b4e00a89f2d2cdcd76412cfd213f2e1c8 --- /dev/null +++ b/Trigger/TrigConfiguration/TrigConfData/TrigConfData/L1TopoAlgorithm.h @@ -0,0 +1,58 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef TRIGCONFDATA_L1TOPOALGORITHM_H +#define TRIGCONFDATA_L1TOPOALGORITHM_H + +#include "TrigConfData/DataStructure.h" +#include <vector> + +namespace TrigConf { + + /** + * @brief L1Topo algorithm configuration + * + * Provides access to the L1Topo algorithm name and type and the selection parameters, + * input and output collections. Can hold sorting and decision algorithms + */ + class L1TopoAlgorithm final : virtual public DataStructure { + public: + + /** Constructor */ + L1TopoAlgorithm(); + + /** Constructor initialized with configuration data + * @param data The data containing the L1Topo menu + */ + L1TopoAlgorithm(const ptree & data); + + /** Destructor */ + ~L1TopoAlgorithm(); + + /** Accessor to algorithm index */ + unsigned int algId() const; + + /** Accessor to algorithm name */ + const std::string & name() const; + + /** Accessor to algorithm class type */ + const std::string & type() const; + + /** Accessor to list of input data collections */ + std::vector<DataStructure> inputs() const; + + /** Accessor to output collection */ + DataStructure outputs() const; + + /** Accessor to generic parameters */ + std::vector<DataStructure> generics() const; + + /** Accessor to register parameters which can change for each algorithm instance */ + std::vector<DataStructure> parameters() const; + + }; + +} + +#endif diff --git a/Trigger/TrigConfiguration/TrigConfData/TrigConfData/L1TopoMenu.h b/Trigger/TrigConfiguration/TrigConfData/TrigConfData/L1TopoMenu.h new file mode 100644 index 0000000000000000000000000000000000000000..191f6878dc91c3ba5757f7cfcc3a7250fe2a7b93 --- /dev/null +++ b/Trigger/TrigConfiguration/TrigConfData/TrigConfData/L1TopoMenu.h @@ -0,0 +1,70 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef TRIGCONFDATA_L1TOPOMENU_H +#define TRIGCONFDATA_L1TOPOMENU_H + +#include "TrigConfData/ConstIter.h" +#include "TrigConfData/DataStructure.h" +#include "TrigConfData/L1TopoOutput.h" +#include "TrigConfData/L1TopoAlgorithm.h" + +#include <vector> + +namespace TrigConf { + + /** + * @brief L1Topo menu configuration + * + * Provides access to menu name and to the L1Topo putput lines + */ + class L1TopoMenu final : virtual public DataStructure { + public: + + /** Constructor */ + L1TopoMenu(); + + /** Constructor initialized with configuration data + * @param data The data containing the L1Topo menu + */ + L1TopoMenu(const ptree & data); + + /** Destructor */ + ~L1TopoMenu(); + + /** Accessor to the menu name */ + std::string name() const; + + /** Accessor to the menu version */ + unsigned int version() const; + + /** Access to the number of L1TopoOutput lines */ + std::size_t size() const; + + /** Iterator over the L1Topo output lines */ + using const_iterator = ConstIter<ptree, L1TopoOutput>; + + /** Begin of the L1Topo output lines list + * + * Needed for range-based loops + */ + const_iterator begin() const; + + /** End of the L1Topo output lines list + * + * Needed for range-based loops + */ + const_iterator end() const; + + /** List of sorting algorithms */ + std::vector<TrigConf::L1TopoAlgorithm> sortingAlgorithms() const; + + /** List of decision algorithms */ + std::vector<TrigConf::L1TopoAlgorithm> decisionAlgorithms() const; + + }; + +} + +#endif diff --git a/Trigger/TrigConfiguration/TrigConfData/TrigConfData/L1TopoOutput.h b/Trigger/TrigConfiguration/TrigConfData/TrigConfData/L1TopoOutput.h new file mode 100644 index 0000000000000000000000000000000000000000..cd7eed3632695555beb657f62601b110e3e94130 --- /dev/null +++ b/Trigger/TrigConfiguration/TrigConfData/TrigConfData/L1TopoOutput.h @@ -0,0 +1,72 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef TRIGCONFDATA_L1TOPOOUTPUT_H +#define TRIGCONFDATA_L1TOPOOUTPUT_H + +#include "TrigConfData/DataStructure.h" + +namespace TrigConf { + + /** + * @brief L1Topo output line configuration + * + * Provides access to the name of the trigger line, to the connected algorithm + * and the lines the signals are being sent on. + */ + class L1TopoOutput final : virtual public DataStructure { + public: + /** Constructor */ + L1TopoOutput(); + + /** Constructor initialized with configuration data + * @param data The data containing the L1Topo output line + */ + L1TopoOutput(const boost::property_tree::ptree & data); + + /** Destructor */ + ~L1TopoOutput(); + + /** Accessor to the algorithm name */ + const std::string & algName() const; + + /** Accessor to the algorithm name */ + unsigned int algId() const; + + /** Accessor to the clock the signals are sent on + * + * The clock is 0 or 1. In case of multiple output signals from + * the same algorithm, they are all on the same clock + */ + unsigned int clock() const; + + /** Accessor to the cable bit of the first signal + * + * In case of multiple signals, they are consecutive, starting at this bit. + */ + unsigned int firstBit() const; + + /** Accessor to the FPGA number + * + * The FPGA number can be 0 or 1 + */ + unsigned int fpga() const; + + /** Accessor to the board number + * + * The board number can be 0 or 1 + */ + unsigned int board() const; + + /** Accessor to the algorithm trigger lines + * + * Comma-separated list of line names + */ + const std::string & triggerLines() const; + + }; + +} + +#endif diff --git a/Trigger/TrigConfiguration/TrigConfData/src/DataStructure.cxx b/Trigger/TrigConfiguration/TrigConfData/src/DataStructure.cxx new file mode 100644 index 0000000000000000000000000000000000000000..433f9827ab1303b338b5d29eaff8cf49ca0187d4 --- /dev/null +++ b/Trigger/TrigConfiguration/TrigConfData/src/DataStructure.cxx @@ -0,0 +1,142 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#include <iostream> +#include "TrigConfData/DataStructure.h" +#include <boost/property_tree/json_parser.hpp> + +using TV = boost::property_tree::ptree::value_type; // tree-value type +using namespace std; + +TrigConf::DataStructure::DataStructure() +{} + +TrigConf::DataStructure::DataStructure(const ptree & data) : + m_initialized(true), + m_data(data) +{} + +TrigConf::DataStructure::~DataStructure() +{} + +void +TrigConf::DataStructure::setData(const ptree & data) +{ + m_initialized = true; + m_data = data; +} + + +void +TrigConf::DataStructure::clear() +{ + m_initialized = false; + m_data.clear(); +} + +std::string +TrigConf::DataStructure::operator[](const std::string & key) const +{ + const auto & obj = m_data.get_child(key); + // check if the key points to a plain string value + if ( !obj.empty() ) { + if ( obj.front().first.empty() ) { + throw runtime_error(string("Structure \"") + key + "\" is not a simple attribute but a list [], it needs to be accessed via getList(\"" + key + "\") -> vector<DataStructure>"); + } else { + throw runtime_error(string("Structure \"") + key + "\" is not a simple attribute but an object {}, it needs to be accessed via getObject(\"" + key + "\") -> DataStructure"); + } + } + + return obj.data(); +} + +std::vector<TrigConf::DataStructure> +TrigConf::DataStructure::getList(const std::string & pathToChild, bool ignoreIfMissing) const +{ + std::vector<TrigConf::DataStructure> childList; + const auto & list = m_data.get_child_optional(pathToChild); + if( ! list ) { + if ( ignoreIfMissing ) { + return childList; + } else { + throw runtime_error(string("Structure \"") + pathToChild + "\" does not exist."); + } + } + + // check if the pathToChild points to a list + if ( list.get().empty() ) { + throw runtime_error(string("Structure \"") + pathToChild + "\" is not a list [] but a simple attribute, it needs to be accessed via [\"" + pathToChild + "\"] -> string"); + } else if ( ! list.get().front().first.empty() ) { + throw runtime_error(string("Structure \"") + pathToChild + "\" is not a list [] but an object {}, it needs to be accessed via getObject(\"" + pathToChild + "\") -> DataStructure"); + } + + childList.reserve(list.get().size()); + + for( auto & childData : list.get() ) + childList.emplace_back( childData.second ); + + return childList; +} + + +TrigConf::DataStructure +TrigConf::DataStructure::getObject(const std::string & pathToChild, bool ignoreIfMissing) const +{ + const auto & obj = m_data.get_child_optional(pathToChild); + if( ! obj ) { + if ( ignoreIfMissing ) { + return DataStructure(); + } else { + throw runtime_error(string("Structure \"") + pathToChild + "\" does not exist."); + } + } + // check if the pathToChild points to an object + if ( obj.get().empty() ) { + throw runtime_error(string("Structure \"") + pathToChild + "\" is not an object {} but a simple attribute, it needs to be accessed via [\"" + pathToChild + "\"] -> string"); + } else if ( obj.get().front().first.empty() ) { + throw runtime_error(string("Structure \"") + pathToChild + "\" is not an object {} but a list [], it needs to be accessed via getList(\"" + pathToChild + "\") -> vector<DataStructure>"); + } + return { obj.get() }; +} + + +void +TrigConf::DataStructure::print(ostream & os) const +{ + printElement("", m_data, 0, os); + os << std::endl; + + //boost::property_tree::write_json( o, m_data ); +} + +void +TrigConf::DataStructure::printElement(const std::string& key, const ptree & data, uint level, ostream & os) +{ + constexpr char del = '"'; + + const string value = data.get_value<std::string>(); + + if( data.empty() ) { // no children, so jsut a key->value pair + uint n(4*level); while(n--) os << " "; + os << del << key << del << ": " << del << value << del; + return; + } + + + bool isArray ( data.begin()->first.empty() ); // dictionaries have keys, arrays don't + { uint n(4*level); while(n--) os << " "; } + if ( ! key.empty() ) + os << del << key << del << ": "; + os << (isArray ? "[" : "{") << std::endl; + + size_t childCounter = data.size(); + for( const TV & x : data ) { + printElement(x.first, x.second, level + 1, os); + if( --childCounter ) os << ","; + os << std::endl; + } + { uint n(4*level); while(n--) os << " "; } + os << (isArray ? "]" : "}"); + +} diff --git a/Trigger/TrigConfiguration/TrigConfData/src/HLTChain.cxx b/Trigger/TrigConfiguration/TrigConfData/src/HLTChain.cxx new file mode 100644 index 0000000000000000000000000000000000000000..3d3b6596281749ba030bac9ade5b40b4afc42d38 --- /dev/null +++ b/Trigger/TrigConfiguration/TrigConfData/src/HLTChain.cxx @@ -0,0 +1,59 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#include "TrigConfData/HLTChain.h" +TrigConf::HLTChain::HLTChain() +{} + +TrigConf::HLTChain::HLTChain(const boost::property_tree::ptree & data) + : DataStructure(data) +{} + +TrigConf::HLTChain::~HLTChain() +{} + +const std::string & +TrigConf::HLTChain::name() const +{ + return data().get_child("name").data(); +} + +unsigned int +TrigConf::HLTChain::counter() const +{ + return data().get_child("counter").get_value<unsigned int>(); +} + +const std::string & +TrigConf::HLTChain::l1item() const +{ + return data().get_child("l1item").data(); +} + +std::vector<TrigConf::DataStructure> +TrigConf::HLTChain::streams() const +{ + std::vector<DataStructure> strlist; + const auto & streams = m_data.get_child("streams"); + strlist.reserve(streams.size()); + + for( auto & strData : streams ) + strlist.emplace_back( strData.second ); + + return strlist; +} + +std::vector<std::string> +TrigConf::HLTChain::groups() const +{ + std::vector<std::string> grouplist; + const auto & groups = m_data.get_child("groups"); + grouplist.reserve(groups.size()); + + for( auto & groupData : groups ) + grouplist.emplace_back( groupData.second.get_child("name").data() ); + + return grouplist; +} + diff --git a/Trigger/TrigConfiguration/TrigConfData/src/HLTMenu.cxx b/Trigger/TrigConfiguration/TrigConfData/src/HLTMenu.cxx new file mode 100644 index 0000000000000000000000000000000000000000..276fec4dc14672c926634b229b7c87f3867cd30d --- /dev/null +++ b/Trigger/TrigConfiguration/TrigConfData/src/HLTMenu.cxx @@ -0,0 +1,44 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#include "TrigConfData/HLTMenu.h" +#include "TrigConfData/HLTChain.h" + +using TV = boost::property_tree::ptree::value_type; // tree-value type +using namespace std; + +TrigConf::HLTMenu::HLTMenu() +{} + +TrigConf::HLTMenu::HLTMenu(const boost::property_tree::ptree & data) + : DataStructure(data) +{} + +TrigConf::HLTMenu::~HLTMenu() +{} + +std::size_t +TrigConf::HLTMenu::size() const +{ + return m_data.get_child("chains").size(); +} + +std::string +TrigConf::HLTMenu::name() const +{ + return m_data.get_child("name").data(); +} + +TrigConf::HLTMenu::const_iterator +TrigConf::HLTMenu::begin() const +{ + return {m_data.get_child("chains"), 0, [](auto x){return HLTChain(x.second);}}; +} + +TrigConf::HLTMenu::const_iterator +TrigConf::HLTMenu::end() const +{ + const auto & chains = m_data.get_child("chains"); + return {chains, chains.size(), [](auto x){return HLTChain(x.second);}}; +} diff --git a/Trigger/TrigConfiguration/TrigConfData/src/L1Item.cxx b/Trigger/TrigConfiguration/TrigConfData/src/L1Item.cxx new file mode 100644 index 0000000000000000000000000000000000000000..25bdaf15d3508b5a12931f8636ab6cfb90ac7bea --- /dev/null +++ b/Trigger/TrigConfiguration/TrigConfData/src/L1Item.cxx @@ -0,0 +1,63 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#include "TrigConfData/L1Item.h" + +TrigConf::L1Item::L1Item() +{} + +TrigConf::L1Item::L1Item(const boost::property_tree::ptree & data) + : DataStructure(data) +{} + +TrigConf::L1Item::~L1Item() +{} + +const std::string & +TrigConf::L1Item::name() const +{ + return data().get_child("name").data(); +} + +unsigned int +TrigConf::L1Item::ctpId() const +{ + return data().get_child("ctpId").get_value<unsigned int>(); +} + +const std::string & +TrigConf::L1Item::definition() const +{ + return data().get_child("definition").data(); +} + +unsigned int +TrigConf::L1Item::complexDeadtime() const +{ + return data().get_child("complexDeadtime").get_value<unsigned int>(); +} + +const std::string & +TrigConf::L1Item::monitor() const +{ + return data().get_child("monitor").data(); +} + +unsigned int +TrigConf::L1Item::partition() const +{ + return data().get_child("partition").get_value<unsigned int>(); +} + +const std::string & +TrigConf::L1Item::triggerType() const +{ + return data().get_child("triggerType").data(); +} + +TrigConf::DataStructure +TrigConf::L1Item::logic() const +{ + return getObject("AND"); +} diff --git a/Trigger/TrigConfiguration/TrigConfData/src/L1Menu.cxx b/Trigger/TrigConfiguration/TrigConfData/src/L1Menu.cxx new file mode 100644 index 0000000000000000000000000000000000000000..dadff9739ffc5f105198634d98019eed94d2c2b7 --- /dev/null +++ b/Trigger/TrigConfiguration/TrigConfData/src/L1Menu.cxx @@ -0,0 +1,69 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#include "TrigConfData/L1Menu.h" +using namespace std; + + +TrigConf::L1Menu::L1Menu() +{} + +TrigConf::L1Menu::L1Menu(const boost::property_tree::ptree & data) + : DataStructure(data) +{} + +TrigConf::L1Menu::~L1Menu() +{} + +std::string +TrigConf::L1Menu::name() const +{ + return m_data.get_child("name").data(); +} + +unsigned int +TrigConf::L1Menu::version() const +{ + return m_data.get_child("version").get_value<unsigned int>(); +} + +unsigned int +TrigConf::L1Menu::ctpVersion() const +{ + return m_data.get_child("ctpVersion").get_value<unsigned int>(); +} + +std::size_t +TrigConf::L1Menu::size() const +{ + return m_data.get_child("menu.items").size(); +} + +TrigConf::L1Menu::const_iterator +TrigConf::L1Menu::begin() const +{ + return {m_data.get_child("menu.items"), 0, [](auto x){return L1Item(x.second);}}; +} + +TrigConf::L1Menu::const_iterator +TrigConf::L1Menu::end() const +{ + const auto & items = m_data.get_child("menu.items"); + return {items, items.size(), [](auto x){return L1Item(x.second);}}; +} + + +std::vector<TrigConf::L1Threshold> +TrigConf::L1Menu::thresholds() const +{ + std::vector<TrigConf::L1Threshold> thrlist; + const auto & thresholds = m_data.get_child("thresholds"); + thrlist.reserve(thresholds.size()); + + for( auto & thr : thresholds ) + thrlist.emplace_back( thr.second ); + + return thrlist; +} + diff --git a/Trigger/TrigConfiguration/TrigConfData/src/L1Threshold.cxx b/Trigger/TrigConfiguration/TrigConfData/src/L1Threshold.cxx new file mode 100644 index 0000000000000000000000000000000000000000..ae82389f35fe3c8e78819b031d175f84d8ca96ff --- /dev/null +++ b/Trigger/TrigConfiguration/TrigConfData/src/L1Threshold.cxx @@ -0,0 +1,68 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#include "TrigConfData/L1Threshold.h" + +TrigConf::L1Threshold::L1Threshold() +{} + +TrigConf::L1Threshold::L1Threshold(const boost::property_tree::ptree & data) + : DataStructure(data) +{} + +TrigConf::L1Threshold::~L1Threshold() +{} + +const std::string & +TrigConf::L1Threshold::name() const +{ + return data().get_child("name").data(); +} + +const std::string & +TrigConf::L1Threshold::type() const +{ + return data().get_child("type").data(); +} + +const std::string & +TrigConf::L1Threshold::input() const +{ + return data().get_child("input").data(); +} + +unsigned int +TrigConf::L1Threshold::mapping() const +{ + return data().get_child("mapping").get_value<unsigned int>(); +} + +unsigned int +TrigConf::L1Threshold::id() const +{ + return data().get_child("id").get_value<unsigned int>(); +} + +std::vector<TrigConf::DataStructure> +TrigConf::L1Threshold::thresholdValues() const +{ + std::vector<DataStructure> thrVlist; + + if( const auto & thrVs = m_data.get_child_optional("thresholdValues") ) { + + thrVlist.reserve(thrVs.get().size()); + + for( auto & thrVData : thrVs.get() ) + thrVlist.emplace_back( thrVData.second ); + } + + return thrVlist; +} + +TrigConf::DataStructure +TrigConf::L1Threshold::cable() const +{ + bool ignoreIfMissing = true; + return getObject("cable", ignoreIfMissing); +} diff --git a/Trigger/TrigConfiguration/TrigConfData/src/L1TopoAlgorithm.cxx b/Trigger/TrigConfiguration/TrigConfData/src/L1TopoAlgorithm.cxx new file mode 100644 index 0000000000000000000000000000000000000000..14f21a07677942bdc76d767faac29360fce8accf --- /dev/null +++ b/Trigger/TrigConfiguration/TrigConfData/src/L1TopoAlgorithm.cxx @@ -0,0 +1,59 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#include "TrigConfData/L1TopoAlgorithm.h" + +TrigConf::L1TopoAlgorithm::L1TopoAlgorithm() +{} + +TrigConf::L1TopoAlgorithm::L1TopoAlgorithm(const boost::property_tree::ptree & data) + : DataStructure(data) +{} + +TrigConf::L1TopoAlgorithm::~L1TopoAlgorithm() +{} + +unsigned int +TrigConf::L1TopoAlgorithm::algId() const +{ + return data().get_child("algId").get_value<unsigned int>(); +} + +const std::string & +TrigConf::L1TopoAlgorithm::name() const +{ + return data().get_child("name").data(); +} + +const std::string & +TrigConf::L1TopoAlgorithm::type() const +{ + return data().get_child("type").data(); +} + + +std::vector<TrigConf::DataStructure> +TrigConf::L1TopoAlgorithm::inputs() const +{ + return getList("fixedParameters.inputs"); +} + +TrigConf::DataStructure +TrigConf::L1TopoAlgorithm::outputs() const +{ + return getObject("fixedParameters.outputs"); +} + +std::vector<TrigConf::DataStructure> +TrigConf::L1TopoAlgorithm::generics() const +{ + return getList("fixedParameters.generics"); +} + +std::vector<TrigConf::DataStructure> +TrigConf::L1TopoAlgorithm::parameters() const +{ + return getList("variableParameters.parameters"); +} + diff --git a/Trigger/TrigConfiguration/TrigConfData/src/L1TopoMenu.cxx b/Trigger/TrigConfiguration/TrigConfData/src/L1TopoMenu.cxx new file mode 100644 index 0000000000000000000000000000000000000000..dbe9b617f3c580280de073d80f72202adbbe431d --- /dev/null +++ b/Trigger/TrigConfiguration/TrigConfData/src/L1TopoMenu.cxx @@ -0,0 +1,77 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#include "TrigConfData/L1TopoMenu.h" +#include "TrigConfData/L1TopoOutput.h" +using namespace std; + + +TrigConf::L1TopoMenu::L1TopoMenu() +{} + +TrigConf::L1TopoMenu::L1TopoMenu(const boost::property_tree::ptree & data) + : DataStructure(data) +{} + +TrigConf::L1TopoMenu::~L1TopoMenu() +{} + +std::string +TrigConf::L1TopoMenu::name() const +{ + return m_data.get_child("name").data(); +} + +unsigned int +TrigConf::L1TopoMenu::version() const +{ + return m_data.get_child("version").get_value<unsigned int>(); +} + +std::size_t +TrigConf::L1TopoMenu::size() const +{ + return m_data.get_child("outputs").size(); +} + +vector<TrigConf::L1TopoAlgorithm> +TrigConf::L1TopoMenu::sortingAlgorithms() const +{ + + std::vector<TrigConf::L1TopoAlgorithm> algorithmList; + const auto & sortingAlgorithms = m_data.get_child("sortingAlgorithms"); + algorithmList.reserve(sortingAlgorithms.size()); + + for( auto & alg : sortingAlgorithms ) + algorithmList.emplace_back( alg.second ); + + return algorithmList; +} + +vector<TrigConf::L1TopoAlgorithm> +TrigConf::L1TopoMenu::decisionAlgorithms() const +{ + + std::vector<TrigConf::L1TopoAlgorithm> algorithmList; + const auto & decisionAlgorithms = m_data.get_child("decisionAlgorithms"); + algorithmList.reserve(decisionAlgorithms.size()); + + for( auto & alg : decisionAlgorithms ) + algorithmList.emplace_back( alg.second ); + + return algorithmList; +} + +TrigConf::L1TopoMenu::const_iterator +TrigConf::L1TopoMenu::begin() const +{ + return {m_data.get_child("outputs"), 0, [](auto x){return L1TopoOutput(x.second);}}; +} + +TrigConf::L1TopoMenu::const_iterator +TrigConf::L1TopoMenu::end() const +{ + const auto & outputs = m_data.get_child("outputs"); + return {outputs, outputs.size(), [](auto x){return L1TopoOutput(x.second);}}; +} diff --git a/Trigger/TrigConfiguration/TrigConfData/src/L1TopoOutput.cxx b/Trigger/TrigConfiguration/TrigConfData/src/L1TopoOutput.cxx new file mode 100644 index 0000000000000000000000000000000000000000..3698667674b025749029002a68ba3b774102ab31 --- /dev/null +++ b/Trigger/TrigConfiguration/TrigConfData/src/L1TopoOutput.cxx @@ -0,0 +1,58 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#include "TrigConfData/L1TopoOutput.h" + +TrigConf::L1TopoOutput::L1TopoOutput() +{} + +TrigConf::L1TopoOutput::L1TopoOutput(const boost::property_tree::ptree & data) + : DataStructure(data) +{} + +TrigConf::L1TopoOutput::~L1TopoOutput() +{} + +const std::string & +TrigConf::L1TopoOutput::algName() const +{ + return data().get_child("algName").data(); +} + +unsigned int +TrigConf::L1TopoOutput::algId() const +{ + return data().get_child("algId").get_value<unsigned int>(); +} + +unsigned int +TrigConf::L1TopoOutput::clock() const +{ + return data().get_child("clock").get_value<unsigned int>(); +} + +unsigned int +TrigConf::L1TopoOutput::firstBit() const +{ + return data().get_child("firstBit").get_value<unsigned int>(); +} + +unsigned int +TrigConf::L1TopoOutput::fpga() const +{ + return data().get_child("fpga").get_value<unsigned int>(); +} + +unsigned int +TrigConf::L1TopoOutput::board() const +{ + return data().get_child("board").get_value<unsigned int>(); +} + +const std::string & +TrigConf::L1TopoOutput::triggerLines() const +{ + return data().get_child("triggerLines").data(); +} + diff --git a/Trigger/TrigConfiguration/TrigConfData/test/itertest.cxx b/Trigger/TrigConfiguration/TrigConfData/test/itertest.cxx new file mode 100644 index 0000000000000000000000000000000000000000..42124d91293ce6f43a45a8ea2e708cbdabd9cd46 --- /dev/null +++ b/Trigger/TrigConfiguration/TrigConfData/test/itertest.cxx @@ -0,0 +1,128 @@ +#include "TrigConfData/ConstIter.h" + +#include <vector> +#include <iostream> + +using namespace std; + +class TestCollection { +public: + + TestCollection(const vector<vector<int>> & vi) : + m_data(vi) + {} + ~TestCollection() {} + + using const_iterator = TrigConf::ConstIter< vector<vector<int>>, vector<int> >; + + const_iterator begin() const { + return {m_data, 0}; + } + const_iterator end() const { + return {m_data, m_data.size()}; + } + + private: + vector<vector<int>> m_data; + + }; + + +bool inner_loop ( int, const std::vector<int> & v, + const std::vector<int> & refV + ) +{ + bool allGood = true; + unsigned int refIdx(0); + for(int ii : v) { + bool match = (ii == refV[refIdx++]); + allGood &= match; + cout << " inner_loop " << ii << " -> " << (match ? "ok" : "mismatch ======> FAIL") << endl; + } + return allGood; +} + +bool test1 ( const TrigConf::ConstIter< vector<vector<int>>, std::vector<int>>& it, + const std::vector<int> & refV ) +{ + bool allGood = true; + cout << "In test1 with reference : "; + for( int i: refV ) cout << i << " "; + cout << endl; + + unsigned int refIdx(0); + for ( int i : *it) { + bool match = i == refV[refIdx++]; + cout << " outer loop " << i << " -> " << (match ? "ok" : "mismatch =========> FAIL") << endl; + allGood &= match; + allGood &= inner_loop (i, *it, refV); + } + return allGood; +} + +bool test2 ( const TrigConf::ConstIter< vector<vector<int>>, std::vector<int>>& it, + const std::vector<int> & refV ) +{ + bool allGood = true; + cout << "In test2 with reference : "; + for( int i: refV ) cout << i << " "; + cout << endl; + + unsigned int size = refV.size(); + + unsigned int refIdx(0); + auto end = (*it).end(); // create end first, so at least begin is pointing to a valid iterator in the following loop + for ( vector<int>::const_iterator ii = (*it).begin(); ii != end; ++ii) { + + int v = *ii; + if ( refIdx>=size ) { + cout << "Not stopping correctly, begin() and end() pointing to different collections. ===> FAIL" << endl; + allGood = false; + break; + } + bool match = (v == refV[refIdx++]); + cout << " loop " << v << " -> " << (match ? "ok" : "mismatch =========> FAIL") << endl; + allGood &= match; + } + return allGood; +} + + +int main() { + + bool successTest1 ( true ); + bool successTest2 ( true ); + bool successTest3 ( true ); + bool success ( true ); + + vector<vector<int>> v = { {1, 2, 3, 4}, + {5, 6}, + {7, 8, 9, 10, 11}}; + + // test 1 + auto iter1 = TrigConf::ConstIter< vector<vector<int>>, vector<int> > { v, 0 }; + successTest1 &= test1( iter1, { 1, 2, 3, 4}); + successTest1 &= test1(++iter1, { 5, 6}); + successTest1 &= test1(++iter1, { 7, 8, 9, 10, 11}); + + // test 2 + auto iter2 = TrigConf::ConstIter< vector<vector<int>>, vector<int> > { v, 0 }; + successTest2 = test2( iter2, v[0] ); + + // test 3 + cout << "In test3" << endl; + const TestCollection c(v); + unsigned int idx(0); + for( auto x : c ) { + successTest3 &= inner_loop (0, x, v[idx++]); + } + + cout << "Test iterator validity duration different loops ... " << ( successTest1 ? "passed" : "failed" ) << endl; + cout << "Test iterator validity duration same loop ... " << ( successTest2 ? "passed" : "failed" ) << endl; + cout << "Test iterator validity in range-based loop ... " << ( successTest3 ? "passed" : "failed" ) << endl; + + success &= successTest1; + success &= successTest2; + success &= successTest3; + return success ? 0 : 1; +} diff --git a/Trigger/TrigConfiguration/TrigConfIO/CMakeLists.txt b/Trigger/TrigConfiguration/TrigConfIO/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..0198666bf636dd3989965539306c466f5cd3c094 --- /dev/null +++ b/Trigger/TrigConfiguration/TrigConfIO/CMakeLists.txt @@ -0,0 +1,40 @@ +################################################################################ +# Package: TrigConfIO +################################################################################ + +# Declare the package name: +atlas_subdir( TrigConfIO ) + +# Declare the package's dependencies: +atlas_depends_on_subdirs( PUBLIC + GaudiKernel + Trigger/TrigConfiguration/TrigConfData + Trigger/TrigConfiguration/TrigConfBase + PRIVATE + Tools/PathResolver + ) + +# External dependencies: +find_package( Boost ) + +# Component(s) in the package: +atlas_add_library( TrigConfIO + TrigConfIO/*.h src/*.cxx + PUBLIC_HEADERS TrigConfIO + LINK_LIBRARIES PathResolver TrigConfBase TrigConfData GaudiKernel ) + +atlas_add_executable( TestTriggerMenuAccess utils/TestTriggerMenuAccess.cxx + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} + LINK_LIBRARIES ${Boost_LIBRARIES} TrigConfIO ) + +atlas_install_python_modules( python/*.py ) + +atlas_install_scripts( scripts/*.py ) + +atlas_install_data( data/*.json data/*.xml ) + +atlas_add_test( ReadTriggerConfig SOURCES test/read_config_info.cxx + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} + LINK_LIBRARIES ${Boost_LIBRARIES} TrigConfData TrigConfIO + ENVIRONMENT "TESTFILEPATH=${CMAKE_CURRENT_SOURCE_DIR}/test/data" + POST_EXEC_SCRIPT nopost.sh ) diff --git a/Trigger/TrigConfiguration/TrigConfIO/TrigConfIO/JsonFileLoader.h b/Trigger/TrigConfiguration/TrigConfIO/TrigConfIO/JsonFileLoader.h new file mode 100644 index 0000000000000000000000000000000000000000..300943075edf747ee5443840ece461bf0946ef26 --- /dev/null +++ b/Trigger/TrigConfiguration/TrigConfIO/TrigConfIO/JsonFileLoader.h @@ -0,0 +1,76 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +/** + * @file TrigConfIO/JsonFileLoader.h + * @author J. Stelzer + * @date Feb 2019 + * @brief Loader class for Trigger configuration from Json + */ + +#ifndef TRIGCONFSTORAGE_JSONFILELOADER_H +#define TRIGCONFSTORAGE_JSONFILELOADER_H + +#include "GaudiKernel/StatusCode.h" + +#include "boost/property_tree/ptree.hpp" +#include "TrigConfBase/TrigConfMessaging.h" + +#include "TrigConfData/DataStructure.h" + +namespace TrigConf { + + /** + * @brief Loader of trigger configurations from Json files + */ + class JsonFileLoader : public TrigConfMessaging { + public: + + /** Constructor */ + JsonFileLoader(); + + /** Destructor */ + virtual ~JsonFileLoader(); + + /** + * @brief Load content of json file into a ptree + * @param filename [in] Name of the json file + * @param data [out] + * @param pathToChild [in] Path to a sub structure for partial loading of data + * + * The file is searched for in the path list defined by the environment variable @c DATAPATH. + * If the optional parameter @c pathToChild is specified, one can load parts if the configuration + * from the file. + *@code + * TrigConf::JsonFileLoader fileLoader; + * const std::string l1_filename = "TriggerMenuXML/LVL1config_Physics_pp_v7.json"; + * TrigConf::DataStructure metSignificance; + * fileLoader.loadFile( l1_filename, metSignificance, "CaloInfo.METSignificance"); + @endcode + */ + StatusCode loadFile( const std::string & filename, + boost::property_tree::ptree & data, + const std::string & pathToChild = ""); + + /** + * @brief Load content of json file into a ptree + * @param filename [in] Name of the json file + * @param data [out] + * @param pathToChild [in] Path to a sub structure for partial loading of data + */ + StatusCode loadFile( const std::string & filename, + DataStructure & data, + const std::string & pathToChild = ""); + + + void setLevel(MSGTC::Level lvl) { msg().setLevel(lvl); } + + MSGTC::Level outputLevel() const { return msg().level(); } + + }; + +} + +#endif + diff --git a/Trigger/TrigConfiguration/TrigConfIO/python/MenuXML2JSONConverter.py b/Trigger/TrigConfiguration/TrigConfIO/python/MenuXML2JSONConverter.py new file mode 100755 index 0000000000000000000000000000000000000000..843d3e22053305132cba7f06d00d6bf4f7c96483 --- /dev/null +++ b/Trigger/TrigConfiguration/TrigConfIO/python/MenuXML2JSONConverter.py @@ -0,0 +1,228 @@ +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + +import sys,os + +class XML2JsonConverter(object): + def __init__(self, tabsize = 4, **args): + self.tabsize = tabsize + + self.__doc = None + self.__root = None + self.__rules = {} + self.xmlfilename = None + + + def convertFile(self, inputfilename, jsonfilename = None ): + if not inputfilename.endswith(".xml"): + print "judging by the suffix, %s is not an xml file" % inputfilename + return 1 + self.parseXMLFile( inputfilename ) + self.writeJsonFile( jsonfilename ) + + def parseXMLFile(self,filename): + self.xmlfilename = filename + import xml.etree.cElementTree as ET + self.doc = ET.parse(filename) + self.root = self.doc.getroot() + print "Parsed file %s" % filename + return self.doc + + def loadRules(self,docname): + self.rules = { 'asInt' : {}, + 'asArray' : [], + 'asMultiArray' : [], + 'ignoreElement' : [], + 'ignoreAttrib' : [], + 'promote' : {}, + 'rename' : {} # renaming will be applied last + } + + if docname == "LVL1Config": + self.rules['asInt'] = { + "TriggerItem" : ["partition", "complex_deadtime", "ctpid"], + "TriggerThreshold" : ["bitnum", "mapping", "version", "active", "id"], + "TriggerThresholdValue" : [ "thresholdval", "etamin", "etamax", "phimin", "phimax", + "em_isolation", "window", "priority", "had_veto", "had_isolation"], + "Signal" : [ "range_end", "range_begin" ], + "Random" : ["cut0", "cut1", "cut2", "cut3"], + "PrescaleSet" : ["menuPartition"], + "Prescale" : ["ctpid"], + "TriggerCondition" : ["multi"], + "METSignificance" : ["xeMax", "teSqrtMax", "xsSigmaOffset", "teSqrtMin", "xsSigmaScale", "xeMin"], + "MinimumTOBPt" : [ "priority", "etamin", "ptmin", "etamax", "window" ], + "Parametrization" : [ "slope", "isobit", "priority", "etamin", "offset", "mincut", "etamax", "upperlimit"], + "CaloInfo" : [ "global_em_scale", "global_jet_scale"], + "BunchGroupSet" : [ "menuPartition" ], + "BunchGroup" : [ "internalNumber" ], + "MuctpiInfo" : [ "high_pt", "max_cand", "low_pt" ], + "PrescaledClock" : [ "clock1", "clock2" ], + "LVL1Config" : [ "l1Version", "ctpVersion" ] + } + self.rules['asArray'] = [ 'AND', 'OR' ] + self.rules['asMultiArray'] = [ ('PrescaleSet', 'Prescale'), + ('TriggerThreshold', 'TriggerThresholdValue'), + ('TriggerCounterList', 'TriggerCounter'), + ('Isolation', 'Parametrization'), + ('TriggerMenu', 'TriggerItem'), + ('CaloInfo', 'MinimumTOBPt'), + ('CaloInfo', 'Isolation'), + ('BunchGroupSet', 'BunchGroup'), + ('OR', 'TriggerCondition'), + ('TriggerThresholdList', 'TriggerThreshold'), + ('AND', 'TriggerCondition'), + ('AND', 'OR'), + ('AND', 'InternalTrigger') + ] + self.rules['ignoreElement'] = [] + self.rules['promote'] = {"TriggerThresholdList" : "TriggerThreshold"} + self.rules['rename'] = { "TriggerItem" : "items", "TriggerMenu" : "menu", "l1Version" : "version", "ctpid" : "ctpId", + "complex_deadtime" : "complexDeadtime", "trigger_type" : "triggerType", "TriggerThreshold" : "thresholds", + "triggerthreshold" : "triggerThreshold", "TriggerCondition" : "triggerCondition", "InternalTrigger" : "internalTrigger", + "Cable" : "cable", "Signal" : "signal", "range_begin" : "rangeBegin", "range_end" : "rangeEnd", + "TriggerThresholdValue" : "thresholdValues" } + + elif docname == "HLT_MENU": + + self.rules['asInt'] = { + "CHAIN": ["EBstep", "chain_counter"], + "SIGNATURE": ["signature_counter"] + } + self.rules['asMultiArray'] = [ ('SEQUENCE_LIST', 'SEQUENCE'), + ('GROUP_LIST', 'GROUP'), + ('SIGNATURE_LIST', 'SIGNATURE'), + ('CHAIN_LIST', 'CHAIN'), + ('STREAMTAG_LIST', 'STREAMTAG'), + ('SIGNATURE', 'TRIGGERELEMENT') + ] + self.rules['ignoreElement'] = [ "SEQUENCE_LIST", "SIGNATURE_LIST", "TRIGGERTYPE_LIST" ] + self.rules['ignoreAttrib'] = [ ("CHAIN", "level"), + ("CHAIN", "EBstep"), + ("CHAIN", "pass_through"), + ("CHAIN", "prescale"), + ("CHAIN", "rerun_prescale"), + ("HLT_MENU", "prescale_set_name")] + self.rules['promote'] = {"GROUP_LIST" : "GROUP", "STREAMTAG_LIST" : "STREAMTAG", "CHAIN_LIST" : "CHAIN"} + self.rules['rename'] = { "GROUP" : "groups", "STREAMTAG" : "streams", "CHAIN" : "chains", + "menu_name" : "name", + "chain_name" : "name", "chain_counter" : "counter", "lower_chain_name" : "l1item", + "stream" : "name"} + + elif docname == "TOPO_MENU": + + self.rules['asInt'] = { + "Parameter": ["pos", "value"], + "Bit": ["selection"], + "Input": ["position"], + "Output": ["bits", "fpga", "clock", "algoId", "module", "firstbit"], + "SortAlgo": ["algoId"], + "DecisionAlgo": ["algoId"], + } + self.rules['asMultiArray'] = [ ('OutputList', 'Output'), + ('Fixed', 'Generic'), + ('Fixed', 'Input'), + ('TOPO_MENU', 'SortAlgo'), + ('TOPO_MENU', 'DecisionAlgo'), + ('Variable', 'Parameter'), + ('Output', 'Bit'), + ('SIGNATURE', 'TRIGGERELEMENT') + ] + self.rules['promote'] = { "OutputList" : "Output" } + self.rules['rename'] = { "menu_name" : "name", "menu_version" : "version", + "algname" : "algName", "algoId" : "algId", "firstbit" : "firstBit", "module" : "board", "triggerline" : "triggerLines", + "SortAlgo" : "sortingAlgorithms", "DecisionAlgo" : "decisionAlgorithms", + "Fixed" : "fixedParameters", "Input" : "inputs", "Output" : "outputs", "Generic" : "generics", + "Variable" : "variableParameters", "Parameter" : "parameters"} + else: + print "Unknown document with root element %s" % docname + return 1 + return 0 + + + def renameKey(self,key): + return self.rules['rename'][key] if key in self.rules['rename'] else key + + + def createJsonStruct(self, node): + if node.tag in self.rules['asArray']: + return [ {element.tag : self.createJsonStruct(element)} for element in node ] + + else: + from collections import OrderedDict + d = OrderedDict() + # writing attributs of the element to json structure in alphabetical order + # turn values into int according to the asInt rule + for attr in sorted(node.attrib.keys()): + if (node.tag, attr) in self.rules['ignoreAttrib']: # attributes to ignore + continue + if node.tag in self.rules['asInt'] and attr in self.rules['asInt'][node.tag]: + d[self.renameKey(attr)] = int(node.attrib[attr]) + else: + d[self.renameKey(attr)] = node.attrib[attr] + # looping over children + for element in node: + if element.tag in self.rules['ignoreElement']: + continue + if (node.tag, element.tag) in self.rules['asMultiArray']: + # list of multiple identical elements (e.g. CHAINs) + key = self.renameKey(element.tag) + if not key in d: d[key] = list() + d[key] += [ self.createJsonStruct(element) ] + else: + # single element (e.g. CHAIN_LIST) + if element.tag in d: + raise RuntimeError("element %s already attached to node %s and not declared as MultiArray" % (element.tag, node.tag)) + + if element.tag in self.rules['promote']: + obj = self.createJsonStruct(element) + promoted = self.renameKey( self.rules['promote'][element.tag]) #e.g. Chains + d[promoted] = obj[promoted] + else: + d[self.renameKey(element.tag)] = self.createJsonStruct(element) + + return d + + + + def writeJsonFile(self, filename = None): + import json + if not filename: + # use xml filename base + filename = self.xmlfilename.rstrip(".xml")+".json" + elif os.path.isdir(filename): + filename = filename.rstrip("/") + "/" + self.xmlfilename.split("/")[-1].rstrip(".xml")+".json" + self.loadRules(self.root.tag) + d = self.createJsonStruct(self.root) + FH = open(filename, "w") + json.dump(d, FH, indent=self.tabsize, separators=(',', ': ')) + FH.close() + print "Wrote file %s" % filename + + + + def checkJsonConformity(self, filename): + print "Checking json conformity", + import json + FH = open(filename, "rb") + try: + json.load(FH) + print " ... OK" + except ValueError, e: + print " ... FAILED" + print e + FH.close() + + + +def test(): + if len(sys.argv)<=1: + print "please specify xml file for conversion" + return 1 + + converter = XML2JsonConverter() + converter.convertFile( sys.argv[1] ) + return 0 + + +if __name__=="__main__": + sys.exit(test()) + diff --git a/Trigger/TrigConfiguration/TrigConfIO/python/__init__.py b/Trigger/TrigConfiguration/TrigConfIO/python/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4e669a90b8bb38f0bfd2b2b839d01aa2194e673f --- /dev/null +++ b/Trigger/TrigConfiguration/TrigConfIO/python/__init__.py @@ -0,0 +1 @@ +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration diff --git a/Trigger/TrigConfiguration/TrigConfIO/scripts/TriggerMenuDB2JSONConverter.py b/Trigger/TrigConfiguration/TrigConfIO/scripts/TriggerMenuDB2JSONConverter.py new file mode 100755 index 0000000000000000000000000000000000000000..a3bb04b2538ee19df9b3c16c5b20c1451ba7df51 --- /dev/null +++ b/Trigger/TrigConfiguration/TrigConfIO/scripts/TriggerMenuDB2JSONConverter.py @@ -0,0 +1,145 @@ +#!/usr/bin/env python +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + +import sys, os +from optparse import OptionParser, OptionGroup + +class Silence(): + def __init__(self, verbose): + self.verbose = verbose + def __enter__(self): + if not self.verbose: + self.so = sys.stdout + sys.stdout = open(os.devnull, 'w') + def __exit__(self, type, value, traceback): + if not self.verbose: + sys.stdout = self.so + +def main(): + + + parser = OptionParser(usage="usage: %prog [options] smk") + + parser.add_option("-v", "--verbose", + action = "store_true", + dest = "verbose", + default = False, + help="verbose output [default: %default]") + + actions = OptionGroup(parser, "actions") + + actions.add_option( "", + "--l1", + dest = "l1psk", + metavar = "PSK", + default = 0, + help = "Level 1 prescale key PSK for L1 prescale set to convert" ) + + actions.add_option( "", + "--hlt", + type="int", + dest = "hltpsk", + metavar="PSK", + default = 0, + help = "HLT prescale key PSK for HLT prescale set to convert" ) + + actions.add_option( "", + "--showpsk", + dest = "showpsk", + action = "store_true", + default = False, + help = "only prints prescale keys attached to SMK [default: %default]" ) + + parser.add_option_group(actions) + + parser.add_option( "", + "--db", + dest = "db", + default = "TRIGGERDB", + help = "database alias TRIGGERDB|TRIGGERDBREPR|TRIGGERDBMC [default: %default]" ) + + + (options, args) = parser.parse_args() + + if len(args) != 1: + parser.error("Please specify the SMK") + + try: + smk = int(args[0]) + except ValueError: + parser.error("SMK must be an integer") + + + if not (options.l1psk or options.hltpsk or options.showpsk): + parser.print_help() + parser.error("Please specify one of the actions") + + if options.showpsk: + with Silence(options.verbose): + from TrigConfigSvc.TrigConfigSvcUtils import getHLTPrescalesFromSMK + hltpsk = getHLTPrescalesFromSMK(options.db,smk) + print "Trigger keys connected to SM %i are %r" % (smk, [int(k[0]) for k in hltpsk]) + + + if options.hltpsk: + with Silence(options.verbose): # suppress all the output from loading the athena modules + from TrigConfigSvc.TrigConfigSvcUtils import queryHLTPrescaleTableRun2 + res = queryHLTPrescaleTableRun2(options.db,options.hltpsk,smk) + + from collections import defaultdict, OrderedDict + d = defaultdict(lambda : list()) + + for e in res: + d[(int(e[1]),e[0])] += [ (e[2],e[4]) ] + + # building json structure + prescaleSet = [] + for (chainID, chainName),prescales in sorted(d.items()): + entry = OrderedDict() + entry['chainId'] = chainID + entry['chainName'] =chainName + entry.update(prescales) + prescaleSet.append( entry ) + + # saving to file + import json + filename = "HLTPrescales_smk%i_psk%i.json" % (smk, options.hltpsk) + FH = open(filename, "w") + json.dump(prescaleSet, FH, indent=4, separators=(',', ': ')) + FH.close() + print "Wrote file %s" % filename + + if options.l1psk: + with Silence(options.verbose): # suppress all the output from loading the athena modules + from TrigConfigSvc.TrigConfigSvcUtils import queryHLTPrescaleTableRun2 + res = queryHLTPrescaleTableRun2(options.db,options.hltpsk,smk) + + from collections import defaultdict, OrderedDict + d = defaultdict(lambda : list()) + + for e in res: + d[(int(e[1]),e[0])] += [ (e[2],e[4]) ] + + # building json structure + prescaleSet = [] + for (chainID, chainName),prescales in sorted(d.items()): + entry = OrderedDict() + entry['chainId'] = chainID + entry['chainName'] =chainName + entry.update(prescales) + prescaleSet.append( entry ) + + # saving to file + import json + filename = "HLTPrescales_smk%i_psk%i.json" % (smk, options.hltpsk) + FH = open(filename, "w") + json.dump(prescaleSet, FH, indent=4, separators=(',', ': ')) + FH.close() + print "Wrote file %s" % filename + + + + +if __name__=="__main__": + sys.exit(main()) + diff --git a/Trigger/TrigConfiguration/TrigConfIO/scripts/TriggerMenuXML2JSONConverter.py b/Trigger/TrigConfiguration/TrigConfIO/scripts/TriggerMenuXML2JSONConverter.py new file mode 100755 index 0000000000000000000000000000000000000000..3355f1c27db56be876012dd2a823040768bc3883 --- /dev/null +++ b/Trigger/TrigConfiguration/TrigConfIO/scripts/TriggerMenuXML2JSONConverter.py @@ -0,0 +1,25 @@ +#!/usr/bin/env python +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + +import sys + +def main(): + if len(sys.argv)<=1: + print "please use this format:" + print "%s inputfile.xml [outputfile.json] ... menu file conversion" % sys.argv[0].rsplit('/')[-1] + print "%s inputfile.json ... json conformity check of any json file" % sys.argv[0].rsplit('/')[-1] + return 1 + + inputfile = sys.argv[1] + outputfile = sys.argv[2] if len(sys.argv)>2 else None + + from TrigConfIO.MenuXML2JSONConverter import XML2JsonConverter + converter = XML2JsonConverter() + + if inputfile.endswith(".xml"): + converter.convertFile( inputfile, outputfile ) + elif inputfile.endswith(".json"): + converter.checkJsonConformity( inputfile ) + +if __name__=="__main__": + sys.exit(main()) diff --git a/Trigger/TrigConfiguration/TrigConfIO/src/JsonFileLoader.cxx b/Trigger/TrigConfiguration/TrigConfIO/src/JsonFileLoader.cxx new file mode 100644 index 0000000000000000000000000000000000000000..77383a89e42b77e737e478af0fb58ced590d5bcf --- /dev/null +++ b/Trigger/TrigConfiguration/TrigConfIO/src/JsonFileLoader.cxx @@ -0,0 +1,106 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#include "TrigConfIO/JsonFileLoader.h" +#include "PathResolver/PathResolver.h" + +#include <boost/property_tree/ptree.hpp> +#include <boost/property_tree/json_parser.hpp> + +#include <sys/stat.h> +#include <filesystem> + +using ptree = boost::property_tree::ptree; + + +TrigConf::JsonFileLoader::JsonFileLoader() : + TrigConfMessaging( "JsonFileLoader") +{} + +TrigConf::JsonFileLoader::~JsonFileLoader() +{} + +StatusCode +TrigConf::JsonFileLoader::loadFile( const std::string & filename, + boost::property_tree::ptree & data, + const std::string & pathToChild ) +{ + + /* + * resolution of the file location happens in three steps + 1) ckeck if file exists under the absolute or relative path location + 2) if not and the path is not an absolute one, use the DATAPATH + */ + + std::string file=""; // resolved file name + struct stat buffer; + bool existsAsSpecified = (stat (filename.c_str(), &buffer) == 0); + + + if( existsAsSpecified ) { + file = filename; + } else { + if (filename.find("/")==0) { // absolute location + TRG_MSG_WARNING("Can not find file with absolute location " << filename); + return StatusCode::RECOVERABLE; + } else { + // check if environment DATAPATH exists + PathResolver::SearchPathStatus pathStatus = PathResolver::check_search_path ("DATAPATH"); + if ( pathStatus == PathResolver::EnvironmentVariableUndefined ) { + TRG_MSG_WARNING("Path environment $DATAPATH has not been defined"); + return StatusCode::RECOVERABLE; + } + + // resolve absolute location + file = PathResolver::find_file (filename, "DATAPATH"); + if ( file == "" ) { + TRG_MSG_WARNING("Did not find file " << filename << " in $DATAPATH"); + return StatusCode::RECOVERABLE; + } + } + } + + TRG_MSG_INFO("Reading information from " << file); + + // Load the json file + try { + boost::property_tree::read_json(file, data); + } + catch (const boost::property_tree::json_parser_error& e) { + TRG_MSG_WARNING("Could either not locate or parse the file " << file); + return StatusCode::RECOVERABLE; + } + + if( ! pathToChild.empty() ) { + // the user has specified that s/he wants to access a certain part of the file + // the pathToChild is specified like this "a.b.c" + boost::optional<ptree&> subtree = data.get_child_optional(pathToChild); + if(subtree) { + data = *subtree; + } else { + TRG_MSG_WARNING("Did not find element '" << pathToChild << "' in the file " << file); + data.clear(); + } + } + + return StatusCode::SUCCESS; +} + + +StatusCode +TrigConf::JsonFileLoader::loadFile( const std::string & filename, + DataStructure & data, + const std::string & pathToChild ) +{ + boost::property_tree::ptree pt; + + StatusCode sc = this -> loadFile( filename, pt, pathToChild); + + if(!sc.isSuccess()) + return sc; + + data.setData(pt); + + return StatusCode::SUCCESS; +} diff --git a/Trigger/TrigConfiguration/TrigConfIO/test/data/HLTconfig_Physics_pp_v7.json b/Trigger/TrigConfiguration/TrigConfIO/test/data/HLTconfig_Physics_pp_v7.json new file mode 100644 index 0000000000000000000000000000000000000000..6c649e0cf63dbd1b824af4ca3446f55108e3cec2 --- /dev/null +++ b/Trigger/TrigConfiguration/TrigConfIO/test/data/HLTconfig_Physics_pp_v7.json @@ -0,0 +1,59 @@ +{ + "name": "Physics_pp_v7", + "chains": [ + { + "counter": 1, + "name": "HLT_e26_lhtight_idperf", + "l1item": "L1_EM22VHI", + "streams": [ + { + "obeyLB": "yes", + "prescale": "1", + "name": "Main", + "type": "physics" + } + ], + "groups": [ + { + "name": "RATE:IDMonitoring" + }, + { + "name": "BW:Egamma" + }, + { + "name": "BW:ID" + } + ] + }, + { + "counter": 2, + "name": "HLT_e28_lhtight_idperf", + "l1item": "L1_EM24VHI", + "streams": [ + { + "obeyLB": "yes", + "prescale": "1", + "name": "Main", + "type": "physics" + }, + { + "obeyLB": "yes", + "prescale": "1", + "name": "express", + "type": "express" + } + ], + "groups": [ + { + "name": "RATE:IDMonitoring" + }, + { + "name": "BW:Egamma" + }, + { + "name": "BW:ID" + } + ] + } + ] +} diff --git a/Trigger/TrigConfiguration/TrigConfIO/test/data/L1Topoconfig_Physics_pp_v7.json b/Trigger/TrigConfiguration/TrigConfIO/test/data/L1Topoconfig_Physics_pp_v7.json new file mode 100644 index 0000000000000000000000000000000000000000..2e0cc8f240d573a8ad1eb0a08c0f33193c2e6c8c --- /dev/null +++ b/Trigger/TrigConfiguration/TrigConfIO/test/data/L1Topoconfig_Physics_pp_v7.json @@ -0,0 +1,609 @@ +{ + "name": "Topo_pp_vX", + "version": "1", + "outputs": [ + { + "algName": "INVM_AJ_HighMass", + "algId": 0, + "clock": 0, + "firstBit": 0, + "fpga": 0, + "board": 0, + "triggerLines": "900INVM9999-AJ30s6-AJ20s6,800INVM9999-AJ30s6-AJ20s6,700INVM9999-AJ30s6-AJ20s6,500INVM9999-AJ30s6-AJ20s6" + }, + { + "algName": "INVM_AJ_LowMass", + "algId": 1, + "clock": 0, + "firstBit": 4, + "fpga": 0, + "board": 0, + "triggerLines": "400INVM9999-AJ30s6-AJ20s6,300INVM9999-AJ30s6-AJ20s6,200INVM9999-AJ30s6-AJ20s6,100INVM9999-AJ30s6-AJ20s6" + }, + { + "algName": "INVM_NFF", + "algId": 93, + "clock": 1, + "firstBit": 12, + "fpga": 1, + "board": 0, + "triggerLines": "600INVM9999-J30s6-AJ20s6,500INVM9999-J30s6-AJ20s6,400INVM9999-J30s6-AJ20s6,200INVM9999-J30s6-AJ20s6" + } + ], + "TopoConfig": {}, + "sortingAlgorithms": [ + { + "algId": 15, + "name": "AJs", + "output": "AJs", + "type": "JetSort", + "fixedParameters": { + "inputs": [ + { + "name": "JetTobArray", + "value": "JetTobArray" + } + ], + "outputs": { + "name": "TobArrayOut", + "value": "AJs" + }, + "generics": [ + { + "name": "InputWidth", + "value": ":InputWidthJET:" + }, + { + "name": "InputWidth1stStage", + "value": ":InputWidth1stStageSortJET:" + }, + { + "name": "OutputWidth", + "value": ":OutputWidthSortJET:" + }, + { + "name": "JetSize", + "value": "2" + }, + { + "name": "DoEtaCut", + "value": "0" + } + ] + }, + "variableParameters": { + "parameters": [ + { + "name": "MinEta", + "pos": 0, + "value": 0 + }, + { + "name": "MaxEta", + "pos": 1, + "value": 49 + } + ] + } + }, + { + "algId": 17, + "name": "Js", + "output": "Js", + "type": "JetSort", + "fixedParameters": { + "inputs": [ + { + "name": "JetTobArray", + "value": "JetTobArray" + } + ], + "outputs": { + "name": "TobArrayOut", + "value": "Js" + }, + "generics": [ + { + "name": "InputWidth", + "value": ":InputWidthJET:" + }, + { + "name": "InputWidth1stStage", + "value": ":InputWidth1stStageSortJET:" + }, + { + "name": "OutputWidth", + "value": ":OutputWidthSortJET:" + }, + { + "name": "JetSize", + "value": "2" + }, + { + "name": "DoEtaCut", + "value": "1" + } + ] + }, + "variableParameters": { + "parameters": [ + { + "name": "MinEta", + "pos": 0, + "value": 0 + }, + { + "name": "MaxEta", + "pos": 1, + "value": 31 + } + ] + } + } + ], + "decisionAlgorithms": [ + { + "algId": 0, + "name": "INVM_AJ_HighMass", + "type": "InvariantMassInclusive1", + "fixedParameters": { + "inputs": [ + { + "name": "Tob", + "position": 0, + "value": "AJs" + } + ], + "outputs": { + "bits": 4, + "name": "Results", + "Bit": [ + { + "name": "900INVM9999-AJ30s6-AJ20s6", + "selection": 0 + }, + { + "name": "800INVM9999-AJ30s6-AJ20s6", + "selection": 1 + }, + { + "name": "700INVM9999-AJ30s6-AJ20s6", + "selection": 2 + }, + { + "name": "500INVM9999-AJ30s6-AJ20s6", + "selection": 3 + } + ] + }, + "generics": [ + { + "name": "InputWidth", + "value": ":OutputWidthSortJET:" + }, + { + "name": "MaxTob", + "value": "6" + }, + { + "name": "NumResultBits", + "value": "4" + } + ] + }, + "variableParameters": { + "parameters": [ + { + "name": "MinET1", + "pos": 0, + "selection": "0", + "value": 30 + }, + { + "name": "MinET2", + "pos": 1, + "selection": "0", + "value": 20 + }, + { + "name": "MinMSqr", + "pos": 2, + "selection": "0", + "value": 810000 + }, + { + "name": "MaxMSqr", + "pos": 3, + "selection": "0", + "value": 99980001 + }, + { + "name": "MinET1", + "pos": 4, + "selection": "1", + "value": 30 + }, + { + "name": "MinET2", + "pos": 5, + "selection": "1", + "value": 20 + }, + { + "name": "MinMSqr", + "pos": 6, + "selection": "1", + "value": 640000 + }, + { + "name": "MaxMSqr", + "pos": 7, + "selection": "1", + "value": 99980001 + }, + { + "name": "MinET1", + "pos": 8, + "selection": "2", + "value": 30 + }, + { + "name": "MinET2", + "pos": 9, + "selection": "2", + "value": 20 + }, + { + "name": "MinMSqr", + "pos": 10, + "selection": "2", + "value": 490000 + }, + { + "name": "MaxMSqr", + "pos": 11, + "selection": "2", + "value": 99980001 + }, + { + "name": "MinET1", + "pos": 12, + "selection": "3", + "value": 30 + }, + { + "name": "MinET2", + "pos": 13, + "selection": "3", + "value": 20 + }, + { + "name": "MinMSqr", + "pos": 14, + "selection": "3", + "value": 250000 + }, + { + "name": "MaxMSqr", + "pos": 15, + "selection": "3", + "value": 99980001 + } + ] + } + }, + { + "algId": 1, + "name": "INVM_AJ_LowMass", + "type": "InvariantMassInclusive1", + "fixedParameters": { + "inputs": [ + { + "name": "Tob", + "position": 0, + "value": "AJs" + } + ], + "outputs": { + "bits": 4, + "name": "Results", + "Bit": [ + { + "name": "400INVM9999-AJ30s6-AJ20s6", + "selection": 0 + }, + { + "name": "300INVM9999-AJ30s6-AJ20s6", + "selection": 1 + }, + { + "name": "200INVM9999-AJ30s6-AJ20s6", + "selection": 2 + }, + { + "name": "100INVM9999-AJ30s6-AJ20s6", + "selection": 3 + } + ] + }, + "generics": [ + { + "name": "InputWidth", + "value": ":OutputWidthSortJET:" + }, + { + "name": "MaxTob", + "value": "6" + }, + { + "name": "NumResultBits", + "value": "4" + } + ] + }, + "variableParameters": { + "parameters": [ + { + "name": "MinET1", + "pos": 0, + "selection": "0", + "value": 30 + }, + { + "name": "MinET2", + "pos": 1, + "selection": "0", + "value": 20 + }, + { + "name": "MinMSqr", + "pos": 2, + "selection": "0", + "value": 160000 + }, + { + "name": "MaxMSqr", + "pos": 3, + "selection": "0", + "value": 99980001 + }, + { + "name": "MinET1", + "pos": 4, + "selection": "1", + "value": 30 + }, + { + "name": "MinET2", + "pos": 5, + "selection": "1", + "value": 20 + }, + { + "name": "MinMSqr", + "pos": 6, + "selection": "1", + "value": 90000 + }, + { + "name": "MaxMSqr", + "pos": 7, + "selection": "1", + "value": 99980001 + }, + { + "name": "MinET1", + "pos": 8, + "selection": "2", + "value": 30 + }, + { + "name": "MinET2", + "pos": 9, + "selection": "2", + "value": 20 + }, + { + "name": "MinMSqr", + "pos": 10, + "selection": "2", + "value": 40000 + }, + { + "name": "MaxMSqr", + "pos": 11, + "selection": "2", + "value": 99980001 + }, + { + "name": "MinET1", + "pos": 12, + "selection": "3", + "value": 30 + }, + { + "name": "MinET2", + "pos": 13, + "selection": "3", + "value": 20 + }, + { + "name": "MinMSqr", + "pos": 14, + "selection": "3", + "value": 10000 + }, + { + "name": "MaxMSqr", + "pos": 15, + "selection": "3", + "value": 99980001 + } + ] + } + }, + { + "algId": 93, + "name": "INVM_NFF", + "type": "InvariantMassInclusive2", + "fixedParameters": { + "inputs": [ + { + "name": "Tob1", + "position": 0, + "value": "Js" + }, + { + "name": "Tob2", + "position": 1, + "value": "AJs" + } + ], + "outputs": { + "bits": 4, + "name": "Results", + "Bit": [ + { + "name": "600INVM9999-J30s6-AJ20s6", + "selection": 0 + }, + { + "name": "500INVM9999-J30s6-AJ20s6", + "selection": 1 + }, + { + "name": "400INVM9999-J30s6-AJ20s6", + "selection": 2 + }, + { + "name": "200INVM9999-J30s6-AJ20s6", + "selection": 3 + } + ] + }, + "generics": [ + { + "name": "InputWidth1", + "value": ":OutputWidthSortJET:" + }, + { + "name": "InputWidth2", + "value": ":OutputWidthSortJET:" + }, + { + "name": "MaxTob1", + "value": "6" + }, + { + "name": "MaxTob2", + "value": "6" + }, + { + "name": "NumResultBits", + "value": "4" + } + ] + }, + "variableParameters": { + "parameters": [ + { + "name": "MinET1", + "pos": 0, + "selection": "0", + "value": 30 + }, + { + "name": "MinET2", + "pos": 1, + "selection": "0", + "value": 20 + }, + { + "name": "MinMSqr", + "pos": 2, + "selection": "0", + "value": 360000 + }, + { + "name": "MaxMSqr", + "pos": 3, + "selection": "0", + "value": 99980001 + }, + { + "name": "MinET1", + "pos": 4, + "selection": "1", + "value": 30 + }, + { + "name": "MinET2", + "pos": 5, + "selection": "1", + "value": 20 + }, + { + "name": "MinMSqr", + "pos": 6, + "selection": "1", + "value": 250000 + }, + { + "name": "MaxMSqr", + "pos": 7, + "selection": "1", + "value": 99980001 + }, + { + "name": "MinET1", + "pos": 8, + "selection": "2", + "value": 30 + }, + { + "name": "MinET2", + "pos": 9, + "selection": "2", + "value": 20 + }, + { + "name": "MinMSqr", + "pos": 10, + "selection": "2", + "value": 160000 + }, + { + "name": "MaxMSqr", + "pos": 11, + "selection": "2", + "value": 99980001 + }, + { + "name": "MinET1", + "pos": 12, + "selection": "3", + "value": 30 + }, + { + "name": "MinET2", + "pos": 13, + "selection": "3", + "value": 20 + }, + { + "name": "MinMSqr", + "pos": 14, + "selection": "3", + "value": 40000 + }, + { + "name": "MaxMSqr", + "pos": 15, + "selection": "3", + "value": 99980001 + } + ] + } + } + ] +} diff --git a/Trigger/TrigConfiguration/TrigConfIO/test/data/LVL1config_Physics_pp_v7.json b/Trigger/TrigConfiguration/TrigConfIO/test/data/LVL1config_Physics_pp_v7.json new file mode 100644 index 0000000000000000000000000000000000000000..ea0c1fea94e893c1f44079aea9a12769f9386e11 --- /dev/null +++ b/Trigger/TrigConfiguration/TrigConfIO/test/data/LVL1config_Physics_pp_v7.json @@ -0,0 +1,839 @@ +{ + "ctpVersion": 4, + "version": 1, + "name": "Physics_pp_v7", + "menu": { + "name": "Physics_pp_v7", + "phase": "lumi", + "items": [ + { + "complexDeadtime": 0, + "ctpId": 11, + "definition": "(EM22VHI[x1]&BGRP0&BGRP1)", + "monitor": "LF:111|HF:000", + "name": "L1_EM22VHI", + "partition": 1, + "triggerType": "10000100", + "AND": [ + { + "TriggerCondition": { + "multi": 1, + "name": "EM22VHI_x1", + "triggerThreshold": "EM22VHI" + } + }, + { + "InternalTrigger": { + "name": "BGRP0" + } + }, + { + "InternalTrigger": { + "name": "BGRP1" + } + } + ] + }, + { + "complexDeadtime": 0, + "ctpId": 392, + "definition": "(EM24VHI[x1]&BGRP0&BGRP1)", + "monitor": "LF:111|HF:000", + "name": "L1_EM24VHI", + "partition": 1, + "triggerType": "10000100", + "AND": [ + { + "TriggerCondition": { + "multi": 1, + "name": "EM24VHI_x1", + "triggerThreshold": "EM24VHI" + } + }, + { + "InternalTrigger": { + "name": "BGRP0" + } + }, + { + "InternalTrigger": { + "name": "BGRP1" + } + } + ] + } + ] + }, + "thresholds": [ + { + "active": 1, + "bitnum": 3, + "id": 63, + "input": "ctpin", + "mapping": 13, + "name": "EM22VHI", + "type": "EM", + "version": 1, + "thresholdValues": [ + { + "em_isolation": 63, + "etamax": 49, + "etamin": -49, + "had_isolation": 63, + "had_veto": 99, + "isobits": "00100", + "name": "EM22VHIfull", + "phimax": 64, + "phimin": 0, + "priority": 1, + "thresholdval": 24, + "type": "EM", + "window": 0 + }, + { + "em_isolation": 63, + "etamax": -17, + "etamin": -25, + "had_isolation": 63, + "had_veto": 99, + "isobits": "00100", + "name": "EM22VHIfull", + "phimax": 64, + "phimin": 0, + "priority": 2, + "thresholdval": 23, + "type": "EM", + "window": 0 + }, + { + "em_isolation": 63, + "etamax": -15, + "etamin": -17, + "had_isolation": 63, + "had_veto": 99, + "isobits": "00100", + "name": "EM22VHIfull", + "phimax": 64, + "phimin": 0, + "priority": 2, + "thresholdval": 21, + "type": "EM", + "window": 0 + }, + { + "em_isolation": 63, + "etamax": -14, + "etamin": -15, + "had_isolation": 63, + "had_veto": 99, + "isobits": "00100", + "name": "EM22VHIfull", + "phimax": 64, + "phimin": 0, + "priority": 2, + "thresholdval": 19, + "type": "EM", + "window": 0 + }, + { + "em_isolation": 63, + "etamax": -13, + "etamin": -14, + "had_isolation": 63, + "had_veto": 99, + "isobits": "00100", + "name": "EM22VHIfull", + "phimax": 64, + "phimin": 0, + "priority": 2, + "thresholdval": 20, + "type": "EM", + "window": 0 + }, + { + "em_isolation": 63, + "etamax": -11, + "etamin": -13, + "had_isolation": 63, + "had_veto": 99, + "isobits": "00100", + "name": "EM22VHIfull", + "phimax": 64, + "phimin": 0, + "priority": 2, + "thresholdval": 21, + "type": "EM", + "window": 0 + }, + { + "em_isolation": 63, + "etamax": -8, + "etamin": -11, + "had_isolation": 63, + "had_veto": 99, + "isobits": "00100", + "name": "EM22VHIfull", + "phimax": 64, + "phimin": 0, + "priority": 2, + "thresholdval": 22, + "type": "EM", + "window": 0 + }, + { + "em_isolation": 63, + "etamax": -7, + "etamin": -8, + "had_isolation": 63, + "had_veto": 99, + "isobits": "00100", + "name": "EM22VHIfull", + "phimax": 64, + "phimin": 0, + "priority": 2, + "thresholdval": 23, + "type": "EM", + "window": 0 + }, + { + "em_isolation": 63, + "etamax": 0, + "etamin": -7, + "had_isolation": 63, + "had_veto": 99, + "isobits": "00100", + "name": "EM22VHIfull", + "phimax": 64, + "phimin": 0, + "priority": 2, + "thresholdval": 24, + "type": "EM", + "window": 0 + }, + { + "em_isolation": 63, + "etamax": 7, + "etamin": 0, + "had_isolation": 63, + "had_veto": 99, + "isobits": "00100", + "name": "EM22VHIfull", + "phimax": 64, + "phimin": 0, + "priority": 2, + "thresholdval": 24, + "type": "EM", + "window": 0 + }, + { + "em_isolation": 63, + "etamax": 8, + "etamin": 7, + "had_isolation": 63, + "had_veto": 99, + "isobits": "00100", + "name": "EM22VHIfull", + "phimax": 64, + "phimin": 0, + "priority": 2, + "thresholdval": 23, + "type": "EM", + "window": 0 + }, + { + "em_isolation": 63, + "etamax": 11, + "etamin": 8, + "had_isolation": 63, + "had_veto": 99, + "isobits": "00100", + "name": "EM22VHIfull", + "phimax": 64, + "phimin": 0, + "priority": 2, + "thresholdval": 22, + "type": "EM", + "window": 0 + }, + { + "em_isolation": 63, + "etamax": 13, + "etamin": 11, + "had_isolation": 63, + "had_veto": 99, + "isobits": "00100", + "name": "EM22VHIfull", + "phimax": 64, + "phimin": 0, + "priority": 2, + "thresholdval": 21, + "type": "EM", + "window": 0 + }, + { + "em_isolation": 63, + "etamax": 14, + "etamin": 13, + "had_isolation": 63, + "had_veto": 99, + "isobits": "00100", + "name": "EM22VHIfull", + "phimax": 64, + "phimin": 0, + "priority": 2, + "thresholdval": 20, + "type": "EM", + "window": 0 + }, + { + "em_isolation": 63, + "etamax": 15, + "etamin": 14, + "had_isolation": 63, + "had_veto": 99, + "isobits": "00100", + "name": "EM22VHIfull", + "phimax": 64, + "phimin": 0, + "priority": 2, + "thresholdval": 19, + "type": "EM", + "window": 0 + }, + { + "em_isolation": 63, + "etamax": 17, + "etamin": 15, + "had_isolation": 63, + "had_veto": 99, + "isobits": "00100", + "name": "EM22VHIfull", + "phimax": 64, + "phimin": 0, + "priority": 2, + "thresholdval": 21, + "type": "EM", + "window": 0 + }, + { + "em_isolation": 63, + "etamax": 25, + "etamin": 17, + "had_isolation": 63, + "had_veto": 99, + "isobits": "00100", + "name": "EM22VHIfull", + "phimax": 64, + "phimin": 0, + "priority": 2, + "thresholdval": 23, + "type": "EM", + "window": 0 + } + ], + "cable": { + "connector": "CON1", + "input": "SLOT7", + "name": "EM2", + "signal": { + "rangeBegin": 15, + "rangeEnd": 17 + } + } + }, + { + "active": 1, + "bitnum": 3, + "id": 64, + "input": "ctpin", + "mapping": 14, + "name": "EM24VHI", + "type": "EM", + "version": 1, + "thresholdValues": [ + { + "em_isolation": 63, + "etamax": 49, + "etamin": -49, + "had_isolation": 63, + "had_veto": 99, + "isobits": "00100", + "name": "EM24VHIfull", + "phimax": 64, + "phimin": 0, + "priority": 1, + "thresholdval": 24, + "type": "EM", + "window": 0 + }, + { + "em_isolation": 63, + "etamax": -17, + "etamin": -25, + "had_isolation": 63, + "had_veto": 99, + "isobits": "00100", + "name": "EM24VHIfull", + "phimax": 64, + "phimin": 0, + "priority": 2, + "thresholdval": 25, + "type": "EM", + "window": 0 + }, + { + "em_isolation": 63, + "etamax": -15, + "etamin": -17, + "had_isolation": 63, + "had_veto": 99, + "isobits": "00100", + "name": "EM24VHIfull", + "phimax": 64, + "phimin": 0, + "priority": 2, + "thresholdval": 23, + "type": "EM", + "window": 0 + }, + { + "em_isolation": 63, + "etamax": -14, + "etamin": -15, + "had_isolation": 63, + "had_veto": 99, + "isobits": "00100", + "name": "EM24VHIfull", + "phimax": 64, + "phimin": 0, + "priority": 2, + "thresholdval": 21, + "type": "EM", + "window": 0 + }, + { + "em_isolation": 63, + "etamax": -13, + "etamin": -14, + "had_isolation": 63, + "had_veto": 99, + "isobits": "00100", + "name": "EM24VHIfull", + "phimax": 64, + "phimin": 0, + "priority": 2, + "thresholdval": 22, + "type": "EM", + "window": 0 + }, + { + "em_isolation": 63, + "etamax": -11, + "etamin": -13, + "had_isolation": 63, + "had_veto": 99, + "isobits": "00100", + "name": "EM24VHIfull", + "phimax": 64, + "phimin": 0, + "priority": 2, + "thresholdval": 23, + "type": "EM", + "window": 0 + }, + { + "em_isolation": 63, + "etamax": -8, + "etamin": -11, + "had_isolation": 63, + "had_veto": 99, + "isobits": "00100", + "name": "EM24VHIfull", + "phimax": 64, + "phimin": 0, + "priority": 2, + "thresholdval": 24, + "type": "EM", + "window": 0 + }, + { + "em_isolation": 63, + "etamax": -7, + "etamin": -8, + "had_isolation": 63, + "had_veto": 99, + "isobits": "00100", + "name": "EM24VHIfull", + "phimax": 64, + "phimin": 0, + "priority": 2, + "thresholdval": 25, + "type": "EM", + "window": 0 + }, + { + "em_isolation": 63, + "etamax": 0, + "etamin": -7, + "had_isolation": 63, + "had_veto": 99, + "isobits": "00100", + "name": "EM24VHIfull", + "phimax": 64, + "phimin": 0, + "priority": 2, + "thresholdval": 26, + "type": "EM", + "window": 0 + }, + { + "em_isolation": 63, + "etamax": 7, + "etamin": 0, + "had_isolation": 63, + "had_veto": 99, + "isobits": "00100", + "name": "EM24VHIfull", + "phimax": 64, + "phimin": 0, + "priority": 2, + "thresholdval": 26, + "type": "EM", + "window": 0 + }, + { + "em_isolation": 63, + "etamax": 8, + "etamin": 7, + "had_isolation": 63, + "had_veto": 99, + "isobits": "00100", + "name": "EM24VHIfull", + "phimax": 64, + "phimin": 0, + "priority": 2, + "thresholdval": 25, + "type": "EM", + "window": 0 + }, + { + "em_isolation": 63, + "etamax": 11, + "etamin": 8, + "had_isolation": 63, + "had_veto": 99, + "isobits": "00100", + "name": "EM24VHIfull", + "phimax": 64, + "phimin": 0, + "priority": 2, + "thresholdval": 24, + "type": "EM", + "window": 0 + }, + { + "em_isolation": 63, + "etamax": 13, + "etamin": 11, + "had_isolation": 63, + "had_veto": 99, + "isobits": "00100", + "name": "EM24VHIfull", + "phimax": 64, + "phimin": 0, + "priority": 2, + "thresholdval": 23, + "type": "EM", + "window": 0 + }, + { + "em_isolation": 63, + "etamax": 14, + "etamin": 13, + "had_isolation": 63, + "had_veto": 99, + "isobits": "00100", + "name": "EM24VHIfull", + "phimax": 64, + "phimin": 0, + "priority": 2, + "thresholdval": 22, + "type": "EM", + "window": 0 + }, + { + "em_isolation": 63, + "etamax": 15, + "etamin": 14, + "had_isolation": 63, + "had_veto": 99, + "isobits": "00100", + "name": "EM24VHIfull", + "phimax": 64, + "phimin": 0, + "priority": 2, + "thresholdval": 21, + "type": "EM", + "window": 0 + }, + { + "em_isolation": 63, + "etamax": 17, + "etamin": 15, + "had_isolation": 63, + "had_veto": 99, + "isobits": "00100", + "name": "EM24VHIfull", + "phimax": 64, + "phimin": 0, + "priority": 2, + "thresholdval": 23, + "type": "EM", + "window": 0 + }, + { + "em_isolation": 63, + "etamax": 25, + "etamin": 17, + "had_isolation": 63, + "had_veto": 99, + "isobits": "00100", + "name": "EM24VHIfull", + "phimax": 64, + "phimin": 0, + "priority": 2, + "thresholdval": 25, + "type": "EM", + "window": 0 + } + ], + "cable": { + "connector": "CON1", + "input": "SLOT7", + "name": "EM2", + "signal": { + "rangeBegin": 18, + "rangeEnd": 20 + } + } + } + ], + "CaloInfo": { + "global_em_scale": 2, + "global_jet_scale": 1, + "name": "CaloInfo", + "METSignificance": { + "teSqrtMax": 63, + "teSqrtMin": 4, + "xeMax": 63, + "xeMin": 11, + "xsSigmaOffset": 1640, + "xsSigmaScale": 1150 + }, + "Isolation": [ + { + "thrtype": "HAIsoForEMthr", + "Parametrization": [ + { + "etamax": 49, + "etamin": -49, + "isobit": 1, + "mincut": 10, + "offset": -2, + "priority": 0, + "slope": 230, + "upperlimit": 50 + }, + { + "etamax": 49, + "etamin": -49, + "isobit": 2, + "mincut": 0, + "offset": 0, + "priority": 0, + "slope": 0, + "upperlimit": 0 + }, + { + "etamax": 49, + "etamin": -49, + "isobit": 3, + "mincut": 10, + "offset": -2, + "priority": 0, + "slope": 230, + "upperlimit": 50 + }, + { + "etamax": 49, + "etamin": -49, + "isobit": 4, + "mincut": 10, + "offset": -2, + "priority": 0, + "slope": 230, + "upperlimit": 50 + }, + { + "etamax": 49, + "etamin": -49, + "isobit": 5, + "mincut": 10, + "offset": -2, + "priority": 0, + "slope": 230, + "upperlimit": 50 + } + ] + }, + { + "thrtype": "EMIsoForEMthr", + "Parametrization": [ + { + "etamax": 49, + "etamin": -49, + "isobit": 1, + "mincut": 0, + "offset": 0, + "priority": 0, + "slope": 0, + "upperlimit": 0 + }, + { + "etamax": 49, + "etamin": -49, + "isobit": 2, + "mincut": 20, + "offset": -18, + "priority": 0, + "slope": 80, + "upperlimit": 50 + }, + { + "etamax": 49, + "etamin": -49, + "isobit": 3, + "mincut": 20, + "offset": -18, + "priority": 0, + "slope": 80, + "upperlimit": 50 + }, + { + "etamax": 49, + "etamin": -49, + "isobit": 4, + "mincut": 10, + "offset": -20, + "priority": 0, + "slope": 80, + "upperlimit": 50 + }, + { + "etamax": 49, + "etamin": -49, + "isobit": 5, + "mincut": 15, + "offset": -18, + "priority": 0, + "slope": 80, + "upperlimit": 50 + } + ] + }, + { + "thrtype": "EMIsoForTAUthr", + "Parametrization": [ + { + "etamax": 49, + "etamin": -49, + "isobit": 1, + "mincut": 0, + "offset": 30, + "priority": 0, + "slope": 100, + "upperlimit": 60 + }, + { + "etamax": 49, + "etamin": -49, + "isobit": 2, + "mincut": 0, + "offset": 20, + "priority": 0, + "slope": 100, + "upperlimit": 60 + }, + { + "etamax": 49, + "etamin": -49, + "isobit": 3, + "mincut": 0, + "offset": 15, + "priority": 0, + "slope": 100, + "upperlimit": 60 + }, + { + "etamax": 49, + "etamin": -49, + "isobit": 4, + "mincut": 0, + "offset": 40, + "priority": 0, + "slope": 0, + "upperlimit": 124 + }, + { + "etamax": 49, + "etamin": -49, + "isobit": 5, + "mincut": 0, + "offset": 30, + "priority": 0, + "slope": 100, + "upperlimit": 60 + } + ] + } + ], + "MinimumTOBPt": [ + { + "etamax": 49, + "etamin": -49, + "priority": 0, + "ptmin": 3, + "thrtype": "EM" + }, + { + "etamax": 49, + "etamin": -49, + "priority": 0, + "ptmin": 8, + "thrtype": "TAU" + }, + { + "etamax": 49, + "etamin": -49, + "priority": 0, + "ptmin": 12, + "thrtype": "JETS", + "window": 4 + }, + { + "etamax": 49, + "etamin": -49, + "priority": 0, + "ptmin": 12, + "thrtype": "JETL", + "window": 8 + } + ] + }, + "MuctpiInfo": { + "high_pt": 1, + "low_pt": 1, + "max_cand": 13, + "name": "muctpi" + } +} diff --git a/Trigger/TrigConfiguration/TrigConfIO/test/read_config_info.cxx b/Trigger/TrigConfiguration/TrigConfIO/test/read_config_info.cxx new file mode 100644 index 0000000000000000000000000000000000000000..47ebf4e81147f3a523d1fbf891c0f0579806347a --- /dev/null +++ b/Trigger/TrigConfiguration/TrigConfIO/test/read_config_info.cxx @@ -0,0 +1,130 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#include "TrigConfIO/JsonFileLoader.h" + +#include "TrigConfData/L1TopoMenu.h" +#include "TrigConfData/L1Menu.h" +#include "TrigConfData/HLTMenu.h" + +#include <iostream> +#include <fstream> +#include <cstdlib> +using namespace std; + +bool testSize( const TrigConf::L1TopoMenu & l1topo, uint l1toposize, + const TrigConf::L1Menu & l1, uint l1size, + const TrigConf::HLTMenu & hlt, uint hltsize ) +{ + return + ( l1topo.size() == l1toposize ) && + ( l1.size() == l1size ) && + ( hlt.size() == hltsize ); +} + +int main() { + + string testfilepath = string(getenv("TESTFILEPATH")) + "/"; + + const string l1topofn = testfilepath + "L1Topoconfig_Physics_pp_v7.json"; + const string l1fn = testfilepath + "LVL1config_Physics_pp_v7.json"; + const string hltfn = testfilepath + "HLTconfig_Physics_pp_v7.json"; + TrigConf::JsonFileLoader fileLoader; + fileLoader.setLevel(TrigConf::MSGTC::WARNING); + + TrigConf::L1TopoMenu l1topomenu; + TrigConf::L1Menu l1menu; + TrigConf::HLTMenu hltmenu; + bool loadTestL1Topo = fileLoader.loadFile( l1topofn, l1topomenu ).isSuccess(); + cout << "Test loading of L1Topo file ... " << ( loadTestL1Topo ? "passed" : "failed" ) << endl; + + bool loadTestL1 = fileLoader.loadFile( l1fn, l1menu ).isSuccess(); + cout << "Test loading of L1 file ... " << ( loadTestL1 ? "passed" : "failed" ) << endl; + + bool loadTestHLT = fileLoader.loadFile( hltfn, hltmenu ).isSuccess(); + cout << "Test loading of HLT file ... " << ( loadTestHLT ? "passed" : "failed" ) << endl; + + if ( ( loadTestL1Topo && loadTestL1 && loadTestHLT ) == false ) return 1; // can't not continue with the other tests + + bool allSucceeded = true; + + bool sizeTest = testSize( l1topomenu, 3, l1menu, 2, hltmenu, 2); + if (l1menu.thresholds().size() != 2) + sizeTest = false; + if ( ! sizeTest ) allSucceeded = false; + cout << "Test size of menus ... " << ( sizeTest ? "passed" : "failed" ) << endl; + + + bool itemAccessTest = true; + for(const auto & item : l1menu ) { + item.name(); item.ctpId(); item.definition(); item.triggerType(); + } + for(const auto & thr : l1menu.thresholds() ) { + try { + thr.thresholdValues(); + thr.name(); thr.type(); thr.mapping(); + if( const auto & cable = thr.cable() ) { + cable["input"]; cable["connector"]; + } + } + catch(...) { + itemAccessTest = false; + } + } + if ( ! itemAccessTest ) allSucceeded = false; + cout << "Test access of items ... " << ( itemAccessTest ? "passed" : "failed" ) << endl; + + + + bool chainAccessTest = true; + for( auto & ch : hltmenu ) { + ch.name(); + ch.counter(); + ch.l1item(); + for( auto & s : ch.streams() ) { + try { + s["type"]; + s["name"]; + s["obeyLB"]; + s["prescale"]; + } + catch(...) { + chainAccessTest = false; + } + } + std::string g1(""),g2(""); + for( auto & g : ch.groups() ) { + g1 += g; + } + for( auto & g : ch.getList("groups") ) { + g2 += g["name"]; + } + if(g1 != g2) + chainAccessTest = false; + } + + if ( ! chainAccessTest ) allSucceeded = false; + cout << "Test access of chains ... " << ( chainAccessTest ? "passed" : "failed" ) << endl; + + + + + + /* this will be implemented later + const std::string fn1{"testout_boostWriter.json"}; + const std::string fn2{"testout_manualWriter.json"}; + + boost::property_tree::write_json( fn1, menu.data() ); + + std::ofstream of2; + of2.open(fn2); + menu.print(of2); + of2.close(); + + menu.print(); + */ + + return allSucceeded ? 0 : 1; + +} diff --git a/Trigger/TrigConfiguration/TrigConfIO/test/testTriggerConfigAccess.sh b/Trigger/TrigConfiguration/TrigConfIO/test/testTriggerConfigAccess.sh new file mode 100755 index 0000000000000000000000000000000000000000..2fa7ed3514e9d76440e7957fb6f6fa362ccfc037 --- /dev/null +++ b/Trigger/TrigConfiguration/TrigConfIO/test/testTriggerConfigAccess.sh @@ -0,0 +1,7 @@ +#!/usr/bin/bash + +printenv | grep TESTFILE + +echo "$1" + +exit 1 diff --git a/Trigger/TrigConfiguration/TrigConfIO/utils/TestTriggerMenuAccess.cxx b/Trigger/TrigConfiguration/TrigConfIO/utils/TestTriggerMenuAccess.cxx new file mode 100644 index 0000000000000000000000000000000000000000..9a487a83ccb05ea8aac894c158080a94e469649c --- /dev/null +++ b/Trigger/TrigConfiguration/TrigConfIO/utils/TestTriggerMenuAccess.cxx @@ -0,0 +1,179 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#include "TrigConfIO/JsonFileLoader.h" +#include "TrigConfData/HLTMenu.h" +#include "TrigConfData/L1Menu.h" +#include "TrigConfData/L1TopoMenu.h" + +#include <boost/property_tree/ptree.hpp> +#include <boost/property_tree/json_parser.hpp> + +using namespace std; + +int main(int /*argc*/, char** /*argv*/) { + + // HLT menu test file + const std::string l1topo_filename = "TrigConfIO/L1Topoconfig_Physics_pp_v7_21.1.40.json"; + const std::string l1_filename = "TrigConfIO/LVL1config_Physics_pp_v7_21.1.40.json"; + const std::string hlt_filename = "TrigConfIO/HLTconfig_Physics_pp_v7_21.1.40.json"; + + // file loader + TrigConf::JsonFileLoader fileLoader; + + cout << "===========================" << endl + << "===== =====" << endl + << "===== Test HLT access =====" << endl + << "===== =====" << endl + << "===========================" << endl << endl; + + + // HLT + TrigConf::HLTMenu hltmenu; + fileLoader.loadFile( hlt_filename, hltmenu); + + cout << "Loaded the menu " << hltmenu.name() << endl; + cout << "Menu has " << hltmenu.size() << " chains, going to print the first 3." << endl; + int np = 3; + for( auto & ch : hltmenu ) { + cout << endl << "Chain '" << ch.name() << "' with counter " << ch["counter"] << " and seeded by " << ch["l1item"] << endl; + cout << "has the following streams:" << endl; + for( auto & s : ch.streams() ) { + cout << " " << s["type"] << "_" << s["name"] + << (s["obeyLB"]=="yes" ? " (obeys LB" : " (does not obey LB") << " and has prescale " << s["prescale"] << ")" << endl; + } + cout << "and groups: "; + for( auto & g : ch.groups() ) { + cout << " " << g; + } + cout << endl; + cout << "for comparison generic access to groups: "; + for( auto & g : ch.getList("groups") ) { + cout << " " << g["name"]; + } + cout << endl; + if(--np==0) break; + } + + // LVL1 + cout << endl + << "==========================" << endl + << "===== =====" << endl + << "===== Test L1 access =====" << endl + << "===== =====" << endl + << "==========================" << endl << endl; + + TrigConf::L1Menu l1menu; + fileLoader.loadFile( l1_filename, l1menu); + cout << "Loaded the L1 menu " << l1menu.name() << endl; + + // items + cout << endl << "L1 menu has " << l1menu.size() << " items, going to print only the first." << endl; + int ni = 1; // print only first 1 + for(const auto & item : l1menu ) { + cout << endl << item.name() << "(ctpId " << item.ctpId() << ") has definition '" << item.definition() << "' and triggerType " << item.triggerType()<< endl; + cout << "Full printout:" << endl; + item.print(); + if(--ni==0) break; + } + + // thresholds + cout << endl << "L1 menu has " << l1menu.thresholds().size() << " thresholds, going to print only the first." << endl; + ni = 1; // print only first 1 + for(const auto & thr : l1menu.thresholds() ) { + const auto & thrValues = thr.thresholdValues(); + cout << endl << thr.name() << " of type " << thr.type() << " (mapping " << thr.mapping() << ") has " << thrValues.size() << " thresholdValues. Cabling info:" << endl; + if( const auto & cable = thr.cable() ) { + cout << "Cabling info: " << cable["input"] << " " << cable["connector"] << endl; + } else { + cout << "No cabling info available for this threshold" << endl; + } + if(--ni==0) break; + } + + + + cout << endl + << "=====" << endl + << "===== Test access to sub config" << endl + << "=====" << endl << endl; + + // CaloInfo, etc + cout << "Loading CaloInfo.MuctpiInfo" << endl; + TrigConf::DataStructure muctpiConf; + fileLoader.loadFile( l1_filename, muctpiConf, "MuctpiInfo"); + muctpiConf.print(); + + cout << "Loading CaloInfo.METSignificance" << endl; + TrigConf::DataStructure metSignificance; + fileLoader.loadFile( l1_filename, metSignificance, "CaloInfo.METSignificance"); + metSignificance.print(); + + cout << "Loading CaloInfo" << endl; + TrigConf::DataStructure caloInfo; + fileLoader.loadFile( l1_filename, caloInfo, "CaloInfo"); // only works when the data that CaloInfo points to is a well-formed + boost::property_tree::write_json( "testOutput_CaloInfo.json", caloInfo.data() ); + cout << "EM scale : " << caloInfo["global_em_scale"] << endl; + for( auto & iso : caloInfo.getList("Isolation") ) { + cout << iso["thrtype"] << endl; + for( auto & par : iso.getList("Parametrization") ) { + cout << par["isobit"] << " with slope " << par["slope"] << " and upperlimit " << par["upperlimit"] << endl; + } + } + + // L1Topo + cout << endl + << "==============================" << endl + << "===== =====" << endl + << "===== Test L1Topo access =====" << endl + << "===== =====" << endl + << "==============================" << endl << endl; + + TrigConf::L1TopoMenu l1topomenu; + fileLoader.loadFile( l1topo_filename, l1topomenu); + cout << "Loaded the L1Topo menu " << l1topomenu.name() << endl; + + // output lines + cout << endl << "L1Topo menu has " << l1topomenu.size() << " outputs, going to print the first 5." << endl; + ni = 5; + for(auto & output : l1topomenu) { + cout << " " << output.algName() << "[" << output.algId() << "] on board " << output.board() << ", fpga " << output.fpga() << " and clock " << output.clock() + << " feeds lines " << output.triggerLines() << ", starting at bit " << output.firstBit() << endl; + if(--ni==0) break; + } + + // sorting algorithms + const auto & sortAlgs = l1topomenu.getList("sortingAlgorithms"); + cout << endl << "L1Topo menu has " << sortAlgs.size() << " sorting algorithms. Going to print first 2:" << endl; + ni=2; + for(auto & alg : sortAlgs ) { + cout << endl << "Sorting algorithm " << alg["name"] << "[" << alg["algId"] << "] uses inputs" << endl; + for( const auto &x : alg.getList("fixedParameters.inputs") ) { + cout << " " << x["name"] << " " << x["value"] << endl; + } + cout << "and produces output "; + const auto & x = alg.getObject("fixedParameters.outputs"); + cout << alg["fixedParameters.outputs.name"] << " " << x["value"] << endl; // two ways to access name and value + if(--ni==0) break; + } + + // decision algorithm + const auto & decAlgs = l1topomenu.getList("decisionAlgorithms"); + cout << endl << "L1Topo menu has " << decAlgs.size() << " decision algorithms. Going to print first" << endl; + ni=1; + for(auto & alg : decAlgs ) { + cout << endl << "Decision algorithm " << alg["name"] << "[" << alg["algId"] << "] uses inputs" << endl; + for( const auto &x : alg.getList("fixedParameters.inputs") ) { + cout << " " << x["name"] << " at " << x["position"] << ": " << x["value"] << endl; + } + const auto & o = alg.getObject("fixedParameters.outputs"); + cout << "and produces " << o["bits"] << " outputs:" << endl; + for(const auto & b : o.getList("Bit") ) { + cout << " " << b["selection"] << " " << b["name"] << endl; + } + if(--ni==0) break; + } + + return 0; +} diff --git a/Trigger/TrigConfiguration/TrigConfigSvc/CMakeLists.txt b/Trigger/TrigConfiguration/TrigConfigSvc/CMakeLists.txt index 42ad499a6a2a158be982c2d4816a0d39fb84aff7..ef6d1bdca61260b25557baf8f36e2c809ab1d3d3 100644 --- a/Trigger/TrigConfiguration/TrigConfigSvc/CMakeLists.txt +++ b/Trigger/TrigConfiguration/TrigConfigSvc/CMakeLists.txt @@ -31,6 +31,7 @@ atlas_depends_on_subdirs( PUBLIC find_package( Boost COMPONENTS filesystem thread system ) find_package( COOL COMPONENTS CoolKernel ) find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread PyROOT ) +find_package( cx_Oracle ) # Component(s) in the package: atlas_add_library( TrigConfigSvcLib diff --git a/Trigger/TrigConfiguration/TrigDbHltUpload/CMakeLists.txt b/Trigger/TrigConfiguration/TrigDbHltUpload/CMakeLists.txt index 250d914623ea2cf4dcf4353668ec6f730455b623..a44aaa2ced1d000f936d3e1eda7e0df771ac29a4 100644 --- a/Trigger/TrigConfiguration/TrigDbHltUpload/CMakeLists.txt +++ b/Trigger/TrigConfiguration/TrigDbHltUpload/CMakeLists.txt @@ -8,6 +8,7 @@ atlas_subdir( TrigDbHltUpload ) # External dependencies: find_package( Oracle ) +find_package( cx_Oracle ) # Install files from the package: atlas_install_scripts( share/ConvertHLTSetup_txt2xml.py diff --git a/Trigger/TrigDataAccess/TrigDataAccessMonitoring/TrigDataAccessMonitoring/MonROBDataProviderSvc.h b/Trigger/TrigDataAccess/TrigDataAccessMonitoring/TrigDataAccessMonitoring/MonROBDataProviderSvc.h index 1a0794746da280fb9f4080e728ef95761f0c4f13..355f9299c8dd8999db3eb7d45d3ef443b8bc661e 100644 --- a/Trigger/TrigDataAccess/TrigDataAccessMonitoring/TrigDataAccessMonitoring/MonROBDataProviderSvc.h +++ b/Trigger/TrigDataAccess/TrigDataAccessMonitoring/TrigDataAccessMonitoring/MonROBDataProviderSvc.h @@ -57,7 +57,7 @@ public: /// Add ROBFragments to cache for given ROB ids, ROB fragments may be retrieved with DataCollector using ROBDataProviderSvc::addROBData; virtual void addROBData(const std::vector<uint32_t>& robIds, - const std::string callerName="UNKNOWN") override; + const std::string_view callerName="UNKNOWN") override; /// Add a given LVL1/LVL2 ROBFragment to cache using ROBDataProviderSvc::setNextEvent; @@ -70,7 +70,7 @@ public: using ROBDataProviderSvc::getROBData; virtual void getROBData(const std::vector<uint32_t>& robIds, std::vector<const ROBF*>& robFragments, - const std::string callerName="UNKNOWN") override; + const std::string_view callerName="UNKNOWN") override; /// Retrieve the whole event. using ROBDataProviderSvc::getEvent; diff --git a/Trigger/TrigDataAccess/TrigDataAccessMonitoring/src/MonROBDataProviderSvc.cxx b/Trigger/TrigDataAccess/TrigDataAccessMonitoring/src/MonROBDataProviderSvc.cxx index a4edba585d3ad913c3e420566fe77bdb92cc7962..898bec780b57d0efb99198bc3fcfe2f87edae90f 100644 --- a/Trigger/TrigDataAccess/TrigDataAccessMonitoring/src/MonROBDataProviderSvc.cxx +++ b/Trigger/TrigDataAccess/TrigDataAccessMonitoring/src/MonROBDataProviderSvc.cxx @@ -174,7 +174,7 @@ StatusCode MonROBDataProviderSvc::queryInterface(const InterfaceID& riid, void** } /// addROBData (no effect in offline, all ROBS were already read in from full event) -void MonROBDataProviderSvc::addROBData(const std::vector<uint32_t>& robIds, const std::string callerName) +void MonROBDataProviderSvc::addROBData(const std::vector<uint32_t>& robIds, const std::string_view callerName) { // for offline running all requested ROBs should be found in cache ROBDataProviderSvc::addROBData(robIds,callerName); @@ -208,7 +208,7 @@ void MonROBDataProviderSvc::addROBData(const std::vector<uint32_t>& robIds, cons if ( p_robMonCollection ) { // caller name std::string caller_name("UNKNOWN"); - if (callerName != "UNKNOWN") { + if (callerName != caller_name) { caller_name = callerName; } else { IAlgorithm* alg(0); @@ -363,7 +363,7 @@ void MonROBDataProviderSvc::setNextEvent(const RawEvent* re) /** return ROBData for ROBID */ -void MonROBDataProviderSvc::getROBData(const std::vector<uint32_t>& robIds, std::vector<const ROBF*>& robFragments, std::string callerName) +void MonROBDataProviderSvc::getROBData(const std::vector<uint32_t>& robIds, std::vector<const ROBF*>& robFragments, std::string_view callerName) { ROBDataProviderSvc::getROBData(robIds,robFragments, callerName); return ; diff --git a/Trigger/TrigDataAccess/TrigROBDataProviderSvc/TrigROBDataProviderSvc/ITrigROBDataProviderSvc.h b/Trigger/TrigDataAccess/TrigROBDataProviderSvc/TrigROBDataProviderSvc/ITrigROBDataProviderSvc.h index 4d4cd640ef4ad4c1bf07de9b34061f5d6d420bce..a961547179ef1d4917ca3780d3ac68b2f0684049 100755 --- a/Trigger/TrigDataAccess/TrigROBDataProviderSvc/TrigROBDataProviderSvc/ITrigROBDataProviderSvc.h +++ b/Trigger/TrigDataAccess/TrigROBDataProviderSvc/TrigROBDataProviderSvc/ITrigROBDataProviderSvc.h @@ -10,6 +10,7 @@ #include <vector> #include <map> #include <string> +#include <string_view> // Declaration of the interface ID ( interface id, major version, minor version) static const InterfaceID IID_ITrigROBDataProviderSvc("ITrigROBDataProviderSvc", 2 , 0); @@ -52,14 +53,14 @@ public: /// Collect all data for an event from the ROS and put them into the cache /// Return value: number of ROBs which were retrieved to complete the event /// Optinonally the name of the caller of this method can be specified for cost monitoring - virtual int collectCompleteEventData(const std::string callerName="UNKNOWN") = 0; + virtual int collectCompleteEventData(const std::string_view callerName="UNKNOWN") = 0; //------------------------------------- // Methods useful for (cost) monitoring //------------------------------------- /// set the name of the program which uses the ROBDataProviderSvc - virtual void setCallerName(const std::string) = 0; + virtual void setCallerName(const std::string_view) = 0; /// get the name of the program which is presently registered in the ROBDataProviderSvc virtual std::string getCallerName() = 0; diff --git a/Trigger/TrigDataAccess/TrigROBDataProviderSvc/src/TrigROBDataProviderSvc.cxx b/Trigger/TrigDataAccess/TrigROBDataProviderSvc/src/TrigROBDataProviderSvc.cxx index 5ccb3971b321a56bc26064c343dbb21a3ee88703..222554bcfb899b3b7dd8e9074ecc45be1d14aab8 100755 --- a/Trigger/TrigDataAccess/TrigROBDataProviderSvc/src/TrigROBDataProviderSvc.cxx +++ b/Trigger/TrigDataAccess/TrigROBDataProviderSvc/src/TrigROBDataProviderSvc.cxx @@ -427,7 +427,7 @@ StatusCode TrigROBDataProviderSvc::queryInterface(const InterfaceID& riid, void* - in offline only check that given ROB ids are in the map, issue an error if not */ -void TrigROBDataProviderSvc::addROBData(const std::vector<uint32_t>& robIds, const std::string callerName) +void TrigROBDataProviderSvc::addROBData(const std::vector<uint32_t>& robIds, const std::string_view callerName) { //------------------- // remove empty calls @@ -844,7 +844,7 @@ void TrigROBDataProviderSvc::setNextEvent(const RawEvent* re) /** return ROBData for ROBID */ -void TrigROBDataProviderSvc::getROBData(const std::vector<uint32_t>& robIds, std::vector<const ROBF*>& robFragments, std::string callerName) +void TrigROBDataProviderSvc::getROBData(const std::vector<uint32_t>& robIds, std::vector<const ROBF*>& robFragments, std::string_view callerName) { //-------------------- @@ -1096,7 +1096,7 @@ std::string TrigROBDataProviderSvc::dumpROBcache() const { /// Collect all data for an event from the ROS and put them into the cache /// Return value: number of ROBs which were retrieved to complete event -int TrigROBDataProviderSvc::collectCompleteEventData(const std::string callerName) { +int TrigROBDataProviderSvc::collectCompleteEventData(const std::string_view callerName) { // return if call was already issued if (m_isEventComplete) return 0; @@ -1216,17 +1216,17 @@ int TrigROBDataProviderSvc::collectCompleteEventData(const std::string callerNam } // end int collectCompleteEventData(...) int TrigROBDataProviderSvc::collectCompleteEventData(const EventContext&, - const std::string callerName) + const std::string_view callerName) { return collectCompleteEventData (callerName); } /// set the name of the program which uses the ROBDataProviderSvc -void TrigROBDataProviderSvc::setCallerName(std::string callerName) +void TrigROBDataProviderSvc::setCallerName(std::string_view callerName) { // caller name of this method std::string caller_name("UNKNOWN"); - if (callerName != "UNKNOWN") { + if (callerName != caller_name) { caller_name = callerName; }else{ IAlgorithm* alg(0); diff --git a/Trigger/TrigDataAccess/TrigROBDataProviderSvc/src/TrigROBDataProviderSvc.h b/Trigger/TrigDataAccess/TrigROBDataProviderSvc/src/TrigROBDataProviderSvc.h index 675b042d79cb2158dd44cc4078b15d782661e21e..8eccb1f80408d4873b89976e762af540ce2676f5 100755 --- a/Trigger/TrigDataAccess/TrigROBDataProviderSvc/src/TrigROBDataProviderSvc.h +++ b/Trigger/TrigDataAccess/TrigROBDataProviderSvc/src/TrigROBDataProviderSvc.h @@ -80,7 +80,7 @@ public: /// Add ROBFragments to cache for given ROB ids, ROB fragments may be retrieved with DataCollector using ROBDataProviderSvc::addROBData; virtual void addROBData(const std::vector<uint32_t>& robIds, - const std::string callerName="UNKNOWN") override; + const std::string_view callerName="UNKNOWN") override; /// Add a given LVL1 ROBFragment to cache using ROBDataProviderSvc::setNextEvent; @@ -94,7 +94,7 @@ public: using ROBDataProviderSvc::getROBData; virtual void getROBData(const std::vector<uint32_t>& robIds, std::vector<const ROBF*>& robFragments, - const std::string callerName="UNKNOWN") override; + const std::string_view callerName="UNKNOWN") override; /// Retrieve the whole event. using ROBDataProviderSvc::getEvent; @@ -123,11 +123,11 @@ public: /// Collect all data for an event from the ROS and put them into the cache /// Return value: number of ROBs which were retrieved to complete the event - virtual int collectCompleteEventData(const std::string callerName="UNKNOWN") override; - virtual int collectCompleteEventData(const EventContext&, const std::string callerName="UNKNOWN") override; + virtual int collectCompleteEventData(const std::string_view callerName="UNKNOWN") override; + virtual int collectCompleteEventData(const EventContext&, const std::string_view callerName="UNKNOWN") override; /// set the name of the program which uses the ROBDataProviderSvc - virtual void setCallerName(const std::string) override; + virtual void setCallerName(const std::string_view) override; /// get the name of the program which is presently registered in the ROBDataProviderSvc virtual std::string getCallerName() override { return m_callerName; }; diff --git a/Trigger/TrigDataAccess/TrigROBDataProviderSvc/src/TrigROBDataProviderSvc_RTT.cxx b/Trigger/TrigDataAccess/TrigROBDataProviderSvc/src/TrigROBDataProviderSvc_RTT.cxx index 07523ce449b62696e97b8d7341bddde3c7ff6210..5762978e5f9daef931ed7530080cb2d878a0eba9 100644 --- a/Trigger/TrigDataAccess/TrigROBDataProviderSvc/src/TrigROBDataProviderSvc_RTT.cxx +++ b/Trigger/TrigDataAccess/TrigROBDataProviderSvc/src/TrigROBDataProviderSvc_RTT.cxx @@ -178,14 +178,14 @@ void TrigROBDataProviderSvc_RTT::FillEvent(){ } } -void TrigROBDataProviderSvc_RTT::setCallerName(std::string callerName) +void TrigROBDataProviderSvc_RTT::setCallerName(std::string_view callerName) { return TrigROBDataProviderSvc::setCallerName(callerName); } -void TrigROBDataProviderSvc_RTT::addROBData(const std::vector<uint32_t>& robIds, std::string callerName) +void TrigROBDataProviderSvc_RTT::addROBData(const std::vector<uint32_t>& robIds, std::string_view callerName) { //call the base class method TrigROBDataProviderSvc:: addROBData(robIds, callerName); @@ -234,7 +234,7 @@ void TrigROBDataProviderSvc_RTT::addROBData(const std::vector<uint32_t>& robIds, void TrigROBDataProviderSvc_RTT::getROBData(const std::vector<uint32_t>& robIds, std::vector<const ROBF*>& robFragments, - const std::string callerName) + const std::string_view callerName) { //call the base class method diff --git a/Trigger/TrigDataAccess/TrigROBDataProviderSvc/src/TrigROBDataProviderSvc_RTT.h b/Trigger/TrigDataAccess/TrigROBDataProviderSvc/src/TrigROBDataProviderSvc_RTT.h index d197e49b15e35ed9cc9609642cad5e3ba885310c..912731206e739c4f358797cea4e93e88d40d04a0 100644 --- a/Trigger/TrigDataAccess/TrigROBDataProviderSvc/src/TrigROBDataProviderSvc_RTT.h +++ b/Trigger/TrigDataAccess/TrigROBDataProviderSvc/src/TrigROBDataProviderSvc_RTT.h @@ -64,18 +64,18 @@ class TrigROBDataProviderSvc_RTT : public TrigROBDataProviderSvc, void FillEvent(); /// set the name of the program which uses the ROBDataProviderSvc - virtual void setCallerName(const std::string) override; + virtual void setCallerName(const std::string_view) override; //declare ROBdata // inherited from base class using ROBDataProviderSvc::addROBData; virtual void addROBData(const std::vector<uint32_t>& robIds, - const std::string callerName="UNKNOWN") override; + const std::string_view callerName="UNKNOWN") override; /// Retrieve ROBFragments for given ROB ids from cache using ROBDataProviderSvc::getROBData; virtual void getROBData(const std::vector<uint32_t>& robIds, std::vector<const ROBF*>& robFragments, - const std::string callerName="UNKNOWN") override; + const std::string_view callerName="UNKNOWN") override; /// Add a given LVL1 ROBFragment to cache using ROBDataProviderSvc::setNextEvent; @@ -96,9 +96,9 @@ class TrigROBDataProviderSvc_RTT : public TrigROBDataProviderSvc, /// Collect all data for an event from the ROS and put them into the cache /// Return value: number of ROBs which were retrieved to complete the event /// Optinonally the name of the caller of this method can be specified for cost monitoring - virtual int collectCompleteEventData(const std::string callerName="UNKNOWN") override + virtual int collectCompleteEventData(const std::string_view callerName="UNKNOWN") override { return TrigROBDataProviderSvc::collectCompleteEventData (callerName); } - virtual int collectCompleteEventData(const EventContext& ctx, const std::string callerName="UNKNOWN") override + virtual int collectCompleteEventData(const EventContext& ctx, const std::string_view callerName="UNKNOWN") override { return TrigROBDataProviderSvc::collectCompleteEventData (ctx, callerName); } virtual bool isMissingPrefetching() override { return 0;};// m_missingPrefetchingPerEvent; }; diff --git a/Trigger/TrigEvent/TrigNavStructure/CMakeLists.txt b/Trigger/TrigEvent/TrigNavStructure/CMakeLists.txt index ba4ff687e9d15b3b0e1cf91bd8e8f028c000efe1..2219f6bee9c37dd24d22f7218ba9f6d81439f897 100644 --- a/Trigger/TrigEvent/TrigNavStructure/CMakeLists.txt +++ b/Trigger/TrigEvent/TrigNavStructure/CMakeLists.txt @@ -1,4 +1,3 @@ -# $Id: CMakeLists.txt 778117 2016-10-12 20:11:14Z krasznaa $ ################################################################################ # Package: TrigNavStructure ################################################################################ @@ -10,7 +9,8 @@ atlas_subdir( TrigNavStructure ) atlas_depends_on_subdirs( PUBLIC Control/AthContainers - Control/AthToolSupport/AsgTools ) + Control/AthToolSupport/AsgTools + Control/CxxUtils ) # External dependencies: find_package( Boost COMPONENTS regex ) diff --git a/Trigger/TrigEvent/TrigNavStructure/TrigNavStructure/TrigNavStructure.h b/Trigger/TrigEvent/TrigNavStructure/TrigNavStructure/TrigNavStructure.h index 566f82b9aeabb41f661543098606e3cb5c4c4aab..675e07a5fe631393e41ca213f5485b359af79f86 100644 --- a/Trigger/TrigEvent/TrigNavStructure/TrigNavStructure/TrigNavStructure.h +++ b/Trigger/TrigEvent/TrigNavStructure/TrigNavStructure/TrigNavStructure.h @@ -1,7 +1,7 @@ // Dear emacs, this is -*- c++ -*- /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ @@ -10,6 +10,7 @@ #include <vector> +#include "CxxUtils/checker_macros.h" #include "TrigNavStructure/TriggerElement.h" #include "TrigNavStructure/TriggerElementFactory.h" #include "TrigNavStructure/BaseHolder.h" @@ -363,8 +364,8 @@ namespace HLT { TriggerElementFactory m_factory; //!< factory of trigger elements TrigHolderStructure m_holderstorage; //!< structure for feature holders - static const TriggerElement* m_unspecifiedTE; - static std::string m_unspecifiedLabel; + static const TriggerElement* m_unspecifiedTE ATLAS_THREAD_SAFE; + static std::string m_unspecifiedLabel ATLAS_THREAD_SAFE; }; diff --git a/Trigger/TrigEvent/TrigSteeringEvent/TrigSteeringEvent/HLTResultMT.h b/Trigger/TrigEvent/TrigSteeringEvent/TrigSteeringEvent/HLTResultMT.h index 16457d822ee769656bea65e27f3fcfdb1390b0bb..64208fd5d22ceafc7a3ad45c38fa8d9633d6f874 100644 --- a/Trigger/TrigEvent/TrigSteeringEvent/TrigSteeringEvent/HLTResultMT.h +++ b/Trigger/TrigEvent/TrigSteeringEvent/TrigSteeringEvent/HLTResultMT.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef TRIGSTEERINGEVENT_HLTResultMT_H @@ -44,6 +44,9 @@ namespace HLT { /// Const-getter for stream tags const std::vector<eformat::helper::StreamTag>& getStreamTags() const; + /// Non-const-getter for stream tags needed by the result maker to remove disabled ROBs/SubDets + std::vector<eformat::helper::StreamTag>& getStreamTagsNonConst(); + /** @brief Replace the stored list of stream tags with the given one * * Removes duplicates from the input list by merging robs and dets lists of stream tags with equal name and type. diff --git a/Trigger/TrigEvent/TrigSteeringEvent/src/HLTResultMT.cxx b/Trigger/TrigEvent/TrigSteeringEvent/src/HLTResultMT.cxx index 417adb41f230d2ed757d51c9315257af97270d8e..f1ad2d38c24c4c52777699cf8fd6568e39f52e7a 100644 --- a/Trigger/TrigEvent/TrigSteeringEvent/src/HLTResultMT.cxx +++ b/Trigger/TrigEvent/TrigSteeringEvent/src/HLTResultMT.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "TrigSteeringEvent/HLTResultMT.h" @@ -27,6 +27,11 @@ const std::vector<eformat::helper::StreamTag>& HLT::HLTResultMT::getStreamTags() return m_streamTags; } +// ----------------------------------------------------------------------------- +std::vector<eformat::helper::StreamTag>& HLT::HLTResultMT::getStreamTagsNonConst() { + return m_streamTags; +} + // ----------------------------------------------------------------------------- StatusCode HLT::HLTResultMT::setStreamTags(const std::vector<eformat::helper::StreamTag>& streamTags) { m_streamTags.clear(); diff --git a/Trigger/TrigFTK/FTK_DataProviderInterfaces/FTK_DataProviderInterfaces/IFTK_UncertaintyTool.h b/Trigger/TrigFTK/FTK_DataProviderInterfaces/FTK_DataProviderInterfaces/IFTK_UncertaintyTool.h index 641b08749d85d920bf95be4d0e647a5b564ee3ea..815c2e75d88d93a474b808bab43d994463f98853 100644 --- a/Trigger/TrigFTK/FTK_DataProviderInterfaces/FTK_DataProviderInterfaces/IFTK_UncertaintyTool.h +++ b/Trigger/TrigFTK/FTK_DataProviderInterfaces/FTK_DataProviderInterfaces/IFTK_UncertaintyTool.h @@ -14,7 +14,7 @@ class FTK_RawTrack; // // Name the track paramaters // -namespace FTKTrackParam{ +namespace FTKTrackParam { enum TP { d0 = 0, z0 = 1, @@ -23,7 +23,7 @@ namespace FTKTrackParam{ Ipt = 4, qOp = 5, theta = 6, - pt = 7 + pt = 7, }; } @@ -38,14 +38,13 @@ static const InterfaceID IID_IFTK_UncertaintyTool("IFTK_UncertaintyTool",1,0); class IFTK_UncertaintyTool : virtual public IAlgTool { - public: +public: /** other standard AlgTool methods */ - static const InterfaceID& interfaceID () //!< the Tool's interface + static const InterfaceID& interfaceID() //!< the Tool's interface { return IID_IFTK_UncertaintyTool; } - virtual double getParamCovMtx (const FTK_RawTrack& trk, bool hasIBL, int id0, int id1) = 0; - + virtual double getParamCovMtx(const FTK_RawTrack& trk, bool hasIBL, int id0, int id1) = 0; }; #endif diff --git a/Trigger/TrigFTK/FTK_DataProviderSvc/FTK_DataProviderSvc/FTK_UncertaintyTool.h b/Trigger/TrigFTK/FTK_DataProviderSvc/FTK_DataProviderSvc/FTK_UncertaintyTool.h index daf5db5b3eaddee81bda952937300451ccb0d057..226db53bcc952a3889df78b3c363539c25ebff44 100644 --- a/Trigger/TrigFTK/FTK_DataProviderSvc/FTK_DataProviderSvc/FTK_UncertaintyTool.h +++ b/Trigger/TrigFTK/FTK_DataProviderSvc/FTK_DataProviderSvc/FTK_UncertaintyTool.h @@ -32,7 +32,7 @@ class FTK_UncertaintyTool : public AthAlgTool, virtual public IFTK_UncertaintyTool { - private : +private: enum hasBL { noBL = 0, @@ -47,7 +47,7 @@ class FTK_UncertaintyTool : public AthAlgTool, virtual public IFTK_UncertaintyTo linear = 1 }; - public: +public: FTK_UncertaintyTool( const std::string&, const std::string&, const IInterface* ); virtual ~FTK_UncertaintyTool(){}; @@ -58,7 +58,7 @@ class FTK_UncertaintyTool : public AthAlgTool, virtual public IFTK_UncertaintyTo // // Get the element of the covariance matrix for id0th and id1th track parameter // - virtual double getParamCovMtx (const FTK_RawTrack& trk, bool hasIBL, int id0, int id1); + virtual double getParamCovMtx(const FTK_RawTrack& trk, bool hasIBL, int id0, int id1); // // Initialize the constants @@ -69,6 +69,8 @@ class FTK_UncertaintyTool : public AthAlgTool, virtual public IFTK_UncertaintyTo private: + double getParamCovMtx_old(const FTK_RawTrack& trk, bool hasIBL, int id0, int id1); + // // Helper functions with the uncerianties // @@ -186,7 +188,8 @@ class FTK_UncertaintyTool : public AthAlgTool, virtual public IFTK_UncertaintyTo // std::string m_ftkparversion; - + // Enable old parametrisations + bool m_compatMode; }; diff --git a/Trigger/TrigFTK/FTK_DataProviderSvc/src/FTK_UncertaintyTool.cxx b/Trigger/TrigFTK/FTK_DataProviderSvc/src/FTK_UncertaintyTool.cxx index 9f155f010b1605f3649c05589473050159010205..35da9583e154479b8a200237350024b766727d37 100644 --- a/Trigger/TrigFTK/FTK_DataProviderSvc/src/FTK_UncertaintyTool.cxx +++ b/Trigger/TrigFTK/FTK_DataProviderSvc/src/FTK_UncertaintyTool.cxx @@ -23,7 +23,144 @@ #include "FTK_DataProviderSvc/FTK_UncertaintyTool.h" using std::map; using std::string; -using std::cout; using std::endl; +using std::cout; using std::endl; + +namespace { + struct FastSimParameters + { + double amplCore; + double meanCore; + double aCore; + double bCore; + double amplTail; + double meanTail; + double aTail; + double bTail; + }; + + // Parameters in 2 IBL bins (hit/no hit) and 5 eta bins (0, 0.5, 1.0, 1.5, 2.0, 2.5) + using FastSimParameterSet = const FastSimParameters[2][5]; + + inline int EtaBin(double eta) + { + const double abseta = abs(eta); + + if (abseta > 2.5) + return 4; + + return static_cast<int>(abseta * 2); + } + + inline int IBLBin(bool hasIBLHit) + { + return hasIBLHit ? 0 : 1; + } + + inline double sigma(double a, double b, double invPt2) + { + return sqrt(a + b * (invPt2*invPt2)); + } + + double GetError(bool hasIBLHit, double eta, double invPt, FastSimParameterSet& parameters) + { + const int etabin = EtaBin(eta); + const int iblbin = IBLBin(hasIBLHit); + + auto& params = parameters[iblbin][etabin]; + + const double invPt2 = 0.5 * invPt; + + const double sigmaCore = sigma(params.aCore, params.bCore, invPt2); + const double sigmaTail = sigma(params.aTail, params.bTail, invPt2); + + return (params.amplCore * sigmaCore + params.amplTail * sigmaTail) / (params.amplCore + params.amplTail); + } + + const FastSimParameterSet FastSimParameters_d0 = { + { + {1.000000e+00, 0.000000e+00, 5.700200e-04, 5.437944e+04, 1.100000e-01, 0.000000e+00, 1.666591e-03, 3.586450e+05}, + {1.000000e+00, 0.000000e+00, 4.844049e-04, 7.070505e+04, 1.100000e-01, 0.000000e+00, 2.693387e-03, 4.568432e+05}, + {1.000000e+00, 0.000000e+00, 5.435634e-04, 1.064718e+05, 1.100000e-01, 0.000000e+00, 3.731382e-03, 6.174656e+05}, + {1.000000e+00, 0.000000e+00, 9.325689e-04, 1.803775e+05, 1.100000e-01, 0.000000e+00, 6.702443e-03, 1.330276e+06}, + {1.000000e+00, 0.000000e+00, 1.525671e-03, 3.459623e+05, 1.100000e-01, 0.000000e+00, 1.674857e-02, 3.133805e+06}, + }, + { + {1.000000e+00, 0.000000e+00, 3.365111e-04, 1.846811e+04, 1.100000e-01, 0.000000e+00, 1.164449e-03, 5.983721e+04}, + {1.000000e+00, 0.000000e+00, 3.186037e-04, 2.331183e+04, 1.100000e-01, 0.000000e+00, 1.282122e-03, 7.966916e+04}, + {1.000000e+00, 0.000000e+00, 4.012198e-04, 3.172024e+04, 1.100000e-01, 0.000000e+00, 1.644470e-03, 1.205381e+05}, + {1.000000e+00, 0.000000e+00, 5.482587e-04, 4.827720e+04, 1.100000e-01, 0.000000e+00, 2.607949e-03, 1.921344e+05}, + {1.000000e+00, 0.000000e+00, 8.326011e-04, 7.892970e+04, 1.100000e-01, 0.000000e+00, 6.407767e-03, 3.508604e+05}, + }, + }; + + const FastSimParameterSet FastSimParameters_z0 = { + { + {1.000000e+00, 0.000000e+00, 1.962677e-02, 9.086464e+04, 1.100000e-01, 0.000000e+00, 4.075973e-02, 1.726567e+06 }, + {1.000000e+00, 0.000000e+00, 1.562178e-02, 2.516894e+05, 1.100000e-01, 0.000000e+00, 4.164214e-02, 1.302287e+06 }, + {1.000000e+00, 0.000000e+00, 1.815425e-02, 5.192081e+05, 1.100000e-01, 0.000000e+00, 6.684842e-02, 2.826332e+06 }, + {1.000000e+00, 0.000000e+00, 4.166662e-02, 1.631462e+06, 1.100000e-01, 0.000000e+00, 2.141205e-01, 1.240381e+07 }, + {1.000000e+00, 0.000000e+00, 1.013725e-01, 8.650727e+06, 1.100000e-01, 0.000000e+00, 8.230914e-01, 8.169051e+07 }, + }, + { + {1.000000e+00, 0.000000e+00, 6.253207e-03, 5.240011e+04, 1.100000e-01, 0.000000e+00, 7.939942e-03, 1.517791e+05 }, + {1.000000e+00, 0.000000e+00, 3.936087e-03, 7.066114e+04, 1.100000e-01, 0.000000e+00, 8.974887e-03, 2.283212e+05 }, + {1.000000e+00, 0.000000e+00, 8.602167e-03, 1.869958e+05, 1.100000e-01, 0.000000e+00, 2.367743e-02, 6.415471e+05 }, + {1.000000e+00, 0.000000e+00, 1.694396e-02, 5.427136e+05, 1.100000e-01, 0.000000e+00, 6.771001e-02, 1.933855e+06 }, + {1.000000e+00, 0.000000e+00, 5.482604e-02, 1.907271e+06, 1.100000e-01, 0.000000e+00, 2.969994e-01, 8.139293e+06 }, + }, + }; + + const FastSimParameterSet FastSimParameters_eta = { + { + {1.000000e+00, 0.000000e+00, 1.204840e-06, 4.668120e+01, 1.100000e-01, 0.000000e+00, 2.043563e-06, 2.295754e+02 }, + {1.000000e+00, 0.000000e+00, 6.419600e-07, 5.133359e+01, 1.100000e-01, 0.000000e+00, 1.496217e-06, 2.521133e+02 }, + {1.000000e+00, 0.000000e+00, 5.447665e-07, 6.166226e+01, 1.100000e-01, 0.000000e+00, 1.546516e-06, 2.755418e+02 }, + {1.000000e+00, 0.000000e+00, 5.665617e-07, 9.508760e+01, 1.100000e-01, 0.000000e+00, 3.171946e-06, 4.840149e+02 }, + {1.000000e+00, 0.000000e+00, 9.373726e-07, 1.919797e+02, 1.100000e-01, 0.000000e+00, 6.897586e-06, 1.026491e+03 }, + }, + { + {1.000000e+00, 0.000000e+00, 7.496859e-07, 3.301107e+01, 1.100000e-01, 0.000000e+00, 1.642214e-06, 1.016009e+02 }, + {1.000000e+00, 0.000000e+00, 4.564739e-07, 3.304368e+01, 1.100000e-01, 0.000000e+00, 1.254484e-06, 9.852592e+01 }, + {1.000000e+00, 0.000000e+00, 4.366910e-07, 4.449627e+01, 1.100000e-01, 0.000000e+00, 1.937983e-06, 1.249774e+02 }, + {1.000000e+00, 0.000000e+00, 5.777798e-07, 5.663534e+01, 1.100000e-01, 0.000000e+00, 2.589830e-06, 1.762125e+02 }, + {1.000000e+00, 0.000000e+00, 9.363907e-07, 7.985674e+01, 1.100000e-01, 0.000000e+00, 5.036494e-06, 2.844372e+02 }, + }, + }; + + const FastSimParameterSet FastSimParameters_phi = { + { + {1.000000e+00, 0.000000e+00, 8.130652e-08, 3.158970e+01, 1.100000e-01, 0.000000e+00, 5.350961e-07, 1.538612e+02 }, + {1.000000e+00, 0.000000e+00, 1.083964e-07, 4.038393e+01, 1.100000e-01, 0.000000e+00, 4.313475e-07, 2.150540e+02 }, + {1.000000e+00, 0.000000e+00, 1.285549e-07, 6.095933e+01, 1.100000e-01, 0.000000e+00, 7.242223e-07, 2.976441e+02 }, + {1.000000e+00, 0.000000e+00, 3.031775e-07, 1.054400e+02, 1.100000e-01, 0.000000e+00, 2.989829e-06, 6.108252e+02 }, + {1.000000e+00, 0.000000e+00, 5.462634e-07, 1.970348e+02, 1.100000e-01, 0.000000e+00, 8.746469e-06, 1.054684e+03 }, + }, + { + {1.000000e+00, 0.000000e+00, 1.429275e-07, 1.833850e+01, 1.100000e-01, 0.000000e+00, 6.376208e-07, 5.786213e+01 }, + {1.000000e+00, 0.000000e+00, 1.498748e-07, 2.295547e+01, 1.100000e-01, 0.000000e+00, 7.434808e-07, 7.394416e+01 }, + {1.000000e+00, 0.000000e+00, 2.110908e-07, 3.174038e+01, 1.100000e-01, 0.000000e+00, 9.643213e-07, 1.106054e+02 }, + {1.000000e+00, 0.000000e+00, 3.251302e-07, 4.917401e+01, 1.100000e-01, 0.000000e+00, 2.177912e-06, 1.753651e+02 }, + {1.000000e+00, 0.000000e+00, 5.438376e-07, 7.807236e+01, 1.100000e-01, 0.000000e+00, 3.982290e-06, 3.344589e+02 }, + }, + }; + + const FastSimParameterSet FastSimParameters_Ipt = { + { + {1.000000e+00, 0.000000e+00, 2.176247e-12, 3.372455e-04, 1.100000e-01, 0.000000e+00, 1.619578e-11, 1.297069e-03 }, + {1.000000e+00, 0.000000e+00, 2.515409e-12, 4.173315e-04, 1.100000e-01, 0.000000e+00, 1.640457e-11, 1.934070e-03 }, + {1.000000e+00, 0.000000e+00, 2.969128e-12, 8.230829e-04, 1.100000e-01, 0.000000e+00, 3.165478e-11, 3.211156e-03 }, + {1.000000e+00, 0.000000e+00, 1.241242e-11, 1.492929e-03, 1.100000e-01, 0.000000e+00, 1.667900e-10, 5.584656e-03 }, + {1.000000e+00, 0.000000e+00, 1.853669e-11, 2.362025e-03, 1.100000e-01, 0.000000e+00, 2.258558e-10, 9.794419e-03 }, + }, + { + {1.000000e+00, 0.000000e+00, 1.826416e-12, 3.552206e-04, 1.100000e-01, 0.000000e+00, 8.161897e-12, 1.196878e-03 }, + {1.000000e+00, 0.000000e+00, 1.934396e-12, 4.709845e-04, 1.100000e-01, 0.000000e+00, 8.623748e-12, 1.524293e-03 }, + {1.000000e+00, 0.000000e+00, 3.033192e-12, 8.394077e-04, 1.100000e-01, 0.000000e+00, 1.796648e-11, 2.951569e-03 }, + {1.000000e+00, 0.000000e+00, 9.374058e-12, 1.578456e-03, 1.100000e-01, 0.000000e+00, 9.828657e-11, 4.168337e-03 }, + {1.000000e+00, 0.000000e+00, 1.328649e-11, 2.343957e-03, 1.100000e-01, 0.000000e+00, 1.007092e-10, 8.286561e-03 }, + }, + }; +} FTK_UncertaintyTool::FTK_UncertaintyTool(const std::string& t, @@ -31,7 +168,8 @@ FTK_UncertaintyTool::FTK_UncertaintyTool(const std::string& t, const IInterface* p ): AthAlgTool(t,n,p), m_noIBL(false), - m_ftkparversion("DEC2017_V1") + m_ftkparversion("FEB2019"), + m_compatMode(false) { declareInterface< IFTK_UncertaintyTool >( this ); declareProperty( "NoIBL", m_noIBL); @@ -46,18 +184,24 @@ StatusCode FTK_UncertaintyTool::initialize() { // Load Constants // if(m_noIBL){ + m_compatMode = true; LoadConstants_NoIBL(); } else{ - if(m_ftkparversion == "LEGACY"){ + if(m_ftkparversion == "LEGACY") { + m_compatMode = true; LoadConstants(); } - else if(m_ftkparversion == "DEC2017_V1"){ + else if(m_ftkparversion == "DEC2017_V1") { + m_compatMode = true; LoadConstants_DEC2017_V1(); } - else{ - ATH_MSG_WARNING("m_ftkparversion not supported, reverting to default DEC2017_V1 parameters"); - LoadConstants_DEC2017_V1(); + else if (m_ftkparversion == "FEB2019") { + m_compatMode = false; + } + else { + m_compatMode = false; + ATH_MSG_WARNING("m_ftkparversion not supported, reverting to default FEB2019 parameters"); } } @@ -74,9 +218,9 @@ StatusCode FTK_UncertaintyTool::finalize() { // // Covariance Matrix if there is a BLayer Hit // -double FTK_UncertaintyTool::getParamCovMtx(const FTK_RawTrack &trk, bool hasIBL, int id0, int id1) +double FTK_UncertaintyTool::getParamCovMtx_old(const FTK_RawTrack &trk, bool hasIBL, int id0, int id1) { - ATH_MSG_VERBOSE("In getParamCovMtx: id0: " << id0 << " id1: " << id1); + ATH_MSG_VERBOSE("In getParamCovMtx (old parametrization): id0: " << id0 << " id1: " << id1); // @@ -168,6 +312,94 @@ double FTK_UncertaintyTool::getParamCovMtx(const FTK_RawTrack &trk, bool hasIBL, } +double FTK_UncertaintyTool::getParamCovMtx(const FTK_RawTrack &trk, bool hasIBL, int id0, int id1) +{ + if (m_compatMode) { + return getParamCovMtx_old(trk, hasIBL, id0, id1); + } + + // + // Use diagonal Maxtrix for now + // + if (id0 != id1) { + return 0.; + } + + ATH_MSG_VERBOSE("Using new parametrization"); + + double trkIpt = trk.getInvPt(); + double trkTheta = atan2(1.0,trk.getCotTh()); + double trkEta = -log(tan(trkTheta/2)); + + FastSimParameterSet *paramSet = nullptr; + switch (id0) { + case FTKTrackParam::d0: + paramSet = &FastSimParameters_d0; + break; + + case FTKTrackParam::z0: + paramSet = &FastSimParameters_z0; + break; + + case FTKTrackParam::phi: + paramSet = &FastSimParameters_phi; + break; + + case FTKTrackParam::eta: + paramSet = &FastSimParameters_eta; + break; + + case FTKTrackParam::Ipt: + paramSet = &FastSimParameters_Ipt; + break; + + case FTKTrackParam::qOp: + // derive from 1/pt errors + paramSet = &FastSimParameters_Ipt; + break; + + case FTKTrackParam::theta: + // derive from eta errors + paramSet = &FastSimParameters_eta; + break; + + case FTKTrackParam::pt: + // derive from 1/pt errors + paramSet = &FastSimParameters_Ipt; + break; + } + + if (!paramSet) { + ATH_MSG_ERROR("Unknown track parameter ID: " << id0); + return 0.; + } + + double sigmaTP = GetError(hasIBL, trkEta, trkIpt, *paramSet); + + // handle derived uncertainties + switch (id0) { + case FTKTrackParam::qOp: { + // derive from 1/pt errors + const double sigmaEta = GetError(hasIBL, trkEta, trkIpt, FastSimParameters_eta); + sigmaTP= getSigmaQoverP(trkIpt, sigmaTP, trkEta, sigmaEta); + } break; + + case FTKTrackParam::theta: + // derive from eta errors + sigmaTP = getSigmaTheta(trkEta, sigmaTP); + break; + + case FTKTrackParam::pt: + // derive from 1/pt errors + sigmaTP = getSigmaPt(trkIpt, sigmaTP); + break; + } + + return sigmaTP*sigmaTP; +} + + + // diff --git a/Trigger/TrigFTK/FastTrackSimWrap/share/FastTrackSimRegionalWrap_64TowersIBL_InDetClusters_jobOptions.py b/Trigger/TrigFTK/FastTrackSimWrap/share/FastTrackSimRegionalWrap_64TowersIBL_InDetClusters_jobOptions.py index 4ea54f381f908a8103ce759447a19be6bad35b42..0016477cf6ff15d7674ea10a0c2e81ab7da9bd9f 100644 --- a/Trigger/TrigFTK/FastTrackSimWrap/share/FastTrackSimRegionalWrap_64TowersIBL_InDetClusters_jobOptions.py +++ b/Trigger/TrigFTK/FastTrackSimWrap/share/FastTrackSimRegionalWrap_64TowersIBL_InDetClusters_jobOptions.py @@ -32,7 +32,7 @@ FTKSGInput.ReadTruthTracks = True ToolSvc += FTKSGInput # SiLorentzAngleTool for SCT -from SiLorentzAngleSvc.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup +from SiLorentzAngleTool.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup sctLorentzAngleToolSetup = SCTLorentzAngleToolSetup() from TrigFTKTrackConverter.TrigFTKTrackConverterConf import TrigFTKClusterConverterTool diff --git a/Trigger/TrigFTK/FastTrackSimWrap/src/DumpSp.cxx b/Trigger/TrigFTK/FastTrackSimWrap/src/DumpSp.cxx index e49b68ecb7bae74f53c4d98421165c0e6222972b..881f1250667e6122219df4fd27b8430053911472 100644 --- a/Trigger/TrigFTK/FastTrackSimWrap/src/DumpSp.cxx +++ b/Trigger/TrigFTK/FastTrackSimWrap/src/DumpSp.cxx @@ -476,7 +476,8 @@ DumpSp::build_matching_maps() TrackTruthCollection::const_iterator found( TruthMap->find(tracklink2) ); if( found==TruthMap->end() ) { continue; } TrackTruth trtruth( found->second ); - HepMcParticleLink::ExtendedBarCode extBarcode(trtruth.particleLink().barcode(),trtruth.particleLink().eventIndex()); + HepMcParticleLink::ExtendedBarCode extBarcode(trtruth.particleLink().barcode(),trtruth.particleLink().eventIndex(), + trtruth.particleLink().getEventCollection(), HepMcParticleLink::IS_INDEX); // update m_ttrTrackMap with track index corresponding to the greatest figure of merit. if( m_ttrProbMap.find(extBarcode)==m_ttrProbMap.end() ) { // this is the only track matching this barcode so far @@ -639,6 +640,8 @@ DumpSp::dump_truth() const irecmatch = ibestrec->second; } } + HepMcParticleLink::index_type extBarcode2_index, extBarcode2_position; + extBarcode2.eventIndex(extBarcode2_index, extBarcode2_position); ParentBitmask parent_mask( construct_truth_bitmap( particle ) ); (*m_oflraw) << setiosflags(ios::scientific) << "T\t" << setw(14) << setprecision(10) << track_truth_x0 << '\t' @@ -651,7 +654,7 @@ DumpSp::dump_truth() const << pdgcode << '\t' << setw(14) << (int)irecmatch << '\t' << setw(14) << setprecision(10) << precmatch << '\t' - << extBarcode2.eventIndex() << '\t' + << extBarcode2_index << '\t' << extBarcode2.barcode() << '\t' << parent_mask.to_ulong() << '\t' << isDetPaperCut << '\t' @@ -870,7 +873,8 @@ DumpSp::dump_raw_silicon( HitIndexMap& hitIndexMap, HitIndexMap& clusterIndexMap // "best_parent" is the highest pt particle if( !best_parent || best_parent->momentum().perp()<genPt ) { best_parent = particle; - best_extcode = HepMcParticleLink::ExtendedBarCode( particleLink.barcode() , particleLink.eventIndex() ); + best_extcode = HepMcParticleLink::ExtendedBarCode( particleLink.barcode() , particleLink.eventIndex(), + particleLink.getEventCollection(), HepMcParticleLink::IS_INDEX ); } // bcs.insert( HepMcParticleLink::ExtendedBarCode( particleLink.barcode() , particleLink.eventIndex() ) ); // if( particleLink.eventIndex()==0 ) { @@ -904,6 +908,8 @@ DumpSp::dump_raw_silicon( HitIndexMap& hitIndexMap, HitIndexMap& clusterIndexMap } // end if truth found for this pixel } // end if pixel truth available ++hitIndex; + HepMcParticleLink::index_type best_extcode_index, best_extcode_position; + best_extcode.eventIndex(best_extcode_index, best_extcode_position); (*m_oflraw) << "S\t" << setw(14) << setprecision(10) << gPos.x() << '\t' @@ -919,7 +925,7 @@ DumpSp::dump_raw_silicon( HitIndexMap& hitIndexMap, HitIndexMap& clusterIndexMap << m_pixelId->phi_index(rdoId) << '\t' << m_pixelId->eta_index(rdoId) << '\t' << (*iRDO)->getToT() << '\t' - << (long)(best_parent ? best_extcode.eventIndex() : std::numeric_limits<long>::max()) << '\t' + << (long)(best_parent ? best_extcode_index : std::numeric_limits<long>::max()) << '\t' << (long)(best_parent ? best_extcode.barcode() : std::numeric_limits<long>::max()) << '\t' << setprecision(5) << static_cast<unsigned long>(std::ceil(best_parent ? best_parent->momentum().perp() : 0.)) << '\t' // particle pt in MeV << parent_mask.to_ulong() << '\t' @@ -1047,7 +1053,8 @@ DumpSp::dump_raw_silicon( HitIndexMap& hitIndexMap, HitIndexMap& clusterIndexMap // "best_parent" is the highest pt particle if( !best_parent || best_parent->momentum().perp()<genPt ) { best_parent = particle; - best_extcode = HepMcParticleLink::ExtendedBarCode( particleLink.barcode() , particleLink.eventIndex() ); + best_extcode = HepMcParticleLink::ExtendedBarCode( particleLink.barcode() , particleLink.eventIndex(), + particleLink.getEventCollection(), HepMcParticleLink::IS_INDEX ); } // bcs.insert( HepMcParticleLink::ExtendedBarCode( particleLink.barcode() , particleLink.eventIndex() ) ); // if( particleLink.eventIndex()==0 ) { @@ -1078,6 +1085,8 @@ DumpSp::dump_raw_silicon( HitIndexMap& hitIndexMap, HitIndexMap& clusterIndexMap } // end for each contributing particle } // end if truth found for this strip } // end if sct truth available + HepMcParticleLink::index_type best_extcode_index, best_extcode_position; + best_extcode.eventIndex(best_extcode_index, best_extcode_position); (*m_oflraw) << "S\t" << setw(14) << setprecision(10) << gPos.x() << '\t' @@ -1093,7 +1102,7 @@ DumpSp::dump_raw_silicon( HitIndexMap& hitIndexMap, HitIndexMap& clusterIndexMap << m_sctId->side(rdoId) << '\t' << m_sctId->strip(rdoId) << '\t' << (*iRDO)->getGroupSize() << '\t' - << (long)(best_parent ? best_extcode.eventIndex() : std::numeric_limits<long>::max()) << '\t' + << (long)(best_parent ? best_extcode_index : std::numeric_limits<long>::max()) << '\t' << (long)(best_parent ? best_extcode.barcode() : std::numeric_limits<long>::max()) << '\t' << setprecision(5) << static_cast<unsigned long>(std::ceil(best_parent ? best_parent->momentum().perp() : 0.)) << '\t' // particle pt in MeV << parent_mask.to_ulong() << '\t' @@ -1219,7 +1228,8 @@ DumpSp::dump_raw_silicon( HitIndexMap& hitIndexMap, HitIndexMap& clusterIndexMap // "best_parent" is the highest pt particle if( !best_parent || best_parent->momentum().perp()<genPt ) { best_parent = particle; - best_extcode = HepMcParticleLink::ExtendedBarCode( particleLink.barcode() , particleLink.eventIndex() ); + best_extcode = HepMcParticleLink::ExtendedBarCode( particleLink.barcode() , particleLink.eventIndex(), + particleLink.getEventCollection(), HepMcParticleLink::IS_INDEX ); } parent_mask |= construct_truth_bitmap( particle ); } // loop over deposits @@ -1274,7 +1284,8 @@ DumpSp::dump_raw_silicon( HitIndexMap& hitIndexMap, HitIndexMap& clusterIndexMap localx = (*iCluster)->localPosition()[Trk::distPhi] - m_pixelLorentzAngleTool->getLorentzShift(sielement->identifyHash()); localy = (*iCluster)->localPosition()[Trk::distEta]; } - + HepMcParticleLink::index_type best_extcode_index, best_extcode_position; + best_extcode.eventIndex(best_extcode_index, best_extcode_position); (*m_oflraw) << "P\t" << setw(14) << setprecision(10) << gPos.x() << '\t' @@ -1296,7 +1307,7 @@ DumpSp::dump_raw_silicon( HitIndexMap& hitIndexMap, HitIndexMap& clusterIndexMap << (*iCluster)->width().colRow().y() << '\t' // width in eta? << (*iCluster)->rdoList().size() << '\t' // number of pixels in cluster // Cluster truth - << (long)(best_parent ? best_extcode.eventIndex() : std::numeric_limits<long>::max()) << '\t' + << (long)(best_parent ? best_extcode_index : std::numeric_limits<long>::max()) << '\t' << (long)(best_parent ? best_extcode.barcode() : std::numeric_limits<long>::max()) << '\t' << setprecision(5) << static_cast<unsigned long>(std::ceil(best_parent ? best_parent->momentum().perp() : 0.)) << '\t' // particle pt in MeV << parent_mask.to_ulong() @@ -1355,7 +1366,8 @@ DumpSp::dump_raw_silicon( HitIndexMap& hitIndexMap, HitIndexMap& clusterIndexMap // "best_parent" is the highest pt particle if( !best_parent || best_parent->momentum().perp()<genPt ) { best_parent = particle; - best_extcode = HepMcParticleLink::ExtendedBarCode( particleLink.barcode() , particleLink.eventIndex() ); + best_extcode = HepMcParticleLink::ExtendedBarCode( particleLink.barcode() , particleLink.eventIndex(), + particleLink.getEventCollection(), HepMcParticleLink::IS_INDEX ); } parent_mask |= construct_truth_bitmap( particle ); } // loop over deposits @@ -1386,7 +1398,8 @@ DumpSp::dump_raw_silicon( HitIndexMap& hitIndexMap, HitIndexMap& clusterIndexMap // do not add 0.5 to center in middle of strip; match SCT leading spatial edge convention localx = cellIdCentroid.phiIndex() + deltaxphi; // + 0.5 } - + HepMcParticleLink::index_type best_extcode_index, best_extcode_position; + best_extcode.eventIndex(best_extcode_index, best_extcode_position); (*m_oflraw) << "C\t" << setw(14) << setprecision(10) << gPos.x() << '\t' @@ -1404,7 +1417,7 @@ DumpSp::dump_raw_silicon( HitIndexMap& hitIndexMap, HitIndexMap& clusterIndexMap << m_sctId->strip(theId) << '\t' << localx << '\t' << (*iCluster)->rdoList().size() << '\t' // number of strips in cluster - << (long)(best_parent ? best_extcode.eventIndex() : std::numeric_limits<long>::max()) << '\t' + << (long)(best_parent ? best_extcode_index : std::numeric_limits<long>::max()) << '\t' << (long)(best_parent ? best_extcode.barcode() : std::numeric_limits<long>::max()) << '\t' << setprecision(5) << static_cast<unsigned long>(std::ceil(best_parent ? best_parent->momentum().perp() : 0.)) << '\t' // particle pt in MeV << parent_mask.to_ulong() << '\t' @@ -1600,6 +1613,8 @@ DumpSp::dump_tracks( const HitIndexMap& /*hitIndexMap*/, const HitIndexMap& clus assert( ittr != m_ttrProbMap.end() ); mc_frac = ittr->second; } + HepMcParticleLink::index_type best_extcode_index, best_extcode_position; + best_extcode.eventIndex(best_extcode_index, best_extcode_position); // dump one line for each track if( m_dumpSpacePoints ) { (*m_ofl) << "E\t" @@ -1608,7 +1623,7 @@ DumpSp::dump_tracks( const HitIndexMap& /*hitIndexMap*/, const HitIndexMap& clus << setw(14) << setprecision(10) << phi0 << '\t' << setw(14) << setprecision(10) << 1./tan(track->perigeeParameters()->parameters()[Trk::theta]) << '\t' << setw(15) << setprecision(10) << qpt << '\t' - << setw(14) << (long)(mc_frac>=0. ? best_extcode.eventIndex() : std::numeric_limits<long>::max()) << '\t' + << setw(14) << (long)(mc_frac>=0. ? best_extcode_index : std::numeric_limits<long>::max()) << '\t' << setw(14) << (long)(mc_frac>=0. ? best_extcode.barcode() : std::numeric_limits<long>::max()) << '\t' << setw(14) << setprecision(10) << mc_frac << endl; @@ -1619,7 +1634,7 @@ DumpSp::dump_tracks( const HitIndexMap& /*hitIndexMap*/, const HitIndexMap& clus << setw(14) << setprecision(10) << phi0 << '\t' << setw(14) << setprecision(10) << 1./tan(track->perigeeParameters()->parameters()[Trk::theta]) << '\t' << setw(15) << setprecision(10) << qpt << '\t' - << setw(14) << (mc_frac>=0. ? best_extcode.eventIndex() : std::numeric_limits<long>::max()) << '\t' + << setw(14) << (mc_frac>=0. ? best_extcode_index : std::numeric_limits<long>::max()) << '\t' << setw(14) << (mc_frac>=0. ? best_extcode.barcode() : std::numeric_limits<long>::max()) << '\t' << setw(14) << setprecision(10) << mc_frac << '\t'; // dump the indices of the clusters used in this track diff --git a/Trigger/TrigFTK/TrigFTKSim/src/FTK_SGHitInput.cxx b/Trigger/TrigFTK/TrigFTKSim/src/FTK_SGHitInput.cxx index b703ce1e81ed8663570074e519cb8467202f8fd8..25e1228db1e7994c9b348206f2623b8ee5d989b9 100644 --- a/Trigger/TrigFTK/TrigFTKSim/src/FTK_SGHitInput.cxx +++ b/Trigger/TrigFTK/TrigFTKSim/src/FTK_SGHitInput.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "TrigFTKSim/FTK_SGHitInput.h" @@ -365,7 +365,8 @@ FTK_SGHitInput::read_raw_silicon( HitIndexMap& hitIndexMap, HitIndexMap& pixelCl // "best_parent" is the highest pt particle if( !best_parent || best_parent->momentum().perp()<genPt ) { best_parent = particle; - best_extcode = HepMcParticleLink::ExtendedBarCode( particleLink.barcode() , particleLink.eventIndex() ); + best_extcode = HepMcParticleLink::ExtendedBarCode( particleLink.barcode() , particleLink.eventIndex(), + particleLink.getEventCollection(), HepMcParticleLink::IS_INDEX ); } // bcs.insert( HepMcParticleLink::ExtendedBarCode( particleLink.barcode() , particleLink.eventIndex() ) ); // if( particleLink.eventIndex()==0 ) { @@ -402,6 +403,8 @@ FTK_SGHitInput::read_raw_silicon( HitIndexMap& hitIndexMap, HitIndexMap& pixelCl //output// if(m_dooutFileRawHits){ //bz2 file + HepMcParticleLink::index_type best_extcode_index, best_extcode_position; + best_extcode.eventIndex(best_extcode_index, best_extcode_position); (*m_oflraw) << "S\t" << setw(14) << setprecision(10) << gPos.x() << '\t' @@ -417,7 +420,7 @@ FTK_SGHitInput::read_raw_silicon( HitIndexMap& hitIndexMap, HitIndexMap& pixelCl << m_pixelId->phi_index(rdoId) << '\t' << m_pixelId->eta_index(rdoId) << '\t' << (*iRDO)->getToT() << '\t' - << (long)(best_parent ? best_extcode.eventIndex() : std::numeric_limits<long>::max()) << '\t' + << (long)(best_parent ? best_extcode_position : std::numeric_limits<long>::max()) << '\t' << (long)(best_parent ? best_extcode.barcode() : std::numeric_limits<long>::max()) << '\t' << setprecision(5) << static_cast<unsigned long>(std::ceil(best_parent ? best_parent->momentum().perp() : 0.)) << '\t' // particle pt in MeV << parent_mask.to_ulong() << '\t' @@ -449,7 +452,9 @@ FTK_SGHitInput::read_raw_silicon( HitIndexMap& hitIndexMap, HitIndexMap& pixelCl tmpSGhit.setPhiSide(m_pixelId->phi_index(rdoId)); tmpSGhit.setEtaStrip(m_pixelId->eta_index(rdoId)); tmpSGhit.setNStrips((*iRDO)->getToT()); - tmpSGhit.setEventIndex((long)(best_parent ? best_extcode.eventIndex() : std::numeric_limits<long>::max())); + HepMcParticleLink::index_type best_extcode_index, best_extcode_position; + best_extcode.eventIndex(best_extcode_index, best_extcode_position); + tmpSGhit.setEventIndex((long)(best_parent ? best_extcode_position : std::numeric_limits<long>::max())); tmpSGhit.setBarcode((long)(best_parent ? best_extcode.barcode() : std::numeric_limits<long>::max())); tmpSGhit.setBarcodePt( static_cast<unsigned long>(std::ceil(best_parent ? best_parent->momentum().perp() : 0.)) ); tmpSGhit.setParentageMask(parent_mask.to_ulong()); @@ -587,7 +592,8 @@ FTK_SGHitInput::read_raw_silicon( HitIndexMap& hitIndexMap, HitIndexMap& pixelCl // "best_parent" is the highest pt particle if( !best_parent || best_parent->momentum().perp()<genPt ) { best_parent = particle; - best_extcode = HepMcParticleLink::ExtendedBarCode( particleLink.barcode() , particleLink.eventIndex() ); + best_extcode = HepMcParticleLink::ExtendedBarCode( particleLink.barcode() , particleLink.eventIndex(), + particleLink.getEventCollection(), HepMcParticleLink::IS_INDEX ); } // bcs.insert( HepMcParticleLink::ExtendedBarCode( particleLink.barcode() , particleLink.eventIndex() ) ); // if( particleLink.eventIndex()==0 ) { @@ -619,6 +625,8 @@ FTK_SGHitInput::read_raw_silicon( HitIndexMap& hitIndexMap, HitIndexMap& pixelCl } // end if truth found for this strip } // end if sct truth available if(m_dooutFileRawHits){ + HepMcParticleLink::index_type best_extcode_index, best_extcode_position; + best_extcode.eventIndex(best_extcode_index, best_extcode_position); (*m_oflraw) << "S\t" << setw(14) << setprecision(10) << gPos.x() << '\t' @@ -634,7 +642,7 @@ FTK_SGHitInput::read_raw_silicon( HitIndexMap& hitIndexMap, HitIndexMap& pixelCl << m_sctId->side(rdoId) << '\t' << m_sctId->strip(rdoId) << '\t' << (*iRDO)->getGroupSize() << '\t' - << (long)(best_parent ? best_extcode.eventIndex() : std::numeric_limits<long>::max()) << '\t' + << (long)(best_parent ? best_extcode_position : std::numeric_limits<long>::max()) << '\t' << (long)(best_parent ? best_extcode.barcode() : std::numeric_limits<long>::max()) << '\t' << setprecision(5) << static_cast<unsigned long>(std::ceil(best_parent ? best_parent->momentum().perp() : 0.)) << '\t' // particle pt in MeV << parent_mask.to_ulong() << '\t' @@ -655,7 +663,9 @@ FTK_SGHitInput::read_raw_silicon( HitIndexMap& hitIndexMap, HitIndexMap& pixelCl tmpSGhit.setPhiSide(m_sctId->side(rdoId)); tmpSGhit.setEtaStrip(m_sctId->strip(rdoId)); tmpSGhit.setNStrips((*iRDO)->getGroupSize()); - tmpSGhit.setEventIndex((long)(best_parent ? best_extcode.eventIndex() : std::numeric_limits<long>::max())); + HepMcParticleLink::index_type best_extcode_index, best_extcode_position; + best_extcode.eventIndex(best_extcode_index, best_extcode_position); + tmpSGhit.setEventIndex((long)(best_parent ? best_extcode_position : std::numeric_limits<long>::max())); tmpSGhit.setBarcode((long)(best_parent ? best_extcode.barcode() : std::numeric_limits<long>::max())); tmpSGhit.setBarcodePt( static_cast<unsigned long>(std::ceil(best_parent ? best_parent->momentum().perp() : 0.)) ); tmpSGhit.setParentageMask(parent_mask.to_ulong()); @@ -791,7 +801,8 @@ FTK_SGHitInput::read_raw_silicon( HitIndexMap& hitIndexMap, HitIndexMap& pixelCl // "best_parent" is the highest pt particle if( !best_parent || best_parent->momentum().perp()<genPt ) { best_parent = particle; - best_extcode = HepMcParticleLink::ExtendedBarCode( particleLink.barcode() , particleLink.eventIndex() ); + best_extcode = HepMcParticleLink::ExtendedBarCode( particleLink.barcode() , particleLink.eventIndex(), + particleLink.getEventCollection(), HepMcParticleLink::IS_INDEX ); } parent_mask |= construct_truth_bitmap( particle ); } // loop over deposits @@ -800,6 +811,8 @@ FTK_SGHitInput::read_raw_silicon( HitIndexMap& hitIndexMap, HitIndexMap& pixelCl } // if we have pixel sdo's available if(m_dooutFileRawHits){ + HepMcParticleLink::index_type best_extcode_index, best_extcode_position; + best_extcode.eventIndex(best_extcode_index, best_extcode_position); (*m_oflraw) << "P\t" << setw(14) << setprecision(10) << gPos.x() << '\t' @@ -818,7 +831,7 @@ FTK_SGHitInput::read_raw_silicon( HitIndexMap& hitIndexMap, HitIndexMap& pixelCl << (*iCluster)->width().colRow().y() << '\t' // width in eta? << (*iCluster)->rdoList().size() << '\t' // number of pixels in cluster // Cluster truth - << (long)(best_parent ? best_extcode.eventIndex() : -1) << '\t' + << (long)(best_parent ? best_extcode_position : -1) << '\t' << (long)(best_parent ? best_extcode.barcode() : -1) << '\t' << setprecision(5) << static_cast<unsigned long>(std::ceil(best_parent ? best_parent->momentum().perp() : 0.)) << '\t' // particle pt in MeV << parent_mask.to_ulong() @@ -1019,7 +1032,7 @@ FTK_SGHitInput::read_truth_tracks() // print truth track info and geant matching for highest figure-of-merit track int irecmatch = -1; float precmatch = 0.; - HepMcParticleLink::ExtendedBarCode extBarcode2( particle->barcode(), ievt ); + HepMcParticleLink::ExtendedBarCode extBarcode2( particle->barcode(), ievt, EBC_MAINEVCOLL, HepMcParticleLink::IS_INDEX ); //FIXME need to determine event collection properly /*if( !_ttrProbMap.empty() ) { TruthToRecoProbMap::const_iterator barcode=_ttrProbMap.find(extBarcode2); if( barcode!=_ttrProbMap.end() ) { @@ -1036,6 +1049,8 @@ FTK_SGHitInput::read_truth_tracks() }*///toshi comment out ParentBitmask parent_mask( construct_truth_bitmap( particle ) ); if(m_dooutFileRawHits){ + HepMcParticleLink::index_type extBarcode2_index, extBarcode2_position; + extBarcode2.eventIndex(extBarcode2_index, extBarcode2_position); (*m_oflraw) << setiosflags(ios::scientific) << "T\t" << setw(14) << setprecision(10) << track_truth_x0 << '\t' << setw(14) << setprecision(10) << track_truth_y0 << '\t' @@ -1049,7 +1064,7 @@ FTK_SGHitInput::read_truth_tracks() << pdgcode << '\t' << setw(14) << (int)irecmatch << '\t' << setw(14) << setprecision(10) << precmatch << '\t' - << extBarcode2.eventIndex() << '\t' + << extBarcode2_position << '\t' << extBarcode2.barcode() << '\t' << parent_mask.to_ulong() << '\t' << isDetPaperCut << '\t' @@ -1068,7 +1083,9 @@ FTK_SGHitInput::read_truth_tracks() tmpSGTrack.setPZ(track_truth_p*track_truth_costheta); tmpSGTrack.setPDGCode(pdgcode); tmpSGTrack.setBarcode(extBarcode2.barcode()); - tmpSGTrack.setEventIndex(extBarcode2.eventIndex()); + HepMcParticleLink::index_type extBarcode2_index, extBarcode2_position; + extBarcode2.eventIndex(extBarcode2_index, extBarcode2_position); + tmpSGTrack.setEventIndex(extBarcode2_position); m_truth_track.push_back(tmpSGTrack); diff --git a/Trigger/TrigFTK/TrigFTK_RawDataAlgs/share/FTKMonitor_topOptions.py b/Trigger/TrigFTK/TrigFTK_RawDataAlgs/share/FTKMonitor_topOptions.py index 76dd63324cc7e1c638ed7ede233bdc01976cc7b2..b853f7f2523d7367ebba71f3b6fccab3a3fbbd1e 100644 --- a/Trigger/TrigFTK/TrigFTK_RawDataAlgs/share/FTKMonitor_topOptions.py +++ b/Trigger/TrigFTK/TrigFTK_RawDataAlgs/share/FTKMonitor_topOptions.py @@ -33,7 +33,7 @@ FTK_RDO_Monitor.offlineTracksName="Tracks" FTK_RDO_Monitor.FTK_DataProvider=theFTK_DataProviderSvc from AthenaCommon.AppMgr import ToolSvc -from SiLorentzAngleSvc.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup +from SiLorentzAngleTool.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup sctLorentzAngleToolSetup = SCTLorentzAngleToolSetup() FTK_RDO_Monitor.PixelLorentzAngleTool = ToolSvc.InDetTrigPixelLorentzAngleTool FTK_RDO_Monitor.SCTLorentzAngleTool = sctLorentzAngleToolSetup.SCTLorentzAngleTool diff --git a/Trigger/TrigFTK/TrigFTK_RecExample/python/TrigFTKLoadTools.py b/Trigger/TrigFTK/TrigFTK_RecExample/python/TrigFTKLoadTools.py index d40a71e2140c9dc0ad9ad42a8ce0312b36841463..16f50abaaf92b119a4c7f5dc76bf8711357b774c 100644 --- a/Trigger/TrigFTK/TrigFTK_RecExample/python/TrigFTKLoadTools.py +++ b/Trigger/TrigFTK/TrigFTK_RecExample/python/TrigFTKLoadTools.py @@ -7,7 +7,7 @@ jiri.masik@manchester.ac.uk from AthenaCommon.AppMgr import ServiceMgr as svcMgr # SiLorentzAngleTool for SCT -from SiLorentzAngleSvc.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup +from SiLorentzAngleTool.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup sctLorentzAngleToolSetup = SCTLorentzAngleToolSetup() from TrigFTK_RecExample.TrigFTK_DataProviderSvc_Config import TrigFTK_DataProviderSvc diff --git a/Trigger/TrigHypothesis/TrigAFPHypo/TrigAFPHypo/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigHypothesis/TrigAFPHypo/TrigAFPHypo/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..48422521cac07efe8980dd4ee04fa14bbd4f0a2e --- /dev/null +++ b/Trigger/TrigHypothesis/TrigAFPHypo/TrigAFPHypo/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Trigger/TrigHypothesis/TrigAFPHypo diff --git a/Trigger/TrigHypothesis/TrigBjetHypo/TrigBjetHypo/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigHypothesis/TrigBjetHypo/TrigBjetHypo/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..97f23f5f7b360cb6b9e7632507bbb64200b6d1ec --- /dev/null +++ b/Trigger/TrigHypothesis/TrigBjetHypo/TrigBjetHypo/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Trigger/TrigHypothesis/TrigBjetHypo diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/TrigBphysHypo/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigHypothesis/TrigBphysHypo/TrigBphysHypo/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..0ea524b8da48468a8518af6b9ca0d2cb1d54eb9f --- /dev/null +++ b/Trigger/TrigHypothesis/TrigBphysHypo/TrigBphysHypo/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Trigger/TrigHypothesis/TrigBphysHypo diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysHelperUtilsTool.cxx b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysHelperUtilsTool.cxx index bf39cbc29ebe09bb32e6548b6269426e47a8f7fa..6a902c8c9d832e803c8d082eedb0665b87ff39c7 100644 --- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysHelperUtilsTool.cxx +++ b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysHelperUtilsTool.cxx @@ -1,7 +1,7 @@ ///////////////////////// -*- C++ -*- ///////////////////////////// /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // TrigBphysHelperUtilsTool.cxx @@ -373,7 +373,7 @@ StatusCode TrigBphysHelperUtilsTool::buildDiMu(const std::vector<ElementLink<xAO StatusCode TrigBphysHelperUtilsTool::vertexFit(xAOD::TrigBphys * result, const std::vector<ElementLink<xAOD::TrackParticleContainer> > &particles, - std::vector<double>& inputMasses) { // inputmasses not const, as vertex code doesn't allowit + const std::vector<double>& inputMasses) { ATH_MSG_DEBUG("In vertexFit" ); if (!result) { ATH_MSG_DEBUG("Need to provide valid TrigBphys object" ); @@ -463,7 +463,7 @@ StatusCode TrigBphysHelperUtilsTool::vertexFit(xAOD::TrigBphys * result, StatusCode TrigBphysHelperUtilsTool::vertexFit(xAOD::TrigBphys * result, const std::vector<const xAOD::TrackParticle*> &trks, - std::vector<double>& inputMasses) { // inputmasses not const, as vertex code doesn't allowit + const std::vector<double>& inputMasses) { ATH_MSG_DEBUG("In vertexFit" ); if (!result) { ATH_MSG_DEBUG("Need to provide valid TrigBphys object" ); diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysHelperUtilsTool.h b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysHelperUtilsTool.h index 58dcbef2e68a32fdf8e15440106e823ab23e851a..64851ca3142db99c035f3b60224916a09e537f28 100644 --- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysHelperUtilsTool.h +++ b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysHelperUtilsTool.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ @@ -92,12 +92,12 @@ class TrigBphysHelperUtilsTool: virtual public ::AthAlgTool StatusCode vertexFit(xAOD::TrigBphys * result, const std::vector<ElementLink<xAOD::TrackParticleContainer> > &particles, - std::vector<double>& inputMasses); + const std::vector<double>& inputMasses); StatusCode vertexFit(xAOD::TrigBphys * result, const std::vector<const xAOD::TrackParticle*> &trks, - std::vector<double>& inputMasses); + const std::vector<double>& inputMasses); // simplify this using templates perhaps? double invariantMass(const xAOD::IParticle *p1, const xAOD::IParticle* p2, double m1, double m2) const; diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFBEEXFex.cxx b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFBEEXFex.cxx index abe2d2862132b3b4bd7532489815ae14e4990bf3..ef549e0d4f7c3fbeb0e85fa1b1baf7932a5b5b9a 100644 --- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFBEEXFex.cxx +++ b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFBEEXFex.cxx @@ -1308,7 +1308,7 @@ xAOD::TrigBphys* TrigEFBEEXFex::checkBplusEEKplus(const ElementLink<xAOD::TrackP ATH_MSG_DEBUG("Try to build B+ -> mu mu K+ with track " << *eltrack1 ); float massKEE = KEEMass(*ellep1,*ellep2,*eltrack1); - static std::vector<double> masses = {KPLUSMASS,EMASS,EMASS}; + static const std::vector<double> masses = {KPLUSMASS,EMASS,EMASS}; if( !(massKEE > m_lowerKEEMassCut && massKEE < m_upperKEEMassCut) ) { ATH_MSG_DEBUG(" B+ -> mu mu K+ candidate rejected by mass cut: m = " << massKEE ); diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFBMuMuXFex.cxx b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFBMuMuXFex.cxx index 8ffef67f3cf858fe56bc4705c8a07b15fa74df37..57d8af4184d708930eeaf12dc5890253a5c1482d 100644 --- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFBMuMuXFex.cxx +++ b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigEFBMuMuXFex.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // vim: tabstop=2:shiftwidth=2:expandtab @@ -2387,7 +2387,7 @@ xAOD::TrigBphys* TrigEFBMuMuXFex::checkBplusMuMuKplus(const ElementLink<xAOD::Tr ATH_MSG_DEBUG("Try to build B+ -> mu mu K+ with track " << *eltrack1 ); float massKMuMu = KMuMuMass(*elmu1,*elmu2,*eltrack1); - static std::vector<double> masses = {KPLUSMASS,MUMASS,MUMASS}; + static const std::vector<double> masses = {KPLUSMASS,MUMASS,MUMASS}; if( !(massKMuMu > m_lowerKMuMuMassCut && massKMuMu < m_upperKMuMuMassCut) ) { ATH_MSG_DEBUG(" B+ -> mu mu K+ candidate rejected by mass cut: m = " << massKMuMu ); @@ -4355,4 +4355,4 @@ double TrigEFBMuMuXFex::XKPiPiMuMuMass(const xAOD::TrackParticle* mu1, const xAO bTracks.push_back(particle3); return m_bphysHelperTool->invariantMass(bTracks, massHypo); -} \ No newline at end of file +} diff --git a/Trigger/TrigHypothesis/TrigCaloHypo/TrigCaloHypo/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigHypothesis/TrigCaloHypo/TrigCaloHypo/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..48e4cf97656c3bf957fe8370ea521d451a2ae84f --- /dev/null +++ b/Trigger/TrigHypothesis/TrigCaloHypo/TrigCaloHypo/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Trigger/TrigHypothesis/TrigCaloHypo diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/TrigEgammaHypo/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigHypothesis/TrigEgammaHypo/TrigEgammaHypo/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..cf3f05597946f67c21cb99c98760b586452ecf2c --- /dev/null +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/TrigEgammaHypo/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Trigger/TrigHypothesis/TrigEgammaHypo diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEFCaloHypo.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEFCaloHypo.cxx index 5b796c264b7d57da0f8ada64f22c893289a7a04c..ed56a6ea530af5d9636f2add9753b0aaff48c22d 100755 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEFCaloHypo.cxx +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEFCaloHypo.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // ******************************************************************** @@ -403,7 +403,7 @@ HLT::ErrorCode TrigEFCaloHypo::hltExecute(const HLT::TriggerElement* outputTE, m_PhiCalo.push_back(tmpphi); m_ECalib.push_back(clus->e()); const xAOD::CaloCluster *origClus=nullptr; - static SG::AuxElement::Accessor<ElementLink<xAOD::CaloClusterContainer> > orig ("originalCaloCluster"); + static const SG::AuxElement::Accessor<ElementLink<xAOD::CaloClusterContainer> > orig ("originalCaloCluster"); if (!orig.isAvailable(*clus) || !orig(*clus).isValid()){ ATH_MSG_DEBUG("Problem with original cluster link"); } diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2CaloHypoAlgMT.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2CaloHypoAlgMT.cxx index b5d7bcf9eb119224617abc759c0c677095712bd5..bb07fa0e5b2299df1ac8044d0b1a7e3f34f6e70a 100644 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2CaloHypoAlgMT.cxx +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2CaloHypoAlgMT.cxx @@ -55,7 +55,7 @@ StatusCode TrigL2CaloHypoAlgMT::execute( const EventContext& context ) const { // loop over previous decisions size_t counter=0; - for ( auto previousDecision: *previousDecisionsHandle ) { + for ( const auto previousDecision: *previousDecisionsHandle ) { //get RoI auto roiELInfo = TrigCompositeUtils::findLink<TrigRoiDescriptorCollection>( previousDecision, "initialRoI" ); @@ -82,7 +82,7 @@ StatusCode TrigL2CaloHypoAlgMT::execute( const EventContext& context ) const { } d->setObjectLink( "roi", roiELInfo.link ); - TrigCompositeUtils::linkToPrevious( d, decisionInput().key(), counter ); + TrigCompositeUtils::linkToPrevious( d, previousDecision ); ATH_MSG_DEBUG( "Added view, roi, cluster, previous decision to new decision " << counter << " for view " << (*viewELInfo.link)->name() ); counter++; diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronFexMT.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronFexMT.cxx index efeb806ec189e00bd452825bf6f4f0369106bcec..c8643bc26282c0d50b8461bbd53ee846a636588f 100644 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronFexMT.cxx +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronFexMT.cxx @@ -203,7 +203,7 @@ StatusCode TrigL2ElectronFexMT::execute() { } else{ ATH_MSG_VERBOSE("REGTEST: TrigElectron: cluster index = " << clusEL.index() << - " track = " << trkIter << " eta = " << etaAtCalo << " phi = " << phiAtCalo); + " eta = " << etaAtCalo << " phi = " << phiAtCalo); xAOD::TrigElectron* trigElec = new xAOD::TrigElectron(); diff --git a/Trigger/TrigHypothesis/TrigEgammaMuonCombHypo/TrigEgammaMuonCombHypo/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigHypothesis/TrigEgammaMuonCombHypo/TrigEgammaMuonCombHypo/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..0f49f60aa62a5fd21154f9d29055e3355fae9215 --- /dev/null +++ b/Trigger/TrigHypothesis/TrigEgammaMuonCombHypo/TrigEgammaMuonCombHypo/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Trigger/TrigHypothesis/TrigEgammaMuonCombHypo diff --git a/Trigger/TrigHypothesis/TrigFTKHypo/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigHypothesis/TrigFTKHypo/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..5da676a1343b5dca1c4ad10a26b8ab7a1c1115bc --- /dev/null +++ b/Trigger/TrigHypothesis/TrigFTKHypo/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Trigger/TrigHypothesis/TrigFTKHypo diff --git a/Trigger/TrigHypothesis/TrigHIHypo/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigHypothesis/TrigHIHypo/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..e50dc8e639c0adc9a415a7bd506eafd9384ebc43 --- /dev/null +++ b/Trigger/TrigHypothesis/TrigHIHypo/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Trigger/TrigHypothesis/TrigHIHypo diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..6c6741eb32c3f2428dc905523c44a84e621783bf --- /dev/null +++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Trigger/TrigHypothesis/TrigHLTJetHypo diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypo2.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypo2.cxx index ede95764fd2ecb875a03829fd74059abc2172923..d638e11b2e8d6736207873bc36973f71f74e3e27 100644 --- a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypo2.cxx +++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypo2.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // ******************************************************************** @@ -55,7 +55,7 @@ using std::chrono::duration_cast; using std::chrono::nanoseconds; using std::chrono::microseconds; -float GeV = 1000.; +const float GeV = 1000.; enum class HypoStrategy{EtaEt, HT, TLA, DijetMassDEta, singlemass}; diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoAlgMT.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoAlgMT.cxx index e9d1626f137932879a9b57e8e759c0fecae60abb..a6ca525b17c73f7a5ee5d09954665b24dd72fdce 100644 --- a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoAlgMT.cxx +++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoAlgMT.cxx @@ -42,8 +42,11 @@ StatusCode TrigJetHypoAlgMT::execute( const EventContext& context ) const { // The container should have only one such Decision (for L1) as deding // on jets is a one step process. auto h_prevDecisions = SG::makeHandle(decisionInput(), context ); - ATH_CHECK(h_prevDecisions.isValid()); - + + if( not h_prevDecisions.isValid() || h_prevDecisions->size() ==0) {//implicit + ATH_MSG_DEBUG( "No implicit RH for previous decisions "<< decisionInput().key()<<": is this expected?" ); + return StatusCode::SUCCESS; + } if(h_prevDecisions->size() != 1){ ATH_MSG_ERROR(" Expected one previous decisions (L1 RoIs not used), found " diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/components/TrigHLTJetHypo_entries.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/components/TrigHLTJetHypo_entries.cxx index 6b4ad114a9a9651af3433fb79ae05503e7ef20eb..816a71dafc2630d18e11cdf3486b5434cd268873 100644 --- a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/components/TrigHLTJetHypo_entries.cxx +++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/components/TrigHLTJetHypo_entries.cxx @@ -23,6 +23,7 @@ DECLARE_COMPONENT( TrigHLTJetHypo_EtaEt ) DECLARE_COMPONENT( TrigHLTJetHypo_SMC ) DECLARE_COMPONENT( TrigHLTJetHypo_HT ) DECLARE_COMPONENT( TrigHLTJetHypo_TLA ) +DECLARE_COMPONENT( TrigHLTJetHypo_EtaEt ) DECLARE_COMPONENT( TrigJetHypoAlgMT ) DECLARE_COMPONENT( TrigJetHypoToolMT ) diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..be841530ba8a090a178b266530a705dd3a764982 --- /dev/null +++ b/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests diff --git a/Trigger/TrigHypothesis/TrigHypoCommonTools/TrigHypoCommonTools/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigHypothesis/TrigHypoCommonTools/TrigHypoCommonTools/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..91498c164bb17d27bef519d2f1aec25eb262001f --- /dev/null +++ b/Trigger/TrigHypothesis/TrigHypoCommonTools/TrigHypoCommonTools/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Trigger/TrigHypothesis/TrigHypoCommonTools diff --git a/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/TrigLongLivedParticlesHypo/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/TrigLongLivedParticlesHypo/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..370789aea8fdf92a4d89be6f03542507a5f60671 --- /dev/null +++ b/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/TrigLongLivedParticlesHypo/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Trigger/TrigHypothesis/TrigLongLivedParticlesHypo diff --git a/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/src/MuonClusterHypo.cxx b/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/src/MuonClusterHypo.cxx index 69fb022ba536b2f2e6a4f269e0e81e1e57e28313..99f147e320ffc19c8587a1f48bf19eeb61e80fdc 100755 --- a/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/src/MuonClusterHypo.cxx +++ b/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/src/MuonClusterHypo.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // @@ -122,7 +122,7 @@ HLT::ErrorCode MuonClusterHypo::hltExecute(const HLT::TriggerElement* outputTE, for(const xAOD::TrigComposite * compObj : *compCont) { if(msgLvl() <= MSG::DEBUG) { - msg() << MSG::DEBUG << "TrigComposite ptr = " << (void*)compObj << endmsg; + msg() << MSG::DEBUG << "TrigComposite ptr = " << (const void*)compObj << endmsg; } for(const std::string & collName : compObj->linkColNames()) { if(msgLvl() <= MSG::DEBUG) { diff --git a/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/src/MuonClusterIsolationHypo.cxx b/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/src/MuonClusterIsolationHypo.cxx index 11c4f91f607c656a3d7f5deb26ac77e94829e63b..cff42da580fda48b3b1b01d5c94c5630beab4502 100755 --- a/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/src/MuonClusterIsolationHypo.cxx +++ b/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/src/MuonClusterIsolationHypo.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // @@ -143,7 +143,7 @@ HLT::ErrorCode MuonClusterIsolationHypo::hltExecute(const HLT::TriggerElement* o for(const xAOD::TrigComposite * compObj : *compCont) { if(msgLvl() <= MSG::DEBUG) { - msg() << MSG::DEBUG << "TrigComposite ptr = " << (void*)compObj << endmsg; + msg() << MSG::DEBUG << "TrigComposite ptr = " << (const void*)compObj << endmsg; } for(const std::string & collName : compObj->linkColNames()) { if(msgLvl() <= MSG::DEBUG) { diff --git a/Trigger/TrigHypothesis/TrigMissingETHypo/TrigMissingETHypo/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigHypothesis/TrigMissingETHypo/TrigMissingETHypo/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..078403c9b66e3ad4182930672916b00d7d12957f --- /dev/null +++ b/Trigger/TrigHypothesis/TrigMissingETHypo/TrigMissingETHypo/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Trigger/TrigHypothesis/TrigMissingETHypo diff --git a/Trigger/TrigHypothesis/TrigMultiVarHypo/CMakeLists.txt b/Trigger/TrigHypothesis/TrigMultiVarHypo/CMakeLists.txt index 35fc2753b25928b5cf3a0a70547f1e3ba37b8fc4..70931bd15fd076fcb8d2553b6234794df1da06c6 100644 --- a/Trigger/TrigHypothesis/TrigMultiVarHypo/CMakeLists.txt +++ b/Trigger/TrigHypothesis/TrigMultiVarHypo/CMakeLists.txt @@ -9,6 +9,7 @@ atlas_subdir( TrigMultiVarHypo ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC + Control/AthToolSupport/AsgTools Event/xAOD/xAODTrigCalo Event/xAOD/xAODTrigRinger Trigger/TrigEvent/TrigCaloEvent @@ -28,17 +29,17 @@ atlas_add_library( TrigMultiVarHypoLib src/tools/*.cxx src/preproc/*.cxx PUBLIC_HEADERS TrigMultiVarHypo - LINK_LIBRARIES xAODTrigCalo xAODTrigRinger TrigCaloEvent - TrigSteeringEvent TrigInterfacesLib TrigTimeAlgsLib - LumiBlockCompsLib PathResolver DecisionHandlingLib + LINK_LIBRARIES AsgTools xAODTrigCalo xAODTrigRinger TrigCaloEvent + TrigSteeringEvent TrigInterfacesLib TrigTimeAlgsLib + LumiBlockCompsLib PathResolver DecisionHandlingLib PRIVATE_LINK_LIBRARIES GaudiKernel AthViews ) atlas_add_component( TrigMultiVarHypo src/components/*.cxx - LINK_LIBRARIES xAODTrigCalo xAODTrigRinger TrigCaloEvent - TrigSteeringEvent TrigInterfacesLib TrigTimeAlgsLib - GaudiKernel TrigMultiVarHypoLib PathResolver - LumiBlockCompsLib DecisionHandlingLib) + LINK_LIBRARIES AsgTools xAODTrigCalo xAODTrigRinger TrigCaloEvent + TrigSteeringEvent TrigInterfacesLib TrigTimeAlgsLib + GaudiKernel TrigMultiVarHypoLib PathResolver + LumiBlockCompsLib DecisionHandlingLib) # Install files from the package: atlas_install_python_modules( python/*.py ) diff --git a/Trigger/TrigHypothesis/TrigMultiVarHypo/TrigMultiVarHypo/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigHypothesis/TrigMultiVarHypo/TrigMultiVarHypo/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..59df4231d56e5992ff12e9502d174364dc2cc04a --- /dev/null +++ b/Trigger/TrigHypothesis/TrigMultiVarHypo/TrigMultiVarHypo/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Trigger/TrigHypothesis/TrigMultiVarHypo diff --git a/Trigger/TrigHypothesis/TrigMultiVarHypo/TrigMultiVarHypo/tools/TrigL2CaloRingerReader.h b/Trigger/TrigHypothesis/TrigMultiVarHypo/TrigMultiVarHypo/tools/TrigL2CaloRingerReader.h index ca19d0b7dec4115301ee2a6424c2b6ed598fc7be..71ff2a8f5163010c351f7d8fcfe742d2ee2bf8d9 100644 --- a/Trigger/TrigHypothesis/TrigMultiVarHypo/TrigMultiVarHypo/tools/TrigL2CaloRingerReader.h +++ b/Trigger/TrigHypothesis/TrigMultiVarHypo/TrigMultiVarHypo/tools/TrigL2CaloRingerReader.h @@ -7,18 +7,19 @@ //#include "TrigMultiVarHypo/preproc/TrigRingerPreprocessor.h" #include "TrigMultiVarHypo/tools/TrigRingerHelper.h" #include "TrigMultiVarHypo/tools/MultiLayerPerceptron.h" + +#include "AsgTools/AsgMessaging.h" #include "PathResolver/PathResolver.h" -#include "GaudiKernel/MsgStream.h" #include <vector> #include <string> #include "TTree.h" #include "TFile.h" -class TrigL2CaloRingerReader{ +class TrigL2CaloRingerReader : public asg::AsgMessaging { public: /* constructor */ - TrigL2CaloRingerReader( std::string ); + TrigL2CaloRingerReader(const std::string& name); /* destructor */ ~TrigL2CaloRingerReader(); /* use this methods to retrieve the tools from the archieve */ @@ -36,27 +37,16 @@ class TrigL2CaloRingerReader{ bool doPileupCorrection(){return m_doPileupCorrection;}; /* return the threshold lumi */ int lumiCut(){return m_lumiCut;}; - /* use this to set the messenger stream output */ - void setMsgStream( MsgStream &msg ){ - m_log = new MsgStream(msg); - } - private: // Use this to retrieve all branch values template <class T> void InitBranch(TTree* fChain, std::string branch_name, T* param); - // msg output - MsgStream& msg() const{ - return (*m_log); - } - + std::string m_name; int m_version; - MsgStream *m_log; - // archieve variables holder int m_lumiCut; bool m_useEtaVar; diff --git a/Trigger/TrigHypothesis/TrigMultiVarHypo/src/TrigL2CaloRingerFex.cxx b/Trigger/TrigHypothesis/TrigMultiVarHypo/src/TrigL2CaloRingerFex.cxx index 35ddc37723492516ce02d35ab5d25b081749e620..ead3fd197d4ec64d79b2a881a3518087b25414f4 100644 --- a/Trigger/TrigHypothesis/TrigMultiVarHypo/src/TrigL2CaloRingerFex.cxx +++ b/Trigger/TrigHypothesis/TrigMultiVarHypo/src/TrigL2CaloRingerFex.cxx @@ -38,7 +38,6 @@ TrigL2CaloRingerFex::TrigL2CaloRingerFex(const std::string& name, ISvcLocator* p declareProperty("LuminosityTool" , m_lumiBlockMuTool, "Luminosity Tool" ); declareMonitoredVariable("NeuralNetworkOutput", m_output ); - m_reader.setMsgStream(msg()); m_useLumiVar=false; m_useEtaVar=false; m_key = ""; diff --git a/Trigger/TrigHypothesis/TrigMultiVarHypo/src/TrigL2CaloRingerHypo.cxx b/Trigger/TrigHypothesis/TrigMultiVarHypo/src/TrigL2CaloRingerHypo.cxx index d9f3f087df9ae9ebae1a5604809e608c11e0d0ff..7be8014552a19b16b80a3a856ccfa6dda03c80f2 100644 --- a/Trigger/TrigHypothesis/TrigMultiVarHypo/src/TrigL2CaloRingerHypo.cxx +++ b/Trigger/TrigHypothesis/TrigMultiVarHypo/src/TrigL2CaloRingerHypo.cxx @@ -25,7 +25,6 @@ TrigL2CaloRingerHypo::TrigL2CaloRingerHypo(const std::string& name, ISvcLocator* declareProperty("CalibPath" , m_calibPath = "" ); declareProperty("HltFeature" , m_hlt_feature = "TrigRingerNeuralFex" ); - m_reader.setMsgStream(msg()); m_useNoActivationFunctionInTheLastLayer=false; m_doPileupCorrection=false; m_lumiCut=50; diff --git a/Trigger/TrigHypothesis/TrigMultiVarHypo/src/tools/TrigL2CaloRingerReader.cxx b/Trigger/TrigHypothesis/TrigMultiVarHypo/src/tools/TrigL2CaloRingerReader.cxx index 6b0a2d91b5abfad28fa0ac4f4bb384895bedbc5a..7df0907ad7cfba591107d7a246aea44807a0f6f0 100644 --- a/Trigger/TrigHypothesis/TrigMultiVarHypo/src/tools/TrigL2CaloRingerReader.cxx +++ b/Trigger/TrigHypothesis/TrigMultiVarHypo/src/tools/TrigL2CaloRingerReader.cxx @@ -10,9 +10,10 @@ // Use this to find the absoluty path #include "PathResolver/PathResolver.h" -TrigL2CaloRingerReader::TrigL2CaloRingerReader(std::string name):m_name(name) +TrigL2CaloRingerReader::TrigL2CaloRingerReader(const std::string& name) : + asg::AsgMessaging(name), + m_name(name) { - //m_log = new MsgStream(0, m_name); m_etaBins=nullptr; m_etBins=nullptr; m_thresholds=nullptr; diff --git a/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..d51ec69725b324478966fcbfd9b4c625c1ca0dbe --- /dev/null +++ b/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Trigger/TrigHypothesis/TrigMuonHypo diff --git a/Trigger/TrigHypothesis/TrigMuonHypoMT/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigHypothesis/TrigMuonHypoMT/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..914af8df095c841a735649b8acb016b41e2e765b --- /dev/null +++ b/Trigger/TrigHypothesis/TrigMuonHypoMT/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Trigger/TrigHypothesis/TrigMuonHypoMT diff --git a/Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigMufastHypoAlg.cxx b/Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigMufastHypoAlg.cxx index df1a85c30c1c68339e76f4b2dc28a9d605f828fb..981fb5a24e11e4f127aebe4da913acb67b3d6ca3 100755 --- a/Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigMufastHypoAlg.cxx +++ b/Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigMufastHypoAlg.cxx @@ -74,7 +74,7 @@ StatusCode TrigMufastHypoAlg::execute( const EventContext& context ) const std::vector<TrigMufastHypoTool::MuonClusterInfo> toolInput; // loop over previous decisions size_t counter=0; - for ( auto previousDecision: *previousDecisionsHandle ) { + for ( const auto previousDecision: *previousDecisionsHandle ) { //get RoI auto roiInfo = TrigCompositeUtils::findLink<TrigRoiDescriptorCollection>( previousDecision, "initialRoI" ); auto roiEL = roiInfo.link; @@ -104,7 +104,7 @@ StatusCode TrigMufastHypoAlg::execute( const EventContext& context ) const newd->setObjectLink( "feature", muonEL ); newd->setObjectLink( "roi", roiEL ); newd->setObjectLink( "view", viewEL ); - TrigCompositeUtils::linkToPrevious( newd, decisionInput().key(), counter ); + TrigCompositeUtils::linkToPrevious( newd, previousDecision ); ATH_MSG_DEBUG("REGTEST: " << m_muFastKey.key() << " pT = " << (*muonEL)->pt() << " GeV"); ATH_MSG_DEBUG("REGTEST: " << m_muFastKey.key() << " eta/phi = " << (*muonEL)->eta() << "/" << (*muonEL)->phi()); diff --git a/Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigMuisoHypoAlg.cxx b/Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigMuisoHypoAlg.cxx index 166b8cc483c8ab247a085e858032d80f0a35d3eb..f5bed116b9ab0bea0f912e6282747cdc8f6b2b4b 100644 --- a/Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigMuisoHypoAlg.cxx +++ b/Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigMuisoHypoAlg.cxx @@ -68,7 +68,7 @@ StatusCode TrigMuisoHypoAlg::execute( const EventContext& context) const std::vector<TrigMuisoHypoTool::MuisoInfo> toolInput; size_t counter = 0; // view counter - for ( auto previousDecision: *previousDecisionsHandle ) { + for ( const auto previousDecision: *previousDecisionsHandle ) { // get View auto viewEL = previousDecision->objectLink< ViewContainer >( "view" ); ATH_CHECK( viewEL.isValid() ); @@ -90,7 +90,7 @@ StatusCode TrigMuisoHypoAlg::execute( const EventContext& context) const newd->setObjectLink( "feature", muonEL ); newd->setObjectLink( "view", viewEL ); - TrigCompositeUtils::linkToPrevious( newd, decisionInput().key(), counter ); + TrigCompositeUtils::linkToPrevious( newd, previousDecision ); ATH_MSG_DEBUG("REGTEST: " << m_muIsoKey.key() << " pT = " << (*muonEL)->pt() << " GeV"); ATH_MSG_DEBUG("REGTEST: " << m_muIsoKey.key() << " eta/phi = " << (*muonEL)->eta() << "/" << (*muonEL)->phi()); diff --git a/Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigMuonEFCombinerHypoAlg.cxx b/Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigMuonEFCombinerHypoAlg.cxx index 2de33a5573a324d8f670f4bdea892072ebab46ea..be33078a44f834b44c49da8b4f49d8f23c8a9dac 100755 --- a/Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigMuonEFCombinerHypoAlg.cxx +++ b/Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigMuonEFCombinerHypoAlg.cxx @@ -75,7 +75,7 @@ StatusCode TrigMuonEFCombinerHypoAlg::execute( const EventContext& context ) con size_t counter = 0; // view counter // loop over previous decisions - for ( auto previousDecision: *previousDecisionsHandle ) { + for ( const auto previousDecision: *previousDecisionsHandle ) { // get RoIs auto roiInfo = TrigCompositeUtils::findLink<TrigRoiDescriptorCollection>( previousDecision, "initialRoI" ); auto roiEL = roiInfo.link; @@ -110,7 +110,7 @@ StatusCode TrigMuonEFCombinerHypoAlg::execute( const EventContext& context ) con newd -> setObjectLink( "feature", muonEL ); newd -> setObjectLink( "roi", roiEL ); newd -> setObjectLink( "view", viewEL ); - TrigCompositeUtils::linkToPrevious( newd, decisionInput().key(), counter ); + TrigCompositeUtils::linkToPrevious( newd, previousDecision ); ATH_MSG_DEBUG("REGTEST: " << m_muonKey.key() << " pT = " << (*muonEL)->pt() << " GeV"); ATH_MSG_DEBUG("REGTEST: " << m_muonKey.key() << " eta/phi = " << (*muonEL)->eta() << "/" << (*muonEL)->phi()); diff --git a/Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigMuonEFMSonlyHypoAlg.cxx b/Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigMuonEFMSonlyHypoAlg.cxx index 40bed09b2bdb1d0eb84992dc87921cdb034e2981..e91f559945aa6c79683b76631d26dfcff65ee58d 100755 --- a/Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigMuonEFMSonlyHypoAlg.cxx +++ b/Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigMuonEFMSonlyHypoAlg.cxx @@ -75,7 +75,7 @@ StatusCode TrigMuonEFMSonlyHypoAlg::execute( const EventContext& context ) const size_t counter = 0; // view counter // loop over previous decisions - for ( auto previousDecision: *previousDecisionsHandle ) { + for (const auto previousDecision: *previousDecisionsHandle ) { // get RoIs auto roiInfo = TrigCompositeUtils::findLink<TrigRoiDescriptorCollection>( previousDecision, "initialRoI" ); auto roiEL = roiInfo.link; @@ -110,7 +110,7 @@ StatusCode TrigMuonEFMSonlyHypoAlg::execute( const EventContext& context ) const newd -> setObjectLink( "feature", muonEL ); newd -> setObjectLink( "roi", roiEL ); newd -> setObjectLink( "view", viewEL ); - TrigCompositeUtils::linkToPrevious( newd, decisionInput().key(), counter ); + TrigCompositeUtils::linkToPrevious( newd, previousDecision ); ATH_MSG_DEBUG("REGTEST: " << m_muonKey.key() << " pT = " << (*muonEL)->pt() << " GeV"); ATH_MSG_DEBUG("REGTEST: " << m_muonKey.key() << " eta/phi = " << (*muonEL)->eta() << "/" << (*muonEL)->phi()); diff --git a/Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigMuonEFTrackIsolationHypoAlg.cxx b/Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigMuonEFTrackIsolationHypoAlg.cxx index f1a59c2d650f44df95cce2e388063571332486e2..8c991854a1f48c3a2075db21876a3cad6e0308a6 100755 --- a/Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigMuonEFTrackIsolationHypoAlg.cxx +++ b/Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigMuonEFTrackIsolationHypoAlg.cxx @@ -71,7 +71,7 @@ StatusCode TrigMuonEFTrackIsolationHypoAlg::execute( const EventContext& context std::vector<TrigMuonEFTrackIsolationHypoTool::EFIsolationMuonInfo> toolInput; size_t counter = 0; - for ( auto previousDecision: *previousDecisionsHandle ) { + for ( const auto previousDecision: *previousDecisionsHandle ) { // get RoIs auto roiInfo = TrigCompositeUtils::findLink<TrigRoiDescriptorCollection>( previousDecision, "initialRoI" ); auto roiEL = roiInfo.link; @@ -105,7 +105,7 @@ StatusCode TrigMuonEFTrackIsolationHypoAlg::execute( const EventContext& context newd -> setObjectLink( "roi", roiEL ); newd -> setObjectLink( "view", viewEL ); - TrigCompositeUtils::linkToPrevious( newd, decisionInput().key(), counter ); + TrigCompositeUtils::linkToPrevious( newd, previousDecision ); ATH_MSG_DEBUG("REGTEST: " << m_muonKey.key() << " pT = " << (*muonEL)->pt() << " GeV"); diff --git a/Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigmuCombHypoAlg.cxx b/Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigmuCombHypoAlg.cxx index ea94c0bc76ea8c65a4da78deed9d86e2719b15eb..95ecf0836b6f7269388bf510baebeeaf6523f1f4 100644 --- a/Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigmuCombHypoAlg.cxx +++ b/Trigger/TrigHypothesis/TrigMuonHypoMT/src/TrigmuCombHypoAlg.cxx @@ -75,7 +75,7 @@ StatusCode TrigmuCombHypoAlg::execute(const EventContext& context) const // loop over previous decisions size_t counter = 0; - for ( auto previousDecision: *previousDecisionsHandle ) { + for ( const auto previousDecision: *previousDecisionsHandle ) { // get L2MuonSA Feature TrigCompositeUtils::LinkInfo<xAOD::L2StandAloneMuonContainer> linkInfo = TrigCompositeUtils::findLink<xAOD::L2StandAloneMuonContainer>(previousDecision, "feature"); @@ -104,7 +104,7 @@ StatusCode TrigmuCombHypoAlg::execute(const EventContext& context) const // set objectLink newd->setObjectLink( "feature", muCombEL ); - TrigCompositeUtils::linkToPrevious( newd, decisionInput().key(), counter); + TrigCompositeUtils::linkToPrevious( newd, previousDecision); // DEBUG auto muFastInfo = (*muCombEL)->muSATrack(); diff --git a/Trigger/TrigHypothesis/TrigTauHypo/TrigTauHypo/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigHypothesis/TrigTauHypo/TrigTauHypo/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..f27a46982cfabd795a14cf544bf74c2829c96b70 --- /dev/null +++ b/Trigger/TrigHypothesis/TrigTauHypo/TrigTauHypo/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Trigger/TrigHypothesis/TrigTauHypo diff --git a/Trigger/TrigHypothesis/TrigTauHypo/src/TrigTauCaloHypoAlgMT.cxx b/Trigger/TrigHypothesis/TrigTauHypo/src/TrigTauCaloHypoAlgMT.cxx index e03f9bac680661df8d8eea2d74fe26b943e1beae..f709144b2293813c1308ea1657607e9af3e2fe12 100644 --- a/Trigger/TrigHypothesis/TrigTauHypo/src/TrigTauCaloHypoAlgMT.cxx +++ b/Trigger/TrigHypothesis/TrigTauHypo/src/TrigTauCaloHypoAlgMT.cxx @@ -52,7 +52,7 @@ StatusCode TrigTauCaloHypoAlgMT::execute( const EventContext& context ) const { // loop over previous decisions size_t counter=0; - for ( auto previousDecision: *previousDecisionsHandle ) { + for ( const auto previousDecision: *previousDecisionsHandle ) { //get RoI auto roiELInfo = TrigCompositeUtils::findLink<TrigRoiDescriptorCollection>( previousDecision, "initialRoI" ); ATH_CHECK( roiELInfo.isValid() ); @@ -70,15 +70,15 @@ StatusCode TrigTauCaloHypoAlgMT::execute( const EventContext& context ) const { toolInput.emplace_back( d, roi, clusterHandle.cptr(), previousDecision ); - { - auto el = ViewHelper::makeLink( *(viewELInfo.link), clusterHandle, 0 ); + { + auto el = ViewHelper::makeLink( *(viewELInfo.link), clusterHandle, 0 ); ATH_CHECK( el.isValid() ); d->setObjectLink( "feature", el ); } - d->setObjectLink( "roi", roiELInfo.link ); - TrigCompositeUtils::linkToPrevious( d, decisionInput().key(), counter ); - ATH_MSG_DEBUG( "Added view, roi, cluster, previous decision to new decision " << counter << " for view " << (*viewELInfo.link)->name() ); - counter++; + d->setObjectLink( "roi", roiELInfo.link ); + TrigCompositeUtils::linkToPrevious( d, previousDecision ); + ATH_MSG_DEBUG( "Added view, roi, cluster, previous decision to new decision " << counter << " for view " << (*viewELInfo.link)->name() ); + counter++; } diff --git a/Trigger/TrigMonitoring/TrigEgammaMonitoring/python/TrigEgammaMonitoringConfig.py b/Trigger/TrigMonitoring/TrigEgammaMonitoring/python/TrigEgammaMonitoringConfig.py index 4942cdbfce410062988b772024a4164c025d75c3..b103620c89b5c23c72f7bd3cf3f14036f4410016 100644 --- a/Trigger/TrigMonitoring/TrigEgammaMonitoring/python/TrigEgammaMonitoringConfig.py +++ b/Trigger/TrigMonitoring/TrigEgammaMonitoring/python/TrigEgammaMonitoringConfig.py @@ -149,6 +149,10 @@ class TrigEgammaMonToolBuilder: self.mam=monitoring_mam def configureElectronMonTool(self,plotTool,toolList): + from AthenaCommon.AppMgr import ToolSvc + ToolSvc += plotTool() + for t in toolList: + ToolSvc += t() ElectronAnalysis = TrigEgammaNavAnalysisTool(name='HLTEgammaElectronAnalysis', Analysis='Electrons', PlotTool=plotTool, @@ -265,23 +269,22 @@ class TrigEgammaMonToolBuilder: histoPathBase=self.basePath, IgnoreTruncationCheck=True, Tools=["TrigEgammaNavTPAnalysisTool/HLTEgammaTPAnalysis"]) - ToolSvc += tool else: - ToolSvc += self.configureDefaultMonTool() + tool = self.configureDefaultMonTool() elif self.HI_mode == True or self.pPb_mode == True: tool = TrigEgammaMonTool( name = "HLTEgammaMon", histoPathBase=self.basePath, IgnoreTruncationCheck=True, Tools=["TrigEgammaNavAnalysisTool/HLTEgammaPhotonAnalysis", "TrigEgammaNavAnalysisTool/HLTEgammaElectronAnalysis"]) - ToolSvc += tool elif self.cosmic_mode == True: tool = TrigEgammaMonTool( name = "HLTEgammaMon", histoPathBase=self.basePath, IgnoreTruncationCheck=True, Tools=["TrigEgammaNavAnalysisTool/HLTEgammaPhotonAnalysis", "TrigEgammaNavAnalysisTool/HLTEgammaElectronAnalysis"]) - ToolSvc += tool else: - ToolSvc += self.configureDefaultMonTool() - return toolList + tool = self.configureDefaultMonTool() + ToolSvc += tool + #return toolList + return [tool] diff --git a/Trigger/TrigMonitoring/TrigHLTMonitoring/CMakeLists.txt b/Trigger/TrigMonitoring/TrigHLTMonitoring/CMakeLists.txt index aa0f42dc00632c0ff30d1249b480326ca76e3e68..902000fd447b6eb8430b53aaa8adbebe9e07b493 100644 --- a/Trigger/TrigMonitoring/TrigHLTMonitoring/CMakeLists.txt +++ b/Trigger/TrigMonitoring/TrigHLTMonitoring/CMakeLists.txt @@ -24,6 +24,7 @@ atlas_depends_on_subdirs( PUBLIC find_package( Boost COMPONENTS filesystem thread system ) find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread MathMore Minuit Minuit2 Matrix Physics HistPainter Rint Graf Graf3d Gpad Html Postscript Gui GX11TTF GX11 ) +find_package( cx_Oracle ) # Component(s) in the package: atlas_add_library( TrigHLTMonitoringLib diff --git a/Trigger/TrigMonitoring/TrigIDtrkMonitoring/python/TrigIDPhysValMonitoringConfig.py b/Trigger/TrigMonitoring/TrigIDtrkMonitoring/python/TrigIDPhysValMonitoringConfig.py index 62332e6ac37b7cfb054d40d2ebc78b31c5a9f560..2977518f3058f69d57f618e97749925ced4a9d8d 100644 --- a/Trigger/TrigMonitoring/TrigIDtrkMonitoring/python/TrigIDPhysValMonitoringConfig.py +++ b/Trigger/TrigMonitoring/TrigIDtrkMonitoring/python/TrigIDPhysValMonitoringConfig.py @@ -211,10 +211,10 @@ def TrigIDPhysValMonitoringTool(): chainnames = [ #jets - "HLT_j.*perf_.*FTKRefit:key=InDetTrigTrackingxAODCnv_Bjet_FTKRefit:roi=SplitJet", - "HLT_j.*perf_.*FTKRefit:key=InDetTrigTrackingxAODCnv_Bjet_FTKRefit_IDTrig:roi=SplitJet", - "HLT_j.*perf_.*FTK:key=InDetTrigTrackingxAODCnv_Bjet_FTK:roi=SplitJet", - "HLT_j.*perf_.*FTK:key=InDetTrigTrackingxAODCnv_Bjet_FTK_IDTrig:roi=SplitJet", + "HLT_j.*perf_.*FTKRefit_.*:key=InDetTrigTrackingxAODCnv_Bjet_FTKRefit:roi=SplitJet", + "HLT_j.*perf_.*FTKRefit_.*:key=InDetTrigTrackingxAODCnv_Bjet_FTKRefit_IDTrig:roi=SplitJet", + "HLT_j.*perf_.*FTK_.*:key=InDetTrigTrackingxAODCnv_Bjet_FTK:roi=SplitJet", + "HLT_j.*perf_.*FTK_.*:key=InDetTrigTrackingxAODCnv_Bjet_FTK_IDTrig:roi=SplitJet", #taus "HLT_tau.*idperf_.*FTK:key=InDetTrigTrackingxAODCnv_Tau_FTK", "HLT_tau.*idperf_.*FTK:key=InDetTrigTrackingxAODCnv_Tau_FTK_IDTrig", @@ -222,10 +222,10 @@ def TrigIDPhysValMonitoringTool(): "HLT_tau.*FTKRefit:key=InDetTrigTrackingxAODCnv_Tau_FTKRefit", "HLT_tau.*FTKRefit:key=InDetTrigTrackingxAODCnv_Tau_FTKRefit_IDTrig", #muons - "HLT_mu.*idperf_FTK:key=InDetTrigTrackingxAODCnv_Muon_FTK", - "HLT_mu.*idperf_FTK:key=InDetTrigTrackingxAODCnv_Muon_FTK_IDTrig", - "HLT_mu.*idperf_FTKRefit:key=InDetTrigTrackingxAODCnv_Muon_FTKRefit", - "HLT_mu.*idperf_FTKRefit:key=InDetTrigTrackingxAODCnv_Muon_FTKRefit_IDTrig" + "HLT_mu.*idperf_FTK_.*:key=InDetTrigTrackingxAODCnv_Muon_FTK", + "HLT_mu.*idperf_FTK_.*:key=InDetTrigTrackingxAODCnv_Muon_FTK_IDTrig", + "HLT_mu.*idperf_FTKRefit_.*:key=InDetTrigTrackingxAODCnv_Muon_FTKRefit", + "HLT_mu.*idperf_FTKRefit_.*:key=InDetTrigTrackingxAODCnv_Muon_FTKRefit_IDTrig" ] outputlist += [makePhysvalMon(name, pdgid, chainnames, useHighestPT)] @@ -242,11 +242,11 @@ def TrigIDPhysValMonitoringTool(): cosmic = False chainnames = [ - #jets - "HLT_j.*perf_.*FTKRefit:key=InDetTrigTrackingxAODCnv_Bjet_FTKRefit:roi=SplitJet", - "HLT_j.*perf_.*FTKRefit:key=InDetTrigTrackingxAODCnv_Bjet_FTKRefit_IDTrig:roi=SplitJet", - "HLT_j.*perf_.*FTK:key=InDetTrigTrackingxAODCnv_Bjet_FTK:roi=SplitJet", - "HLT_j.*perf_.*FTK:key=InDetTrigTrackingxAODCnv_Bjet_FTK_IDTrig:roi=SplitJet", + #jets + "HLT_j.*perf_.*FTKRefit_.*:key=InDetTrigTrackingxAODCnv_Bjet_FTKRefit:roi=SplitJet", + "HLT_j.*perf_.*FTKRefit_.*:key=InDetTrigTrackingxAODCnv_Bjet_FTKRefit_IDTrig:roi=SplitJet", + "HLT_j.*perf_.*FTK_.*:key=InDetTrigTrackingxAODCnv_Bjet_FTK:roi=SplitJet", + "HLT_j.*perf_.*FTK_.*:key=InDetTrigTrackingxAODCnv_Bjet_FTK_IDTrig:roi=SplitJet", #taus "HLT_tau.*idperf_.*FTK:key=InDetTrigTrackingxAODCnv_Tau_FTK", "HLT_tau.*idperf_.*FTK:key=InDetTrigTrackingxAODCnv_Tau_FTK_IDTrig", @@ -254,10 +254,10 @@ def TrigIDPhysValMonitoringTool(): "HLT_tau.*FTKRefit:key=InDetTrigTrackingxAODCnv_Tau_FTKRefit", "HLT_tau.*FTKRefit:key=InDetTrigTrackingxAODCnv_Tau_FTKRefit_IDTrig", #muons - "HLT_mu.*idperf_FTK:key=InDetTrigTrackingxAODCnv_Muon_FTK", - "HLT_mu.*idperf_FTK:key=InDetTrigTrackingxAODCnv_Muon_FTK_IDTrig", - "HLT_mu.*idperf_FTKRefit:key=InDetTrigTrackingxAODCnv_Muon_FTKRefit", - "HLT_mu.*idperf_FTKRefit:key=InDetTrigTrackingxAODCnv_Muon_FTKRefit_IDTrig" + "HLT_mu.*idperf_FTK_.*:key=InDetTrigTrackingxAODCnv_Muon_FTK", + "HLT_mu.*idperf_FTK_.*:key=InDetTrigTrackingxAODCnv_Muon_FTK_IDTrig", + "HLT_mu.*idperf_FTKRefit_.*:key=InDetTrigTrackingxAODCnv_Muon_FTKRefit", + "HLT_mu.*idperf_FTKRefit_.*:key=InDetTrigTrackingxAODCnv_Muon_FTKRefit_IDTrig" ] outputlist += [makePhysvalMon(name, pdgid, chainnames, useHighestPT, cosmic, useOffline)] diff --git a/Trigger/TrigMonitoring/TrigIDtrkMonitoring/python/TrigIDtrkMonitoringConfig.py b/Trigger/TrigMonitoring/TrigIDtrkMonitoring/python/TrigIDtrkMonitoringConfig.py index 2b775eb6e353b187bbcb0e4e0096bc453ad6e586..c6ca546cbb4c5acde35ebbd3ec0b5ea9151942da 100644 --- a/Trigger/TrigMonitoring/TrigIDtrkMonitoring/python/TrigIDtrkMonitoringConfig.py +++ b/Trigger/TrigMonitoring/TrigIDtrkMonitoring/python/TrigIDtrkMonitoringConfig.py @@ -466,23 +466,23 @@ def TrigIDtrkMonitoringTool(): # tidabase.OutputLevel = DEBUG tidaftk.ntupleChainNames += [ "Offline", - #jets - "HLT_j.*perf_.*FTKRefit:key=InDetTrigTrackingxAODCnv_Bjet_FTKRefit:roi=SplitJet", - "HLT_j.*perf_.*FTKRefit:key=InDetTrigTrackingxAODCnv_Bjet_FTKRefit_IDTrig:roi=SplitJet", - "HLT_j.*perf_.*FTK:key=InDetTrigTrackingxAODCnv_Bjet_FTK:roi=SplitJet", - "HLT_j.*perf_.*FTK:key=InDetTrigTrackingxAODCnv_Bjet_FTK_IDTrig:roi=SplitJet", - #taus - "HLT_tau.*idperf_.*FTK:key=InDetTrigTrackingxAODCnv_Tau_FTK", - "HLT_tau.*idperf_.*FTK:key=InDetTrigTrackingxAODCnv_Tau_FTK_IDTrig", - "HLT_tau.*FTKNoPrec:key=InDetTrigTrackingxAODCnv_Tau_FTK", - "HLT_tau.*FTKRefit:key=InDetTrigTrackingxAODCnv_Tau_FTKRefit", - "HLT_tau.*FTKRefit:key=InDetTrigTrackingxAODCnv_Tau_FTKRefit_IDTrig", - #muons - "HLT_mu.*idperf_FTK:key=InDetTrigTrackingxAODCnv_Muon_FTK", - "HLT_mu.*idperf_FTK:key=InDetTrigTrackingxAODCnv_Muon_FTK_IDTrig", - "HLT_mu.*idperf_FTKRefit:key=InDetTrigTrackingxAODCnv_Muon_FTKRefit", - "HLT_mu.*idperf_FTKRefit:key=InDetTrigTrackingxAODCnv_Muon_FTKRefit_IDTrig" - ] + #jets + "HLT_j.*perf_.*FTKRefit_.*:key=InDetTrigTrackingxAODCnv_Bjet_FTKRefit:roi=SplitJet", + "HLT_j.*perf_.*FTKRefit_.*:key=InDetTrigTrackingxAODCnv_Bjet_FTKRefit_IDTrig:roi=SplitJet", + "HLT_j.*perf_.*FTK_.*:key=InDetTrigTrackingxAODCnv_Bjet_FTK:roi=SplitJet", + "HLT_j.*perf_.*FTK_.*:key=InDetTrigTrackingxAODCnv_Bjet_FTK_IDTrig:roi=SplitJet", + #taus + "HLT_tau.*idperf_.*FTK:key=InDetTrigTrackingxAODCnv_Tau_FTK", + "HLT_tau.*idperf_.*FTK:key=InDetTrigTrackingxAODCnv_Tau_FTK_IDTrig", + "HLT_tau.*FTKNoPrec:key=InDetTrigTrackingxAODCnv_Tau_FTK", + "HLT_tau.*FTKRefit:key=InDetTrigTrackingxAODCnv_Tau_FTKRefit", + "HLT_tau.*FTKRefit:key=InDetTrigTrackingxAODCnv_Tau_FTKRefit_IDTrig", + #muons + "HLT_mu.*idperf_FTK_.*:key=InDetTrigTrackingxAODCnv_Muon_FTK", + "HLT_mu.*idperf_FTK_.*:key=InDetTrigTrackingxAODCnv_Muon_FTK_IDTrig", + "HLT_mu.*idperf_FTKRefit_.*:key=InDetTrigTrackingxAODCnv_Muon_FTKRefit", + "HLT_mu.*idperf_FTKRefit_.*:key=InDetTrigTrackingxAODCnv_Muon_FTKRefit_IDTrig" + ] #ToolSvc += tidaftk; list += [ "TrigTestBase/IDFTKTool" ] diff --git a/Trigger/TrigMonitoring/TrigJetMonitoring/CMakeLists.txt b/Trigger/TrigMonitoring/TrigJetMonitoring/CMakeLists.txt index 137342856d2bc79e5f7fd78c8364683ca7759388..61cef9ab5618ba32787e6646b0ba86218908b57b 100644 --- a/Trigger/TrigMonitoring/TrigJetMonitoring/CMakeLists.txt +++ b/Trigger/TrigMonitoring/TrigJetMonitoring/CMakeLists.txt @@ -22,6 +22,7 @@ atlas_depends_on_subdirs( PUBLIC # External dependencies: find_package( Boost ) find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread MathMore Minuit Minuit2 Matrix Physics HistPainter Rint Graf Graf3d Gpad Html Postscript Gui GX11TTF GX11 ) +find_package( cx_Oracle ) # Component(s) in the package: atlas_add_component( TrigJetMonitoring diff --git a/Trigger/TrigMonitoring/TrigJetMonitoring/TrigJetMonitoring/HLTJetMonTool.h b/Trigger/TrigMonitoring/TrigJetMonitoring/TrigJetMonitoring/HLTJetMonTool.h index ffd4f3df1339ab80385c0ed16fbec5cfc6cf0c75..fcbcd0cb5d534e9f1923c283f1e66c0269ca3f8d 100755 --- a/Trigger/TrigMonitoring/TrigJetMonitoring/TrigJetMonitoring/HLTJetMonTool.h +++ b/Trigger/TrigMonitoring/TrigJetMonitoring/TrigJetMonitoring/HLTJetMonTool.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ @@ -89,10 +89,10 @@ class HLTJetMonTool : public IHLTMonTool { // data members // binning for basic histograms - std::vector<int> m_njnbins, m_jEtnbins, m_jetanbins, m_jphinbins, m_jemfracnbins, m_jhecfracnbins, m_jDEtnbins, m_jDepnbins; - std::vector<float> m_njperbin, m_jEtperbin, m_jetaperbin, m_jphiperbin, m_jemfracperbin, m_jhecfracperbin, m_jDEtperbin, m_jDepperbin; - std::vector<float> m_njbinlo, m_jEtbinlo, m_jetabinlo, m_jphibinlo, m_jemfracbinlo, m_jhecfracbinlo, m_jDEtbinlo, m_jDepbinlo; - std::vector<float> m_njbinhi, m_jEtbinhi, m_jetabinhi, m_jphibinhi, m_jemfracbinhi, m_jhecfracbinhi, m_jDEtbinhi, m_jDepbinhi; + std::vector<int> m_njnbins, m_jEtnbins, m_jetanbins, m_jphinbins, m_jemfracnbins, m_jhecfracnbins, m_jDEtnbins, m_jDepnbins, m_jJVTnbins, m_jSumPtTrk500nbins; + std::vector<float> m_njperbin, m_jEtperbin, m_jetaperbin, m_jphiperbin, m_jemfracperbin, m_jhecfracperbin, m_jDEtperbin, m_jDepperbin, m_jJVTperbin, m_jSumPtTrk500perbin; + std::vector<float> m_njbinlo, m_jEtbinlo, m_jetabinlo, m_jphibinlo, m_jemfracbinlo, m_jhecfracbinlo, m_jDEtbinlo, m_jDepbinlo, m_jJVTbinlo, m_jSumPtTrk500binlo; + std::vector<float> m_njbinhi, m_jEtbinhi, m_jetabinhi, m_jphibinhi, m_jemfracbinhi, m_jhecfracbinhi, m_jDEtbinhi, m_jDepbinhi, m_jJVTbinhi, m_jSumPtTrk500binhi; // binning for trigger efficiency std::vector<float> m_l1binloEt, m_l1binhiEt, m_l1nperbinEt, // for L1 trigger eff vs. Et diff --git a/Trigger/TrigMonitoring/TrigJetMonitoring/python/TrigJetMonitoringConfig.py b/Trigger/TrigMonitoring/TrigJetMonitoring/python/TrigJetMonitoringConfig.py index bcfd5c07a516adb2ae951580f4d00532e5e7dd4d..78b3633c0722a67eca6f7d7eadcb2dec5bbc8b8b 100644 --- a/Trigger/TrigMonitoring/TrigJetMonitoring/python/TrigJetMonitoringConfig.py +++ b/Trigger/TrigMonitoring/TrigJetMonitoring/python/TrigJetMonitoringConfig.py @@ -49,6 +49,16 @@ hlt_jetemfracbins = [ 52] hlt_jetemfracbinlo = [ -0.02] hlt_jetemfracbinhi = [ 1.02 ] +# Binning for JVT +hlt_jetJVTbins = [ 62] +hlt_jetJVTbinlo = [ -0.12] +hlt_jetJVTbinhi = [ 1.02 ] + +# Binning for SumPtTrk500 +hlt_jetSumPtTrk500bins = [ 100 ] +hlt_jetSumPtTrk500binlo = [ 0. ] +hlt_jetSumPtTrk500binhi = [ 500 ] + # Binning for DEt hlt_jetDEtbins = [ 42 ] hlt_jetDEtbinlo = [ -70. ] @@ -126,7 +136,12 @@ if (pp) or (mc): "a4tcemjesPS" : "HLT_xAOD__JetContainer_a4tcemjesPS", "a4tcemsubjesISFS" : "HLT_xAOD__JetContainer_a4tcemsubjesISFS", "a4tclcwjesFS" : "HLT_xAOD__JetContainer_a4tclcwjesFS", - "a4TTemnojcalibFS": "HLT_xAOD__JetContainer_a4TTemnojcalibFS" + "a4GSC" : "HLT_xAOD__JetContainer_GSCJet", + #"a10rtcemsubjesFS" : "HLT_xAOD__JetContainer_a10r_tcemsubjesFS", + "a10tclcwsubjesFS" : "HLT_xAOD__JetContainer_a10tclcwsubjesFS", + "a10ttclcwjesFS" : "HLT_xAOD__JetContainer_a10ttclcwjesFS", + "a4tcemsubjesISFSftk" : "HLT_xAOD__JetContainer_a4tcemsubjesISFSftk", + "a4tcemsubjesISFSftkrefit" : "HLT_xAOD__JetContainer_a4tcemsubjesISFSftkrefit", } hlt_offlineJetKeys = {"AntiKt4EMTopoJets":"AntiKt4EMTopoJets", @@ -163,10 +178,25 @@ if (pp) or (mc): # HLT items - hlt_hltEtThresholds = { 'j25':20., - 'j25_320eta490':20., - 'j60':50., - 'j60_L1RD0_FILLED':50., + hlt_hltEtThresholds = { 'j0_perf_L1RD0FILLED': 0., + 'j0_perf_ftk_L1RD0FILLED': 0., + 'j0_perf_ftkrefit_L1RD0FILLED': 0., + 'j0_gsc0_boffperf_split_L1RD0FILLED': 0., + 'j0_gsc0_boffperf_split_ftk_L1RD0FILLED': 0., + 'j0_gsc0_boffperf_split_ftkrefit_L1RD0FILLED': 0., + 'j35':20., + 'j35_jes':20., + 'j35_lcw':20., + 'j35_sub':20., + 'j35_subjes':20., + 'j35_nojcalib':20., + 'j35_320eta490':20., + 'j35_320eta490_lcw':20., + 'j35_320eta490_jes':20., + 'j35_320eta490_sub':20., + 'j35_320eta490_subjes':20., + 'j35_320eta490_nojcalib':20., + 'j60':50., 'j60_280eta320':50., 'j60_320eta490':50., 'j200_jes_PS':100., @@ -176,24 +206,28 @@ if (pp) or (mc): 'j460_a10_lcw_sub_L1J100':350., 'j80_xe80':50., '4j45':20., - '6j60':20., - '5j60':30., - '10j40_L14J20':0., - 'j0_perf_ds1_L1J75':0., - 'j0_perf_ds1_L1J100':0., - 'ht850_L1J100':50., - 'j60_TT':20, - 'j85_cleanLLP':30, - 'j85_cleanL':30, - 'j85_cleanT':30, - 'j0_1i2c300m500TLA':0., - 'j0_0i1c500m900TLA':0. - } - - hlt_hltEtaHighThresholds = { 'j25':3.2, #Chose eta range for efficiency calculation - 'j25_320eta490':4.9, - 'j60':3.2 , - 'j60_L1RD0_FILLED':3.2, + '6j45':20., + '6j45_0eta240':20., + '10j40_L14J20':0.} + + hlt_hltEtaHighThresholds = { 'j0_perf_L1RD0FILLED': 2.5, + 'j0_perf_ftk_L1RD0FILLED': 2.5, + 'j0_perf_ftkrefit_L1RD0FILLED': 2.5, + 'j0_gsc0_boffperf_split_L1RD0FILLED': 2.5, + 'j0_gsc0_boffperf_split_ftk_L1RD0FILLED': 2.5, + 'j0_gsc0_boffperf_split_ftkrefit_L1RD0FILLED': 2.5, + 'j35':3.2, + 'j35_jes':3.2, + 'j35_lcw':3.2, + 'j35_sub':3.2, + 'j35_subjes':3.2, + 'j35_nojcalib':3.2, + 'j35_320eta490':4.9, + 'j35_320eta490_lcw':4.9, + 'j35_320eta490_jes':4.9, + 'j35_320eta490_sub':4.9, + 'j35_320eta490_subjes':4.9, + 'j60':3.2, 'j60_280eta320':3.2, 'j60_320eta490':4.9, 'j200_jes_PS':3.2, @@ -203,50 +237,63 @@ if (pp) or (mc): 'j460_a10_lcw_sub_L1J100':3.2, 'j80_xe80':3.2, '4j45':3.2, - '6j60':3.2, - '5j60':3.2, - '10j40_L14J20':3.2, - 'j0_perf_ds1_L1J75':3.2, - 'j0_perf_ds1_L1J100':3.2, - 'ht850_L1J100':3.2, - 'j60_TT':3.2, - 'j85_cleanLLP':3.2, - 'j85_cleanL':3.2, - 'j85_cleanT':3.2, - 'j0_1i2c300m500TLA':3.2, - 'j0_0i1c500m900TLA':3.2} - - hlt_hltEtaLowThresholds = { 'j25':0., - 'j25_320eta490':3.2, - 'j60':0., - 'j60_L1RD0_FILLED':0., + '6j45':3.2, + '6j45_0eta240':2.4, + '10j40_L14J20':3.2} + + hlt_hltEtaLowThresholds = { 'j0_perf_L1RD0FILLED': 0., + 'j0_perf_ftk_L1RD0FILLED': 0., + 'j0_perf_ftkrefit_L1RD0FILLED': 0., + 'j0_gsc0_boffperf_split_L1RD0FILLED': 0., + 'j0_gsc0_boffperf_split_ftk_L1RD0FILLED': 0., + 'j0_gsc0_boffperf_split_ftkrefit_L1RD0FILLED': 0., + 'j35':0.0, + 'j35_jes':0.0, + 'j35_lcw':0.0, + 'j35_sub':0.0, + 'j35_subjes':0.0, + 'j35_nojcalib':0.0, + 'j35_320eta490':3.2, + 'j35_320eta490_lcw':3.2, + 'j35_320eta490_jes':3.2, + 'j35_320eta490_sub':3.2, + 'j35_320eta490_subjes':3.2, + 'j60':0.0, 'j60_280eta320':2.8, 'j60_320eta490':3.2, - 'j200_jes_PS':0., - 'j260':0., - 'j360':0., - 'j460':0., - 'j460_a10_lcw_sub_L1J100':0., - 'j80_xe80':0., - '4j45':0., - '6j60':0., - '5j60':0., - '10j40_L14J20':0., - 'j0_perf_ds1_L1J75':0., - 'j0_perf_ds1_L1J100':0., - 'ht850_L1J100':0., - 'j60_TT':0., - 'j85_cleanLLP':0., - 'j85_cleanL':0., - 'j85_cleanT':0., - 'j0_1i2c300m500TLA':0., - 'j0_0i1c500m900TLA':0.} - - - hlt_hltJetn = { 'j25':1, #Select the nth jet for efficiency calcultaion of single/multijet HLT chains - 'j25_320eta490':1, - 'j60':1, - 'j60_L1RD0_FILLED':1, + 'j60_L1RD0_FILLED':0.0, + 'j260':0.0, + 'j360':0.0, + 'j420':0.0, + 'j225_gsc420_boffperf_split':0.0, + 'j460_a10_lcw_subjes_L1SC111':0.0, + 'j460_a10t_lcw_jes_L1SC111':0.0, + '2j330_a10t_lcw_jes_35smcINF_SC111':0.0, + 'j80_xe80':0.0, + '4j45':0.0, + '6j45':0.0, + '6j45_0eta240':0.0, + '10j40_L14J20':0.0} + + + hlt_hltJetn = { 'j0_perf_L1RD0FILLED': 1, + 'j0_perf_ftk_L1RD0FILLED': 1, + 'j0_perf_ftkrefit_L1RD0FILLED': 1, + 'j0_gsc0_boffperf_split_L1RD0FILLED': 1, + 'j0_gsc0_boffperf_split_ftk_L1RD0FILLED': 1, + 'j0_gsc0_boffperf_split_ftkrefit_L1RD0FILLED': 1, + 'j35':1, + 'j35_jes':1, + 'j35_lcw':1, + 'j35_sub':1, + 'j35_subjes':1, + 'j35_nojcalib':1, + 'j35_320eta490':1, + 'j35_320eta490_lcw':1, + 'j35_320eta490_jes':1, + 'j35_320eta490_sub':1, + 'j35_320eta490_subjes':1, + 'j60':1, 'j60_280eta320':1, 'j60_320eta490':1, 'j200_jes_PS':1, @@ -256,53 +303,67 @@ if (pp) or (mc): 'j460_a10_lcw_sub_L1J100':1, 'j80_xe80':1, '4j45':4, - '6j60':6, - '5j60':5, - '10j40_L14J20':10, - 'j0_perf_ds1_L1J75':1, - 'j0_perf_ds1_L1J100':1, - 'ht850_L1J100':1, - 'j60_TT':1, - 'j85_cleanLLP':1, - 'j85_cleanL':1, - 'j85_cleanT':1, - 'j0_1i2c300m500TLA':1, - 'j0_0i1c500m900TLA':1} - - - hlt_hltContainers = {'j25':'a4tcemsubjesISFS', #Chose container to retrieve the features of a given chain - 'j25_320eta490':'a4tcemsubjesISFS', - 'j60':'a4tcemsubjesISFS', - 'j60_L1RD0_FILLED':'a4tcemsubjesISFS', - 'j60_280eta320':'a4tcemsubjesISFS', - 'j60_320eta490':'a4tcemsubjesISFS', - 'j200_jes_PS':'a4tcemjesPS', - 'j260':'a4tcemsubjesISFS', - 'j360':'a4tcemsubjesISFS', - 'j460':'a4tcemsubjesISFS', - 'j460_a10_lcw_sub_L1J100':'a10tclcwsubFS', - 'j80_xe80':'a4tcemsubjesISFS', - '4j45':'a4tcemsubjesISFS', - '6j60':'a4tcemsubjesISFS', - '5j60':'a4tcemsubjesISFS', - '10j40_L14J20':'a4tcemsubjesISFS', - 'j0_perf_ds1_L1J75':'a4tcemsubjesISFS', - 'j0_perf_ds1_L1J100':'a4tcemsubjesISFS', - 'ht850_L1J100':'a4tcemsubjesISFS', - 'j60_TT':'a4TTemnojcalibFS', - 'j85_cleanLLP':'a4tcemsubjesISFS', - 'j85_cleanL':'a4tcemsubjesISFS', - 'j85_cleanT':'a4tcemsubjesISFS', - 'j0_1i2c300m500TLA':'a4tcemsubjesISFS', - 'j0_0i1c500m900TLA':'a4tcemsubjesISFS'} - + '6j45':6, + '6j45_0eta240':6, + '10j40_L14J20':10} + + + hlt_hltContainers = { 'j0_perf_L1RD0FILLED':'a4tcemsubjesISFS', + 'j0_perf_ftk_L1RD0FILLED':'a4tcemsubjesISFSftk', + 'j0_perf_ftkrefit_L1RD0FILLED':'a4tcemsubjesISFSftkrefit', + 'j0_gsc0_boffperf_split_L1RD0FILLED':'a4tcemsubjesISFS', + 'j0_gsc0_boffperf_split_ftk_L1RD0FILLED':'a4tcemsubjesISFSftk', + 'j0_gsc0_boffperf_split_ftkrefit_L1RD0FILLED':'a4tcemsubjesISFSftkrefit', + 'j35':'a4tcemsubjesISFS', + 'j35_sub':'a4tcemsubFS', + 'j35_jes':'a4tcemjesFS', + 'j35_subjes':'a4tcemsubjesFS', + 'j35_nojcalib':'a4tcemnojcalibFS', + 'j35_lcw':'a4tclcwsubjesISFS', + 'j35_320eta490':'a4tcemsubjesISFS', + 'j35_320eta490_sub':'a4tcemsubFS', + 'j35_320eta490_jes':'a4tcemjesFS', + 'j35_320eta490_subjes':'a4tcemsubjesFS', + 'j35_320eta490_nojcalib':'a4tcemnojcalibFS', + 'j35_320eta490_lcw':'a4tclcwsubjesISFS', + 'j60':'a4tcemsubjesISFS', + 'j60_280eta320':'a4tcemsubjesISFS', + 'j60_320eta490':'a4tcemsubjesISFS', + 'j60_L1RD0_FILLED':'a4tcemsubjesISFS', + 'j260':'a4tcemsubjesISFS', + 'j360':'a4tcemsubjesISFS', + 'j420':'a4tcemsubjesISFS', + 'j225_gsc420_boffperf_split':'a4GSC', + 'j460_a10_lcw_subjes_L1SC111':'a10tclcwsubjesFS', + 'j460_a10t_lcw_jes_L1SC111':'a10ttclcwjesFS', + '2j330_a10t_lcw_jes_35smcINF_SC111':'a10ttclcwjesFS', + 'j80_xe80':'a4tcemsubjesISFS', + '4j45':'a4tcemsubjesISFS', + '6j45':'a4tcemsubjesISFS', + '6j45_0eta240':'a4tcemsubjesISFS', + '10j40_L14J20':'a4tcemsubjesISFS' + } # Offline - hlt_offlineEtThresholds = { 'L1_J15':10., - 'j25':20., - 'j25_320eta490':20., - 'j60':50. , - 'j60_L1RD0_FILLED':50., + hlt_offlineEtThresholds = { 'j0_perf_L1RD0FILLED': 0., + 'j0_perf_ftk_L1RD0FILLED': 0., + 'j0_perf_ftkrefit_L1RD0FILLED': 0., + 'j0_gsc0_boffperf_split_L1RD0FILLED': 0., + 'j0_gsc0_boffperf_split_ftk_L1RD0FILLED': 0., + 'j0_gsc0_boffperf_split_ftkrefit_L1RD0FILLED': 0., + 'L1_J15':0., + 'j35_jes':20., + 'j35_lcw':20., + 'j35_sub':20., + 'j35_subjes':20., + 'j35_nojcalib':20., + 'j35_320eta490':20., + 'j35_320eta490_lcw':20., + 'j35_320eta490_jes':20., + 'j35_320eta490_sub':20., + 'j35_320eta490_subjes':20., + 'j35_320eta490_nojcalib':20., + 'j60':50., 'j60_280eta320':50., 'j60_320eta490':50., 'j200_jes_PS':100., @@ -716,6 +777,16 @@ def TrigJetMonitoringTool(): JetemfracBinLo = hlt_jetemfracbinlo, JetemfracBinHi = hlt_jetemfracbinhi, + # Binning for emfrac + JetJVTNBins = hlt_jetJVTbins, + JetJVTBinLo = hlt_jetJVTbinlo, + JetJVTBinHi = hlt_jetJVTbinhi, + + # Binning for emfrac + JetSumPtTrk500NBins = hlt_jetSumPtTrk500bins, + JetSumPtTrk500BinLo = hlt_jetSumPtTrk500binlo, + JetSumPtTrk500BinHi = hlt_jetSumPtTrk500binhi, + # Binning for DEt JetDEtNBins = hlt_jetDEtbins, JetDEtBinLo = hlt_jetDEtbinlo, @@ -823,9 +894,6 @@ def TrigJetMonitoringTool(): # from TrigHLTMonitoring.HLTMonFlags import HLTMonFlags # HLTMonFlags.doEgamma.set_Value_and_Lock(False) - - #ToolSvc += HLTJetMon; - # Set up the trigger configuration tool: #ToolSvc += CfgMgr.TrigConf__xAODConfigTool( "xAODConfigTool", #OutputLevel = 2 ) diff --git a/Trigger/TrigMonitoring/TrigJetMonitoring/src/HLTJetMonTool.cxx b/Trigger/TrigMonitoring/TrigJetMonitoring/src/HLTJetMonTool.cxx index 4429f2a220e59e822e89fefbfdeaf4bed8f782b4..4cdba05848029e75bee0fbc9b6edd0922781ec99 100755 --- a/Trigger/TrigMonitoring/TrigJetMonitoring/src/HLTJetMonTool.cxx +++ b/Trigger/TrigMonitoring/TrigJetMonitoring/src/HLTJetMonTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ @@ -145,6 +145,16 @@ HLTJetMonTool::HLTJetMonTool( declareProperty("HLTEffBinLoEtGeV", m_hltbinloEt ); declareProperty("HLTEffBinHiEtGeV", m_hltbinhiEt ); + // Jet JVT bins + declareProperty("JetJVTNBins", m_jJVTnbins ); + declareProperty("JetJVTBinLo", m_jJVTbinlo ); + declareProperty("JetJVTBinHi", m_jJVTbinhi ); + + // Jet SumPtTrk bins + declareProperty("JetSumPtTrk500NBins", m_jSumPtTrk500nbins ); + declareProperty("JetSumPtTrk500BinLo", m_jSumPtTrk500binlo ); + declareProperty("JetSumPtTrk500BinHi", m_jSumPtTrk500binhi ); + //declareProperty("JetChainsRegex", m_chainsByRegexp); declareProperty("EMFractionCut", m_emfracCut = 0.9); @@ -551,6 +561,14 @@ StatusCode HLTJetMonTool::book( ) { float thebinSize = m_jhecfracnbins[k] > 0 ? fabs(m_jhecfracbinhi[k]-m_jhecfracbinlo[k]) / m_jhecfracnbins[k] : -1.; m_jhecfracperbin.push_back(thebinSize); } + for(unsigned int k = 0; k < m_jJVTnbins.size(); k++) { + float thebinSize = m_jJVTnbins[k] > 0 ? fabs(m_jJVTbinhi[k]-m_jJVTbinlo[k]) / m_jJVTnbins[k] : -1.; + m_jJVTperbin.push_back(thebinSize); + } + for(unsigned int k = 0; k < m_jSumPtTrk500nbins.size(); k++) { + float thebinSize = m_jSumPtTrk500nbins[k] > 0 ? fabs(m_jSumPtTrk500binhi[k]-m_jSumPtTrk500binlo[k]) / m_jSumPtTrk500nbins[k] : -1.; + m_jSumPtTrk500perbin.push_back(thebinSize); + } for(unsigned int k = 0; k < m_jDEtnbins.size(); k++) { float thebinSize = m_jDEtnbins[k] > 0 ? fabs(m_jDEtbinhi[k]-m_jDEtbinlo[k]) / m_jDEtnbins[k] : -1.; m_jDEtperbin.push_back(thebinSize); @@ -624,7 +642,7 @@ void HLTJetMonTool::bookJetHists() { unsigned int k = 0; for(JetSigIter hj= m_HLTJetKeys.begin(); hj != m_HLTJetKeys.end(); ++hj, k++) { // book histograms for each HLT jet container - varlist = "n;et;high_et;eta;phi;emfrac;hecfrac;phi_vs_eta;e_vs_eta;e_vs_phi;phi_vs_eta_lar;sigma_vs_lb;"; + varlist = "n;et;high_et;eta;phi;emfrac;hecfrac;jvt;sumpttrk500;phi_vs_eta;e_vs_eta;e_vs_phi;phi_vs_eta_lar;sigma_vs_lb;"; nvar = basicKineVar(varlist,bookvars); if(nvar==0) ATH_MSG_INFO("Error in bookKineVars - variable list not tokenized!"); @@ -683,7 +701,7 @@ void HLTJetMonTool::bookJetHists() { // HLT Chains // HLT basic histograms - varlist="et;leading_et;high_et;eta;phi;phi_vs_eta;emfrac;hecfrac;e_vs_eta;e_vs_phi;sigma_vs_lb;n;"; + varlist="et;leading_et;high_et;eta;phi;emfrac;hecfrac;jvt;sumpttrk500;phi_vs_eta;e_vs_eta;e_vs_phi;sigma_vs_lb;n;"; nvar = basicKineVar(varlist,bookvars); levels.clear(); levels.push_back("HLT"); /*levels.push_back("L1");*/ for(JetSigIter k= m_basicHLTTrig.begin(); k != m_basicHLTTrig.end(); ++k ) { @@ -725,7 +743,7 @@ void HLTJetMonTool::bookJetHists() { k = 0; // FIXME for(JetSigIter ofj= m_OFJetKeys.begin(); ofj != m_OFJetKeys.end(); ++ofj, k++) { // book histograms for each offline jet container - varlist = "n;et;eta;phi;emfrac;hecfrac;phi_vs_eta;e_vs_eta;e_vs_phi;phi_vs_eta_lar;sigma_vs_lb;"; + varlist = "n;et;eta;phi;emfrac;hecfrac;jvt;sumpttrk500;phi_vs_eta;e_vs_eta;e_vs_phi;phi_vs_eta_lar;sigma_vs_lb;"; nvar = basicKineVar(varlist,bookvars); if(nvar==0) ATH_MSG_INFO("Error in bookKineVars - variable list not tokenized!"); @@ -874,7 +892,7 @@ void HLTJetMonTool::bookDijetHistos(const std::string& trigjet, const std::strin TString htitle = Form("%s E_{T} w.r.t %s E_{T}; Leading E_{T}^{jet} [GeV]; Subleading E_{T}^{jet} [GeV]",trigjet.c_str(), ofjet.c_str()); TString hname = Form("%s_leadEt_vs_%s_subleadEt",trigjet.c_str(), ofjet.c_str()); addHistogram(new TH2F(hname, htitle,nbinsEt,binloEt,binhiEt,nbinsEt,binloEt,binhiEt)); - ATH_MSG_DEBUG("Booked " << hname << "(" << nbinsEt << "," << binloEt << "," << binhiEt << ")" ); + ATH_MSG_VERBOSE("Booked " << hname << "(" << nbinsEt << "," << binloEt << "," << binhiEt << ")" ); }else{ @@ -882,25 +900,25 @@ void HLTJetMonTool::bookDijetHistos(const std::string& trigjet, const std::strin TString htitle = Form("%s E_{T} w.r.t %s E_{T}; Leading Trigger E_{T}^{jet} [GeV]; Leading OF E_{T}^{jet} [GeV]",trigjet.c_str(), ofjet.c_str()); TString hname = Form("%s_leadEt_vs_%s_leadEt",trigjet.c_str(), ofjet.c_str()); addHistogram(new TH2F(hname, htitle,nbinsEt,binloEt,binhiEt,nbinsEtOF,binloEtOF,binhiEtOF)); - ATH_MSG_DEBUG("Booked " << hname << "(" << nbinsEt << "," << binloEt << "," << binhiEt << ")" ); + ATH_MSG_VERBOSE("Booked " << hname << "(" << nbinsEt << "," << binloEt << "," << binhiEt << ")" ); //L1/HLT lead Et vs. OF sublead Et htitle = Form("%s E_{T} w.r.t %s E_{T}; Leading Trigger E_{T}^{jet} [GeV]; Subleading OF E_{T}^{jet} [GeV]",trigjet.c_str(), ofjet.c_str()); hname = Form("%s_leadEt_vs_%s_subleadEt",trigjet.c_str(), ofjet.c_str()); addHistogram(new TH2F(hname, htitle,nbinsEt,binloEt,binhiEt,nbinsEtOF,binloEtOF,binhiEtOF)); - ATH_MSG_DEBUG("Booked " << hname << "(" << nbinsEt << "," << binloEt << "," << binhiEt << ")" ); + ATH_MSG_VERBOSE("Booked " << hname << "(" << nbinsEt << "," << binloEt << "," << binhiEt << ")" ); //L1/HLT sublead Et vs. OF lead Et htitle = Form("%s E_{T} w.r.t %s E_{T}; Subleading Trigger E_{T}^{jet} [GeV]; Leading OF E_{T}^{jet} [GeV]",trigjet.c_str(), ofjet.c_str()); hname = Form("%s_subleadEt_vs_%s_leadEt",trigjet.c_str(), ofjet.c_str()); addHistogram(new TH2F(hname, htitle,nbinsEt,binloEt,binhiEt,nbinsEtOF,binloEtOF,binhiEtOF)); - ATH_MSG_DEBUG("Booked " << hname << "(" << nbinsEt << "," << binloEt << "," << binhiEt << ")" ); + ATH_MSG_VERBOSE("Booked " << hname << "(" << nbinsEt << "," << binloEt << "," << binhiEt << ")" ); //L1/HLT sublead Et vs. OF sublead Et htitle = Form("%s E_{T} w.r.t %s E_{T}; Subleading Trigger E_{T}^{jet} [GeV]; Subleading OF E_{T}^{jet} [GeV]",trigjet.c_str(), ofjet.c_str()); hname = Form("%s_subleadEt_vs_%s_subleadEt",trigjet.c_str(), ofjet.c_str()); addHistogram(new TH2F(hname, htitle,nbinsEt,binloEt,binhiEt,nbinsEtOF,binloEtOF,binhiEtOF)); - ATH_MSG_DEBUG("Booked " << hname << "(" << nbinsEt << "," << binloEt << "," << binhiEt << ")" ); + ATH_MSG_VERBOSE("Booked " << hname << "(" << nbinsEt << "," << binloEt << "," << binhiEt << ")" ); } }//EoF @@ -952,7 +970,7 @@ void HLTJetMonTool::bookOfflineHists(JetSigtype& item, const std::string& ofjet) TString hname = Form("%s_Eff_vs_pt_num",trigName.Data()); addHistogram(new TH1F(hname, htitle,nbinsEt,binloEt,binhiEt)); - ATH_MSG_DEBUG("Booked " << hname << "(" << nbinsEt << "," << binloEt << "," << binhiEt << ")" ); + ATH_MSG_VERBOSE("Booked " << hname << "(" << nbinsEt << "," << binloEt << "," << binhiEt << ")" ); hname = Form("%s_Eff_vs_pt_den",trigName.Data()); addHistogram(new TH1F(hname, htitle,nbinsEt,binloEt,binhiEt)); @@ -1011,7 +1029,7 @@ void HLTJetMonTool::bookOfflineHists(JetSigtype& item, const std::string& ofjet) hname = Form("%s_unmatched_pt",trigName.Data()); addHistogram(new TH1F(hname, htitle,nbinsEt,binloEt,binhiEt)); - ATH_MSG_DEBUG("Booked " << hname << "(" << nbinsEt << "," << binloEt << "," << binhiEt << ")" ); + ATH_MSG_VERBOSE("Booked " << hname << "(" << nbinsEt << "," << binloEt << "," << binhiEt << ")" ); //Resolution @@ -1032,7 +1050,7 @@ void HLTJetMonTool::bookOfflineHists(JetSigtype& item, const std::string& ofjet) hname = Form("%s_Eff_vs_pt_vs_eta_num",trigName.Data()); addHistogram(new TH2F(hname, htitle,nbinsEt,binloEt,binhiEt,m_jetanbins[0],m_jetabinlo[0],m_jetabinhi[0])); - ATH_MSG_DEBUG("Booked " << hname << "(" << nbinsEt << "," << binloEt << "," << binhiEt << ")" ); + ATH_MSG_VERBOSE("Booked " << hname << "(" << nbinsEt << "," << binloEt << "," << binhiEt << ")" ); hname = Form("%s_Eff_vs_pt_vs_eta_den",trigName.Data()); addHistogram(new TH2F(hname, htitle,nbinsEt,binloEt,binhiEt,m_jetanbins[0],m_jetabinlo[0],m_jetabinhi[0])); @@ -1042,7 +1060,7 @@ void HLTJetMonTool::bookOfflineHists(JetSigtype& item, const std::string& ofjet) hname = Form("%s_Eff_vs_pt_vs_phi_num",trigName.Data()); addHistogram(new TH2F(hname, htitle,nbinsEt,binloEt,binhiEt,m_jphinbins[0],m_jphibinlo[0],m_jphibinhi[0])); - ATH_MSG_DEBUG("Booked " << hname << "(" << nbinsEt << "," << binloEt << "," << binhiEt << ")" ); + ATH_MSG_VERBOSE("Booked " << hname << "(" << nbinsEt << "," << binloEt << "," << binhiEt << ")" ); hname = Form("%s_Eff_vs_pt_vs_phi_den",trigName.Data()); addHistogram(new TH2F(hname, htitle,nbinsEt,binloEt,binhiEt,m_jphinbins[0],m_jphibinlo[0],m_jphibinhi[0])); @@ -1053,7 +1071,7 @@ void HLTJetMonTool::bookOfflineHists(JetSigtype& item, const std::string& ofjet) hname = Form("%s_pt_vs_OF_pt",trigName.Data()); addHistogram(new TH2F(hname, htitle,nbinsEt,binloEt,binhiEt,nbinsEt,binloEt,binhiEt)); - ATH_MSG_DEBUG("Booked " << hname << "(" << nbinsEt << "," << binloEt << "," << binhiEt << ")" ); + ATH_MSG_VERBOSE("Booked " << hname << "(" << nbinsEt << "," << binloEt << "," << binhiEt << ")" ); //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: @@ -1170,6 +1188,20 @@ void HLTJetMonTool::bookBasicHists(std::vector<std::string>& level, std::vector< addHistogram(new TH1F(hname, htitle,m_jhecfracnbins[0],m_jhecfracbinlo[0],m_jhecfracbinhi[0])); } + // jet jvt + if(*var == "jvt") { + htitle = Form("%s jvt; a.u.; entries/%3.1f",title.Data(),m_jJVTperbin[0]); + hname = Form("%sJet_JVT",lvl.Data()); + addHistogram(new TH1F(hname, htitle,m_jJVTnbins[0],m_jJVTbinlo[0],m_jJVTbinhi[0])); + } + + // jet sumpttrk500 + if(*var == "sumpttrk500") { + htitle = Form("%s_sumpttrk50;0 a.u.; entries/%3.1f",title.Data(),m_jSumPtTrk500perbin[0]); + hname = Form("%sJet_SumPtTrk500",lvl.Data()); + addHistogram(new TH1F(hname, htitle,m_jSumPtTrk500nbins[0],m_jSumPtTrk500binlo[0],m_jSumPtTrk500binhi[0])); + } + // roi descriptor eta if(*var == "roidesc_eta") { htitle = Form("%s pseudorapidity of center of RoI at origin; #eta; entries/%3.1f",title.Data(),m_jetaperbin[0]); @@ -1260,7 +1292,6 @@ void HLTJetMonTool::bookBasicHists(std::vector<std::string>& level, std::vector< void HLTJetMonTool::setHistProperties(TH1* h) { - ATH_MSG_DEBUG( "in HLTJetMonTool::setHistProperties() " ); if(!h) return; h->SetFillColor(42); h->SetTitleSize(0.037,"X"); @@ -1274,7 +1305,6 @@ void HLTJetMonTool::setHistProperties(TH1* h) { void HLTJetMonTool::set2DHistProperties(TH2* h) { - ATH_MSG_DEBUG( "in HLTJetMonTool::setHistProperties() " ); if(!h) return; h->SetOption("CONT0"); @@ -1327,7 +1357,9 @@ StatusCode HLTJetMonTool::retrieveContainers() { m_OFJetC.push_back(jetcoll); } // end for - return sc; + // Override SC failure on retrieve, because we may want to run on files + // without every single chain activated!? + return StatusCode::SUCCESS; } // end retrieveContainers @@ -1414,7 +1446,7 @@ StatusCode HLTJetMonTool::fillJetHists() { return StatusCode::SUCCESS; } ATH_MSG_DEBUG ( "HLTJetMonTool::fillDiJetHists() returned success" ); - + return StatusCode::SUCCESS; } // end fillJetHists @@ -1511,23 +1543,21 @@ StatusCode HLTJetMonTool::fillBasicHists() { if(/*m_debuglevel*/1) { //checks jet variables - ATH_MSG_DEBUG( "REGTEST Looking at jet " << n_HLTJet); - ATH_MSG_DEBUG( "REGTEST pt: " << thisjet->pt() ); - ATH_MSG_DEBUG( "REGTEST eta: " << thisjet->eta() ); - ATH_MSG_DEBUG( "REGTEST phi: " << thisjet->phi() ); - ATH_MSG_DEBUG( "REGTEST m: " << thisjet->m() ); - ATH_MSG_DEBUG( "REGTEST e: " << thisjet->e() ); - // ATH_MSG_DEBUG( "REGTEST emfrac: " << thisjet->getAttribute<float>(xAOD::JetAttribute::EMFrac) ); - // ATH_MSG_DEBUG( "REGTEST hecfrac: " << thisjet->getAttribute<float>(xAOD::JetAttribute::HECFrac)); - ATH_MSG_DEBUG( "REGTEST px: " << thisjet->px() ); - ATH_MSG_DEBUG( "REGTEST py: " << thisjet->py() ); - ATH_MSG_DEBUG( "REGTEST pz: " << thisjet->pz() ); - ATH_MSG_DEBUG( "REGTEST type: " << thisjet->type() ); - ATH_MSG_DEBUG( "REGTEST algorithm (kt: 0, cam: 1, antikt: 2, ...): " << thisjet->getAlgorithmType() ); - ATH_MSG_DEBUG( "REGTEST size parameter: " << thisjet->getSizeParameter() ); - ATH_MSG_DEBUG( "REGTEST input (LCTopo: 0, EMTopo: 1, ...): " << thisjet->getInputType() ); - ATH_MSG_DEBUG( "REGTEST constituents signal state (uncalibrated: 0, calibrated: 1): " << thisjet->getConstituentsSignalState() ); - ATH_MSG_DEBUG( "REGTEST number of constituents: " << thisjet->numConstituents() ); + ATH_MSG_VERBOSE( "REGTEST Looking at jet " << n_HLTJet); + ATH_MSG_VERBOSE( "REGTEST pt: " << thisjet->pt() ); + ATH_MSG_VERBOSE( "REGTEST eta: " << thisjet->eta() ); + ATH_MSG_VERBOSE( "REGTEST phi: " << thisjet->phi() ); + ATH_MSG_VERBOSE( "REGTEST m: " << thisjet->m() ); + ATH_MSG_VERBOSE( "REGTEST e: " << thisjet->e() ); + ATH_MSG_VERBOSE( "REGTEST px: " << thisjet->px() ); + ATH_MSG_VERBOSE( "REGTEST py: " << thisjet->py() ); + ATH_MSG_VERBOSE( "REGTEST pz: " << thisjet->pz() ); + ATH_MSG_VERBOSE( "REGTEST type: " << thisjet->type() ); + ATH_MSG_VERBOSE( "REGTEST algorithm (kt: 0, cam: 1, antikt: 2, ...): " << thisjet->getAlgorithmType() ); + ATH_MSG_VERBOSE( "REGTEST size parameter: " << thisjet->getSizeParameter() ); + ATH_MSG_VERBOSE( "REGTEST input (LCTopo: 0, EMTopo: 1, ...): " << thisjet->getInputType() ); + ATH_MSG_VERBOSE( "REGTEST constituents signal state (uncalibrated: 0, calibrated: 1): " << thisjet->getConstituentsSignalState() ); + ATH_MSG_VERBOSE( "REGTEST number of constituents: " << thisjet->numConstituents() ); } // for basic hists, don't cut eta/pt @@ -1545,16 +1575,29 @@ StatusCode HLTJetMonTool::fillBasicHists() { if (m_isPP || m_isCosmic || m_isMC){ emfrac = thisjet->getAttribute<float>(xAOD::JetAttribute::EMFrac); hecfrac = thisjet->getAttribute<float>(xAOD::JetAttribute::HECFrac); + ATH_MSG_VERBOSE( "REGTEST emfrac: " << emfrac ); + ATH_MSG_VERBOSE( "REGTEST hecfrac: " << hecfrac ); } - ATH_MSG_DEBUG( lvl << " et = " << et << "\teta = " << eta << "\temfrac = " << emfrac <<"\thecfrac"); - + double jvt = -0.1; + double sumpttrk500 = 0; + if (thisjet->isAvailable<float>("Jvt")){ + jvt = thisjet->getAttribute<float>("Jvt"); + sumpttrk500 = thisjet->getAttribute<std::vector<float> >("SumPtTrkPt500")[0]/Gaudi::Units::GeV; + ATH_MSG_VERBOSE( "REGTEST JVT: " << jvt ); + ATH_MSG_VERBOSE( "REGTEST SumPtTrk500: " << sumpttrk500 ); + } + + if(msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG( lvl << " et = " << et << "\teta = " << eta << "\temfrac = " << emfrac <<"\thecfrac"); + if((h = hist(Form("%sJet_Et",lvl.c_str())))) h->Fill(et,m_lumi_weight); if((h = hist(Form("%sJet_HighEt",lvl.c_str())))) h->Fill(et,m_lumi_weight); if((h = hist(Form("%sJet_eta",lvl.c_str())))) h->Fill(eta,m_lumi_weight); if((h = hist(Form("%sJet_phi",lvl.c_str())))) h->Fill(phi,m_lumi_weight); if((h = hist(Form("%sJet_emfrac",lvl.c_str())))) h->Fill(emfrac,m_lumi_weight); if((h = hist(Form("%sJet_hecfrac",lvl.c_str())))) h->Fill(hecfrac,m_lumi_weight); + if((h = hist(Form("%sJet_JVT",lvl.c_str())))) h->Fill(jvt,m_lumi_weight); + if((h = hist(Form("%sJet_SumPtTrk500",lvl.c_str())))) h->Fill(sumpttrk500,m_lumi_weight); if((h2 = hist2(Form("%sJet_phi_vs_eta",lvl.c_str())))) h2->Fill(eta,phi,m_lumi_weight); if((h2 = hist2(Form("%sJet_E_vs_eta",lvl.c_str())))) h2->Fill(eta,e,m_lumi_weight); if((h2 = hist2(Form("%sJet_E_vs_phi",lvl.c_str())))) h2->Fill(phi,e,m_lumi_weight); @@ -1638,7 +1681,14 @@ StatusCode HLTJetMonTool::fillBasicHists() { hecfrac = thisjet->getAttribute<float>(xAOD::JetAttribute::HECFrac); } - ATH_MSG_DEBUG( lvl << " et = " << et << "\teta = " << eta << "\temfrac = " << emfrac <<"\thecfrac"); + double jvt = -0.1; + double sumpttrk500 = 0; + if (thisjet->isAvailable<float>("Jvt")){ + jvt = thisjet->getAttribute<float>("Jvt"); + sumpttrk500 = thisjet->getAttribute<std::vector<float> >("SumPtTrkPt500")[0]/Gaudi::Units::GeV; + } + + if(msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG( lvl << " et = " << et << "\teta = " << eta << "\temfrac = " << emfrac <<"\thecfrac"); v_thisjet.SetPtEtaPhiE(thisjet->pt()/Gaudi::Units::GeV,eta,phi,e); @@ -1650,6 +1700,8 @@ StatusCode HLTJetMonTool::fillBasicHists() { if((h = hist(Form("%sJet_phi",lvl.c_str())))) h->Fill(phi,m_lumi_weight); if((h = hist(Form("%sJet_emfrac",lvl.c_str())))) h->Fill(emfrac,m_lumi_weight); if((h = hist(Form("%sJet_hecfrac",lvl.c_str())))) h->Fill(hecfrac,m_lumi_weight); + if((h = hist(Form("%sJet_JVT",lvl.c_str())))) h->Fill(jvt,m_lumi_weight); + if((h = hist(Form("%sJet_SumPtTrk500",lvl.c_str())))) h->Fill(sumpttrk500,m_lumi_weight); if((h2 = hist2(Form("%sJet_phi_vs_eta",lvl.c_str())))) h2->Fill(eta,phi,m_lumi_weight); if((h2 = hist2(Form("%sJet_E_vs_eta",lvl.c_str())))) h2->Fill(eta,e,m_lumi_weight); if((h2 = hist2(Form("%sJet_E_vs_phi",lvl.c_str())))) h2->Fill(phi,e,m_lumi_weight); diff --git a/Trigger/TrigSteer/DecisionHandling/DecisionHandling/TrigCompositeUtils.h b/Trigger/TrigSteer/DecisionHandling/DecisionHandling/TrigCompositeUtils.h index f72f8f21b16729e9981b021606b7afc0a7101ac9..1bbd5cdcd5b27a4eefb764e885e34a61c1702660 100644 --- a/Trigger/TrigSteer/DecisionHandling/DecisionHandling/TrigCompositeUtils.h +++ b/Trigger/TrigSteer/DecisionHandling/DecisionHandling/TrigCompositeUtils.h @@ -55,7 +55,6 @@ namespace TrigCompositeUtils { /** * @brief Creates and right away records the DecisionContainer using the provided WriteHandle. **/ - void createAndStore( SG::WriteHandle<DecisionContainer>& handle ); /** @@ -94,6 +93,12 @@ Decision* newDecisionIn( DecisionContainer* dc, const Decision* dOld, const std: **/ void insertDecisionIDs( const Decision* src, Decision* dest ); + /** + * @brief Appends the decision IDs of src to the dest decision object + * @warning Performing merging of IDs and solving the duples (via set) + **/ + void insertDecisionIDs( const DecisionIDContainer& src, Decision* dest ); + /** * @brief Make unique list of decision IDs of dest Decision object * @warning Use vector->set->vector @@ -109,14 +114,17 @@ Decision* newDecisionIn( DecisionContainer* dc, const Decision* dOld, const std: /** * @brief Another variant of the above method to access DecisionIDs stored in - the Decision object, returns const accessor + * the Decision object, returns const accessor + * @warning Operates on the underlying xAOD vector form rather than the DecisionContainer set form **/ - const std::vector<int>& decisionIDs( const Decision* d ); + const std::vector<DecisionID>& decisionIDs( const Decision* d ); /** - * @brief Another variant of the above method to access DecisionIDs stored in the Decision object, returns read/write accessor + * @brief Another variant of the above method to access DecisionIDs stored in + * the Decision object, returns read/write accessor + * @warning Operates on the underlying xAOD vector form rather than the DecisionContainer set form **/ - std::vector<int>& decisionIDs( Decision* d ); + std::vector<DecisionID>& decisionIDs( Decision* d ); /** @@ -135,19 +143,24 @@ Decision* newDecisionIn( DecisionContainer* dc, const Decision* dOld, const std: bool passed( DecisionID id, const DecisionIDContainer& ); /** - * @brief Links to the previous object + * @brief Links to the previous object, location of previous 'seed' decision supplied by hand **/ void linkToPrevious(Decision* d, const std::string& previousCollectionKey, size_t previousIndex); /** - * @brief checks if there is a link to previous object + * @brief Links to the previous object, 'seed' decision provided explicitly. + **/ + void linkToPrevious(Decision* d, const Decision* dOld); + + /** + * @brief checks if there is at least one 'seed' link to previous object **/ bool hasLinkToPrevious(const Decision* d); /** - * @brief returns link to previous decision object + * @brief returns links to previous decision object 'seed' **/ - ElementLinkVector<DecisionContainer> getLinkToPrevious(const Decision*); + const ElementLinkVector<DecisionContainer> getLinkToPrevious(const Decision*); /** * @brief copy all links from src to dest TC objects @@ -180,6 +193,24 @@ Decision* newDecisionIn( DecisionContainer* dc, const Decision* dOld, const std: std::string m_name; }; + /** + * @brief Prerequisite object usable with @see filter allowing to find TC having a link to an object collection of name + **/ + class HasObjectCollection { + public: + /** + * @brief constructor specifying the link name + **/ + HasObjectCollection(const std::string& name): m_name(name) {} + /** + * @brief checks if the arg TC has link collection of name specified at construction + * @warning method for internal consumption within @see find function + **/ + bool operator()(const xAOD::TrigComposite* ) const; + private: + std::string m_name; + }; + /** * @brief collects all TC linked back to the start TC @@ -196,7 +227,7 @@ Decision* newDecisionIn( DecisionContainer* dc, const Decision* dOld, const std: : source{0} {} LinkInfo(const xAOD::TrigComposite *s, const ElementLink<T>& l) : source{s}, link{l} {} - + bool isValid() const { return source && link.isValid(); } /** @@ -204,7 +235,7 @@ Decision* newDecisionIn( DecisionContainer* dc, const Decision* dOld, const std: */ operator StatusCode () { return (isValid() ? StatusCode::SUCCESS : StatusCode::FAILURE); } - + const xAOD::TrigComposite *source; ElementLink<T> link; }; @@ -217,25 +248,7 @@ Decision* newDecisionIn( DecisionContainer* dc, const Decision* dOld, const std: */ template<typename T> LinkInfo<T> - findLink(const xAOD::TrigComposite* start, const std::string& linkName) { - auto source = find(start, HasObject(linkName) ); - // - if ( not source ){ - auto seeds = getLinkToPrevious(start); - // std::cout<<"Looking for seeds: found " <<seeds.size()<<std::endl; - for (auto seed: seeds){ - const xAOD::TrigComposite* dec = *seed;//deference - LinkInfo<T> link= findLink<T>( dec, linkName ); - // return the first found - if (link.isValid()) return link; - } - return LinkInfo<T>(); // invalid link - } - - //std::cout<<"Found source for "<<linkName<<std::endl; - - return LinkInfo<T>( source, source->objectLink<T>( linkName ) ); - } + findLink(const xAOD::TrigComposite* start, const std::string& linkName); /** * Prints the TC including the linked seeds diff --git a/Trigger/TrigSteer/DecisionHandling/DecisionHandling/TrigCompositeUtils.icc b/Trigger/TrigSteer/DecisionHandling/DecisionHandling/TrigCompositeUtils.icc index 4f47a25430580aa651fe7c37ec81ea204ddb3015..198d9a223faeee541fedc427b7ad896877fe4efd 100644 --- a/Trigger/TrigSteer/DecisionHandling/DecisionHandling/TrigCompositeUtils.icc +++ b/Trigger/TrigSteer/DecisionHandling/DecisionHandling/TrigCompositeUtils.icc @@ -36,5 +36,23 @@ namespace TrigCompositeUtils { return handle; } + template<typename T> + LinkInfo<T> + findLink(const xAOD::TrigComposite* start, const std::string& linkName) { + auto source = find(start, HasObject(linkName) ); + // + if ( not source ){ + auto seeds = getLinkToPrevious(start); + for (auto seed: seeds){ + const xAOD::TrigComposite* dec = *seed;//deference + LinkInfo<T> link= findLink<T>( dec, linkName ); + // return the first found + if (link.isValid()) return link; + } + return LinkInfo<T>(); // invalid link + } + + return LinkInfo<T>( source, source->objectLink<T>( linkName ) ); + } } diff --git a/Trigger/TrigSteer/DecisionHandling/share/TrigCompositeUtils_test.ref b/Trigger/TrigSteer/DecisionHandling/share/TrigCompositeUtils_test.ref index 4336ef8e73c8cd36b427b307f184f51fe89d7639..0efaa06a2d0d91f617cc1585a5565f79113cb83c 100644 --- a/Trigger/TrigSteer/DecisionHandling/share/TrigCompositeUtils_test.ref +++ b/Trigger/TrigSteer/DecisionHandling/share/TrigCompositeUtils_test.ref @@ -1,7 +1,7 @@ ApplicationMgr SUCCESS ==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99) - running on karma on Thu Dec 27 22:27:34 2018 + Welcome to ApplicationMgr (GaudiCoreSvc v30r5) + running on pc-tbed-pub-24.cern.ch on Wed Feb 20 14:16:00 2019 ==================================================================================================================================== ApplicationMgr INFO Application Manager Configured successfully EventLoopMgr WARNING Unable to locate service "EventSelector" @@ -9,18 +9,18 @@ EventLoopMgr WARNING No events will be processed from external input. HistogramPersis...WARNING Histograms saving not required. ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr Ready -ClassIDSvc INFO getRegistryEntries: read 10811 CLIDRegistry entries for module ALL +ClassIDSvc INFO getRegistryEntries: read 7561 CLIDRegistry entries for module ALL Context: s: 0 e: 0 Current context: s: 0 e: 0 ClassIDSvc INFO getRegistryEntries: read 372 CLIDRegistry entries for module ALL initialize SG::WriteHandleKey<DecisionContainer> whkT call createAndStore( whkT ) with default context, twice StoreGateSvc_Impl WARNING setupProxy:: error setting up proxy for key arbitrary and clid 1333228823 - Pre-existing valid DataProxy @0x1a48360 found in Store for key arbitrary with clid 1333228823 -StoreGateSvc_Impl WARNING record_impl: Problem setting up the proxy for object @0x1a458a0 - recorded with key arbitrary of type xAOD::TrigCompositeContainer (CLID 1333228823) in DataObject @0x1a42ea0 -VarHandle(Store... ERROR Control/StoreGate/src/VarHandleBase.cxx:733 (FUNC): code 0: recordObject failed - FATAL Control/StoreGate/StoreGate/WriteHandle.icc:887 (FUNC): code 0: this->record(std::move(data)) + Pre-existing valid DataProxy @0xf666d0 found in Store for key arbitrary with clid 1333228823 +StoreGateSvc_Impl WARNING record_impl: Problem setting up the proxy for object @0xf64f10 + recorded with key arbitrary of type xAOD::TrigCompositeContainer (CLID 1333228823) in DataObject @0xf66810 +VarHandle(Store... ERROR /build1/atnight/localbuilds/nightlies/master/athena/Control/StoreGate/src/VarHandleBase.cxx:733 (FUNC): code 0: recordObject failed + FATAL /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-02-11T2351/Athena/22.0.1/InstallArea/x86_64-slc6-gcc8-opt/src/Control/StoreGate/StoreGate/WriteHandle.icc:887 (FUNC): code 0: this->record(std::move(data)) handle name "arbitrary" isPresent 1 isValid 1 handle name "arbitrary" isPresent 1 isValid 0 @@ -44,32 +44,33 @@ Call setObjectLink with a bad ElementLink that has no corresponding collection. xAOD::TrigComposite_v1::setObjectLink ERROR link is not valid New decision d3b with name & context -d3b: TrigComposite_v1 'd3b' link: name, key, index, CLID -self, 1042135810, 3, 1333228823 -testlink, 1042135810, 1, 1333228823 - +d3b: TrigComposite_v1 name:'d3b' + N Lnks:2 + Link Name:self, Key:1042135810, Index:3, CLID:1333228823 + Link Name:testlink, Key:1042135810, Index:1, CLID:1333228823 el2 1042135810 1 -d3: TrigComposite_v1 '' link: name, key, index, CLID -self, 1042135810, 2, 1333228823 -seed, 1042135810, 1, 1333228823 - -d4: TrigComposite_v1 '' link: name, key, index, CLID -self, 1042135810, 4, 1333228823 -seed, 1042135810, 1, 1333228823 - +d3: TrigComposite_v1 name:'' + N Lnks:2 + Link Name:self, Key:1042135810, Index:2, CLID:1333228823 + Link Name:seed__COLL, Key:1042135810, Index:1, CLID:1333228823 + N Decisions: '2 + 95, 99, +d4: TrigComposite_v1 name:'' + N Lnks:2 + Link Name:self, Key:1042135810, Index:4, CLID:1333228823 + Link Name:seed__COLL, Key:1042135810, Index:1, CLID:1333228823 el: key 1042135810 index 1 create d5 set link -d5: TrigComposite_v1 'd5' link: name, key, index, CLID -self, 1042135810, 5, 1333228823 -feature, 1042135810, 1, 1333228823 - +d5: TrigComposite_v1 name:'d5' + N Lnks:2 + Link Name:self, Key:1042135810, Index:5, CLID:1333228823 + Link Name:feature, Key:1042135810, Index:1, CLID:1333228823 create d6 -d6: TrigComposite_v1 'd6' link: name, key, index, CLID -self, 1042135810, 6, 1333228823 -feature, 1042135810, 1, 1333228823 -seed, 1042135810, 5, 1333228823 - +d6: TrigComposite_v1 name:'d6' + N Lnks:2 + Link Name:self, Key:1042135810, Index:6, CLID:1333228823 + Link Name:seed__COLL, Key:1042135810, Index:5, CLID:1333228823 get d5 feature link get d6 feature link compare feature links diff --git a/Trigger/TrigSteer/DecisionHandling/src/ComboHypo.cxx b/Trigger/TrigSteer/DecisionHandling/src/ComboHypo.cxx index 02488db94d84359d669f5d1ac3bc075fe5ea2606..a99a873cd1228fab6297cdee6687c8d40cb1488e 100644 --- a/Trigger/TrigSteer/DecisionHandling/src/ComboHypo.cxx +++ b/Trigger/TrigSteer/DecisionHandling/src/ComboHypo.cxx @@ -10,7 +10,7 @@ using namespace TrigCompositeUtils; ComboHypo::ComboHypo(const std::string& name, ISvcLocator* pSvcLocator) - : ::AthReentrantAlgorithm(name, pSvcLocator) +: ::AthReentrantAlgorithm(name, pSvcLocator) {} ComboHypo::~ComboHypo() @@ -34,8 +34,8 @@ StatusCode ComboHypo::initialize() { // find max inputs size auto maxMultEl = std::max_element( m_multiplicitiesReqMap.begin(), m_multiplicitiesReqMap.end(), - []( MultiplicityReqMap::value_type a, MultiplicityReqMap::value_type b ){ - return a.second.size() < b.second.size(); } ); + []( MultiplicityReqMap::value_type a, MultiplicityReqMap::value_type b ){ + return a.second.size() < b.second.size(); } ); const size_t maxMult = maxMultEl->second.size(); @@ -64,7 +64,7 @@ StatusCode ComboHypo::finalize() { StatusCode ComboHypo::copyDecisions( const DecisionIDContainer& passing, const EventContext& context ) const { - + ATH_MSG_DEBUG( "Copying "<<passing.size()<<" positive decisions to outputs"); for ( size_t input_counter = 0; input_counter < m_inputs.size(); ++input_counter ) { @@ -74,51 +74,47 @@ StatusCode ComboHypo::copyDecisions( const DecisionIDContainer& passing, const E auto inputHandle = SG::makeHandle( m_inputs[input_counter], context ); if ( inputHandle.isValid() ) { - const DecisionContainer* inputs = inputHandle.cptr(); - const size_t sz = inputs->size(); - for ( size_t i = 0; i < sz; ++i ) { - const Decision *inputDecision = inputs->at(i); - DecisionIDContainer inputDecisionIDs; - decisionIDs( inputDecision, inputDecisionIDs ); - - // from all poitive decision in the input only the ones that survived counting are passed over - DecisionIDContainer common; - std::set_intersection( inputDecisionIDs.begin(), inputDecisionIDs.end(), passing.begin(), passing.end(), - std::inserter( common, common.end() ) ); - - - Decision* newDec = newDecisionIn( outDecisions ); - linkToPrevious( newDec, inputHandle.key(), i ); - ATH_MSG_DEBUG("New decision has "<< (TrigCompositeUtils::findLink<TrigRoiDescriptorCollection>( newDec, "initialRoI")).isValid() - <<" valid initialRoI and "<< TrigCompositeUtils::getLinkToPrevious(newDec).size() <<" previous decisions"); - - for ( auto id: common ) { - addDecisionID( id, newDec ); - } - - // add View? - if ( inputDecision->hasObjectLink( "view" ) ) { - auto viewEL = inputDecision->objectLink< ViewContainer >( "view" ); - CHECK( viewEL.isValid() ); - newDec->setObjectLink( "view", viewEL ); - } + for (const Decision* inputDecision: *inputHandle) { + + DecisionIDContainer inputDecisionIDs; + decisionIDs( inputDecision, inputDecisionIDs ); + + // from all poitive decision in the input only the ones that survived counting are passed over + DecisionIDContainer common; + std::set_intersection( inputDecisionIDs.begin(), inputDecisionIDs.end(), passing.begin(), passing.end(), + std::inserter( common, common.end() ) ); + + Decision* newDec = newDecisionIn( outDecisions ); + linkToPrevious( newDec, inputDecision ); + ATH_MSG_DEBUG("New decision has "<< (TrigCompositeUtils::findLink<TrigRoiDescriptorCollection>( newDec, "initialRoI")).isValid() + << " valid initialRoI and "<< TrigCompositeUtils::getLinkToPrevious(newDec).size() <<" previous decisions"); + + insertDecisionIDs( common, newDec ); + + // add View? + if ( inputDecision->hasObjectLink( "view" ) ) { + auto viewEL = inputDecision->objectLink< ViewContainer >( "view" ); + CHECK( viewEL.isValid() ); + newDec->setObjectLink( "view", viewEL ); + } } } // debug printout: - if ( msgLvl(MSG::DEBUG)) { + if ( msgLvl(MSG::DEBUG) ) { ATH_MSG_DEBUG(outputHandle.key() <<" with "<< outputHandle->size() <<" decisions:"); for (auto outdecision: *outputHandle){ - TrigCompositeUtils::DecisionIDContainer objDecisions; - TrigCompositeUtils::decisionIDs( outdecision, objDecisions ); - ATH_MSG_DEBUG("Number of positive decisions for this output: " << objDecisions.size() ); - for ( TrigCompositeUtils::DecisionID id : objDecisions ) { - ATH_MSG_DEBUG( " --- decision " << HLT::Identifier( id ) ); - } + TrigCompositeUtils::DecisionIDContainer objDecisions; + TrigCompositeUtils::decisionIDs( outdecision, objDecisions ); + ATH_MSG_DEBUG("Number of positive decisions for this output: " << objDecisions.size() ); + for ( TrigCompositeUtils::DecisionID id : objDecisions ) { + ATH_MSG_DEBUG( " --- decision " << HLT::Identifier( id ) ); + } } } } + return StatusCode::SUCCESS; } @@ -129,11 +125,11 @@ void ComboHypo::fillDecisionsMap( std::vector< MultiplicityMap >& dmap, const E ATH_MSG_DEBUG( "Found implicit RH from " << inputHandle.key() <<" with "<< inputHandle->size() << " elements:" ); MultiplicityMap thisInputDmap; for ( const Decision* decision : *inputHandle.cptr() ) { - ATH_MSG_DEBUG( "Decision with "<< decisionIDs( decision ).size() << " chains passed:" ); - for ( DecisionID id: decisionIDs( decision ) ) { - ATH_MSG_DEBUG( " +++ " << HLT::Identifier( id ) ); - thisInputDmap[id] ++; - } + ATH_MSG_DEBUG( "Decision with "<< decisionIDs( decision ).size() << " chains passed:" ); + for ( DecisionID id: decisionIDs( decision ) ) { + ATH_MSG_DEBUG( " +++ " << HLT::Identifier( id ) ); + thisInputDmap[id] ++; + } } dmap[i]= thisInputDmap; } @@ -143,7 +139,6 @@ void ComboHypo::fillDecisionsMap( std::vector< MultiplicityMap >& dmap, const E } } - //debug ATH_MSG_DEBUG( "Decision map filled :" ); int i=0; @@ -158,7 +153,7 @@ void ComboHypo::fillDecisionsMap( std::vector< MultiplicityMap >& dmap, const E StatusCode ComboHypo::execute(const EventContext& context ) const { ATH_MSG_DEBUG( "Executing " << name() << "..." ); - + DecisionIDContainer passing; // this map is filled with the count of positive decisions from each input @@ -175,8 +170,8 @@ StatusCode ComboHypo::execute(const EventContext& context ) const { const int observedMultiplicity = dmap[ inputContainerIndex ][ requiredDecisionID ]; ATH_MSG_DEBUG( "Required multiplicity " << requiredMultiplicity << " for chain " << m.first<< ": observed multiplicity " << observedMultiplicity << " in container " << inputContainerIndex ); if ( observedMultiplicity < requiredMultiplicity ) { - overallDecision = false; - break; + overallDecision = false; + break; } } ATH_MSG_DEBUG( "Chain " << m.first << ( overallDecision ? " is accepted" : " is rejected") ); @@ -186,7 +181,6 @@ StatusCode ComboHypo::execute(const EventContext& context ) const { } ATH_CHECK( copyDecisions( passing, context ) ); - return StatusCode::SUCCESS; } diff --git a/Trigger/TrigSteer/DecisionHandling/src/InputMakerBase.cxx b/Trigger/TrigSteer/DecisionHandling/src/InputMakerBase.cxx index 9b121848d24b869fdaa2590d3790890f12822916..ae9f403eb8cf864fc9e352e4a2e7c6edc3a34be1 100644 --- a/Trigger/TrigSteer/DecisionHandling/src/InputMakerBase.cxx +++ b/Trigger/TrigSteer/DecisionHandling/src/InputMakerBase.cxx @@ -10,7 +10,7 @@ using namespace TrigCompositeUtils; InputMakerBase::InputMakerBase( const std::string& name, ISvcLocator* pSvcLocator ) - : ::AthReentrantAlgorithm( name, pSvcLocator ) {} +: ::AthReentrantAlgorithm( name, pSvcLocator ) {} InputMakerBase::~InputMakerBase() {} @@ -41,6 +41,7 @@ StatusCode InputMakerBase::sysInitialize() { // For each input Decision in the input container, create an output Decision in the corresponding output container and link them. +// If the input is invalid or empty, the output is not created, resulting as invalid StatusCode InputMakerBase::decisionInputToOutput(const EventContext& context, std::vector< SG::WriteHandle<TrigCompositeUtils::DecisionContainer> > & outputHandles) const{ if (!m_mergeOutputs) ATH_MSG_DEBUG("Creating one output per input"); @@ -51,6 +52,7 @@ StatusCode InputMakerBase::decisionInputToOutput(const EventContext& context, st size_t outputIndex = 0; for ( auto inputKey: decisionInputs() ) { auto inputHandle = SG::makeHandle( inputKey, context ); + if( not inputHandle.isValid() ) { ATH_MSG_DEBUG( "Got no decisions from input "<< inputKey.key() << " because handle not valid"); outputIndex++; @@ -63,53 +65,66 @@ StatusCode InputMakerBase::decisionInputToOutput(const EventContext& context, st } ATH_MSG_DEBUG( "Running on input "<< inputKey.key()<<" with " << inputHandle->size() << " elements" ); - // create the output container + // We have an input container with >= 1 Decision objects. Create an output container with the same index. TrigCompositeUtils::createAndStore(outputHandles[outputIndex]); + + auto outDecisions = outputHandles[outputIndex].ptr(); - //map all RoIs that are stored in this input container - std::vector <ElementLink<TrigRoiDescriptorCollection> > RoIsFromDecision; - + // If using m_mergeOutputs, then collate all RoIs that are stored in this input container + ElementLinkVector<TrigRoiDescriptorCollection> RoIsFromDecision; + // loop over decisions retrieved from this input size_t input_counter =0; size_t output_counter =0; - - for ( auto decision : *inputHandle){ - ATH_MSG_DEBUG( "Input Decision "<<input_counter <<" has " <<TrigCompositeUtils::getLinkToPrevious(decision).size()<<" previous links"); - TrigCompositeUtils::Decision* newDec; - bool addDecision=false; - int roi_counter=0; + for (const TrigCompositeUtils::Decision* inputDecision : *inputHandle){ + ATH_MSG_DEBUG( "Input Decision "<<input_counter <<" has " <<TrigCompositeUtils::getLinkToPrevious(inputDecision).size()<<" previous links"); + TrigCompositeUtils::Decision* newDec = nullptr; + bool addDecision = false; + ElementLink<TrigRoiDescriptorCollection> roiEL = ElementLink<TrigRoiDescriptorCollection>(); + if (m_mergeOutputs){ - auto roiELInfo = TrigCompositeUtils::findLink<TrigRoiDescriptorCollection>( decision, m_roisLink.value()); - CHECK( roiELInfo.isValid() ); - auto roiEL = roiELInfo.link; - auto roiIt=find(RoIsFromDecision.begin(), RoIsFromDecision.end(), roiEL); - addDecision = (roiIt == RoIsFromDecision.end()); - if (addDecision) { - RoIsFromDecision.push_back(roiEL); // just to keep track of which we have used - const TrigRoiDescriptor* roi = *roiEL; - ATH_MSG_DEBUG( "Found RoI:" <<*roi<<" FS="<<roi->isFullscan()); - roi_counter = roiIt-RoIsFromDecision.begin(); - } - } else - addDecision=true; + // Get RoI from this input decision + const auto roiELInfo = TrigCompositeUtils::findLink<TrigRoiDescriptorCollection>( inputDecision, m_roisLink.value()); + CHECK( roiELInfo.isValid() ); + roiEL = roiELInfo.link; + const auto roiIt = std::find(RoIsFromDecision.begin(), RoIsFromDecision.end(), roiEL); + addDecision = (roiIt == RoIsFromDecision.end()); + // addDecision is positive here if we have *not* before encountered this RoI within this input collection. + if (addDecision) { + RoIsFromDecision.push_back(roiEL); // To keep track of which we have used + ATH_MSG_DEBUG( "Found RoI:" << **roiEL <<" FS="<< (*roiEL)->isFullscan()); + } + } else { // Not merging, keep a 1-to-1 mapping of Decisions in Input & Output containers + addDecision=true; + } if ( addDecision ){ - newDec = TrigCompositeUtils::newDecisionIn( outDecisions ); - output_counter++; + // Create a new Decision in the Output container to mirror one in the Input container + newDec = TrigCompositeUtils::newDecisionIn( outDecisions ); + output_counter++; + } else{ + // addDecision can only be false if m_mergeOutputs was true and roiEL was found within RoIsFromDecision + // Re-use a Decision already added to the Output container + const auto roiIt = std::find(RoIsFromDecision.begin(), RoIsFromDecision.end(), roiEL); + if (roiIt == RoIsFromDecision.end()) { + ATH_MSG_ERROR("Logic error in decisionInputToOutput. Cannot find existing RoI."); + return StatusCode::FAILURE; + } + const size_t roiCounter = std::distance( RoIsFromDecision.begin(), roiIt ); + newDec = outDecisions[outputIndex][roiCounter]; } - else{ - newDec = outDecisions[outputIndex][roi_counter]; - } - - TrigCompositeUtils::linkToPrevious( newDec, inputKey.key(), input_counter ); - TrigCompositeUtils::insertDecisionIDs( decision, newDec ); + + TrigCompositeUtils::linkToPrevious( newDec, inputDecision ); // Link inputDecision object as the 'seed' of newDec + TrigCompositeUtils::insertDecisionIDs( inputDecision, newDec ); // Copy decision IDs from inputDecision into newDec ATH_MSG_DEBUG("New decision has "<< (TrigCompositeUtils::findLink<TrigRoiDescriptorCollection>( newDec, m_roisLink.value())).isValid() <<" valid "<<m_roisLink.value() <<" and "<< TrigCompositeUtils::getLinkToPrevious(newDec).size() <<" previous decisions"); - input_counter++; + input_counter++; } // loop over input decisions ATH_MSG_DEBUG( "Filled output key " << decisionOutputs()[ outputIndex ].key() <<" of size "<<outDecisions->size() <<" at index "<< outputIndex); - outputIndex++; + for (auto i : *outDecisions) msg() << i << " "; + msg() << endmsg; + outputIndex++; } // end of first loop over input keys return StatusCode::SUCCESS; @@ -130,15 +145,16 @@ StatusCode InputMakerBase::debugPrintOut(const EventContext& context, const std: } } } + ATH_MSG_DEBUG( "number of implicit ReadHandles for input decisions is " << decisionInputs().size() << ", " << validInput << " are valid/notempty" ); + size_t validOutput=0; - ATH_MSG_DEBUG( "number of implicit ReadHandles for input decisions is " << decisionInputs().size() << ", " << validInput << " are valid" ); for ( auto outHandle: outputHandles ) { if( not outHandle.isValid() ) continue; validOutput++; } - ATH_MSG_DEBUG("Produced " << validOutput << " output decisions containers"); + ATH_MSG_DEBUG("Produced " << validOutput << " valid/notempty output decisions containers"); if(validInput != validOutput) { - ATH_MSG_ERROR("Found " << validInput << " inputs and " << validOutput << " outputs"); + ATH_MSG_ERROR("Found valid/notempty: " << validInput << " inputs and " << validOutput << " outputs"); } for ( auto outHandle: outputHandles ) { @@ -171,4 +187,4 @@ size_t InputMakerBase::countInputHandles( const EventContext& context ) const { - + diff --git a/Trigger/TrigSteer/DecisionHandling/src/InputMakerForRoI.cxx b/Trigger/TrigSteer/DecisionHandling/src/InputMakerForRoI.cxx index 1a382e1ef57085a31f10994aa52a637c5cb7bac5..e396a41734d7d451beda37ea95c45a0bbca81b4f 100644 --- a/Trigger/TrigSteer/DecisionHandling/src/InputMakerForRoI.cxx +++ b/Trigger/TrigSteer/DecisionHandling/src/InputMakerForRoI.cxx @@ -12,10 +12,11 @@ using TrigCompositeUtils::DecisionContainer; using TrigCompositeUtils::Decision; using TrigCompositeUtils::linkToPrevious; using TrigCompositeUtils::getLinkToPrevious; +using TrigCompositeUtils::findLink; InputMakerForRoI:: InputMakerForRoI( const std::string& name, - ISvcLocator* pSvcLocator ) - : InputMakerBase( name, pSvcLocator ) {} + ISvcLocator* pSvcLocator ) +: InputMakerBase( name, pSvcLocator ) {} InputMakerForRoI::~ InputMakerForRoI() {} @@ -38,12 +39,12 @@ StatusCode InputMakerForRoI::execute( const EventContext& context ) const { ATH_MSG_DEBUG( "Executing " << name() << "..." ); // call base class helper method to read input decisions, loop over them create outputs and connect them, returns with outputHandles filled - std::vector< SG::WriteHandle<TrigCompositeUtils::DecisionContainer> > outputHandles; + std::vector< SG::WriteHandle<DecisionContainer> > outputHandles; ATH_CHECK (decisionInputToOutput(context, outputHandles)); // Prepare Outputs std::unique_ptr< TrigRoiDescriptorCollection > oneRoIColl( new TrigRoiDescriptorCollection() ); - + // use also this: ElementLinkVector<xAOD::MuonRoIContainer> getMuonRoILinks = obj->objectCollectionLinks<xAOD::MuonRoIContainer>("ManyMuonRoIs"); std::vector <ElementLink<TrigRoiDescriptorCollection> > RoIsFromDecision; // used to check for duplicate features linked to different inputHandles @@ -54,30 +55,30 @@ StatusCode InputMakerForRoI::execute( const EventContext& context ) const { continue; } if( outputHandle->size() == 0){ // input filtered out - ATH_MSG_ERROR( "Got no decisions from output "<< outputHandle.key()<<": handle is valid but container is empty. Is this expected?"); + ATH_MSG_DEBUG( "Got no decisions from output "<< outputHandle.key()<<": handle is valid but container is empty. Is this expected?"); + // continue; return StatusCode::FAILURE; } ATH_MSG_DEBUG( "Got output "<< outputHandle.key()<<" with " << outputHandle->size() << " elements" ); // loop over output decisions in container of outputHandle, follow link to inputDecision for ( auto outputDecision : *outputHandle){ - ElementLinkVector<DecisionContainer> inputLinks = TrigCompositeUtils::getLinkToPrevious(outputDecision); + ElementLinkVector<DecisionContainer> inputLinks = getLinkToPrevious(outputDecision); for (auto input: inputLinks){ - const Decision* inputDecision = *input; - auto roiELInfo = TrigCompositeUtils::findLink<TrigRoiDescriptorCollection>( inputDecision, m_roisLink.value() ); - auto roiEL = roiELInfo.link; - ATH_CHECK( roiEL.isValid() ); - - // avoid adding the same feature multiple times: check if not in container, if not add it - if ( find(RoIsFromDecision.begin(), RoIsFromDecision.end(), roiEL) - == RoIsFromDecision.end() ){ - RoIsFromDecision.push_back(roiEL); // just to keep track of which we have used - const TrigRoiDescriptor* roi = *roiEL; - ATH_MSG_DEBUG("Found RoI:" <<*roi<<" FS="<<roi->isFullscan()); - //make a new one: - TrigRoiDescriptor* newroi= new TrigRoiDescriptor(*roi); //use copy constructor - oneRoIColl->push_back(newroi); - ATH_MSG_DEBUG("Added RoI:" <<*newroi<<" FS="<<newroi->isFullscan()); - } + const Decision* inputDecision = *input; + auto roiELInfo = findLink<TrigRoiDescriptorCollection>( inputDecision, m_roisLink.value() ); + auto roiEL = roiELInfo.link; + ATH_CHECK( roiEL.isValid() ); + + // avoid adding the same feature multiple times: check if not in container, if not add it + if ( find(RoIsFromDecision.begin(), RoIsFromDecision.end(), roiEL) == RoIsFromDecision.end() ) { + RoIsFromDecision.push_back(roiEL); // just to keep track of which we have used + const TrigRoiDescriptor* roi = *roiEL; + ATH_MSG_DEBUG("Found RoI:" <<*roi<<" FS="<<roi->isFullscan()); + //make a new one: + TrigRoiDescriptor* newroi= new TrigRoiDescriptor(*roi); //use copy constructor + oneRoIColl->push_back(newroi); + ATH_MSG_DEBUG("Added RoI:" <<*newroi<<" FS="<<newroi->isFullscan()); + } } // loop over previous input links } // loop over decisions } // loop over output keys diff --git a/Trigger/TrigSteer/DecisionHandling/src/RoRSeqFilter.cxx b/Trigger/TrigSteer/DecisionHandling/src/RoRSeqFilter.cxx index bd69ce7fb0b22484d7ed2a2952a830a950fa6424..33aa17f46550e97d04f34761a9bbe26ad9b24eda 100644 --- a/Trigger/TrigSteer/DecisionHandling/src/RoRSeqFilter.cxx +++ b/Trigger/TrigSteer/DecisionHandling/src/RoRSeqFilter.cxx @@ -7,6 +7,15 @@ #include "GaudiKernel/Property.h" +using TrigCompositeUtils::DecisionContainer; +using TrigCompositeUtils::Decision; +using TrigCompositeUtils::DecisionIDContainer; +using TrigCompositeUtils::DecisionID; +using TrigCompositeUtils::decisionIDs; +using TrigCompositeUtils::insertDecisionIDs; +using TrigCompositeUtils::createAndStore; +using TrigCompositeUtils::newDecisionIn; + RoRSeqFilter::RoRSeqFilter( const std::string& name, ISvcLocator* pSvcLocator ) : ::AthAlgorithm( name, pSvcLocator ) @@ -87,71 +96,77 @@ StatusCode RoRSeqFilter::execute() { if ( m_mergeInputs ) { ATH_MSG_DEBUG( "Recording " << m_outputKeys[ 0 ].key() ); - TrigCompositeUtils::createAndStore(outputHandles[0]); - TrigCompositeUtils::DecisionContainer* output = outputHandles[0].ptr(); + createAndStore(outputHandles[0]); + DecisionContainer* output = outputHandles[0].ptr(); for ( auto inputKey: m_inputKeys ) { auto inputHandle = SG::makeHandle( inputKey ); if( inputHandle.isValid() ) - passCounter += copyPassing( *inputHandle, inputKey.key(), *output ); + passCounter += copyPassing( *inputHandle, *output ); } outputIndex++; - } else { + } else { // Not merging inputs for ( auto inputKey: m_inputKeys ) { // already made handles, so this code could be simplified to a loop over inputHandles. auto inputHandle = SG::makeHandle( inputKey ); if( not inputHandle.isValid() ) { - ATH_MSG_DEBUG( "InputHandle "<< inputKey.key() <<" not present" ); + ATH_MSG_DEBUG( "InputHandle "<< inputKey.key() <<" not present" ); } else if ( inputHandle->empty() ) { - ATH_MSG_DEBUG( "InputHandle "<< inputKey.key() <<" contains all rejected decisions, skipping" ); + ATH_MSG_DEBUG( "InputHandle "<< inputKey.key() <<" contains all rejected decisions, skipping" ); } else { - ATH_MSG_DEBUG( "Checking inputHandle "<< inputKey.key() <<" with " << inputHandle->size() <<" elements"); - TrigCompositeUtils::createAndStore(outputHandles[outputIndex]); - TrigCompositeUtils::DecisionContainer* output = outputHandles[outputIndex].ptr(); - passCounter += copyPassing( *inputHandle, inputKey.key(), *output ); - ATH_MSG_DEBUG( "Recorded output key " << m_outputKeys[ outputIndex ].key() <<" of size "<<output->size() <<" at index "<< outputIndex); + ATH_MSG_DEBUG( "Checking inputHandle "<< inputKey.key() <<" with " << inputHandle->size() <<" elements"); + createAndStore(outputHandles[outputIndex]); + DecisionContainer* output = outputHandles[outputIndex].ptr(); + passCounter += copyPassing( *inputHandle, *output ); + ATH_MSG_DEBUG( "Recorded output key " << m_outputKeys[ outputIndex ].key() <<" of size "<<output->size() <<" at index "<< outputIndex); } outputIndex++; // Keep the mapping of inputKey<->outputKey correct } + } - ATH_MSG_DEBUG( "Filter " << ( passCounter != 0 ? "passed" : "rejected") <<" creating "<< outputIndex<<" valid outDecisions DH"); + setFilterPassed( passCounter != 0 ); + ATH_MSG_DEBUG( "Filter " << ( filterPassed() ? "passed" : "rejected") <<"; creating "<< outputIndex<<" valid outDecisions DH:"); for (auto output: outputHandles){ if( output.isValid() ) ATH_MSG_DEBUG(" "<<output.key()); } - setFilterPassed( passCounter != 0 ); + + return StatusCode::SUCCESS; } -size_t RoRSeqFilter::copyPassing( const TrigCompositeUtils::DecisionContainer& input, - const std::string& inputKey, - TrigCompositeUtils::DecisionContainer& output ) const { +size_t RoRSeqFilter::copyPassing( const DecisionContainer& input, + DecisionContainer& output ) const { size_t passCounter = 0; ATH_MSG_DEBUG( "Input size " << input.size() ); for (size_t i = 0; i < input.size(); ++i) { - const TrigCompositeUtils::Decision* inputDecision = input.at(i); + const Decision* inputDecision = input.at(i); - TrigCompositeUtils::DecisionIDContainer objDecisions; - TrigCompositeUtils::decisionIDs( inputDecision, objDecisions ); + DecisionIDContainer objDecisions; + decisionIDs( inputDecision, objDecisions ); ATH_MSG_DEBUG("Number of positive decisions for this input: " << objDecisions.size() ); - for ( TrigCompositeUtils::DecisionID id : objDecisions ) { + for ( DecisionID id : objDecisions ) { ATH_MSG_DEBUG( " -- Positive decision " << HLT::Identifier( id ) ); } - std::vector<TrigCompositeUtils::DecisionID> intersection; + DecisionIDContainer intersection; std::set_intersection( m_chains.begin(), m_chains.end(), objDecisions.begin(), objDecisions.end(), - std::back_inserter( intersection ) ); + std::inserter(intersection, intersection.end()) ); if ( not intersection.empty() ) { - TrigCompositeUtils::Decision* decisionCopy = TrigCompositeUtils::newDecisionIn( &output, name() ); - *decisionCopy = *inputDecision; // copies auxdata from one auxstore to the other - // future improvement: could use newDecisionIn(&output,input,name which internally does the linkToPrevious, then no longer need to pass the key - TrigCompositeUtils::linkToPrevious(decisionCopy, inputKey, i); // Update seed + // This sets up the 'self' link & the 'seed' link (seeds from inputDecision) + Decision* decisionCopy = newDecisionIn( &output, inputDecision, name() ); + + // Copy accross only the DecisionIDs which have passed through this Filter for this Decision object. + // WARNING: Still need to 100% confirm if the correct set to propagate forward is objDecisions or intersection. + // Tim M changing this from objDecisions (all IDs) -> intersection (only passed IDs) Feb 19 + insertDecisionIDs(intersection, decisionCopy); + passCounter ++; ATH_MSG_DEBUG("Input satisfied at least one active chain"); } else { diff --git a/Trigger/TrigSteer/DecisionHandling/src/RoRSeqFilter.h b/Trigger/TrigSteer/DecisionHandling/src/RoRSeqFilter.h index ee6a6dd2f9fbf02a472f854ee4c31b9c938eee8f..6e572e48d7fc85a9a70ca09f87976dc0c11f973f 100644 --- a/Trigger/TrigSteer/DecisionHandling/src/RoRSeqFilter.h +++ b/Trigger/TrigSteer/DecisionHandling/src/RoRSeqFilter.h @@ -79,17 +79,15 @@ class RoRSeqFilter /** * @brief Applies generic filter to input container, keeping only the decision objects with at least * one affirmative decision from the previous Stage. Considering only decisions from chains utilising this filter. - * @param input Reference to input container of decision objects. * @param inputKey Storegate key of input, needed to link newly created decision objects to their parents. * @param output Writeable output container to store copies of decision objects which pass the filter. * @return The number of decision objects which passed the filter. * - * Produced a deep-copy of all Decision objects in the input container which possess a positive decision from + * Produced a selective copy of all Decision objects in the input container which possess a positive decision from * at least one of the chains which this filter algorithm is configured for. This new object is linked to its * parent and stored in the output collection. It will form the starting point for the next Step. **/ size_t copyPassing( const TrigCompositeUtils::DecisionContainer& input, - const std::string& inputKey, TrigCompositeUtils::DecisionContainer& output) const; }; diff --git a/Trigger/TrigSteer/DecisionHandling/src/TrigCompositeUtils.cxx b/Trigger/TrigSteer/DecisionHandling/src/TrigCompositeUtils.cxx index 581958e813a97f4db2c9337ecf1aaa93d00b65d3..8a8e92a003e73c29d862c742b47937dc4ac9ae57 100644 --- a/Trigger/TrigSteer/DecisionHandling/src/TrigCompositeUtils.cxx +++ b/Trigger/TrigSteer/DecisionHandling/src/TrigCompositeUtils.cxx @@ -10,10 +10,8 @@ #include "StoreGate/WriteHandle.h" #include "DecisionHandling/TrigCompositeUtils.h" - - -static const SG::AuxElement::Accessor< std::vector< int > > readWriteAccessor( "decisions" ); -static const SG::AuxElement::ConstAccessor< std::vector<int> > readOnlyAccessor( "decisions" ); +static const SG::AuxElement::Accessor< std::vector<TrigCompositeUtils::DecisionID> > readWriteAccessor("decisions"); +static const SG::AuxElement::ConstAccessor< std::vector<TrigCompositeUtils::DecisionID> > readOnlyAccessor("decisions"); namespace TrigCompositeUtils { @@ -36,7 +34,6 @@ namespace TrigCompositeUtils { Decision* newDecisionIn ( DecisionContainer* dc, const std::string& name, const EventContext& ctx ) { Decision * x = new Decision; dc->push_back( x ); - readWriteAccessor( *x ).size(); // fake operation just to make the decisions decoration size_t index = dc->size() - 1; // make self link, useful to copy for seed link in a successor, but requires that DecisionContainer is already recorded in SG. ElementLink<DecisionContainer> el(*dc, index, ctx); @@ -51,68 +48,63 @@ namespace TrigCompositeUtils { } Decision* newDecisionIn ( DecisionContainer* dc, const Decision* dOld, const std::string& name, const EventContext& ctx ) { - Decision* dNew = newDecisionIn( dc, name, ctx); - if ( dOld->hasObjectLink("roi" ) ){ - dNew->copyLinkFrom(dOld,"roi"); - } - else if ( dOld->hasObjectLink("initialRoI") ){ - dNew->copyLinkFrom(dOld,"initialRoI","roi"); - } - if ( dOld->hasObjectLink("view" ) ){ - dNew->copyLinkFrom(dOld,"view"); - } - if ( dOld->hasObjectLink("feature" ) ){ - dNew->copyLinkFrom(dOld,"feature"); - } - if ( dOld->hasObjectLink("self" ) ){ - dNew->copyLinkFrom(dOld,"self","seed"); // make use of self-link - } - return dNew; + Decision* dNew = newDecisionIn( dc, name, ctx); // Sets up 'self' link of dNew + linkToPrevious(dNew, dOld); // Sets up link to 'seed' collection, points to 'self' link of dOld + return dNew; } void addDecisionID( DecisionID id, Decision* d ) { - std::vector<int>& decisions = readWriteAccessor( *d ); - if ( decisions.size() == 0 or decisions.back() != static_cast<int>(id) ) + std::vector<DecisionID>& decisions = readWriteAccessor( *d ); + if ( decisions.size() == 0 or decisions.back() != id) decisions.push_back( id ); } void decisionIDs( const Decision* d, DecisionIDContainer& destination ) { - const std::vector<int>& decisions = readOnlyAccessor( *d ); + const std::vector<DecisionID>& decisions = readOnlyAccessor( *d ); destination.insert( decisions.begin(), decisions.end() ); } - const std::vector<int>& decisionIDs( const Decision* d ) { + const std::vector<DecisionID>& decisionIDs( const Decision* d ) { return readOnlyAccessor( *d ); } - std::vector<int>& decisionIDs( Decision* d ) { + std::vector<DecisionID>& decisionIDs( Decision* d ) { return readWriteAccessor( *d ); } - void insertDecisionIDs( const Decision* src, Decision* dest ){ - DecisionIDContainer ids; - decisionIDs( src, ids ); - decisionIDs( dest, ids ); - decisionIDs( dest ).clear(); - decisionIDs( dest ).insert( decisionIDs(dest).end(), ids.begin(), ids.end() ); + void insertDecisionIDs(const Decision* src, Decision* dest ){ + DecisionIDContainer srcIds; + decisionIDs( src, srcIds ); // Now stored in a set + insertDecisionIDs( srcIds, dest); + } + + void insertDecisionIDs( const DecisionIDContainer& src, Decision* dest ) { + DecisionIDContainer collateIDs; + // Decision are xAOD objects backed by a std::vector + // Here we use a std::set to de-duplicate IDs from src and dest before setting dest + decisionIDs( dest, collateIDs ); // Set operation 1. Get from dest + collateIDs.insert( src.begin(), src.end() ); // Set operation 2. Get from src + decisionIDs( dest ).clear(); // Clear target + // Copy from set to (ordered) vector + decisionIDs( dest ).insert( decisionIDs(dest).end(), src.begin(), src.end() ); } - void uniqueDecisionIDs( Decision* dest){ - DecisionIDContainer ids; - decisionIDs( dest, ids ); - decisionIDs( dest ).clear(); - decisionIDs( dest ).insert( decisionIDs(dest).end(), ids.begin(), ids.end() ); + void uniqueDecisionIDs(Decision* dest) { + // Re-use above insertDecisionIDs method. + // This implicitly performs de-duplication + return insertDecisionIDs(dest, dest); } bool allFailed( const Decision* d ) { - const std::vector<int>& decisions = readOnlyAccessor( *d ); + const std::vector<DecisionID>& decisions = readOnlyAccessor( *d ); return decisions.empty(); } bool isAnyIDPassing( const Decision* d, const DecisionIDContainer& required ) { - for ( auto id : readOnlyAccessor( *d ) ) { - if ( required.count( id ) > 0 ) - return true; + for ( DecisionID id : readOnlyAccessor( *d ) ) { + if ( required.count( id ) > 0 ) { + return true; + } } return false; } @@ -122,29 +114,29 @@ namespace TrigCompositeUtils { } void linkToPrevious( Decision* d, const std::string& previousCollectionKey, size_t previousIndex ) { - ElementLinkVector<DecisionContainer> seeds; - ElementLink<DecisionContainer> new_seed= ElementLink<DecisionContainer>( previousCollectionKey, previousIndex ); - // do we need this link to self link? - if ( (*new_seed)->hasObjectLink("self" ) ) - seeds.push_back( (*new_seed)->objectLink<DecisionContainer>("self")); // make use of self-link - else - seeds.push_back(ElementLink<DecisionContainer>( previousCollectionKey, previousIndex )); - - if (hasLinkToPrevious(d) ){ - ElementLinkVector<DecisionContainer> oldseeds = d->objectCollectionLinks<DecisionContainer>( "seed" ); - seeds.reserve( seeds.size() + oldseeds.size() ); - std::move( oldseeds.begin(), oldseeds.end(), std::back_inserter( seeds ) ); + ElementLink<DecisionContainer> seed = ElementLink<DecisionContainer>( previousCollectionKey, previousIndex ); + if (!seed.isValid()) { + throw GaudiException("Invalid Decision Link key or index provided", "TrigCompositeUtils::linkToPrevious", StatusCode::FAILURE); + } else { + d->addObjectCollectionLink("seed", seed); } + } - d->addObjectCollectionLinks("seed", seeds); - + void linkToPrevious( Decision* d, const Decision* dOld) { + if ( dOld && dOld->hasObjectLink("self") ) { + // Internally de-dupes the "seed" collection of links + d->addObjectCollectionLink("seed", dOld->objectLink<DecisionContainer>("self")); + } else { + throw GaudiException("Using linkToPrevious with a previous decision requires that decision to have its 'self' link set", + "TrigCompositeUtils::linkToPrevious", StatusCode::FAILURE); + } } bool hasLinkToPrevious( const Decision* d ) { - return d->hasObjectLink( "seed" ); + return d->hasObjectCollectionLinks( "seed" ); } - ElementLinkVector <DecisionContainer> getLinkToPrevious( const Decision* d ) { + const ElementLinkVector<DecisionContainer> getLinkToPrevious( const Decision* d ) { return d->objectCollectionLinks<DecisionContainer>( "seed" ); } @@ -155,23 +147,35 @@ namespace TrigCompositeUtils { - const xAOD::TrigComposite* find( const xAOD::TrigComposite* start, const std::function<bool( const xAOD::TrigComposite* )>& filter ) { + const Decision* find( const Decision* start, const std::function<bool( const Decision* )>& filter ) { if ( filter( start ) ) return start; - if ( start->hasObjectLink( "seed" ) ) { - return find( start->object<xAOD::TrigComposite>( "seed" ), filter ); + if ( hasLinkToPrevious(start) ) { + const ElementLinkVector<DecisionContainer> seeds = getLinkToPrevious(start); + for (const ElementLink<DecisionContainer>& seedEL : seeds) { + const Decision* result = find( *seedEL, filter ); + if (result) return result; + } } - else return nullptr; + + return nullptr; } - bool HasObject::operator()( const xAOD::TrigComposite* composite ) const { + bool HasObject::operator()( const Decision* composite ) const { return composite->hasObjectLink( m_name ); } - bool recursiveGetObjectLinks( const xAOD::TrigComposite* start, ElementLinkVector<xAOD::TrigCompositeContainer>& linkVector ){ + bool HasObjectCollection::operator()( const Decision* composite ) const { + return composite->hasObjectCollectionLinks( m_name ); + } + + bool recursiveGetObjectLinks( const Decision* start, ElementLinkVector<DecisionContainer>& linkVector ){ //recursively find in the seeds - if ( start->hasObjectLink( "seed" ) ) { - return recursiveGetObjectLinks( start->object<xAOD::TrigComposite>( "seed" ), linkVector ); + if ( hasLinkToPrevious(start) ) { + const ElementLinkVector<DecisionContainer> seeds = getLinkToPrevious(start); + for (const ElementLink<DecisionContainer>& seedEL : seeds) { + recursiveGetObjectLinks( *seedEL, linkVector ); + } } int isComposite=0; @@ -183,7 +187,7 @@ namespace TrigCompositeUtils { // ElementLink<xAOD::TrigComposite> test; // test = start->objectLink( "childProxies" ); - ElementLinkVector<xAOD::TrigCompositeContainer> links = start->objectCollectionLinks<xAOD::TrigCompositeContainer>( "childProxies" ); + ElementLinkVector<DecisionContainer> links = start->objectCollectionLinks<DecisionContainer>( "childProxies" ); linkVector.reserve( linkVector.size() + links.size() ); std::move( links.begin(), links.end(), std::back_inserter( linkVector ) ); @@ -191,13 +195,13 @@ namespace TrigCompositeUtils { return true; } - std::string dump( const xAOD::TrigComposite* tc, std::function< std::string( const xAOD::TrigComposite* )> printerFnc ) { + std::string dump( const Decision* tc, std::function< std::string( const Decision* )> printerFnc ) { std::string ret; ret += printerFnc( tc ); - if ( tc->hasObjectLink("seed") ) { - const xAOD::TrigComposite* seedTc = tc->object<xAOD::TrigComposite>( "seed" ); - if ( seedTc ) { - ret += " -> " + dump( seedTc, printerFnc ); + if ( hasLinkToPrevious(tc) ) { + const ElementLinkVector<DecisionContainer> seeds = getLinkToPrevious(tc); + for (const ElementLink<DecisionContainer>& seedEL : seeds) { + ret += " -> " + dump( *seedEL, printerFnc ); } } return ret; diff --git a/Trigger/TrigSteer/DecisionHandling/test/TrigCompositeUtils_test.cxx b/Trigger/TrigSteer/DecisionHandling/test/TrigCompositeUtils_test.cxx index 48940d6b33693bfa6b19b953d486a2fb675cc546..b2ef8139eb0987f54752253cd08413db790aec9d 100644 --- a/Trigger/TrigSteer/DecisionHandling/test/TrigCompositeUtils_test.cxx +++ b/Trigger/TrigSteer/DecisionHandling/test/TrigCompositeUtils_test.cxx @@ -13,12 +13,12 @@ #include "TestTools/expect.h" #include "DecisionHandling/TrigCompositeUtils.h" #include "xAODTrigger/TrigCompositeAuxContainer.h" +#include "CxxUtils/checker_macros.h" -bool xAOD::TrigComposite::s_throwOnCopyError = true; - -int main() { +int main ATLAS_NOT_THREAD_SAFE () { using namespace TrigCompositeUtils; + xAOD::TrigComposite::s_throwOnCopyError = true; errorcheck::ReportMessage::hideFunctionNames (true); @@ -131,10 +131,10 @@ int main() { addDecisionID( 95, d3 ); addDecisionID( 99, d3 ); addDecisionID( 99, d3 ); - auto storedDecisions = d3->getDetail<std::vector<int>>( "decisions" ); + auto storedDecisions = d3->getDetail<std::vector<DecisionID>>( "decisions" ); VALUE ( storedDecisions.size() ) EXPECTED ( 2 ); - VALUE ( ( int )storedDecisions.front() ) EXPECTED ( 95 ); - VALUE ( ( int )storedDecisions.back() ) EXPECTED ( 99 ); + VALUE ( ( DecisionID )storedDecisions.front() ) EXPECTED ( 95 ); + VALUE ( ( DecisionID )storedDecisions.back() ) EXPECTED ( 99 ); // Make an EL with an invalid (zero) hash key and try to add it to a Decision auto data1 = std::make_unique<DecisionContainer>() ; @@ -152,10 +152,12 @@ int main() { VALUE ( d3->setObjectLink( "bad", badEL2 ) ) EXPECTED ( false ); // this fails, and cerr output also expected - // Make, store and retrieve a "seed" link + // Make, store and retrieve a "seed" link within a collection ElementLink<DecisionContainer> el( *dc, 1 ); - assert( d3->setObjectLink( "seed", el ) ); - ElementLink<DecisionContainer > resEl = d3->objectLink<DecisionContainer>("seed"); + assert( d3->addObjectCollectionLink( "seed", el ) ); + ElementLinkVector<DecisionContainer > resElVector = d3->objectCollectionLinks<DecisionContainer>("seed"); + assert( resElVector.size() == 1 ); + ElementLink<DecisionContainer> resEl = resElVector.front(); VALUE( resEl.index() ) EXPECTED ( el.index() ); VALUE( resEl.key() ) EXPECTED ( el.key() ); @@ -163,14 +165,16 @@ int main() { std::cout << std::endl; std::cout << "New decision d3b with name & context " << std::endl; auto d3b = newDecisionIn( dc, "d3b", ctx ); - // Make, store and retrieve a "seed" link, with context + // Make, store and retrieve a "testLink" link, with context ElementLink<DecisionContainer> el2( *dc, 1, ctx ); assert ( d3b->setObjectLink( "testlink", el2 ) ); std::cout << "d3b: " << *d3b << std::endl; std::cout << "el2 " << el2.key() << " " << el2.index() << std::endl; ElementLink<DecisionContainer > resEl2 = d3b->objectLink<DecisionContainer>("testlink"); + const Decision* res2 = d3b->object<Decision>("testlink"); VALUE( resEl2.index() ) EXPECTED ( el2.index() ); VALUE( resEl2.key() ) EXPECTED ( el2.key() ); + VALUE( *resEl2.cptr() ) EXPECTED ( res2 ); // check copyLinks (copies all) auto d4 = newDecisionIn( dc ); @@ -178,7 +182,8 @@ int main() { std::cout << "d3: " << *d3 << std::endl; std::cout << "d4: " << *d4 << std::endl; std::cout << "el: key " << el.key() << " index " << el.index() << std::endl; - ElementLink<DecisionContainer > resElCopied = d4->objectLink<DecisionContainer>("seed"); + ElementLinkVector<DecisionContainer > resElCopiedVector = d4->objectCollectionLinks<DecisionContainer>("seed"); + ElementLink<DecisionContainer> resElCopied = resElCopiedVector.front(); VALUE ( resElCopied.index() ) EXPECTED ( el.index() ); VALUE ( resElCopied.key() ) EXPECTED ( el.key() ); @@ -194,15 +199,19 @@ int main() { std::cout << "get d5 feature link " << std::endl; ElementLink<DecisionContainer > d5feature = d5->objectLink<DecisionContainer>("feature"); std::cout << "get d6 feature link " << std::endl; - ElementLink<DecisionContainer > d6feature = d6->objectLink<DecisionContainer>("feature"); + // We have to get this recursivly + LinkInfo<DecisionContainer> linkInfo = findLink<DecisionContainer>(d6, "feature"); + VALUE ( linkInfo.isValid() ) EXPECTED ( true ); + ElementLink<DecisionContainer > d6feature = linkInfo.link; std::cout << "compare feature links " << std::endl; VALUE ( d5feature.index() ) EXPECTED ( d6feature.index() ); VALUE ( d5feature.key() ) EXPECTED ( d6feature.key() ); std::cout << "get self and seed links " << std::endl; auto d5self = d5->objectLink<DecisionContainer>("self"); - auto d6seed = d6->objectLink<DecisionContainer>("seed"); - VALUE ( d5self.index() ) EXPECTED ( d6seed.index() ); - VALUE ( d5self.key() ) EXPECTED ( d6seed.key() ); + auto d6seedVector = getLinkToPrevious(d6); + auto d6seed = d6seedVector.front(); + VALUE ( d5self.index() ) EXPECTED ( d6seed.index() ); + VALUE ( d5self.key() ) EXPECTED ( d6seed.key() ); return 0; diff --git a/Trigger/TrigSteer/TrigOutputHandling/CMakeLists.txt b/Trigger/TrigSteer/TrigOutputHandling/CMakeLists.txt index 739f95147a9c24e71ac86d198eeac8060d78cb7f..3f575d8bf995ee417d43aa94d2d2837d9fdbf865 100644 --- a/Trigger/TrigSteer/TrigOutputHandling/CMakeLists.txt +++ b/Trigger/TrigSteer/TrigOutputHandling/CMakeLists.txt @@ -25,6 +25,8 @@ atlas_depends_on_subdirs( PUBLIC Control/AthenaMonitoring Trigger/TrigMonitoring/TrigCostMonitorMT Trigger/TrigAlgorithms/TrigPartialEventBuilding + Trigger/TrigDataAccess/TrigSerializeTP + Control/AthContainersRoot/AthContainersRoot ) find_package( tdaq-common COMPONENTS eformat ) find_package( Boost ) @@ -35,7 +37,7 @@ atlas_add_library( TrigOutputHandlingLib PUBLIC_HEADERS TrigOutputHandling INCLUDE_DIRS ${TDAQ-COMMON_INCLUDE_DIRS} LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} GaudiKernel AthViews AthenaBaseComps TrigSteeringEvent TrigSerializeResultLib - xAODTrigCalo xAODTrigEgamma xAODTrigger xAODTracking xAODTrigMuon xAODMuon DecisionHandlingLib AthenaMonitoringLib TrigPartialEventBuildingLib ) + xAODTrigCalo xAODTrigEgamma xAODTrigger xAODTracking xAODTrigMuon xAODMuon DecisionHandlingLib AthenaMonitoringLib TrigPartialEventBuildingLib TrigSerializeTPLib AthContainersRoot ) atlas_add_component( TrigOutputHandling src/components/*.cxx @@ -54,3 +56,14 @@ atlas_add_test( void_record_test POST_EXEC_SCRIPT nopost.sh PROPERTIES TIMEOUT 300 ) + + +atlas_add_test( serial_deserial_test + SOURCES test/serial_deserial_test.cxx + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${TDAQ-COMMON_INCLUDE_DIRS} + LINK_LIBRARIES ${Boost_LIBRARIES} ${TDAQ-COMMON_LIBRARIES} xAODTrigEgamma + AthLinks AthenaKernel StoreGateLib GaudiKernel TestTools xAODCore TrigOutputHandlingLib + ENVIRONMENT "JOBOPTSEARCHPATH=${CMAKE_CURRENT_SOURCE_DIR}/share" + POST_EXEC_SCRIPT nopost.sh + PROPERTIES TIMEOUT 300 + ) diff --git a/Trigger/TrigSteer/TrigOutputHandling/TrigOutputHandling/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigSteer/TrigOutputHandling/TrigOutputHandling/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..5f55356b178bcdf6cdc819417756232cc6ca814d --- /dev/null +++ b/Trigger/TrigSteer/TrigOutputHandling/TrigOutputHandling/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Trigger/TrigSteer/TrigOutputHandling diff --git a/Trigger/TrigSteer/TrigOutputHandling/TrigOutputHandling/HLTResultMTMaker.h b/Trigger/TrigSteer/TrigOutputHandling/TrigOutputHandling/HLTResultMTMaker.h index 8aba37ac695d9804eadd2c4c05dd89a4414a4398..5253b40d6c92fdbd76c42ee08fb78b944d92f0f8 100644 --- a/Trigger/TrigSteer/TrigOutputHandling/TrigOutputHandling/HLTResultMTMaker.h +++ b/Trigger/TrigSteer/TrigOutputHandling/TrigOutputHandling/HLTResultMTMaker.h @@ -1,17 +1,22 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef TRIGOUTPUTHANDLING_HLTRESULTMTMAKER_H #define TRIGOUTPUTHANDLING_HLTRESULTMTMAKER_H +// Trigger includes #include "TrigSteeringEvent/HLTResultMT.h" #include "TrigOutputHandling/HLTResultMTMakerTool.h" +// Athena includes #include "AthenaBaseComps/AthAlgTool.h" #include "AthenaMonitoring/GenericMonitoringTool.h" #include "StoreGate/WriteHandle.h" +// Forward declarations +class IJobOptionsSvc; + /** @class HLTResultMTMaker * @brief Tool to create the HLTResultMT at the end of each event **/ @@ -22,26 +27,57 @@ public: /// Standard destructor virtual ~HLTResultMTMaker(); - // ------------------------- IStateful methods ----------------------------- + // ------------------------- IStateful methods ------------------------------- virtual StatusCode initialize() override; virtual StatusCode finalize() override; - // ------------------------- Specific methods of this tool ----------------- + // ------------------------- Specific methods of this tool ------------------- /// Builds the HLTResultMT and records it in the event store StatusCode makeResult(const EventContext& eventContext) const; /// Return name of the HLTResultMT const std::string& resultName() const {return m_hltResultWHKey.key();} private: + // ------------------------- Methods ----------------------------------------- + /// Check ROB and SubDet lists in StreamTags and remove those which are disabled + void validatePEBInfo(HLT::HLTResultMT& hltResult) const; + + // ------------------------- Properties -------------------------------------- /// StoreGate key for the HLTResultMT - SG::WriteHandleKey<HLT::HLTResultMT> m_hltResultWHKey {this, "HLTResultWHKey", "HLTResultMT", - "Key of the output HLTResultMT object"}; + SG::WriteHandleKey<HLT::HLTResultMT> m_hltResultWHKey { + this, "HLTResultWHKey", "HLTResultMT", + "Key of the output HLTResultMT object" + }; /// Tools filling the HLTResultMT object - ToolHandleArray<HLTResultMTMakerTool> m_makerTools {this, "MakerTools", {}, - "Set of tools that fill content of the HLTResultMT"}; + ToolHandleArray<HLTResultMTMakerTool> m_makerTools { + this, "MakerTools", {}, + "Set of tools that fill content of the HLTResultMT" + }; /// Monitoring tool - ToolHandle<GenericMonitoringTool> m_monTool {this, "MonTool", "", - "Monitoring tool"}; + ToolHandle<GenericMonitoringTool> m_monTool { + this, "MonTool", "", + "Monitoring tool" + }; + /// Extra enabled ROBs + Gaudi::Property<std::vector<uint32_t>> m_extraEnabledROBs { + this, "ExtraEnabledROBs", {}, + "Extra ROBs which can be requested in a stream tag, but are not part of the ROS-ROB map" + }; + /// Extra enabled SubDets + Gaudi::Property<std::vector<uint32_t>> m_extraEnabledSubDets { + this, "ExtraEnabledSubDets", {}, + "Extra SubDets which can be requested in a stream tag, but are not part of the ROS-ROB map" + }; + + // ------------------------- Other private members --------------------------- + /// Handle to JobOptionsSvc used to retrieve the DataFlowConfig property + ServiceHandle<IJobOptionsSvc> m_jobOptionsSvc; + /// List of enabled ROBs retrieved during initialisation + std::set<uint32_t> m_enabledROBs; + /// List of enabled SubDets retrieved during initialisation + std::set<eformat::SubDetector> m_enabledSubDets; + /// If true, don't call validatePEBInfo + bool m_skipValidatePEBInfo {false}; }; #endif // TRIGOUTPUTHANDLING_HLTRESULTMTMAKER_H diff --git a/Trigger/TrigSteer/TrigOutputHandling/python/TrigOutputHandlingConfig.py b/Trigger/TrigSteer/TrigOutputHandling/python/TrigOutputHandlingConfig.py index a2f152d0a9fe8c13d05514a69404839e9b1882ce..0a83eec373e6a8ec5edb797d000cfbccaee51c6e 100644 --- a/Trigger/TrigSteer/TrigOutputHandling/python/TrigOutputHandlingConfig.py +++ b/Trigger/TrigSteer/TrigOutputHandling/python/TrigOutputHandlingConfig.py @@ -5,6 +5,34 @@ def HLTResultMTMakerCfg(): from AthenaMonitoring.GenericMonitoringTool import GenericMonitoringTool, defineHistogram m = HLTResultMTMaker() + + # ROBs/SubDets which are enabled but not necessarily part of the ROS-ROB map + from libpyeformat_helper import SourceIdentifier,SubDetector + subdets = [ + SubDetector.TDAQ_CALO_CLUSTER_PROC_ROI, + SubDetector.TDAQ_CALO_JET_PROC_ROI, + SubDetector.TDAQ_HLT, + SubDetector.TDAQ_FTK, + SubDetector.TDAQ_CALO_TOPO_PROC, + SubDetector.TDAQ_CALO_DIGITAL_PROC, + SubDetector.TDAQ_CALO_FEAT_EXTRACT_ROI, + ] + m.ExtraEnabledSubDets = [] + for subdetId in subdets: + m.ExtraEnabledSubDets.append( int(subdetId) ) + + def addROBs(dest,subdet,modules): + for moduleId in modules: + dest.append(SourceIdentifier(subdet,moduleId).code()) + + m.ExtraEnabledROBs = [] + addROBs(m.ExtraEnabledROBs, SubDetector.TDAQ_CALO_CLUSTER_PROC_ROI, [0xa8, 0xa9, 0xaa, 0xab]) + addROBs(m.ExtraEnabledROBs, SubDetector.TDAQ_CALO_JET_PROC_ROI, [0xac, 0xad]) + addROBs(m.ExtraEnabledROBs, SubDetector.TDAQ_MUON_CTP_INTERFACE, [0x01]) + addROBs(m.ExtraEnabledROBs, SubDetector.TDAQ_CTP, [0x01]) + addROBs(m.ExtraEnabledROBs, SubDetector.TDAQ_CALO_TOPO_PROC, [0x81, 0x91, 0x82, 0x92]) + + # Configure HLT result monitoring histograms m.MonTool = GenericMonitoringTool('MonTool', HistPath='HLTResultMTMaker') m.MonTool.Histograms = [ defineHistogram( 'TIME_build', path='EXPERT', type='TH1F', title='Time of result construction in;[micro seccond]', xbins=100, xmin=0, xmax=1000 ), @@ -44,5 +72,17 @@ def TriggerEDMSerialiserToolCfg(name): # Create and return a serialiser tool object serialiser = TriggerEDMSerialiserTool(name) - serialiser.CollectionsToSerialize = {} + from collections import OrderedDict + class OD(OrderedDict): + """Purpose of this class is to present map (ordered by insertion order) interface on python side, + whereas the property to look like vector of such strings + "type#key;id0,id1" + when it gets to setting the serialiser property + """ + def __repr__(self): + return '[' +','.join( ['"'+str(typekey)+';'+','.join(map( lambda _:str(_), ids) )+'"' for typekey,ids in self.iteritems()] ) + ']' + def __str__(self): + return self.__repr__() + + serialiser.CollectionsToSerialize = OD() return serialiser diff --git a/Trigger/TrigSteer/TrigOutputHandling/share/test.txt b/Trigger/TrigSteer/TrigOutputHandling/share/test.txt index 8c483aaab2d2b7b577cfe8480a374498d76a0f72..ce727319b51cf82c940212cb1f76237ac46f9a63 100644 --- a/Trigger/TrigSteer/TrigOutputHandling/share/test.txt +++ b/Trigger/TrigSteer/TrigOutputHandling/share/test.txt @@ -1 +1,12 @@ -StoreGateSvc.OutputLevel=0; +StoreGateSvc.OutputLevel=7; +serial_deserial_test.OutputLevel=1; +deserialiser.OutputLevel=1; +deserialiser.Prefix="DESERIALISED_"; +deserialiser2.OutputLevel=1; +deserialiser2.Prefix="DESERIALISED2_"; +deserialised2.ModuleID=1; +ToolSvc.serialiser.OutputLevel=1; +ToolSvc.serialiser.CollectionsToSerialize = ["xAOD::TrigEMClusterContainer_v1#EMClusters;0", + "xAOD::TrigEMClusterAuxContainer_v2#EMClustersAux.viewIndex.testFloat.rawEt.testSmallFloat;0", + "xAOD::TrigCompositeContainer_v1#EMClustersDecisions;0,1", + "xAOD::TrigCompositeAuxContainer_v2#EMClustersDecisionsAux.detail1.detail2;0,1"]; diff --git a/Trigger/TrigSteer/TrigOutputHandling/src/HLTResultMTMaker.cxx b/Trigger/TrigSteer/TrigOutputHandling/src/HLTResultMTMaker.cxx index 8392266ef7842063bc4e4d41a8ecd403722d6ee9..870b0f171bac414c2e096c659256309e14711ff9 100644 --- a/Trigger/TrigSteer/TrigOutputHandling/src/HLTResultMTMaker.cxx +++ b/Trigger/TrigSteer/TrigOutputHandling/src/HLTResultMTMaker.cxx @@ -1,15 +1,55 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "TrigOutputHandling/HLTResultMTMaker.h" #include "AthenaMonitoring/Monitored.h" +#include "GaudiKernel/IJobOptionsSvc.h" + +// Local helpers +namespace { + /// Replaced with std::set::contains in C++20 + template<typename T> bool contains(const std::set<T>& set, const T& value) { + return set.find(value) != set.cend(); + } + bool isHLT(const uint32_t robid) { + return eformat::helper::SourceIdentifier(robid).subdetector_id() == eformat::TDAQ_HLT; + } + bool isHLT(const eformat::SubDetector subdet) { + return subdet == eformat::TDAQ_HLT; + } + /// Remove disabled IDs from @c requestedIDs and return the set of removed IDs + template<typename T> std::set<T> removeDisabled(std::set<T>& requestedIds, const std::set<T>& enabledIds) { + std::set<T> removedIds; + for (auto it=requestedIds.begin(); it!=requestedIds.end(); ) { + // Check if ROB/SubDet is disabled (skip HLT result ID) + if (!isHLT(*it) && !contains(enabledIds, *it)) { + removedIds.insert(*it); + it = requestedIds.erase(it); + } + else ++it; + } + return removedIds; + } + /// Print helper for set<uint32_t> + std::ostream& operator<<(std::ostream& str, const std::set<uint32_t>& set) { + for (const uint32_t id : set) + str << "0x" << std::hex << std::setfill('0') << std::setw(8) << id << std::dec << " "; + return str; + } + /// Print helper for set<eformat::SubDetector> + std::ostream& operator<<(std::ostream& str, const std::set<eformat::SubDetector>& set) { + for (const eformat::SubDetector id : set) str << eformat::helper::SubDetectorDictionary.string(id) << " "; + return str; + } +} // ============================================================================= // Standard constructor // ============================================================================= HLTResultMTMaker::HLTResultMTMaker(const std::string& type, const std::string& name, const IInterface* parent) - : AthAlgTool(type, name, parent) {} + : AthAlgTool(type, name, parent), + m_jobOptionsSvc("JobOptionsSvc", name) {} // ============================================================================= // Standard destructor @@ -23,6 +63,51 @@ StatusCode HLTResultMTMaker::initialize() { ATH_CHECK(m_hltResultWHKey.initialize()); ATH_CHECK(m_makerTools.retrieve()); ATH_CHECK(m_monTool.retrieve()); + ATH_CHECK(m_jobOptionsSvc.retrieve()); + + // Initialise the enabled ROBs/SubDets list from DataFlowConfig config and extra properties. + // DataFlowConfig is a special object used online to hold DF properties passed from TDAQ to HLT as run parameters. + const Gaudi::Details::PropertyBase* prop = m_jobOptionsSvc->getClientProperty("DataFlowConfig", "DF_Enabled_ROB_IDs"); + Gaudi::Property<std::vector<uint32_t>> enabledROBsProp("EnabledROBs",{}); + if (prop && enabledROBsProp.assign(*prop)) { + m_enabledROBs.insert(enabledROBsProp.value().begin(), enabledROBsProp.value().end()); + ATH_MSG_DEBUG("Retrieved a list of " << m_enabledROBs.size() + << " ROBs from DataFlowConfig.DF_Enabled_ROB_IDs"); + } + else { + ATH_MSG_DEBUG("Could not retrieve DataFlowConfig.DF_Enabled_ROB_IDs from JobOptionsSvc. This is fine if running " + << "offline, but should not happen online"); + } + + prop = m_jobOptionsSvc->getClientProperty("DataFlowConfig", "DF_Enabled_SubDet_IDs"); + Gaudi::Property<std::vector<uint32_t>> enabledSubDetsProp("EnabledSubDets",{}); + if (prop && enabledSubDetsProp.assign(*prop)) { + // Need to convert from uint32_t to eformat::SubDetector representable by uint8_t + for (const uint32_t id : enabledSubDetsProp.value()) { + m_enabledSubDets.insert( static_cast<eformat::SubDetector>(id & 0xFF) ); + } + ATH_MSG_DEBUG("Retrieved a list of " << m_enabledSubDets.size() + << " SubDets from DataFlowConfig.DF_Enabled_SubDet_IDs"); + } + else { + ATH_MSG_DEBUG("Could not retrieve DataFlowConfig.DF_Enabled_SubDet_IDs from JobOptionsSvc. This is fine if running " + << "offline, but should not happen online"); + } + + if (m_enabledROBs.empty() && m_enabledSubDets.empty()) { + m_skipValidatePEBInfo = true; + ATH_MSG_INFO("The list of enabled ROBs and SubDets was not provided by DataFlowConfig or is empty. " + << "StreamTag PEBInfo validation will be skipped."); + } + else { + m_enabledROBs.insert(m_extraEnabledROBs.value().begin(), m_extraEnabledROBs.value().end()); + // Need to convert from uint32_t to eformat::SubDetector representable by uint8_t + for (const uint32_t id : m_extraEnabledSubDets.value()) { + m_enabledSubDets.insert( static_cast<eformat::SubDetector>(id & 0xFF) ); + } + ATH_MSG_INFO("StreamTag PEBInfo will be validated against " << m_enabledROBs.size() << " enabled ROBs and " + << m_enabledSubDets.size() << " enabled SubDets"); + } return StatusCode::SUCCESS; } @@ -51,6 +136,8 @@ StatusCode HLTResultMTMaker::makeResult(const EventContext& eventContext) const } time.stop(); + if (!m_skipValidatePEBInfo) validatePEBInfo(*hltResult); + ATH_MSG_DEBUG(*hltResult); // Fill monitoring histograms @@ -66,3 +153,24 @@ StatusCode HLTResultMTMaker::makeResult(const EventContext& eventContext) const return StatusCode::SUCCESS; } + +// ============================================================================= +// Private method removing disabled ROBs/SubDets from StreamTags +// ============================================================================= +void HLTResultMTMaker::validatePEBInfo(HLT::HLTResultMT& hltResult) const { + for (eformat::helper::StreamTag& st : hltResult.getStreamTagsNonConst()) { + std::set<uint32_t> removedROBs = removeDisabled(st.robs,m_enabledROBs); + if (!removedROBs.empty()) + ATH_MSG_WARNING("StreamTag " << st.type << "_" << st.name << " requested disabled ROBs: " << removedROBs + << " - these ROBs were removed from the StreamTag by " << name()); + else + ATH_MSG_VERBOSE("No disabled ROBs were requested by StreamTag " << st.type << "_" << st.name); + + std::set<eformat::SubDetector> removedSubDets = removeDisabled(st.dets,m_enabledSubDets); + if (!removedSubDets.empty()) + ATH_MSG_WARNING("StreamTag " << st.type << "_" << st.name << " requested disabled SubDets: " << removedSubDets + << " - these SubDets were removed from the StreamTag by " << name()); + else + ATH_MSG_VERBOSE("No disabled SubDets were requested by StreamTag " << st.type << "_" << st.name); + } +} diff --git a/Trigger/TrigSteer/TrigOutputHandling/src/TriggerEDMDeserialiserAlg.cxx b/Trigger/TrigSteer/TrigOutputHandling/src/TriggerEDMDeserialiserAlg.cxx index 4de3368cb9202813d16de5438ca0a685e2dd0142..f412edf284c8d06baa02c116a7b15e602db86462 100644 --- a/Trigger/TrigSteer/TrigOutputHandling/src/TriggerEDMDeserialiserAlg.cxx +++ b/Trigger/TrigSteer/TrigOutputHandling/src/TriggerEDMDeserialiserAlg.cxx @@ -1,43 +1,103 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ + #include <cstring> #include "AthenaKernel/StorableConversions.h" #include "AthenaKernel/DataBucketBase.h" #include "SGTools/DataProxy.h" #include "TrigSerializeResult/StringSerializer.h" -#include "TriggerEDMDeserialiserAlg.h" #include "BareDataBucket.h" #include "TBufferFile.h" +#include "TVirtualCollectionProxy.h" #include "TClass.h" +#include "AthContainers/AuxStoreInternal.h" +#include "AthContainers/AuxTypeRegistry.h" +#include "AthContainersInterfaces/AuxTypes.h" +#include "xAODCore/AuxContainerBase.h" +#include "AthContainersRoot/getDynamicAuxID.h" +#include "RootUtils/Type.h" +#include "TriggerEDMDeserialiserAlg.h" -TriggerEDMDeserialiserAlg::TriggerEDMDeserialiserAlg(const std::string& name, ISvcLocator* pSvcLocator) : - AthReentrantAlgorithm(name, pSvcLocator) -{ -} +class TriggerEDMDeserialiserAlg::WritableAuxStore : public SG::AuxStoreInternal { +public: + WritableAuxStore() {} + using SG::AuxStoreInternal::addVector; +}; + + +namespace { + /** + * @brief Find the type of an element of a vector. + * @param[in] tname The name of the type to analyze. + * @param[out] elementTypeName The name of the type of an element of the vector. + * + * Returns the @c type_info for an element of the vector. + */ + const std::type_info* getElementType ( const std::string& tname, + std::string& elementTypeName ) { + TClass* cls = TClass::GetClass( tname.c_str() ); + if ( !cls ) return nullptr; + TVirtualCollectionProxy* prox = cls->GetCollectionProxy(); + if ( !prox ) return nullptr; + if ( prox->GetValueClass() ) { + elementTypeName = prox->GetValueClass()->GetName(); + return prox->GetValueClass()->GetTypeInfo(); + } + RootUtils::Type type ( prox->GetType() ); + elementTypeName = type.getTypeName(); + return type.getTypeInfo(); + } -TriggerEDMDeserialiserAlg::~TriggerEDMDeserialiserAlg() -{ + + std::string stripStdVec (const std::string& s_in) { + std::string s = s_in; + std::string::size_type pos; + while ((pos = s.find ("std::vector<")) != std::string::npos) { + s.erase (pos, 5); + } + return s; + } + } -StatusCode TriggerEDMDeserialiserAlg::initialize() -{ + +TriggerEDMDeserialiserAlg::TriggerEDMDeserialiserAlg(const std::string& name, ISvcLocator* pSvcLocator) : + AthReentrantAlgorithm(name, pSvcLocator) {} + +TriggerEDMDeserialiserAlg::~TriggerEDMDeserialiserAlg() {} + +StatusCode TriggerEDMDeserialiserAlg::initialize() { ATH_CHECK( m_resultKey.initialize() ); ATH_CHECK( m_clidSvc.retrieve() ); ATH_CHECK( m_serializerSvc.retrieve() ); - + ATH_CHECK( m_tpTool.retrieve() ); + return StatusCode::SUCCESS; +} + +StatusCode TriggerEDMDeserialiserAlg::finalize() { return StatusCode::SUCCESS; } -StatusCode TriggerEDMDeserialiserAlg::finalize() -{ +StatusCode TriggerEDMDeserialiserAlg::execute(const EventContext& context) const { + + auto resultHandle = SG::makeHandle( m_resultKey, context ); + if ( resultHandle.isValid() ) + ATH_MSG_DEBUG("Obtained HLTResultMT " << m_resultKey.key() ); + + const Payload* dataptr = nullptr; + // TODO: check if there are use cases where result may be not available in some events and this is not an issue at all + if ( resultHandle->getSerialisedData( m_moduleID, dataptr ).isFailure() ) { + ATH_MSG_WARNING("No payload available with moduleId " << m_moduleID << " in this event"); + return StatusCode::SUCCESS; + } + ATH_CHECK( deserialise( dataptr ) ); return StatusCode::SUCCESS; } -StatusCode TriggerEDMDeserialiserAlg::execute(const EventContext& context) const -{ +StatusCode TriggerEDMDeserialiserAlg::deserialise( const Payload* dataptr ) const { size_t buffSize = m_initialSerialisationBufferSize; std::unique_ptr<char[]> buff( new char[buffSize] ); @@ -48,65 +108,143 @@ StatusCode TriggerEDMDeserialiserAlg::execute(const EventContext& context) const buffSize = neededSize; buff.reset( new char[buffSize] ); } - }; - - auto resultHandle = SG::makeHandle( m_resultKey, context ); - if ( resultHandle.isValid() ) - ATH_MSG_DEBUG("Obtained HLTResultMT " << m_resultKey.key() ); - - const Payload* dataptr = nullptr; - // TODO: revise if there are use cases where result may be not available in some events - if ( resultHandle->getSerialisedData( m_moduleID, dataptr ).isFailure() ) { - ATH_MSG_DEBUG("No payload available with moduleId " << m_moduleID << " in this event"); - return StatusCode::SUCCESS; - } + }; + + + WritableAuxStore* currentAuxStore = nullptr; // set when decoding Aux + int fragmentCount = 0; PayloadIterator start = dataptr->begin(); - while ( start != dataptr->end() ) { + fragmentCount++; const CLID clid{ collectionCLID( start ) }; - const std::string name{ collectionName( start ) }; + const std::vector<std::string> descr{ collectionDescription( start ) }; + ATH_CHECK( descr.size() == 3 ); + std::string transientTypeName{ descr[0] }; + std::string persistentTypeName{ descr[1] }; + const std::string key{ descr[2] }; const size_t bsize{ dataSize( start ) }; - std::string transientType; - ATH_CHECK( m_clidSvc->getTypeNameOfID( clid, transientType ) ); - const std::string actualTypeName{ name.substr(0, name.find('#')) }; - const std::string key{ name.substr( name.find('#')+1 ) }; - - ATH_MSG_DEBUG( "fragment: clid, type, key, size " << clid << " " << transientType<< " " << actualTypeName << " " << key << " " << bsize ); + + ATH_MSG_DEBUG( "" ); + ATH_MSG_DEBUG( "fragment: " << fragmentCount << " type: "<< transientTypeName << " persistent type: " << persistentTypeName << " key: " << key << " size: " << bsize ); resize( bsize ); toBuffer( start, buff.get() ); + + start = toNextFragment( start ); // point the start to the next chunk, irrespectively of what happens in deserialisation below - RootType classDesc = RootType::ByName( actualTypeName ); + RootType classDesc = RootType::ByName( persistentTypeName ); size_t usedBytes{ bsize }; void* obj = m_serializerSvc->deserialize( buff.get(), usedBytes, classDesc ); - ATH_MSG_DEBUG( "Obtained object " << obj << " which used " << usedBytes << " bytes from available " << bsize ); - // for the moment I do not know what do with the raw prt - if ( obj ) { + ATH_MSG_DEBUG( "Deserialised object of ptr: " << obj << " which used: " << usedBytes << " bytes from available: " << bsize ); + if ( obj == nullptr ) { + ATH_MSG_ERROR( "Deserialisation of object of CLID " << clid << " and transientTypeName " << transientTypeName << " # " << key << " failed" ); + ATH_CHECK(false); + } + const bool isxAODInterfaceContainer = transientTypeName.find("xAOD") != std::string::npos and transientTypeName.find("Aux") == std::string::npos; + const bool isxAODAuxContainer = transientTypeName.find("xAOD") != std::string::npos and transientTypeName.find("Aux") != std::string::npos; + const bool isxAODDecoration = transientTypeName.find("vector") != std::string::npos; + const bool isTPContainer = persistentTypeName.find("_p") != std::string::npos; + + ATH_CHECK( checkSanity( transientTypeName, isxAODInterfaceContainer, isxAODAuxContainer, isxAODDecoration, isTPContainer ) ); + + if ( isTPContainer ) { + std::string decodedTransientName; + void * converted = m_tpTool->convertPT( persistentTypeName, obj, decodedTransientName ); + ATH_CHECK( converted != nullptr ); + ATH_CHECK( decodedTransientName == transientTypeName ); + classDesc.Destruct( obj ); + obj = converted; + } + + if ( isxAODInterfaceContainer or isxAODAuxContainer or isTPContainer ) { BareDataBucket* dataBucket = new BareDataBucket( obj, clid, classDesc); const std::string outputName = m_prefix + key; auto proxyPtr = evtStore()->recordObject( SG::DataObjectSharedPtr<BareDataBucket>( dataBucket ), outputName, false, false ); if ( proxyPtr == nullptr ) { ATH_MSG_WARNING( "Recording of object of CLID " << clid << " and name " << outputName << " failed" ); } - } else { - ATH_MSG_WARNING( "Deserialisation of object of CLID " << clid << " and type#name " << name << " failed" ); - } + + if ( isxAODAuxContainer ) { + ATH_CHECK( key.back() == '.' ); + ATH_CHECK( std::count( key.begin(), key.end(), '.') == 1 ); + xAOD::AuxContainerBase* auxHolder = reinterpret_cast<xAOD::AuxContainerBase*>(dataBucket->object()); + ATH_CHECK( auxHolder != nullptr ); + currentAuxStore = new WritableAuxStore(); + auxHolder->setStore( currentAuxStore ); + } else { + currentAuxStore = nullptr; + } - start = toNextFragment( start ); + } else if ( isxAODDecoration ) { + ATH_CHECK( deserialiseDynAux( transientTypeName, persistentTypeName, key, obj, currentAuxStore) ); + } } + return StatusCode::SUCCESS; +} + + + +StatusCode TriggerEDMDeserialiserAlg::deserialiseDynAux( const std::string& transientTypeName, const std::string& persistentTypeName, const std::string& decorationName, + void* obj, WritableAuxStore* currentAuxStore ) const { + const bool isPacked = persistentTypeName.find("SG::PackedContainer") != std::string::npos; + + SG::AuxTypeRegistry& registry = SG::AuxTypeRegistry::instance(); + SG::auxid_t id = registry.findAuxID ( decorationName ); + if (id != SG::null_auxid ) { + if ( stripStdVec( registry.getVecTypeName(id) ) != stripStdVec(transientTypeName) ) { + ATH_MSG_INFO( "Schema evolution required for decoration " << decorationName << " from " << transientTypeName << " to " << registry.getVecTypeName( id ) << " not handled yet"); + return StatusCode::SUCCESS; + } + } else { + std::string elementTypeName; + const std::type_info* elt_tinfo = getElementType( transientTypeName, elementTypeName ); + ATH_CHECK( elt_tinfo != nullptr ); + ATH_MSG_DEBUG( "Dynamic decoration: " << decorationName << " of type " << transientTypeName << " will create a dynamic ID, stored type" << elementTypeName ); + id = SG::getDynamicAuxID ( *elt_tinfo, decorationName, elementTypeName, transientTypeName, false ); + } + ATH_MSG_DEBUG( "Unstreaming decoration " << decorationName << " of type " << transientTypeName << " aux ID " << id << " class " << persistentTypeName << " packed " << isPacked ); + std::unique_ptr<SG::IAuxTypeVector> vec( registry.makeVectorFromData (id, obj, isPacked, true) ); + ATH_CHECK( vec.get() != nullptr ); + ATH_CHECK( currentAuxStore != nullptr ); + currentAuxStore->addVector(id, std::move(vec), false); + + return StatusCode::SUCCESS; +} + +StatusCode TriggerEDMDeserialiserAlg::checkSanity( const std::string& transientTypeName, bool isxAODInterfaceContainer, bool isxAODAuxContainer, bool isDecoration, bool isTPContainer ) const { + ATH_MSG_DEBUG( "Recognised type " << transientTypeName <<" as: " + << (isxAODInterfaceContainer ?" xAOD Interface Container":"" ) + << (isxAODAuxContainer ?" xAOD Aux Container ":"" ) + << ( isDecoration ? " xAOD Decoration" : "") + << ( isTPContainer ? " T/P Contianer " : "") ); + const std::vector<bool> typeOfContainer( { isxAODInterfaceContainer, isxAODAuxContainer, isDecoration, isTPContainer } ); + const size_t count = std::count( typeOfContainer.begin(), typeOfContainer.end(), true ); + if ( count == 0 ) { + ATH_MSG_ERROR( "Could not recognise the kind of container " << transientTypeName ); + return StatusCode::FAILURE; + } else if (count > 1 ) { + ATH_MSG_ERROR( "Ambigous kind serialised content deduced from the transient type name " << transientTypeName ); + ATH_MSG_ERROR( "Recognised type as: " + << (isxAODInterfaceContainer ?" xAOD Interface Context":"" ) + << (isxAODAuxContainer ?" xAOD Aux Container ":"" ) + << ( isDecoration ? " xAOD Decoration" : "") + << ( isTPContainer ? " T/P Contianer " : "") ); + return StatusCode::FAILURE; + } return StatusCode::SUCCESS; } + size_t TriggerEDMDeserialiserAlg::nameLength( TriggerEDMDeserialiserAlg::PayloadIterator start ) const { return *( start + NameLengthOffset); } -std::string TriggerEDMDeserialiserAlg::collectionName( TriggerEDMDeserialiserAlg::PayloadIterator start ) const { +std::vector<std::string> TriggerEDMDeserialiserAlg::collectionDescription( TriggerEDMDeserialiserAlg::PayloadIterator start ) const { StringSerializer ss; std::vector<std::string> labels; ss.deserialize( start + NameOffset, start + NameOffset + nameLength(start), labels ); - return labels[0]; + return labels; } size_t TriggerEDMDeserialiserAlg::dataSize( TriggerEDMDeserialiserAlg::PayloadIterator start ) const { return *( start + NameOffset + nameLength( start ) ); @@ -118,4 +256,3 @@ void TriggerEDMDeserialiserAlg::toBuffer( TriggerEDMDeserialiserAlg::PayloadIter // we rely on continous memory layout of std::vector ... std::memcpy( buffer, &(*dataStart), dataSize( start ) ); } - diff --git a/Trigger/TrigSteer/TrigOutputHandling/src/TriggerEDMDeserialiserAlg.h b/Trigger/TrigSteer/TrigOutputHandling/src/TriggerEDMDeserialiserAlg.h index 9e73bdebd7111be750dc0b536a88b217fe54e549..3d9963daa44b44e766950927ee513b49a6af4904 100644 --- a/Trigger/TrigSteer/TrigOutputHandling/src/TriggerEDMDeserialiserAlg.h +++ b/Trigger/TrigSteer/TrigOutputHandling/src/TriggerEDMDeserialiserAlg.h @@ -10,7 +10,7 @@ #include "TrigSteeringEvent/HLTResultMT.h" #include "AthenaBaseComps/AthReentrantAlgorithm.h" #include "AthenaKernel/IAthenaSerializeSvc.h" - +#include "TrigSerializeTP/TrigSerTPTool.h" @@ -23,8 +23,14 @@ * [fragment size in words][CLID][size of serialised colection name][...serialised collection name ...][data payload in bytes][....data paload...] * It follows form the TrigEDMSerialisationTool implemetation. **/ + + + + class TriggerEDMDeserialiserAlg : public AthReentrantAlgorithm { public: + class WritableAuxStore; + enum Offsets { CLIDOffset = 1, NameLengthOffset = 2, @@ -38,6 +44,8 @@ public: virtual StatusCode finalize() override; private: + + SG::ReadHandleKey<HLT::HLTResultMT> m_resultKey { this, "ResultKey", "HLTResultMT", "Key of object that is read" }; Gaudi::Property<std::string> m_prefix{ this, "Prefix", "", "Set for testing to avoid clash with the input collections" }; Gaudi::Property<int> m_moduleID{ this, "ModuleID", 0, "Module ID of HLT result ROB, default 0 is the main HLT result, others are for TLA, calibration etc." }; @@ -47,6 +55,8 @@ private: ServiceHandle<IAthenaSerializeSvc> m_serializerSvc{ this, "Serializer", "AthenaRootSerializeSvc", "Service that translates persistent to transient respresenation" }; + ToolHandle<TrigSerTPTool> m_tpTool{ this, "TPTool", "TrigSerTPTool/TrigSerTPTool", "Tool to do Transient/Persistent conversion (Old EDM)"}; + typedef std::vector<uint32_t> Payload; typedef std::vector<uint32_t>::const_iterator PayloadIterator; @@ -69,9 +79,11 @@ private: size_t nameLength( TriggerEDMDeserialiserAlg::PayloadIterator start ) const; /** - * name of the collection stored in the next fragment + * string description of the collection stored in the next fragment, + * returns transient type name, persistent type name and the SG key **/ - std::string collectionName( PayloadIterator start ) const; + std::vector<std::string> collectionDescription( PayloadIterator start ) const; + /** * size of the buffer that is needed to decode next fragment data content * @warning measured in bytes @@ -82,7 +94,27 @@ private: * copies fragment to the buffer, no size checking, use above to do so **/ void toBuffer( PayloadIterator start, char* buffer ) const; + + + /** + * Performs actual deserialisation loop + */ + StatusCode deserialise( const Payload* dataptr ) const; + + /** + * Handle decoration + */ + StatusCode deserialiseDynAux( const std::string& transientTypeName, const std::string& persistentTypeName, const std::string& decorationName, + void* data, WritableAuxStore* currentAuxStore ) const; + + + /** + * Checker for data iniegrity, one and only one of the passed booleans can be true, else FAILURE is returned and relevant diagnostics printed + */ + StatusCode checkSanity( const std::string& tn, bool isxAODInterfaceContainer, bool isxAODAuxContainer, bool isDecoration, bool isTPContainer ) const; + + }; #endif // TRIGOUTPUTHANDLING_TRIGGEREDMDESERIALISERALG_H diff --git a/Trigger/TrigSteer/TrigOutputHandling/src/TriggerEDMSerialiserTool.cxx b/Trigger/TrigSteer/TrigOutputHandling/src/TriggerEDMSerialiserTool.cxx index 04fc9af9ba9abeec1ccab6971958057066e82010..8d35af4e68ebb3c88b4cec7bfc02abd48531f900 100644 --- a/Trigger/TrigSteer/TrigOutputHandling/src/TriggerEDMSerialiserTool.cxx +++ b/Trigger/TrigSteer/TrigOutputHandling/src/TriggerEDMSerialiserTool.cxx @@ -2,9 +2,6 @@ Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ - - - #include <cstring> #include <boost/algorithm/string.hpp> #include "GaudiKernel/IToolSvc.h" @@ -14,76 +11,81 @@ #include "AthContainers/AuxTypeRegistry.h" #include "AthContainers/debug.h" #include "xAODCore/AuxContainerBase.h" - #include "TrigSerializeResult/StringSerializer.h" #include "TriggerEDMSerialiserTool.h" TriggerEDMSerialiserTool::TriggerEDMSerialiserTool( const std::string& type, - const std::string& name, - const IInterface* parent ) : - base_class( type, name, parent ) { -} + const std::string& name, + const IInterface* parent ) + : base_class( type, name, parent ) {} TriggerEDMSerialiserTool::~TriggerEDMSerialiserTool() {} StatusCode TriggerEDMSerialiserTool::initialize() { - + ATH_CHECK( m_serializerSvc.retrieve() ); - ATH_CHECK( m_clidSvc.retrieve() ); - for ( const auto& [typeKeyAux, moduleIdVec] : m_collectionsToSerialize ) { - const std::string type = typeKeyAux.substr( 0, typeKeyAux.find('#') ); - if ( type.find('_') == std::string::npos ) { + ATH_CHECK( m_clidSvc.retrieve() ); + for ( const auto& typeKeyAuxIDs : m_collectionsToSerialize ) { + ATH_MSG_DEBUG("Parsing " << typeKeyAuxIDs); + const std::string typeKeyAux = typeKeyAuxIDs.substr( 0, typeKeyAuxIDs.find(';') ); + const std::string persistentType = typeKeyAux.substr( 0, typeKeyAux.find('#') ); + ATH_MSG_DEBUG("Type " << typeKeyAux); + if ( persistentType.find('_') == std::string::npos ) { ATH_MSG_ERROR( "Unversioned object to be recorded " << typeKeyAux ); return StatusCode::FAILURE; } - const std::string transientType = typeKeyAux.substr( 0, typeKeyAux.find('_') ); - + const std::string transientType = persistentType.substr( 0, typeKeyAux.find('_') ); const std::string key = typeKeyAux.substr( typeKeyAux.find('#')+1, typeKeyAux.find('.')-typeKeyAux.find('#') ); + CLID clid; if ( m_clidSvc->getIDOfTypeName(transientType, clid).isFailure() ) { - ATH_MSG_ERROR( "Can not find CLID for " << transientType << " that is needed to stream " << key ); + ATH_MSG_ERROR( "Can not find CLID for " << transientType << " that is needed for serialisation " << key ); return StatusCode::FAILURE; } - RootType classDesc = RootType::ByName( type ); + RootType classDesc = RootType::ByName( persistentType ); if ( ! classDesc.IsComplete() ) { - ATH_MSG_ERROR( "The type " << type << " is not known" ); + ATH_MSG_ERROR( "The type " << persistentType << " is not known to ROOT serialiser" ); return StatusCode::FAILURE; } - ATH_MSG_DEBUG( "Type " << type << " key " << key << " serializable" ); - - xAOD::AuxSelection sel; - if ( typeKeyAux.find('.') != std::string::npos ) { - std::string allVars = typeKeyAux.substr( typeKeyAux.find('.')+1 ); - if (allVars != "") { - ATH_MSG_DEBUG( "with aux content: " ); - std::set<std::string> variableNames; - boost::split( variableNames, allVars, [](const char c){ return c == '.'; } ); - for ( auto el: variableNames ) { - ATH_MSG_DEBUG( " \"" << el << "\"" ); - } - sel.selectAux( variableNames ); - } - } - const bool isAux = (key.find("Aux") != std::string::npos); + const std::string moduleIDs = typeKeyAuxIDs.substr( typeKeyAuxIDs.find(';')+1 ); + std::vector<std::string> splitModuleIDs; + boost::split( splitModuleIDs, moduleIDs, [](const char c){ return c == ','; } ); + std::vector<uint16_t> moduleIdVec; + for ( const auto& module: splitModuleIDs ) moduleIdVec.push_back( std::stoi( module ) ); if (moduleIdVec.empty()) { ATH_MSG_ERROR( "No HLT result module IDs given for " << typeKeyAux ); return StatusCode::FAILURE; } - - if (msgLevel(MSG::DEBUG)) { - std::ostringstream ss; - std::copy(moduleIdVec.begin(), moduleIdVec.end()-1, std::ostream_iterator<uint16_t>(ss, ", ")); - ss << moduleIdVec.back(); - ATH_MSG_DEBUG( typeKeyAux << " will be written to " << moduleIdVec.size() << " result ROBFragments with IDs: [" - << ss.str() << "]" ); - } - - m_toSerialize.push_back( Address{ type+"#"+key, type, clid, key, moduleIdVec, isAux, sel } ); + + ATH_MSG_DEBUG( "Transient type " << transientType << " persistent type " << persistentType << " will be written to " << moduleIdVec.size() << " result ROBFragments with IDs: " + << moduleIdVec << "" ); + + + if ( persistentType.find("xAOD") != std::string::npos ) { // xAOD - either interface of Aux + xAOD::AuxSelection sel; + if ( typeKeyAux.find('.') != std::string::npos ) { // Aux, possibly with selection of varaibles + ATH_MSG_DEBUG( "with aux content: " ); + std::string allVars = typeKeyAux.substr( typeKeyAux.find('.')+1 ); + if (allVars != "") { + std::set<std::string> variableNames; + boost::split( variableNames, allVars, [](const char c){ return c == '.'; } ); + for ( auto el: variableNames ) { + ATH_MSG_DEBUG( " \"" << el << "\"" ); + } + sel.selectAux( variableNames ); + } + m_toSerialise.emplace_back( transientType, persistentType, clid, key, moduleIdVec, Address::xAODAux, sel ); + } else { + m_toSerialise.emplace_back( transientType, persistentType, clid, key, moduleIdVec, Address::xAODInterface, xAOD::AuxSelection() ); + } + } else { // an old T/P type + m_toSerialise.emplace_back( transientType, persistentType, clid, key, moduleIdVec, Address::OldTP, xAOD::AuxSelection() ); + } } return StatusCode::SUCCESS; } @@ -94,7 +96,8 @@ StatusCode TriggerEDMSerialiserTool::makeHeader(const Address& address, std::vec std::vector<uint32_t> serializedLabel; StringSerializer ss; - ss.serialize( address.typeKey, serializedLabel ); + std::vector<std::string> descr({ address.transType, address.persType, address.key }); + ss.serialize( descr, serializedLabel ); buffer.push_back( serializedLabel.size() ); buffer.insert( buffer.end(), serializedLabel.begin(), serializedLabel.end() ); // plain SG key return StatusCode::SUCCESS; @@ -116,9 +119,11 @@ StatusCode TriggerEDMSerialiserTool::fillPayload( const void* data, size_t sz, s return StatusCode::SUCCESS; } -StatusCode TriggerEDMSerialiserTool::fillDynAux( const Address& address, DataObject* dObj, std::vector<uint32_t>& buffer, size_t& nDynWritten) const { - // TODO, check if we can cache this informion after it is filled once - ATH_MSG_DEBUG("About to start streaming aux data of " << address.key ); + + +StatusCode TriggerEDMSerialiserTool::serialiseDynAux( DataObject* dObj, const Address& address, std::vector<uint32_t>& buffer, size_t& nDynWritten ) const { + ATH_MSG_DEBUG( "" ); + ATH_MSG_DEBUG( "About to start streaming aux data of " << address.key ); DataBucketBase* dObjAux = dynamic_cast<DataBucketBase*>(dObj); ATH_CHECK( dObjAux != nullptr ); @@ -127,9 +132,6 @@ StatusCode TriggerEDMSerialiserTool::fillDynAux( const Address& address, DataObj ATH_MSG_DEBUG( "Can't obtain AuxContainerBase of " << address.key << " no dynamic variables presumably" ); return StatusCode::SUCCESS; } - - // ATH_MSG_DEBUG( "dump aux store" ); - // SGdebug::dump_aux_vars( *auxStore ); const SG::auxid_set_t& selected = address.sel.getSelectedAuxIDs( auxStoreIO->getDynamicAuxIDs() ); @@ -142,8 +144,15 @@ StatusCode TriggerEDMSerialiserTool::fillDynAux( const Address& address, DataObj for (SG::auxid_t auxVarID : selected ) { const std::string typeName = SG::AuxTypeRegistry::instance().getVecTypeName(auxVarID); - const std::string name = SG::AuxTypeRegistry::instance().getName(auxVarID); - ATH_MSG_DEBUG("Streaming " << name << " of type " << typeName ); + const std::string decorationName = SG::AuxTypeRegistry::instance().getName(auxVarID); + const std::type_info* tinfo = auxStoreIO->getIOType (auxVarID); + + + ATH_CHECK( tinfo != nullptr ); + TClass* cls = TClass::GetClass (*tinfo); + ATH_CHECK( cls != nullptr ); + ATH_MSG_DEBUG( "" ); + ATH_MSG_DEBUG( "Streaming " << decorationName << " of type " << typeName << " aux ID " << auxVarID << " class " << cls->GetName() ); CLID clid; if ( m_clidSvc->getIDOfTypeName(typeName, clid).isFailure() ) { @@ -152,7 +161,7 @@ StatusCode TriggerEDMSerialiserTool::fillDynAux( const Address& address, DataObj } ATH_MSG_DEBUG( "CLID " << clid ); - RootType classDesc = RootType::ByName( typeName ); + RootType classDesc = RootType::ByName( cls->GetName() ); const void* rawptr = auxStoreIO->getIOData( auxVarID ); ATH_CHECK( rawptr != nullptr ); @@ -161,38 +170,93 @@ StatusCode TriggerEDMSerialiserTool::fillDynAux( const Address& address, DataObj void* mem = m_serializerSvc->serialize( rawptr, classDesc, sz ); if ( mem == nullptr or sz == 0 ) { - ATH_MSG_ERROR( "Serialisation of " << address.type <<"#" << address.key << "."<< name << " unsuccessful" ); + ATH_MSG_ERROR( "Serialisation of " << address.persType <<"#" << address.key << "."<< decorationName << " unsuccessful" ); return StatusCode::FAILURE; + } else { + ATH_MSG_DEBUG( "Serialised " << address.persType <<"#" << address.key << "."<< decorationName << " memory size " << sz ); } std::vector<uint32_t> fragment; - Address auxAddress = { "", typeName, clid, address.key+"."+name, address.moduleIdVec, false }; + + Address auxAddress = { typeName, cls->GetName(), clid, decorationName, address.moduleIdVec, Address::xAODDecoration }; + ATH_CHECK( makeHeader( auxAddress, fragment ) ); ATH_CHECK( fillPayload( mem, sz, fragment ) ); fragment[0] = fragment.size(); if ( mem ) delete [] static_cast<const char*>( mem ); - + buffer.insert( buffer.end(), fragment.begin(), fragment.end() ); ++nDynWritten; + } + return StatusCode::SUCCESS; +} + + +StatusCode TriggerEDMSerialiserTool::serialiseContainer( void* data, const Address& address, std::vector<uint32_t>& buffer ) const { + + RootType classDesc = RootType::ByName( address.persType ); + size_t sz=0; + void* mem = m_serializerSvc->serialize( data, classDesc, sz ); + + ATH_MSG_DEBUG( "Streamed to buffer at address " << mem << " of " << sz << " bytes" ); + + if ( mem == nullptr or sz == 0 ) { + ATH_MSG_ERROR( "Serialisation of " << address.persType << " " << address.key << " unsuccessful" ); + return StatusCode::FAILURE; + } + + // prepare fragment + std::vector<uint32_t> fragment; + ATH_CHECK( makeHeader( address, fragment ) ); + ATH_CHECK( fillPayload( mem, sz, fragment ) ); + if ( mem ) delete [] static_cast<const char*>( mem ); + + + ATH_MSG_DEBUG( address.transType << "#" << address.key << " Fragment size :" << fragment.size()*sizeof(uint32_t) << " bytes"); + fragment[0] = fragment.size(); + buffer.insert( buffer.end(), fragment.begin(), fragment.end() ); + + return StatusCode::SUCCESS; +} +StatusCode TriggerEDMSerialiserTool::serialisexAODAuxContainer( void* data, const Address& address, std::vector<uint32_t>& buffer ) const { + ATH_MSG_DEBUG("xAOD Aux Contianer"); + ATH_CHECK( serialiseContainer( data, address, buffer ) ); + size_t baseSize = buffer.size(); + DataObject* dObj = evtStore()->accessData( address.clid, address.key ); + ATH_CHECK( dObj != nullptr ); + size_t nDynWritten = 0; + ATH_CHECK( serialiseDynAux( dObj, address, buffer, nDynWritten ) ); + if ( nDynWritten > 0 ) { + ATH_MSG_DEBUG( " Fragment size including " << (buffer.size() - baseSize)*sizeof(uint32_t) << " bytes from " + << nDynWritten << "x DynAux : " << buffer.size()*sizeof(uint32_t) ); } + return StatusCode::SUCCESS; +} + +StatusCode TriggerEDMSerialiserTool::serialiseTPContainer( void* data, const Address& address, std::vector<uint32_t>& buffer ) const { + + ATH_MSG_DEBUG("TP Contianer, converting from: " << address.transType << " to " << address.persType ); + std::string converterPersistentType; + void * persistent = m_tpTool->convertTP( address.transType, data, converterPersistentType ); + ATH_CHECK( persistent != 0 ); + ATH_CHECK ( converterPersistentType == address.persType ); + ATH_CHECK( serialiseContainer( persistent, address, buffer ) ); - - return StatusCode::SUCCESS; + return StatusCode::SUCCESS; } StatusCode TriggerEDMSerialiserTool::fill( HLT::HLTResultMT& resultToFill ) const { - + // Leave this check until there is a justified case for appending data to an existing result if (not resultToFill.getSerialisedData().empty()) { ATH_MSG_ERROR("Trying to fill a result which is not empty! Likely misconfiguration, returning a FAILURE"); return StatusCode::FAILURE; } - - // Loop over collections to serialise - for ( const Address& address: m_toSerialize ) { - ATH_MSG_DEBUG( "Streaming " << address.typeKey ); + + for ( const Address& address: m_toSerialise ) { + ATH_MSG_DEBUG( "Streaming " << address.persType ); // obtain object DataObject* dObj = evtStore()->accessData( address.clid, address.key ); if ( dObj == nullptr ) { @@ -200,51 +264,34 @@ StatusCode TriggerEDMSerialiserTool::fill( HLT::HLTResultMT& resultToFill ) cons continue; } - const void* rawptr = SG::fromStorable( dObj, address.clid, nullptr, msgLvl(MSG::DEBUG) ); + void* rawptr = SG::fromStorable( dObj, address.clid, nullptr, msgLvl(MSG::DEBUG) ); if ( rawptr == nullptr ) { ATH_MSG_DEBUG( "Data Object with key " << address.key << " can not be converted to void* for streaming" ); continue; } ATH_MSG_DEBUG("Obtained raw pointer " << rawptr ); - - RootType classDesc = RootType::ByName( address.type ); - size_t sz=0; - void* mem = m_serializerSvc->serialize( rawptr, classDesc, sz ); - - ATH_MSG_DEBUG( "Streamed to buffer at address " << mem << " of " << sz << " bytes" ); - if ( mem == nullptr or sz == 0 ) { - ATH_MSG_ERROR( "Serialisation of " << address.typeKey << " unsuccessful" ); - return StatusCode::FAILURE; - } - - // prepare fragment - std::vector<uint32_t> fragment; - ATH_CHECK( makeHeader( address, fragment ) ); - ATH_CHECK( fillPayload( mem, sz, fragment ) ); - if ( mem ) delete [] static_cast<const char*>( mem ); - - const size_t baseSize = fragment.size()*sizeof(uint32_t); - ATH_MSG_DEBUG(address.typeKey << " Fragment size :" << baseSize << " bytes" ); - - if ( address.isAux ) { - size_t nDynWritten = 0; - ATH_CHECK( fillDynAux( address, dObj, fragment, nDynWritten ) ); - if (nDynWritten > 0) { - const size_t decoratedSize = fragment.size()*sizeof(uint32_t); - ATH_MSG_DEBUG(" Fragment size including " << decoratedSize - baseSize << - " bytes from " << nDynWritten << "x DynAux: " << decoratedSize << " bytes" ); - } + std::vector<uint32_t> fragment; + fragment.reserve(1000); + if ( address.category == Address::xAODInterface ) { + ATH_CHECK( serialiseContainer( rawptr, address, fragment ) ); + } else if ( address.category == Address::xAODAux ) { + ATH_CHECK( serialisexAODAuxContainer( rawptr, address, fragment ) ); + } else if ( address.category == Address::OldTP ) { + ATH_CHECK( serialiseTPContainer( rawptr, address, fragment ) ); } - fragment[0] = fragment.size(); + + ATH_MSG_DEBUG( "Payload size after inserting " << address.persType << "#" << address.key << " " << fragment.size()*sizeof(uint32_t) << " bytes" ); + for (const uint16_t id : address.moduleIdVec) { resultToFill.addSerialisedData(id, fragment); - ATH_MSG_DEBUG( "Module " << id << " payload after inserting " << address.typeKey << " has " - << resultToFill.getSerialisedData().at(id).size()*sizeof(uint32_t) << " bytes"); + ATH_MSG_DEBUG( "Module " << id << " payload after inserting " << address.transType << "#" << address.key << " has " + << resultToFill.getSerialisedData().at(id).size()*sizeof(uint32_t) << " bytes"); } + } return StatusCode::SUCCESS; diff --git a/Trigger/TrigSteer/TrigOutputHandling/src/TriggerEDMSerialiserTool.h b/Trigger/TrigSteer/TrigOutputHandling/src/TriggerEDMSerialiserTool.h index d82a8c003a1c54249808290f46c8072d16a32938..d458fecd821c526c0b40e5c65a65d51e98456905 100644 --- a/Trigger/TrigSteer/TrigOutputHandling/src/TriggerEDMSerialiserTool.h +++ b/Trigger/TrigSteer/TrigOutputHandling/src/TriggerEDMSerialiserTool.h @@ -12,8 +12,10 @@ #include "AthenaKernel/IAthenaSerializeSvc.h" #include "AthenaKernel/IDictLoaderSvc.h" #include "TrigOutputHandling/HLTResultMTMakerTool.h" +#include "TrigSerializeTP/TrigSerTPTool.h" #include "Gaudi/Parsers/Factory.h" // Needed to declare less common Property types + /** * @class TriggerEDMSerialiserTool is tool responsible for creation of HLT Result filled with streamed EDM collections **/ @@ -21,48 +23,70 @@ class DataObject; //!< Forward declaration class TriggerEDMSerialiserTool: public extends<AthAlgTool, HLTResultMTMakerTool> -{ - - public: +{ + + public: TriggerEDMSerialiserTool( const std::string& type, - const std::string& name, + const std::string& name, const IInterface* parent ); - virtual ~TriggerEDMSerialiserTool(); + virtual ~TriggerEDMSerialiserTool(); virtual StatusCode fill( HLT::HLTResultMT& resultToFill ) const override; virtual StatusCode initialize() override; private: - Gaudi::Property<std::map<std::string,std::vector<uint16_t>>> m_collectionsToSerialize { + Gaudi::Property< std::vector< std::string > > m_collectionsToSerialize { this, "CollectionsToSerialize", {}, - "EDM streaming map {collectionKey, moduleIdVec} where collectionKey is a string formatted like for " + "EDM streaming configuration \'collectionKeyType;module1,module2,module3\' where collectionKeyType is a string formatted like for " "AthenaOutputStream, e.g. TYPE#SG.aux1.aux2..etc. The type has to be an exact type, i.e. with _vN not the alias " "type. moduleIdVec is the vector of HLTResult ROB module IDs to which the collection should be written. ID=0 is " "the main result, other IDs are used for data scouting." }; - /// @class Address /// Internal structure to keep configuration organised conveniently /// + struct Address { - std::string typeKey; - std::string type; + enum Category { xAODInterface, xAODAux, OldTP, xAODDecoration, None }; + Address( const std::string& transType_, + const std::string& persType_, + const CLID clid_, + const std::string& key_, + const std::vector<uint16_t> module_={}, + const Category category_ = None, + const xAOD::AuxSelection& sel_ = {} ) + : transType(transType_), + persType(persType_), + clid(clid_), + key(key_), + moduleIdVec(module_), + category(category_), + sel(sel_){} + + std::string transType; + std::string persType; // actuall versioned type CLID clid; std::string key; std::vector<uint16_t> moduleIdVec; - bool isAux = false; - xAOD::AuxSelection sel = {}; //!< xAOD dynamic varaibles selection + + Category category; + xAOD::AuxSelection sel = {}; //!< xAOD dynamic varaibles selection, relevant only for xAODAux category + }; - std::vector< Address > m_toSerialize; //!< Postprocessed configuration info - - ServiceHandle<IClassIDSvc> m_clidSvc{ this, "ClassIDSvc", "ClassIDSvc", - "Service to translate class name to CLID" }; + std::vector< Address > m_toSerialise; // postprocessed configuration info + + ServiceHandle<IClassIDSvc> m_clidSvc{ this, "ClassIDSvc", "ClassIDSvc", + "Service to translate class name to CLID" }; + ServiceHandle<IAthenaSerializeSvc> m_serializerSvc{ this, "Serializer", "AthenaRootSerializeSvc", + "Service that translates transient to persistent respresenation" }; + + ToolHandle<TrigSerTPTool> m_tpTool{ this, "TPTool", "TrigSerTPTool/TrigSerTPTool", + "Tool to do Transient/Persistent conversion (Old EDM)"}; + - ServiceHandle<IAthenaSerializeSvc> m_serializerSvc{ this, "Serializer", "AthenaRootSerializeSvc", - "Service that translates transient to persistent respresenation" }; /** * Given the ID if the collection (in address arg) insert basic streaming info into the buffer. @@ -73,14 +97,34 @@ class TriggerEDMSerialiserTool: public extends<AthAlgTool, HLTResultMTMakerTool> * For copy bytest from the memory into the buffer converting from char[] to uint32_t[] * This function is candidate to be made global function at some point * and we will need also readPayload function - */ + */ StatusCode fillPayload( const void* data, size_t sz, std::vector<uint32_t>& buffer ) const; + + /** + * Place inside the buffer the serialised container (can be either TP, xAOD) + * invloves simple involcation of serialiser + */ + StatusCode serialiseContainer( void* data, const Address& address, std::vector<uint32_t>& buffer ) const; + /** + * Place inside the buffer serialised the xOAD Aux container + * invloves selection and recording of dynamic variables + */ + StatusCode serialisexAODAuxContainer( void* data, const Address& address, std::vector<uint32_t>& buffer ) const; + + /** + * Place inside the buffer the serialised old type of container + * invloves T/P conversion + */ + StatusCode serialiseTPContainer( void* data, const Address& address, std::vector<uint32_t>& buffer ) const; + + + /** * Adds dynamic variables to the payload */ - StatusCode fillDynAux( const Address& address, DataObject* dObject, std::vector<uint32_t>& buffer, size_t& nDynWritten ) const; -}; + StatusCode serialiseDynAux( DataObject* dObject, const Address& address, std::vector<uint32_t>& buffer, size_t& nDynWritten ) const; +}; #endif //> !TRIGOUTPUTHANDLING_TRIGGEREDMSERIALISERTOOL_H diff --git a/Trigger/TrigSteer/TrigOutputHandling/test/serial_deserial_test.cxx b/Trigger/TrigSteer/TrigOutputHandling/test/serial_deserial_test.cxx new file mode 100644 index 0000000000000000000000000000000000000000..f05797523dcf8e2cb8553a85f733714b5285d1e7 --- /dev/null +++ b/Trigger/TrigSteer/TrigOutputHandling/test/serial_deserial_test.cxx @@ -0,0 +1,219 @@ + +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ +#include <iostream> + +#include "TestTools/expect.h" +#include "TestTools/initGaudi.h" +#include "GaudiKernel/IToolSvc.h" +#include "AthenaKernel/getMessageSvc.h" +#include "GaudiKernel/MsgStream.h" +#include "StoreGate/StoreGate.h" +#include "StoreGate/StoreGateSvc.h" +#include "../src/BareDataBucket.h" +#include "xAODTrigCalo/TrigEMClusterContainer.h" +#include "xAODTrigCalo/TrigEMClusterAuxContainer.h" +#include "xAODTrigger/TrigCompositeContainer.h" +#include "xAODTrigger/TrigCompositeAuxContainer.h" + +#include "../src/TriggerEDMSerialiserTool.h" +#include "../src/TriggerEDMDeserialiserAlg.h" + + +void testTrigEMContiner( const EventContext &ctx ); +void testTrigCompositeContiner( const EventContext &ctx ); + +void testTrigEMContinerInsert(StoreGateSvc*); +void testTrigCompositeContinerInsert(StoreGateSvc*); + +void testTrigEMContinerReadAndCheck(StoreGateSvc*); +void testTrigCompositeContinerReadAndCheck(StoreGateSvc*); + + +int main() { + using namespace std; + ISvcLocator* pSvcLoc; + if( !Athena_test::initGaudi("test.txt", pSvcLoc) ) { + cerr << "ERROR This test can not be run" << endl; + return -1; + } + assert(pSvcLoc); + MsgStream log(Athena::getMessageSvc(), "serial_deserial_test"); + + StoreGateSvc* pStore = nullptr; + VALUE( pSvcLoc->service("StoreGateSvc", pStore, true).isSuccess() ) EXPECTED ( true ); + + IToolSvc * toolSvc = nullptr; + VALUE( pSvcLoc->service("ToolSvc", toolSvc, true) ) EXPECTED ( StatusCode::SUCCESS ); + + IAlgTool* algTool; + VALUE( toolSvc->retrieveTool("TriggerEDMSerialiserTool/serialiser", algTool) ) EXPECTED( StatusCode::SUCCESS ); + TriggerEDMSerialiserTool* ser = dynamic_cast< TriggerEDMSerialiserTool*>(algTool); + + + + + VALUE( ser == nullptr ) EXPECTED ( false ); + + TriggerEDMDeserialiserAlg deser ("deserialiser", pSvcLoc); deser.addRef(); + deser.sysInitialize(); + + TriggerEDMDeserialiserAlg deser2 ("deserialiser2", pSvcLoc); deser2.addRef(); + deser2.sysInitialize(); + + + // TDOD simplify :-) ? + auto runAlg = [&](TriggerEDMDeserialiserAlg& alg) { + IProxyDict* xdict = &*alg.evtStore(); + xdict = alg.evtStore()->hiveProxyDict(); + EventContext ctx; + ctx.setExtension( Atlas::ExtendedEventContext(xdict) ); + Gaudi::Hive::setCurrentContext (ctx); + return alg.execute( ctx ); + }; + + + + for ( int rep = 0; rep < 50 ; ++ rep ) { + testTrigEMContinerInsert(pStore); + testTrigCompositeContinerInsert(pStore); + + auto hltres = new HLT::HLTResultMT(); + VALUE( ser->fill( *hltres ) ) EXPECTED ( StatusCode::SUCCESS ); + + pStore->clearStore(); + // now objects are only in serialised form in HLTResultMT object + + VALUE( pStore->record( hltres, "HLTResultMT" ) ) EXPECTED ( StatusCode::SUCCESS ); + VALUE( runAlg( deser ) ) EXPECTED ( StatusCode::SUCCESS ); + VALUE( runAlg( deser2 ) ) EXPECTED ( StatusCode::SUCCESS ); + + testTrigEMContinerReadAndCheck(pStore); + testTrigCompositeContinerReadAndCheck(pStore); + + // see if we do nto have owneship issues + pStore->clearStore(); + } + + delete ser; + std::cout <<"ok"<< std::endl; + return 0; +} + + +void testTrigEMContinerInsert(StoreGateSvc* pStore) { + + // place test data + auto em = new xAOD::TrigEMClusterContainer(); + auto emAux = new xAOD::TrigEMClusterAuxContainer(); + em->setStore( emAux ); + SG::AuxElement::Accessor< int > viewIndex( "viewIndex" ); + SG::AuxElement::Accessor< float > testFloat( "testFloat" ); + SG::AuxElement::Accessor< float > testSmallFloat( "testSmallFloat" ); + + + auto fill = [&]( double x) { + auto cluster = new xAOD::TrigEMCluster(); + em->push_back( cluster ); + cluster->setEnergy(0.0); + cluster->setEt(0.0); + cluster->setRawEnergy(0.0); + cluster->setRawEt(x - 0.2); + cluster->setE277(0); + cluster->setEmaxs1(0); + cluster->setE2tsts1(0); + cluster->setEhad1(-999); + cluster->setWeta2(-999); + cluster->setFracs1(-999); + cluster->setE233(-999); + cluster->setE237(-999); + cluster->setWstot(-999); + cluster->setEta1(-999); + cluster->setNCells( x ); + cluster->setRawEta(-999); + cluster->setRawPhi(-999); + viewIndex( *cluster ) = x+1; // for sake of change add 1 + testFloat( *cluster ) = float(x)+0.1; // for sake of change add 0.1 + testSmallFloat( *cluster ) = float(x); + }; + + + VALUE( em->setOption ("testSmallFloat", SG::AuxDataOption ("nbits", 13)) ) NOT_EXPECTED( 0 ); + VALUE( em->setOption ("testSmallFloat", SG::AuxDataOption ("signed", 0))) NOT_EXPECTED( 0 ); + VALUE( em->setOption ("testSmallFloat", SG::AuxDataOption ("nmantissa", 13)) ) NOT_EXPECTED( 0 ); + + + + const size_t count = 30; + for ( size_t i = 0; i < count; i++ ) { + fill(i); + } + + VALUE( pStore->record( em, "EMClusters" ) ) EXPECTED ( StatusCode::SUCCESS ); + VALUE( pStore->record( emAux, "EMClustersAux." ) ) EXPECTED ( StatusCode::SUCCESS ); +} + +void testTrigEMContinerReadAndCheck(StoreGateSvc* pStore) { + + const xAOD::TrigEMClusterContainer *emback = nullptr; + VALUE( pStore->retrieve( emback, "DESERIALISED_EMClusters") ) EXPECTED ( StatusCode::SUCCESS ); + + VALUE( emback ) NOT_EXPECTED ( nullptr ); + + + SG::AuxElement::ConstAccessor< int > viewIndexReader( "viewIndex" ); + SG::AuxElement::ConstAccessor< float > testFloatReader( "testFloat" ); + SG::AuxElement::ConstAccessor< float > testSmallFloatReader( "testSmallFloat" ); + + VALUE ( emback->size() ) EXPECTED ( 30 ); // as many fills were made + + for ( size_t i = 0; i < emback->size(); i++ ) { + const xAOD::TrigEMCluster* cl = emback->at( i ); + VALUE( cl ) NOT_EXPECTED ( nullptr ); + VALUE( cl->nCells() ) EXPECTED( i ); // test regular Aux content + int vi = viewIndexReader( *cl ); + float fl = testFloatReader( *cl ); + float smallFl = testSmallFloatReader( *cl ); + float rawEt = cl->rawEt(); + + std::cout << vi << " " << fl << " " << rawEt << " "; + VALUE( vi ) EXPECTED ( i + 1 ); + VALUE( fl ) EXPECTED ( 0.1 + i ); + VALUE( (smallFl - i) < 0.1 ) EXPECTED ( true ); // precission is poor because we decided to reduce space for this variable + VALUE( rawEt ) EXPECTED ( i - 0.2 ); + } + std::cout << std::endl; +} + +void testTrigCompositeContinerInsert(StoreGateSvc* pStore) { + + auto m = new xAOD::TrigCompositeContainer(); + auto mAux = new xAOD::TrigCompositeAuxContainer(); + m->setStore( mAux ); + m->push_back( new xAOD::TrigComposite() ); + m->push_back( new xAOD::TrigComposite() ); + { + m->at(0)->setDetail<float>("detail1", 0.1); + m->at(0)->setDetail<int>("detail2", 5); + m->at(1)->setDetail<float>("detail1", 1.7); + m->at(1)->setDetail<int>("detail2", 7); + } + + VALUE( pStore->record( m, "EMClustersDecisions" ) ) EXPECTED ( StatusCode::SUCCESS ); + VALUE( pStore->record( mAux, "EMClustersDecisionsAux." ) ) EXPECTED ( StatusCode::SUCCESS ); +} + +void testTrigCompositeContinerReadAndCheck(StoreGateSvc* pStore) { + + const xAOD::TrigCompositeContainer *decisions = nullptr; + VALUE( pStore->retrieve( decisions, "DESERIALISED_EMClustersDecisions") ) EXPECTED ( StatusCode::SUCCESS ); + VALUE ( decisions ) NOT_EXPECTED ( nullptr ); + + + VALUE( decisions->size() ) EXPECTED( 2 ); + VALUE( decisions->at(0)->getDetail<float>("detail1") ) EXPECTED( 0.1 ); + VALUE( decisions->at(1)->getDetail<float>("detail1") ) EXPECTED( 1.7 ); + VALUE( decisions->at(0)->getDetail<int>("detail2") ) EXPECTED( 5 ); + VALUE( decisions->at(1)->getDetail<int>("detail2") ) EXPECTED( 7 ); +} diff --git a/Trigger/TrigSteer/TrigSteering/src/ResultBuilder.cxx b/Trigger/TrigSteer/TrigSteering/src/ResultBuilder.cxx index 15de84eae0ad378110cb21652fca08e0ccf44fe8..c298c238a60d32c6e8d6638ba9ab5fe02f1f7a74 100755 --- a/Trigger/TrigSteer/TrigSteering/src/ResultBuilder.cxx +++ b/Trigger/TrigSteer/TrigSteering/src/ResultBuilder.cxx @@ -614,6 +614,7 @@ ErrorCode ResultBuilder::fillTriggerInfo(const std::vector<SteeringChain*>& acti } +#if 0 //create xAOD::StreamTags std::vector < xAOD::EventInfo::StreamTag > xAODStreamTags; for (auto streamtag : m_uniqueStreams){ @@ -625,6 +626,7 @@ ErrorCode ResultBuilder::fillTriggerInfo(const std::vector<SteeringChain*>& acti xAOD::EventInfo* xeventInfo = const_cast<xAOD::EventInfo*>(constxEventInfo); xeventInfo->setStreamTags(xAODStreamTags); ATH_MSG_VERBOSE("Updated xAOD::StreamTags into xAOD::EventInfo:"); +#endif return HLT::OK; diff --git a/Trigger/TrigSteer/ViewAlgs/src/EventViewCreatorAlgorithm.cxx b/Trigger/TrigSteer/ViewAlgs/src/EventViewCreatorAlgorithm.cxx index 3929467e0389e801badc70d4508103ae34c6f7a5..f952bea82082e2181e2d1cc13b2378b38eca0346 100644 --- a/Trigger/TrigSteer/ViewAlgs/src/EventViewCreatorAlgorithm.cxx +++ b/Trigger/TrigSteer/ViewAlgs/src/EventViewCreatorAlgorithm.cxx @@ -13,7 +13,7 @@ using namespace TrigCompositeUtils; EventViewCreatorAlgorithm::EventViewCreatorAlgorithm( const std::string& name, ISvcLocator* pSvcLocator ) - : InputMakerBase( name, pSvcLocator ) {} +: InputMakerBase( name, pSvcLocator ) {} EventViewCreatorAlgorithm::~EventViewCreatorAlgorithm(){} @@ -31,7 +31,7 @@ StatusCode EventViewCreatorAlgorithm::execute( const EventContext& context ) con // create the output decisions, similar to inputs (copy basic links) std::vector< SG::WriteHandle<TrigCompositeUtils::DecisionContainer> > outputHandles; ATH_CHECK (decisionInputToOutput(context, outputHandles)); - + // make the views auto viewsHandle = SG::makeHandle( m_viewsKey ); auto viewVector1 = std::make_unique< ViewContainer >(); @@ -46,7 +46,7 @@ StatusCode EventViewCreatorAlgorithm::execute( const EventContext& context ) con unsigned int conditionsRun = context.getExtension<Atlas::ExtendedEventContext>().conditionsRun(); //map all RoIs that are stored - std::vector <ElementLink<TrigRoiDescriptorCollection> > RoIsFromDecision; + ElementLinkVector<TrigRoiDescriptorCollection> RoIsFromDecision; // loop over decisions for (auto outputHandle: outputHandles) { @@ -63,39 +63,40 @@ StatusCode EventViewCreatorAlgorithm::execute( const EventContext& context ) con // loop over output decisions in container of outputHandle, follow link to inputDecision for ( auto outputDecision : *outputHandle){ ElementLinkVector<DecisionContainer> inputLinks = getLinkToPrevious(outputDecision); + ATH_MSG_DEBUG( "Got inputLinks with " << inputLinks.size() << " elements" ); // loop over input links as predecessors for (auto input: inputLinks){ - const Decision* inputDecision = *input; - // find the RoI - auto roiELInfo = TrigCompositeUtils::findLink<TrigRoiDescriptorCollection>( inputDecision, m_roisLink.value() ); - auto roiEL = roiELInfo.link; - ATH_CHECK( roiEL.isValid() ); - // check if already found - auto roiIt=find(RoIsFromDecision.begin(), RoIsFromDecision.end(), roiEL); - if ( roiIt == RoIsFromDecision.end() ){ - RoIsFromDecision.push_back(roiEL); // just to keep track of which we have used - const TrigRoiDescriptor* roi = *roiEL; - ATH_MSG_DEBUG("Found RoI:" <<*roi<<" FS="<<roi->isFullscan()); - ATH_MSG_DEBUG( "Positive decisions on RoI, preparing view" ); - - // make the view - ATH_MSG_DEBUG( "Making the View" ); - auto newView = ViewHelper::makeView( name()+"_view", viewCounter++, m_viewFallThrough ); //pointer to the view - viewVector->push_back( newView ); - contexts.emplace_back( context ); - contexts.back().setExtension( Atlas::ExtendedEventContext( viewVector->back(), conditionsRun, roi ) ); - - // link decision to this view - outputDecision->setObjectLink( "view", ElementLink< ViewContainer >(m_viewsKey.key(), viewVector->size()-1 ));//adding view to TC - ATH_MSG_DEBUG( "Adding new view to new decision; storing view in viewVector component " << viewVector->size()-1 ); - ATH_CHECK( linkViewToParent( inputDecision, viewVector->back() ) ); - ATH_CHECK( placeRoIInView( roi, viewVector->back(), contexts.back() ) ); - } - else { - int iview = roiIt-RoIsFromDecision.begin(); - outputDecision->setObjectLink( "view", ElementLink< ViewContainer >(m_viewsKey.key(), iview ) ); //adding view to TC - ATH_MSG_DEBUG( "Adding already mapped view " << iview << " in ViewVector , to new decision"); - } + const Decision* inputDecision = *input; + // find the RoI + auto roiELInfo = TrigCompositeUtils::findLink<TrigRoiDescriptorCollection>( inputDecision, m_roisLink.value() ); + auto roiEL = roiELInfo.link; + ATH_CHECK( roiEL.isValid() ); + // check if already found + auto roiIt=find(RoIsFromDecision.begin(), RoIsFromDecision.end(), roiEL); + if ( roiIt == RoIsFromDecision.end() ){ + RoIsFromDecision.push_back(roiEL); // just to keep track of which we have used + const TrigRoiDescriptor* roi = *roiEL; + ATH_MSG_DEBUG("Found RoI:" <<*roi<<" FS="<<roi->isFullscan()); + ATH_MSG_DEBUG("Positive decisions on RoI, preparing view" ); + + // make the view + ATH_MSG_DEBUG( "Making the View" ); + auto newView = ViewHelper::makeView( name()+"_view", viewCounter++, m_viewFallThrough ); //pointer to the view + viewVector->push_back( newView ); + contexts.emplace_back( context ); + contexts.back().setExtension( Atlas::ExtendedEventContext( viewVector->back(), conditionsRun, roi ) ); + + // link decision to this view + outputDecision->setObjectLink( "view", ElementLink< ViewContainer >(m_viewsKey.key(), viewVector->size()-1 ));//adding view to TC + ATH_MSG_DEBUG( "Adding new view to new decision; storing view in viewVector component " << viewVector->size()-1 ); + ATH_CHECK( linkViewToParent( inputDecision, viewVector->back() ) ); + ATH_CHECK( placeRoIInView( roi, viewVector->back(), contexts.back() ) ); + } + else { + int iview = roiIt - RoIsFromDecision.begin(); + outputDecision->setObjectLink( "view", ElementLink< ViewContainer >(m_viewsKey.key(), iview ) ); //adding view to TC + ATH_MSG_DEBUG( "Adding already mapped view " << iview << " in ViewVector , to new decision"); + } }// loop over previous inputs } // loop over decisions }// loop over output keys @@ -105,9 +106,9 @@ StatusCode EventViewCreatorAlgorithm::execute( const EventContext& context ) con ATH_MSG_DEBUG( "Launching execution in " << viewVector->size() << " views" ); ATH_CHECK( ViewHelper::ScheduleViews( viewVector, // Vector containing views - m_viewNodeName, // CF node to attach views to - context, // Source context - m_scheduler.get() ) ); + m_viewNodeName, // CF node to attach views to + context, // Source context + m_scheduler.get() ) ); // report number of views, stored already when container was created // auto viewsHandle = SG::makeHandle( m_viewsKey ); @@ -132,8 +133,8 @@ StatusCode EventViewCreatorAlgorithm::linkViewToParent( const TrigCompositeUtils if ( m_requireParentView ) { ATH_MSG_ERROR( "Parent view not linked because it could not be found" ); ATH_MSG_ERROR( TrigCompositeUtils::dump( inputDecision, [](const xAOD::TrigComposite* tc){ - return "TC " + tc->name() + ( tc->hasObjectLink("view") ? " has view " : " has no view " ); - } ) ); + return "TC " + tc->name() + ( tc->hasObjectLink("view") ? " has view " : " has no view " ); + } ) ); return StatusCode::FAILURE; } @@ -146,7 +147,7 @@ StatusCode EventViewCreatorAlgorithm::placeRoIInView( const TrigRoiDescriptor* r auto oneRoIColl = std::make_unique< ConstDataVector<TrigRoiDescriptorCollection> >(); oneRoIColl->clear( SG::VIEW_ELEMENTS ); //Don't delete the RoIs oneRoIColl->push_back( roi ); - + //store the RoI in the view auto handle = SG::makeHandle( m_inViewRoIs, context ); ATH_CHECK( handle.setProxyDict( view ) ); diff --git a/Trigger/TrigT1/L1Topo/L1TopoConfig/CMakeLists.txt b/Trigger/TrigT1/L1Topo/L1TopoConfig/CMakeLists.txt index 020069f2440c7b98ae9c7e3b4a5599b0ab3bf3f6..7aec365fe46931ec25c745a77fd400ca5a9f816d 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoConfig/CMakeLists.txt +++ b/Trigger/TrigT1/L1Topo/L1TopoConfig/CMakeLists.txt @@ -12,6 +12,7 @@ atlas_depends_on_subdirs( PUBLIC # External dependencies: find_package( Boost COMPONENTS filesystem thread system ) +find_package( cx_Oracle ) # Component(s) in the package: atlas_add_library( L1TopoConfig diff --git a/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/L1CaloLArTowerEnergy.h b/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/L1CaloLArTowerEnergy.h index fa65b9a691a045f30139a5b1d1be89113c03f9c8..0324a1222bb79718d792a545102b6e7326a0164f 100644 --- a/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/L1CaloLArTowerEnergy.h +++ b/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/L1CaloLArTowerEnergy.h @@ -17,7 +17,7 @@ #include "TrigT1CaloCalibTools/L1CaloCells2TriggerTowers.h" #include "TrigT1CaloCondSvc/L1CaloCondSvc.h" #include "CaloIdentifier/CaloIdManager.h" -#include "LArRecConditions/ILArBadChanTool.h" +#include "LArRecConditions/ILArBadFebMasker.h" #include "LArCabling/LArCablingLegacyService.h" #include "LArIdentifier/LArOnlineID.h" @@ -76,7 +76,7 @@ private: CaloTriggerTowerService* m_ttService; ToolHandle<LVL1::IL1CaloCells2TriggerTowers> m_cells2tt; - ToolHandle< ILArBadChanTool > m_badChannelTool; // Handle to badChannelTool + ToolHandle< ILArBadFebMasker > m_badFebMasker; // Handle to badChannelTool ToolHandle<LArCablingLegacyService> m_larCablingSvc; // Handle to LarCablingService ToolHandle<LVL1::IL1TriggerTowerTool> m_ttTool; // Handle to L1TriggerTowerTool diff --git a/Trigger/TrigT1/TrigT1CaloCalibTools/src/L1CaloLArTowerEnergy.cxx b/Trigger/TrigT1/TrigT1CaloCalibTools/src/L1CaloLArTowerEnergy.cxx index f355081bced84d5191abee0225136e14305382c4..3ff8294621b8b41bc6ef48dca1b503877ab0e1cf 100644 --- a/Trigger/TrigT1/TrigT1CaloCalibTools/src/L1CaloLArTowerEnergy.cxx +++ b/Trigger/TrigT1/TrigT1CaloCalibTools/src/L1CaloLArTowerEnergy.cxx @@ -3,6 +3,7 @@ */ #include "TrigT1CaloCalibTools/L1CaloLArTowerEnergy.h" +#include "LArRecConditions/LArBadChannelCont.h" namespace LVL1{ @@ -14,7 +15,7 @@ namespace LVL1{ m_LArOnlineHelper(nullptr), m_ttService(nullptr), m_cells2tt("LVL1::L1CaloCells2TriggerTowers/L1CaloCells2TriggerTowers"), - m_badChannelTool("LArBadChanLegacyTool"), + m_badFebMasker("LArBadFebMasker"), m_larCablingSvc("LArCablingLegacyService"), m_ttTool("LVL1::L1TriggerTowerTool/LVL1::L1TriggerTowerTool") { @@ -43,14 +44,11 @@ namespace LVL1{ return StatusCode::FAILURE; } - sc = m_cells2tt.retrieve(); - if(sc.isFailure()){ATH_MSG_ERROR("Cannot get L1CaloCells2TriggerTowers !");return sc;} + ATH_CHECK(m_cells2tt.retrieve()); - sc=m_badChannelTool.retrieve(); - if(sc.isFailure()){ATH_MSG_ERROR( "Could not retrieve BadChannelTool" );return sc;} + ATH_CHECK(m_badFebMasker.retrieve()); - sc=m_larCablingSvc.retrieve(); - if(sc.isFailure()){ATH_MSG_ERROR( "Could not retrieve LArCablingService" );return sc;} + ATH_CHECK(m_larCablingSvc.retrieve()); //Retrieve cabling & tt services @@ -243,7 +241,7 @@ namespace LVL1{ { HWIdentifier chid = m_larCablingSvc->createSignalChannelID(*it); HWIdentifier febId = m_LArOnlineHelper->feb_Id(chid); - LArBadFeb febstatus = m_badChannelTool->febStatus(febId); + LArBadFeb febstatus = m_badFebMasker->febStatus(febId); bool deadReadout = febstatus.deadReadout(); bool desactivatedInOKS = febstatus.deactivatedInOKS(); diff --git a/Trigger/TrigTools/TrigFTKTrackConverter/python/TrigFTKTrackConverter_Config.py b/Trigger/TrigTools/TrigFTKTrackConverter/python/TrigFTKTrackConverter_Config.py index 0030fd1b73887eda8cb5e53f996f969399b9b92e..92dd11e939e88f103940b75ef0de7e9abf47d5cf 100644 --- a/Trigger/TrigTools/TrigFTKTrackConverter/python/TrigFTKTrackConverter_Config.py +++ b/Trigger/TrigTools/TrigFTKTrackConverter/python/TrigFTKTrackConverter_Config.py @@ -68,7 +68,7 @@ class ConfiguredTrigFTKTool(TrigFTKClusterConverterTool): def __init__(self, name = "ConfiguredTrigFTKClusterConverterTool"): TrigFTKClusterConverterTool.__init__(self, name) from AthenaCommon.AppMgr import ToolSvc - from SiLorentzAngleSvc.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup + from SiLorentzAngleTool.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup sctLorentzAngleToolSetup = SCTLorentzAngleToolSetup() TrigFTKClusterConverterTool.PixelLorentzAngleTool = ToolSvc.InDetTrigPixelLorentzAngleTool TrigFTKClusterConverterTool.SCTLorentzAngleTool = sctLorentzAngleToolSetup.SCTLorentzAngleTool diff --git a/Trigger/TrigTools/TrigInDetConf/python/TrigInDetRecToolsFTK.py b/Trigger/TrigTools/TrigInDetConf/python/TrigInDetRecToolsFTK.py index c62802a90a8d93ee406513101619b2c510fb9250..9cc70329891002abc20cd4d13989095e9ea9fd59 100644 --- a/Trigger/TrigTools/TrigInDetConf/python/TrigInDetRecToolsFTK.py +++ b/Trigger/TrigTools/TrigInDetConf/python/TrigInDetRecToolsFTK.py @@ -54,7 +54,7 @@ if (InDetTrigFlags.doPrintConfigurables()): print InDetTrigBroadPixelClusterOnTrackToolFTK # SiLorentzAngleTool for SCT -from SiLorentzAngleSvc.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup +from SiLorentzAngleTool.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup sctLorentzAngleToolSetup = SCTLorentzAngleToolSetup() InDetTrigBroadSCT_ClusterOnTrackToolFTK = FTK_SCTClusterOnTrackTool("InDetTrigBroadSCT_ClusterOnTrackToolFTK", diff --git a/Trigger/TrigTools/TrigInDetTrackFitter/python/TrigInDetTrackFitter_Config.py b/Trigger/TrigTools/TrigInDetTrackFitter/python/TrigInDetTrackFitter_Config.py index 0af00a77642ee1a8c6fa2258f940a986bcdb9058..7930fe15ed88a6de4a4b398c91323c068a3e36f8 100644 --- a/Trigger/TrigTools/TrigInDetTrackFitter/python/TrigInDetTrackFitter_Config.py +++ b/Trigger/TrigTools/TrigInDetTrackFitter/python/TrigInDetTrackFitter_Config.py @@ -68,7 +68,7 @@ class ConfiguredTrigL2_InDetRotCreator(Trk__RIO_OnTrackCreator) : from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags # SiLorentzAngleTool - from SiLorentzAngleSvc.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup + from SiLorentzAngleTool.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup sctLorentzAngleToolSetup = SCTLorentzAngleToolSetup() if InDetTrigFlags.doCommissioning() : diff --git a/Trigger/TrigTools/TrigOnlineSpacePointTool/python/TrigOnlineSpacePointTool_Config.py b/Trigger/TrigTools/TrigOnlineSpacePointTool/python/TrigOnlineSpacePointTool_Config.py index b55388c2af0bf1ea6a5ebc13014f8b15be85c3bc..7d3225a1a0938f65f9e04dd2e6a764c69e5fbfde 100644 --- a/Trigger/TrigTools/TrigOnlineSpacePointTool/python/TrigOnlineSpacePointTool_Config.py +++ b/Trigger/TrigTools/TrigOnlineSpacePointTool/python/TrigOnlineSpacePointTool_Config.py @@ -25,7 +25,7 @@ class ConfiguredOnlineSpacePointProviderTool(OnlineSpacePointProviderTool) : from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags # --- SiLorentzAngleTool - from SiLorentzAngleSvc.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup + from SiLorentzAngleTool.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup sctLorentzAngleToolSetup = SCTLorentzAngleToolSetup() InDetL2TrigClusterMakerTool = InDet__ClusterMakerTool( name = "InDetL2TrigClusterMakerTool", @@ -59,7 +59,7 @@ class ConfiguredOnlineSpacePointProviderTool(OnlineSpacePointProviderTool) : ToolSvc += InDetL2TrigSCT_ClusteringTool # SiLorentzAngleTool for FastSCT_RodDecoder - from SiLorentzAngleSvc.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup + from SiLorentzAngleTool.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup sctLorentzAngleToolSetup = SCTLorentzAngleToolSetup() # FastSCT_RodDecoder diff --git a/Trigger/TrigTruthEvent/TrigTruthEventTPCnv/share/TrigInDetTrackTruthCnv_p1_test.ref b/Trigger/TrigTruthEvent/TrigTruthEventTPCnv/share/TrigInDetTrackTruthCnv_p1_test.ref index 8633d8ace9b4883a00f6e29e68937582b9b5e684..4a7c11977bb121447c32603da54a83a704e8898b 100644 --- a/Trigger/TrigTruthEvent/TrigTruthEventTPCnv/share/TrigInDetTrackTruthCnv_p1_test.ref +++ b/Trigger/TrigTruthEvent/TrigTruthEventTPCnv/share/TrigInDetTrackTruthCnv_p1_test.ref @@ -5,4 +5,4 @@ HistogramPersis...WARNING Histograms saving not required. ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr Ready test1 -HepMcParticleLink INFO find_hostkey: Using TruthEvent as McEventCollection key for this job +HepMcParticleLink INFO find_proxy: Using TruthEvent as McEventCollection key for this job diff --git a/Trigger/TrigTruthEvent/TrigTruthEventTPCnv/share/TrigInDetTrackTruthMapCnv_p1_test.ref b/Trigger/TrigTruthEvent/TrigTruthEventTPCnv/share/TrigInDetTrackTruthMapCnv_p1_test.ref index 8633d8ace9b4883a00f6e29e68937582b9b5e684..4a7c11977bb121447c32603da54a83a704e8898b 100644 --- a/Trigger/TrigTruthEvent/TrigTruthEventTPCnv/share/TrigInDetTrackTruthMapCnv_p1_test.ref +++ b/Trigger/TrigTruthEvent/TrigTruthEventTPCnv/share/TrigInDetTrackTruthMapCnv_p1_test.ref @@ -5,4 +5,4 @@ HistogramPersis...WARNING Histograms saving not required. ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr Ready test1 -HepMcParticleLink INFO find_hostkey: Using TruthEvent as McEventCollection key for this job +HepMcParticleLink INFO find_proxy: Using TruthEvent as McEventCollection key for this job diff --git a/Trigger/TrigTruthEvent/TrigTruthEventTPCnv/test/TrigInDetTrackTruthCnv_p1_test.cxx b/Trigger/TrigTruthEvent/TrigTruthEventTPCnv/test/TrigInDetTrackTruthCnv_p1_test.cxx index 4aeac823ed6775766f7eebc1f5af8263f4f142a9..d7ec5861b68b59e9d6289d4c5f1b940f4151d6f6 100644 --- a/Trigger/TrigTruthEvent/TrigTruthEventTPCnv/test/TrigInDetTrackTruthCnv_p1_test.cxx +++ b/Trigger/TrigTruthEvent/TrigTruthEventTPCnv/test/TrigInDetTrackTruthCnv_p1_test.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // $Id$ @@ -46,29 +46,22 @@ public: for (size_t i = 0; i < p1.m_nr_common_hits.size(); i++) ::compare (p1.m_nr_common_hits[i], p2.m_nr_common_hits[i]); assert (p1.m_family_tree == p2.m_family_tree); - + } - static void set (TrigInDetTrackTruth& p) + static void set (TrigInDetTrackTruth& p, std::vector<HepMC::GenParticle*>& genPartVector) { - p.m_true_part_vec.emplace_back (1001, 10); - p.m_true_part_vec.emplace_back (1002, 11); - p.m_true_part_vec.emplace_back (1003, 12); - int nstat = 4; p.m_nr_common_hits.resize (nstat); for (int i=0; i < nstat; i++) { - p.m_nr_common_hits[i][TrigIDHitStats::PIX] = 12 + i*10; - p.m_nr_common_hits[i][TrigIDHitStats::SCT] = 13 + i*10; - p.m_nr_common_hits[i][TrigIDHitStats::TRT] = 14 + i*10; + HepMcParticleLink particleLink(genPartVector.at(i)->barcode(),genPartVector.at(i)->parent_event()->event_number()); + TrigIDHitStats tihs; + tihs[TrigIDHitStats::PIX] = 12 + i*10; + tihs[TrigIDHitStats::SCT] = 13 + i*10; + tihs[TrigIDHitStats::TRT] = 14 + i*10; + p.addMatch(particleLink, tihs); + p.updateFamilyTree(); } - - p.m_family_tree.emplace_back (0, 1); - p.m_family_tree.emplace_back (0, 2); - - p.m_best_match_hits = 0; - p.m_best_Si_match_hits = 1; - p.m_best_TRT_match_hits = 2; } }; @@ -105,8 +98,8 @@ void test1(std::vector<HepMC::GenParticle*>& genPartVector) Athena_test::Leakcheck check; TrigInDetTrackTruth trans1; - TrigInDetTrackTruthCnv_p1_test::set (trans1); - + TrigInDetTrackTruthCnv_p1_test::set (trans1, genPartVector); + testit (trans1); } diff --git a/Trigger/TrigTruthEvent/TrigTruthEventTPCnv/test/TrigInDetTrackTruthMapCnv_p1_test.cxx b/Trigger/TrigTruthEvent/TrigTruthEventTPCnv/test/TrigInDetTrackTruthMapCnv_p1_test.cxx index dbdec220123123258a5de4ba6533b2b1a38f7ba2..179db44c05e70d8a6754f5da4f9c8bf3c0017ef3 100644 --- a/Trigger/TrigTruthEvent/TrigTruthEventTPCnv/test/TrigInDetTrackTruthMapCnv_p1_test.cxx +++ b/Trigger/TrigTruthEvent/TrigTruthEventTPCnv/test/TrigInDetTrackTruthMapCnv_p1_test.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // $Id$ @@ -48,30 +48,22 @@ public: for (size_t i = 0; i < p1.m_nr_common_hits.size(); i++) ::compare (p1.m_nr_common_hits[i], p2.m_nr_common_hits[i]); assert (p1.m_family_tree == p2.m_family_tree); - + } - static void set (TrigInDetTrackTruth& p, int ndx) + static void set (TrigInDetTrackTruth& p, std::vector<HepMC::GenParticle*>& genPartVector, int ndx) { - int o = ndx*10; - p.m_true_part_vec.emplace_back (1001, 10+o); - p.m_true_part_vec.emplace_back (1002, 11+o); - p.m_true_part_vec.emplace_back (1003, 12+o); - - int nstat = 4; + int nstat = 1; p.m_nr_common_hits.resize (nstat); - for (int i=0; i < nstat; i++) { - p.m_nr_common_hits[i][TrigIDHitStats::PIX] = 12 + i*10 + o*10; - p.m_nr_common_hits[i][TrigIDHitStats::SCT] = 13 + i*10 + o*10; - p.m_nr_common_hits[i][TrigIDHitStats::TRT] = 14 + i*10 + o*10; + for (int i=ndx; i < nstat; i++) { + HepMcParticleLink particleLink(genPartVector.at(i)->barcode(),genPartVector.at(i)->parent_event()->event_number()); + TrigIDHitStats tihs; + tihs[TrigIDHitStats::PIX] = 12 + i*10 + ndx*100; + tihs[TrigIDHitStats::SCT] = 13 + i*10 + ndx*100; + tihs[TrigIDHitStats::TRT] = 14 + i*10 + ndx*100; + p.addMatch(particleLink, tihs); + p.updateFamilyTree(); } - - p.m_family_tree.emplace_back (0, 1); - p.m_family_tree.emplace_back (0, 2); - - p.m_best_match_hits = 0; - p.m_best_Si_match_hits = 1; - p.m_best_TRT_match_hits = 2; } }; @@ -135,17 +127,17 @@ void test1(std::vector<HepMC::GenParticle*>& genPartVector) //TrigInDetTrackTruthMapCnv_p1_test::set (trans1); TrigInDetTrackTruth t1; - TrigInDetTrackTruthCnv_p1_test::set (t1, 1); + TrigInDetTrackTruthCnv_p1_test::set (t1, genPartVector, 1); trans1.addMatch (collp, 1, t1); TrigInDetTrackTruth t2; - TrigInDetTrackTruthCnv_p1_test::set (t2, 2); + TrigInDetTrackTruthCnv_p1_test::set (t2, genPartVector, 2); trans1.addMatch (collp, 2, t2); TrigInDetTrackTruth t3; - TrigInDetTrackTruthCnv_p1_test::set (t3, 3); + TrigInDetTrackTruthCnv_p1_test::set (t3, genPartVector, 3); trans1.addMatch (collp, 3, t3); - + testit (trans1); } diff --git a/Trigger/TrigValidation/TrigAnalysisTest/test/test_mc_ntup_physval_grid.sh b/Trigger/TrigValidation/TrigAnalysisTest/test/test_mc_ntup_physval_grid.sh index a4c017b69e8a177d47592529f565213eb1453888..57fb149133045d06c561d9ab746f21f3e11b1ad8 100755 --- a/Trigger/TrigValidation/TrigAnalysisTest/test/test_mc_ntup_physval_grid.sh +++ b/Trigger/TrigValidation/TrigAnalysisTest/test/test_mc_ntup_physval_grid.sh @@ -16,31 +16,33 @@ export NAME="mc_ntup_physval_grid" export JOB_LOG="athena.log" export TEST="TrigAnalysisTest" -export NEVT=10 +export NEVT=100 export DS='/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigAnalysisTest/AthenaTrigAOD_TrigEDMandTDTCheck_MC_pp_v7_chain/AOD.pool.root' Reco_tf.py --inputAODFile=${DS} --preExec "all:from InDetPhysValMonitoring.InDetPhysValJobProperties import InDetPhysValFlags; InDetPhysValFlags.doValidateTightPrimaryTracks.set_Value_and_Lock(True);" --skipEvents="0" --maxEvents=${NEVT} --valid="True" --jobNumber="1" --validationFlags doExample,doMET,doPFlow,doEgamma,doInDet,doTau,doJet,doBtag,doZee,doMuon,doTrigEgamma,doTrigBphys,doTrigMET,doTrigJet,doTrigMuon,doTrigHLTResult,doTrigCalo,doTrigMinBias,doTrigTau,doTrigIDtrk,doTrigBjet --outputNTUP_PHYSVALFile="NTUP_PHYSVAL.pool.root" > output.log echo "art-result: $? PhysVal" +ArtPackage=$1 +ArtJobName=$2 +# +echo " ArtPackage = ${ArtPackage}" +echo " ArtJobName = ${ArtJobName}" +# +art.py download ${ArtPackage} ${ArtJobName} +echo "art-result: $? ref-download" +CMD="find . -maxdepth 1 -name "ref-*"" +refdir=$(eval "${CMD}") +echo "Reference directory" +echo ${refdir} -# We need to place a reference file on cvmfs -#physval_make_web_display.py --ratio --reffile Ref:PHYSVAL_all.root --title Test PHYSVAL_all.root --outdir PHYSVAL_WEB + +# make webdisplay mkdir PHYSVAL_WEB -#domains="BTag Ele Gam IDTrk Jets Muons MET PFlow TopoClusters" -###domains="BTag Electron IDPerformanceMon Jets MET Muons PFlow Photon Summary Tau TopoClusters" -###doTrigEgamma,doTrigBphys,doTrigMET,doTrigJet,doTrigMuon,doTrigHLTResult,doTrigCalo,doTrigMinBias,doTrigTau,doTrigIDtrk,doTrigBjet -#for slice in ${domains} -#do -# physval_make_web_display.py --ratio --reffile Ref:/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/DerivationFrameworkPhysicsValidation/PHYSVAL_all_reference.root --title Test PHYSVAL_all.root --outdir PHYSVAL_WEB/${slice} --startpath ${slice} - physval_make_web_display.py --ratio --drawopt HISTPE --refdrawopt HIST --reffile Ref:NTUP_PHYSVAL.pool.root --title Test --outdir PHYSVAL_WEB --startpath run_1/HLT NTUP_PHYSVAL.pool.root -#done +physval_make_web_display.py --ratio --drawopt HISTPE --refdrawopt HIST --reffile Ref:${refdir}/NTUP_PHYSVAL.pool.root --title Test --outdir PHYSVAL_WEB --startpath run_1/HLT NTUP_PHYSVAL.pool.root + echo "art-result: $? web" -#ArtPackage=$1 -#ArtJobName=$2 -#art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName} -#echo "art-result: $? Diff" diff --git a/Trigger/TrigValidation/TrigAnalysisTest/test/test_run1_bstoesdaod_build.sh b/Trigger/TrigValidation/TrigAnalysisTest/test/test_run1_bstoesdaod_build.sh index 4a3fa15424b2907ec1621a19f0358509de3b2026..b41ce19b829b9ec2d279cd035fb8e36b1c43e2ad 100755 --- a/Trigger/TrigValidation/TrigAnalysisTest/test/test_run1_bstoesdaod_build.sh +++ b/Trigger/TrigValidation/TrigAnalysisTest/test/test_run1_bstoesdaod_build.sh @@ -28,6 +28,7 @@ export COST_MONITORING="False" export TEST="TrigAnalysisTest" export EVENTS="5" export JOB_LOG="athena.log" +export RECO_LOG="log.RAWtoESD" Reco_tf.py --maxEvents $EVENTS \ --AMITag 'q222' \ @@ -41,7 +42,7 @@ Reco_tf.py --maxEvents $EVENTS \ --outputAODFile 'AOD.pool.root' \ --outputHISTFile 'HIST.root' &> ${JOB_LOG} -N_CONTAINERS=$(grep -o HLT_xAOD__ ${JOB_LOG} | wc -l) +N_CONTAINERS=$(grep -o HLT_xAOD__ ${RECO_LOG} | wc -l) if [ $N_CONTAINERS -gt 0 ]; then echo "xAOD Container Check: ${N_CONTAINERS} xAOD HLT containers found. OK."; echo "art-result: xAODContainers 0" diff --git a/Trigger/TrigValidation/TrigUpgradeTest/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigValidation/TrigUpgradeTest/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..3ad59ab20068ab36930920ead3202d53ceb8c383 --- /dev/null +++ b/Trigger/TrigValidation/TrigUpgradeTest/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Trigger/TrigValidation/TrigUpgradeTest diff --git a/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt b/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt index 54d8c8d0d79920d65de0b5da23538f230d087b4b..27a0c889194d815d2973eccea04ee4c3d0da632a 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt +++ b/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt @@ -138,8 +138,8 @@ atlas_add_test( jetMenu file( MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_fullMenu ) atlas_add_test( fullMenu - SCRIPT test/test_full_menu.sh - EXTRA_PATTERNS "-s TriggerSummaryStep.*HLT_.*|TriggerMonitorFinal.*HLT_.*|TrigSignatureMoniMT.*HLT_.*" + SCRIPT test/test_full_menu_build.sh + POST_EXEC_SCRIPT "trig-art-result-parser.sh fullMenu.log \"athena CheckLog RegTest\"" PROPERTIES TIMEOUT 1000 PROPERTIES WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_fullMenu ) @@ -174,8 +174,8 @@ atlas_add_test( EmuStepProcessing file( MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_NewJO ) atlas_add_test( NewJO - SCRIPT test/test_newJO.sh - EXTRA_PATTERNS "-s .*ERROR (?\!attempt to add a duplicate).*|.*FATAL.*|.*newJOtest.pkl.*|TrigSignatureMoniMT .*INFO.*" + SCRIPT test/test_newJO_build.sh + POST_EXEC_SCRIPT "trig-art-result-parser.sh NewJO.log \"Configuration athena CheckLog RegTest\"" PROPERTIES TIMEOUT 1000 PROPERTIES WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_NewJO ) @@ -243,7 +243,8 @@ atlas_add_test( met_menu EXTRA_PATTERNS "-s TrigSignatureMoniMT.*HLT_.*" PROPERTIES WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_met_menu ) + atlas_install_joboptions( share/*.py ) -atlas_install_data( share/*.ref ) +atlas_install_data( share/*.ref share/*.conf ) atlas_install_python_modules( python/*.py ) -atlas_install_scripts( test/test* ) +atlas_install_scripts( test/exec*.sh test/test*.sh ) diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/HLTSignatureConfig.py b/Trigger/TrigValidation/TrigUpgradeTest/python/HLTSignatureConfig.py index fcadcca4ad9d3186675e887d74839bc86945d8c6..2786f7d6f25a16688ae4deee99bb7884d05bc0dd 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/python/HLTSignatureConfig.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/python/HLTSignatureConfig.py @@ -120,9 +120,9 @@ def elStep2Sequence(ConfigFlags, name): elstep2_sequence = seqAND(name+"elSeqStep2", [elIM2, elAlg2]) return (elstep2_sequence, elIM2,elAlg2.Output) -def elStep2MenuSequence(name): +def elStep2MenuSequence(name, hyponame): (elstep2_sequence, elIM2, seqOut) = RecoFragmentsPool.retrieve(elStep2Sequence,ConfigFlags,name=name) - elHypo2 = ElGamHypo(name+"Step2ElHypo") + elHypo2 = ElGamHypo(hyponame+"Step2ElHypo") elHypo2.Input = seqOut return MenuSequence( Maker=elIM2, Sequence=elstep2_sequence, Hypo=elHypo2, HypoToolGen=ElTestHypoTool) diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/InDetConfig.py b/Trigger/TrigValidation/TrigUpgradeTest/python/InDetConfig.py index 1e3a220a165228dfe7b2bb9c4a31c194ca261d45..3c78e43548369302a7c24e16b155cb710c5c3561 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/python/InDetConfig.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/python/InDetConfig.py @@ -4,6 +4,31 @@ from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator +class InDetCacheNames: + Pixel_ClusterKey = "PixelTrigClustersCache" + SCT_ClusterKey = "SCT_ClustersCache" + SpacePointCachePix = "PixelSpacePointCache" + SpacePointCacheSCT = "SctSpacePointCache" + SCTRDOCacheKey = "SctRDOCache" + PixRDOCacheKey = "PixRDOCache" + +def InDetIDCCacheCreatorCfg(): + #Create IdentifiableCaches + acc = ComponentAccumulator() + from InDetPrepRawDataFormation.InDetPrepRawDataFormationConf import InDet__CacheCreator + InDetCacheCreatorTrig = InDet__CacheCreator(name = "InDetCacheCreatorTrig", + Pixel_ClusterKey = InDetCacheNames.Pixel_ClusterKey, + SCT_ClusterKey = InDetCacheNames.SCT_ClusterKey, + SpacePointCachePix = InDetCacheNames.SpacePointCachePix, + SpacePointCacheSCT = InDetCacheNames.SpacePointCacheSCT, + SCTRDOCacheKey = InDetCacheNames.SCTRDOCacheKey, + PixRDOCacheKey = InDetCacheNames.PixRDOCacheKey) + + acc.addEventAlgo( InDetCacheCreatorTrig ) + return acc + + + #Set up ID GeoModel def InDetGMConfig( flags ): acc = ComponentAccumulator() @@ -116,12 +141,12 @@ def TrigInDetCondConfig( flags ): acc.addCondAlgo(SCT_SiliconTempCondAlg(UseState = dcsTool.ReadAllDBFolders, DCSConditionsTool = dcsTool)) - from SiLorentzAngleSvc.SiLorentzAngleSvcConf import SCTSiLorentzAngleCondAlg + from SiLorentzAngleTool.SiLorentzAngleToolConf import SCTSiLorentzAngleCondAlg acc.addCondAlgo(SCTSiLorentzAngleCondAlg(name = "SCTSiLorentzAngleCondAlg", SiConditionsTool = sctSiliconConditionsTool, UseMagFieldSvc = True, UseMagFieldDcs = False)) - from SiLorentzAngleSvc.SiLorentzAngleSvcConf import SiLorentzAngleTool + from SiLorentzAngleTool.SiLorentzAngleToolConf import SiLorentzAngleTool SCTLorentzAngleTool = SiLorentzAngleTool(name = "SCTLorentzAngleTool", DetectorName="SCT", SiLorentzAngleCondData="SCTSiLorentzAngleCondData") SCTLorentzAngleTool.UseMagFieldSvc = True #may need also MagFieldSvc instance acc.addPublicTool(SCTLorentzAngleTool) @@ -169,21 +194,21 @@ def TrigInDetCondConfig( flags ): from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelConfigCondAlg acc.addCondAlgo(PixelConfigCondAlg(name="PixelConfigCondAlg", UseDeadMap=False, ReadDeadMapKey=PixelDeadMapFolder)) - from SiPropertiesSvc.SiPropertiesSvcConf import PixelSiPropertiesCondAlg + from SiPropertiesTool.SiPropertiesToolConf import PixelSiPropertiesCondAlg acc.addCondAlgo(PixelSiPropertiesCondAlg(name="PixelSiPropertiesCondAlg")) - from SiPropertiesSvc.SiPropertiesSvcConf import SiPropertiesTool + from SiPropertiesTool.SiPropertiesToolConf import SiPropertiesTool TrigSiPropertiesTool = SiPropertiesTool(name="PixelSiPropertiesTool", DetectorName="Pixel", ReadKey="PixelSiliconPropertiesVector") acc.addPublicTool(TrigSiPropertiesTool) - from SiLorentzAngleSvc.SiLorentzAngleSvcConf import PixelSiLorentzAngleCondAlg + from SiLorentzAngleTool.SiLorentzAngleToolConf import PixelSiLorentzAngleCondAlg acc.addCondAlgo(PixelSiLorentzAngleCondAlg(name="PixelSiLorentzAngleCondAlg", SiPropertiesTool=TrigSiPropertiesTool, UseMagFieldSvc = True, UseMagFieldDcs = False)) - from SiLorentzAngleSvc.SiLorentzAngleSvcConf import SiLorentzAngleTool + from SiLorentzAngleTool.SiLorentzAngleToolConf import SiLorentzAngleTool TrigPixelLorentzAngleTool = SiLorentzAngleTool(name = "PixelLorentzAngleTool", DetectorName="Pixel", SiLorentzAngleCondData="PixelSiLorentzAngleCondData") acc.addPublicTool(TrigPixelLorentzAngleTool) @@ -203,17 +228,6 @@ def TrigInDetConfig( flags, roisKey="EMRoIs" ): acc.merge(TrigInDetCondConfig(flags)) from InDetRecExample.InDetKeys import InDetKeys - #Create IdentifiableCaches - from InDetPrepRawDataFormation.InDetPrepRawDataFormationConf import InDet__CacheCreator - InDetCacheCreatorTrigViews = InDet__CacheCreator(name = "InDetCacheCreatorTrigViews", - Pixel_ClusterKey = "PixelTrigClustersCache", - SCT_ClusterKey = "SCT_ClustersCache", - SpacePointCachePix = "PixelSpacePointCache", - SpacePointCacheSCT = "SctSpacePointCache", - SCTRDOCacheKey = "SctRDOCache", - PixRDOCacheKey = "PixRDOCache",) - - acc.addCondAlgo( InDetCacheCreatorTrigViews ) #Only add raw data decoders if we're running over raw data isMC = flags.Input.isMC @@ -238,7 +252,7 @@ def TrigInDetConfig( flags, roisKey="EMRoIs" ): #OutputLevel = INFO) InDetPixelRawDataProvider.isRoI_Seeded = True InDetPixelRawDataProvider.RoIs = roisKey - InDetPixelRawDataProvider.RDOCacheKey = InDetCacheCreatorTrigViews.PixRDOCacheKey + InDetPixelRawDataProvider.RDOCacheKey = InDetCacheNames.PixRDOCacheKey acc.addEventAlgo(InDetPixelRawDataProvider) @@ -262,7 +276,7 @@ def TrigInDetConfig( flags, roisKey="EMRoIs" ): #OutputLevel = INFO) InDetSCTRawDataProvider.isRoI_Seeded = True InDetSCTRawDataProvider.RoIs = roisKey - InDetSCTRawDataProvider.RDOCacheKey = InDetCacheCreatorTrigViews.SCTRDOCacheKey + InDetSCTRawDataProvider.RDOCacheKey = InDetCacheNames.SCTRDOCacheKey acc.addEventAlgo(InDetSCTRawDataProvider) @@ -337,7 +351,7 @@ def TrigInDetConfig( flags, roisKey="EMRoIs" ): ClustersName = "PixelTrigClusters",)# OutputLevel = INFO) InDetPixelClusterization.isRoI_Seeded = True InDetPixelClusterization.RoIs = roisKey - InDetPixelClusterization.ClusterContainerCacheKey = InDetCacheCreatorTrigViews.Pixel_ClusterKey + InDetPixelClusterization.ClusterContainerCacheKey = InDetCacheNames.Pixel_ClusterKey acc.addEventAlgo(InDetPixelClusterization) @@ -382,7 +396,7 @@ def TrigInDetConfig( flags, roisKey="EMRoIs" ): conditionsTool = InDetSCT_ConditionsSummaryToolWithoutFlagged) InDetSCT_Clusterization.isRoI_Seeded = True InDetSCT_Clusterization.RoIs = roisKey - InDetSCT_Clusterization.ClusterContainerCacheKey = InDetCacheCreatorTrigViews.SCT_ClusterKey + InDetSCT_Clusterization.ClusterContainerCacheKey = InDetCacheNames.SCT_ClusterKey acc.addEventAlgo(InDetSCT_Clusterization) @@ -405,8 +419,8 @@ def TrigInDetConfig( flags, roisKey="EMRoIs" ): ProcessPixels = DetFlags.haveRIO.pixel_on(), ProcessSCTs = DetFlags.haveRIO.SCT_on(), ProcessOverlaps = DetFlags.haveRIO.SCT_on(), - SpacePointCacheSCT = InDetCacheCreatorTrigViews.SpacePointCacheSCT, - SpacePointCachePix = InDetCacheCreatorTrigViews.SpacePointCachePix,) + SpacePointCacheSCT = InDetCacheNames.SpacePointCacheSCT, + SpacePointCachePix = InDetCacheNames.SpacePointCachePix,) #OutputLevel=INFO) acc.addEventAlgo(InDetSiTrackerSpacePointFinder) @@ -480,8 +494,8 @@ if __name__ == "__main__": acc.merge(TrigBSReadCfg(ConfigFlags)) acc.merge( TrigInDetConfig( ConfigFlags ) ) - from RegionSelector.RegSelConfig import RegSelConfig - rsc, regSel = RegSelConfig( ConfigFlags ) + from RegionSelector.RegSelConfig import regSelCfg + rsc, regSel = regSelCfg( ConfigFlags ) regSel.enableCalo = False # turn off calo, certainly a better way to do this... acc.merge( rsc ) acc.addService(regSel) diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/InDetPT.py b/Trigger/TrigValidation/TrigUpgradeTest/python/InDetPT.py new file mode 100644 index 0000000000000000000000000000000000000000..ef33054cedfb73ac5e8401213afacfef6e34fc56 --- /dev/null +++ b/Trigger/TrigValidation/TrigUpgradeTest/python/InDetPT.py @@ -0,0 +1,132 @@ +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# +# Setup of precision tracking + +def makeInDetPrecisionTracking( whichSignature, verifier = False, inputFTFtracks='TrigFastTrackFinder_Tracks', outputTrackPrefixName = "InDetTrigPT" ): +#def makeInDetPrecisionTracking( whichSignature, inputFTFtracks='TrigFastTrackFinder_Tracks', outputTrackPrefixName = "InDetTrigPT" ): + from AthenaCommon.AppMgr import ToolSvc + +#def makeInDetPrecisionTracking( whichSignature, inputFTFtracks, outputTrackPrefixName ): + #If signature specified add suffix to the algorithms + signature = "_" + whichSignature if whichSignature else '' + + #Name settings + + #This first part is for ambiguity solver tracks + nameAmbiTrackCollection = outputTrackPrefixName + "Tracks" + signature + nameAmbiTrackParticles = outputTrackPrefixName + "TrackParticles" + signature + + + + #Potentialy other algs with more collections? Make a list just in case + nameTrackCollections = [ nameAmbiTrackCollection ] + nameTrackParticles = [ nameAmbiTrackParticles ] + + + + #If run in views need to check data dependancies! + #if runInViews: + #FIXME: check whether the passed argument is a verifier? + #NOTE: this seems necessary only when PT is called from a different view than FTF otherwise causes stalls + if verifier: + verifier.DataObjects += [ ( 'InDet::PixelGangedClusterAmbiguities' , 'StoreGateSvc+TrigPixelClusterAmbiguitiesMap' ), + ( 'TrackCollection' , 'StoreGateSvc+' + inputFTFtracks ) ] + + + + + # + # --- Ambiguity solver algorithm + # + #TODO:Check whether InDet alg have to be replaced by new ones + from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigTrackSummaryTool + from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigExtrapolator + from InDetTrackScoringTools.InDetTrackScoringToolsConf import InDet__InDetAmbiScoringTool + InDetTrigMTAmbiScoringTool = InDet__InDetAmbiScoringTool( name = 'InDetTrigMTScoringTool' + signature , + Extrapolator = InDetTrigExtrapolator, + InputEmClusterContainerName = '', #need to be reset to empty string + doEmCaloSeed = False, + SummaryTool = InDetTrigTrackSummaryTool) + + + + ToolSvc += InDetTrigMTAmbiScoringTool + + from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigAmbiTrackSelectionTool + from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigTrackFitter + from TrkAmbiguityProcessor.TrkAmbiguityProcessorConf import Trk__SimpleAmbiguityProcessorTool as ProcessorTool + InDetTrigMTAmbiguityProcessor = ProcessorTool(name = 'InDetTrigMTAmbiguityProcessor' + signature, + Fitter = InDetTrigTrackFitter, + ScoringTool = InDetTrigMTAmbiScoringTool, + SelectionTool = InDetTrigAmbiTrackSelectionTool) + + + ToolSvc += InDetTrigMTAmbiguityProcessor + + + from TrkAmbiguitySolver.TrkAmbiguitySolverConf import Trk__TrkAmbiguitySolver + InDetTrigMTAmbiguitySolver = Trk__TrkAmbiguitySolver(name = 'InDetTrigMTAmbiguitySolver' + signature, + TrackInput =[ inputFTFtracks ], + TrackOutput = nameAmbiTrackCollection, + AmbiguityProcessor = InDetTrigMTAmbiguityProcessor) + + #allViewAlgorithms += InDetTrigMTAmbiguitySolver + + + # + # --- Track particle conversion algorithm + # + + + from TrkParticleCreator.TrkParticleCreatorConf import Trk__TrackParticleCreatorTool + InDetTrigMTxAODParticleCreatorTool = Trk__TrackParticleCreatorTool(name = "InDetTrigMTxAODParticleCreatorTool" + signature, + Extrapolator = InDetTrigExtrapolator, + #ForceTrackSummaryUpdate = False, + #TrackSummaryTool = InDetTrigTrackSummaryToolSharedHits) + TrackSummaryTool = InDetTrigTrackSummaryTool) + + ToolSvc += InDetTrigMTxAODParticleCreatorTool + print InDetTrigMTxAODParticleCreatorTool + + + from xAODTrackingCnv.xAODTrackingCnvConf import xAODMaker__TrackCollectionCnvTool + InDetTrigMTxAODTrackCollectionCnvTool= xAODMaker__TrackCollectionCnvTool(name = "InDetTrigMTxAODTrackCollectionCnvTool" + signature, + TrackParticleCreator = InDetTrigMTxAODParticleCreatorTool) + + ToolSvc += InDetTrigMTxAODTrackCollectionCnvTool + print InDetTrigMTxAODTrackCollectionCnvTool + + #This one shouldn't be necessary + #TODO: obsolete turn off + from xAODTrackingCnv.xAODTrackingCnvConf import xAODMaker__RecTrackParticleContainerCnvTool + InDetTrigMTRecTrackParticleContainerCnvTool= xAODMaker__RecTrackParticleContainerCnvTool(name = "InDetTrigMTRecTrackContainerCnvTool" + signature, + TrackParticleCreator = InDetTrigMTxAODParticleCreatorTool) + + ToolSvc += InDetTrigMTRecTrackParticleContainerCnvTool + print InDetTrigMTRecTrackParticleContainerCnvTool + + from xAODTrackingCnv.xAODTrackingCnvConf import xAODMaker__TrackParticleCnvAlg + InDetTrigMTxAODTrackParticleCnvAlg = xAODMaker__TrackParticleCnvAlg(name = "InDetTrigMTxAODParticleCreatorAlg" + signature, + # Properties below are used for: TrackCollection -> xAOD::TrackParticle + ConvertTracks = True, #Turn on retrieve of TrackCollection, false by default + TrackContainerName = nameAmbiTrackCollection, + xAODTrackParticlesFromTracksContainerName = nameAmbiTrackParticles, + TrackCollectionCnvTool = InDetTrigMTxAODTrackCollectionCnvTool, + ## Properties below are used for: Rec:TrackParticle, aod -> xAOD::TrackParticle (Turn off) + ConvertTrackParticles = False, # Retrieve of Rec:TrackParticle, don't need this atm + xAODContainerName = '', + RecTrackParticleContainerCnvTool = InDetTrigMTRecTrackParticleContainerCnvTool, + #PrintIDSummaryInfo = True, #Just to test and have some output + TrackParticleCreator = InDetTrigMTxAODParticleCreatorTool + ) + + + #allViewAlgorithms += InDetTrigMTxAODTrackParticleCnvAlg + print InDetTrigMTxAODTrackParticleCnvAlg + + #ToolSvc.InDetTrigHoleSearchTool.SctSummaryTool.InDetTrigInDetSCT_FlaggedConditionTool.SCT_FlaggedCondData = "SCT_FlaggedCondData_TRIG" + + + #Return list of Track keys, TrackParticle keys, and PT algs + return nameTrackCollections, nameTrackParticles, [InDetTrigMTAmbiguitySolver, InDetTrigMTxAODTrackParticleCnvAlg] + diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/InDetSetup.py b/Trigger/TrigValidation/TrigUpgradeTest/python/InDetSetup.py index 30c1091e46c9481cdfc1ab234d52f3d3f880a9fc..690e08dc747dca06fdbb0542ccbdd645ce3443a6 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/python/InDetSetup.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/python/InDetSetup.py @@ -2,13 +2,16 @@ # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration # -def makeInDetAlgs(): +def makeInDetAlgs( whichSignature='' ): + #If signature specified add suffix to the algorithms + signature = "_" + whichSignature if whichSignature else '' + eventAlgs = [] viewAlgs = [] from InDetRecExample.InDetKeys import InDetKeys #Create IdentifiableCaches from InDetPrepRawDataFormation.InDetPrepRawDataFormationConf import InDet__CacheCreator - InDetCacheCreatorTrigViews = InDet__CacheCreator(name = "InDetCacheCreatorTrigViews", + InDetCacheCreatorTrigViews = InDet__CacheCreator(name = "InDetCacheCreatorTrigViews" + signature, Pixel_ClusterKey = "PixelTrigClustersCache", SCT_ClusterKey = "SCT_ClustersCache", SpacePointCachePix = "PixelSpacePointCache", @@ -27,11 +30,11 @@ def makeInDetAlgs(): #Pixel from PixelRawDataByteStreamCnv.PixelRawDataByteStreamCnvConf import PixelRodDecoder - InDetPixelRodDecoder = PixelRodDecoder(name = "InDetPixelRodDecoder") + InDetPixelRodDecoder = PixelRodDecoder(name = "InDetPixelRodDecoder" + signature) ToolSvc += InDetPixelRodDecoder from PixelRawDataByteStreamCnv.PixelRawDataByteStreamCnvConf import PixelRawDataProviderTool - InDetPixelRawDataProviderTool = PixelRawDataProviderTool(name = "InDetPixelRawDataProviderTool", + InDetPixelRawDataProviderTool = PixelRawDataProviderTool(name = "InDetPixelRawDataProviderTool" + signature, Decoder = InDetPixelRodDecoder) ToolSvc += InDetPixelRawDataProviderTool @@ -41,7 +44,7 @@ def makeInDetAlgs(): # load the PixelRawDataProvider from PixelRawDataByteStreamCnv.PixelRawDataByteStreamCnvConf import PixelRawDataProvider - InDetPixelRawDataProvider = PixelRawDataProvider(name = "InDetPixelRawDataProvider", + InDetPixelRawDataProvider = PixelRawDataProvider(name = "InDetPixelRawDataProvider"+ signature, RDOKey = InDetKeys.PixelRDOs(), ProviderTool = InDetPixelRawDataProviderTool,) #OutputLevel = INFO) @@ -58,12 +61,12 @@ def makeInDetAlgs(): #SCT from SCT_RawDataByteStreamCnv.SCT_RawDataByteStreamCnvConf import SCT_RodDecoder - InDetSCTRodDecoder = SCT_RodDecoder(name = "InDetSCTRodDecoder",) + InDetSCTRodDecoder = SCT_RodDecoder(name = "InDetSCTRodDecoder" + signature) # OutputLevel = INFO) ToolSvc += InDetSCTRodDecoder from SCT_RawDataByteStreamCnv.SCT_RawDataByteStreamCnvConf import SCTRawDataProviderTool - InDetSCTRawDataProviderTool = SCTRawDataProviderTool(name = "InDetSCTRawDataProviderTool", + InDetSCTRawDataProviderTool = SCTRawDataProviderTool(name = "InDetSCTRawDataProviderTool" + signature, Decoder = InDetSCTRodDecoder) ToolSvc += InDetSCTRawDataProviderTool if (InDetFlags.doPrintConfigurables()): @@ -71,7 +74,7 @@ def makeInDetAlgs(): # load the SCTRawDataProvider from SCT_RawDataByteStreamCnv.SCT_RawDataByteStreamCnvConf import SCTRawDataProvider - InDetSCTRawDataProvider = SCTRawDataProvider(name = "InDetSCTRawDataProvider", + InDetSCTRawDataProvider = SCTRawDataProvider(name = "InDetSCTRawDataProvider" + signature, RDOKey = InDetKeys.SCT_RDOs(), ProviderTool = InDetSCTRawDataProviderTool, ) #OutputLevel = INFO) @@ -83,7 +86,7 @@ def makeInDetAlgs(): # load the SCTEventFlagWriter from SCT_RawDataByteStreamCnv.SCT_RawDataByteStreamCnvConf import SCTEventFlagWriter - InDetSCTEventFlagWriter = SCTEventFlagWriter(name = "InDetSCTEventFlagWriter") + InDetSCTEventFlagWriter = SCTEventFlagWriter(name = "InDetSCTEventFlagWriter"+ signature) viewAlgs.append(InDetSCTEventFlagWriter) @@ -94,23 +97,23 @@ def makeInDetAlgs(): ServiceMgr += InDetTRTCalDbSvc from TRT_ConditionsServices.TRT_ConditionsServicesConf import TRT_StrawStatusSummarySvc - InDetTRTStrawStatusSummarySvc = TRT_StrawStatusSummarySvc(name = "InDetTRTStrawStatusSummarySvc") + InDetTRTStrawStatusSummarySvc = TRT_StrawStatusSummarySvc(name = "InDetTRTStrawStatusSummarySvc" + signature) ServiceMgr += InDetTRTStrawStatusSummarySvc from TRT_RawDataByteStreamCnv.TRT_RawDataByteStreamCnvConf import TRT_RodDecoder - InDetTRTRodDecoder = TRT_RodDecoder(name = "InDetTRTRodDecoder", + InDetTRTRodDecoder = TRT_RodDecoder(name = "InDetTRTRodDecoder" + signature, LoadCompressTableDB = True)#(globalflags.DataSource() != 'geant4')) ToolSvc += InDetTRTRodDecoder from TRT_RawDataByteStreamCnv.TRT_RawDataByteStreamCnvConf import TRTRawDataProviderTool - InDetTRTRawDataProviderTool = TRTRawDataProviderTool(name = "InDetTRTRawDataProviderTool", + InDetTRTRawDataProviderTool = TRTRawDataProviderTool(name = "InDetTRTRawDataProviderTool" + signature, Decoder = InDetTRTRodDecoder) ToolSvc += InDetTRTRawDataProviderTool # load the TRTRawDataProvider from TRT_RawDataByteStreamCnv.TRT_RawDataByteStreamCnvConf import TRTRawDataProvider - InDetTRTRawDataProvider = TRTRawDataProvider(name = "InDetTRTRawDataProvider", + InDetTRTRawDataProvider = TRTRawDataProvider(name = "InDetTRTRawDataProvider" + signature, RDOKey = "TRT_RDOs", ProviderTool = InDetTRTRawDataProviderTool) InDetTRTRawDataProvider.isRoI_Seeded = True @@ -123,7 +126,7 @@ def makeInDetAlgs(): from InDetTrigRecExample.InDetTrigConfigRecLoadTools import TrigPixelLorentzAngleTool, TrigSCTLorentzAngleTool from SiClusterizationTool.SiClusterizationToolConf import InDet__ClusterMakerTool - InDetClusterMakerTool = InDet__ClusterMakerTool(name = "InDetClusterMakerTool", + InDetClusterMakerTool = InDet__ClusterMakerTool(name = "InDetClusterMakerTool" + signature, PixelCalibSvc = None, UsePixelCalibCondDB = False, SCTLorentzAngleTool = TrigSCTLorentzAngleTool, @@ -133,7 +136,7 @@ def makeInDetAlgs(): from SiClusterizationTool.SiClusterizationToolConf import InDet__MergedPixelsTool - InDetMergedPixelsTool = InDet__MergedPixelsTool(name = "InDetMergedPixelsTool", + InDetMergedPixelsTool = InDet__MergedPixelsTool(name = "InDetMergedPixelsTool" + signature, globalPosAlg = InDetClusterMakerTool, MinimalSplitSize = 0, MaximalSplitSize = 49, @@ -143,11 +146,11 @@ def makeInDetAlgs(): ToolSvc += InDetMergedPixelsTool from SiClusterizationTool.SiClusterizationToolConf import InDet__PixelGangedAmbiguitiesFinder - InDetPixelGangedAmbiguitiesFinder = InDet__PixelGangedAmbiguitiesFinder(name = "InDetPixelGangedAmbiguitiesFinder") + InDetPixelGangedAmbiguitiesFinder = InDet__PixelGangedAmbiguitiesFinder(name = "InDetPixelGangedAmbiguitiesFinder" + signature) ToolSvc += InDetPixelGangedAmbiguitiesFinder from InDetPrepRawDataFormation.InDetPrepRawDataFormationConf import InDet__PixelClusterization - InDetPixelClusterization = InDet__PixelClusterization(name = "InDetPixelClusterization", + InDetPixelClusterization = InDet__PixelClusterization(name = "InDetPixelClusterization" + signature, clusteringTool = InDetMergedPixelsTool, gangedAmbiguitiesFinder = InDetPixelGangedAmbiguitiesFinder, DetectorManagerName = InDetKeys.PixelManager(), @@ -167,7 +170,7 @@ def makeInDetAlgs(): # InDetSCT_FlaggedConditionTool = sct_FlaggedConditionToolSetup.getTool() from SCT_ConditionsTools.SCT_ConditionsSummaryToolSetup import SCT_ConditionsSummaryToolSetup - sct_ConditionsSummaryToolSetup = SCT_ConditionsSummaryToolSetup("InDetSCT_ConditionsSummaryTool") + sct_ConditionsSummaryToolSetup = SCT_ConditionsSummaryToolSetup("InDetSCT_ConditionsSummaryTool" + signature) sct_ConditionsSummaryToolSetup.setup() InDetSCT_ConditionsSummaryTool = sct_ConditionsSummaryToolSetup.getTool() condTools = [] @@ -177,7 +180,7 @@ def makeInDetAlgs(): if condTool not in condTools: if condTool != "SCT_FlaggedConditionTool/InDetSCT_FlaggedConditionTool": condTools.append(condTool) - sct_ConditionsSummaryToolSetupWithoutFlagged = SCT_ConditionsSummaryToolSetup("InDetSCT_ConditionsSummaryToolWithoutFlagged") + sct_ConditionsSummaryToolSetupWithoutFlagged = SCT_ConditionsSummaryToolSetup("InDetSCT_ConditionsSummaryToolWithoutFlagged" + signature) sct_ConditionsSummaryToolSetupWithoutFlagged.setup() InDetSCT_ConditionsSummaryToolWithoutFlagged = sct_ConditionsSummaryToolSetupWithoutFlagged.getTool() InDetSCT_ConditionsSummaryToolWithoutFlagged.ConditionsTools = condTools @@ -186,7 +189,7 @@ def makeInDetAlgs(): # --- SCT_ClusteringTool (public) # from SiClusterizationTool.SiClusterizationToolConf import InDet__SCT_ClusteringTool - InDetSCT_ClusteringTool = InDet__SCT_ClusteringTool(name = "InDetSCT_ClusteringTool", + InDetSCT_ClusteringTool = InDet__SCT_ClusteringTool(name = "InDetSCT_ClusteringTool" + signature, globalPosAlg = InDetClusterMakerTool, conditionsTool = InDetSCT_ConditionsSummaryToolWithoutFlagged) # @@ -194,7 +197,7 @@ def makeInDetAlgs(): # from InDetPrepRawDataFormation.InDetPrepRawDataFormationConf import InDet__SCT_Clusterization - InDetSCT_Clusterization = InDet__SCT_Clusterization(name = "InDetSCT_Clusterization", + InDetSCT_Clusterization = InDet__SCT_Clusterization(name = "InDetSCT_Clusterization" + signature, clusteringTool = InDetSCT_ClusteringTool, # ChannelStatus = InDetSCT_ChannelStatusAlg, DataObjectName = InDetKeys.SCT_RDOs(), @@ -210,12 +213,12 @@ def makeInDetAlgs(): #Space points and FTF from SiSpacePointTool.SiSpacePointToolConf import InDet__SiSpacePointMakerTool - InDetSiSpacePointMakerTool = InDet__SiSpacePointMakerTool(name = "InDetSiSpacePointMakerTool") + InDetSiSpacePointMakerTool = InDet__SiSpacePointMakerTool(name = "InDetSiSpacePointMakerTool" + signature) ToolSvc += InDetSiSpacePointMakerTool from AthenaCommon.DetFlags import DetFlags from SiSpacePointFormation.SiSpacePointFormationConf import InDet__SiTrackerSpacePointFinder - InDetSiTrackerSpacePointFinder = InDet__SiTrackerSpacePointFinder(name = "InDetSiTrackerSpacePointFinder", + InDetSiTrackerSpacePointFinder = InDet__SiTrackerSpacePointFinder(name = "InDetSiTrackerSpacePointFinder" + signature, SiSpacePointMakerTool = InDetSiSpacePointMakerTool, PixelsClustersName = "PixelTrigClusters", SCT_ClustersName = "SCT_TrigClusters", @@ -239,13 +242,13 @@ def makeInDetAlgs(): # Setup alignment folders and conditions algorithms from InDetCondFolders import InDetAlignFolders from SiSpacePointFormation.SiSpacePointFormationConf import InDet__SiElementPropertiesTableCondAlg - condSeq += InDet__SiElementPropertiesTableCondAlg(name = "InDetSiElementPropertiesTableCondAlg") + condSeq += InDet__SiElementPropertiesTableCondAlg(name = "InDetSiElementPropertiesTableCondAlg" + signature) from TrigInDetConf.TrigInDetRecCommonTools import InDetTrigFastTrackSummaryTool from TrigInDetConf.TrigInDetPostTools import InDetTrigParticleCreatorToolFTF from InDetTrigParticleCreation.InDetTrigParticleCreationConf import InDet__TrigTrackingxAODCnvMT - theTrackParticleCreatorAlg = InDet__TrigTrackingxAODCnvMT(name = "InDetTrigTrackParticleCreatorAlg", + theTrackParticleCreatorAlg = InDet__TrigTrackingxAODCnvMT(name = "InDetTrigTrackParticleCreatorAlg" + signature, doIBLresidual = False, TrackName = "TrigFastTrackFinder_Tracks", TrackParticlesName = "xAODTracks", @@ -253,6 +256,7 @@ def makeInDetAlgs(): theTrackParticleCreatorAlg.roiCollectionName = "EMViewRoIs" viewAlgs.append(theTrackParticleCreatorAlg) - + + return (viewAlgs, eventAlgs) diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/MuonSetup.py b/Trigger/TrigValidation/TrigUpgradeTest/python/MuonSetup.py index d02fdb7814448a6630c6cf5211c9009d9b84ebe1..fed58b913d3d1520ae1120316e47780411d02f28 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/python/MuonSetup.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/python/MuonSetup.py @@ -584,8 +584,32 @@ def muEFCBRecoSequence( RoIs, OutputLevel=INFO ): ViewVerifyTrk.DataObjects = [( 'xAOD::TrackParticleContainer' , 'StoreGateSvc+xAODTracks' ),( 'SCT_FlaggedCondData' , 'StoreGateSvc+SCT_FlaggedCondData' ), ( 'InDetBSErrContainer' , 'StoreGateSvc+SCT_ByteStreamErrs' ), ( 'xAOD::EventInfo' , 'StoreGateSvc+EventInfo' ),( 'xAOD::IParticleContainer' , 'StoreGateSvc+xAODTracks' ),( 'SCT_ByteStreamFractionContainer' , 'StoreGateSvc+SCT_ByteStreamFrac' ),( 'Muon::CscStripPrepDataContainer' , 'StoreGateSvc+CSC_Measurements' ), ( 'Muon::MdtPrepDataContainer' , 'StoreGateSvc+MDT_DriftCircles' ), ( 'xAOD::TrackParticleContainer' , 'StoreGateSvc+MuonSpectrometerTrackParticles' ) ] muEFCBRecoSequence += ViewVerifyTrk + + #Precision Tracking + PTAlgs = [] #List of precision tracking algs + PTTracks = [] #List of TrackCollectionKeys + PTTrackParticles = [] #List of TrackParticleKeys + + from TrigUpgradeTest.InDetPT import makeInDetPrecisionTracking + #When run in a different view than FTF some data dependencies needs to be loaded through verifier + #Pass verifier as an argument and it will automatically append necessary DataObjects + #@NOTE: Don't provide any verifier if loaded in the same view as FTF + PTTracks, PTTrackParticles, PTAlgs = makeInDetPrecisionTracking( "muons", ViewVerifyTrk ) + + #Get last tracks from the list as input for other alg + + ##Not added to the sequence! Causing stall + PTSeq = seqAND("precisionTrackingInMuons", PTAlgs ) + muEFCBRecoSequence += PTSeq + + #Default from FTF + #trackParticles = "xAODTracks" + #TODO: change according to what needs to be done here + #Last key in the list is for the TrackParticles after all PT stages (so far only one :) ) + trackParticles = PTTrackParticles[-1] + #Make InDetCandidates - theIndetCandidateAlg = CfgMgr.MuonCombinedInDetCandidateAlg("TrigMuonCombinedInDetCandidateAlg",TrackSelector=getPublicTool("MuonCombinedInDetDetailedTrackSelectorTool"),TrackParticleLocation = ["xAODTracks"],ForwardParticleLocation="xAODTracks",OutputLevel=DEBUG) + theIndetCandidateAlg = CfgMgr.MuonCombinedInDetCandidateAlg("TrigMuonCombinedInDetCandidateAlg",TrackSelector=getPublicTool("MuonCombinedInDetDetailedTrackSelectorTool"),TrackParticleLocation = [ trackParticles ],ForwardParticleLocation=trackParticles,OutputLevel=DEBUG) #MuonCombinedCandidates theCaloMeasTool = getPublicToolClone("TrigCaloMeasTool", "MuidCaloEnergyMeas", CaloNoiseTool="", UseCaloNoiseTool=False,CellContainerLocation="") diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/EmuStepProcessing.ref b/Trigger/TrigValidation/TrigUpgradeTest/share/EmuStepProcessing.ref index e602c1cc22492c7f50600e4389825ffb9dcde626..eeec7201b7a8f0c3a7c6a58451097aaff3711c50 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/EmuStepProcessing.ref +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/EmuStepProcessing.ref @@ -1,9 +1,11 @@ -TrigSignatureMoniMT INFO HLT_e20 3 3 2 2 2 -TrigSignatureMoniMT INFO HLT_e20 decisions 4 4 TrigSignatureMoniMT INFO HLT_e5 2 2 1 1 1 TrigSignatureMoniMT INFO HLT_e5 decisions 2 2 TrigSignatureMoniMT INFO HLT_e5_e8 2 2 1 0 1 TrigSignatureMoniMT INFO HLT_e5_e8 decisions 6 0 +TrigSignatureMoniMT INFO HLT_e5_v2 0 0 0 0 0 +TrigSignatureMoniMT INFO HLT_e5_v2 decisions 0 0 +TrigSignatureMoniMT INFO HLT_e5_v3 1 1 1 1 1 +TrigSignatureMoniMT INFO HLT_e5_v3 decisions 2 2 TrigSignatureMoniMT INFO HLT_e8 4 4 3 3 3 TrigSignatureMoniMT INFO HLT_e8 decisions 5 5 TrigSignatureMoniMT INFO HLT_g5 2 2 1 0 1 diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/EmuStepProcessingTest.py b/Trigger/TrigValidation/TrigUpgradeTest/share/EmuStepProcessingTest.py index 8af36ddf767f5b3cf4347ba4450d889e317fcaa0..ce526f1aef90968621d6a77864ef849a6574ecfb 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/EmuStepProcessingTest.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/EmuStepProcessingTest.py @@ -15,7 +15,7 @@ from AthenaCommon.AlgScheduler import AlgScheduler AlgScheduler.ShowControlFlow( True ) AlgScheduler.ShowDataFlow( True ) - +# add chain names in Menu/MenuChains.py # 4 events @@ -31,8 +31,9 @@ data['msmu'] = [';', 'eta:-1.2,phi:0.7,pt:6500,pt2:8500; eta:-1.1,phi:0.6,pt:8500,pt2:8500;', 'eta:-1.7,phi:-0.2,pt:9500,pt2:8500;'] +#data['ctp'] = [ 'HLT_e20 HLT_e5_e8 HLT_e5 HLT_e8 HLT_e5v22 HLT_g5', data['ctp'] = [ 'HLT_e20 HLT_e5_e8 HLT_e5 HLT_e8 HLT_g5', - 'HLT_e20 HLT_e5_e8 HLT_e5 HLT_e8 HLT_g5', + 'HLT_e20 HLT_e5_e8 HLT_e5 HLT_e8 HLT_g5 HLT_e5_v3', 'HLT_mu8 HLT_mu8_1step HLT_e20 HLT_e8 HLT_mu8_e8 HLT_e3_e5', 'HLT_mu20 HLT_mu8 HLT_mu8_1step HLT_2mu8 HLT_e8' ] @@ -115,16 +116,18 @@ if doElectron: from TrigUpgradeTest.HLTSignatureConfig import elStep1MenuSequence, elStep2MenuSequence, gammStep1MenuSequence # electron elStep1 = elStep1MenuSequence("v1") - elStep2 = elStep2MenuSequence("v1") - elStep2v2 = elStep2MenuSequence("v2") + elStep2 = elStep2MenuSequence("v1","v1") + elStep2v2 = elStep2MenuSequence("v2","v2") + elStep2v3 = elStep2MenuSequence("v2","v3") # gamma gammStep1 = gammStep1MenuSequence("v1") ElChains = [ - Chain(name='HLT_e5' , Seed="L1_EM7", ChainSteps=[ ChainStep("Step1_em", [elStep1]), ChainStep("Step2_em", [elStep2]) ] ), - Chain(name='HLT_e20' , Seed="L1_EM7", ChainSteps=[ ChainStep("Step1_em", [elStep1]), ChainStep("Step2v2_em", [elStep2v2]) ] ), - Chain(name='HLT_e8' , Seed="L1_EM7", ChainSteps=[ ChainStep("Step1_em", [elStep1]), ChainStep("Step2_em", [elStep2]) ] ), - Chain(name='HLT_g5' , Seed="L1_EM7", ChainSteps=[ ChainStep("Step1_gam", [gammStep1]) ] ) + Chain(name='HLT_e5' , Seed="L1_EM7", ChainSteps=[ ChainStep("Step1_em", [elStep1]), ChainStep("Step2_em", [elStep2]) ] ), + Chain(name='HLT_e5_v2', Seed="L1_EM7", ChainSteps=[ ChainStep("Step1_em", [elStep1]), ChainStep("Step2v2_em", [elStep2v2]) ] ), + Chain(name='HLT_e5_v3', Seed="L1_EM7", ChainSteps=[ ChainStep("Step1_em", [elStep1]), ChainStep("Step2v3_em", [elStep2v3]) ] ), + Chain(name='HLT_e8' , Seed="L1_EM7", ChainSteps=[ ChainStep("Step1_em", [elStep1]), ChainStep("Step2_em", [elStep2]) ] ), + Chain(name='HLT_g5' , Seed="L1_EM7", ChainSteps=[ ChainStep("Step1_gam", [gammStep1]) ] ) ] HLTChains += ElChains @@ -136,7 +139,7 @@ if doCombo: from TrigUpgradeTest.HLTSignatureConfig import elStep1MenuSequence, muStep1MenuSequence, elStep2MenuSequence, muStep2MenuSequence elStep1 = elStep1MenuSequence("v1") muStep1 = muStep1MenuSequence("v1") - elStep2 = elStep2MenuSequence("v1") + elStep2 = elStep2MenuSequence("v1","v1") muStep2 = muStep2MenuSequence("v1") diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/NewJO.ref b/Trigger/TrigValidation/TrigUpgradeTest/share/NewJO.ref index ce273875761aaf874aaadcd4da809a1456fb2b66..91849294540e7daa74d968019f067d6feb3de597 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/NewJO.ref +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/NewJO.ref @@ -1,21 +1,20 @@ -Storing config in the config newJOtest.pkl Py:Athena INFO now loading newJOtest.pkl ... -TrigSignatureMoniMT INFO Chains passing step (1st row events & 2nd row decision counts -TrigSignatureMoniMT INFO Chain name L1, AfterPS, [... steps ...], Output -TrigSignatureMoniMT INFO All 20 20 0 0 8 -TrigSignatureMoniMT INFO HLT_e3_etcut 20 20 15 0 0 -TrigSignatureMoniMT INFO HLT_e3_etcut decisions 44 0 -TrigSignatureMoniMT INFO HLT_e5_etcut 20 20 14 0 0 -TrigSignatureMoniMT INFO HLT_e5_etcut decisions 41 0 -TrigSignatureMoniMT INFO HLT_e7_etcut 20 20 8 0 0 -TrigSignatureMoniMT INFO HLT_e7_etcut decisions 13 0 -TrigSignatureMoniMT INFO HLT_g10_etcut 20 20 8 8 8 -TrigSignatureMoniMT INFO HLT_g10_etcut decisions 12 12 -TrigSignatureMoniMT INFO HLT_g15_etcut 20 20 5 8 8 -TrigSignatureMoniMT INFO HLT_g15_etcut decisions 6 12 -TrigSignatureMoniMT INFO HLT_mu10 20 20 1 0 1 -TrigSignatureMoniMT INFO HLT_mu10 decisions 1 0 -TrigSignatureMoniMT INFO HLT_mu20 20 20 0 0 0 -TrigSignatureMoniMT INFO HLT_mu20 decisions 0 0 -TrigSignatureMoniMT INFO HLT_mu8 20 20 1 0 1 -TrigSignatureMoniMT INFO HLT_mu8 decisions 1 0 +TrigSignatureMo... INFO Chains passing step (1st row events & 2nd row decision counts +TrigSignatureMo... INFO Chain name L1, AfterPS, [... steps ...], Output +TrigSignatureMo... INFO All 10 10 0 0 2 +TrigSignatureMo... INFO HLT_e3_etcut_L1EM3 10 10 6 0 0 +TrigSignatureMo... INFO HLT_e3_etcut_L1EM3 decisions 14 0 +TrigSignatureMo... INFO HLT_e5_etcut_L1EM3 10 10 5 0 0 +TrigSignatureMo... INFO HLT_e5_etcut_L1EM3 decisions 12 0 +TrigSignatureMo... INFO HLT_e7_etcut_L1EM7 10 10 2 0 0 +TrigSignatureMo... INFO HLT_e7_etcut_L1EM7 decisions 3 0 +TrigSignatureMo... INFO HLT_g10_etcut_L1EM7 10 10 2 2 2 +TrigSignatureMo... INFO HLT_g10_etcut_L1EM7 decisions 3 3 +TrigSignatureMo... INFO HLT_g15_etcut_L1EM12 10 10 2 2 2 +TrigSignatureMo... INFO HLT_g15_etcut_L1EM12 decisions 3 3 +TrigSignatureMo... INFO HLT_mu10_L1MU10 10 10 0 0 0 +TrigSignatureMo... INFO HLT_mu10_L1MU10 decisions 0 0 +TrigSignatureMo... INFO HLT_mu20_L1MU20 10 10 0 0 0 +TrigSignatureMo... INFO HLT_mu20_L1MU20 decisions 0 0 +TrigSignatureMo... INFO HLT_mu8_L1MU6 10 10 0 0 0 +TrigSignatureMo... INFO HLT_mu8_L1MU6 decisions 0 0 diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/RunMenuTest.ref b/Trigger/TrigValidation/TrigUpgradeTest/share/RunMenuTest.ref index 739e534823a1da683ed4ecd43135aac0fb09970d..8373d8fc4fa8e311a2c270ff4b0b75ee45fe453b 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/RunMenuTest.ref +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/RunMenuTest.ref @@ -1,9 +1,9 @@ TrigSignatureMoniMT INFO Chains passing step (1st row events & 2nd row decision counts TrigSignatureMoniMT INFO Chain name L1, AfterPS, [... steps ...], Output TrigSignatureMoniMT INFO All 20 20 0 0 17 -TrigSignatureMoniMT INFO HLT_e3_etcut 20 20 18 17 17 -TrigSignatureMoniMT INFO HLT_e3_etcut decisions 54 262 -TrigSignatureMoniMT INFO HLT_e5_etcut 20 20 17 16 16 -TrigSignatureMoniMT INFO HLT_e5_etcut decisions 50 251 -TrigSignatureMoniMT INFO HLT_e7_etcut 20 20 15 14 14 -TrigSignatureMoniMT INFO HLT_e7_etcut decisions 36 205 +TrigSignatureMoniMT INFO HLT_e3_etcut_L1EM3 20 20 18 17 17 +TrigSignatureMoniMT INFO HLT_e3_etcut_L1EM3 decisions 54 342 +TrigSignatureMoniMT INFO HLT_e5_etcut_L1EM3 20 20 17 16 16 +TrigSignatureMoniMT INFO HLT_e5_etcut_L1EM3 decisions 50 329 +TrigSignatureMoniMT INFO HLT_e7_etcut_L1EM3 20 20 15 14 14 +TrigSignatureMoniMT INFO HLT_e7_etcut_L1EM3 decisions 36 264 diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/bJetMenu.ref b/Trigger/TrigValidation/TrigUpgradeTest/share/bJetMenu.ref index bf716b4bc559821984a2cfa5718aef8d52a1b301..7f1e238a59688cd7bbb989cb5d8af67f73a23a08 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/bJetMenu.ref +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/bJetMenu.ref @@ -1,6 +1,6 @@ -TrigSignatureMoniMT INFO HLT_j35_gsc45_bmv2c1070 100 100 30 24 24 -TrigSignatureMoniMT INFO HLT_j35_gsc45_bmv2c1070 decisions 237 97 -TrigSignatureMoniMT INFO HLT_j35_gsc45_bmv2c1070_split 100 100 30 24 24 -TrigSignatureMoniMT INFO HLT_j35_gsc45_bmv2c1070_split decisions 237 97 -TrigSignatureMoniMT INFO HLT_j35_gsc45_boffperf_split 100 100 30 24 24 -TrigSignatureMoniMT INFO HLT_j35_gsc45_boffperf_split decisions 237 97 +TrigSignatureMoniMT INFO HLT_j35_gsc45_bmv2c1070 100 100 28 22 22 +TrigSignatureMoniMT INFO HLT_j35_gsc45_bmv2c1070 decisions 61 38 +TrigSignatureMoniMT INFO HLT_j35_gsc45_bmv2c1070_split 100 100 28 22 22 +TrigSignatureMoniMT INFO HLT_j35_gsc45_bmv2c1070_split decisions 61 38 +TrigSignatureMoniMT INFO HLT_j35_gsc45_boffperf_split 100 100 28 22 22 +TrigSignatureMoniMT INFO HLT_j35_gsc45_boffperf_split decisions 61 38 diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/bJetMenuALLTE.ref b/Trigger/TrigValidation/TrigUpgradeTest/share/bJetMenuALLTE.ref index bf716b4bc559821984a2cfa5718aef8d52a1b301..7f1e238a59688cd7bbb989cb5d8af67f73a23a08 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/bJetMenuALLTE.ref +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/bJetMenuALLTE.ref @@ -1,6 +1,6 @@ -TrigSignatureMoniMT INFO HLT_j35_gsc45_bmv2c1070 100 100 30 24 24 -TrigSignatureMoniMT INFO HLT_j35_gsc45_bmv2c1070 decisions 237 97 -TrigSignatureMoniMT INFO HLT_j35_gsc45_bmv2c1070_split 100 100 30 24 24 -TrigSignatureMoniMT INFO HLT_j35_gsc45_bmv2c1070_split decisions 237 97 -TrigSignatureMoniMT INFO HLT_j35_gsc45_boffperf_split 100 100 30 24 24 -TrigSignatureMoniMT INFO HLT_j35_gsc45_boffperf_split decisions 237 97 +TrigSignatureMoniMT INFO HLT_j35_gsc45_bmv2c1070 100 100 28 22 22 +TrigSignatureMoniMT INFO HLT_j35_gsc45_bmv2c1070 decisions 61 38 +TrigSignatureMoniMT INFO HLT_j35_gsc45_bmv2c1070_split 100 100 28 22 22 +TrigSignatureMoniMT INFO HLT_j35_gsc45_bmv2c1070_split decisions 61 38 +TrigSignatureMoniMT INFO HLT_j35_gsc45_boffperf_split 100 100 28 22 22 +TrigSignatureMoniMT INFO HLT_j35_gsc45_boffperf_split decisions 61 38 diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/checklogTrigUpgradeTest.conf b/Trigger/TrigValidation/TrigUpgradeTest/share/checklogTrigUpgradeTest.conf new file mode 100644 index 0000000000000000000000000000000000000000..8df1e27a9e1666583330aa9635e0632beb957701 --- /dev/null +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/checklogTrigUpgradeTest.conf @@ -0,0 +1,2 @@ +ignore 'xxx Flagged ABCD ERROR*' +ignore 'DEBUG Trailer: xxx Trailer*' diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/dataScoutingTest.py b/Trigger/TrigValidation/TrigUpgradeTest/share/dataScoutingTest.py index 19ef84faf0d755e528139c3f5254fa14277c9e50..06ad199e389d1848358a3cae6b11daf0733ba886 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/dataScoutingTest.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/dataScoutingTest.py @@ -119,7 +119,7 @@ decisionObjectsToRecord = [] for d in decisionObjects: decisionObjectsToRecord.extend([ "xAOD::TrigCompositeContainer_v1#%s" % d, - "xAOD::TrigCompositeAuxContainer_v2#%s.decisions" % d + "xAOD::TrigCompositeAuxContainer_v2#%s." % d ]) ########################################## diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py b/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py index b1659b53e7377d521919c9bdbff10b98644b73d4..00c05345fad1382118dc87f2e7a93cd4a9b81cbb 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py @@ -349,13 +349,17 @@ serialiser = TriggerEDMSerialiserToolCfg("Serialiser") serialiser.OutputLevel=VERBOSE serialiser.addCollectionListToMainResult([ "xAOD::TrigCompositeContainer_v1#remap_EgammaCaloDecisions", - "xAOD::TrigCompositeAuxContainer_v2#remap_EgammaCaloDecisionsAux.decisions", + "xAOD::TrigCompositeAuxContainer_v2#remap_EgammaCaloDecisionsAux.", "xAOD::TrigEMClusterContainer_v1#HLT_xAOD__TrigEMClusterContainer_L2CaloClusters", "xAOD::TrigEMClusterAuxContainer_v2#HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux.RoIword.clusterQuality.e233.e237.e277.e2tsts1.ehad1.emaxs1.energy.energySample.et.eta.eta1.fracs1.nCells.phi.rawEnergy.rawEnergySample.rawEt.rawEta.rawPhi.viewIndex.weta2.wstot", "xAOD::TrigElectronContainer_v1#HLT_xAOD__TrigElectronContainer_L2ElectronFex", "xAOD::TrigElectronAuxContainer_v1#HLT_xAOD__TrigElectronContainer_L2ElectronFexAux.pt.eta.phi.rawEnergy.rawEt.rawEta.nCells.energy.et.e237.e277.fracs1.weta2.ehad1.wstot", ]) +print serialiser + + + streamPhysicsMain = ['Main', 'physics', "True", "True"] streamPhotonPerf = ['PhotonPerf', 'calibration', "True", "True"] # just made up the name @@ -396,8 +400,8 @@ deserialiser.Prefix="SERIALISED_" deserialiser.OutputLevel=DEBUG # # add prefix + remove version to class name -# l = [ c.split("#")[0].split("_")[0] + "#" + deserialiser.Prefix + c.split("#")[1] for c in serialiser.CollectionsToSerialize ] -#StreamESD.ItemList += l +l = [ c.split("#")[0].split("_")[0] + "#" + deserialiser.Prefix + c.split("#")[1] for c in serialiser.CollectionsToSerialize ] +StreamESD.ItemList += l @@ -425,7 +429,7 @@ svcMgr.ByteStreamEventStorageOutputSvc.OutputLevel = VERBOSE ################################################################################ # assemble top list of algorithms -hltTop = seqOR( "hltTop", [ steps, summMaker, mon, edmMakerAlg, hltResultMakerAlg, StreamESD, streamBS, deserialiser ] ) +hltTop = seqOR( "hltTop", [ steps, summMaker, mon, edmMakerAlg, hltResultMakerAlg, deserialiser, StreamESD, streamBS ] ) diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/egammaRunData.ref b/Trigger/TrigValidation/TrigUpgradeTest/share/egammaRunData.ref index 9278e815268bd85f3e99acd372795436f42db991..0ae91dd2c15987a6d8412bd3200007d23ad0d0a8 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/egammaRunData.ref +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/egammaRunData.ref @@ -1,183 +1,165 @@ -HLTRMakerAlg.MKTool.Serialiser 0 0 DEBUG xAOD::TrigCompositeAuxContainer_v2#remap_EgammaCaloDecisionsAux. Fragment size :348 bytes -HLTRMakerAlg.MKTool.Serialiser 0 0 DEBUG Fragment size including 68 bytes from 1x DynAux: 416 bytes -HLTRMakerAlg.MKTool.Serialiser 0 0 DEBUG xAOD::TrigCompositeContainer_v1#remap_EgammaCaloDecisions Fragment size :152 bytes -HLTRMakerAlg.MKTool.Serialiser 0 0 DEBUG xAOD::TrigEMClusterAuxContainer_v2#HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. Fragment size :772 bytes -HLTRMakerAlg.MKTool.Serialiser 0 0 DEBUG Fragment size including 52 bytes from 1x DynAux: 824 bytes -HLTRMakerAlg.MKTool.Serialiser 0 0 DEBUG xAOD::TrigEMClusterContainer_v1#HLT_xAOD__TrigEMClusterContainer_L2CaloClusters Fragment size :172 bytes -HLTRMakerAlg.MKTool.Serialiser 0 0 DEBUG xAOD::TrigElectronAuxContainer_v1#HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. Fragment size :716 bytes -HLTRMakerAlg.MKTool.Serialiser 0 0 DEBUG Fragment size including 892 bytes from 14x DynAux: 1608 bytes -HLTRMakerAlg.MKTool.Serialiser 0 0 DEBUG xAOD::TrigElectronContainer_v1#HLT_xAOD__TrigElectronContainer_L2ElectronFex Fragment size :168 bytes -HLTRMakerAlg.MKTool.Serialiser 1 0 DEBUG xAOD::TrigCompositeAuxContainer_v2#remap_EgammaCaloDecisionsAux. Fragment size :632 bytes -HLTRMakerAlg.MKTool.Serialiser 1 0 DEBUG Fragment size including 124 bytes from 1x DynAux: 756 bytes -HLTRMakerAlg.MKTool.Serialiser 1 0 DEBUG xAOD::TrigCompositeContainer_v1#remap_EgammaCaloDecisions Fragment size :152 bytes -HLTRMakerAlg.MKTool.Serialiser 1 0 DEBUG xAOD::TrigEMClusterAuxContainer_v2#HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. Fragment size :1732 bytes -HLTRMakerAlg.MKTool.Serialiser 1 0 DEBUG Fragment size including 64 bytes from 1x DynAux: 1796 bytes -HLTRMakerAlg.MKTool.Serialiser 1 0 DEBUG xAOD::TrigEMClusterContainer_v1#HLT_xAOD__TrigEMClusterContainer_L2CaloClusters Fragment size :172 bytes -HLTRMakerAlg.MKTool.Serialiser 1 0 DEBUG xAOD::TrigElectronAuxContainer_v1#HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. Fragment size :2832 bytes -HLTRMakerAlg.MKTool.Serialiser 1 0 DEBUG Fragment size including 2180 bytes from 14x DynAux: 5012 bytes -HLTRMakerAlg.MKTool.Serialiser 1 0 DEBUG xAOD::TrigElectronContainer_v1#HLT_xAOD__TrigElectronContainer_L2ElectronFex Fragment size :168 bytes -HLTRMakerAlg.MKTool.Serialiser 2 0 DEBUG xAOD::TrigCompositeAuxContainer_v2#remap_EgammaCaloDecisionsAux. Fragment size :824 bytes -HLTRMakerAlg.MKTool.Serialiser 2 0 DEBUG Fragment size including 144 bytes from 1x DynAux: 968 bytes -HLTRMakerAlg.MKTool.Serialiser 2 0 DEBUG xAOD::TrigCompositeContainer_v1#remap_EgammaCaloDecisions Fragment size :152 bytes -HLTRMakerAlg.MKTool.Serialiser 2 0 DEBUG xAOD::TrigEMClusterAuxContainer_v2#HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. Fragment size :2372 bytes -HLTRMakerAlg.MKTool.Serialiser 2 0 DEBUG Fragment size including 72 bytes from 1x DynAux: 2444 bytes -HLTRMakerAlg.MKTool.Serialiser 2 0 DEBUG xAOD::TrigEMClusterContainer_v1#HLT_xAOD__TrigEMClusterContainer_L2CaloClusters Fragment size :172 bytes -HLTRMakerAlg.MKTool.Serialiser 2 0 DEBUG xAOD::TrigElectronAuxContainer_v1#HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. Fragment size :1728 bytes -HLTRMakerAlg.MKTool.Serialiser 2 0 DEBUG Fragment size including 1508 bytes from 14x DynAux: 3236 bytes -HLTRMakerAlg.MKTool.Serialiser 2 0 DEBUG xAOD::TrigElectronContainer_v1#HLT_xAOD__TrigElectronContainer_L2ElectronFex Fragment size :168 bytes -HLTRMakerAlg.MKTool.Serialiser 3 0 DEBUG xAOD::TrigCompositeAuxContainer_v2#remap_EgammaCaloDecisionsAux. Fragment size :632 bytes -HLTRMakerAlg.MKTool.Serialiser 3 0 DEBUG Fragment size including 112 bytes from 1x DynAux: 744 bytes -HLTRMakerAlg.MKTool.Serialiser 3 0 DEBUG xAOD::TrigCompositeContainer_v1#remap_EgammaCaloDecisions Fragment size :152 bytes -HLTRMakerAlg.MKTool.Serialiser 3 0 DEBUG xAOD::TrigEMClusterAuxContainer_v2#HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. Fragment size :1732 bytes -HLTRMakerAlg.MKTool.Serialiser 3 0 DEBUG Fragment size including 64 bytes from 1x DynAux: 1796 bytes -HLTRMakerAlg.MKTool.Serialiser 3 0 DEBUG xAOD::TrigEMClusterContainer_v1#HLT_xAOD__TrigEMClusterContainer_L2CaloClusters Fragment size :172 bytes -HLTRMakerAlg.MKTool.Serialiser 3 0 DEBUG xAOD::TrigElectronAuxContainer_v1#HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. Fragment size :3292 bytes -HLTRMakerAlg.MKTool.Serialiser 3 0 DEBUG Fragment size including 2460 bytes from 14x DynAux: 5752 bytes -HLTRMakerAlg.MKTool.Serialiser 3 0 DEBUG xAOD::TrigElectronContainer_v1#HLT_xAOD__TrigElectronContainer_L2ElectronFex Fragment size :168 bytes -HLTRMakerAlg.MKTool.Serialiser 4 0 DEBUG xAOD::TrigCompositeAuxContainer_v2#remap_EgammaCaloDecisionsAux. Fragment size :444 bytes -HLTRMakerAlg.MKTool.Serialiser 4 0 DEBUG Fragment size including 92 bytes from 1x DynAux: 536 bytes -HLTRMakerAlg.MKTool.Serialiser 4 0 DEBUG xAOD::TrigCompositeContainer_v1#remap_EgammaCaloDecisions Fragment size :152 bytes -HLTRMakerAlg.MKTool.Serialiser 4 0 DEBUG xAOD::TrigEMClusterAuxContainer_v2#HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. Fragment size :1092 bytes -HLTRMakerAlg.MKTool.Serialiser 4 0 DEBUG Fragment size including 56 bytes from 1x DynAux: 1148 bytes -HLTRMakerAlg.MKTool.Serialiser 4 0 DEBUG xAOD::TrigEMClusterContainer_v1#HLT_xAOD__TrigEMClusterContainer_L2CaloClusters Fragment size :172 bytes -HLTRMakerAlg.MKTool.Serialiser 4 0 DEBUG xAOD::TrigElectronAuxContainer_v1#HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. Fragment size :992 bytes -HLTRMakerAlg.MKTool.Serialiser 4 0 DEBUG Fragment size including 1060 bytes from 14x DynAux: 2052 bytes -HLTRMakerAlg.MKTool.Serialiser 4 0 DEBUG xAOD::TrigElectronContainer_v1#HLT_xAOD__TrigElectronContainer_L2ElectronFex Fragment size :168 bytes -HLTRMakerAlg.MKTool.Serialiser 5 0 DEBUG xAOD::TrigCompositeAuxContainer_v2#remap_EgammaCaloDecisionsAux. Fragment size :916 bytes -HLTRMakerAlg.MKTool.Serialiser 5 0 DEBUG Fragment size including 152 bytes from 1x DynAux: 1068 bytes -HLTRMakerAlg.MKTool.Serialiser 5 0 DEBUG xAOD::TrigCompositeContainer_v1#remap_EgammaCaloDecisions Fragment size :152 bytes -HLTRMakerAlg.MKTool.Serialiser 5 0 DEBUG xAOD::TrigEMClusterAuxContainer_v2#HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. Fragment size :2692 bytes -HLTRMakerAlg.MKTool.Serialiser 5 0 DEBUG Fragment size including 76 bytes from 1x DynAux: 2768 bytes -HLTRMakerAlg.MKTool.Serialiser 5 0 DEBUG xAOD::TrigEMClusterContainer_v1#HLT_xAOD__TrigEMClusterContainer_L2CaloClusters Fragment size :172 bytes -HLTRMakerAlg.MKTool.Serialiser 5 0 DEBUG xAOD::TrigElectronAuxContainer_v1#HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. Fragment size :4580 bytes -HLTRMakerAlg.MKTool.Serialiser 5 0 DEBUG Fragment size including 3244 bytes from 14x DynAux: 7824 bytes -HLTRMakerAlg.MKTool.Serialiser 5 0 DEBUG xAOD::TrigElectronContainer_v1#HLT_xAOD__TrigElectronContainer_L2ElectronFex Fragment size :168 bytes -HLTRMakerAlg.MKTool.Serialiser 6 0 DEBUG xAOD::TrigCompositeAuxContainer_v2#remap_EgammaCaloDecisionsAux. Fragment size :348 bytes -HLTRMakerAlg.MKTool.Serialiser 6 0 DEBUG Fragment size including 72 bytes from 1x DynAux: 420 bytes -HLTRMakerAlg.MKTool.Serialiser 6 0 DEBUG xAOD::TrigCompositeContainer_v1#remap_EgammaCaloDecisions Fragment size :152 bytes -HLTRMakerAlg.MKTool.Serialiser 6 0 DEBUG xAOD::TrigEMClusterAuxContainer_v2#HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. Fragment size :772 bytes -HLTRMakerAlg.MKTool.Serialiser 6 0 DEBUG Fragment size including 52 bytes from 1x DynAux: 824 bytes -HLTRMakerAlg.MKTool.Serialiser 6 0 DEBUG xAOD::TrigEMClusterContainer_v1#HLT_xAOD__TrigEMClusterContainer_L2CaloClusters Fragment size :172 bytes -HLTRMakerAlg.MKTool.Serialiser 6 0 DEBUG xAOD::TrigElectronAuxContainer_v1#HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. Fragment size :1176 bytes -HLTRMakerAlg.MKTool.Serialiser 6 0 DEBUG Fragment size including 1172 bytes from 14x DynAux: 2348 bytes -HLTRMakerAlg.MKTool.Serialiser 6 0 DEBUG xAOD::TrigElectronContainer_v1#HLT_xAOD__TrigElectronContainer_L2ElectronFex Fragment size :168 bytes -HLTRMakerAlg.MKTool.Serialiser 7 0 DEBUG xAOD::TrigCompositeAuxContainer_v2#remap_EgammaCaloDecisionsAux. Fragment size :536 bytes -HLTRMakerAlg.MKTool.Serialiser 7 0 DEBUG Fragment size including 100 bytes from 1x DynAux: 636 bytes -HLTRMakerAlg.MKTool.Serialiser 7 0 DEBUG xAOD::TrigCompositeContainer_v1#remap_EgammaCaloDecisions Fragment size :152 bytes -HLTRMakerAlg.MKTool.Serialiser 7 0 DEBUG xAOD::TrigEMClusterAuxContainer_v2#HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. Fragment size :1412 bytes -HLTRMakerAlg.MKTool.Serialiser 7 0 DEBUG Fragment size including 60 bytes from 1x DynAux: 1472 bytes -HLTRMakerAlg.MKTool.Serialiser 7 0 DEBUG xAOD::TrigEMClusterContainer_v1#HLT_xAOD__TrigEMClusterContainer_L2CaloClusters Fragment size :172 bytes -HLTRMakerAlg.MKTool.Serialiser 7 0 DEBUG xAOD::TrigElectronAuxContainer_v1#HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. Fragment size :3016 bytes -HLTRMakerAlg.MKTool.Serialiser 7 0 DEBUG Fragment size including 2292 bytes from 14x DynAux: 5308 bytes -HLTRMakerAlg.MKTool.Serialiser 7 0 DEBUG xAOD::TrigElectronContainer_v1#HLT_xAOD__TrigElectronContainer_L2ElectronFex Fragment size :168 bytes -HLTRMakerAlg.MKTool.Serialiser 8 0 DEBUG xAOD::TrigCompositeAuxContainer_v2#remap_EgammaCaloDecisionsAux. Fragment size :444 bytes -HLTRMakerAlg.MKTool.Serialiser 8 0 DEBUG Fragment size including 100 bytes from 1x DynAux: 544 bytes -HLTRMakerAlg.MKTool.Serialiser 8 0 DEBUG xAOD::TrigCompositeContainer_v1#remap_EgammaCaloDecisions Fragment size :152 bytes -HLTRMakerAlg.MKTool.Serialiser 8 0 DEBUG xAOD::TrigEMClusterAuxContainer_v2#HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. Fragment size :1092 bytes -HLTRMakerAlg.MKTool.Serialiser 8 0 DEBUG Fragment size including 56 bytes from 1x DynAux: 1148 bytes -HLTRMakerAlg.MKTool.Serialiser 8 0 DEBUG xAOD::TrigEMClusterContainer_v1#HLT_xAOD__TrigEMClusterContainer_L2CaloClusters Fragment size :172 bytes -HLTRMakerAlg.MKTool.Serialiser 8 0 DEBUG xAOD::TrigElectronAuxContainer_v1#HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. Fragment size :808 bytes -HLTRMakerAlg.MKTool.Serialiser 8 0 DEBUG Fragment size including 948 bytes from 14x DynAux: 1756 bytes -HLTRMakerAlg.MKTool.Serialiser 8 0 DEBUG xAOD::TrigElectronContainer_v1#HLT_xAOD__TrigElectronContainer_L2ElectronFex Fragment size :168 bytes -HLTRMakerAlg.MKTool.Serialiser 9 0 DEBUG xAOD::TrigCompositeAuxContainer_v2#remap_EgammaCaloDecisionsAux. Fragment size :252 bytes -HLTRMakerAlg.MKTool.Serialiser 9 0 DEBUG xAOD::TrigCompositeContainer_v1#remap_EgammaCaloDecisions Fragment size :152 bytes -HLTRMakerAlg.MKTool.Serialiser 9 0 DEBUG xAOD::TrigEMClusterAuxContainer_v2#HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. Fragment size :452 bytes -HLTRMakerAlg.MKTool.Serialiser 9 0 DEBUG xAOD::TrigEMClusterContainer_v1#HLT_xAOD__TrigEMClusterContainer_L2CaloClusters Fragment size :172 bytes -HLTRMakerAlg.MKTool.Serialiser 9 0 DEBUG xAOD::TrigElectronAuxContainer_v1#HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. Fragment size :440 bytes -HLTRMakerAlg.MKTool.Serialiser 9 0 DEBUG xAOD::TrigElectronContainer_v1#HLT_xAOD__TrigElectronContainer_L2ElectronFex Fragment size :168 bytes -HLTRMakerAlg.MKTool.Serialiser 10 0 DEBUG xAOD::TrigCompositeAuxContainer_v2#remap_EgammaCaloDecisionsAux. Fragment size :632 bytes -HLTRMakerAlg.MKTool.Serialiser 10 0 DEBUG Fragment size including 144 bytes from 1x DynAux: 776 bytes -HLTRMakerAlg.MKTool.Serialiser 10 0 DEBUG xAOD::TrigCompositeContainer_v1#remap_EgammaCaloDecisions Fragment size :152 bytes -HLTRMakerAlg.MKTool.Serialiser 10 0 DEBUG xAOD::TrigEMClusterAuxContainer_v2#HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. Fragment size :1732 bytes -HLTRMakerAlg.MKTool.Serialiser 10 0 DEBUG Fragment size including 64 bytes from 1x DynAux: 1796 bytes -HLTRMakerAlg.MKTool.Serialiser 10 0 DEBUG xAOD::TrigEMClusterContainer_v1#HLT_xAOD__TrigEMClusterContainer_L2CaloClusters Fragment size :172 bytes -HLTRMakerAlg.MKTool.Serialiser 10 0 DEBUG xAOD::TrigElectronAuxContainer_v1#HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. Fragment size :3476 bytes -HLTRMakerAlg.MKTool.Serialiser 10 0 DEBUG Fragment size including 2572 bytes from 14x DynAux: 6048 bytes -HLTRMakerAlg.MKTool.Serialiser 10 0 DEBUG xAOD::TrigElectronContainer_v1#HLT_xAOD__TrigElectronContainer_L2ElectronFex Fragment size :168 bytes -HLTRMakerAlg.MKTool.Serialiser 11 0 DEBUG xAOD::TrigCompositeAuxContainer_v2#remap_EgammaCaloDecisionsAux. Fragment size :348 bytes -HLTRMakerAlg.MKTool.Serialiser 11 0 DEBUG Fragment size including 68 bytes from 1x DynAux: 416 bytes -HLTRMakerAlg.MKTool.Serialiser 11 0 DEBUG xAOD::TrigCompositeContainer_v1#remap_EgammaCaloDecisions Fragment size :152 bytes -HLTRMakerAlg.MKTool.Serialiser 11 0 DEBUG xAOD::TrigEMClusterAuxContainer_v2#HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. Fragment size :772 bytes -HLTRMakerAlg.MKTool.Serialiser 11 0 DEBUG Fragment size including 52 bytes from 1x DynAux: 824 bytes -HLTRMakerAlg.MKTool.Serialiser 11 0 DEBUG xAOD::TrigEMClusterContainer_v1#HLT_xAOD__TrigEMClusterContainer_L2CaloClusters Fragment size :172 bytes -HLTRMakerAlg.MKTool.Serialiser 11 0 DEBUG xAOD::TrigElectronAuxContainer_v1#HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. Fragment size :808 bytes -HLTRMakerAlg.MKTool.Serialiser 11 0 DEBUG Fragment size including 948 bytes from 14x DynAux: 1756 bytes -HLTRMakerAlg.MKTool.Serialiser 11 0 DEBUG xAOD::TrigElectronContainer_v1#HLT_xAOD__TrigElectronContainer_L2ElectronFex Fragment size :168 bytes -HLTRMakerAlg.MKTool.Serialiser 12 0 DEBUG xAOD::TrigCompositeAuxContainer_v2#remap_EgammaCaloDecisionsAux. Fragment size :1012 bytes -HLTRMakerAlg.MKTool.Serialiser 12 0 DEBUG Fragment size including 196 bytes from 1x DynAux: 1208 bytes -HLTRMakerAlg.MKTool.Serialiser 12 0 DEBUG xAOD::TrigCompositeContainer_v1#remap_EgammaCaloDecisions Fragment size :152 bytes -HLTRMakerAlg.MKTool.Serialiser 12 0 DEBUG xAOD::TrigEMClusterAuxContainer_v2#HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. Fragment size :3012 bytes -HLTRMakerAlg.MKTool.Serialiser 12 0 DEBUG Fragment size including 80 bytes from 1x DynAux: 3092 bytes -HLTRMakerAlg.MKTool.Serialiser 12 0 DEBUG xAOD::TrigEMClusterContainer_v1#HLT_xAOD__TrigEMClusterContainer_L2CaloClusters Fragment size :172 bytes -HLTRMakerAlg.MKTool.Serialiser 12 0 DEBUG xAOD::TrigElectronAuxContainer_v1#HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. Fragment size :3844 bytes -HLTRMakerAlg.MKTool.Serialiser 12 0 DEBUG Fragment size including 2796 bytes from 14x DynAux: 6640 bytes -HLTRMakerAlg.MKTool.Serialiser 12 0 DEBUG xAOD::TrigElectronContainer_v1#HLT_xAOD__TrigElectronContainer_L2ElectronFex Fragment size :168 bytes -HLTRMakerAlg.MKTool.Serialiser 13 0 DEBUG xAOD::TrigCompositeAuxContainer_v2#remap_EgammaCaloDecisionsAux. Fragment size :444 bytes -HLTRMakerAlg.MKTool.Serialiser 13 0 DEBUG Fragment size including 104 bytes from 1x DynAux: 548 bytes -HLTRMakerAlg.MKTool.Serialiser 13 0 DEBUG xAOD::TrigCompositeContainer_v1#remap_EgammaCaloDecisions Fragment size :152 bytes -HLTRMakerAlg.MKTool.Serialiser 13 0 DEBUG xAOD::TrigEMClusterAuxContainer_v2#HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. Fragment size :1092 bytes -HLTRMakerAlg.MKTool.Serialiser 13 0 DEBUG Fragment size including 56 bytes from 1x DynAux: 1148 bytes -HLTRMakerAlg.MKTool.Serialiser 13 0 DEBUG xAOD::TrigEMClusterContainer_v1#HLT_xAOD__TrigEMClusterContainer_L2CaloClusters Fragment size :172 bytes -HLTRMakerAlg.MKTool.Serialiser 13 0 DEBUG xAOD::TrigElectronAuxContainer_v1#HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. Fragment size :2464 bytes -HLTRMakerAlg.MKTool.Serialiser 13 0 DEBUG Fragment size including 1956 bytes from 14x DynAux: 4420 bytes -HLTRMakerAlg.MKTool.Serialiser 13 0 DEBUG xAOD::TrigElectronContainer_v1#HLT_xAOD__TrigElectronContainer_L2ElectronFex Fragment size :168 bytes -HLTRMakerAlg.MKTool.Serialiser 14 0 DEBUG xAOD::TrigCompositeAuxContainer_v2#remap_EgammaCaloDecisionsAux. Fragment size :348 bytes -HLTRMakerAlg.MKTool.Serialiser 14 0 DEBUG Fragment size including 72 bytes from 1x DynAux: 420 bytes -HLTRMakerAlg.MKTool.Serialiser 14 0 DEBUG xAOD::TrigCompositeContainer_v1#remap_EgammaCaloDecisions Fragment size :152 bytes -HLTRMakerAlg.MKTool.Serialiser 14 0 DEBUG xAOD::TrigEMClusterAuxContainer_v2#HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. Fragment size :772 bytes -HLTRMakerAlg.MKTool.Serialiser 14 0 DEBUG Fragment size including 52 bytes from 1x DynAux: 824 bytes -HLTRMakerAlg.MKTool.Serialiser 14 0 DEBUG xAOD::TrigEMClusterContainer_v1#HLT_xAOD__TrigEMClusterContainer_L2CaloClusters Fragment size :172 bytes -HLTRMakerAlg.MKTool.Serialiser 14 0 DEBUG xAOD::TrigElectronAuxContainer_v1#HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. Fragment size :716 bytes -HLTRMakerAlg.MKTool.Serialiser 14 0 DEBUG Fragment size including 892 bytes from 14x DynAux: 1608 bytes -HLTRMakerAlg.MKTool.Serialiser 14 0 DEBUG xAOD::TrigElectronContainer_v1#HLT_xAOD__TrigElectronContainer_L2ElectronFex Fragment size :168 bytes -HLTRMakerAlg.MKTool.Serialiser 15 0 DEBUG xAOD::TrigCompositeAuxContainer_v2#remap_EgammaCaloDecisionsAux. Fragment size :252 bytes -HLTRMakerAlg.MKTool.Serialiser 15 0 DEBUG xAOD::TrigCompositeContainer_v1#remap_EgammaCaloDecisions Fragment size :152 bytes -HLTRMakerAlg.MKTool.Serialiser 15 0 DEBUG xAOD::TrigEMClusterAuxContainer_v2#HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. Fragment size :452 bytes -HLTRMakerAlg.MKTool.Serialiser 15 0 DEBUG xAOD::TrigEMClusterContainer_v1#HLT_xAOD__TrigEMClusterContainer_L2CaloClusters Fragment size :172 bytes -HLTRMakerAlg.MKTool.Serialiser 15 0 DEBUG xAOD::TrigElectronAuxContainer_v1#HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. Fragment size :440 bytes -HLTRMakerAlg.MKTool.Serialiser 15 0 DEBUG xAOD::TrigElectronContainer_v1#HLT_xAOD__TrigElectronContainer_L2ElectronFex Fragment size :168 bytes -HLTRMakerAlg.MKTool.Serialiser 16 0 DEBUG xAOD::TrigCompositeAuxContainer_v2#remap_EgammaCaloDecisionsAux. Fragment size :348 bytes -HLTRMakerAlg.MKTool.Serialiser 16 0 DEBUG Fragment size including 64 bytes from 1x DynAux: 412 bytes -HLTRMakerAlg.MKTool.Serialiser 16 0 DEBUG xAOD::TrigCompositeContainer_v1#remap_EgammaCaloDecisions Fragment size :152 bytes -HLTRMakerAlg.MKTool.Serialiser 16 0 DEBUG xAOD::TrigEMClusterAuxContainer_v2#HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. Fragment size :772 bytes -HLTRMakerAlg.MKTool.Serialiser 16 0 DEBUG Fragment size including 52 bytes from 1x DynAux: 824 bytes -HLTRMakerAlg.MKTool.Serialiser 16 0 DEBUG xAOD::TrigEMClusterContainer_v1#HLT_xAOD__TrigEMClusterContainer_L2CaloClusters Fragment size :172 bytes -HLTRMakerAlg.MKTool.Serialiser 16 0 DEBUG xAOD::TrigElectronAuxContainer_v1#HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. Fragment size :440 bytes -HLTRMakerAlg.MKTool.Serialiser 16 0 DEBUG xAOD::TrigElectronContainer_v1#HLT_xAOD__TrigElectronContainer_L2ElectronFex Fragment size :168 bytes -HLTRMakerAlg.MKTool.Serialiser 17 0 DEBUG xAOD::TrigCompositeAuxContainer_v2#remap_EgammaCaloDecisionsAux. Fragment size :444 bytes -HLTRMakerAlg.MKTool.Serialiser 17 0 DEBUG Fragment size including 104 bytes from 1x DynAux: 548 bytes -HLTRMakerAlg.MKTool.Serialiser 17 0 DEBUG xAOD::TrigCompositeContainer_v1#remap_EgammaCaloDecisions Fragment size :152 bytes -HLTRMakerAlg.MKTool.Serialiser 17 0 DEBUG xAOD::TrigEMClusterAuxContainer_v2#HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. Fragment size :1092 bytes -HLTRMakerAlg.MKTool.Serialiser 17 0 DEBUG Fragment size including 56 bytes from 1x DynAux: 1148 bytes -HLTRMakerAlg.MKTool.Serialiser 17 0 DEBUG xAOD::TrigEMClusterContainer_v1#HLT_xAOD__TrigEMClusterContainer_L2CaloClusters Fragment size :172 bytes -HLTRMakerAlg.MKTool.Serialiser 17 0 DEBUG xAOD::TrigElectronAuxContainer_v1#HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. Fragment size :1360 bytes -HLTRMakerAlg.MKTool.Serialiser 17 0 DEBUG Fragment size including 1284 bytes from 14x DynAux: 2644 bytes -HLTRMakerAlg.MKTool.Serialiser 17 0 DEBUG xAOD::TrigElectronContainer_v1#HLT_xAOD__TrigElectronContainer_L2ElectronFex Fragment size :168 bytes -HLTRMakerAlg.MKTool.Serialiser 18 0 DEBUG xAOD::TrigCompositeAuxContainer_v2#remap_EgammaCaloDecisionsAux. Fragment size :444 bytes -HLTRMakerAlg.MKTool.Serialiser 18 0 DEBUG Fragment size including 100 bytes from 1x DynAux: 544 bytes -HLTRMakerAlg.MKTool.Serialiser 18 0 DEBUG xAOD::TrigCompositeContainer_v1#remap_EgammaCaloDecisions Fragment size :152 bytes -HLTRMakerAlg.MKTool.Serialiser 18 0 DEBUG xAOD::TrigEMClusterAuxContainer_v2#HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. Fragment size :1092 bytes -HLTRMakerAlg.MKTool.Serialiser 18 0 DEBUG Fragment size including 56 bytes from 1x DynAux: 1148 bytes -HLTRMakerAlg.MKTool.Serialiser 18 0 DEBUG xAOD::TrigEMClusterContainer_v1#HLT_xAOD__TrigEMClusterContainer_L2CaloClusters Fragment size :172 bytes -HLTRMakerAlg.MKTool.Serialiser 18 0 DEBUG xAOD::TrigElectronAuxContainer_v1#HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. Fragment size :808 bytes -HLTRMakerAlg.MKTool.Serialiser 18 0 DEBUG Fragment size including 948 bytes from 14x DynAux: 1756 bytes -HLTRMakerAlg.MKTool.Serialiser 18 0 DEBUG xAOD::TrigElectronContainer_v1#HLT_xAOD__TrigElectronContainer_L2ElectronFex Fragment size :168 bytes -HLTRMakerAlg.MKTool.Serialiser 19 0 DEBUG xAOD::TrigCompositeAuxContainer_v2#remap_EgammaCaloDecisionsAux. Fragment size :536 bytes -HLTRMakerAlg.MKTool.Serialiser 19 0 DEBUG Fragment size including 92 bytes from 1x DynAux: 628 bytes -HLTRMakerAlg.MKTool.Serialiser 19 0 DEBUG xAOD::TrigCompositeContainer_v1#remap_EgammaCaloDecisions Fragment size :152 bytes -HLTRMakerAlg.MKTool.Serialiser 19 0 DEBUG xAOD::TrigEMClusterAuxContainer_v2#HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. Fragment size :1412 bytes -HLTRMakerAlg.MKTool.Serialiser 19 0 DEBUG Fragment size including 60 bytes from 1x DynAux: 1472 bytes -HLTRMakerAlg.MKTool.Serialiser 19 0 DEBUG xAOD::TrigEMClusterContainer_v1#HLT_xAOD__TrigEMClusterContainer_L2CaloClusters Fragment size :172 bytes -HLTRMakerAlg.MKTool.Serialiser 19 0 DEBUG xAOD::TrigElectronAuxContainer_v1#HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. Fragment size :3292 bytes -HLTRMakerAlg.MKTool.Serialiser 19 0 DEBUG Fragment size including 2460 bytes from 14x DynAux: 5752 bytes -HLTRMakerAlg.MKTool.Serialiser 19 0 DEBUG xAOD::TrigElectronContainer_v1#HLT_xAOD__TrigElectronContainer_L2ElectronFex Fragment size :168 bytes +HLTRMakerAlg.MKTool.Serialiser 0 0 DEBUG xAOD::TrigCompositeContainer#remap_EgammaCaloDecisions Fragment size :180 bytes +HLTRMakerAlg.MKTool.Serialiser 0 0 DEBUG xAOD::TrigCompositeAuxContainer#remap_EgammaCaloDecisionsAux. Fragment size :396 bytes +HLTRMakerAlg.MKTool.Serialiser 0 0 DEBUG xAOD::TrigEMClusterContainer#HLT_xAOD__TrigEMClusterContainer_L2CaloClusters Fragment size :204 bytes +HLTRMakerAlg.MKTool.Serialiser 0 0 DEBUG xAOD::TrigEMClusterAuxContainer#HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. Fragment size :804 bytes +HLTRMakerAlg.MKTool.Serialiser 0 0 DEBUG Fragment size including 88 bytes from 1x DynAux : 892 +HLTRMakerAlg.MKTool.Serialiser 0 0 DEBUG xAOD::TrigElectronContainer#HLT_xAOD__TrigElectronContainer_L2ElectronFex Fragment size :196 bytes +HLTRMakerAlg.MKTool.Serialiser 0 0 DEBUG xAOD::TrigElectronAuxContainer#HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. Fragment size :1116 bytes +HLTRMakerAlg.MKTool.Serialiser 0 0 DEBUG Fragment size including 1616 bytes from 14x DynAux : 2732 +HLTRMakerAlg.MKTool.Serialiser 1 0 DEBUG xAOD::TrigCompositeContainer#remap_EgammaCaloDecisions Fragment size :180 bytes +HLTRMakerAlg.MKTool.Serialiser 1 0 DEBUG xAOD::TrigCompositeAuxContainer#remap_EgammaCaloDecisionsAux. Fragment size :740 bytes +HLTRMakerAlg.MKTool.Serialiser 1 0 DEBUG xAOD::TrigEMClusterContainer#HLT_xAOD__TrigEMClusterContainer_L2CaloClusters Fragment size :204 bytes +HLTRMakerAlg.MKTool.Serialiser 1 0 DEBUG xAOD::TrigEMClusterAuxContainer#HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. Fragment size :1764 bytes +HLTRMakerAlg.MKTool.Serialiser 1 0 DEBUG Fragment size including 100 bytes from 1x DynAux : 1864 +HLTRMakerAlg.MKTool.Serialiser 1 0 DEBUG xAOD::TrigElectronContainer#HLT_xAOD__TrigElectronContainer_L2ElectronFex Fragment size :196 bytes +HLTRMakerAlg.MKTool.Serialiser 1 0 DEBUG xAOD::TrigElectronAuxContainer#HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. Fragment size :3140 bytes +HLTRMakerAlg.MKTool.Serialiser 1 0 DEBUG Fragment size including 2848 bytes from 14x DynAux : 5988 +HLTRMakerAlg.MKTool.Serialiser 2 0 DEBUG xAOD::TrigCompositeContainer#remap_EgammaCaloDecisions Fragment size :180 bytes +HLTRMakerAlg.MKTool.Serialiser 2 0 DEBUG xAOD::TrigCompositeAuxContainer#remap_EgammaCaloDecisionsAux. Fragment size :948 bytes +HLTRMakerAlg.MKTool.Serialiser 2 0 DEBUG xAOD::TrigEMClusterContainer#HLT_xAOD__TrigEMClusterContainer_L2CaloClusters Fragment size :204 bytes +HLTRMakerAlg.MKTool.Serialiser 2 0 DEBUG xAOD::TrigEMClusterAuxContainer#HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. Fragment size :2404 bytes +HLTRMakerAlg.MKTool.Serialiser 2 0 DEBUG Fragment size including 108 bytes from 1x DynAux : 2512 +HLTRMakerAlg.MKTool.Serialiser 2 0 DEBUG xAOD::TrigElectronContainer#HLT_xAOD__TrigElectronContainer_L2ElectronFex Fragment size :196 bytes +HLTRMakerAlg.MKTool.Serialiser 2 0 DEBUG xAOD::TrigElectronAuxContainer#HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. Fragment size :2864 bytes +HLTRMakerAlg.MKTool.Serialiser 2 0 DEBUG Fragment size including 2680 bytes from 14x DynAux : 5544 +HLTRMakerAlg.MKTool.Serialiser 3 0 DEBUG xAOD::TrigCompositeContainer#remap_EgammaCaloDecisions Fragment size :180 bytes +HLTRMakerAlg.MKTool.Serialiser 3 0 DEBUG xAOD::TrigCompositeAuxContainer#remap_EgammaCaloDecisionsAux. Fragment size :728 bytes +HLTRMakerAlg.MKTool.Serialiser 3 0 DEBUG xAOD::TrigEMClusterContainer#HLT_xAOD__TrigEMClusterContainer_L2CaloClusters Fragment size :204 bytes +HLTRMakerAlg.MKTool.Serialiser 3 0 DEBUG xAOD::TrigEMClusterAuxContainer#HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. Fragment size :1764 bytes +HLTRMakerAlg.MKTool.Serialiser 3 0 DEBUG Fragment size including 100 bytes from 1x DynAux : 1864 +HLTRMakerAlg.MKTool.Serialiser 3 0 DEBUG xAOD::TrigElectronContainer#HLT_xAOD__TrigElectronContainer_L2ElectronFex Fragment size :196 bytes +HLTRMakerAlg.MKTool.Serialiser 3 0 DEBUG xAOD::TrigElectronAuxContainer#HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. Fragment size :3692 bytes +HLTRMakerAlg.MKTool.Serialiser 3 0 DEBUG Fragment size including 3184 bytes from 14x DynAux : 6876 +HLTRMakerAlg.MKTool.Serialiser 4 0 DEBUG xAOD::TrigCompositeContainer#remap_EgammaCaloDecisions Fragment size :180 bytes +HLTRMakerAlg.MKTool.Serialiser 4 0 DEBUG xAOD::TrigCompositeAuxContainer#remap_EgammaCaloDecisionsAux. Fragment size :516 bytes +HLTRMakerAlg.MKTool.Serialiser 4 0 DEBUG xAOD::TrigEMClusterContainer#HLT_xAOD__TrigEMClusterContainer_L2CaloClusters Fragment size :204 bytes +HLTRMakerAlg.MKTool.Serialiser 4 0 DEBUG xAOD::TrigEMClusterAuxContainer#HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. Fragment size :1124 bytes +HLTRMakerAlg.MKTool.Serialiser 4 0 DEBUG Fragment size including 92 bytes from 1x DynAux : 1216 +HLTRMakerAlg.MKTool.Serialiser 4 0 DEBUG xAOD::TrigElectronContainer#HLT_xAOD__TrigElectronContainer_L2ElectronFex Fragment size :196 bytes +HLTRMakerAlg.MKTool.Serialiser 4 0 DEBUG xAOD::TrigElectronAuxContainer#HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. Fragment size :1484 bytes +HLTRMakerAlg.MKTool.Serialiser 4 0 DEBUG Fragment size including 1840 bytes from 14x DynAux : 3324 +HLTRMakerAlg.MKTool.Serialiser 5 0 DEBUG xAOD::TrigCompositeContainer#remap_EgammaCaloDecisions Fragment size :180 bytes +HLTRMakerAlg.MKTool.Serialiser 5 0 DEBUG xAOD::TrigCompositeAuxContainer#remap_EgammaCaloDecisionsAux. Fragment size :1052 bytes +HLTRMakerAlg.MKTool.Serialiser 5 0 DEBUG xAOD::TrigEMClusterContainer#HLT_xAOD__TrigEMClusterContainer_L2CaloClusters Fragment size :204 bytes +HLTRMakerAlg.MKTool.Serialiser 5 0 DEBUG xAOD::TrigEMClusterAuxContainer#HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. Fragment size :2724 bytes +HLTRMakerAlg.MKTool.Serialiser 5 0 DEBUG Fragment size including 112 bytes from 1x DynAux : 2836 +HLTRMakerAlg.MKTool.Serialiser 5 0 DEBUG xAOD::TrigElectronContainer#HLT_xAOD__TrigElectronContainer_L2ElectronFex Fragment size :196 bytes +HLTRMakerAlg.MKTool.Serialiser 5 0 DEBUG xAOD::TrigElectronAuxContainer#HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. Fragment size :7004 bytes +HLTRMakerAlg.MKTool.Serialiser 5 0 DEBUG Fragment size including 5200 bytes from 14x DynAux : 12204 +HLTRMakerAlg.MKTool.Serialiser 6 0 DEBUG xAOD::TrigCompositeContainer#remap_EgammaCaloDecisions Fragment size :180 bytes +HLTRMakerAlg.MKTool.Serialiser 6 0 DEBUG xAOD::TrigCompositeAuxContainer#remap_EgammaCaloDecisionsAux. Fragment size :400 bytes +HLTRMakerAlg.MKTool.Serialiser 6 0 DEBUG xAOD::TrigEMClusterContainer#HLT_xAOD__TrigEMClusterContainer_L2CaloClusters Fragment size :204 bytes +HLTRMakerAlg.MKTool.Serialiser 6 0 DEBUG xAOD::TrigEMClusterAuxContainer#HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. Fragment size :804 bytes +HLTRMakerAlg.MKTool.Serialiser 6 0 DEBUG Fragment size including 88 bytes from 1x DynAux : 892 +HLTRMakerAlg.MKTool.Serialiser 6 0 DEBUG xAOD::TrigElectronContainer#HLT_xAOD__TrigElectronContainer_L2ElectronFex Fragment size :196 bytes +HLTRMakerAlg.MKTool.Serialiser 6 0 DEBUG xAOD::TrigElectronAuxContainer#HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. Fragment size :840 bytes +HLTRMakerAlg.MKTool.Serialiser 6 0 DEBUG Fragment size including 1448 bytes from 14x DynAux : 2288 +HLTRMakerAlg.MKTool.Serialiser 7 0 DEBUG xAOD::TrigCompositeContainer#remap_EgammaCaloDecisions Fragment size :180 bytes +HLTRMakerAlg.MKTool.Serialiser 7 0 DEBUG xAOD::TrigCompositeAuxContainer#remap_EgammaCaloDecisionsAux. Fragment size :620 bytes +HLTRMakerAlg.MKTool.Serialiser 7 0 DEBUG xAOD::TrigEMClusterContainer#HLT_xAOD__TrigEMClusterContainer_L2CaloClusters Fragment size :204 bytes +HLTRMakerAlg.MKTool.Serialiser 7 0 DEBUG xAOD::TrigEMClusterAuxContainer#HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. Fragment size :1444 bytes +HLTRMakerAlg.MKTool.Serialiser 7 0 DEBUG Fragment size including 96 bytes from 1x DynAux : 1540 +HLTRMakerAlg.MKTool.Serialiser 7 0 DEBUG xAOD::TrigElectronContainer#HLT_xAOD__TrigElectronContainer_L2ElectronFex Fragment size :196 bytes +HLTRMakerAlg.MKTool.Serialiser 7 0 DEBUG xAOD::TrigElectronAuxContainer#HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. Fragment size :2312 bytes +HLTRMakerAlg.MKTool.Serialiser 7 0 DEBUG Fragment size including 2344 bytes from 14x DynAux : 4656 +HLTRMakerAlg.MKTool.Serialiser 8 0 DEBUG xAOD::TrigCompositeContainer#remap_EgammaCaloDecisions Fragment size :180 bytes +HLTRMakerAlg.MKTool.Serialiser 8 0 DEBUG xAOD::TrigCompositeAuxContainer#remap_EgammaCaloDecisionsAux. Fragment size :524 bytes +HLTRMakerAlg.MKTool.Serialiser 8 0 DEBUG xAOD::TrigEMClusterContainer#HLT_xAOD__TrigEMClusterContainer_L2CaloClusters Fragment size :204 bytes +HLTRMakerAlg.MKTool.Serialiser 8 0 DEBUG xAOD::TrigEMClusterAuxContainer#HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. Fragment size :1124 bytes +HLTRMakerAlg.MKTool.Serialiser 8 0 DEBUG Fragment size including 92 bytes from 1x DynAux : 1216 +HLTRMakerAlg.MKTool.Serialiser 8 0 DEBUG xAOD::TrigElectronContainer#HLT_xAOD__TrigElectronContainer_L2ElectronFex Fragment size :196 bytes +HLTRMakerAlg.MKTool.Serialiser 8 0 DEBUG xAOD::TrigElectronAuxContainer#HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. Fragment size :1208 bytes +HLTRMakerAlg.MKTool.Serialiser 8 0 DEBUG Fragment size including 1672 bytes from 14x DynAux : 2880 +HLTRMakerAlg.MKTool.Serialiser 9 0 DEBUG xAOD::TrigCompositeContainer#remap_EgammaCaloDecisions Fragment size :180 bytes +HLTRMakerAlg.MKTool.Serialiser 9 0 DEBUG xAOD::TrigCompositeAuxContainer#remap_EgammaCaloDecisionsAux. Fragment size :296 bytes +HLTRMakerAlg.MKTool.Serialiser 9 0 DEBUG xAOD::TrigEMClusterContainer#HLT_xAOD__TrigEMClusterContainer_L2CaloClusters Fragment size :204 bytes +HLTRMakerAlg.MKTool.Serialiser 9 0 DEBUG xAOD::TrigEMClusterAuxContainer#HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. Fragment size :484 bytes +HLTRMakerAlg.MKTool.Serialiser 9 0 DEBUG xAOD::TrigElectronContainer#HLT_xAOD__TrigElectronContainer_L2ElectronFex Fragment size :196 bytes +HLTRMakerAlg.MKTool.Serialiser 9 0 DEBUG xAOD::TrigElectronAuxContainer#HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. Fragment size :472 bytes +HLTRMakerAlg.MKTool.Serialiser 10 0 DEBUG xAOD::TrigCompositeContainer#remap_EgammaCaloDecisions Fragment size :180 bytes +HLTRMakerAlg.MKTool.Serialiser 10 0 DEBUG xAOD::TrigCompositeAuxContainer#remap_EgammaCaloDecisionsAux. Fragment size :760 bytes +HLTRMakerAlg.MKTool.Serialiser 10 0 DEBUG xAOD::TrigEMClusterContainer#HLT_xAOD__TrigEMClusterContainer_L2CaloClusters Fragment size :204 bytes +HLTRMakerAlg.MKTool.Serialiser 10 0 DEBUG xAOD::TrigEMClusterAuxContainer#HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. Fragment size :1764 bytes +HLTRMakerAlg.MKTool.Serialiser 10 0 DEBUG Fragment size including 100 bytes from 1x DynAux : 1864 +HLTRMakerAlg.MKTool.Serialiser 10 0 DEBUG xAOD::TrigElectronContainer#HLT_xAOD__TrigElectronContainer_L2ElectronFex Fragment size :196 bytes +HLTRMakerAlg.MKTool.Serialiser 10 0 DEBUG xAOD::TrigElectronAuxContainer#HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. Fragment size :3876 bytes +HLTRMakerAlg.MKTool.Serialiser 10 0 DEBUG Fragment size including 3296 bytes from 14x DynAux : 7172 +HLTRMakerAlg.MKTool.Serialiser 11 0 DEBUG xAOD::TrigCompositeContainer#remap_EgammaCaloDecisions Fragment size :180 bytes +HLTRMakerAlg.MKTool.Serialiser 11 0 DEBUG xAOD::TrigCompositeAuxContainer#remap_EgammaCaloDecisionsAux. Fragment size :396 bytes +HLTRMakerAlg.MKTool.Serialiser 11 0 DEBUG xAOD::TrigEMClusterContainer#HLT_xAOD__TrigEMClusterContainer_L2CaloClusters Fragment size :204 bytes +HLTRMakerAlg.MKTool.Serialiser 11 0 DEBUG xAOD::TrigEMClusterAuxContainer#HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. Fragment size :804 bytes +HLTRMakerAlg.MKTool.Serialiser 11 0 DEBUG Fragment size including 88 bytes from 1x DynAux : 892 +HLTRMakerAlg.MKTool.Serialiser 11 0 DEBUG xAOD::TrigElectronContainer#HLT_xAOD__TrigElectronContainer_L2ElectronFex Fragment size :196 bytes +HLTRMakerAlg.MKTool.Serialiser 11 0 DEBUG xAOD::TrigElectronAuxContainer#HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. Fragment size :656 bytes +HLTRMakerAlg.MKTool.Serialiser 11 0 DEBUG Fragment size including 1336 bytes from 14x DynAux : 1992 +HLTRMakerAlg.MKTool.Serialiser 12 0 DEBUG xAOD::TrigCompositeContainer#remap_EgammaCaloDecisions Fragment size :180 bytes +HLTRMakerAlg.MKTool.Serialiser 12 0 DEBUG xAOD::TrigCompositeAuxContainer#remap_EgammaCaloDecisionsAux. Fragment size :1192 bytes +HLTRMakerAlg.MKTool.Serialiser 12 0 DEBUG xAOD::TrigEMClusterContainer#HLT_xAOD__TrigEMClusterContainer_L2CaloClusters Fragment size :204 bytes +HLTRMakerAlg.MKTool.Serialiser 12 0 DEBUG xAOD::TrigEMClusterAuxContainer#HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. Fragment size :3044 bytes +HLTRMakerAlg.MKTool.Serialiser 12 0 DEBUG Fragment size including 116 bytes from 1x DynAux : 3160 +HLTRMakerAlg.MKTool.Serialiser 12 0 DEBUG xAOD::TrigElectronContainer#HLT_xAOD__TrigElectronContainer_L2ElectronFex Fragment size :196 bytes +HLTRMakerAlg.MKTool.Serialiser 12 0 DEBUG xAOD::TrigElectronAuxContainer#HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. Fragment size :5440 bytes +HLTRMakerAlg.MKTool.Serialiser 12 0 DEBUG Fragment size including 4248 bytes from 14x DynAux : 9688 +HLTRMakerAlg.MKTool.Serialiser 13 0 DEBUG xAOD::TrigCompositeContainer#remap_EgammaCaloDecisions Fragment size :180 bytes +HLTRMakerAlg.MKTool.Serialiser 13 0 DEBUG xAOD::TrigCompositeAuxContainer#remap_EgammaCaloDecisionsAux. Fragment size :528 bytes +HLTRMakerAlg.MKTool.Serialiser 13 0 DEBUG xAOD::TrigEMClusterContainer#HLT_xAOD__TrigEMClusterContainer_L2CaloClusters Fragment size :204 bytes +HLTRMakerAlg.MKTool.Serialiser 13 0 DEBUG xAOD::TrigEMClusterAuxContainer#HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. Fragment size :1124 bytes +HLTRMakerAlg.MKTool.Serialiser 13 0 DEBUG Fragment size including 92 bytes from 1x DynAux : 1216 +HLTRMakerAlg.MKTool.Serialiser 13 0 DEBUG xAOD::TrigElectronContainer#HLT_xAOD__TrigElectronContainer_L2ElectronFex Fragment size :196 bytes +HLTRMakerAlg.MKTool.Serialiser 13 0 DEBUG xAOD::TrigElectronAuxContainer#HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. Fragment size :3324 bytes +HLTRMakerAlg.MKTool.Serialiser 13 0 DEBUG Fragment size including 2960 bytes from 14x DynAux : 6284 +HLTRMakerAlg.MKTool.Serialiser 14 0 DEBUG xAOD::TrigCompositeContainer#remap_EgammaCaloDecisions Fragment size :180 bytes +HLTRMakerAlg.MKTool.Serialiser 14 0 DEBUG xAOD::TrigCompositeAuxContainer#remap_EgammaCaloDecisionsAux. Fragment size :400 bytes +HLTRMakerAlg.MKTool.Serialiser 14 0 DEBUG xAOD::TrigEMClusterContainer#HLT_xAOD__TrigEMClusterContainer_L2CaloClusters Fragment size :204 bytes +HLTRMakerAlg.MKTool.Serialiser 14 0 DEBUG xAOD::TrigEMClusterAuxContainer#HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. Fragment size :804 bytes +HLTRMakerAlg.MKTool.Serialiser 14 0 DEBUG Fragment size including 88 bytes from 1x DynAux : 892 +HLTRMakerAlg.MKTool.Serialiser 14 0 DEBUG xAOD::TrigElectronContainer#HLT_xAOD__TrigElectronContainer_L2ElectronFex Fragment size :196 bytes +HLTRMakerAlg.MKTool.Serialiser 14 0 DEBUG xAOD::TrigElectronAuxContainer#HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. Fragment size :748 bytes +HLTRMakerAlg.MKTool.Serialiser 14 0 DEBUG Fragment size including 1392 bytes from 14x DynAux : 2140 +HLTRMakerAlg.MKTool.Serialiser 15 0 DEBUG xAOD::TrigCompositeContainer#remap_EgammaCaloDecisions Fragment size :180 bytes +HLTRMakerAlg.MKTool.Serialiser 15 0 DEBUG xAOD::TrigCompositeAuxContainer#remap_EgammaCaloDecisionsAux. Fragment size :296 bytes +HLTRMakerAlg.MKTool.Serialiser 15 0 DEBUG xAOD::TrigEMClusterContainer#HLT_xAOD__TrigEMClusterContainer_L2CaloClusters Fragment size :204 bytes +HLTRMakerAlg.MKTool.Serialiser 15 0 DEBUG xAOD::TrigEMClusterAuxContainer#HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. Fragment size :484 bytes +HLTRMakerAlg.MKTool.Serialiser 15 0 DEBUG xAOD::TrigElectronContainer#HLT_xAOD__TrigElectronContainer_L2ElectronFex Fragment size :196 bytes +HLTRMakerAlg.MKTool.Serialiser 15 0 DEBUG xAOD::TrigElectronAuxContainer#HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. Fragment size :472 bytes +HLTRMakerAlg.MKTool.Serialiser 16 0 DEBUG xAOD::TrigCompositeContainer#remap_EgammaCaloDecisions Fragment size :180 bytes +HLTRMakerAlg.MKTool.Serialiser 16 0 DEBUG xAOD::TrigCompositeAuxContainer#remap_EgammaCaloDecisionsAux. Fragment size :392 bytes +HLTRMakerAlg.MKTool.Serialiser 16 0 DEBUG xAOD::TrigEMClusterContainer#HLT_xAOD__TrigEMClusterContainer_L2CaloClusters Fragment size :204 bytes +HLTRMakerAlg.MKTool.Serialiser 16 0 DEBUG xAOD::TrigEMClusterAuxContainer#HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. Fragment size :804 bytes +HLTRMakerAlg.MKTool.Serialiser 16 0 DEBUG Fragment size including 88 bytes from 1x DynAux : 892 +HLTRMakerAlg.MKTool.Serialiser 16 0 DEBUG xAOD::TrigElectronContainer#HLT_xAOD__TrigElectronContainer_L2ElectronFex Fragment size :196 bytes +HLTRMakerAlg.MKTool.Serialiser 16 0 DEBUG xAOD::TrigElectronAuxContainer#HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. Fragment size :472 bytes +HLTRMakerAlg.MKTool.Serialiser 17 0 DEBUG xAOD::TrigCompositeContainer#remap_EgammaCaloDecisions Fragment size :180 bytes +HLTRMakerAlg.MKTool.Serialiser 17 0 DEBUG xAOD::TrigCompositeAuxContainer#remap_EgammaCaloDecisionsAux. Fragment size :528 bytes +HLTRMakerAlg.MKTool.Serialiser 17 0 DEBUG xAOD::TrigEMClusterContainer#HLT_xAOD__TrigEMClusterContainer_L2CaloClusters Fragment size :204 bytes +HLTRMakerAlg.MKTool.Serialiser 17 0 DEBUG xAOD::TrigEMClusterAuxContainer#HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. Fragment size :1124 bytes +HLTRMakerAlg.MKTool.Serialiser 17 0 DEBUG Fragment size including 92 bytes from 1x DynAux : 1216 +HLTRMakerAlg.MKTool.Serialiser 17 0 DEBUG xAOD::TrigElectronContainer#HLT_xAOD__TrigElectronContainer_L2ElectronFex Fragment size :196 bytes +HLTRMakerAlg.MKTool.Serialiser 17 0 DEBUG xAOD::TrigElectronAuxContainer#HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. Fragment size :1852 bytes +HLTRMakerAlg.MKTool.Serialiser 17 0 DEBUG Fragment size including 2064 bytes from 14x DynAux : 3916 +HLTRMakerAlg.MKTool.Serialiser 18 0 DEBUG xAOD::TrigCompositeContainer#remap_EgammaCaloDecisions Fragment size :180 bytes +HLTRMakerAlg.MKTool.Serialiser 18 0 DEBUG xAOD::TrigCompositeAuxContainer#remap_EgammaCaloDecisionsAux. Fragment size :524 bytes +HLTRMakerAlg.MKTool.Serialiser 18 0 DEBUG xAOD::TrigEMClusterContainer#HLT_xAOD__TrigEMClusterContainer_L2CaloClusters Fragment size :204 bytes +HLTRMakerAlg.MKTool.Serialiser 18 0 DEBUG xAOD::TrigEMClusterAuxContainer#HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. Fragment size :1124 bytes +HLTRMakerAlg.MKTool.Serialiser 18 0 DEBUG Fragment size including 92 bytes from 1x DynAux : 1216 +HLTRMakerAlg.MKTool.Serialiser 18 0 DEBUG xAOD::TrigElectronContainer#HLT_xAOD__TrigElectronContainer_L2ElectronFex Fragment size :196 bytes +HLTRMakerAlg.MKTool.Serialiser 18 0 DEBUG xAOD::TrigElectronAuxContainer#HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. Fragment size :840 bytes +HLTRMakerAlg.MKTool.Serialiser 18 0 DEBUG Fragment size including 1448 bytes from 14x DynAux : 2288 +HLTRMakerAlg.MKTool.Serialiser 19 0 DEBUG xAOD::TrigCompositeContainer#remap_EgammaCaloDecisions Fragment size :180 bytes +HLTRMakerAlg.MKTool.Serialiser 19 0 DEBUG xAOD::TrigCompositeAuxContainer#remap_EgammaCaloDecisionsAux. Fragment size :612 bytes +HLTRMakerAlg.MKTool.Serialiser 19 0 DEBUG xAOD::TrigEMClusterContainer#HLT_xAOD__TrigEMClusterContainer_L2CaloClusters Fragment size :204 bytes +HLTRMakerAlg.MKTool.Serialiser 19 0 DEBUG xAOD::TrigEMClusterAuxContainer#HLT_xAOD__TrigEMClusterContainer_L2CaloClustersAux. Fragment size :1444 bytes +HLTRMakerAlg.MKTool.Serialiser 19 0 DEBUG Fragment size including 96 bytes from 1x DynAux : 1540 +HLTRMakerAlg.MKTool.Serialiser 19 0 DEBUG xAOD::TrigElectronContainer#HLT_xAOD__TrigElectronContainer_L2ElectronFex Fragment size :196 bytes +HLTRMakerAlg.MKTool.Serialiser 19 0 DEBUG xAOD::TrigElectronAuxContainer#HLT_xAOD__TrigElectronContainer_L2ElectronFexAux. Fragment size :5624 bytes +HLTRMakerAlg.MKTool.Serialiser 19 0 DEBUG Fragment size including 4360 bytes from 14x DynAux : 9984 TrigSignatureMoniMT INFO HLT_2e3_etcut 20 10 6 5 5 -TrigSignatureMoniMT INFO HLT_2e3_etcut decisions 16 83 -TrigSignatureMoniMT INFO HLT_e3_e5_etcut 20 20 12 10 10 -TrigSignatureMoniMT INFO HLT_e3_e5_etcut decisions 46 215 +TrigSignatureMoniMT INFO HLT_2e3_etcut decisions 16 100 +TrigSignatureMoniMT INFO HLT_e3_e5_etcut 20 20 12 11 11 +TrigSignatureMoniMT INFO HLT_e3_e5_etcut decisions 46 279 TrigSignatureMoniMT INFO HLT_e3_etcut 20 9 8 8 8 -TrigSignatureMoniMT INFO HLT_e3_etcut decisions 22 107 +TrigSignatureMoniMT INFO HLT_e3_etcut decisions 22 140 TrigSignatureMoniMT INFO HLT_e5_etcut 20 20 17 17 17 -TrigSignatureMoniMT INFO HLT_e5_etcut decisions 52 255 +TrigSignatureMoniMT INFO HLT_e5_etcut decisions 52 333 TrigSignatureMoniMT INFO HLT_e7_etcut 20 20 11 11 11 -TrigSignatureMoniMT INFO HLT_e7_etcut decisions 17 119 +TrigSignatureMoniMT INFO HLT_e7_etcut decisions 17 173 diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/electronMenu.ref b/Trigger/TrigValidation/TrigUpgradeTest/share/electronMenu.ref index 8e8cfe440bebbaa461fd8c198a1a0359ce07b417..9e7fb876f609783fd025f673b027c14ccc01c35d 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/electronMenu.ref +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/electronMenu.ref @@ -94,10 +94,10 @@ TriggerSummaryStep1 19 0 DEBUG +++ HLT_e7_etcut ID#243 TriggerSummaryStep2 19 0 DEBUG +++ HLT_e5_etcut ID#607406625 TriggerSummaryStep2 19 0 DEBUG +++ HLT_e7_etcut ID#2430733989 TrigSignatureMoniMT INFO HLT_e3_etcut 20 9 8 7 7 -TrigSignatureMoniMT INFO HLT_e3_etcut decisions 22 105 +TrigSignatureMoniMT INFO HLT_e3_etcut decisions 22 137 TrigSignatureMoniMT INFO HLT_e3_etcut1step 20 20 18 0 18 TrigSignatureMoniMT INFO HLT_e3_etcut1step decisions 54 0 TrigSignatureMoniMT INFO HLT_e5_etcut 20 20 17 16 16 -TrigSignatureMoniMT INFO HLT_e5_etcut decisions 50 251 +TrigSignatureMoniMT INFO HLT_e5_etcut decisions 50 329 TrigSignatureMoniMT INFO HLT_e7_etcut 20 20 15 14 14 -TrigSignatureMoniMT INFO HLT_e7_etcut decisions 36 205 +TrigSignatureMoniMT INFO HLT_e7_etcut decisions 36 264 diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/fullMenu.py b/Trigger/TrigValidation/TrigUpgradeTest/share/fullMenu.py index 007e6b9abdb43e8b31b1a03e1812bee47e54dcaa..9e36ab4f49b3850ddf28017ac473874dd5cd6b23 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/fullMenu.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/fullMenu.py @@ -19,7 +19,7 @@ doElectron = True doPhoton = True doMuon = True doJet = True -doMET = False +doMET = True doBJet = False doCombo = True diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/fullMenu.ref b/Trigger/TrigValidation/TrigUpgradeTest/share/fullMenu.ref index e543b0835e7515dd2a4b22846660cfdd665cdb62..3038ae267ade58a248390d2a42e8711dbf7cd61e 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/fullMenu.ref +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/fullMenu.ref @@ -1,3 +1,4 @@ +TriggerSummaryStep1 0 0 DEBUG +++ HLT_xe30_L1XE10 ID#347649004 TriggerSummaryStep1 0 0 DEBUG +++ HLT_e5_etcut ID#607406625 TriggerSummaryStep1 0 0 DEBUG +++ HLT_j100 ID#625306965 TriggerSummaryStep1 0 0 DEBUG +++ HLT_g5_etcut ID#1407390618 @@ -9,6 +10,7 @@ TriggerSummaryStep2 0 0 DEBUG +++ HLT_e5_etcut ID#607 TriggerSummaryStep2 0 0 DEBUG +++ HLT_g5_etcut ID#1407390618 TriggerSummaryStep2 0 0 DEBUG +++ HLT_e7_etcut ID#2430733989 TriggerSummaryStep2 0 0 DEBUG +++ HLT_e3_etcut ID#2711808158 +TriggerSummaryStep1 1 0 DEBUG +++ HLT_xe30_L1XE10 ID#347649004 TriggerSummaryStep1 1 0 DEBUG +++ HLT_e5_etcut ID#607406625 TriggerSummaryStep1 1 0 DEBUG +++ HLT_j100 ID#625306965 TriggerSummaryStep1 1 0 DEBUG +++ HLT_g5_etcut ID#1407390618 @@ -29,6 +31,7 @@ TriggerSummaryStep2 2 0 DEBUG +++ HLT_e5_etcut ID#607 TriggerSummaryStep2 2 0 DEBUG +++ HLT_g5_etcut ID#1407390618 TriggerSummaryStep2 2 0 DEBUG +++ HLT_e7_etcut ID#2430733989 TriggerSummaryStep2 2 0 DEBUG +++ HLT_e3_etcut ID#2711808158 +TriggerSummaryStep1 3 0 DEBUG +++ HLT_xe30_L1XE10 ID#347649004 TriggerSummaryStep1 3 0 DEBUG +++ HLT_e5_etcut ID#607406625 TriggerSummaryStep1 3 0 DEBUG +++ HLT_j100 ID#625306965 TriggerSummaryStep1 3 0 DEBUG +++ HLT_g5_etcut ID#1407390618 @@ -49,6 +52,7 @@ TriggerSummaryStep2 4 0 DEBUG +++ HLT_e5_etcut ID#607 TriggerSummaryStep2 4 0 DEBUG +++ HLT_g5_etcut ID#1407390618 TriggerSummaryStep2 4 0 DEBUG +++ HLT_e7_etcut ID#2430733989 TriggerSummaryStep2 4 0 DEBUG +++ HLT_e3_etcut ID#2711808158 +TriggerSummaryStep1 5 0 DEBUG +++ HLT_xe30_L1XE10 ID#347649004 TriggerSummaryStep1 5 0 DEBUG +++ HLT_mu6Comb ID#393364983 TriggerSummaryStep1 5 0 DEBUG +++ HLT_e5_etcut ID#607406625 TriggerSummaryStep1 5 0 DEBUG +++ HLT_g5_etcut ID#1407390618 @@ -62,6 +66,7 @@ TriggerSummaryStep2 5 0 DEBUG +++ HLT_e5_etcut ID#607 TriggerSummaryStep2 5 0 DEBUG +++ HLT_g5_etcut ID#1407390618 TriggerSummaryStep2 5 0 DEBUG +++ HLT_e7_etcut ID#2430733989 TriggerSummaryStep2 5 0 DEBUG +++ HLT_e3_etcut ID#2711808158 +TriggerSummaryStep1 6 0 DEBUG +++ HLT_xe30_L1XE10 ID#347649004 TriggerSummaryStep1 6 0 DEBUG +++ HLT_mu6Comb ID#393364983 TriggerSummaryStep1 6 0 DEBUG +++ HLT_e5_etcut ID#607406625 TriggerSummaryStep1 6 0 DEBUG +++ HLT_g5_etcut ID#1407390618 @@ -83,6 +88,7 @@ TriggerSummaryStep2 7 0 DEBUG +++ HLT_e5_etcut ID#607 TriggerSummaryStep2 7 0 DEBUG +++ HLT_g5_etcut ID#1407390618 TriggerSummaryStep2 7 0 DEBUG +++ HLT_e7_etcut ID#2430733989 TriggerSummaryStep2 7 0 DEBUG +++ HLT_e3_etcut ID#2711808158 +TriggerSummaryStep1 8 0 DEBUG +++ HLT_xe30_L1XE10 ID#347649004 TriggerSummaryStep1 8 0 DEBUG +++ HLT_e5_etcut ID#607406625 TriggerSummaryStep1 8 0 DEBUG +++ HLT_g5_etcut ID#1407390618 TriggerSummaryStep1 8 0 DEBUG +++ HLT_e3_etcut1step ID#1509456583 @@ -92,6 +98,7 @@ TriggerSummaryStep2 8 0 DEBUG +++ HLT_e5_etcut ID#607 TriggerSummaryStep2 8 0 DEBUG +++ HLT_g5_etcut ID#1407390618 TriggerSummaryStep2 8 0 DEBUG +++ HLT_e7_etcut ID#2430733989 TriggerSummaryStep2 8 0 DEBUG +++ HLT_e3_etcut ID#2711808158 +TriggerSummaryStep1 9 0 DEBUG +++ HLT_xe30_L1XE10 ID#347649004 TriggerSummaryStep1 10 0 DEBUG +++ HLT_e5_etcut ID#607406625 TriggerSummaryStep1 10 0 DEBUG +++ HLT_j100 ID#625306965 TriggerSummaryStep1 10 0 DEBUG +++ HLT_g5_etcut ID#1407390618 @@ -110,7 +117,9 @@ TriggerSummaryStep1 11 0 DEBUG +++ HLT_e3_etcut ID#271 TriggerSummaryStep2 11 0 DEBUG +++ HLT_e5_etcut ID#607406625 TriggerSummaryStep2 11 0 DEBUG +++ HLT_g5_etcut ID#1407390618 TriggerSummaryStep2 11 0 DEBUG +++ HLT_e3_etcut ID#2711808158 +TriggerSummaryStep1 12 0 DEBUG +++ HLT_xe30_L1XE10 ID#347649004 TriggerSummaryStep1 12 0 DEBUG +++ HLT_e5_etcut ID#607406625 +TriggerSummaryStep1 12 0 DEBUG +++ HLT_xe65_L1XE50 ID#1283272884 TriggerSummaryStep1 12 0 DEBUG +++ HLT_g5_etcut ID#1407390618 TriggerSummaryStep1 12 0 DEBUG +++ HLT_e3_etcut1step ID#1509456583 TriggerSummaryStep1 12 0 DEBUG +++ HLT_e7_etcut ID#2430733989 @@ -130,7 +139,9 @@ TriggerSummaryStep2 13 0 DEBUG +++ HLT_e5_etcut ID#607 TriggerSummaryStep2 13 0 DEBUG +++ HLT_g5_etcut ID#1407390618 TriggerSummaryStep2 13 0 DEBUG +++ HLT_e7_etcut ID#2430733989 TriggerSummaryStep2 13 0 DEBUG +++ HLT_e3_etcut ID#2711808158 +TriggerSummaryStep1 14 0 DEBUG +++ HLT_xe30_L1XE10 ID#347649004 TriggerSummaryStep1 14 0 DEBUG +++ HLT_e5_etcut ID#607406625 +TriggerSummaryStep1 14 0 DEBUG +++ HLT_xe65_L1XE50 ID#1283272884 TriggerSummaryStep1 14 0 DEBUG +++ HLT_g5_etcut ID#1407390618 TriggerSummaryStep1 14 0 DEBUG +++ HLT_e3_etcut1step ID#1509456583 TriggerSummaryStep1 14 0 DEBUG +++ HLT_e3_etcut ID#2711808158 @@ -139,10 +150,13 @@ TriggerSummaryStep2 14 0 DEBUG +++ HLT_g5_etcut ID#140 TriggerSummaryStep2 14 0 DEBUG +++ HLT_e3_etcut ID#2711808158 TriggerSummaryStep1 15 0 DEBUG +++ HLT_mu6Comb ID#393364983 TriggerSummaryStep1 15 0 DEBUG +++ HLT_mu6 ID#1672162766 +TriggerSummaryStep1 16 0 DEBUG +++ HLT_xe30_L1XE10 ID#347649004 TriggerSummaryStep1 16 0 DEBUG +++ HLT_e3_etcut1step ID#1509456583 TriggerSummaryStep1 16 0 DEBUG +++ HLT_e3_etcut ID#2711808158 TriggerSummaryStep2 16 0 DEBUG +++ HLT_e3_etcut ID#2711808158 +TriggerSummaryStep1 17 0 DEBUG +++ HLT_xe30_L1XE10 ID#347649004 TriggerSummaryStep1 17 0 DEBUG +++ HLT_e5_etcut ID#607406625 +TriggerSummaryStep1 17 0 DEBUG +++ HLT_xe65_L1XE50 ID#1283272884 TriggerSummaryStep1 17 0 DEBUG +++ HLT_g5_etcut ID#1407390618 TriggerSummaryStep1 17 0 DEBUG +++ HLT_e3_etcut1step ID#1509456583 TriggerSummaryStep1 17 0 DEBUG +++ HLT_e7_etcut ID#2430733989 @@ -157,6 +171,7 @@ TriggerSummaryStep1 18 0 DEBUG +++ HLT_e3_etcut1step I TriggerSummaryStep1 18 0 DEBUG +++ HLT_e7_etcut ID#2430733989 TriggerSummaryStep1 18 0 DEBUG +++ HLT_e3_etcut ID#2711808158 TriggerSummaryStep2 18 0 DEBUG +++ HLT_g5_etcut ID#1407390618 +TriggerSummaryStep1 19 0 DEBUG +++ HLT_xe30_L1XE10 ID#347649004 TriggerSummaryStep1 19 0 DEBUG +++ HLT_e5_etcut ID#607406625 TriggerSummaryStep1 19 0 DEBUG +++ HLT_j100 ID#625306965 TriggerSummaryStep1 19 0 DEBUG +++ HLT_g5_etcut ID#1407390618 @@ -173,15 +188,15 @@ TrigSignatureMoniMT INFO HLT_2mu6 decisions TrigSignatureMoniMT INFO HLT_2mu6Comb 20 20 0 0 0 TrigSignatureMoniMT INFO HLT_2mu6Comb decisions 0 0 TrigSignatureMoniMT INFO HLT_e3_etcut 20 20 18 17 17 -TrigSignatureMoniMT INFO HLT_e3_etcut decisions 54 262 +TrigSignatureMoniMT INFO HLT_e3_etcut decisions 54 343 TrigSignatureMoniMT INFO HLT_e3_etcut1step 20 20 18 0 18 TrigSignatureMoniMT INFO HLT_e3_etcut1step decisions 54 0 TrigSignatureMoniMT INFO HLT_e3_etcut_mu6 20 20 10 0 1 TrigSignatureMoniMT INFO HLT_e3_etcut_mu6 decisions 17 0 TrigSignatureMoniMT INFO HLT_e5_etcut 20 20 17 16 16 -TrigSignatureMoniMT INFO HLT_e5_etcut decisions 50 251 +TrigSignatureMoniMT INFO HLT_e5_etcut decisions 50 330 TrigSignatureMoniMT INFO HLT_e7_etcut 20 20 15 14 14 -TrigSignatureMoniMT INFO HLT_e7_etcut decisions 36 205 +TrigSignatureMoniMT INFO HLT_e7_etcut decisions 36 265 TrigSignatureMoniMT INFO HLT_g5_etcut 20 20 17 17 17 TrigSignatureMoniMT INFO HLT_g5_etcut decisions 50 50 TrigSignatureMoniMT INFO HLT_j100 20 20 6 0 6 @@ -192,3 +207,7 @@ TrigSignatureMoniMT INFO HLT_mu6 TrigSignatureMoniMT INFO HLT_mu6 decisions 3 0 TrigSignatureMoniMT INFO HLT_mu6Comb 20 20 3 2 2 TrigSignatureMoniMT INFO HLT_mu6Comb decisions 3 2 +TrigSignatureMoniMT INFO HLT_xe30_L1XE10 20 20 12 0 12 +TrigSignatureMoniMT INFO HLT_xe30_L1XE10 decisions 12 0 +TrigSignatureMoniMT INFO HLT_xe65_L1XE50 20 20 3 0 3 +TrigSignatureMoniMT INFO HLT_xe65_L1XE50 decisions 3 0 diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/jetMenu.ref b/Trigger/TrigValidation/TrigUpgradeTest/share/jetMenu.ref index 3fe23bbc27ceb6b9cb83dc3ea055c83d256d954f..ce932a38433d86b87083b601253f6cf2815216be 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/jetMenu.ref +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/jetMenu.ref @@ -1,14 +1,16 @@ -TriggerSummaryStep1 5 0 DEBUG +++ HLT_j100 ID#625306965 -TriggerSummaryStep1 5 0 DEBUG +++ HLT_j85 ID#3478728990 -TriggerSummaryStep1 8 0 DEBUG +++ HLT_j100 ID#625306965 -TriggerSummaryStep1 8 0 DEBUG +++ HLT_j85 ID#3478728990 +TriggerSummaryStep1 0 0 DEBUG +++ HLT_j100 ID#625306965 +TriggerSummaryStep1 0 0 DEBUG +++ HLT_j85 ID#3478728990 +TriggerSummaryStep1 1 0 DEBUG +++ HLT_j100 ID#625306965 +TriggerSummaryStep1 1 0 DEBUG +++ HLT_j85 ID#3478728990 +TriggerSummaryStep1 3 0 DEBUG +++ HLT_j100 ID#625306965 +TriggerSummaryStep1 3 0 DEBUG +++ HLT_j85 ID#3478728990 TriggerSummaryStep1 10 0 DEBUG +++ HLT_j100 ID#625306965 TriggerSummaryStep1 10 0 DEBUG +++ HLT_j85 ID#3478728990 -TriggerSummaryStep1 11 0 DEBUG +++ HLT_j100 ID#625306965 -TriggerSummaryStep1 11 0 DEBUG +++ HLT_j85 ID#3478728990 TriggerSummaryStep1 13 0 DEBUG +++ HLT_j100 ID#625306965 TriggerSummaryStep1 13 0 DEBUG +++ HLT_j85 ID#3478728990 -TrigSignatureMoniMT INFO HLT_j100 15 15 5 5 -TrigSignatureMoniMT INFO HLT_j100 decisions 5 -TrigSignatureMoniMT INFO HLT_j85 15 15 5 5 -TrigSignatureMoniMT INFO HLT_j85 decisions 5 +TriggerSummaryStep1 19 0 DEBUG +++ HLT_j100 ID#625306965 +TriggerSummaryStep1 19 0 DEBUG +++ HLT_j85 ID#3478728990 +TrigSignatureMoniMT INFO HLT_j100 20 20 6 6 +TrigSignatureMoniMT INFO HLT_j100 decisions 6 +TrigSignatureMoniMT INFO HLT_j85 20 20 6 6 +TrigSignatureMoniMT INFO HLT_j85 decisions 6 diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/met_standalone.ref b/Trigger/TrigValidation/TrigUpgradeTest/share/met_standalone.ref index 0fd92ec58434e564311a669c5d747b1f1f10bb46..411aed960438769b9fc0df4c9c08fab56173fb31 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/met_standalone.ref +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/met_standalone.ref @@ -1,4 +1,4 @@ -METHypoAlg 0 0 DEBUG The MET value is 82 +METHypoAlg 0 0 DEBUG The MET value is 81 METHypoAlg 1 0 DEBUG The MET value is 31 METHypoAlg 2 0 DEBUG The MET value is 39 METHypoAlg 3 0 DEBUG The MET value is 67 diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/muMenu.ref b/Trigger/TrigValidation/TrigUpgradeTest/share/muMenu.ref index 11a3085361381bd3bbd2da276afe0ead09901723..40cec9c91507044bb75b21d8cb2fc5b944259851 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/muMenu.ref +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/muMenu.ref @@ -3,8 +3,10 @@ TriggerSummaryStep1 4 0 DEBUG +++ HLT_mu6Comb ID#3933 TriggerSummaryStep1 4 0 DEBUG +++ HLT_mu6nol1 ID#1250234908 TriggerSummaryStep1 4 0 DEBUG +++ HLT_mu6 ID#1672162766 TriggerSummaryStep1 4 0 DEBUG +++ HLT_mu6fast ID#2393852230 +TriggerSummaryStep2 4 0 DEBUG +++ HLT_mu20_ivar ID#267444585 TriggerSummaryStep2 4 0 DEBUG +++ HLT_mu6Comb ID#393364983 TriggerSummaryStep2 4 0 DEBUG +++ HLT_mu6 ID#1672162766 +TriggerSummaryStep3 4 0 DEBUG +++ HLT_mu20_ivar ID#267444585 TriggerSummaryStep1 6 0 DEBUG +++ HLT_mu6Comb ID#393364983 TriggerSummaryStep1 6 0 DEBUG +++ HLT_mu6nol1 ID#1250234908 TriggerSummaryStep1 6 0 DEBUG +++ HLT_mu6 ID#1672162766 @@ -22,8 +24,8 @@ TrigSignatureMoniMT INFO HLT_2mu6 TrigSignatureMoniMT INFO HLT_2mu6 decisions 2 2 2 0 TrigSignatureMoniMT INFO HLT_2mu6Comb 10 10 1 1 0 0 1 TrigSignatureMoniMT INFO HLT_2mu6Comb decisions 2 2 0 0 -TrigSignatureMoniMT INFO HLT_mu20_ivar 10 10 1 0 0 0 0 -TrigSignatureMoniMT INFO HLT_mu20_ivar decisions 1 0 0 0 +TrigSignatureMoniMT INFO HLT_mu20_ivar 10 10 1 1 1 0 1 +TrigSignatureMoniMT INFO HLT_mu20_ivar decisions 1 1 1 0 TrigSignatureMoniMT INFO HLT_mu6 10 10 2 2 1 1 1 TrigSignatureMoniMT INFO HLT_mu6 decisions 3 3 2 1 TrigSignatureMoniMT INFO HLT_mu6Comb 10 10 2 2 0 0 2 diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/newJOtest.py b/Trigger/TrigValidation/TrigUpgradeTest/share/newJOtest.py index 21bd5aa00cda62b320f1985cccc9f56be59db1b0..52d08bb197a1867bcebbcdcc4025ddaafe42608c 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/newJOtest.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/newJOtest.py @@ -1,5 +1,5 @@ # -# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration # from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator @@ -13,6 +13,15 @@ from TriggerMenuMT.HLTMenuConfig.Menu.LS2_v1_newJO import setupMenu from AthenaCommon.Configurable import Configurable Configurable.configurableRun3Behavior=1 +flags.Detector.GeometryPixel = True +flags.Detector.GeometrySCT = True +flags.Detector.GeometryTRT = True +flags.Detector.GeometryLAr = True +flags.Detector.GeometryTile = True +flags.Detector.GeometryMDT = True +flags.Detector.GeometryTGC = True +flags.Detector.GeometryCSC = True +flags.Detector.GeometryRPC = True flags.needFlagsCategory('Trigger') setupMenu(flags) @@ -42,15 +51,9 @@ from TriggerMenuMT.HLTMenuConfig.Menu.GenerateMenuMT_newJO import generateMenu from TriggerJobOpts.TriggerConfig import triggerRunCfg acc.merge( triggerRunCfg( flags, generateMenu ) ) -from RegionSelector.RegSelConfig import RegSelConfig -rsc, regSel = RegSelConfig( flags ) -regSel.enableCalo=True -regSel.enableID=True -regSel.enablePixel = True -regSel.enableSCT = True -regSel.enableTRT = True -acc.merge( rsc ) -acc.addService(regSel) +from RegionSelector.RegSelConfig import regSelCfg +acc.merge( regSelCfg( flags ) ) + from TrigUpgradeTest.InDetConfig import TrigInDetCondConfig acc.merge( TrigInDetCondConfig( flags ) ) @@ -58,15 +61,6 @@ acc.merge( TrigInDetCondConfig( flags ) ) acc.getEventAlgo( "TrigSignatureMoniMT" ).OutputLevel=DEBUG print acc.getEventAlgo( "TrigSignatureMoniMT" ) -topSequence = acc.getSequence("HLTTop") -muonCacheCreatorName = "MuonCacheCreator" -mcc = findAlgorithm( topSequence, muonCacheCreatorName ) -if mcc: - owner = findOwningSequence( topSequence, muonCacheCreatorName ) - owner.remove( mcc ) - top = acc.getSequence("AthAlgSeq") - top += mcc - # from TrigUpgradeTest.TestUtils import applyMenu # applyMenu( acc.getEventAlgo( "L1Decoder" ) ) @@ -81,7 +75,7 @@ acc.printConfig() fname = "newJOtest.pkl" print "Storing config in the config", fname with file(fname, "w") as p: - acc.store( p ) + acc.store( p, nEvents=10, useBootStrapFile=False, threaded=True ) p.close() diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/pebTest.py b/Trigger/TrigValidation/TrigUpgradeTest/share/pebTest.py index 5c2e333931c91e8850c3fc65a1d5b99672c18c66..45862afb45c47defcb21e35248d16973d819b481 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/pebTest.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/pebTest.py @@ -120,7 +120,7 @@ decisionObjectsToRecord = [] for d in decisionObjects: decisionObjectsToRecord.extend([ "xAOD::TrigCompositeContainer_v1#%s" % d, - "xAOD::TrigCompositeAuxContainer_v2#%s.decisions" % d + "xAOD::TrigCompositeAuxContainer_v2#%s." % d ]) ########################################## diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/testHLT_MT.py b/Trigger/TrigValidation/TrigUpgradeTest/share/testHLT_MT.py index 0da0d0e7bab23c56dda5f3d2c57cd6897f73be3d..87274d1411ce01ca11aab93c15a8d44ebf3c2df9 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/testHLT_MT.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/testHLT_MT.py @@ -32,10 +32,10 @@ class opt : enableCostD3PD = False # enable cost monitoring doL1Unpacking = True # decode L1 data in input file if True, else setup emulation doL1Sim = False # (re)run L1 simulation + isOnline = False # isOnline flag (TEMPORARY HACK, should be True by default) # ################################################################################ -import AthenaCommon.CfgMgr as CfgMgr from AthenaCommon.AppMgr import theApp, ServiceMgr as svcMgr from AthenaCommon.Logging import logging log = logging.getLogger('testHLT_MT.py') @@ -48,9 +48,9 @@ defaultOptions = [a for a in dir(opt) if not a.startswith('__')] for option in defaultOptions: if option in globals(): setattr(opt, option, globals()[option]) - print ' %20s = %s' % (option, getattr(opt, option)) + print(' %20s = %s' % (option, getattr(opt, option))) else: - print ' %20s = (Default) %s' % (option, getattr(opt, option)) + print(' %20s = (Default) %s' % (option, getattr(opt, option))) #------------------------------------------------------------- # Setting Global Flags @@ -61,35 +61,38 @@ from AthenaCommon.BeamFlags import jobproperties from TriggerJobOpts.TriggerFlags import TriggerFlags import TriggerRelease.Modifiers -# Input format and file for athena running -if athenaCommonFlags.FilesInput is not None: - from RecExConfig.AutoConfiguration import ConfigureFromListOfKeys, GetRunNumber - ConfigureFromListOfKeys(['everything']) - TriggerRelease.Modifiers._run_number = GetRunNumber() -else: - if '_run_number' in dir(): TriggerRelease.Modifiers._run_number = _run_number # set by athenaHLT - globalflags.InputFormat = 'bytestream' # default for athenaHLT - if opt.setupForMC: - globalflags.DetGeo = 'atlas' - globalflags.DataSource = 'geant4' - else: - globalflags.DetGeo = 'commis' - globalflags.DataSource = 'data' - jobproperties.Beam.beamType = 'collisions' - jobproperties.Beam.bunchSpacing = 25 - globalflags.DetDescrVersion = TriggerFlags.OnlineGeoTag() - globalflags.ConditionsTag = TriggerFlags.OnlineCondTag() - - -# Overwrite tags if specified on command line -if opt.setDetDescr is not None: - globalflags.DetDescrVersion = opt.setDetDescr -if opt.setGlobalTag is not None: - globalflags.ConditionsTag = opt.setGlobalTag - +# Auto-configuration for athena +if len(athenaCommonFlags.FilesInput())>0: + import PyUtils.AthFile as athFile + af = athFile.fopen(athenaCommonFlags.FilesInput()[0]) + globalflags.InputFormat = 'bytestream' if af.fileinfos['file_type']=='bs' else 'pool' + globalflags.DataSource = 'data' if af.fileinfos['evt_type'][0]=='IS_DATA' else 'geant4' + if opt.setDetDescr is None: + opt.setDetDescr = af.fileinfos.get('geometry',None) + if opt.setGlobalTag is None: + opt.setGlobalTag = af.fileinfos.get('conditions_tag',None) or \ + (TriggerFlags.OnlineCondTag() if opt.isOnline else 'CONDBR2-BLKPA-2018-13') + TriggerRelease.Modifiers._run_number = af.fileinfos['run_number'][0] + +else: # athenaHLT + globalflags.InputFormat = 'bytestream' + globalflags.DataSource = 'data' if not opt.setupForMC else 'data' + if '_run_number' in dir(): + TriggerRelease.Modifiers._run_number = _run_number # noqa, set by athenaHLT + del _run_number + +# Set final Cond/Geo tag based on input file, command line or default +globalflags.DetDescrVersion = opt.setDetDescr or TriggerFlags.OnlineGeoTag() +globalflags.ConditionsTag = opt.setGlobalTag or TriggerFlags.OnlineCondTag() + +# Other defaults +jobproperties.Beam.beamType = 'collisions' +jobproperties.Beam.bunchSpacing = 25 globalflags.DatabaseInstance='CONDBR2' if opt.useCONDBR2 else 'COMP200' +athenaCommonFlags.isOnline.set_Value_and_Lock(opt.isOnline) -athenaCommonFlags.isOnline = False # for the moment, run in offline mode +log.info('Configured the following global flags:') +globalflags.print_JobProperties() #------------------------------------------------------------- # Transfer flags into TriggerFlags @@ -120,6 +123,7 @@ if globalflags.DataSource.is_geant4(): # MC modifiers setModifiers += ['BFieldFromDCS'] else: # More data modifiers setModifiers += ['allowCOOLUpdates', + 'BFieldAutoConfig', 'useHLTMuonAlign', #Check for beamspot quality flag 'UseBeamSpotFlagForBjet', diff --git a/Trigger/TrigValidation/TrigUpgradeTest/src/TestHypoAlg.cxx b/Trigger/TrigValidation/TrigUpgradeTest/src/TestHypoAlg.cxx index 94b86c7dfa59afef4fd0b43da787a54b6971f267..a220b43967725e4388bf3e4f3a4ff06955ce3278 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/src/TestHypoAlg.cxx +++ b/Trigger/TrigValidation/TrigUpgradeTest/src/TestHypoAlg.cxx @@ -6,9 +6,9 @@ #include "TestHypoAlg.h" namespace HLTTest { - + TestHypoAlg::TestHypoAlg( const std::string& name, ISvcLocator* pSvcLocator ) - : ::HypoBase( name, pSvcLocator ) {} + : ::HypoBase( name, pSvcLocator ) {} TestHypoAlg::~TestHypoAlg() {} @@ -51,9 +51,9 @@ namespace HLTTest { // find features: std::vector<const FeatureOBJ*> featureFromDecision; - for ( auto previousDecision: *previousDecisionsHandle ) { - auto linkInfo = TrigCompositeUtils::findLink<FeatureContainer>(previousDecision, m_linkName.value()); - auto featureLink = linkInfo.link; + for ( const auto previousDecision: *previousDecisionsHandle ) { + const auto linkInfo = TrigCompositeUtils::findLink<FeatureContainer>(previousDecision, m_linkName.value()); + const auto featureLink = linkInfo.link; CHECK( featureLink.isValid() ); const FeatureOBJ* feature = *featureLink; featureFromDecision.push_back( feature); @@ -62,51 +62,50 @@ namespace HLTTest { //map reco object and decision: find in reco obejct the initial RoI and map it to the correct decision size_t reco_counter = 0; - for (auto recoobj: *recoInput){ - auto roiInfo = TrigCompositeUtils::findLink<TrigRoiDescriptorCollection>( recoobj, "initialRoI" ); - auto roiEL = roiInfo.link; + for (const auto recoobj: *recoInput){ + const auto roiInfo = TrigCompositeUtils::findLink<TrigRoiDescriptorCollection>( recoobj, "initialRoI" ); + const auto roiEL = roiInfo.link; CHECK( roiEL.isValid() ); - auto featureInfo = TrigCompositeUtils::findLink<FeatureContainer>( recoobj, m_linkName.value() ); - auto featurelink = featureInfo.link; + const auto featureInfo = TrigCompositeUtils::findLink<FeatureContainer>( recoobj, m_linkName.value() ); + const auto featurelink = featureInfo.link; CHECK( featurelink.isValid() ); if ( not featurelink.isValid() ) { - ATH_MSG_ERROR( " Can not find reference to " + m_linkName.value() + " from the decision" ); - return StatusCode::FAILURE; + ATH_MSG_ERROR( " Can not find reference to " + m_linkName.value() + " from the decision" ); + return StatusCode::FAILURE; } ATH_MSG_DEBUG(" Found link from the reco object to feature "<<m_linkName.value() ); const FeatureOBJ* feature = *featurelink; // find the same roi in the previous decisions bool foundFeatureInDecision=false; - size_t pos=distance(featureFromDecision.begin(), find(featureFromDecision.begin(), featureFromDecision.end(), feature)); - if (pos < featureFromDecision.size()){ - foundFeatureInDecision=true; - } - - if (foundFeatureInDecision){ - ATH_MSG_DEBUG(" Found link from the reco object to the previous decision at position "<<pos); - auto d = newDecisionIn(decisions); - d->setObjectLink( "feature", ElementLink<xAOD::TrigCompositeContainer>(m_recoInput.key(), reco_counter) );// feature used by the Tool - d->setObjectLink( m_linkName.value(), featurelink ); - linkToPrevious( d, decisionInput().key(), pos ); - } - else{ - ATH_MSG_ERROR( " Can not find reference to previous decision from feature " + m_linkName.value() + " from reco object " << reco_counter ); - return StatusCode::FAILURE; - } - reco_counter++; + size_t pos=distance(featureFromDecision.begin(), find(featureFromDecision.begin(), featureFromDecision.end(), feature)); + if (pos < featureFromDecision.size()){ + foundFeatureInDecision=true; + } + + if (foundFeatureInDecision){ + ATH_MSG_DEBUG(" Found link from the reco object to the previous decision at position "<<pos); + auto d = newDecisionIn(decisions); + d->setObjectLink( "feature", ElementLink<xAOD::TrigCompositeContainer>(m_recoInput.key(), reco_counter) );// feature used by the Tool + d->setObjectLink( m_linkName.value(), featurelink ); + linkToPrevious( d, decisionInput().key(), pos ); + } + else{ + ATH_MSG_ERROR( " Can not find reference to previous decision from feature " + m_linkName.value() + " from reco object " << reco_counter ); + return StatusCode::FAILURE; + } + reco_counter++; } - - if (decisions->size()>0){ for ( auto tool: m_tools ) { - CHECK( tool->decide( decisions ) ); + CHECK( tool->decide( decisions ) ); } } ATH_MSG_DEBUG( "Exiting with "<< outputHandle->size() <<" decisions"); + //debug for (auto outh: *outputHandle){ TrigCompositeUtils::DecisionIDContainer objDecisions; @@ -115,14 +114,11 @@ namespace HLTTest { ATH_MSG_DEBUG("Number of positive decisions for this input: " << objDecisions.size() ); for ( TrigCompositeUtils::DecisionID id : objDecisions ) { - ATH_MSG_DEBUG( " --- found new decision " << HLT::Identifier( id ) ); + ATH_MSG_DEBUG( " --- found new decision " << HLT::Identifier( id ) ); } - } - - + return StatusCode::SUCCESS; } - } //> end namespace HLTTest diff --git a/Trigger/TrigValidation/TrigUpgradeTest/src/TestHypoTool.cxx b/Trigger/TrigValidation/TrigUpgradeTest/src/TestHypoTool.cxx index cac352bfc086e1737d36e2117255d525f33b91bd..e3f0bf919a51ab90d2b588afbd5acdf01411bb06 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/src/TestHypoTool.cxx +++ b/Trigger/TrigValidation/TrigUpgradeTest/src/TestHypoTool.cxx @@ -11,10 +11,10 @@ using namespace TrigCompositeUtils; namespace HLTTest { TestHypoTool::TestHypoTool( const std::string& type, - const std::string& name, - const IInterface* parent ) : - ITestHypoTool( name ), - AthAlgTool( type, name, parent ) + const std::string& name, + const IInterface* parent ) : + ITestHypoTool( name ), + AthAlgTool( type, name, parent ) { m_decisionId=HLT::Identifier::fromToolName(name ); } @@ -28,59 +28,59 @@ namespace HLTTest { ATH_MSG_DEBUG("Link name is "<<m_linkName.value()); ATH_MSG_DEBUG("threshold="<<m_threshold); ATH_MSG_DEBUG("property="<<m_property); - return StatusCode::SUCCESS; + return StatusCode::SUCCESS; } - - StatusCode TestHypoTool::decide( DecisionContainer* decisions ) const { ATH_MSG_DEBUG( "Making new decisions " << name() ); size_t counter = 0; - for ( auto d: *decisions ) { + for ( const auto d: *decisions ) { //get previous decisions ElementLinkVector<DecisionContainer> inputLinks = getLinkToPrevious(d); ATH_MSG_DEBUG("Got "<<inputLinks.size()<<" previous decisions"); - for (auto previousDecisions: inputLinks){ - - //auto previousDecisions = linkToPrevious( d); - TrigCompositeUtils::DecisionIDContainer objDecisions; - TrigCompositeUtils::decisionIDs( *previousDecisions, objDecisions ); - - ATH_MSG_DEBUG("Number of previous decisions ID for input "<< counter <<"= " << objDecisions.size() ); - - for ( TrigCompositeUtils::DecisionID id : objDecisions ) { - ATH_MSG_DEBUG( " -- found decision " << HLT::Identifier( id ) ); - } - - auto it= find(objDecisions.begin(), objDecisions.end(), m_decisionId); - if (it != objDecisions.end()){ - auto feature = d->objectLink<xAOD::TrigCompositeContainer>( "feature" ); - //auto feature = d->objectLink<xAOD::TrigCompositeContainer>( m_linkName.value() ); - if ( not feature.isValid() ) { - ATH_MSG_ERROR( " Can not find reference to the object from the decision" ); - return StatusCode::FAILURE; - } - float v = (*feature)->getDetail<float>( m_property ); - if ( v > m_threshold ) { // actual cut will be more complex of course - ATH_MSG_DEBUG( " threshold " << m_threshold << " passed by value: " << v ); - addDecisionID( m_decisionId, d ); - } - else ATH_MSG_DEBUG( " threshold " << m_threshold << " not passed by value " << v ); - } - else { - ATH_MSG_DEBUG("No Input decisions requested by active chain "<< m_decisionId); - } - counter++; + for (const auto previousDecisions: inputLinks){ + + TrigCompositeUtils::DecisionIDContainer objDecisions; + TrigCompositeUtils::decisionIDs( *previousDecisions, objDecisions ); + + ATH_MSG_DEBUG("Number of previous decisions ID for input "<< counter <<"= " << objDecisions.size() ); + + for ( TrigCompositeUtils::DecisionID id : objDecisions ) { + ATH_MSG_DEBUG( " -- found decision " << HLT::Identifier( id ) ); + } + + const auto it = find(objDecisions.begin(), objDecisions.end(), m_decisionId); + if (it != objDecisions.end()){ + + const auto feature = d->objectLink<xAOD::TrigCompositeContainer>( "feature" ); + // Used to fetch m_linkName.value() but this was refactored to "feature" + if ( not feature.isValid() ) { + ATH_MSG_ERROR( " Can not find reference to the object from the decision" ); + return StatusCode::FAILURE; + } + const float v = (*feature)->getDetail<float>( m_property ); + if ( v > m_threshold ) { // actual cut will be more complex of course + ATH_MSG_DEBUG( " threshold " << m_threshold << " passed by value: " << v ); + addDecisionID( m_decisionId, d ); + } else { + ATH_MSG_DEBUG( " threshold " << m_threshold << " not passed by value " << v ); + } + + } else { // it == objDecisions.end() + + ATH_MSG_DEBUG("No Input decisions requested by active chain "<< m_decisionId); + + } + counter++; } } - return StatusCode::SUCCESS; } - + StatusCode TestHypoTool::finalize() { ATH_MSG_INFO( "Finalizing " << name() << "..." ); return StatusCode::SUCCESS; } - } //> end namespace HLTTest +} //> end namespace HLTTest diff --git a/Trigger/TrigValidation/TrigUpgradeTest/src/TestInputMaker.cxx b/Trigger/TrigValidation/TrigUpgradeTest/src/TestInputMaker.cxx index 3d7b76d870f9b2df38d784cfebf4933b5fe119ef..226e7820b9ae739def0c571c41d0d28b0b38d194 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/src/TestInputMaker.cxx +++ b/Trigger/TrigValidation/TrigUpgradeTest/src/TestInputMaker.cxx @@ -10,11 +10,11 @@ #include <vector> namespace HLTTest { - + TestInputMaker::TestInputMaker( const std::string& name, - ISvcLocator* pSvcLocator ) - : InputMakerBase( name, pSvcLocator ) {} - + ISvcLocator* pSvcLocator ) + : InputMakerBase( name, pSvcLocator ) {} + TestInputMaker::~TestInputMaker() {} @@ -36,7 +36,7 @@ namespace HLTTest { StatusCode TestInputMaker::execute( const EventContext& context ) const { ATH_MSG_DEBUG( "Executing " << name() << "..." ); - + // call base class helper method to read input decisions, loop over them create outputs and connect them, returns with outputHandles filled std::vector< SG::WriteHandle<TrigCompositeUtils::DecisionContainer> > outputHandles; CHECK (decisionInputToOutput(context, outputHandles)); @@ -50,51 +50,50 @@ namespace HLTTest { // loop over output decisions, navigate to inputs for (auto outputHandle: outputHandles) { if( not outputHandle.isValid() ) { - ATH_MSG_DEBUG( "Got no decisions from output "<< outputHandle.key() << " because handle not valid"); - continue; + ATH_MSG_DEBUG( "Got no decisions from output "<< outputHandle.key() << " because handle not valid"); + continue; } if( outputHandle->size() == 0){ // input filtered out - ATH_MSG_ERROR( "Got no decisions from output "<< outputHandle.key()<<": handle is valid but container is empty. Is this expected?"); - return StatusCode::FAILURE; + ATH_MSG_ERROR( "Got no decisions from output "<< outputHandle.key()<<": handle is valid but container is empty. Is this expected?"); + return StatusCode::FAILURE; } + ATH_MSG_DEBUG( "Got output "<< outputHandle.key()<<" with " << outputHandle->size() << " elements" ); // loop over output decisions in container of outputHandle, follow link to inputDecision - for ( auto outputDecision : *outputHandle){ - ElementLinkVector<DecisionContainer> inputLinks = getLinkToPrevious(outputDecision); - for (auto input: inputLinks){ - ATH_MSG_DEBUG( "followed seed link to input "<< input.key() ); - const Decision* inputDecision = *input; - auto roiELInfo = TrigCompositeUtils::findLink<TrigRoiDescriptorCollection>( inputDecision, m_roisLink.value()); - CHECK( roiELInfo.isValid() ); - - // retrieve input feature from input decision (TrigComposite), will in this case be a TrigRoiDescriptor - auto featureLinkInfo = TrigCompositeUtils::findLink<FeatureContainer>( inputDecision, m_linkName.value()); - CHECK( featureLinkInfo.isValid() ); - - // link input reco object to outputDecision - auto featureLink = featureLinkInfo.link; - const FeatureOBJ* feature = *featureLink; - ATH_MSG_DEBUG(" Found feature " <<m_linkName.value() ); - - // merge reco outputs that are linked to the same feature (RoI): this avoids processing the same RoI from TC decisions from different chains - - // avoid adding the same feature multiple times: check if not in container, if not add it - if ( find(featuresFromDecision.begin(), featuresFromDecision.end(), feature) - == featuresFromDecision.end() ){ - featuresFromDecision.push_back(feature); // just to keep track of which we have used - // create the "reco" output: this would normally be a copy of the reco input or something derived from it, e.g. detector data inside a RoI. A TrigComposite is used here just for a trivial example. - auto newFeature = new xAOD::TrigComposite; - reco_output->push_back(newFeature); - newFeature->setObjectLink(m_linkName.value(), featureLink); - ATH_MSG_DEBUG(" Added " <<m_linkName.value() << " and " << m_roisLink.value() << " to reco object"); - } - }//loop over previous inputs + for (const auto outputDecision : *outputHandle){ + const ElementLinkVector<DecisionContainer> inputLinks = getLinkToPrevious(outputDecision); + for (const auto input: inputLinks){ + ATH_MSG_DEBUG( "followed seed link to input "<< input.key() ); + const Decision* inputDecision = *input; + const auto roiELInfo = TrigCompositeUtils::findLink<TrigRoiDescriptorCollection>( inputDecision, m_roisLink.value()); + CHECK( roiELInfo.isValid() ); + + // retrieve input feature from input decision (TrigComposite), will in this case be a TrigRoiDescriptor + const auto featureLinkInfo = TrigCompositeUtils::findLink<FeatureContainer>( inputDecision, m_linkName.value()); + CHECK( featureLinkInfo.isValid() ); + + // link input reco object to outputDecision + const auto featureLink = featureLinkInfo.link; + const FeatureOBJ* feature = *featureLink; + ATH_MSG_DEBUG(" Found feature " <<m_linkName.value() ); + + // merge reco outputs that are linked to the same feature (RoI): this avoids processing the same RoI from TC decisions from different chains + + // avoid adding the same feature multiple times: check if not in container, if not add it + if ( find(featuresFromDecision.begin(), featuresFromDecision.end(), feature) == featuresFromDecision.end() ){ + featuresFromDecision.push_back(feature); // just to keep track of which we have used + // create the "reco" output: this would normally be a copy of the reco input or something derived from it, e.g. detector data inside a RoI. A TrigComposite is used here just for a trivial example. + auto newFeature = new xAOD::TrigComposite; + reco_output->push_back(newFeature); + newFeature->setObjectLink(m_linkName.value(), featureLink); + ATH_MSG_DEBUG(" Added " <<m_linkName.value() << " and " << m_roisLink.value() << " to reco object"); + } + }//loop over previous inputs // For early tests, create TC, link to RoiD, push back onto TCC. // Later will output RoID collection directly via tool. } // loop over decisions } // loop over input keys - - + // Finally, record output ATH_MSG_DEBUG("Produced "<<reco_output->size() <<" reco objects and stored in "<<m_recoOutput); auto reco_outputHandle = SG::makeHandle(m_recoOutput, context); @@ -106,5 +105,5 @@ namespace HLTTest { return StatusCode::SUCCESS; } - + } //> end namespace HLTTest diff --git a/Trigger/TrigValidation/TrigUpgradeTest/src/TestMerger.cxx b/Trigger/TrigValidation/TrigUpgradeTest/src/TestMerger.cxx index 43495b0c8053b1ef7a785970d177ae89624096a5..7a0af223d1a2d903634619ddedad3006511346fb 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/src/TestMerger.cxx +++ b/Trigger/TrigValidation/TrigUpgradeTest/src/TestMerger.cxx @@ -17,8 +17,8 @@ namespace HLTTest { // Constructors //////////////// TestMerger::TestMerger( const std::string& name, - ISvcLocator* pSvcLocator ) : - ::AthAlgorithm( name, pSvcLocator ) + ISvcLocator* pSvcLocator ) : + ::AthAlgorithm( name, pSvcLocator ) { declareProperty( "Inputs", m_inputs ); declareProperty( "Output", m_outputKey ); @@ -51,17 +51,17 @@ namespace HLTTest { auto aux = std::make_unique<DecisionAuxContainer>(); output->setStore( aux.get() ); - for ( auto input: m_inputs ) { + for (const auto input: m_inputs ) { auto iHandle = SG::ReadHandle<DecisionContainer>(input); if ( iHandle.isValid() ) { - size_t counter = 0; - for ( auto iDecisionIter = iHandle->begin(); iDecisionIter != iHandle->end(); ++iDecisionIter, ++counter ) { - auto d = newDecisionIn(output.get()); - linkToPrevious(d, input, counter ); - } - ATH_MSG_DEBUG( "Input " << input << " present, linked " << counter << " inputs" ); + size_t counter = 0; + for ( auto iDecisionIter = iHandle->begin(); iDecisionIter != iHandle->end(); ++iDecisionIter, ++counter ) { + auto d = newDecisionIn(output.get()); + linkToPrevious(d, *iDecisionIter ); + } + ATH_MSG_DEBUG( "Input " << input << " present, linked " << counter << " inputs" ); } else { - ATH_MSG_DEBUG( "Input " << input << " absent" ); + ATH_MSG_DEBUG( "Input " << input << " absent" ); } } diff --git a/Trigger/TrigValidation/TrigUpgradeTest/src/TestRoRSeqFilter.cxx b/Trigger/TrigValidation/TrigUpgradeTest/src/TestRoRSeqFilter.cxx index 968b9f7e8c1826f1c9a37f86336889e753abdb45..db31e748bfd2c3a2825aca525e706b9a07dcacd9 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/src/TestRoRSeqFilter.cxx +++ b/Trigger/TrigValidation/TrigUpgradeTest/src/TestRoRSeqFilter.cxx @@ -15,8 +15,8 @@ using namespace TrigCompositeUtils; namespace HLTTest { TestRoRSeqFilter::TestRoRSeqFilter( const std::string& name, - ISvcLocator* pSvcLocator ) : - ::AthAlgorithm( name, pSvcLocator ) + ISvcLocator* pSvcLocator ) : + ::AthAlgorithm( name, pSvcLocator ) { declareProperty( "Inputs", m_inputs ); declareProperty( "Outputs", m_outputs ); @@ -34,25 +34,28 @@ namespace HLTTest { ATH_MSG_DEBUG("Will consume the input data: " << m_inputs << " and produce " << m_outputs ); ATH_MSG_DEBUG("This filter has alwaysPass=" << m_alwaysPass); ATH_MSG_DEBUG("Configured chains are:"); - for ( auto& el: m_chainsProperty ) ATH_MSG_DEBUG(el); + for ( auto& el: m_chainsProperty ) { + ATH_MSG_DEBUG(el); + } // if ( m_inputs.size() != m_outputs.size() ) { // ATH_MSG_ERROR("Inputs and Outputs have different size, the mapping is unclear"); // return StatusCode::FAILURE; // } - - for ( auto& el: m_chainsProperty ) + + for ( auto& el: m_chainsProperty ) { m_chains.insert( HLT::Identifier(el).numeric() ); - + } + // minimal validity crosscheck if ( m_chainsProperty.size() == 0 and m_alwaysPass == false ) { ATH_MSG_WARNING("This filter will always reject as it has no chains of interest configured"); } - + if ( m_chains.size() != m_chainsProperty.size() ) { ATH_MSG_ERROR("Repeated chain requirements (annoyance) or chain to hash conversion clash (major configuration issue therefore can not run)"); return StatusCode::FAILURE; } - + return StatusCode::SUCCESS; } @@ -67,7 +70,7 @@ namespace HLTTest { { ATH_MSG_DEBUG ( "Executing " << name() << "..." ); bool pass = false; - + for ( size_t inputIndex = 0; inputIndex < m_inputs.size(); ++inputIndex ) { auto input = m_inputs[inputIndex]; ATH_MSG_DEBUG( "Processing input " << input ); @@ -79,22 +82,21 @@ namespace HLTTest { // not bother recording if there is no output if ( not decisionOutput->empty() ) { - ATH_MSG_DEBUG( "Saving output " << m_outputs[inputIndex] ); - pass = true; - SG::WriteHandle<DecisionContainer> outputDH( m_outputs[inputIndex] ); - CHECK( outputDH.record( std::move( decisionOutput ), std::move( decisionAux ) ) ); + ATH_MSG_DEBUG( "Saving output " << m_outputs[inputIndex] ); + pass = true; + SG::WriteHandle<DecisionContainer> outputDH( m_outputs[inputIndex] ); + CHECK( outputDH.record( std::move( decisionOutput ), std::move( decisionAux ) ) ); } else { - ATH_MSG_DEBUG( "None of the decisions in the input " << input << " passed, skipping recording output " ); + ATH_MSG_DEBUG( "None of the decisions in the input " << input << " passed, skipping recording output " ); } } ATH_MSG_DEBUG( "The overall decision is : " << ( pass or m_alwaysPass ? "positive" : "negative") ); - + setFilterPassed( pass or m_alwaysPass ); return StatusCode::SUCCESS; } - void TestRoRSeqFilter::copyPassing( const std::string& inputKey, DecisionContainer* output ) const { SG::ReadHandle<DecisionContainer> inputDH( inputKey ); if ( not inputDH.isValid() ) { @@ -103,29 +105,29 @@ namespace HLTTest { } ATH_MSG_DEBUG( "Filtering "<<inputDH->size()<<" obejcts with key "<<inputKey); - + size_t counter=0; for ( auto objIter = inputDH->begin(); objIter != inputDH->end(); ++objIter, ++counter ) { DecisionIDContainer objDecisions; decisionIDs( *objIter, objDecisions ); // this should be replaced in production code by method passingIDs but the later is not printing so in tests we want the IDs // here we have to sets of IDs, those we are interested in (via chain property) and those comming from the decision obj - + std::vector<DecisionID> intersection; std::set_intersection( m_chains.begin(), m_chains.end(), - objDecisions.begin(), objDecisions.end(), - std::back_inserter( intersection ) ); - + objDecisions.begin(), objDecisions.end(), + std::back_inserter( intersection ) ); + ATH_MSG_DEBUG( "Found "<<intersection.size()<<" objects of interest for key "<<inputKey); for ( auto positive: intersection ) { - ATH_MSG_DEBUG( "Found positive decision for chain " << HLT::Identifier( positive ) ); + ATH_MSG_DEBUG( "Found positive decision for chain " << HLT::Identifier( positive ) ); } const bool positiveObjectDecision = not intersection.empty(); if ( positiveObjectDecision ) { - auto d = newDecisionIn( output ); - linkToPrevious( d, inputKey, counter ); + auto d = newDecisionIn( output ); + linkToPrevious( d, *objIter ); } else { - ATH_MSG_DEBUG( "Skipping objects with key " << inputKey <<" as they passed no chain of interest to this filter" ); + ATH_MSG_DEBUG( "Skipping objects with key " << inputKey <<" as they passed no chain of interest to this filter" ); } } } diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/exec_TrigUpgradeTest_art_athenaMT.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/exec_TrigUpgradeTest_art_athenaMT.sh new file mode 100755 index 0000000000000000000000000000000000000000..d58a5565b161f40ef972c63939f3bdd182272a8d --- /dev/null +++ b/Trigger/TrigValidation/TrigUpgradeTest/test/exec_TrigUpgradeTest_art_athenaMT.sh @@ -0,0 +1,90 @@ +#!/bin/bash +# +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# +# Trigger ART test execution script based on TriggerTest/test/exec_athena_art_trigger_validation.sh +# +echo $(date "+%FT%H:%M %Z")" Execute Athena test ${NAME}" + +### DEFAULTS + +if [ -z ${EVENTS} ]; then + export EVENTS="1000" +fi + +if [ -z ${SKIPEVENTS} ]; then + export SKIPEVENTS="0" +fi + +if [ -z ${JOBOPTION} ]; then + export JOBOPTION="TriggerRelease/runHLT_standalone.py" +fi + +if [ -z ${JOB_LOG} ]; then + export JOB_LOG="athena.log" +fi + +if [ -z ${INPUT} ]; then + export INPUT="run2data" +fi + +if [ -z ${THREADS} ]; then + export THREADS="1" +fi + +if [ -z ${SLOTS} ]; then + export SLOTS="1" +fi + +if [ -z ${STDCMATH} ] || [ ${STDCMATH} -eq 0 ]; then + export MATHLIBOPT="--imf" +else + export MATHLIBOPT="--stdcmath" +fi + +### + +if [[ $INPUT == "run2data" ]]; then + export DS="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1" +elif [[ $INPUT == "run2mc_ttbar" ]]; then + export DS="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TriggerTest/valid1.110401.PowhegPythia_P2012_ttbar_nonallhad.recon.RDO.e3099_s2578_r7572_tid07644622_00/RDO.07644622._000001.pool.root.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TriggerTest/valid1.110401.PowhegPythia_P2012_ttbar_nonallhad.recon.RDO.e3099_s2578_r7572_tid07644622_00/RDO.07644622._000002.pool.root.1" +else + echo "ERROR: input not defined, cannot run" + echo "art-result: 1" + exit 1 +fi + +trap 'PREVIOUS_COMMAND=$THIS_COMMAND; THIS_COMMAND=$BASH_COMMAND' DEBUG + +###################################### + +if [[ ${FROMPICKLE} == "1" ]]; then + echo "Running athena from pickle file ${JOBOPTION}" + athena.py \ + ${MATHLIBOPT} \ + ${JOBOPTION} &> ${JOB_LOG} +else + athena.py \ + ${MATHLIBOPT} \ + --threads ${THREADS} \ + --concurrent-events ${SLOTS} \ + --filesInput ${DS} \ + --evtMax ${EVENTS} \ + --skipEvents ${SKIPEVENTS} \ + -c "${EXTRA}" \ + ${JOBOPTION} &> ${JOB_LOG} +fi + +###################################### + +COMMAND=$PREVIOUS_COMMAND ATH_RETURN=$? +echo ${COMMAND} > command.txt +echo "Command to reproduce:" +envsubst < command.txt +echo "art-result: ${ATH_RETURN} ${JOB_LOG%%.*}" +echo $(date "+%FT%H:%M %Z")" Done executing Athena test ${NAME} with result ${ATH_RETURN}" +if [ "${ATH_RETURN}" -ne "0" ]; then + exit ${ATH_RETURN} +fi + + diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/exec_TrigUpgradeTest_art_post.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/exec_TrigUpgradeTest_art_post.sh new file mode 100755 index 0000000000000000000000000000000000000000..f2bb1f19ac153aea57788d4fcd8a03724ec521ec --- /dev/null +++ b/Trigger/TrigValidation/TrigUpgradeTest/test/exec_TrigUpgradeTest_art_post.sh @@ -0,0 +1,89 @@ +#!/bin/bash +# +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# +# Trigger ART test script with post-exec checks based on TriggerTest/test/exec_art_triggertest_post.sh +# + +echo $(date "+%FT%H:%M %Z")" Execute TrigUpgradeTest post processing for test ${NAME}" + +### DEFAULTS + +if [ -z ${JOB_LOG} ]; then + export JOB_LOG="athena.log" +fi + +if [ -z ${TEST} ]; then + export TEST="TrigUpgradeTest" +fi + +if [ -z ${REF_FOLDER} ]; then + # Try eos first + export REF_FOLDER="/eos/atlas/atlascerngroupdisk/data-art/grid-input/${TEST}/ref/${AtlasBuildBranch}/test_${NAME}" + # If not available, try cvmfs + if [ -d ${REF_FOLDER} ]; then + echo "Using reference directory from eos: ${REF_FOLDER}" + else + export REF_FOLDER="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/${TEST}/ref/${AtlasBuildBranch}/test_${NAME}" + if [ -d ${REF_FOLDER} ]; then + echo "Reference from eos unavailable, using one from cvmfs: ${REF_FOLDER}" + else + echo "Reference directory for test ${NAME} not available from eos or cvmfs" + fi + fi +fi + +# Note REGTESTEXP is a GNU grep regexp, not perl regexp +if [ -z "${REGTESTEXP}" ]; then + export REGTESTEXP="REGTEST" +fi + +# Option to override the regtest reference location +if [ -z "${REGTESTREF}" ]; then + export REGTESTREF=${REF_FOLDER}/athena.regtest +fi + +### + +echo $(date "+%FT%H:%M %Z")" Running checklog" +timeout 1m check_log.pl --config checklogTrigUpgradeTest.conf --showexcludestats ${JOB_LOG} | tee checklog.log + +echo "art-result: ${PIPESTATUS[0]} CheckLog" + +### + +export JOB_LOG_TAIL=${JOB_LOG%%.*}.tail.${JOB_LOG#*.} +tail -10000 ${JOB_LOG} > ${JOB_LOG_TAIL} + +### + +REGTESTREF_BASENAME=$(basename -- "${REGTESTREF}") +grep -E "${REGTESTEXP}" ${JOB_LOG} > "${REGTESTREF_BASENAME}" + +if [ -f ${REGTESTREF} ]; then + echo $(date "+%FT%H:%M %Z")" Running regtest using reference file ${REGTESTREF}" + timeout 1m regtest.pl --inputfile ${REGTESTREF_BASENAME} --reffile ${REGTESTREF} --linematch ".*" | tee regtest.log + echo "art-result: ${PIPESTATUS[0]} RegTest" +else + echo $(date "+%FT%H:%M %Z")" The reference file does not exist: ${REGTESTREF}" + echo "art-result: 999 RegTest" +fi + +mv ${REGTESTREF_BASENAME} ${REGTESTREF_BASENAME}.new + +if [ -f ${REF_FOLDER}/expert-monitoring.root ]; then + echo $(date "+%FT%H:%M %Z")" Running rootcomp" + timeout 10m rootcomp.py --skip="TIME_" ${REF_FOLDER}/expert-monitoring.root expert-monitoring.root | tee rootcompout.log + echo "art-result: ${PIPESTATUS[0]} RootComp" +else + echo $(date "+%FT%H:%M %Z")" No reference expert-monitoring.root found in ${REF_FOLDER}" + echo "art-result: 999 RootComp" +fi + +### + +echo $(date "+%FT%H:%M %Z")" Files in directory:" +ls -lh + +echo $(date "+%FT%H:%M %Z")" Finished TrigUpgradeTest post processing for test ${NAME}" + diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_decodeBS.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_decodeBS.sh index b045f5aa72b44e863a48e687da589caad470eb17..2566b0a94fb2e7f16717e4cc802c33bc832d7188 100755 --- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_decodeBS.sh +++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_decodeBS.sh @@ -9,10 +9,10 @@ # art-include: master/Athena #clear BS from previous runs -rm -rf data_test.*.data -athena --threads=1 --skipEvents=10 --evtMax=20 --filesInput="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1" TrigUpgradeTest/egamma.withViews.py - +rm -rf data_test.* +athena --threads=1 --skipEvents=10 --evtMax=5 --filesInput="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1" TrigUpgradeTest/egamma.withViews.py +rm -rf myESDfromBS.pool.root FNAME=data_test.00327265.Single_Stream.daq.RAW._lb0100._Athena._0000.data if [ -f ${FNAME} ] diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_egamma_run_data.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_egamma_run_data.sh index 78bc7cbc808b651199766e4dd4c394c75c7f2558..74e9973310d471cfab859f7e5cef03fe65a5069e 100755 --- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_egamma_run_data.sh +++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_egamma_run_data.sh @@ -2,8 +2,8 @@ # art-type: build # art-include: master/Athena -#clear BS from previous runs +#clear BS from previous runs rm -rf data_test.*.data athena --threads=1 --skipEvents=10 --evtMax=20 --filesInput="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1" TrigUpgradeTest/egamma.withViews.py && checkxAOD.py myESD.pool.root && -athena TrigUpgradeTest/checkESD.py +athena --threads=1 TrigUpgradeTest/checkESD.py diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_full_menu.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_full_menu.sh deleted file mode 100755 index 4c8037990f9a026b13725aac23e0eda4438a8d89..0000000000000000000000000000000000000000 --- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_full_menu.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -# art-type: build -# art-include: master/Athena - -athena --threads=1 --skipEvents=10 --evtMax=20 --filesInput="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1" TrigUpgradeTest/fullMenu.py diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_full_menu_build.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_full_menu_build.sh new file mode 100755 index 0000000000000000000000000000000000000000..8e24ee48886e4bc5d68124add60289fdb2df1dfb --- /dev/null +++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_full_menu_build.sh @@ -0,0 +1,22 @@ +#!/bin/sh +# art-description: athenaMT trigger test using the full menu from TrigUpgradeTest job options +# art-type: build +# art-include: master/Athena +# art-output: *.log +# art-output: *.root +# art-output: *.regtest.new + +export NAME="TrigUpgradeTest_fullMenu_build" +export SKIPEVENTS=10 +export EVENTS=20 +export THREADS=1 +export SLOTS=1 +export JOBOPTION="TrigUpgradeTest/fullMenu.py" +export REGTESTEXP="TriggerSummaryStep.*HLT_.*|TriggerMonitorFinal.*HLT_.*|TrigSignatureMoniMT.*HLT_.*" + +# Find the regtest reference installed with the release +export REGTESTREF=`find_data.py TrigUpgradeTest/fullMenu.ref` + +source exec_TrigUpgradeTest_art_athenaMT.sh +source exec_TrigUpgradeTest_art_post.sh + diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_jet_menu.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_jet_menu.sh index 2f2dd305f8b3422def0149bc6ad4a6eaab73737e..372f41d5b5be19da741cc691245f8eb37874045c 100755 --- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_jet_menu.sh +++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_jet_menu.sh @@ -3,4 +3,6 @@ # art-include: master/Athena # 150 events -athena --threads=1 --evtMax=15 --filesInput="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1" TrigUpgradeTest/jet.menu.py + +athena --threads=1 --skipEvents=10 --evtMax=20 --filesInput="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1" TrigUpgradeTest/jet.menu.py +#athena --threads=1 --evtMax=15 --filesInput="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1" TrigUpgradeTest/jet.menu.py diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_newJO.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_newJO.sh deleted file mode 100755 index 88a15a401b94f89d556b5faaa5dced6a12012967..0000000000000000000000000000000000000000 --- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_newJO.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -# art-type: build -# art-include: master/Athena - -rm -rf newJOtest.py bootstrap.pkl bootstrap.py - -# this is a hack to pre-confgure scheduler and other MT services, -#will be taken away once NEW system has better means to influence the bootstrap content -cat <<EOF >> bootstrap.py -from AthenaCommon.AppMgr import theApp, ServiceMgr as svcMgr -svcMgr.AvalancheSchedulerSvc.ShowControlFlow=True -svcMgr.AvalancheSchedulerSvc.ShowDataDependencies=True -EOF - -athena --threads=1 --config-only=bootstrap.pkl bootstrap.py - - -get_files -jo TrigUpgradeTest/newJOtest.py -python newJOtest.py # generate pickle -status=$? -if [ ${status} -ne 0 ] -then - echo "ERROR in configuration generation stage, stopping" - exit -1 -else - echo - echo "JOs reading stage finished, launching Athena from pickle file" - echo - athena --skipEvents=30 --evtMax=20 newJOtest.pkl -fi diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_newJO_build.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_newJO_build.sh new file mode 100755 index 0000000000000000000000000000000000000000..eb228cfa982672ec83ba54f4ba57068ec7e3662a --- /dev/null +++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_newJO_build.sh @@ -0,0 +1,38 @@ +#!/bin/sh +# art-description: athenaMT trigger test running the new-style job options from TrigUpgradeTest +# art-type: build +# art-include: master/Athena +# art-output: *.log +# art-output: *.root +# art-output: *.regtest.new + +export NAME="TrigUpgradeTest_newJO_build" +export SKIPEVENTS=30 +export EVENTS=20 +export THREADS=1 +export SLOTS=1 +export JOBOPTION="newJOtest.pkl" +export FROMPICKLE=1 +export REGTESTEXP=".*ERROR (?\!attempt to add a duplicate).*|.*FATAL.*|.*newJOtest.pkl.*|TrigSignatureMo.*INFO.*" + +# Find the regtest reference installed with the release +export REGTESTREF=`find_data.py TrigUpgradeTest/NewJO.ref` + +get_files -remove -jo TrigUpgradeTest/newJOtest.py + +echo $(date "+%FT%H:%M %Z")" Generate pickle file for test ${NAME}" +python newJOtest.py &> athena.pickle.log # generate pickle +status=$? + +if [ ${status} -ne 0 ]; then + echo "ERROR in configuration generation stage, stopping" + echo "art-result: 1 Configuration" + exit 1 +else + echo + echo "JOs reading stage finished, launching Athena from pickle file" + echo "art-result: 0 Configuration" + echo + source exec_TrigUpgradeTest_art_athenaMT.sh + source exec_TrigUpgradeTest_art_post.sh +fi diff --git a/Trigger/TrigValidation/TrigValAlgs/CMakeLists.txt b/Trigger/TrigValidation/TrigValAlgs/CMakeLists.txt index 395e1ccd0c75f2b384fc0505729f0bef14950633..db9b326dafec91e5cc57be1992f50a28f93a9b99 100644 --- a/Trigger/TrigValidation/TrigValAlgs/CMakeLists.txt +++ b/Trigger/TrigValidation/TrigValAlgs/CMakeLists.txt @@ -25,6 +25,7 @@ atlas_depends_on_subdirs( PUBLIC PRIVATE Control/AthenaKernel Control/CxxUtils + Control/AthViews Event/EventInfo Event/xAOD/xAODEventInfo Event/xAOD/xAODBTagging @@ -64,7 +65,7 @@ atlas_add_component( TrigValAlgs src/*.cxx src/components/*.cxx INCLUDE_DIRS ${XERCESC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} AthenaBaseComps AthAnalysisBaseCompsLib GaudiKernel TrigDecisionToolLib TrigCaloEvent TrigInDetEvent TrigMuonEvent TrigNavToolsLib TrigNavigationLib TrigParticle TrigSteeringEvent AthenaKernel CxxUtils EventInfo xAODEventInfo xAODBTagging xAODEgamma xAODJet xAODMuon xAODTau xAODTracking xAODTrigBphys xAODTrigCalo xAODTrigEgamma xAODTrigMinBias xAODTrigMissingET xAODTrigMuon xAODCore xAODTrigger AnalysisTriggerEvent MuonCombinedToolInterfaces Particle tauEvent VxSecVertex TrigConfigSvcLib TrigConfHLTData TrigRoiConversionLib TrigDecisionEvent TrigMissingEtEvent TrigInDetTruthEvent TrigT1Interfaces DecisionHandlingLib ) + LINK_LIBRARIES ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} AthenaBaseComps AthAnalysisBaseCompsLib GaudiKernel TrigDecisionToolLib TrigCaloEvent TrigInDetEvent TrigMuonEvent TrigNavToolsLib TrigNavigationLib TrigParticle TrigSteeringEvent AthenaKernel CxxUtils EventInfo xAODEventInfo xAODBTagging xAODEgamma xAODJet xAODMuon xAODTau xAODTracking xAODTrigBphys xAODTrigCalo xAODTrigEgamma xAODTrigMinBias xAODTrigMissingET xAODTrigMuon xAODCore xAODTrigger AnalysisTriggerEvent MuonCombinedToolInterfaces Particle tauEvent VxSecVertex TrigConfigSvcLib TrigConfHLTData TrigRoiConversionLib TrigDecisionEvent TrigMissingEtEvent TrigInDetTruthEvent TrigT1Interfaces DecisionHandlingLib AthViews ) # Install files from the package: atlas_install_headers( TrigValAlgs ) diff --git a/Trigger/TrigValidation/TrigValAlgs/src/TrigEDMChecker.cxx b/Trigger/TrigValidation/TrigValAlgs/src/TrigEDMChecker.cxx index 4ccbf728073a0eae1e29bdd8cc23be549189e136..a9837a115caa3e58af77951f62ac1b141f8882a7 100644 --- a/Trigger/TrigValidation/TrigValAlgs/src/TrigEDMChecker.cxx +++ b/Trigger/TrigValidation/TrigValAlgs/src/TrigEDMChecker.cxx @@ -99,6 +99,9 @@ #include "TrigT1Interfaces/RecEmTauRoI.h" +#include "AthViews/ViewHelper.h" +#include "AthViews/View.h" + #include <iostream> #include <fstream> @@ -4030,6 +4033,11 @@ StatusCode TrigEDMChecker::dumpTrigComposite() { m_dumpTrigCompositeContainers.clear(); const CLID TrigCompositeCLID = static_cast<CLID>( ClassID_traits< xAOD::TrigCompositeContainer >::ID() ); evtStore()->keys(TrigCompositeCLID, m_dumpTrigCompositeContainers); + std::string typeNameTC; + ATH_CHECK(m_clidSvc->getTypeNameOfID(TrigCompositeCLID, typeNameTC)); + ATH_MSG_DEBUG("dumpTrigComposite got " << m_dumpTrigCompositeContainers.size() << " keys for " << typeNameTC); + } else { + ATH_MSG_DEBUG("Using supplied " << m_dumpTrigCompositeContainers.size() << " keys"); } for ( const std::string & key: m_dumpTrigCompositeContainers ) { @@ -4042,22 +4050,12 @@ StatusCode TrigEDMChecker::dumpTrigComposite() { const xAOD::TrigCompositeContainer* cont= nullptr; ATH_CHECK( evtStore()->retrieve( cont, key ) ); + size_t count = 0; for ( auto tc: *cont ) { - ATH_MSG_DEBUG("name: " << tc->name()); - - // one gets a bit of info but is not that useful, we need to develop - //SGdebug::print_aux_vars( *tc ); - //SGdebug::dump_aux_vars( *tc ); - - // find the EL and check them - ATH_MSG_DEBUG( "Link col names : " << tc->linkColNames() ); - ATH_MSG_DEBUG( "Link col keys : " << tc->linkColKeys() ); - ATH_MSG_DEBUG( "Link col CLIDs : " << tc->linkColClids() ); - ATH_MSG_DEBUG( "Link col indices : " << tc->linkColIndices() ); - + ATH_MSG_DEBUG(" ########## ELEMENT " << count++); + ATH_MSG_DEBUG(*tc); // Get the objects we know of for (size_t i = 0; i < tc->linkColNames().size(); ++i) ATH_CHECK(checkTrigCompositeElementLink(tc, i)); - } } ATH_MSG_INFO( "REGTEST ==========END of xAOD::TrigCompositeContainer DUMP===========" ); @@ -4074,24 +4072,31 @@ StatusCode TrigEDMChecker::checkTrigCompositeElementLink(const xAOD::TrigComposi if (clid == ClassID_traits< TrigRoiDescriptorCollection >::ID()) { const ElementLink<TrigRoiDescriptorCollection> elementLink = tc->objectLink<TrigRoiDescriptorCollection>(name); - if (!elementLink.isValid()) ATH_MSG_WARNING("Invalid element link from '" << tc->name() << "' to '" << name << "'"); - else ATH_MSG_DEBUG("Got TrigRoiDescriptor:" << *elementLink); + if (!elementLink.isValid()) ATH_MSG_WARNING(" Invalid element link to TrigRoiDescriptorCollection, link name:'" << name << "'"); + else ATH_MSG_DEBUG(" Dereferenced link '" << name << "'' to TrigRoiDescriptor:" << *elementLink); } else if (clid == ClassID_traits< DataVector< LVL1::RecEmTauRoI > >::ID()) { // There could be a few ROI types.... // CLASS_DEF( DataVector< LVL1::RecEmTauRoI >, 6256, 1 ) const ElementLink<DataVector< LVL1::RecEmTauRoI >> elementLink = tc->objectLink<DataVector< LVL1::RecEmTauRoI >>(name); - if (!elementLink.isValid()) ATH_MSG_WARNING("Invalid element link from '" << tc->name() << "' to '" << name << "'"); - else ATH_MSG_DEBUG("Got LVL1::RecEmTauRoI:" << *elementLink); + if (!elementLink.isValid()) ATH_MSG_WARNING(" Invalid element link to LVL1::RecEmTauRoI, link name:'" << name << "'"); + else ATH_MSG_DEBUG(" Dereferenced link '" << name << "' to LVL1::RecEmTauRoI:" << *elementLink); } else if (clid == ClassID_traits< xAOD::TrigCompositeContainer >::ID()) { const ElementLink<xAOD::TrigCompositeContainer> elementLink = tc->objectLink<xAOD::TrigCompositeContainer>(name); - if (!elementLink.isValid()) ATH_MSG_WARNING("Invalid element link from '" << tc->name() << "' to '" << name << "'"); - else ATH_MSG_DEBUG("Got TrigComposite:" << (*elementLink)->name()); + if (!elementLink.isValid()) ATH_MSG_WARNING(" Invalid element link to TrigComposite, link name:'" << name << "'"); + else ATH_MSG_DEBUG(" Dereferenced link '" << name << "' to TrigComposite, TC name:'" << (*elementLink)->name() << "'"); + + } else if (clid == ClassID_traits< ViewContainer >::ID()) { + + const ElementLink<ViewContainer> elementLink = tc->objectLink<ViewContainer>(name); + if (!elementLink.isValid()) ATH_MSG_WARNING(" Invalid element link to View, link name:'" << name << "'"); + else ATH_MSG_DEBUG(" Dereferenced link '" << name << "' to View:'" << *elementLink); + } else { - ATH_MSG_DEBUG("Ignoring link to '" << name << "' with CLID " << clid); + ATH_MSG_DEBUG(" Ignoring link to '" << name << "' with link CLID " << clid); } return StatusCode::SUCCESS; @@ -4104,11 +4109,11 @@ StatusCode TrigEDMChecker::TrigCompositeNavigationToDot(std::string& returnValue // This constexpr is evaluated at compile time const CLID TrigCompositeCLID = static_cast<CLID>( ClassID_traits< xAOD::TrigCompositeContainer >::ID() ); std::vector<std::string> keys; - if ( m_doDumpAll ) { + if ( m_doDumpAllTrigComposite ) { evtStore()->keys(TrigCompositeCLID, keys); } else { - std::vector<std::string> keys = m_dumpTrigCompositeContainers; + keys = m_dumpTrigCompositeContainers; } std::string typeNameTC; ATH_CHECK(m_clidSvc->getTypeNameOfID(TrigCompositeCLID, typeNameTC)); @@ -4123,8 +4128,21 @@ StatusCode TrigEDMChecker::TrigCompositeNavigationToDot(std::string& returnValue ss << " node [shape=rectangle]" << std::endl; ss << " rankdir = BT" << std::endl; + const std::vector<std::string> vetoList = { // Patterns to ignore when dumping all + "TrigCostContainer", + "L1DecoderSummary" + }; + // Now process them - for (const std::string key : keys) { + for (const std::string& key : keys) { + bool veto = false; + for (const std::string& vetoStr : vetoList) { + if (m_doDumpAllTrigComposite && key.find(vetoStr) != std::string::npos) { + veto = true; + break; + } + } + if (veto) continue; ATH_CHECK( evtStore()->retrieve( container, key ) ); size_t index = 0; ss << " subgraph " << key << " {" << std::endl; @@ -4146,21 +4164,23 @@ StatusCode TrigEDMChecker::TrigCompositeNavigationToDot(std::string& returnValue // Output all the things I link to for (size_t i = 0; i < tc->linkColNames().size(); ++i) { const std::string link = tc->linkColNames().at(i); - if (link == "seed") { - const xAOD::TrigComposite* seed = tc->object<xAOD::TrigComposite>("seed"); - ss << " \"" << tc << "\" -> \"" << seed << "\" [label=\"seed\"]" << std::endl; + if (link == "self") { + continue; // Ignore the "self" link + } else if (link == "seed" || link == "seed__COLL") { + const xAOD::TrigComposite* seed = tc->object<xAOD::TrigComposite>(link); + ss << " \"" << tc << "\" -> \"" << seed << "\" [label=\"seed\"]" << std::endl; // Print ptr address } else { // Start with my class ID const CLID linkCLID = static_cast<CLID>( tc->linkColClids().at(i) ); // Use it to get my class name std::string tname; ATH_CHECK(m_clidSvc->getTypeNameOfID(linkCLID, tname)); - // Now ge the sgkey I'm linking to & the index + // Now get the sgkey I'm linking to & the index const SG::sgkey_t key = static_cast<SG::sgkey_t>( tc->linkColKeys().at(i) ); const unsigned index = tc->linkColIndices().at(i); // Look it up CLID checkCLID; - const std::string* keyStr = evtStore()->keyToString(key, checkCLID); + const std::string* keyStr = evtStore()->keyToString(key, checkCLID); // I don't own this str if (keyStr != nullptr && checkCLID != linkCLID) { std::string tnameOfCheck; m_clidSvc->getTypeNameOfID(checkCLID, tnameOfCheck).ignore(); // Might be invalid. But we don't care. @@ -4168,7 +4188,7 @@ StatusCode TrigEDMChecker::TrigCompositeNavigationToDot(std::string& returnValue << ". We were expecting " << linkCLID << " [" << tname << "]"); } // Print - ss << " \"" << tc << "\" -> \""; + ss << " \"" << tc << "\" -> \""; // Print ptr address ss << "Container=" << tname << "\\nKey="; if (keyStr != nullptr) ss << *keyStr; else ss << "[KEY "<< key <<" NOT IN STORE]"; diff --git a/Trigger/TrigValidation/TrigValTools/bin/atn_summary.pl b/Trigger/TrigValidation/TrigValTools/bin/atn_summary.pl deleted file mode 100755 index 25a2404739f77f055b2b951dc9afda0741325846..0000000000000000000000000000000000000000 --- a/Trigger/TrigValidation/TrigValTools/bin/atn_summary.pl +++ /dev/null @@ -1,658 +0,0 @@ -#!/usr/bin/perl -w -use strict; -use File::Basename; -use Date::Manip::Date; - -# Produce summary table for trigtest.pl tests in same dir or first parameter to script -my $output="index.html"; - -# If given, use first argument as output file -if ($#ARGV>=0) { - $output=$ARGV[0]; -} -print "Writing output to $output\n"; - -# Test procedure. -# 1. Identify nightly to use for test, and the path to the working directory, e.g. -# 17.X.0 rel_1 TrigAnalsysTest: -# web http://atlas-computing.web.cern.ch/atlas-computing/links/buildDirectory/nightlies/devval/AtlasAnalysis/rel_1/NICOS_area/NICOS_atntest17X0VAL64BS5G4AnlOpt/triganalysistest_testconfiguration_work/ -# afs /afs/cern.ch/atlas/software/builds/nightlies/devval/AtlasAnalysis/rel_1/NICOS_area/NICOS_atntest17X0VAL64BS5G4AnlOpt/triganalysistest_testconfiguration_work/ -# 2. Find the output from that nightly in the atn_summary log file, e.g. -# http://atlas-computing.web.cern.ch/atlas-computing/links/distDirectory/nightlies/developmentWebArea/nicos_web_area17X0VAL64BS5G4AnlOpt/NICOS_TestLog_rel_1/Trigger_TrigValidation_TrigAnalysisTest_36__TrigAnalysisTest_TestConfiguration__atn_xml_summary_table__x.html -# and cut and paste the environment settings from that: -# "To test, set the following environment:" -# 3. Make a mock-up of the working directory for the tests -# a) create a path that the script will recognise, e.g. from step 1 above, -# take this path. You need at least the rel_ part: -# dir=builds/nightlies/17.X.0/AtlasAnalysis/rel_1/NICOS_area/NICOS_atntest17X064BS5G4AnlOpt/triganalysistest_testconfiguration_work/ -# mkdir -p $dir -# cd $dir -# b) Make copies for files and links to test dirs from ATN itself -# find /afs/cern.ch/atlas/software/$dir -maxdepth 1 -type d -exec ln -s {} . \; -# find /afs/cern.ch/atlas/software/$dir -maxdepth 1 \! -type d -exec cp {} . \; -# -# 4. Rename the previous index.html to something else e.g. -# mv index.html index.html.orig -# 5. Now you can run atn_summary.pl -# Check there are no warnings or errors of course. -# 6. Compare index.html to index.html.orig, look for expected changes -# 7. Use a web brower to view it, e.g. -# firefox -no-remote file://`pwd`/index.html - -# these lines must match trigtest.pl: -my $regtestout = "regtest.log"; -my $htmldiffout = "regtest.html"; -my $summaryout = "summary.log"; -my $timerout = "timer.log"; -my $checklogout = "checklog.log"; -my $warnout = "warn.log"; -my $rootcompout = "rootcompout.log"; -my $checkcountout = "checkcountout.log"; -#my $edmcheckout = "edmcheckout.log"; -my $postcmdout = "postcmd.log"; -my $posttestrc = "post_test.exitcodes"; -my $docout = "doc.txt"; -my $athenalogglob = "*_{tail,test}.log{,.gz}"; # add .gz -my $atn_timeline = "atn_timeline.png"; -my $atn_order = "atn_timeline_order.txt"; -my $no_of_nightlies=7; -my %no_of_nightlies_exceptions = ('TrigMC',2); -my %ERROR = ( - OK => 0, - SCRIPT_MISC => 1, - POST_TEST_BAD_EXIT => 2, - ROOTCOMP_MISMATCH => 4, - ATHENA_BAD_EXIT => 8, - CHECKCOUNTS_FAILED => 16, - ATHENA_ERROR_IN_LOG => 32, - ATHENA_REGTEST_FAILED => 64, - ATN_TIME_LIMIT => 128, - PRECONDITION_FAILED_SO_NOT_RUN => 256 - ); - -my $atn_rel = "unkown"; -my $atn_platform = "unkown"; -# use to fake env for testing - uncomment to enable -my $testcwd; -#my $testcwd = "/afs/cern.ch/atlas/software/builds/nightlies/17.X.0/AtlasAnalysis/rel_1/NICOS_area/NICOS_atntest17X064BS5G4AnlOpt/triganalysistest_testconfiguration_work/"; - - -sub main(); -main(); -exit; - -sub main(){ - # for debugging: - system("printenv > atn_summary_printenv.log"); - print "\nTo test, set the following environment. If unset, results may not reproduce those within ATN. Read this script for more details on testing procedure.\n"; - my $ev; - foreach $ev qw(AtlasProject AtlasVersion NICOS_GIT_RELBRANCH NICOS_PROJECT_RELNAME_COPY){ - print "export " . $ev . "=" . getEnv($ev,"") . "\n"; - } - print "\n"; - my $context = getcontext(); - my $testdir='.'; - my @testnames=(); - my %exitcodes=(); - my %maskedcodes=(); - my %doc=(); - my %timer=(); - my %order = getorder(); - my $project = getEnv('AtlasProject',getEnv('NICOS_ATLAS_PROJECT','')); - my $gitbranch = getEnv('NICOS_GIT_RELBRANCH',''); - my $release = getEnv('AtlasVersion',''); - opendir(DIRHANDLE, $testdir) || die "Cannot opendir $testdir: $!"; - foreach my $name (sort readdir(DIRHANDLE)) { - if (-d $name and $name !~ /^\./){ - print "found dir: $name ... "; - push @testnames, $name; - if (-f "$name/$summaryout"){ - print "found summary file\n"; - open SUMMARYIN, "<$name/$summaryout"; - while (<SUMMARYIN>){ - if (/exitcode = (\d+)/){ - $exitcodes{$name} = $1; - } - elsif (/maskedcode = (\d+)/){ - $maskedcodes{$name} = $1; - } - } - close SUMMARYIN; - if (-f "$name/$timerout"){ - print "found timer file\n"; - open TIMERIN, "<$name/$timerout"; - while (<TIMERIN>){ - my ($wall,$user,$system)=split; - $timer{$name}=$wall; - } - close TIMERIN; - } - else { - print "no timer file\n"; - } - } else { - print "no summary file\n"; - } - $doc{$name}=""; - if (-f "$name/$docout"){ - print "found doc file\n"; - open DOCIN, "<$name/$docout"; - while (<DOCIN>){ - chomp; - $doc{$name}.=$_; - } - close DOCIN; - } - else { - print "no doc file\n"; - } - - } - } - closedir(DIRHANDLE); - - open HTMLOUT, "> $output" or die "failed to write to $output: $!"; - print HTMLOUT "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2 Final//EN\"> -<html>\n<head>\n<script type=\"text/javascript\" src=\"http://atlas-project-trigger-release-validation.web.cern.ch/atlas-project-trigger-release-validation/www/js/sorttable.js\"></script>\n<script type=\"text/javascript\" src=\"http://atlas-project-trigger-release-validation.web.cern.ch/atlas-project-trigger-release-validation/www/js/suitehighlight.min.js\"></script>\n<meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\" > -<title>Trigger ATN results for $project,$gitbranch,$release</title>\n -<script type=\"text/javascript\"> - -var thisRelease = null; -var loaded = false; - -function highlightDiffs(clear) { - var table1 = document.getElementById('ATNResults'); - var table2 = null; - if (!clear) { - try { - table2 = document.getElementById('DiffFrame').contentWindow.document.getElementById('ATNResults'); - } - catch (e) {} - } - - var diffs = 0; - for (var i=1; i < table1.rows.length; i++) { - var cells = table1.rows[i].cells; - for (var j=1; j < cells.length; j++) { // skip name - if (j==9) continue; // skip timing - if (!table2 || cells[j].textContent == table2.rows[i].cells[j].textContent) { - cells[j].style.backgroundColor = ''; - cells[j].title = ''; - } - else { - cells[j].style.backgroundColor = '#FFCCCC'; - cells[j].title = table2.rows[i].cells[j].textContent || table2.rows[i].cells[j].innerText; - diffs++; - } - } - } - setDiffCount(diffs); -} - -function setDiffCount(diffs) { - if (diffs>0) { - document.getElementById('nDiffs').textContent = diffs+' differences'; - } - else { - document.getElementById('nDiffs').textContent = ''; - } -} - -function loadPage() { - var diffRelease = document.DiffForm.rel.value; - var iframe = document.getElementById('DiffFrame'); - if (diffRelease != thisRelease) { - // Load second summary page in hidden iframe - var url = window.document.location.href; - iframe.src = url.replace(/rel_[0-6]/, diffRelease); - } - else { - highlightDiffs(true); // remove all highlighting - } -} - -function setRelease() { - var url = window.document.location.href; - thisRelease = url.match(/rel_[0-6]/); - if (thisRelease) { - thisRelease = thisRelease[0]; - document.DiffForm.rel.value = thisRelease; - } - return true; -} - -function popup(mylink, windowname) { - if (! window.focus) return true; - var href; - if (typeof(mylink) == 'string') - href=mylink; - else - href=mylink.href; - window.open(href, windowname, 'width=1000,height=300,toolbar=yes,resizable=yes,scrollbars=yes'); - return false; -} - -function showBuildFailures(failures,link) { - if (failures!='0') { - document.write('<a href=\"'+link+'\" style=\"color:Red\">Build failures: '+failures+'</a>'); - } -} - -</script> -</head> -<style type=\"text/css\"> - tr.hi:hover {background-color:#E6E6E6;} -</style> -<body onload=\"highlightSuite({id:'ATNResults'});setDiffCount(0);\"> -<h1>Trigger ATN test results summary</h1> -<form name=\"DiffForm\"> -"; - - - my $now=qx(date); - my $testWWWPage=getTestWWWPage(); - my $nicosWWWPage=dirname($testWWWPage); - - print HTMLOUT "<p>Last updated $now</p>\n"; - - my $atn_relno = $atn_rel; - $atn_relno =~ s/rel_//; - print HTMLOUT "<p><a href=\"".$testWWWPage."\">Nightly test</a>: $project,$gitbranch,<b>$release</b> ($atn_platform)"; - print HTMLOUT "<script src=\"".$nicosWWWPage."/build_failures_".$atn_relno.".js\" language=\"JavaScript\"></script>\n"; - print HTMLOUT "<script type=\"text/javascript\">showBuildFailures(failures_".$atn_relno."(),"."\"".$nicosWWWPage."/nicos_buildsummary_".$atn_relno.".html\")</script>"; - - # Link to GitLab diff between today's and yesterday's release - my $fmt="%Y-%m-%dT%H%M"; - my $date = new Date::Manip::Date; - $date->parse_format($fmt,$release); - my $delta = $date->new_delta(); - $delta->set(d => -1); # minus 1 day - my $yesterday = $date->calc($delta); - my $prevrel = $yesterday->printf($fmt); - my $gitdiff = "https://gitlab.cern.ch/atlas/athena/compare/nightly%2F$gitbranch%2F$prevrel...nightly%2F$gitbranch%2F$release"; - - print HTMLOUT "<br>Other nightlies: "; - if (defined $no_of_nightlies_exceptions{$project}){ - $no_of_nightlies=$no_of_nightlies_exceptions{$project}; - print "$project exceptionally has $no_of_nightlies nightly builds\n"; - } else { - print "$project normally has $no_of_nightlies nightly builds\n"; - } - - my @dow = ('Sun','Mon','Tue','Wed','Thu','Fri','Sat'); - for (my $i=0; $i<$no_of_nightlies; $i++){ - if ("rel_$i" eq $atn_rel){ - print HTMLOUT " $dow[$i] "; - } else { - my $p=getrelpath(); - $p =~ s/rel_\d/rel_$i/; - $p =~ s/rel_nightly/rel_$i/; - print HTMLOUT " <a href=\"$p\">$dow[$i]</a> "; - } - } - - print HTMLOUT " -<a href=\"$gitdiff\">GitLab diff</a> - Diff results: <select name=\"rel\" size=\"1\" onchange=\"loadPage()\"> -<option value='rel_0'>Sun</option> -<option value='rel_1'>Mon</option> -<option value='rel_2'>Tue</option> -<option value='rel_3'>Wed</option> -<option value='rel_4'>Thu</option> -<option value='rel_5'>Fri</option> -<option value='rel_6'>Sat</option> -</select> <span id='nDiffs' style='font-weight:bold'></span> -</form><script type=\"text/javascript\">setRelease();</script></p>"; - - print HTMLOUT "\n<table class=\"sortable\" id=\"ATNResults\" border=1><thead><tr> -<th title=\"Click to sort by test suite\">Test name</th> -<th>Overall Result</th> -<th title=\"exit code of Athena\">Athena exit</th> -<th title=\"presence of any error messages in log\">Error Msgs</th> -<th title=\"number of warning messages in log\">Warn Msgs</th> -<th>Reg. tests</th> -<th title=\"expert histogram exact comparison to ref\">Root comp</th> -<th title=\"L2 + EF chain and trigger element counts within tolerance w.r.t. ref\"> Chain, TE cnts </th> -<th title=\"athena wall time in secs\">Time (s)</th> -<th title=\"trigtest.pl exit code, bare and masked for ATN\">Exit code</th> -<th>Post Tests</th> -<th>Dir. link</th> -<th>Log link</th></tr></thead><tbody>\n"; - for my $name (@testnames){ - my $atn_script = "-"; - my $atn_timeout = "-"; - my $athena_exit = "-"; - my $error_msgs = "-"; - my $error = "-"; - my $warn = "-"; - my $reg_tests = "-"; - my $rootcomp = "-"; - my $checkcount = "-"; - my $timer = "-"; - my $exitcode = "-"; - my $maskedcode = "-"; - my $postrc = 0; - my $logfile = ""; - my $order = ""; - if (defined $exitcodes{$name}){ - $exitcode = $exitcodes{$name}; - if (defined $maskedcodes{$name}){ - $maskedcode = $maskedcodes{$name}; - if ($maskedcodes{$name} != 0){ - $maskedcode = "<font color=\"red\">$maskedcodes{$name}</font>"; - } - } - if (defined $timer{$name}){ - $timer = $timer{$name}; - } - $atn_script = testcode($exitcodes{$name},"SCRIPT_MISC"); - my $skipped = testcode($exitcodes{$name},"PRECONDITION_FAILED_SO_NOT_RUN"); - if ($skipped !~ /OK/){ - $atn_script = "<div title=\"Not run because precondition failed\" style=\"color:gray\">SKIP</div>"; - $logfile = "not run because precondition failed"; - } - elsif ($atn_script !~ /OK/){ - $atn_script = "<font color=\"red\">FAIL</font>"; - } - else{ - if ($maskedcodes{$name} != 0){ - my $errors = errornames($maskedcodes{$name}); - $atn_script = "<div title=\"Failures: $errors\" style=\"color:red\">ERROR</div>"; - } - - $atn_timeout = testcode($exitcodes{$name},"ATN_TIME_LIMIT"); - $athena_exit = testcode($exitcodes{$name},"ATHENA_BAD_EXIT"); - $rootcomp = testcode($exitcodes{$name},"ROOTCOMP_MISMATCH"); - - if ($atn_timeout !~ /OK/){ - $athena_exit="<font color=\"yellow\">TIMEOUT</font>"; - } - - # no checklog output file and no failure in exitcode - $error_msgs = testcode($exitcodes{$name},"ATHENA_ERROR_IN_LOG"); - if (! -f "$name/$checklogout" and $error_msgs =~ /OK/){ - $error = "<font color=\"gray\">N/A</font>"; - } else { - my $error_count = ''; - if ($error_msgs !~ /OK/){ - $error_count=qx(head -5 $name/$checklogout | grep 'Found messages in'); - if ($error_count =~ /Found messages in.*\(([0-9]*)\).*/){ - $error_count="($1)"; - } - } - print "error count: $error_count\n"; - $error = "<a type=\"text/plain\" href=\"$name/$checklogout\">$error_msgs$error_count</a>"; - } - - if (! -f "$name/$warnout"){ - $warn = "<font color=\"gray\">N/A</font>"; - } else { - my $warn_count=qx(head -5 $name/$warnout | grep 'Found messages in'); - if ($warn_count =~ /Found messages in.*\(([0-9]*)\).*/){ - $warn_count = $1; - chomp $warn_count; - } - else { - $warn_count = 'N/A' - } - print "warn count: $warn_count\n"; - $warn = "<a type=\"text/plain\" href=\"$name/$warnout\">$warn_count</a>"; - } - if (! -e "$name/$regtestout"){ - $reg_tests = "<font color=\"gray\">N/A</font>"; - } else { - my $status = warncode($exitcodes{$name},"ATHENA_REGTEST_FAILED"); - my $tooltip = ""; - if ($status ne "OK") { - my @diffs = `grep REGTEST $name/$regtestout | awk '{print \$2}' | sort -u`; - chomp @diffs; - if (scalar(@diffs) > 50) { - $tooltip = "More than 50 sources of REGTEST differences!"; - } - elsif (scalar(@diffs) > 0) { - $tooltip = join(", ",@diffs); - } - } - $reg_tests = "<a type=\"text/plain\" title=\"$tooltip\" href=\"$name/$regtestout\">" . $status . "</a>"; - if ($status ne "OK" and -e "$name/$htmldiffout"){ - $reg_tests .= " <a href=\"$name/$htmldiffout\">[ht]</a>" - } - } - if (! -e "$name/$rootcompout"){ - $rootcomp = "<font color=\"gray\">N/A</font>"; - } elsif ($rootcomp =~ /FAIL/){ - my @diffs = `egrep '^Different histograms:' $name/$rootcompout`; - chomp @diffs; - $rootcomp = "<a type=\"text/plain\" title=\"@diffs\" href=\"$name/$rootcompout\"><font color=\"red\">DIFF</font></a>"; - if (-e "$name/rootcomp.ps.gz") { - $rootcomp .= " <a href=\"$name/rootcomp.ps.gz\">[ps]</a>"; - } - } elsif ($rootcomp =~ /OK/){ - $rootcomp = "<a type=\"text/plain\" href=\"$name/$rootcompout\"><font color=\"green\">MATCH</font></a>"; - } - if (! -f "$name/$checkcountout"){ - $checkcount = "<font color=\"gray\">N/A</font>"; - } else { - my $checkcount1 = chaincountcheck("$name/$checkcountout"); - print "check chain counts: $checkcount1\n"; - $checkcount = "<a type=\"text/plain\" href=\"$name/$checkcountout\">$checkcount1</a>"; - } - $postrc = 0; - if (! -e "$name/$posttestrc"){ - $postrc = "<font color=\"gray\">N/A</font>"; - } elsif (($exitcodes{$name} & $ERROR{"POST_TEST_BAD_EXIT"})==0) { - $postrc = "OK"; - } else { - $postrc = getposttests($name); - } - - } - } - my @logfiles = glob("$name/$athenalogglob"); - for (@logfiles){ - my ($lfd, $lflabel) = split('/',$_); - $lflabel = "[tail]" if ($lflabel =~ /tail/); - $logfile .= "<a type=\"text/plain\" href=\"$_\"><font size=-2>$lflabel</font></a> "; - } - if (length($logfile)==0){ - $logfile = " "; - } - print "logfile=$logfile\n"; - - my $thename = $name; - my $logurl; - if ($context){ - $logurl = getlogpath($name,$testdir); - } - # special case when run by hand, log might be in current dir as testname.log - if (! defined $logurl and -f "$name.log"){ - $logurl="$name.log"; - } - if (defined $logurl){ - $thename = "<a type=\"text/plain\" href=\"$logurl\">$name</a>"; - print "found URL: $logurl\n"; - } else { - print "not found URL for $name\n"; - } - - if (exists $order{$name}) { - $order = "suite=\"$order{$name}[1]\" sorttable_customkey=\"$order{$name}[0]\""; - } - print HTMLOUT "<tr class=\"hi\"><td $order title=\"$doc{$name}\">$thename</td> <td>$atn_script</td> <td>$athena_exit</td> <td>$error</td> <td>$warn</td> <td style=\"white-space:nowrap\">$reg_tests</td> <td style=\"white-space:nowrap\">$rootcomp</td> <td>$checkcount</td> <td><a type=\"text/plain\" href=\"$name/$timerout\">$timer</a></td> <td>$exitcode/$maskedcode</td> <td>$postrc</td> <td><a href=\"$name\">dir</a></td><td>$logfile</td></tr>\n"; - } - print HTMLOUT "</tbody></table>"; - if (-e "$atn_timeline"){ - print HTMLOUT "<font face=\"monospace\"><br>"; - my @lines = `tail -3 *atn_timeline.log`; - print HTMLOUT join('<br>',@lines); - print HTMLOUT "<a href=\"atn_timeline.png\"> [timeline plot]</a>"; - print HTMLOUT "</font>"; - } - print HTMLOUT '<iframe onload="highlightDiffs(false)" id="DiffFrame" style="visibility:hidden;display:none;"></iframe></body></html>'; - close HTMLOUT; - -} - -sub chaincountcheck($){ - my ($infile)=@_; - my $counts=""; - my $nonexist = 0; - open COUNTIN, "<$infile" or return "-"; - while (<COUNTIN>){ - if (/Fraction inside tolerance\:\s+(\d+)\/(\d+)/){ - $counts .= "$1/$2 " - } elsif (/does not exist/){ - $nonexist++; - } - } - close COUNTIN; - $counts = "New" if ($counts eq "" && $nonexist > 0); - $counts = "OK" if ($counts eq ""); - print "nonexistant counts: $nonexist\n"; - return $counts; -} - -sub testcode($$){ - my ($code,$string) = @_; - my $value=$ERROR{$string}; - return (($code & $value)? "<font color=\"red\">FAIL</font>" : "OK"); -} - -sub warncode($$){ - my ($code,$string) = @_; - my $value=$ERROR{$string}; - return (($code & $value)? "<font color=\"orange\">WARN</font>" : "OK"); -} - -sub getEnv($$){ - my ($name,$default) = @_; - if (exists $ENV{$name}) { - return $ENV{$name}; - } - else { - return $default; - } -} - -# figure out which nightly this is and where logs are etc. -# this wil only work if run in ATN. -sub getcontext(){ - my $cwd = ''; - chomp($cwd=`pwd`); - # for testing: - if (defined $testcwd){ - print "!WARNING: TEST MODE!"; - $cwd=$testcwd; - } - print "--------------------------------------------------------\n"; - print "$cwd\n"; - if ($cwd =~ /NICOS_.*test([\w\d]+)\//){ # NICOS_qmtest (old) or NICOS_atntest (new) directory - $atn_platform=$1; - print "ATN_JOB_LOGFILE=" . getEnv("ATN_JOB_LOGFILE","") . "\n"; - print "ATN_PACKAGE=" . getEnv("ATN_PACKAGE","") . "\n"; - print "--------------------------------------------------------\n"; - } - $atn_rel = $ENV{'NICOS_PROJECT_RELNAME_COPY'}; - - if (defined $atn_platform and defined $atn_rel){ - print "$atn_platform $atn_rel $cwd\n"; - }else{ - print "atn_platform and atn_rel not defined - probably running outside ATN\n"; - } - return (defined $atn_platform && defined $atn_rel && defined $cwd); -} - -sub getlogpath($){ - my ($name,$testdir) = @_; - my $found; - opendir(DIRHANDLE, $testdir) || die "Cannot opendir $testdir: $!"; - foreach my $file (sort readdir(DIRHANDLE)) { - if ($file =~ /__${name}.log/){ - #print "$name matches $file\n"; - $found="$file"; - last; - } - } - return $found; -} - -# create a relative URL by going back (../) until rel_N is reached, then forward again to here. This can then be changed to use for other rel_N -sub getrelpath(){ - my $pcwd = ''; - chomp($pcwd=`pwd`); - # for testing - if (defined $testcwd){ - $pcwd=$testcwd; - } - my @pcwd = split('/',$pcwd); - my ($i, $n, $up, $down); - $up=""; - $down=""; - for ($i=$#pcwd; $i>=0; --$i){ - $up.="../"; - $down = $pcwd[$i]. "/" . $down; - if ($pcwd[$i] =~ /rel_/){ - last; - } - } - return "$up$down"; -} - -# find the directory name we are in, e.g. triganalysistest_testconfiguration_work -sub gettestpkgdir(){ - use File::Basename; - my $cwd = ''; - chomp($cwd=`pwd`); - if (defined $testcwd){ - $cwd=$testcwd; - } - return basename($cwd); -} - -sub getposttests(){ - my ($testname) = @_; - my $text; - open POSTRC, "<$testname/$posttestrc" or return ""; - while (<POSTRC>){ - chomp; - (my $name, my $rc) = split(); - if ($rc!=0){ - $text .= "<a type=\"text/plain\" href=\"$testname/post_test_$name.log\"><font color=\"red\">$name</font></a> "; - } - } - close POSTRC; - return "<font size=\"-2\">$text</font>"; -} - -sub getorder(){ - my %order = (); - open ORDER,"<$atn_order" or return %order; - while (<ORDER>){ - chomp; - (my $i, my $name, my $suite) = split(); - $order{$name} = [$i,$suite] - } - return %order; -} - -sub errornames() { - my ($code) = @_; - my @errors = (); - foreach my $key ( keys %ERROR ) { - if (($code & $ERROR{$key}) != 0) { - push(@errors,$key); - } - } - return join(', ', @errors); -} - -sub getTestWWWPage() { - open XML,"ATNOverview.xml" or return ""; - while (<XML>){ - chomp; - if (/<testWWWPage>(.*)<\/testWWWPage>/){ - return $1; - } - } - return ""; -} diff --git a/Trigger/TrigValidation/TrigValTools/bin/atn_summary_ART.pl b/Trigger/TrigValidation/TrigValTools/bin/atn_summary_ART.pl deleted file mode 100755 index e90ca91cf87f1adf3f2486696c3b8cfb4bcc5b12..0000000000000000000000000000000000000000 --- a/Trigger/TrigValidation/TrigValTools/bin/atn_summary_ART.pl +++ /dev/null @@ -1,816 +0,0 @@ -#!/usr/bin/perl -w -use strict; -use File::Basename; -use Date::Manip::Date; - -# Produce summary table for trigtest.pl tests in same dir or first parameter to script -my $output="index.php"; - -# If given, use first argument as output file -if ($#ARGV>=0) { - $output=$ARGV[0]; -} -print "Writing output to $output\n"; - -# Test procedure. -# 1. Identify nightly to use for test, and the path to the working directory, e.g. -# 17.X.0 rel_1 TrigAnalsysTest: -# web http://atlas-computing.web.cern.ch/atlas-computing/links/buildDirectory/nightlies/devval/AtlasAnalysis/rel_1/NICOS_area/NICOS_atntest17X0VAL64BS5G4AnlOpt/triganalysistest_testconfiguration_work/ -# afs /afs/cern.ch/atlas/software/builds/nightlies/devval/AtlasAnalysis/rel_1/NICOS_area/NICOS_atntest17X0VAL64BS5G4AnlOpt/triganalysistest_testconfiguration_work/ -# 2. Find the output from that nightly in the atn_summary log file, e.g. -# http://atlas-computing.web.cern.ch/atlas-computing/links/distDirectory/nightlies/developmentWebArea/nicos_web_area17X0VAL64BS5G4AnlOpt/NICOS_TestLog_rel_1/Trigger_TrigValidation_TrigAnalysisTest_36__TrigAnalysisTest_TestConfiguration__atn_xml_summary_table__x.html -# and cut and paste the environment settings from that: -# "To test, set the following environment:" -# 3. Make a mock-up of the working directory for the tests -# a) create a path that the script will recognise, e.g. from step 1 above, -# take this path. You need at least the rel_ part: -# dir=builds/nightlies/17.X.0/AtlasAnalysis/rel_1/NICOS_area/NICOS_atntest17X064BS5G4AnlOpt/triganalysistest_testconfiguration_work/ -# mkdir -p $dir -# cd $dir -# b) Make copies for files and links to test dirs from ATN itself -# find /afs/cern.ch/atlas/software/$dir -maxdepth 1 -type d -exec ln -s {} . \; -# find /afs/cern.ch/atlas/software/$dir -maxdepth 1 \! -type d -exec cp {} . \; -# -# 4. Rename the previous index.html to something else e.g. -# mv index.html index.html.orig -# 5. Now you can run atn_summary.pl -# Check there are no warnings or errors of course. -# 6. Compare index.html to index.html.orig, look for expected changes -# 7. Use a web brower to view it, e.g. -# firefox -no-remote file://`pwd`/index.html - -# these lines must match trigtest.pl: -my $regtestout = "regtest.log"; -my $htmldiffout = "regtest.html"; -my $summaryout = "summary.log"; -my $timerout = "timer.log"; -my $checklogout = "checklog.log"; -my $warnout = "warn.log"; -my $rootcompout = "rootcompout.log"; -my $checkcountout = "checkcountout.log"; -#my $edmcheckout = "edmcheckout.log"; -my $postcmdout = "postcmd.log"; -my $posttestrc = "post_test.exitcodes"; -my $docout = "doc.txt"; -my $athenalogglob = "*_{tail,test}.log{,.gz}"; # add .gz -my $atn_timeline = "atn_timeline.png"; -my $atn_order = "atn_timeline_order.txt"; -my $no_of_nightlies=7; -my %no_of_nightlies_exceptions = ('TrigMC',2); -my %ERROR = ( - OK => 0, - SCRIPT_MISC => 1, - POST_TEST_BAD_EXIT => 2, - ROOTCOMP_MISMATCH => 4, - ATHENA_BAD_EXIT => 8, - CHECKCOUNTS_FAILED => 16, - ATHENA_ERROR_IN_LOG => 32, - ATHENA_REGTEST_FAILED => 64, - ATN_TIME_LIMIT => 128, - PRECONDITION_FAILED_SO_NOT_RUN => 256 - ); - -my $atn_rel = "unkown"; -my $atn_platform = "unkown"; -# use to fake env for testing - uncomment to enable -my $testcwd; -#my $testcwd = "/afs/cern.ch/atlas/software/builds/nightlies/17.X.0/AtlasAnalysis/rel_1/NICOS_area/NICOS_atntest17X064BS5G4AnlOpt/triganalysistest_testconfiguration_work/"; - - -sub main(); -main(); -exit; - -sub main(){ - # for debugging: - system("printenv > atn_summary_printenv.log"); - print "\nTo test, set the following environment. If unset, results may not reproduce those within ATN. Read this script for more details on testing procedure.\n"; - my $ev; - foreach $ev qw(AtlasProject AtlasVersion NICOS_GIT_RELBRANCH NICOS_PROJECT_RELNAME_COPY){ - print "export " . $ev . "=" . getEnv($ev,"") . "\n"; - } - print "\n"; - my $context = getcontext(); - my $testdir='.'; - my @testnames=(); - my %exitcodes=(); - my %maskedcodes=(); - my %doc=(); - my %timer=(); - my %order = getorder(); - my $project = getEnv('AtlasProject',getEnv('NICOS_ATLAS_PROJECT','')); - my $gitbranch = getEnv('NICOS_GIT_RELBRANCH',''); - my $release = getEnv('AtlasVersion',''); - opendir(DIRHANDLE, $testdir) || die "Cannot opendir $testdir: $!"; - # modification to run on ART jobs (ATR-17644i) - foreach my $upname (sort readdir(DIRHANDLE)) { - if (-d $upname and $upname !~ /^\./){ - print "found updir: $upname ... \n"; - # $upname=$testdir."/".$upname; - opendir(SUBDIRHANDLE, $upname) || die "Cannot opendir $upname: $!"; - foreach my $name (sort readdir(SUBDIRHANDLE)) { - next if $name eq "."; - next if $name eq ".."; - $name=$upname."/".$name; - if (-d $name){ - print "found dir: $name ... "; - push @testnames, $name; - if (-f "$name/$summaryout"){ - print "found summary file\n"; - open SUMMARYIN, "<$name/$summaryout"; - while (<SUMMARYIN>){ - if (/exitcode = (\d+)/){ - $exitcodes{$name} = $1; - } - elsif (/maskedcode = (\d+)/){ - $maskedcodes{$name} = $1; - } - } - close SUMMARYIN; - if (-f "$name/$timerout"){ - print "found timer file\n"; - open TIMERIN, "<$name/$timerout"; - while (<TIMERIN>){ - my ($wall,$user,$system)=split; - $timer{$name}=$wall; - } - close TIMERIN; - } - else { - print "no timer file\n"; - } - } else { - print "no summary file\n"; - } - $doc{$name}=""; - if (-f "$name/$docout"){ - print "found doc file\n"; - open DOCIN, "<$name/$docout"; - while (<DOCIN>){ - chomp; - $doc{$name}.=$_; - } - close DOCIN; - } - else { - print "no doc file\n"; - } - - } - } - closedir(SUBDIRHANDLE); - } - } - closedir(DIRHANDLE); - - open HTMLOUT, "> $output" or die "failed to write to $output: $!"; - print HTMLOUT "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2 Final//EN\"> -<html>\n<head>\n<script type=\"text/javascript\" src=\"http://atlas-project-trigger-release-validation.web.cern.ch/atlas-project-trigger-release-validation/www/js/sorttable.js\"></script>\n<script type=\"text/javascript\" src=\"http://atlas-project-trigger-release-validation.web.cern.ch/atlas-project-trigger-release-validation/www/js/suitehighlight.min.js\"></script>\n<meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\" > -<title>Trigger ART results for $project,$gitbranch,$release</title>\n -<script type=\"text/javascript\" src=\"https://www.gstatic.com/charts/loader.js\"></script> -<script type=\"text/javascript\"> - - google.charts.load('current', {packages: ['corechart', 'line']}); - google.charts.setOnLoadCallback(drawCrosshairs17000); - google.charts.setOnLoadCallback(drawCrosshairs9000); - - function drawCrosshairs17000() { - var data = new google.visualization.DataTable(); - - data.addColumn('string', 'Nightly'); - - <?php - - \$nightlies = glob(dirname(__FILE__) . '/../../*'); - \$nightlies = array_values(\$nightlies); - \$content = file_get_contents(dirname(__FILE__).'/test_HLT_physicsV7_menu_ART_and_ROSsim_build/HLT_physicsV7_ROSsim_17000/ATLASros2rob2018.py'); - //echo \$content; - preg_match_all('/ROS-.[A-Z]+-.[A-Z]+-.[0-9]+/i',\$content,\$ROSes); - \$ROSes = array_values(\$ROSes); - foreach(\$ROSes as \$ros){ - \$ros = array_values(\$ros); - foreach(\$ros as \$ros1){ - echo \" data.addColumn('number', '\$ros1'); \\n\"; - } - } - - echo \" data.addRows([\"; - foreach(\$nightlies as \$nightly){ - \$content = file_get_contents(\$nightly.'/TrigP1Test/test_HLT_physicsV7_menu_ART_and_ROSsim_build/HLT_physicsV7_ROSsim_17000/ROStest.reference.new'); - //echo \$content.'\\n'; - echo \" ['\".basename(\$nightly).\"',\"; - foreach(\$ROSes as \$ros){ - \$ros = array_values(\$ros); - foreach(\$ros as \$ros1){ - //echo \$ros1.'\\n'; - \$matched = preg_match_all('/'.\$ros1.'.[ \\t]+[|].[ \\t]+.[0-9]+.[ \t]+[|](.[.0-9]+)/', \$content,\$rates); - if(\$matched) echo \$rates[1][0].\",\"; - else echo \"0.,\"; - //print_r(\$rates); - } - } - echo \"],\"; - } - echo \" ]);\"; - ?> - - var options = { - title: 'ROS request rates in rejected events for lumi 1.7e34', - hAxis: { - title: 'Nightly' - }, - vAxis: { - title: 'ROS request rate' - }, - //colors: ['#a52714', '#097138'], - crosshair: { - color: '#000', - trigger: 'selection' - } - }; - - var chart = new google.visualization.LineChart(document.getElementById('chart_div17000')); - - chart.draw(data, options); - - } - - function drawCrosshairs9000() { - var data = new google.visualization.DataTable(); - - data.addColumn('string', 'Nightly'); - - <?php - - \$nightlies = glob(dirname(__FILE__) . '/../../*'); - \$nightlies = array_values(\$nightlies); - \$content = file_get_contents(dirname(__FILE__).'/test_HLT_physicsV7_menu_ART_and_ROSsim_build/HLT_physicsV7_ROSsim_9000/ATLASros2rob2018.py'); - //echo \$content; - preg_match_all('/ROS-.[A-Z]+-.[A-Z]+-.[0-9]+/i',\$content,\$ROSes); - \$ROSes = array_values(\$ROSes); - foreach(\$ROSes as \$ros){ - \$ros = array_values(\$ros); - foreach(\$ros as \$ros1){ - echo \" data.addColumn('number', '\$ros1'); \\n\"; - } - } - - echo \" data.addRows([\"; - foreach(\$nightlies as \$nightly){ - \$content = file_get_contents(\$nightly.'/TrigP1Test/test_HLT_physicsV7_menu_ART_and_ROSsim_build/HLT_physicsV7_ROSsim_9000/ROStest.reference.new'); - //echo \$content.'\\n'; - echo \" ['\".basename(\$nightly).\"',\"; - foreach(\$ROSes as \$ros){ - \$ros = array_values(\$ros); - foreach(\$ros as \$ros1){ - //echo \$ros1.'\\n'; - \$matched = preg_match_all('/'.\$ros1.'.[ \\t]+[|].[ \\t]+.[0-9]+.[ \t]+[|](.[.0-9]+)/', \$content,\$rates); - if(\$matched) echo \$rates[1][0].\",\"; - else echo \"0.,\"; - //print_r(\$rates); - } - } - echo \"],\"; - } - echo \" ]);\"; - ?> - - var options = { - title: 'ROS request rates in rejected events for lumi 0.9e34', - hAxis: { - title: 'Nightly' - }, - vAxis: { - title: 'ROS request rate' - }, - //colors: ['#a52714', '#097138'], - crosshair: { - color: '#000', - trigger: 'selection' - } - }; - - var chart = new google.visualization.LineChart(document.getElementById('chart_div9000')); - - chart.draw(data, options); - - } - -</script> -<script type=\"text/javascript\"> - -var thisRelease = null; -var loaded = false; - - - - -function highlightDiffs(clear) { - var table1 = document.getElementById('ATNResults'); - var table2 = null; - if (!clear) { - try { - table2 = document.getElementById('DiffFrame').contentWindow.document.getElementById('ATNResults'); - } - catch (e) {} - } - - var diffs = 0; - for (var i=1; i < table1.rows.length; i++) { - var cells = table1.rows[i].cells; - for (var j=1; j < cells.length; j++) { // skip name - if (j==9) continue; // skip timing - if (!table2 || cells[j].textContent == table2.rows[i].cells[j].textContent) { - cells[j].style.backgroundColor = ''; - cells[j].title = ''; - } - else { - cells[j].style.backgroundColor = '#FFCCCC'; - cells[j].title = table2.rows[i].cells[j].textContent || table2.rows[i].cells[j].innerText; - diffs++; - } - } - } - setDiffCount(diffs); -} - -function setDiffCount(diffs) { - if (diffs>0) { - document.getElementById('nDiffs').innerHTML = '<a href=\"https://gitlab.cern.ch/atlas/athena/compare/nightly%2F21.1%2F'+document.DiffForm.rel.value+'...nightly%2F21.1%2F'+thisRelease+'\">'+diffs+' differences! click here for GitLab diff</a>'; - } - else { - document.getElementById('nDiffs').textContent = ''; - } -} - -function loadPage() { - var diffRelease = document.DiffForm.rel.value; - var iframe = document.getElementById('DiffFrame'); - if (diffRelease != thisRelease) { - // Load second summary page in hidden iframe - var url = window.document.location.href; - iframe.src = url.replace(/[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9][0-9][0-9]/, diffRelease); - } - else { - highlightDiffs(true); // remove all highlighting - } -} - -function setRelease() { - var url = window.document.location.href; - thisRelease = url.match(/[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9][0-9][0-9]/); - if (thisRelease) { - thisRelease = thisRelease[0]; - document.DiffForm.rel.value = thisRelease; - } - return true; -} - -function popup(mylink, windowname) { - if (! window.focus) return true; - var href; - if (typeof(mylink) == 'string') - href=mylink; - else - href=mylink.href; - window.open(href, windowname, 'width=1000,height=300,toolbar=yes,resizable=yes,scrollbars=yes'); - return false; -} - -function showBuildFailures(failures,link) { - if (failures!='0') { - document.write('<a href=\"'+link+'\" style=\"color:Red\">Build failures: '+failures+'</a>'); - } -} - -</script> -</head> -<style type=\"text/css\"> - tr.hi:hover {background-color:#E6E6E6;} -</style> -<body onload=\"highlightSuite({id:'ATNResults'});setDiffCount(0);\"> -<h1>Trigger ART test results summary</h1> -<form name=\"DiffForm\"> -"; - - - my $now=qx(date); - my $testWWWPage=getTestWWWPage(); - my $nicosWWWPage=dirname($testWWWPage); - - print HTMLOUT "<p>Last updated $now. Contact: Daniele.Zanzi @ cern.ch</p>\n"; - -# my $atn_relno = $atn_rel; -# $atn_relno =~ s/rel_//; -# print HTMLOUT "<p><a href=\"".$testWWWPage."\">Nightly test</a>: $project,$gitbranch,<b>$release</b> ($atn_platform)"; -# print HTMLOUT "<script src=\"".$nicosWWWPage."/build_failures_".$atn_relno.".js\" language=\"JavaScript\"></script>\n"; -# print HTMLOUT "<script type=\"text/javascript\">showBuildFailures(failures_".$atn_relno."(),"."\"".$nicosWWWPage."/nicos_buildsummary_".$atn_relno.".html\")</script>"; -# - my $test_suite = gettestpkgdir(); # this is a basename of pwd (expected to be e.g. TrigP1Test) - print HTMLOUT "<p>Nightly test: $project, $gitbranch, $release\n\n"; - print HTMLOUT " Check other builds: <select name=\"select_other_builds\" onchange=\"location = this.value;\">\n"; - print HTMLOUT "<option value=\"\" selected=\"selected\">-----</option>\n"; - print HTMLOUT "<?php\n"; - print HTMLOUT " \$nightlies = glob(dirname(__FILE__) . '/../../*');\n"; - print HTMLOUT " \$nightlies = array_reverse(\$nightlies);\n"; - print HTMLOUT " \$current_page_link = \"\$_SERVER[REQUEST_URI]\";\n"; - print HTMLOUT " // protect against multiple slashes in a row\n"; - print HTMLOUT " \$current_page_link = preg_replace('#/+#','/',\$current_page_link);\n"; - print HTMLOUT " \$full_link = (isset(\$_SERVER['HTTPS']) ? \"https\" : \"http\") . \"://\$_SERVER[HTTP_HOST]\" . \$current_page_link;\n"; - print HTMLOUT " foreach(\$nightlies as \$nightly){\n"; - print HTMLOUT " \$nightly = basename(\$nightly);\n"; - print HTMLOUT " echo \"<option value='\" . \$full_link . \"../../\" . \$nightly . \"/$test_suite/\" . \"'>\".\$nightly.\"</option>\";\n"; - print HTMLOUT " }\n"; - print HTMLOUT "?>\n"; - print HTMLOUT "</select></p>\n"; - - print HTMLOUT "<p>Check differences: <select name=\"rel\" size=\"1\" onchange=\"loadPage()\">\n"; - print HTMLOUT "<option value=\"\" selected=\"selected\">-----</option>\n"; - print HTMLOUT "<?php\n"; - print HTMLOUT " \$nightlies = glob(dirname(__FILE__) . '/../../*');\n"; - print HTMLOUT " \$nightlies = array_reverse(\$nightlies);\n"; - print HTMLOUT " \$current_page_link = \"\$_SERVER[REQUEST_URI]\";\n"; - print HTMLOUT " // protect against multiple slashes in a row\n"; - print HTMLOUT " \$current_page_link = preg_replace('#/+#','/',\$current_page_link);\n"; - print HTMLOUT " \$full_link = (isset(\$_SERVER['HTTPS']) ? \"https\" : \"http\") . \"://\$_SERVER[HTTP_HOST]\" . \$current_page_link;\n"; - print HTMLOUT " foreach(\$nightlies as \$nightly){\n"; - print HTMLOUT " \$nightly = basename(\$nightly);\n"; - print HTMLOUT " echo \"<option value='\".\$nightly.\"'>\".\$nightly.\"</option>\";\n"; - print HTMLOUT " }\n"; - print HTMLOUT "?>\n"; - print HTMLOUT "</select> <span id='nDiffs' style='font-weight:bold'></span> -</form><script type=\"text/javascript\">setRelease();</script></p>"; - - - print HTMLOUT "\n<table class=\"sortable\" id=\"ATNResults\" border=1><thead><tr> -<th title=\"Click to sort by test suite\">Test name</th> -<th>Overall Result</th> -<th title=\"exit code of Athena\">Athena exit</th> -<th title=\"presence of any error messages in log\">Error Msgs</th> -<th title=\"number of warning messages in log\">Warn Msgs</th> -<th>Reg. tests (incl. WARNING)</th> -<th title=\"expert histogram exact comparison to ref\">Root comp</th> -<th title=\"L2 + EF chain and trigger element counts within tolerance w.r.t. ref\"> Chain, TE cnts </th> -<th title=\"athena wall time in secs\">Time (s)</th> -<th title=\"trigtest.pl exit code, bare and masked for ATN\">Exit code</th> -<th>Post Tests</th> -<th>Dir. link</th> -<th>Log link</th></tr></thead><tbody>\n"; - for my $name (@testnames){ - my $atn_script = "-"; - my $atn_timeout = "-"; - my $athena_exit = "-"; - my $error_msgs = "-"; - my $error = "-"; - my $warn = "-"; - my $reg_tests = "-"; - my $rootcomp = "-"; - my $checkcount = "-"; - my $timer = "-"; - my $exitcode = "-"; - my $maskedcode = "-"; - my $postrc = 0; - my $logfile = ""; - my $order = ""; - if (defined $exitcodes{$name}){ - $exitcode = $exitcodes{$name}; - if (defined $maskedcodes{$name}){ - $maskedcode = $maskedcodes{$name}; - if ($maskedcodes{$name} != 0){ - $maskedcode = "<font color=\"red\">$maskedcodes{$name}</font>"; - } - } - if (defined $timer{$name}){ - $timer = $timer{$name}; - } - $atn_script = testcode($exitcodes{$name},"SCRIPT_MISC"); - my $skipped = testcode($exitcodes{$name},"PRECONDITION_FAILED_SO_NOT_RUN"); - if ($skipped !~ /OK/){ - $atn_script = "<div title=\"Not run because precondition failed\" style=\"color:gray\">SKIP</div>"; - $logfile = "not run because precondition failed"; - } - elsif ($atn_script !~ /OK/){ - $atn_script = "<font color=\"red\">FAIL</font>"; - } - else{ - if ($maskedcodes{$name} != 0){ - my $errors = errornames($maskedcodes{$name}); - $atn_script = "<div title=\"Failures: $errors\" style=\"color:red\">ERROR</div>"; - } - - $atn_timeout = testcode($exitcodes{$name},"ATN_TIME_LIMIT"); - $athena_exit = testcode($exitcodes{$name},"ATHENA_BAD_EXIT"); - $rootcomp = testcode($exitcodes{$name},"ROOTCOMP_MISMATCH"); - - if ($atn_timeout !~ /OK/){ - $athena_exit="<font color=\"yellow\">TIMEOUT</font>"; - } - - # no checklog output file and no failure in exitcode - $error_msgs = testcode($exitcodes{$name},"ATHENA_ERROR_IN_LOG"); - if (! -f "$name/$checklogout" and $error_msgs =~ /OK/){ - $error = "<font color=\"gray\">N/A</font>"; - } else { - my $error_count = ''; - if ($error_msgs !~ /OK/){ - $error_count=qx(head -5 $name/$checklogout | grep 'Found messages in'); - if ($error_count =~ /Found messages in.*\(([0-9]*)\).*/){ - $error_count="($1)"; - } - } - print "error count: $error_count\n"; - $error = "<a type=\"text/plain\" href=\"$name/$checklogout\">$error_msgs$error_count</a>"; - } - - if (! -f "$name/$warnout"){ - $warn = "<font color=\"gray\">N/A</font>"; - } else { - my $warn_count=qx(head -5 $name/$warnout | grep 'Found messages in'); - if ($warn_count =~ /Found messages in.*\(([0-9]*)\).*/){ - $warn_count = $1; - chomp $warn_count; - } - else { - $warn_count = 'N/A' - } - print "warn count: $warn_count\n"; - $warn = "<a type=\"text/plain\" href=\"$name/$warnout\">$warn_count</a>"; - } - if (! -e "$name/$regtestout"){ - $reg_tests = "<font color=\"gray\">N/A</font>"; - } else { - my $status = warncode($exitcodes{$name},"ATHENA_REGTEST_FAILED"); - my $tooltip = ""; - if ($status ne "OK") { - my @diffs = `grep REGTEST $name/$regtestout | awk '{print \$2}' | sort -u`; - chomp @diffs; - if (scalar(@diffs) > 50) { - $tooltip = "More than 50 sources of REGTEST differences!"; - } - elsif (scalar(@diffs) > 0) { - $tooltip = join(", ",@diffs); - } - } - $reg_tests = "<a type=\"text/plain\" title=\"$tooltip\" href=\"$name/$regtestout\">" . $status . "</a>"; - if ($status ne "OK" and -e "$name/$htmldiffout"){ - $reg_tests .= " <a href=\"$name/$htmldiffout\">[ht]</a>" - } - } - if (! -e "$name/$rootcompout"){ - $rootcomp = "<font color=\"gray\">N/A</font>"; - } elsif ($rootcomp =~ /FAIL/){ - my @diffs = `egrep '^Different histograms:' $name/$rootcompout`; - chomp @diffs; - $rootcomp = "<a type=\"text/plain\" title=\"@diffs\" href=\"$name/$rootcompout\"><font color=\"red\">DIFF</font></a>"; - if (-e "$name/rootcomp.ps.gz") { - $rootcomp .= " <a href=\"$name/rootcomp.ps.gz\">[ps]</a>"; - } - } elsif ($rootcomp =~ /OK/){ - $rootcomp = "<a type=\"text/plain\" href=\"$name/$rootcompout\"><font color=\"green\">MATCH</font></a>"; - } - if (! -f "$name/$checkcountout"){ - $checkcount = "<font color=\"gray\">N/A</font>"; - } else { - my $checkcount1 = chaincountcheck("$name/$checkcountout"); - print "check chain counts: $checkcount1\n"; - $checkcount = "<a type=\"text/plain\" href=\"$name/$checkcountout\">$checkcount1</a>"; - } - $postrc = 0; - if (! -e "$name/$posttestrc"){ - $postrc = "<font color=\"gray\">N/A</font>"; - } elsif (($exitcodes{$name} & $ERROR{"POST_TEST_BAD_EXIT"})==0) { - $postrc = "OK"; - $postrc .= gethistnumber($name); - } else { - $postrc = getposttests($name); - $postrc .= gethistnumber($name); - } - - } - } - my @logfiles = glob("$name/$athenalogglob"); - for (@logfiles){ - my ($lfd, $lflabel) = split('/',$_); - $lflabel = "[tail]" if ($lflabel =~ /tail/); - $logfile .= "<a type=\"text/plain\" href=\"$_\"><font size=-2>$lflabel</font></a> "; - } - if (length($logfile)==0){ - $logfile = " "; - } - print "logfile=$logfile\n"; - - my $thename = $name; - my $logurl; - if ($context){ - $logurl = getlogpath($name,$testdir); - } - # special case when run by hand, log might be in current dir as testname.log - if (! defined $logurl and -f "$name.log"){ - $logurl="$name.log"; - } - if (defined $logurl){ - $thename = "<a type=\"text/plain\" href=\"$logurl\">$name</a>"; - print "found URL: $logurl\n"; - } else { - print "not found URL for $name\n"; - } - - if (exists $order{$name}) { - $order = "suite=\"$order{$name}[1]\" sorttable_customkey=\"$order{$name}[0]\""; - } - print HTMLOUT "<tr class=\"hi\"><td $order title=\"$doc{$name}\">$thename</td> <td>$atn_script</td> <td>$athena_exit</td> <td>$error</td> <td>$warn</td> <td style=\"white-space:nowrap\">$reg_tests</td> <td style=\"white-space:nowrap\">$rootcomp</td> <td>$checkcount</td> <td><a type=\"text/plain\" href=\"$name/$timerout\">$timer</a></td> <td>$exitcode/$maskedcode</td> <td>$postrc</td> <td><a href=\"$name\">dir</a></td><td>$logfile</td></tr>\n"; - } - print HTMLOUT "</tbody></table>"; - if (-e "$atn_timeline"){ - print HTMLOUT "<font face=\"monospace\"><br>"; - my @lines = `tail -3 *atn_timeline.log`; - print HTMLOUT join('<br>',@lines); - print HTMLOUT "<a href=\"atn_timeline.png\"> [timeline plot]</a>"; - print HTMLOUT "</font>"; - } - print HTMLOUT '<iframe onload="highlightDiffs(false)" id="DiffFrame" style="visibility:hidden;display:none;"></iframe>'; - print HTMLOUT '<div id="chart_div17000" style="float: left; width: 50%; height: 500px"></div>'; - print HTMLOUT '<div id="chart_div9000" style="float: right; width: 50%; height: 500px"></div>'; - print HTMLOUT '</body></html>'; - close HTMLOUT; - -} - -sub chaincountcheck($){ - my ($infile)=@_; - my $counts=""; - my $nonexist = 0; - open COUNTIN, "<$infile" or return "-"; - while (<COUNTIN>){ - if (/Fraction inside tolerance\:\s+(\d+)\/(\d+)/){ - $counts .= "$1/$2 " - } elsif (/does not exist/){ - $nonexist++; - } - } - close COUNTIN; - $counts = "New" if ($counts eq "" && $nonexist > 0); - $counts = "OK" if ($counts eq ""); - print "nonexistant counts: $nonexist\n"; - return $counts; -} - -sub testcode($$){ - my ($code,$string) = @_; - my $value=$ERROR{$string}; - return (($code & $value)? "<font color=\"red\">FAIL</font>" : "OK"); -} - -sub warncode($$){ - my ($code,$string) = @_; - my $value=$ERROR{$string}; - return (($code & $value)? "<font color=\"orange\">WARN</font>" : "OK"); -} - -sub getEnv($$){ - my ($name,$default) = @_; - if (exists $ENV{$name}) { - return $ENV{$name}; - } - else { - return $default; - } -} - -# figure out which nightly this is and where logs are etc. -# this wil only work if run in ATN. -sub getcontext(){ - my $cwd = ''; - chomp($cwd=`pwd`); - # for testing: - if (defined $testcwd){ - print "!WARNING: TEST MODE!"; - $cwd=$testcwd; - } - print "--------------------------------------------------------\n"; - print "$cwd\n"; - if ($cwd =~ /NICOS_.*test([\w\d]+)\//){ # NICOS_qmtest (old) or NICOS_atntest (new) directory - $atn_platform=$1; - print "ATN_JOB_LOGFILE=" . getEnv("ATN_JOB_LOGFILE","") . "\n"; - print "ATN_PACKAGE=" . getEnv("ATN_PACKAGE","") . "\n"; - print "--------------------------------------------------------\n"; - } - $atn_rel = $ENV{'NICOS_PROJECT_RELNAME_COPY'}; - - if (defined $atn_platform and defined $atn_rel){ - print "$atn_platform $atn_rel $cwd\n"; - }else{ - print "atn_platform and atn_rel not defined - probably running outside ATN\n"; - } - return (defined $atn_platform && defined $atn_rel && defined $cwd); -} - -sub getlogpath($){ - my ($name,$testdir) = @_; - my $found; - opendir(DIRHANDLE, $testdir) || die "Cannot opendir $testdir: $!"; - foreach my $file (sort readdir(DIRHANDLE)) { - if ($file =~ /__${name}.log/){ - #print "$name matches $file\n"; - $found="$file"; - last; - } - } - return $found; -} - -# create a relative URL by going back (../) until rel_N is reached, then forward again to here. This can then be changed to use for other rel_N -sub getrelpath(){ - my $pcwd = ''; - chomp($pcwd=`pwd`); - # for testing - if (defined $testcwd){ - $pcwd=$testcwd; - } - my @pcwd = split('/',$pcwd); - my ($i, $n, $up, $down); - $up=""; - $down=""; - for ($i=$#pcwd; $i>=0; --$i){ - $up.="../"; - $down = $pcwd[$i]. "/" . $down; - if ($pcwd[$i] =~ /rel_/){ - last; - } - } - return "$up$down"; -} - -# find the directory name we are in, e.g. triganalysistest_testconfiguration_work -sub gettestpkgdir(){ - use File::Basename; - my $cwd = ''; - chomp($cwd=`pwd`); - if (defined $testcwd){ - $cwd=$testcwd; - } - return basename($cwd); -} - -sub gethistnumber(){ - my ($testname) = @_; - my $text; - open POSTRC, "<$testname/post_test_checkHist.log" or return ""; - while (<POSTRC>){ - chomp; - if ($_ =~ /Total histograms/) - { - $text = $_; - return "<font size=\"-2\">$text</font>"; - } - } - return "No hist number found"; -} - -sub getposttests(){ - my ($testname) = @_; - my $text; - open POSTRC, "<$testname/$posttestrc" or return ""; - while (<POSTRC>){ - chomp; - (my $name, my $rc) = split(); - if ($rc!=0){ - $text .= "<a type=\"text/plain\" href=\"$testname/post_test_$name.log\"><font color=\"red\">$name</font></a> "; - } - } - close POSTRC; - return "<font size=\"-2\">$text</font>"; -} - -sub getorder(){ - my %order = (); - open ORDER,"<$atn_order" or return %order; - while (<ORDER>){ - chomp; - (my $i, my $name, my $suite) = split(); - $order{$name} = [$i,$suite] - } - return %order; -} - -sub errornames() { - my ($code) = @_; - my @errors = (); - foreach my $key ( keys %ERROR ) { - if (($code & $ERROR{$key}) != 0) { - push(@errors,$key); - } - } - return join(', ', @errors); -} - -sub getTestWWWPage() { - open XML,"ATNOverview.xml" or return ""; - while (<XML>){ - chomp; - if (/<testWWWPage>(.*)<\/testWWWPage>/){ - return $1; - } - } - return ""; -} diff --git a/Trigger/TrigValidation/TrigValTools/bin/atn_timeline.py b/Trigger/TrigValidation/TrigValTools/bin/atn_timeline.py deleted file mode 100755 index 040d6cce260690667a26af1bd2cf5b0ac89970b3..0000000000000000000000000000000000000000 --- a/Trigger/TrigValidation/TrigValTools/bin/atn_timeline.py +++ /dev/null @@ -1,198 +0,0 @@ -#!/usr/bin/env python - -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -"""Analyse and create a graph of the ATN test timeline.""" - -__author__ = "Frank Winklmeier" - -import glob -import re -import sys -import os -import operator -from datetime import datetime - -import matplotlib -from matplotlib.dates import date2num -from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas -from matplotlib.figure import Figure - -class Test: - def __init__(self): - self.name = None - self.t1 = None - self.t2 = None - self.suite = None - -def getSuites(dir): - """Read test suites from python dict dumped into NICOS log file""" - - f = open(os.path.join(dir,'nicos_test.loglog'),'r') - for line in f: - if line.find('atn_streams_config: dictStreams')!=-1: - streams = eval(f.next().strip()) - return streams - return {} - -def parseTestLog(log): - """Extract time stamps from NICOS logs""" - - test = Test() - f = open(log,'r') - - # Test name from log file name - # Example: Trigger_TrigValidation_TrigP1Test_49__TrigP1Test_TestConfiguration__AllPT_physicsV1_magField_on_off_on__x.loglog - m = re.match('.*?_([0-9]+.*)\.loglog',log) - if m==None: - print "Cannot deduce test name from %s" % log - test.name = log - test.alias = '' - else: - test.name = re.match('.*?_([0-9]+.*)\.loglog',log).group(1) - test.alias = test.name.split('__')[2] - - for line in f: - # Old NICOS version - if line.find('qmtest.start_time')!=-1: - test.t1 = f.next().strip() - test.t1 = datetime.strptime(test.t1, '%Y-%m-%dT%H:%M:%SZ') - continue - if line.find('qmtest.end_time')!=-1: - test.t2 = f.next().strip() - test.t2 = datetime.strptime(test.t2, '%Y-%m-%dT%H:%M:%SZ') - continue - - # New NICOS version without QMTest - if line.find('ATN, test start time')!=-1: - test.t1 = line.split('] ')[1].strip() - test.t1 = datetime.strptime(test.t1, '%a %b %d %H:%M:%S %Z %Y') - continue - if line.find('ATN, test end time')!=-1: - test.t2 = line.split('] ')[1].strip() - test.t2 = datetime.strptime(test.t2, '%a %b %d %H:%M:%S %Z %Y') - continue - - return test - -def getTimes(dir, package): - """Loop over all test log files and extract test info""" - - tests = {} - suites = getSuites(dir) - if len(suites)==0: return None - - for log in glob.iglob(os.path.join(dir,"*%s*.loglog" % package)): - test = parseTestLog(log) - if test.t1==None or test.t2==None: - print "Missing start/stop time for %s" % test.name - else: - tests[test.name] = test - - for s,v in suites.iteritems(): - if test.name.lower() in v: test.suite = s - - return tests - -def main(): - import optparse - parser = optparse.OptionParser(description=__doc__, - usage="%prog [Options] TESTDIR") - - parser.add_option("-p", dest="package", type="string", action="store", - help="Test package (e.g. TrigP1Test)") - - parser.add_option("-o", dest="output", type="string", action="store", default = 'atn_timeline.png', - help="File name for graphics [%default]") - - parser.add_option("--atn", action="store_true", - help="ATN mode for nightly tests") - - (opts, args) = parser.parse_args() - - if not opts.package: - parser.error("Specify test package") - return 1 - - if len(args)==0 and not opts.atn: - parser.print_help() - return 1 - - if opts.atn: - testdir = '../../NICOS_TestLog%s' % os.environ['NICOS_SUFFIX'] - else: - testdir = args[0] - - tests = getTimes(testdir, opts.package) - if tests==None or len(tests)==0: - print 'No test suites available for %s in %s' % (opts.package,testdir) - return 0 - - # Print tests and stats - suites = [] - print '%-40s %-20s %-19s %-19s %s' % ('Test', 'Suite', 'Start', 'Stop', 'Duration') - for t in sorted(tests.values(), key=operator.attrgetter('t1')): - print '%-40s %-20s %s %s %s' % (t.alias, t.suite, t.t1, t.t2, t.t2-t.t1) - if not t.suite in suites: suites += [t.suite] - suites.sort() - - f = open('atn_timeline_order.txt','w') - for i,t in enumerate(sorted(tests.values(), key=operator.attrgetter('suite','t1'))): - f.write('%d %s %s\n' % (i,t.alias,t.suite)) - f.close() - - dmin = sorted(tests.values(), key=operator.attrgetter('t1'))[0].t1 - dmax = sorted(tests.values(), key=operator.attrgetter('t1'))[-1].t2 - print - print 'First test started: %s' % dmin - print 'Last test finished: %s' % dmax - print 'Total duration: %s' % (dmax-dmin) - - # Create graphics - DPI = 80 - fig = Figure(figsize=(1200/DPI,800/DPI), dpi=DPI) - canvas = FigureCanvas(fig) - ax = fig.add_subplot(111) - - # Just to get the x-axis as time - ax.plot_date([date2num(dmin)-0.001,date2num(dmax)+0.001], [1,1], markersize=0) - - # Plot tests - n = 0 - suite = None - for t in sorted(tests.values(), key=operator.attrgetter('suite','t1')): - t1 = date2num(t.t1) - t2 = date2num(t.t2) - dt = '%s' % (t.t2-t.t1).seconds - y = suites.index(t.suite) - ax.hlines([y], t1, t2, color='red') - ax.vlines(t1, y-0.1, y+0.1, color='red') - ax.vlines(t2, y-0.1, y+0.1, color='red') - - # Labels - if suite!=t.suite: - ax.text(date2num(dmin), y+0.35, 'Suite: %s' % t.suite, color='blue') - suite = t.suite - n = 0 - else: - n += 1 - - if n%4==0: offset = -0.3 - elif n%4==1: offset = 0.1 - elif n%4==2: offset = -0.45 - elif n%4==3: offset = 0.25 - - ax.text(t1, y+offset, '%d) %s' % (n+1,t.alias)) - ax.text(t1+0.5*(t2-t1), y+0.02, dt, color='red', ha='center') - - - ax.text(0, 1, testdir, transform = ax.transAxes) - ax.xaxis.set_major_formatter(matplotlib.dates.DateFormatter('%H:%M:%S')) - ax.yaxis.set_ticklabels([]) - - canvas.print_figure(opts.output, dpi=DPI) - -if __name__ == "__main__": - try: - sys.exit(main()) - except KeyboardInterrupt: - sys.exit(1) diff --git a/Trigger/TrigValidation/TrigValTools/bin/test-xml-autoconf.py b/Trigger/TrigValidation/TrigValTools/bin/test-xml-autoconf.py deleted file mode 100755 index 820942beb24485e6cc9ec5975e9e05d9297f7285..0000000000000000000000000000000000000000 --- a/Trigger/TrigValidation/TrigValTools/bin/test-xml-autoconf.py +++ /dev/null @@ -1,63 +0,0 @@ -#!/usr/bin/env python - -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -# -# Takes test xml file and enabled/disables tests marked with: -# -# <!-- DISABLE-IN-PROJECT-BEGIN: AtlasTier0 AtlasProduction--> -# <TEST name="HelloWorld" type="script" suite="TrigOnline"> -# ... -# </TEST> -# <!-- DISABLE-IN-PROJECT-END --> -# -# or -# -# <!-- ENABLE-IN-PROJECT-BEGIN: AtlasHLT --> -# <TEST name="HelloWorld" type="script" suite="TrigOnline"> -# ... -# </TEST> -# <!-- ENABLE-IN-PROJECT-END --> -# -# -import sys -import os -import re - -if len(sys.argv) < 2: - print 'Syntax: text-xml-autoconf.py test.xml [output.xml]' - sys.exit(1) - -output = sys.stdout -if len(sys.argv)==3: - output = open(sys.argv[2],'w') - -# Get project from NICOS or asetup environment -project = os.environ.get('NICOS_PROJECT_NAME',os.environ.get('AtlasProject','')) -if len(project)==0: - print 'Cannot read $AtlasProject or $NICOS_PROJECT_NAME' - sys.exit(1) - -reDisable = re.compile(".*<\!--\s*DISABLE-IN-PROJECT-BEGIN:\s*(.*)-->") -reEnable = re.compile(".*<\!--\s*ENABLE-IN-PROJECT-BEGIN:\s*(.*)-->") -reEnd = re.compile(".*<\!--.*-IN-PROJECT-END.*-->") -disable = False - -f = open(sys.argv[1],'r') -for line in f: - - m = reDisable.match(line) - if m and (project in m.group(1).split()): - disable = True - continue - - m = reEnable.match(line) - if m and not (project in m.group(1).split()): - disable = True - continue - - if disable and reEnd.match(line): - disable = False - continue - - if not disable: output.write(line) - diff --git a/Trigger/TrigValidation/TrigValTools/bin/trigtest.pl b/Trigger/TrigValidation/TrigValTools/bin/trigtest.pl deleted file mode 100755 index aeadb4440fdef11fa0b7e3273c52ef3fbe973d74..0000000000000000000000000000000000000000 --- a/Trigger/TrigValidation/TrigValTools/bin/trigtest.pl +++ /dev/null @@ -1,1372 +0,0 @@ -#!/usr/bin/perl -w -# Script to manage Trigger tests -# $Id: trigtest.pl,v 1.16 2009-05-20 15:53:22 sgeorge Exp $ - -use Getopt::Long; -use File::Basename; -use File::Spec; -use File::Copy; -use File::Path; -use constant TRUE => 1; -use constant FALSE => 0; -use constant UNDEFINED => "undefined"; -$prog = basename $0; -$config = {}; -$fullregtest = '<fullregtest>'; -$customregtest = '<customregtest>'; -# set some output file names -$regtestout = "regtest.log"; -$htmldiffout = "regtest.html"; -$summaryout = "summary.log"; -$timerout = "timer.log"; -$checklogout = "checklog.log"; -$warnout = "warn.log"; -$rootcompout = "rootcompout.log"; -$checkcountout = "checkcountout.log"; -$checkmergeout = "checkmergeout.log"; -$edmcheckout = "edmcheckout.log"; -$postcmdout = "postcmd.log"; -$posttestrc = "post_test.exitcodes"; -$docout = "doc.txt"; - -# define error codes - must match atn_summary.pl -%ERROR = ( - OK => 0, - SCRIPT_MISC => 1, - POST_TEST_BAD_EXIT => 2, - ROOTCOMP_MISMATCH => 4, - ATHENA_BAD_EXIT => 8, - CHECKCOUNTS_FAILED => 16, - ATHENA_ERROR_IN_LOG => 32, - ATHENA_REGTEST_FAILED => 64, - ATN_TIME_LIMIT => 128, - PRECONDITION_FAILED_SO_NOT_RUN => 256 - ); -# max bit: 128. Bash takes return codes 0-256. -# Larger numbers are taken mod 256 so effectively masked off. Can be used for internal signalling only. - -# mask off those codes above which you do not want to flag in the exit code -# i.e. so ATN does not interpret them as the test failing. -# bit positions marked 1 will be used, 0 will not be used. -# SCRIPT_MISC is on the right, ATN_TIME_LIMIT on the left -# This default mask can be modified via the 'extra_failure_codes' test directive -# only "shout" if we see/have: ATHENA_BAD_EXIT => 8 decimal 8 in bit is 0b00001000 thus -$default_exitmask = 0b00001001; - -# Exit mask of the last run test. Not nice but the easiest way to implement -# this on top of all the other ugly things in this script. -$exitmask = $default_exitmask; - -# command to use for rootcomp -$rootcomp_cmd = "rootcomp.py --pdf --noRoot"; -$checkcount_cmd = "trigtest_checkcounts.sh"; -$checkmerge_cmd = "trigtest_check_merge.sh"; -sub main(); -main(); -exit -10; -#### - -sub main(){ - # trap errors from here on - $SIG{'INT'} = 'CLEANUP_INT'; - $SIG{'TERM'} = 'CLEANUP_TERM'; - $t0=time(); # timer - $failures = 0; # count number of tests which fail - $statuscode = 0; # combination of errors from last test - command_line(); - parse_config(); - if ($verify){ - print_config(); - } - exit if ($verifyconfig); - check_tests(); - do_tests(); - results_summary(); - timer($t0); - if ($statuscode != 0){ - prog_error_exit("at end",@statuscodes); - } - exit 0; - # exit($statuscode); # status code of last test - # exit($failures); # number of tests which fail -} - -sub CLEANUP_INT { - print "\n\n$prog: Caught Interrupt (^C), probably ATN time exceeded, finish up and exit\n"; - push @statuscodes, 'ATN_TIME_LIMIT'; - timer($t0); - if ($statuscode != 0){ - prog_error_exit("at end",@statuscodes); - } - exit(1); # never reaches this line in principle -} - -sub CLEANUP_TERM { - print "\n\n$prog: Caught TERM signal, finish up and exit\n"; - push @statuscodes, 'ATN_TIME_LIMIT'; - timer($t0); - if ($statuscode != 0){ - prog_error_exit("at end",@statuscodes); - } - exit(1); # never reaches this line in principle -} - -sub prog_error_exit($$){ - my ($message,@error_strings) = @_ or die; - my $exitcode_unmasked = process_error_codes(@error_strings); - # for ATN purposes, mask less significant codes - my $exitcode = $exitcode_unmasked & $exitmask; - if ($exitcode!=0){ - printf "$prog: $failkey $message (unmasked=%#.8b exitcode=%#.8b)\n", $exitcode_unmasked, $exitcode; - } else { - printf "$prog: $warnkey $message (unmasked=%#.8b exitcode=%#.8b)\n", $exitcode_unmasked, $exitcode; - } - exit($exitcode); - -} - -sub process_error_codes(@) { - my (@error_strings) = @_; - my $exitcode=0; - # | sort | uniq - my %saw; - undef %saw; - @saw{@error_strings} = (); - my @error_strings_uniq = sort keys %saw; - print "$prog: debug: all statuscodes: @error_strings\n" if ($debug); - print "$prog: debug: uniq statuscodes: @error_strings_uniq\n" if ($debug); - # convert strings, keep numbers as they are, add together - print "=== These errors occured: "; - open SUMMARY, ">$summaryout"; - for (@error_strings_uniq){ - my $code; - if (/^\d+$/){ - # it's already a number - $code = $_; - } else { - # translate string - $code = $ERROR{$_}; - } - $exitcode += $code; - if ($code != 0){ # print all except ok. - print "$_ ($code) "; - print SUMMARY "$_ ($code)\n"; - } - } - print "\n"; - my $maskedcode = $exitcode & $exitmask; - print "$prog:process_error_codes() debug exitcode = $exitcode maskedcode = $maskedcode\n" if ($debug); - print SUMMARY " exitcode = $exitcode\n"; - print SUMMARY " maskedcode = $maskedcode\n"; - close SUMMARY; - return $exitcode; -} - -# command line arguments -sub command_line(){ - # parse command arguments and check usage - $debug = FALSE; - $verify = FALSE; - $verifyconfig = FALSE; - $configfile = 'trigtest.conf'; # default - $failkey = 'FAILURE'; - $warnkey = 'WARNING'; - $showsummary = FALSE; - @tests = (); - $run_dir = '../run'; # working directory, relative to cmt dir - $clear_dir = FALSE; - print "=== Command to repeat this test:\n $prog @ARGV\n"; - my $result = GetOptions ('help' => \$help, - 'debug!' => \$debug, - 'verify!' => \$verify, - 'verifyconfig!' => \$verifyconfig, - 'showsummary' => \$showsummary, - 'failkey=s' => \$failkey, - 'warnkey=s' => \$warnkey, - 'config=s' => \$configfile, - 'test=s' => \@tests, - 'rundir=s' => \$run_dir, - 'cleardir!' => \$clear_dir, - 'package=s' => \$testpackagefq); - if ($help || !$result) { - usage(); - prog_error_exit("usage",'SCRIPT_MISC'); - } - $verify = TRUE if ($verifyconfig); - if (defined $testpackagefq){ - print "\n$prog info: note that the --package option is deprecated and will be removed in a \nfuture release. It no longer does anything.\n"; - } -} - -# usage message -sub usage(){ - print " - Usage: $prog [options] - - Testing tool for managing Trigger software tests - - Options: - - --help show this information - --debug print debug information, for the script maintainer - --verify verify config file and show what would be done - for the tests but don't run athena (see tip below) - --verifyconfig just verify config file and stop - --showsummary print a short summary table of tests results at the end - --failkey <string> keyword to be printed to indicate to the test - framework that a test has failed, default $failkey - --failkey <string> keyword to be printed to indicate a problem, but not - seen as failure by test framework, default $warnkey - --config <file> specify config file, default trigtest.conf - tries with get_files from DATAPATH if it doesn't exist - --rundir <dir> specify directory in which to run tests, default ../run - --cleardir remove/clear rundir before running (FALSE by default) - --package <string> (deprecated, does nothing, will be removed in future release) - --test <test name|id> specify test to run, see below - - A test name or id can optionally be specified after the --test - option to run only that test. By default, all tests will be run in - the order they are defined in the config file. The verify option - will list all the available tests that are defined in the config - file. The --test option may be repeated, and tests will be run in the - order the come on the command line. - - See the sample config file for test configuration information. - - It is expected that this tool be run from the cmt or run directory - under TriggerTest, after the necessary cmt environment has been set - up. If you changed any files in TriggerTest or checked out a - version different from the release you are using, then you need to - gmake before running these tests. The --package option can be used - to change this default location to another package for reference - files and the check_log config file. - - Output from $prog will always be preceeded by its name (for error - and debug messages) or '===' for the few messages you get without - debug. All other messages come from other programs and commands it - has run. - - Tip: after running a test for the first time, run again in verify - mode and the same log files will be re-used. This is a good way to - quickly test the config file, regression tests, and for script - development. - - The exit code refers only to the last test - be sure to read the - output if you run multiple tests! - The exit code can be any combination of these values: -"; - my $errorcode; - foreach $error_name (sort { $ERROR{$a} <=> $ERROR{$b} } keys %ERROR) { - printf " %20s %4d\n", $error_name, $ERROR{$error_name}; - } -} - - -# If using a file for stdin, -# try to find it with get_files -# then check it is there -# and return with < pre-pended, -# or return empty string if failed -sub getStdinFile($){ - my ($stdinfile) = @_; - $stdinfile =~ s/^\s+$//; # kill file names that are only spaces - $stdinfile = $stdinfile; - if (length($stdinfile)>0){ - if (! -e "$stdinfile" ){ - print "$prog debug: $stdinfile does not exist, so copying it with get_files\n" if ($debug); - systemcall("get_files -data $stdinfile"); - } else { - print "$prog debug: $stdinfile already exists; not copying it\n" if ($debug); - } - if (! -e $stdinfile){ - prog_error_exit ("stdin defined as '$stdinfile' but this is not found", 'SCRIPT_MISC'); - $stdinfile = ""; - } else { - $stdinfile = "< $stdinfile"; - } - } else { - $stdinfile = ""; - } - return $stdinfile; -} - -# parse config file -sub parse_config(){ - - # if specified config file does not exist, try get_files. If still not there, fail. - print "$prog debug: config file is specified as $configfile\n" if ($debug); - if (! -r $configfile) { - print "$prog debug: $configfile does not exist, so try copying it with get_files\n" if ($debug); - systemcall("get_files -data -symlink -remove $configfile",TRUE); - if (! -r $configfile){ - prog_error_exit ("config file $configfile not found. Specify a config file with the option --config <filename>", 'SCRIPT_MISC'); - } - } - open CONFIG, "<$configfile" - or prog_error_exit ("failed opening $configfile: $!\n", 'SCRIPT_MISC'); - print "\n$prog debug: start of config file\n" if ($debug); - my $first = TRUE; - my $this_test = {}; - my $current_test_id = ''; - while (<CONFIG>){ - chomp; - # strip out comments - $endofline = index $_, '#'; - if ($endofline == -1){ - $endofline = length; - } - $line = substr($_, 0, $endofline); - # strip leading white space - $line =~ s/^\s+//; - # skip empty lines and lines with only spaces - next if (length $line == 0); - next if (/^\s+$/); - #print "$prog debug: config $. >$line<\n" if ($debug); - # test keyword - if ($line =~ /^test/){ - if ($line =~ /^test\s+(\w+)/){ - my $id = $1; - print "$prog debug: config id = >$id<\n" if ($debug); - if ($current_test_id eq $id or exists $config{$id}){ - prog_error_exit ("test id $id is not unique",'SCRIPT_MISC'); - } - # save old test config - if (! $first){ - $config{$current_test_id} = $this_test; - push @test_order, $current_test_id; - } - # new test config - $first = FALSE; - $current_test_id = $id; - $this_test = {}; - # defaults - $this_test->{'name'} = "test_$id"; - $this_test->{'disabled'} = FALSE; - $this_test->{'checklog'} = FALSE; -# $this_test->{'checklog_opts'} = "--config check_log.conf --showexcludestats"; - $this_test->{'checklog_opts'} = "--showexcludestats"; - $this_test->{'datafile'} = UNDEFINED; - $this_test->{'datafilelink'} = 'ZEBRA.P'; - $this_test->{'joboptions'} = UNDEFINED; - $this_test->{'pre_condition'} = (); - $this_test->{'pre_command'} = (); - $this_test->{'post_command'} = (); - $this_test->{'post_test'} = (); - $this_test->{'athena_env'} = 'export STAGE_SVCCLASS=atlascerngroupdisk;export STAGE_HOST=castoratlast3'; - $this_test->{'athena_args'} = UNDEFINED; - $this_test->{'athena_cmd'} = 'athena.py -b'; - $this_test->{'exitmask'} = $default_exitmask; - $this_test->{'stdinfile'} = ''; - $this_test->{'regtest'} = (); - $this_test->{'filterlog'} = ''; - $this_test->{'compresslog'} = FALSE; - $this_test->{'rootcomp'} = FALSE; - $this_test->{'rootcomp_cmd'} = ""; - $this_test->{'rootcomp_file1'} = ""; - $this_test->{'rootcomp_file2'} = ""; - $this_test->{'checkcount'} = FALSE; - $this_test->{'checkcount_file'} = ""; - $this_test->{'checkcount_tolerance'} = 1; - $this_test->{'checkcount_level'} = "BOTH"; - $this_test->{'checkmerge'} = FALSE; - $this_test->{'checkmerge_file'} = ""; - $this_test->{'checkmerge_reffile'} = ""; - $this_test->{'checkmerge_tolerance'} = 1; - $this_test->{'emdcheck'} = (); - $this_test->{'doc'} = ""; - next; - } - else { - print "$prog: Error: config line $. incorrect, test definition invalid - ignoring line\n"; - next; - } - } - if ($line =~ /^name\s+([^\s]+)/){ - $this_test->{'name'} = $1; - print "$prog debug: config test name >$1<\n" if ($debug); - next; - } - if ($line =~ /^datafile\s+([^\s]+)\s+([^\s]+)/){ - $this_test->{'datafile'} = $1; - $this_test->{'datafilelink'} = $2; - print "$prog debug: config datafile >$1< link >$2<\n" if ($debug); - next; - } - if ($line =~ /^datafile\s+([^\s]+)/){ - $this_test->{'datafile'} = $1; - print "$prog debug: config datafile >$1<\n" if ($debug); - next; - } - if ($line =~ /^joboptions\s+([^\s]+)/){ - $this_test->{'joboptions'} = $1; - print "$prog debug: config joboptions >$1<\n" if ($debug); - next; - } - if ($line =~ /^pre_condition\s+(.+)$/){ - my $pre_condition = $1; - push @{$this_test->{'pre_condition'}}, $pre_condition; - print "$prog debug: config pre_condition >$pre_condition<\n" if ($debug); - next; - } - if ($line =~ /^pre_command\s+(.+)$/){ - my $pre_command = $1; - push @{$this_test->{'pre_command'}}, $pre_command; - print "$prog debug: config pre_command >$pre_command<\n" if ($debug); - next; - } - if ($line =~ /^post_command\s+(.+)$/){ - my $post_command = $1; - push @{$this_test->{'post_command'}}, $post_command; - print "$prog debug: config post_command >$post_command<\n" if ($debug); - next; - } - if ($line =~ /^post_test\s+([^\s]+)\s+(.+)$/){ - my $post_test = {'name' => $1, 'cmd' => $2}; - push @{$this_test->{'post_test'}}, $post_test; - print "$prog debug: config post_test >$1< >$2<\n" if ($debug); - next; - } - if ($line =~ /^athena_args\s+(.+)$/){ - $this_test->{'athena_args'} = $1; - print "$prog debug: config athena_args >$1<\n" if ($debug); - next; - } - if ($line =~ /^athena_env\s+(.+)$/){ - $this_test->{'athena_env'} = $1; - print "$prog debug: config athena_env >$1<\n" if ($debug); - next; - } - if ($line =~ /^athena_cmd\s+(.+)$/){ - $this_test->{'athena_cmd'} = $1; - print "$prog debug: config athena_cmd >$1<\n" if ($debug); - next; - } - if ($line =~ /^extra_failure_codes\s+(.+)$/){ - $this_test->{'exitmask'} = $default_exitmask; - my @codes = split('\s',$1); - for (@codes) { - if (exists $ERROR{$_}) { - $this_test->{'exitmask'} |= $ERROR{$_}; - } - else { - my @tmp = keys %ERROR; - prog_error_exit ("Exit code '$_' unknown. Allowed values are: @tmp",'SCRIPT_MISC'); - } - } - print "$prog debug: config extra_failure_codes >$1<\n" if ($debug); - next; - } - if ($line =~ /^stdinfile\s+(.+)$/){ - $this_test->{'stdinfile'} = $1; - print "$prog debug: config stdinfile >$1<\n" if ($debug); - next; - } - if ($line =~ /^disable/){ - $this_test->{'disabled'} = TRUE; - print "$prog debug: config disabled >" . ( $_ ? "true" : "false") . "<\n" if ($debug); - next; - } - if ($line =~ /^checklog\s+(.+)$/){ - $this_test->{'checklog'} = TRUE; - $this_test->{'checklog_opts'} = $1; - print "$prog debug: config checklog >" . ( $_ ? "true" : "false") . "<\n" if ($debug); - print "$prog debug: config checklog_opts >$1<\n" if ($debug); - next; - } - if ($line =~ /^checklog\s*$/){ - $this_test->{'checklog'} = TRUE; - print "$prog debug: config checklog >" . ( $_ ? "true" : "false") . "<\n" if ($debug); - next; - } - if ($line =~ /^filterlog\s+(.+)$/){ - $this_test->{'filterlog'} = $1; - print "$prog debug: config filterlog >$1<\n" if ($debug); - next; - } - if ($line =~ /^compresslog/){ - $this_test->{'compresslog'} = TRUE; - print "$prog debug: config compresslog >" . ( $_ ? "true" : "false") . "<\n" if ($debug); - next; - } - if ($line =~ /^regtest\s+([^\s]+)\s+([^\s]+)\s+([^\s]+)/){ - my $regtest = { 'algoname' => $1, 'match' => $2, 'reffile' => $3}; - push @{$this_test->{'regtest'}}, $regtest; - print "$prog debug: config regtest >$1< >$2< >$3<\n" if ($debug); - next; - } - if ($line =~ /^edmcheck\s+([^\s]+)\s+([^\s]+)\s+([^\s]+)/){ - my $edmcheck = { 'algoname' => $1, 'edmfile' => $2, 'edmreffile' => $3}; - push @{$this_test->{'edmcheck'}}, $edmcheck; - print "$prog debug: config edmcheck >$1< >$2< >$3<\n" if ($debug); - next; - } - if ($line =~ /^fullregtest\s+([^\s]+)\s+([^\s]+)/){ - my $regtest = { 'algoname' => $fullregtest, 'match' => $1, 'reffile' => $2}; - push @{$this_test->{'regtest'}}, $regtest; - print "$prog debug: config fullregtest >$1< >$2<\n" if ($debug); - next; - } - if ($line =~ /^customregtest\s+(.+)$/){ - my $regtest = { 'algoname' => $customregtest, 'match' => $1, 'reffile' => ''}; - push @{$this_test->{'regtest'}}, $regtest; - print "$prog debug: config customregtest >$1<\n" if ($debug); - next; - } - #check merge - if ($line =~ /^checkmerge\s+([^\s]+)\s+([^\s]+)\s+([^\s]+)/){ - $this_test->{'checkmerge'} = TRUE; - $this_test->{'checkmerge_file'} = $1; - $this_test->{'checkmerge_reffile'}= $2; - $this_test->{'checkmerge_tolerance'}= $3; - print "$prog debug: config checkmerge >" . ( $_ ? "true" : "false") . "<\n" if ($debug); - print "$prog debug: config checkmerge_file >$1<\n" if ($debug); - print "$prog debug: config checkmerge_reffile >$2<\n" if ($debug); - print "$prog debug: config checkmerge_tolerance >$3<\n" if ($debug); - next; - } - # check for 3rd argument (L2, EF or BOTH) - if ($line =~ /^checkcount\s+([^\s]+)\s+([^\s]+)\s+([^\s]+)/){ - $this_test->{'checkcount'} = TRUE; - $this_test->{'checkcount_file'} = $1; - $this_test->{'checkcount_tolerance'}=$2; - $this_test->{'checkcount_level'}=$3; - print "$prog debug: config checkcount >" . ( $_ ? "true" : "false") . "<\n" if ($debug); - print "$prog debug: config checkcount_file >$1<\n" if ($debug); - print "$prog debug: config checkcount_tolerance >$2<\n" if ($debug); - print "$prog debug: config checkcount_level >$3<\n" if ($debug); - next; - } - # only 2 arguments, assume BOTH - if ($line =~ /^checkcount\s+([^\s]+)\s+([^\s]+)/){ - $this_test->{'checkcount'} = TRUE; - $this_test->{'checkcount_file'} = $1; - $this_test->{'checkcount_tolerance'}=$2; - print "$prog debug: config checkcount >" . ( $_ ? "true" : "false") . "<\n" if ($debug); - print "$prog debug: config checkcount_file >$1<\n" if ($debug); - print "$prog debug: config checkcount_tolerance >$2<\n" if ($debug); - next; - } - # optional 2nd argument - if ($line =~ /^rootcomp\s+([^\s]+)\s*([^\s]*)$/){ - $this_test->{'rootcomp'} = TRUE; - $this_test->{'rootcomp_cmd'} = $rootcomp_cmd; - if ($2 eq "") { - $this_test->{'rootcomp_file1'} = "expert-monitoring.root"; - $this_test->{'rootcomp_file2'} = $1; - } - else { - $this_test->{'rootcomp_file1'} = $1; - $this_test->{'rootcomp_file2'} = $2; - } - print "$prog debug: config rootcomp >" . ( $_ ? "true" : "false") . "<\n" if ($debug); - print "$prog debug: config rootcomp_file1 >$this_test->{'rootcomp_file1'}<\n" if ($debug); - print "$prog debug: config rootcomp_file2 >$this_test->{'rootcomp_file2'}<\n" if ($debug); - next; - } - # old style - if ($line =~ /^customrootcomp\s+([^\s]+)\s+([^\s]+)$/){ - $this_test->{'rootcomp'} = TRUE; - $this_test->{'rootcomp_cmd'} = $1; - $this_test->{'rootcomp_file2'} = $2; - print "$prog debug: config custom rootcomp >" . ( $_ ? "true" : "false") . "<\n" if ($debug); - print "$prog debug: config custom rootcomp_cmd >$1<\n" if ($debug); - print "$prog debug: config custom rootcomp_file2 >$2<\n" if ($debug); - next; - } - # optional 3rd argument - if ($line =~ /^customrootcomp\s+([^\s]+)\s+([^\s]+)\s+([^\s]+)$/){ - $this_test->{'rootcomp'} = TRUE; - $this_test->{'rootcomp_cmd'} = $1; - $this_test->{'rootcomp_file1'} = $2; - $this_test->{'rootcomp_file2'} = $3; - print "$prog debug: config custom rootcomp >" . ( $_ ? "true" : "false") . "<\n" if ($debug); - print "$prog debug: config custom rootcomp_cmd >$1<\n" if ($debug); - print "$prog debug: config custom rootcomp_file1 >$2<\n" if ($debug); - print "$prog debug: config custom rootcomp_file2 >$3<\n" if ($debug); - next; - } - if ($line =~ /^doc\s+(.+)$/){ - $this_test->{'doc'} = $1; - print "$prog debug: config doc >$1<\n" if ($debug); - next; - } - else { - print "$prog: Warning: config line $. not recognised, ignoring it: $line\n"; - next; - } - } - close CONFIG; - print "$prog debug: end of config file\n\n" if ($debug); - # save last test config - if (! $first){ - $config{$current_test_id} = $this_test; - push @test_order, $current_test_id; - } - -} - -# display details of the configured tests -sub print_config(){ - print "=== Test Configuration\n"; - foreach (keys %config){ - print "test: $_\n"; - print " name '" . $config{$_}->{'name'} . "' \n"; - print " doc '" . $config{$_}->{'doc'} . "'\n"; - print " disabled '" . ( $config{$_}->{'disabled'} ? "true" : "false") . "'\n"; - print " checklog '" . ( $config{$_}->{'checklog'} ? "true" : "false") . "'\n"; - print " checklog_opts '" . $config{$_}->{'checklog_opts'} . "'\n"; - print " filterlog '" . $config{$_}->{'filterlog'} . "'\n"; - print " compresslog '" . ( $config{$_}->{'compresslog'} ? "true" : "false") . "'\n"; - print " rootcomp '" . ( $config{$_}->{'rootcomp'} ? "true" : "false") . "'\n"; - print " rootcomp_cmd '" . $config{$_}->{'rootcomp_cmd'} . "'\n"; - print " rootcomp_file1 '" . $config{$_}->{'rootcomp_file1'} . "'\n"; - print " rootcomp_file2 '" . $config{$_}->{'rootcomp_file2'} . "'\n"; - print " checkcount '" . ( $config{$_}->{'checkcount'} ? "true" : "false") . "'\n"; - print " checkcount_file '" . $config{$_}->{'checkcount_file'} . "'\n"; - print " checkcount_tolerance '" . $config{$_}->{'checkcount_tolerance'} . "'\n"; - print " checkcount_level '" . $config{$_}->{'checkcount_level'} . "'\n"; - print " checkmerge '" . ( $config{$_}->{'checkcount'} ? "true" : "false") . "'\n"; - print " checkmerge_file '" . $config{$_}->{'checkcount_file'} . "'\n"; - print " checkmerge_tolerance '" . $config{$_}->{'checkcount_tolerance'} . "'\n"; - print " checkmerge_reffile '" . $config{$_}->{'checkcount_file'} . "'\n"; - print " datafile '" . $config{$_}->{'datafile'} . "'\n"; - print " datafilelink '" . $config{$_}->{'datafilelink'} . "'\n"; - print " joboptions '" . $config{$_}->{'joboptions'} . "'\n"; - for (@{$config{$_}->{'pre_condition'}}){ - print " pre_condition $_'\n"; - } - for (@{$config{$_}->{'pre_command'}}){ - print " pre_command $_'\n"; - } - for (@{$config{$_}->{'post_command'}}){ - print " post_command $_'\n"; - } - for (@{$config{$_}->{'post_test'}}){ - print " post_test $_'\n"; - } - print " athena_env'" . $config{$_}->{'athena_env'} . "'\n"; - print " athena_cmd '" . $config{$_}->{'athena_cmd'} . "'\n"; - print " athena_args '" . $config{$_}->{'athena_args'} . "'\n"; - printf " exitmask %#.8b \n", $config{$_}->{'exitmask'}; - print " stdinfile '" . $config{$_}->{'stdinfile'} . "'\n"; - if ($#{$config{$_}->{'regtest'}} == -1){ - print " (no regtests defined)\n"; - } - for (@{$config{$_}->{'regtest'}}){ - print " regtest: algorithm name '" . $_->{'algoname'} . "'\n"; - print " match message pattern '" . $_->{'match'} . "'\n"; - print " reference file '" . $_->{'reffile'} . "'\n"; - } - if ($#{$config{$_}->{'edmcheck'}} == -1){ - print " (no edmtests defined)\n"; - } - for (@{$config{$_}->{'edmcheck'}}){ - print " edmcheck: algorithm name '" . $_->{'algoname'} . "'\n"; - print " edmfile '" . $_->{'edmfile'} . "'\n"; - print " reference file '" . $_->{'edmreffile'} . "'\n"; - } - } -} - -# check that tests specified on command line exist -# replace names by ids -sub check_tests(){ - - # build map of tests by name - my $test_id_byname = {}; - foreach (keys %config){ - my $name = $config{$_}->{'name'}; - if (exists $test_id_byname{$name}){ - print "$prog: error: test name $name is not unique\n"; - } else { - $test_id_byname{$name} = $_; - } - } - - # check that tests specified on command line exist - # replace names by ids - for ( my $i=0; $i<=$#tests; $i++ ){ - if ( exists $config{$tests[$i]} ){ - next; - } elsif ( exists $test_id_byname{$tests[$i]} ) { - $tests[$i] = $test_id_byname{$tests[$i]}; - next; - } else { - prog_error_exit ("test name/id $tests[$i] is not defined in the config file", 'SCRIPT_MISC'); - } - } - - # if no tests are specified, do them all in the order they were read in. - if ($#tests == -1){ - @tests = @test_order; - } -} - - -# loop over tests, skip those that are disabled -sub do_tests(){ - my $first = TRUE; - for (@tests){ - my $id = $_; - @statuscodes = ( 'OK' ); # reset for status code of latest test - $exitmask = $config{$id}->{'exitmask'}; # exitmask of latest test - #print "-------------------------------------------------------\n"; - print "=== Test $id: " . $config{$id}->{'name'}; - if ($config{$id}->{'disabled'}) { - print " is disabled\n"; - } else { - print "\n"; - if ($first){ - first_test_prep(); - $first = FALSE; - } - run_test($id); - if ($#statuscodes>0){ - $failures++; - } - $statuscode = process_error_codes(@statuscodes); - $testresults{$id}=$statuscode; - } - print "--------------------------------------------------------------------------------\n"; - } -} - -# Timer subroutine -# given an initial time t0 in seconds since the epoch (i.e. as given by perl time function), calculates and prints the total elapsed (aka wallclock) time, user time and system time. Do not expect these to add up, e.g. if the system is busy with other users or you have to wait for castor. -# NB if called multiple times, the last call will overwrite previous output files. -sub timer($){ - my ($t0) = @_; - my $t1=time(); - my ($tuser,$tsystem,$tcuser,$tcsystem) = times; - printf( "=== Timer: total elapsed %d s, total user %6.2f s, total system %6.2f s\n", - $t1-$t0, $tuser+$tcuser, $tsystem+$tcsystem); - open TIMER, ">$timerout"; - printf TIMER "%d %f %f\n",$t1-$t0, $tuser+$tcuser, $tsystem+$tcsystem; - close TIMER; - -} - -sub results_summary(){ - return if (!$showsummary); - print "=== Test results summary\n"; - printf " %3s %-20s %-10s\n", "Id", "Test Name", "Result"; - for (@tests){ - my $id = $_; - printf " %3s %-20s ", $id, $config{$id}->{'name'}; - if ($config{$id}->{'disabled'}){ - print "(disabled)\n"; - next; - } - if ($testresults{$id} == 0){ - print "passed"; - } else { - print "failed ($testresults{$id})"; - } - print "\n"; - } -} - -# preparations before first test is run -sub first_test_prep { - - # create run dir if it doesn't already exist - if ( $clear_dir ) { - system "rm -fr $run_dir"; - } - if ( ! -d $run_dir ){ - mkpath $run_dir - #or die "$prog: error: failed mkpath $run_dir: $!\n"; - } - chdir $run_dir or prog_error_exit( "failed chdir $run_dir: $!\n", 'SCRIPT_MISC'); - - # get log file from env - my $ajl = $ENV{'ATN_JOB_LOGFILE'}; - if (defined($ajl)){ - system "echo $ajl > atn_job_logfile_name"; - } - - # run script to get relevant file - my $id = $_; - my $jobopts = $config{$id}->{'joboptions'}; - print "$prog debug: job options:$jobopts\n" if ($debug); -} - -# run a test -sub run_test($){ - my ($id) = @_; - my $name = $config{$id}->{'name'}; - - # prepare file names - my $jobopts = $config{$id}->{'joboptions'}; - my $logfile = "atn_test.log"; - my $logfiletail = "atn_tail.log"; - my $local_jobopts = ""; - print "$prog debug: job options:$jobopts\n" if ($debug); - systemcall("echo \"$config{$id}->{'doc'}\" > $docout"); - if ( $jobopts ne 'None' and $jobopts ne UNDEFINED ){ - my @suffixlist = ( '.py', '.txt' ); - my ($filename,$path,$suffix) = fileparse($jobopts,@suffixlist); - $local_jobopts = $filename . "_test" . $suffix; - $logfile = "$filename" . "_test.log"; - $logfiletail = "$filename" . "_tail.log"; - print "$prog debug: $jobopts $local_jobopts $logfile\n" if ($debug); - - # get copy of joboptions file to customise for this job, - # if it's not already there - # allow for the case of no jobotions (AthanMT) - if (! -e "$filename$suffix" ){ - print "$prog debug: $filename$suffix does not exist, so copying it with get_files\n" if ($debug); - systemcall("get_files -jo $jobopts"); - } - if (-e "$filename$suffix"){ # check: will not be there in verify mode - copy "$filename$suffix", "$local_jobopts" - or prog_error_exit( "failed copying $filename$suffix to $local_jobopts: $!\n", 'SCRIPT_MISC'); - } - # check permissions on local joboptions file before trying to append to it - if (! -w $local_jobopts){ - chmod 0644, $local_jobopts - or prog_error_exit( "failed to set write permission for $local_jobopts: $!\n", 'SCRIPT_MISC'); - } - - - # append joboptions to set algorithm output level to 2, - # for algorithms to be regression tested. - open JOBOPTS, ">> $local_jobopts" - or prog_error_exit ("failed opening $local_jobopts: $!\n", 'SCRIPT_MISC'); - print JOBOPTS "\n"; -# for (@{$config{$id}->{'regtest'}}){ -# my $algoname = $_->{'algoname'}; - # require some alphanumeric chars for a valid algoname -# if ($algoname =~ /\w/){ -# print "$prog debug: appending to joboptions file: $algoname.Outputlevel = 2\n" if ($debug); -# print JOBOPTS "Algorithm(\"$algoname\").Outputlevel = DEBUG\n"; -# print JOBOPTS "MessageSvc.debugLimit = 2000\n"; -# print JOBOPTS "MessageSvc.defaultLimit = 2000\n"; -# } else { -# print "$prog warning: not setting output level for algorithm \"$algoname\" since it doesn't look like a valid name (no alphanumeric chars)\n"; -# } -# } - close JOBOPTS; - } - # run any pre-condition - they must all succeeed or else the job won't run - my $pre_condition; - my $precondrc=TRUE; - for $pre_condition (@{$config{$id}->{'pre_condition'}}){ - my $precondrc1=systemcall("$pre_condition"); - print "$prog debug: pre_condition \"$pre_condition\" returned $precondrc1\n" if ($debug); - if ($precondrc1!=0){ - print "$prog info: pre_condition \"$pre_condition\" failed (exit code $precondrc1)\n"; - $precondrc=FALSE; - } - } - if ($precondrc){ - print "$prog debug: pre-conditions met\n" if ($debug); - } else { - print "$prog info: pre-conditions failed so test cannot be run. This is not a test failure.\n"; - push @statuscodes, 'PRECONDITION_FAILED_SO_NOT_RUN'; - return; - } - - # run any pre-command - my $pre_command; - for $pre_command (@{$config{$id}->{'pre_command'}}){ - systemcall("$pre_command"); - } - - # link data file if specified - my $datafile = $config{$id}->{'datafile'}; - my $datafilelink = $config{$id}->{'datafilelink'}; - if ($datafile ne UNDEFINED){ - # expand environment variables in datafile - while ($datafile =~ /\$\{(.+)\}/){ - my $var = $1; - if (exists $ENV{$var}){ - my $sub=$ENV{$var}; - $datafile =~ s/\$\{$var\}/$sub/; - print "$prog debug: expanding env var '$var' in datafile yields: $datafile\n" if ($debug); - } else { - print "$prog: Warning: env var '$var' used in datafile definition is undefined, replacing with blank\n"; - $datafile =~ s/\$\{$1\}//; - } - } - - print "$prog debug: linking data file to $datafilelink: $datafile\n" - if ($debug); - if (-e $datafilelink or -l $datafilelink){ - print "$prog debug: first removing $datafilelink\n" if ($debug); - unlink $datafilelink - or die "$prog: error: failed to delete $datafilelink: $!\n"; - } - symlink $datafile, $datafilelink - or die "$prog: error: failed to symlink $datafilelink: $!\n"; - } - - # run athena - my $athena_env = $config{$id}->{'athena_env'}; - my $athena_cmd = $config{$id}->{'athena_cmd'}; - my $athena_args = $config{$id}->{'athena_args'}; - my $filter_cmd = $config{$id}->{'filterlog'}; - $filter_cmd = " 2>&1 | " . $filter_cmd if (length($filter_cmd)>0); - $athena_args = "" if ($athena_args eq UNDEFINED); - my $stdinfile = getStdinFile($config{$id}->{'stdinfile'}); - print "=== Athena env '$athena_env' \n"; - print "=== Running '$athena_cmd $athena_args $local_jobopts $stdinfile $filter_cmd'\n"; - # the stderr redirection needs to be exactly at this place - my $athenarc = systemcall("$athena_env ; $athena_cmd $athena_args $local_jobopts $stdinfile $filter_cmd > $logfile 2>&1"); - - # the way to recognise a timeout - $timeout = FALSE; - if (! open LOG, "tail -600 $logfile|"){ - print "$prog: error: failed opening $logfile to read: $!\n"; - print "-> $failkey Aborting this test\n"; - # will happen later: return; # go on to next test - } - while (<LOG>){ - if (/CRITICAL stopped by user interrupt/ or - /ERROR Keyboard interruption caught/ or - /^Signal handler: Killing [0-9]+ with 15/){ - $timeout = TRUE; - last; - } - - } - close LOG; - - print "$prog: debug: timeout=$timeout " . ($timeout?"true":"false") . " athenarc=$athenarc \n" if ($debug); - - # check athena return code - #print "-------------------------------------------------------\n"; - if ($athenarc == 0 and not $timeout){ - print "=== $name OK: Athena exited normally\n"; - } elsif ($timeout){ - # or $athenarc == 35584 -> sometimes this exit code is just a seg fault - print "=== $name $warnkey: Athena exceeded time limit and was killed\n"; - push @statuscodes, 'ATN_TIME_LIMIT'; - } else { - print "=== $name $failkey : Athena exited abnormally! Exit code: $athenarc\n"; - push @statuscodes, 'ATHENA_BAD_EXIT'; - } - - - # run any post-commands - unlink "$postcmdout" if (-f "$postcmdout"); -# if - if (defined $config{$id}->{'post_command'} - and @{$config{$id}->{'post_command'}}>0) { - my $post_command; - @postrc=(); - - for $post_command (@{$config{$id}->{'post_command'}}){ - # All post command share the same log file - push @postrc, systemcall("($post_command) >> $postcmdout 2>&1"); - } - systemcall("cat $postcmdout"); - print "$prog debug: post_command #commands: ".@postrc." return codes: @postrc \n" if ($debug); - } - - my %reldata = release_metadata(); - my $nightly = (exists $reldata{'nightly name'} ? $reldata{'nightly name'} : "UNKNOWN"); - $nightly = $nightly . "/latest"; - print "$prog: looking for histograms and references for nightly $nightly \n"; - - # run any post-tests - unlink "$posttestrc" if (-f "$posttestrc"); - if ( defined(@{$config{$id}->{'post_test'}}) ) { - my $post_test; - my $total_rc = 0; - @postrc=(); - open (POSTTEST, '>', $posttestrc); - for $post_test (@{$config{$id}->{'post_test'}}){ - # Each post test has its own log file - my $post_test_log = "post_test_$post_test->{'name'}.log"; - # Replace '$logfile' with the actual file name - my $post_test_cmd = $post_test->{'cmd'}; - $post_test_cmd =~ s/\$logfile/$logfile/; - # If there is a comparison to a reference file, make sure that the correct path is used - $post_test_cmd =~ s/latest/$nightly/g; - my $rc = systemcall("($post_test_cmd) > $post_test_log 2>&1"); - $total_rc += $rc; - # Save return codes in separate text file - print POSTTEST "$post_test->{'name'} $rc\n"; - } - close POSTTEST; - if ($total_rc>0) { - push @statuscodes, 'POST_TEST_BAD_EXIT'; - } - } - - my $pwd = `pwd`; - chomp $pwd; - # make a URL by substituting the lxbuild local disk path for the web - # server URL if it does not match the lxbuild local disk path then it - # will be left as a file path instead. - # NB gives wrong address for incremental nightlies because the build is always done in atlrel_0 then copied to altrel_1-5 as appropriate - my $logfileURL = $logfile; - $logfileURL =~ s%/pool/build/atnight/localbuilds/nightlies%http://atlas-computing.web.cern.ch/atlas-computing/links/buildDirectory/nightlies%; - print "=== Log file: " . $pwd . "/$logfileURL\nNB replace rel_0 with actual nightly in this URL.\n"; - if (! -e $logfile or -z $logfile){ - print "=== Error: log file does not exist or is empty, skipping the rest of this test\n"; - return; - } - # get data file LFN/PFN from log file + pool file catalogue - if (! open LOG, "<$logfile"){ - print "$prog: error: failed opening $logfile to read: $!\n"; - print "-> $warnkey Aborting this test\n"; - return; # go on to next test - } - my $dataLFN="unknown"; - my $dataPFN=""; - my $eventCounter=0; - while (my $line = <LOG>){ - if ($line =~ /InputCollections\s+\= \['(.*)'\]/){ # athena - $dataLFN=$1; - } - elsif ($line =~ /event stream from file list\s+\['(.*)'\]/){ # athenaHLT - $dataLFN=$1; - } - # count events for athena job - ++$eventCounter if ($line =~ /AthenaEventLoopMgr\s+INFO\s+===>>> done processing event/); - # handle athenaHLT case - if ($line =~ /Py:athenaHLT\s+INFO\s+Processed ([0-9]+) events/){ - $eventCounter=$1; - } - } - close LOG; - - print "$prog debug: dataLFN=$dataLFN\n" if ($debug); - if ($dataLFN ne "unknown"){ - my $dataLFNstripped = $dataLFN; - $dataLFNstripped =~ s/^LFN\://; - my $cmdout1 = qx(FClistPFN -u xmlcatalog_file:PoolFileCatalog.xml -l $dataLFNstripped); - chomp $cmdout1; - if (length($cmdout1)>0){ - $dataPFN = $cmdout1; - } - print "$prog debug: dataLFNstripped=$dataLFNstripped dataPFN=$dataPFN\n" if ($debug); - print "$prog debug: cmdout1=$cmdout1\n" if ($debug); - } - print "=== Data file: $dataLFN $dataPFN\n"; - - # write how many events processed - print "=== Events processed: $eventCounter\n"; - - # check log file for likely errors and known false positives - if ($config{$id}->{'checklog'}){ - my $checklog_opts = $config{$id}->{'checklog_opts'}; - # ERRORs - my $logrc = systemcall("check_log.pl $checklog_opts $logfile > $checklogout 2>&1"); - systemcall("cat $checklogout"); - if ($logrc != 0){ - print "=== $name $failkey : problem detected in log file\n"; - push @statuscodes, 'ATHENA_ERROR_IN_LOG'; - } - # WARNINGs - $rc = systemcall("check_log.pl $checklog_opts --noerrors --warnings $logfile > $warnout 2>&1"); - # Ignore rc. - } - - #make short file with last 600 lines only - systemcall("tail -600 $logfile > $logfiletail"); - - - # rootcomp - if ($config{$id}->{'rootcomp'}){ - my $rootcomp_file1 = $config{$id}->{'rootcomp_file1'}; - my $rootcomp_file2 = $config{$id}->{'rootcomp_file2'}; - if( $nightly ne "" ) { - # allow for custom tests with two files - $rootcomp_file2 =~ s/latest/$nightly/g ; - } - $rootcomp_file1 = resolveSymlinks($rootcomp_file1); - $rootcomp_file2 = resolveSymlinks($rootcomp_file2); - - if (-e $rootcomp_file1) { - if (-e $rootcomp_file2) { - my $rc=systemcall("$config{$id}->{'rootcomp_cmd'} $rootcomp_file1 $rootcomp_file2 > $rootcompout 2>&1", TRUE); - if ($rc != 0){ - print "=== $name WARNING: monitoring histogram mismatch detected by rootcomp\n"; - push @statuscodes, 'ROOTCOMP_MISMATCH'; - } else { - print "=== $name: rootcomp: monitoring histograms match. \n"; - } - } - else { - print "=== Alert: $rootcomp_file2 does not exist \n"; - } - } - else { - print "=== Alert: $rootcomp_file1 does not exist \n"; - } - #systemcall("cat $rootcompout"); - if (-e $rootcompout) { - systemcall("grep -A 5 '^Summary' $rootcompout"); - } - } - - # checkcount - if ($config{$id}->{'checkcount'}){ - my $checkcount_file = $config{$id}->{'checkcount_file'}; - my $checkcount_tolerance = $config{$id}->{'checkcount_tolerance'}; - my $checkcount_level = $config{$id}->{'checkcount_level'}; - if( $nightly ne "" ) { - $checkcount_file =~ s/latest/$nightly/ ; - } - $checkcount_file = resolveSymlinks($checkcount_file); - print "$prog: checking trigger and TE counts \n"; - print "=== Running $checkcount_cmd $checkcount_tolerance $checkcount_file $checkcount_level > $checkcountout 2>&1 \n"; - my $rc=systemcall("$checkcount_cmd $checkcount_tolerance $checkcount_file $checkcount_level > $checkcountout 2>&1", TRUE); - if ($rc != 0){ - print "=== $name WARNING: trigger count mismatch detected by checkcount\nSee $checkcountout for details.\n"; - push @statuscodes, 'CHECKCOUNTS_FAILED'; - } else { - print "=== $name: countcheck: trigger counts match. \n"; - } - #systemcall("cat $rootcompout"); - #Grep for FAILURE here so that bad runs will be flagged as such - systemcall("grep 'FAILURE' $checkcountout"); - systemcall("grep 'test warning' $checkcountout"); - systemcall("grep 'tolerance' $checkcountout"); - } - - # checkmerge - if ($config{$id}->{'checkmerge'}){ - my $checkmerge_file = $config{$id}->{'checkmerge_file'}; - my $checkmerge_tolerance = $config{$id}->{'checkmerge_tolerance'}; - my $checkmerge_reffile = $config{$id}->{'checkmerge_reffile'}; - if( $nightly ne "" ) { - $checkmerge_file =~ s/latest/$nightly/ ; - } - $checkmerge_file = resolveSymlinks($checkmerge_file); - print "$prog: checking trigger histograms for merged system \n"; - print "=== Running $checkmerge_cmd $checkmerge_file $checkmerge_reffile $checkmerge_tolerance > $checkmergeout 2>&1 \n"; - my $rc=systemcall("$checkmerge_cmd $checkmerge_file $checkmerge_reffile $checkmerge_tolerance > $checkmergeout 2>&1", TRUE); - - if ($rc != 0){ - print "=== $name WARNING: Errors detected by checkmerge\nSee $checkmergeout for details.\n"; - push @statuscodes, 'POST_TEST_BAD_EXIT'; - } else { - print "=== $name: mergecheck: the test passed successfully. \n"; - } - systemcall("grep 'ERROR' $checkmergeout"); - systemcall("grep 'WARNING' $checkmergeout"); - } - - # EDM tests - my $emdcheckresult=TRUE; - EDMCHECK: - for (@{$config{$id}->{'edmcheck'}}){ - # truncate algorithm name for 30 characters - my $algoname = $_->{'algoname'}; - my $truncalgoname = substr($algoname, 0, 30); - my $edmfile = $_->{'edmfile'}; - my $edmreffile = $_->{'edmreffile'}; - # if file exist for this sepecfic nightly use it, otherwise - # use default - if( $nightly ne "" ) { - $newedmreffile = $edmreffile; - # substitute e.g. devval/latest for latest - $newedmreffile =~ s/latest/$nightly/ ; - # check if the reference file for this nightly exists - if ( -e $edmreffile ) { - $edmreffile = $newedmreffile; - print "New reference file name $edmreffile \n"; - } - } - $edmreffile = resolveSymlinks($edmreffile); - my $rc=systemcall("$truncalgoname -f $edmfile -r $edmreffile >>$edmcheckout 2>&1", TRUE); - if ($rc != 0){ - print "=== $name WARNING: trigger edmcheck mismatch detected by $truncalgoname\nSee $edmcheckout for details.\n"; - print "=== $name if differences are understood cp $edmfile $edmreffile \n"; - } else { - print "=== $name: edmcheck: files matched \n"; - } - } - - # regression tests - my $regtestresult=TRUE; - REGTEST: - for (@{$config{$id}->{'regtest'}}){ - # truncate algorithm name for 15 characters - my $algoname = $_->{'algoname'}; - my $truncalgoname = substr($algoname, 0, 30); - my $match = $_->{'match'}; - my $reffile = $_->{'reffile'}; - my $newfile = $reffile . ".new"; - # reference file caser - if( substr($newfile, 0, 5) eq "/tmp/" ){ - # ref file is in /tmp, eg. from another tst (due to tmp filling up, avoid this) - $newfile = substr($newfile, 5); - } elsif ( substr($newfile,0,3) eq "../"){ - # reference is to another test -- other test must be first in test/xxx_TestConfigruation.xml - my $lslash = rindex $newfile, '/'; - $newfile = substr($newfile, $lslash+1 ); - # in this case ref-file for an existing test will end in .new - $reffile = $reffile . ".new"; - } elsif ( substr($newfile, 0, 5) eq "/afs/" ){ - # should be usual case: ref file is in afs - my $lslash = rindex $newfile, '/'; - $newfile = substr($newfile, $lslash+1 ); - if( $nightly ne "" ) { - $newreffile = $reffile; - # substitute e.g. devval/latest for latest - $newreffile =~ s/latest/$nightly/ ; - # check if the reference file for this nightly exists - if ( -e $newreffile ) { - $reffile = $newreffile; - print "New reference file name $reffile \n"; - } - } - } - print "$prog debug: truncated algoname $truncalgoname\n" if ($debug); - # extract regression test lines for this algorithm from log file - open NEW, ">$newfile" - or die "$prog: error: failed opening $newfile to write: $!\n"; - if (! open LOG, "<$logfile"){ - print "$prog: error: failed opening $logfile to read: $!\n"; - print "-> $warnkey Aborting this test\n"; - return FALSE; # go on to next test - } - my $lines=0; - if ($algoname eq $fullregtest){ - while (<LOG>){ - if (/$match/){ - print NEW; - $lines++; - } - } - print "$prog debug: fullregtest $lines lines matched $match in LOG\n" if ($debug); - } elsif ($algoname eq $customregtest){ - $rc = systemcall("$match >> $regtestout", TRUE); - $regtestresult = ( $rc==0 ? TRUE : FALSE ); - next REGTEST; - } - else { - while (<LOG>){ - if (/$truncalgoname.*$match/){ - print NEW; - $lines++; - } - } - print "$prog debug: regtest $lines lines matched $truncalgoname $match in LOG\n" if ($debug); - } - - close LOG; - close NEW; - # check whether any lines matched - if zero it's an error straight away - # and no point in doing the diff - if ($lines == 0){ - # print failure keyword here to flag it as an error - print "=== Alert! $warnkey no lines matching $match were found for $truncalgoname in log file\n"; - $regtestresult = FALSE; - next REGTEST; - } - # diff the output and the reference - # even if verify is off - my $rc = 0; - $reffile = resolveSymlinks($reffile); - print "old/reference file $reffile\n"; - print "new/test file $newfile\n"; - print "< old/reference\n> new/test\n"; - print substr($reffile, 0, 4); -# identify location of ref file - if( substr($reffile, 0, 4) eq "/tmp" ){ - print "=== This test looks for reference in /tmp directory\n"; - } elsif( substr($reffile, 0, 3) eq "../" ){ - print "=== This test looks for reference in another directory\n"; - } elsif (substr($reffile, 0, 1) eq "/" ){ - print "=== This test looks for reference in /afs or /localhome directory\n"; - } else { - print "=== This test looks for reference from svn\n"; - } - if (-e $reffile) { - # print "old/reference file exists!\n"; - systemcall("echo -e 'total lines in old/reference:' `wc -l $reffile` >>$regtestout",TRUE); - systemcall("echo -e 'total lines in new/test :' `wc -l $newfile` >>$regtestout",TRUE); - systemcall("echo -e '< old/reference\n> new/test' >> $regtestout", TRUE); - $rc = systemcall("diff $reffile $newfile", TRUE); - $rc = systemcall("diff $reffile $newfile >> $regtestout", TRUE); - - # Do HTML diff if differences are small enough - $difflines = `wc -l $regtestout | cut -d' ' -f1`; - if ($difflines < 1000) { - systemcall("htmldiff.py -w 80 $reffile $newfile > $htmldiffout 2>&1", TRUE); - } - if ($rc == 0){ - print "=== Output is the same as reference for $algoname\n"; - } else { - # print failure keyword here to flag it as an error - print "=== Alert! $warnkey Output differs from reference for $algoname\n"; - print " If this change is understood, please update the reference file"; - if(substr($reffile, 0, 4) eq "/afs" ){ - print "by typing:\n cp $newfile $reffile\n"; - } else { - print ".\n"; - } - $regtestresult = FALSE; - next REGTEST; - } - } - else { - print "=== Alert! old/reference file: $reffile does not exist - check if this is a new release!\n"; - } - } - if (!$regtestresult){ - push @statuscodes, 'ATHENA_REGTEST_FAILED'; - } - - # compress log file - if ($config{$id}->{'compresslog'}){ - systemcall("gzip -9 $logfile"); - } - -# print "$prog debug: returning result $result (" -# . ($result ? "true" : "false") . ")\n" if ($debug); - return; -} - - -# wrap system calls to provide for verify and debug modes. -# second, optional argument overrides verify mode if TRUE -sub systemcall($;$){ - my $override_verify = FALSE; - my $command; - ($command, $override_verify) = @_; - - my $rc = 0; - if ($verify or $debug){ - print "$prog: command: $command\n"; - } - if (!$verify or $override_verify){ - $rc = system ($command); - } - $rc = ($rc >> 8); # see http://perldoc.perl.org/functions/system.html - if ($debug){ - print "$prog: return code " . $rc . "\n"; - } - return $rc; -} - -# Resolve all symlinks in given path -sub resolveSymlinks() { - my ($path) = @_; - return $path if (length $path == 0); - my $respath = `readlink -f $path`; - if ($? != 0) { - return $path; # failure: return original path - } - chomp $respath; - return $respath; -} - -# Read ReleaseData file and return dictionary with content -sub release_metadata() { - my %data; - my @dir = grep(/\/$ENV{'AtlasProject'}\//, split(':',$ENV{'LD_LIBRARY_PATH'})); - open RELDATA, "$dir[0]/../ReleaseData" or print "=== Alert! Cannot open ReleaseData file\n"; - while (<RELDATA>) { - chomp; - my @kv = split(':'); - $data{$kv[0]} = $kv[1]; - } - return %data; -} diff --git a/Trigger/TrigValidation/TrigValTools/bin/trigtest_ART.pl b/Trigger/TrigValidation/TrigValTools/bin/trigtest_ART.pl deleted file mode 100755 index 4e7729dfbd45c8cb5a0ecb714be5526406a81735..0000000000000000000000000000000000000000 --- a/Trigger/TrigValidation/TrigValTools/bin/trigtest_ART.pl +++ /dev/null @@ -1,1393 +0,0 @@ -#!/usr/bin/perl -w -# Script to manage Trigger tests -# $Id: trigtest.pl,v 1.16 2009-05-20 15:53:22 sgeorge Exp $ - -use Getopt::Long; -use File::Basename; -use File::Spec; -use File::Copy; -use File::Path; -use constant TRUE => 1; -use constant FALSE => 0; -use constant UNDEFINED => "undefined"; -$prog = basename $0; -$config = {}; -$fullregtest = '<fullregtest>'; -$customregtest = '<customregtest>'; -# set some output file names -$regtestout = "regtest.log"; -$htmldiffout = "regtest.html"; -$summaryout = "summary.log"; -$timerout = "timer.log"; -$checklogout = "checklog.log"; -$warnout = "warn.log"; -$rootcompout = "rootcompout.log"; -$checkcountout = "checkcountout.log"; -$checkmergeout = "checkmergeout.log"; -$edmcheckout = "edmcheckout.log"; -$postcmdout = "postcmd.log"; -$posttestrc = "post_test.exitcodes"; -$docout = "doc.txt"; - -# define error codes - must match atn_summary.pl -%ERROR = ( - OK => 0, - SCRIPT_MISC => 1, - POST_TEST_BAD_EXIT => 2, - ROOTCOMP_MISMATCH => 4, - ATHENA_BAD_EXIT => 8, - CHECKCOUNTS_FAILED => 16, - ATHENA_ERROR_IN_LOG => 32, - ATHENA_REGTEST_FAILED => 64, - ATN_TIME_LIMIT => 128, - PRECONDITION_FAILED_SO_NOT_RUN => 256 - ); -# max bit: 128. Bash takes return codes 0-256. -# Larger numbers are taken mod 256 so effectively masked off. Can be used for internal signalling only. - -# mask off those codes above which you do not want to flag in the exit code -# i.e. so ATN does not interpret them as the test failing. -# bit positions marked 1 will be used, 0 will not be used. -# SCRIPT_MISC is on the right, ATN_TIME_LIMIT on the left -# This default mask can be modified via the 'extra_failure_codes' test directive -# only "shout" if we see/have: ATHENA_BAD_EXIT => 8 decimal 8 in bit is 0b00001000 thus -$default_exitmask = 0b00001001; - -# Exit mask of the last run test. Not nice but the easiest way to implement -# this on top of all the other ugly things in this script. -$exitmask = $default_exitmask; - -# command to use for rootcomp -$rootcomp_cmd = "rootcomp.py --pdf --noRoot"; -$checkcount_cmd = "trigtest_checkcounts.sh"; -$checkmerge_cmd = "trigtest_check_merge.sh"; -sub main(); -main(); -exit -10; -#### - -sub main(){ - # trap errors from here on - $SIG{'INT'} = 'CLEANUP_INT'; - $SIG{'TERM'} = 'CLEANUP_TERM'; - $t0=time(); # timer - $failures = 0; # count number of tests which fail - $statuscode = 0; # combination of errors from last test - command_line(); - parse_config(); - if ($verify){ - print_config(); - } - exit if ($verifyconfig); - check_tests(); - do_tests(); - results_summary(); - timer($t0); - if ($statuscode != 0){ - prog_error_exit("at end",@statuscodes); - } - exit 0; - # exit($statuscode); # status code of last test - # exit($failures); # number of tests which fail -} - -sub CLEANUP_INT { - print "\n\n$prog: Caught Interrupt (^C), probably ATN time exceeded, finish up and exit\n"; - push @statuscodes, 'ATN_TIME_LIMIT'; - timer($t0); - if ($statuscode != 0){ - prog_error_exit("at end",@statuscodes); - } - exit(1); # never reaches this line in principle -} - -sub CLEANUP_TERM { - print "\n\n$prog: Caught TERM signal, finish up and exit\n"; - push @statuscodes, 'ATN_TIME_LIMIT'; - timer($t0); - if ($statuscode != 0){ - prog_error_exit("at end",@statuscodes); - } - exit(1); # never reaches this line in principle -} - -sub prog_error_exit($$){ - my ($message,@error_strings) = @_ or die; - my $exitcode_unmasked = process_error_codes(@error_strings); - # for ATN purposes, mask less significant codes - my $exitcode = $exitcode_unmasked & $exitmask; - if ($exitcode!=0){ - printf "$prog: $failkey $message (unmasked=%#.8b exitcode=%#.8b)\n", $exitcode_unmasked, $exitcode; - } else { - printf "$prog: $warnkey $message (unmasked=%#.8b exitcode=%#.8b)\n", $exitcode_unmasked, $exitcode; - } - exit($exitcode); - -} - -sub process_error_codes(@) { - my (@error_strings) = @_; - my $exitcode=0; - # | sort | uniq - my %saw; - undef %saw; - @saw{@error_strings} = (); - my @error_strings_uniq = sort keys %saw; - print "$prog: debug: all statuscodes: @error_strings\n" if ($debug); - print "$prog: debug: uniq statuscodes: @error_strings_uniq\n" if ($debug); - # convert strings, keep numbers as they are, add together - print "=== These errors occured: "; - open SUMMARY, ">$summaryout"; - for (@error_strings_uniq){ - my $code; - if (/^\d+$/){ - # it's already a number - $code = $_; - } else { - # translate string - $code = $ERROR{$_}; - } - $exitcode += $code; - if ($code != 0){ # print all except ok. - print "$_ ($code) "; - print SUMMARY "$_ ($code)\n"; - } - } - print "\n"; - my $maskedcode = $exitcode & $exitmask; - print "$prog:process_error_codes() debug exitcode = $exitcode maskedcode = $maskedcode\n" if ($debug); - print SUMMARY " exitcode = $exitcode\n"; - print SUMMARY " maskedcode = $maskedcode\n"; - close SUMMARY; - return $exitcode; -} - -# command line arguments -sub command_line(){ - # parse command arguments and check usage - $debug = FALSE; - $verify = FALSE; - $verifyconfig = FALSE; - $configfile = 'trigtest.conf'; # default - $failkey = 'FAILURE'; - $warnkey = 'WARNING'; - $showsummary = FALSE; - @tests = (); - $run_dir = '../run'; # working directory, relative to cmt dir - $clear_dir = FALSE; - print "=== Command to repeat this test:\n $prog @ARGV\n"; - my $result = GetOptions ('help' => \$help, - 'debug!' => \$debug, - 'verify!' => \$verify, - 'verifyconfig!' => \$verifyconfig, - 'showsummary' => \$showsummary, - 'failkey=s' => \$failkey, - 'warnkey=s' => \$warnkey, - 'config=s' => \$configfile, - 'test=s' => \@tests, - 'rundir=s' => \$run_dir, - 'cleardir!' => \$clear_dir, - 'package=s' => \$testpackagefq); - if ($help || !$result) { - usage(); - prog_error_exit("usage",'SCRIPT_MISC'); - } - $verify = TRUE if ($verifyconfig); - if (defined $testpackagefq){ - print "\n$prog info: note that the --package option is deprecated and will be removed in a \nfuture release. It no longer does anything.\n"; - } -} - -# usage message -sub usage(){ - print " - Usage: $prog [options] - - Testing tool for managing Trigger software tests - - Options: - - --help show this information - --debug print debug information, for the script maintainer - --verify verify config file and show what would be done - for the tests but don't run athena (see tip below) - --verifyconfig just verify config file and stop - --showsummary print a short summary table of tests results at the end - --failkey <string> keyword to be printed to indicate to the test - framework that a test has failed, default $failkey - --failkey <string> keyword to be printed to indicate a problem, but not - seen as failure by test framework, default $warnkey - --config <file> specify config file, default trigtest.conf - tries with get_files from DATAPATH if it doesn't exist - --rundir <dir> specify directory in which to run tests, default ../run - --cleardir remove/clear rundir before running (FALSE by default) - --package <string> (deprecated, does nothing, will be removed in future release) - --test <test name|id> specify test to run, see below - - A test name or id can optionally be specified after the --test - option to run only that test. By default, all tests will be run in - the order they are defined in the config file. The verify option - will list all the available tests that are defined in the config - file. The --test option may be repeated, and tests will be run in the - order the come on the command line. - - See the sample config file for test configuration information. - - It is expected that this tool be run from the cmt or run directory - under TriggerTest, after the necessary cmt environment has been set - up. If you changed any files in TriggerTest or checked out a - version different from the release you are using, then you need to - gmake before running these tests. The --package option can be used - to change this default location to another package for reference - files and the check_log config file. - - Output from $prog will always be preceeded by its name (for error - and debug messages) or '===' for the few messages you get without - debug. All other messages come from other programs and commands it - has run. - - Tip: after running a test for the first time, run again in verify - mode and the same log files will be re-used. This is a good way to - quickly test the config file, regression tests, and for script - development. - - The exit code refers only to the last test - be sure to read the - output if you run multiple tests! - The exit code can be any combination of these values: -"; - my $errorcode; - foreach $error_name (sort { $ERROR{$a} <=> $ERROR{$b} } keys %ERROR) { - printf " %20s %4d\n", $error_name, $ERROR{$error_name}; - } -} - - -# If using a file for stdin, -# try to find it with get_files -# then check it is there -# and return with < pre-pended, -# or return empty string if failed -sub getStdinFile($){ - my ($stdinfile) = @_; - $stdinfile =~ s/^\s+$//; # kill file names that are only spaces - $stdinfile = $stdinfile; - if (length($stdinfile)>0){ - if (! -e "$stdinfile" ){ - print "$prog debug: $stdinfile does not exist, so copying it with get_files\n" if ($debug); - systemcall("get_files -data $stdinfile"); - } else { - print "$prog debug: $stdinfile already exists; not copying it\n" if ($debug); - } - if (! -e $stdinfile){ - prog_error_exit ("stdin defined as '$stdinfile' but this is not found", 'SCRIPT_MISC'); - $stdinfile = ""; - } else { - $stdinfile = "< $stdinfile"; - } - } else { - $stdinfile = ""; - } - return $stdinfile; -} - -# parse config file -sub parse_config(){ - - # if specified config file does not exist, try get_files. If still not there, fail. - print "$prog debug: config file is specified as $configfile\n" if ($debug); - if (! -r $configfile) { - print "$prog debug: $configfile does not exist, so try copying it with get_files\n" if ($debug); - systemcall("get_files -data -symlink -remove $configfile",TRUE); - if (! -r $configfile){ - prog_error_exit ("config file $configfile not found. Specify a config file with the option --config <filename>", 'SCRIPT_MISC'); - } - } - open CONFIG, "<$configfile" - or prog_error_exit ("failed opening $configfile: $!\n", 'SCRIPT_MISC'); - print "\n$prog debug: start of config file\n" if ($debug); - my $first = TRUE; - my $this_test = {}; - my $current_test_id = ''; - while (<CONFIG>){ - chomp; - # strip out comments - $endofline = index $_, '#'; - if ($endofline == -1){ - $endofline = length; - } - $line = substr($_, 0, $endofline); - # strip leading white space - $line =~ s/^\s+//; - # skip empty lines and lines with only spaces - next if (length $line == 0); - next if (/^\s+$/); - #print "$prog debug: config $. >$line<\n" if ($debug); - # test keyword - if ($line =~ /^test/){ - if ($line =~ /^test\s+(\w+)/){ - my $id = $1; - print "$prog debug: config id = >$id<\n" if ($debug); - if ($current_test_id eq $id or exists $config{$id}){ - prog_error_exit ("test id $id is not unique",'SCRIPT_MISC'); - } - # save old test config - if (! $first){ - $config{$current_test_id} = $this_test; - push @test_order, $current_test_id; - } - # new test config - $first = FALSE; - $current_test_id = $id; - $this_test = {}; - # defaults - $this_test->{'name'} = "test_$id"; - $this_test->{'disabled'} = FALSE; - $this_test->{'checklog'} = FALSE; -# $this_test->{'checklog_opts'} = "--config check_log.conf --showexcludestats"; - $this_test->{'checklog_opts'} = "--showexcludestats"; - $this_test->{'datafile'} = UNDEFINED; - $this_test->{'datafilelink'} = 'ZEBRA.P'; - $this_test->{'joboptions'} = UNDEFINED; - $this_test->{'pre_condition'} = (); - $this_test->{'pre_command'} = (); - $this_test->{'post_command'} = (); - $this_test->{'post_test'} = (); - $this_test->{'athena_env'} = 'export STAGE_SVCCLASS=atlascerngroupdisk;export STAGE_HOST=castoratlast3'; - $this_test->{'athena_args'} = UNDEFINED; - $this_test->{'athena_cmd'} = 'athena.py -b'; - $this_test->{'exitmask'} = $default_exitmask; - $this_test->{'stdinfile'} = ''; - $this_test->{'regtest'} = (); - $this_test->{'filterlog'} = ''; - $this_test->{'compresslog'} = FALSE; - $this_test->{'rootcomp'} = FALSE; - $this_test->{'rootcomp_cmd'} = ""; - $this_test->{'rootcomp_file1'} = ""; - $this_test->{'rootcomp_file2'} = ""; - $this_test->{'checkcount'} = FALSE; - $this_test->{'checkcount_file'} = ""; - $this_test->{'checkcount_tolerance'} = 1; - $this_test->{'checkcount_level'} = "BOTH"; - $this_test->{'checkmerge'} = FALSE; - $this_test->{'checkmerge_file'} = ""; - $this_test->{'checkmerge_reffile'} = ""; - $this_test->{'checkmerge_tolerance'} = 1; - $this_test->{'emdcheck'} = (); - $this_test->{'doc'} = ""; - next; - } - else { - print "$prog: Error: config line $. incorrect, test definition invalid - ignoring line\n"; - next; - } - } - if ($line =~ /^name\s+([^\s]+)/){ - $this_test->{'name'} = $1; - print "$prog debug: config test name >$1<\n" if ($debug); - next; - } - if ($line =~ /^datafile\s+([^\s]+)\s+([^\s]+)/){ - $this_test->{'datafile'} = $1; - $this_test->{'datafilelink'} = $2; - print "$prog debug: config datafile >$1< link >$2<\n" if ($debug); - next; - } - if ($line =~ /^datafile\s+([^\s]+)/){ - $this_test->{'datafile'} = $1; - print "$prog debug: config datafile >$1<\n" if ($debug); - next; - } - if ($line =~ /^joboptions\s+([^\s]+)/){ - $this_test->{'joboptions'} = $1; - print "$prog debug: config joboptions >$1<\n" if ($debug); - next; - } - if ($line =~ /^pre_condition\s+(.+)$/){ - my $pre_condition = $1; - push @{$this_test->{'pre_condition'}}, $pre_condition; - print "$prog debug: config pre_condition >$pre_condition<\n" if ($debug); - next; - } - if ($line =~ /^pre_command\s+(.+)$/){ - my $pre_command = $1; - push @{$this_test->{'pre_command'}}, $pre_command; - print "$prog debug: config pre_command >$pre_command<\n" if ($debug); - next; - } - if ($line =~ /^post_command\s+(.+)$/){ - my $post_command = $1; - push @{$this_test->{'post_command'}}, $post_command; - print "$prog debug: config post_command >$post_command<\n" if ($debug); - next; - } - if ($line =~ /^post_test\s+([^\s]+)\s+(.+)$/){ - my $post_test = {'name' => $1, 'cmd' => $2}; - push @{$this_test->{'post_test'}}, $post_test; - print "$prog debug: config post_test >$1< >$2<\n" if ($debug); - next; - } - if ($line =~ /^athena_args\s+(.+)$/){ - $this_test->{'athena_args'} = $1; - print "$prog debug: config athena_args >$1<\n" if ($debug); - next; - } - if ($line =~ /^athena_env\s+(.+)$/){ - $this_test->{'athena_env'} = $1; - print "$prog debug: config athena_env >$1<\n" if ($debug); - next; - } - if ($line =~ /^athena_cmd\s+(.+)$/){ - $this_test->{'athena_cmd'} = $1; - print "$prog debug: config athena_cmd >$1<\n" if ($debug); - next; - } - if ($line =~ /^extra_failure_codes\s+(.+)$/){ - $this_test->{'exitmask'} = $default_exitmask; - my @codes = split('\s',$1); - for (@codes) { - if (exists $ERROR{$_}) { - $this_test->{'exitmask'} |= $ERROR{$_}; - } - else { - my @tmp = keys %ERROR; - prog_error_exit ("Exit code '$_' unknown. Allowed values are: @tmp",'SCRIPT_MISC'); - } - } - print "$prog debug: config extra_failure_codes >$1<\n" if ($debug); - next; - } - if ($line =~ /^stdinfile\s+(.+)$/){ - $this_test->{'stdinfile'} = $1; - print "$prog debug: config stdinfile >$1<\n" if ($debug); - next; - } - if ($line =~ /^disable/){ - $this_test->{'disabled'} = TRUE; - print "$prog debug: config disabled >" . ( $_ ? "true" : "false") . "<\n" if ($debug); - next; - } - if ($line =~ /^checklog\s+(.+)$/){ - $this_test->{'checklog'} = TRUE; - $this_test->{'checklog_opts'} = $1; - print "$prog debug: config checklog >" . ( $_ ? "true" : "false") . "<\n" if ($debug); - print "$prog debug: config checklog_opts >$1<\n" if ($debug); - next; - } - if ($line =~ /^checklog\s*$/){ - $this_test->{'checklog'} = TRUE; - print "$prog debug: config checklog >" . ( $_ ? "true" : "false") . "<\n" if ($debug); - next; - } - if ($line =~ /^filterlog\s+(.+)$/){ - $this_test->{'filterlog'} = $1; - print "$prog debug: config filterlog >$1<\n" if ($debug); - next; - } - if ($line =~ /^compresslog/){ - $this_test->{'compresslog'} = TRUE; - print "$prog debug: config compresslog >" . ( $_ ? "true" : "false") . "<\n" if ($debug); - next; - } - if ($line =~ /^regtest\s+([^\s]+)\s+([^\s]+)\s+([^\s]+)/){ - my $regtest = { 'algoname' => $1, 'match' => $2, 'reffile' => $3}; - push @{$this_test->{'regtest'}}, $regtest; - print "$prog debug: config regtest >$1< >$2< >$3<\n" if ($debug); - next; - } - if ($line =~ /^edmcheck\s+([^\s]+)\s+([^\s]+)\s+([^\s]+)/){ - my $edmcheck = { 'algoname' => $1, 'edmfile' => $2, 'edmreffile' => $3}; - push @{$this_test->{'edmcheck'}}, $edmcheck; - print "$prog debug: config edmcheck >$1< >$2< >$3<\n" if ($debug); - next; - } - if ($line =~ /^fullregtest\s+([^\s]+)\s+([^\s]+)/){ - my $regtest = { 'algoname' => $fullregtest, 'match' => $1, 'reffile' => $2}; - push @{$this_test->{'regtest'}}, $regtest; - print "$prog debug: config fullregtest >$1< >$2<\n" if ($debug); - next; - } - if ($line =~ /^customregtest\s+(.+)$/){ - my $regtest = { 'algoname' => $customregtest, 'match' => $1, 'reffile' => ''}; - push @{$this_test->{'regtest'}}, $regtest; - print "$prog debug: config customregtest >$1<\n" if ($debug); - next; - } - #check merge - if ($line =~ /^checkmerge\s+([^\s]+)\s+([^\s]+)\s+([^\s]+)/){ - $this_test->{'checkmerge'} = TRUE; - $this_test->{'checkmerge_file'} = $1; - $this_test->{'checkmerge_reffile'}= $2; - $this_test->{'checkmerge_tolerance'}= $3; - print "$prog debug: config checkmerge >" . ( $_ ? "true" : "false") . "<\n" if ($debug); - print "$prog debug: config checkmerge_file >$1<\n" if ($debug); - print "$prog debug: config checkmerge_reffile >$2<\n" if ($debug); - print "$prog debug: config checkmerge_tolerance >$3<\n" if ($debug); - next; - } - # check for 3rd argument (L2, EF or BOTH) - if ($line =~ /^checkcount\s+([^\s]+)\s+([^\s]+)\s+([^\s]+)/){ - $this_test->{'checkcount'} = TRUE; - $this_test->{'checkcount_file'} = $1; - $this_test->{'checkcount_tolerance'}=$2; - $this_test->{'checkcount_level'}=$3; - print "$prog debug: config checkcount >" . ( $_ ? "true" : "false") . "<\n" if ($debug); - print "$prog debug: config checkcount_file >$1<\n" if ($debug); - print "$prog debug: config checkcount_tolerance >$2<\n" if ($debug); - print "$prog debug: config checkcount_level >$3<\n" if ($debug); - next; - } - # only 2 arguments, assume BOTH - if ($line =~ /^checkcount\s+([^\s]+)\s+([^\s]+)/){ - $this_test->{'checkcount'} = TRUE; - $this_test->{'checkcount_file'} = $1; - $this_test->{'checkcount_tolerance'}=$2; - print "$prog debug: config checkcount >" . ( $_ ? "true" : "false") . "<\n" if ($debug); - print "$prog debug: config checkcount_file >$1<\n" if ($debug); - print "$prog debug: config checkcount_tolerance >$2<\n" if ($debug); - next; - } - # optional 2nd argument - if ($line =~ /^rootcomp\s+([^\s]+)\s*([^\s]*)$/){ - $this_test->{'rootcomp'} = TRUE; - $this_test->{'rootcomp_cmd'} = $rootcomp_cmd; - if ($2 eq "") { - $this_test->{'rootcomp_file1'} = "expert-monitoring.root"; - $this_test->{'rootcomp_file2'} = $1; - } - else { - $this_test->{'rootcomp_file1'} = $1; - $this_test->{'rootcomp_file2'} = $2; - } - print "$prog debug: config rootcomp >" . ( $_ ? "true" : "false") . "<\n" if ($debug); - print "$prog debug: config rootcomp_file1 >$this_test->{'rootcomp_file1'}<\n" if ($debug); - print "$prog debug: config rootcomp_file2 >$this_test->{'rootcomp_file2'}<\n" if ($debug); - next; - } - # old style - if ($line =~ /^customrootcomp\s+([^\s]+)\s+([^\s]+)$/){ - $this_test->{'rootcomp'} = TRUE; - $this_test->{'rootcomp_cmd'} = $1; - $this_test->{'rootcomp_file2'} = $2; - print "$prog debug: config custom rootcomp >" . ( $_ ? "true" : "false") . "<\n" if ($debug); - print "$prog debug: config custom rootcomp_cmd >$1<\n" if ($debug); - print "$prog debug: config custom rootcomp_file2 >$2<\n" if ($debug); - next; - } - # optional 3rd argument - if ($line =~ /^customrootcomp\s+([^\s]+)\s+([^\s]+)\s+([^\s]+)$/){ - $this_test->{'rootcomp'} = TRUE; - $this_test->{'rootcomp_cmd'} = $1; - $this_test->{'rootcomp_file1'} = $2; - $this_test->{'rootcomp_file2'} = $3; - print "$prog debug: config custom rootcomp >" . ( $_ ? "true" : "false") . "<\n" if ($debug); - print "$prog debug: config custom rootcomp_cmd >$1<\n" if ($debug); - print "$prog debug: config custom rootcomp_file1 >$2<\n" if ($debug); - print "$prog debug: config custom rootcomp_file2 >$3<\n" if ($debug); - next; - } - if ($line =~ /^doc\s+(.+)$/){ - $this_test->{'doc'} = $1; - print "$prog debug: config doc >$1<\n" if ($debug); - next; - } - else { - print "$prog: Warning: config line $. not recognised, ignoring it: $line\n"; - next; - } - } - close CONFIG; - print "$prog debug: end of config file\n\n" if ($debug); - # save last test config - if (! $first){ - $config{$current_test_id} = $this_test; - push @test_order, $current_test_id; - } - -} - -# display details of the configured tests -sub print_config(){ - print "=== Test Configuration\n"; - foreach (keys %config){ - print "test: $_\n"; - print " name '" . $config{$_}->{'name'} . "' \n"; - print " doc '" . $config{$_}->{'doc'} . "'\n"; - print " disabled '" . ( $config{$_}->{'disabled'} ? "true" : "false") . "'\n"; - print " checklog '" . ( $config{$_}->{'checklog'} ? "true" : "false") . "'\n"; - print " checklog_opts '" . $config{$_}->{'checklog_opts'} . "'\n"; - print " filterlog '" . $config{$_}->{'filterlog'} . "'\n"; - print " compresslog '" . ( $config{$_}->{'compresslog'} ? "true" : "false") . "'\n"; - print " rootcomp '" . ( $config{$_}->{'rootcomp'} ? "true" : "false") . "'\n"; - print " rootcomp_cmd '" . $config{$_}->{'rootcomp_cmd'} . "'\n"; - print " rootcomp_file1 '" . $config{$_}->{'rootcomp_file1'} . "'\n"; - print " rootcomp_file2 '" . $config{$_}->{'rootcomp_file2'} . "'\n"; - print " checkcount '" . ( $config{$_}->{'checkcount'} ? "true" : "false") . "'\n"; - print " checkcount_file '" . $config{$_}->{'checkcount_file'} . "'\n"; - print " checkcount_tolerance '" . $config{$_}->{'checkcount_tolerance'} . "'\n"; - print " checkcount_level '" . $config{$_}->{'checkcount_level'} . "'\n"; - print " checkmerge '" . ( $config{$_}->{'checkcount'} ? "true" : "false") . "'\n"; - print " checkmerge_file '" . $config{$_}->{'checkcount_file'} . "'\n"; - print " checkmerge_tolerance '" . $config{$_}->{'checkcount_tolerance'} . "'\n"; - print " checkmerge_reffile '" . $config{$_}->{'checkcount_file'} . "'\n"; - print " datafile '" . $config{$_}->{'datafile'} . "'\n"; - print " datafilelink '" . $config{$_}->{'datafilelink'} . "'\n"; - print " joboptions '" . $config{$_}->{'joboptions'} . "'\n"; - for (@{$config{$_}->{'pre_condition'}}){ - print " pre_condition $_'\n"; - } - for (@{$config{$_}->{'pre_command'}}){ - print " pre_command $_'\n"; - } - for (@{$config{$_}->{'post_command'}}){ - print " post_command $_'\n"; - } - for (@{$config{$_}->{'post_test'}}){ - print " post_test $_'\n"; - } - print " athena_env'" . $config{$_}->{'athena_env'} . "'\n"; - print " athena_cmd '" . $config{$_}->{'athena_cmd'} . "'\n"; - print " athena_args '" . $config{$_}->{'athena_args'} . "'\n"; - printf " exitmask %#.8b \n", $config{$_}->{'exitmask'}; - print " stdinfile '" . $config{$_}->{'stdinfile'} . "'\n"; - if ($#{$config{$_}->{'regtest'}} == -1){ - print " (no regtests defined)\n"; - } - for (@{$config{$_}->{'regtest'}}){ - print " regtest: algorithm name '" . $_->{'algoname'} . "'\n"; - print " match message pattern '" . $_->{'match'} . "'\n"; - print " reference file '" . $_->{'reffile'} . "'\n"; - } - if ($#{$config{$_}->{'edmcheck'}} == -1){ - print " (no edmtests defined)\n"; - } - for (@{$config{$_}->{'edmcheck'}}){ - print " edmcheck: algorithm name '" . $_->{'algoname'} . "'\n"; - print " edmfile '" . $_->{'edmfile'} . "'\n"; - print " reference file '" . $_->{'edmreffile'} . "'\n"; - } - } -} - -# check that tests specified on command line exist -# replace names by ids -sub check_tests(){ - - # build map of tests by name - my $test_id_byname = {}; - foreach (keys %config){ - my $name = $config{$_}->{'name'}; - if (exists $test_id_byname{$name}){ - print "$prog: error: test name $name is not unique\n"; - } else { - $test_id_byname{$name} = $_; - } - } - - # check that tests specified on command line exist - # replace names by ids - for ( my $i=0; $i<=$#tests; $i++ ){ - if ( exists $config{$tests[$i]} ){ - next; - } elsif ( exists $test_id_byname{$tests[$i]} ) { - $tests[$i] = $test_id_byname{$tests[$i]}; - next; - } else { - prog_error_exit ("test name/id $tests[$i] is not defined in the config file", 'SCRIPT_MISC'); - } - } - - # if no tests are specified, do them all in the order they were read in. - if ($#tests == -1){ - @tests = @test_order; - } -} - - -# loop over tests, skip those that are disabled -sub do_tests(){ - my $first = TRUE; - for (@tests){ - my $id = $_; - @statuscodes = ( 'OK' ); # reset for status code of latest test - $exitmask = $config{$id}->{'exitmask'}; # exitmask of latest test - #print "-------------------------------------------------------\n"; - print "=== Test $id: " . $config{$id}->{'name'}; - if ($config{$id}->{'disabled'}) { - print " is disabled\n"; - } else { - print "\n"; - if ($first){ - first_test_prep(); - $first = FALSE; - } - run_test($id); - if ($#statuscodes>0){ - $failures++; - } - $statuscode = process_error_codes(@statuscodes); - $testresults{$id}=$statuscode; - } - print "--------------------------------------------------------------------------------\n"; - } -} - -# Timer subroutine -# given an initial time t0 in seconds since the epoch (i.e. as given by perl time function), calculates and prints the total elapsed (aka wallclock) time, user time and system time. Do not expect these to add up, e.g. if the system is busy with other users or you have to wait for castor. -# NB if called multiple times, the last call will overwrite previous output files. -sub timer($){ - my ($t0) = @_; - my $t1=time(); - my ($tuser,$tsystem,$tcuser,$tcsystem) = times; - printf( "=== Timer: total elapsed %d s, total user %6.2f s, total system %6.2f s\n", - $t1-$t0, $tuser+$tcuser, $tsystem+$tcsystem); - open TIMER, ">$timerout"; - printf TIMER "%d %f %f\n",$t1-$t0, $tuser+$tcuser, $tsystem+$tcsystem; - close TIMER; - -} - -sub results_summary(){ - return if (!$showsummary); - print "=== Test results summary\n"; - printf " %3s %-20s %-10s\n", "Id", "Test Name", "Result"; - for (@tests){ - my $id = $_; - printf " %3s %-20s ", $id, $config{$id}->{'name'}; - if ($config{$id}->{'disabled'}){ - print "(disabled)\n"; - next; - } - if ($testresults{$id} == 0){ - print "passed"; - } else { - print "failed ($testresults{$id})"; - } - print "\n"; - } -} - -# preparations before first test is run -sub first_test_prep { - - # create run dir if it doesn't already exist - if ( $clear_dir ) { - system "rm -fr $run_dir"; - } - if ( ! -d $run_dir ){ - mkpath $run_dir - #or die "$prog: error: failed mkpath $run_dir: $!\n"; - } - chdir $run_dir or prog_error_exit( "failed chdir $run_dir: $!\n", 'SCRIPT_MISC'); - - # get log file from env - my $ajl = $ENV{'ATN_JOB_LOGFILE'}; - if (defined($ajl)){ - system "echo $ajl > atn_job_logfile_name"; - } - - # run script to get relevant file - my $id = $_; - my $jobopts = $config{$id}->{'joboptions'}; - print "$prog debug: job options:$jobopts\n" if ($debug); -} - -# run a test -sub run_test($){ - my ($id) = @_; - my $name = $config{$id}->{'name'}; - - # prepare file names - my $jobopts = $config{$id}->{'joboptions'}; - my $logfile = "atn_test.log"; - my $logfiletail = "atn_tail.log"; - my $local_jobopts = ""; - print "$prog debug: job options:$jobopts\n" if ($debug); - systemcall("echo \"$config{$id}->{'doc'}\" > $docout"); - if ( $jobopts ne 'None' and $jobopts ne UNDEFINED ){ - my @suffixlist = ( '.py', '.txt' ); - my ($filename,$path,$suffix) = fileparse($jobopts,@suffixlist); - $local_jobopts = $filename . "_test" . $suffix; - $logfile = "$filename" . "_test.log"; - $logfiletail = "$filename" . "_tail.log"; - print "$prog debug: $jobopts $local_jobopts $logfile\n" if ($debug); - - # get copy of joboptions file to customise for this job, - # if it's not already there - # allow for the case of no jobotions (AthanMT) - if (! -e "$filename$suffix" ){ - print "$prog debug: $filename$suffix does not exist, so copying it with get_files\n" if ($debug); - systemcall("get_files -jo $jobopts"); - } - if (-e "$filename$suffix"){ # check: will not be there in verify mode - copy "$filename$suffix", "$local_jobopts" - or prog_error_exit( "failed copying $filename$suffix to $local_jobopts: $!\n", 'SCRIPT_MISC'); - } - # check permissions on local joboptions file before trying to append to it - if (! -w $local_jobopts){ - chmod 0644, $local_jobopts - or prog_error_exit( "failed to set write permission for $local_jobopts: $!\n", 'SCRIPT_MISC'); - } - - - # append joboptions to set algorithm output level to 2, - # for algorithms to be regression tested. - open JOBOPTS, ">> $local_jobopts" - or prog_error_exit ("failed opening $local_jobopts: $!\n", 'SCRIPT_MISC'); - print JOBOPTS "\n"; -# for (@{$config{$id}->{'regtest'}}){ -# my $algoname = $_->{'algoname'}; - # require some alphanumeric chars for a valid algoname -# if ($algoname =~ /\w/){ -# print "$prog debug: appending to joboptions file: $algoname.Outputlevel = 2\n" if ($debug); -# print JOBOPTS "Algorithm(\"$algoname\").Outputlevel = DEBUG\n"; -# print JOBOPTS "MessageSvc.debugLimit = 2000\n"; -# print JOBOPTS "MessageSvc.defaultLimit = 2000\n"; -# } else { -# print "$prog warning: not setting output level for algorithm \"$algoname\" since it doesn't look like a valid name (no alphanumeric chars)\n"; -# } -# } - close JOBOPTS; - } - # run any pre-condition - they must all succeeed or else the job won't run - my $pre_condition; - my $precondrc=TRUE; - for $pre_condition (@{$config{$id}->{'pre_condition'}}){ - my $precondrc1=systemcall("$pre_condition"); - print "$prog debug: pre_condition \"$pre_condition\" returned $precondrc1\n" if ($debug); - if ($precondrc1!=0){ - print "$prog info: pre_condition \"$pre_condition\" failed (exit code $precondrc1)\n"; - $precondrc=FALSE; - } - } - if ($precondrc){ - print "$prog debug: pre-conditions met\n" if ($debug); - } else { - print "$prog info: pre-conditions failed so test cannot be run. This is not a test failure.\n"; - push @statuscodes, 'PRECONDITION_FAILED_SO_NOT_RUN'; - return; - } - - # run any pre-command - my $pre_command; - for $pre_command (@{$config{$id}->{'pre_command'}}){ - systemcall("$pre_command"); - } - - # link data file if specified - my $datafile = $config{$id}->{'datafile'}; - my $datafilelink = $config{$id}->{'datafilelink'}; - if ($datafile ne UNDEFINED){ - # expand environment variables in datafile - while ($datafile =~ /\$\{(.+)\}/){ - my $var = $1; - if (exists $ENV{$var}){ - my $sub=$ENV{$var}; - $datafile =~ s/\$\{$var\}/$sub/; - print "$prog debug: expanding env var '$var' in datafile yields: $datafile\n" if ($debug); - } else { - print "$prog: Warning: env var '$var' used in datafile definition is undefined, replacing with blank\n"; - $datafile =~ s/\$\{$1\}//; - } - } - - print "$prog debug: linking data file to $datafilelink: $datafile\n" - if ($debug); - if (-e $datafilelink or -l $datafilelink){ - print "$prog debug: first removing $datafilelink\n" if ($debug); - unlink $datafilelink - or die "$prog: error: failed to delete $datafilelink: $!\n"; - } - symlink $datafile, $datafilelink - or die "$prog: error: failed to symlink $datafilelink: $!\n"; - } - - # run athena - my $athena_env = $config{$id}->{'athena_env'}; - my $athena_cmd = $config{$id}->{'athena_cmd'}; - my $athena_args = $config{$id}->{'athena_args'}; - my $filter_cmd = $config{$id}->{'filterlog'}; - $filter_cmd = " 2>&1 | " . $filter_cmd if (length($filter_cmd)>0); - $athena_args = "" if ($athena_args eq UNDEFINED); - my $stdinfile = getStdinFile($config{$id}->{'stdinfile'}); - print "=== Athena env '$athena_env' \n"; - print "=== Running '$athena_cmd $athena_args $local_jobopts $stdinfile $filter_cmd'\n"; - # the stderr redirection needs to be exactly at this place - my $athenarc = systemcall("$athena_env ; $athena_cmd $athena_args $local_jobopts $stdinfile $filter_cmd > $logfile 2>&1"); - - # the way to recognise a timeout - $timeout = FALSE; - if (! open LOG, "tail -600 $logfile|"){ - print "$prog: error: failed opening $logfile to read: $!\n"; - print "-> $failkey Aborting this test\n"; - # will happen later: return; # go on to next test - } - while (<LOG>){ - if (/CRITICAL stopped by user interrupt/ or - /ERROR Keyboard interruption caught/ or - /^Signal handler: Killing [0-9]+ with 15/){ - $timeout = TRUE; - last; - } - - } - close LOG; - - print "$prog: debug: timeout=$timeout " . ($timeout?"true":"false") . " athenarc=$athenarc \n" if ($debug); - - # check athena return code - #print "-------------------------------------------------------\n"; - if ($athenarc == 0 and not $timeout){ - print "=== $name OK: Athena exited normally\n"; - print "art-result: 0 athena.$name\n"; - } elsif ($timeout){ - # or $athenarc == 35584 -> sometimes this exit code is just a seg fault - print "=== $name $warnkey: Athena exceeded time limit and was killed\n"; - print "art-result: 1 athena.$name\n"; - push @statuscodes, 'ATN_TIME_LIMIT'; - } else { - print "=== $name $failkey : Athena exited abnormally! Exit code: $athenarc\n"; - print "art-result: 2 athena.$name\n"; - push @statuscodes, 'ATHENA_BAD_EXIT'; - } - - - # run any post-commands - unlink "$postcmdout" if (-f "$postcmdout"); -# if - if (defined $config{$id}->{'post_command'} - and @{$config{$id}->{'post_command'}}>0) { - my $post_command; - @postrc=(); - - for $post_command (@{$config{$id}->{'post_command'}}){ - # All post command share the same log file - push @postrc, systemcall("($post_command) >> $postcmdout 2>&1"); - } - systemcall("cat $postcmdout"); - print "$prog debug: post_command #commands: ".@postrc." return codes: @postrc \n" if ($debug); - } - - my %reldata = release_metadata(); - my $nightly = (exists $reldata{'nightly name'} ? $reldata{'nightly name'} : "UNKNOWN"); - # modification for ART (ATR-17618) - # $nightly = $nightly . "/latest"; - print "$prog: looking for histograms and references for nightly $nightly \n"; - - # run any post-tests - unlink "$posttestrc" if (-f "$posttestrc"); - if ( defined(@{$config{$id}->{'post_test'}}) ) { - my $post_test; - my $total_rc = 0; - @postrc=(); - open (POSTTEST, '>', $posttestrc); - for $post_test (@{$config{$id}->{'post_test'}}){ - # Each post test has its own log file - my $post_test_log = "post_test_$post_test->{'name'}.log"; - # Replace '$logfile' with the actual file name - my $post_test_cmd = $post_test->{'cmd'}; - $post_test_cmd =~ s/\$logfile/$logfile/; - # If there is a comparison to a reference file, make sure that the correct path is used - $post_test_cmd =~ s/latest/$nightly/g; - my $rc = systemcall("($post_test_cmd) > $post_test_log 2>&1"); - $total_rc += $rc; - # Save return codes in separate text file - print POSTTEST "$post_test->{'name'} $rc\n"; - } - close POSTTEST; - if ($total_rc>0) { - push @statuscodes, 'POST_TEST_BAD_EXIT'; - } - } - - my $pwd = `pwd`; - chomp $pwd; - # make a URL by substituting the lxbuild local disk path for the web - # server URL if it does not match the lxbuild local disk path then it - # will be left as a file path instead. - # NB gives wrong address for incremental nightlies because the build is always done in atlrel_0 then copied to altrel_1-5 as appropriate - my $logfileURL = $logfile; - $logfileURL =~ s%/pool/build/atnight/localbuilds/nightlies%http://atlas-computing.web.cern.ch/atlas-computing/links/buildDirectory/nightlies%; - print "=== Log file: " . $pwd . "/$logfileURL\nNB replace rel_0 with actual nightly in this URL.\n"; - if (! -e $logfile or -z $logfile){ - print "=== Error: log file does not exist or is empty, skipping the rest of this test\n"; - return; - } - # get data file LFN/PFN from log file + pool file catalogue - if (! open LOG, "<$logfile"){ - print "$prog: error: failed opening $logfile to read: $!\n"; - print "-> $warnkey Aborting this test\n"; - return; # go on to next test - } - my $dataLFN="unknown"; - my $dataPFN=""; - my $eventCounter=0; - while (my $line = <LOG>){ - if ($line =~ /InputCollections\s+\= \['(.*)'\]/){ # athena - $dataLFN=$1; - } - elsif ($line =~ /event stream from file list\s+\['(.*)'\]/){ # athenaHLT - $dataLFN=$1; - } - # count events for athena job - ++$eventCounter if ($line =~ /AthenaEventLoopMgr\s+INFO\s+===>>> done processing event/); - # handle athenaHLT case - if ($line =~ /Py:athenaHLT\s+INFO\s+Processed ([0-9]+) events/){ - $eventCounter=$1; - } - } - close LOG; - - print "$prog debug: dataLFN=$dataLFN\n" if ($debug); - if ($dataLFN ne "unknown"){ - my $dataLFNstripped = $dataLFN; - $dataLFNstripped =~ s/^LFN\://; - my $cmdout1 = qx(FClistPFN -u xmlcatalog_file:PoolFileCatalog.xml -l $dataLFNstripped); - chomp $cmdout1; - if (length($cmdout1)>0){ - $dataPFN = $cmdout1; - } - print "$prog debug: dataLFNstripped=$dataLFNstripped dataPFN=$dataPFN\n" if ($debug); - print "$prog debug: cmdout1=$cmdout1\n" if ($debug); - } - print "=== Data file: $dataLFN $dataPFN\n"; - - # write how many events processed - print "=== Events processed: $eventCounter\n"; - - # check log file for likely errors and known false positives - if ($config{$id}->{'checklog'}){ - my $checklog_opts = $config{$id}->{'checklog_opts'}; - # ERRORs - my $logrc = systemcall("check_log.pl $checklog_opts $logfile > $checklogout 2>&1"); - systemcall("cat $checklogout"); - if ($logrc != 0){ - print "=== $name $failkey : problem detected in log file\n"; - print "art-result: 1 $name.CheckLog\n"; - push @statuscodes, 'ATHENA_ERROR_IN_LOG'; - } else { - print "art-result: 0 $name.CheckLog\n"; - } - # WARNINGs - $rc = systemcall("check_log.pl $checklog_opts --noerrors --warnings $logfile > $warnout 2>&1"); - # Ignore rc. - } - - #make short file with last 600 lines only - systemcall("tail -600 $logfile > $logfiletail"); - - - # rootcomp - if ($config{$id}->{'rootcomp'}){ - my $rootcomp_file1 = $config{$id}->{'rootcomp_file1'}; - my $rootcomp_file2 = $config{$id}->{'rootcomp_file2'}; - if( $nightly ne "" ) { - # allow for custom tests with two files - $rootcomp_file2 =~ s/latest/$nightly/g ; - } - $rootcomp_file1 = resolveSymlinks($rootcomp_file1); - $rootcomp_file2 = resolveSymlinks($rootcomp_file2); - - if (-e $rootcomp_file1) { - if (-e $rootcomp_file2) { - my $rc=systemcall("$config{$id}->{'rootcomp_cmd'} $rootcomp_file1 $rootcomp_file2 > $rootcompout 2>&1", TRUE); - if ($rc != 0){ - print "=== $name WARNING: monitoring histogram mismatch detected by rootcomp\n"; - print "art-result: 1 $name.RootComp\n"; - push @statuscodes, 'ROOTCOMP_MISMATCH'; - } else { - print "=== $name: rootcomp: monitoring histograms match. \n"; - print "art-result: 0 $name.RootComp\n"; - } - } - else { - print "=== Alert: $rootcomp_file2 does not exist \n"; - print "art-result: 2 $name.RootComp\n"; - } - } - else { - print "=== Alert: $rootcomp_file1 does not exist \n"; - print "art-result: 2 $name.RootComp\n"; - } - #systemcall("cat $rootcompout"); - if (-e $rootcompout) { - systemcall("grep -A 5 '^Summary' $rootcompout"); - } - } - - # checkcount - if ($config{$id}->{'checkcount'}){ - my $checkcount_file = $config{$id}->{'checkcount_file'}; - my $checkcount_tolerance = $config{$id}->{'checkcount_tolerance'}; - my $checkcount_level = $config{$id}->{'checkcount_level'}; - if( $nightly ne "" ) { - $checkcount_file =~ s/latest/$nightly/ ; - } - $checkcount_file = resolveSymlinks($checkcount_file); - print "$prog: checking trigger and TE counts \n"; - print "=== Running $checkcount_cmd $checkcount_tolerance $checkcount_file $checkcount_level > $checkcountout 2>&1 \n"; - my $rc=systemcall("$checkcount_cmd $checkcount_tolerance $checkcount_file $checkcount_level > $checkcountout 2>&1", TRUE); - if ($rc != 0){ - print "=== $name WARNING: trigger count mismatch detected by checkcount\nSee $checkcountout for details.\n"; - print "art-result: 1 $name.CheckCounts\n"; - push @statuscodes, 'CHECKCOUNTS_FAILED'; - } else { - print "=== $name: countcheck: trigger counts match. \n"; - print "art-result: 0 $name.CheckCounts\n"; - } - #systemcall("cat $rootcompout"); - #Grep for FAILURE here so that bad runs will be flagged as such - systemcall("grep 'FAILURE' $checkcountout"); - systemcall("grep 'test warning' $checkcountout"); - systemcall("grep 'tolerance' $checkcountout"); - } - - # checkmerge - if ($config{$id}->{'checkmerge'}){ - my $checkmerge_file = $config{$id}->{'checkmerge_file'}; - my $checkmerge_tolerance = $config{$id}->{'checkmerge_tolerance'}; - my $checkmerge_reffile = $config{$id}->{'checkmerge_reffile'}; - if( $nightly ne "" ) { - $checkmerge_file =~ s/latest/$nightly/ ; - } - $checkmerge_file = resolveSymlinks($checkmerge_file); - print "$prog: checking trigger histograms for merged system \n"; - print "=== Running $checkmerge_cmd $checkmerge_file $checkmerge_reffile $checkmerge_tolerance > $checkmergeout 2>&1 \n"; - my $rc=systemcall("$checkmerge_cmd $checkmerge_file $checkmerge_reffile $checkmerge_tolerance > $checkmergeout 2>&1", TRUE); - - if ($rc != 0){ - print "=== $name WARNING: Errors detected by checkmerge\nSee $checkmergeout for details.\n"; - print "art-result: 1 $name.CheckMerge\n"; - push @statuscodes, 'POST_TEST_BAD_EXIT'; - } else { - print "=== $name: mergecheck: the test passed successfully. \n"; - print "art-result: 0 $name.CheckMerge\n"; - } - systemcall("grep 'ERROR' $checkmergeout"); - systemcall("grep 'WARNING' $checkmergeout"); - } - - # EDM tests - my $emdcheckresult=TRUE; - EDMCHECK: - for (@{$config{$id}->{'edmcheck'}}){ - # truncate algorithm name for 30 characters - my $algoname = $_->{'algoname'}; - my $truncalgoname = substr($algoname, 0, 30); - my $edmfile = $_->{'edmfile'}; - my $edmreffile = $_->{'edmreffile'}; - # if file exist for this sepecfic nightly use it, otherwise - # use default - if( $nightly ne "" ) { - $newedmreffile = $edmreffile; - # substitute e.g. devval/latest for latest - $newedmreffile =~ s/latest/$nightly/ ; - # check if the reference file for this nightly exists - if ( -e $edmreffile ) { - $edmreffile = $newedmreffile; - print "New reference file name $edmreffile \n"; - } - } - $edmreffile = resolveSymlinks($edmreffile); - my $rc=systemcall("$truncalgoname -f $edmfile -r $edmreffile >>$edmcheckout 2>&1", TRUE); - if ($rc != 0){ - print "=== $name WARNING: trigger edmcheck mismatch detected by $truncalgoname\nSee $edmcheckout for details.\n"; - print "=== $name if differences are understood cp $edmfile $edmreffile \n"; - print "art-result: 1 $name.EdmCheck\n"; - } else { - print "=== $name: edmcheck: files matched \n"; - print "art-result: 0 $name.EdmCheck\n"; - } - } - - # regression tests - my $regtestresult=TRUE; - REGTEST: - for (@{$config{$id}->{'regtest'}}){ - # truncate algorithm name for 15 characters - my $algoname = $_->{'algoname'}; - my $truncalgoname = substr($algoname, 0, 30); - my $match = $_->{'match'}; - my $reffile = $_->{'reffile'}; - my $newfile = $reffile . ".new"; - # reference file caser - if( substr($newfile, 0, 5) eq "/tmp/" ){ - # ref file is in /tmp, eg. from another tst (due to tmp filling up, avoid this) - $newfile = substr($newfile, 5); - } elsif ( substr($newfile,0,3) eq "../"){ - # reference is to another test -- other test must be first in test/xxx_TestConfigruation.xml - my $lslash = rindex $newfile, '/'; - $newfile = substr($newfile, $lslash+1 ); - # in this case ref-file for an existing test will end in .new - $reffile = $reffile . ".new"; - } elsif ( substr($newfile, 0, 7) eq "/cvmfs/" ){ - # should be usual case: ref file is in cvmfs for ART (was /afs/ for ATN) - my $lslash = rindex $newfile, '/'; - $newfile = substr($newfile, $lslash+1 ); - if( $nightly ne "" ) { - $newreffile = $reffile; - # substitute e.g. devval/latest for latest - $newreffile =~ s/latest/$nightly/ ; - # check if the reference file for this nightly exists - if ( -e $newreffile ) { - $reffile = $newreffile; - print "New reference file name $reffile \n"; - } - } - } - print "$prog debug: truncated algoname $truncalgoname\n" if ($debug); - # extract regression test lines for this algorithm from log file - open NEW, ">$newfile" - or die "$prog: error: failed opening $newfile to write: $!\nart-result: 2 $name.Regtest\n"; - if (! open LOG, "<$logfile"){ - print "$prog: error: failed opening $logfile to read: $!\n"; - print "-> $warnkey Aborting this test\nart-result: 2 $name.Regtest\n"; - return FALSE; # go on to next test - } - my $lines=0; - if ($algoname eq $fullregtest){ - while (<LOG>){ - if (/$match/){ - print NEW; - $lines++; - } - } - print "$prog debug: fullregtest $lines lines matched $match in LOG\n" if ($debug); - } elsif ($algoname eq $customregtest){ - $rc = systemcall("$match >> $regtestout", TRUE); - $regtestresult = ( $rc==0 ? TRUE : FALSE ); - next REGTEST; - } - else { - while (<LOG>){ - if (/$truncalgoname.*$match/){ - print NEW; - $lines++; - } - } - print "$prog debug: regtest $lines lines matched $truncalgoname $match in LOG\n" if ($debug); - } - - close LOG; - close NEW; - # check whether any lines matched - if zero it's an error straight away - # and no point in doing the diff - if ($lines == 0){ - # print failure keyword here to flag it as an error - print "=== Alert! $warnkey no lines matching $match were found for $truncalgoname in log file\n"; - print "art-result: 2 $name.Regtest\n"; - $regtestresult = FALSE; - next REGTEST; - } - # diff the output and the reference - # even if verify is off - my $rc = 0; - $reffile = resolveSymlinks($reffile); - print "old/reference file $reffile\n"; - print "new/test file $newfile\n"; - print "< old/reference\n> new/test\n"; - print substr($reffile, 0, 4); -# identify location of ref file - if( substr($reffile, 0, 4) eq "/tmp" ){ - print "=== This test looks for reference in /tmp directory\n"; - } elsif( substr($reffile, 0, 3) eq "../" ){ - print "=== This test looks for reference in another directory\n"; - } elsif (substr($reffile, 0, 1) eq "/" ){ - print "=== This test looks for reference in /cvmfs or /afs or /localhome directory\n"; - } else { - print "=== This test looks for reference from svn\n"; - } - if (-e $reffile) { - # print "old/reference file exists!\n"; - systemcall("echo -e 'total lines in old/reference:' `wc -l $reffile` >>$regtestout",TRUE); - systemcall("echo -e 'total lines in new/test :' `wc -l $newfile` >>$regtestout",TRUE); - systemcall("echo -e '< old/reference\n> new/test' >> $regtestout", TRUE); - $rc = systemcall("diff $reffile $newfile", TRUE); - $rc = systemcall("diff $reffile $newfile >> $regtestout", TRUE); - - # Do HTML diff if differences are small enough - $difflines = `wc -l $regtestout | cut -d' ' -f1`; - if ($difflines < 1000) { - systemcall("htmldiff.py -w 80 $reffile $newfile > $htmldiffout 2>&1", TRUE); - } - if ($rc == 0){ - print "=== Output is the same as reference for $algoname\n"; - print "art-result: 0 $name.Regtest\n"; - } else { - # print failure keyword here to flag it as an error - print "=== Alert! $warnkey Output differs from reference for $algoname\n"; - print " If this change is understood, please update the reference file"; - if(substr($reffile, 0, 6) eq "/cvmfs" ){ - print "by typing:\n cp $newfile $reffile\n"; - } else { - print ".\n"; - } - print "art-result: 1 $name.Regtest\n"; - $regtestresult = FALSE; - next REGTEST; - } - } - else { - print "=== Alert! old/reference file: $reffile does not exist - check if this is a new release!\n"; - print "art-result: 2 $name.Regtest\n"; - } - } - if (!$regtestresult){ - push @statuscodes, 'ATHENA_REGTEST_FAILED'; - } - - # compress log file - if ($config{$id}->{'compresslog'}){ - systemcall("gzip -9 $logfile"); - } - -# print "$prog debug: returning result $result (" -# . ($result ? "true" : "false") . ")\n" if ($debug); - return; -} - - -# wrap system calls to provide for verify and debug modes. -# second, optional argument overrides verify mode if TRUE -sub systemcall($;$){ - my $override_verify = FALSE; - my $command; - ($command, $override_verify) = @_; - - my $rc = 0; - if ($verify or $debug){ - print "$prog: command: $command\n"; - } - if (!$verify or $override_verify){ - $rc = system ($command); - } - $rc = ($rc >> 8); # see http://perldoc.perl.org/functions/system.html - if ($debug){ - print "$prog: return code " . $rc . "\n"; - } - return $rc; -} - -# Resolve all symlinks in given path -sub resolveSymlinks() { - my ($path) = @_; - return $path if (length $path == 0); - my $respath = `readlink -f $path`; - if ($? != 0) { - return $path; # failure: return original path - } - chomp $respath; - return $respath; -} - -# Read ReleaseData file and return dictionary with content -sub release_metadata() { - my %data; - my @dir = grep(/\/$ENV{'AtlasProject'}\//, split(':',$ENV{'LD_LIBRARY_PATH'})); - open RELDATA, "$dir[0]/../ReleaseData" or print "=== Alert! Cannot open ReleaseData file\n"; - while (<RELDATA>) { - chomp; - my @kv = split(':'); - $data{$kv[0]} = $kv[1]; - } - return %data; -} diff --git a/Trigger/TrigValidation/TrigValTools/bin/trigtestlink.py b/Trigger/TrigValidation/TrigValTools/bin/trigtestlink.py deleted file mode 100755 index 99c2c0e97578b76d224677bb8991cc55628b0aec..0000000000000000000000000000000000000000 --- a/Trigger/TrigValidation/TrigValTools/bin/trigtestlink.py +++ /dev/null @@ -1,69 +0,0 @@ -#!/usr/bin/env python - -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import os,re,sys - -if len(sys.argv)==1: - print "This creates a soft link to the specified test in the nightly directory\n" - print "%s <testname> ... to link a test" % os.path.basename(sys.argv[0]) - print "%s -l ... to show all tests" % os.path.basename(sys.argv[0]) - sys.exit(1) - -testname = sys.argv[1] - -path = os.environ['PATH'] - -projects = '|'.join(["AtlasP1HLT","AtlasCAFHLT","AtlasTestHLT","AtlasTrigger","AtlasAnalysis","AtlasHLT","AtlasProduction"]) - -for p in path.split(':'): - - #m = re.match('(?P<base>/afs/cern.ch/atlas/software/.*\.X.*/(?:%s)/.*)/InstallArea/share/bin' % projects, p) - m = re.match('(?P<base>/afs/cern.ch/atlas/software/.*/(?:%s)/.*)/InstallArea/share/bin' % projects, p) - if not m: continue - nicosarea = "%s/NICOS_area" % m.groupdict()['base'] - - for dirname, subdirs, files in os.walk(nicosarea): - - basename = os.path.basename(dirname) - - if basename == "NICOS_area": - # pick out the atntest area (only exists for nigthly releases) - subdirs[:] = [x for x in subdirs if re.match("NICOS_atntest.*",x)] - if len(subdirs)>0: - atnarea = subdirs[0] # usually the opt build - else: - atnarea = "" - continue - - if basename == atnarea: - subdirs[:] = ["trigp1test_testconfiguration_work", "triggertest_testconfiguration_work", "triganalysistest_testconfiguration_work"] - continue - - - if basename in ["trigp1test_testconfiguration_work", "triggertest_testconfiguration_work", "triganalysistest_testconfiguration_work"]: - if testname == "-l": - conf = { "trigp1test_testconfiguration_work" : "TrigP1Test.conf", - "triggertest_testconfiguration_work" : "TriggerTest.conf", - "triganalysistest_testconfiguration_work" : "TrigAnalysisTest.conf" }[basename] - # list all tests - print "\n"+basename+":" - print len(basename)*"=" + "=" - w = max(len(x) for x in subdirs) - for test in sorted(subdirs): - print "%-*s ==> trigtest.pl --cleardir --test %s --rundir %s --conf %s" % (w, test,test,test,conf) - continue - - if basename == testname: - try: - os.symlink(dirname,basename) - print "Linking to",dirname - except OSError, e: - print "File can't be linked, because:",e - sys.exit(1) - - sys.exit(0) - - -if testname != "-l": - print "Did not find %s in %s/%s/trig{p1,ger,analysis}test_testconfiguration_work" % (testname,nicosarea,atnarea) diff --git a/Trigger/TrigValidation/TrigValTools/share/leakCheck.py b/Trigger/TrigValidation/TrigValTools/share/leakCheck.py deleted file mode 100644 index bd580ea6a6a13f1435b6048717f846126140d83a..0000000000000000000000000000000000000000 --- a/Trigger/TrigValidation/TrigValTools/share/leakCheck.py +++ /dev/null @@ -1,10 +0,0 @@ -# add for memory tracking -import Hephaestus.MemoryTracker as memtrack -# Try to write the leaks into separate file -try: - memtrack.depth( 22 ) # sets the total search depth - memtrack.MemoryTrace.size( 19 ) # size of traces kept in memory - memtrack.outstream( open("LeakCheck.txt","w") ) -except: - print "ERROR setting memory depth" - diff --git a/Trigger/TrigValidation/TrigValTools/share/trig_counts_summary.py b/Trigger/TrigValidation/TrigValTools/share/trig_counts_summary.py deleted file mode 100755 index ceea9269bf9e54a0c23d771adbe2797d76d7ea9f..0000000000000000000000000000000000000000 --- a/Trigger/TrigValidation/TrigValTools/share/trig_counts_summary.py +++ /dev/null @@ -1,523 +0,0 @@ -#!/bin/env python -# -# atn basepath -# /afs/cern.ch/atlas/software/builds/nightlies/devval/AtlasTrigger/$rel/NICOS_area/NICOS_qmtest15X0VAL32BS4TrgOpt/triggertest_testconfiguration_work/$test/$ref - - -import glob -from itertools import chain -import ROOT -import os -from datetime import datetime -import logging as log -import xml.etree.cElementTree as ET -import re - -log.basicConfig(format='%(levelname)-15s %(message)s', level=log.ERROR) - -#exec (file("/afs/cern.ch/atlas/software/dist/AtlasLogin/python/atlconfiguration.py")) - - - -class CountsSummaryException: - pass -#atlconf = Configuration() -class Utils: - @staticmethod - def today(): - return datetime.today().isoweekday()%7 - - @staticmethod - def testdate(file): - """ - Returnd date when the test was run. - """ - return datetime.fromtimestamp(os.path.getmtime(file)) - - @staticmethod - def wildcarding(list_of_tests): - def __can_be_wildcarded(str1, str2): - if len(str1) == len(str2): - different = ''.join([ (x[0], '*')[x[0] != x[1]] for x in zip(str1, str2)]) - if different.count('*') == 1: - return different - return None - - tests = sorted(list(list_of_tests), key=lambda x: str(len(x))+x) - #print tests - - possible_wildcards = set() - for pair in zip(tests[:-1], tests[1:]): - pattern = __can_be_wildcarded(pair[0], pair[1]) - #print pattern, pair - if pattern: - possible_wildcards.add(pattern) - tests.extend(possible_wildcards) - return tests - - - -class CountsCheck: - """ - Counts checkers. - """ - def __init__(self, failed, text): - self.failed = bool(failed) - self.text = text - - @staticmethod - def any_different(counts): - return CountsCheck(len(set(counts)) != 1, 'diff') - - @staticmethod - def two_perecnt(counts): - day_to_day = zip(counts[:-1], counts[1:]) - diffs = map(lambda x: 1.0*abs(x[0]-x[1]) > 0.02*max(x), day_to_day) - return CountsCheck(bool(diffs.count(True)), "day-to-day>2%" ) - - @staticmethod - def five_perecnt(counts): - day_to_day = zip(counts[:-1], counts[1:]) - diffs = map(lambda x: 1.0*abs(x[0]-x[1]) > 0.05*max(x), day_to_day) - return CountsCheck(bool(diffs.count(True)), "day-to-day>5%" ) - - @staticmethod - def went_to_zero(counts): - return CountsCheck( CountsCheck.any_different(counts).failed and counts.count(0) , "hit zero") - - @staticmethod - def disabled(counts): - return CountsCheck( counts.count(-1) , "disabled") - - @staticmethod - def rtt_robust_check(counts): - day_to_day = zip(counts[:-1], counts[1:]) - diffs = map(lambda x: 1.*abs(x[0]-x[1])>5, day_to_day) - return CountsCheck(bool(diffs.count(True)) and CountsCheck.five_perecnt(counts), "rtt check" ) - -class Atn: - - def location(self, build, test, rel): - """ Finds the location of the ATN test - - It needs to know build, test name and release. It searches 4 possible projects - AtlasTrigger, AtlasHLT, AtlasP1HLt, AtlasCAFHLT (this is this nasty piece with square brackets .. - I could not make glow working with (Atlas|HLT|...). - - Returned value is list of matching paths, and list of actual test names - """ - tog = '/afs/cern.ch/atlas/software/builds/nightlies/'+build+'/Atlas[TPCH][r1AL]*/'+\ - rel+'/NICOS_area/NICOS_atntest*32BS5G4*Opt/*/'+test - #print tog - g = glob.glob(tog) - return g, [x.split('/')[-1] for x in g] - - - - def available_tests(self, build='*'): - #tog='/afs/cern.ch/atlas/software/builds/nightlies/*/Atlas[TPCH][r1AL]*/rel_*/' - def basic_from_path(path): - return path.split('/')[7:10] - - def build_test_from_path(path): - return tuple(path.split('/')[7:14:6]) # the build is at position 7 and at 13 is the test dir (7+6 == 13) - - tog='/afs/cern.ch/atlas/software/builds/nightlies/'+build+'/Atlas[TPCH][r1AL]*/rel_*/' - stage1 = glob.glob(tog) - #print stage1 - - tests = {} - for path in stage1: - details = basic_from_path(path) - #print details - tog = '/afs/cern.ch/atlas/software/builds/nightlies/'+details[0]+'/'+details[1]+'/'+details[2]+'/NICOS_area/NICOS_atntest*32BS5G4*Opt/trig*configuration_work/*/expert-monitoring.root' - # print '.... scanning ', tog - stage2 = glob.glob(tog) - for zz in stage2: - build, test_name = build_test_from_path(zz) - # print build, testdir - tests.setdefault(build, set()).add(test_name) - return tests - - def checks(self): - return [ CountsCheck.any_different, - CountsCheck.went_to_zero, - CountsCheck.disabled ] - - - -class Rtt: - __domain='*' - def __init__(self, domain): - self.__memoized_tests = {} # keyed by the test_name - self.__memoized_test_names = [] - Rtt.__domain=domain - - @staticmethod - def __test_name(path): - br = path.split('/') - f = '/'.join(br[:-1])+'/rttjobinfo.xml' - name = None - try: - et = ET.parse(f) - name = et.getroot().findall('.//jobDisplayName')[0].text.strip('\n\t ') - if name == '': - name = et.getroot().findall('.//jobName')[0].text.strip('\n\t ') - del et - except: - log.warning("... problem finding jobDisplayName in: %s, ignoring this test" % f) - return name - - @staticmethod - def __details(path): - br = path.split('/') - # get info from the path - rel = br[9] - build = br[10] - return rel, build - - @staticmethod - def __path(build, rel='*'): - #p = '/afs/cern.ch/atlas/project/RTT/prod/Results/rtt/%s/%s/build/i686-slc5-gcc43-opt/%s/Trig*Test/*/*/*/expert-monitoring.root' % (rel, build, Rtt.__domain) - p = '/afs/cern.ch/atlas/project/RTT/prod/Results/rtt/%s/%s/build/i686-slc5-gcc43-opt/%s/Trig*Test/*/expert-monitoring.root' % (rel, build, Rtt.__domain) - log.debug('rtt path: %s' % p) - return p - - def location(self, build, test, rel, domain='*'): - """ - Return locations and actual test names (the test param can be wildcard). - - """ - key = test+build - if key not in self.__memoized_test_names: - #print ".... memoizing test name", test, build, rel - self.__memoized_test_names.append(key) - tog = Rtt.__path(build) - dirs = glob.glob(tog) - for path in dirs: - test_name = Rtt.__test_name(path) - if test_name != None: - self.__memoized_tests.setdefault(test_name, []).append(path) - - cre = re.compile(test) - paths = [] - real_names = [] - - for test_name, allp in self.__memoized_tests.iteritems(): - for p in allp: - r, b = Rtt.__details(p) - if cre.match(test_name) and rel == r and build == b: - log.debug(".... test matching keyword: %s - (%s) (%s) (%s) (%s) " % (test, test_name, build, rel, p) ) - paths.append('/'.join(p.split('/')[:-1])) - real_names.append(test_name) - - return paths, real_names - - def available_tests(self, build='*'): - tog = Rtt.__path(build) - log.debug('scanning RTT dir: ' + tog ) - dirs = glob.glob(tog) - log.debug('found '+str(len(dirs))+ ' directories') - tests = {} - for path in dirs: - test_name = Rtt.__test_name(path) - if test_name != None and test_name != '': - tests.setdefault(build, set()).add(test_name) - return tests - - def checks(self): - return [ CountsCheck.rtt_robust_check, - CountsCheck.disabled ] - - - - -class TestSystem: - def __init__(self): - self.__system = None - - def set(self, system): - self.__system = system - - def __call__(self): - return self.__system - -TestSystem = TestSystem() - - -class Counts: - def __init__(self, build, test_name, rel): - """ crates access point to L2 and EF counts given build (i.e. dev), test name (i.e. AthenaTrigRDO), and release/nighly (rel_1) - - """ - self.__build = build - self.__rel = rel - self.__test_name = test_name - - self.__dirnames, self.__tests = TestSystem().location(build, test_name, rel) - if len(self.__dirnames) == 0: - log.warning("No data for the "+build+" "+test_name+" "+rel) - raise CountsSummaryException - - log.debug('... Counts dirctories seems to be ok: %s' % str(self.__dirnames)) - - self.__date = max([Utils.testdate(d) for d in self.__dirnames]) - - - self.__counts = {'L2': None, 'EF': None} - self.__events = {'L2': None, 'EF': None} - - def datetime(self): - return self.__date - - def build(self): - return self.__build - - def rel(self): - return self.__rel - - def tests(self): - return self.__tests - - def reduce_pool_of_tests(self, test_names): - self.__dirnames, self.__tests = zip(*[ t for t in zip(self.__dirnames, self.__tests) if t[1] in test_names ]) - self.__counts = {'L2': None, 'EF': None} # scratch so far summed up counts counts - self.__events = {'L2': None, 'EF': None} - - def scale(self, level, factor): - - if self.events(level) == 0.: - return - scale_by = factor/self.events(level) - log.info("scalling up by:%f", scale_by) - for k,v in self.counts(level).iteritems(): - self.__counts[level][k] = int(v*scale_by) - - def events(self, level): - counts = self.counts(level) - return self.__events[level] - - def counts(self, level='L2'): - """ - Gives back dictionary where key is chain name and value is count of passed events. - - Counts are teken from L2Chain.txt or EFChain.txt if they exist. Else stright from the expert-monitoring.root file. - If none exists ... empty dict is returned. - - It is expensive call for the first time. Then it uses it's own cache. - """ - if self.__counts[level] != None: - return self.__counts[level] - - - self.__counts[level] = {} - - rootnames = [ d+'/expert-monitoring.root' for d in self.__dirnames] - #print '... rootfiles ', rootnames - - for counts_file in rootnames: - ROOT.gErrorIgnoreLevel =7000; - r = ROOT.TFile(counts_file, "OLD") - ROOT.gErrorIgnoreLevel =0; - hist = r.Get('TrigSteer_'+level+'/ChainAcceptance'); - if hist: - #print hist - this_test_counts = [[hist.GetXaxis().GetBinLabel(bin), int(hist.GetBinContent(bin))] for bin in range(1, 1+hist.GetNbinsX()) ] - for cnt in this_test_counts: - self.__counts[level].setdefault(cnt[0], 0) - self.__counts[level][cnt[0]] += cnt[1] - log.debug("looking for the SignatureAcceptance hist in: %s" % counts_file) - hist = r.Get('TrigSteer_'+level+'/SignatureAcceptance_runsummary') - if hist: - if self.__events[level] == None: - self.__events[level] = 0. - self.__events[level] += hist.GetBinContent(1,2) # there we have total number of input events - - r.Close() - - return self.__counts[level] - - -class Overview: - def __init__(self, builds, test_name, options): - whole_week = [] - for build in builds: - for day in range(7): - try: - c = Counts(build=build, test_name=test_name, rel='rel_%d' % day) - whole_week.append(c) - except CountsSummaryException : - log.debug( '.. missing test for: %d test %s build %s' % (day, test_name, build) ) - except: - raise - - # and assure that the tests intersect - if options.intersect: - tests_across_week = [set(d.tests()) for d in whole_week] - tests_running_every_day = tests_across_week[0] - tests_running_any_day = tests_across_week[0] - - for t in tests_across_week: - tests_running_every_day = tests_running_every_day.intersection(t) - tests_running_any_day.update(t) - - log.debug('tests running whole week : '+' '.join(tests_running_every_day)) - log.debug('tests running at least once a week: '+' '.join(tests_running_any_day)) - [ d.reduce_pool_of_tests(list(tests_running_every_day)) for d in whole_week ] - - # eliminate days when test gave no counts - self.__week = [d for d in whole_week if d.counts('L2') != {} or d.counts('EF') != {} ] - del whole_week - - # normalize counts to the best day - if options.normalize: - log.info('Will normalize the counts') - ev_max = max([d.events('L2') for d in self.__week ]) - [d.scale('L2', ev_max) for d in self.__week ] - ev_max = max([d.events('EF') for d in self.__week ]) - [d.scale('EF', ev_max) for d in self.__week ] - - self.sort(options) - - - def chains(self, level): - ch = list(set(reduce( lambda x,y: x+y, [ d.counts(level).keys() for d in self.__week ], []))) - #print ch - return ch - #return [set( chain.from_iterable([ d.counts(level).keys() for d in self.__week ]))] - - def sort(self, options): - def __by_date_or_rel( d ): - return "%05d" % ( ((d.datetime().month*31)+d.datetime().day)*24+d.datetime().hour) - - if 'rel' in options.ordering: - log.info("Will sort the counts by nightly") - __by_date_or_rel = lambda d: d.rel() - - __ordering = __by_date_or_rel - - if options.ordering == 'build': - log.info("Will sort the counts by build") - __ordering = lambda d: d.build()+__by_date_or_rel(d) - - self.__week.sort(key = __ordering ) - - def __difference(self, counts): - """ - Returns list of results for all registered checks which failed. - """ - return [ c for c in map( lambda x: x(counts), TestSystem().checks() ) ] - - def ascii(self, print_all): - """ - Print on the terminal. - - """ - week = self.__week - - print 'counts evolution for: ', opt.builds, opt.test - print 'overall sum of tests: ', ' '.join(list(set(chain.from_iterable([w.tests() for w in self.__week])))) - # figure out all tests which are summed up - if len(set([len(w.tests()) for w in self.__week])) != 1: - log.warning( '. number of summed up tests not equal for each week, consider using option -i' ) - - print '-'*(40+1+7*len(week)) - format = '%-40s '+''.join([' %6d']*len(week)) - sformat = '%-40s '+''.join([' %6s']*len(week)) - print sformat % tuple(["build"] + [d.build().split('.')[-1] for d in week] ) - print format % tuple(["day of the month"] + [d.datetime().day for d in week] ) - - print sformat % tuple(["rel"]+[ d.rel() for d in week ]), ' _checks which failed_' - try: - print sformat % tuple(["events L2"]+[ int(d.events('L2')) for d in week ]) - print sformat % tuple(["events EF"]+[ int(d.events('EF')) for d in week ]) - except: pass - - def __print_one_level(level): - print sformat % tuple(['----'+level+'---------'] + ['----']*len(week)) - keys = set( chain.from_iterable([ d.counts(level).keys() for d in week ])) - for k in sorted(keys): - # figure out if there was any change - # collect counts for this chain for all week - counts = [ d.counts(level).setdefault(k, -1) for d in week] - diff_checks = self.__difference(counts) - diff = map( lambda x: x.failed, diff_checks).count(True) - - if print_all or diff: - print format % tuple([k]+counts), ' & '.join([ (' '*len(c.text), c.text)[c.failed] for c in diff_checks ] ) - - __print_one_level('L2') - __print_one_level('EF') - - def dictionarize(self): - ret = {} - - day = [d.datetime().day for d in self.__week] - today = map(lambda x: [0, 1][Utils.today()==x], [int(d.rel()[-1]) for d in self.__week] ) - build = [d.build() for d in self.__week] - rel = [ d.rel() for d in self.__week ] - l2ev = [ d.events('L2') for d in self.__week ] - efev = [ d.events('EF') for d in self.__week ] - - ret['meta'] = zip( day, today, build, rel, l2ev, efev) - def __dict_counts(level): - keys = self.chains(level) - l = {} - for k in keys: - counts = [ d.counts(level).setdefault(k, -1) for d in self.__week] - diff_checks = self.__difference(counts) - l[k] = (counts, diff_checks) - return l - ret['L2'] = __dict_counts('L2') - ret['EF'] = __dict_counts('EF') - return ret - - -if __name__ == "__main__": - import optparse - parser = optparse.OptionParser('show chain counts for tests') - - parser.add_option('-b', '--builds', default='dev', - help='builds, coma separated list of '+' '.join( [ n.split('/')[-1] for n in glob.glob('/afs/cern.ch/atlas/software/builds/nightlies/*')]) , metavar='BUILD') - parser.add_option('-d', '--domain', default='*', - help='test suite domain [p1hlt|offline], if not specified test results will be merged') - parser.add_option('-t', '--test', default='AthenaTrigRDO', - help='test name, look at NICOS test page for test names', metavar='TEST') - parser.add_option('-a', '--all', default=False, action='store_true', - help='print all chains (not only those changing)') - parser.add_option('-l', '--list', default=False, action='store_true', - help='print all tests in all builds (takes long time to execute, and output is just huge)') - parser.add_option('-s', '--sys', default='ATN', - help='Test system, either ATN (default) or RTT') - parser.add_option('-v', '--verbose', default=0, action='store_true', - help='More verbose output') - parser.add_option('-i', '--intersect', default=0, action='store_true', - help='from the set of tests (when wildcard is used) ') - parser.add_option('-n', '--normalize', default=0, action='store_true', - help='normalize (scaling up to the day wiht highest number of processed events) the counts before comparison') - parser.add_option('-o', '--ordering', default='date', - help='results ordering: date(default), build, rel') - - (opt,args) = parser.parse_args() - if opt.verbose: - log.getLogger().setLevel(log.DEBUG) - log.debug('... more debug ') - - TestSystem.set(Atn()) - if opt.sys == 'RTT': - TestSystem.set(Rtt(opt.domain)) - - if opt.list: - log.debug('... scanning for available tests') - tests = TestSystem().available_tests(opt.builds) - for build, tests in tests.iteritems(): - print '-'*80 - print 'Build: ', build - print '\n'.join(sorted(Utils.wildcarding(tests))) - import sys - sys.exit(0) - - over = Overview(opt.builds.split(','), opt.test, opt) - over.ascii(opt.all) - - diff --git a/Trigger/TrigValidation/TriggerTest/test/exec_athena_art_trigger_validation.sh b/Trigger/TrigValidation/TriggerTest/test/exec_athena_art_trigger_validation.sh index 457f96fc52c81a10daac3ab1839b20007260d12b..71a0b86b6e21d8d2dd913cf18d7e7aa49292661f 100755 --- a/Trigger/TrigValidation/TriggerTest/test/exec_athena_art_trigger_validation.sh +++ b/Trigger/TrigValidation/TriggerTest/test/exec_athena_art_trigger_validation.sh @@ -41,20 +41,20 @@ elif [[ $INPUT == "ftk" ]]; then export DS='["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TriggerTest/mc16_13TeV.410470.PhPy8EG_A14_ttbar_hdamp258p75_nonallhad.digit.RDO_FTK.e6337_e5984_s3126_d1480_d1471_tid15265974_00/RDO_FTK.15265974._004440.pool.root.1"]' elif [[ $INPUT == "bphysics" ]]; then - export DS='["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TriggerTest/mc15_RTT_1000_Bphysics_toAOD_r6889/Bphysics_RDO_r6889_mixed.pool.root"]' + export DS='["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TriggerTest/RDO_FTK.Bphysics_1000.pool.root.1"]' elif [[ $INPUT == "mubphysics" ]]; then - export DS='["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TriggerTest/mc15_13TeV.180593.Pythia8_AUMSTW2008LO_Wtaunu_3mu_noPhotos.recon.RDO.e3802_s2608_s2183_r6790/RDO.05594910._000008.pool.root.1"]' + export DS='["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TriggerTest/mc16_13TeV.180593.Pythia8_AUMSTW2008LO_Wtaunu_3mu_noPhotos.digit.RDO_FTK.e3802_s3126_r11234_d1505/RDO_FTK.17121384._000012.pool.root.1","/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TriggerTest/mc16_13TeV.180593.Pythia8_AUMSTW2008LO_Wtaunu_3mu_noPhotos.digit.RDO_FTK.e3802_s3126_r11234_d1505/RDO_FTK.17121384._000028.pool.root.1"]' elif [[ $INPUT == "minbias" ]]; then - export DS='["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TriggerTest/mc15_13TeV.361203.Pythia8_A2_MSTW2008LO_ND_minbias.recon.RDO.e3639_s2606_s2174_r7661_tid07858100_00/RDO.07858100._000087.pool.root.1"]' + export DS='["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TriggerTest/RDO_FTK.minbias_1000.pool.root.1"]' elif [[ $INPUT == 'data' ]]; then - export DS='["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1"]' + export DS='["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data18_13TeV.00360026.physics_EnhancedBias.recon.RAW.r10978/RAW.15789997._002546.pool.root.1"]' else # Default - ttbar - export DS='["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TriggerTest/valid1.110401.PowhegPythia_P2012_ttbar_nonallhad.recon.RDO.e3099_s2578_r7572_tid07644622_00/RDO.07644622._000001.pool.root.1","/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TriggerTest/valid1.110401.PowhegPythia_P2012_ttbar_nonallhad.recon.RDO.e3099_s2578_r7572_tid07644622_00/RDO.07644622._000002.pool.root.1"]' + export DS='["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TriggerTest/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.digit.RDO_FTK.e4993_s3214_r11234_d1505/RDO_FTK.17071950._000065.pool.root.1","/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TriggerTest/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.digit.RDO_FTK.e4993_s3214_r11234_d1505/RDO_FTK.17071950._000235.pool.root.1"]' fi trap 'PREVIOUS_COMMAND=$THIS_COMMAND; THIS_COMMAND=$BASH_COMMAND' DEBUG diff --git a/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDM.py b/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDM.py index 1860061ee18421d06dbcf97e3b8a767f4c52adab..cc3b00049c213c7ab3baf137fd4dc36d79b44ac2 100644 --- a/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDM.py +++ b/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDM.py @@ -610,6 +610,10 @@ TriggerHLTList = [ ('xAOD::JetContainer#HLT_a4sktclcwnojcalibFS', 'BS ESD AODFULL', 'Jet'), ('xAOD::JetTrigAuxContainer#HLT_a4sktclcwnojcalibFSAux.', 'BS ESD AODFULL', 'Jet'), + # SoftKiller + ('xAOD::JetContainer#HLT_a4_sktclcwnojcalibFS', 'BS ESD AODFULL', 'Jet'), + ('xAOD::JetTrigAuxContainer#HLT_a4_sktclcwnojcalibFSAux.', 'BS ESD AODFULL', 'Jet'), + #GSC ('xAOD::JetContainer#HLT_GSCJet', 'BS ESD AODFULL AODSLIM AODVERYSLIM', 'Bjet'), ('xAOD::JetTrigAuxContainer#HLT_GSCJetAux.', 'BS ESD AODFULL AODSLIM AODVERYSLIM', 'Bjet'), diff --git a/Trigger/TriggerCommon/TriggerJobOpts/python/TestSliceFlags.py b/Trigger/TriggerCommon/TriggerJobOpts/python/TestSliceFlags.py new file mode 100644 index 0000000000000000000000000000000000000000..74512b685aae0e069df34af16b64955122034197 --- /dev/null +++ b/Trigger/TriggerCommon/TriggerJobOpts/python/TestSliceFlags.py @@ -0,0 +1,36 @@ +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + +""" Test slice specific flags """ + +from AthenaCommon.JobProperties import JobProperty, JobPropertyContainer +from TriggerJobOpts.CommonSignatureHelper import CommonSignatureHelper + +_flags = [] + +class signatures(JobProperty): + """ signatures in Test slice """ + statusOn=True + allowedTypes=['list'] + + StoredValue = [ + ] + +_flags.append(signatures) + +# create container +class TestSlice(JobPropertyContainer, CommonSignatureHelper): + """ Test Slice Flags """ + +from TriggerJobOpts.TriggerFlags import TriggerFlags +TriggerFlags.add_Container(TestSlice) + +# add add common slice flags +TriggerFlags.TestSlice.import_JobProperties('CommonSignatureFlags') + +for flag in _flags: + TriggerFlags.TestSlice.add_JobProperty(flag) +del _flags + +# make an alias +TestSliceFlags = TriggerFlags.TestSlice + diff --git a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfig.py b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfig.py index 16edb349cb7f3b4a8947114885f8e44c59bdfa08..9fbf72f64a17698d05e01c90944b93e1a575fe94 100644 --- a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfig.py +++ b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfig.py @@ -7,7 +7,7 @@ from AthenaCommon.Logging import logging __log = logging.getLogger('TriggerConfig') def collectHypos( steps ): - """ + """ Method iterating over the CF and picking all the Hypothesis algorithms Returned is a map with the step name and list of all instances of hypos in that step. @@ -21,11 +21,11 @@ def collectHypos( steps ): if "filter" in stepSeq.name(): __log.info("Skipping filtering steps " +stepSeq.name() ) continue - + __log.info( "collecting hypos from step " + stepSeq.name() ) # start = {} for seq,algs in flatAlgorithmSequences( stepSeq ).iteritems(): - + for alg in algs: # will replace by function once dependencies are sorted if 'HypoInputDecisions' in alg.getProperties(): @@ -38,7 +38,7 @@ def collectHypos( steps ): def __decisionsFromHypo( hypo ): """ return all chains served by this hypo and the key of produced decision object """ if hypo.getType() == 'ComboHypo': - return hypo.MultiplicitiesMap.keys(), hypo.HypoOutputDecisions[0] + return hypo.MultiplicitiesMap.keys(), hypo.HypoOutputDecisions[0] else: # regular hypos return [ t.name() for t in hypo.HypoTools ], hypo.HypoOutputDecisions @@ -46,11 +46,11 @@ def __decisionsFromHypo( hypo ): def collectFilters( steps ): """ - Similarly to collectHypos but works for filter algorithms + Similarly to collectHypos but works for filter algorithms - The logic is simpler as all filters are grouped in step filter sequences + The logic is simpler as all filters are grouped in step filter sequences Returns map: step name -> list of all filters of that step - """ + """ __log.info("Collecting hypos") from collections import defaultdict filters = defaultdict( list ) @@ -68,29 +68,29 @@ def collectDecisionObjects( hypos, filters, l1decoder ): decisionObjects = set() __log.info("Collecting decision obejcts from L1 decoder instance") decisionObjects.update([ d.Decisions for d in l1decoder.roiUnpackers ]) - decisionObjects.update([ d.Decisions for d in l1decoder.rerunRoiUnpackers ]) + decisionObjects.update([ d.Decisions for d in l1decoder.rerunRoiUnpackers ]) + - __log.info("Collecting decision obejcts from hypos") __log.info(hypos) for step, stepHypos in hypos.iteritems(): for hypoAlg in stepHypos: __log.debug( "Hypo %s with input %s and output %s " % (hypoAlg.getName(), str(hypoAlg.HypoInputDecisions), str(hypoAlg.HypoOutputDecisions) ) ) - __log.debug( "and hypo tools %s " % (str( [ t.getName() for t in hypoAlg.HypoTools ] ) ) ) + __log.debug( "and hypo tools %s " % (str( [ t.getName() for t in hypoAlg.HypoTools ] ) ) ) decisionObjects.add( hypoAlg.HypoInputDecisions ) decisionObjects.add( hypoAlg.HypoOutputDecisions ) - + __log.info("Collecting decision obejcts from filters") for step, stepFilters in filters.iteritems(): for filt in stepFilters: decisionObjects.update( filt.Input ) decisionObjects.update( filt.Output ) - + return decisionObjects - + def triggerSummaryCfg(flags, hypos): - """ + """ Configures an algorithm(s) that should be run after the slection process Returns: ca, algorithm """ @@ -101,15 +101,15 @@ def triggerSummaryCfg(flags, hypos): for stepName, stepHypos in sorted( hypos.items() ): for hypo in stepHypos: hypoChains,hypoOutputKey = __decisionsFromHypo( hypo ) - allChains.update( dict.fromkeys( hypoChains, hypoOutputKey ) ) + allChains.update( dict.fromkeys( hypoChains, hypoOutputKey ) ) for c, cont in allChains.iteritems(): - __log.info("Final decision of chain " + c + " will be red from " + cont ) + __log.info("Final decision of chain " + c + " will be red from " + cont ) decisionSummaryAlg.FinalDecisionKeys = list(set(allChains.values())) decisionSummaryAlg.FinalStepDecisions = allChains decisionSummaryAlg.DecisionsSummaryKey = "HLTSummary" # Output return acc, decisionSummaryAlg - + def triggerMonitoringCfg(flags, hypos, l1Decoder): @@ -131,21 +131,21 @@ def triggerMonitoringCfg(flags, hypos, l1Decoder): for hypo in stepHypos: hypoChains, hypoOutputKey = __decisionsFromHypo( hypo ) stepDecisionKeys.append( hypoOutputKey ) - allChains.update( hypoChains ) - + allChains.update( hypoChains ) + dcTool = DecisionCollectorTool( "DecisionCollector" + stepName, Decisions=stepDecisionKeys ) __log.info( "The step monitoring decisions in " + dcTool.name() + " " +str( dcTool.Decisions ) ) mon.CollectorTools += [ dcTool ] - + #mon.FinalChainStep = allChains mon.L1Decisions = l1Decoder.getProperties()['L1DecoderSummaryKey'] if l1Decoder.getProperties()['L1DecoderSummaryKey'] != '<no value>' else l1Decoder.getDefaultProperty('L1DecoderSummary') allChains.update( l1Decoder.ChainToCTPMapping.keys() ) - mon.ChainsList = list( allChains ) + mon.ChainsList = list( allChains ) return acc, mon def triggerOutputStreamCfg( flags, decObj, outputType ): - """ + """ Configure output stream according to the menu setup (decision objects) and TrigEDMCOnfig """ @@ -161,7 +161,7 @@ def triggerOutputStreamCfg( flags, decObj, outputType ): from TrigEDMConfig.TriggerEDMRun3 import TriggerHLTList EDMCollectionsToRecord=filter( lambda x: outputType in x[1] and "TrigCompositeContainer" not in x[0], TriggerHLTList ) itemsToRecord.extend( [ el[0] for el in EDMCollectionsToRecord ] ) - + # summary objects __log.debug( outputType + " trigger content "+str( itemsToRecord ) ) acc = OutputStreamCfg( flags, outputType, ItemList=itemsToRecord ) @@ -169,10 +169,10 @@ def triggerOutputStreamCfg( flags, decObj, outputType ): streamAlg.ExtraInputs = [("xAOD::TrigCompositeContainer", "HLTSummary")] return acc - + def triggerAddMissingEDMCfg( flags, decObj ): - from DecisionHandling.DecisionHandlingConf import TriggerSummaryAlg + from DecisionHandling.DecisionHandlingConf import TriggerSummaryAlg EDMFillerAlg = TriggerSummaryAlg( "EDMFillerAlg" ) EDMFillerAlg.InputDecision = "L1DecoderSummary" @@ -186,7 +186,7 @@ def triggerAddMissingEDMCfg( flags, decObj ): for c in collectionsThatNeedMerging: tool = HLTEDMCreator(c[0].split("#")[1]+"merger") ctype, cname = c[0].split("#") - ctype = ctype.split(":")[-1] + ctype = ctype.split(":")[-1] viewsColl = c[3].split(":")[-1] setattr(tool, ctype+"Views", [ viewsColl ] ) setattr(tool, ctype+"InViews", [ cname ] ) @@ -197,8 +197,8 @@ def triggerAddMissingEDMCfg( flags, decObj ): #egammaViewsMerger.TrigEMClusterContainer = [ clustersKey ] return EDMFillerAlg - - + + def setupL1DecoderFromMenu( flags, l1Decoder ): """ Post setup of the L1Decoder, once approved, it should be moved to L1DecoderCfg function """ @@ -207,16 +207,18 @@ def setupL1DecoderFromMenu( flags, l1Decoder ): def triggerRunCfg( flags, menu=None ): - """ + """ top of the trigger config (for real triggering online or on MC) Returns: ca only """ if flags.Trigger.doLVL1: # conigure L1 simulation pass - + acc = ComponentAccumulator() + acc.merge( triggerIDCCacheCreatorsCfg( flags ) ) + from L1Decoder.L1DecoderConfig import L1DecoderCfg #TODO # information about the menu has to be injected into L1 decoder config @@ -224,53 +226,65 @@ def triggerRunCfg( flags, menu=None ): # and item to threshold (the later can be maybe extracted from L1 config file) l1DecoderAcc, l1DecoderAlg = L1DecoderCfg( flags ) setupL1DecoderFromMenu( flags, l1DecoderAlg ) - acc.merge( l1DecoderAcc ) - + acc.merge( l1DecoderAcc ) + # detour to the menu here, (missing now, instead a temporary hack) if menu: menuAcc = menu( flags ) HLTSteps = menuAcc.getSequence( "HLTAllSteps" ) __log.info( "Configured menu with "+ str( len(HLTSteps.getChildren()) ) +" steps" ) - - + + # collect hypothesis algorithms from all sequence - hypos = collectHypos( HLTSteps ) + hypos = collectHypos( HLTSteps ) filters = collectFilters( HLTSteps ) - + summaryAcc, summaryAlg = triggerSummaryCfg( flags, hypos ) - acc.merge( summaryAcc ) - + acc.merge( summaryAcc ) + #once menu is included we should configure monitoring here as below - + monitoringAcc, monitoringAlg = triggerMonitoringCfg( flags, hypos, l1DecoderAlg ) acc.merge( monitoringAcc ) decObj = collectDecisionObjects( hypos, filters, l1DecoderAlg ) __log.info( "Number of decision objects found in HLT CF %d" % len( decObj ) ) __log.info( str( decObj ) ) - + HLTTop = seqOR( "HLTTop", [ l1DecoderAlg, HLTSteps, summaryAlg, monitoringAlg ] ) acc.addSequence( HLTTop ) - + acc.merge( menuAcc ) # output # if any output stream is requested, schedule "gap" filling algorithm if flags.Output.ESDFileName != "" or flags.Output.AODFileName != "": acc.addEventAlgo( triggerAddMissingEDMCfg( flags, decObj ), sequenceName= "HLTTop" ) - + # configure streams if flags.Output.ESDFileName != "": acc.merge( triggerOutputStreamCfg( flags, decObj, "ESD" ) ) - if flags.Output.AODFileName != "": + if flags.Output.AODFileName != "": acc.merge( triggerOutputStreamCfg( flags, decObj, "AOD" ) ) - - + + return acc +def triggerIDCCacheCreatorsCfg(flags): + """ + Configures IDC cache loading, for now unconditionally, may make it menu dependent in future + """ + acc = ComponentAccumulator() + from MuonConfig.MuonBytestreamDecodeConfig import MuonCacheCfg + acc.merge( MuonCacheCfg() ) + + from TrigUpgradeTest.InDetConfig import InDetIDCCacheCreatorCfg + acc.merge( InDetIDCCacheCreatorCfg() ) + + return acc def triggerPostRunCfg(flags): """ @@ -279,7 +293,7 @@ def triggerPostRunCfg(flags): """ acc = ComponentAccumulator() # configure in order BS decodnig, EDM gap filling, insertion of trigger metadata to ESD - + return acc @@ -290,16 +304,15 @@ if __name__ == "__main__": ConfigFlags.Trigger.L1Decoder.forceEnableAllChains = True ConfigFlags.Input.Files = ["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1",] - ConfigFlags.lock() + ConfigFlags.lock() def testMenu(flags): menuCA = ComponentAccumulator() menuCA.addSequence( seqAND("HLTAllSteps") ) return menuCA - + acc = triggerRunCfg( ConfigFlags, testMenu ) f=open("TriggerRunConf.pkl","w") acc.store(f) f.close() - diff --git a/Trigger/TriggerCommon/TriggerMenu/python/jet/AlgFactory.py b/Trigger/TriggerCommon/TriggerMenu/python/jet/AlgFactory.py index f7a604febe659ae1169684f66a4897162bfe22cd..5894c321ffd3ab5048b2cb6f295ee21457077e1e 100644 --- a/Trigger/TriggerCommon/TriggerMenu/python/jet/AlgFactory.py +++ b/Trigger/TriggerCommon/TriggerMenu/python/jet/AlgFactory.py @@ -99,6 +99,10 @@ def _get_energy_density_radius(): """Provide a common source for the energy density akt radius""" return 0.4 +def _get_soft_killer_grid_size(): + """Provide a common source for the SoftKiller grid size""" + return 0.4,0.4 + class AlgFactory(object): def __init__(self, chain_config): @@ -172,9 +176,9 @@ class AlgFactory(object): factory = 'TrigHLTJetRecFromCluster' # add factory to instance label to facilitate log file searches trkstr = self.menu_data.trkopt - if 'ftk' in self.menu_data.trkopt: - name = '"%s_%s%s"' %(factory, self.fex_params.fex_label, trkstr) - outputcollectionlabel = "'%s%s'" % (self.fex_params.fex_label, trkstr) + if 'ftk' in trkstr: + name = '"%s_%s%s"' %(factory, self.fex_params.fex_label, trkstr) + outputcollectionlabel = "'%s%s'" % (self.fex_params.fex_label, trkstr) else: name = '"%s_%s"' %(factory, self.fex_params.fex_label) outputcollectionlabel = "'%s'" % (self.fex_params.fex_label) @@ -223,13 +227,20 @@ class AlgFactory(object): factory = 'TrigHLTTrackMomentHelpers' - name = '"%s"' % factory + trkstr = self.menu_data.trkopt + + name = '"%s_%s"' % ( factory, trkstr ) + + tvassocsgkey = 'HLT_'+trkstr+'_JetTrackVtxAssoc' + tracksgkey = 'HLT_'+trkstr+'_InDetTrackParticles' + primvtxsgkey = 'HLT_'+trkstr+'_PrimaryVertices' kwds = { 'name': name, # instance label - 'tvassocSGkey': "'HLT_FTK_JetTrackVtxAssoc'", - 'trackSGkey': "'HLT_FTK_InDetTrackParticles'", - 'primVtxSGkey': "'HLT_FTK_PrimaryVertices'", + 'trkopt' : "'%s'" % trkstr, + 'tvassocSGkey': "'%s'" % tvassocsgkey, + 'trackSGkey': "'%s'" % tracksgkey, + 'primVtxSGkey': "'%s'" % primvtxsgkey, } return [Alg(factory, (), kwds)] @@ -638,6 +649,30 @@ class AlgFactory(object): return [Alg(factory, (), kwds)] + def softKillerAlg(self): + factory = 'TrigHLTSoftKiller' + + # assign a name which identifies the fex sequence and + # the python class to be instantiated. + sk_grid_param_eta,sk_grid_param_phi = _get_soft_killer_grid_size() + + name = '"%s_%s%s"' % ( + factory, + str(int(10*sk_grid_param_eta))+str(int(10*sk_grid_param_phi)), + self.fex_params.cluster_calib, + ) + + # we do not carry the SoftKiller grid sizes + # so hard wire it here (to be fixed) + kwds = {'name': name, + 'cluster_calib': '"%s"' %self.fex_params.cluster_calib_fex, + 'sk_grid_param_eta': sk_grid_param_eta, + 'sk_grid_param_phi': sk_grid_param_phi + } + + return [Alg(factory, (), kwds)] + + def dataScoutingAlg1(self, manual_attrs): factory = 'ScoutingStreamWriter' manual_attrs = manual_attrs diff --git a/Trigger/TriggerCommon/TriggerMenu/python/jet/JetDef.py b/Trigger/TriggerCommon/TriggerMenu/python/jet/JetDef.py index 3dd7f4fa65860fbb0c92c1ad8c89e12d72e345c0..f50e03545c4b806befa4c70c08f8d556d2de2330 100644 --- a/Trigger/TriggerCommon/TriggerMenu/python/jet/JetDef.py +++ b/Trigger/TriggerCommon/TriggerMenu/python/jet/JetDef.py @@ -77,7 +77,7 @@ def _check_values(chain_parts): raise RuntimeError(msg) dataTypes = [p['dataType'] for p in chain_parts] - bad = [r for r in dataTypes if r not in ('TT', 'tc', 'ion')] + bad = [r for r in dataTypes if r not in ('TT', 'tc', 'ion', 'sktc')] if bad: msg = '%s unknown dataType(s): %s' % (err_hdr, ' '.join(bad)) diff --git a/Trigger/TriggerCommon/TriggerMenu/python/jet/JetSequencesBuilder.py b/Trigger/TriggerCommon/TriggerMenu/python/jet/JetSequencesBuilder.py index e4e24ec5ef48c7f0097f7501fa18bc78f2238af1..dd23eca9b51b0863f1ad1f825c6d47964bc7750c 100644 --- a/Trigger/TriggerCommon/TriggerMenu/python/jet/JetSequencesBuilder.py +++ b/Trigger/TriggerCommon/TriggerMenu/python/jet/JetSequencesBuilder.py @@ -91,6 +91,7 @@ class JetSequencesBuilder(object): 'cmfs1': self.make_cmfs1, # cell maker full scan 'cmfs2': self.make_cmfs2, # cluster maker full scan 'ed': self.make_ed, # energy density + 'sk': self.make_sk, # SoftKiller 'ftk': self.make_ftk, # run algos for ftk track finding and xaod conversion 'tm': self.make_tm, # track moments helper 'jr': self.make_jr_clusters, # jet rec @@ -161,9 +162,14 @@ class JetSequencesBuilder(object): ('tc', 'PS', False, 'notrk'): ['ps', 'cm', 'jr'], ('ion', 'FS', False, 'notrk'): ['fs2','cmfs1','hicm','hijr'], ('TT', 'FS', False, 'notrk'): ['tt', 'jt'], - ('tc', 'FS', True, 'notrk'): ['fs2', 'cmfs1', 'cmfs2','ed', 'tr']}.get((data_type, - scan_type, - do_trimming,trkopt), []) + ('tc', 'FS', True, 'notrk'): ['fs2', 'cmfs1', 'cmfs2','ed', 'tr'], + # SoftKiller topoclusters, no need for EventDensity for rho*area subtraction + ('sktc','FS',False, 'notrk'): ['fs2','cmfs1','cmfs2','sk','jr'], + ('sktc','FS',False, 'ftk'): ['fs2','cmfs1','cmfs2','sk','ftk','tm','jr'], + ('sktc','FS',False,' ftkrefit'): ['fs2','cmfs1','cmfs2','sk','ftk','tm','jr'], + }.get((data_type, + scan_type, + do_trimming,trkopt), []) if not seq_order: msg = '%s._make_sequence_list: cannot determine sequence'\ @@ -296,6 +302,7 @@ class JetSequencesBuilder(object): ftksequence_list = TrigInDetFTKSequence("FullScan", "fullScan", sequenceFlavour=["FTKVtx"]).getSequence() elif ftkopt == 'ftkrefit': ftksequence_list = TrigInDetFTKSequence("FullScan", "fullScan", sequenceFlavour=["FTKVtx", "refit"]).getSequence() + alias = 'ftkrefittracking' ftkalgo_list = [] for seq in ftksequence_list: @@ -311,6 +318,16 @@ class JetSequencesBuilder(object): return AlgList(alg_list=self.alg_factory.trackmoment_helpers(), alias=alias) + def make_sk(self): + """Return SoftKiller Alg""" + fex_params = self.chain_config.menu_data.fex_params + alias = 'softkiller_%s' % fex_params.cluster_calib + + algs = [] + [algs.extend(f()) for f in (self.alg_factory.softKillerAlg,)] + + return AlgList(algs,alias=alias) + def make_cm(self): """Return cellmaker for non partial scan running. CellMaker does not use certain read-out optimization, diff --git a/Trigger/TriggerCommon/TriggerMenu/python/jet/jetDefInstantiator.py b/Trigger/TriggerCommon/TriggerMenu/python/jet/jetDefInstantiator.py index c795faae88102729931067c27b048c09d55b01b2..d0f17e660d2df90e16ae327b877b7a6ad2ab7a0d 100644 --- a/Trigger/TriggerCommon/TriggerMenu/python/jet/jetDefInstantiator.py +++ b/Trigger/TriggerCommon/TriggerMenu/python/jet/jetDefInstantiator.py @@ -43,6 +43,7 @@ from TrigHLTJetRec.TrigHLTJetRecConfig import (TrigHLTJetDiagnostics_named, TrigHLTHypoDiagnostics_named, TrigHLTJetDebug, TrigHLTEnergyDensity, + TrigHLTSoftKiller, TrigHLTJetDSSelector, TrigHLTTrackMomentHelpers,) diff --git a/Trigger/TriggerCommon/TriggerMenu/python/menu/MC_pp_v7.py b/Trigger/TriggerCommon/TriggerMenu/python/menu/MC_pp_v7.py index 0426c0ba1d8cec0a3449efb8703d0bacd053b8e4..9d546c5bab985b8521a59c358313037bb236413b 100644 --- a/Trigger/TriggerCommon/TriggerMenu/python/menu/MC_pp_v7.py +++ b/Trigger/TriggerCommon/TriggerMenu/python/menu/MC_pp_v7.py @@ -254,6 +254,14 @@ def setupMenu(): ['j175_lcw_subjesIS', 'L1_J100', [], [PhysicsStream], ['Rate:SingleJet', 'BW:Jet'], -1], ['j420_subjesIS', 'L1_J100', [], [PhysicsStream], ['Rate:SingleJet', 'BW:Jet'], -1], ['j420_lcw_subjesIS', 'L1_J100', [], [PhysicsStream], ['Rate:SingleJet', 'BW:Jet'], -1], + + # SoftKiller test and comparison chains + ['j60_sktc_em_nojcalib', 'L1_J20', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j60_tc_em_nojcalib', 'L1_J20', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j60_tc_em_sub', 'L1_J20', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j60_sktc_lcw_nojcalib', 'L1_J20', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j60_tc_lcw_nojcalib', 'L1_J20', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j60_tc_lcw_sub', 'L1_J20', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], # data scouting ['j0_perf_ds1_L1All', 'L1_All', [], ['DataScouting_05_Jets'], ['RATE:Cosmic_Jets_DS', 'BW:Jet'], -1], diff --git a/Trigger/TriggerCommon/TriggerMenu/python/menu/MC_pp_v8.py b/Trigger/TriggerCommon/TriggerMenu/python/menu/MC_pp_v8.py new file mode 100644 index 0000000000000000000000000000000000000000..b0fbcaafe01f50256d54541a2f2b29b60266e553 --- /dev/null +++ b/Trigger/TriggerCommon/TriggerMenu/python/menu/MC_pp_v8.py @@ -0,0 +1,1299 @@ +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + + +import TriggerMenu.menu.Physics_pp_v8 as physics_menu + +from TriggerJobOpts.TriggerFlags import TriggerFlags +from copy import deepcopy + +import re + +from AthenaCommon.Logging import logging +log = logging.getLogger( 'MC_pp_v8.py' ) + + +#--------------------------------------------------------------------- +#--------------------------------------------------------------------- +def setupMenu(): + + physics_menu.setupMenu() + PhysicsStream="Main" + + ### Remove HLT items that have a remapped L1 threshold and therefore not available in MC + L1toRemove = [] + + for prop in dir(TriggerFlags): + if prop[-5:]!='Slice': continue + sliceName=prop + m_slice=getattr(TriggerFlags,sliceName).signatures() + for chain in reversed(m_slice): + if chain[1] in L1toRemove: + del m_slice[m_slice.index(chain)] + + # stream, BW and RATE tags for Bphysics items that appear in Muon and Bphysics slice.signatures + BPhysicsStream = "BphysLS" + #BMultiMuonStream = "Main" + RATE_BphysTag = 'RATE:Bphysics' + RATE_BMultiMuonTag = 'RATE:MultiMuon' # can become RATE:BMultiMuon' with one letter change + BW_BphysTag = 'BW:Bphys' + #RATE_DYTag = 'RATE:Muon' + #BW_DYTag = 'BW:Muon' + + + # --------------------------------------------------------------------------------------- + # INPUT FORMAT FOR CHAINS: + # ['chainName', 'L1itemforchain', [L1 items for chainParts], [stream], [groups], EBstep], OPTIONAL: [mergingStrategy, offset,[merginOrder] ]], topoStartsFrom = False + # ---------------------------------------------------------------------------------------- + + TriggerFlags.TestSlice.signatures = TriggerFlags.TestSlice.signatures() + [ + ] + + TriggerFlags.AFPSlice.signatures = TriggerFlags.AFPSlice.signatures() + [ + ['afp_jetexc_L1J50', 'L1_J50', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['afp_jetexc_L1J75', 'L1_J75', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['afp_jetexc_L1J100', 'L1_J100', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ] + + + + TriggerFlags.MuonSlice.signatures = TriggerFlags.MuonSlice.signatures() + [ + ['mu28_ivarmedium', 'L1_MU20MU21', ['L1_MU20'], [PhysicsStream], ['Primary:20000','RATE:SingleMuon', 'BW:Muon'], -1], + ['mu80', 'L1_MU20MU21', ['L1_MU20'], [PhysicsStream], ['Primary:20000','RATE:SingleMuon', 'BW:Muon'], -1], + ['mu60', 'L1_MU20MU21', ['L1_MU20'], [PhysicsStream], ['Primary:20000','RATE:SingleMuon', 'BW:Muon'], -1], + ['mu20_ivarmedium_L1MU10', 'L1_MU10', [], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1], + ['mu26', 'L1_MU20MU21', ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1], + ['mu22', 'L1_MU20MU21', ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1], + ['mu20', 'L1_MU20MU21', ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1], + ['mu24', 'L1_MU20MU21', ['L1_MU20'], [PhysicsStream, 'express'], ['RATE:SingleMuon', 'BW:Muon'], -1], + ['mu20_msonly', 'L1_MU20MU21', ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1], + ['mu14_ivarloose', 'L1_MU10', [], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1], + ['mu6', 'L1_MU6', [], [PhysicsStream,'express'], ['RATE:SingleMuon', 'BW:Muon'], -1], + ['mu6_msonly', 'L1_MU6', [], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1], + ['mu4', 'L1_MU4', [], [PhysicsStream,'express'], ['RATE:SingleMuon', 'BW:Muon'], -1], + ['mu24_idperf', 'L1_MU20MU21', ['L1_MU20'], [PhysicsStream, 'express'], ['RATE:IDMonitoring', 'BW:Muon', 'BW:ID'], -1], + ['mu20_idperf', 'L1_MU20MU21', ['L1_MU20'], [PhysicsStream, 'express'], ['RATE:IDMonitoring', 'BW:Muon', 'BW:ID'], -1], + ['mu40_idperf', 'L1_MU20MU21', ['L1_MU20'], [PhysicsStream, 'express'], ['RATE:IDMonitoring', 'BW:Muon', 'BW:ID'], -1], + ['mu10_idperf', 'L1_MU10', [], [PhysicsStream], ['RATE:IDMonitoring', 'BW:Muon', 'BW:ID'], -1], + ['mu6_idperf', 'L1_MU6', [], [PhysicsStream, 'express'], ['RATE:IDMonitoring', 'BW:Muon', 'BW:ID'], -1], + ['mu4_idperf', 'L1_MU4', [], [PhysicsStream], ['RATE:IDMonitoring', 'BW:Muon', 'BW:ID'], -1], + ['mu4_nomucomb', 'L1_MU4', [], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1], + ['mu6_nomucomb', 'L1_MU6', [], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1], + ['mu10_nomucomb', 'L1_MU10', [], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1], + ['mu11_nomucomb', 'L1_MU11', [], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1], + ['mu24_ivarmedium', 'L1_MU20MU21', ['L1_MU20'], [PhysicsStream, 'express'], ['RATE:SingleMuon', 'BW:Muon'], -1], + ['mu26_ivartight', 'L1_MU20MU21', ['L1_MU20'], [PhysicsStream], ['Primary:20000','RATE:SingleMuon', 'BW:Muon'], -1], + ['mu28_ivartight', 'L1_MU20MU21', ['L1_MU20'], [PhysicsStream], ['Primary:20000','RATE:SingleMuon', 'BW:Muon'], -1], + ['2mu15_L12MU10', 'L1_2MU10', [], [PhysicsStream], ['Primary:20000','RATE:MultiMuon', 'BW:Muon'], -1], + ['3mu8_msonly', 'L1_3MU6', [], [PhysicsStream], ['Primary:20000','RATE:MultiMuon', 'BW:Muon'], -1], + ['mu24_mu8noL1', 'L1_MU20MU21', ['L1_MU20',''], [PhysicsStream, 'express'], ['Primary:20000','RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu24','mu8noL1']]], + ['mu24_mu10noL1', 'L1_MU20MU21', ['L1_MU20',''], [PhysicsStream], ['Primary:20000','RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu24','mu10noL1']]], + ['mu24_mu12noL1' , 'L1_MU20MU21', ['L1_MU20',''], [PhysicsStream], ['Primary:20000','RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu24','mu12noL1']]], + ['mu24_2mu4noL1', 'L1_MU20MU21', ['L1_MU20',''], [PhysicsStream], ['Primary:20000','RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu24','2mu4noL1']]], + ['mu26_mu8noL1', 'L1_MU20MU21', ['L1_MU20',''], [PhysicsStream], ['Primary:20000','RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu26','mu8noL1']]], + ['mu26_mu10noL1', 'L1_MU20MU21', ['L1_MU20',''], [PhysicsStream], ['Primary:20000','RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu26','mu10noL1']]], + ['mu28_mu8noL1', 'L1_MU20MU21', ['L1_MU20',''], [PhysicsStream], ['Primary:20000','RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu28','mu8noL1']]], + ['mu22_2mu4noL1', 'L1_MU20MU21', ['L1_MU20',''], [PhysicsStream], ['Primary:20000','RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu22','2mu4noL1']]], + ['mu20_2mu2noL1_JpsimumuFS', 'L1_MU20MU21', ['L1_MU20',''], [PhysicsStream], [RATE_BMultiMuonTag,'BW:Muon'], -1,['serial',-1,['mu20','2mu2noL1_JpsimumuFS']]], # OI - who owns these triggers? Bphys? + ['mu20_2mu4_JpsimumuL2', 'L1_MU20MU21', ['L1_MU20','L1_2MU4'], [PhysicsStream], [RATE_BMultiMuonTag,'BW:Muon'], -1,['serial',-1,['2mu4_JpsimumuL2','mu20']]], # OI - who owns these triggers? + ['mu22_mu8noL1_mu6noL1', 'L1_MU20MU21', ['L1_MU20','',''], [PhysicsStream], ['Primary:20000','RATE:MultiMuon', 'BW:Muon'], -1,['serial',-1,['mu22','mu8noL1','mu6noL1']]], + ['mu20_msonly_mu15noL1_msonly_nscan05_noComb', 'L1_MU20MU21', ['L1_MU20','L2_mu20_msonly'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly','mu15noL1_msonly_nscan05_noComb']]], + ['mu20_msonly_mu6noL1_msonly_nscan05', 'L1_MU20MU21', ['L1_MU20','L2_mu20_msonly'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly','mu6noL1_msonly_nscan05']]], + ['mu10', 'L1_MU10', [], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1], + ['mu10_mgonly_L1LATE-MU10_XE50', 'L1_LATE-MU10_XE50', [], [PhysicsStream], ['Primary:20000','RATE:SingleMuon', 'BW:Muon'], -1], + + + #ATR-19267 + ['mu14', 'L1_MU10', [], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1], + ['mu15', 'L1_MU10', [], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1], + ['mu18', 'L1_MU10', [], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1], + ] + + + if TriggerFlags.doFTK(): + TriggerFlags.MuonSlice.signatures = TriggerFlags.MuonSlice.signatures() + [ + ['mu24_idperf_FTK_L1MU20MU21_FTK', 'L1_MU20MU21_FTK', ['L1_MU20_FTK'], [PhysicsStream], ['RATE:IDMonitoring', 'BW:Muon', 'BW:ID'], -1], + ['mu6_idperf_FTK_L1MU6_FTK', 'L1_MU6_FTK', [], [PhysicsStream], ['RATE:IDMonitoring', 'BW:Muon', 'BW:ID'], -1], + ['mu24_idperf_FTKRefit_L1MU20MU21_FTK', 'L1_MU20MU21_FTK', ['L1_MU20_FTK'], [PhysicsStream], ['RATE:IDMonitoring', 'BW:Muon', 'BW:ID'], -1], + ['mu6_idperf_FTKRefit_L1MU6_FTK', 'L1_MU6_FTK', [], [PhysicsStream], ['RATE:IDMonitoring', 'BW:Muon', 'BW:ID'], -1], + ['mu22_mu8noL1_FTKFS_L1MU20MU21_FTK', 'L1_MU20MU21_FTK', ['L1_MU20_FTK',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu22','mu8noL1_FTKFS']]], + ['mu26_ivarmedium_FTK_L1MU20MU21_FTK', 'L1_MU20MU21_FTK', ['L1_MU20_FTK'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1], +] + + TriggerFlags.JetSlice.signatures = TriggerFlags.JetSlice.signatures() + [ + ['j0_perf_ds1_L1J50', 'L1_J50', [], ['DataScouting_05_Jets'], ['RATE:Jets_DS', 'BW:Jet'], -1], + ['j0_perf_ds1_L1J40', 'L1_J40', [], ['DataScouting_05_Jets'], ['RATE:Jets_DS', 'BW:Jet'], -1], + ['j0_perf_ds1_L1J50_DETA20-J50J', 'L1_J50_DETA20-J50J', [], ['DataScouting_05_Jets'], ['RATE:Jets_DS', 'BW:Jet'], -1], + ['j25', 'L1_RD0_FILLED', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j35', 'L1_RD0_FILLED', [], [PhysicsStream,'express'], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j45', 'L1_J15', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j45_L1RD0_FILLED', 'L1_RD0_FILLED', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j60', 'L1_J20', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j60_L1RD0_FILLED', 'L1_RD0_FILLED', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j85', 'L1_J20', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j110', 'L1_J30', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j260', 'L1_J75', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j360', 'L1_J100', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j400', 'L1_J100', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j440', 'L1_J120', [], [PhysicsStream], ['Primary:17000','RATE:SingleJet', 'BW:Jet'], -1], + ['j450', 'L1_J120', [], [PhysicsStream], ['Primary:20000','RATE:SingleJet', 'BW:Jet'], -1], + ['j460', 'L1_J120', [], [PhysicsStream], ['Primary:20000','RATE:SingleJet', 'BW:Jet'], -1], + ['j480', 'L1_J120', [], [PhysicsStream], ['Primary:20000','RATE:SingleJet', 'BW:Jet'], -1], + ['j500', 'L1_J120', [], [PhysicsStream], ['Primary:20000','RATE:SingleJet', 'BW:Jet'], -1], + ['j520', 'L1_J120', [], [PhysicsStream], ['Primary:20000','RATE:SingleJet', 'BW:Jet'], -1], + ['j225_gsc400_boffperf_split', 'L1_J100', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j225_gsc440_boffperf_split', 'L1_J120', [], [PhysicsStream], ['Primary:20000','RATE:SingleJet', 'BW:Jet'], -1], + ['j225_gsc450_boffperf_split', 'L1_J120', [], [PhysicsStream], ['Primary:20000','RATE:SingleJet', 'BW:Jet'], -1], + ['j225_gsc460_boffperf_split', 'L1_J120', [], [PhysicsStream], ['Primary:20000','RATE:SingleJet', 'BW:Jet'], -1], + ['j225_gsc480_boffperf_split', 'L1_J120', [], [PhysicsStream], ['Primary:20000','RATE:SingleJet', 'BW:Jet'], -1], + ['j225_gsc500_boffperf_split', 'L1_J120', [], [PhysicsStream], ['Primary:20000','RATE:SingleJet', 'BW:Jet'], -1], + ['j35_subjes', 'L1_RD0_FILLED', [], [PhysicsStream,'express'], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j35_jes', 'L1_RD0_FILLED', [], [PhysicsStream,'express'], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j35_sub', 'L1_RD0_FILLED', [], [PhysicsStream,'express'], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j35_nojcalib', 'L1_RD0_FILLED', [], [PhysicsStream,'express'], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j35_lcw', 'L1_RD0_FILLED', [], [PhysicsStream,'express'], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j35_lcw_subjes', 'L1_RD0_FILLED', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j35_lcw_jes', 'L1_RD0_FILLED', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j35_lcw_sub', 'L1_RD0_FILLED', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j35_lcw_nojcalib', 'L1_RD0_FILLED', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j450_subjes', 'L1_J120', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j450_jes', 'L1_J120', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j450_sub', 'L1_J120', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j450_nojcalib', 'L1_J120', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j450_lcw', 'L1_J120', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j450_lcw_subjes', 'L1_J120', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j450_lcw_jes', 'L1_J120', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j450_lcw_sub', 'L1_J120', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j450_lcw_nojcalib', 'L1_J120', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j15_320eta490', 'L1_RD0_FILLED', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j25_320eta490', 'L1_RD0_FILLED', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j35_320eta490', 'L1_RD0_FILLED', [], [PhysicsStream,'express'], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j45_320eta490', 'L1_J15.31ETA49', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j60_320eta490', 'L1_J20.31ETA49', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j85_320eta490', 'L1_J20.31ETA49', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j175_320eta490', 'L1_J50.31ETA49', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j35_320eta490_subjes', 'L1_RD0_FILLED', [], [PhysicsStream,'express'], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j35_320eta490_jes', 'L1_RD0_FILLED', [], [PhysicsStream,'express'], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j35_320eta490_sub', 'L1_RD0_FILLED', [], [PhysicsStream,'express'], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j35_320eta490_nojcalib', 'L1_RD0_FILLED', [], [PhysicsStream,'express'], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j35_320eta490_lcw', 'L1_RD0_FILLED', [], [PhysicsStream,'express'], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j35_320eta490_lcw_subjes', 'L1_RD0_FILLED', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j35_320eta490_lcw_jes', 'L1_RD0_FILLED', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j35_320eta490_lcw_sub', 'L1_RD0_FILLED', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j35_320eta490_lcw_nojcalib', 'L1_RD0_FILLED', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j260_320eta490_subjes', 'L1_J75.31ETA49', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j260_320eta490_jes', 'L1_J75.31ETA49', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j260_320eta490_lcw', 'L1_J75.31ETA49', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j260_320eta490_lcw_subjes', 'L1_J75.31ETA49', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j260_320eta490_lcw_jes', 'L1_J75.31ETA49', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j260_320eta490_lcw_nojcalib', 'L1_J75.31ETA49', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j110_a10_lcw_subjes_L1J30', 'L1_J30', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j175_a10_lcw_subjes_L1J50', 'L1_J50', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j440_a10_lcw_subjes_L1J100', 'L1_J100', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j480_a10_lcw_subjes_L1J100', 'L1_J100', [], [PhysicsStream], ['Primary:20000','RATE:SingleJet', 'BW:Jet'], -1], + ['j500_a10_lcw_subjes_L1J100', 'L1_J100', [], [PhysicsStream], ['Primary:20000','RATE:SingleJet', 'BW:Jet'], -1], + ['j520_a10_lcw_subjes_L1J100', 'L1_J100', [], [PhysicsStream], ['Primary:20000','RATE:SingleJet', 'BW:Jet'], -1], + ['j540_a10_lcw_subjes_L1J100', 'L1_J100', [], [PhysicsStream], ['Primary:20000','RATE:SingleJet', 'BW:Jet'], -1], + ['j260_a10_sub_L1J75', 'L1_J75', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j260_a10_nojcalib_L1J75', 'L1_J75', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j260_a10_lcw_sub_L1J75', 'L1_J75', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j260_a10_lcw_nojcalib_L1J75', 'L1_J75', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j480_a10_sub_L1J100', 'L1_J100', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j480_a10_nojcalib_L1J100', 'L1_J100', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j480_a10_lcw_sub_L1J100', 'L1_J100', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j480_a10_lcw_nojcalib_L1J100', 'L1_J100', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j440_a10_lcw_subjes_L1SC111', 'L1_SC111-CJ15', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j480_a10_lcw_subjes_L1SC111', 'L1_SC111-CJ15', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j500_a10_lcw_subjes_L1SC111', 'L1_SC111-CJ15', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j520_a10_lcw_subjes_L1SC111', 'L1_SC111-CJ15', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j540_a10_lcw_subjes_L1SC111', 'L1_SC111-CJ15', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j260_a10r_L1J75', 'L1_J75', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j440_a10r_L1J100', 'L1_J100', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j480_a10r_L1J100', 'L1_J100', [], [PhysicsStream], ['Primary:20000','RATE:SingleJet', 'BW:Jet'], -1], + ['j500_a10r_L1J100', 'L1_J100', [], [PhysicsStream], ['Primary:20000','RATE:SingleJet', 'BW:Jet'], -1], + ['j520_a10r_L1J100', 'L1_J100', [], [PhysicsStream], ['Primary:20000','RATE:SingleJet', 'BW:Jet'], -1], + ['j540_a10r_L1J100', 'L1_J100', [], [PhysicsStream], ['Primary:20000','RATE:SingleJet', 'BW:Jet'], -1], + ['j440_a10r_L1SC111', 'L1_SC111-CJ15', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j480_a10r_L1SC111', 'L1_SC111-CJ15', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j500_a10r_L1SC111', 'L1_SC111-CJ15', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j520_a10r_L1SC111', 'L1_SC111-CJ15', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j540_a10r_L1SC111', 'L1_SC111-CJ15', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j260_a10t_lcw_jes_L1J75', 'L1_J75', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j420_a10t_lcw_jes_L1J100', 'L1_J100', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j480_a10t_lcw_jes_L1J100', 'L1_J100', [], [PhysicsStream], ['Primary:20000','RATE:SingleJet', 'BW:Jet'], -1], + ['j500_a10t_lcw_jes_L1J100', 'L1_J100', [], [PhysicsStream], ['Primary:20000','RATE:SingleJet', 'BW:Jet'], -1], + ['j520_a10t_lcw_jes_L1J100', 'L1_J100', [], [PhysicsStream], ['Primary:20000','RATE:SingleJet', 'BW:Jet'], -1], + ['j540_a10t_lcw_jes_L1J100', 'L1_J100', [], [PhysicsStream], ['Primary:20000','RATE:SingleJet', 'BW:Jet'], -1], + ['j260_a10t_lcw_nojcalib_L1J75', 'L1_J75', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j480_a10t_lcw_nojcalib_L1J100', 'L1_J100', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j480_a10t_lcw_jes_L1SC111', 'L1_SC111-CJ15', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j500_a10t_lcw_jes_L1SC111', 'L1_SC111-CJ15', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j520_a10t_lcw_jes_L1SC111', 'L1_SC111-CJ15', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j540_a10t_lcw_jes_L1SC111', 'L1_SC111-CJ15', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j390_a10t_lcw_jes_30smcINF_L1J100', 'L1_J100', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j420_a10t_lcw_jes_30smcINF_L1J100', 'L1_J100', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j440_a10t_lcw_jes_30smcINF_L1J100', 'L1_J100', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j390_a10t_lcw_jes_35smcINF_L1J100', 'L1_J100', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j440_a10t_lcw_jes_35smcINF_L1J100', 'L1_J100', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j440_a10t_lcw_jes_35smcINF_L1SC111', 'L1_SC111-CJ15', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j390_a10t_lcw_jes_40smcINF_L1J100', 'L1_J100', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j420_a10t_lcw_jes_40smcINF_L1J100', 'L1_J100', [], [PhysicsStream], ['Primary:17000','RATE:SingleJet', 'BW:Jet'], -1], + ['j440_a10t_lcw_jes_40smcINF_L1J100', 'L1_J100', [], [PhysicsStream], ['Primary:20000','RATE:SingleJet', 'BW:Jet'], -1], + ['j390_a10t_lcw_jes_L1J100', 'L1_J100', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j420_a10t_lcw_jes_L1SC111', 'L1_SC111-CJ15', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['2j330_a10t_lcw_jes_30smcINF_L1J100', 'L1_J100', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['2j340_a10t_lcw_jes_35smcINF_L1J100', 'L1_J100', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['2j340_a10t_lcw_jes_35smcINF_L1SC111', 'L1_SC111-CJ15', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['2j350_a10t_lcw_jes_35smcINF_L1J100', 'L1_J100', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['2j350_a10t_lcw_jes_35smcINF_L1SC111', 'L1_SC111-CJ15', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['2j360_a10t_lcw_jes_35smcINF_L1J100', 'L1_J100', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['2j370_a10t_lcw_jes_35smcINF_L1J100', 'L1_J100', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['2j380_a10t_lcw_jes_35smcINF_L1J100', 'L1_J100', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['2j330_a10t_lcw_jes_40smcINF_L1J100', 'L1_J100', [], [PhysicsStream], ['Primary:20000','RATE:SingleJet', 'BW:Jet'], -1], + ['2j340_a10t_lcw_jes_40smcINF_L1J100', 'L1_J100', [], [PhysicsStream], ['Primary:20000','RATE:SingleJet', 'BW:Jet'], -1], + ['2j350_a10t_lcw_jes_40smcINF_L1J100', 'L1_J100', [], [PhysicsStream], ['Primary:20000','RATE:SingleJet', 'BW:Jet'], -1], + ['j325_a10t_lcw_jes_60smcINF_j325_a10t_lcw_jes_L1SC111', 'L1_SC111-CJ15', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j340_a10t_lcw_jes_60smcINF_j340_a10t_lcw_jes_L1SC111', 'L1_SC111-CJ15', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j370_a10t_lcw_jes_40smcINF_j370_a10t_lcw_jes_L1SC111', 'L1_SC111-CJ15', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j370_a10t_lcw_jes_50smcINF_j370_a10t_lcw_jes_L1SC111', 'L1_SC111-CJ15', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j370_a10t_lcw_jes_60smcINF_j370_a10t_lcw_jes_L1SC111', 'L1_SC111-CJ15', [], [PhysicsStream], ['Primary:17000','RATE:SingleJet', 'BW:Jet'], -1], + ['j380_a10t_lcw_jes_40smcINF_j380_a10t_lcw_jes_L1SC111', 'L1_SC111-CJ15', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j380_a10t_lcw_jes_50smcINF_j380_a10t_lcw_jes_L1SC111', 'L1_SC111-CJ15', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['2j330_a10t_lcw_jes_L1SC111', 'L1_SC111-CJ15', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['3j160', 'L1_J75', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['3j225', 'L1_J100', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['3j250', 'L1_J100', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['4j25', 'L1_RD0_FILLED', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['4j90', 'L1_3J50', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['4j130', 'L1_3J50', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['4j85_gsc120_boffperf_split', 'L1_3J50', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['4j85_gsc130_boffperf_split', 'L1_3J50', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['5j25', 'L1_RD0_FILLED', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['5j45', 'L1_4J15', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['5j70_L14J15', 'L1_4J15', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['5j70_L14J150ETA25', 'L1_4J15.0ETA25', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['5j70', 'L1_4J20', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['5j85', 'L1_4J20', [], [PhysicsStream], ['Primary:17000','RATE:MultiJet', 'BW:Jet'], -1], + ['5j90_L14J150ETA25', 'L1_4J15.0ETA25', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['5j90', 'L1_4J20', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['5j100_L14J150ETA25', 'L1_4J15.0ETA25', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['5j100', 'L1_4J20', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['5j90_L14J15', 'L1_4J15', [], [PhysicsStream], ['Primary:17000', 'RATE:MultiJet', 'BW:Jet'], -1], + ['5j100_L14J15', 'L1_4J15', [], [PhysicsStream], ['Primary:17000', 'RATE:MultiJet', 'BW:Jet'], -1], + ['5j50_gsc70_boffperf_split_L14J150ETA25', 'L1_4J15.0ETA25', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['5j50_gsc70_boffperf_split', 'L1_4J20', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['5j55_gsc75_boffperf_split_L14J150ETA25', 'L1_4J15.0ETA25', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['5j55_gsc75_boffperf_split', 'L1_4J20', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['5j60_gsc85_boffperf_split', 'L1_4J20', [], [PhysicsStream], ['Primary:17000','RATE:MultiJet', 'BW:Jet'], -1], + ['5j60_gsc90_boffperf_split_L14J150ETA25', 'L1_4J15.0ETA25', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['5j60_gsc90_boffperf_split', 'L1_4J20', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['5j85_gsc100_boffperf_split_L14J150ETA25', 'L1_4J15.0ETA25', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['5j85_gsc100_boffperf_split', 'L1_4J20', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['5j60_gsc90_boffperf_split_L14J15', 'L1_4J15', [], [PhysicsStream], ['Primary:17000', 'RATE:MultiJet', 'BW:Jet'], -1], + ['5j65_0eta240_L14J15', 'L1_4J15', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['5j65_0eta240_L14J150ETA25', 'L1_4J15.0ETA25', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['5j65_0eta240', 'L1_4J20', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['5j70_0eta240', 'L1_4J20', [], [PhysicsStream], ['Primary:17000','RATE:MultiJet', 'BW:Jet'], -1], + ['5j75_0eta240_L14J150ETA25', 'L1_4J15.0ETA25', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['5j75_0eta240', 'L1_4J20', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['5j85_0eta240_L14J150ETA25', 'L1_4J15.0ETA25', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['5j85_0eta240', 'L1_4J20', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['5j75_0eta240_L14J15', 'L1_4J15', [], [PhysicsStream], ['Primary:17000', 'RATE:MultiJet', 'BW:Jet'], -1], + ['5j85_0eta240_L14J15', 'L1_4J15', [], [PhysicsStream], ['Primary:17000', 'RATE:MultiJet', 'BW:Jet'], -1], + ['5j50_gsc65_boffperf_split_0eta240_L14J150ETA25', 'L1_4J15.0ETA25', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['5j50_gsc65_boffperf_split_0eta240', 'L1_4J20', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['5j50_gsc70_boffperf_split_0eta240', 'L1_4J20', [], [PhysicsStream], ['Primary:17000','RATE:MultiJet', 'BW:Jet'], -1], + ['5j55_gsc75_boffperf_split_0eta240_L14J150ETA25', 'L1_4J15.0ETA25', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['5j55_gsc75_boffperf_split_0eta240', 'L1_4J20', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['5j55_gsc75_boffperf_split_0eta240_L14J15', 'L1_4J15', [], [PhysicsStream], ['Primary:17000', 'RATE:MultiJet', 'BW:Jet'], -1], + ['6j25', 'L1_RD0_FILLED', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['6j45', 'L1_4J15', [], [PhysicsStream,'express'], ['RATE:MultiJet', 'BW:Jet'], -1], + ['6j60_L14J15', 'L1_4J15', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['6j60_L14J150ETA25', 'L1_4J15.0ETA25', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['6j60', 'L1_4J20', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['6j70', 'L1_4J20', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['6j85_L14J150ETA25', 'L1_4J15.0ETA25', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['6j85', 'L1_4J20', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['6j85_L14J15', 'L1_4J15', [], [PhysicsStream], ['Primary:17000','RATE:MultiJet', 'BW:Jet'], -1], + ['6j45_gsc60_boffperf_split_L14J150ETA25', 'L1_4J15.0ETA25', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['6j45_gsc60_boffperf_split', 'L1_4J20', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['6j45_gsc60_boffperf_split_L15J150ETA25', 'L1_5J15.0ETA25', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['6j50_gsc65_boffperf_split_L14J150ETA25', 'L1_4J15.0ETA25', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['6j50_gsc65_boffperf_split', 'L1_4J20', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['6j50_gsc65_boffperf_split_L15J150ETA25', 'L1_5J15.0ETA25', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['6j50_gsc70_boffperf_split', 'L1_4J20', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['6j50_gsc70_boffperf_split_L15J150ETA25', 'L1_5J15.0ETA25', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['6j60_gsc85_boffperf_split', 'L1_4J20', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['6j60_gsc85_boffperf_split_L14J150ETA25', 'L1_4J15.0ETA25', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['6j60_gsc85_boffperf_split_L15J150ETA25', 'L1_5J15.0ETA25', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['6j60_gsc85_boffperf_split_L14J15', 'L1_4J15', [], [PhysicsStream], ['Primary:17000','RATE:MultiJet', 'BW:Jet'], -1], + ['6j45_0eta240', 'L1_4J15', [], [PhysicsStream,'express'], ['RATE:MultiJet', 'BW:Jet'], -1], + ['6j50_0eta240_L14J15', 'L1_4J15', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['6j50_0eta240_L14J150ETA25', 'L1_4J15.0ETA25', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['6j50_0eta240_L14J20', 'L1_4J20', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['6j50_0eta240_L15J150ETA25', 'L1_5J15.0ETA25', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['6j55_0eta240_L14J20', 'L1_4J20', [], [PhysicsStream], ['Primary:17000','RATE:MultiJet', 'BW:Jet'], -1], + ['6j55_0eta240_L15J150ETA25', 'L1_5J15.0ETA25', [], [PhysicsStream], ['Primary:17000','RATE:MultiJet', 'BW:Jet'], -1], + ['6j60_0eta240_L14J150ETA25', 'L1_4J15.0ETA25', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['6j60_0eta240_L14J20', 'L1_4J20', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['6j60_0eta240_L15J150ETA25', 'L1_5J15.0ETA25', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['6j60_0eta240_L14J15', 'L1_4J15', [], [PhysicsStream], ['Primary:17000','RATE:MultiJet', 'BW:Jet'], -1], + ['6j35_gsc45_boffperf_split_0eta240_L14J150ETA25', 'L1_4J15.0ETA25', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['6j35_gsc50_boffperf_split_0eta240_L14J150ETA25', 'L1_4J15.0ETA25', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['6j35_gsc50_boffperf_split_0eta240_L14J20', 'L1_4J20', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['6j35_gsc50_boffperf_split_0eta240_L15J150ETA25', 'L1_5J15.0ETA25', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['6j45_gsc55_boffperf_split_0eta240_L14J20', 'L1_4J20', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['6j45_gsc55_boffperf_split_0eta240_L15J150ETA25', 'L1_5J15.0ETA25', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['6j45_gsc60_boffperf_split_0eta240_L14J150ETA25', 'L1_4J15.0ETA25', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['6j45_gsc60_boffperf_split_0eta240_L14J20', 'L1_4J20', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['6j45_gsc60_boffperf_split_0eta240_L15J150ETA25', 'L1_5J15.0ETA25', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['6j45_gsc60_boffperf_split_0eta240_L14J15', 'L1_4J15', [], [PhysicsStream], ['Primary:17000','RATE:MultiJet', 'BW:Jet'], -1], + ['6j45_subjes', 'L1_4J15', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['6j45_jes', 'L1_4J15', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['6j45_sub', 'L1_4J15', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['6j45_nojcalib', 'L1_4J15', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['6j45_lcw', 'L1_4J15', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['6j45_lcw_subjes', 'L1_4J15', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['6j45_lcw_jes', 'L1_4J15', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['6j45_lcw_sub', 'L1_4J15', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['6j45_lcw_nojcalib', 'L1_4J15', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['7j25', 'L1_RD0_FILLED', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['7j45_L14J20', 'L1_4J20', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['7j45', 'L1_6J15', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['7j50_L14J150ETA25', 'L1_4J15.0ETA25', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['7j50_L14J20', 'L1_4J20', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['7j50', 'L1_6J15', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['7j50_L14J15', 'L1_4J15', [], [PhysicsStream], ['Primary:17000','RATE:MultiJet', 'BW:Jet'], -1], + ['7j35_gsc45_boffperf_split_L14J20', 'L1_4J20', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['7j35_gsc45_boffperf_split_L15J150ETA25', 'L1_5J15.0ETA25', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['7j35_gsc50_boffperf_split_L14J150ETA25', 'L1_4J15.0ETA25', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['7j35_gsc50_boffperf_split_L14J20', 'L1_4J20', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['7j35_gsc50_boffperf_split_L15J150ETA25', 'L1_5J15.0ETA25', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['7j35_gsc50_boffperf_split_L14J15', 'L1_4J15', [], [PhysicsStream], ['Primary:17000','RATE:MultiJet', 'BW:Jet'], -1], + ['7j45_0eta240_L14J20', 'L1_4J20', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['7j45_0eta240_L15J150ETA25', 'L1_5J15.0ETA25', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['7j45_0eta240', 'L1_6J15', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['7j35_gsc45_boffperf_split_0eta240_L14J20', 'L1_4J20', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['7j35_gsc45_boffperf_split_0eta240_L15J150ETA25', 'L1_5J15.0ETA25', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['7j35_gsc50_boffperf_split_0eta240_L14J150ETA25', 'L1_4J15.0ETA25', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['7j35_gsc50_boffperf_split_0eta240_L14J20', 'L1_4J20', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['7j35_gsc50_boffperf_split_0eta240_L15J150ETA25', 'L1_5J15.0ETA25', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['7j35_gsc50_boffperf_split_0eta240_L14J15', 'L1_4J15', [], [PhysicsStream], ['Primary:17000','RATE:MultiJet', 'BW:Jet'], -1], + ['10j40_L14J20', 'L1_4J20' , [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['10j40_L16J15', 'L1_6J15' , [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['ht700_L1J75', 'L1_J75', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['ht1200_L1J100', 'L1_J100', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['ht1400_L1J100', 'L1_J100', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['j0_1i2c300m500TLA', 'L1_J100', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['j0_0i1c500m900TLA', 'L1_J100', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['j0_1i2c200m8000TLA', 'L1_J100', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['2j220_j120', 'L1_J100', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['2j250_j120', 'L1_J100', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['2j275_j140', 'L1_J100', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['j80_0eta240_2j60_320eta490', 'L1_J40.0ETA25_2J15.31ETA49', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['2j225_gsc250_boffperf_split_0eta240_j85_gsc140_boffperf_split_0eta240', 'L1_J100', [], [PhysicsStream], ['Primary:20000','RATE:MultiJet', 'BW:Jet'], -1], + ['j80_0eta240_j60_j45_320eta490', 'L1_J40.0ETA25_2J25_J20.31ETA49', [], [PhysicsStream], ['RATE:MultiBJet', 'BW:BJet'], -1], + ['ht300_2j40_0eta490_invm700_L1HT150-J20s5.ETA31_MJJ-400-CF','L1_HT150-J20s5.ETA31_MJJ-400-CF', [], [PhysicsStream], ['RATE:MultiBJet', 'BW:BJet', 'BW:Jet'],-1,['serial',-1,[ 'ht300', '2j40_0eta490_invm700']]], + ['j85_cleanL', 'L1_J20', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j85_cleanT', 'L1_J20', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j85_cleanLLP', 'L1_J20', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j70_j50_0eta490_invm1100j70_dphi20_deta45_L1MJJ-500-NFF', 'L1_MJJ-500-NFF',[], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + # Large-R jets with jet moment cuts - for testing JetAttrs hypo (Aug. 2018, AS) + ['j0_a10t_lcw_jes_subj360Iwidth', 'L1_RD0_FILLED', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j0_a10t_lcw_jes_subj360I0width5', 'L1_RD0_FILLED', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j0_a10t_lcw_jes_subj360I0ktdr5', 'L1_RD0_FILLED', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j0_a10t_lcw_jes_subj360Iktdr', 'L1_RD0_FILLED', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j0_a10t_lcw_jes_subj360Iktdr3Iwidth2', 'L1_RD0_FILLED', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], #inclusive trigger + ['j0_a10t_lcw_jes_subj360IktdrI9width', 'L1_RD0_FILLED', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + + #ATR-19271 + ['j0_perf_L1RD0_FILLED', 'L1_RD0_FILLED', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j15', 'L1_RD0_FILLED', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j175', 'L1_J50', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j380', 'L1_J100', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j110_320eta490', 'L1_J30.31ETA49', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j260_a10_lcw_subjes_L1J75', 'L1_J75', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j420_a10t_lcw_jes_30smcINF_L1SC111', 'L1_SC111-CJ15', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j440_a10t_lcw_jes_30smcINF_L1SC111', 'L1_SC111-CJ15', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['2j330_a10t_lcw_jes_30smcINF_L1SC111', 'L1_SC111-CJ15', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['6j45_0eta240_L14J150ETA25', 'L1_4J15.0ETA25', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['6j45_0eta240_L14J20', 'L1_4J20', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['6j35_gsc45_boffperf_split_0eta240_L14J20', 'L1_4J20', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['ht700_L1HT150-J20.ETA31', 'L1_HT150-J20.ETA31', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['ht700_L1HT150-J20s5.ETA31', 'L1_HT150-J20s5.ETA31', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['ht1000_L1HT190-J15.ETA21', 'L1_HT190-J15.ETA21', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ['ht1000_L1HT190-J15s5.ETA21', 'L1_HT190-J15s5.ETA21', [], [PhysicsStream], ['RATE:MultiJet', 'BW:Jet'], -1], + ] + + + if TriggerFlags.doFTK(): + TriggerFlags.JetSlice.signatures = TriggerFlags.JetSlice.signatures() + [ + ['j0_perf_L1RD0_FILLED', 'L1_RD0_FILLED', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j0_perf_ftk_L1RD0_FILLED', 'L1_RD0_FILLED', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j0_perf_ftkrefit_L1RD0_FILLED', 'L1_RD0_FILLED', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j0_gsc0_boffperf_split_L1RD0_FILLED', 'L1_RD0_FILLED', [], [PhysicsStream], ['RATE:SingleBJet', 'BW:BJet'], -1], + ['j0_gsc0_boffperf_split_FTK_L1RD0_FILLED', 'L1_RD0_FILLED', [], [PhysicsStream], ['RATE:SingleBJet', 'BW:BJet'], -1], + ['j0_gsc0_boffperf_split_FTKRefit_L1RD0_FILLED', 'L1_RD0_FILLED', [], [PhysicsStream], ['RATE:SingleBJet', 'BW:BJet'], -1], + ] + + TriggerFlags.BjetSlice.signatures = TriggerFlags.BjetSlice.signatures() + [ + ['j35_boffperf_split_L1J15', 'L1_J15', [], [PhysicsStream], ['RATE:SingleBJet', 'BW:BJet'], -1], + ['j55_boffperf_split', 'L1_J20', [], [PhysicsStream], ['RATE:SingleBJet', 'BW:BJet'], -1], + ['j150_boffperf_split_L1J40', 'L1_J40', [], [PhysicsStream], ['RATE:SingleBJet', 'BW:BJet'], -1], + ['j320_boffperf_split', 'L1_J85', [], [PhysicsStream], ['RATE:SingleBJet', 'BW:BJet'], -1], + ['j45_gsc55_boffperf_split', 'L1_J15', [], [PhysicsStream,'express'], ['RATE:SingleBJet', 'BW:BJet'], -1], + ['j35_gsc45_boffperf_split_L1J15', 'L1_J15', [], [PhysicsStream,'express'], ['RATE:SingleBJet', 'BW:BJet'], -1], + ['j85_gsc110_boffperf_split', 'L1_J20', [], [PhysicsStream,'express'], ['RATE:SingleBJet', 'BW:BJet'], -1], + ['j175_gsc225_boffperf_split', 'L1_J100', [], [PhysicsStream], ['RATE:SingleBJet', 'BW:BJet'], -1], + ['j225_gsc275_boffperf_split', 'L1_J75', [], [PhysicsStream], ['RATE:SingleBJet', 'BW:BJet'], -1], + ['j225_boffperf_split_L1J100', 'L1_J100', [], [PhysicsStream], ['RATE:SingleBJet', 'BW:BJet'], -1], + ['j225_bmv2c1050_split_L1J100', 'L1_J100', [], [PhysicsStream], ['RATE:SingleBJet', 'BW:BJet'], -1], + ['j225_gsc300_boffperf_split', 'L1_J100', [], [PhysicsStream], ['RATE:SingleBJet', 'BW:BJet'], -1], + ['j225_gsc360_boffperf_split', 'L1_J100', [], [PhysicsStream], ['RATE:SingleBJet', 'BW:BJet'], -1], + ['j225_gsc275_bmv2c1070_split', 'L1_J100', [], [PhysicsStream], ['RATE:SingleBJet', 'BW:BJet'], -1], + ['j225_gsc300_bmv2c1077_split', 'L1_J100', [], [PhysicsStream], ['RATE:SingleBJet', 'BW:BJet'], -1], + ['j225_gsc360_bmv2c1085_split', 'L1_J100', [], [PhysicsStream], ['RATE:SingleBJet', 'BW:BJet'], -1], + ['j225_gsc275_bhmv2c1070_split', 'L1_J100', [], [PhysicsStream], ['RATE:SingleBJet', 'BW:BJet'], -1], + ['j225_gsc300_bhmv2c1077_split', 'L1_J100', [], [PhysicsStream], ['RATE:SingleBJet', 'BW:BJet'], -1], + ['j225_gsc360_bhmv2c1085_split', 'L1_J100', [], [PhysicsStream], ['RATE:SingleBJet', 'BW:BJet'], -1], + ['j50_gsc65_boffperf_split_3j50_gsc65_boffperf_split', 'L1_4J15.0ETA25', [], [PhysicsStream], ['RATE:SingleBJet', 'BW:BJet'], -1], + ['j50_gsc65_bmv2c1040_split_3j50_gsc65_boffperf_split', 'L1_4J15.0ETA25', [], [PhysicsStream], ['RATE:SingleBJet', 'BW:BJet'], -1], + ['j55_gsc75_boffperf_split_3j55_gsc75_boffperf_split', 'L1_4J20', [], [PhysicsStream], ['RATE:SingleBJet', 'BW:BJet'], -1], + ['j60_gsc85_boffperf_split_3j60_gsc85_boffperf_split', 'L1_4J20', [], [PhysicsStream], ['RATE:SingleBJet', 'BW:BJet'], -1], + ['j150_gsc175_boffperf_split_j45_gsc60_boffperf_split', 'L1_J100', [], [PhysicsStream], ['RATE:SingleBJet', 'BW:BJet'], -1], + ['j150_gsc175_bmv2c1070_split_j45_gsc60_bmv2c1070_split', 'L1_J100', [], [PhysicsStream], ['RATE:MultiBJet', 'BW:BJet'], -1], + ['j150_boffperf_split_j50_boffperf_split_L1J100', 'L1_J100', [], [PhysicsStream], ['RATE:MultiBJet', 'BW:BJet'], -1], + ['j150_bmv2c1050_split_j50_bmv2c1050_split_L1J100', 'L1_J100', [], [PhysicsStream], ['RATE:MultiBJet', 'BW:BJet'], -1], + + ['j110_gsc150_boffperf_split_2j45_gsc55_bmv2c1077_split_L1J85_3J30', 'L1_J85_3J30', [], [PhysicsStream], ['RATE:MultiBJet', 'BW:BJet'], -1], + ['j110_gsc150_boffperf_split_2j45_gsc55_boffperf_split_L1J85_3J30', 'L1_J85_3J30', [], [PhysicsStream], ['RATE:MultiBJet', 'BW:BJet'], -1], + ['2j55_gsc75_bmv2c1050_split_j55_gsc75_boffperf_split', 'L1_3J25.0ETA23', [], [PhysicsStream], ['RATE:MultiBJet', 'BW:BJet'], -1], + ['2j55_gsc75_bmv2c1060_split_j55_gsc75_boffperf_split', 'L1_3J25.0ETA23', [], [PhysicsStream], ['RATE:MultiBJet', 'BW:BJet'], -1], + ['2j60_gsc85_bmv2c1070_split_j60_gsc85_boffperf_split', 'L1_3J25.0ETA23', [], [PhysicsStream], ['RATE:MultiBJet', 'BW:BJet'], -1], + ['2j60_gsc85_bmv2c1077_split_j60_gsc85_boffperf_split', 'L1_3J25.0ETA23', [], [PhysicsStream], ['RATE:MultiBJet', 'BW:BJet'], -1], + ['2j35_boffperf_split_2j35_L14J15.0ETA25', 'L1_4J15.0ETA25', [], [PhysicsStream], ['RATE:MultiBJet', 'BW:BJet'], -1], + ['2j35_bmv2c1040_split_2j35_L14J15.0ETA25', 'L1_4J15.0ETA25', [], [PhysicsStream], ['Primary:20000','RATE:MultiBJet', 'BW:BJet'], -1], + ['2j35_bmv2c1050_split_2j35_L14J15.0ETA25', 'L1_4J15.0ETA25', [], [PhysicsStream], ['Primary:20000','RATE:MultiBJet', 'BW:BJet'], -1], + ['2j35_gsc45_bmv2c1060_split_2j35_gsc45_boffperf_split_L14J15.0ETA25', 'L1_4J15.0ETA25', [], [PhysicsStream], ['RATE:MultiBJet', 'BW:BJet'], -1], + ['2j45_gsc55_bmv2c1070_split_2j45_gsc55_boffperf_split_L14J15.0ETA25', 'L1_4J15.0ETA25', [], [PhysicsStream], ['RATE:MultiBJet', 'BW:BJet'], -1], + ['2j35_bmv2c1050_split_3j35', 'L1_5J15.0ETA25', [], [PhysicsStream], ['Primary:20000','RATE:MultiBJet', 'BW:BJet'], -1], + ['2j35_gsc45_bmv2c1070_split_3j35_gsc45_boffperf_split', 'L1_5J15.0ETA25', [], [PhysicsStream], ['RATE:MultiBJet', 'BW:BJet'], -1], + ['3j65_boffperf_split_L13J35.0ETA23', 'L1_3J35.0ETA23', [], [PhysicsStream], ['RATE:MultiBJet', 'BW:BJet'], -1], + ['3j50_gsc65_boffperf_split_L13J35.0ETA23', 'L1_3J35.0ETA23', [], [PhysicsStream], ['RATE:MultiBJet', 'BW:BJet'], -1], + + ] + + if TriggerFlags.doFTK(): + TriggerFlags.BjetSlice.signatures = TriggerFlags.BjetSlice.signatures() + [ + ['j35_boffperf_split_FTK_L1J15_FTK', 'L1_J15_FTK', [], [PhysicsStream], ['RATE:SingleBJet', 'BW:BJet'], -1], + ['j35_boffperf_split_FTKVtx_L1J15_FTK', 'L1_J15_FTK', [], [PhysicsStream], ['RATE:SingleBJet', 'BW:BJet'], -1], + ['j35_boffperf_split_FTKRefit_L1J15_FTK', 'L1_J15_FTK', [], [PhysicsStream], ['RATE:SingleBJet', 'BW:BJet'], -1], + + ['j150_boffperf_split_FTK_L1J40_FTK', 'L1_J40_FTK', [], [PhysicsStream], ['RATE:SingleBJet', 'BW:BJet'], -1], + ['j150_boffperf_split_FTKVtx_L1J40_FTK', 'L1_J40_FTK', [], [PhysicsStream], ['RATE:SingleBJet', 'BW:BJet'], -1], + ['j150_boffperf_split_FTKRefit_L1J40_FTK', 'L1_J40_FTK', [], [PhysicsStream], ['RATE:SingleBJet', 'BW:BJet'], -1], + + ['j225_boffperf_split_FTK_L1J100_FTK', 'L1_J100_FTK', [], [PhysicsStream], ['RATE:SingleBJet', 'BW:BJet'], -1], + ['j225_boffperf_split_FTKVtx_L1J100_FTK', 'L1_J100_FTK', [], [PhysicsStream], ['RATE:SingleBJet', 'BW:BJet'], -1], + ['j225_boffperf_split_FTKRefit_L1J100_FTK', 'L1_J100_FTK', [], [PhysicsStream], ['RATE:SingleBJet', 'BW:BJet'], -1], + + ['j225_bmv2c1050_split_FTK_L1J100_FTK', 'L1_J100_FTK', [], [PhysicsStream], ['RATE:SingleBJet', 'BW:BJet'], -1], + ['j225_bmv2c1050_split_FTKVtx_L1J100_FTK', 'L1_J100_FTK', [], [PhysicsStream], ['RATE:SingleBJet', 'BW:BJet'], -1], + ['j225_bmv2c1050_split_FTKRefit_L1J100_FTK', 'L1_J100_FTK', [], [PhysicsStream], ['RATE:SingleBJet', 'BW:BJet'], -1], + + ['j150_boffperf_split_j50_boffperf_split_FTK_L1J100_FTK', 'L1_J100_FTK', [], [PhysicsStream], ['RATE:MultiBJet', 'BW:BJet'], -1], + ['j150_boffperf_split_j50_boffperf_split_FTKVtx_L1J100_FTK', 'L1_J100_FTK', [], [PhysicsStream], ['RATE:MultiBJet', 'BW:BJet'], -1], + ['j150_boffperf_split_j50_boffperf_split_FTKRefit_L1J100_FTK', 'L1_J100_FTK', [], [PhysicsStream], ['RATE:MultiBJet', 'BW:BJet'], -1], + + ['j150_bmv2c1050_split_j50_bmv2c1050_split_FTK_L1J100_FTK', 'L1_J100_FTK', [], [PhysicsStream], ['RATE:MultiBJet', 'BW:BJet'], -1], + ['j150_bmv2c1050_split_j50_bmv2c1050_split_FTKVtx_L1J100_FTK', 'L1_J100_FTK', [], [PhysicsStream], ['RATE:MultiBJet', 'BW:BJet'], -1], + ['j150_bmv2c1050_split_j50_bmv2c1050_split_FTKRefit_L1J100_FTK', 'L1_J100_FTK', [], [PhysicsStream], ['RATE:MultiBJet', 'BW:BJet'], -1], + + ['2j35_boffperf_split_FTK_2j35_L14J15.0ETA25_FTK', 'L1_4J15.0ETA25_FTK', [], [PhysicsStream], ['RATE:MultiBJet', 'BW:BJet'], -1], + ['2j35_boffperf_split_FTKVtx_2j35_L14J15.0ETA25_FTK', 'L1_4J15.0ETA25_FTK', [], [PhysicsStream], ['RATE:MultiBJet', 'BW:BJet'], -1], + ['2j35_boffperf_split_FTKRefit_2j35_L14J15.0ETA25_FTK', 'L1_4J15.0ETA25_FTK', [], [PhysicsStream], ['RATE:MultiBJet', 'BW:BJet'], -1], + + ['2j35_bmv2c1050_split_FTK_2j35_L14J15.0ETA25_FTK', 'L1_4J15.0ETA25_FTK', [], [PhysicsStream], ['RATE:MultiBJet', 'BW:BJet'], -1], + ['2j35_bmv2c1050_split_FTKVtx_2j35_L14J15.0ETA25_FTK', 'L1_4J15.0ETA25_FTK', [], [PhysicsStream], ['RATE:MultiBJet', 'BW:BJet'], -1], + ['2j35_bmv2c1050_split_FTKRefit_2j35_L14J15.0ETA25_FTK', 'L1_4J15.0ETA25_FTK', [], [PhysicsStream], ['RATE:MultiBJet', 'BW:BJet'], -1], + +] + + + TriggerFlags.METSlice.signatures = TriggerFlags.METSlice.signatures() + [ + ['xe0noL1_l2fsperf', '', [], [PhysicsStream], ['RATE:MET', 'BW:MET'], -1], + ['xe0noL1_l2fsperf_tc_lcw', '', [], [PhysicsStream], ['RATE:MET', 'BW:MET'], -1], + ['xe0noL1_l2fsperf_tc_em', '', [], [PhysicsStream], ['RATE:MET', 'BW:MET'], -1], + ['xe0noL1_l2fsperf_mht', '', [], [PhysicsStream], ['RATE:MET', 'BW:MET'], -1], + ['xe0noL1_l2fsperf_mht_em', '', [], [PhysicsStream], ['RATE:MET', 'BW:MET'], -1], + ['xe0noL1_l2fsperf_pufit', '', [], [PhysicsStream], ['RATE:MET', 'BW:MET'], -1], + ['xe50', 'L1_XE35',[], [PhysicsStream], ['RATE:MET', 'BW:MET'], -1], + ['xe110_pufit_xe70_L1XE50', 'L1_XE50', ['L1_XE50','L1_XE50'], [PhysicsStream], ['Primary:20000','RATE:MET', 'BW:MET' ], -1, ['serial',-1,['xe110_pufit','x70_L1XE50'] ]], + ['xe110_pufit_xe75_L1XE50', 'L1_XE50', ['L1_XE50','L1_XE50'], [PhysicsStream], ['Primary:20000','RATE:MET', 'BW:MET' ], -1, ['serial',-1,['xe110_pufit','x75_L1XE50'] ]], + ['xe110_pufit_xe65_L1XE55', 'L1_XE55', ['L1_XE55','L1_XE55'], [PhysicsStream], ['Primary:20000','RATE:MET', 'BW:MET' ], -1, ['serial',-1,['xe110_pufit','x65_L1XE55'] ]], + ['xe110_pufit_xe70_L1XE55', 'L1_XE55', ['L1_XE55','L1_XE55'], [PhysicsStream], ['Primary:20000','RATE:MET', 'BW:MET' ], -1, ['serial',-1,['xe110_pufit','x70_L1XE55'] ]], + ['xe110_pufit_xe75_L1XE55', 'L1_XE55', ['L1_XE55','L1_XE55'], [PhysicsStream], ['Primary:20000','RATE:MET', 'BW:MET' ], -1, ['serial',-1,['xe110_pufit','x75_L1XE55'] ]], + ['xe110_pufit_xe65_L1XE60', 'L1_XE60', ['L1_XE60','L1_XE60'], [PhysicsStream], ['Primary:20000','RATE:MET', 'BW:MET' ], -1, ['serial',-1,['xe110_pufit','x65_L1XE60'] ]], + ['xe110_pufit_xe70_L1XE60', 'L1_XE60', ['L1_XE60','L1_XE60'], [PhysicsStream], ['Primary:20000','RATE:MET', 'BW:MET' ], -1, ['serial',-1,['xe110_pufit','x70_L1XE60'] ]], + ['xe110_pufit_xe75_L1XE60', 'L1_XE60', ['L1_XE60','L1_XE60'], [PhysicsStream], ['Primary:20000','RATE:MET', 'BW:MET' ], -1, ['serial',-1,['xe110_pufit','x75_L1XE60'] ]], + + #ATR-19270 + ['xe100_trktc_lcw_L1XE50', 'L1_XE50',[], [PhysicsStream], ['RATE:MET', 'BW:MET'], -1], + ['xe110_trktc_lcw_L1XE50', 'L1_XE50',[], [PhysicsStream], ['RATE:MET', 'BW:MET'], -1], + ['xe120_trktc_lcw_L1XE50', 'L1_XE50',[], [PhysicsStream], ['RATE:MET', 'BW:MET'], -1], + ['xe0noL1_l2fsperf_trktc_lcw', '', [], [PhysicsStream], ['RATE:MET', 'BW:MET'], -1], + ['xe90_pufittrack_lcw_nojcalib_xe105_pufit_xe65_L1XE50', 'L1_XE50', [], [PhysicsStream], ['RATE:MET', 'BW:MET' ], -1, ['serial',-1,['xe105_pufit_xe65_L1XE50','xe90_pufittrack_lcw_nojcalib']]], + #['xe0noL1_pufittrack_lcw_nojcalib_xe100_pufit_xe65', '', [], [PhysicsStream], ['RATE:MET', 'BW:MET'], -1, ['serial',-1,['xe100_pufit','xe65','xe0noL1_pufittrack_lcw_nojcalib']]], + ['xe0noL1_l2fsperf_pufittrack_lcw_nojcalib', '', [], [PhysicsStream], ['RATE:MET', 'BW:MET'], -1], + ['xe110_trkmht_L1XE50', 'L1_XE50', [], [PhysicsStream], ['RATE:MET', 'BW:MET'], -1], + ['xe0noL1_l2fsperf_trkmht', '', [], [PhysicsStream], ['RATE:MET', 'BW:MET'], -1], + +] + + if TriggerFlags.doFTK(): + TriggerFlags.METSlice.signatures = TriggerFlags.METSlice.signatures() + [ + ['xe0noL1_l2fsperf_trkmht_FTK', '', [], [PhysicsStream], ['RATE:MET', 'BW:MET'], -1], + ['xe0noL1_l2fsperf_trktc_lcw_FTK', '', [], [PhysicsStream], ['RATE:MET', 'BW:MET'], -1], + ['xe100_trkmht_FTK_L1XE50', 'L1_XE50', [], [PhysicsStream], ['RATE:MET', 'BW:MET'], -1], + ['xe110_trkmht_FTK_L1XE50', 'L1_XE50', [], [PhysicsStream], ['RATE:MET', 'BW:MET'], -1], + ['xe120_trkmht_FTK_L1XE50', 'L1_XE50', [], [PhysicsStream], ['RATE:MET', 'BW:MET'], -1], + ['xe100_trktc_lcw_FTK_L1XE50', 'L1_XE50', [], [PhysicsStream], ['RATE:MET', 'BW:MET'], -1], + ['xe110_trktc_lcw_FTK_L1XE50', 'L1_XE50', [], [PhysicsStream], ['RATE:MET', 'BW:MET'], -1], + ['xe120_trktc_lcw_FTK_L1XE50', 'L1_XE50', [], [PhysicsStream], ['RATE:MET', 'BW:MET'], -1], +] + + + + TriggerFlags.TauSlice.signatures = TriggerFlags.TauSlice.signatures() + [ + ['tau25_idperf_track', 'L1_TAU12IM', [], [PhysicsStream, 'express'], ['RATE:IDMonitoring', 'BW:Tau', 'BW:ID'], -1], + ['tau25_idperf_tracktwo', 'L1_TAU12IM', [], [PhysicsStream, 'express'], ['RATE:IDMonitoring', 'BW:Tau', 'BW:ID'], -1], + ['tau25_perf_tracktwo', 'L1_TAU12IM', [], [PhysicsStream, 'express'], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau25_perf_tracktwo_L1TAU12', 'L1_TAU12', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau25_loose1_tracktwo', 'L1_TAU12IM', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau25_medium1_tracktwo', 'L1_TAU12IM', [], [PhysicsStream, 'express'], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau25_tight1_tracktwo', 'L1_TAU12IM', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau25_medium1_tracktwo_L1TAU12', 'L1_TAU12', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau25_idperf_tracktwoEF', 'L1_TAU12IM', [], [PhysicsStream, 'express'], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau25_perf_tracktwoEF', 'L1_TAU12IM', [], [PhysicsStream, 'express'], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau25_medium1_tracktwoEF', 'L1_TAU12IM', [], [PhysicsStream, 'express'], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau25_idperf_tracktwoEFmvaTES', 'L1_TAU12IM', [], [PhysicsStream, 'express'], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau25_perf_tracktwoEFmvaTES', 'L1_TAU12IM', [], [PhysicsStream, 'express'], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau25_medium1NoPt_tracktwoEFmvaTES', 'L1_TAU12IM', [], [PhysicsStream, 'express'], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau25_medium1_tracktwoEFmvaTES', 'L1_TAU12IM', [], [PhysicsStream, 'express'], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau25_idperf_tracktwoMVA', 'L1_TAU12IM', [], [PhysicsStream, 'express'], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau25_perf_tracktwoMVA', 'L1_TAU12IM', [], [PhysicsStream, 'express'], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau25_medium1_tracktwoMVA', 'L1_TAU12IM', [], [PhysicsStream, 'express'], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau25_verylooseRNN_tracktwoMVA', 'L1_TAU12IM', [], [PhysicsStream, 'express'], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau25_looseRNN_tracktwoMVA', 'L1_TAU12IM', [], [PhysicsStream, 'express'], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau25_mediumRNN_tracktwoMVA', 'L1_TAU12IM', [], [PhysicsStream, 'express'], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau25_tightRNN_tracktwoMVA', 'L1_TAU12IM', [], [PhysicsStream, 'express'], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau25_verylooseRNN_tracktwo', 'L1_TAU12IM', [], [PhysicsStream, 'express'], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau25_looseRNN_tracktwo', 'L1_TAU12IM', [], [PhysicsStream, 'express'], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau25_mediumRNN_tracktwo', 'L1_TAU12IM', [], [PhysicsStream, 'express'], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau25_tightRNN_tracktwo', 'L1_TAU12IM', [], [PhysicsStream, 'express'], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau35_medium1_tracktwoMVA_L1TAU12IM', 'L1_TAU12IM', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau35_medium1_tracktwoMVA', 'L1_TAU20IM', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau60_medium1_tracktwoMVA', 'L1_TAU40', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau80_medium1_tracktwoMVA_L1TAU60', 'L1_TAU60', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau35_mediumRNN_tracktwoMVA_L1TAU12IM', 'L1_TAU12IM', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau35_mediumRNN_tracktwoMVA', 'L1_TAU20IM', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau60_mediumRNN_tracktwoMVA', 'L1_TAU40', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau80_mediumRNN_tracktwoMVA_L1TAU60', 'L1_TAU60', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau35_loose1_tracktwo', 'L1_TAU20IM', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau35_medium1_tracktwo', 'L1_TAU20IM', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau50_medium1_tracktwo_L1TAU12', 'L1_TAU12', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau60_medium1_tracktwo', 'L1_TAU40', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau80_medium1_tracktwo', 'L1_TAU40', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau80_medium1_tracktwo_L1TAU60', 'L1_TAU60', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau125_medium1_tracktwo', 'L1_TAU60', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau160_medium1_tracktwo', 'L1_TAU60', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau160_idperf_track_L1TAU100', 'L1_TAU100', [], [PhysicsStream, 'express'], ['RATE:IDMonitoring', 'BW:Tau', 'BW:ID'], -1], + ['tau200_medium1_tracktwo_L1TAU100', 'L1_TAU100', [], [PhysicsStream], ['Primary:20000','RATE:SingleTau', 'BW:Tau'], -1], + ['tau200_medium1_tracktwoEF_L1TAU100', 'L1_TAU100', [], [PhysicsStream], ['Primary:20000','RATE:SingleTau', 'BW:Tau'], -1], + ['tau200_mediumRNN_tracktwoMVA_L1TAU100', 'L1_TAU100', [], [PhysicsStream], ['Primary:20000','RATE:SingleTau', 'BW:Tau'], -1], + ['tau160_idperf_tracktwo_L1TAU100', 'L1_TAU100', [], [PhysicsStream, 'express'], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau160_perf_tracktwo_L1TAU100', 'L1_TAU100', [], [PhysicsStream, 'express'], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau160_idperf_tracktwoEF_L1TAU100', 'L1_TAU100', [], [PhysicsStream, 'express'], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau160_perf_tracktwoEF_L1TAU100', 'L1_TAU100', [], [PhysicsStream, 'express'], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau160_idperf_tracktwoMVA_L1TAU100', 'L1_TAU100', [], [PhysicsStream, 'express'], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau160_perf_tracktwoMVA_L1TAU100', 'L1_TAU100', [], [PhysicsStream, 'express'], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau35_perf_tracktwo_tau25_perf_tracktwo', 'L1_TAU20IM_2TAU12IM' , ['L1_TAU20IM','L1_TAU12IM'],[PhysicsStream, 'express'], ['RATE:MultiTau','BW:Tau'], -1], + ['tau35_loose1_tracktwo_tau25_loose1_tracktwo', 'L1_TAU20IM_2TAU12IM_J25_2J20_3J12',['L1_TAU20IM','L1_TAU12IM'], [PhysicsStream], ['RATE:MultiTau', 'BW:Tau'], -1,['serial',-1,["tau35_loose1_tracktwo","tau25_loose1_tracktwo"]]], + ['tau35_medium1_tracktwo_tau25_medium1_tracktwo', 'L1_TAU20IM_2TAU12IM_J25_2J20_3J12',['L1_TAU20IM','L1_TAU12IM'], [PhysicsStream, 'express'], ['RATE:MultiTau', 'BW:Tau'], -1,['serial',-1,["tau35_medium1_tracktwo","tau25_medium1_tracktwo"]]], + ['tau35_medium1_tracktwoEF_tau25_medium1_tracktwoEF', 'L1_TAU20IM_2TAU12IM_J25_2J20_3J12',['L1_TAU20IM','L1_TAU12IM'], [PhysicsStream], ['RATE:MultiTau', 'BW:Tau'], -1,['serial',-1,["tau35_medium1_tracktwoEF","tau25_medium1_tracktwoEF"]]], + ['tau35_mediumRNN_tracktwoMVA_tau25_mediumRNN_tracktwoMVA', 'L1_TAU20IM_2TAU12IM_J25_2J20_3J12',['L1_TAU20IM','L1_TAU12IM'], [PhysicsStream], ['RATE:MultiTau', 'BW:Tau'], -1,['serial',-1,["tau35_mediumRNN_tracktwoMVA","tau25_mediumRNN_tracktwoMVA"]]], + ['tau35_tight1_tracktwo_tau25_tight1_tracktwo', 'L1_TAU20IM_2TAU12IM_J25_2J20_3J12',['L1_TAU20IM','L1_TAU12IM'], [PhysicsStream], ['RATE:MultiTau', 'BW:Tau'], -1,['serial',-1,["tau35_tight1_tracktwo","tau25_tight1_tracktwo"]]], + ['tau35_medium1_tracktwo_tau25_medium1_tracktwo_L1TAU20IM_2TAU12IM', 'L1_TAU20IM_2TAU12IM',['L1_TAU20IM','L1_TAU12IM'], [PhysicsStream], ['RATE:MultiTau', 'BW:Tau'], -1,['serial',-1,["tau35_medium1_tracktwo","tau25_medium1_tracktwo"]]], + ['tau35_tight1_tracktwo_tau25_tight1_tracktwo_L1DR-TAU20ITAU12I-J25', 'L1_DR-TAU20ITAU12I-J25',['L1_TAU20IM','L1_TAU12IM'], [PhysicsStream], ['Primary:20000','RATE:MultiTau', 'BW:Tau'], -1,['serial',-1,["tau35_tight1_tracktwo","tau25_tight1_tracktwo"]]], + ['tau35_tight1_tracktwo_tau25_tight1_tracktwo_03dR30', 'L1_TAU20IM_2TAU12IM_J25_2J20_3J12',['L1_TAU20IM','L1_TAU12IM'], [PhysicsStream, 'express'], ['RATE:MultiTau', 'BW:Tau'], -1,['serial',-1,["tau35_tight1_tracktwo","tau25_tight1_tracktwo"]]], + ['tau35_tight1_tracktwo_tau25_tight1_tracktwo_03dR30_L1DR-TAU20ITAU12I-J25', 'L1_DR-TAU20ITAU12I-J25',['L1_TAU20IM','L1_TAU12IM'], [PhysicsStream], ['Primary:20000','RATE:MultiTau', 'BW:Tau'], -1,['serial',-1,["tau35_tight1_tracktwo","tau25_tight1_tracktwo"]]], + ['tau80_medium1_tracktwo_L1TAU60_tau50_medium1_tracktwo_L1TAU12', 'L1_TAU60',['L1_TAU60','L1_TAU12'], [PhysicsStream], ['RATE:MultiTau', 'BW:Tau'], -1,['serial',-1,["tau80_medium1_tracktwo_L1TAU60","tau50_medium1_tracktwo_L1TAU12"]]], + ['tau125_medium1_tracktwo_tau50_medium1_tracktwo_L1TAU12', 'L1_TAU60',['L1_TAU60','L1_TAU12'], [PhysicsStream], ['RATE:MultiTau', 'BW:Tau'], -1,['serial',-1,["tau125_medium1_tracktwo","tau50_medium1_tracktwo_L1TAU12"]]], + ['tau35_perf_tracktwo_tau25_perf_tracktwo_ditauM', 'L1_TAU20IM_2TAU12IM' , ['L1_TAU20IM','L1_TAU12IM'],[PhysicsStream, 'express'], ['RATE:MultiTau','BW:Tau'], -1], + ['tau25_singlepion_tracktwo', 'L1_TAU12', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau25_dikaonmass_tracktwo', 'L1_TAU12', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau25_dipion1_tracktwo', 'L1_TAU12', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau25_dipion2_tracktwo', 'L1_TAU12', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau25_kaonpi1_tracktwo', 'L1_TAU12', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau25_kaonpi2_tracktwo', 'L1_TAU12', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau35_medium1_tracktwo_L1TAU12IM', 'L1_TAU12IM', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau35_medium1_tracktwoEF_L1TAU12IM', 'L1_TAU12IM', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau35_medium1_tracktwoEF', 'L1_TAU20IM', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau60_medium1_tracktwoEF', 'L1_TAU40', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau80_medium1_tracktwoEF_L1TAU60', 'L1_TAU60', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau80_tightRNN_tracktwoMVA_L1TAU60', 'L1_TAU60', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau60_tightRNN_tracktwoMVA', 'L1_TAU40', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau40_tightRNN_tracktwoMVA', 'L1_TAU20IM', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau35_tightRNN_tracktwoMVA', 'L1_TAU20IM', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau35_tightRNN_tracktwoMVA_L1TAU12IM', 'L1_TAU12IM', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau25_tightRNN_tracktwoMVA_L1TAU12', 'L1_TAU12', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau35_tight1_tracktwoEF_tau25_tight1_tracktwoEF_03dR30_L1DR-TAU20ITAU12I-J25', 'L1_DR-TAU20ITAU12I-J25',['L1_TAU20IM','L1_TAU12IM'], [PhysicsStream], ['Primary:20000','RATE:MultiTau', 'BW:Tau'], -1,['serial',-1,["tau35_tight1_tracktwoEF","tau25_tight1_tracktwoEF"]]], + ['tau35_tight1_tracktwoEF_tau25_tight1_tracktwoEF_L1DR-TAU20ITAU12I-J25', 'L1_DR-TAU20ITAU12I-J25',['L1_TAU20IM','L1_TAU12IM'], [PhysicsStream], ['Primary:20000','RATE:MultiTau', 'BW:Tau'], -1,['serial',-1,["tau35_tight1_tracktwoEF","tau25_tight1_tracktwoEF"]]], + + #ATR-19269 + ['tau0_perf_ptonly_L1TAU12', 'L1_TAU12', [], [PhysicsStream, 'express'], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau0_perf_ptonly_L1TAU12IM', 'L1_TAU12IM', [], [PhysicsStream, 'express'], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau0_perf_ptonly_L1TAU8', 'L1_TAU8', [], [PhysicsStream, 'express'], ['RATE:SingleTau', 'BW:Tau'], -1], + ] + + if TriggerFlags.doFTK(): + TriggerFlags.TauSlice.signatures = TriggerFlags.TauSlice.signatures() + [] + + + TriggerFlags.EgammaSlice.signatures = TriggerFlags.EgammaSlice.signatures() + [ + ['e26_lhtight_idperf', 'L1_EM22VHI', [], [PhysicsStream], ['RATE:IDMonitoring', 'BW:Egamma', 'BW:ID'],-1], + ['e28_lhtight_idperf', 'L1_EM24VHI', [], [PhysicsStream, 'express'], ['RATE:IDMonitoring', 'BW:Egamma', 'BW:ID'],-1], + ['e28_lhtight_idperf_L1EM24VHIM', 'L1_EM24VHIM', [], [PhysicsStream, 'express'], ['RATE:IDMonitoring', 'BW:Egamma', 'BW:ID'],-1], + ['g10_loose', 'L1_EM7', [], [PhysicsStream,'express'], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g20_loose_L1EM15', 'L1_EM15', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g10_etcut', 'L1_EM7', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g20_etcut_L1EM12', 'L1_EM12', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g200_etcut', 'L1_EM22VHI', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g250_etcut', 'L1_EM22VHI', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g300_etcut_L1EM24VHI', 'L1_EM24VHI', [], [PhysicsStream], ['Primary:20000','RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g300_etcut_L1EM24VHIM', 'L1_EM24VHIM', [], [PhysicsStream], ['Primary:20000','RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g22_tight', 'L1_EM15VH', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g25_medium_L1EM22VHI', 'L1_EM22VHI', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g25_medium_L1EM24VHI', 'L1_EM24VHI', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g25_medium_L1EM24VHIM', 'L1_EM24VHIM', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g35_medium_L1EM24VHI', 'L1_EM24VHI', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g35_loose_L1EM22VHI', 'L1_EM22VHI', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g45_tight_L1EM22VHI', 'L1_EM22VHI', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g35_loose_L1EM24VHI', 'L1_EM24VHI', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['e140_etcut', 'L1_EM24VHI', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e140_etcut_L1EM24VHIM', 'L1_EM24VHIM', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e140_lhvloose_nod0', 'L1_EM24VHI', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e160_etcut', 'L1_EM24VHI', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e160_etcut_L1EM24VHIM', 'L1_EM24VHIM', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e180_etcut', 'L1_EM24VHI', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e180_etcut_L1EM24VHIM', 'L1_EM24VHIM', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['g0_hiptrt_L1EM24VHI', 'L1_EM24VHI', [], [PhysicsStream], ['Primary:20000','RATE:SinglePhoton', 'BW:Egamma'], -1], + ['g0_hiptrt_L1EM24VHIM', 'L1_EM24VHIM', [], [PhysicsStream], ['Primary:20000','RATE:SinglePhoton', 'BW:Egamma'], -1], + ['g15_loose_L1EM7', 'L1_EM7', [], [PhysicsStream,'express'], ['RATE:SinglePhoton', 'BW:Egamma'], -1], + ['g20_loose_L1EM12', 'L1_EM12', [], [PhysicsStream,'express'], ['RATE:SinglePhoton', 'BW:Egamma'], -1], # pass through + ['g40_loose_L1EM15', 'L1_EM15', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'], -1], + ['g45_loose_L1EM15', 'L1_EM15', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'], -1], + ['g50_loose_L1EM15', 'L1_EM15', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'], -1], + ['g80_loose', 'L1_EM24VHI', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'], -1], + ['g100_loose', 'L1_EM24VHI', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'], -1], + ['g25_loose_L1EM15', 'L1_EM15', [], [PhysicsStream,'express'], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g35_loose_L1EM15', 'L1_EM15', [], [PhysicsStream,'express'], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g60_loose', 'L1_EM24VHI', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g70_loose', 'L1_EM24VHI', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g6_tight_icalotight', 'L1_EM3', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g10_medium', 'L1_EM7', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g15_loose_L1EM3', 'L1_EM3', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g20_loose', 'L1_EM15VH',[], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g40_tight', 'L1_EM20VH', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g45_tight', 'L1_EM20VHI',[], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g50_loose', 'L1_EM15VH', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g60_loose_L1EM15VH', 'L1_EM15VH', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g25_tight_L1EM20VH', 'L1_EM20VH',[], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g15_loose_L1EM8VH', 'L1_EM8VH', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['2g20_tight_icalotight_L12EM15VHI', 'L1_2EM15VHI', [], [PhysicsStream], ['Primary:20000','RATE:MultiPhoton', 'BW:Egamma'],-1], + ['2g22_tight_icalovloose_L12EM15VHI', 'L1_2EM15VHI', [], [PhysicsStream], ['Primary:20000','RATE:MultiPhoton', 'BW:Egamma'],-1], + ['2g22_tight_icalovloose', 'L1_2EM15VH', [], [PhysicsStream], ['RATE:MultiPhoton', 'BW:Egamma'],-1], + ['2g22_tight_icalotight_L12EM15VHI', 'L1_2EM15VHI', [], [PhysicsStream], ['Primary:20000','RATE:MultiPhoton', 'BW:Egamma'],-1], + ['2g22_tight_icalotight', 'L1_2EM15VH', [], [PhysicsStream], ['RATE:MultiPhoton', 'BW:Egamma'],-1], + ['2g50_loose', 'L1_2EM15VH', [], [PhysicsStream], ['RATE:MultiPhoton', 'BW:Egamma'],-1], + ['2g60_loose_L12EM15VH', 'L1_2EM15VH', [], [PhysicsStream], ['RATE:MultiPhoton', 'BW:Egamma'],-1], + ['2g60_loose_L12EM20VH', 'L1_2EM20VH', [], [PhysicsStream], ['Primary:20000','RATE:MultiPhoton', 'BW:Egamma'],-1], + ['g50_loose_L1EM20VH', 'L1_EM20VH', [], [PhysicsStream], ['RATE:MultiPhoton', 'BW:Egamma'],-1], + ['g60_loose_L1EM20VH', 'L1_EM20VH', [], [PhysicsStream], ['RATE:MultiPhoton', 'BW:Egamma'],-1], + ['2g22_tight', 'L1_2EM15VH', [], [PhysicsStream], ['RATE:MultiPhoton', 'BW:Egamma'],-1], + ['3g20_loose', 'L1_2EM15VH', [], [PhysicsStream], ['RATE:MultiPhoton', 'BW:Egamma'],-1], + ['2g25_loose_g20_loose', 'L1_2EM20VH', [], [PhysicsStream], ['Primary:20000','RATE:MultiPhoton', 'BW:Egamma'],-1], + ['3g25_loose', 'L1_2EM20VH', [], [PhysicsStream], ['Primary:20000','RATE:MultiPhoton', 'BW:Egamma'],-1], + ['2g20_loose_L12EM15', 'L1_2EM15', [], [PhysicsStream], ['RATE:MultiPhoton', 'BW:Egamma'],-1], + ['2g20_loose', 'L1_2EM15VH', [], [PhysicsStream], ['RATE:MultiPhoton', 'BW:Egamma'],-1], + ['2g10_loose', 'L1_2EM7', [], [PhysicsStream,'express'], ['RATE:MultiPhoton', 'BW:Egamma'],-1], + ['e17_lhloose_cutd0dphideta_L1EM15', 'L1_EM15', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e17_lhloose_nod0_L1EM15', 'L1_EM15', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e17_lhloose_nodeta_L1EM15', 'L1_EM15', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e17_lhloose_nodphires_L1EM15', 'L1_EM15', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e26_lhvloose_nod0_L1EM22VH', 'L1_EM22VH', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e28_lhvloose_nod0_L1EM22VH', 'L1_EM22VH', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e26_lhmedium_nod0_L1EM22VH', 'L1_EM22VH', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e28_lhmedium_nod0_L1EM22VH', 'L1_EM22VH', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e9_lhvloose_nod0', 'L1_EM3', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e9_lhvloose_nod0_L1EM7', 'L1_EM7', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e9_lhvloose_nod0_L1EM8VH', 'L1_EM8VH', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e28_lhtight_nod0_L1EM24VHIM_e15_etcut_L1EM7_Zee', 'L1_EM24VHIM', ['L1_EM24VHIM','L1_EM7'], [PhysicsStream], ['Primary:20000','RATE:MultiElectron', 'BW:Egamma'],-1], + ['e5_lhtight_nod0_e4_etcut', 'L1_2EM3', [], [PhysicsStream], ['RATE:MultiElectron', 'BW:Egamma'],-1], + ['e5_lhtight_nod0_e4_etcut_Jpsiee', 'L1_2EM3', [], [PhysicsStream], ['RATE:MultiElectron', 'BW:Egamma'],-1], + ['e9_lhtight_nod0_e4_etcut_Jpsiee_L1JPSI-1M5-EM7', 'L1_JPSI-1M5-EM7', ['L1_EM7','L1_EM3'], [PhysicsStream, 'express'], ['RATE:MultiElectron', 'BW:Egamma'],-1, True], + ['e5_lhtight_nod0_e9_etcut_Jpsiee_L1JPSI-1M5-EM7', 'L1_JPSI-1M5-EM7', ['L1_EM3','L1_EM7'], [PhysicsStream], ['RATE:MultiElectron', 'BW:Egamma'],-1, True], + ['e14_lhtight_nod0_e4_etcut_Jpsiee_L1JPSI-1M5-EM12', 'L1_JPSI-1M5-EM12', ['L1_EM12','L1_EM3'], [PhysicsStream], ['RATE:MultiElectron', 'BW:Egamma'],-1, True], + ['e5_lhtight_nod0_e14_etcut_Jpsiee_L1JPSI-1M5-EM12', 'L1_JPSI-1M5-EM12', ['L1_EM3','L1_EM12'], [PhysicsStream], ['RATE:MultiElectron', 'BW:Egamma'],-1, True], + ['e5_lhloose_idperf', 'L1_EM3', [], [PhysicsStream], ['RATE:IDMonitoring', 'BW:Egamma', 'BW:ID'],-1], + ['e5_lhmedium_nod0', 'L1_EM3', ['L1_EM3','',''], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e5_lhtight_idperf', 'L1_EM3', [], [PhysicsStream], ['RATE:IDMonitoring', 'BW:Egamma', 'BW:ID'],-1], + ['e10_lhtight_idperf', 'L1_EM7', [], [PhysicsStream], ['RATE:IDMonitoring', 'BW:Egamma', 'BW:ID'],-1], + ['e24_lhmedium_idperf_L1EM20VH', 'L1_EM20VH', [], [PhysicsStream], ['RATE:IDMonitoring', 'BW:Egamma', 'BW:ID'],-1], + ['e17_lhmedium_nod0_L1EM15', 'L1_EM15', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e24_lhmedium_L1EM18VHI', 'L1_EM18VHI', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['g140_tight', 'L1_EM24VHI', [], [PhysicsStream], ['Primary:20000','RATE:SinglePhoton','BW:Egamma'],-1], + ['g140_tight_L1EM24VHIM', 'L1_EM24VHIM', [], [PhysicsStream], ['Primary:20000','RATE:SinglePhoton','BW:Egamma'],-1], + ['g160_loose', 'L1_EM24VHI', [], [PhysicsStream], ['Primary:17000','RATE:SinglePhoton','BW:Egamma'],-1], + ['g180_loose', 'L1_EM24VHI', [], [PhysicsStream], ['Primary:17000','RATE:SinglePhoton','BW:Egamma'],-1], + ['g200_loose', 'L1_EM24VHI', [], [PhysicsStream, 'express'], ['Primary:20000','RATE:SinglePhoton','BW:Egamma'],-1], + ['g200_loose_L1EM24VHIM', 'L1_EM24VHIM', [], [PhysicsStream], ['Primary:20000','RATE:SinglePhoton','BW:Egamma'],-1], + ['2e17_lhloose_nod0_L12EM15', 'L1_2EM15', [], [PhysicsStream], ['RATE:MultiElectron', 'BW:Egamma'],-1 ], + ['e5_lhloose_nod0', 'L1_EM3', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1 ], + ['e5_lhloose_nod0_idperf', 'L1_EM3', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1 ], + ['e10_lhvloose_nod0_L1EM7', 'L1_EM7', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1 ], + ['e15_lhvloose_nod0_L1EM7', 'L1_EM7', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1 ], + ['e20_lhvloose_nod0_L1EM12', 'L1_EM12', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1 ], + ['e25_lhvloose_nod0_L1EM15', 'L1_EM15', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1 ], + ['e30_lhvloose_nod0_L1EM15', 'L1_EM15', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1 ], + ['e40_lhvloose_nod0_L1EM15', 'L1_EM15', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1 ], + ['e50_lhvloose_nod0_L1EM15', 'L1_EM15', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1 ], + ['e70_lhvloose_nod0', 'L1_EM24VHI', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1 ], + ['e80_lhvloose_nod0', 'L1_EM24VHI', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1 ], + ['e100_lhvloose_nod0', 'L1_EM24VHI', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1 ], + ['e120_lhvloose_nod0', 'L1_EM24VHI', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1 ], + ['e80_lhmedium_nod0', 'L1_EM22VHI', [], [PhysicsStream], ['Primary:17000','RATE:SingleElectron', 'BW:Egamma'],-1 ], + ['e80_lhmedium_nod0_L1EM24VHI', 'L1_EM24VHI', [], [PhysicsStream], ['Primary:20000','RATE:SingleElectron', 'BW:Egamma'],-1 ], + ['e5_etcut', 'L1_EM3', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e10_etcut_L1EM7', 'L1_EM7', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e15_etcut_L1EM7', 'L1_EM7', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e20_etcut_L1EM12', 'L1_EM12', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e25_etcut_L1EM15', 'L1_EM15', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e30_etcut_L1EM15', 'L1_EM15', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e40_etcut_L1EM15', 'L1_EM15', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e50_etcut_L1EM15', 'L1_EM15', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e60_etcut', 'L1_EM24VHI', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e70_etcut', 'L1_EM24VHI', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e80_etcut', 'L1_EM24VHI', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e100_etcut', 'L1_EM24VHI', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e120_etcut', 'L1_EM24VHI', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e200_etcut', 'L1_EM24VHI', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e5_lhvloose_nod0', 'L1_EM3', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e12_lhvloose_nod0_L1EM10VH', 'L1_EM10VH', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e17_lhvloose_nod0', 'L1_EM15VH', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e20_lhvloose_nod0', 'L1_EM15VH', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e40_lhvloose_nod0', 'L1_EM20VH', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e60_lhvloose_nod0', 'L1_EM22VHI', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e24_lhmedium_nod0_L1EM18VHI', 'L1_EM18VHI', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e24_lhtight_nod0_L1EM20VH', 'L1_EM20VH', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e7_lhmedium_nod0', 'L1_EM3', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e9_lhloose_nod0', 'L1_EM7', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e9_lhmedium_nod0', 'L1_EM7', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e12_lhmedium_nod0', 'L1_EM8VH', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e17_lhmedium_nod0', 'L1_EM15VH', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e17_lhmedium_nod0_ivarloose_L1EM15VHI', 'L1_EM15VHI', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e20_lhmedium_nod0', 'L1_EM15VH', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e24_lhmedium_nod0_L1EM15VH', 'L1_EM15VH', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e60_lhloose_nod0', 'L1_EM22VHI', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e70_lhloose_nod0', 'L1_EM22VHI', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e80_lhloose_nod0', 'L1_EM22VHI', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e80_lhloose_nod0_L1EM24VHI', 'L1_EM24VHI', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e5_lhtight_nod0', 'L1_EM3', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e5_lhtight_nod0_e4_etcut_Jpsiee_L1RD0_FILLED', 'L1_RD0_FILLED', ['L1_EM3','L1_EM3'], [PhysicsStream, 'express'], ['RATE:MultiElectron', 'BW:Egamma'],-1, True], + ['e9_lhtight_nod0', 'L1_EM7', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e14_lhtight_nod0', 'L1_EM12', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e26_lhmedium_nod0', 'L1_EM22VHI', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e12_lhloose_cutd0dphideta_L1EM10VH', 'L1_EM10VH', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e12_lhloose_nod0_L1EM10VH', 'L1_EM10VH', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e12_lhloose_nodeta_L1EM10VH', 'L1_EM10VH', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e12_lhloose_nodphires_L1EM10VH', 'L1_EM10VH', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e12_lhloose_nod0', 'L1_EM8VH', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e17_lhloose_cutd0dphideta', 'L1_EM15VH', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['g25_loose', 'L1_EM15VH',[], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g25_medium', 'L1_EM15VH',[], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g35_loose', 'L1_EM15VH',[], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g35_medium', 'L1_EM15VH',[], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g24_loose', 'L1_EM20VH',[], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['2e19_lhvloose_nod0', 'L1_2EM15VHI', [], [PhysicsStream], ['Primary:20000','RATE:MultiElectron', 'BW:Egamma'],-1], + ['e24_lhloose_nod0_2e12_lhloose_nod0_L1EM20VH_3EM10VH', 'L1_EM20VH_3EM10VH', ['L1_EM20VH','L1_3EM10VH'], [PhysicsStream], ['Primary:20000','RATE:MultiElectron', 'BW:Egamma'],-1], + ['e24_lhmedium_nod0_2g12_medium', 'L1_EM20VH_3EM10VH', ['L1_EM20VH','L1_3EM10VH'], [PhysicsStream], ['Primary:20000','RATE:ElectronPhoton', 'BW:Egamma'],-1,['parallel',-1,[] ]], + ['g25_medium_L1EM20VH', 'L1_EM20VH', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g35_medium_L1EM20VH', 'L1_EM20VH', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g35_loose_L1EM20VH', 'L1_EM20VH', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['e24_lhmedium_nod0_L1EM15VH_g25_medium', 'L1_2EM15VH', [], [PhysicsStream], ['RATE:ElectronPhoton', 'BW:Egamma'], -1,['parallel',-1,[] ]], + ['e20_lhmedium_nod0_g35_loose', 'L1_2EM15VH', [], [PhysicsStream], ['RATE:ElectronPhoton', 'BW:Egamma'], -1,['parallel',-1,[] ]], + ['g35_loose_g25_loose_L12EM20VH', 'L1_2EM20VH', [], [PhysicsStream], ['RATE:MultiPhoton', 'BW:Egamma'],-1], + ['e24_lhmedium_nod0_L1EM20VH', 'L1_EM20VH', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e28_lhtight_nod0', 'L1_EM24VHI', [], [PhysicsStream], ['Primary:17000','RATE:SingleElectron', 'BW:Egamma'],-1], + ['e28_lhtight_nod0_ivarloose', 'L1_EM24VHI', [], [PhysicsStream,'express'], ['Primary:20000','RATE:SingleElectron', 'BW:Egamma'],-1], + ['e28_lhtight_nod0_ivarloose_L1EM24VHIM', 'L1_EM24VHIM', [], [PhysicsStream], ['Primary:20000','RATE:SingleElectron', 'BW:Egamma'],-1], + ['e28_lhtight_nod0_ivarloose_L1EM22VHI', 'L1_EM22VHI', [], [PhysicsStream], ['Primary:17000','RATE:SingleElectron', 'BW:Egamma'],-1], + ['e250_etcut', 'L1_EM24VHI', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e300_etcut_L1EM24VHIM', 'L1_EM24VHIM', [], [PhysicsStream], ['Primary:20000','RATE:SingleElectron', 'BW:Egamma'],-1], + ['e60_lhmedium_nod0_L1EM24VHI', 'L1_EM24VHI', [], [PhysicsStream], ['Primary:20000','RATE:SingleElectron', 'BW:Egamma'],-1], + ['e60_lhmedium_nod0_L1EM24VHIM', 'L1_EM24VHIM', [], [PhysicsStream], ['Primary:20000','RATE:SingleElectron', 'BW:Egamma'],-1], + ['e140_lhloose_nod0_L1EM24VHI', 'L1_EM24VHI', [], [PhysicsStream], ['Primary:20000','RATE:SingleElectron', 'BW:Egamma'],-1], + ['e140_lhloose_nod0_L1EM24VHIM', 'L1_EM24VHIM', [], [PhysicsStream], ['Primary:20000','RATE:SingleElectron', 'BW:Egamma'],-1], + ['e32_lhtight_nod0_ivarloose', 'L1_EM24VHI', [], [PhysicsStream], ['Primary:20000','RATE:SingleElectron', 'BW:Egamma'],-1], + ['e24_lhvloose_nod0_L1EM20VH', 'L1_EM20VH', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e26_lhvloose_nod0', 'L1_EM22VHI', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e28_lhmedium_nod0_L1EM24VHIM', 'L1_EM24VHIM', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e80_lhmedium_nod0_L1EM24VHIM', 'L1_EM24VHIM', [], [PhysicsStream], ['Primary:20000','RATE:SingleElectron', 'BW:Egamma'],-1], + ['e17_lhvloose_nod0_L1EM15VHI', 'L1_EM15VHI', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e19_lhvloose_nod0', 'L1_EM15VHI', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['g20_tight_L1EM15VHI', 'L1_EM15VHI', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g20_tight_icalovloose_L1EM15VHI', 'L1_EM15VHI', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g20_tight_icalotight_L1EM15VHI', 'L1_EM15VHI', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g22_tight_L1EM15VHI', 'L1_EM15VHI', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g22_tight_icalovloose_L1EM15VHI', 'L1_EM15VHI', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g22_tight_icalovloose', 'L1_EM15VH', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g22_tight_icalotight_L1EM15VHI', 'L1_EM15VHI', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g22_tight_icalotight', 'L1_EM15VH', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g25_loose_L1EM20VH', 'L1_EM20VH', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['e24_lhloose_nod0_L1EM20VH', 'L1_EM20VH', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['g12_loose', 'L1_EM10VH', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g12_medium', 'L1_EM10VH', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['e60_lhloose_nod0_L1EM24VHIM', 'L1_EM24VHIM', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e70_lhloose_nod0_L1EM24VHIM', 'L1_EM24VHIM', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e80_lhloose_nod0_L1EM24VHIM', 'L1_EM24VHIM', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['g70_loose_L1EM24VHIM', 'L1_EM24VHIM', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g80_loose_L1EM24VHIM', 'L1_EM24VHIM', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g80_loose_icalovloose_L1EM24VHIM', 'L1_EM24VHIM', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['e60_etcut_L1EM24VHIM', 'L1_EM24VHIM', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e70_etcut_L1EM24VHIM', 'L1_EM24VHIM', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e80_etcut_L1EM24VHIM', 'L1_EM24VHIM', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e100_etcut_L1EM24VHIM', 'L1_EM24VHIM', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e120_etcut_L1EM24VHIM', 'L1_EM24VHIM', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e200_etcut_L1EM24VHIM', 'L1_EM24VHIM', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e250_etcut_L1EM24VHIM', 'L1_EM24VHIM', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e70_lhvloose_nod0_L1EM24VHIM', 'L1_EM24VHIM', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e80_lhvloose_nod0_L1EM24VHIM', 'L1_EM24VHIM', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e100_lhvloose_nod0_L1EM24VHIM', 'L1_EM24VHIM', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e120_lhvloose_nod0_L1EM24VHIM', 'L1_EM24VHIM', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e140_lhvloose_nod0_L1EM24VHIM', 'L1_EM24VHIM', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e160_lhvloose_nod0_L1EM24VHIM', 'L1_EM24VHIM', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e160_lhvloose_nod0', 'L1_EM24VHI', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['g60_loose_L1EM24VHIM', 'L1_EM24VHIM', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g100_loose_L1EM24VHIM', 'L1_EM24VHIM', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g120_loose_L1EM24VHIM', 'L1_EM24VHIM', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g140_loose_L1EM24VHIM', 'L1_EM24VHIM', [], [PhysicsStream], ['Primary:17000','RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g160_loose_L1EM24VHIM', 'L1_EM24VHIM', [], [PhysicsStream], ['Primary:17000','RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g180_loose_L1EM24VHIM', 'L1_EM24VHIM', [], [PhysicsStream], ['Primary:17000','RATE:SinglePhoton', 'BW:Egamma'],-1], + ['e20_lhmedium_nod0_L1EM18VHI', 'L1_EM18VHI', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e20_lhtight_nod0_ivarloose_L1EM18VHI', 'L1_EM18VHI', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['g35_loose_L1EM24VHIM', 'L1_EM24VHIM', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g35_tight_icalotight_L1EM24VHIM', 'L1_EM24VHIM', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g35_tight_icalotight_L1EM24VHI', 'L1_EM24VHI', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g40_tight_icalotight_L1EM24VHIM', 'L1_EM24VHIM', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g40_tight_icalotight_L1EM24VHI', 'L1_EM24VHI', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g85_tight_L1EM24VHIM', 'L1_EM24VHIM', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g85_tight_icalovloose_L1EM24VHIM', 'L1_EM24VHIM', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g85_tight_icalovloose_L1EM24VHI', 'L1_EM24VHI', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'], -1], + ['g100_tight_L1EM24VHIM', 'L1_EM24VHIM', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g100_tight_icalovloose_L1EM24VHIM', 'L1_EM24VHIM', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g100_tight_icalovloose_L1EM24VHI', 'L1_EM24VHI', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['e25_mergedtight_ivarloose', 'L1_EM20VH', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e25_mergedtight', 'L1_EM20VH', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'], -1], + ['e30_mergedtight', 'L1_EM20VH', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'], -1], + ['g35_medium_icalovloose', 'L1_EM20VH', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['g35_medium_icalotight', 'L1_EM20VH', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e5_lhvloose_nod0_bBeexM6000t', '', ['L1_EM3'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag],-1], + ['2e5_lhvloose_nod0_bBeexM6000t', '', ['L1_EM3','L1_EM3'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag],-1], + + #ATR-19268 + ['g20_tight_icaloloose', 'L1_EM18VHI', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['e10_lhmedium_nod0_ivarloose', 'L1_EM8VH', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e5_lhvloose_nod0_j70_j50_0eta490_invm1000j50_dphi28_xe50_pufit_L1MJJ-500-NFF', 'L1_MJJ-500-NFF', ['L1_EM3', '', '',''], [PhysicsStream], ['RATE:EgammaJet', 'BW:Egamma', 'BW:Jet'], -1,['serial',-1,["e5_lhvloose_nod0","j70","j50_0eta490","xe50_pufit"]]], + ['e5_lhvloose_nod0_j70_j50_0eta490_invm1000j50_xe50_pufit_L1MJJ-700', 'L1_MJJ-700', ['L1_EM3', '', '',''], [PhysicsStream], ['RATE:EgammaJet', 'BW:Egamma', 'BW:Jet'], -1,['serial',-1,["e5_lhvloose_nod0","j70","j50_0eta490","xe50_pufit"]]], + ['e5_lhvloose_nod0_j70_j50_0eta490_invm1000j50_dphi28_xe50_pufit_L1MJJ-700', 'L1_MJJ-700', ['L1_EM3', '', '',''], [PhysicsStream], ['RATE:EgammaJet', 'BW:Egamma', 'BW:Jet'], -1,['serial',-1,["e5_lhvloose_nod0","j70","j50_0eta490","xe50_pufit"]]], + ['g27_medium_L1EM24VHI', 'L1_EM24VHI', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['g45_loose_L1EM15VH', 'L1_EM15VH', [], [PhysicsStream], ['RATE:SinglePhoton', 'BW:Egamma'],-1], + ['e17_lhmedium_nod0_L1EM15VHI', 'L1_EM15VHI', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ['e24_lhmedium_nod0_ivarloose', 'L1_EM20VHI', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1], + ] + + + ########################################################################################################### + # Bphysics + ########################################################################################################### + TriggerFlags.BphysicsSlice.signatures = TriggerFlags.BphysicsSlice.signatures() + [ + ['mu11_mu6_bNocut_L1LFV-MU11', 'L1_LFV-MU11', ['L1_MU11','L1_MU6'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1, False], + ['mu11_mu6_bDimu_noinvm_novtx_ss_L1LFV-MU11', 'L1_LFV-MU11', ['L1_MU11','L1_MU6'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1, False], + ['mu11_mu6_bDimu_novtx_noos_L1LFV-MU11', 'L1_LFV-MU11', ['L1_MU11','L1_MU6'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1, False], + ['3mu4_bDimu2700', 'L1_3MU4', [], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1], + ['mu6_mu4_bDimu', 'L1_MU6_2MU4', ['L1_MU6','L1_MU4'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1], + ['2mu6_bDimu', 'L1_2MU6', [], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1], + ['mu10_bJpsi_TrkPEBmon', 'L1_MU10', [], [BPhysicsStream,'express'], [RATE_BphysTag,BW_BphysTag], -1], + ['3mu6_bJpsi', 'L1_3MU6', [], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1], + ['3mu6_bTau', 'L1_3MU6', [], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1], + ['3mu6_bUpsi', 'L1_3MU6', [], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1], + ['mu6_2mu4_bDimu6000', 'L1_MU6_3MU4', ['L1_MU6','L1_3MU4'], [BPhysicsStream], [RATE_BphysTag, BW_BphysTag], -1], + ['mu4_mu4_idperf_bJpsimumu_noid', 'L1_2MU4', [], [PhysicsStream, 'express'], ['RATE:IDMonitoring',BW_BphysTag, 'BW:ID'], -1], + ['2mu6_bBmumuxv2_L1LFV-MU6', 'L1_LFV-MU6', ['L1_2MU6'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1, False], + ['2mu6_bPhi_L1LFV-MU6', 'L1_LFV-MU6', ['L1_2MU6'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1, False], + ['2mu6_bDimu_L1LFV-MU6', 'L1_LFV-MU6', ['L1_2MU6'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1, False], + ['2mu6_bDimu_novtx_noos_L1LFV-MU6', 'L1_LFV-MU6', ['L1_2MU6'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1, False], + ['2mu4_bBmumu_L1BPH-2M9-2MU4_BPH-0DR15-2MU4', 'L1_BPH-2M9-2MU4_BPH-0DR15-2MU4', ['L1_2MU4'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1, False], + ['2mu4_bBmumu_Lxy0_L1BPH-2M9-2MU4_BPH-0DR15-2MU4', 'L1_BPH-2M9-2MU4_BPH-0DR15-2MU4', ['L1_2MU4'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1, False], + ['2mu4_bJpsimumu_Lxy0_L1BPH-2M9-2MU4_BPH-0DR15-2MU4', 'L1_BPH-2M9-2MU4_BPH-0DR15-2MU4', ['L1_2MU4'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1, False], + ['2mu4_bBmumux_BsmumuPhi_L1BPH-2M9-2MU4_BPH-0DR15-2MU4', 'L1_BPH-2M9-2MU4_BPH-0DR15-2MU4', ['L1_2MU4'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1, False], + ['2mu4_bBmumux_BpmumuKp_L1BPH-2M9-2MU4_BPH-0DR15-2MU4', 'L1_BPH-2M9-2MU4_BPH-0DR15-2MU4', ['L1_2MU4'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1, False], + ['mu6_mu4_bBmumu_L1BPH-2M9-MU6MU4_BPH-0DR15-MU6MU4','L1_BPH-2M9-MU6MU4_BPH-0DR15-MU6MU4', ['L1_MU6','L1_MU4'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1, False], + ['mu6_mu4_bBmumu_Lxy0_L1BPH-2M9-MU6MU4_BPH-0DR15-MU6MU4','L1_BPH-2M9-MU6MU4_BPH-0DR15-MU6MU4', ['L1_MU6','L1_MU4'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1, False], + ['mu6_mu4_bJpsimumu_L1BPH-2M9-MU6MU4_BPH-0DR15-MU6MU4','L1_BPH-2M9-MU6MU4_BPH-0DR15-MU6MU4', ['L1_MU6','L1_MU4'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1, False], + ['mu6_mu4_bJpsimumu_Lxy0_L1BPH-2M9-MU6MU4_BPH-0DR15-MU6MU4','L1_BPH-2M9-MU6MU4_BPH-0DR15-MU6MU4', ['L1_MU6','L1_MU4'], [BPhysicsStream, 'express'], [RATE_BphysTag,BW_BphysTag], -1, False], + ['mu6_mu4_bBmumux_BsmumuPhi_L1BPH-2M9-MU6MU4_BPH-0DR15-MU6MU4','L1_BPH-2M9-MU6MU4_BPH-0DR15-MU6MU4', ['L1_MU6','L1_MU4'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1, False], + ['mu6_mu4_bBmumux_BpmumuKp_L1BPH-2M9-MU6MU4_BPH-0DR15-MU6MU4','L1_BPH-2M9-MU6MU4_BPH-0DR15-MU6MU4', ['L1_MU6','L1_MU4'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1, False], + ['mu6_mu4_bDimu_L1BPH-2M9-MU6MU4_BPH-0DR15-MU6MU4','L1_BPH-2M9-MU6MU4_BPH-0DR15-MU6MU4', ['L1_MU6','L1_MU4'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1, False], + ['mu6_mu4_bDimu_novtx_noos_L1BPH-2M9-MU6MU4_BPH-0DR15-MU6MU4','L1_BPH-2M9-MU6MU4_BPH-0DR15-MU6MU4', ['L1_MU6','L1_MU4'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1, False], + ['mu20_mu6noL1_bNocut', 'L1_MU20MU21', ['L1_MU20','L2_mu20'], [BPhysicsStream], [RATE_BphysTag,'BW:Muon'], -1,['serial',-1,['mu20','mu6noL1']]], + ['2mu6_bDimu_L1BPH-2M9-2MU6_BPH-2DR15-2MU6', 'L1_BPH-2M9-2MU6_BPH-2DR15-2MU6', ['L1_2MU6'], [BPhysicsStream, 'express'], [RATE_BphysTag,BW_BphysTag], -1, False], + ['2mu6_bDimu_novtx_noos_L1BPH-2M9-2MU6_BPH-2DR15-2MU6', 'L1_BPH-2M9-2MU6_BPH-2DR15-2MU6', ['L1_2MU6'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1, False], + ['2mu6_bBmumu_L1BPH-2M9-2MU6_BPH-2DR15-2MU6', 'L1_BPH-2M9-2MU6_BPH-2DR15-2MU6', ['L1_2MU6'], [BPhysicsStream, 'express'], [RATE_BphysTag,BW_BphysTag], -1, False], + ['mu6_mu4_bUpsimumu_L1BPH-8M15-MU6MU4_BPH-0DR22-MU6MU4-BO', 'L1_BPH-8M15-MU6MU4_BPH-0DR22-MU6MU4-BO', ['L1_MU6','L1_MU4'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1, False], + ['mu11_mu6_bDimu_noinvm_novtx_ss', 'L1_MU11_2MU6', ['L1_MU11','L1_MU6'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1], + ['mu11_mu6_bDimu_novtx_noos', 'L1_MU11_2MU6', ['L1_MU11','L1_MU6'], [BPhysicsStream, 'express'], [RATE_BphysTag,BW_BphysTag], -1], + ['mu11_mu6_bNocut', 'L1_MU11_2MU6', ['L1_MU11','L1_MU6'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1], + ['mu11_mu6noL1_bNocut_L1MU11_2MU6', 'L1_MU11_2MU6', ['L1_MU11','L2_mu6'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1,['serial',-1,['mu11','mu6noL1']]], + + ] + + if TriggerFlags.doFTK(): + TriggerFlags.BphysicsSlice.signatures = TriggerFlags.BphysicsSlice.signatures() + [ + ['2mu4_bBmumuxv2_Ftk', 'L1_2MU4', [], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1], + +] + + + + TriggerFlags.CombinedSlice.signatures = TriggerFlags.CombinedSlice.signatures() + [ + ['2j45_gsc55_boffperf_split_ht300_L1HT190-J15s5.ETA21', 'L1_HT190-J15s5.ETA21', [], [PhysicsStream], ['RATE:MultiBJet', 'BW:BJet_combined'], -1,['serial',-1,[ 'ht300', '2j45_gsc55_boffperf_split' ]]], + ['2j45_gsc55_bmv2c1060_split_ht300_L1HT190-J15s5.ETA21', 'L1_HT190-J15s5.ETA21', [], [PhysicsStream], ['RATE:MultiBJet', 'BW:BJet_combined'], -1,['serial',-1,[ 'ht300', '2j45_gsc55_bmv2c1060_split' ]]], + ['mu4_j45_gsc55_boffperf_split_dr05_dz02', 'L1_MU4', ['L1_MU4', ''], [PhysicsStream, 'express'], ['RATE:MuonBJet', 'BW:BJet_combined'], -1,['serial',-1,['mu4', 'j45_gsc55_boffperf_split'] ]], + ['e5_lhvloose_j70_j50_0eta490_invm1000j50_xe50_pufit_L1MJJ-500-NFF', 'L1_MJJ-500-NFF', ['L1_EM3','','',''], [PhysicsStream], ['RATE:EgammaJet', 'BW:Egamma', 'BW:Jet'], -1, ['serial', -1,["e5_lhvloose","j70","j50_0eta490","xe50_pufit"]]], + ['e5_lhloose_j70_j50_0eta490_invm1000j50_xe50_pufit_L1MJJ-500-NFF', 'L1_MJJ-500-NFF', ['L1_EM3','','',''], [PhysicsStream], ['RATE:EgammaJet', 'BW:Egamma', 'BW:Jet'], -1, ['serial', -1,["e5_lhloose","j70","j50_0eta490","xe50_pufit"]]], + ['j70_0eta490_j50_0eta490_2j35_0eta490_invm1200j50_L1MJJ-500-NFF_AND_2j35_bmv2c1070_split', 'L1_MJJ-500-NFF', [], [PhysicsStream], ['RATE:JetMET', 'BW:Jet'], -1, ['serial', -1,["j70_0eta490","j50_0eta490","2j35_0eta490_invm1200j50_L1MJJ-500-NFF_AND","2j35_bmv2c1070_split"]]], + ['j70_0eta490_j50_0eta490_2j35_0eta490_invm1000j50_L1MJJ-500-NFF_AND_2j35_bmv2c1060_split', 'L1_MJJ-500-NFF', [], [PhysicsStream], ['RATE:JetMET', 'BW:Jet'], -1, ['serial', -1,["j70_0eta490","j50_0eta490","2j35_0eta490_invm1000j50_L1MJJ-500-NFF_AND","2j35_bmv2c1060_split"]]], + ['e5_lhloose_j70_j50_0eta490_invm1000j50_xe50_pufit_L1MJJ-700', 'L1_MJJ-700', ['L1_EM3','','',''], [PhysicsStream], ['RATE:EgammaJet', 'BW:Egamma', 'BW:Jet'], -1, ['serial', -1,["e5_lhloose","j70","j50_0eta490","xe50_pufit"]]], + ['j70_0eta490_j50_0eta490_2j35_0eta490_invm1200j50_L1MJJ-700_AND_2j35_bmv2c1070_split', 'L1_MJJ-700', [], [PhysicsStream], ['RATE:JetMET', 'BW:Jet'], -1, ['serial', -1,["j70_0eta490","j50_0eta490","2j35_0eta490_invm1200j50_L1MJJ-700_AND","2j35_bmv2c1070_split"]]], + ['j70_0eta490_j50_0eta490_2j35_0eta490_invm1000j50_L1MJJ-700_AND_2j35_bmv2c1060_split', 'L1_MJJ-700', [], [PhysicsStream], ['RATE:JetMET', 'BW:Jet'], -1, ['serial', -1,["j70_0eta490","j50_0eta490","2j35_0eta490_invm1000j50_L1MJJ-700_AND","2j35_bmv2c1060_split"]]], + ['e13_etcut_trkcut_xs30_xe30_mt35', 'L1_EM12_XS20', ['L1_EM12','',''], [PhysicsStream], ['RATE:EgammaMET', 'BW:Egamma'], -1, ['serial',-1,["e13_etcut_trkcut","xs30","xe30"]]], + ['e13_etcut_trkcut_xs30_j15_perf_xe30_6dphi05_mt35', 'L1_EM12_XS20', ['L1_EM12','','',''], [PhysicsStream], ['RATE:EgammaMET', 'BW:Egamma'], -1, ['serial',-1,["e13_etcut_trkcut","xs30","j15_perf","xe30"]]], + ['e13_etcut_trkcut_xs30_j15_perf_xe30_6dphi15_mt35', 'L1_EM12_XS20', ['L1_EM12','','',''], [PhysicsStream], ['RATE:EgammaMET', 'BW:Egamma'], -1, ['serial',-1,["e13_etcut_trkcut","xs30","j15_perf","xe30"]]], + ['e13_etcut_trkcut_xs30_j15_perf_xe30_2dphi05_mt35', 'L1_EM12_XS20', ['L1_EM12','','',''], [PhysicsStream], ['RATE:EgammaMET', 'BW:Egamma'], -1, ['serial',-1,["e13_etcut_trkcut","xs30","j15_perf","xe30"]]], + ['e13_etcut_trkcut_xs30_j15_perf_xe30_2dphi15_mt35', 'L1_EM12_XS20', ['L1_EM12','','',''], [PhysicsStream], ['RATE:EgammaMET', 'BW:Egamma'], -1, ['serial',-1,["e13_etcut_trkcut","xs30","j15_perf","xe30"]]], + ['e18_etcut_trkcut_xs30_xe30_mt35', 'L1_EM15_XS30', ['L1_EM15','',''], [PhysicsStream], ['RATE:EgammaMET', 'BW:Egamma'], -1, ['serial',-1,["e18_etcut_trkcut","xs30","xe30"]]], + ['e18_etcut_trkcut_xs30_j15_perf_xe30_6dphi05_mt35', 'L1_EM15_XS30', ['L1_EM15','','',''], [PhysicsStream], ['RATE:EgammaMET', 'BW:Egamma'], -1, ['serial',-1,["e18_etcut_trkcut","xs30","j15_perf","xe30"]]], + ['e18_etcut_trkcut_xs30_j15_perf_xe30_6dphi15_mt35', 'L1_EM15_XS30', ['L1_EM15','','',''], [PhysicsStream], ['RATE:EgammaMET', 'BW:Egamma'], -1, ['serial',-1,["e18_etcut_trkcut","xs30","j15_perf","xe30"]]], + ['e18_etcut_trkcut_xs30_j15_perf_xe30_2dphi05_mt35', 'L1_EM15_XS30', ['L1_EM15','','',''], [PhysicsStream], ['RATE:EgammaMET', 'BW:Egamma'], -1, ['serial',-1,["e18_etcut_trkcut","xs30","j15_perf","xe30"]]], + ['e18_etcut_trkcut_xs30_j15_perf_xe30_2dphi15_mt35', 'L1_EM15_XS30', ['L1_EM15','','',''], [PhysicsStream], ['RATE:EgammaMET', 'BW:Egamma'], -1, ['serial',-1,["e18_etcut_trkcut","xs30","j15_perf","xe30"]]], + ['e18_etcut_trkcut_xs20_j20_perf_xe20_6dphi15_mt35', 'L1_EM15_XS30', ['L1_EM15','','',''],[PhysicsStream],['RATE:EgammaMET','BW:Egamma'],-1,['serial',-1,["e18_etcut_trkcut","xs20","j20_perf","xe20"]]], + ['e18_etcut_trkcut_j20_perf_xe20_6dphi15_mt35', 'L1_EM15_XS30', ['L1_EM15','',''],[PhysicsStream],['RATE:EgammaMET','BW:Egamma'],-1,['serial',-1,["e18_etcut_trkcut","j20_perf","xe20"]]], + ['2e12_lhmedium_nod0_mu10', 'L1_2EM8VH_MU10', ['L1_2EM8VH', 'L1_MU10'], [PhysicsStream], ['Primary:20000','RATE:EgammaMuon', 'BW:Egamma', 'BW:Muon'], -1,['parallel',-1,[] ]], + ['e12_lhmedium_nod0_2mu10', 'L1_2MU10', ['L1_EM8VH', 'L1_2MU10'], [PhysicsStream], ['Primary:20000','RATE:EgammaMuon', 'BW:Egamma', 'BW:Muon'], -1,['parallel',-1,[] ]], + ['e28_lhmedium_nod0_mu8noL1', 'L1_EM24VHI', ['L1_EM24VHI', ''], [PhysicsStream], ['Primary:20000','RATE:EgammaMuon', 'BW:Egamma', 'BW:Muon'], -1, ['serial',-1,['e28_lhmedium_nod0','mu8noL1'] ]], + ['e28_lhmedium_nod0_L1EM24VHIM_mu8noL1', 'L1_EM24VHIM', ['L1_EM24VHIM', ''], [PhysicsStream], ['Primary:20000','RATE:EgammaMuon', 'BW:Egamma', 'BW:Muon'], -1, ['serial',-1,['e28_lhmedium_nod0_L1EM24VHIM','mu8noL1'] ]], + ['e28_lhmedium_nod0', 'L1_EM24VHI', [], [PhysicsStream], ['RATE:EgammaMuon', 'BW:Egamma', 'BW:Muon'], -1], + ['e70_lhloose_nod0_L1EM24VHIM_xe70noL1', 'L1_EM24VHIM',['L1_EM24VHIM',''], [PhysicsStream], ['Primary:20000','RATE:EgammaMET', 'BW:Egamma', 'BW:MET'], -1,['serial',-1,["e70_lhloose_nod0_L1EM24VHIM","xe70noL1"]]], + ['e80_lhloose_nod0_xe80noL1', 'L1_EM22VHI',['L1_EM22VHI',''], [PhysicsStream], ['Primary:17000','RATE:EgammaMET', 'BW:Egamma', 'BW:MET'], -1,['serial',-1,["e80_lhloose_nod0","xe80noL1"]]], + ['e80_lhloose_nod0_L1EM24VHI_xe80noL1', 'L1_EM24VHI',['L1_EM24VHI',''], [PhysicsStream], ['Primary:20000','RATE:EgammaMET', 'BW:Egamma', 'BW:MET'], -1,['serial',-1,["e80_lhloose_nod0_L1EM24VHI","xe80noL1"]]], + ['e80_lhloose_nod0_L1EM24VHIM_xe80noL1', 'L1_EM24VHIM',['L1_EM24VHIM',''], [PhysicsStream], ['Primary:20000','RATE:EgammaMET', 'BW:Egamma', 'BW:MET'], -1,['serial',-1,["e80_lhloose_nod0_L1EM24VHIM","xe80noL1"]]], + ['g45_tight_L1EM22VHI_xe45noL1', 'L1_EM22VHI', ['L1_EM22VHI',''], [PhysicsStream], ['RATE:EgammaMET', 'BW:Egamma', 'BW:MET'], -1,['serial',-1,["g45_tight_L1EM22VHI","xe45noL1"]]], + ['g45_tight_L1EM24VHI_xe45noL1', 'L1_EM24VHI', ['L1_EM24VHI',''], [PhysicsStream], ['RATE:EgammaMET', 'BW:Egamma', 'BW:MET'], -1,['serial',-1,["g45_tight_L1EM24VHI","xe45noL1"]]], + ['g45_tight_L1EM24VHIM_xe45noL1', 'L1_EM24VHIM', ['L1_EM24VHIM',''], [PhysicsStream], ['RATE:EgammaMET', 'BW:Egamma', 'BW:MET'], -1,['serial',-1,["g45_tight_L1EM24VHIM","xe45noL1"]]], + ['g45_tight_icalovloose_L1EM24VHIM_xe45noL1', 'L1_EM24VHIM', ['L1_EM24VHIM',''], [PhysicsStream], ['RATE:EgammaMET', 'BW:Egamma', 'BW:MET'], -1,['serial',-1,["g45_tight_icalovloose_L1EM24VHIM","xe45noL1"]]], + ['g80_loose_L1EM24VHI_xe80noL1', 'L1_EM24VHI', ['L1_EM24VHI',''], [PhysicsStream], ['Primary:17000','RATE:EgammaMET', 'BW:Egamma', 'BW:MET'], -1,['serial',-1,["g80_loose_L1EM24VHI","xe80noL1"]]], + ['g80_loose_L1EM24VHIM_xe80noL1', 'L1_EM24VHIM', ['L1_EM24VHIM',''], [PhysicsStream], ['Primary:17000','RATE:EgammaMET', 'BW:Egamma', 'BW:MET'], -1,['serial',-1,["g80_loose_L1EM24VHIM","xe80noL1"]]], + ['g80_loose_icalovloose_L1EM24VHIM_xe80noL1', 'L1_EM24VHIM', ['L1_EM24VHIM',''], [PhysicsStream], ['Primary:20000','RATE:EgammaMET', 'BW:Egamma', 'BW:MET'], -1,['serial',-1,["g80_loose_icalovloose_L1EM24VHIM","xe80noL1"]]], + ['g45_tight_L1EM24VHI', 'L1_EM24VHI', [], [PhysicsStream], ['RATE:ElectronPhoton', 'BW:Egamma'], -1], + ['g45_tight_icalovloose_L1EM22VHI_xe45noL1', 'L1_EM22VHI', ['L1_EM22VHI',''], [PhysicsStream], ['RATE:EgammaMET', 'BW:Egamma', 'BW:MET'], -1,['serial',-1,["g45_tight_icalovloose_L1EM22VHI","xe45noL1"]]], + ['g45_tight_icalovloose_L1EM24VHI_xe45noL1', 'L1_EM24VHI', ['L1_EM24VHI',''], [PhysicsStream], ['RATE:EgammaMET', 'BW:Egamma', 'BW:MET'], -1,['serial',-1,["g45_tight_icalovloose_L1EM24VHI","xe45noL1"]]], + ['g80_loose_icalovloose_L1EM24VHI_xe80noL1', 'L1_EM24VHI', ['L1_EM24VHI',''], [PhysicsStream], ['Primary:20000','RATE:EgammaMET', 'BW:Egamma', 'BW:MET'], -1,['serial',-1,["g80_loose_icalovloose_L1EM24VHI","xe80noL1"]]], + ['g100_tight_icalovloose_L1EM22VHI_3j50noL1', 'L1_EM22VHI', ['L1_EM22VHI',''], [PhysicsStream], ['Primary:17000','RATE:EgammaJet', 'BW:Egamma', 'BW:Jet'], -1,['serial',-1,["g100_tight_icalovloose_L1EM22VHI","3j50noL1"]]], + ['g85_tight_icalovloose_L1EM24VHI_3j50noL1', 'L1_EM24VHI', ['L1_EM24VHI',''], [PhysicsStream], ['Primary:20000','RATE:EgammaJet', 'BW:Egamma', 'BW:Jet'], -1,['serial',-1,["g85_tight_icalovloose_L1EM24VHI","3j50noL1"]]], + ['g100_tight_icalovloose_L1EM24VHI_3j50noL1', 'L1_EM24VHI', ['L1_EM24VHI',''], [PhysicsStream], ['Primary:20000','RATE:EgammaJet', 'BW:Egamma', 'BW:Jet'], -1,['serial',-1,["g100_tight_icalovloose_L1EM24VHI","3j50noL1"]]], + ['2mu4_invm1_j20_xe60_pufit_2dphi10_L12MU4_J20_XE30_DPHI-J20s2XE30', 'L1_2MU4_J20_XE30_DPHI-J20s2XE30', [], [PhysicsStream], ['Primary:20000','RATE:MuonJetMET', 'BW:Muon', 'BW:Jet'], -1, ['serial',-1,["2mu4_invm1","j20","xe60_pufit"] ]], + ['e5_lhloose_nod0_mu4_j30_xe40_pufit_2dphi10_L1MU4_J30_XE40_DPHI-J20s2XE30', 'L1_MU4_J30_XE40_DPHI-J20s2XE30', ['L1_EM3','','',''], [PhysicsStream], ['Primary:20000','RATE:MuonJetMET', 'BW:Egamma', 'BW:Muon', 'BW:Jet'], -1, ['serial',-1,["e5_lhloose_nod0","mu4","j30","xe40_pufit"] ]], + ['e5_lhmedium_nod0_j50_xe80_pufit_2dphi10_L1J40_XE50_DPHI-J20s2XE50', 'L1_J40_XE50_DPHI-J20s2XE50', ['L1_EM3','',''], [PhysicsStream], ['Primary:20000','RATE:EgammaJetMET', 'BW:Egamma', 'BW:Jet'], -1, ['serial',-1,["e5_lhmedium_nod0","j50","xe80_pufit"] ]], + ['e60_etcut_trkcut_j15_perf_xe60_6dphi05_mt35','L1_EM24VHIM', ['L1_EM24VHIM','',''], [PhysicsStream], ['RATE:EgammaMET', 'BW:Egamma'], -1, ['serial',-1,["e60_etcut_trkcut","j15_perf","xe60"]]], + ['mu4_j15_boffperf_split_dr05_dz02', 'L1_MU4', ['L1_MU4', ''], [PhysicsStream], ['RATE:MuonBJet', 'BW:BJet_combined'], -1,['serial',-1,['mu4', 'j15_boffperf_split'] ]], + ['mu4_j25_boffperf_split_dr05_dz02', 'L1_MU4', ['L1_MU4', ''], [PhysicsStream], ['RATE:MuonBJet', 'BW:BJet_combined'], -1,['serial',-1,['mu4', 'j25_boffperf_split'] ]], + ['mu4_j35_boffperf_split_dr05_dz99', 'L1_MU4', ['L1_MU4', ''], [PhysicsStream], ['RATE:MuonBJet', 'BW:BJet_combined'], -1,['serial',-1,['mu4', 'j35_boffperf_split'] ]], + ['mu6_j110_gsc150_boffperf_split_dr05_dz99', 'L1_MU6_J40', ['L1_MU6', ''], [PhysicsStream], ['RATE:MuonBJet', 'BW:BJet_combined'], -1,['serial',-1,['mu6', 'j110_gsc150_boffperf_split'] ]], + ['mu6_j225_gsc320_boffperf_split_dr05_dz99', 'L1_MU6_J75', ['L1_MU6', ''], [PhysicsStream], ['RATE:MuonBJet', 'BW:BJet_combined'], -1,['serial',-1,['mu6', 'j225_gsc320_boffperf_split'] ]], + ['mu4_j35_boffperf_split', 'L1_MU4', ['L1_MU4', ''], [PhysicsStream], ['RATE:MuonBJet', 'BW:BJet_combined'], -1,['serial',-1,['mu4', 'j35_boffperf_split'] ]], + ['mu4_j35_boffperf_split_dr05_dz02', 'L1_MU4', ['L1_MU4', ''], [PhysicsStream], ['RATE:MuonBJet', 'BW:BJet_combined'], -1,['serial',-1,['mu4', 'j35_boffperf_split'] ]], + ['mu6_j60_gsc85_boffperf_split_dr05_dz02', 'L1_MU6_J20', ['L1_MU6', ''], [PhysicsStream], ['RATE:MuonBJet', 'BW:BJet_combined'], -1,['serial',-1,['mu6', 'j60_gsc85_boffperf_split'] ]], + ['mu6_j85_gsc110_boffperf_split_dr05_dz02', 'L1_MU6_J20', ['L1_MU6', ''], [PhysicsStream], ['RATE:MuonBJet', 'BW:BJet_combined'], -1,['serial',-1,['mu6', 'j85_gsc110_boffperf_split'] ]], + ['mu6_j110_gsc150_boffperf_split_dr05_dz02', 'L1_MU6_J40', ['L1_MU6', ''], [PhysicsStream], ['RATE:MuonBJet', 'BW:BJet_combined'], -1,['serial',-1,['mu6', 'j110_gsc150_boffperf_split'] ]], + ['mu6_j110_gsc150_boffperf_split', 'L1_MU6_J40', ['L1_MU6', ''], [PhysicsStream], ['RATE:MuonBJet', 'BW:BJet_combined'], -1,['serial',-1,['mu6', 'j110_gsc150_boffperf_split'] ]], + ['mu6_j150_gsc175_boffperf_split_dr05_dz02', 'L1_MU6_J40', ['L1_MU6', ''], [PhysicsStream], ['RATE:MuonBJet', 'BW:BJet_combined'], -1,['serial',-1,['mu6', 'j150_gsc175_boffperf_split']]], + ['mu6_j175_gsc260_boffperf_split_dr05_dz02', 'L1_MU6_J75', ['L1_MU6', ''], [PhysicsStream], ['RATE:MuonBJet', 'BW:BJet_combined'], -1,['serial',-1,['mu6', 'j175_gsc260_boffperf_split'] ]], + ['mu6_j225_gsc320_boffperf_split_dr05_dz02', 'L1_MU6_J75', ['L1_MU6', ''], [PhysicsStream], ['RATE:MuonBJet', 'BW:BJet_combined'], -1,['serial',-1,['mu6', 'j225_gsc320_boffperf_split'] ]], + ['mu6_j225_gsc320_boffperf_split', 'L1_MU6_J75', ['L1_MU6', ''], [PhysicsStream], ['RATE:MuonBJet', 'BW:BJet_combined'], -1,['serial',-1,['mu6', 'j225_gsc320_boffperf_split'] ]], + ['mu6_j225_gsc400_boffperf_split_dr05_dz02', 'L1_MU6_J75', ['L1_MU6', ''], [PhysicsStream], ['RATE:MuonBJet', 'BW:BJet_combined'], -1,['serial',-1,['mu6', 'j225_gsc400_boffperf_split'] ]], + ['mu4_j35_boffperf_split_dr05_dz02_L1BTAG-MU4J15', 'L1_BTAG-MU4J15', ['L1_MU4', ''], [PhysicsStream], ['RATE:MuonBJet', 'BW:BJet_combined'], -1,['serial',-1,['mu4', 'j35_boffperf_split'] ], False], + ['mu6_j60_gsc85_boffperf_split_dr05_dz02_L1BTAG-MU6J20', 'L1_BTAG-MU6J20', ['L1_MU6', ''], [PhysicsStream], ['RATE:MuonBJet', 'BW:BJet_combined'], -1,['serial',-1,['mu6', 'j60_gsc85_boffperf_split'] ], False], + ['mu26_ivarmedium_2j35_boffperf_split', 'L1_MU20MU21', ['L1_MU20', '', ''], [PhysicsStream], ['RATE:MuonBJet', 'BW:BJet_combined'], -1, ['serial',-1,['mu26_ivarmedium', '2j35_boffperf_split']]], + ['e28_lhtight_nod0_ivarloose_L1EM24VHIM_2j35_boffperf_split', 'L1_EM24VHIM', ['L1_EM24VHIM', ''], [PhysicsStream], ['RATE:EgammaJet', 'BW:BJet_combined'], -1, ['serial',-1,['e28_lhtight_nod0_ivarloose_L1EM24VHIM', '2j35_boffperf_split']]], + ['2g10_medium_mu20', 'L1_MU20MU21', ['L1_2EM7', 'L1_MU20'], [PhysicsStream], ['Primary:20000','RATE:EgammaMuon', 'BW:Egamma', 'BW:Muon'], -1, ['serial',-1,['2g10_medium','mu20'] ]], + ['j30_jes_PS_llp_L1TAU60', 'L1_TAU60', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j30_jes_PS_llp_noiso_L1TAU60', 'L1_TAU60', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j30_jes_cleanLLP_PS_llp_L1TAU60', 'L1_TAU60', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j30_jes_cleanLLP_PS_llp_pufix_L1TAU60', 'L1_TAU60', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j30_jes_cleanLLP_PS_llp_pufix_noiso_L1TAU60', 'L1_TAU60', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j30_jes_cleanLLP_PS_llp_noiso_L1TAU60', 'L1_TAU60', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['j250_jes_cleanLLP_PS_revllp_L1TAU60', 'L1_TAU60', [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1], + ['g35_tight_icalotight_L1EM24VHIM_mu18noL1', 'L1_EM24VHIM', ['L1_EM24VHIM', ''], [PhysicsStream], ['Primary:20000','RATE:EgammaMuon', 'BW:Egamma', 'BW:Muon'], -1, ['serial',-1,['g35_tight_icalotight_L1EM24VHIM','mu18noL1'] ]], + ['g40_tight_icalotight_L1EM24VHIM_mu18noL1', 'L1_EM24VHIM', ['L1_EM24VHIM', ''], [PhysicsStream], ['Primary:20000','RATE:EgammaMuon', 'BW:Egamma', 'BW:Muon'], -1, ['serial',-1,['g40_tight_icalotight_L1EM24VHIM','mu18noL1'] ]], + ['g35_tight_icalotight_L1EM24VHIM_mu15noL1_mu2noL1', 'L1_EM24VHIM', ['L1_EM24VHIM', '',''], [PhysicsStream], ['Primary:20000','RATE:EgammaMuon', 'BW:Egamma', 'BW:Muon'], -1, ['serial',-1,['g35_tight_icalotight_L1EM24VHIM','mu15noL1','mu2noL1']]], + ['g40_tight_icalotight_L1EM24VHIM_mu15noL1_mu2noL1', 'L1_EM24VHIM', ['L1_EM24VHIM', '',''], [PhysicsStream], ['Primary:20000','RATE:EgammaMuon', 'BW:Egamma', 'BW:Muon'], -1, ['serial',-1,['g40_tight_icalotight_L1EM24VHIM','mu15noL1','mu2noL1']]], + ['g40_tight_icalotight_L1EM24VHI_mu18noL1', 'L1_EM24VHI', ['L1_EM24VHI', ''], [PhysicsStream], ['Primary:20000','RATE:EgammaMuon', 'BW:Egamma', 'BW:Muon'], -1, ['serial',-1,['g40_tight_icalotight_L1EM24VHI','mu18noL1'] ]], + ['g40_tight_icalotight_L1EM24VHI_mu15noL1_mu2noL1', 'L1_EM24VHI', ['L1_EM24VHI', '',''], [PhysicsStream], ['Primary:20000','RATE:EgammaMuon', 'BW:Egamma', 'BW:Muon'], -1, ['serial',-1,['g40_tight_icalotight_L1EM24VHI','mu15noL1','mu2noL1']]], + ['g35_loose_L1EM24VHIM_mu18', 'L1_EM24VHIM', ['L1_EM24VHIM', 'L1_MU11'], [PhysicsStream], ['Primary:20000','RATE:EgammaMuon', 'BW:Egamma', 'BW:Muon'], -1, ['serial',-1,['g35_loose_L1EM24VHIM','mu18'] ]], + ['g35_loose_L1EM24VHIM_mu15_mu2noL1', 'L1_EM24VHIM', ['L1_EM24VHIM', 'L1_MU11',''], [PhysicsStream], ['Primary:20000','RATE:EgammaMuon', 'BW:Egamma', 'BW:Muon'], -1, ['serial',-1,['g35_loose_L1EM24VHIM','mu15','mu2noL1']]], + ['e30_mergedtight_g35_medium_Heg', 'L1_2EM20VH', [], [PhysicsStream], ['Primary:20000','RATE:ElectronPhoton', 'BW:Egamma'], -1,['parallel',-1,[] ]], + ['e17_lhmedium_nod0_tau80_medium1_tracktwo', 'L1_EM15VHI_TAU40_2TAU15',['L1_EM15VHI','L1_TAU40'], [PhysicsStream], ['RATE:ElectronTau', 'BW:Tau', 'BW:Egamma'], -1,['serial',-1,["e17_lhmedium_nod0","tau80_medium1_tracktwo"]]], + ['e17_lhmedium_nod0_ivarloose_tau25_medium1_tracktwo_L1EM15VHI_2TAU12IM', 'L1_EM15VHI_2TAU12IM',['L1_EM15VHI','L1_TAU12IM'], [PhysicsStream], ['RATE:ElectronTau', 'BW:Tau'], -1,['serial',-1,["e17_lhmedium_nod0_ivarloose","tau25_medium1_tracktwo"]]], + ['mu14_ivarloose_tau35_medium1_tracktwo_L1MU10_TAU20IM_J25_2J20', 'L1_MU10_TAU20IM_J25_2J20',['L1_MU10','L1_TAU20IM'], [PhysicsStream], ['Primary:20000','RATE:MuonTau', 'BW:Tau', 'BW:Muon'], -1,['serial',-1,["mu14_ivarloose","tau35_medium1_tracktwo"]]], + ['mu14_iloose_tau25_perf_tracktwo', 'L1_MU10_TAU12IM',['L1_MU10','L1_TAU12IM'], [PhysicsStream, 'express'], ['RATE:MuonTau', 'BW:Tau', 'BW:Muon'], -1,['serial',-1,["mu14_iloose","tau25_perf_tracktwo"]]], + ['mu14_ivarloose_tau25_medium1_tracktwo_L1MU10_TAU12IM', 'L1_MU10_TAU12IM',['L1_MU10','L1_TAU12IM'], [PhysicsStream], ['RATE:MuonTau', 'BW:Tau'], -1,['serial',-1,["mu14_ivarloose","tau25_medium1_tracktwo"]]], + ['tau35_medium1_tracktwo_tau25_medium1_tracktwo_xe50', 'L1_TAU20IM_2TAU12IM_XE35',['L1_TAU20IM','L1_TAU12IM','L1_XE35'], [PhysicsStream], ['RATE:TauMET', 'BW:Tau'], -1,['serial',-1,["tau35_medium1_tracktwo","tau25_medium1_tracktwo","xe50"]]], + ['mu14_ivarloose_tau35_medium1_tracktwoEF_L1MU10_TAU20IM_J25_2J20', 'L1_MU10_TAU20IM_J25_2J20',['L1_MU10','L1_TAU20IM'], [PhysicsStream], ['Primary:20000','RATE:MuonTau', 'BW:Tau', 'BW:Muon'], -1,['serial',-1,["mu14_ivarloose","tau35_medium1_tracktwoEF"]]], + ['mu14_ivarloose_tau35_mediumRNN_tracktwoMVA_L1MU10_TAU20IM_J25_2J20', 'L1_MU10_TAU20IM_J25_2J20',['L1_MU10','L1_TAU20IM'], [PhysicsStream], ['Primary:20000','RATE:MuonTau', 'BW:Tau', 'BW:Muon'], -1,['serial',-1,["mu14_ivarloose","tau35_mediumRNN_tracktwoMVA"]]], + ['g25_medium_L1EM24VHI_tau25_kaonpi2_tracktwoEF_50mVis10000','L1_EM24VHI', ['L1_EM24VHI','L1_TAU12'], [PhysicsStream], ['Primary:20000','RATE:TauGamma', 'BW:Tau', 'BW:Egamma'], -1,['serial',-1,['g25_medium_L1EM24VHI','tau25_kaonpi2_tracktwoEF'],False] ], + ['g35_medium_L1EM24VHI_tau25_dipion3_tracktwoEF_60mVis10000','L1_EM24VHI', ['L1_EM24VHI','L1_TAU12'], [PhysicsStream], ['Primary:20000','RATE:TauGamma', 'BW:Tau', 'BW:Egamma'], -1,['serial',-1,['g35_medium_L1EM24VHI','tau25_dipion3_tracktwoEF'],False] ], + ['g25_medium_L1EM24VHI_tau25_kaonpi2_tracktwoMVA_50mVis10000','L1_EM24VHI', ['L1_EM24VHI','L1_TAU12'], [PhysicsStream], ['Primary:20000','RATE:TauGamma', 'BW:Tau', 'BW:Egamma'], -1,['serial',-1,['g25_medium_L1EM24VHI','tau25_kaonpi2_tracktwoMVA'],False] ], + ['g35_medium_L1EM24VHI_tau25_dipion3_tracktwoMVA_60mVis10000','L1_EM24VHI', ['L1_EM24VHI','L1_TAU12'], [PhysicsStream], ['Primary:20000','RATE:TauGamma', 'BW:Tau', 'BW:Egamma'], -1,['serial',-1,['g35_medium_L1EM24VHI','tau25_dipion3_tracktwoMVA'],False] ], + ['j80_xe80', 'L1_J40_XE50',['',''], [PhysicsStream], ['RATE:JetMET', 'BW:Jet', 'BW:MET'], -1,['serial',-1,["j80","xe80"]]], + ['e20_lhtight_nod0_3j20_L1EM18VHI_3J20', 'L1_EM18VHI_3J20', ['L1_EM18VHI',''], [PhysicsStream], ['RATE:EgammaJet', 'BW:Egamma', 'BW:Jet'],-1, ['serial',-1,["e20_lhtight_nod0","3j20"] ]], + ['e20_lhmedium_nod0_3j20_L1EM18VHI_3J20', 'L1_EM18VHI_3J20', ['L1_EM18VHI',''], [PhysicsStream], ['RATE:EgammaJet', 'BW:Egamma', 'BW:Jet'],-1, ['serial',-1,["e20_lhmedium_nod0","3j20"] ]], + ['e28_lhvloose_nod0_L1EM22VH_3j20noL1', 'L1_EM22VH', ['L1_EM22VH',''], [PhysicsStream], ['RATE:EgammaJet', 'BW:Egamma', 'BW:Jet'], -1, ['serial',-1,["e28_lhvloose_nod0_L1EM22VH","3j20noL1"] ]], + ['e28_lhvloose_nod0_L1EM22VH_4j20noL1', 'L1_EM22VH', ['L1_EM22VH',''], [PhysicsStream], ['RATE:EgammaJet', 'BW:Egamma', 'BW:Jet'], -1, ['serial',-1,["e28_lhvloose_nod0_L1EM22VH","4j20noL1"] ]], + ['e28_lhvloose_nod0_L1EM22VH_5j15noL1', 'L1_EM22VH', ['L1_EM22VH',''], [PhysicsStream], ['RATE:EgammaJet', 'BW:Egamma', 'BW:Jet'], -1, ['serial',-1,["e28_lhvloose_nod0_L1EM22VH","5j15noL1"] ]], + ['e28_lhvloose_nod0_L1EM22VH_6j15noL1', 'L1_EM22VH', ['L1_EM22VH',''], [PhysicsStream], ['RATE:EgammaJet', 'BW:Egamma', 'BW:Jet'], -1, ['serial',-1,["e28_lhvloose_nod0_L1EM22VH","6j15noL1"] ]], + ['e26_lhvloose_nod0_L1EM22VH_3j20noL1', 'L1_EM22VH', ['L1_EM22VH',''], [PhysicsStream], ['RATE:EgammaJet', 'BW:Egamma', 'BW:Jet'], -1, ['serial',-1,["e26_lhvloose_nod0_L1EM22VH","3j20noL1"] ]], + ['e26_lhvloose_nod0_L1EM22VH_4j20noL1', 'L1_EM22VH', ['L1_EM22VH',''], [PhysicsStream], ['RATE:EgammaJet', 'BW:Egamma', 'BW:Jet'], -1, ['serial',-1,["e26_lhvloose_nod0_L1EM22VH","4j20noL1"] ]], + ['e26_lhvloose_nod0_L1EM22VH_5j15noL1', 'L1_EM22VH', ['L1_EM22VH',''], [PhysicsStream], ['RATE:EgammaJet', 'BW:Egamma', 'BW:Jet'], -1, ['serial',-1,["e26_lhvloose_nod0_L1EM22VH","5j15noL1"] ]], + ['e26_lhvloose_nod0_L1EM22VH_6j15noL1', 'L1_EM22VH', ['L1_EM22VH',''], [PhysicsStream], ['RATE:EgammaJet', 'BW:Egamma', 'BW:Jet'], -1, ['serial',-1,["e26_lhvloose_nod0_L1EM22VH","6j15noL1"] ]], + ['e28_lhmedium_nod0_L1EM22VH_3j20noL1', 'L1_EM22VH', ['L1_EM22VH',''], [PhysicsStream], ['RATE:EgammaJet', 'BW:Egamma', 'BW:Jet'], -1, ['serial',-1,["e28_lhmedium_nod0_L1EM22VH","3j20noL1"] ]], + ['e28_lhmedium_nod0_L1EM22VH_4j20noL1', 'L1_EM22VH', ['L1_EM22VH',''], [PhysicsStream], ['RATE:EgammaJet', 'BW:Egamma', 'BW:Jet'], -1, ['serial',-1,["e28_lhmedium_nod0_L1EM22VH","4j20noL1"] ]], + ['e28_lhmedium_nod0_L1EM22VH_5j15noL1', 'L1_EM22VH', ['L1_EM22VH',''], [PhysicsStream], ['RATE:EgammaJet', 'BW:Egamma', 'BW:Jet'], -1, ['serial',-1,["e28_lhmedium_nod0_L1EM22VH","5j15noL1"] ]], + ['e28_lhmedium_nod0_L1EM22VH_6j15noL1', 'L1_EM22VH', ['L1_EM22VH',''], [PhysicsStream], ['RATE:EgammaJet', 'BW:Egamma', 'BW:Jet'], -1, ['serial',-1,["e28_lhmedium_nod0_L1EM22VH","6j15noL1"] ]], + ['e26_lhmedium_nod0_L1EM22VH_3j20noL1', 'L1_EM22VH', ['L1_EM22VH',''], [PhysicsStream], ['RATE:EgammaJet', 'BW:Egamma', 'BW:Jet'], -1, ['serial',-1,["e26_lhmedium_nod0_L1EM22VH","3j20noL1"] ]], + ['e26_lhmedium_nod0_L1EM22VH_4j20noL1', 'L1_EM22VH', ['L1_EM22VH',''], [PhysicsStream], ['RATE:EgammaJet', 'BW:Egamma', 'BW:Jet'], -1, ['serial',-1,["e26_lhmedium_nod0_L1EM22VH","4j20noL1"] ]], + ['e26_lhmedium_nod0_L1EM22VH_5j15noL1', 'L1_EM22VH', ['L1_EM22VH',''], [PhysicsStream], ['RATE:EgammaJet', 'BW:Egamma', 'BW:Jet'], -1, ['serial',-1,["e26_lhmedium_nod0_L1EM22VH","5j15noL1"] ]], + ['e26_lhmedium_nod0_L1EM22VH_6j15noL1', 'L1_EM22VH', ['L1_EM22VH',''], [PhysicsStream], ['RATE:EgammaJet', 'BW:Egamma', 'BW:Jet'], -1, ['serial',-1,["e26_lhmedium_nod0_L1EM22VH","6j15noL1"] ]], + ['mu26_2j20noL1', 'L1_MU20MU21', ['L1_MU20',''], [PhysicsStream], ['RATE:MuonJet', 'BW:Muon', 'BW:Jet'], -1, ['serial',-1,["mu26","2j20noL1"] ]], + ['mu26_3j20noL1', 'L1_MU20MU21', ['L1_MU20',''], [PhysicsStream], ['RATE:MuonJet', 'BW:Muon', 'BW:Jet'], -1, ['serial',-1,["mu26","3j20noL1"] ]], + ['mu26_4j15noL1', 'L1_MU20MU21', ['L1_MU20',''], [PhysicsStream], ['RATE:MuonJet', 'BW:Muon', 'BW:Jet'], -1, ['serial',-1,["mu26","4j15noL1"] ]], + ['mu26_5j15noL1', 'L1_MU20MU21', ['L1_MU20',''], [PhysicsStream], ['RATE:MuonJet', 'BW:Muon', 'BW:Jet'], -1, ['serial',-1,["mu26","5j15noL1"] ]], + ['g25_medium_L1EM22VHI_4j35_0eta490_invm700', 'L1_EM22VHI', ['L1_EM22VHI',''], [PhysicsStream], ['RATE:EgammaJet', 'BW:Egamma'], -1,['serial',-1,["g25_medium_L1EM22VHI","4j35_0eta490_invm700"]]], + ['g25_loose_L1EM20VH_4j35_0eta490', 'L1_EM20VH', ['L1_EM20VH',''], [PhysicsStream], ['RATE:EgammaJet', 'BW:Egamma'], -1,['serial',-1,["g25_loose_L1EM20VH","4j35_0eta490"]]], + ['j55_0eta240_2j45_320eta490_L1J25.0ETA23_2J15.31ETA49','L1_J25.0ETA23_2J15.31ETA49',['',''], [PhysicsStream], ['RATE:MultiBJet', 'BW:BJet_combined' ], -1, ['serial',-1,['j55_0eta240','2j45_320eta490_L1J25.0ETA23_2J15.31ETA49'] ]], + ['g25_medium_L1EM24VHIM_tau25_dikaonmass_tracktwo_50mVis10000','L1_EM24VHIM', ['L1_EM24VHIM','L1_TAU12'], [PhysicsStream], ['Primary:20000','RATE:TauGamma', 'BW:Tau', 'BW:Egamma'], -1,['serial',-1,['g25_medium_L1EM24VHIM','tau25_dikaonmass_tracktwo'],False]], + ['g25_medium_L1EM24VHIM_tau25_singlepion_tracktwo_50mVis10000','L1_EM24VHIM', ['L1_EM24VHIM','L1_TAU12'], [PhysicsStream], ['Primary:20000','RATE:TauGamma', 'BW:Tau', 'BW:Egamma'], -1,['serial',-1,['g25_medium_L1EM24VHIM','tau25_singlepion_tracktwo'],False]], + ['g25_medium_L1EM24VHIM_tau25_dipion1loose_tracktwo_50mVis10000','L1_EM24VHIM', ['L1_EM24VHIM','L1_TAU12'], [PhysicsStream], ['Primary:20000','RATE:TauGamma', 'BW:Tau', 'BW:Egamma'], -1,['serial',-1,['g25_medium_L1EM24VHIM','tau25_dipion1loose_tracktwo'],False]], + ['g25_medium_L1EM24VHIM_tau25_dipion2_tracktwo_50mVis10000','L1_EM24VHIM', ['L1_EM24VHIM','L1_TAU12'], [PhysicsStream], ['Primary:20000','RATE:TauGamma', 'BW:Tau', 'BW:Egamma'], -1,['serial',-1,['g25_medium_L1EM24VHIM','tau25_dipion2_tracktwo'],False]], + ['g25_medium_L1EM24VHIM_tau25_kaonpi1_tracktwo_50mVis10000','L1_EM24VHIM', ['L1_EM24VHIM','L1_TAU12'], [PhysicsStream], ['Primary:20000','RATE:TauGamma', 'BW:Tau', 'BW:Egamma'], -1,['serial',-1,['g25_medium_L1EM24VHIM','tau25_kaonpi1_tracktwo'],False]], + ['g25_medium_L1EM24VHIM_tau25_kaonpi2_tracktwo_50mVis10000','L1_EM24VHIM', ['L1_EM24VHIM','L1_TAU12'], [PhysicsStream], ['Primary:20000','RATE:TauGamma', 'BW:Tau', 'BW:Egamma'], -1,['serial',-1,['g25_medium_L1EM24VHIM','tau25_kaonpi2_tracktwo'],False]], + ['g25_medium_L1EM24VHI_tau25_kaonpi2_tracktwo_50mVis10000','L1_EM24VHI', ['L1_EM24VHI','L1_TAU12'], [PhysicsStream], ['Primary:20000','RATE:TauGamma', 'BW:Tau', 'BW:Egamma'], -1,['serial',-1,['g25_medium_L1EM24VHI','tau25_kaonpi2_tracktwo'],False]], + ['g25_medium_tau25_dikaonmass_tracktwo_50mVis10000_L130M-EM20ITAU12','L1_30M-EM20ITAU12', ['L1_EM20VHI','L1_TAU12'], [PhysicsStream], ['RATE:TauGamma', 'BW:Tau', 'BW:Egamma'], -1,['serial',-1,['g25_medium','tau25_dikaonmass_tracktwo'],False]], + ['g25_medium_tau25_singlepion_tracktwo_50mVis10000_L130M-EM20ITAU12','L1_30M-EM20ITAU12', ['L1_EM20VHI','L1_TAU12'], [PhysicsStream], ['RATE:TauGamma', 'BW:Tau', 'BW:Egamma'], -1,['serial',-1,['g25_medium','tau25_singlepion_tracktwo'],False]], + ['g25_medium_tau25_dipion1loose_tracktwo_50mVis10000_L130M-EM20ITAU12','L1_30M-EM20ITAU12', ['L1_EM20VHI','L1_TAU12'], [PhysicsStream], ['RATE:TauGamma', 'BW:Tau', 'BW:Egamma'], -1,['serial',-1,['g25_medium','tau25_dipion1loose_tracktwo'],False]], + ['g25_medium_tau25_dipion2_tracktwo_50mVis10000_L130M-EM20ITAU12','L1_30M-EM20ITAU12', ['L1_EM20VHI','L1_TAU12'], [PhysicsStream], ['RATE:TauGamma', 'BW:Tau', 'BW:Egamma'], -1,['serial',-1,['g25_medium','tau25_dipion2_tracktwo'],False]], + ['g25_medium_tau25_kaonpi1_tracktwo_50mVis10000_L130M-EM20ITAU12','L1_30M-EM20ITAU12', ['L1_EM20VHI','L1_TAU12'], [PhysicsStream], ['RATE:TauGamma', 'BW:Tau', 'BW:Egamma'], -1,['serial',-1,['g25_medium','tau25_kaonpi1_tracktwo'],False]], + ['g25_medium_tau25_kaonpi2_tracktwo_50mVis10000_L130M-EM20ITAU12','L1_30M-EM20ITAU12', ['L1_EM20VHI','L1_TAU12'], [PhysicsStream], ['RATE:TauGamma', 'BW:Tau', 'BW:Egamma'], -1,['serial',-1,['g25_medium','tau25_kaonpi2_tracktwo'],False]], + ['g85_tight_L1EM24VHIM_3j50noL1', 'L1_EM24VHIM', ['L1_EM24VHIM',''], [PhysicsStream], ['Primary:17000','RATE:EgammaJet', 'BW:Egamma', 'BW:Jet'], -1,['serial',-1,["g85_tight_L1EM24VHIM","3j50noL1"]]], + ['g85_tight_icalovloose_L1EM24VHIM_3j50noL1', 'L1_EM24VHIM', ['L1_EM24VHIM',''], [PhysicsStream], ['Primary:20000','RATE:EgammaJet', 'BW:Egamma', 'BW:Jet'], -1,['serial',-1,["g85_tight_icalovloose_L1EM24VHIM","3j50noL1"]]], + ['g100_tight_L1EM24VHIM_3j50noL1', 'L1_EM24VHIM', ['L1_EM24VHIM',''], [PhysicsStream], ['Primary:20000','RATE:EgammaJet', 'BW:Egamma', 'BW:Jet'], -1,['serial',-1,["g100_tight_L1EM24VHIM","3j50noL1"]]], + ['g100_tight_icalovloose_L1EM24VHIM_3j50noL1', 'L1_EM24VHIM', ['L1_EM24VHIM',''], [PhysicsStream], ['Primary:20000','RATE:EgammaJet', 'BW:Egamma', 'BW:Jet'], -1,['serial',-1,["g100_tight_icalovloose_L1EM24VHIM","3j50noL1"]]], + ['g85_tight_L1EM24VHI_3j50noL1', 'L1_EM24VHI', ['L1_EM24VHI',''], [PhysicsStream], ['Primary:17000','RATE:EgammaJet', 'BW:Egamma', 'BW:Jet'], -1,['serial',-1,["g85_tight_L1EM24VHI","3j50noL1"]]], + ['g100_tight_L1EM22VHI_3j50noL1', 'L1_EM22VHI', ['L1_EM22VHI',''], [PhysicsStream], ['Primary:17000','RATE:EgammaJet', 'BW:Egamma', 'BW:Jet'], -1,['serial',-1,["g100_tight_L1EM22VHI","3j50noL1"]]], + ['g100_tight_L1EM24VHI_3j50noL1', 'L1_EM24VHI', ['L1_EM24VHI',''], [PhysicsStream], ['Primary:20000','RATE:EgammaJet', 'BW:Egamma', 'BW:Jet'], -1,['serial',-1,["g100_tight_L1EM24VHI","3j50noL1"]]], + ['g85_tight', 'L1_EM22VHI', [], [PhysicsStream], ['RATE:ElectronPhoton', 'BW:Egamma'], -1], + ['g85_tight_L1EM24VHI', 'L1_EM24VHI', [], [PhysicsStream], ['RATE:ElectronPhoton', 'BW:Egamma'], -1], + ['g100_tight', 'L1_EM22VHI', [], [PhysicsStream], ['RATE:ElectronPhoton', 'BW:Egamma'], -1], + ['g100_tight_L1EM24VHI', 'L1_EM24VHI', [], [PhysicsStream], ['RATE:ElectronPhoton', 'BW:Egamma'], -1], + ['j40_cleanT_xe85_tc_lcw_2dphi05_L1XE50', 'L1_XE50', ['',''], [PhysicsStream], ['RATE:JetMET', 'BW:Jet'], -1, ['serial',-1,["j40_cleanT","xe85_tc_lcw_L1XE50"]]], + ['mu14_3j20_L1MU10_3J20', 'L1_MU10_3J20', ['L1_MU10_3J20', ''], [PhysicsStream], ['RATE:MuonJet', 'BW:Muon','BW:Jet'], -1,['serial',-1,['mu14', '3j20'] ],True], + ['mu6_ivarloose_2j40_0eta490_invm1000_L1MU6_J30.0ETA49_2J20.0ETA49', 'L1_MU6_J30.0ETA49_2J20.0ETA49', ['L1_MU6',''], [PhysicsStream], ['RATE:MuonJet', 'BW:Muon', 'BW:Jet'], -1, ['serial',-1,["mu6_ivarloose","2j40_0eta490_invm1000"]]], + ['g35_medium_L1EM24VHI_tau25_dipion3_tracktwo_60mVis10000','L1_EM24VHI', ['L1_EM24VHI','L1_TAU12'], [PhysicsStream], ['Primary:20000','RATE:TauGamma', 'BW:Tau', 'BW:Egamma'], -1,['serial',-1,['g35_medium_L1EM24VHI','tau25_dipion3_tracktwo'],False]], + ['e26_lhmedium_nod0_5j30_0eta240_L1EM20VH_3J20', 'L1_EM20VH_3J20', ['L1_EM20VH',''], [PhysicsStream], ['RATE:EgammaJet', 'BW:Egamma', 'BW:Jet'],-1, ['serial',-1,["e26_lhmedium_nod0","5j30_0eta240"] ]], + ['mu26_5j30_0eta240_L1MU10_3J20', 'L1_MU10_3J20', ['L1_MU10',''], [PhysicsStream], ['RATE:MuonJet', 'BW:Muon', 'BW:Jet'],-1, ['serial',-1,["mu26","5j30_0eta240"] ]], + ['e9_lhvloose_nod0_mu20_mu8noL1_L1EM8VH_MU20', 'L1_EM8VH_MU20',['L1_EM8VH','L1_MU20',''], [PhysicsStream], ['Primary:20000','RATE:EgammaMuon', 'BW:Egamma', 'BW:Muon'], -1,['serial',-1,['mu20','mu8noL1','e9_lhvloose_nod0'] ]], + ['2g6_loose_L1J100', 'L1_J100', ['L1_2EM3'], [PhysicsStream], ['RATE:EgammaJet', 'BW:Egamma', 'BW:Jet'],-1], + ['2g6_tight_icalotight_L1J50', 'L1_J50', ['L1_2EM3','L1_J50'], [PhysicsStream], ['RATE:EgammaJet', 'BW:Egamma', 'BW:Jet'],-1], + ['2g6_loose_L1J50', 'L1_J50', ['L1_2EM3','L1_J50'], [PhysicsStream], ['RATE:EgammaJet', 'BW:Egamma', 'BW:Jet'],-1], + ['2g6_tight_icalotight_L1J40', 'L1_J40', ['L1_2EM3','L1_J40'], [PhysicsStream], ['RATE:EgammaJet', 'BW:Egamma', 'BW:Jet'],-1], + ['2g6_loose_L1J40', 'L1_J40', ['L1_2EM3','L1_J40'], [PhysicsStream], ['RATE:EgammaJet', 'BW:Egamma', 'BW:Jet'],-1], + ['g45_loose_5j45_0eta240', 'L1_4J15.0ETA25', ['L1_EM15VH','L1_4J15.0ETA25'], [PhysicsStream], ['RATE:EgammaJet', 'BW:Egamma', 'BW:Jet'], -1,['serial',-1,["g45_loose","5j45_0eta240"]]], + ['e9_lhvloose_nod0_e5_lhvloose_nod0_bBeexM6000t_mu6_nomucomb_L1BPH-0M9-EM7-EM5_MU6', 'L1_BPH-0M9-EM7-EM5_MU6', ['L1_EM7','L1_EM3','L1_MU6'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag],-1,['parallel',-1,[] ]], + ['e5_lhvloose_nod0_bBeexM6000t_mu6_nomucomb_L1BPH-0DR3-EM7J15_MU6', 'L1_BPH-0DR3-EM7J15_MU6', ['L1_EM7','L1_MU6'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag],-1,['parallel',-1,[] ]], + ['e5_lhvloose_nod0_bBeexM6000t_2mu4_nomucomb_L1BPH-0DR3-EM7J15_2MU4', 'L1_BPH-0DR3-EM7J15_2MU4', ['L1_EM7','L1_2MU4'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag],-1,['parallel',-1,[] ]], + + ] + + + TriggerFlags.MinBiasSlice.signatures = TriggerFlags.MinBiasSlice.signatures() + [] + TriggerFlags.BeamspotSlice.signatures = TriggerFlags.BeamspotSlice.signatures()+ [] + TriggerFlags.CalibSlice.signatures = TriggerFlags.CalibSlice.signatures() + [] + TriggerFlags.CosmicSlice.signatures = TriggerFlags.CosmicSlice.signatures() + [] + TriggerFlags.StreamingSlice.signatures = TriggerFlags.StreamingSlice.signatures() + [] + TriggerFlags.EnhancedBiasSlice.signatures = TriggerFlags.EnhancedBiasSlice.signatures() + [] + + #get list of all signatures + signatureList=[] + for prop in dir(TriggerFlags): + if prop[-5:]=='Slice': + sliceName=prop + slice=getattr(TriggerFlags,sliceName) + if slice.signatures(): + signatureList.extend(slice.signatures()) + else: + log.debug('SKIPPING '+str(sliceName)) + #print 'FOUND',len(signatureList),signatureList + disablePatterns=[#re.compile('beamspot'), #all beamspot chains + ] + disableEFPatterns=[] + toDisable=[] + toDisableEF=[] + for signature in signatureList: + for pattern in disableEFPatterns+disablePatterns: + if re.search(pattern,signature): + if pattern in disableEFPatterns: + toDisableEF.append(signature) + else: + toDisable.append(signature) + break + log.debug('DISABLE The following chains are disabled in the v4 upgrade menu: '+str(toDisable)) + for signature in toDisable: + Prescales.HLTPrescales_upgrade_mc_prescale[signature]=[ -1, -1, 0, 0, -1] + for signature in toDisableEF: + Prescales.HLTPrescales_upgrade_mc_prescale[signature]=[ 1, -1, 0, 0, -1] + + +###################################################### +Prescales = physics_menu.Prescales +#StreamConfig = physics_menu.StreamConfig + +###################################################### +# DEFAULT MC prescales +###################################################### +Prescales.L1Prescales = dict([(ctpid,1) for ctpid in Prescales.L1Prescales]) # setting all L1 prescales to 1 + +ps_online_list=[] +ps_cosmic_list=[] +ps_calibmon_list=[ + 'idpsl1_L1IDprescaled' + ] +ps_eb_list=[] +ps_beamspot_list=[] +ps_fwdphys_list=[] +ps_minb_list=[] + +ps_rerun_list = [] + +if TriggerFlags.doFTK(): + ps_rerun_list = [] + +ps_larnoiseburst_rerun_list = [] + +ps_perform_list = [ + 'mu4_j15_dr05' , + 'mu4_j35_dr05' , + 'mu6_j85_dr05' , + 'e5_lhloose_nod0_idperf' + ] + +ps_Jpsi_list = [] + +ps_ftk_list = [] + +ps_Bphys_list = [] + +if TriggerFlags.doFTK(): + ps_ftk_list = [] + +ps_streamers_list = [] + +#----------------------------------------------------- + + +chain_list=ps_online_list+ps_cosmic_list+ps_minb_list +if not TriggerFlags.doFTK(): + chain_list+=ps_ftk_list + +Prescales.HLTPrescales.update(dict(map(None,chain_list,len(chain_list)*[ [-1, 0, -1] ]))) + +chain_list=ps_larnoiseburst_rerun_list +Prescales.HLTPrescales.update(dict(map(None,chain_list,len(chain_list)*[ [0, 0, 1] ]))) +###################################################### + +###################################################### +# No MC prescales +###################################################### +Prescales.L1Prescales_no_prescale = deepcopy(Prescales.L1Prescales) +Prescales.HLTPrescales_no_prescale = {} +###################################################### + +###################################################### +# LOOSE mc prescales +###################################################### +Prescales.L1Prescales_loose_mc_prescale = deepcopy(Prescales.L1Prescales) +Prescales.HLTPrescales_loose_mc_prescale = {} + +chain_list=ps_online_list+ps_cosmic_list+ps_calibmon_list+ps_beamspot_list +if not TriggerFlags.doFTK(): + chain_list+=ps_ftk_list + +Prescales.HLTPrescales_loose_mc_prescale.update(dict(map(None,chain_list,len(chain_list)*[ [-1, 0,-1] ]))) + +chain_list=ps_rerun_list +Prescales.HLTPrescales_loose_mc_prescale.update(dict(map(None,chain_list,len(chain_list)*[ [0, 0, 1] ]))) +###################################################### + +###################################################### +# TIGHTPERF mc prescales for performance +###################################################### +Prescales.L1Prescales_tightperf_mc_prescale= deepcopy(Prescales.L1Prescales) +Prescales.HLTPrescales_tightperf_mc_prescale = deepcopy(Prescales.HLTPrescales_loose_mc_prescale) + +chain_list=ps_eb_list+ps_fwdphys_list+ps_minb_list+ps_Bphys_list#+ps_Jpsi_list # enabling JPSI ee again ATR-15162 +if not TriggerFlags.doFTK(): + chain_list+=ps_ftk_list + +Prescales.HLTPrescales_tightperf_mc_prescale.update(dict(map(None,chain_list,len(chain_list)*[ [-1, 0,-1] ]))) +Prescales.L1Prescales_TriggerValidation_mc_prescale= deepcopy(Prescales.L1Prescales) +Prescales.HLTPrescales_TriggerValidation_mc_prescale = deepcopy(Prescales.HLTPrescales_tightperf_mc_prescale) +###################################################### +# TIGHT mc prescales +###################################################### +Prescales.L1Prescales_tight_mc_prescale = deepcopy(Prescales.L1Prescales) +Prescales.HLTPrescales_tight_mc_prescale = deepcopy(Prescales.HLTPrescales_tightperf_mc_prescale) +chain_list=ps_streamers_list + ps_perform_list + ps_Bphys_list#+ps_Jpsi_list # enabling JPSI ee again ATR-15162 + +#Prescales.HLTPrescales_tight_mc_prescale = deepcopy(Prescales.HLTPrescales_loose_mc_prescale) +#chain_list=ps_eb_list+ps_fwdphys_list+ps_minb_list+ps_ftk_list+ps_perform_list +Prescales.HLTPrescales_tight_mc_prescale.update(dict(map(None,chain_list,len(chain_list)*[ [-1, 0,-1] ]))) +Prescales.L1Prescales_BulkMCProd_mc_prescale = deepcopy(Prescales.L1Prescales) +Prescales.HLTPrescales_BulkMCProd_mc_prescale = deepcopy(Prescales.HLTPrescales_tight_mc_prescale) +Prescales.L1Prescales_CPSampleProd_mc_prescale = deepcopy(Prescales.L1Prescales) +Prescales.HLTPrescales_CPSampleProd_mc_prescale = deepcopy(Prescales.HLTPrescales_tight_mc_prescale) +###################################################### + +###################################################### +Prescales.L1Prescales_upgrade_mc_prescale = deepcopy(Prescales.L1Prescales) +Prescales.HLTPrescales_upgrade_mc_prescale = deepcopy(Prescales.HLTPrescales_tight_mc_prescale) +# Note: "upgrade" prescales are set with regular expressions at the end +# of the setupMenu() function above +###################################################### diff --git a/Trigger/TriggerCommon/TriggerMenu/python/menu/SignatureDicts.py b/Trigger/TriggerCommon/TriggerMenu/python/menu/SignatureDicts.py index ecafb3edeb6b2608fba0087abd5e00c449935a29..05193311046d990f6603e37a81df3ad05504ba5e 100644 --- a/Trigger/TriggerCommon/TriggerMenu/python/menu/SignatureDicts.py +++ b/Trigger/TriggerCommon/TriggerMenu/python/menu/SignatureDicts.py @@ -115,7 +115,7 @@ JetChainParts = { 'cleanLA','cleanTA','cleanLLPA', 'noCleaning' ], 'recoAlg' : ["a3","a4", "a10", "a10r", "a10t"], - 'dataType' : ['TT', 'tc', 'cc', 'ion'], + 'dataType' : ['TT', 'tc', 'cc', 'ion', 'sktc'], 'calib' : ["had","lcw","em"], 'jetCalib' : ["jes","sub","subjes","subjesIS", "nojcalib"], 'scan' : ['FS','PS'], diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/DictFromChainName.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/DictFromChainName.py index 88662f5a83ac3de17ae96c8d31cdde490fc50005..2a2e85080ddebcc0ecdab73ac9b0234368db21ba 100755 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/DictFromChainName.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/DictFromChainName.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration """ Class to obtain the chain configuration dictionary from the short or long name @@ -40,14 +40,16 @@ class DictFromChainName(object): elif type(chainInfo) == list: m_chainName = chainInfo[0] - m_L1item = chainInfo[1] - m_L1items_chainParts = chainInfo[2] - m_stream = chainInfo[3] - m_groups = chainInfo[4] - m_EBstep = chainInfo[5] + m_L1item = '' + m_L1items_chainParts = chainInfo[1] + m_stream = chainInfo[2] + m_groups = chainInfo[3] + m_EBstep = chainInfo[4] else: logDict.error("Format of chainInfo passed to genChainDict not known") + m_L1item = self.getOverallL1item(m_chainName) + logDict.debug("Analysing chain with name: %s", m_chainName) chainProp = self.analyseShortName(m_chainName, m_L1items_chainParts, m_L1item) logDict.debug('ChainProperties: %s', chainProp) @@ -106,6 +108,30 @@ class DictFromChainName(object): return chainProp + def checkL1inName(self, m_chainName): + if '_L1' in m_chainName: + return True + else: + return False + + def getOverallL1item(self, chainName): + mainL1 = '' + + if not self.checkL1inName(chainName): + logDict.warning("Chain name not complying with naming convention: L1 item missing! PLEASE FIX THIS!!") + return mainL1 + # this assumes that the last string of a chain name is the overall L1 item + cNameParts = chainName.split("_") + mainL1 = cNameParts[-1] + + if "L1" not in mainL1: + logDict.warning("Chain name not complying with naming convention: L1 item missing! PLEASE FIX THIS!!") + return '' + mainL1 = mainL1.replace("L1", "L1_") + + return mainL1 + + def getChainMultFromDict(self, chainDict): allMultis = [] for cpart in chainDict['chainParts']: @@ -149,7 +175,7 @@ class DictFromChainName(object): for cpart in cNameParts: m = pattern.match(cpart) if m: - logDict.debug("In getChainMultFromName: Pattern found in this string: %s", cpart) + logDict.debug("In getChainThresholdFromName: Pattern found in this string: %s", cpart) m_groupdict = m.groupdict() allThresh.append(m_groupdict['threshold']) trigType.append(m_groupdict['trigType']) diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/GenerateMenuMT.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/GenerateMenuMT.py index 882b7e405c0f40965c53776f298e8f115af12ce2..e22da47322889acd3b3acda2004afaa49bfb71c9 100755 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/GenerateMenuMT.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/GenerateMenuMT.py @@ -1,10 +1,13 @@ -# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration from TriggerJobOpts.TriggerFlags import TriggerFlags from TriggerJobOpts.MuonSliceFlags import MuonSliceFlags from TriggerJobOpts.EgammaSliceFlags import EgammaSliceFlags from TriggerJobOpts.JetSliceFlags import JetSliceFlags from TriggerJobOpts.CombinedSliceFlags import CombinedSliceFlags +from TriggerJobOpts.TestSliceFlags import TestSliceFlags + + # Configure the scheduler from AthenaCommon.AlgScheduler import AlgScheduler @@ -50,8 +53,9 @@ class GenerateMenuMT: self.doJetChains = True self.doMuonChains = True self.doCombinedChains = True + self.doTestChains = True - + def setTriggerConfigHLT(self): # setting the hlt menu configuration (HLTPrescales) = self.setupMenu() @@ -68,9 +72,17 @@ class GenerateMenuMT: try: import TriggerMenuMT.HLTMenuConfig.Egamma.generateElectronChainDefs except: - log.exception('Problems when importing generateElectronChainDefs, disabling egamma chains.') + log.exception('Problems when importing generateElectronChainDefs, disabling Egamma chains.') self.doEgammaChains = False - + + if self.doTestChains: + try: + import TriggerMenuMT.HLTMenuConfig.Test.generateTestChainDefs + except: + log.exception('Problems when importing generateTestChainDefs, disabling Test chains.') + self.doTestChains = False + + listOfChainConfigs = [] chainDicts = splitInterSignatureChainDict(chainDicts) @@ -79,11 +91,11 @@ class GenerateMenuMT: pp = pprint.PrettyPrinter(indent=4, depth=8) log.debug('dictionary is: %s', pp.pformat(chainDicts)) + # Loop over all chainDicts and sending them off to their respective assembly code for chainDict in chainDicts: chainConfigs = None log.debug('Checking chainDict for chain %s' , chainDict['chainName']) - if chainDict["signature"] == "Electron" and self.doEgammaChains: try: log.debug("Try to get chain config") @@ -91,8 +103,16 @@ class GenerateMenuMT: except: log.exception( 'Problems creating ChainDef for chain\n %s ' % (chainDict['chainName']) ) continue + + elif chainDict["signature"] == "Test" and self.doTestChains: + try: + chainDefs = TriggerMenuMT.HLTMenuConfig.Test.generateTestChainDefs.generateChainConfigs(chainDict) + except: + log.exception('Problems creating ChainDef for chain %s ' % (chainDict['chainName'])) + continue + else: - log.error('Chain %s ignored - either trigger signature is turned off or the corresponding chain dictionary cannot be read.' %(chainDict['chainName'])) + log.error('Chain %s ignored - either trigger signature is turned off or chain dictionary cannot be read.' %(chainDict['chainName'])) log.debug('Chain dictionary of failed chain is %s.', chainDict) log.debug('ChainConfigs %s ' % chainConfigs) diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/GenerateMenuMT_newJO.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/GenerateMenuMT_newJO.py index aea1926e3c44ca83b1e336c316f1037b3225226c..bdd64dd97058a9b083d953ee1149bc17022018ba 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/GenerateMenuMT_newJO.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/GenerateMenuMT_newJO.py @@ -2,7 +2,8 @@ from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaCommon.CFElements import seqAND from TriggerMenuMT.HLTMenuConfig.Menu.HLTCFConfig import decisionTree_From_Chains, \ - generateDecisionTree + generateDecisionTreeOld +from TriggerMenuMT.HLTMenuConfig.Menu.HLTCFConfig_newJO import generateDecisionTree from AthenaCommon.Logging import logging from AthenaCommon.Constants import VERBOSE,INFO,DEBUG @@ -11,7 +12,7 @@ _log.setLevel( VERBOSE ) def fillGeneratorsMap( sigMap, signature ): """ Fill the mapping from the flag container name to the function responsible for generating the Chain objects - + Here the files naming convention is employed: the chains mentioned in Trigger.menu.XYZ are served by the function in HLTMenuConfig.XYZ.generateChains""" if signature in sigMap: @@ -20,14 +21,11 @@ def fillGeneratorsMap( sigMap, signature ): capitalizedSignature = signature.capitalize() importString = 'TriggerMenuMT.HLTMenuConfig.{}.generate{}'.format(capitalizedSignature, capitalizedSignature) - try: - gen = __import__(importString, globals(), locals(), ['generateChains']) - sigMap[signature] = gen.generateChains - _log.info( 'Imported generator for %s' % signature ) - except Exception as ex: - _log.warning( 'Cant import {} {}'.format(signature, ex) ) - + gen = __import__(importString, globals(), locals(), ['generateChains']) + sigMap[signature] = gen.generateChains + _log.info( 'Imported generator for %s' % signature ) + def generateMenu( flags ): """ @@ -43,17 +41,18 @@ def generateMenu( flags ): menuChains = [] allChainDicts =[] - menuAcc = ComponentAccumulator() - mainSequenceName = 'HLTAllSteps' - menuAcc.addSequence( seqAND(mainSequenceName) ) - chainAccumulators = [] for name, cfgFlag in list(flags._flagdict.iteritems()): if not 'Trigger.menu.' in name: continue + value = flags._get(name) + if len(value) == 0: + continue + # fill the map[signature, generating function] + signature = name.split('.')[-1] fillGeneratorsMap( signatureToGenerator, signature ) @@ -78,15 +77,22 @@ def generateMenu( flags ): _log.info('Obtained Menu Chain objects') - # pass all menuChain to CF builder + # pass all menuChain to CF builder + useReworked = True + if useReworked: + menuAcc = generateDecisionTree(menuChains, allChainDicts) + else: + menuAcc = ComponentAccumulator() + mainSequenceName = 'HLTAllSteps' + menuAcc.addSequence( seqAND(mainSequenceName) ) + chainsAcc = generateDecisionTreeOld(menuAcc.getSequence(mainSequenceName), menuChains, allChainDicts) + menuAcc.merge(chainsAcc) - chainsAcc = generateDecisionTree(menuAcc.getSequence(mainSequenceName), menuChains, allChainDicts) - chainsAcc.printConfig() - - menuAcc.merge( chainsAcc ) menuAcc.printConfig() + # kaboom + _log.info('CF is built') return menuAcc diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig.py index e131666ca923f8df81353dd7a33d63b09fb4b2c4..32d650c939522aa800dba327c15c557466312cbb 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration # Classes to configure the CF graph, via Nodes from AthenaCommon.CFElements import parOR, seqAND, seqOR @@ -6,7 +6,6 @@ from AthenaCommon.Logging import logging from AthenaCommon.AlgSequence import dumpSequence from TriggerMenuMT.HLTMenuConfig.Menu.HLTCFDot import stepCF_DataFlow_to_dot, stepCF_ControlFlow_to_dot, all_DataFlow_to_dot from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponentsNaming import CFNaming -from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator import sys import copy @@ -25,27 +24,6 @@ def makeSummary(name, flatDecisions): return summary -def makeStreamESD(name, flatDecisions): - """ Creates output stream for given decisions """ - import AthenaPoolCnvSvc.WriteAthenaPool - from OutputStreamAthenaPool.OutputStreamAthenaPool import createOutputStream - StreamESD = createOutputStream(name,"myESD.pool.root",True) - StreamESD.OutputLevel=3 - from AthenaCommon.AlgSequence import AlgSequence - topSequence = AlgSequence() - topSequence.remove( StreamESD ) - def addTC(name): - StreamESD.ItemList += [ "xAOD::TrigCompositeContainer#"+name, "xAOD::TrigCompositeAuxContainer#"+name+"Aux." ] - - for tc in flatDecisions: - addTC( tc ) - - addTC("HLTSummary") - log.debug("ESD file content: ") - log.debug( StreamESD.ItemList ) - return StreamESD - - def createStepRecoNode(name, seq_list, dump=False): """ elementary HLT reco step, contianing all sequences of the step """ @@ -86,6 +64,7 @@ def createCFTree(CFseq): for menuseq in CFseq.step.sequences: ath_sequence = menuseq.sequence.Alg name = ath_sequence.name() + print('5555555 ATH SEQUENCE NAME ---- ', name) if name in already_connected: log.debug("AthSequencer %s already in the Tree, not added again",name) else: @@ -166,10 +145,6 @@ def makeHLTTree(HLTChains, triggerConfigHLT = None): flatDecisions=[] for step in finalDecisions: flatDecisions.extend (step) summary= makeSummary("TriggerSummaryFinal", flatDecisions) - #from TrigOutputHandling.TrigOutputHandlingConf import HLTEDMCreator - #edmCreator = HLTEDMCreator() - #edmCreator.TrigCompositeContainer = flatDecisions - #summary.OutputTools= [ edmCreator ] hltTop += summary # add signature monitor @@ -182,7 +157,6 @@ def makeHLTTree(HLTChains, triggerConfigHLT = None): monAcc, monAlg = triggerMonitoringCfg( ConfigFlags, hypos, l1decoder[0] ) monAcc.appendToGlobals() hltTop += monAlg - #hltTop += makeStreamESD("StreamESD", flatDecisions) topSequence += hltTop @@ -356,7 +330,11 @@ def decisionTree_From_Chains(HLTNode, chains, allDicts): return finalDecisions -def generateDecisionTree(HLTNode, chains, allChainDicts): +""" +Not used, kept for reference and testing purposes +To be removed in future +""" +def generateDecisionTreeOld(HLTNode, chains, allChainDicts): log.debug("Run decisionTree_From_Chains on %s", HLTNode.name()) from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator acc = ComponentAccumulator() diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig_newJO.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig_newJO.py new file mode 100644 index 0000000000000000000000000000000000000000..707c700706c080c4aad8d9514fd625358d7ca8bc --- /dev/null +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig_newJO.py @@ -0,0 +1,117 @@ +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + +from collections import defaultdict + +from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator +from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponentsNaming import CFNaming +from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import CFSequence +from TriggerMenuMT.HLTMenuConfig.Menu.HLTCFConfig import buildFilter, makeSummary +from AthenaCommon.CFElements import parOR, seqAND, seqOR, findOwningSequence +from AthenaCommon.Logging import logging +from AthenaCommon.Constants import VERBOSE + +log = logging.getLogger('HLTCFConfig_newJO') +log.setLevel( VERBOSE ) + + +def connectStepToFilter(chainStep, filterNode): + filter_output = filterNode.getOutputList() + if len(filter_output) == 0: + raise ValueError('ERROR: no filter outputs are set') + + if len(filter_output) != len(chainStep.sequences): + msg = 'ERROR: found {} filter outputs and {} MenuSequences in step {}'.format(len(filter_output), + len(chainStep.sequences), chainStep.name) + raise ValueError(msg) + + for nseq, sequence in enumerate(chainStep.sequences): + output = filter_output[nseq] + log.debug("Found input %s to sequence::%s from Filter::%s (from seed %s)", output, + sequence.name, filterNode.Alg.name(), sequence.seed) + sequence.connectToFilter(output) + + +def generateDecisionTree(chains, allChainDicts): + from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator + from collections import defaultdict + from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import CFSequence + from AthenaCommon.CFElements import findOwningSequence + + acc = ComponentAccumulator() + mainSequenceName = 'HLTAllSteps' + acc.addSequence( seqAND(mainSequenceName) ) + + log.debug('Generating decision tree with main sequence: {}'.format(mainSequenceName)) + + chainStepsMatrix = defaultdict(lambda: defaultdict(list)) + + ## Fill chain steps matrix + for chain in chains: + for stepNumber, chainStep in enumerate(chain.steps): + chainName = chainStep.name.split('_')[0] + chainStepsMatrix[stepNumber][chainName].append(chain) + + allSequences = [] + + ## Matrix with steps lists generated. Creating filters for each cell + for nstep in chainStepsMatrix: + stepDecisions = [] + + stepName = 'Step{}'.format(nstep) + + stepFilterNodeName = '{}{}'.format(stepName, CFNaming.FILTER_POSTFIX) + filterAcc = ComponentAccumulator() + filterAcc.addSequence( parOR(stepFilterNodeName) ) + + stepRecoNodeName = '{}_{}'.format(mainSequenceName, stepName) + recoAcc = ComponentAccumulator() + recoAcc.addSequence( parOR(stepRecoNodeName) ) + + for chainName in chainStepsMatrix[nstep]: + chainsInCell = chainStepsMatrix[nstep][chainName] + + if not chainsInCell: + # If cell is empty, there is nothing to do + continue + + firstChain = chainsInCell[0] + if nstep == 0: + filter_input = firstChain.group_seed + else: + filter_input = [output for sequence in firstChain.steps[nstep - 1].sequences for output in sequence.outputs] + + # One aggregated filter per chain (one per column in matrix) + filterName = 'Filter_{}'.format( firstChain.steps[nstep].name ) + sfilter = buildFilter(filterName, filter_input) + filterAcc.addEventAlgo(sfilter.Alg, sequenceName = stepFilterNodeName) + + chainStep = firstChain.steps[nstep] + stepReco = parOR('{}{}'.format(chainStep.name, CFNaming.RECO_POSTFIX)) + stepView = seqAND('{}{}'.format(chainStep.name, CFNaming.VIEW_POSTFIX), [stepReco]) + viewWithFilter = seqAND(chainStep.name, [sfilter.Alg, stepView]) + recoAcc.addSequence(viewWithFilter, parentName = stepRecoNodeName) + + stepsAcc = ComponentAccumulator() + + for chain in chainsInCell: + for seq in chain.steps[nstep].sequences: + if seq.ca is None: + raise ValueError('ComponentAccumulator missing in sequence {} in chain {}'.format(seq.name, chain.name)) + stepsAcc.merge( seq.ca ) + recoAcc.addEventAlgo( seq.hypo.Alg, sequenceName = stepView.getName() ) + sfilter.setChains(chain.name) + + recoAcc.merge(stepsAcc, sequenceName = stepReco.getName()) + + connectStepToFilter(chainStep, sfilter) + + for sequence in chainStep.sequences: + stepDecisions += sequence.outputs + + acc.merge(filterAcc, sequenceName = mainSequenceName) + acc.merge(recoAcc, sequenceName = mainSequenceName) + + summary = makeSummary('TriggerSummary{}'.format(stepName), stepDecisions) + acc.addSequence(summary, parentName = mainSequenceName) + + return acc \ No newline at end of file diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py index ee607522968ab934603d3f54ba3980349cf8479d..92e5492d02c9c8f4d2424409fa49f29bd9f0f527 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py @@ -18,7 +18,7 @@ def setupMenu(): #--------------------------------------------------------------------- # INPUT FORMAT FOR CHAINS: - # ['chainName', 'L1itemforchain', [L1 items for chainParts], [stream], [groups], EBstep], OPTIONAL: [mergingStrategy, offset,[merginOrder] ]], topoStartsFrom = False + # ['chainName', [L1 thresholds for chainParts], [stream], [groups], EBstep], OPTIONAL: [mergingStrategy, offset,[merginOrder] ]], topoStartsFrom = False #--------------------------------------------------------------------- #--------------------------------------------------------------------- @@ -32,18 +32,18 @@ def setupMenu(): TriggerFlags.TestSlice.signatures = [] TriggerFlags.MuonSlice.signatures = [ - #['mu20', 'L1_MU10', [], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1], - #['mu8', 'L1_MU6', [], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1], + #['mu20_L1MU10', [], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1], + #['mu8_L1MU6', [], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1], ] TriggerFlags.EgammaSlice.signatures = [ - ['HLT_e3_etcut', 'L1_EM3', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Electron'], -1], - ['HLT_e5_etcut', 'L1_EM3', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Electron'], -1], - ['HLT_e7_etcut', 'L1_EM3', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Electron'], -1], - #['e20', 'L1_EM10', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Electron'], -1], + ['HLT_e3_etcut_L1EM3', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Electron'], -1], + ['HLT_e5_etcut_L1EM3', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Electron'], -1], + ['HLT_e7_etcut_L1EM3', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Electron'], -1], + #['e20_L1EM10', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Electron'], -1], ] TriggerFlags.CombinedSlice.signatures = [ - #['e8_mu8', 'L1_EM6_MU6', [], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1], + #['e8_mu8_L1EM6_MU6', [], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1], ] TriggerFlags.JetSlice.signatures = [ ] TriggerFlags.BjetSlice.signatures = [] @@ -61,9 +61,6 @@ def setupMenu(): # Random Seeded EB chains which select at the HLT based on L1 TBP bits TriggerFlags.EnhancedBiasSlice.signatures = [ ] - - - signatureList=[] for prop in dir(TriggerFlags): if prop[-5:]=='Slice': diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1_newJO.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1_newJO.py index 96c51d7f0f9562652e53c958ea3764996a476e45..9aebb97a11d6fbb78fb575dd02d54199fd5f6920 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1_newJO.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1_newJO.py @@ -1,8 +1,9 @@ -# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -def get_flag_item(chainName, L1itemforchain, groups): +def get_flag_item(chainName, L1itemsChainParts, groups): PhysicsStream = 'Main' - return [chainName, L1itemforchain, [], [PhysicsStream], groups, -1] + L1item = chainName.split('_')[-1].replace('L1', 'L1_') + return [chainName, L1item, [PhysicsStream], groups, -1] def setupMenu(flags): """ @@ -14,7 +15,7 @@ def setupMenu(flags): #--------------------------------------------------------------------- # INPUT FORMAT FOR CHAINS: - # ['chainName', 'L1itemforchain', [L1 items for chainParts], [stream], [groups], EBstep], + # ['chainName', [L1 items for chainParts], [stream], [groups], EBstep], # OPTIONAL: [mergingStrategy, offset,[merginOrder] ]], topoStartsFrom = False #--------------------------------------------------------------------- @@ -26,24 +27,24 @@ def setupMenu(flags): flags.Trigger.menu.muon = [ - get_flag_item('HLT_mu20', 'L1_MU20', ['RATE:SingleMuon', 'BW:Muon']), - get_flag_item('HLT_mu10', 'L1_MU10', ['RATE:SingleMuon', 'BW:Muon']), - get_flag_item('HLT_mu8', 'L1_MU6', ['RATE:SingleMuon', 'BW:Muon']) + get_flag_item('HLT_mu20_L1MU20', [], ['RATE:SingleMuon', 'BW:Muon']), + get_flag_item('HLT_mu10_L1MU10', [], ['RATE:SingleMuon', 'BW:Muon']), + get_flag_item('HLT_mu8_L1MU6', [], ['RATE:SingleMuon', 'BW:Muon']) ] flags.Trigger.menu.electron = [ - get_flag_item('HLT_e3_etcut', 'L1_EM3', ['RATE:SingleElectron', 'BW:Electron']), - get_flag_item('HLT_e5_etcut', 'L1_EM3', ['RATE:SingleElectron', 'BW:Electron']), - get_flag_item('HLT_e7_etcut', 'L1_EM7', ['RATE:SingleElectron', 'BW:Electron']) + get_flag_item('HLT_e3_etcut_L1EM3', [], ['RATE:SingleElectron', 'BW:Electron']), + get_flag_item('HLT_e5_etcut_L1EM3', [], ['RATE:SingleElectron', 'BW:Electron']), + get_flag_item('HLT_e7_etcut_L1EM7', [], ['RATE:SingleElectron', 'BW:Electron']) ] flags.Trigger.menu.photon = [ - get_flag_item('HLT_g10_etcut', 'L1_EM7', ['RATE:SinglePhoton', 'BW:Photon']), - get_flag_item('HLT_g15_etcut', 'L1_EM12', ['RATE:SinglePhoton', 'BW:Photon']) + get_flag_item('HLT_g10_etcut_L1EM7', [], ['RATE:SinglePhoton', 'BW:Photon']), + get_flag_item('HLT_g15_etcut_L1EM12', [], ['RATE:SinglePhoton', 'BW:Photon']) ] # flags.Trigger.menu.combined = [ - # get_flag_item('e8_mu8', 'L1_EM6_MU6', ['RATE:SingleMuon', 'BW:Muon']) + # get_flag_item('HLT_e8_mu8_L1EM6_MU6', [], ['RATE:SingleMuon', 'BW:Muon']) # ] diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/MenuComponents.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/MenuComponents.py index b9fc1072f79a45dac54d888eeab3455800246283..aa253f8944d0809f507e425821174e2a8364c492 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/MenuComponents.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/MenuComponents.py @@ -253,32 +253,6 @@ def isFilterAlg(alg): return isinstance(alg, RoRSeqFilter) -class WrappedList: - def __init__(self, lst): - self._lst = lst - def __getitem__(self, item): - return self._lst[item] - def __setitem__(self, item): - return self._lst.append(item) - - -#class duplicatedHypos(WrappedList): - -## allAlgs={} -## def useExisting(name): -## global allAlgs -## return allAlgs[name] - -## def AlgExisting(name): -## global allAlgs -## return name in allAlgs - - -## def remember(name, instance): -## global allAlgs -## allAlgs[name] = instance -## return instance - ########################################################## # NOW sequences and chains @@ -607,105 +581,5 @@ class RecoFragmentsPool: return cls.fragments[requestHash] -class NJMenuSequence( ComponentAccumulator ): - def __init__( self, name ): - super( NJMenuSequence, self ).__init__() - from AthenaCommon.CFElements import seqAND - self.name = name - self.mainSeq = seqAND( name ) - self.addSequence( self.mainSeq ) - self.filterAlg = None - self.reco = None - self.hypoAlg = None - - def addReco( self, reco ): - """ Adds reconstruction sequence, has to be one of InViewReco or InEventReco objects """ - assert self.filterAlg, "The filter alg has to be setup first" - self.reco = reco - reco.addInputFromFilter( self.filterAlg ) - self.addSequence( reco.sequence(), self.mainSeq.name() ) - self.merge( reco ) - - def addFilter( self, chains, inKey ): - """ adds filter alg of type RoRSeqFilter, output key is predefined by the sequence name as: Filtered + the name""" - from DecisionHandling.DecisionHandlingConf import RoRSeqFilter - self.filterAlg = RoRSeqFilter( self.name+'Filter' ) - self.filterAlg.Input = [ inKey ] - self.filterAlg.Output = [ 'Filtered_'+self.name ] - self.filterAlg.Chains = chains - from AthenaCommon.Constants import DEBUG - self.filterAlg.OutputLevel = DEBUG - self.addEventAlgo( self.filterAlg, self.mainSeq.name() ) - - def hypoDecisions( self ): - return "Decisions_"+self.name - - def addHypo( self, hypo ): - self.hypoAlg = hypo - self.hypoAlg.HypoInputDecisions = self.reco.inputMaker().InputMakerOutputDecisions[-1] - self.hypoAlg.HypoOutputDecisions = self.hypoDecisions() - self.addEventAlgo( hypo, self.mainSeq.name() ) - - def sequence( self ): - return self.mainSeq - - def filter( self ): - return self.filterAlg - - def check( self ): - assert self.filterAlg, "Filter not configured" - assert self.hypoAlg, "Hypo alg is not configured" - - -class HLTMenuAccumulator( ComponentAccumulator ): - def __init__( self ): - super( HLTMenuAccumulator, self ).__init__() - from AthenaCommon.CFElements import seqAND - HLTSteps = seqAND( "HLTSteps" ) - self.addSequence( HLTSteps ) - - def __getOrMakeStepSequence(self, step, isFilter = False ): - """ Constructs sequence for the step, the filtering step or, reco step will be created depending on isFilter flags - - The function assures that all previous steps are aready in place i.e. HLTStep_1_filter, HLTStep_1 ... until HLTStep_N-1 are in place. - Therefore the steps can be added in any order (not yet sure if that will but better assure robustness now) - """ - from AthenaCommon.CFElements import parOR - name = "HLTStep_%d%s" % (step, "_filters" if isFilter else "" ) - - s = self.getSequence( name ) - if s: - return s - # make sure that sequences for previous steps are in place - for p in range( 1, step ): - self.__getOrMakeStepSequence( p, isFilter = True ) - self.__getOrMakeStepSequence( p, isFilter = False ) - # make sure that filtering steps is placed before reco steps - if not isFilter: - self.__getOrMakeStepSequence( step, isFilter = True ) - s = parOR( name ) - self.addSequence( s, parentName="HLTSteps") - return s - - - def setupSteps( self, steps ): - """ The main menu function, it is responsible for crateion of step sequences and placing slice specific sequencers there. - - It would rely on the MenuSeq object API in two aspects, to obtain filter alg and to obtain the reco sequence - The MenuSeq should already contain all the chains that are needed for the menu setup (chains info can be accessed via flags passed when steps were created) - """ - for stepNo, fhSeq in enumerate( steps, 1 ): - filterStep = self.__getOrMakeStepSequence( stepNo, isFilter = True ) - filterStep += fhSeq.filter() # FilterHypoSequence API - - recoStep = self.__getOrMakeStepSequence( stepNo, isFilter = False ) - self.addSequence( fhSeq.sequence(), recoStep.name() ) - - - def steps( self ): - """ returns step seqeuncers """ - return self.getSequence("HLTSteps") - - def getChainStepName(chainName, stepNumber): return '{}_step{}'.format(chainName, stepNumber) diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/SignatureDicts.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/SignatureDicts.py index 4f3e2c3edb37ae2271bbfb69c40467c68dcaec19..1637d01b074e227ec7f257757f585c39b9223b8e 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/SignatureDicts.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/SignatureDicts.py @@ -366,7 +366,7 @@ ElectronChainParts = { 'caloInfo' : [], 'lhInfo' : [], 'L2IDAlg' : [], - 'addInfo' : ['etcut', 'etcut1step'], + 'addInfo' : ['etcut', 'etcut1step',"v2","v3"], 'eventBuildType' : AllowedEventBuildingIdentifiers, } # ---- Egamma Dictinary of default Values ---- diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/TriggerConfigHLT.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/TriggerConfigHLT.py index a05458ebd87796ed02b7fc787fa1bf1c3e17a279..cbf15205d8b00dded9df69a0708b54a915057da7 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/TriggerConfigHLT.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/TriggerConfigHLT.py @@ -1,9 +1,9 @@ +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + ######################################################################################### # # TriggerConfigHLT class, providing basic functionality for assembling the menu # -# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration -# ######################################################################################### import sys diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Test/TestDef.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Test/TestDef.py new file mode 100644 index 0000000000000000000000000000000000000000..87a21994502ba18585b0322b1c45da093ac31405 --- /dev/null +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Test/TestDef.py @@ -0,0 +1,38 @@ +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + +from AthenaCommon.Logging import logging +logging.getLogger().info("Importing %s",__name__) +log = logging.getLogger("TriggerMenuMT.HLTMenuConfig.Test.TestDef") + + +from TriggerMenuMT.HLTMenuConfig.Menu.ChainConfigurationBase import ChainConfigurationBase +from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import Chain, ChainStep, RecoFragmentsPool +from TriggerMenuMT.HLTMenuConfig.Menu.TriggerConfigHLT import TriggerConfigHLT + + +#---------------------------------------------------------------- +# Class to configure chain +#---------------------------------------------------------------- +class TestChainConfiguration(ChainConfigurationBase): + + def __init__(self, chainDict): + ChainConfigurationBase.__init__(self,chainDict) + + # ---------------------- + # Assemble the chain depending on information from chainName + # ---------------------- + def assembleChain(self): + myStepNames = [] + chainSteps = [] + log.debug("Assembling chain for " + self.chainName) + # -------------------- + # define here the names of the steps and obtain the chainStep configuration + # -------------------- + + myChain = self.buildChain(chainSteps) + return myChain + + + + + diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Test/__init__.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Test/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..10057c2b910c379bcdd9d68ce51f9df92266e16f --- /dev/null +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Test/__init__.py @@ -0,0 +1 @@ +#Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Test/generateTestChainDefs.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Test/generateTestChainDefs.py new file mode 100644 index 0000000000000000000000000000000000000000..13291d6bc74e90868e7dc81e4b5824f7f1503e7e --- /dev/null +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Test/generateTestChainDefs.py @@ -0,0 +1,46 @@ +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + +from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import Chain +from TriggerMenuMT.HLTMenuConfig.Menu.ChainDictTools import splitChainDict +from TriggerMenuMT.HLTMenuConfig.Test.TestDef import TestChainConfiguration as TestChainConfiguration + + +from AthenaCommon.Logging import logging +log = logging.getLogger( 'TriggerMenuMT.HLTMenuConfig.Test.generateChainConfigs' ) +log.info("Importing %s",__name__) + + + +def generateChainConfigs( chainDict ): + import pprint + pprint.pprint( chainDict ) + + + listOfChainDicts = splitChainDict(chainDict) + listOfChainDefs = [] + + for subChainDict in listOfChainDicts: + + Test = TestChainConfiguration(subChainDict).assembleChain() + + listOfChainDefs += [Test] + log.debug('length of chaindefs %s', len(listOfChainDefs) ) + + + if len(listOfChainDefs)>1: + log.warning("Implement case for multiplicity >1 test chain!!") + theChainDef = listOfChainDefs[0] #needs to be implemented properly + else: + theChainDef = listOfChainDefs[0] + + log.debug("theChainDef.name: %s" , theChainDef.name) + log.debug("theChainDef.seed: %s" , theChainDef.seed) + log.debug("theChainDef.ChainSteps: %s" , theChainDef.steps) + + return theChainDef + + + + + + diff --git a/Trigger/TriggerRelease/python/Modifiers.py b/Trigger/TriggerRelease/python/Modifiers.py index 6ad2de7fa67c07b0eb215c06ccde495d06294d4b..de7139d15197c18ff15bc160ad78050bf611499c 100644 --- a/Trigger/TriggerRelease/python/Modifiers.py +++ b/Trigger/TriggerRelease/python/Modifiers.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration ############################################################## # Modifiers.py @@ -343,6 +343,13 @@ class BFieldFromDCS(_modifier): conddb.addFolder("DCS_OFL","/EXT/DCS/MAGNETS/SENSORDATA") svcMgr.AtlasFieldSvc.UseDCS = True +class BFieldAutoConfig(_modifier): + """ + Read field currents from configuration ptree (athenaHLT) + """ + def postSetup(self): + if hasattr(svcMgr,'HltEventLoopMgr'): svcMgr.HltEventLoopMgr.setMagFieldFromPtree = True + class allowCOOLUpdates(_modifier): """ Enable COOL folder updates during the run @@ -441,14 +448,6 @@ class useOnlineLumi(_modifier): from LumiBlockComps.LuminosityToolDefault import LuminosityToolOnline ToolSvc += LuminosityToolOnline() - # This is needed for the correct functioning of LumiBlockMuTool - from LumiBlockComps.LumiBlockCompsConf import LumiBlockMuWriter - from AthenaCommon.AlgSequence import AlgSequence - topSequence = AlgSequence() - topSequence += LumiBlockMuWriter("LumiBlockMuWriter", - LuminosityTool = ToolSvc.LuminosityTool) - - ############################################################### # Algorithm modifiers ############################################################### diff --git a/graphics/VP1/VP1Base/src/vp13dstandardchannelsnapshotgroupbox.ui b/graphics/VP1/VP1Base/src/vp13dstandardchannelsnapshotgroupbox.ui index 08a0d27d6e053805a99566c88565eb75dcdd7812..1cafcc5f2ac55dd2747bdf3d8b061f2ea965e69d 100644 --- a/graphics/VP1/VP1Base/src/vp13dstandardchannelsnapshotgroupbox.ui +++ b/graphics/VP1/VP1Base/src/vp13dstandardchannelsnapshotgroupbox.ui @@ -14,7 +14,16 @@ <string>Form</string> </property> <layout class="QVBoxLayout"> - <property name="margin"> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> <number>0</number> </property> <item> @@ -254,7 +263,7 @@ </property> <layout class="QVBoxLayout" name="verticalLayout_2"> <item> - <layout class="QGridLayout" name="gridLayout"> + <layout class="QGridLayout" name="gridLayout11"> <item row="0" column="1"> <widget class="QRadioButton" name="radioButton_1080p"> <property name="toolTip"> diff --git a/graphics/VP1/VP1Base/src/vp1customstereoeditor.ui b/graphics/VP1/VP1Base/src/vp1customstereoeditor.ui index 10b5fa9be1072651ae38212672271478e7a055fb..f1ec670202c9a87b8b8e738994e0f7517f33cd0f 100644 --- a/graphics/VP1/VP1Base/src/vp1customstereoeditor.ui +++ b/graphics/VP1/VP1Base/src/vp1customstereoeditor.ui @@ -579,7 +579,6 @@ However, if you have a large scene, where you want to fly around in the scene, a </layout> </item> </layout> - <zorder></zorder> </widget> </item> <item> diff --git a/graphics/VP1/VP1Gui/src/VP1ExecutionScheduler.cxx b/graphics/VP1/VP1Gui/src/VP1ExecutionScheduler.cxx index bac60a9e21fcbb5e4e9f02a37651d12fae81b131..ec8fb3174470386cc27d4ff9cd7dda83650bf4cd 100644 --- a/graphics/VP1/VP1Gui/src/VP1ExecutionScheduler.cxx +++ b/graphics/VP1/VP1Gui/src/VP1ExecutionScheduler.cxx @@ -213,10 +213,13 @@ VP1ExecutionScheduler::VP1ExecutionScheduler( QObject * parent, m_d->scheduler = this; m_d->prioritiser = new VP1Prioritiser(this); m_d->mainwindow = new VP1MainWindow(this,availEvents);//mainwindow takes ownership of available events - m_d->batchMode = false; + + m_d->batchMode = false; m_d->batchUtilities = nullptr; m_d->batchModeAllEvents = false; m_d->batchModeNEvents = 0; + m_d->batchModeRandomConfig = false; + m_d->allSystemsRefreshed = false; m_d->goingtonextevent=true; m_d->currentsystemrefreshing=0; @@ -386,12 +389,15 @@ VP1ExecutionScheduler* VP1ExecutionScheduler::init( StoreGateSvc* eventStore, if (joboptions.empty()) { //scheduler->m_d->mainwindow->tabManager()->addNewTab("My Tab"); } else { + qDebug() << "config files: " << joboptions; // DEBUG foreach(QString opt,joboptions) scheduler->m_d->mainwindow->loadConfigurationFromFile(opt); if ( scheduler->m_d->batchMode ) { if (scheduler->m_d->batchModeRandomConfig ) { - scheduler->m_d->batchUtilities = new VP1BatchUtilities( qstringlistToVecString(joboptions) ); + if (joboptions.size() != 0 ) { + scheduler->m_d->batchUtilities = new VP1BatchUtilities( qstringlistToVecString(joboptions) ); + } } QString batchNevents = VP1QtUtils::environmentVariableValue("VP1_BATCHMODE_NEVENTS"); if (batchNevents > 0 ) { diff --git a/graphics/VP1/VP1Systems/VP1CaloReadoutSystems/src/caloreadoutsystemcontroller.ui b/graphics/VP1/VP1Systems/VP1CaloReadoutSystems/src/caloreadoutsystemcontroller.ui index 90d15fdb9b90dd50290bcef0571c519bbf97323f..3466608a0c4a09265c2ecb8f4e33f0ad9d1ff164 100644 --- a/graphics/VP1/VP1Systems/VP1CaloReadoutSystems/src/caloreadoutsystemcontroller.ui +++ b/graphics/VP1/VP1Systems/VP1CaloReadoutSystems/src/caloreadoutsystemcontroller.ui @@ -686,7 +686,7 @@ <property name="title" > <string>HV Pathologic</string> </property> - <layout class="QGridLayout" name="gridLayout" > + <layout class="QGridLayout" name="gridLayout_7" > <item row="0" column="2" > <widget class="QLabel" name="hecLabel_2" > <property name="text" > diff --git a/graphics/VP1/VP1Systems/VP1GeometrySystems/src/geometrysystemcontroller.ui b/graphics/VP1/VP1Systems/VP1GeometrySystems/src/geometrysystemcontroller.ui index d74f4080959842d34ade939be290faccfa4285c9..6fa82999c7c745efc0d270d30cec37add12938ca 100644 --- a/graphics/VP1/VP1Systems/VP1GeometrySystems/src/geometrysystemcontroller.ui +++ b/graphics/VP1/VP1Systems/VP1GeometrySystems/src/geometrysystemcontroller.ui @@ -6,8 +6,8 @@ <rect> <x>0</x> <y>0</y> - <width>287</width> - <height>646</height> + <width>338</width> + <height>822</height> </rect> </property> <property name="sizePolicy"> @@ -46,7 +46,16 @@ </sizepolicy> </property> <layout class="QGridLayout" name="_19"> - <property name="margin"> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> <number>0</number> </property> <property name="spacing"> @@ -149,20 +158,38 @@ <property name="spacing"> <number>0</number> </property> - <property name="margin"> + <property name="leftMargin"> + <number>4</number> + </property> + <property name="topMargin"> + <number>4</number> + </property> + <property name="rightMargin"> + <number>4</number> + </property> + <property name="bottomMargin"> <number>4</number> </property> <item> <layout class="QGridLayout" name="_4"> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> <property name="horizontalSpacing"> <number>6</number> </property> <property name="verticalSpacing"> <number>0</number> </property> - <property name="margin"> - <number>0</number> - </property> <item row="0" column="1"> <widget class="QCheckBox" name="checkBox_SCT"> <property name="text"> @@ -218,7 +245,16 @@ <property name="spacing"> <number>0</number> </property> - <property name="margin"> + <property name="leftMargin"> + <number>4</number> + </property> + <property name="topMargin"> + <number>4</number> + </property> + <property name="rightMargin"> + <number>4</number> + </property> + <property name="bottomMargin"> <number>4</number> </property> <item> @@ -538,7 +574,7 @@ </widget> </item> <item> - <widget class="QGroupBox" name="groupBox_misc"> + <widget class="QGroupBox" name="groupBox_fwd"> <property name="title"> <string>Forward Region</string> </property> @@ -546,7 +582,16 @@ <property name="spacing"> <number>0</number> </property> - <property name="margin"> + <property name="leftMargin"> + <number>4</number> + </property> + <property name="topMargin"> + <number>4</number> + </property> + <property name="rightMargin"> + <number>4</number> + </property> + <property name="bottomMargin"> <number>4</number> </property> <item> @@ -602,11 +647,20 @@ <property name="title"> <string>Miscellaneous</string> </property> - <layout class="QVBoxLayout" name="_12"> + <layout class="QVBoxLayout" name="_12_2"> <property name="spacing"> <number>0</number> </property> - <property name="margin"> + <property name="leftMargin"> + <number>4</number> + </property> + <property name="topMargin"> + <number>4</number> + </property> + <property name="rightMargin"> + <number>4</number> + </property> + <property name="bottomMargin"> <number>4</number> </property> <item>