ATLAS Offline Software
Loading...
Searching...
No Matches
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
17
18//____________________________________________________________________
20public:
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;
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
37
38//____________________________________________________________________
39void 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}
static bool sectionSorting(const QString &s1, const QString &s2)
static TrackCollWidget * theclass
TrackCollWidget(QWidget *parent=0)
void sortSections(QList< QString > &)
static Type sectionHeaderToType(const QString &, bool &status)
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.