CMS 3D CMS Logo

VisEventProcessorService.h

Go to the documentation of this file.
00001 #ifndef VIS_FRAMEWORK_BASE_VIS_EVENT_PROCESSOR_SERVICE_H
00002 # define VIS_FRAMEWORK_BASE_VIS_EVENT_PROCESSOR_SERVICE_H
00003 
00004 //<<<<<< INCLUDES                                                       >>>>>>
00005 
00006 # include "Iguana/Framework/interface/IgStateElement.h"
00007 # include "FWCore/ServiceRegistry/interface/ServiceLegacy.h"
00008 # include "FWCore/ServiceRegistry/interface/ServiceToken.h"
00009 # include "FWCore/Framework/interface/EventProcessor.h"
00010 # include "FWCore/MessageLogger/interface/JobReport.h"
00011 # include <classlib/utils/Error.h>
00012 # include <classlib/utils/Callback.h>
00013 # include <exception>
00014 
00015 //<<<<<< PUBLIC DEFINES                                                 >>>>>>
00016 //<<<<<< PUBLIC CONSTANTS                                               >>>>>>
00017 //<<<<<< PUBLIC TYPES                                                   >>>>>>
00018 
00019 namespace edm 
00020 {
00021     class Presence;
00022 }
00023 
00024 //<<<<<< PUBLIC VARIABLES                                               >>>>>>
00025 //<<<<<< PUBLIC FUNCTIONS                                               >>>>>>
00026 //<<<<<< CLASS DECLARATIONS                                             >>>>>>
00027 
00028 class VisEventProcessorService : public IgStateElement
00029 {    
00030     IG_DECLARE_STATE_ELEMENT (VisEventProcessorService);
00031 public:
00032     VisEventProcessorService (IgState *state);
00033     ~VisEventProcessorService (void);
00034 
00035     // implicit copy constructor
00036     // implicit assignment operator
00037     // implicit destructor
00038 
00039     void on () {
00040         m_callEndJob = true;
00041     }
00042     void off () {
00043         m_callEndJob = false;
00044     }
00045      
00046     edm::EventProcessor* operator-> () {
00047         return m_ep.get ();
00048     }
00049     edm::JobReport* jobReport (void) {
00050         return m_jobRep.get ();
00051     }
00052     
00053     std::string                 configFile (void);
00054     std::string                 configRootFile (std::string fileName);
00055     void                        initEventProcessor (void);
00056     void                        reInitEventProcessor (const std::string& parameterSet);
00057     void                        onStartingProcessor (lat::Callback callback);
00058     void                        onStoppingProcessor (lat::Callback callback);
00059     void                        onProcessorStarted (lat::Callback callback);
00060     void                        onProcessorStopped (lat::Callback callback);
00061     void                        onException (lat::Callback1<std::exception *> callback);
00062     void                        onCmsException (lat::Callback1<cms::Exception *> callback);
00063     void                        onFrameworkException (lat::Callback1<lat::Error *> callback);
00064     void                        onUnhandledException (lat::Callback callback);
00065     void                        onConfigFailure (lat::Callback1<cms::Exception *> callback);
00066     void                        onStatusMessage (lat::Callback1<const std::string&> callback);
00067     void                        scheduleAbort (void);
00068     bool                        running (void);
00069 
00070 private:
00071     std::auto_ptr<edm::EventProcessor>  m_ep;
00072     boost::shared_ptr<edm::Presence>    m_messageServicePresence;
00073     std::auto_ptr<edm::JobReport>       m_jobRep;
00074 
00075     bool                        m_callEndJob;
00076     bool                        m_running;
00077     IgState                     *m_state;
00078     lat::Callback               m_onStartingProcessor;
00079     lat::Callback               m_onStoppingProcessor;
00080     lat::Callback               m_onProcessorStarted;    
00081     lat::Callback               m_onProcessorStopped;    
00082     lat::Callback1<cms::Exception *>    m_onCmsException;
00083     lat::Callback1<std::exception *>    m_onException;
00084     lat::Callback1<lat::Error *>        m_onFrameworkException;
00085     lat::Callback                       m_onUnhandledException;
00086     lat::Callback1<cms::Exception *>    m_onConfigFailure;
00087     lat::Callback1<const std::string&>  m_onStatusMessage;
00088     
00089     void                        init (void);
00090 };
00091 
00092 //<<<<<< INLINE PUBLIC FUNCTIONS                                        >>>>>>
00093 //<<<<<< INLINE MEMBER FUNCTIONS                                        >>>>>>
00094 
00095 #endif // VIS_FRAMEWORK_BASE_VIS_EVENT_PROCESSOR_SERVICE_H

Generated on Tue Jun 9 17:49:52 2009 for CMSSW by  doxygen 1.5.4