CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/FWCore/Framework/interface/UnscheduledHandler.h

Go to the documentation of this file.
00001 #ifndef FWCore_Framework_UnscheduledHandler_h
00002 #define FWCore_Framework_UnscheduledHandler_h
00003 // -*- C++ -*-
00004 //
00005 // Package:     Framework
00006 // Class  :     UnscheduledHandler
00007 //
00017 //
00018 // Original Author:  Chris Jones
00019 //         Created:  Mon Feb 13 16:26:33 IST 2006
00020 //
00021 
00022 // system include files
00023 
00024 // user include files
00025 #include "FWCore/Framework/interface/Frameworkfwd.h"
00026 #include <string>
00027 
00028 // forward declarations
00029 namespace edm {
00030    class CurrentProcessingContext;
00031    class UnscheduledHandlerSentry;
00032 
00033    class UnscheduledHandler {
00034 
00035    public:
00036       friend class UnscheduledHandlerSentry;
00037       UnscheduledHandler(): m_setup(0), m_context(0) {}
00038       virtual ~UnscheduledHandler();
00039 
00040       // ---------- const member functions ---------------------
00041 
00042       // ---------- static member functions --------------------
00043 
00044       // ---------- member functions ---------------------------
00046       bool tryToFill(std::string const& label,
00047                      EventPrincipal& iEvent);
00048 
00049       void setEventSetup(EventSetup const& iSetup) {
00050          m_setup = &iSetup;
00051       }
00052    private:
00053       CurrentProcessingContext const* setCurrentProcessingContext(CurrentProcessingContext const* iContext);
00054       //void popCurrentProcessingContext();
00055 
00056       UnscheduledHandler(UnscheduledHandler const&); // stop default
00057 
00058       UnscheduledHandler const& operator=(UnscheduledHandler const&); // stop default
00059 
00060       virtual bool tryToFillImpl(std::string const&,
00061                                  EventPrincipal&,
00062                                  EventSetup const&,
00063                                  CurrentProcessingContext const*) = 0;
00064       // ---------- member data --------------------------------
00065       EventSetup const* m_setup;
00066       CurrentProcessingContext const* m_context;
00067 };
00068    class UnscheduledHandlerSentry {
00069    public:
00070       UnscheduledHandlerSentry(UnscheduledHandler* iHandler,
00071                                CurrentProcessingContext const* iContext);
00072       ~UnscheduledHandlerSentry();
00073    private:
00074       UnscheduledHandler* m_handler;
00075       CurrentProcessingContext const* m_old;
00076    };
00077 }
00078 
00079 #endif