CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FWSimpleProxyHelper.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: Core
4 // Class : FWSimpleProxyHelper
5 //
6 // Implementation:
7 // <Notes on implementation>
8 //
9 // Original Author: Chris Jones
10 // Created: Tue Dec 2 15:13:22 EST 2008
11 //
12 
13 // system include files
14 #include <sstream>
15 #include <cassert>
16 
19 #include "TClass.h"
20 
21 // user include files
24 
25 
26 //
27 // constants, enums and typedefs
28 //
29 
30 //
31 // static data member definitions
32 //
33 
34 //
35 // constructors and destructor
36 //
37 FWSimpleProxyHelper::FWSimpleProxyHelper(const std::type_info& iType) :
38  m_itemType(&iType),
39  m_objectOffset(0)
40 {
41 }
42 
43 // FWSimpleProxyHelper::FWSimpleProxyHelper(const FWSimpleProxyHelper& rhs)
44 // {
45 // // do actual copying here;
46 // }
47 
48 //FWSimpleProxyHelper::~FWSimpleProxyHelper()
49 //{
50 //}
51 
52 //
53 // assignment operators
54 //
55 // const FWSimpleProxyHelper& FWSimpleProxyHelper::operator=(const FWSimpleProxyHelper& rhs)
56 // {
57 // //An exception safe implementation is
58 // FWSimpleProxyHelper temp(rhs);
59 // swap(rhs);
60 //
61 // return *this;
62 // }
63 
64 //
65 // member functions
66 //
67 void
69 {
70  if(0!=iItem) {
71  edm::TypeWithDict baseType(*m_itemType);
72  edm::TypeWithDict mostDerivedType(*(iItem->modelType()->GetTypeInfo()));
73  // The - sign is there because this is the address of a derived object minus the address of the base object.
74  m_objectOffset = -mostDerivedType.getBaseClassOffset(baseType);
75  }
76 }
77 
78 //
79 // static member functions
80 //
FWSimpleProxyHelper(const std::type_info &)
int getBaseClassOffset(TypeWithDict const &baseClass) const
const TClass * modelType() const
Definition: FWEventItem.cc:561
const std::type_info * m_itemType
void itemChanged(const FWEventItem *)