ATLAS Offline Software
Loading...
Searching...
No Matches
graphics
VP1
VP1Systems
VP1TrackSystems
src
TrackCollWidget.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
7
// //
8
// Implementation of class TrackCollWidget //
9
// //
10
// Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch) //
11
// Initial version: February 2008 //
12
// //
14
15
#include "
VP1TrackSystems/TrackCollWidget.h
"
16
#include "
VP1TrackSystems/TrackTypes.h
"
17
18
//____________________________________________________________________
19
class
TrackCollWidget::Imp
{
20
public
:
21
static
TrackCollWidget
*
theclass
;
22
static
bool
sectionSorting
(
const
QString &s1,
const
QString &s2)
23
{
24
//We sort by the order of the types in the enum.
25
bool
ok1, ok2;
26
TrackType::Type
type1 =
TrackType::sectionHeaderToType
(s1, ok1);
27
TrackType::Type
type2 =
TrackType::sectionHeaderToType
(s2, ok2);
28
if
(!ok1&&
theclass
)
29
theclass
->message(
"Could not decode section header to type: '"
+s1+
"'"
);
30
if
(!ok2&&
theclass
)
31
theclass
->message(
"Could not decode section header to type: '"
+s2+
"'"
);
32
return
static_cast<
int
>
(type1) <
static_cast<
int
>
(type2);
33
}
34
};
35
36
TrackCollWidget
*
TrackCollWidget::Imp::theclass
=
nullptr
;
37
38
//____________________________________________________________________
39
void
TrackCollWidget::sortSections
(QList<QString>& sections)
40
{
41
Imp::theclass
=
this
;
//I guess this is not really threadsafe...
42
std::sort
(sections.begin(),sections.end(),
Imp::sectionSorting
);
43
Imp::theclass
=
nullptr
;
44
}
TrackCollWidget.h
TrackTypes.h
TrackCollWidget::Imp
Definition
TrackCollWidget.cxx:19
TrackCollWidget::Imp::sectionSorting
static bool sectionSorting(const QString &s1, const QString &s2)
Definition
TrackCollWidget.cxx:22
TrackCollWidget::Imp::theclass
static TrackCollWidget * theclass
Definition
TrackCollWidget.cxx:21
TrackCollWidget
Definition
TrackCollWidget.h:23
TrackCollWidget::TrackCollWidget
TrackCollWidget(QWidget *parent=0)
Definition
TrackCollWidget.h:29
TrackCollWidget::sortSections
void sortSections(QList< QString > &)
Definition
TrackCollWidget.cxx:39
TrackType::sectionHeaderToType
static Type sectionHeaderToType(const QString &, bool &status)
Definition
TrackTypes.cxx:108
TrackType::Type
Type
Definition
TrackTypes.h:13
std::sort
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
Definition
DVL_algorithms.h:554
Generated on
for ATLAS Offline Software by
1.14.0