CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
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  //
32  {
33  }
34 
35  // EDProductGetter::EDProductGetter(EDProductGetter const& rhs)
36  // {
37  // // do actual copying here;
38  // }
39 
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
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 }
EDProductGetter const * mustBeNonZero(EDProductGetter const *prodGetter, std::string refType, ProductID const &productID)
virtual ProductID oldToNewProductID_(ProductID const &oldProductID) const