forked from cms-sw/cmssw
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request cms-sw#21 from CMSEdge/dev-marc
Dev marc
- Loading branch information
Showing
68 changed files
with
4,488 additions
and
753 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#! /usr/bin/env python | ||
|
||
import os | ||
import sys | ||
import re | ||
import optparse | ||
|
||
def main(): | ||
usage = '''usage: %prog --prefix DMS scalar.txt''' | ||
parser = optparse.OptionParser(usage=usage) | ||
|
||
parser.add_option('-p', '--prefix', action='store', dest='prefix', help='the prefix to be added to the component name' , default='DMS') | ||
parser.add_option('-n', '--compname', action='store', dest='compname', help='the name of the group of signals' , default='SM_Scalars') | ||
(opt, args) = parser.parse_args() | ||
|
||
if len(args) != 1: | ||
print usage | ||
sys.exit(1) | ||
inputlist = args[0] | ||
|
||
inputListfile=open(inputlist) | ||
inputdatasets = inputListfile.readlines() | ||
|
||
components = [] | ||
for line in inputdatasets: | ||
dataset = line.rstrip('\n') | ||
matchObj = re.match( r'.*_M(.*)_13TeV.*/(.*)/MINIAODSIM', dataset ) | ||
pdname = (opt.prefix+"_M"+matchObj.group(1)).replace("-","_") | ||
|
||
compKreatorLine = pdname + " = kreator.makeMCComponent(\"" + pdname + "\",\"" + dataset + "\", \"CMS\", \".*root\", 1.0, useAAA=True)" | ||
print compKreatorLine | ||
|
||
components.append(pdname) | ||
|
||
print "\n" | ||
print opt.compname + " = [ " + ", ".join(components) + " ]\n" | ||
|
||
|
||
if __name__ == "__main__": | ||
main() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.