CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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

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 38 of file L1TStage2CaloLayer1.h.

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

Referenced by dirstructure.Directory::__create_pie_image(), argparse.ArgumentParser::_parse_known_args(), python.rootplot.argparse.ArgumentParser::_parse_known_args(), data_formats::_to_array_of_dicts(), plotting.Plot::addToLegend(), L1TStage2CaloLayer1::analyze(), python.rootplot.root2matplotlib.HistStack::barstack(), ValidationMatrix_v2.ReleaseComparison::compare(), plotscripts::corrections2D(), plotting.AggregateBins::create(), plotting.PlotterTableItem::create(), geometry.Alignables::create_children_list(), geometryXMLparser::cscorder(), ValidationMatrix::do_comparisons_threaded(), geometryXMLparser::dtorder(), conddb_migrate::fetch_gts(), FileBlob::FileBlob(), models::generate(), ValidationMatrix::get_filenames_from_pool(), specificLumi::getFillFromDB(), specificLumi::getSpecificLumi(), ValidationMatrix::guess_params(), mpl_axes_hist_fix::hist(), dataformats::indent(), tablePrinter::indent(), PrescaleChecker::isMonotonic(), makeLayoutFileForGui::layDefaults(), MultipleCompare::main(), deltar::matchObjectCollection(), deltar::matchObjectCollection2(), deltar::matchObjectCollection3(), geometryDiff::matrixmult(), python.rootplot.utilities.Hist::min(), makeMuonMisalignmentScenario::mmult(), iniparser.ConfigData::parseConfig(), plotscripts::philines(), SteerMultipleCompare::plotOneByOne(), matplotRender.matplotRender::plotPeakPerday_Time(), matplotRender.matplotRender::plotPerdayX_Time(), matplotRender.matplotRender::plotSumX_Fill(), matplotRender.matplotRender::plotSumX_Run(), matplotRender.matplotRender::plotSumX_Time(), TablePrint::PrettyPrintTable(), TablePrint::PrintLine(), core.PileUpAnalyzer.PileUpAnalyzer::process(), cmsPerfSuiteHarvest::process_igprof_dir(), cmsPerfSuiteHarvest::process_memcheck_dir(), cmsPerfSuiteHarvest::process_timesize_dir(), MatrixReader.MatrixReader::readMatrix(), python.rootplot.rootinfo::recurse_thru_file(), PixelFitterByConformalMappingAndLine::run(), PixelFitterByHelixProjections::run(), TrackFitter::run(), L1MuonPixelTrackFitter::run(), uploadConditions::runWizard(), RecoTauValidation_cfi::SetYmodulesToLog(), ValidationUtils::SpawnPSet(), html.Table::tableAsRowColumn(), PrescaleChecker::TrendingWithLumi(), python.rootplot.utilities::wilson_interval(), Formatter.SimpleHTMLFormatter::writeStyledRow(), and geometryXMLparser.MuonGeometry::xml().

40  {
41  typedef typename InputIterator1::value_type dummy1;
42  typedef typename InputIterator2::value_type dummy2;
43  while ( first1 != last1 || first2 != last2 ) {
44  if ( first1 == last1 ) {
45  while ( first2 != last2 ) { *result = std::make_pair(dummy1{first2->id()}, *first2); ++first2; ++result; }
46  return result;
47  }
48  if ( first2 == last2 ) {
49  while ( first1 != last1 ) { *result = std::make_pair(*first1, dummy2{first1->id()}); ++first1; ++result; }
50  return result;
51  }
52  if (comp(*first1,*first2)) { *result = std::make_pair(*first1, dummy2{first1->id()}); ++first1; }
53  else if (comp(*first2,*first1)) { *result = std::make_pair(dummy1{first2->id()}, *first2); ++first2; }
54  else { *result = std::make_pair(*first1, *first2); ++first1; ++first2; }
55  ++result;
56  }
57  return result;
58  }
tuple result
Definition: mps_fire.py:84