Definition at line 43 of file beamerCreator.py.
References any().
Referenced by edm::eventsetup::ComponentFactory< T >.addTo(), HLTTauDQMPathPlotter.bookHistograms(), CAHitQuadrupletGenerator.CAHitQuadrupletGenerator(), CAHitTripletGenerator.CAHitTripletGenerator(), RecoBTag.checkCreateDirectory(), CombinedHitQuadrupletGenerator.CombinedHitQuadrupletGenerator(), CombinedHitTripletGenerator.CombinedHitTripletGenerator(), CombinedMultiHitGenerator.CombinedMultiHitGenerator(), 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(), DTDigitizer.DTDigitizer(), EgammaHLTRegionalPixelSeedGeneratorProducers.EgammaHLTRegionalPixelSeedGeneratorProducers(), EcalUncalibRecHitProducer.fillDescriptions(), edm::serviceregistry::ServicesManager.fillListOfMakers(), edm::Factory.findMaker(), FTLRecHitProducer.FTLRecHitProducer(), FTLUncalibratedRecHitProducer.FTLUncalibratedRecHitProducer(), LumiCorrectionParam.getCorrection(), gen::JetMatching.getPartonList(), HGCalRecHitProducer.HGCalRecHitProducer(), HGCalTriggerNtupleManager.HGCalTriggerNtupleManager(), HGCalUncalibRecHitProducer.HGCalUncalibRecHitProducer(), RunManagerMT.initG4(), RunManager.initG4(), TStorageFactoryFile.Initialize(), VersionedSelector< T >.initialize(), EgammaTowerIsolationNew< NC >.initSoa(), edm.makeInput(), edm::PresenceFactory.makePresence(), edm::VectorInputSourceFactory.makeVectorInputSource(), evf::EvFDaqDirector.microMergeDisabled(), PFRecHitCreatorBase.PFRecHitCreatorBase(), PFRecHitProducer.PFRecHitProducer(), PFRecoTauChargedHadronProducer.PFRecoTauChargedHadronProducer(), PFTauMVAInputDiscriminantTranslator.PFTauMVAInputDiscriminantTranslator(), PhotonEnergyCorrector.PhotonEnergyCorrector(), PixelQuadrupletGenerator.PixelQuadrupletGenerator(), PixelQuadrupletMergerEDProducer.PixelQuadrupletMergerEDProducer(), PixelTripletHLTGenerator.PixelTripletHLTGenerator(), HGCalTriggerGeometryESProducer.produce(), CSCIndexerESProducer.produce(), CSCChannelMapperESProducer.produce(), NavigationSchoolESProducer.produce(), TrajectoryCleanerESProducer.produce(), DetIdAssociatorESProducer.produce(), CandidateProducer< TColl, CColl, Selector, Conv, Creator, Init >.produce(), RecoTauCleanerImpl< Prod >.RecoTauCleanerImpl(), RecoTauPiZeroProducer.RecoTauPiZeroProducer(), RecoTauProducer.RecoTauProducer(), RPCRecHitProducer.RPCRecHitProducer(), SeedCreatorFromRegionHitsEDProducerT< T_SeedCreator >.SeedCreatorFromRegionHitsEDProducerT(), SeedFilter.SeedFilter(), SeedFinderSelector.SeedFinderSelector(), SeedForPhotonConversionFromQuadruplets.SeedForPhotonConversionFromQuadruplets(), SeedGeneratorFromRegionHitsEDProducer.SeedGeneratorFromRegionHitsEDProducer(), MonitorElement.setAccumulate(), PFBlockAlgo.setLinkers(), TrajectorySeedProducer.TrajectorySeedProducer(), edmplugin::PluginFactory< R *(Args...)>.tryToCreate(), TSGFromOrderedHits.TSGFromOrderedHits(), TSGSmart.TSGSmart(), 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().
43 def create(alignables, pedeDump, additionalData, outputFile, config):
44 logger = logging.getLogger(
"mpsvalidate")
47 with open(os.path.join(config.mpspath,
"templates",
48 "mpsvalidate_beamer_template.tex"))
as template:
49 data = template.read()
63 \Huge\\bfseries Alignment Validation\par 65 \scshape\huge Alignment Campaign\\\\ {{{0}}}\par 67 \large \\today\par""".
format(config.message)
71 \Huge\\bfseries Alignment Validation\par 74 out.addSlide(
"", text)
77 text =
"\\tableofcontents" 78 out.addSlide(
"Overview", text)
81 out.add(
"\section{General information}")
84 text =
"Project: {{{0}}}\\\\\n".
format(config.message)
85 text +=
"Input-Path:\n" 86 text +=
"\\begin{verbatim}\n" 87 text += config.jobDataPath+
"\n" 88 text +=
"\\end{verbatim}\n" 89 out.addSlide_fragile(
"General information", text)
93 out.add(
"\subsection{Alignment Configuration}")
94 text =
"\\textbf{{PedeSteerer method:}} {{{0}}}\\\\\n".
format(
95 additionalData.pede_steerer_method)
96 text +=
"\\textbf{{PedeSteerer options:}}\\\\\n" 97 for line
in additionalData.pede_steerer_options:
98 text +=
"{{{0}}}\\\\\n".
format(line)
99 text +=
"\\textbf{{PedeSteerer command:}} {0}\\\\\n".
format(
100 additionalData.pede_steerer_command)
101 out.addSlide(
"Alignment Configuration", text)
102 except Exception
as e:
103 logger.error(
"data not found - {0} {1}".
format(type(e), e))
106 if config.showmonitor:
107 out.add(
"\subsection{Datasets with tracks}")
108 text =
"""\\begin{table}[h] 110 \caption{Datasets with tracks} 111 \\begin{tabular}{ccc} 113 Dataset & Number of used tracks & Weight \\\\ 116 for monitor
in mpsv_classes.MonitorData.monitors:
117 text +=
"{0} & {1} & {2}\\\\\n".
format(monitor.name, monitor.ntracks,
118 monitor.weight
if monitor.weight !=
None else "--")
119 except Exception
as e:
120 logger.error(
"data not found - {0} {1}".
format(type(e), e))
122 text +=
"\hline\nNumber of records & {0}\\\\\n".
format(pedeDump.nrec)
126 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" 127 out.addSlide(
"Datasets with tracks", text)
130 out.add(
"\subsection{Pede monitoring information}")
132 if (pedeDump.sumValue != 0):
133 text =
r"\begin{{align*}}Sum(Chi^2)/Sum(Ndf) &= {0}\\ &= {1}\end{{align*}}".
format(
134 pedeDump.sumSteps, pedeDump.sumValue)
136 text =
r"\begin{{align*}}Sum(W*Chi^2)/Sum(Ndf)/<W> &= {0}\\ &= {1}\end{{align*}}".
format(
137 pedeDump.sumSteps, pedeDump.sumWValue)
138 text +=
r"with correction for down-weighting: {0}\\".
format(
140 text +=
r"Peak dynamic memory allocation: {0} GB\\".
format(pedeDump.memory)
141 text +=
r"Total time: {0} h {1} m {2} s\\".
format(
142 pedeDump.time[0], pedeDump.time[1], pedeDump.time[2])
143 text +=
r"Number of records: {0}\\".
format(pedeDump.nrec)
144 text +=
r"Total number of parameters: {0}\\".
format(pedeDump.ntgb)
145 text +=
r"Number of variable parameters: {0}\\".
format(pedeDump.nvgb)
146 out.addSlide(
"Pede monitoring information", text)
147 except Exception
as e:
148 logger.error(
"data not found - {0} {1}".
format(type(e), e))
151 out.add(
"\section{Parameter plots}")
154 out.add(
"\subsection{High-level parameters}")
155 big = [x
for x
in config.outputList
if (x.plottype ==
"big")]
158 text =
"\includegraphics[height=0.85\\textheight]{{{0}/plots/pdf/{1}.pdf}}\n".
format(
159 config.outputPath, i.filename)
161 out.addSlide(
"High-level parameters", text)
164 out.add(
"\subsection{High-level parameters versus time (IOV)}")
165 time = [x
for x
in config.outputList
if (x.plottype ==
"time")]
169 for structure
in [x.name
for x
in time
if x.parameter ==
"xyz"]:
170 for mode
in [
"xyz",
"rot"]:
171 text =
"\\framesubtitle{{{0}}}\n".
format(structure)
172 if any([x.filename
for x
in time
if (x.parameter == mode
and x.name == structure)]):
173 filename = [x.filename
for x
in time
if (x.parameter == mode
and x.name == structure)][0]
174 text +=
"\includegraphics[height=0.85\\textheight]{{{0}/plots/pdf/{1}.pdf}}\n".
format(
175 config.outputPath, filename)
177 out.addSlide(
"High-level parameters versus time (IOV)", text)
180 out.add(
"\subsection{Module-level parameters}")
182 if any(x
for x
in config.outputList
if (x.plottype ==
"mod" and x.number ==
"")):
185 for moduleName
in [x.name
for x
in alignables.structures]:
188 if any(x
for x
in config.outputList
if (x.plottype ==
"mod" and x.number ==
"" and x.name == moduleName)):
191 for mode
in [
"xyz",
"rot",
"dist"]:
194 module = [x
for x
in config.outputList
if (
195 x.plottype ==
"mod" and x.number ==
"" and x.name == moduleName
and x.parameter == mode)]
197 moduleSub = [x
for x
in config.outputList
if (
198 x.plottype ==
"subMod" and x.number !=
"" and x.name == moduleName
and x.parameter == mode)]
202 text =
"\\framesubtitle{{{0}}}\n".
format(moduleName)
203 text +=
"\includegraphics[height=0.85\\textheight]{{{0}/plots/pdf/{1}.pdf}}\n".
format(
204 config.outputPath, module[0].filename)
206 out.addSlide(
"Module-level parameters", text)
209 for plot
in moduleSub:
210 text =
"\\framesubtitle{{{0}}}\n".
format(
212 text +=
"\includegraphics[height=0.85\\textheight]{{{0}/plots/pdf/{1}.pdf}}\n".
format(
213 config.outputPath, plot.filename)
215 out.addSlide(
"Module-level parameters", text)
218 out.add(
"\section{Monitor plots}")
219 for plot
in [x
for x
in config.outputList
if x.plottype ==
"monitor"]:
220 text =
"\\framesubtitle{{{0}}}\n".
format(plot.name)
221 text +=
"\includegraphics[height=0.85\\textheight]{{{0}/plots/pdf/{1}.pdf}}\n".
format(
222 config.outputPath, plot.filename)
223 out.addSlide(
"Monitor", text)
225 data = data.substitute(out=out.text)
227 with open(os.path.join(config.outputPath, outputFile),
"w")
as output:
233 os.system(
"pdflatex -output-directory={0} {1}/{2}".
format(
234 config.outputPath, config.outputPath, outputFile))
235 def create(alignables, pedeDump, additionalData, outputFile, config)
bool any(const std::vector< T > &v, const T &what)