Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:23:25

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