Fork me on GitHub

Changeset 93da593 in git for modules


Ignore:
Timestamp:
Sep 11, 2015, 11:52:41 PM (9 years ago)
Author:
Pavel Demin <pavel.demin@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
410f3a2
Parents:
b631c06
Message:

replace map with vector in UniqueObjectFinder

Location:
modules
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • modules/UniqueObjectFinder.cc

    rb631c06 r93da593  
    7474  TIterator *iterator;
    7575
     76  fInputMap.clear();
     77
    7678  size = param.GetSize();
    7779  for(i = 0; i < size/2; ++i)
     
    8082    iterator = array->MakeIterator();
    8183
    82     fInputMap[iterator] = ExportArray(param[i*2 + 1].GetString());
     84    fInputMap.push_back(make_pair(iterator, ExportArray(param[i*2 + 1].GetString())));
    8385  }
    8486}
     
    8890void UniqueObjectFinder::Finish()
    8991{
    90   map< TIterator *, TObjArray * >::iterator itInputMap;
     92  vector< pair< TIterator *, TObjArray * > >::iterator itInputMap;
    9193  TIterator *iterator;
    9294
     
    104106{
    105107  Candidate *candidate;
    106   map< TIterator *, TObjArray * >::iterator itInputMap;
     108  vector< pair< TIterator *, TObjArray * > >::iterator itInputMap;
    107109  TIterator *iterator;
    108110  TObjArray *array;
     
    128130//------------------------------------------------------------------------------
    129131
    130 Bool_t UniqueObjectFinder::Unique(Candidate *candidate, map< TIterator *, TObjArray * >::iterator itInputMap)
     132Bool_t UniqueObjectFinder::Unique(Candidate *candidate, vector< pair< TIterator *, TObjArray * > >::iterator itInputMap)
    131133{
    132134  Candidate *previousCandidate;
    133   map< TIterator *, TObjArray * >::iterator previousItInputMap;
     135  vector< pair< TIterator *, TObjArray * > >::iterator previousItInputMap;
    134136  TObjArray *array;
    135137
  • modules/UniqueObjectFinder.h

    rb631c06 r93da593  
    3030#include "classes/DelphesModule.h"
    3131
    32 #include <map>
     32#include <vector>
     33#include <utility>
    3334
    3435class TIterator;
     
    4950private:
    5051
    51   Bool_t Unique(Candidate *candidate, std::map< TIterator *, TObjArray * >::iterator itInputMap);
     52  Bool_t Unique(Candidate *candidate, std::vector< std::pair< TIterator *, TObjArray * > >::iterator itInputMap);
    5253
    53   std::map< TIterator *, TObjArray * > fInputMap; //!
     54  std::vector< std::pair< TIterator *, TObjArray * > > fInputMap; //!
    5455
    5556  ClassDef(UniqueObjectFinder, 1)
Note: See TracChangeset for help on using the changeset viewer.