CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Ref.h
Go to the documentation of this file.
1 #ifndef DataFormats_Common_Ref_h
2 #define DataFormats_Common_Ref_h
3 
4 /*----------------------------------------------------------------------
5 
6 Ref: A template for a interproduct reference to a member of a product_.
7 
8 ----------------------------------------------------------------------*/
74 /*----------------------------------------------------------------------
75 // This defines the public interface to the class Ref<C, T, F>.
76 // C is the collection type.
77 // T (default C::value_type) is the type of an element in the collection.
78 //
79 // ProductID productID is the product ID of the collection.
80 // key_type itemKey is the key of the element in the collection.
81 // C::value_type *itemPtr is a C++ pointer to the element
82 // Ref<C, T, F> const& ref is another Ref<C, T, F>
83 
84 // Constructors
85  Ref(); // Default constructor
86  Ref(Ref<C, T> const& ref); // Copy constructor (default, not explicitly specified)
87 
88  Ref(Handle<C> const& handle, key_type itemKey);
89  Ref(ProductID pid, key_type itemKey, EDProductGetter const* prodGetter);
90 
91 // Destructor
92  virtual ~Ref() {}
93 
94  // Operators and methods
95  Ref<C, T>& operator=(Ref<C, T> const&); // assignment (default, not explicitly specified)
96  T const& operator*() const; // dereference
97  T const* const operator->() const; // member dereference
98  bool operator==(Ref<C, T> const& ref) const; // equality
99  bool operator!=(Ref<C, T> const& ref) const; // inequality
100  bool operator<(Ref<C, T> const& ref) const; // ordering
101  bool isNonnull() const; // true if an object is referenced
102  bool isNull() const; // equivalent to !isNonnull()
103  bool operator!() const; // equivalent to !isNonnull()
104  ----------------------------------------------------------------------*/
105 
117 
118 #include "boost/functional.hpp"
119 #include "boost/call_traits.hpp"
120 #include "boost/type_traits.hpp"
121 #include "boost/mpl/has_xxx.hpp"
122 #include "boost/utility/enable_if.hpp"
123 
124 BOOST_MPL_HAS_XXX_TRAIT_DEF(key_compare)
125 
126  template <typename C, typename K>
127  typename boost::enable_if<has_key_compare<C>, bool>::type
128  compare_key(K const& lhs, K const& rhs) {
129  typedef typename C::key_compare comparison_functor;
130  return comparison_functor()(lhs, rhs);
131  }
132 
133  template <typename C, typename K>
134  typename boost::disable_if<has_key_compare<C>, bool>::type
135  compare_key(K const& lhs, K const& rhs) {
136  return lhs < rhs;
137  }
138 
140 
141 namespace edm {
142  template<typename C, typename T, typename F>
143  class RefVector;
144 
145  template<typename T>
146  class RefToBaseVector;
147 
148  template <typename C,
149  typename T = typename refhelper::ValueTrait<C>::value,
150  typename F = typename refhelper::FindTrait<C, T>::value>
151  class Ref {
152  private:
155  friend class RefVectorIterator<C, T, F>;
156  friend class RefVector<C, T, F>;
157  friend class RefVector<RefVector<C, T, F>, T, VF>;
158  friend class RefVector<RefVector<RefVector<C, T, F>, T, VF>, T, VF>;
159  friend class RefVector<RefVector<C, T, F>, T, VBF>;
160  friend class RefVector<RefVector<RefVector<C, T, F>, T, VBF>, T, VBF>;
162 
163  public:
165  typedef C product_type;
166  typedef T value_type;
167  typedef T const element_type; //used for generic programming
168  typedef F finder_type;
169  typedef typename boost::binary_traits<F>::second_argument_type argument_type;
173 
176 
178  Ref(Handle<C> const& handle, key_type itemKey, bool setNow=true);
179 
181  Ref(OrphanHandle<C> const& handle, key_type itemKey, bool setNow=true);
182 
184  // Note. refvector[index] returns a Ref where index is the index into
185  // the RefVector. This index argument is the index into the COLLECTION,
186  // not the index into the RefVector.
187  Ref(RefVector<C, T, F> const& refvector, key_type itemKey, bool setNow=true);
188 
190  // An exception will be thrown if an attempt is made to persistify
191  // any object containing this Ref. Also, in the future work will
192  // be done to throw an exception if an attempt is made to put any object
193  // containing this Ref into an event(or run or lumi).
194  Ref(C const* product, key_type itemKey, bool setNow=true);
195 
197  // An exception will be thrown if an attempt is made to persistify
198  // any object containing this Ref. Also, in the future work will
199  Ref(TestHandle<C> const& handle, key_type itemKey, bool setNow=true);
200 
204  Ref(ProductID const& productID, key_type itemKey, EDProductGetter const* prodGetter) :
205  product_(productID, 0, mustBeNonZero(prodGetter, "Ref", productID), false), index_(itemKey) {
206  }
207 
209  // It is an error (not diagnosable at compile- or run-time) to call
210  // this constructor with a pointer to a T unless the pointed-to T
211  // object is already in a collection of type C stored in the
212  // Event. The given ProductID must be the id of the collection in
213  // the Event.
214 
215  Ref(ProductID const& iProductID, T const* /*item*/, key_type iItemKey, C const* iProduct) :
216  product_(iProductID, iProduct, 0, false), index_(iItemKey)
217  { }
218 
222 
223  explicit Ref(ProductID const& iId) :
224  product_(iId, 0, 0, false), index_(key_traits<key_type>::value)
225  { }
226 
228  Ref(RefProd<C> const& refProd, key_type itemKey);
229 
231  ~Ref() {}
232 
234  T const&
235  operator*() const;
236 
238  T const*
239  operator->() const;
240 
242  T const* get() const {
243  return isNull() ? 0 : this->operator->();
244  }
245 
247  bool isNull() const {return !isNonnull(); }
248 
251 
253  bool operator!() const {return isNull();}
254 
256  ProductID id() const {return product_.id();}
257 
260 
262  // Accessor must get the product if necessary
263  C const* product() const;
264 
266  key_type key() const {return index_;}
267 
268  // This one just for backward compatibility. Will be removed soon.
269  key_type index() const {return index_;}
270 
272  bool hasProductCache() const {return product_.productPtr() != 0;}
273 
276  bool isAvailable() const {return product_.isAvailable();}
277 
279  bool isTransient() const {return product_.isTransient();}
280 
281  RefCore const& refCore() const {return product_;}
282 
283  //Used by ROOT storage
285  // private:
286  // Constructor from member of RefVector
287  Ref(RefCore const& iRefCore, key_type const& iKey) :
288  product_(iRefCore), index_(iKey) {
289  }
290 
291  private:
292  // Compile time check that the argument is a C* or C const*
293  // or derived from it.
294  void checkTypeAtCompileTime(C const*) {}
295 
296  mutable RefCore product_;
298 
299  };
300 
301  //***************************
302  //Specialization for a vector
303  //***************************
304 #define REF_FOR_VECTOR_ARGS std::vector<E>,typename refhelper::ValueTrait<std::vector<E> >::value,typename refhelper::FindTrait<std::vector<E>, typename refhelper::ValueTrait<std::vector<E> >::value>::value
305 
306  template <typename E>
308  private:
313  friend class RefVectorIterator<std::vector<E>, T, F>;
314  friend class RefVector<std::vector<E>, T, F>;
315  friend class RefVector<RefVector<std::vector<E>, T, F>, T, VF>;
316  friend class RefVector<RefVector<RefVector<std::vector<E>, T, F>, T, VF>, T, VF>;
317  friend class RefVector<RefVector<std::vector<E>, T, F>, T, VBF>;
318  friend class RefVector<RefVector<RefVector<std::vector<E>, T, F>, T, VBF>, T, VBF>;
320 
321  public:
323  typedef std::vector<E> product_type;
324  typedef typename refhelper::ValueTrait<std::vector<E> >::value value_type;
325  typedef value_type const element_type; //used for generic programming
326  typedef typename refhelper::FindTrait<std::vector<E>, typename refhelper::ValueTrait<std::vector<E> >::value>::value finder_type;
327  typedef typename boost::binary_traits<F>::second_argument_type argument_type;
328  typedef unsigned int key_type;
331 
333  Ref() : product_() {}
334 
336  Ref(Handle<product_type> const& handle, key_type itemKey, bool setNow=true);
337 
339  Ref(OrphanHandle<product_type> const& handle, key_type itemKey, bool setNow=true);
340 
342  // Note. refvector[index] returns a Ref where index is the index into
343  // the RefVector. This index argument is the index into the COLLECTION,
344  // not the index into the RefVector.
345  Ref(RefVector<product_type, T, F> const& refvector, key_type itemKey, bool setNow=true);
346 
348  // An exception will be thrown if an attempt is made to persistify
349  // any object containing this Ref. Also, in the future work will
350  // be done to throw an exception if an attempt is made to put any object
351  // containing this Ref into an event(or run or lumi).
352  Ref(product_type const* product, key_type itemKey, bool setNow=true);
353 
355  // An exception will be thrown if an attempt is made to persistify
356  // any object containing this Ref. Also, in the future work will
357  Ref(TestHandle<product_type> const& handle, key_type itemKey, bool setNow=true);
358 
362  Ref(ProductID const& productID, key_type itemKey, EDProductGetter const* prodGetter) :
363  product_(productID, 0, mustBeNonZero(prodGetter, "Ref", productID), false,itemKey) {
364  }
365 
367  // It is an error (not diagnosable at compile- or run-time) to call
368  // this constructor with a pointer to a T unless the pointed-to T
369  // object is already in a collection of type C stored in the
370  // Event. The given ProductID must be the id of the collection in
371  // the Event.
372 
373  Ref(ProductID const& iProductID, T const* /*item*/, key_type iItemKey, product_type const* iProduct) :
374  product_(iProductID, iProduct, 0, false,iItemKey)
375  { }
376 
380 
381  explicit Ref(ProductID const& iId) :
382  product_(iId, 0, 0, false,key_traits<key_type>::value)
383  { }
384 
386  Ref(RefProd<product_type> const& refProd, key_type itemKey);
387 
389  ~Ref() {}
390 
392  T const&
393  operator*() const;
394 
396  T const*
397  operator->() const;
398 
400  T const* get() const {
401  return isNull() ? 0 : this->operator->();
402  }
403 
405  bool isNull() const {return !isNonnull(); }
406 
408  bool isNonnull() const { return key()!=edm::key_traits<key_type>::value; }
409 
411  bool operator!() const {return isNull();}
412 
414  ProductID id() const {return product_.id();}
415 
418 
420  // Accessor must get the product if necessary
421  product_type const* product() const;
422 
424  key_type key() const {return product_.index();}
425 
426  // This one just for backward compatibility. Will be removed soon.
427  key_type index() const {return product_.index();}
428 
430  bool hasProductCache() const {return product_.productPtr() != 0;}
431 
434  bool isAvailable() const {return product_.isAvailable();}
435 
437  bool isTransient() const {return product_.isTransient();}
438 
439  RefCore const& refCore() const {return product_.toRefCore();}
440 
441  //Used by ROOT storage
443  // private:
444  // Constructor from member of RefVector
445  Ref(RefCore const& iRefCore, key_type const& iKey) :
446  product_(iRefCore,iKey) {
447  }
448 
449  private:
450  // Compile time check that the argument is a C* or C const*
451  // or derived from it.
453 
455 
456  };
457 
458 }
459 
463 
464 namespace edm {
466  template <typename C, typename T, typename F>
467  inline
468  Ref<C, T, F>::Ref(Handle<C> const& handle, key_type itemKey, bool setNow) :
469  product_(handle.id(), handle.product(), 0, false), index_(itemKey){
471  assert(key() == itemKey);
472 
473  if (setNow) {getPtr_<C, T, F>(product_, index_);}
474  }
475 
477  template <typename E>
478  inline
479  Ref<REF_FOR_VECTOR_ARGS>::Ref(Handle<std::vector<E> > const& handle, key_type itemKey, bool setNow) :
480  product_(handle.id(), handle.product(), 0, false,itemKey){
481  checkTypeAtCompileTime(handle.product());
482  assert(key() == itemKey);
483 
484  if (setNow) {getPtr_<REF_FOR_VECTOR_ARGS>(product_.toRefCore(), index());}
485  }
486 
488  template <typename C, typename T, typename F>
489  inline
490  Ref<C, T, F>::Ref(OrphanHandle<C> const& handle, key_type itemKey, bool setNow) :
491  product_(handle.id(), handle.product(), 0, false), index_(itemKey) {
493  assert(key() == itemKey);
494 
495  if (setNow) {getPtr_<C, T, F>(product_, index_);}
496  }
497 
499  template <typename E>
500  inline
501  Ref<REF_FOR_VECTOR_ARGS>::Ref(OrphanHandle<std::vector<E> > const& handle, key_type itemKey, bool setNow) :
502  product_(handle.id(), handle.product(), 0, false,itemKey) {
503  checkTypeAtCompileTime(handle.product());
504  assert(key() == itemKey);
505 
506  if (setNow) {getPtr_<REF_FOR_VECTOR_ARGS>(product_.toRefCore(), key());}
507  }
508 
510  template <typename C, typename T, typename F>
511  inline
512  Ref<C, T, F>::Ref(RefVector<C, T, F> const& refvector, key_type itemKey, bool setNow) :
513  product_(refvector.id(), refvector.product(), 0, refvector.isTransient()), index_(itemKey) {
514  checkTypeAtCompileTime(refvector.product());
515  assert(key() == itemKey);
516 
517  if (setNow) {getPtr_<C, T, F>(product_, index_);}
518  }
519 
521  template <typename E>
522  inline
523  Ref<REF_FOR_VECTOR_ARGS>::Ref(RefVector<REF_FOR_VECTOR_ARGS> const& refvector, key_type itemKey, bool setNow) :
524  product_(refvector.id(), refvector.product(), 0, refvector.isTransient(),itemKey) {
525  checkTypeAtCompileTime(refvector.product());
526  assert(key() == itemKey);
527 
528  if (setNow) {getPtr_<REF_FOR_VECTOR_ARGS>(product_.toRefCore(), key());}
529  }
530 
532  // An exception will be thrown if an attempt is made to persistify
533  // any object containing this Ref. Also, in the future work will
534  // be done to throw an exception if an attempt is made to put any object
535  // containing this Ref into an event(or run or lumi).
536  // Note: It is legal for the referenced object to be put into the event
537  // and persistified. It is this Ref itself that cannot be persistified.
538  template <typename C, typename T, typename F>
539  inline
540  Ref<C, T, F>::Ref(C const* iProduct, key_type iItemKey, bool iSetNow) :
541  product_(ProductID(), iProduct, 0, true), index_(iProduct != 0 ? iItemKey : key_traits<key_type>::value) {
542  checkTypeAtCompileTime(iProduct);
543  assert(key() == (iProduct != 0 ? iItemKey : key_traits<key_type>::value));
544 
545  if (iSetNow && iProduct != 0) {getPtr_<C, T, F>(product_, index_);}
546  }
547 
548  template <typename E>
549  inline
550  Ref<REF_FOR_VECTOR_ARGS>::Ref(std::vector<E> const* iProduct, key_type iItemKey, bool iSetNow) :
551  product_(ProductID(), iProduct, 0, true,(iProduct != 0 ? iItemKey : key_traits<key_type>::value)) {
552  checkTypeAtCompileTime(iProduct);
553  assert(key() == (iProduct != 0 ? iItemKey : key_traits<key_type>::value));
554 
555  if (iSetNow && iProduct != 0) {getPtr_<REF_FOR_VECTOR_ARGS>(product_.toRefCore(), key());}
556  }
557 
559  // An exception will be thrown if an attempt is made to persistify any object containing this Ref.
560  template <typename C, typename T, typename F>
561  inline
562  Ref<C, T, F>::Ref(TestHandle<C> const& handle, key_type itemKey, bool setNow) :
563  product_(handle.id(), handle.product(), 0, true), index_(itemKey) {
565  assert(key() == itemKey);
566 
567  if (setNow) {getPtr_<C, T, F>(product_, index_);}
568  }
569 
570  template <typename E>
571  inline
572  Ref<REF_FOR_VECTOR_ARGS>::Ref(TestHandle<std::vector<E> > const& handle, key_type itemKey, bool setNow) :
573  product_(handle.id(), handle.product(), 0, true,itemKey) {
574  checkTypeAtCompileTime(handle.product());
575  assert(key() == itemKey);
576 
577  if (setNow) {getPtr_<REF_FOR_VECTOR_ARGS>(product_.toRefCore(), key());}
578  }
579 
581  template <typename C, typename T, typename F>
582  inline
583  Ref<C, T, F>::Ref(RefProd<C> const& refProd, key_type itemKey) :
584  product_(refProd.id(), refProd.refCore().productPtr(), refProd.refCore().productGetter(), refProd.refCore().isTransient()), index_(itemKey) {
585  assert(index() == itemKey);
586  }
587 
588  template <typename E>
589  inline
590  Ref<REF_FOR_VECTOR_ARGS>::Ref(RefProd<std::vector<E> > const& refProd, key_type itemKey) :
591  product_(refProd.id(), refProd.refCore().productPtr(), refProd.refCore().productGetter(), refProd.refCore().isTransient(),itemKey) {
592  assert(index() == itemKey);
593  }
594 
595 
597  // Accessor must get the product if necessary
598  template <typename C, typename T, typename F>
599  inline
600  C const*
602  return isNull() ? 0 : edm::template getProduct<C>(product_);
603  }
604  template <typename E>
605  inline
606  std::vector<E> const*
608  return isNull() ? 0 : edm::template getProduct<std::vector<E> >(product_.toRefCore());
609  }
610 
612  template <typename C, typename T, typename F>
613  inline
614  T const&
616  return *getPtr<C, T, F>(product_, index_);
617  }
618  template <typename E>
619  inline
622  return *getPtr<REF_FOR_VECTOR_ARGS>(product_.toRefCore(), key());
623  }
624 
626  template <typename C, typename T, typename F>
627  inline
628  T const*
630  return getPtr<C, T, F>(product_, index_);
631  }
632  template <typename E>
633  inline
636  return getPtr<REF_FOR_VECTOR_ARGS>(product_.toRefCore(), key());
637  }
638 
639  template <typename C, typename T, typename F>
640  inline
641  bool
642  operator==(Ref<C, T, F> const& lhs, Ref<C, T, F> const& rhs) {
643  return lhs.key() == rhs.key() && lhs.refCore() == rhs.refCore() ;
644  }
645 
646  template <typename C, typename T, typename F>
647  inline
648  bool
649  operator!=(Ref<C, T, F> const& lhs, Ref<C, T, F> const& rhs) {
650  return !(lhs == rhs);
651  }
652 
653  template <typename C, typename T, typename F>
654  inline
655  bool
656  operator<(Ref<C, T, F> const& lhs, Ref<C, T, F> const& rhs) {
659  return (lhs.refCore() == rhs.refCore() ? compare_key<C>(lhs.key(), rhs.key()) : lhs.refCore() < rhs.refCore());
660  }
661 
662 }
663 
668 
669 namespace edm {
670  namespace reftobase {
671 
672  template <typename T, typename REF>
674  static std::auto_ptr<BaseVectorHolder<T> > makeVectorHolder() {
675  typedef RefVector<typename REF::product_type,
676  typename REF::value_type,
677  typename REF::finder_type> REFV;
678  return std::auto_ptr<BaseVectorHolder<T> >(new VectorHolder<T, REFV>);
679  }
680  static std::auto_ptr<RefVectorHolderBase> makeVectorBaseHolder() {
681  typedef RefVector<typename REF::product_type,
682  typename REF::value_type,
683  typename REF::finder_type> REFV;
684  return std::auto_ptr<RefVectorHolderBase>(new RefVectorHolder<REFV>);
685  }
686  };
687 
688  template<typename T1, typename C, typename T, typename F>
689  struct HolderToVectorTrait<T1, Ref<C, T, F> > {
691  };
692 
693  template <typename REF>
695  static std::auto_ptr<RefVectorHolderBase> makeVectorHolder() {
696  typedef RefVector<typename REF::product_type,
697  typename REF::value_type,
698  typename REF::finder_type> REFV;
699  return std::auto_ptr<RefVectorHolderBase>(new RefVectorHolder<REFV>);
700  }
701  };
702 
703  template<typename C, typename T, typename F>
706  };
707 
708  }
709 }
710 
711 #endif
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:408
Ref(ProductID const &iId)
Definition: Ref.h:381
type
Definition: HCALResponse.h:21
EDProductGetter const * mustBeNonZero(EDProductGetter const *prodGetter, std::string refType, ProductID const &productID)
RefHolderToVector< T1, Ref< C, T, F > > type
Definition: Ref.h:690
T const * operator->() const
Member dereference operator.
Definition: Ref.h:629
key_type key() const
Accessor for product key.
Definition: Ref.h:424
static std::auto_ptr< BaseVectorHolder< T > > makeVectorHolder()
Definition: Ref.h:674
C const * product() const
Accessor for product collection.
Definition: RefVector.h:272
T const * product() const
Definition: TestHandle.h:60
bool hasProductCache() const
Returns true if container referenced by the Ref has been cached.
Definition: Ref.h:430
RefCoreWithIndex product_
Definition: Ref.h:454
boost::enable_if< has_key_compare< C >, bool >::type compare_key(K const &lhs, K const &rhs)
Definition: Ref.h:128
refhelper::FindRefVectorUsingAdvance< RefToBaseVector< T > > VBF
Definition: Ref.h:312
void checkTypeAtCompileTime(C const *)
Definition: Ref.h:294
Ref(ProductID const &iProductID, T const *, key_type iItemKey, product_type const *iProduct)
Constructor for use in the various X::fillView(...) functions.
Definition: Ref.h:373
bool isNull() const
Checks for null.
Definition: Ref.h:405
refhelper::FindRefVectorUsingAdvance< RefVector< std::vector< E >, T, F > > VF
Definition: Ref.h:311
bool operator!() const
Checks for null.
Definition: Ref.h:253
bool operator!=(debugging_allocator< X > const &, debugging_allocator< Y > const &)
RefCore const & refCore() const
Definition: Ref.h:439
T const & operator*() const
Dereference operator.
Definition: Ref.h:615
key_type index_
Definition: Ref.h:297
bool isAvailable() const
Definition: Ref.h:276
#define REF_FOR_VECTOR_ARGS
Definition: Ref.h:304
#define CMS_CLASS_VERSION(_version_)
refhelper::ValueTrait< std::vector< E > >::value T
Definition: Ref.h:309
Ref(ProductID const &productID, key_type itemKey, EDProductGetter const *prodGetter)
Definition: Ref.h:362
T const element_type
Definition: Ref.h:167
static std::auto_ptr< RefVectorHolderBase > makeVectorHolder()
Definition: Ref.h:695
refhelper::ValueTrait< std::vector< E > >::value value_type
Definition: Ref.h:324
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:250
bool isNull() const
Checks for null.
Definition: Ref.h:247
RefRefHolderToRefVector< Ref< C, T, F > > type
Definition: Ref.h:705
boost::binary_traits< F >::second_argument_type argument_type
Definition: Ref.h:327
refhelper::FindTrait< std::vector< E >, typename refhelper::ValueTrait< std::vector< E > >::value >::value F
Definition: Ref.h:310
boost::binary_traits< F >::second_argument_type argument_type
Definition: Ref.h:169
bool operator==(debugging_allocator< X > const &, debugging_allocator< Y > const &)
void const * productPtr() const
Definition: RefCore.h:32
bool isAvailable() const
Definition: RefCore.cc:112
tuple handle
Definition: patZpeak.py:22
ProductID id() const
Accessor for product ID.
Definition: Ref.h:414
Ref(ProductID const &productID, key_type itemKey, EDProductGetter const *prodGetter)
Definition: Ref.h:204
RefCore const & refCore() const
Definition: Ref.h:281
C product_type
etc. etc.: more nesting levels could be supported ...
Definition: Ref.h:165
Container::value_type value_type
Ref(ProductID const &iId)
Definition: Ref.h:223
bool isAvailable() const
Definition: Ref.h:434
RefCore product_
Definition: Ref.h:296
refhelper::FindRefVectorUsingAdvance< RefVector< C, T, F > > VF
Definition: Ref.h:153
key_type index() const
Definition: Ref.h:427
Ref()
Default constructor needed for reading from persistent store. Not for direct use. ...
Definition: Ref.h:175
refhelper::FindRefVectorUsingAdvance< RefToBaseVector< T > > VBF
Definition: Ref.h:154
EDProductGetter const * productGetter() const
Accessor for product getter.
Definition: Ref.h:417
F finder_type
Definition: Ref.h:168
Ref(ProductID const &iProductID, T const *, key_type iItemKey, C const *iProduct)
Constructor for use in the various X::fillView(...) functions.
Definition: Ref.h:215
~Ref()
Destructor.
Definition: Ref.h:231
T value_type
Definition: Ref.h:166
T const * product() const
Definition: OrphanHandle.h:57
key_type key() const
Accessor for product key.
Definition: Ref.h:266
string const
Definition: compareJSON.py:14
T const * product() const
Definition: Handle.h:81
EDProductGetter const * productGetter() const
Definition: RefCore.h:53
bool isTransient() const
Checks if this ref is transient (i.e. not persistable).
Definition: Ref.h:437
ProductID id() const
Definition: RefCore.h:29
bool isTransient() const
Definition: RefCore.h:69
std::vector< E > product_type
etc. etc.: more nesting levels could be supported ...
Definition: Ref.h:323
bool hasProductCache() const
Returns true if container referenced by the Ref has been cached.
Definition: Ref.h:272
void checkTypeAtCompileTime(product_type const *)
Definition: Ref.h:452
key_type index() const
Definition: Ref.h:269
ProductID id() const
Accessor for product ID.
Definition: Ref.h:256
EDProductGetter const * productGetter() const
Accessor for product getter.
Definition: Ref.h:259
volatile std::atomic< bool > shutdown_flag false
static std::auto_ptr< RefVectorHolderBase > makeVectorBaseHolder()
Definition: Ref.h:680
value_type const element_type
Definition: Ref.h:325
boost::remove_cv< typename boost::remove_reference< argument_type >::type >::type key_type
Definition: Ref.h:170
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition: blowfish.cc:281
long double T
C const * product() const
Accessor for product collection.
Definition: Ref.h:601
edm::RefVector< Container > RefVector
bool isTransient() const
Checks if this ref is transient (i.e. not persistable).
Definition: Ref.h:279
bool operator!() const
Checks for null.
Definition: Ref.h:411
def template
Definition: svgfig.py:520