ATLAS Offline Software
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | List of all members
VP1RawDataHandleBase Class Referenceabstract

#include <VP1RawDataHandleBase.h>

Inheritance diagram for VP1RawDataHandleBase:
Collaboration diagram for VP1RawDataHandleBase:

Classes

class  Imp
 

Public Member Functions

 VP1RawDataHandleBase (VP1RawDataCollBase *)
 
virtual ~VP1RawDataHandleBase ()
 
VP1RawDataCollBasecoll () const
 
VP1RawDataCommonDatacommon () const
 
void setVisible (bool)
 
bool visible () const
 
void update3DObjects ()
 
virtual QStringList clicked (bool verbose) const =0
 
virtual Amg::Vector3D center ()
 
virtual VP1RawDataFlags::InDetPartsFlags inInDetParts () const
 
void updateShownOutlines ()
 

Static Public Member Functions

static QString unsignedToHex (unsigned)
 

Protected Member Functions

virtual SoNode * buildShape ()=0
 
virtual SoTransform * buildTransform ()=0
 
 VP1RawDataHandleBase (const VP1RawDataHandleBase &)
 
VP1RawDataHandleBaseoperator= (const VP1RawDataHandleBase &)
 

Private Attributes

Impm_d
 
VP1RawDataCollBasem_coll
 
bool m_visible
 

Detailed Description

Definition at line 34 of file VP1RawDataHandleBase.h.

Constructor & Destructor Documentation

◆ VP1RawDataHandleBase() [1/2]

VP1RawDataHandleBase::VP1RawDataHandleBase ( VP1RawDataCollBase coll)

Definition at line 50 of file VP1RawDataHandleBase.cxx.

51  : m_d(new Imp), m_coll(coll), m_visible(false)//,m_currentmaterial(0)
52 {
53 
54 }

◆ ~VP1RawDataHandleBase()

VP1RawDataHandleBase::~VP1RawDataHandleBase ( )
virtual

Definition at line 57 of file VP1RawDataHandleBase.cxx.

58 {
59  if (m_visible)
61  m_d->clearShape();
62  if (m_d->sep)
63  m_d->sep->unref();
64  delete m_d;
65 }

◆ VP1RawDataHandleBase() [2/2]

VP1RawDataHandleBase::VP1RawDataHandleBase ( const VP1RawDataHandleBase )
protected

Member Function Documentation

◆ buildShape()

virtual SoNode* VP1RawDataHandleBase::buildShape ( )
protectedpure virtual

◆ buildTransform()

virtual SoTransform* VP1RawDataHandleBase::buildTransform ( )
protectedpure virtual

◆ center()

Amg::Vector3D VP1RawDataHandleBase::center ( )
virtual

Definition at line 166 of file VP1RawDataHandleBase.cxx.

167 {
169  assert(m_d->sep
170  && m_d->sep->getNumChildren()>0
171  && m_d->sep->getChild(0)->getTypeId().isDerivedFrom(SoTransform::getClassTypeId()));
172 
173  float x,y,z;
174  static_cast<SoTransform*>(m_d->sep->getChild(0))->translation.getValue().getValue(x,y,z);
175  //NB: We assume that the center part of the transform is zero
176  return Amg::Vector3D(x,y,z);
177 }

◆ clicked()

virtual QStringList VP1RawDataHandleBase::clicked ( bool  verbose) const
pure virtual

◆ coll()

VP1RawDataCollBase* VP1RawDataHandleBase::coll ( ) const
inline

Definition at line 40 of file VP1RawDataHandleBase.h.

40 { return m_coll; }

◆ common()

VP1RawDataCommonData* VP1RawDataHandleBase::common ( ) const
inline

Definition at line 41 of file VP1RawDataHandleBase.h.

41 { return m_coll->common(); }

◆ inInDetParts()

virtual VP1RawDataFlags::InDetPartsFlags VP1RawDataHandleBase::inInDetParts ( ) const
inlinevirtual

Reimplemented in VP1RawDataHandle_PixelRDO, VP1RawDataHandle_SCT_RDO, and VP1RawDataHandle_TRT_RDO.

Definition at line 51 of file VP1RawDataHandleBase.h.

51 { return VP1RawDataFlags::None; }//Override if InDet

◆ operator=()

VP1RawDataHandleBase& VP1RawDataHandleBase::operator= ( const VP1RawDataHandleBase )
protected

◆ setVisible()

