ATLAS Offline Software
generator-weights.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 # Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 
4 from argparse import ArgumentParser
5 from PMGTools.WeightHelpers import weightNameCleanup, weightNameWithPrefix
6 print(dir(PMGTools.WeightHelpers))
7 parser = ArgumentParser(prog='generator-weights')
8 parser.add_argument('weights', metavar='weights', type=str, nargs="+",
9  help="specify the list of weights")
10 parser.add_argument('-p', '--prefixed', default=False, action="store_true",
11  help="add prefix to cleaned weights")
12 args = parser.parse_args()
13 
14 for weight in args.weights:
15  if args.prefixed:
17  else:
18  print(weightNameCleanup(weight))
PMGTools::weightNameCleanup
std::string weightNameCleanup(const std::string &name)
cleanup the weight name
Definition: WeightHelpers.cxx:18
PMGTools::weightNameWithPrefix
std::string weightNameWithPrefix(const std::string &name)
cleanup the weight name and add prefix
Definition: WeightHelpers.cxx:72
beamspotman.dir
string dir
Definition: beamspotman.py:621
print
void print(char *figname, TCanvas *c1)
Definition: TRTCalib_StrawStatusPlots.cxx:25