7 from argparse
import ArgumentParser
8 parser = ArgumentParser(description=
'Parser for IDPVM configuration')
9 parser.add_argument(
"--filesInput", required=
True)
10 parser.add_argument(
"--maxEvents", help=
"Limit number of events. Default: all input events", default=-1, type=int)
11 parser.add_argument(
"--skipEvents", help=
"Skip this number of events. Default: no events are skipped", default=0, type=int)
12 parser.add_argument(
"--outputFile", help=
"Name of output file", default=
"ZdcNtuple.outputs.root", type=str)
13 return parser.parse_args()
18 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
21 flags.Input.Files = []
22 for path
in MyArgs.filesInput.split(
','):
23 flags.Input.Files += glob(path)
25 flags.Exec.SkipEvents = MyArgs.skipEvents
26 flags.Exec.MaxEvents = MyArgs.maxEvents
28 flags.Trigger.triggerConfig=
"DB"
32 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
34 from AthenaPoolCnvSvc.PoolReadConfig
import PoolReadCfg
37 from ZdcNtuple.ZdcNtupleConfig
import ZdcNtupleCfg
39 zdcConfig =
"LHCf2022",
47 enableOutputTree =
True,
48 enableOutputSamples =
False,
51 enableClusters =
True,
52 writeOnlyTriggers =
True))
54 from AthenaConfiguration.ComponentFactory
import CompFactory
55 acc.addService(CompFactory.THistSvc(
56 Output = [
"ANALYSIS DATAFILE='%s' OPT='RECREATE'" % MyArgs.outputFile]))
58 acc.printConfig(withDetails=
True)
65 sys.exit(
not sc.isSuccess())