ATLAS Offline Software
Loading...
Searching...
No Matches
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>
28
29class TrackHandleBase;
30class SoTransform;
31class SoNode;
32class SoSeparator;
36public:
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; }
50 bool hasError() const { return parts() & TrackCommonFlags::TSOS_AnyErrors; }
54
55 TrackSysCommonData * common() const;
56
59 PICKSTYLE pickStyle() const { return m_pickStyle; }
60 virtual void setVisible(bool);
61 bool visible() const { return m_visible; }
63
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
73protected:
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
84private:
85
86 // It is illegal to copy/assign an AssociatedObjectHandleBase:
89
90 class Imp;
92
96 void registerShapes(SoSeparator*simple,SoSeparator*detailed);
97 void unregisterShapes(SoSeparator*simple,SoSeparator*detailed);
99
100protected:
101 friend class TrackHandleBase;
102 virtual ~AssociatedObjectHandleBase();//The TrackHandleBase will delete it.
103
104};
105
106#endif
virtual QStringList clicked()=0
void registerShapes(SoSeparator *simple, SoSeparator *detailed)
virtual TrackCommonFlags::TSOSPartsFlags parts() const
AssociatedObjectHandleBase & operator=(const AssociatedObjectHandleBase &)
AssocObjAttachmentHandle * getAttachmentHandle()
TrackSysCommonData * common() const
virtual void buildShapes(SoSeparator *&shape_simple, SoSeparator *&shape_detailed)=0
TrackHandleBase * trackHandle() const
void unregisterShapes(SoSeparator *simple, SoSeparator *detailed)
virtual double lodCrossOverValue() const
AssociatedObjectHandleBase(const AssociatedObjectHandleBase &)