CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
FWViewManagerBase Class Referenceabstract

#include <Fireworks/Core/interface/FWViewManagerBase.h>

Inheritance diagram for FWViewManagerBase:
FWEveViewManager FWGeometryTableViewManager FWTableViewManager FWTriggerTableViewManager

Public Member Functions

void colorsChangedSlot ()
 
const fireworks::Contextcontext () const
 
virtual void eventBegin ()
 
virtual void eventEnd ()
 
void modelChangesComingSlot ()
 
void modelChangesDoneSlot ()
 
virtual void newItem (const FWEventItem *)=0
 
void setChangeManager (FWModelChangeManager *iCM)
 
void setColorManager (FWColorManager *iCM)
 
virtual void setContext (const fireworks::Context *x)
 
virtual FWTypeToRepresentations supportedTypesAndRepresentations () const =0
 
virtual ~FWViewManagerBase ()
 

Protected Member Functions

FWModelChangeManagerchangeManager () const
 
FWColorManagercolorManager () const
 
virtual void colorsChanged ()=0
 
void * createInstanceOf (const TClass *iBaseClass, const char *iNameOfClass)
 
 FWViewManagerBase ()
 
virtual void modelChangesComing ()=0
 
virtual void modelChangesDone ()=0
 

Private Member Functions

 FWViewManagerBase (const FWViewManagerBase &)
 
const FWViewManagerBaseoperator= (const FWViewManagerBase &)
 

Private Attributes

FWModelChangeManagerm_changeManager
 
FWColorManagerm_colorManager
 
const fireworks::Contextm_context
 

Detailed Description

Description: Base class for a Manger for a specific type of View

Usage: <usage>

Definition at line 46 of file FWViewManagerBase.h.

Constructor & Destructor Documentation

FWViewManagerBase::~FWViewManagerBase ( )
virtual

Definition at line 49 of file FWViewManagerBase.cc.

50 {
51 }
FWViewManagerBase::FWViewManagerBase ( )
protected

Definition at line 37 of file FWViewManagerBase.cc.

37  :
38  m_context(0),
39  m_changeManager(0),
41 {
42 }
const fireworks::Context * m_context
FWModelChangeManager * m_changeManager
FWColorManager * m_colorManager
FWViewManagerBase::FWViewManagerBase ( const FWViewManagerBase )
private

Member Function Documentation

FWModelChangeManager & FWViewManagerBase::changeManager ( ) const
protected

Definition at line 143 of file FWViewManagerBase.cc.

References assert(), and m_changeManager.

144 {
145  assert(m_changeManager != 0);
146  return *m_changeManager;
147 }
assert(m_qm.get())
FWModelChangeManager * m_changeManager
FWColorManager & FWViewManagerBase::colorManager ( ) const
protected
virtual void FWViewManagerBase::colorsChanged ( )
protectedpure virtual
void FWViewManagerBase::colorsChangedSlot ( )

Definition at line 113 of file FWViewManagerBase.cc.

References colorsChanged().

114 {
115  this->colorsChanged();
116 }
virtual void colorsChanged()=0
const fireworks::Context& FWViewManagerBase::context ( ) const
inline
void * FWViewManagerBase::createInstanceOf ( const TClass *  iBaseClass,
const char *  iNameOfClass 
)
protected

handles dynamic loading of a library or macro containing the class named iNameOfClass which inherits from iBaseClass. The returned void* will correspond to the address of the 'BaseClass'

Definition at line 69 of file FWViewManagerBase.cc.

References assert(), EnergyCorrector::c, ecal_dqm_sourceclient-live_cfg::cerr, relativeConstraints::error, and AlCaHLTBitMon_QueryRunRegistry::string.

71 {
72  //create proxy builders
73  Int_t error;
74  assert(iBaseClass !=0);
75 
76  //does the class already exist?
77  TClass *c = TClass::GetClass( iNameOfClass );
78  if(0==c) {
79  //try to load a macro of that name
80 
81  //How can I tell if this succeeds or failes? error and value are always 0!
82  // I could not make the non-compiled mechanism to work without seg-faults
83  // Int_t value =
84  gROOT->LoadMacro( (std::string(iNameOfClass)+".C+").c_str(), &error );
85  c = TClass::GetClass( iNameOfClass );
86  if(0==c ) {
87  std::cerr <<"failed to find "<< iNameOfClass << std::endl;
88  return 0;
89  }
90  }
91  void* inst = c->New();
92  void* baseClassInst = c->DynamicCast(iBaseClass,inst);
93  if(0==baseClassInst) {
94  std::cerr<<"conversion to "<<iBaseClass->ClassName() << " for class " << iNameOfClass << " failed"<<std::endl;
95  return 0;
96  }
97  return baseClassInst;
98 }
assert(m_qm.get())
virtual void FWViewManagerBase::eventBegin ( )
inlinevirtual

