20 iter != eventmap.
end();
24 _map.insert(make_pair(event->get_embedding_id(), event->Clone()));
32 iter != eventmap.
end();
36 _map.insert(make_pair(event->get_embedding_id(), event->Clone()));
48 for (
Iter iter = _map.begin();
60 os <<
"PHHepMCGenEventMap: size = " << _map.size() << endl;
62 for (
const auto & evt : _map)
64 cout <<
"Event["<<evt.first<<
"] : ";
75 if (iter == _map.end())
return NULL;
81 Iter iter = _map.find(
id);
82 if (iter == _map.end())
return NULL;
88 unsigned int index = 1;
89 if (!_map.empty()) index = _map.rbegin()->first + 1;
92 _map.insert(make_pair(index, event->
Clone()));
96 _map[index]->set_embedding_id(index);
102 unsigned int index = -1;
103 if (!_map.empty()) index = _map.begin()->first - 1;
106 _map.insert(make_pair(index, event->
Clone()));
110 _map[index]->set_embedding_id(index);
116 if (_map.find(index) != _map.end())
118 cout <<
"PHHepMCGenEventMap::insert_event - Fatal Error -"
119 <<
"embedding ID "<<index<<
" is already used in the PHHepMCGenEventMap. Print map:";
126 _map.insert(make_pair(index, event->
Clone()));
130 _map[index]->set_embedding_id(index);
ClassImp(PHHepMCGenEventMap) PHHepMCGenEventMap
PHHepMCGenEventMap is collection of HEPMC events input into this simulation map of embedding ID -> PH...
PHHepMCGenEvent * insert_active_event(const PHHepMCGenEvent *event=nullptr)
insert a event of interest, e.g. jetty event from pythia
std::map< int, PHHepMCGenEvent * >::iterator Iter
PHHepMCGenEventMap & operator=(const PHHepMCGenEventMap &eventmap)
const PHHepMCGenEvent * get(int idkey) const
fetch event
std::map< int, PHHepMCGenEvent * >::const_iterator ConstIter
PHHepMCGenEvent * insert_background_event(const PHHepMCGenEvent *event=nullptr)
insert a event of background, e.g. Au+Au collision background. First event has embedding ID = 0,...
PHHepMCGenEvent * insert_event(const int embedding_id, const PHHepMCGenEvent *event=nullptr)
insert a event with specific embedding ID
virtual ~PHHepMCGenEventMap()
void identify(std::ostream &os=std::cout) const
ConstIter begin() const
iterator from lowest ID to highest, i.e. background to signal
PHHepMCGenEvent * Clone() const