CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
o2oRun.py
Go to the documentation of this file.
1 #!/usr/bin/env python3
2 '''
3 '''
4 
5 __author__ = 'Giacomo Govi'
6 
7 import sys
8 import os
9 
10 import CondCore.Utilities.o2olib as o2olib
11 import optparse
12 import argparse
13 
14 def main( argv ):
15 
16  parser = argparse.ArgumentParser()
17  parser.add_argument("executable", type=str, help="wrapper for O2O jobs")
18  parser.add_argument("-n","--name", type=str, help="the O2O job name" )
19  parser.add_argument("--db", type=str, help="the target database: pro ( for prod ) or dev ( for prep ). default=pro")
20  parser.add_argument("-a","--auth", type=str, help="path of the authentication file")
21  parser.add_argument("-v","--verbose", action="count", help="job output mirrored to screen (default=logfile only)")
22  args = parser.parse_args()
23 
24  tool = o2olib.O2OTool()
25  tool.setup(args)
26  return tool.run()
27 
28 if __name__ == '__main__':
29  sys.exit(main(sys.argv))
def main
Definition: o2oRun.py:14
Definition: main.py:1