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

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(), querying::_get_netrc_data(), ntupleDataFormat._RecoHitAdaptor::_hits(), 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(), Page1Parser.Page1Parser::ComputeTotalPrescales(), plotscripts::corrections2D(), plotting.AggregateBins::create(), plotting.PlotterTableItem::create(), cmsHarvester::create_and_check_castor_dir(), geometry.Alignables::create_children_list(), edmStreamStallGrapher::createPDFImage(), geometryXMLparser::cscorder(), ValidationMatrix::do_comparisons_threaded(), ConfigBuilder.ConfigBuilder::doNotInlineEventContent(), ntuplePlotting::draw(), 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::matchObjectCollection(), DeltaR::matchObjectCollection2(), deltar::matchObjectCollection2(), DeltaR::matchObjectCollection3(), 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(), sqr(), html.Table::tableAsRowColumn(), PrescaleChecker::TrendingWithLumi(), python.rootplot.utilities::wilson_interval(), Formatter.SimpleHTMLFormatter::writeStyledRow(), geometryXMLparser.MuonGeometry::xml(), and TrackFitter::~TrackFitter().

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  }