ATLAS Offline Software
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 //____________________________________________________________________
20 public:
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 //____________________________________________________________________
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 }
ReadCellNoiseFromCoolCompare.s1
s1
Definition: ReadCellNoiseFromCoolCompare.py:378
TrackCollWidget::sortSections
void sortSections(QList< QString > &)
Definition: TrackCollWidget.cxx:39
TrackCollWidget::Imp::sectionSorting
static bool sectionSorting(const QString &s1, const QString &s2)
Definition: TrackCollWidget.cxx:22
TrackType::sectionHeaderToType
static Type sectionHeaderToType(const QString &, bool &status)
Definition: TrackTypes.cxx:103
TrackCollWidget.h
TrackCollWidget
Definition: TrackCollWidget.h:23
TrackTypes.h
TrackType::Type
Type
Definition: TrackTypes.h:13
TrackCollWidget::Imp
Definition: TrackCollWidget.cxx:19
ReadCellNoiseFromCoolCompare.s2
s2
Definition: ReadCellNoiseFromCoolCompare.py:379
VP1HelperClassBase::message
void message(const QString &) const
Definition: VP1HelperClassBase.cxx:49
TrackCollWidget::Imp::theclass
static TrackCollWidget * theclass
Definition: TrackCollWidget.cxx:21