7 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
8 from AthenaConfiguration.ComponentFactory
import CompFactory
9 from AthenaConfiguration.ComponentFactory
import isComponentAccumulatorCfg
10 from AthenaConfiguration.MainServicesConfig
import addMainSequences
11 from AthenaCommon.Logging
import logging
13 from TrigCommon
import AthHLT
14 from TrigPSC
import PscConfig
15 from TrigServices.TriggerUnixStandardSetup
import commonServicesCfg
20 log = logging.getLogger(
"athenaHLT")
24 raise RuntimeError(
"isComponentAccumulatorCfg()==False but trying to run in CA mode")
27 if __name__ ==
"__main__":
29 print(
"Syntax: python %s module.cfgFnc" % os.path.basename(sys.argv[0]))
32 PscConfig.exitAfterDump =
True
33 PscConfig.optmap = {
"MESSAGESVCTYPE" :
"TrigMessageSvc",
34 "JOBOPTIONSSVCTYPE" :
"TrigConf::JobOptionSvc",
35 "JOBOPTIONSPATH" : sys.argv[1],
41 """Helper to execute a command string"""
44 log.info(
"Executing %scommand: %s", stage, cmds)
49 from TrigPSC.PscDefaultFlags
import defaultOnlineFlags
56 locked_flags = flags.clone()
61 cfg.setAppProperty(
'ExtSvcCreates',
False)
62 cfg.setAppProperty(
"MessageSvcType", PscConfig.optmap[
"MESSAGESVCTYPE"])
63 cfg.setAppProperty(
"JobOptionsSvcType", PscConfig.optmap[
"JOBOPTIONSSVCTYPE"])
69 cfg.merge( AthHLT.getCACfg(PscConfig.optmap[
"JOBOPTIONSPATH"])(flags) )
75 fname =
"HLTJobOptions"
76 with open(f
"{fname}.pkl",
"wb")
as f:
79 from TrigConfIO.JsonUtils
import create_joboptions_json
83 if PscConfig.exitAfterDump:
84 log.info(
"Configuration dumped to %s.json Exiting...", fname)
87 AthHLT.reload_from_json(f
"{fname}.json",
88 suppress_args = PscConfig.unparsedArguments)