CMS 3D CMS Logo

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 &)=delete
 
const FWViewManagerBaseoperator= (const FWViewManagerBase &)=delete
 

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) {}

◆ FWViewManagerBase() [2/2]

FWViewManagerBase::FWViewManagerBase ( const FWViewManagerBase )
privatedelete

Member Function Documentation

◆ changeManager()

FWModelChangeManager & FWViewManagerBase::changeManager ( ) const
protected

Definition at line 118 of file FWViewManagerBase.cc.

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

References cms::cuda::assert(), and 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.

97 { this->colorsChanged(); }

References colorsChanged().

◆ 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.

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 }

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

◆ 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.

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

References modelChangesComing().

◆ modelChangesDone()

virtual void FWViewManagerBase::modelChangesDone ( )
protectedpure virtual

◆ modelChangesDoneSlot()

void FWViewManagerBase::modelChangesDoneSlot ( )

Definition at line 93 of file FWViewManagerBase.cc.

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

References modelChangesDone().

◆ newItem()

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

◆ operator=()

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

◆ setChangeManager()

void FWViewManagerBase::setChangeManager ( FWModelChangeManager iCM)

◆ setColorManager()

void FWViewManagerBase::setColorManager ( FWColorManager iCM)

Definition at line 106 of file FWViewManagerBase.cc.

106  {
107  assert(nullptr != iCM);
108  m_colorManager = iCM;
110  //make sure to pickup any changes that occurred earlier
111  colorsChanged();
112 }

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

◆ setContext()

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

Reimplemented in FWEveViewManager.

Definition at line 56 of file FWViewManagerBase.h.

56 { m_context = x; }

References m_context, and x.

Referenced by FWEveViewManager::setContext().

◆ supportedTypesAndRepresentations()

virtual FWTypeToRepresentations FWViewManagerBase::supportedTypesAndRepresentations ( ) const
pure virtual

Member Data Documentation

◆ m_changeManager

FWModelChangeManager* FWViewManagerBase::m_changeManager
private

Definition at line 96 of file FWViewManagerBase.h.

Referenced by changeManager(), and setChangeManager().

◆ m_colorManager

FWColorManager* FWViewManagerBase::m_colorManager
private

Definition at line 97 of file FWViewManagerBase.h.

Referenced by colorManager(), and setColorManager().

◆ m_context

const fireworks::Context* FWViewManagerBase::m_context
private

Definition at line 94 of file FWViewManagerBase.h.

Referenced by context(), and setContext().

FWViewManagerBase::modelChangesComing
virtual void modelChangesComing()=0
FWViewManagerBase::modelChangesDone
virtual void modelChangesDone()=0
FWColorManager::colorsHaveChanged_
sigc::signal< void > colorsHaveChanged_
Definition: FWColorManager.h:101
cms::cuda::assert
assert(be >=bs)
FWViewManagerBase::colorsChanged
virtual void colorsChanged()=0
DDAxes::x
relativeConstraints.error
error
Definition: relativeConstraints.py:53
FWModelChangeManager::changeSignalsAreDone_
sigc::signal< void > changeSignalsAreDone_
Definition: FWModelChangeManager.h:50
FWViewManagerBase::m_context
const fireworks::Context * m_context
Definition: FWViewManagerBase.h:94
FWModelChangeManager::changeSignalsAreComing_
sigc::signal< void > changeSignalsAreComing_
Definition: FWModelChangeManager.h:49
FWViewManagerBase::m_changeManager
FWModelChangeManager * m_changeManager
Definition: FWViewManagerBase.h:96
FWViewManagerBase::m_colorManager
FWColorManager * m_colorManager
Definition: FWViewManagerBase.h:97
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:56
EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0.cerr
cerr
Definition: EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0.py:8