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 BaseHolder<T>*
clone()
const override;
27 T const*
getPtr()
const override;
28 ProductID
id()
const override;
29 size_t key()
const override;
30 bool isEqualTo(BaseHolder<T>
const& rhs)
const override;
36 std::unique_ptr<RefHolderBase>
holder()
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 !=
nullptr);
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>
bool fillRefIfMyTypeMatches(RefHolderBase &fillme, std::string &msg) const override
bool isEqualTo(BaseHolder< T > const &rhs) const override
Holder & operator=(Holder const &rhs)
EDProductGetter const * productGetter() const override
REF const & getRef() const
T const * getPtr() const override
size_t key() const override
#define CMS_CLASS_VERSION(_version_)
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
def template(fileName, svg, replaceme="REPLACEME")
bool isAvailable() const override
std::unique_ptr< RefHolderBase > holder() const override
BaseHolder< T > * clone() const override
void setRef(REF const &r)
std::unique_ptr< BaseVectorHolder< T > > makeVectorHolder() const override
bool isTransient() const override
ProductID id() const override