ATLAS Offline Software
Public Member Functions | Private Attributes | Friends | List of all members
SGTutorial::LinkObj Class Reference

#include <LinkObj.h>

Collaboration diagram for SGTutorial::LinkObj:

Public Member Functions

 LinkObj ()
 
 ~LinkObj ()
 
void setObjLink (MyDataObj &)
 
void setContLink (std::vector< MyElement > &, const MyElement &)
 
void setContLink (std::vector< MyElement > &, int)
 
const MyDataObjmyLinkedObj ()
 
const MyElementmyLinkedElement ()
 

Private Attributes

DataLink< MyDataObjm_objLink
 
ElementLink< std::vector< MyElement > > m_contLink
 

Friends

template<class OST >
OST & operator<< (OST &ost, LinkObj &rhs)
 

Detailed Description

Definition at line 20 of file LinkObj.h.

Constructor & Destructor Documentation

◆ LinkObj()

SGTutorial::LinkObj::LinkObj ( )
inline

Definition at line 24 of file LinkObj.h.

24 {}

◆ ~LinkObj()

SGTutorial::LinkObj::~LinkObj ( )
inline

Definition at line 25 of file LinkObj.h.

25 {}

Member Function Documentation

◆ myLinkedElement()

const MyElement & LinkObj::myLinkedElement ( )

Definition at line 46 of file LinkObj.cxx.

47 {
48  static const MyElement replaceMe;
49  return replaceMe;
50 
51 }

◆ myLinkedObj()

const MyDataObj & LinkObj::myLinkedObj ( )

Definition at line 40 of file LinkObj.cxx.

41 {
42  static const MyDataObj replaceMe;
43  return replaceMe;
44 }

◆ setContLink() [1/2]

void LinkObj::setContLink ( std::vector< MyElement > &  ,
const MyElement  
)

Definition at line 20 of file LinkObj.cxx.

22 {
23  // Link to an element of a collection
24  // set it to refer to its target
25 
26  // Here we pass the element to the DataLink and it figures out the
27  // index... which locates the element in the collection.
28 }

◆ setContLink() [2/2]

void LinkObj::setContLink ( std::vector< MyElement > &  ,
int   
)

Definition at line 30 of file LinkObj.cxx.

32 {
33  // Link to an element of a collection
34  // set it to refer to its target
35 
36  // Faster method: we pass the index directly
37 
38 }

◆ setObjLink()

void LinkObj::setObjLink ( MyDataObj )

Definition at line 14 of file LinkObj.cxx.

15 {
16  // Link to a data object
17  // set it to refer to its target
18 }

Friends And Related Function Documentation

◆ operator<<

template<class OST >
OST& operator<< ( OST &  ost,
LinkObj rhs 
)
friend

Definition at line 54 of file LinkObj.h.

54  {
55  ost << "LinkObj: link to MyDataObj -> " << rhs.myLinkedObj()
56  << "\n link to MyElement[" << rhs.m_contLink.index() << "] -> "
57  << *rhs.m_contLink;
58  return ost;
59  }

Member Data Documentation

◆ m_contLink

ElementLink< std::vector<MyElement> > SGTutorial::LinkObj::m_contLink
private

Definition at line 49 of file LinkObj.h.

◆ m_objLink

DataLink<MyDataObj> SGTutorial::LinkObj::m_objLink
private

Definition at line 48 of file LinkObj.h.


The documentation for this class was generated from the following files:
python.trigbs_prescaleL1.ost
ost
Definition: trigbs_prescaleL1.py:104
SGTutorial::MyElement
Definition: MyElement.h:13
SGTutorial::MyDataObj
Definition: Tutorial/MyDataObj.h:13