Main Page
Namespaces
Classes
Package Documentation
CVS Directory
WorkBook
Offline Guide
Release schedule
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
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
// $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
18
#include "
FWCore/Utilities/interface/ObjectWithDict.h
"
19
#include "
FWCore/Utilities/interface/TypeWithDict.h
"
20
#include "TClass.h"
21
22
// user include files
23
#include "
Fireworks/Core/interface/FWSimpleProxyHelper.h
"
24
#include "
Fireworks/Core/interface/FWEventItem.h
"
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
69
FWSimpleProxyHelper::itemChanged
(
const
FWEventItem
* iItem)
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.h
TypeWithDict.h
ObjectWithDict.h
FWSimpleProxyHelper::FWSimpleProxyHelper
FWSimpleProxyHelper(const std::type_info &)
Definition:
FWSimpleProxyHelper.cc:38
FWEventItem
Definition:
FWEventItem.h:57
FWEventItem.h
FWSimpleProxyHelper::m_objectOffset
unsigned int m_objectOffset
Definition:
FWSimpleProxyHelper.h:53
edm::TypeWithDict::getBaseClassOffset
int getBaseClassOffset(TypeWithDict const &baseClass) const
Definition:
TypeWithDict.cc:474
FWEventItem::modelType
const TClass * modelType() const
Definition:
FWEventItem.cc:562
edm::TypeWithDict
Definition:
TypeWithDict.h:45
FWSimpleProxyHelper::m_itemType
const std::type_info * m_itemType
Definition:
FWSimpleProxyHelper.h:52
FWSimpleProxyHelper::itemChanged
void itemChanged(const FWEventItem *)
Definition:
FWSimpleProxyHelper.cc:69
Generated for CMSSW Reference Manual by
1.8.5