Skip to content

Add TurboStream and StrippingStream properties

Michael Thomas Alexander requested to merge malexand-addstreamconfig into run2-patches

This helps in setting RootInTES correctly when running on Stripping or Turbo data, which is a constant headache, particularly for new students. It works well for me, so should be generally useful.

DataType, InputType and Simulation should be set by the user as usual, then set either TurboStream for Turbo data, or StrippingStream for stripping data. For Turbo, following the standard procedure it then effectively does

DaVinci().Turbo = True
DaVinci().InputType = "MDST"
if int(DaVinci().DataType) <= 2016 or DaVinci().getProp("Simulation"):
    DaVinci().RootInTES = '/Event/Turbo'
else:
    DaVinci().RootInTES = '/Event/' + DaVinci().TurboStream[0].upper() + DaVinci().TurboStream[1:].lower() + '/Turbo'

For Stripping, it does

DaVinci().Turbo = False
if DaVinci().getProp("InputType").upper() == "MDST":
    DaVinci().RootInTES = '/Event/' + DaVinci().StrippingStream
else:
    DaVinci().RootInTES = ''

It also gives a warning if the stream name isn't one of the known streams, and raises an exception if both StrippingStream and TurboStream are set. If neither are set, it does nothing.

If a user needs to set RootInTES for other configurables before the configuration step, they can use DaVinci().getRootInTES()

Edited by Michael Thomas Alexander

Merge request reports