Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • rrabadan/LHCb
  • talin/LHCb
  • imjelde/LHCb
  • mstahl/LHCb
  • padeken/LHCb
  • mimazure/LHCb
  • roiser/LHCb
  • conrad/LHCb
  • kklimasz/LHCb
  • rcurrie/LHCb
  • wkrzemie/LHCb
  • fkeizer/LHCb
  • valassi/LHCb
  • hschrein/LHCb
  • anstahll/LHCb
  • jonrob/LHCb
  • graven/LHCb
  • clemenci/LHCb
  • chaen/LHCb
  • sstahl/LHCb
  • lhcb/LHCb
21 results
Show changes
Commits on Source (7)
......@@ -36,7 +36,7 @@
|-python_logging_level = 20 (default: 20)
|-require_specific_decoding_keys = [] (default: [])
|-scheduler_legacy_mode = True (default: True)
|-simulation = True (default: True)
|-simulation = True (default: None)
|-use_iosvc = False (default: False)
| (default: '')
|-write_decoding_keys_to_git = True (default: True)
......
......@@ -8,8 +8,8 @@
# granted to it by virtue of its status as an Intergovernmental Organization #
# or submit itself to any jurisdiction. #
###############################################################################
__all__ = ("ProcessTypes", "InputProcessTypes", "DataTypeEnum", "FileFormats",
"EventStores", "Options", "main")
__all__ = ("InputProcessTypes", "DataTypeEnum", "FileFormats", "EventStores",
"Options", "main")
import os
import sys
......@@ -17,7 +17,7 @@ import sys
import click
from .configurables import config2opts, do_export
from .options import ProcessTypes, InputProcessTypes, DataTypeEnum, FileFormats, EventStores, Options
from .options import InputProcessTypes, DataTypeEnum, FileFormats, EventStores, Options
def main(function,
......
......@@ -31,26 +31,20 @@ from DDDB.CheckDD4Hep import UseDD4Hep
class InputProcessTypes(str, Enum):
"""
`Turbo`, `Hlt2` and `Spruce` are standard run-3 input process types.
`TurboPass`, `Hlt2` and `Spruce` are standard run-3 input process types.
The extra types are available to effectively flag special input types
and be able to apply a filter only to processes where a `DstData` bank is produced (the standard 3 types).
See discussions at https://gitlab.cern.ch/lhcb/LHCb/-/merge_requests/3990 and related MR for further details.
"""
Turbo = "Turbo"
Hlt2 = "Hlt2"
Spruce = "Spruce"
TurboPass = "TurboPass"
Hlt2 = "Hlt2" #This option should be removed when all data goes through the Sprucing
Gen = "Gen"
Brunel = "Brunel" # This option should be removed once support for old MC files is fully removed.
Boole = "Boole"
Hlt1 = "Hlt1"
class ProcessTypes(str, Enum):
TurboPass = "TurboPass"
Hlt2 = "Hlt2"
Spruce = "Spruce"
class DataTypeEnum(Enum):
Upgrade = 'Upgrade'
......@@ -109,6 +103,7 @@ class Options(BaseModel):
first_evt: int = 0
# Use an alternative, faster IIOSvc implementation for MDFs.
use_iosvc: bool = False
input_process: Optional[InputProcessTypes] = None
"""Output"""
output_file: Optional[str] = None
output_type: FileFormats = FileFormats.ROOT
......@@ -144,6 +139,7 @@ class Options(BaseModel):
"""Debugging"""
# Dump monitoring entities (counters, histograms, etc.)
monitoring_file: Optional[str] = None
control_flow_file: Optional[str] = None
data_flow_file: Optional[str] = None
phoenix_filename: Optional[str] = None
......
......@@ -77,6 +77,7 @@ options.input_type = "NONE"
options.dddb_tag = "dummy"
options.conddb_tag = "dummy"
options.write_decoding_keys_to_git = False
options.simulation = False
config2 = configure_input(options)
config = configure(options, moore)
......@@ -75,6 +75,7 @@ options.monitoring_file = "monitoring.json"
options.input_type = "NONE"
options.dddb_tag = "dummy"
options.conddb_tag = "dummy"
options.simulation = False
config2 = configure_input(options)
config = configure(options, line1)
......@@ -22,6 +22,7 @@ options.evt_max = 10
options.input_type = "NONE"
options.dddb_tag = "dummy"
options.conddb_tag = "dummy"
options.simulation = False
# Enable the NameAuditor
options.auditors = ["NameAuditor"]
......
......@@ -35,6 +35,7 @@ from .components import setup_component, is_algorithm, force_location
from .control_flow import CompositeNode
from .dataflow import dataflow_config, ensure_event_prefix
from .tonic import configurable
from GaudiConf.LbExec import InputProcessTypes
from .Algorithms import (
createODIN,
......@@ -302,7 +303,7 @@ class ApplicationOptions(ConfigurableUser):
'conddb_tag': '',
'geometry_version': '',
'conditions_version': '',
'simulation': True,
'simulation': None,
# output related
'output_file': '',
'output_type': '',
......@@ -382,6 +383,12 @@ class ApplicationOptions(ConfigurableUser):
required.extend(["geometry_version", "conditions_version"]
if UseDD4Hep else ["dddb_tag", "conddb_tag"])
# Check simulation flag has been explicitly set
if not self.isPropertySet("simulation"):
raise ConfigurationError(
"Required option simulation must be set to True or False as appropriate"
)
if UseDD4Hep:
if not self.geometry_version and self.dddb_tag:
log.warning(
......@@ -1011,6 +1018,16 @@ def configure(options, control_flow_node, public_tools=[],
config.add(sink)
appMgr.ExtSvc += [sink]
# TODO: Remove use of getattr once ApplicationOptions is removed
if getattr(options, "input_process", None):
if options.input_process == InputProcessTypes.Hlt2:
fsr_sink = setup_component(
"LHCb__FSR__Sink",
instance_name="FileSummaryRecord",
AcceptRegex=r"^LumiCounter\.eventsByRun$")
config.add(fsr_sink)
appMgr.ExtSvc.append(fsr_sink)
# TODO: Remove use of getattr once ApplicationOptions is removed
if getattr(options, "xml_summary_file", None):
summary_svc = setup_component(
......
......@@ -27,11 +27,13 @@ def get_tes_root(*, input_process: InputProcessTypes):
"""
if input_process == InputProcessTypes.Spruce:
return '/Event/Spruce/HLT2'
elif input_process in [InputProcessTypes.Hlt2, InputProcessTypes.Turbo]:
elif input_process in [
InputProcessTypes.Hlt2, InputProcessTypes.TurboPass
]:
return '/Event/HLT2'
else:
raise NotImplementedError(
f"The specified 'input_process' {input_process} is not recognised. Can only be 'Hlt2' or 'Spruce' or 'Turbo'. Please check!"
f"The specified 'input_process' {input_process} is not recognised. Can only be 'Hlt2' or 'Spruce' or 'TurboPass'. Please check!"
)
......@@ -58,7 +60,7 @@ def upfront_decoder(*, input_process: InputProcessTypes, stream: str):
"""
from PyConf.Algorithms import HltPackedBufferDecoder
return HltPackedBufferDecoder(
SourceID=input_process.replace("Turbo", "Hlt2"),
SourceID=input_process.replace("TurboPass", "Hlt2"),
DecReports=default_raw_banks("HltDecReports", default_raw_event,
stream),
RawBanks=default_raw_banks("DstData", default_raw_event,
......
......@@ -17,5 +17,6 @@ from PyConf.Algorithms import (Gaudi__Examples__IntDataProducer as
cf = CompositeNode("top", children=[IntDataProducer()], force_order=True)
options = ApplicationOptions(_enabled=False)
options.simulation = False
config = configure(options, cf)