Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-11-27 03:17:55

0001 #!/usr/bin/env python
0002 
0003 import sys
0004 
0005 def main():
0006   if len(sys.argv) < 2:
0007     print("Usage: %s mode" % sys.argv[0])
0008     return
0009 
0010   mode = int(sys.argv[1])
0011 
0012   if mode > 15:
0013     raise Exception("mode must be 0-15")
0014 
0015   printme = []
0016   if (mode & 8):  printme.append("1")
0017   if (mode & 4):  printme.append("2")
0018   if (mode & 2):  printme.append("3")
0019   if (mode & 1):  printme.append("4")
0020   printme = "-".join(printme)
0021 
0022   print("{0:s}".format(printme))
0023   return
0024 
0025 
0026 # ______________________________________________________________________________
0027 if __name__ == '__main__':
0028 
0029   main()