CMS 3D CMS Logo

List of all members | Public Member Functions | Protected 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 ()
 
 FWViewManagerBase (const FWViewManagerBase &)=delete
 
void modelChangesComingSlot ()
 
void modelChangesDoneSlot ()
 
virtual void newItem (const FWEventItem *)=0
 
const FWViewManagerBaseoperator= (const FWViewManagerBase &)=delete
 
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 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 45 of file FWViewManagerBase.h.

Constructor & Destructor Documentation

◆ ~FWViewManagerBase()

FWViewManagerBase::~FWViewManagerBase ( )
virtual

Definition at line 43 of file FWViewManagerBase.cc.

43 {}

◆ FWViewManagerBase() [1/2]

FWViewManagerBase::FWViewManagerBase ( )
protected

Definition at line 36 of file FWViewManagerBase.cc.

36 : m_context(nullptr), m_changeManager(nullptr), m_colorManager(nullptr) {}
const fireworks::Context * m_context
FWModelChangeManager * m_changeManager
FWColorManager * m_colorManager

◆ FWViewManagerBase() [2/2]

FWViewManagerBase::FWViewManagerBase ( const FWViewManagerBase )
delete

Member Function Documentation

◆ changeManager()

FWModelChangeManager & FWViewManagerBase::changeManager ( ) const
protected

Definition at line 118 of file FWViewManagerBase.cc.

References cms::cuda::assert(), and m_changeManager.

118  {
119  assert(m_changeManager != nullptr);
120  return *m_changeManager;
121 }
assert(be >=bs)
FWModelChangeManager * m_changeManager

◆ colorManager()

FWColorManager & FWViewManagerBase::colorManager ( ) const
protected

◆ colorsChanged()

virtual void FWViewManagerBase::colorsChanged ( )
protectedpure virtual

◆ colorsChangedSlot()

void FWViewManagerBase::colorsChangedSlot ( )

Definition at line 97 of file FWViewManagerBase.cc.

References colorsChanged().

97 { this->colorsChanged(); }
virtual void colorsChanged()=0

◆ context()

const fireworks::Context& FWViewManagerBase::context ( ) const
inline

◆ createInstanceOf()

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 60 of file FWViewManagerBase.cc.

References cms::cuda::assert(), DummyCfis::c, DMR_cfg::cerr, relativeConstraints::error, and AlCaHLTBitMon_QueryRunRegistry::string.

60  {
61  //create proxy builders
62  Int_t error;
63  assert(iBaseClass != nullptr);
64 
65  //does the class already exist?
66  TClass* c = TClass::GetClass(iNameOfClass);
67  if (nullptr == c) {
68  //try to load a macro of that name
69 
70  //How can I tell if this succeeds or failes? error and value are always 0!
71  // I could not make the non-compiled mechanism to work without seg-faults
72  // Int_t value =
73  gROOT->LoadMacro((std::string(iNameOfClass) + ".C+").c_str(), &error);
74  c = TClass::GetClass(iNameOfClass);
75  if (nullptr == c) {
76  std::cerr << "failed to find " << iNameOfClass << std::endl;
77  return nullptr;
78  }
79  }
80  void* inst = c->New();
81  void* baseClassInst = c->DynamicCast(iBaseClass, inst);
82  if (nullptr == baseClassInst) {
83  std::cerr << "conversion to " << iBaseClass->ClassName() << " for class " << iNameOfClass << " failed" << std::endl;
84  return nullptr;
85  }
86  return baseClassInst;
87 }
assert(be >=bs)

◆ eventBegin()

virtual void FWViewManagerBase::eventBegin ( )
inlinevirtual

Reimplemented in FWEveViewManager.

Definition at line 64 of file FWViewManagerBase.h.

64 {}

◆ eventEnd()

virtual void FWViewManagerBase::eventEnd ( )
inlinevirtual

Reimplemented in FWEveViewManager, and FWTriggerTableViewManager.

Definition at line 65 of file FWViewManagerBase.h.

65 {}

◆ modelChangesComing()

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().

◆ modelChangesComingSlot()

void FWViewManagerBase::modelChangesComingSlot ( )

Definition at line 89 of file FWViewManagerBase.cc.

References modelChangesComing().

89  {
90  //forward call to the virtual function
91  this->modelChangesComing();
92 }
virtual void modelChangesComing()=0

◆ modelChangesDone()

virtual void FWViewManagerBase::modelChangesDone ( )
protectedpure virtual

◆ modelChangesDoneSlot()

void FWViewManagerBase::modelChangesDoneSlot ( )

Definition at line 93 of file FWViewManagerBase.cc.

References modelChangesDone().

93  {
94  //forward call to the virtual function
95  this->modelChangesDone();
96 }
virtual void modelChangesDone()=0

◆ newItem()

virtual void FWViewManagerBase::newItem ( const FWEventItem )
pure virtual

◆ operator=()

const FWViewManagerBase& FWViewManagerBase::operator= ( const FWViewManagerBase )
delete

◆ setChangeManager()

void FWViewManagerBase::setChangeManager ( FWModelChangeManager iCM)

Definition at line 99 of file FWViewManagerBase.cc.

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

99  {
100  assert(nullptr != iCM);
101  m_changeManager = iCM;
104 }
virtual void modelChangesComing()=0
virtual void modelChangesDone()=0
assert(be >=bs)
sigc::signal< void()> changeSignalsAreDone_
FWModelChangeManager * m_changeManager
sigc::signal< void()> changeSignalsAreComing_

◆ setColorManager()

void FWViewManagerBase::setColorManager ( FWColorManager iCM)

Definition at line 106 of file FWViewManagerBase.cc.

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

106  {
107  assert(nullptr != iCM);
108  m_colorManager = iCM;
110  //make sure to pickup any changes that occurred earlier
111  colorsChanged();
112 }
virtual void colorsChanged()=0
assert(be >=bs)
FWColorManager * m_colorManager
sigc::signal< void()> colorsHaveChanged_

◆ setContext()

virtual void FWViewManagerBase::setContext ( const fireworks::Context x)
inlinevirtual

Reimplemented in FWEveViewManager.

Definition at line 56 of file FWViewManagerBase.h.

References m_context, and x.

Referenced by FWEveViewManager::setContext().

56 { m_context = x; }
const fireworks::Context * m_context

◆ supportedTypesAndRepresentations()

virtual FWTypeToRepresentations FWViewManagerBase::supportedTypesAndRepresentations ( ) const
pure virtual

Member Data Documentation

◆ m_changeManager

FWModelChangeManager* FWViewManagerBase::m_changeManager
private

Definition at line 97 of file FWViewManagerBase.h.

Referenced by changeManager(), and setChangeManager().

◆ m_colorManager

FWColorManager* FWViewManagerBase::m_colorManager
private

Definition at line 98 of file FWViewManagerBase.h.

Referenced by colorManager(), and setColorManager().

◆ m_context

const fireworks::Context* FWViewManagerBase::m_context
private

Definition at line 95 of file FWViewManagerBase.h.

Referenced by context(), and setContext().