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

#include <ShowerProducedPtrsHolder.hh>

Inheritance diagram for reco::shower::ShowerUniqueAssnPtr< T >:
reco::shower::ShowerUniqueProduerPtrBase

Public Member Functions

 ShowerUniqueAssnPtr (const std::string &Instancename)
 
std::unique_ptr< T > & GetPtr ()
 
void reset () override
 
void MoveToEvent (art::Event &evt) override
 
void AddDataProduct (const reco::shower::ShowerElementHolder &selement_holder, const std::string &Name) override
 
std::string GetType () const override
 
std::string GetInstanceName () const override
 
- Public Member Functions inherited from reco::shower::ShowerUniqueProduerPtrBase
virtual ~ShowerUniqueProduerPtrBase () noexcept=default
 
virtual int GetVectorPtrSize () const
 

Private Attributes

std::unique_ptr< T > showeruniqueptr
 
bool ptr
 
std::string InstanceName
 

Detailed Description

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

Definition at line 21 of file ShowerProducedPtrsHolder.hh.

Constructor & Destructor Documentation

template<class T>
reco::shower::ShowerUniqueAssnPtr< T >::ShowerUniqueAssnPtr ( const std::string Instancename)
inline

Definition at line 146 of file ShowerProducedPtrsHolder.hh.

146  {
147  ptr = 1;
148  showeruniqueptr = std::make_unique<T>();
149  InstanceName = Instancename;
150  }

Member Function Documentation

template<class T>
void reco::shower::ShowerUniqueAssnPtr< T >::AddDataProduct ( const reco::shower::ShowerElementHolder selement_holder,
const std::string Name 
)
inlineoverridevirtual

Implements reco::shower::ShowerUniqueProduerPtrBase.

Definition at line 172 of file ShowerProducedPtrsHolder.hh.

172  {
173  throw cet::exception("ShowerUniqueAssnPtr") << "The creator of this code has failed you. Please contact Dominic Bakrer" << std::endl;
174  }
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
QTextStream & endl(QTextStream &s)
template<class T>
std::string reco::shower::ShowerUniqueAssnPtr< T >::GetInstanceName ( ) const
inlineoverridevirtual

Implements reco::shower::ShowerUniqueProduerPtrBase.

Definition at line 182 of file ShowerProducedPtrsHolder.hh.

182  {
183  return InstanceName;
184  }
template<class T>
std::unique_ptr<T>& reco::shower::ShowerUniqueAssnPtr< T >::GetPtr ( )
inline

Definition at line 153 of file ShowerProducedPtrsHolder.hh.

153  {
154  if(ptr){
155  return showeruniqueptr;
156  }
157  else{
158  throw cet::exception("ShowerUniqueAssnPtr") << "Element does not exist" << std::endl;
159  }
160  }
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
QTextStream & endl(QTextStream &s)
template<class T>
std::string reco::shower::ShowerUniqueAssnPtr< T >::GetType ( ) const
inlineoverridevirtual

Implements reco::shower::ShowerUniqueProduerPtrBase.

Definition at line 177 of file ShowerProducedPtrsHolder.hh.

177  {
178  return cet::demangle_symbol(typeid(showeruniqueptr.get()).name());
179  }
static QCString name
Definition: declinfo.cpp:673
template<class T>
void reco::shower::ShowerUniqueAssnPtr< T >::MoveToEvent ( art::Event evt)
inlineoverridevirtual

Implements reco::shower::ShowerUniqueProduerPtrBase.

Definition at line 167 of file ShowerProducedPtrsHolder.hh.

167  {
169  }
def move(depos, offset)
Definition: depos.py:107
ProductID put(std::unique_ptr< PROD > &&edp, std::string const &instance={})
Definition: DataViewImpl.h:686
template<class T>
void reco::shower::ShowerUniqueAssnPtr< T >::reset ( )
inlineoverridevirtual

Member Data Documentation

template<class T>
std::string reco::shower::ShowerUniqueAssnPtr< T >::InstanceName
private

Definition at line 196 of file ShowerProducedPtrsHolder.hh.

template<class T>
bool reco::shower::ShowerUniqueAssnPtr< T >::ptr
private

Definition at line 193 of file ShowerProducedPtrsHolder.hh.

template<class T>
std::unique_ptr<T> reco::shower::ShowerUniqueAssnPtr< T >::showeruniqueptr
private

Definition at line 190 of file ShowerProducedPtrsHolder.hh.


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