Skip to content
Snippets Groups Projects
Commit b2c947f5 authored by Alex Pearce's avatar Alex Pearce
Browse files

More general configuration of persistence service.

parent c0f1578e
No related branches found
No related tags found
2 merge requests!85merge master to future,!66Configuration of Tesla with selective persistence
...@@ -18,7 +18,6 @@ from Configurables import ( ...@@ -18,7 +18,6 @@ from Configurables import (
DstConf, DstConf,
EventSelector, EventSelector,
GaudiSequencer, GaudiSequencer,
HltLinePersistenceSvc,
HltPackedDataDecoder, HltPackedDataDecoder,
HltRoutingBitsFilter, HltRoutingBitsFilter,
InputCopyStream, InputCopyStream,
...@@ -39,6 +38,7 @@ from Configurables import ( ...@@ -39,6 +38,7 @@ from Configurables import (
RecSummaryFromSelReports, RecSummaryFromSelReports,
RecombineRawEvent, RecombineRawEvent,
RecordStream, RecordStream,
TCKLinePersistenceSvc,
TeslaLineChecker, TeslaLineChecker,
TeslaReportAlgo, TeslaReportAlgo,
TrackAssociator, TrackAssociator,
...@@ -103,6 +103,7 @@ class Tesla(LHCbConfigurableUser): ...@@ -103,6 +103,7 @@ class Tesla(LHCbConfigurableUser):
, 'EnableLineChecker' : True # Enable the comparison of lines in the DecReports and the input to TeslaReportsAlgo , 'EnableLineChecker' : True # Enable the comparison of lines in the DecReports and the input to TeslaReportsAlgo
, 'IgnoredLines' : [ ] # Regexes for lines excluded from the comparison of DecReports and input to TeslaReportsAlgo , 'IgnoredLines' : [ ] # Regexes for lines excluded from the comparison of DecReports and input to TeslaReportsAlgo
, 'FilterMC' : False # Save a subset of the input MC particles and vertices under `Tesla.base, mimicking a microDST writer` , 'FilterMC' : False # Save a subset of the input MC particles and vertices under `Tesla.base, mimicking a microDST writer`
, 'ILinePersistenceSvc' : "TCKLinePersistenceSvc" # Implementation of the ILinePersistenceSvc to use (for >= 2017 data types)
} }
_propertyDocDct ={ _propertyDocDct ={
"EvtMax" : "Maximum number of events to process, default all" "EvtMax" : "Maximum number of events to process, default all"
...@@ -147,6 +148,7 @@ class Tesla(LHCbConfigurableUser): ...@@ -147,6 +148,7 @@ class Tesla(LHCbConfigurableUser):
, 'EnableLineChecker' : 'Enable the comparison of lines in the DecReports and the input to TeslaReportsAlgo' , 'EnableLineChecker' : 'Enable the comparison of lines in the DecReports and the input to TeslaReportsAlgo'
, 'IgnoredLines' : 'Regexes for lines excluded from the comparison of DecReports and input to TeslaReportsAlgo' , 'IgnoredLines' : 'Regexes for lines excluded from the comparison of DecReports and input to TeslaReportsAlgo'
, 'FilterMC' : "Save a subset of the input MC particles and vertices under `Tesla.base`, mimicking a microDST writer" , 'FilterMC' : "Save a subset of the input MC particles and vertices under `Tesla.base`, mimicking a microDST writer"
, 'ILinePersistenceSvc' : "Implementation of the ILinePersistenceSvc to use (for >= 2017 data types)"
} }
...@@ -813,29 +815,33 @@ class Tesla(LHCbConfigurableUser): ...@@ -813,29 +815,33 @@ class Tesla(LHCbConfigurableUser):
# No need to clone if the output prefix is empty (everything stays # No need to clone if the output prefix is empty (everything stays
# under /Event/Turbo) # under /Event/Turbo)
# XXX change this to the TCK svc once finished debugging
persistence_svc = HltLinePersistenceSvc()
container_cloner = CopyLinePersistenceLocations(
namer('CopyLinePersistenceLocations'),
OutputPrefix=output_prefix,
LinesToCopy=decisions,
ILinePersistenceSvc=persistence_svc.getFullName()
)
p2pv_cloner = CopyParticle2PVRelationsFromLinePersistenceLocations(
namer('CopyP2PVRelationsFromLinePersistenceLocations'),
OutputPrefix=output_prefix,
LinesToCopy=decisions,
ILinePersistenceSvc=persistence_svc.getFullName()
)
copy_line_outputs_seq = GaudiSequencer(
namer('TeslaCopyLineOutputsSequence'),
Members=[
container_cloner,
p2pv_cloner
],
IgnoreFilterPassed=True
)
if output_prefix: if output_prefix:
persistence_svc = self.getProp('ILinePersistenceSvc')
ApplicationMgr().ExtSvc.append(persistence_svc)
# Tell the persistence service to map any packed locations it knows
# about to unpacked locations, as it is the unpacked locations we
# want to copy to stream-specific locations
TCKLinePersistenceSvc().ContainerMap = packing.packedToOutputLocationMap()
container_cloner = CopyLinePersistenceLocations(
namer('CopyLinePersistenceLocations'),
OutputPrefix=output_prefix,
LinesToCopy=decisions,
ILinePersistenceSvc=persistence_svc
)
p2pv_cloner = CopyParticle2PVRelationsFromLinePersistenceLocations(
namer('CopyP2PVRelationsFromLinePersistenceLocations'),
OutputPrefix=output_prefix,
LinesToCopy=decisions,
ILinePersistenceSvc=persistence_svc
)
copy_line_outputs_seq = GaudiSequencer(
namer('TeslaCopyLineOutputsSequence'),
Members=[
container_cloner,
p2pv_cloner
],
IgnoreFilterPassed=True
)
stream_seq.Members.append(copy_line_outputs_seq) stream_seq.Members.append(copy_line_outputs_seq)
tes_root = '/Event' tes_root = '/Event'
......
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