Definition at line 44 of file beamerCreator.py.
References any().
Referenced by edm::eventsetup::ComponentFactory< T >.addTo(), HLTTauDQMPathPlotter.bookHistograms(), RecoBTag.checkCreateDirectory(), CombinedSeedComparitor.CombinedSeedComparitor(), CombinedTrajectoryFactory.CombinedTrajectoryFactory(), CompositeLogicalTrajectoryFilter.CompositeLogicalTrajectoryFilter(), CompositeTrajectoryFilter.CompositeTrajectoryFilter(), CompositeTSG.CompositeTSG(), edmplugin::PluginFactory< R *(Args...)>.create(), AlignmentProducerBase.createCalibrations(), edm::serviceregistry::ServicesManager.createServiceFor(), createWatchers(), CSCSegmentBuilder.CSCSegmentBuilder(), CtfSpecialSeedGenerator.CtfSpecialSeedGenerator(), EcalBarrelClusterFastTimer.EcalBarrelClusterFastTimer(), EgammaHLTRegionalPixelSeedGeneratorProducers.EgammaHLTRegionalPixelSeedGeneratorProducers(), FastSimProducer.FastSimProducer(), EcalUncalibRecHitProducer.fillDescriptions(), edm::serviceregistry::ServicesManager.fillListOfMakers(), edm::Factory.findMaker(), FTLDigiProducer.FTLDigiProducer(), LumiCorrectionParam.getCorrection(), gen::JetMatching.getPartonList(), HGCalLayerClusterProducer.HGCalLayerClusterProducer(), HGCalTriggerBackendProcessor.HGCalTriggerBackendProcessor(), HGCalTriggerNtupleManager.HGCalTriggerNtupleManager(), HGCalTriggerValidator.HGCalTriggerValidator(), RunManager.initG4(), RunManagerMT.initG4(), TStorageFactoryFile.Initialize(), EgammaTowerIsolationNew< NC >.initSoa(), edm::PluginDescription< T >.loadDescription(), LowPtGsfElectronFinalizer.LowPtGsfElectronFinalizer(), edm.makeInput(), edm::PresenceFactory.makePresence(), edm::VectorInputSourceFactory.makeVectorInputSource(), MTDDigiProducer.MTDDigiProducer(), pat::ObjectModifier< T >.ObjectModifier(), PFClusterProducer.PFClusterProducer(), PFRecHitCreatorBase.PFRecHitCreatorBase(), PFRecHitProducer.PFRecHitProducer(), PFRecoTauChargedHadronProducer.PFRecoTauChargedHadronProducer(), PhotonEnergyCorrector.PhotonEnergyCorrector(), edm::PreMixingModule.PreMixingModule(), CSCIndexerESProducer.produce(), CSCChannelMapperESProducer.produce(), HGCalTriggerGeometryESProducer.produce(), NavigationSchoolESProducer.produce(), TrajectoryCleanerESProducer.produce(), DetIdAssociatorESProducer.produce(), CandidateProducer< TColl, CColl, Selector, Conv, Creator, Init >.produce(), Pythia8Hadronizer.Pythia8Hadronizer(), gen::Py8InterfaceBase.readSettings(), RecoTauPiZeroProducer.RecoTauPiZeroProducer(), RecoTauProducer.RecoTauProducer(), SeedFilter.SeedFilter(), MonitorElement.setAccumulate(), evf::EvFDaqDirector.setDeleteTracking(), PFBlockAlgo.setImporters(), PFBlockAlgo.setLinkers(), TrackTimeValueMapProducer.TrackTimeValueMapProducer(), edmplugin::PluginFactory< R *(Args...)>.tryToCreate(), edm::eventsetup.validateEventSetupParameters(), cond::persistency::GTSchema.~GTSchema(), cond::persistency::IOVSchema.~IOVSchema(), cond::persistency::RunInfoSchema.~RunInfoSchema(), cond::persistency::GLOBAL_TAG::Table.~Table(), cond::persistency::TAG::Table.~Table(), cond::persistency::RUN_INFO::Table.~Table(), cond::persistency::GLOBAL_TAG_MAP::Table.~Table(), cond::persistency::PAYLOAD::Table.~Table(), cond::persistency::IOV::Table.~Table(), and cond::persistency::TAG_LOG::Table.~Table().
44 def create(alignables, pedeDump, additionalData, outputFile, config):
45 logger = logging.getLogger(
"mpsvalidate")
48 with open(os.path.join(config.mpspath,
"templates",
49 "mpsvalidate_beamer_template.tex"))
as template:
50 data = template.read()
64 \Huge\\bfseries Alignment Validation\par 66 \scshape\huge Alignment Campaign\\\\ {{{0}}}\par 68 \large \\today\par""".
format(config.message)
72 \Huge\\bfseries Alignment Validation\par 75 out.addSlide(
"", text)
78 text =
"\\tableofcontents" 79 out.addSlide(
"Overview", text)
82 out.add(
"\section{General information}")
85 text =
"Project: {{{0}}}\\\\\n".
format(config.message)
86 text +=
"Input-Path:\n" 87 text +=
"\\begin{verbatim}\n" 88 text += config.jobDataPath+
"\n" 89 text +=
"\\end{verbatim}\n" 90 out.addSlide_fragile(
"General information", text)
94 out.add(
"\subsection{Alignment Configuration}")
95 text =
"\\textbf{{PedeSteerer method:}} {{{0}}}\\\\\n".
format(
96 additionalData.pede_steerer_method)
97 text +=
"\\textbf{{PedeSteerer options:}}\\\\\n" 98 for line
in additionalData.pede_steerer_options:
99 text +=
"{{{0}}}\\\\\n".
format(line)
100 text +=
"\\textbf{{PedeSteerer command:}} {0}\\\\\n".
format(
101 additionalData.pede_steerer_command)
102 out.addSlide(
"Alignment Configuration", text)
103 except Exception
as e:
104 logger.error(
"data not found - {0} {1}".
format(type(e), e))
107 if config.showmonitor:
108 out.add(
"\subsection{Datasets with tracks}")
109 text =
"""\\begin{table}[h] 111 \caption{Datasets with tracks} 112 \\begin{tabular}{ccc} 114 Dataset & Number of used tracks & Weight \\\\ 117 for monitor
in mpsv_classes.MonitorData.monitors:
118 text +=
"{0} & {1} & {2}\\\\\n".
format(monitor.name, monitor.ntracks,
119 monitor.weight
if monitor.weight !=
None else "--")
120 except Exception
as e:
121 logger.error(
"data not found - {0} {1}".
format(type(e), e))
123 text +=
"\hline\nNumber of records & {0}\\\\\n".
format(pedeDump.nrec)
127 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" 128 out.addSlide(
"Datasets with tracks", text)
131 out.add(
"\subsection{Pede monitoring information}")
133 if (pedeDump.sumValue != 0):
134 text =
r"\begin{{align*}}Sum(Chi^2)/Sum(Ndf) &= {0}\\ &= {1}\end{{align*}}".
format(
135 pedeDump.sumSteps, pedeDump.sumValue)
137 text =
r"\begin{{align*}}Sum(W*Chi^2)/Sum(Ndf)/<W> &= {0}\\ &= {1}\end{{align*}}".
format(
138 pedeDump.sumSteps, pedeDump.sumWValue)
139 text +=
r"with correction for down-weighting: {0}\\".
format(
141 text +=
r"Peak dynamic memory allocation: {0} GB\\".
format(pedeDump.memory)
142 text +=
r"Total time: {0} h {1} m {2} s\\".
format(
143 pedeDump.time[0], pedeDump.time[1], pedeDump.time[2])
144 text +=
r"Number of records: {0}\\".
format(pedeDump.nrec)
145 text +=
r"Total number of parameters: {0}\\".
format(pedeDump.ntgb)
146 text +=
r"Number of variable parameters: {0}\\".
format(pedeDump.nvgb)
147 out.addSlide(
"Pede monitoring information", text)
148 except Exception
as e:
149 logger.error(
"data not found - {0} {1}".
format(type(e), e))
152 out.add(
"\section{Parameter plots}")
155 out.add(
"\subsection{High-level parameters}")
156 big = [x
for x
in config.outputList
if (x.plottype ==
"big")]
159 text =
"\includegraphics[height=0.85\\textheight]{{{0}/plots/pdf/{1}.pdf}}\n".
format(
160 config.outputPath, i.filename)
162 out.addSlide(
"High-level parameters", text)
165 out.add(
"\subsection{High-level parameters versus time (IOV)}")
166 time = [x
for x
in config.outputList
if (x.plottype ==
"time")]
170 for structure
in [x.name
for x
in time
if x.parameter ==
"xyz"]:
171 for mode
in [
"xyz",
"rot"]:
172 text =
"\\framesubtitle{{{0}}}\n".
format(structure)
173 if any([x.filename
for x
in time
if (x.parameter == mode
and x.name == structure)]):
174 filename = [x.filename
for x
in time
if (x.parameter == mode
and x.name == structure)][0]
175 text +=
"\includegraphics[height=0.85\\textheight]{{{0}/plots/pdf/{1}.pdf}}\n".
format(
176 config.outputPath, filename)
178 out.addSlide(
"High-level parameters versus time (IOV)", text)
181 out.add(
"\subsection{Module-level parameters}")
183 if any(x
for x
in config.outputList
if (x.plottype ==
"mod" and x.number ==
"")):
186 for moduleName
in [x.name
for x
in alignables.structures]:
189 if any(x
for x
in config.outputList
if (x.plottype ==
"mod" and x.number ==
"" and x.name == moduleName)):
192 for mode
in [
"xyz",
"rot",
"dist"]:
195 module = [x
for x
in config.outputList
if (
196 x.plottype ==
"mod" and x.number ==
"" and x.name == moduleName
and x.parameter == mode)]
198 moduleSub = [x
for x
in config.outputList
if (
199 x.plottype ==
"subMod" and x.number !=
"" and x.name == moduleName
and x.parameter == mode)]
203 text =
"\\framesubtitle{{{0}}}\n".
format(moduleName)
204 text +=
"\includegraphics[height=0.85\\textheight]{{{0}/plots/pdf/{1}.pdf}}\n".
format(
205 config.outputPath, module[0].filename)
207 out.addSlide(
"Module-level parameters", text)
210 for plot
in moduleSub:
211 text =
"\\framesubtitle{{{0}}}\n".
format(
213 text +=
"\includegraphics[height=0.85\\textheight]{{{0}/plots/pdf/{1}.pdf}}\n".
format(
214 config.outputPath, plot.filename)
216 out.addSlide(
"Module-level parameters", text)
219 out.add(
"\section{Monitor plots}")
220 for plot
in [x
for x
in config.outputList
if x.plottype ==
"monitor"]:
221 text =
"\\framesubtitle{{{0}}}\n".
format(plot.name)
222 text +=
"\includegraphics[height=0.85\\textheight]{{{0}/plots/pdf/{1}.pdf}}\n".
format(
223 config.outputPath, plot.filename)
224 out.addSlide(
"Monitor", text)
226 data = data.substitute(out=out.text)
228 with open(os.path.join(config.outputPath, outputFile),
"w")
as output:
234 os.system(
"pdflatex -output-directory={0} {1}/{2}".
format(
235 config.outputPath, config.outputPath, outputFile))
236 def create(alignables, pedeDump, additionalData, outputFile, config)
bool any(const std::vector< T > &v, const T &what)