ATLAS Offline Software
Loading...
Searching...
No Matches
Obj1Obj2MultiAssociationTool.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// $Id$
12
13
15
16
17namespace D3PDTest {
18
19
27 (const std::string& type,
28 const std::string& name,
29 const IInterface* parent)
30 : Base (type, name, parent)
31{
32 declareProperty ("Which", m_which = 0);
33}
34
35
41{
42 if (m_which == 0) {
43 m_it = p.m_vo2.begin();
44 m_end = p.m_vo2.end();
45 }
46 else {
47 m_it = p.m_vo3.begin();
48 m_end = p.m_vo3.end();
49 }
50 return StatusCode::SUCCESS;
51}
52
53
60{
61 if (m_it == m_end)
62 return 0;
63 const Obj2* p = &*m_it;
64 ++m_it;
65 return p;
66}
67
68
69} // namespace D3PDTest
Test code: associate from an Obj1 to a set of Obj2.
virtual StatusCode reset(const Obj1 &p)
Start the iteration for a new association.
Obj1Obj2MultiAssociationTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard Gaudi tool constructor.
D3PD::MultiAssociationTool< Obj1, Obj2 > Base
std::vector< Obj2 >::const_iterator m_end
virtual const Obj2 * next()
Return a pointer to the next element in the association.
Test class for D3PD maker.
Definition Obj1.h:38
Test class for D3PD maker.
Definition Obj2.h:28