CMS 3D CMS Logo

Functions
ComparisonHelper Namespace Reference

Functions

template<class InputIterator1 , class InputIterator2 , class OutputIterator , class Compare >
OutputIterator zip (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp)
 

Function Documentation

◆ zip()

template<class InputIterator1 , class InputIterator2 , class OutputIterator , class Compare >
OutputIterator ComparisonHelper::zip ( InputIterator1  first1,
InputIterator1  last1,
InputIterator2  first2,
InputIterator2  last2,
OutputIterator  result,
Compare  comp 
)

Definition at line 39 of file L1TStage2CaloLayer1.h.

References AlCaHLTBitMon_QueryRunRegistry::comp, and mps_fire::result.

Referenced by dirstructure.Directory::__create_pie_image(), querying::_get_netrc_data(), ntupleDataFormat._RecoHitAdaptor::_hits(), TPTask::_process(), data_formats::_to_array_of_dicts(), ConfigBuilder.ConfigBuilder::addOutput(), plotting.Plot::addToLegend(), SiPixelPhase1MonitorTrackSoA::analyze(), hgcalPlots::append_hgcalDigisPlots(), hgcalPlots::append_hgcalHitsPlots(), hgcalPlots::append_hgcalLayerClustersPlots(), python.rootplot.root2matplotlib.HistStack::barstack(), PixelTrackBuilder::build(), cmsHarvester::build_dataset_use_list(), HGCalRecHit_cfi::calcWeights(), ValidationMatrix_v2.ReleaseComparison::compare(), Page1Parser.Page1Parser::ComputeTotalPrescales(), plotscripts::corrections2D(), plotting.AggregateBins::create(), plotting.PlotterTableItem::create(), geometry.Alignables::create_children_list(), edmStreamStallGrapher::createPDFImage(), geometryXMLparser::cscorder(), customIdentification::custom_identification_drnn_cone(), customIdentification::custom_identification_drnn_dbscan(), customIdentification::custom_identification_histomax(), ValidationMatrix::do_comparisons_threaded(), L1TStage2CaloLayer1::dqmAnalyze(), ntuplePlotting::draw(), trackingPlots.TrackingSeedingLayerTable::draw(), geometryXMLparser::dtorder(), conddb_migrate::fetch_gts(), FileBlob::FileBlob(), models::generate(), ValidationMatrix::get_filenames_from_pool(), TrackFitter::getCotThetaAndUpdateZip(), ValidationMatrix::guess_params(), dataformats::indent(), PrescaleChecker::isMonotonic(), makeLayoutFileForGui::layDefaults(), MergePCLDeadROC::main(), MergePCLFedErr::main(), PCLOthers::main(), MergeOccDeadROC::main(), MultipleCompare::main(), DeltaR::matchObjectCollection(), deltar::matchObjectCollection(), DeltaR::matchObjectCollection2(), deltar::matchObjectCollection2(), DeltaR::matchObjectCollection3(), deltar::matchObjectCollection3(), geometryDiff::matrixmult(), mergeLHE.DefaultLHEMerger::merge_headers(), python.rootplot.utilities.Hist::min(), makeMuonMisalignmentScenario::mmult(), iniparser.ConfigData::parseConfig(), plotscripts::philines(), SteerMultipleCompare::plotOneByOne(), edmStreamStallGrapher::plotPerStreamAboveFirstAndPrepareStack(), TablePrint::PrettyPrintTable(), TablePrint::PrintLine(), core.PileUpAnalyzer.PileUpAnalyzer::process(), MatrixReader.MatrixReader::readMatrix(), python.rootplot.rootinfo::recurse_thru_file(), PixelNtupletsFitter::run(), PixelFitterByHelixProjections::run(), PixelFitterByConformalMappingAndLine::run(), TrackFitter::run(), L1MuonPixelTrackFitter::run(), uploadConditions::runWizard(), uploadConditions_v2::runWizard(), RecoTauValidation_cfi::SetYmodulesToLog(), ValidationUtils::SpawnPSet(), html.Table::tableAsRowColumn(), PrescaleChecker::TrendingWithLumi(), python.rootplot.utilities::wilson_interval(), Formatter.SimpleHTMLFormatter::writeStyledRow(), and geometryXMLparser.MuonGeometry::xml().

44  {
45  typedef typename InputIterator1::value_type dummy1;
46  typedef typename InputIterator2::value_type dummy2;
47  while (first1 != last1 || first2 != last2) {
48  if (first1 == last1) {
49  while (first2 != last2) {
50  *result = std::make_pair(dummy1{first2->id()}, *first2);
51  ++first2;
52  ++result;
53  }
54  return result;
55  }
56  if (first2 == last2) {
57  while (first1 != last1) {
58  *result = std::make_pair(*first1, dummy2{first1->id()});
59  ++first1;
60  ++result;
61  }
62  return result;
63  }
64  if (comp(*first1, *first2)) {
65  *result = std::make_pair(*first1, dummy2{first1->id()});
66  ++first1;
67  } else if (comp(*first2, *first1)) {
68  *result = std::make_pair(dummy1{first2->id()}, *first2);
69  ++first2;
70  } else {
71  *result = std::make_pair(*first1, *first2);
72  ++first1;
73  ++first2;
74  }
75  ++result;
76  }
77  return result;
78  }