ATLAS Offline Software
Loading...
Searching...
No Matches
VP1PrepRawDataSystem::Imp Class Reference
Collaboration diagram for VP1PrepRawDataSystem::Imp:

Public Member Functions

void clearMultiSelLine ()
void selectionChanged ()
template<class T>
QList< PRDCollHandleBase * > createSpecificCollections ()
QList< PRDCollHandleBase * > createCollections ()
void ensureInitCommonData ()

Public Attributes

VP1PrepRawDataSystemtheclass = nullptr
PRDSysCommonDatacommon = nullptr
PRDSystemControllercontroller = nullptr
SoCooperativeSelectionselNode_click = nullptr
SoCooperativeSelectionselNode_highlight = nullptr
InDetProjFlags::InDetProjPartsFlags idprojflags_pixel
InDetProjFlags::InDetProjPartsFlags idprojflags_sct
InDetProjFlags::InDetProjPartsFlags idprojflags_trt
int appropriatemdtprojection = 0
SoSeparator * multisel_sep = nullptr
QList< PRDHandleBase * > currentlySelectedHandles
QList< const Trk::PrepRawData * > lastEmittedPRDList

Detailed Description

Definition at line 52 of file VP1PrepRawDataSystem.cxx.

Member Function Documentation

◆ clearMultiSelLine()

void VP1PrepRawDataSystem::Imp::clearMultiSelLine ( )
inline

Definition at line 66 of file VP1PrepRawDataSystem.cxx.

66 {
67 while (multisel_sep&&multisel_sep->getNumChildren()>2)
68 multisel_sep->removeChild(2);
69 }

◆ createCollections()

QList< PRDCollHandleBase * > VP1PrepRawDataSystem::Imp::createCollections ( )
inline

Definition at line 179 of file VP1PrepRawDataSystem.cxx.

179 {
180 QList<PRDCollHandleBase*> l;
181 l << createSpecificCollections<PRDCollHandle_Pixel>();
182 l << createSpecificCollections<PRDCollHandle_SCT>();
183 l << createSpecificCollections<PRDCollHandle_TRT>();
184 l << createSpecificCollections<PRDCollHandle_SpacePoints>();
185 l << createSpecificCollections<PRDCollHandle_CSC>();
186 l << createSpecificCollections<PRDCollHandle_CSC_Strip>();
187 l << createSpecificCollections<PRDCollHandle_MDT>();
188 l << createSpecificCollections<PRDCollHandle_MM>();
189 l << createSpecificCollections<PRDCollHandle_RPC>();
190 l << createSpecificCollections<PRDCollHandle_TGC>();
191 l << createSpecificCollections<PRDCollHandle_sTGC>();
192 return l;
193 }
l
Printing final latex table to .tex output file.

◆ createSpecificCollections()

template<class T>
QList< PRDCollHandleBase * > VP1PrepRawDataSystem::Imp::createSpecificCollections ( )
inline

Definition at line 170 of file VP1PrepRawDataSystem.cxx.

170 {
171 QList<PRDCollHandleBase*> l;
172 for (const QString& name : T::availableCollections(theclass)) {
173 T * col = new T(common,name);
174 col->init();
175 l << col;
176 }
177 return l;
178 }
const QString & name() const
VP1PrepRawDataSystem * theclass
unsigned long long T

◆ ensureInitCommonData()

void VP1PrepRawDataSystem::Imp::ensureInitCommonData ( )
inline

Definition at line 195 of file VP1PrepRawDataSystem.cxx.

195 {
196 if (!common) {
197 theclass->ensureBuildController();
198 common = new PRDSysCommonData(theclass,controller);
199 }
200 }
PRDSystemController * controller

◆ selectionChanged()

void VP1PrepRawDataSystem::Imp::selectionChanged ( )
inline

Definition at line 73 of file VP1PrepRawDataSystem.cxx.

