Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
DataFormats
Common
src
EDProductGetter.cc
Go to the documentation of this file.
1
// -*- C++ -*-
2
//
3
// Package: EDProduct
4
// Class : EDProductGetter
5
//
6
// Implementation:
7
// <Notes on implementation>
8
//
9
// Original Author: Chris Jones
10
// Created: Tue Nov 1 15:06:41 EST 2005
11
//
12
13
// system include files
14
15
// user include files
16
#include "
DataFormats/Common/interface/EDProductGetter.h
"
17
#include "
FWCore/Utilities/interface/EDMException.h
"
18
19
namespace
edm {
20
//
21
// constants, enums and typedefs
22
//
23
24
//
25
// static data member definitions
26
//
27
28
//
29
// constructors and destructor
30
//
31
EDProductGetter::EDProductGetter
()
32
{
33
}
34
35
// EDProductGetter::EDProductGetter(EDProductGetter const& rhs)
36
// {
37
// // do actual copying here;
38
// }
39
40
EDProductGetter::~EDProductGetter
()
41
{
42
}
43
44
//
45
// assignment operators
46
//
47
// EDProductGetter const& EDProductGetter::operator=(EDProductGetter const& rhs)
48
// {
49
// //An exception safe implementation is
50
// EDProductGetter temp(rhs);
51
// swap(rhs);
52
//
53
// return *this;
54
// }
55
56
//
57
// member functions
58
//
59
60
//
61
// const member functions
62
//
63
64
//
65
// static member functions
66
//
67
ProductID
68
EDProductGetter::oldToNewProductID_
(
ProductID
const
&)
const
{
69
throw
edm::Exception
(
errors::LogicError
)
70
<<
"Internal error: Call of oldToNewProductID_ for non-EventPrincipal.\n"
71
<<
"Please report this error to the Framework group\n"
;
72
}
73
74
EDProductGetter
const
*
75
mustBeNonZero
(
EDProductGetter
const
* prodGetter, std::string refType,
ProductID
const
& productID) {
76
if
(prodGetter != 0)
return
prodGetter;
77
throw
Exception
(
errors::InvalidReference
, refType)
78
<<
"Attempt to construct a "
<< refType <<
" with ProductID "
<< productID <<
"\n"
79
<<
"but with a null pointer to a product getter.\n"
80
<<
"The product getter pointer passed to the constructor must refer\n"
81
<<
"to a real getter, such as an EventPrincipal.\n"
;
82
}
83
84
}
edm::mustBeNonZero
EDProductGetter const * mustBeNonZero(EDProductGetter const *prodGetter, std::string refType, ProductID const &productID)
Definition:
EDProductGetter.cc:75
edm::EDProductGetter
Definition:
EDProductGetter.h:32
edm::EDProductGetter::~EDProductGetter
virtual ~EDProductGetter()
Definition:
EDProductGetter.cc:40
edm::EDProductGetter::EDProductGetter
EDProductGetter()
Definition:
EDProductGetter.cc:31
EDMException.h
edm::ProductID
Definition:
ProductID.h:27
edm::errors::InvalidReference
Definition:
EDMException.h:49
edm::hlt::Exception
error
Definition:
HLTenums.h:24
EDProductGetter.h
edm::errors::LogicError
Definition:
EDMException.h:47
edm::EDProductGetter::oldToNewProductID_
virtual ProductID oldToNewProductID_(ProductID const &oldProductID) const
Definition:
EDProductGetter.cc:68
Generated for CMSSW Reference Manual by
1.8.5