Main Page
Namespaces
Classes
Package Documentation
Fireworks
Core
src
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
17
#include "
FWCore/Utilities/interface/ObjectWithDict.h
"
18
#include "
FWCore/Utilities/interface/TypeWithDict.h
"
19
#include "TClass.h"
20
21
// user include files
22
#include "
Fireworks/Core/interface/FWSimpleProxyHelper.h
"
23
#include "
Fireworks/Core/interface/FWEventItem.h
"
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
68
FWSimpleProxyHelper::itemChanged
(
const
FWEventItem
* iItem)
69
{
70
if
(
nullptr
!=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.h
TypeWithDict.h
ObjectWithDict.h
FWSimpleProxyHelper::FWSimpleProxyHelper
FWSimpleProxyHelper(const std::type_info &)
Definition:
FWSimpleProxyHelper.cc:37
FWEventItem
Definition:
FWEventItem.h:56
FWEventItem.h
FWSimpleProxyHelper::m_objectOffset
unsigned int m_objectOffset
Definition:
FWSimpleProxyHelper.h:52
edm::TypeWithDict::getBaseClassOffset
int getBaseClassOffset(TypeWithDict const &baseClass) const
Definition:
TypeWithDict.cc:834
FWEventItem::modelType
const TClass * modelType() const
Definition:
FWEventItem.cc:563
edm::TypeWithDict
Definition:
TypeWithDict.h:38
FWSimpleProxyHelper::m_itemType
const std::type_info * m_itemType
Definition:
FWSimpleProxyHelper.h:51
FWSimpleProxyHelper::itemChanged
void itemChanged(const FWEventItem *)
Definition:
FWSimpleProxyHelper.cc:68
Generated for CMSSW Reference Manual by
1.8.11