ATLAS Offline Software
ToObj2MultiAssociationTool.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 
59 {
60  m_tmpvec.clear();
61  m_tmpvec.push_back (p);
62  m_it = m_tmpvec.begin();
63  m_end = m_tmpvec.end();
64  return StatusCode::SUCCESS;
65 }
66 
67 
74 {
75  if (m_it == m_end)
76  return 0;
77  const Obj2* p = &*m_it;
78  ++m_it;
79  return p;
80 }
81 
82 
83 } // namespace D3PDTest
ToObj2MultiAssociationTool.h
Test code: Test MultiAssociationToolMulti.
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
D3PDTest::Obj1
Test class for D3PD maker.
Definition: Obj1.h:38
D3PDTest::ToObj2MultiAssociationTool::ToObj2MultiAssociationTool
ToObj2MultiAssociationTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard Gaudi tool constructor.
Definition: ToObj2MultiAssociationTool.cxx:27
D3PD::MultiAssociationTool< D3PD::Types< Obj1, Obj2 >, Obj2 >
D3PDTest::ToObj2MultiAssociationTool::next
virtual const Obj2 * next()
Return a pointer to the next element in the association.
Definition: ToObj2MultiAssociationTool.cxx:73
D3PDTest::ToObj2MultiAssociationTool::m_it
std::vector< Obj2 >::const_iterator m_it
Definition: ToObj2MultiAssociationTool.h:77
D3PDTest::ToObj2MultiAssociationTool::m_end
std::vector< Obj2 >::const_iterator m_end
Definition: ToObj2MultiAssociationTool.h:78
D3PDTest::ToObj2MultiAssociationTool::m_tmpvec
std::vector< Obj2 > m_tmpvec
Definition: ToObj2MultiAssociationTool.h:80
D3PDTest::ToObj2MultiAssociationTool::m_which
int m_which
Definition: ToObj2MultiAssociationTool.h:75
D3PDTest::ToObj2MultiAssociationTool::reset
virtual StatusCode reset(const Obj1 &p)
Start the iteration for a new association.
Definition: ToObj2MultiAssociationTool.cxx:40
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:195
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
D3PDTest
Definition: MapDumper.h:25
D3PDTest::Obj2
Test class for D3PD maker.
Definition: Obj2.h:28