11 from argparse
import ArgumentParser
12 parser = ArgumentParser(description=
'Parser for IDPVM configuration')
13 parser.add_argument(
"--filesInput", required=
True)
14 parser.add_argument(
"--maxEvents", help=
"Maximum number of events to process", default=-1, type=int)
15 parser.add_argument(
"--skipEvents", help=
"Skip this number of events. Default: no events are skipped", default=0, type=int)
16 parser.add_argument(
"--outputFile", help=
"Name of output file", default=
"ZdcNtuple.outputs.root", type=str)
17 return parser.parse_args()
22from AthenaConfiguration.AllConfigFlags
import initConfigFlags
23flags = initConfigFlags()
27for path
in MyArgs.filesInput.split(
','):
28 flags.Input.Files += glob(path)
30flags.Exec.SkipEvents = MyArgs.skipEvents
31flags.Exec.MaxEvents = MyArgs.maxEvents
32flags.Trigger.triggerConfig=
"DB"
36from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
37acc = MainServicesCfg(flags)
38from AthenaPoolCnvSvc.PoolReadConfig
import PoolReadCfg
39acc.merge(PoolReadCfg(flags))
41from ZdcNtuple.ZdcNtupleConfig
import ZdcNtupleCfg
42acc.merge(ZdcNtupleCfg(flags, name =
"AnalysisAlg",
43 zdcConfig =
"OONeNe2025",
51 grlFilename =
"$ROOTCOREBIN/data/data25_hi.OxygenOxygen_DetStatus-v137-pro49-01_MERGED_PHYS_HeavyIonP_All_Good_IgnoreBSPOT_INVALID.xml",
56 enableOutputTree =
True,
57 enableOutputSamples =
True,
62 enableClusters =
True,
64 writeOnlyTriggers =
True))
66from AthenaConfiguration.ComponentFactory
import CompFactory
67acc.addService(CompFactory.THistSvc(
68 Output = [
"ANALYSIS DATAFILE='%s' OPT='RECREATE'" % MyArgs.outputFile]))
70acc.printConfig(withDetails=
True)
72acc.foreach_component(
"*Zdc*").OutputLevel=DEBUG
79sys.exit(
not sc.isSuccess())