diff --git a/Phys/DaVinci/python/DaVinci/Configuration.py b/Phys/DaVinci/python/DaVinci/Configuration.py index 90f08996477ff983af192847d924b0156b86f74d..8bbe535eb186a8449dc9158cfb59d8da337e2e52 100644 --- a/Phys/DaVinci/python/DaVinci/Configuration.py +++ b/Phys/DaVinci/python/DaVinci/Configuration.py @@ -171,6 +171,7 @@ class DaVinci(LHCbConfigurableUser) : if 'MDST' == self.getProp('InputType').upper() : if not self.getProp('RootInTES') : log.warning ('RootInTES is not specified for MDST input') + elif self.getProp('Simulation') and self.getProp('Turbo') : pass elif self.getProp('Simulation') and not self.getProp('RootInTES') in ( '/Event/AllStreams' , '/Event/AllStreams/' ) : log.warning ('RootInTES for MC-uDST ("%s") is not equal to "/Event/AllStreams"' % self.getProp('RootInTES') ) @@ -189,9 +190,34 @@ class DaVinci(LHCbConfigurableUser) : self.setOtherProps(AnalysisConf(),["DataType","Simulation","InputType","RootInTES"]) self.setOtherProps(DstConf(),["DataType","Turbo"]) self.setOtherProps(TrackSys(),["DataType"]) + + if self.getProp("Turbo"): + + data_type = self.getProp('DataType') + + if not self.isPropertySet("RootInTES") : + if self.getProp('Simulation') and '2015' == data_type : + self.setProp('RootInTES','/Event/Turbo') + else : + raise DaVinciConfigurationError ( "You must set DaVinci().RootInTES when DaVinci().Turbo is `True`") + + if self.getProp('Simulation') and '2015' == data_type : pass + elif 'MDST' != self.getProp('InputType') : + log.info ("Forcing `InputType` to `'MDST'` as `Turbo` is `True`") + self.setProp ( "InputType" , "MDST") + self.setOtherProps(TurboConf(), ["DataType","Simulation","RootInTES"]) + # These lines are here and not in TurboConf because different applications need to process Turbo data differently: + # Tesla has to do a bit of juggling to get the data from HLT2 to locations under a single RootInTES, whereas DaVinci doesn't. + if data_type == "2016": + # Enable the decoding of the persisted reconstruction objects + TurboConf().RunPackedDataDecoder = True + if data_type in ["2016", "2017", "2018"]: + # Enable the unpacking of the persisted reconstruction objects + TurboConf().RunPersistRecoUnpacking = True + def _analysisSeq(self) : return GaudiSequencer('DaVinciAnalysisSeq', IgnoreFilterPassed = True) @@ -405,20 +431,6 @@ class DaVinci(LHCbConfigurableUser) : if self.getProp("Simulation") : DstConf().setProp("SimType","Full") - if self.getProp("Turbo"): - log.debug("Forcing `InputType` to `'MDST'` as `Turbo` is `True`") - self.setProp("InputType", "MDST") - if not self.getProp("RootInTES"): - raise DaVinciConfigurationError(( - "You must set DaVinci().RootInTES when DaVinci().Turbo is `True`" - )) - if self.getProp("DataType") == "2016": - # Enable the decoding of the persisted reconstruction objects - TurboConf().RunPackedDataDecoder = True - if self.getProp("DataType") in ["2016", "2017", "2018"]: - # Enable the unpacking of the persisted reconstruction objects - TurboConf().RunPersistRecoUnpacking = True - return inputType ################################################################################