73 {
74 currentlySelectedHandles.removeAll(0);//just to be sure
76
77 //Proper highlighting:
79 selNode_highlight->deselectAll();
80 for(PRDHandleBase*handle : currentlySelectedHandles) {
81 // theclass->messageDebug("Highlighting handle...");
82 SoSeparator* target = handle->collHandle()->simpleDetailLevel() ? handle->sepSimple() : handle->sepDetailed();
83 SoPath * path = new SoPath(selNode_highlight);
84 path->ref();
85 // theclass->messageDebug("Attempting to highlight sep="+str(target));
87 theclass->message("ERROR: Failed to relocate picked node.");
88 path->unref();
89 continue;
90 }
91 selNode_highlight->select(path);
92 path->unref();
93 }
94 selNode_highlight->touch();
95 if (multisel_sep&&currentlySelectedHandles.count()>1&&controller->showSelectionLine()) {
96 SoLineSet * line = new SoLineSet;
97 SoVertexProperty * vertices = new SoVertexProperty;
98 line->vertexProperty = vertices;
99 line->numVertices.set1Value(0,currentlySelectedHandles.count());
100 int i(0);
101 for(PRDHandleBase*handle : currentlySelectedHandles) {
102 Amg::Vector3D pos(handle->center());
103 vertices->vertex.set1Value(i++,pos.x(),pos.y(),pos.z());
104 }
105 multisel_sep->addChild(line);
106 //Fixme: make this unpickable!!
107
108 }
109 }
110
111 //emit signal if appropriate:
112 QList<const Trk::PrepRawData*> currentPRDs;
113 for(int i = 0; i < currentlySelectedHandles.count(); ++i) {
114 PRDHandleBase*handle = currentlySelectedHandles.at(i);
115 const Trk::PrepRawData* prd1 = handle->getPRD();
116 const Trk::PrepRawData* prd2 = handle->getSecondPRD();
117 if (prd1&&currentPRDs.contains(prd1)) prd1 = 0;
118 if (prd2&&currentPRDs.contains(prd2)) prd2 = 0;
119 if (!prd2) {
120 if (!prd1)
121 continue;
122 currentPRDs << prd1;
123 } else {
124 //both prd1 and prd2 are non-zero and not in the list
125 //already. Which should be first? We order them by distance to
126 //the preceding or following prd.
127
128 Amg::Vector3D p1(handle->positionPRD());
130
131 if (i>0) {
132 Amg::Vector3D prevpos = currentlySelectedHandles.at(i-1)->center();
133 if ((p1-prevpos).mag2()>(p2-prevpos).mag2()) {
134 //prd2 before prd1
135 currentPRDs << prd2;
136 currentPRDs << prd1;
137 } else {
138 //prd1 before prd2
139 currentPRDs << prd1;
140 currentPRDs << prd2;
141 }
142 } else {
143 if (i+1<currentlySelectedHandles.count()) {
144 Amg::Vector3D nextpos = currentlySelectedHandles.at(i+1)->center();
145 if ((p1-nextpos).mag2()>(p2-nextpos).mag2()) {
146 //prd1 before prd2
147 currentPRDs << prd1;
148 currentPRDs << prd2;
149 } else {
150 //prd2 before prd1
151 currentPRDs << prd2;
152 currentPRDs << prd1;
153 }
154 } else {
155 //Only this one. Just add them:
156 currentPRDs << prd1;
157 currentPRDs << prd2;
158 }
159 }
160 }
161 }
162 if (currentPRDs!=lastEmittedPRDList) {
163 lastEmittedPRDList = currentPRDs;
164 theclass->messageVerbose("Emitting list of "+str(lastEmittedPRDList.count())+" selected PRDs");
165 emit theclass->selectedPRDsChanged(lastEmittedPRDList);
166 }
167 }
Scalar mag2() const
mag2 method - forward to squaredNorm()
virtual const Trk::PrepRawData * getSecondPRD() const
virtual const Trk::PrepRawData * getPRD() const =0
Amg::Vector3D positionPRD() const
Amg::Vector3D positionSecondPRD() const
SoCooperativeSelection * selNode_highlight
QList< PRDHandleBase * > currentlySelectedHandles
QList< const Trk::PrepRawData * > lastEmittedPRDList
static bool changePathTail(SoPath *path, SoNode *commonBranchPoint, SoNode *newtail)
Eigen::Matrix< double, 3, 1 > Vector3D
path
python interpreter configuration --------------------------------------—
Definition athena.py:128

Member Data Documentation

◆ appropriatemdtprojection

int VP1PrepRawDataSystem::Imp::appropriatemdtprojection = 0

Definition at line 63 of file VP1PrepRawDataSystem.cxx.

◆ common

PRDSysCommonData* VP1PrepRawDataSystem::Imp::common = nullptr

Definition at line 55 of file VP1PrepRawDataSystem.cxx.

◆ controller

PRDSystemController* VP1PrepRawDataSystem::Imp::controller = nullptr

Definition at line 56 of file VP1PrepRawDataSystem.cxx.

◆ currentlySelectedHandles

QList<PRDHandleBase*> VP1PrepRawDataSystem::Imp::currentlySelectedHandles

Definition at line 71 of file VP1PrepRawDataSystem.cxx.

◆ idprojflags_pixel

InDetProjFlags::InDetProjPartsFlags VP1PrepRawDataSystem::Imp::idprojflags_pixel

Definition at line 60 of file VP1PrepRawDataSystem.cxx.

◆ idprojflags_sct

InDetProjFlags::InDetProjPartsFlags VP1PrepRawDataSystem::Imp::idprojflags_sct

Definition at line 61 of file VP1PrepRawDataSystem.cxx.

◆ idprojflags_trt

InDetProjFlags::InDetProjPartsFlags VP1PrepRawDataSystem::Imp::idprojflags_trt

Definition at line 62 of file VP1PrepRawDataSystem.cxx.

◆ lastEmittedPRDList

QList<const Trk::PrepRawData*> VP1PrepRawDataSystem::Imp::lastEmittedPRDList

Definition at line 72 of file VP1PrepRawDataSystem.cxx.

◆ multisel_sep

SoSeparator* VP1PrepRawDataSystem::Imp::multisel_sep = nullptr

Definition at line 65 of file VP1PrepRawDataSystem.cxx.

◆ selNode_click

SoCooperativeSelection* VP1PrepRawDataSystem::Imp::selNode_click = nullptr

Definition at line 57 of file VP1PrepRawDataSystem.cxx.

◆ selNode_highlight

SoCooperativeSelection* VP1PrepRawDataSystem::Imp::selNode_highlight = nullptr

Definition at line 58 of file VP1PrepRawDataSystem.cxx.

◆ theclass

VP1PrepRawDataSystem* VP1PrepRawDataSystem::Imp::theclass = nullptr

Definition at line 54 of file VP1PrepRawDataSystem.cxx.


The documentation for this class was generated from the following file: