7from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
8from AthenaConfiguration.ComponentFactory
import CompFactory
9from AthenaConfiguration.ComponentFactory
import isComponentAccumulatorCfg
10from AthenaConfiguration.MainServicesConfig
import addMainSequences
11from AthenaCommon.Logging
import logging
13from TrigCommon
import AthHLT
14from TrigPSC
import PscConfig
15from TrigServices.TriggerUnixStandardSetup
import commonServicesCfg
20log = logging.getLogger(
"athenaHLT")
23if not isComponentAccumulatorCfg():
24 raise RuntimeError(
"isComponentAccumulatorCfg()==False but trying to run in CA mode")
27if __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)
49from TrigPSC.PscDefaultFlags
import defaultOnlineFlags
50flags = defaultOnlineFlags()
56locked_flags = flags.clone()
60cfg = ComponentAccumulator(CompFactory.AthSequencer(
"AthMasterSeq",Sequential=
True))
61cfg.setAppProperty(
'ExtSvcCreates',
False)
62cfg.setAppProperty(
"MessageSvcType", PscConfig.optmap[
"MESSAGESVCTYPE"])
63cfg.setAppProperty(
"JobOptionsSvcType", PscConfig.optmap[
"JOBOPTIONSSVCTYPE"])
65addMainSequences(locked_flags, cfg)
66cfg.merge( commonServicesCfg(locked_flags) )
69cfg.merge( AthHLT.getCACfg(PscConfig.optmap[
"JOBOPTIONSPATH"])(flags) )
75fname =
"HLTJobOptions"
76with open(f
"{fname}.pkl",
"wb")
as f:
79from TrigConfIO.JsonUtils
import create_joboptions_json
80create_joboptions_json(f
"{fname}.pkl", f
"{fname}.json")
83if PscConfig.exitAfterDump:
84 log.info(
"Configuration dumped to %s.json Exiting...", fname)
87AthHLT.reload_from_json(f
"{fname}.json",
88 suppress_args = PscConfig.unparsedArguments)
void print(char *figname, TCanvas *c1)
execCommands(cmds, stage)