LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
reco::shower::ShowerProperty< T, T2 > Class Template Reference

#include "ShowerElementHolder.hh"

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

Public Member Functions

 ShowerProperty (T &Element, T2 &ElementErr)
 
int GetShowerPropertyError (T2 &ElementErr) const
 
void SetShowerProperty (T &Element, T2 &ElementErr)
 
void Clear ()
 
void SetShowerElement (T &Element)
 
int GetShowerElement (T &Element) const
 
GetShowerElement () const
 
T & GetShowerElementRef ()
 
std::string GetType () const override
 
virtual bool CheckTag () const
 
virtual void SetCheckTag (bool &check)
 
bool CheckShowerElement () const
 

Protected Attributes

element
 
bool elementPtr
 

Private Attributes

T2 propertyErr
 

Detailed Description

template<class T, class T2>
class reco::shower::ShowerProperty< T, T2 >

Definition at line 37 of file ShowerElementHolder.hh.

Constructor & Destructor Documentation

template<class T, class T2>
reco::shower::ShowerProperty< T, T2 >::ShowerProperty ( T &  Element,
T2 &  ElementErr 
)
inline

Member Function Documentation

bool reco::shower::ShowerElementBase::CheckShowerElement ( ) const
inlineinherited

Definition at line 60 of file ShowerElementHolder.hh.

References reco::shower::ShowerElementBase::elementPtr.

61  {
62  if (elementPtr)
63  return true;
64  else
65  return false;
66  }
virtual bool reco::shower::ShowerElementBase::CheckTag ( ) const
inlinevirtualinherited

Reimplemented in reco::shower::ShowerDataProduct< T >.

Definition at line 46 of file ShowerElementHolder.hh.

47  {
48  throw cet::exception("ShowerElementHolder")
49  << "Trying to check an element that is not a product" << std::endl;
50  }
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
template<class T, class T2>
void reco::shower::ShowerProperty< T, T2 >::Clear ( )
inline
template<class T>
int reco::shower::ShowerElementAccessor< T >::GetShowerElement ( T &  Element) const
inlineinherited
template<class T>
T reco::shower::ShowerElementAccessor< T >::GetShowerElement ( ) const
inlineinherited

Definition at line 116 of file ShowerElementHolder.hh.

References reco::shower::ShowerElementBase::elementPtr.

117  {
118  if (!this->elementPtr) {
119  throw cet::exception("ShowerElementHolder")
120  << "The element that is being accessed is not set" << std::endl;
121  }
122  return element;
123  }
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
template<class T>
T& reco::shower::ShowerElementAccessor< T >::GetShowerElementRef ( )
inlineinherited

Definition at line 107 of file ShowerElementHolder.hh.

References reco::shower::ShowerElementBase::elementPtr.

Referenced by reco::shower::ShowerElementHolder::GetEventElement().

108  {
109  if (!this->elementPtr) {
110  throw cet::exception("ShowerElementHolder")
111  << "The element that is being accessed is not set" << std::endl;
112  }
113  return element;
114  }
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
template<class T, class T2>
int reco::shower::ShowerProperty< T, T2 >::GetShowerPropertyError ( T2 &  ElementErr) const
inline

Definition at line 183 of file ShowerElementHolder.hh.

References reco::shower::ShowerElementBase::elementPtr.

Referenced by reco::shower::ShowerElementHolder::GetElementAndError().

184  {
185  if (this->elementPtr) {
186  ElementErr = propertyErr;
187  return 0;
188  }
189  else {
190  return 1;
191  }
192  }
template<class T>
std::string reco::shower::ShowerElementAccessor< T >::GetType ( ) const
inlineoverridevirtualinherited

Implements reco::shower::ShowerElementBase.

Definition at line 126 of file ShowerElementHolder.hh.

126 { return cet::demangle_symbol(typeid(element).name()); }
virtual void reco::shower::ShowerElementBase::SetCheckTag ( bool &  check)
inlinevirtualinherited

Reimplemented in reco::shower::ShowerDataProduct< T >.

Definition at line 51 of file ShowerElementHolder.hh.

References reco::shower::ShowerElementBase::GetType().

52  {
53  throw cet::exception("ShowerElementHolder")
54  << "Trying to set an element that is not a product" << std::endl;
55  }
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
template<class T>
void reco::shower::ShowerElementAccessor< T >::SetShowerElement ( T &  Element)
inlineinherited
template<class T, class T2>
void reco::shower::ShowerProperty< T, T2 >::SetShowerProperty ( T &  Element,
T2 &  ElementErr 
)
inline

Member Data Documentation

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

Definition at line 129 of file ShowerElementHolder.hh.

template<class T, class T2>
T2 reco::shower::ShowerProperty< T, T2 >::propertyErr
private

Definition at line 209 of file ShowerElementHolder.hh.


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