#include <MagneticField/GeomBuilder/src/eLayer.h>
Public Member Functions | |
MagELayer * | buildMagELayer () const |
Construct the MagELayer upon request. | |
eLayer (handles::const_iterator begin, handles::const_iterator end) | |
Constructor from list of volumes. | |
~eLayer () | |
Destructor. | |
Private Attributes | |
MagELayer * | mlayer |
handles | theVolumes |
Definition at line 18 of file eLayer.h.
MagGeoBuilderFromDDD::eLayer::eLayer | ( | handles::const_iterator | begin, | |
handles::const_iterator | end | |||
) |
Constructor from list of volumes.
Definition at line 21 of file eLayer.cc.
References precomputed_value_sort(), and theVolumes.
00022 : 00023 theVolumes(begin,end), 00024 mlayer(0) 00025 { 00026 // bool debug=MagGeoBuilderFromDDD::debug; 00027 00028 // Sort in R 00029 precomputed_value_sort(theVolumes.begin(), theVolumes.end(), ExtractR()); 00030 00031 // if (debug) { 00032 // cout << " elements: " << theVolumes.size() << " unique volumes: "; 00033 // volumeHandle::printUniqueNames(theVolumes.begin(), theVolumes.end()); 00034 // } 00035 }
MagGeoBuilderFromDDD::eLayer::~eLayer | ( | ) |
MagELayer * MagGeoBuilderFromDDD::eLayer::buildMagELayer | ( | ) | const |
Construct the MagELayer upon request.
Definition at line 49 of file eLayer.cc.
References max, min, mlayer, and theVolumes.
00049 { 00050 if (mlayer==0) { 00051 //FIXME not guaranteed that all volumes in layer have the same zmin 00052 // and zmax! 00053 double zmin = 1e19; 00054 double zmax = -1e19; 00055 vector<MagVolume*> mVols; 00056 for (handles::const_iterator vol = theVolumes.begin(); 00057 vol!=theVolumes.end(); ++vol) { 00058 mVols.push_back((*vol)->magVolume); 00059 zmin = min(zmin, (*vol)->minZ()); 00060 zmax = max(zmax, (*vol)->maxZ()); 00061 } 00062 mlayer = new MagELayer(mVols, zmin, zmax); 00063 } 00064 return mlayer; 00065 }
MagELayer* MagGeoBuilderFromDDD::eLayer::mlayer [mutable, private] |