ATLAS Offline Software
TrigInDetTrackTruthMap_old_cnv.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // Converter from TrigInDetTrackTruthMap_old to TrigInDetTrackTruthMap.
6 // $Id: TrigInDetTrackTruthMap_old_cnv.cxx,v 1.2 2009-02-11 02:33:13 ssnyder Exp $
7 
9 
10 void
13  oldobj)
14 {
15  newobj->m_truth_vec = oldobj->m_truth_vec;
16  newobj->m_elink_vec.clear();
17  for (size_t i=0; i < oldobj->m_elink_vec.size(); i++) {
18  // Note: this was originally a push_back of m_elink_vec[i] directly.
19  // This didn't work though. The ELs in the vector are default-constructed;
20  // then the data member is overwritten by root. Thus, the store
21  // pointer doesn't get set. (Note that ELStreamer won't do that any more.)
22  // If we explicitly construct a new EL here, the store pointer will
23  // get set correctly.
24  //
25  // Could use a push_back with emplacement here...
28  newobj->m_elink_vec.push_back (el);
29  }
30 }
TrigInDetTrackTruthMap_old_cnv.h
ElementLinkVector::push_back
void push_back(const ElemLink &link)
Definition: AthLinks/ElementLinkVector.h:316
ElementLinkVector::clear
void clear()
Definition: AthLinks/ElementLinkVector.h:341
TrigInDetTrackTruthMap_old::m_elink_vec
std::vector< ElementLink< TrigInDetTrackCollection > > m_elink_vec
Definition: TrigInDetTrackTruthMap_old.h:19
lumiFormat.i
int i
Definition: lumiFormat.py:92
TrigInDetTrackTruthMap
Definition: TrigInDetTrackTruthMap.h:38
plotIsoValidation.el
el
Definition: plotIsoValidation.py:197
TrigInDetTrackTruthMap::m_elink_vec
ElementLinkVector< TrigInDetTrackCollection > m_elink_vec
Definition: TrigInDetTrackTruthMap.h:103
TrigInDetTrackTruthMap_old
Definition: TrigInDetTrackTruthMap_old.h:17
TrigInDetTrackTruthMap_old_cnv::Convert
virtual void Convert(TrigInDetTrackTruthMap *newobj, const TrigInDetTrackTruthMap_old *oldobj)
Do the conversion.
Definition: TrigInDetTrackTruthMap_old_cnv.cxx:11
TrigInDetTrackTruthMap::m_truth_vec
std::vector< TrigInDetTrackTruth > m_truth_vec
Definition: TrigInDetTrackTruthMap.h:104
TrigInDetTrackTruthMap_old::m_truth_vec
std::vector< TrigInDetTrackTruth > m_truth_vec
Definition: TrigInDetTrackTruthMap_old.h:20