Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:03:53

0001 #ifndef DataFormats_Common_RefHolder_h
0002 #define DataFormats_Common_RefHolder_h
0003 #include "DataFormats/Common/interface/RefHolder_.h"
0004 
0005 #include "DataFormats/Common/interface/IndirectVectorHolder.h"
0006 #include "DataFormats/Common/interface/RefVectorHolder.h"
0007 #include "DataFormats/Common/interface/RefVector.h"
0008 #include "DataFormats/Common/interface/HolderToVectorTrait.h"
0009 #include <memory>
0010 
0011 namespace edm {
0012   namespace reftobase {
0013     template <class REF>
0014     std::unique_ptr<RefVectorHolderBase> RefHolder<REF>::makeVectorHolder() const {
0015       typedef typename RefHolderToRefVectorTrait<REF>::type helper;
0016       return helper::makeVectorHolder();
0017     }
0018   }  // namespace reftobase
0019 }  // namespace edm
0020 
0021 #include "DataFormats/Common/interface/RefKeyTrait.h"
0022 
0023 namespace edm {
0024   namespace reftobase {
0025     template <class REF>
0026     size_t RefHolder<REF>::key() const {
0027       typedef typename RefKeyTrait<REF>::type helper;
0028       return helper::key(ref_);
0029     }
0030 
0031   }  // namespace reftobase
0032 }  // namespace edm
0033 
0034 #endif