Skip to content
Snippets Groups Projects
Commit f6f5d851 authored by Eduardo Rodrigues's avatar Eduardo Rodrigues
Browse files

Merge branch 'apearce-lhcbps-1810' into '2017-patches'

Pack relations tables in Tesla

See merge request !272

(cherry picked from commit bd12dabb)

54ac41c2 Always run PackParticlesAndVertices.
parent 996b59d8
No related branches found
No related tags found
1 merge request!274Pack relations tables in Tesla
......@@ -21,6 +21,7 @@ from Configurables import (
DataPacking__Unpack_LHCb__CaloClusterPacker_ as UnpackCaloClusters,
DecodeRawEvent,
DstConf,
EventNodeKiller,
EventSelector,
Gaudi__DataCopy as DataCopy,
Gaudi__DataLink as DataLink,
......@@ -1206,15 +1207,12 @@ class Tesla(LHCbConfigurableUser):
packers += prpacking_stream.packers(identifier=namer(''))
# Pack everything else that we've cloned
# (Packed locations made by PackParticlesAndVertices already exist
# at the anonymous stream location)
if output_prefix:
psandvs_packer = PackParticlesAndVertices(
namer('TurboPacker'),
InputStream=turbo_base,
VetoedContainers=prpacking_stream.inputs.values()
)
packers.append(psandvs_packer)
psandvs_packer = PackParticlesAndVertices(
namer('TurboPacker'),
InputStream=turbo_base,
VetoedContainers=prpacking_stream.inputs.values()
)
packers.append(psandvs_packer)
# Pack the filtered MC particles and vertices
if filter_mc:
......@@ -1240,9 +1238,35 @@ class Tesla(LHCbConfigurableUser):
packer.OutputLevel = min(self.getProp('OutputLevel'),
self.getProp('PackerOutputLevel'))
# If the stream is anonymous, we must first kill the output of
# PackParticlesAndVertices from HLT2 (which lives in the same
# place) so that we can re-run the algorithm here
# This is done primarily for packing relations tables, which are
# packed by PackParticlesAndVertices but created only in Tesla
node_killers = []
if not output_prefix:
enk = EventNodeKiller(namer('KillHLT2PackPsAndVsOutput'))
# List of locations produced by PackParticlesAndVertices
enk.Nodes = [os.path.join(turbo_base, p) for p in [
'pPhys/Particles',
'pPhys/Vertices',
'pPhys/FlavourTags',
'pPhys/RecVertices',
'pPhys/Relations',
'pPhys/P2MCPRelations',
'pPhys/P2IntRelations',
'pPhys/PartToRelatedInfoRelations',
'pRec/ProtoP/Custom',
'pRec/Muon/CustomPIDs',
'pRec/Rich/CustomPIDs',
'pRec/Track/Custom',
'pPhys/PP2MCPRelations'
]]
node_killers.append(enk)
packing_seq = GaudiSequencer(
namer('TeslaPackingSequence'),
Members=packers,
Members=node_killers + packers,
IgnoreFilterPassed=True
)
stream_seq.Members.append(packing_seq)
......@@ -1252,12 +1276,6 @@ class Tesla(LHCbConfigurableUser):
os.path.join(turbo_base, 'pRec#*'),
os.path.join(turbo_base, 'Hlt2/pRec#*')
]
# Need to save the *unpacked* relations tables when we aren't
# streaming because we don't run PackParticlesAndVertices in that
# case
if simulation and not output_prefix:
optional_output_locations += [os.path.join(turbo_base, 'Relations#*')]
else:
# Save everything under the stream prefix
optional_output_locations += [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment