Commit cacbe105 authored by Alex Pearce's avatar Alex Pearce
Browse files

Configurable RootInTES for PersistReco objects.

Before this commit, PersistReco objects were linked in such a way as to
mimic the output of Brunel, e.g. linking ProtoParticle objects to
`Rec/ProtoP/Charged`.

Now, the Brunel locations are namespaced under a configurable RootInTES.
This allows Turbo and PersistReco to live entirely under one location,
`/Event/Turbo` by default, which should allow a more peaceful
co-existence between Turbo+PersistReco and Brunel output.

This commit moves towards allowing end-user Turbo configuration to more
closely resemble that for a microDST, i.e. setting `InputType = 'MDST'`
and `RootInTES = '/Event/Turbo'`.
parent 5e022113
"""High level configuration for Turbo."""
from os.path import join
from Configurables import LHCbConfigurableUser
from Configurables import DataOnDemandSvc
from Configurables import Gaudi__DataLink as DataLink
......@@ -17,11 +19,13 @@ class TurboConf(LHCbConfigurableUser):
__slots__ = {
"DataType": "",
"PersistReco": False,
"RootInTES": "/Event/Turbo"
}
_propertyDocDct = {
"DataType": "Flag for backward compatibility with old data",
"PersistReco": "Setup PersistReco (overrides some Turbo defaults)",
"RootInTES": "Where to link the unpacked PersistReco objects under"
}
__used_configurables__ = [
......@@ -67,31 +71,47 @@ class TurboConf(LHCbConfigurableUser):
def _register_pr_links(self, packing):
"""Set up DataOnDemandSvc to create links to standard rec locations."""
from Configurables import TESMerger_LHCb__ProtoParticle_ as TESMergerProtoParticle
from Configurables import TESMerger_LHCb__Track_ as TESMergerTrack
from Configurables import GaudiSequencer
rootintes = self.getProp("RootInTES")
mergeProtos = TESMergerProtoParticle("MergeProtos")
mergeProtos.inputLocations = [
packing.outputs["Hlt2LongProtos"],
packing.outputs["Hlt2DownstreamProtos"],
]
mergeProtos.outputLocation = '/Event/Hlt2/Protos/Charged'
DataOnDemandSvc().AlgMap[mergeProtos.outputLocation] = mergeProtos
mergeTracks = TESMergerTrack("MergeTracks")
mergeTracks.inputLocations = [
packing.outputs["Hlt2LongTracks"],
packing.outputs["Hlt2DownstreamTracks"],
]
mergeTracks.outputLocation = '/Event/Hlt2/TrackFitted/Charged'
DataOnDemandSvc().AlgMap[mergeTracks.outputLocation] = mergeTracks
linkChargedProtos = DataLink('HltRecProtos',
What=mergeProtos.outputLocation,
Target='/Event/Rec/ProtoP/Charged')
recProtos = GaudiSequencer("TurboProtosAsRec")
recProtos.Members = [mergeProtos, linkChargedProtos]
DataOnDemandSvc().AlgMap[linkChargedProtos.Target] = recProtos
Target=join(rootintes, 'Rec/ProtoP/Charged'))
DataOnDemandSvc().AlgMap[linkChargedProtos.Target] = linkChargedProtos
linkTracks = DataLink('HltRecTracks',
What=mergeTracks.outputLocation,
Target=join(rootintes, 'Rec/Track/Best'))
DataOnDemandSvc().AlgMap[linkTracks.Target] = linkTracks
linkNeutralProtos = DataLink('HltRecNeutralProtos',
What=packing.outputs["Hlt2NeutralProtos"],
Target='/Event/Rec/ProtoP/Neutrals')
Target=join(rootintes, 'Rec/ProtoP/Neutrals'))
recNeutralProtos = GaudiSequencer("TurboNeutralProtosAsRec")
recNeutralProtos.Members = [linkNeutralProtos]
DataOnDemandSvc().AlgMap[linkNeutralProtos.Target] = recNeutralProtos
linkPVs = DataLink('LinkHltPersistRecoPVs',
What=packing.outputs['Hlt2RecVertices'],
Target='/Event/Rec/Vertex/Primary')
Target=join(rootintes, 'Rec/Vertex/Primary'))
DataOnDemandSvc().AlgMap[linkPVs.Target] = linkPVs
def __apply_configuration__(self):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment