LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
geo::GeoObjectSorterStandard Class Reference

#include "GeoObjectSorterStandard.h"

Inheritance diagram for geo::GeoObjectSorterStandard:
geo::GeoObjectSorter

Public Member Functions

 GeoObjectSorterStandard (fhicl::ParameterSet const &p)
 
 ~GeoObjectSorterStandard ()
 
void SortAuxDets (std::vector< geo::AuxDetGeo * > &adgeo) const
 
void SortAuxDetSensitive (std::vector< geo::AuxDetSensitiveGeo * > &adsgeo) const
 
void SortCryostats (std::vector< geo::CryostatGeo * > &cgeo) const
 
void SortTPCs (std::vector< geo::TPCGeo * > &tgeo) const
 
void SortPlanes (std::vector< geo::PlaneGeo * > &pgeo, geo::DriftDirection_t const &driftDir) const
 
void SortWires (std::vector< geo::WireGeo * > &wgeo) const
 

Detailed Description

Definition at line 18 of file GeoObjectSorterStandard.h.

Constructor & Destructor Documentation

geo::GeoObjectSorterStandard::GeoObjectSorterStandard ( fhicl::ParameterSet const &  p)

Definition at line 132 of file GeoObjectSorterStandard.cxx.

133  {
134  }
geo::GeoObjectSorterStandard::~GeoObjectSorterStandard ( )

Definition at line 137 of file GeoObjectSorterStandard.cxx.

138  {
139  }

Member Function Documentation

void geo::GeoObjectSorterStandard::SortAuxDets ( std::vector< geo::AuxDetGeo * > &  adgeo) const
virtual

Implements geo::GeoObjectSorter.

Definition at line 142 of file GeoObjectSorterStandard.cxx.

References geo::sortAuxDetStandard().

143  {
144  std::sort(adgeo.begin(), adgeo.end(), sortAuxDetStandard);
145 
146  return;
147  }
static bool sortAuxDetStandard(const AuxDetGeo *ad1, const AuxDetGeo *ad2)
void geo::GeoObjectSorterStandard::SortAuxDetSensitive ( std::vector< geo::AuxDetSensitiveGeo * > &  adsgeo) const
virtual

Implements geo::GeoObjectSorter.

Definition at line 150 of file GeoObjectSorterStandard.cxx.

References geo::sortAuxDetSensitiveStandard().

151  {
152  std::sort(adsgeo.begin(), adsgeo.end(), sortAuxDetSensitiveStandard);
153 
154  return;
155  }
static bool sortAuxDetSensitiveStandard(const AuxDetSensitiveGeo *ad1, const AuxDetSensitiveGeo *ad2)
void geo::GeoObjectSorterStandard::SortCryostats ( std::vector< geo::CryostatGeo * > &  cgeo) const
virtual

Implements geo::GeoObjectSorter.

Definition at line 158 of file GeoObjectSorterStandard.cxx.

References geo::sortCryoStandard().

159  {
160  std::sort(cgeo.begin(), cgeo.end(), sortCryoStandard);
161 
162  return;
163  }
static bool sortCryoStandard(const CryostatGeo *c1, const CryostatGeo *c2)
void geo::GeoObjectSorterStandard::SortPlanes ( std::vector< geo::PlaneGeo * > &  pgeo,
geo::DriftDirection_t const &  driftDir 
) const
virtual

Implements geo::GeoObjectSorter.

Definition at line 175 of file GeoObjectSorterStandard.cxx.

References geo::kNegX, geo::kPosX, geo::kUnknownDrift, and geo::sortPlaneStandard().

177  {
178  // sort the planes to increase in drift direction
179  // The drift direction has to be set before this method is called. It is set when
180  // the CryostatGeo objects are sorted by the CryostatGeo::SortSubVolumes method
181  if (driftDir == geo::kPosX) std::sort(pgeo.rbegin(), pgeo.rend(), sortPlaneStandard);
182  else if(driftDir == geo::kNegX) std::sort(pgeo.begin(), pgeo.end(), sortPlaneStandard);
183  else if(driftDir == geo::kUnknownDrift)
184  throw cet::exception("TPCGeo") << "Drift direction is unknown, can't sort the planes\n";
185 
186  return;
187  }
Drift direction is unknown.
Definition: geo_types.h:105
Drift towards negative X values.
Definition: geo_types.h:109
Drift towards positive X values.
Definition: geo_types.h:108
static bool sortPlaneStandard(const PlaneGeo *p1, const PlaneGeo *p2)
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
void geo::GeoObjectSorterStandard::SortTPCs ( std::vector< geo::TPCGeo * > &  tgeo) const
virtual

Implements geo::GeoObjectSorter.

Definition at line 166 of file GeoObjectSorterStandard.cxx.

References geo::sortTPCStandard().

167  {
168 
169  std::sort(tgeo.begin(), tgeo.end(), sortTPCStandard);
170 
171  return;
172  }
static bool sortTPCStandard(const TPCGeo *t1, const TPCGeo *t2)
void geo::GeoObjectSorterStandard::SortWires ( std::vector< geo::WireGeo * > &  wgeo) const
virtual

Implements geo::GeoObjectSorter.

Definition at line 190 of file GeoObjectSorterStandard.cxx.

References geo::sortWireStandard().

191  {
192  std::sort(wgeo.begin(), wgeo.end(), sortWireStandard);
193 
194  return;
195  }
bool sortWireStandard(WireGeo *w1, WireGeo *w2)

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