ATLAS Offline Software
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$
15 
16 
17 namespace 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
D3PDTest::Obj1
Test class for D3PD maker.
Definition: Obj1.h:38
D3PDTest::Obj1Obj2MultiAssociationTool::m_it
std::vector< Obj2 >::const_iterator m_it
Definition: Obj1Obj2MultiAssociationTool.h:70
D3PD::MultiAssociationTool< Obj1, Obj2 >
D3PDTest::Obj1Obj2MultiAssociationTool::Obj1Obj2MultiAssociationTool
Obj1Obj2MultiAssociationTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard Gaudi tool constructor.
Definition: Obj1Obj2MultiAssociationTool.cxx:27
D3PDTest::Obj1Obj2MultiAssociationTool::next
virtual const Obj2 * next()
Return a pointer to the next element in the association.
Definition: Obj1Obj2MultiAssociationTool.cxx:59
D3PDTest::Obj1Obj2MultiAssociationTool::m_which
int m_which
Definition: Obj1Obj2MultiAssociationTool.h:68
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
test_pyathena.parent
parent
Definition: test_pyathena.py:15
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
Obj1Obj2MultiAssociationTool.h
Test code: associate from an Obj1 to a set of Obj2.
D3PDTest::Obj1Obj2MultiAssociationTool::reset
virtual StatusCode reset(const Obj1 &p)
Start the iteration for a new association.
Definition: Obj1Obj2MultiAssociationTool.cxx:40
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
D3PDTest
Definition: MapDumper.h:25
D3PDTest::Obj1Obj2MultiAssociationTool::m_end
std::vector< Obj2 >::const_iterator m_end
Definition: Obj1Obj2MultiAssociationTool.h:71
D3PDTest::Obj2
Test class for D3PD maker.
Definition: Obj2.h:28