CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes
FWViewGeometryList Class Reference

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

Inheritance diagram for FWViewGeometryList:
FW3DViewGeometry FWRPZViewGeometry

Public Member Functions

 FWViewGeometryList (const fireworks::Context &context, bool projected=true)
 
 FWViewGeometryList (const FWViewGeometryList &)=delete
 
const FWViewGeometryListoperator= (const FWViewGeometryList &)=delete
 
void updateColors ()
 
void updateTransparency (bool projectedType)
 
 ~FWViewGeometryList () override
 

Protected Member Functions

void addToCompound (TEveElement *el, FWGeomColorIndex idx, bool applyTransp=true) const
 

Protected Attributes

TEveCompound * m_colorComp [kFWGeomColorSize]
 
const fireworks::Contextm_context
 
const FWGeometrym_geom
 

Private Attributes

sigc::connection m_colorConnection
 
bool m_projected
 
sigc::connection m_transpConnection
 

Detailed Description

Description: [one line class summary]

Usage: <usage>

Definition at line 34 of file FWViewGeometryList.h.

Constructor & Destructor Documentation

◆ FWViewGeometryList() [1/2]

FWViewGeometryList::FWViewGeometryList ( const fireworks::Context context,
bool  projected = true 
)

Definition at line 22 of file FWViewGeometryList.cc.

References fireworks::Context::colorManager(), visDQMUpload::context, FWColorManager::geomColor(), FWColorManager::geomTransparency(), mps_fire::i, kFWGeomColorSize, m_colorComp, m_colorConnection, m_context, m_geom, m_projected, m_transpConnection, updateColors(), and updateTransparency().

23  : m_context(context), m_geom(nullptr), m_projected(projected) {
24  m_geom = context.getGeom();
25 
26  for (int i = 0; i < kFWGeomColorSize; ++i) {
27  m_colorComp[i] = new TEveCompound(Form("3D view color compund [%d]", i));
30  m_colorComp[i]->CSCApplyMainColorToAllChildren();
31  m_colorComp[i]->CSCApplyMainTransparencyToMatchingChildren();
32  }
34  context.colorManager()->geomColorsHaveChanged_.connect(std::bind(&FWViewGeometryList::updateColors, this));
35  m_transpConnection = context.colorManager()->geomTransparencyHaveChanged_.connect(
36  std::bind(&FWViewGeometryList::updateTransparency, this, std::placeholders::_1));
37 }
TEveCompound * m_colorComp[kFWGeomColorSize]
FWGeomColorIndex
Color_t geomTransparency(bool projected) const
void updateTransparency(bool projectedType)
Color_t geomColor(FWGeomColorIndex) const
const FWGeometry * m_geom
sigc::connection m_transpConnection
sigc::connection m_colorConnection
const fireworks::Context & m_context
FWColorManager * colorManager() const
Definition: Context.h:58

◆ ~FWViewGeometryList()

FWViewGeometryList::~FWViewGeometryList ( )
override

Definition at line 39 of file FWViewGeometryList.cc.

References mps_fire::i, kFWGeomColorSize, m_colorComp, m_colorConnection, and m_transpConnection.

39  {
40  m_transpConnection.disconnect();
41  m_colorConnection.disconnect();
42  for (int i = 0; i < kFWGeomColorSize; ++i) {
43  if (m_colorComp[i])
44  m_colorComp[i]->Destroy();
45  }
46 }
TEveCompound * m_colorComp[kFWGeomColorSize]
sigc::connection m_transpConnection
sigc::connection m_colorConnection

◆ FWViewGeometryList() [2/2]

FWViewGeometryList::FWViewGeometryList ( const FWViewGeometryList )
delete

Member Function Documentation

◆ addToCompound()

void FWViewGeometryList::addToCompound ( TEveElement *  el,
FWGeomColorIndex  idx,
bool  applyTransp = true 
) const
protected

◆ operator=()

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

◆ updateColors()

void FWViewGeometryList::updateColors ( )

Definition at line 57 of file FWViewGeometryList.cc.

References fireworks::Context::colorManager(), FWColorManager::geomColor(), FWColorManager::geomTransparency(), mps_fire::i, kFWGeomColorSize, m_colorComp, m_context, and m_projected.

Referenced by FWViewGeometryList().

57  {
58  // printf("%p FWViewGeometryList::updateColors projected %d %s \n", this, m_projected, GetElementName());
59  for (int i = 0; i < kFWGeomColorSize; ++i) {
62  m_colorComp[i]->ElementChanged();
63  }
64 }
TEveCompound * m_colorComp[kFWGeomColorSize]
FWGeomColorIndex
Color_t geomTransparency(bool projected) const
Color_t geomColor(FWGeomColorIndex) const
const fireworks::Context & m_context
FWColorManager * colorManager() const
Definition: Context.h:58

◆ updateTransparency()

void FWViewGeometryList::updateTransparency ( bool  projectedType)

Definition at line 66 of file FWViewGeometryList.cc.

References fireworks::Context::colorManager(), FWColorManager::geomTransparency(), mps_fire::i, kFWGeomColorSize, m_colorComp, m_context, and m_projected.

Referenced by FWViewGeometryList().

66  {
67  // printf("%p transp [%d]\n", this, iTransp);
68 
69  if (projectedType == m_projected) {
70  for (int i = 0; i < kFWGeomColorSize; ++i) {
71  m_colorComp[i]->SetMainTransparency(m_context.colorManager()->geomTransparency(projectedType));
72  m_colorComp[i]->ElementChanged();
73  }
74  }
75 }
TEveCompound * m_colorComp[kFWGeomColorSize]
Color_t geomTransparency(bool projected) const
const fireworks::Context & m_context
FWColorManager * colorManager() const
Definition: Context.h:58

Member Data Documentation

◆ m_colorComp

TEveCompound* FWViewGeometryList::m_colorComp[kFWGeomColorSize]
protected

◆ m_colorConnection

sigc::connection FWViewGeometryList::m_colorConnection
private

Definition at line 58 of file FWViewGeometryList.h.

Referenced by FWViewGeometryList(), and ~FWViewGeometryList().

◆ m_context

const fireworks::Context& FWViewGeometryList::m_context
protected

◆ m_geom

const FWGeometry* FWViewGeometryList::m_geom
protected

◆ m_projected

bool FWViewGeometryList::m_projected
private

Definition at line 59 of file FWViewGeometryList.h.

Referenced by FWViewGeometryList(), updateColors(), and updateTransparency().

◆ m_transpConnection

sigc::connection FWViewGeometryList::m_transpConnection
private

Definition at line 57 of file FWViewGeometryList.h.

Referenced by FWViewGeometryList(), and ~FWViewGeometryList().