diff --git a/Phys/DaVinci/python/DaVinci/Configuration.py b/Phys/DaVinci/python/DaVinci/Configuration.py index 90f08996477ff983af192847d924b0156b86f74d..9186379fba1cf8458643b878c8e469b9bef86bb3 100644 --- a/Phys/DaVinci/python/DaVinci/Configuration.py +++ b/Phys/DaVinci/python/DaVinci/Configuration.py @@ -189,9 +189,33 @@ 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"]) + ## why these lines are here and not in TurboConf ??? + 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,19 +429,27 @@ 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 + ## if self.getProp("Turbo"): + + ## data_type = self.getProp('DataType') + + ## ##if not self.isPropertySet("RootInTES") : + ## ## if not self.getProp("RootInTES"): + ## ## 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") + + ## 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 return inputType