All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 28 of file ShowerProducedPtrsHolder.hh.

Constructor & Destructor Documentation

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

Definition at line 160 of file ShowerProducedPtrsHolder.hh.

160  {
161  ptr = 1;
162  showeruniqueptr = std::make_unique<T>();
163  InstanceName = Instancename;
164  }

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 186 of file ShowerProducedPtrsHolder.hh.

186  {
187  throw cet::exception("ShowerUniqueAssnPtr") << "The creator of this code has failed you. Please contact Dominic Bakrer" << std::endl;
188  }
template<class T>
std::string reco::shower::ShowerUniqueAssnPtr< T >::GetInstanceName ( ) const
inlineoverridevirtual

Implements reco::shower::ShowerUniqueProduerPtrBase.

Definition at line 196 of file ShowerProducedPtrsHolder.hh.

196  {
197  return InstanceName;
198  }
template<class T>
std::unique_ptr<T>& reco::shower::ShowerUniqueAssnPtr< T >::GetPtr ( )
inline

Definition at line 167 of file ShowerProducedPtrsHolder.hh.

167  {
168  if(ptr){
169  return showeruniqueptr;
170  }
171  else{
172  throw cet::exception("ShowerUniqueAssnPtr") << "Element does not exist" << std::endl;
173  }
174  }
template<class T>
std::string reco::shower::ShowerUniqueAssnPtr< T >::GetType ( ) const
inlineoverridevirtual

Implements reco::shower::ShowerUniqueProduerPtrBase.

Definition at line 191 of file ShowerProducedPtrsHolder.hh.

191  {
192  return cet::demangle_symbol(typeid(showeruniqueptr.get()).name());
193  }
then echo fcl name
template<class T>
void reco::shower::ShowerUniqueAssnPtr< T >::MoveToEvent ( art::Event &  evt)
inlineoverridevirtual

Implements reco::shower::ShowerUniqueProduerPtrBase.

Definition at line 181 of file ShowerProducedPtrsHolder.hh.

181  {
182  evt.put(std::move(showeruniqueptr), InstanceName);
183  }
TCEvent evt
Definition: DataStructs.cxx:8
template<class T>
void reco::shower::ShowerUniqueAssnPtr< T >::reset ( )
inlineoverridevirtual

Implements reco::shower::ShowerUniqueProduerPtrBase.

Definition at line 176 of file ShowerProducedPtrsHolder.hh.

176  {
177  showeruniqueptr.reset(new T());
178  }

Member Data Documentation

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

Definition at line 210 of file ShowerProducedPtrsHolder.hh.

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

Definition at line 207 of file ShowerProducedPtrsHolder.hh.

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

Definition at line 204 of file ShowerProducedPtrsHolder.hh.


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