void VP1RawDataHandleBase::setVisible ( bool  vis)

Definition at line 68 of file VP1RawDataHandleBase.cxx.

69 {
70  if (vis==m_visible)
71  return;
72  m_visible=vis;
73  if (vis) {
74  if (!m_d->hasShape())
75  m_d->rebuild3DObjects(this);
77  } else {
79  }
80 }

◆ unsignedToHex()

QString VP1RawDataHandleBase::unsignedToHex ( unsigned  i)
static

Definition at line 158 of file VP1RawDataHandleBase.cxx.

159 {
160  std::ostringstream s;
161  s << "0x" << std::hex << i;
162  return QString(s.str().c_str()).toUpper();
163 }

◆ update3DObjects()

void VP1RawDataHandleBase::update3DObjects ( )

Definition at line 83 of file VP1RawDataHandleBase.cxx.

84 {
85  if (m_visible) {
86  m_d->rebuild3DObjects(this);
87  } else {
88  //Simply clear the present 3D objects. They will only be recreated if/when the handle becomes visible again.
89  m_d->clearShape();
90  }
91 }

◆ updateShownOutlines()

void VP1RawDataHandleBase::updateShownOutlines ( )

Definition at line 180 of file VP1RawDataHandleBase.cxx.

181 {
182  if (!m_d->sep)
183  return;
185 }

◆ visible()

bool VP1RawDataHandleBase::visible ( ) const
inline

Definition at line 44 of file VP1RawDataHandleBase.h.

44 { return m_visible; }

Member Data Documentation

◆ m_coll

VP1RawDataCollBase* VP1RawDataHandleBase::m_coll
private

Definition at line 70 of file VP1RawDataHandleBase.h.

◆ m_d

Imp* VP1RawDataHandleBase::m_d
private

Definition at line 68 of file VP1RawDataHandleBase.h.

◆ m_visible

bool VP1RawDataHandleBase::m_visible
private

Definition at line 71 of file VP1RawDataHandleBase.h.


The documentation for this class was generated from the following files:
VP1RawDataHandleBase::m_coll
VP1RawDataCollBase * m_coll
Definition: VP1RawDataHandleBase.h:70
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
VP1RawDataHandleBase::Imp::ensureInitSepAndTransform
void ensureInitSepAndTransform(VP1RawDataHandleBase *theclass)
Definition: VP1RawDataHandleBase.cxx:94
VP1RawDataHandleBase::Imp::ensureAttach3DObjects
void ensureAttach3DObjects(VP1RawDataHandleBase *theclass)
Definition: VP1RawDataHandleBase.cxx:134
x
#define x
VP1RawDataHandleBase::Imp::hasShape
bool hasShape() const
Definition: VP1RawDataHandleBase.cxx:36
VP1RawDataFlags::None
@ None
Definition: VP1RawDataFlags.h:24
lumiFormat.i
int i
Definition: lumiFormat.py:85
z
#define z
VP1RawDataCommonData::updateVolumeOutlines
void updateVolumeOutlines(SoGroup *)
Definition: VP1RawDataCommonData.cxx:91
VP1RawDataHandleBase::Imp::sep
SoSeparator * sep
Definition: VP1RawDataHandleBase.cxx:33
VP1RawDataHandleBase::Imp::rebuild3DObjects
void rebuild3DObjects(VP1RawDataHandleBase *)
Definition: VP1RawDataHandleBase.cxx:107
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
y
#define y
VP1RawDataHandleBase::m_d
Imp * m_d
Definition: VP1RawDataHandleBase.h:67
VP1RawDataHandleBase::coll
VP1RawDataCollBase * coll() const
Definition: VP1RawDataHandleBase.h:40
VP1RawDataHandleBase::Imp::ensureDetach3DObjects
void ensureDetach3DObjects(VP1RawDataHandleBase *theclass)
Definition: VP1RawDataHandleBase.cxx:146
VP1RawDataHandleBase::m_visible
bool m_visible
Definition: VP1RawDataHandleBase.h:71
VP1RawDataHandleBase::Imp::clearShape
void clearShape()
Definition: VP1RawDataHandleBase.cxx:41
VP1RawDataHandleBase::common
VP1RawDataCommonData * common() const
Definition: VP1RawDataHandleBase.h:41
VP1RawDataCollBase::common
VP1RawDataCommonData * common() const
Definition: VP1RawDataCollBase.h:39