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 // $Id: FWSimpleProxyHelper.cc,v 1.7 2013/02/18 23:42:56 wmtan Exp $
12 //
13 
14 // system include files
15 #include <sstream>
16 #include <cassert>
17 
20 #include "TClass.h"
21 
22 // user include files
25 
26 
27 //
28 // constants, enums and typedefs
29 //
30 
31 //
32 // static data member definitions
33 //
34 
35 //
36 // constructors and destructor
37 //
38 FWSimpleProxyHelper::FWSimpleProxyHelper(const std::type_info& iType) :
39  m_itemType(&iType),
40  m_objectOffset(0)
41 {
42 }
43 
44 // FWSimpleProxyHelper::FWSimpleProxyHelper(const FWSimpleProxyHelper& rhs)
45 // {
46 // // do actual copying here;
47 // }
48 
49 //FWSimpleProxyHelper::~FWSimpleProxyHelper()
50 //{
51 //}
52 
53 //
54 // assignment operators
55 //
56 // const FWSimpleProxyHelper& FWSimpleProxyHelper::operator=(const FWSimpleProxyHelper& rhs)
57 // {
58 // //An exception safe implementation is
59 // FWSimpleProxyHelper temp(rhs);
60 // swap(rhs);
61 //
62 // return *this;
63 // }
64 
65 //
66 // member functions
67 //
68 void
70 {
71  if(0!=iItem) {
72  edm::TypeWithDict baseType(*m_itemType);
73  edm::TypeWithDict mostDerivedType(*(iItem->modelType()->GetTypeInfo()));
74  // The - sign is there because this is the address of a derived object minus the address of the base object.
75  m_objectOffset = -mostDerivedType.getBaseClassOffset(baseType);
76  }
77 }
78 
79 //
80 // static member functions
81 //
FWSimpleProxyHelper(const std::type_info &)
int getBaseClassOffset(TypeWithDict const &baseClass) const
const TClass * modelType() const
Definition: FWEventItem.cc:562
const std::type_info * m_itemType
void itemChanged(const FWEventItem *)