ATLAS Offline Software
Functions | Variables
acmd Namespace Reference

Functions

def main ()
 

Variables

 __author__
 
 __doc__
 

Function Documentation

◆ main()

def acmd.main ( )

Definition at line 15 of file acmd.py.

15 def main():
16  import PyUtils.scripts # noqa: F401 (register all plugins)
17  import PyUtils.Logging as L
18  msg = L.logging.getLogger('Acmd')
19  msg.setLevel(L.logging.INFO)
20 
21  # To avoid loading all plugins every time, first try to find
22  # a specific plugin that matches the first N arguments:
23  cmd = None
24  for i in range(1,len(sys.argv)):
25  cmd_name = '.'.join(sys.argv[1:i+1])
26  if acmdlib.Plugins.exists(cmd_name):
27  cmd = acmdlib.Plugins.load(cmd_name)
28  break
29 
30  # Otherwise load all plugins and leave the rest to the parser:
31  if cmd is None:
32  acmdlib.Plugins.loadAll()
33 
34  parser = acmdlib.ACMD_PARSER
35  args = parser.parse_args()
36 
37  exitcode = 1
38  try:
39  exitcode = cmd.main(args)
40  except Exception:
41  exitcode = 1
42  print(sys.exc_info()[0])
43  print(sys.exc_info()[1])
44  raise
45 
46  return exitcode
47 
48 

Variable Documentation

◆ __author__

acmd.__author__
private

Definition at line 9 of file acmd.py.

◆ __doc__

acmd.__doc__
private

Definition at line 10 of file acmd.py.

plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10
Muon::print
std::string print(const MuPatSegment &)
Definition: MuonTrackSteering.cxx:28
acmd.main
def main()
Definition: acmd.py:15