ATLAS Offline Software
validateMioctEncodingFileDTD.py
Go to the documentation of this file.
1 #!/bin/env python
2 
3 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
4 
5 import sys,os
6 
7 def main():
8 
9  if len(sys.argv)<=1:
10  print("Usage:\n%s TestGeomety.xml" % sys.argv[0])
11  return 1
12 
13  xmlfile = sys.argv[1]
14 
15  checkResult = os.system("get_files -xmls -symlink MUCTPIGeometry.dtd")
16  if checkResult != 0:
17  print("ERROR Could not find MUCTPIGeometry.dtd in $DATAPATH")
18  return 1
19 
20  checkResult = os.system("xmllint --noout --dtdvalid MUCTPIGeometry.dtd %s" % xmlfile)
21  if checkResult == 0:
22  print("XML file %s is conform with MUCTPIGeometry.dtd" % xmlfile)
23  else:
24  print("ERROR the XML does not follow the document type definition MUCTPIGeometry.dtd")
25  return 1
26 
27  return 0
28 
29 if __name__=="__main__":
30  sys.exit(main())
validateMioctEncodingFileDTD.main
def main()
Definition: validateMioctEncodingFileDTD.py:7
Muon::print
std::string print(const MuPatSegment &)
Definition: MuonTrackSteering.cxx:28