00001 #ifndef VIS_FRAMEWORK_BASE_VIS_QUEUED_TWIG_H 00002 # define VIS_FRAMEWORK_BASE_VIS_QUEUED_TWIG_H 00003 00004 //<<<<<< INCLUDES >>>>>> 00005 00006 # include "VisFramework/VisFrameworkBase/interface/VisEventObserver.h" 00007 # include "FWCore/Utilities/interface/Exception.h" 00008 # include "Iguana/Framework/interface/IgTwig.h" 00009 # include <classlib/utils/Error.h> 00010 # include <classlib/utils/Callback.h> 00011 # include <exception> 00012 00013 //<<<<<< PUBLIC DEFINES >>>>>> 00014 //<<<<<< PUBLIC CONSTANTS >>>>>> 00015 //<<<<<< PUBLIC TYPES >>>>>> 00016 00017 namespace edm 00018 { 00019 class Event; 00020 class EventSetup; 00021 } 00022 00023 class IgState; 00024 class Ig3DRep; 00025 class Ig2DRep; 00026 class IgLegoRep; 00027 class IgTextRep; 00028 class IgRPhiRep; 00029 class IgRZRep; 00030 class IgSpareRep; 00031 00032 //<<<<<< PUBLIC VARIABLES >>>>>> 00033 //<<<<<< PUBLIC FUNCTIONS >>>>>> 00034 //<<<<<< CLASS DECLARATIONS >>>>>> 00035 00047 class VisQueuedTwig : public IgSimpleTwig, public VisEventObserver 00048 { 00049 public: 00050 VisQueuedTwig (IgState *state, IgTwig *parent, const std::string &name = ""); 00051 // implicit copy constructor 00052 // implicit assignment operator 00053 // implicit destructor 00054 virtual void onNewEvent (const edm::Event &event, 00055 const edm::EventSetup &eventSetup); 00056 00057 virtual void update (Ig3DRep *rep); 00058 virtual void update (Ig2DRep *rep); 00059 virtual void update (IgLegoRep *rep); 00060 virtual void update (IgTextRep *rep); 00061 virtual void update (IgRPhiRep *rep); 00062 virtual void update (IgRZRep *rep); 00063 virtual void update (IgSpareRep *rep); 00064 00065 IgState * state (void); 00066 00067 void onException (lat::Callback1<std::exception *> callback); 00068 void onError (lat::Callback1<lat::Error *> callback); 00069 void onCmsException (lat::Callback1<cms::Exception *> callback); 00070 void onUnhandledException (lat::Callback callback); 00071 00072 protected: 00073 void onBaseInvalidate (void); 00074 lat::Callback1<std::exception *> m_onException; 00075 lat::Callback1<lat::Error *> m_onError; 00076 lat::Callback1<cms::Exception *> m_onCmsException; 00077 lat::Callback m_onUnhandledException; 00078 00079 private: 00080 00081 class ExactMatch; 00082 friend class ExactMatch; 00083 00084 IgState *m_state; //< State context. 00085 }; 00086 00087 //<<<<<< INLINE PUBLIC FUNCTIONS >>>>>> 00088 //<<<<<< INLINE MEMBER FUNCTIONS >>>>>> 00089 00096 inline IgState * 00097 VisQueuedTwig::state (void) 00098 { return m_state; } 00099 00100 #endif // VIS_FRAMEWORK_BASE_VIS_QUEUED_TWIG_H