Public Member Functions | Protected Attributes | List of all members
reco::shower::ShowerElementAccessor< T > Class Template Reference

#include <ShowerElementHolder.hh>

Inheritance diagram for reco::shower::ShowerElementAccessor< T >:
reco::shower::ShowerElementBase reco::shower::EventDataProduct< T > reco::shower::ShowerDataProduct< T > reco::shower::ShowerProperty< T, T2 >

Public Member Functions

 ShowerElementAccessor (T &Element)
 
void SetShowerElement (T &Element)
 
int GetShowerElement (T &Element) const
 
T & GetShowerElementRef ()
 
GetShowerElement () const
 
std::string GetType () const override
 
- Public Member Functions inherited from reco::shower::ShowerElementBase
virtual ~ShowerElementBase () noexcept=default
 
virtual bool CheckTag () const
 
virtual void SetCheckTag (bool &check)
 
bool CheckShowerElement () const
 
void Clear ()
 

Protected Attributes

element
 
- Protected Attributes inherited from reco::shower::ShowerElementBase
bool elementPtr
 

Detailed Description

template<class T>
class reco::shower::ShowerElementAccessor< T >

Definition at line 28 of file ShowerElementHolder.hh.

Constructor & Destructor Documentation

template<class T>
reco::shower::ShowerElementAccessor< T >::ShowerElementAccessor ( T &  Element)
inline

Definition at line 75 of file ShowerElementHolder.hh.

75  :
76  element(Element){
77  this->elementPtr = 1;
78  // this->element = Element;
79  }

Member Function Documentation

template<class T>
int reco::shower::ShowerElementAccessor< T >::GetShowerElement ( T &  Element) const
inline

Definition at line 88 of file ShowerElementHolder.hh.

88  {
89  if(this->elementPtr){
90  Element = element;
91  return 0;
92  }
93  else{
94  return 1;
95  }
96  }
template<class T>
T reco::shower::ShowerElementAccessor< T >::GetShowerElement ( ) const
inline

Definition at line 106 of file ShowerElementHolder.hh.

106  {
107  if(!this->elementPtr){
108  throw cet::exception("ShowerElementHolder") << "The element that is being accessed is not set" << std::endl;
109  }
110  return element;
111  }
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
QTextStream & endl(QTextStream &s)
template<class T>
T& reco::shower::ShowerElementAccessor< T >::GetShowerElementRef ( )
inline

Definition at line 99 of file ShowerElementHolder.hh.

99  {
100  if(!this->elementPtr){
101  throw cet::exception("ShowerElementHolder") << "The element that is being accessed is not set" << std::endl;
102  }
103  return element;
104  }
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
QTextStream & endl(QTextStream &s)
template<class T>
std::string reco::shower::ShowerElementAccessor< T >::GetType ( ) const
inlineoverridevirtual

Implements reco::shower::ShowerElementBase.

Definition at line 114 of file ShowerElementHolder.hh.

114  {
115  return cet::demangle_symbol(typeid(element).name());
116  }
static QCString name
Definition: declinfo.cpp:673
template<class T>
void reco::shower::ShowerElementAccessor< T >::SetShowerElement ( T &  Element)
inline

Definition at line 82 of file ShowerElementHolder.hh.

Member Data Documentation

template<class T>
T reco::shower::ShowerElementAccessor< T >::element
protected

Definition at line 119 of file ShowerElementHolder.hh.


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