ATLAS Offline Software
Public Types | Static Public Member Functions | List of all members
CaloClusterLinkTemplate< CONT, DOBJ, ELEM > Class Template Reference

template class for CaloClusterLink
More...

#include <CaloClusterLinkTemplate.h>

Collaboration diagram for CaloClusterLinkTemplate< CONT, DOBJ, ELEM >:

Public Types

typedef ELEM link_type
 

Static Public Member Functions

static bool setLink (CONT *pCont, DOBJ *pDat, ELEM &rElm)
 

Detailed Description

template<class CONT, class DOBJ = typename CONT::base_value_type, class ELEM = ElementLink<CONT>>
class CaloClusterLinkTemplate< CONT, DOBJ, ELEM >

template class for CaloClusterLink

Definition at line 22 of file CaloClusterLinkTemplate.h.

Member Typedef Documentation

◆ link_type

template<class CONT , class DOBJ = typename CONT::base_value_type, class ELEM = ElementLink<CONT>>
typedef ELEM CaloClusterLinkTemplate< CONT, DOBJ, ELEM >::link_type

Definition at line 24 of file CaloClusterLinkTemplate.h.

Member Function Documentation

◆ setLink()

template<class CONT , class DOBJ = typename CONT::base_value_type, class ELEM = ElementLink<CONT>>
static bool CaloClusterLinkTemplate< CONT, DOBJ, ELEM >::setLink ( CONT *  pCont,
DOBJ *  pDat,
ELEM &  rElm 
)
inlinestatic

Definition at line 26 of file CaloClusterLinkTemplate.h.

27  {
28  // std::cout << "[LinkHandler] invoked for container type \042"
29  // << std::type_id(pCont).name() << "\042 and data object type \042"
30  // << std::type_id(pDat).name() << std::endl;
31  bool checkOut(pCont != 0);
32  // check input
33  if ( checkOut )
34  {
35  // data object has valid pointer, set only storable
36  if ( pDat != 0 )
37  {
38  pCont->push_back(pDat);
39  checkOut = rElm.setStorableObject(*pCont);
40 
41  }
42  // no data object set, create complete EL
43  else
44  {
45  DOBJ* pNewDat = new DOBJ();
46  pCont->push_back(pNewDat);
47  checkOut = rElm.toContainedElement(*pCont,pNewDat);
48  }
49  }
50  return checkOut;
51 
52  }

The documentation for this class was generated from the following file: