11 """ stores the additional information of the alignment_merge.py file
30 "process.AlignmentProducer.ParameterBuilder.SelectorTwoBowed = cms.PSet(": [self.
selector[2], self.
selectorTag[2], self.
selectorThird[2],
"SelectorTwoBowed"]
34 logger = logging.getLogger(
"mpsvalidate")
38 with open(path)
as inputFile:
39 mergeFile = inputFile.readlines()
41 logger.error(
"AdditionalData: {0} does not exist".
format(path))
47 for index, line
in enumerate(mergeFile):
53 for lineNumber
in range(index + 2, index + 8):
54 mergeFile[lineNumber] = mergeFile[lineNumber].
split(
"#", 1)[0]
56 if (
")" in mergeFile[lineNumber]):
59 mergeFile[lineNumber].
replace(
"\"",
"'").strip(
"', \n").
split(
","))
61 if (len(self.
pattern[string][0][-1]) > 2):
65 if (
"'" not in line.replace(
"\"",
"'")):
66 for tag
in self.
pattern[string][1]:
70 for lineNumber
in range(index + 1, index + 5):
72 if (
"process" in mergeFile[lineNumber]
or "\n" == mergeFile[lineNumber]):
75 if (
any(x
in mergeFile[lineNumber]
for x
in self.
pattern[string][1])):
78 except Exception
as e:
79 logging.error(
"Selector Parsing error")
82 if (
"process.AlignmentProducer.algoConfig.pedeSteerer.method" in line
and "#" not in line):
85 except Exception
as e:
86 logger.error(
"AdditionalParser: pedeSteererMethod not found - {0}".
format(e))
89 if (
"process.AlignmentProducer.algoConfig.pedeSteerer.options" in line
and "#" not in line):
90 for lineNumber
in range(index + 1, index + 15):
91 if (lineNumber<len(mergeFile)):
92 if (
"]" in mergeFile[lineNumber]):
94 self.pedeSteererOptions.append(
95 mergeFile[lineNumber].
replace(
"\"",
"'").strip(
"', \n"))
98 if (
"process.AlignmentProducer.algoConfig.pedeSteerer.pedeCommand" in line
and "#" not in line):
101 except Exception
as e:
102 logger.error(
"AdditionalParser: pedeSteererCommand not found - {0}".
format(e))
bool any(const std::vector< T > &v, const T &what)
boost::dynamic_bitset append(const boost::dynamic_bitset<> &bs1, const boost::dynamic_bitset<> &bs2)
this method takes two bitsets bs1 and bs2 and returns result of bs2 appended to the end of bs1 ...