ATLAS Offline Software
Functions | Variables
python.scripts.check_file Namespace Reference

Functions

def main (args)
 

Variables

 __doc__
 
 __author__
 
 name
 
 nargs
 
 help
 
 action
 
 default
 
 choices
 

Function Documentation

◆ main()

def python.scripts.check_file.main (   args)
read a POOL file and dump its content.

Definition at line 40 of file check_file.py.

40 def main(args):
41  """read a POOL file and dump its content.
42  """
43  files = args.files
44  if isinstance(files, str):
45  files=[files]
46 
47  import sys
48  import os
49 
50  for i,f in enumerate(files):
51  files[i] = os.path.expandvars(os.path.expanduser(f))
52 
53  exitcode = 0
54  for fname in files:
55  try:
56  import PyUtils.PoolFile as PF
57  PF.PoolOpts.FAST_MODE = args.fast
58  pool_file = PF.PoolFile(fname)
59  pool_file.checkFile(sorting=args.sort_fct)
60  if args.detailed_dump:
61  dump_file = os.path.basename(fname) + '.txt'
62  print ("## dumping details into [%s]" % (dump_file,))
63  pool_file.detailedDump(dump_file)
64  if args.output:
65  oname = args.output
66  print ("## saving report into [%s]..." % (oname,))
67  pool_file.saveReport(oname)
68  except Exception as e:
69  print ("## Caught exception [%s] !!" % str(e.__class__))
70  print ("## What:",e)
71  print (sys.exc_info()[0])
72  print (sys.exc_info()[1])
73  import traceback
74  traceback.print_exc()
75  exitcode = 1
76  pass
77 
78  if len(files) > 1:
79  print ("")
80  pass # loop over fileNames
81 
82  print ("## Bye.")
83  return exitcode
84 

Variable Documentation

◆ __author__

python.scripts.check_file.__author__
private

Definition at line 9 of file check_file.py.

◆ __doc__

python.scripts.check_file.__doc__
private

Definition at line 8 of file check_file.py.

◆ action

python.scripts.check_file.action

Definition at line 19 of file check_file.py.

◆ choices

python.scripts.check_file.choices

Definition at line 24 of file check_file.py.

◆ default

python.scripts.check_file.default

Definition at line 20 of file check_file.py.

◆ help

python.scripts.check_file.help

Definition at line 17 of file check_file.py.

◆ name

python.scripts.check_file.name

Definition at line 15 of file check_file.py.

◆ nargs

python.scripts.check_file.nargs

Definition at line 16 of file check_file.py.

python.scripts.check_file.main
def main(args)
Definition: check_file.py:40
str
Definition: BTagTrackIpAccessor.cxx:11