2 #ifndef DataFormats_Common_Holder_h 3 #define DataFormats_Common_Holder_h 16 template <
class T,
class REF>
17 class Holder :
public BaseHolder<T> {
21 explicit Holder(REF
const& iRef);
25 virtual BaseHolder<T>*
clone()
const override;
27 virtual T const*
getPtr()
const override;
28 virtual ProductID
id()
const override;
29 virtual size_t key()
const override;
30 virtual bool isEqualTo(BaseHolder<T>
const& rhs)
const override;
36 virtual std::unique_ptr<RefHolderBase>
holder()
const override {
39 virtual std::unique_ptr<BaseVectorHolder<T> >
makeVectorHolder()
const override;
65 template <
class T,
class REF>
71 template <
class T,
class REF>
77 template <
class T,
class REF>
87 template <
class T,
class REF>
95 template <
class T,
class REF>
100 template <
class T,
class REF>
108 template <
class T,
class REF>
113 return ref_.operator->();
116 template <
class T,
class REF>
124 template <
class T,
class REF>
130 return h && (
getRef() == h->getRef());
135 template <
class T,
class REF>
143 template <
class T,
class REF>
146 return ref_.productGetter();
149 template <
class T,
class REF>
155 bool conversion_worked = (h != 0);
157 if (conversion_worked)
160 msg =
typeid(REF).
name();
162 return conversion_worked;
172 namespace reftobase {
174 template <
typename T,
typename REF>
177 return helper::makeVectorHolder();
185 namespace reftobase {
187 template <
class T,
class REF>
virtual bool fillRefIfMyTypeMatches(RefHolderBase &fillme, std::string &msg) const override
virtual bool isAvailable() const override
virtual bool isEqualTo(BaseHolder< T > const &rhs) const override
Holder & operator=(Holder const &rhs)
virtual std::unique_ptr< RefHolderBase > holder() const override
virtual EDProductGetter const * productGetter() const override
REF const & getRef() const
virtual T const * getPtr() const override
virtual size_t key() const override
#define CMS_CLASS_VERSION(_version_)
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
def template(fileName, svg, replaceme="REPLACEME")
virtual BaseHolder< T > * clone() const override
void setRef(REF const &r)
virtual std::unique_ptr< BaseVectorHolder< T > > makeVectorHolder() const override
virtual ProductID id() const override
virtual bool isTransient() const override