Definition at line 47 of file beamerCreator.py.
References any().
Referenced by edm::eventsetup::ComponentFactory< T >.addTo(), AlignmentProducer.AlignmentProducer(), HLTTauDQMPathPlotter.bookHistograms(), RecoBTag.checkCreateDirectory(), CombinedHitTripletGenerator.CombinedHitTripletGenerator(), CombinedMultiHitGenerator.CombinedMultiHitGenerator(), CombinedSeedComparitor.CombinedSeedComparitor(), CombinedTrajectoryFactory.CombinedTrajectoryFactory(), CompositeLogicalTrajectoryFilter.CompositeLogicalTrajectoryFilter(), CompositeTrajectoryFilter.CompositeTrajectoryFilter(), CompositeTSG.CompositeTSG(), edmplugin::PluginFactory< R *(Args...)>.create(), PCLTrackerAlProducer.createCalibrations(), edm::serviceregistry::ServicesManager.createServices(), createWatchers(), CSCSegmentBuilder.CSCSegmentBuilder(), CtfSpecialSeedGenerator.CtfSpecialSeedGenerator(), DTDigitizer.DTDigitizer(), EgammaHLTRegionalPixelSeedGeneratorProducers.EgammaHLTRegionalPixelSeedGeneratorProducers(), ora::ContainerSchema.extend(), EcalUncalibRecHitProducer.fillDescriptions(), edm::serviceregistry::ServicesManager.fillListOfMakers(), edm::Factory.findMaker(), LumiCorrectionParam.getCorrection(), HGCalRecHitProducer.HGCalRecHitProducer(), HGCalUncalibRecHitProducer.HGCalUncalibRecHitProducer(), RunManager.initG4(), RunManagerMT.initG4(), TStorageFactoryFile.Initialize(), VersionedSelector< T >.initialize(), mps_validate.main(), edm.makeInput(), edm::PresenceFactory.makePresence(), edm::VectorInputSourceFactory.makeVectorInputSource(), ora::ContainerSchema.mappingForDependentClass(), PFRecHitCreatorBase.PFRecHitCreatorBase(), PFRecHitProducer.PFRecHitProducer(), PFRecoTauChargedHadronProducer.PFRecoTauChargedHadronProducer(), PFTauMVAInputDiscriminantTranslator.PFTauMVAInputDiscriminantTranslator(), PhotonEnergyCorrector.PhotonEnergyCorrector(), PixelTrackReconstruction.PixelTrackReconstruction(), PixelTripletHLTGenerator.PixelTripletHLTGenerator(), l1t::Stage2Layer2JetAlgorithmFirmwareImp1.processEvent(), CSCChannelMapperESProducer.produce(), CSCIndexerESProducer.produce(), NavigationSchoolESProducer.produce(), TrajectoryCleanerESProducer.produce(), DetIdAssociatorESProducer.produce(), CandidateProducer< TColl, CColl, Selector, Conv, Creator, Init >.produce(), RecoTauCleanerImpl< Prod >.RecoTauCleanerImpl(), RecoTauPiZeroProducer.RecoTauPiZeroProducer(), RecoTauProducer.RecoTauProducer(), SeedFilter.SeedFilter(), SeedForPhotonConversionFromQuadruplets.SeedForPhotonConversionFromQuadruplets(), SeedGeneratorFromRegionHitsEDProducer.SeedGeneratorFromRegionHitsEDProducer(), TrajectorySeedProducer.TrajectorySeedProducer(), edmplugin::PluginFactory< R *(Args...)>.tryToCreate(), TSGFromL1Muon.TSGFromL1Muon(), TSGFromOrderedHits.TSGFromOrderedHits(), TSGSmart.TSGSmart(), and edm::eventsetup.validateEventSetupParameters().
48 def create(alignables, pedeDump, additionalData, outputFile, config):
49 logger = logging.getLogger(
"mpsvalidate")
52 with open(os.path.join(config.mpspath,
"beamer_template.tex"),
"r") as template:
53 data = template.read()
67 \Huge\\bfseries Alignment Validation\par
69 \scshape\huge Alignment Campaign\\\\ {{{0}}}\par
71 \large \\today\par""".
format(config.message)
75 \Huge\\bfseries Alignment Validation\par
78 out.addSlide(
"", text)
81 text =
"\\tableofcontents"
82 out.addSlide(
"Overview", text)
85 out.add(
"\section{General information}")
88 text =
"Project: {{{0}}}\\\\\n".
format(config.message)
89 text +=
"Input-Path:\n"
90 text +=
"\\begin{verbatim}\n"
91 text += config.jobDataPath+
"\n"
92 text +=
"\\end{verbatim}\n"
93 out.addSlide_fragile(
"General information", text)
97 out.add(
"\subsection{Alignment Configuration}")
98 text =
"\\textbf{{PedeSteerer method:}} {{{0}}}\\\\\n".
format(
99 additionalData.pedeSteererMethod)
100 text +=
"\\textbf{{PedeSteerer options:}}\\\\\n"
101 for line
in additionalData.pedeSteererOptions:
102 text +=
"{{{0}}}\\\\\n".
format(line)
103 text +=
"\\textbf{{PedeSteerer command:}} {0}\\\\\n".
format(
104 additionalData.pedeSteererCommand)
105 out.addSlide(
"Alignment Configuration", text)
106 except Exception
as e:
107 logger.error(
"data not found - {0} {1}".
format(type(e), e))
110 if (config.showmonitor):
111 out.add(
"\subsection{Datasets with tracks}")
112 text =
"""\\begin{table}[h]
114 \caption{Datasets with tracks}
117 Dataset & Number of used tracks \\\\
120 for monitor
in MonitorData.monitors:
121 text +=
"{0} & {1}\\\\\n".
format(monitor.name, monitor.ntracks)
122 except Exception
as e:
123 logger.error(
"data not found - {0} {1}".
format(type(e), e))
125 text +=
"Number of records & {0}\\\\\n".
format(pedeDump.nrec)
129 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"
130 out.addSlide(
"Datasets with tracks", text)
133 out.add(
"\subsection{Pede monitoring information}")
135 if (pedeDump.sumValue != 0):
136 text =
r"\begin{{align*}}Sum(Chi^2)/Sum(Ndf) &= {0}\\ &= {1}\end{{align*}}".
format(
137 pedeDump.sumSteps, pedeDump.sumValue)
139 text =
r"\begin{{align*}}Sum(W*Chi^2)/Sum(Ndf)/<W> &= {0}\\ &= {1}\end{{align*}}".
format(
140 pedeDump.sumSteps, pedeDump.sumWValue)
141 text +=
r"with correction for down-weighting: {0}\\".
format(
143 text +=
r"Peak dynamic memory allocation: {0} GB\\".
format(pedeDump.memory)
144 text +=
r"Total time: {0} h {1} m {2} s\\".
format(
145 pedeDump.time[0], pedeDump.time[1], pedeDump.time[2])
146 text +=
r"Number of records: {0}\\".
format(pedeDump.nrec)
147 text +=
r"Total number of parameters: {0}\\".
format(pedeDump.ntgb)
148 text +=
r"Number of variable parameters: {0}\\".
format(pedeDump.nvgb)
149 out.addSlide(
"Pede monitoring information", text)
150 except Exception
as e:
151 logger.error(
"data not found - {0} {1}".
format(type(e), e))
154 out.add(
"\section{Parameter plots}")
157 out.add(
"\subsection{High-level parameters}")
158 big = [x
for x
in config.outputList
if (x.plottype ==
"big")]
161 text =
"\includegraphics[height=0.85\\textheight]{{{0}/plots/pdf/{1}.pdf}}\n".
format(
162 config.outputPath, i.filename)
164 out.addSlide(
"High-level parameters", text)
167 out.add(
"\subsection{High-level parameters versus time (IOV)}")
168 time = [x
for x
in config.outputList
if (x.plottype ==
"time")]
172 for structure
in [x.name
for x
in time
if x.parameter ==
"xyz"]:
173 for mode
in [
"xyz",
"rot"]:
174 text =
"\\framesubtitle{{{0}}}\n".
format(structure)
175 if any([x.filename
for x
in time
if (x.parameter == mode
and x.name == structure)]):
176 filename = [x.filename
for x
in time
if (x.parameter == mode
and x.name == structure)][0]
177 text +=
"\includegraphics[height=0.85\\textheight]{{{0}/plots/pdf/{1}.pdf}}\n".
format(
178 config.outputPath, filename)
180 out.addSlide(
"High-level parameters versus time (IOV)", text)
183 out.add(
"\subsection{Module-level parameters}")
185 if any(x
for x
in config.outputList
if (x.plottype ==
"mod" and x.number ==
"")):
188 for moduleName
in [x.name
for x
in alignables.structures]:
191 if any(x
for x
in config.outputList
if (x.plottype ==
"mod" and x.number ==
"" and x.name == moduleName)):
194 for mode
in [
"xyz",
"rot",
"dist"]:
197 module = [x
for x
in config.outputList
if (
198 x.plottype ==
"mod" and x.number ==
"" and x.name == moduleName
and x.parameter == mode)]
200 moduleSub = [x
for x
in config.outputList
if (
201 x.plottype ==
"subMod" and x.number !=
"" and x.name == moduleName
and x.parameter == mode)]
205 text =
"\\framesubtitle{{{0}}}\n".
format(moduleName)
206 text +=
"\includegraphics[height=0.85\\textheight]{{{0}/plots/pdf/{1}.pdf}}\n".
format(
207 config.outputPath, module[0].filename)
209 out.addSlide(
"Module-level parameters", text)
212 for plot
in moduleSub:
213 text =
"\\framesubtitle{{{0}}}\n".
format(
215 text +=
"\includegraphics[height=0.85\\textheight]{{{0}/plots/pdf/{1}.pdf}}\n".
format(
216 config.outputPath, plot.filename)
218 out.addSlide(
"Module-level parameters", text)
221 out.add(
"\section{Monitor plots}")
222 for plot
in [x
for x
in config.outputList
if x.plottype ==
"monitor"]:
223 text =
"\\framesubtitle{{{0}}}\n".
format(plot.name)
224 text +=
"\includegraphics[height=0.85\\textheight]{{{0}/plots/pdf/{1}.pdf}}\n".
format(
225 config.outputPath, plot.filename)
226 out.addSlide(
"Monitor", text)
228 data = data.substitute(out=out.text)
230 with open(os.path.join(config.outputPath, outputFile),
"w")
as output:
236 os.system(
"pdflatex -output-directory={0} {1}/{2}".
format(
237 config.outputPath, config.outputPath, outputFile))
bool any(const std::vector< T > &v, const T &what)