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

#include "ShowerElementHolder.hh"

Inheritance diagram for reco::shower::EventDataProduct< T >:
reco::shower::ShowerElementAccessor< T > reco::shower::ShowerElementBase

Public Member Functions

 EventDataProduct (T &Element)
 
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
 
void Clear ()
 

Protected Attributes

element
 
bool elementPtr
 

Detailed Description

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

Definition at line 35 of file ShowerElementHolder.hh.

Constructor & Destructor Documentation

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>
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>
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

Member Data Documentation

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

Definition at line 129 of file ShowerElementHolder.hh.


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