ATLAS Offline Software
sendEI_SPB.py
Go to the documentation of this file.
1 #!/bin/env python
2 
3 # Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
4 
5 import logging
6 import sys
7 
8 from EventIndexProducer.sendEI_SPB_Lib import eimrun
9 from EventIndexProducer.sendEI_SPB_Lib import options as eioptions
10 
11 
12 def main():
13 
14  # logger
15  logger = logging.getLogger('sendEI_SPB.py')
16  global log
17  log = logger
18 
19  # analyze options
20  opt = eioptions(sys.argv[1:])
21 
22  if opt.verbose > 0:
23  logger.setLevel(logging.INFO)
24 
25  if opt.debug > 0:
26  logger.setLevel(logging.DEBUG)
27 
28  eimrun(logger, opt)
29 
30 
31 if __name__ == '__main__':
32 
33  # logger setup
34  root = logging.getLogger()
35  ch = logging.StreamHandler(sys.stdout)
36  ch.setLevel(logging.DEBUG)
37  # formatter = logging.Formatter('%(asctime)s - %(name)s - '
38  # '%(levelname)s - %(message)s')
39  formatter = logging.Formatter('%(name)-15s %(levelname)9s %(message)s')
40  ch.setFormatter(formatter)
41  root.addHandler(ch)
42 
43  main()
sendEI_SPB.main
def main()
Definition: sendEI_SPB.py:12
python.sendEI_SPB_Lib.eimrun
def eimrun(logger, opt)
Definition: sendEI_SPB_Lib.py:365