ATLAS Offline Software
SGObjectWithVersion.h
Go to the documentation of this file.
1 /* -*- C++ -*- */
2 
3 /*
4  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5 */
6 
9 #ifndef STOREGATE_SGOBJECTWITHVERSION_H
10 #define STOREGATE_SGOBJECTWITHVERSION_H 1
11 
12 #include "SGTools/SGVersionedKey.h"
13 #include "StoreGate/ReadHandle.h"
14 namespace SG {
19  template <typename T>
20  class ObjectWithVersion {
21  public:
26  versionedKey(vk), dataObject(dh) {}
30  {
31  if (this != &rhs) {
32  versionedKey = rhs.versionedKey;
33  dataObject = rhs.dataObject;
34  }
35  return *this;
36  }
39  };
40 }
42 template <typename T>
44  const SG::ObjectWithVersion<T>& rhs) {
45  return (lhs.versionedKey < rhs.versionedKey);
46 }
47 
48 #endif
SG::ObjectWithVersion::ObjectWithVersion
ObjectWithVersion(const VersionedKey &vk, SG::DataProxy *proxy)
Definition: SGObjectWithVersion.h:27
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:392
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
SG::ObjectWithVersion::operator=
ObjectWithVersion & operator=(const ObjectWithVersion &rhs)
Definition: SGObjectWithVersion.h:29
SGVersionedKey.h
PyPoolBrowser.dh
dh
Definition: PyPoolBrowser.py:102
operator<
bool operator<(const SG::ObjectWithVersion< T > &lhs, const SG::ObjectWithVersion< T > &rhs)
sort according to highest key version
Definition: SGObjectWithVersion.h:43
SG::VersionedKey
a StoreGateSvc key with a version number. Notice that StoreGate does not order multiple instances of ...
Definition: SGVersionedKey.h:31
SG::ObjectWithVersion::versionedKey
SG::VersionedKey versionedKey
Definition: SGObjectWithVersion.h:37
SG::ObjectWithVersion::ObjectWithVersion
ObjectWithVersion()
Definition: SGObjectWithVersion.h:22
SG::ObjectWithVersion::ObjectWithVersion
ObjectWithVersion(const ObjectWithVersion &rhs)
Definition: SGObjectWithVersion.h:23
SG::ObjectWithVersion::ObjectWithVersion
ObjectWithVersion(const VersionedKey &vk, const SG::ReadHandle< T > &dh)
Definition: SGObjectWithVersion.h:25
SG::ObjectWithVersion::dataObject
SG::ReadHandle< T > dataObject
Definition: SGObjectWithVersion.h:38
ReadHandle.h
Handle class for reading from StoreGate.
SG::ObjectWithVersion
associate a data object with its VersionedKey The object is held by a ReadHandle to delay its retriev...
Definition: SGVersionedKey.h:17
SG::DataProxy
Definition: DataProxy.h:44