CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
UnscheduledHandler.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: Framework
4 // Class : UnscheduledHandler
5 //
6 // Implementation:
7 // <Notes on implementation>
8 //
9 // Original Author: Chris Jones
10 // Created: Mon Oct 13 13:58:07 CEST 2008
11 //
12 
13 // system include files
14 #include <cassert>
15 #include <iostream>
16 
17 // user include files
20 
21 
22 namespace edm {
23  //
24  // constants, enums and typedefs
25  //
26 
27  //
28  // static data member definitions
29  //
30 
31  //
32  // constructors and destructor
33  //
34  //UnscheduledHandler::UnscheduledHandler() {
35  //}
36 
37  // UnscheduledHandler::UnscheduledHandler(UnscheduledHandler const& rhs) {
38  // // do actual copying here;
39  // }
40 
42  }
43 
44  //
45  // assignment operators
46  //
47  // UnscheduledHandler const& UnscheduledHandler::operator=(UnscheduledHandler const& rhs) {
48  // //An exception safe implementation is
49  // UnscheduledHandler temp(rhs);
50  // swap(rhs);
51  //
52  // return *this;
53  // }
54 
55  //
56  // member functions
57  //
61  m_context = iContext;
62  return old;
63  }
64 
65  /*
66  void
67  UnscheduledHandler::popCurrentProcessingContext() {
68  }
69  */
70 
71  bool
74  assert(m_setup);
75  CurrentProcessingContext const* chosen = m_context;
77  if(0 != m_context) {
78  temp = *m_context;
80  chosen = &temp;
81  }
82  UnscheduledHandlerSentry sentry(this, chosen);
83  return tryToFillImpl(label, iEvent, *m_setup, chosen);
84  }
85 
86  //
87  // const member functions
88  //
89 
90  //
91  // static member functions
92  //
93 //-------------
94 
96  CurrentProcessingContext const* iContext) :
97  m_handler(iHandler),
98  m_old(0) {
99  if(m_handler) {
100  m_old = iHandler->setCurrentProcessingContext(iContext);
101  }
102  }
103 
105  if(m_handler) {
107  }
108  }
109 }
UnscheduledHandlerSentry(UnscheduledHandler *iHandler, CurrentProcessingContext const *iContext)
CurrentProcessingContext const * m_context
CurrentProcessingContext const * m_old
int iEvent
Definition: GenABIO.cc:243
UnscheduledHandler * m_handler
CurrentProcessingContext const * setCurrentProcessingContext(CurrentProcessingContext const *iContext)
EventSetup const * m_setup
bool tryToFill(std::string const &label, EventPrincipal &iEvent)
returns true if found an EDProducer and ran it
virtual bool tryToFillImpl(std::string const &, EventPrincipal &, EventSetup const &, CurrentProcessingContext const *)=0
void setUnscheduledDepth(unsigned int)
Set the depth in a series of unscheduled callbacks.
unsigned int unscheduledDepth() const
Returns 0 if module is on the path and &gt;0 when the module executing is unscheduled.