Reimplemented in FWEveViewManager.

Definition at line 68 of file FWViewManagerBase.h.

68  {
69  };
virtual void FWViewManagerBase::eventEnd ( )
inlinevirtual

Reimplemented in FWEveViewManager, and FWTriggerTableViewManager.

Definition at line 70 of file FWViewManagerBase.h.

70  {
71  };
virtual void FWViewManagerBase::modelChangesComing ( )
protectedpure virtual

called when models have changed and so the display must be updated

Implemented in FWTableViewManager, FWEveViewManager, FWGeometryTableViewManager, and FWTriggerTableViewManager.

Referenced by modelChangesComingSlot(), and setChangeManager().

void FWViewManagerBase::modelChangesComingSlot ( )

Definition at line 101 of file FWViewManagerBase.cc.

References modelChangesComing().

102 {
103  //forward call to the virtual function
104  this->modelChangesComing();
105 }
virtual void modelChangesComing()=0
virtual void FWViewManagerBase::modelChangesDone ( )
protectedpure virtual
void FWViewManagerBase::modelChangesDoneSlot ( )

Definition at line 107 of file FWViewManagerBase.cc.

References modelChangesDone().

108 {
109  //forward call to the virtual function
110  this->modelChangesDone();
111 }
virtual void modelChangesDone()=0
virtual void FWViewManagerBase::newItem ( const FWEventItem )
pure virtual
const FWViewManagerBase& FWViewManagerBase::operator= ( const FWViewManagerBase )
private
void FWViewManagerBase::setChangeManager ( FWModelChangeManager iCM)

Definition at line 120 of file FWViewManagerBase.cc.

References assert(), FWModelChangeManager::changeSignalsAreComing_, FWModelChangeManager::changeSignalsAreDone_, m_changeManager, modelChangesComing(), and modelChangesDone().

121 {
122  assert(0!=iCM);
123  m_changeManager = iCM;
126 }
virtual void modelChangesComing()=0
assert(m_qm.get())
virtual void modelChangesDone()=0
FWModelChangeManager * m_changeManager
sigc::signal< void > changeSignalsAreDone_
sigc::signal< void > changeSignalsAreComing_
void FWViewManagerBase::setColorManager ( FWColorManager iCM)

Definition at line 129 of file FWViewManagerBase.cc.

References assert(), colorsChanged(), FWColorManager::colorsHaveChanged_, and m_colorManager.

130 {
131  assert(0!= iCM);
132  m_colorManager = iCM;
134  //make sure to pickup any changes that occurred earlier
135  colorsChanged();
136 }
virtual void colorsChanged()=0
assert(m_qm.get())
FWColorManager * m_colorManager
sigc::signal< void > colorsHaveChanged_
virtual void FWViewManagerBase::setContext ( const fireworks::Context x)
inlinevirtual

Reimplemented in FWEveViewManager.

Definition at line 59 of file FWViewManagerBase.h.

References m_context, and x.

Referenced by FWEveViewManager::setContext().

59 { m_context = x; }
const fireworks::Context * m_context
virtual FWTypeToRepresentations FWViewManagerBase::supportedTypesAndRepresentations ( ) const
pure virtual

Member Data Documentation

FWModelChangeManager* FWViewManagerBase::m_changeManager
private

Definition at line 103 of file FWViewManagerBase.h.

Referenced by changeManager(), and setChangeManager().

FWColorManager* FWViewManagerBase::m_colorManager
private

Definition at line 104 of file FWViewManagerBase.h.

Referenced by colorManager(), and setColorManager().

const fireworks::Context* FWViewManagerBase::m_context
private

Definition at line 101 of file FWViewManagerBase.h.

Referenced by context(), and setContext().