ATLAS Offline Software
Functions
TriggerMenuXML2JSONConverter Namespace Reference

Functions

def main ()
 

Function Documentation

◆ main()

def TriggerMenuXML2JSONConverter.main ( )

Definition at line 6 of file TriggerMenuXML2JSONConverter.py.

6 def main():
7  if len(sys.argv)<=1:
8  print("please use this format:")
9  print("%s inputfile.xml [outputfile.json] ... menu file conversion" % sys.argv[0].rsplit('/')[-1])
10  print("%s inputfile.json ... json conformity check of any json file" % sys.argv[0].rsplit('/')[-1])
11  return 1
12 
13  inputfile = sys.argv[1]
14  outputfile = sys.argv[2] if len(sys.argv)>2 else None
15 
16  from TrigConfIO.MenuXML2JSONConverter import XML2JsonConverter
17  converter = XML2JsonConverter()
18 
19  if inputfile.endswith(".xml"):
20  converter.convertFile( inputfile, outputfile )
21  elif inputfile.endswith(".json"):
22  converter.checkJsonConformity( inputfile )
23 
TriggerMenuXML2JSONConverter.main
def main()
Definition: TriggerMenuXML2JSONConverter.py:6
print
void print(char *figname, TCanvas *c1)
Definition: TRTCalib_StrawStatusPlots.cxx:25