Definition at line 44 of file beamerCreator.py.
References any(), and sistrip::SpyUtilities.range().
Referenced by edm::eventsetup::ComponentFactory< T >.addTo(), AlignmentMonitorAsAnalyzer.AlignmentMonitorAsAnalyzer(), BeamSpotDipServer.BeamSpotDipServer(), HLTTauDQMPathPlotter.bookHistograms(), RecoBTag.checkCreateDirectory(), CombinedSeedComparitor.CombinedSeedComparitor(), CombinedTrajectoryFactory.CombinedTrajectoryFactory(), CompositeLogicalTrajectoryFilter.CompositeLogicalTrajectoryFilter(), CompositeTrajectoryFilter.CompositeTrajectoryFilter(), CompositeTSG.CompositeTSG(), edmplugin::PluginFactory< R *(Args...)>.create(), AlignmentProducerBase.createCalibrations(), AlignmentProducerBase.createMonitors(), edm::serviceregistry::ServicesManager.createServiceFor(), createWatchers(), CSCSegmentBuilder.CSCSegmentBuilder(), CtfSpecialSeedGenerator.CtfSpecialSeedGenerator(), EcalBarrelClusterFastTimer.EcalBarrelClusterFastTimer(), etaMaxForPtThreshold_(), FastSimProducer.FastSimProducer(), EcalUncalibRecHitProducer.fillDescriptions(), edm::serviceregistry::ServicesManager.fillListOfMakers(), edm::Factory.findMaker(), edm.for(), LumiCorrectionParam.getCorrection(), MVAValueMapProducer< ParticleType >.getMVAEstimators(), HGCalTriggerNtupleManager.HGCalTriggerNtupleManager(), RunManagerMT.initG4(), TStorageFactoryFile.Initialize(), edm::PluginDescription< T >.loadDescription(), main(), edm.makeInput(), edm::PresenceFactory.makePresence(), edm::VectorInputSourceFactory.makeVectorInputSource(), MTDDigiProducer.MTDDigiProducer(), pat::ObjectModifier< T >.ObjectModifier(), PFClusterProducer.PFClusterProducer(), PFRecHitCreatorBase.PFRecHitCreatorBase(), PFRecHitProducer.PFRecHitProducer(), PFRecoTauChargedHadronProducer.PFRecoTauChargedHadronProducer(), l1t::Stage2Layer2JetAlgorithmFirmwareImp1.processEvent(), CSCChannelMapperESProducer.produce(), CSCIndexerESProducer.produce(), TrajectoryCleanerESProducer.produce(), HGCalTriggerGeometryESProducer.produce(), NavigationSchoolESProducer.produce(), CandidateProducer< TColl, CColl, Selector, Conv, Creator, Init >.produce(), RecoTauPiZeroProducer.RecoTauPiZeroProducer(), RecoTauProducer.RecoTauProducer(), edmplugin::PluginFactory< R *(Args...)>.tryToCreate(), and edm::eventsetup.validateEventSetupParameters().
45 def create(alignables, pedeDump, additionalData, outputFile, config):
46 logger = logging.getLogger(
"mpsvalidate")
49 with open(os.path.join(config.mpspath,
"templates",
50 "mpsvalidate_beamer_template.tex"))
as template:
51 data = template.read()
65 \Huge\\bfseries Alignment Validation\par
67 \scshape\huge Alignment Campaign\\\\ {{{0}}}\par
69 \large \\today\par""".
format(config.message)
73 \Huge\\bfseries Alignment Validation\par
76 out.addSlide(
"", text)
79 text =
"\\tableofcontents"
80 out.addSlide(
"Overview", text)
83 out.add(
"\section{General information}")
86 text =
"Project: {{{0}}}\\\\\n".
format(config.message)
87 text +=
"Input-Path:\n"
88 text +=
"\\begin{verbatim}\n"
89 text += config.jobDataPath+
"\n"
90 text +=
"\\end{verbatim}\n"
91 out.addSlide_fragile(
"General information", text)
95 out.add(
"\subsection{Alignment Configuration}")
96 text =
"\\textbf{{PedeSteerer method:}} {{{0}}}\\\\\n".
format(
97 additionalData.pede_steerer_method)
98 text +=
"\\textbf{{PedeSteerer options:}}\\\\\n"
99 for line
in additionalData.pede_steerer_options:
100 text +=
"{{{0}}}\\\\\n".
format(line)
101 text +=
"\\textbf{{PedeSteerer command:}} {0}\\\\\n".
format(
102 additionalData.pede_steerer_command)
103 out.addSlide(
"Alignment Configuration", text)
104 except Exception
as e:
105 logger.error(
"data not found - {0} {1}".
format(type(e), e))
108 if config.showmonitor:
109 out.add(
"\subsection{Datasets with tracks}")
110 text =
"""\\begin{table}[h]
112 \caption{Datasets with tracks}
113 \\begin{tabular}{ccc}
115 Dataset & Number of used tracks & Weight \\\\
118 for monitor
in mpsv_classes.MonitorData.monitors:
119 text +=
"{0} & {1} & {2}\\\\\n".
format(monitor.name, monitor.ntracks,
120 monitor.weight
if monitor.weight !=
None else "--")
121 except Exception
as e:
122 logger.error(
"data not found - {0} {1}".
format(type(e), e))
124 text +=
"\hline\nNumber of records & {0}\\\\\n".
format(pedeDump.nrec)
128 text +=
"The information in this table is based on the monitor root files. Note that the number of tracks which where used in the pede step can differ from this table.\n"
129 out.addSlide(
"Datasets with tracks", text)
132 out.add(
"\subsection{Pede monitoring information}")
134 if (pedeDump.sumValue != 0):
135 text =
r"\begin{{align*}}Sum(Chi^2)/Sum(Ndf) &= {0}\\ &= {1}\end{{align*}}".
format(
136 pedeDump.sumSteps, pedeDump.sumValue)
138 text =
r"\begin{{align*}}Sum(W*Chi^2)/Sum(Ndf)/<W> &= {0}\\ &= {1}\end{{align*}}".
format(
139 pedeDump.sumSteps, pedeDump.sumWValue)
140 text +=
r"with correction for down-weighting: {0}\\".
format(
142 text +=
r"Peak dynamic memory allocation: {0} GB\\".
format(pedeDump.memory)
143 text +=
r"Total time: {0} h {1} m {2} s\\".
format(
144 pedeDump.time[0], pedeDump.time[1], pedeDump.time[2])
145 text +=
r"Number of records: {0}\\".
format(pedeDump.nrec)
146 text +=
r"Total number of parameters: {0}\\".
format(pedeDump.ntgb)
147 text +=
r"Number of variable parameters: {0}\\".
format(pedeDump.nvgb)
148 out.addSlide(
"Pede monitoring information", text)
149 except Exception
as e:
150 logger.error(
"data not found - {0} {1}".
format(type(e), e))
153 out.add(
"\section{Parameter plots}")
156 out.add(
"\subsection{High-level parameters}")
157 big = [x
for x
in config.outputList
if (x.plottype ==
"big")]
160 text =
"\includegraphics[height=0.85\\textheight]{{{0}/plots/pdf/{1}.pdf}}\n".
format(
161 config.outputPath, i.filename)
163 out.addSlide(
"High-level parameters", text)
166 out.add(
"\subsection{High-level parameters versus time (IOV)}")
167 time = [x
for x
in config.outputList
if (x.plottype ==
"time")]
171 for structure
in [x.name
for x
in time
if x.parameter ==
"xyz"]:
172 for mode
in [
"xyz",
"rot"]:
173 text =
"\\framesubtitle{{{0}}}\n".
format(structure)
174 if any([x.filename
for x
in time
if (x.parameter == mode
and x.name == structure)]):
175 filename = [x.filename
for x
in time
if (x.parameter == mode
and x.name == structure)][0]
176 text +=
"\includegraphics[height=0.85\\textheight]{{{0}/plots/pdf/{1}.pdf}}\n".
format(
177 config.outputPath, filename)
179 out.addSlide(
"High-level parameters versus time (IOV)", text)
182 out.add(
"\subsection{Module-level parameters}")
184 if any(x
for x
in config.outputList
if (x.plottype ==
"mod" and x.number ==
"")):
187 for moduleName
in [x.name
for x
in alignables.structures]:
190 if any(x
for x
in config.outputList
if (x.plottype ==
"mod" and x.number ==
"" and x.name == moduleName)):
193 for mode
in [
"xyz",
"rot",
"dist"]:
196 module = [x
for x
in config.outputList
if (
197 x.plottype ==
"mod" and x.number ==
"" and x.name == moduleName
and x.parameter == mode)]
199 moduleSub = [x
for x
in config.outputList
if (
200 x.plottype ==
"subMod" and x.number !=
"" and x.name == moduleName
and x.parameter == mode)]
204 text =
"\\framesubtitle{{{0}}}\n".
format(moduleName)
205 text +=
"\includegraphics[height=0.85\\textheight]{{{0}/plots/pdf/{1}.pdf}}\n".
format(
206 config.outputPath, module[0].filename)
208 out.addSlide(
"Module-level parameters", text)
211 for plot
in moduleSub:
212 text =
"\\framesubtitle{{{0}}}\n".
format(
214 text +=
"\includegraphics[height=0.85\\textheight]{{{0}/plots/pdf/{1}.pdf}}\n".
format(
215 config.outputPath, plot.filename)
217 out.addSlide(
"Module-level parameters", text)
220 out.add(
"\section{Monitor plots}")
221 for plot
in [x
for x
in config.outputList
if x.plottype ==
"monitor"]:
222 text =
"\\framesubtitle{{{0}}}\n".
format(plot.name)
223 text +=
"\includegraphics[height=0.85\\textheight]{{{0}/plots/pdf/{1}.pdf}}\n".
format(
224 config.outputPath, plot.filename)
225 out.addSlide(
"Monitor", text)
227 data = data.substitute(out=out.text)
229 with open(os.path.join(config.outputPath, outputFile),
"w")
as output:
235 os.system(
"pdflatex -output-directory={0} {1}/{2}".
format(
236 config.outputPath, config.outputPath, outputFile))
bool any(const std::vector< T > &v, const T &what)
const uint16_t range(const Frame &aFrame)