Skip to content
Snippets Groups Projects

updates from online alignment stack

Merged Flo Reiss requested to merge alig_calib_online into master
Files
18
@@ -17,9 +17,12 @@ from Configurables import HLTControlFlowMgr, EventLoopMgr
from pathlib import Path
from MooreOnlineConf.utils import (
alignment_options,
ensure_output_dir,
distribute_files,
)
from Configurables import Gaudi__Histograming__Sink__Root
from Configurables import HistogramPersistencySvc
from Configurables import AlignAlgorithm
from Configurables import LHCb__Det__LbDD4hep__DD4hepSvc as DD4hepSvc
application = GaudiOnline.Passthrough(
outputLevel=OnlineEnv.OutputLevel,
@@ -30,8 +33,6 @@ application.setup_fifolog()
online_options = alignment_options(OnlineEnv)
ensure_output_dir(online_options.analyzer_output_path, online_options.tag)
ensure_output_dir(online_options.iterator_output_path, online_options.tag)
print(f"Will write analyzer output to {online_options.analyzer_output_path}")
if OnlineEnv.PartitionName == "LHCbA":
@@ -62,12 +63,9 @@ except KeyError:
derivfile = online_options.analyzer_output_path / f"derivatives-{worker_id}.out"
histofile = online_options.analyzer_output_path / f"histograms-{worker_id}.root"
print(f"analyzer node input files {input_files}")
input_files = [str(f) for f in input_files]
from Configurables import Gaudi__Histograming__Sink__Root
from Configurables import HistogramPersistencySvc
from Configurables import AlignAlgorithm
from Configurables import LHCb__Det__LbDD4hep__DD4hepSvc as DD4hepSvc
Gaudi__Histograming__Sink__Root(
"Gaudi__Histograming__Sink__Root").FileName = str(
histofile.with_stem(histofile.stem + "_new"))
@@ -75,21 +73,14 @@ HistogramPersistencySvc().OutputFile = str(histofile)
AlignAlgorithm().OutputDataFile = str(derivfile)
AlignAlgorithm().OnlineOverlayPath = str(
online_options.iterator_output_path / "OverlayRoot")
print("iterator path", online_options.iterator_output_path)
DD4hepSvc().UseConditionsOverlay = True
#DD4hepSvc().ConditionsOverlayInitPath = str(
# online_options.iterator_output_path / "OverlayRoot")
#print("overlay dir:", DD4hepSvc().ConditionsOverlayInitPath)
# input_files = ['/scratch/rmatev/aligninputfiles/00146082_00000001_1.mdf']
# input_files = ['/scratch/rmatev/aligninputfiles2/Minbias_MagDown_Boole_lhcbhead3379_dddb-20220705_sim-20220705-vc-md100_lumi0.mdf']
application.setup_file_access(input_files)
# application.setup_hive(FlowManager("EventLoop"), 40) <- simple event loop
flow = AlgFlowManager("EventLoop")
application.app.EventLoop = flow
# application.setup_hive(flow, 44)
# HACK: transfer options from HLTControlFlowMgr
cfm = HLTControlFlowMgr('HLTControlFlowMgr')
@@ -109,7 +100,12 @@ application.config.FILE_maxEventsIn = 5000
application.app.Runable = DummyRunable()
application.app.TopAlg.insert(0, application.updateAndReset)
application.app.EvtSel = 'NONE'
application.app.EvtMax = -1
application.app.EvtMax = 1000
application.app.StopOnSignal = False # = default
application.app.StalledEventMonitoring = False # = default
# TODO: add back once ResettingSink is merged
# from Configurables import LHCb__Alignment__ResettingSink as ResettingSink
# resettingSink = ResettingSink()
# application.app.ExtSvc.append(resettingSink)
# print("ExtSvc", application.app.ExtSvc)
EventLoopMgr().Warnings = False
Loading