ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
graphics
VP1
VP1Systems
VP1TrackSystems
VP1TrackSystems
AssociatedObjectHandleBase.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
7
// //
8
// Header file for class AssociatedObjectHandleBase //
9
// //
10
// Description: Handle for objects associated with tracks, //
11
// such as measurements, surfaces, etc. //
12
// It might provide just one object, or it //
13
// might alternatively be split into multiple //
14
// components (parts) //
15
// //
16
// Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch) //
17
// Initial version: March 2008 //
18
// //
20
21
#ifndef ASSOCIATEDOBJECTHANDLEBASE_H
22
#define ASSOCIATEDOBJECTHANDLEBASE_H
23
24
25
26
#include <QStringList>
27
#include "
VP1TrackSystems/TrackCommonFlags.h
"
28
29
class
TrackHandleBase
;
30
class
SoTransform;
31
class
SoNode;
32
class
SoSeparator;
33
class
TrackSysCommonData
;
34
class
AssocObjAttachmentHandle
;
35
class
AssociatedObjectHandleBase
{
36
public
:
37
38
static
int
numberOfInstances
();
39
40
AssociatedObjectHandleBase
(
TrackHandleBase
*);
//The handle will register itself
41
//with the trackhandle, which will
42
//also take care of deleting it
43
//before moving to next event.
44
virtual
QStringList
clicked
() = 0;
45
// virtual SoNode * getNodeForPart( int part ) const = 0;
46
virtual
TrackCommonFlags::TSOSPartsFlags
parts
()
const
{
return
TrackCommonFlags::TSOSPartsFlags(); }
47
virtual
unsigned
nParts
()
const
{
return
1; }
48
bool
hasParameters
()
const
{
return
parts
() &
TrackCommonFlags::TSOS_TrackPars
; }
49
bool
hasParError
()
const
{
return
parts
() &
TrackCommonFlags::TSOS_AnyParsErrors
; }
50
bool
hasError
()
const
{
return
parts
() &
TrackCommonFlags::TSOS_AnyErrors
; }
51
bool
hasMaterialEffect
()
const
{
return
parts
() &
TrackCommonFlags::TSOS_AnyMaterialEffects
; }
52
bool
hasSurface
()
const
{
return
parts
() &
TrackCommonFlags::TSOS_AnySurface
; }
53
bool
hasMeasurement
()
const
{
return
parts
() &
TrackCommonFlags::TSOS_AnyMeasurement
; }
54
55
TrackSysCommonData
*
common
()
const
;
56
57
enum
PICKSTYLE
{
UNPICKABLE
,
ALL
,
COMPONENTS
};
58
void
setPickable
(
PICKSTYLE
);
59
PICKSTYLE
pickStyle
()
const
{
return
m_pickStyle
; }
60
virtual
void
setVisible
(
bool
);
61
bool
visible
()
const
{
return
m_visible
; }
62
void
toggleVisible
() {
setVisible
(!
m_visible
); }
63
64
TrackHandleBase
*
trackHandle
()
const
{
return
m_trackHandle
; }
65
void
update3DObjects
();
//Call when settings changed affecting the shapes.
66
67
//Return current shapes (0 if not built at the moment):
68
SoSeparator*
shapeSimple
()
const
;
69
SoSeparator*
shapeDetailed
()
const
;
70
71
virtual
bool
initiatesOwnZooms
()
const
{
return
false
; }
72
73
protected
:
74
75
virtual
void
buildShapes
(SoSeparator*&shape_simple, SoSeparator*&shape_detailed) = 0;
76
//The returned SoSeparators should return all necessary transforms,
77
//and must optionally also include any necessary SoMaterial nodes
78
//(otherwise everything will get the track colour).
79
80
//The next two are for LevelOfDetail. Probably return per detector type/station id?
81
virtual
int
regionIndex
()
const
{
return
0; };
82
virtual
double
lodCrossOverValue
()
const
{
return
50*50; };
83
84
private
:
85
86
// It is illegal to copy/assign an AssociatedObjectHandleBase:
87
AssociatedObjectHandleBase
(
const
AssociatedObjectHandleBase
& );
88
AssociatedObjectHandleBase
&
operator=
(
const
AssociatedObjectHandleBase
& );
89
90
class
Imp
;
91
Imp
*
m_d
;
92
93
TrackHandleBase
*
m_trackHandle
;
94
bool
m_visible
;
95
PICKSTYLE
m_pickStyle
;
96
void
registerShapes
(SoSeparator*simple,SoSeparator*detailed);
97
void
unregisterShapes
(SoSeparator*simple,SoSeparator*detailed);
98
AssocObjAttachmentHandle
*
getAttachmentHandle
();
99
100
protected
:
101
friend
class
TrackHandleBase
;
102
virtual
~AssociatedObjectHandleBase
();
//The TrackHandleBase will delete it.
103
104
};
105
106
#endif
TrackCommonFlags.h
AssocObjAttachmentHandle
Definition
TrackHandleBase.h:203
AssociatedObjectHandleBase::Imp
Definition
AssociatedObjectHandleBase.cxx:27
AssociatedObjectHandleBase::hasError
bool hasError() const
Definition
AssociatedObjectHandleBase.h:50
AssociatedObjectHandleBase::setPickable
void setPickable(PICKSTYLE)
Definition
AssociatedObjectHandleBase.cxx:136
AssociatedObjectHandleBase::hasParError
bool hasParError() const
Definition
AssociatedObjectHandleBase.h:49
AssociatedObjectHandleBase::shapeSimple
SoSeparator * shapeSimple() const
Definition
AssociatedObjectHandleBase.cxx:200
AssociatedObjectHandleBase::PICKSTYLE
PICKSTYLE
Definition
AssociatedObjectHandleBase.h:57
AssociatedObjectHandleBase::UNPICKABLE
@ UNPICKABLE
Definition
AssociatedObjectHandleBase.h:57
AssociatedObjectHandleBase::COMPONENTS
@ COMPONENTS
Definition
AssociatedObjectHandleBase.h:57
AssociatedObjectHandleBase::ALL
@ ALL
Definition
AssociatedObjectHandleBase.h:57
AssociatedObjectHandleBase::numberOfInstances
static int numberOfInstances()
Definition
AssociatedObjectHandleBase.cxx:130
AssociatedObjectHandleBase::AssociatedObjectHandleBase
AssociatedObjectHandleBase(TrackHandleBase *)
Definition
AssociatedObjectHandleBase.cxx:111
AssociatedObjectHandleBase::clicked
virtual QStringList clicked()=0
AssociatedObjectHandleBase::pickStyle
PICKSTYLE pickStyle() const
Definition
AssociatedObjectHandleBase.h:59
AssociatedObjectHandleBase::m_pickStyle
PICKSTYLE m_pickStyle
Definition
AssociatedObjectHandleBase.h:95
AssociatedObjectHandleBase::registerShapes
void registerShapes(SoSeparator *simple, SoSeparator *detailed)
Definition
AssociatedObjectHandleBase.cxx:93
AssociatedObjectHandleBase::setVisible
virtual void setVisible(bool)
Definition
AssociatedObjectHandleBase.cxx:171
AssociatedObjectHandleBase::toggleVisible
void toggleVisible()
Definition
AssociatedObjectHandleBase.h:62
AssociatedObjectHandleBase::parts
virtual TrackCommonFlags::TSOSPartsFlags parts() const
Definition
AssociatedObjectHandleBase.h:46
AssociatedObjectHandleBase::update3DObjects
void update3DObjects()
Definition
AssociatedObjectHandleBase.cxx:185
AssociatedObjectHandleBase::~AssociatedObjectHandleBase
virtual ~AssociatedObjectHandleBase()
Definition
AssociatedObjectHandleBase.cxx:118
AssociatedObjectHandleBase::m_trackHandle
TrackHandleBase * m_trackHandle
Definition
AssociatedObjectHandleBase.h:93
AssociatedObjectHandleBase::operator=
AssociatedObjectHandleBase & operator=(const AssociatedObjectHandleBase &)
AssociatedObjectHandleBase::regionIndex
virtual int regionIndex() const
Definition
AssociatedObjectHandleBase.h:81
AssociatedObjectHandleBase::getAttachmentHandle
AssocObjAttachmentHandle * getAttachmentHandle()
Definition
AssociatedObjectHandleBase.cxx:155
AssociatedObjectHandleBase::common
TrackSysCommonData * common() const
Definition
AssociatedObjectHandleBase.cxx:105
AssociatedObjectHandleBase::hasMaterialEffect
bool hasMaterialEffect() const
Definition
AssociatedObjectHandleBase.h:51
AssociatedObjectHandleBase::buildShapes
virtual void buildShapes(SoSeparator *&shape_simple, SoSeparator *&shape_detailed)=0
AssociatedObjectHandleBase::m_visible
bool m_visible
Definition
AssociatedObjectHandleBase.h:94
AssociatedObjectHandleBase::trackHandle
TrackHandleBase * trackHandle() const
Definition
AssociatedObjectHandleBase.h:64
AssociatedObjectHandleBase::m_d
Imp * m_d
Definition
AssociatedObjectHandleBase.h:91
AssociatedObjectHandleBase::TrackHandleBase
friend class TrackHandleBase
Definition
AssociatedObjectHandleBase.h:101
AssociatedObjectHandleBase::hasMeasurement
bool hasMeasurement() const
Definition
AssociatedObjectHandleBase.h:53
AssociatedObjectHandleBase::hasParameters
bool hasParameters() const
Definition
AssociatedObjectHandleBase.h:48
AssociatedObjectHandleBase::initiatesOwnZooms
virtual bool initiatesOwnZooms() const
Definition
AssociatedObjectHandleBase.h:71
AssociatedObjectHandleBase::shapeDetailed
SoSeparator * shapeDetailed() const
Definition
AssociatedObjectHandleBase.cxx:206
AssociatedObjectHandleBase::hasSurface
bool hasSurface() const
Definition
AssociatedObjectHandleBase.h:52
AssociatedObjectHandleBase::nParts
virtual unsigned nParts() const
Definition
AssociatedObjectHandleBase.h:47
AssociatedObjectHandleBase::unregisterShapes
void unregisterShapes(SoSeparator *simple, SoSeparator *detailed)
Definition
AssociatedObjectHandleBase.cxx:99
AssociatedObjectHandleBase::lodCrossOverValue
virtual double lodCrossOverValue() const
Definition
AssociatedObjectHandleBase.h:82
AssociatedObjectHandleBase::AssociatedObjectHandleBase
AssociatedObjectHandleBase(const AssociatedObjectHandleBase &)
AssociatedObjectHandleBase::visible
bool visible() const
Definition
AssociatedObjectHandleBase.h:61
TrackCommonFlags::TSOS_AnyParsErrors
@ TSOS_AnyParsErrors
Definition
TrackCommonFlags.h:66
TrackCommonFlags::TSOS_TrackPars
@ TSOS_TrackPars
bit 0
Definition
TrackCommonFlags.h:44
TrackCommonFlags::TSOS_AnySurface
@ TSOS_AnySurface
Definition
TrackCommonFlags.h:60
TrackCommonFlags::TSOS_AnyMaterialEffects
@ TSOS_AnyMaterialEffects
Definition
TrackCommonFlags.h:59
TrackCommonFlags::TSOS_AnyMeasurement
@ TSOS_AnyMeasurement
Definition
TrackCommonFlags.h:61
TrackCommonFlags::TSOS_AnyErrors
@ TSOS_AnyErrors
Definition
TrackCommonFlags.h:67
TrackHandleBase
Definition
TrackHandleBase.h:57
TrackSysCommonData
Definition
TrackSysCommonData.h:50
Generated on
for ATLAS Offline Software by
1.17.0