8 import configparser
as ConfigParser
12 from Alignment.MillePedeAlignmentAlgorithm.alignmentsetup.helper \
13 import checked_out_MPS
17 """ stores the config data of the ini files or the console parameters 22 self.
mpspath = os.path.join(os.environ[
"CMSSW_BASE"]
24 else os.environ[
"CMSSW_RELEASE_BASE"],
"src",
25 "Alignment",
"MillePedeAlignmentAlgorithm")
95 logger = logging.getLogger(
"mpsvalidate")
98 parser = ConfigParser.ConfigParser()
101 if (parser.read(path) == []):
102 logger.error(
"Could not open ini-file: {0}".
format(path))
106 self.
jobNumber = parser.getint(
"GENERAL",
"job")
107 except (ConfigParser.NoSectionError, ConfigParser.NoOptionError):
111 self.
jobDataPath = parser.get(
"GENERAL",
"jobdatapath")
112 except (ConfigParser.NoSectionError, ConfigParser.NoOptionError):
129 if parser.get(
"GENERAL",
"outputpath"):
130 self.
outputPath = parser.get(
"GENERAL",
"outputpath")
131 except (ConfigParser.NoSectionError, ConfigParser.NoOptionError):
137 self.
jobTime = parser.getint(
"GENERAL",
"time")
138 except (ConfigParser.NoSectionError, ConfigParser.NoOptionError):
142 self.
latexfile = parser.get(
"GENERAL",
"latexfile")
143 except (ConfigParser.NoSectionError, ConfigParser.NoOptionError):
147 self.
limit = parser.get(
"GENERAL",
"limit")
151 except (ConfigParser.NoSectionError, ConfigParser.NoOptionError):
155 self.
statboxsize = parser.getfloat(
"GENERAL",
"statboxsize")
156 except (ConfigParser.NoSectionError, ConfigParser.NoOptionError):
163 for par
in (
"numberofbins",
"defpeak",
"widthstddev"):
165 setattr(self, par, parser.getint(
"MODULEPLOTS", par))
166 except (ConfigParser.NoSectionError, ConfigParser.NoOptionError):
171 self.
samerange = parser.getboolean(
"MODULEPLOTS",
"samerange")
172 except (ConfigParser.NoSectionError, ConfigParser.NoOptionError):
177 self.
rangemode = parser.get(
"MODULEPLOTS",
"rangemode")
178 except (ConfigParser.NoSectionError, ConfigParser.NoOptionError):
182 for r
in (
"rangexyz",
"rangerot",
"rangedist"):
184 setattr(self, r+
"M", parser.get(
"MODULEPLOTS", r))
187 except (ConfigParser.NoSectionError, ConfigParser.NoOptionError):
195 self.
samerangeHL = parser.getboolean(
"HIGHLEVELPLOTS",
"samerange")
196 except (ConfigParser.NoSectionError, ConfigParser.NoOptionError):
201 self.
rangemodeHL = parser.get(
"HIGHLEVELPLOTS",
"rangemode")
202 except (ConfigParser.NoSectionError, ConfigParser.NoOptionError):
206 for r
in (
"rangexyz",
"rangerot"):
208 setattr(self, r+
"HL", parser.get(
"HIGHLEVELPLOTS", r))
209 setattr(self, r+
"HL",
211 except (ConfigParser.NoSectionError, ConfigParser.NoOptionError):
218 self.
firsttree = parser.getint(
"TIMEPLOTS",
"firsttree")
219 except (ConfigParser.NoSectionError, ConfigParser.NoOptionError):
223 for boolean
in (
"showmonitor",
"showadditional",
"showdump",
"showtime",
224 "showhighlevel",
"showmodule",
"showsubmodule",
225 "showtex",
"showbeamer",
"showhtml"):
227 setattr(self, boolean, parser.getboolean(
"SHOW", boolean))
228 except (ConfigParser.NoSectionError, ConfigParser.NoOptionError):
233 logger = logging.getLogger(
"mpsvalidate")
249 if args.jobdatapath !=
"":
252 if args.message !=
"":
std::vector< std::string_view > split(std::string_view, const char *)
def parseParameter(self, args)
def parseConfig(self, path)
OutputIterator zip(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp)
static std::string join(char **cmd)