Warning, /FWCore/Skeletons/scripts/mkdqmedanalyzer is written in an unsupported language. File is not indexed.
0001 #!/usr/bin/env python3
0002 #-*- coding: utf-8 -*-
0003 #pylint: disable-msg=
0004 """
0005 File : mkdqmedanlzr
0006 Author : Marco Rovere
0007 Description: mkdqmedanlzr code
0008 """
0009
0010 # system modules
0011 import sys
0012 import argparse
0013
0014 if sys.version_info < (2, 6):
0015 raise Exception("This script requires python 2.6 or greater")
0016
0017 # package modules
0018 from FWCore.Skeletons.cms import generate, config_with_parser
0019
0020 def pkg_help():
0021 "mkdqmedanlzr help function"
0022 msg = '\nmkdqmedanlzr script to generate CMS DQMEDAnalyzer code'
0023 msg += '\nOutput : '
0024 msg += """
0025 MyAnalyzer/
0026 | plugins/
0027 | |-- BuildFile.xml
0028 | |-- MyAnalyzer.cc
0029 | python/
0030 | |-- ExampleConfig_cfg.py
0031 | test/
0032 | doc/
0033 """
0034 return msg
0035
0036 if __name__ == '__main__':
0037 parser = argparse.ArgumentParser(description=pkg_help(), formatter_class=argparse.RawTextHelpFormatter)
0038 parser.add_argument('-author', '--author', help="Author of the package")
0039 parser.add_argument('-debug', '--debug', help="Enable debugging", action='store_true', default=False)
0040 parser.add_argument('subpackage_name', help="Subpackage's name that will host the newly created code")
0041 parser.add_argument('example', help="Kind of DQM Module to generate", choices=['example_stream', 'example_global'])
0042 args = parser.parse_args()
0043 generate(config_with_parser('DQMEDAnalyzer', args))