ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
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  }

◆ 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  }

◆ ensureInitCommonData()

void VP1PrepRawDataSystem::Imp::ensureInitCommonData ( )
inline

Definition at line 195 of file VP1PrepRawDataSystem.cxx.

195  {
196  if (!common) {
199  }
200  }

◆ 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:
78  if (selNode_highlight) {
79  selNode_highlight->deselectAll();
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();
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);
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) {
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");
166  }
167  }

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:
checkFileSG.line
line
Definition: checkFileSG.py:75
athena.path
path
python interpreter configuration --------------------------------------—
Definition: athena.py:128
TRTCalib_cfilter.p1
p1
Definition: TRTCalib_cfilter.py:130
PRDHandleBase::positionPRD
Amg::Vector3D positionPRD() const
Definition: PRDHandleBase.cxx:303
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
VP1PrepRawDataSystem::Imp::currentlySelectedHandles
QList< PRDHandleBase * > currentlySelectedHandles
Definition: VP1PrepRawDataSystem.cxx:71
PRDSysCommonData
Definition: PRDSysCommonData.h:35
VP1String::str
static QString str(const QString &s)
Definition: VP1String.h:49
VP1PrepRawDataSystem::Imp::clearMultiSelLine
void clearMultiSelLine()
Definition: VP1PrepRawDataSystem.cxx:66
VP1PrepRawDataSystem::Imp::controller
PRDSystemController * controller
Definition: VP1PrepRawDataSystem.cxx:56
TRTCalib_cfilter.p2
p2
Definition: TRTCalib_cfilter.py:131
lumiFormat.i
int i
Definition: lumiFormat.py:85
PRDHandleBase::getSecondPRD
virtual const Trk::PrepRawData * getSecondPRD() const
Definition: PRDHandleBase.h:73
PRDSystemController::showSelectionLine
bool showSelectionLine() const
Definition: PRDSystemController.cxx:614
IVP1System::name
const QString & name() const
Definition: IVP1System.cxx:50
IVP13DSystemSimple::ensureBuildController
void ensureBuildController()
Definition: IVP13DSystemSimple.cxx:90
PRDHandleBase::positionSecondPRD
Amg::Vector3D positionSecondPRD() const
Definition: PRDHandleBase.cxx:309
VP1PrepRawDataSystem::Imp::multisel_sep
SoSeparator * multisel_sep
Definition: VP1PrepRawDataSystem.cxx:65
Trk::PrepRawData
Definition: PrepRawData.h:62
PRDHandleBase::getPRD
virtual const Trk::PrepRawData * getPRD() const =0
VP1PrepRawDataSystem::Imp::theclass
VP1PrepRawDataSystem * theclass
Definition: VP1PrepRawDataSystem.cxx:54
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
query_example.col
col
Definition: query_example.py:7
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
copySelective.target
string target
Definition: copySelective.py:37
VP1PrepRawDataSystem::selectedPRDsChanged
void selectedPRDsChanged(const QList< const Trk::PrepRawData * > &)
VP1PrepRawDataSystem::Imp::selNode_highlight
SoCooperativeSelection * selNode_highlight
Definition: VP1PrepRawDataSystem.cxx:58
PRDHandleBase
Definition: PRDHandleBase.h:35
mag2
Scalar mag2() const
mag2 method - forward to squaredNorm()
Definition: AmgMatrixBasePlugin.h:31
VP1PrepRawDataSystem::Imp::lastEmittedPRDList
QList< const Trk::PrepRawData * > lastEmittedPRDList
Definition: VP1PrepRawDataSystem.cxx:72
VP1QtInventorUtils::changePathTail
static bool changePathTail(SoPath *path, SoNode *commonBranchPoint, SoNode *newtail)
Definition: VP1QtInventorUtils.cxx:1348
IVP1System::message
void message(const QString &) const
Definition: IVP1System.cxx:336
IVP1System::messageVerbose
void messageVerbose(const QString &) const
Definition: IVP1System.cxx:354
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35
common
Definition: common.py:1