code reformatting
diff -u -r1.2 -r1.3 --- BoxDipole.cc 9 Jul 2013 18:51:54 -0000 1.2 +++ BoxDipole.cc 13 Nov 2013 23:02:56 -0000 1.3 @@ -1,15 +1,13 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/bfield/BoxDipole.cc,v 1.2 2013/07/09 18:51:54 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/bfield/BoxDipole.cc,v 1.3 2013/11/13 23:02:56 jeremy Exp $
// LCDD #include "lcdd/bfield/BoxDipole.hh"
-BoxDipole::~BoxDipole() -{
+BoxDipole::~BoxDipole() {
} BoxDipole::BoxDipole(double x, double y, double z, double dx, double dy, double dz, double bx, double by, double bz) :
- _x(x), _y(y), _z(z), _dx(dx), _dy(dy), _dz(dz), _bx(bx), _by(by), _bz(bz) -{
+ _x(x), _y(y), _z(z), _dx(dx), _dy(dy), _dz(dz), _bx(bx), _by(by), _bz(bz) {
_maxx = x + dx; _maxy = y + dy; _maxz = z + dz;
@@ -19,8 +17,7 @@
_minz = z - dz; }
-void BoxDipole::GetFieldValue(const double point[3], double* bfield) const -{
+void BoxDipole::GetFieldValue(const double point[3], double* bfield) const {
if (point[0] < _minx || point[0] > _maxx) return; if (point[1] < _miny || point[1] > _maxy)
diff -u -r1.5 -r1.6 --- Cartesian3DMagneticFieldMap.cc 5 Sep 2013 21:09:02 -0000 1.5 +++ Cartesian3DMagneticFieldMap.cc 13 Nov 2013 23:02:56 -0000 1.6 @@ -13,220 +13,217 @@
using namespace std;
-Cartesian3DMagneticFieldMap::Cartesian3DMagneticFieldMap( const char* filename, double xOffset, double yOffset, double zOffset ) - :_xOffset(xOffset),_yOffset(yOffset),_zOffset(zOffset),_invertX(false),_invertY(false),_invertZ(false) -{ - cout << "\n-----------------------------------------------------------" - << "\n Magnetic field" - << "\n-----------------------------------------------------------"; - - cout << "\n ---> " "Reading the field grid from " << filename << " ... " << endl; - ifstream file( filename ); // Open the file for reading. - - // Ignore first blank line - char buffer[256]; - file.getline(buffer,256); - - // Read table dimensions - file >> _nx >> _ny >> _nz; // Note dodgy order - - cout << " [ Number of values x,y,z: " - << _nx << " " << _ny << " " << _nz << " ] " - << endl; - - // Set up storage space for table - _xField.resize( _nx ); - _yField.resize( _nx ); - _zField.resize( _nx ); - int ix, iy, iz; - for (ix=0; ix<_nx; ix++) { - _xField[ix].resize(_ny); - _yField[ix].resize(_ny); - _zField[ix].resize(_ny); - for (iy=0; iy<_ny; iy++) { - _xField[ix][iy].resize(_nz); - _yField[ix][iy].resize(_nz); - _zField[ix][iy].resize(_nz); - } - } - - // Ignore other header information - // The first line whose second character is '0' is considered to - // be the last line of the header. - do { - file.getline(buffer,256); - } while ( buffer[1]!='0'); - - // Read in the data - double xval,yval,zval,bx,by,bz; - for (ix=0; ix<_nx; ix++) { - for (iy=0; iy<_ny; iy++) { - for (iz=0; iz<_nz; iz++) { - file >> xval >> yval >> zval >> bx >> by >> bz; - if ( ix==0 && iy==0 && iz==0 ) { - _minx = xval; - _miny = yval; - _minz = zval; - } - _xField[ix][iy][iz] = bx; - _yField[ix][iy][iz] = by; - _zField[ix][iy][iz] = bz; - } - } - } - file.close(); - - _maxx = xval; - _maxy = yval; - _maxz = zval; - - cout << "\n ---> ... done reading " << endl; - - cout << " Read values of field from file " << filename << endl; - cout << " ---> assumed the order: x, y, z, Bx, By, Bz " - << "\n ---> Min values x,y,z: " - << _minx << " " << _miny << " " << _minz << " cm " - << "\n ---> Max values x,y,z: " - << _maxx << " " << _maxy << " " << _maxz << " cm " - << "\n ---> The field will be offset by " << _xOffset << " " << _yOffset << " " << _zOffset << " cm " << endl; - - // Should really check that the limits are not the wrong way around. - if (_maxx < _minx) {swap(_maxx,_minx); _invertX = true;} - if (_maxy < _miny) {swap(_maxy,_miny); _invertY = true;} - if (_maxz < _minz) {swap(_maxz,_minz); _invertZ = true;} - - cout << "\nAfter reordering if necessary" - << "\n ---> Min values x,y,z: " - << _minx << " " << _miny << " " << _minz << " cm " - << " \n ---> Max values x,y,z: " - << _maxx << " " << _maxy << " " << _maxz << " cm "; - - _dx = _maxx - _minx; - _dy = _maxy - _miny; - _dz = _maxz - _minz; - cout << "\n ---> Range of values x,y,z: " - << _dx << " " << _dy << " " << _dz << " cm in z " - << "\n-----------------------------------------------------------" << endl; - cout << "done loading field map" << endl;
+Cartesian3DMagneticFieldMap::Cartesian3DMagneticFieldMap(const char* filename, double xOffset, double yOffset, double zOffset) : + _xOffset(xOffset), _yOffset(yOffset), _zOffset(zOffset), _invertX(false), _invertY(false), _invertZ(false) { + cout << "\n-----------------------------------------------------------" << "\n Magnetic field" + << "\n-----------------------------------------------------------"; + + cout << "\n ---> " "Reading the field grid from " << filename << " ... " << endl; + ifstream file(filename); // Open the file for reading. + + // Ignore first blank line + char buffer[256]; + file.getline(buffer, 256); + + // Read table dimensions + file >> _nx >> _ny >> _nz; // Note dodgy order + + cout << " [ Number of values x,y,z: " << _nx << " " << _ny << " " << _nz << " ] " << endl; + + // Set up storage space for table + _xField.resize(_nx); + _yField.resize(_nx); + _zField.resize(_nx); + int ix, iy, iz; + for (ix = 0; ix < _nx; ix++) { + _xField[ix].resize(_ny); + _yField[ix].resize(_ny); + _zField[ix].resize(_ny); + for (iy = 0; iy < _ny; iy++) { + _xField[ix][iy].resize(_nz); + _yField[ix][iy].resize(_nz); + _zField[ix][iy].resize(_nz); + } + } + + // Ignore other header information + // The first line whose second character is '0' is considered to + // be the last line of the header. + do { + file.getline(buffer, 256); + } while (buffer[1] != '0'); + + // Read in the data + double xval, yval, zval, bx, by, bz; + for (ix = 0; ix < _nx; ix++) { + for (iy = 0; iy < _ny; iy++) { + for (iz = 0; iz < _nz; iz++) { + file >> xval >> yval >> zval >> bx >> by >> bz; + if (ix == 0 && iy == 0 && iz == 0) { + _minx = xval; + _miny = yval; + _minz = zval; + } + _xField[ix][iy][iz] = bx; + _yField[ix][iy][iz] = by; + _zField[ix][iy][iz] = bz; + } + } + } + file.close(); + + _maxx = xval; + _maxy = yval; + _maxz = zval; + + cout << "\n ---> ... done reading " << endl; + + cout << " Read values of field from file " << filename << endl; + cout << " ---> assumed the order: x, y, z, Bx, By, Bz " << "\n ---> Min values x,y,z: " << _minx << " " << _miny << " " << _minz << " cm " + << "\n ---> Max values x,y,z: " << _maxx << " " << _maxy << " " << _maxz << " cm " << "\n ---> The field will be offset by " << _xOffset + << " " << _yOffset << " " << _zOffset << " cm " << endl; + + // Should really check that the limits are not the wrong way around. + if (_maxx < _minx) { + swap(_maxx, _minx); + _invertX = true; + } + if (_maxy < _miny) { + swap(_maxy, _miny); + _invertY = true; + } + if (_maxz < _minz) { + swap(_maxz, _minz); + _invertZ = true; + } + + cout << "\nAfter reordering if necessary" << "\n ---> Min values x,y,z: " << _minx << " " << _miny << " " << _minz << " cm " + << " \n ---> Max values x,y,z: " << _maxx << " " << _maxy << " " << _maxz << " cm "; + + _dx = _maxx - _minx; + _dy = _maxy - _miny; + _dz = _maxz - _minz; + cout << "\n ---> Range of values x,y,z: " << _dx << " " << _dy << " " << _dz << " cm in z " + << "\n-----------------------------------------------------------" << endl; + cout << "done loading field map" << endl;
}
-void Cartesian3DMagneticFieldMap::GetFieldValue(const double point[4], double *Bfield ) const -{ - - double x = point[0] - _xOffset; - double y = point[1] - _yOffset; - double z = point[2] - _zOffset; - - // Check that the point is within the defined region - if ( x>=_minx && x<=_maxx && - y>=_miny && y<=_maxy && - z>=_minz && z<=_maxz ) { - - // Position of given point within region, normalized to the range - // [0,1] - double xfraction = (x - _minx) / _dx; - double yfraction = (y - _miny) / _dy; - double zfraction = (z - _minz) / _dz; - - if (_invertX) { xfraction = 1 - xfraction;} - if (_invertY) { yfraction = 1 - yfraction;} - if (_invertZ) { zfraction = 1 - zfraction;} - - // Need addresses of these to pass to modf below. - // modf uses its second argument as an OUTPUT argument. - double xdindex, ydindex, zdindex; - - // Position of the point within the cuboid defined by the - // nearest surrounding tabulated points - double xlocal = ( std::modf(xfraction*(_nx-1), &xdindex)); - double ylocal = ( std::modf(yfraction*(_ny-1), &ydindex)); - double zlocal = ( std::modf(zfraction*(_nz-1), &zdindex)); - - // The indices of the nearest tabulated point whose coordinates - // are all less than those of the given point - int xindex = static_cast<int>(xdindex); - int yindex = static_cast<int>(ydindex); - int zindex = static_cast<int>(zdindex);
+void Cartesian3DMagneticFieldMap::GetFieldValue(const double point[4], double *Bfield) const {
+ double x = point[0] - _xOffset; + double y = point[1] - _yOffset; + double z = point[2] - _zOffset; + + // Check that the point is within the defined region + if (x >= _minx && x <= _maxx && y >= _miny && y <= _maxy && z >= _minz && z <= _maxz) { + + // Position of given point within region, normalized to the range + // [0,1] + double xfraction = (x - _minx) / _dx; + double yfraction = (y - _miny) / _dy; + double zfraction = (z - _minz) / _dz; + + if (_invertX) { + xfraction = 1 - xfraction; + } + if (_invertY) { + yfraction = 1 - yfraction; + } + if (_invertZ) { + zfraction = 1 - zfraction; + } + + // Need addresses of these to pass to modf below. + // modf uses its second argument as an OUTPUT argument. + double xdindex, ydindex, zdindex; + + // Position of the point within the cuboid defined by the + // nearest surrounding tabulated points + double xlocal = (std::modf(xfraction * (_nx - 1), &xdindex)); + double ylocal = (std::modf(yfraction * (_ny - 1), &ydindex)); + double zlocal = (std::modf(zfraction * (_nz - 1), &zdindex)); + + // The indices of the nearest tabulated point whose coordinates + // are all less than those of the given point + int xindex = static_cast<int>(xdindex); + int yindex = static_cast<int>(ydindex); + int zindex = static_cast<int>(zdindex);
#ifdef DEBUG_INTERPOLATING_FIELD
- cout << "Local x,y,z: " << xlocal << " " << ylocal << " " << zlocal << endl; - cout << "Index x,y,z: " << xindex << " " << yindex << " " << zindex << endl; - double valx0z0, mulx0z0, valx1z0, mulx1z0; - double valx0z1, mulx0z1, valx1z1, mulx1z1; - valx0z0= table[xindex ][0][zindex]; mulx0z0= (1-xlocal) * (1-zlocal); - valx1z0= table[xindex+1][0][zindex]; mulx1z0= xlocal * (1-zlocal); - valx0z1= table[xindex ][0][zindex+1]; mulx0z1= (1-xlocal) * zlocal; - valx1z1= table[xindex+1][0][zindex+1]; mulx1z1= xlocal * zlocal;
+ cout << "Local x,y,z: " << xlocal << " " << ylocal << " " << zlocal << endl; + cout << "Index x,y,z: " << xindex << " " << yindex << " " << zindex << endl; + double valx0z0, mulx0z0, valx1z0, mulx1z0; + double valx0z1, mulx0z1, valx1z1, mulx1z1; + valx0z0= table[xindex ][0][zindex]; mulx0z0= (1-xlocal) * (1-zlocal); + valx1z0= table[xindex+1][0][zindex]; mulx1z0= xlocal * (1-zlocal); + valx0z1= table[xindex ][0][zindex+1]; mulx0z1= (1-xlocal) * zlocal; + valx1z1= table[xindex+1][0][zindex+1]; mulx1z1= xlocal * zlocal;
#endif
- // Full 3-dimensional version - Bfield[0] = - _xField[xindex ][yindex ][zindex ] * (1-xlocal) * (1-ylocal) * (1-zlocal) + - _xField[xindex ][yindex ][zindex+1] * (1-xlocal) * (1-ylocal) * zlocal + - _xField[xindex ][yindex+1][zindex ] * (1-xlocal) * ylocal * (1-zlocal) + - _xField[xindex ][yindex+1][zindex+1] * (1-xlocal) * ylocal * zlocal + - _xField[xindex+1][yindex ][zindex ] * xlocal * (1-ylocal) * (1-zlocal) + - _xField[xindex+1][yindex ][zindex+1] * xlocal * (1-ylocal) * zlocal + - _xField[xindex+1][yindex+1][zindex ] * xlocal * ylocal * (1-zlocal) + - _xField[xindex+1][yindex+1][zindex+1] * xlocal * ylocal * zlocal ; - Bfield[1] = - _yField[xindex ][yindex ][zindex ] * (1-xlocal) * (1-ylocal) * (1-zlocal) + - _yField[xindex ][yindex ][zindex+1] * (1-xlocal) * (1-ylocal) * zlocal + - _yField[xindex ][yindex+1][zindex ] * (1-xlocal) * ylocal * (1-zlocal) + - _yField[xindex ][yindex+1][zindex+1] * (1-xlocal) * ylocal * zlocal + - _yField[xindex+1][yindex ][zindex ] * xlocal * (1-ylocal) * (1-zlocal) + - _yField[xindex+1][yindex ][zindex+1] * xlocal * (1-ylocal) * zlocal + - _yField[xindex+1][yindex+1][zindex ] * xlocal * ylocal * (1-zlocal) + - _yField[xindex+1][yindex+1][zindex+1] * xlocal * ylocal * zlocal ; - Bfield[2] = - _zField[xindex ][yindex ][zindex ] * (1-xlocal) * (1-ylocal) * (1-zlocal) + - _zField[xindex ][yindex ][zindex+1] * (1-xlocal) * (1-ylocal) * zlocal + - _zField[xindex ][yindex+1][zindex ] * (1-xlocal) * ylocal * (1-zlocal) + - _zField[xindex ][yindex+1][zindex+1] * (1-xlocal) * ylocal * zlocal + - _zField[xindex+1][yindex ][zindex ] * xlocal * (1-ylocal) * (1-zlocal) + - _zField[xindex+1][yindex ][zindex+1] * xlocal * (1-ylocal) * zlocal + - _zField[xindex+1][yindex+1][zindex ] * xlocal * ylocal * (1-zlocal) + - _zField[xindex+1][yindex+1][zindex+1] * xlocal * ylocal * zlocal ; - - } else { - Bfield[0] = 0.0; - Bfield[1] = 0.0; - Bfield[2] = 0.0; - }
+ // Full 3-dimensional version + Bfield[0] = _xField[xindex][yindex][zindex] * (1 - xlocal) * (1 - ylocal) * (1 - zlocal) + + _xField[xindex][yindex][zindex + 1] * (1 - xlocal) * (1 - ylocal) * zlocal + + _xField[xindex][yindex + 1][zindex] * (1 - xlocal) * ylocal * (1 - zlocal) + + _xField[xindex][yindex + 1][zindex + 1] * (1 - xlocal) * ylocal * zlocal + + _xField[xindex + 1][yindex][zindex] * xlocal * (1 - ylocal) * (1 - zlocal) + + _xField[xindex + 1][yindex][zindex + 1] * xlocal * (1 - ylocal) * zlocal + + _xField[xindex + 1][yindex + 1][zindex] * xlocal * ylocal * (1 - zlocal) + + _xField[xindex + 1][yindex + 1][zindex + 1] * xlocal * ylocal * zlocal; + Bfield[1] = _yField[xindex][yindex][zindex] * (1 - xlocal) * (1 - ylocal) * (1 - zlocal) + + _yField[xindex][yindex][zindex + 1] * (1 - xlocal) * (1 - ylocal) * zlocal + + _yField[xindex][yindex + 1][zindex] * (1 - xlocal) * ylocal * (1 - zlocal) + + _yField[xindex][yindex + 1][zindex + 1] * (1 - xlocal) * ylocal * zlocal + + _yField[xindex + 1][yindex][zindex] * xlocal * (1 - ylocal) * (1 - zlocal) + + _yField[xindex + 1][yindex][zindex + 1] * xlocal * (1 - ylocal) * zlocal + + _yField[xindex + 1][yindex + 1][zindex] * xlocal * ylocal * (1 - zlocal) + + _yField[xindex + 1][yindex + 1][zindex + 1] * xlocal * ylocal * zlocal; + Bfield[2] = _zField[xindex][yindex][zindex] * (1 - xlocal) * (1 - ylocal) * (1 - zlocal) + + _zField[xindex][yindex][zindex + 1] * (1 - xlocal) * (1 - ylocal) * zlocal + + _zField[xindex][yindex + 1][zindex] * (1 - xlocal) * ylocal * (1 - zlocal) + + _zField[xindex][yindex + 1][zindex + 1] * (1 - xlocal) * ylocal * zlocal + + _zField[xindex + 1][yindex][zindex] * xlocal * (1 - ylocal) * (1 - zlocal) + + _zField[xindex + 1][yindex][zindex + 1] * xlocal * (1 - ylocal) * zlocal + + _zField[xindex + 1][yindex + 1][zindex] * xlocal * ylocal * (1 - zlocal) + + _zField[xindex + 1][yindex + 1][zindex + 1] * xlocal * ylocal * zlocal; + + } else { + Bfield[0] = 0.0; + Bfield[1] = 0.0; + Bfield[2] = 0.0; + }
} /*
-int main() -{ - Cartesian3DMagneticFieldMap field("C:/work/magfield/magfield3DMap/ThreeDFieldMap.dat", 0.,0.,0.); - double pos[4]; - pos[0]=0.; - pos[1]=0.; - pos[2]=0.; - pos[3]=0.; - double B[3]; - - for(double x=-0.05; x<=0.05; x+=.005) - { - for(double y=-0.05; y<=0.17; y+=.005) - { - for(double z=-0.26; z<=0.1; z+=.05) - { - pos[0]=x; - pos[1] =y; - pos[2] = z; - field.GetFieldValue(pos, B); - //cout << pos[0] << " " << pos[1] << " " << pos[2] << " " << B[0] << " " << B[1] << " " << B[2] << endl; - } - } - } - - pos[0]=-0.01; - pos[1]=0.038; - pos[2]=-0.02; - field.GetFieldValue(pos, B); - //cout << pos[0] << " " << pos[1] << " " << pos[2] << " " << B[0] << " " << B[1] << " " << B[2] << endl; - return 0; -} -*/
+ int main() + { + Cartesian3DMagneticFieldMap field("C:/work/magfield/magfield3DMap/ThreeDFieldMap.dat", 0.,0.,0.); + double pos[4]; + pos[0]=0.; + pos[1]=0.; + pos[2]=0.; + pos[3]=0.; + double B[3]; + + for(double x=-0.05; x<=0.05; x+=.005) + { + for(double y=-0.05; y<=0.17; y+=.005) + { + for(double z=-0.26; z<=0.1; z+=.05) + { + pos[0]=x; + pos[1] =y; + pos[2] = z; + field.GetFieldValue(pos, B); + //cout << pos[0] << " " << pos[1] << " " << pos[2] << " " << B[0] << " " << B[1] << " " << B[2] << endl; + } + } + } + + pos[0]=-0.01; + pos[1]=0.038; + pos[2]=-0.02; + field.GetFieldValue(pos, B); + //cout << pos[0] << " " << pos[1] << " " << pos[2] << " " << B[0] << " " << B[1] << " " << B[2] << endl; + return 0; + } + */
diff -u -r1.3 -r1.4 --- Dipole.cc 9 Jul 2013 18:51:54 -0000 1.3 +++ Dipole.cc 13 Nov 2013 23:02:56 -0000 1.4 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/bfield/Dipole.cc,v 1.3 2013/07/09 18:51:54 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/bfield/Dipole.cc,v 1.4 2013/11/13 23:02:56 jeremy Exp $
// LCDD #include "lcdd/bfield/Dipole.hh"
@@ -7,20 +7,17 @@
#include <iostream> #include <cmath>
-Dipole::Dipole() -{
+Dipole::Dipole() {
}
-Dipole::~Dipole() -{
+Dipole::~Dipole() {
} /** * Apply polynomial fit of dipole field, with variable number of coefficients * read from the input XML file. */
-void Dipole::GetFieldValue(const double Point[3], double* Bfield) const -{
+void Dipole::GetFieldValue(const double Point[3], double* Bfield) const {
//std::cout << "G4Dipole::GetFieldValue" << std::endl; //std::cout << "point = " << Point[0] << " " << Point[1] << " " << Point[2] << std::endl;
@@ -61,62 +58,50 @@
return; }
-void Dipole::setZMax(double zmax) -{
+void Dipole::setZMax(double zmax) {
_zmax = zmax; }
-double Dipole::getZMax() -{
+double Dipole::getZMax() {
return _zmax; }
-void Dipole::setZMin(double zmin) -{
+void Dipole::setZMin(double zmin) {
_zmin = zmin; }
-double Dipole::getZMin() -{
+double Dipole::getZMin() {
return _zmin; }
-void Dipole::setRMax(double rmax) -{
+void Dipole::setRMax(double rmax) {
_rmax = rmax; }
-double Dipole::getRMax() -{
+double Dipole::getRMax() {
return _rmax; }
-void Dipole::addCoeff(double coeff) -{
+void Dipole::addCoeff(double coeff) {
_coeffs.push_back(coeff); }
-const std::vector<double>& Dipole::getCoeffs() -{
+const std::vector<double>& Dipole::getCoeffs() {
return _coeffs; }
-void Dipole::setFieldUnit(double unit) -{
+void Dipole::setFieldUnit(double unit) {
_funit = unit; }
-double Dipole::getFieldUnit() -{
+double Dipole::getFieldUnit() {
return _funit; }
-void Dipole::setLengthUnit(double unit) -{
+void Dipole::setLengthUnit(double unit) {
_lunit = unit; }
-double Dipole::getLengthUnit() -{
+double Dipole::getLengthUnit() {
return _lunit; }
diff -u -r1.2 -r1.3 --- FieldManager.cc 2 Jul 2013 21:19:44 -0000 1.2 +++ FieldManager.cc 13 Nov 2013 23:02:56 -0000 1.3 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/bfield/FieldManager.cc,v 1.2 2013/07/02 21:19:44 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/bfield/FieldManager.cc,v 1.3 2013/11/13 23:02:56 jeremy Exp $
// LCDD #include "lcdd/bfield/FieldManager.hh"
@@ -6,20 +6,17 @@
FieldManager* FieldManager::_instance = 0;
-FieldManager::~FieldManager() -{
+FieldManager::~FieldManager() {
}
-FieldManager* FieldManager::instance() -{
+FieldManager* FieldManager::instance() {
if (_instance == 0) { _instance = new FieldManager(); } return _instance; }
-MagneticFieldOverlay* FieldManager::makeOverlay(std::vector<G4MagneticField*> fields) -{
+MagneticFieldOverlay* FieldManager::makeOverlay(std::vector<G4MagneticField*> fields) {
MagneticFieldOverlay* overlay = new MagneticFieldOverlay(); for (std::vector<G4MagneticField*>::const_iterator iter = fields.begin(); iter != fields.end(); iter++) { overlay->addMagneticField(*iter);
@@ -27,8 +24,7 @@
return overlay; }
-void FieldManager::setup() -{
+void FieldManager::setup() {
// Pointer to the field which will be passed to Geant4. G4MagneticField* field = 0;
@@ -56,8 +52,7 @@
initialize(field); }
-G4MagneticField* FieldManager::setup(std::vector<G4MagneticField*> fields) -{
+G4MagneticField* FieldManager::setup(std::vector<G4MagneticField*> fields) {
G4MagneticField* field = 0; //if (fields.size() == 0) { // G4cerr << "LCDDFieldManager - No magnetic fields to setup." << G4endl;
@@ -71,8 +66,7 @@
return field; }
-void FieldManager::initialize(G4MagneticField* field) -{
+void FieldManager::initialize(G4MagneticField* field) {
if (field != 0) { G4FieldManager* fieldMgr = G4TransportationManager::GetTransportationManager()->GetFieldManager(); fieldMgr->SetDetectorField(field);
@@ -80,16 +74,13 @@
} }
-void FieldManager::addGlobalField(G4MagneticField* f) -{
+void FieldManager::addGlobalField(G4MagneticField* f) {
_globalfields.push_back(f); }
-void FieldManager::addField(G4MagneticField* f) -{
+void FieldManager::addField(G4MagneticField* f) {
_allfields.push_back(f); }
-FieldManager::FieldManager() -{
+FieldManager::FieldManager() {
}
diff -u -r1.3 -r1.4 --- MagneticFieldOverlay.cc 10 Jul 2013 22:01:21 -0000 1.3 +++ MagneticFieldOverlay.cc 13 Nov 2013 23:02:56 -0000 1.4 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/bfield/MagneticFieldOverlay.cc,v 1.3 2013/07/10 22:01:21 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/bfield/MagneticFieldOverlay.cc,v 1.4 2013/11/13 23:02:56 jeremy Exp $
// LCDD #include "lcdd/bfield/MagneticFieldOverlay.hh"
@@ -6,16 +6,13 @@
// STL #include <iostream>
-MagneticFieldOverlay::MagneticFieldOverlay() -{
+MagneticFieldOverlay::MagneticFieldOverlay() {
}
-MagneticFieldOverlay::~MagneticFieldOverlay() -{
+MagneticFieldOverlay::~MagneticFieldOverlay() {
}
-void MagneticFieldOverlay::addMagneticField(G4MagneticField* field) -{
+void MagneticFieldOverlay::addMagneticField(G4MagneticField* field) {
if (field != 0) { _fields.push_back(field); }
@@ -24,8 +21,7 @@
/** * Call GetFieldValue of all G4MagneticField objects registered with this MagneticFieldOverlay. */
-void MagneticFieldOverlay::GetFieldValue(const double Point[3], double *Bfield) const -{
+void MagneticFieldOverlay::GetFieldValue(const double Point[3], double *Bfield) const {
Bfield[0] = Bfield[1] = Bfield[2] = 0.; for (std::vector<G4MagneticField*>::const_iterator iter = _fields.begin(); iter != _fields.end(); iter++) { (*iter)->GetFieldValue(Point, Bfield);
diff -u -r1.1 -r1.2 --- RZBData.cc 9 Jul 2013 18:53:30 -0000 1.1 +++ RZBData.cc 13 Nov 2013 23:02:56 -0000 1.2 @@ -1,34 +1,27 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/bfield/RZBData.cc,v 1.1 2013/07/09 18:53:30 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/bfield/RZBData.cc,v 1.2 2013/11/13 23:02:56 jeremy Exp $
// LCDD #include "lcdd/bfield/RZBData.hh" RZBData::RZBData(double r, double z, double Br, double Bz) :
- _r(r), _z(z), _Br(Br), _Bz(Bz) -{
+ _r(r), _z(z), _Br(Br), _Bz(Bz) {
}
-RZBData::~RZBData() -{
+RZBData::~RZBData() {
}
-double RZBData::r() const -{
+double RZBData::r() const {
return _r; }
-double RZBData::z() const -{
+double RZBData::z() const {
return _z; }
- -double RZBData::Br() const -{
+double RZBData::Br() const {
return _Br; }
-double RZBData::Bz() const -{
+double RZBData::Bz() const {
return _Bz; }
diff -u -r1.2 -r1.3 --- RZFieldMap.cc 2 Jul 2013 21:19:44 -0000 1.2 +++ RZFieldMap.cc 13 Nov 2013 23:02:56 -0000 1.3 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/bfield/RZFieldMap.cc,v 1.2 2013/07/02 21:19:44 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/bfield/RZFieldMap.cc,v 1.3 2013/11/13 23:02:56 jeremy Exp $
// LCDD #include "lcdd/bfield/RZFieldMap.hh"
@@ -19,8 +19,7 @@
#endif RZFieldMap::RZFieldMap(int numBinsR, int numBinsZ, double gridSizeR, double gridSizeZ, std::vector<RZBData> fieldData) :
- _numBinsR(numBinsR), _numBinsZ(numBinsZ), _gridSizeR(gridSizeR), _gridSizeZ(gridSizeZ), _BrArray(0), _BzArray(0) -{
+ _numBinsR(numBinsR), _numBinsZ(numBinsZ), _gridSizeR(gridSizeR), _gridSizeZ(gridSizeZ), _BrArray(0), _BzArray(0) {
#ifdef FIELD_MAP_DEBUG cout << "numBinsR=" << numBinsR << endl;
@@ -53,8 +52,7 @@
fillArrays(fieldData); }
-void RZFieldMap::initializeArrays() -{
+void RZFieldMap::initializeArrays() {
// Make two 2D arrays of numBinsZ x numBinsR _BrArray = new double*[_numBinsZ]; _BzArray = new double*[_numBinsZ];
@@ -73,8 +71,7 @@
} }
-void RZFieldMap::fillArrays(std::vector<RZBData> fieldData) -{
+void RZFieldMap::fillArrays(std::vector<RZBData> fieldData) {
for (std::vector<RZBData>::iterator iter = fieldData.begin(); iter != fieldData.end(); iter++) { RZBData rzb = *iter;
@@ -92,13 +89,11 @@
} }
-RZFieldMap::~RZFieldMap() -{
+RZFieldMap::~RZFieldMap() {
deleteArrays(); }
-void RZFieldMap::deleteArrays() -{
+void RZFieldMap::deleteArrays() {
for (int i = 0; i < _numBinsZ; i++) { delete[] _BrArray[i]; delete[] _BzArray[i];
@@ -117,8 +112,7 @@
* via the RZBFieldProvider.cpp test code provided by Norman. * */
-void RZFieldMap::GetFieldValue(const double Point[3], double *Bfield) const -{
+void RZFieldMap::GetFieldValue(const double Point[3], double *Bfield) const {
#ifdef FIELD_MAP_DEBUG cout << "Point = " << Point[0] << " " << Point[1] << " " << Point[2] << endl; #endif
diff -u -r1.3 -r1.4 --- Solenoid.cc 10 Jul 2013 22:01:21 -0000 1.3 +++ Solenoid.cc 13 Nov 2013 23:02:56 -0000 1.4 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/bfield/Solenoid.cc,v 1.3 2013/07/10 22:01:21 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/bfield/Solenoid.cc,v 1.4 2013/11/13 23:02:56 jeremy Exp $
// LCDD #include "lcdd/bfield/Solenoid.hh"
@@ -7,20 +7,17 @@
#include "globals.hh" Solenoid::Solenoid() :
- _innerField(0), _outerField(0), _innerR(0), _outerR(0), _innerZ(0), _outerZ(0) -{
+ _innerField(0), _outerField(0), _innerR(0), _outerR(0), _innerZ(0), _outerZ(0) {
}
-Solenoid::~Solenoid() -{
+Solenoid::~Solenoid() {
} /** * Apply simple solenoid magnetic field to the given Point. * @todo Use the inner and outer Z values. */
-void Solenoid::GetFieldValue(const double Point[3], double* Bfield) const -{
+void Solenoid::GetFieldValue(const double Point[3], double* Bfield) const {
double this_radius = sqrt(Point[0] * Point[0] + Point[1] * Point[1]); if (this_radius < _innerR) { Bfield[2] += _innerField;
@@ -30,8 +27,7 @@
return; }
-void Solenoid::printOut(std::ostream& os) -{
+void Solenoid::printOut(std::ostream& os) {
os << "innerField <" << _innerField << ">" << std::endl; os << "outerField <" << _outerField << ">" << std::endl; os << "outerR <" << _outerR << ">" << std::endl;
@@ -40,62 +36,50 @@
os << std::endl; }
-void Solenoid::setInnerField(double d) -{
+void Solenoid::setInnerField(double d) {
_innerField = d; }
-void Solenoid::setOuterField(double d) -{
+void Solenoid::setOuterField(double d) {
_outerField = d; }
-void Solenoid::setInnerR(double d) -{
+void Solenoid::setInnerR(double d) {
_innerR = d; }
-void Solenoid::setOuterR(double d) -{
+void Solenoid::setOuterR(double d) {
_outerR = d; }
-void Solenoid::setInnerZ(double d) -{
+void Solenoid::setInnerZ(double d) {
_innerZ = d; }
-void Solenoid::setOuterZ(double d) -{
+void Solenoid::setOuterZ(double d) {
_outerZ = d; }
-double Solenoid::getInnerField() const -{
+double Solenoid::getInnerField() const {
return _innerField; }
-double Solenoid::getOuterField() const -{
+double Solenoid::getOuterField() const {
return _outerField; }
-double Solenoid::getInnerR() const -{
+double Solenoid::getInnerR() const {
return _innerR; }
-double Solenoid::getOuterR() const -{
+double Solenoid::getOuterR() const {
return _outerR; }
-double Solenoid::getInnerZ() const -{
+double Solenoid::getInnerZ() const {
return _innerZ; }
-double Solenoid::getOuterZ() const -{
+double Solenoid::getOuterZ() const {
return _outerZ; }
diff -u -r1.5 -r1.6 --- GeometryManager.cc 10 Jul 2013 22:01:21 -0000 1.5 +++ GeometryManager.cc 13 Nov 2013 23:02:56 -0000 1.6 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/core/GeometryManager.cc,v 1.5 2013/07/10 22:01:21 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/core/GeometryManager.cc,v 1.6 2013/11/13 23:02:56 jeremy Exp $
// LCDD #include "lcdd/core/GeometryManager.hh"
@@ -22,16 +22,13 @@
GeometryManager* GeometryManager::m_instance = 0; GeometryManager::GeometryManager() :
- m_worldRegionIsSetup(false) -{
+ m_worldRegionIsSetup(false) {
}
-GeometryManager::~GeometryManager() -{
+GeometryManager::~GeometryManager() {
}
-GeometryManager* GeometryManager::instance() -{
+GeometryManager* GeometryManager::instance() {
if (m_instance == 0) { m_instance = new GeometryManager(); }
@@ -39,27 +36,23 @@
return m_instance; }
-void GeometryManager::beginRun(const G4Run*) -{
+void GeometryManager::beginRun(const G4Run*) {
// only setup world region info on first run if (!m_worldRegionIsSetup) { setupWorldRegionInformation(); } }
-G4LogicalVolume* GeometryManager::getWorldLogicalVolume() const -{
+G4LogicalVolume* GeometryManager::getWorldLogicalVolume() const {
//return GDMLProcessor::GetInstance()->GetWorldVolume()->GetLogicalVolume(); return getWorldPhysicalVolume()->GetLogicalVolume(); }
-G4VPhysicalVolume* GeometryManager::getWorldPhysicalVolume() const -{
+G4VPhysicalVolume* GeometryManager::getWorldPhysicalVolume() const {
return G4TransportationManager::GetTransportationManager()->GetNavigatorForTracking()->GetWorldVolume(); }
-void GeometryManager::setupWorldRegionInformation() -{
+void GeometryManager::setupWorldRegionInformation() {
G4LogicalVolume* worldLV = getWorldLogicalVolume(); assert(worldLV);
@@ -72,13 +65,11 @@
m_worldRegionIsSetup = true; }
-void GeometryManager::checkOverlaps() const -{
+void GeometryManager::checkOverlaps() const {
checkOverlaps(getWorldLogicalVolume(), true); }
-void GeometryManager::checkOverlaps(G4LogicalVolume* lvolume, bool recurse) const -{
+void GeometryManager::checkOverlaps(G4LogicalVolume* lvolume, bool recurse) const {
if (lvolume == 0) return;
@@ -98,8 +89,7 @@
} }
-void GeometryManager::checkOverlaps(const G4String& name, bool recurse) const -{
+void GeometryManager::checkOverlaps(const G4String& name, bool recurse) const {
G4LogicalVolumeStore* store = G4LogicalVolumeStore::GetInstance(); bool found = false; for (std::vector<G4LogicalVolume*>::iterator it = store->begin(); it != store->end(); it++) {
diff -u -r1.2 -r1.3 --- LCDDDetectorConstruction.cc 10 Jul 2013 16:49:47 -0000 1.2 +++ LCDDDetectorConstruction.cc 13 Nov 2013 23:02:56 -0000 1.3 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/core/LCDDDetectorConstruction.cc,v 1.2 2013/07/10 16:49:47 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/core/LCDDDetectorConstruction.cc,v 1.3 2013/11/13 23:02:56 jeremy Exp $
// LCDD #include "lcdd/core/LCDDDetectorConstruction.hh"
@@ -18,8 +18,7 @@
#include <cassert> LCDDDetectorConstruction::LCDDDetectorConstruction() :
- _world(0) -{
+ _world(0) {
// LCDD messenger _messenger = new LCDDMessenger();
@@ -35,15 +34,13 @@
_inspector = new LCDDObjectStoreInspector(); }
-LCDDDetectorConstruction::~LCDDDetectorConstruction() -{
+LCDDDetectorConstruction::~LCDDDetectorConstruction() {
delete _inspector; delete _writerMessenger; delete _messenger; }
-G4VPhysicalVolume* LCDDDetectorConstruction::Construct() -{
+G4VPhysicalVolume* LCDDDetectorConstruction::Construct() {
// start build timer G4Timer geoTimer; geoTimer.Start();
@@ -63,8 +60,7 @@
return pv; }
-void LCDDDetectorConstruction::setWorldVolume(G4VPhysicalVolume *pv) -{
+void LCDDDetectorConstruction::setWorldVolume(G4VPhysicalVolume *pv) {
if (pv == 0) { G4Exception("", "", FatalException, "PhysVol points to null."); }
@@ -72,8 +68,7 @@
_world = pv; }
-G4VPhysicalVolume* LCDDDetectorConstruction::getWorldVolume() -{
+G4VPhysicalVolume* LCDDDetectorConstruction::getWorldVolume() {
return _world; }
diff -u -r1.3 -r1.4 --- LCDDLibLoad.cc 22 Aug 2013 22:32:17 -0000 1.3 +++ LCDDLibLoad.cc 13 Nov 2013 23:02:56 -0000 1.4 @@ -2,115 +2,111 @@
#include <iostream>
-extern "C" -{
+extern "C" {
/** * Function for loading LCDD SAX processes. */
-void LCDDLoadProcesses() -{
+void LCDDLoadProcesses() {
// header
- LOAD_COMPONENT(headerProcess); - LOAD_COMPONENT(detectorProcess); - LOAD_COMPONENT(authorProcess); - LOAD_COMPONENT(generatorProcess); - LOAD_COMPONENT(commentProcess);
+ LOAD_COMPONENT (headerProcess); + LOAD_COMPONENT (detectorProcess); + LOAD_COMPONENT (authorProcess); + LOAD_COMPONENT (generatorProcess); + LOAD_COMPONENT (commentProcess);
// volume extended
- LOAD_COMPONENT(volumeExtendedProcess); - LOAD_COMPONENT(physvolidProcess);
+ LOAD_COMPONENT (volumeExtendedProcess); + LOAD_COMPONENT (physvolidProcess);
// SDs
- LOAD_COMPONENT(calorimeterProcess); - LOAD_COMPONENT(trackerProcess); - LOAD_COMPONENT(sdrefProcess);
+ LOAD_COMPONENT (calorimeterProcess); + LOAD_COMPONENT (trackerProcess); + LOAD_COMPONENT (sdrefProcess);
// hit_processor
- LOAD_COMPONENT(hit_processorProcess); - LOAD_COMPONENT(hits_collectionProcess);
+ LOAD_COMPONENT (hit_processorProcess); + LOAD_COMPONENT (hits_collectionProcess);
// segmentations
- LOAD_COMPONENT(grid_xyzProcess); - LOAD_COMPONENT(projective_cylinderProcess); - LOAD_COMPONENT(projective_zplaneProcess); - LOAD_COMPONENT(nonprojective_cylinderProcess); - LOAD_COMPONENT(global_grid_xyProcess); - LOAD_COMPONENT(cell_readout_2dProcess);
+ LOAD_COMPONENT (grid_xyzProcess); + LOAD_COMPONENT (projective_cylinderProcess); + LOAD_COMPONENT (projective_zplaneProcess); + LOAD_COMPONENT (nonprojective_cylinderProcess); + LOAD_COMPONENT (global_grid_xyProcess); + LOAD_COMPONENT (cell_readout_2dProcess);
// Ids
- LOAD_COMPONENT(idspecProcess); - LOAD_COMPONENT(idfieldProcess); - LOAD_COMPONENT(idspecrefProcess);
+ LOAD_COMPONENT (idspecProcess); + LOAD_COMPONENT (idfieldProcess); + LOAD_COMPONENT (idspecrefProcess);
// field
- LOAD_COMPONENT(fieldrefProcess); - LOAD_COMPONENT(global_fieldProcess); - LOAD_COMPONENT(solenoidProcess); - LOAD_COMPONENT(rz_field_mapProcess); - LOAD_COMPONENT(rzbProcess); - LOAD_COMPONENT(dipoleProcess); - LOAD_COMPONENT(dipole_coeffProcess); - LOAD_COMPONENT(box_dipoleProcess); - LOAD_COMPONENT(field_map_3dProcess)
+ LOAD_COMPONENT (fieldrefProcess); + LOAD_COMPONENT (global_fieldProcess); + LOAD_COMPONENT (solenoidProcess); + LOAD_COMPONENT (rz_field_mapProcess); + LOAD_COMPONENT (rzbProcess); + LOAD_COMPONENT (dipoleProcess); + LOAD_COMPONENT (dipole_coeffProcess); + LOAD_COMPONENT (box_dipoleProcess); + LOAD_COMPONENT (field_map_3dProcess)
// region
- LOAD_COMPONENT(regionProcess); - LOAD_COMPONENT(regionrefProcess);
+ LOAD_COMPONENT (regionProcess); + LOAD_COMPONENT (regionrefProcess);
// display
- LOAD_COMPONENT(visProcess); - LOAD_COMPONENT(visrefProcess); - LOAD_COMPONENT(colorProcess);
+ LOAD_COMPONENT (visProcess); + LOAD_COMPONENT (visrefProcess); + LOAD_COMPONENT (colorProcess);
// limit
- LOAD_COMPONENT(limitsetProcess); - LOAD_COMPONENT(limitsetrefProcess); - LOAD_COMPONENT(limitProcess);
+ LOAD_COMPONENT (limitsetProcess); + LOAD_COMPONENT (limitsetrefProcess); + LOAD_COMPONENT (limitProcess);
} /** * Function for loading LCDD subscribers. */
-void LCDDLoadSubscribers() -{
+void LCDDLoadSubscribers() {
// subscribers
- LOAD_COMPONENT(headerSubscriber);
+ LOAD_COMPONENT (headerSubscriber);
// volume extended //LOAD_COMPONENT(volumeExtendedSubscriber); // SDs
- LOAD_COMPONENT(calorimeterSubscriber); - LOAD_COMPONENT(trackerSubscriber);
+ LOAD_COMPONENT (calorimeterSubscriber); + LOAD_COMPONENT (trackerSubscriber);
// Ids
- LOAD_COMPONENT(idspecSubscriber);
+ LOAD_COMPONENT (idspecSubscriber);
// field
- LOAD_COMPONENT(solenoidSubscriber); - LOAD_COMPONENT(rz_field_mapSubscriber); - LOAD_COMPONENT(dipoleSubscriber); - LOAD_COMPONENT(box_dipoleSubscriber); - LOAD_COMPONENT(global_fieldSubscriber); - LOAD_COMPONENT(field_map_3dSubscriber);
+ LOAD_COMPONENT (solenoidSubscriber); + LOAD_COMPONENT (rz_field_mapSubscriber); + LOAD_COMPONENT (dipoleSubscriber); + LOAD_COMPONENT (box_dipoleSubscriber); + LOAD_COMPONENT (global_fieldSubscriber); + LOAD_COMPONENT (field_map_3dSubscriber);
// region
- LOAD_COMPONENT(regionSubscriber);
+ LOAD_COMPONENT (regionSubscriber);
// display
- LOAD_COMPONENT(visSubscriber);
+ LOAD_COMPONENT (visSubscriber);
// limit
- LOAD_COMPONENT(limitsetSubscriber);
+ LOAD_COMPONENT (limitsetSubscriber);
} /** * Function for loading LCDD processes and subscribers. */
-void LCDDLibLoad() -{
+void LCDDLibLoad() {
LCDDLoadProcesses(); LCDDLoadSubscribers(); }
diff -u -r1.4 -r1.5 --- LCDDMessenger.cc 10 Jul 2013 22:01:21 -0000 1.4 +++ LCDDMessenger.cc 13 Nov 2013 23:02:56 -0000 1.5 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/core/LCDDMessenger.cc,v 1.4 2013/07/10 22:01:21 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/core/LCDDMessenger.cc,v 1.5 2013/11/13 23:02:56 jeremy Exp $
// LCDD #include "lcdd/core/LCDDMessenger.hh"
@@ -15,14 +15,12 @@
// STL #include <cassert>
-LCDDMessenger::LCDDMessenger() -{
+LCDDMessenger::LCDDMessenger() {
// define UI commands defineCommands(); }
-LCDDMessenger::~LCDDMessenger() -{
+LCDDMessenger::~LCDDMessenger() {
delete _setupCmd; delete _setURICmd; delete _setSetupNameCmd;
@@ -30,8 +28,7 @@
delete _lcddDir; }
-void LCDDMessenger::SetNewValue(G4UIcommand *cmd, G4String newVals) -{
+void LCDDMessenger::SetNewValue(G4UIcommand *cmd, G4String newVals) {
LCDDParser* parser = LCDDParser::instance(); G4String singleArg = newVals;
@@ -80,13 +77,11 @@
} }
-G4String LCDDMessenger::GetCurrentValue(G4UIcommand *) -{
+G4String LCDDMessenger::GetCurrentValue(G4UIcommand *) {
return G4String(""); }
-void LCDDMessenger::defineCommands() -{
+void LCDDMessenger::defineCommands() {
G4UIparameter *p; // LCDD directory
diff -u -r1.4 -r1.5 --- LCDDParser.cc 10 Jul 2013 16:49:47 -0000 1.4 +++ LCDDParser.cc 13 Nov 2013 23:02:56 -0000 1.5 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/core/LCDDParser.cc,v 1.4 2013/07/10 16:49:47 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/core/LCDDParser.cc,v 1.5 2013/11/13 23:02:56 jeremy Exp $
// LCDD #include "lcdd/core/LCDDParser.hh"
@@ -20,12 +20,10 @@
LCDDParser* LCDDParser::_instance = 0; LCDDParser::LCDDParser() :
- _URI(""), _setupName(""), _version(""), _initialized(false), _constructed(false), _setURI(false) -{
+ _URI(""), _setupName(""), _version(""), _initialized(false), _constructed(false), _setURI(false) {
}
-LCDDParser* LCDDParser::instance() -{
+LCDDParser* LCDDParser::instance() {
if (_instance == 0) { _instance = new LCDDParser(); }
@@ -33,18 +31,15 @@
return _instance; }
-LCDDParser::~LCDDParser() -{
+LCDDParser::~LCDDParser() {
finalize(); }
-void LCDDParser::setupParserConfig() -{
+void LCDDParser::setupParserConfig() {
setupParserConfig(_URI, _setupName, _version); }
-void LCDDParser::setupParserConfig(const std::string& URI, const std::string&, const std::string& version) -{
+void LCDDParser::setupParserConfig(const std::string& URI, const std::string&, const std::string& version) {
// settings from messenger commands std::cout << "LCDD URI <" << _URI << ">" << std::endl; //std::cout << "SetupName <" << m_setupName << ">" << std::endl;
@@ -59,8 +54,7 @@
_sxp.Configure(&_config); }
-void LCDDParser::initializeParser() -{
+void LCDDParser::initializeParser() {
// standard SAX parser init _sxp.Initialize();
@@ -70,16 +64,14 @@
addVolumeExtendedSubscriber(); }
-void LCDDParser::initialize() -{
+void LCDDParser::initialize() {
if (!_initialized) { initializeParser(); _initialized = true; } }
-G4VPhysicalVolume* LCDDParser::construct() -{
+G4VPhysicalVolume* LCDDParser::construct() {
if (!_constructed) { // initialize
@@ -110,44 +102,36 @@
return _world; }
-void LCDDParser::finalize() -{
+void LCDDParser::finalize() {
_sxp.Finalize(); }
-void LCDDParser::setURI(std::string URI) -{
+void LCDDParser::setURI(std::string URI) {
_URI = URI; _setURI = true; }
-void LCDDParser::setSetupName(std::string setupName) -{
+void LCDDParser::setSetupName(std::string setupName) {
_setupName = setupName; }
-void LCDDParser::setVersion(std::string version) -{
+void LCDDParser::setVersion(std::string version) {
_version = version; }
-const std::string& LCDDParser::URI() -{
+const std::string& LCDDParser::URI() {
return _URI; }
-const std::string& LCDDParser::setupName() -{
+const std::string& LCDDParser::setupName() {
return _setupName; }
-const std::string& LCDDParser::version() -{
+const std::string& LCDDParser::version() {
return _version; }
-bool LCDDParser::isValidSetup() -{
+bool LCDDParser::isValidSetup() {
bool valid = true; if (!_setURI) {
@@ -157,8 +141,7 @@
return valid; }
-void LCDDParser::addVolumeExtendedSubscriber() -{
+void LCDDParser::addVolumeExtendedSubscriber() {
RCObjectHandle<SAXSubscriber> obj; obj = new volumeExtendedSubscriber(); SAXSubscriberPool* pool = const_cast<SAXSubscriberPool*>(_sxp.GetSubscriberPool());
diff -u -r1.3 -r1.4 --- LCDDProcessor.cc 10 Jul 2013 16:49:47 -0000 1.3 +++ LCDDProcessor.cc 13 Nov 2013 23:02:56 -0000 1.4 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/core/LCDDProcessor.cc,v 1.3 2013/07/10 16:49:47 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/core/LCDDProcessor.cc,v 1.4 2013/11/13 23:02:56 jeremy Exp $
// LCDD #include "lcdd/core/LCDDProcessor.hh"
@@ -16,19 +16,16 @@
LCDDProcessor* LCDDProcessor::_instance = 0; LCDDProcessor::LCDDProcessor() :
- _header(0) -{
+ _header(0) {
}
-LCDDProcessor::~LCDDProcessor() -{
+LCDDProcessor::~LCDDProcessor() {
if (_header != 0) { delete _header; } }
-LCDDProcessor* LCDDProcessor::instance() -{
+LCDDProcessor* LCDDProcessor::instance() {
if (_instance == 0) { _instance = new LCDDProcessor; }
@@ -36,155 +33,126 @@
return _instance; }
-void LCDDProcessor::addSensitiveDetector(std::string& name, SensitiveDetector* sd) -{
+void LCDDProcessor::addSensitiveDetector(std::string& name, SensitiveDetector* sd) {
//std::cout << "adding SD: " << name << std::endl; _sensitiveDetectors[name] = sd; }
-SensitiveDetector* LCDDProcessor::getSensitiveDetector(const std::string& name) -{
+SensitiveDetector* LCDDProcessor::getSensitiveDetector(const std::string& name) {
return _sensitiveDetectors[name]; }
-SensitiveDetector* LCDDProcessor::getSensitiveDetector(const char* name) -{
+SensitiveDetector* LCDDProcessor::getSensitiveDetector(const char* name) {
std::string key = name; return getSensitiveDetector(key); }
-LCDDProcessor::SensitiveDetectors::const_iterator LCDDProcessor::getSensitiveDetectorsBegin() -{
+LCDDProcessor::SensitiveDetectors::const_iterator LCDDProcessor::getSensitiveDetectorsBegin() {
return _sensitiveDetectors.begin(); }
-LCDDProcessor::SensitiveDetectors::const_iterator LCDDProcessor::getSensitiveDetectorsEnd() -{
+LCDDProcessor::SensitiveDetectors::const_iterator LCDDProcessor::getSensitiveDetectorsEnd() {
return _sensitiveDetectors.end(); }
-void LCDDProcessor::addMagneticField(std::string& name, G4MagneticField* mag) -{
+void LCDDProcessor::addMagneticField(std::string& name, G4MagneticField* mag) {
_magneticFields[name] = mag; }
-void LCDDProcessor::addGlobalField(G4MagneticField* mag) -{
+void LCDDProcessor::addGlobalField(G4MagneticField* mag) {
FieldManager::instance()->addGlobalField(mag); }
-G4MagneticField* LCDDProcessor::getMagneticField(const std::string& name) -{
+G4MagneticField* LCDDProcessor::getMagneticField(const std::string& name) {
return _magneticFields[name]; }
-G4MagneticField* LCDDProcessor::getMagneticField(const char* name) -{
+G4MagneticField* LCDDProcessor::getMagneticField(const char* name) {
std::string key = name; return getMagneticField(key); }
-LCDDProcessor::MagneticFields::const_iterator LCDDProcessor::getMagneticFieldsBegin() -{
+LCDDProcessor::MagneticFields::const_iterator LCDDProcessor::getMagneticFieldsBegin() {
return _magneticFields.begin(); }
-LCDDProcessor::MagneticFields::const_iterator LCDDProcessor::getMagneticFieldsEnd() -{
+LCDDProcessor::MagneticFields::const_iterator LCDDProcessor::getMagneticFieldsEnd() {
return _magneticFields.end(); }
-void LCDDProcessor::addRegion(std::string& name, G4Region* reg) -{
+void LCDDProcessor::addRegion(std::string& name, G4Region* reg) {
_regions[name] = reg; }
-G4Region* LCDDProcessor::getRegion(const std::string& name) -{
+G4Region* LCDDProcessor::getRegion(const std::string& name) {
return _regions[name]; }
-G4Region* LCDDProcessor::getRegion(const char* name) -{
+G4Region* LCDDProcessor::getRegion(const char* name) {
std::string key = name; return getRegion(name); }
-LCDDProcessor::Regions::const_iterator LCDDProcessor::getRegionsBegin() -{
+LCDDProcessor::Regions::const_iterator LCDDProcessor::getRegionsBegin() {
return _regions.begin(); }
-LCDDProcessor::Regions::const_iterator LCDDProcessor::getRegionsEnd() -{
+LCDDProcessor::Regions::const_iterator LCDDProcessor::getRegionsEnd() {
return _regions.end(); }
-void LCDDProcessor::addVisAttributes(std::string& name, G4VisAttributes* vis) -{
+void LCDDProcessor::addVisAttributes(std::string& name, G4VisAttributes* vis) {
_visAttributes[name] = vis; }
-G4VisAttributes* LCDDProcessor::getVisAttributes(const std::string& name) -{
+G4VisAttributes* LCDDProcessor::getVisAttributes(const std::string& name) {
return _visAttributes[name]; }
-G4VisAttributes* LCDDProcessor::getVisAttributes(const char* name) -{
+G4VisAttributes* LCDDProcessor::getVisAttributes(const char* name) {
std::string key = name; return getVisAttributes(key); }
-LCDDProcessor::VisAttributes::const_iterator LCDDProcessor::getVisAttributesBegin() -{
+LCDDProcessor::VisAttributes::const_iterator LCDDProcessor::getVisAttributesBegin() {
return _visAttributes.begin(); }
-LCDDProcessor::VisAttributes::const_iterator LCDDProcessor::getVisAttributesEnd() -{
+LCDDProcessor::VisAttributes::const_iterator LCDDProcessor::getVisAttributesEnd() {
return _visAttributes.end(); }
-void LCDDProcessor::addLimitSet(std::string& name, PhysicsLimitSet* lim) -{
+void LCDDProcessor::addLimitSet(std::string& name, PhysicsLimitSet* lim) {
_limitSets[name] = lim; }
-PhysicsLimitSet* LCDDProcessor::getLimitSet(const std::string& name) -{
+PhysicsLimitSet* LCDDProcessor::getLimitSet(const std::string& name) {
return _limitSets[name]; }
-PhysicsLimitSet* LCDDProcessor::getLimitSet(const char* name) -{
+PhysicsLimitSet* LCDDProcessor::getLimitSet(const char* name) {
std::string key = name; return getLimitSet(key); }
-LCDDProcessor::LimitSets::const_iterator LCDDProcessor::getLimitSetsBegin() -{
+LCDDProcessor::LimitSets::const_iterator LCDDProcessor::getLimitSetsBegin() {
return _limitSets.begin(); }
-LCDDProcessor::LimitSets::const_iterator LCDDProcessor::getLimitSetsEnd() -{
+LCDDProcessor::LimitSets::const_iterator LCDDProcessor::getLimitSetsEnd() {
return _limitSets.end(); }
-const LCDDHeaderRecord* LCDDProcessor::getHeader() const -{
+const LCDDHeaderRecord* LCDDProcessor::getHeader() const {
return _header; }
-void LCDDProcessor::setHeader(LCDDHeaderRecord* h) -{
+void LCDDProcessor::setHeader(LCDDHeaderRecord* h) {
assert(h); _header = h; }
-std::string LCDDProcessor::getDetectorName() const -{
+std::string LCDDProcessor::getDetectorName() const {
std::string detTag; if (_header == 0) { detTag = "UNKNOWN";
@@ -194,27 +162,22 @@
return detTag; }
-const LCDDProcessor::VisAttributes* LCDDProcessor::getVisAttributesStore() const -{
+const LCDDProcessor::VisAttributes* LCDDProcessor::getVisAttributesStore() const {
return &_visAttributes; }
-const LCDDProcessor::SensitiveDetectors* LCDDProcessor::getSensitiveDetectorStore() const -{
+const LCDDProcessor::SensitiveDetectors* LCDDProcessor::getSensitiveDetectorStore() const {
return &_sensitiveDetectors; }
-const LCDDProcessor::MagneticFields* LCDDProcessor::getMagneticFieldStore() const -{
+const LCDDProcessor::MagneticFields* LCDDProcessor::getMagneticFieldStore() const {
return &_magneticFields; }
-const LCDDProcessor::Regions* LCDDProcessor::getRegionStore() const -{
+const LCDDProcessor::Regions* LCDDProcessor::getRegionStore() const {
return &_regions; }
-const LCDDProcessor::LimitSets* LCDDProcessor::getLimitSetStore() const -{
+const LCDDProcessor::LimitSets* LCDDProcessor::getLimitSetStore() const {
return &_limitSets; }
diff -u -r1.2 -r1.3 --- BasicTrackerHitProcessor.cc 2 Oct 2013 02:05:22 -0000 1.2 +++ BasicTrackerHitProcessor.cc 13 Nov 2013 23:02:56 -0000 1.3 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/BasicTrackerHitProcessor.cc,v 1.2 2013/10/02 02:05:22 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/BasicTrackerHitProcessor.cc,v 1.3 2013/11/13 23:02:56 jeremy Exp $
// LCDD #include "lcdd/detectors/BasicTrackerHitProcessor.hh"
@@ -8,15 +8,14 @@
#include "G4Geantino.hh" #include "G4ChargedGeantino.hh"
-BasicTrackerHitProcessor::BasicTrackerHitProcessor(TrackerSD* tracker) - : TrackerHitProcessor(tracker) -{}
+BasicTrackerHitProcessor::BasicTrackerHitProcessor(TrackerSD* tracker) : + TrackerHitProcessor(tracker) { +}
-BasicTrackerHitProcessor::~BasicTrackerHitProcessor() -{}
+BasicTrackerHitProcessor::~BasicTrackerHitProcessor() { +}
-bool BasicTrackerHitProcessor::processHits(G4Step* step) -{
+bool BasicTrackerHitProcessor::processHits(G4Step* step) {
// Get the total energy deposition. G4double edep = step->GetTotalEnergyDeposit();
@@ -75,10 +74,7 @@
} // Compute the step's path length.
- G4double length = sqrt( - pow(start.x() - end.x(), 2) + - pow(start.y() - end.y(), 2) + - pow(start.z() - end.z(), 2));
+ G4double length = sqrt(pow(start.x() - end.x(), 2) + pow(start.y() - end.y(), 2) + pow(start.z() - end.z(), 2));
// Create the new hit. TrackerHit* hit = new TrackerHit();
diff -u -r1.5 -r1.6 --- CalorimeterHitProcessor.cc 22 Aug 2013 22:32:17 -0000 1.5 +++ CalorimeterHitProcessor.cc 13 Nov 2013 23:02:56 -0000 1.6 @@ -1,19 +1,16 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/CalorimeterHitProcessor.cc,v 1.5 2013/08/22 22:32:17 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/CalorimeterHitProcessor.cc,v 1.6 2013/11/13 23:02:56 jeremy Exp $
// LCDD #include "lcdd/detectors/CalorimeterHitProcessor.hh" #include "lcdd/detectors/CalorimeterSD.hh" CalorimeterHitProcessor::CalorimeterHitProcessor(CalorimeterSD* calorimeter) :
- _calorimeter(calorimeter) -{
+ _calorimeter(calorimeter) {
}
-CalorimeterHitProcessor::~CalorimeterHitProcessor() -{
+CalorimeterHitProcessor::~CalorimeterHitProcessor() {
}
-bool CalorimeterHitProcessor::processHits(G4Step* step) -{
+bool CalorimeterHitProcessor::processHits(G4Step* step) {
return false; }
diff -u -r1.11 -r1.12 --- CalorimeterSD.cc 17 Sep 2013 00:30:22 -0000 1.11 +++ CalorimeterSD.cc 13 Nov 2013 23:02:56 -0000 1.12 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/CalorimeterSD.cc,v 1.11 2013/09/17 00:30:22 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/CalorimeterSD.cc,v 1.12 2013/11/13 23:02:56 jeremy Exp $
// LCDD #include "lcdd/detectors/CalorimeterSD.hh"
@@ -12,42 +12,24 @@
using std::vector;
-CalorimeterSD::CalorimeterSD( - G4String sdName, - G4String hcName, - Segmentation* sdSeg) : - SensitiveDetector( - sdName, - hcName, - SensitiveDetector::eCalorimeter), - _segmentation(sdSeg) -{ - _hitsCollections.push_back(0); -} - -CalorimeterSD::CalorimeterSD( - G4String sdName, - const vector<G4String>& hcNames, - Segmentation* sdSeg) : - SensitiveDetector( - sdName, - hcNames, - SensitiveDetector::eCalorimeter), - _segmentation(sdSeg) -{ - // This is only setting up the hits collections in a "dummy" way for Geant4. - // The actual pointers to the collections are overridden later in Initialize.
+CalorimeterSD::CalorimeterSD(G4String sdName, G4String hcName, Segmentation* sdSeg) : + SensitiveDetector(sdName, hcName, SensitiveDetector::eCalorimeter), _segmentation(sdSeg) { + // Setup a dummy hits collection that will be overridden later. + _hitsCollections.push_back(0); +} + +CalorimeterSD::CalorimeterSD(G4String sdName, const vector<G4String>& hcNames, Segmentation* sdSeg) : + SensitiveDetector(sdName, hcNames, SensitiveDetector::eCalorimeter), _segmentation(sdSeg) { + // Setup entries for each hits collection. These null pointers will be overridden later.
for (int i = 0; i < (int) hcNames.size(); i++) { _hitsCollections.push_back(0); } }
-CalorimeterSD::~CalorimeterSD() -{
+CalorimeterSD::~CalorimeterSD() {
}
-bool CalorimeterSD::isValidVolume(G4LogicalVolume* lv) -{
+bool CalorimeterSD::isValidVolume(G4LogicalVolume* lv) {
bool valid = SensitiveDetector::isValidVolume(lv); if (valid && _segmentation != 0) {
@@ -57,22 +39,21 @@
return valid; }
-void CalorimeterSD::Initialize(G4HCofThisEvent *HCE) -{
+void CalorimeterSD::Initialize(G4HCofThisEvent *HCE) {
clearHits(); // Loop over number of hits collections defined by this detector. for (int i = 0; i < getNumberOfHitsCollections(); i++) {
- //std::cout << "initializing hits collection: " << collectionName[i] << std::endl;
+ //std::cout << "initializing hits collection: " << collectionName[i] << std::endl;
- // Overwrite pointer to the dummy collection that was added in the constructor.
+ // Overwrite dummy collection with actual calorimeter hits collection.
_hitsCollections[i] = new CalorimeterHitsCollection(GetName(), collectionName[i]); // Set the HCID of the collection if it has not been set already. if (getHCID(i) < 0) {
- //std::cout << "set HCID: " << GetCollectionID(i) << std::endl; - // This will set the HC ID in the list that is contained in SensitiveDetector parent class.
+ //std::cout << "set HCID: " << GetCollectionID(i) << std::endl; + // This will set the HC ID in the list that is contained in SensitiveDetector parent class.
setHCID(GetCollectionID(i), i); }
@@ -81,13 +62,11 @@
} }
-Segmentation* CalorimeterSD::getSegmentation() const -{
+Segmentation* CalorimeterSD::getSegmentation() const {
return _segmentation; }
-G4bool CalorimeterSD::ProcessHits(G4Step* aStep, G4TouchableHistory*) -{
+G4bool CalorimeterSD::ProcessHits(G4Step* aStep, G4TouchableHistory*) {
return SensitiveDetector::ProcessHits(aStep, 0); }
@@ -101,23 +80,21 @@
// return _hitMap.get(aHit->getId64bit()); //}
-std::ostream& CalorimeterSD::printHits(std::ostream& os) -{
+std::ostream& CalorimeterSD::printHits(std::ostream& os) {
// FIXME: reimplement
- /* - for (int i = 0; i < getNumberOfHitsCollections(); i++) { - os << getHitsCollection(i)->GetName() << std::endl; - for (CalorimeterHitList::const_iterator iter = _hitsVector[i].begin(); iter != _hitsVector[i].end(); iter++) { - os << " " << **iter; - } - } - os << std::endl; - */
+ /* + for (int i = 0; i < getNumberOfHitsCollections(); i++) { + os << getHitsCollection(i)->GetName() << std::endl; + for (CalorimeterHitList::const_iterator iter = _hitsVector[i].begin(); iter != _hitsVector[i].end(); iter++) { + os << " " << **iter; + } + } + os << std::endl; + */
return os; }
-void CalorimeterSD::EndOfEvent(G4HCofThisEvent *) -{
+void CalorimeterSD::EndOfEvent(G4HCofThisEvent *) {
#ifdef G4VERBOSE if ( getVerbose() > 1 ) { printHits( std::cout );
@@ -127,8 +104,7 @@
_hitMap.clear(); }
-std::ostream& CalorimeterSD::printBasicInfo(std::ostream& os) -{
+std::ostream& CalorimeterSD::printBasicInfo(std::ostream& os) {
SensitiveDetector::printBasicInfo(os); os << "segmentation type: " << _segmentation->getTypeString() << std::endl; os << "segmentation bins:";
@@ -139,52 +115,53 @@
return os; }
-double CalorimeterSD::getEdep() const -{
+double CalorimeterSD::getEdep() const {
// FIXME: reimplement
- /* - double edep = 0.0; - for (CalorimeterHitList::const_iterator it = _hitsVector[0].begin(); it != _hitsVector[0].end(); it++) { - edep += (*it)->getEdep(); - } - return edep; - */ - return 0.;
+ /* + double edep = 0.0; + for (CalorimeterHitList::const_iterator it = _hitsVector[0].begin(); it != _hitsVector[0].end(); it++) { + edep += (*it)->getEdep(); + } + return edep; + */ + return 0.;
}
-double CalorimeterSD::getEdep(G4int nHC) const -{
+double CalorimeterSD::getEdep(G4int nHC) const {
// FIXME: reimplement
- /* - double edep = 0.0; - for (CalorimeterHitList::const_iterator it = _hitsVector[nHC].begin(); it != _hitsVector[nHC].end(); it++) { - edep += (*it)->getEdep(); - } - return edep; - */ - return 0.;
+ /* + double edep = 0.0; + for (CalorimeterHitList::const_iterator it = _hitsVector[nHC].begin(); it != _hitsVector[nHC].end(); it++) { + edep += (*it)->getEdep(); + } + return edep; + */ + return 0.;
}
-void CalorimeterSD::clearHits() -{
+void CalorimeterSD::clearHits() {
//for (int i = 0; i < getNumberOfHitsCollections(); i++) { // _hitsVector[i].clear(); //} }
-void CalorimeterSD::addHit(CalorimeterHit* hit) -{
+void CalorimeterSD::addHit(CalorimeterHit* hit) {
_hitsCollections[0]->insert(hit); _hitMap.add(hit); }
-void CalorimeterSD::addHit(CalorimeterHit* hit, int collectionIndex) -{
+void CalorimeterSD::addHit(CalorimeterHit* hit, int collectionIndex) { + //std::cout << "adding hit" << hit << " to collection " << collectionIndex << std::endl;
_hitsCollections[collectionIndex]->insert(hit);
+ //std::cout << "adding hit to map" << std::endl;
_hitMap.add(hit);
+ //std::cout << "done adding hit" << std::endl;
}
-CalorimeterHit* CalorimeterSD::findHit(const Id64bit& id) -{
+//CalorimeterHit* CalorimeterSD::findHit(const Id64bit& id) { +// return _hitMap.get(id); +//} + +CalorimeterHit* CalorimeterSD::findHit(const Id64bit& id) {
return _hitMap.get(id); }
diff -u -r1.3 -r1.4 --- Cerenkov.cc 10 Jul 2013 22:01:21 -0000 1.3 +++ Cerenkov.cc 13 Nov 2013 23:02:56 -0000 1.4 @@ -18,18 +18,15 @@
#include <iomanip>
-Cerenkov::Cerenkov() -{
+Cerenkov::Cerenkov() {
Initialize(); }
-Cerenkov::~Cerenkov() -{
+Cerenkov::~Cerenkov() {
}
-void Cerenkov::Initialize() -{
+void Cerenkov::Initialize() {
// // now get the Cerenkov Angle Integrals for all materials that have the refraction index defined //
@@ -89,8 +86,7 @@
// GEANT-unit (millimeter) in the current medium. // ^^^^^^^^^^
-G4double Cerenkov::GetAverageNumberOfPhotons(const G4double charge, const G4double beta, const G4String Material) const -{
+G4double Cerenkov::GetAverageNumberOfPhotons(const G4double charge, const G4double beta, const G4String Material) const {
G4bool Ceren = false; G4int MaterialIndex = -1; //
diff -u -r1.1 -r1.2 --- HitProcessor.cc 11 Jul 2013 20:41:54 -0000 1.1 +++ HitProcessor.cc 13 Nov 2013 23:02:56 -0000 1.2 @@ -1,9 +1,9 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/HitProcessor.cc,v 1.1 2013/07/11 20:41:54 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/HitProcessor.cc,v 1.2 2013/11/13 23:02:56 jeremy Exp $
#include "lcdd/detectors/HitProcessor.hh"
-HitProcessor::HitProcessor() -{}
+HitProcessor::HitProcessor() { +}
-HitProcessor::~HitProcessor() -{}
+HitProcessor::~HitProcessor() { +}
diff -u -r1.2 -r1.3 --- HitProcessorFactory.cc 22 Aug 2013 22:32:17 -0000 1.2 +++ HitProcessorFactory.cc 13 Nov 2013 23:02:56 -0000 1.3 @@ -1,15 +1,13 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/HitProcessorFactory.cc,v 1.2 2013/08/22 22:32:17 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/HitProcessorFactory.cc,v 1.3 2013/11/13 23:02:56 jeremy Exp $
#include "lcdd/detectors/HitProcessorFactory.hh"
-HitProcessorFactory::HitProcessorFactory() -{
+HitProcessorFactory::HitProcessorFactory() {
// TODO Auto-generated constructor stub }
-HitProcessorFactory::~HitProcessorFactory() -{
+HitProcessorFactory::~HitProcessorFactory() {
// TODO Auto-generated destructor stub }
diff -u -r1.2 -r1.3 --- HitProcessorManager.cc 22 Aug 2013 22:32:17 -0000 1.2 +++ HitProcessorManager.cc 13 Nov 2013 23:02:56 -0000 1.3 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/HitProcessorManager.cc,v 1.2 2013/08/22 22:32:17 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/HitProcessorManager.cc,v 1.3 2013/11/13 23:02:56 jeremy Exp $
// LCDD #include "lcdd/detectors/HitProcessorManager.hh"
@@ -11,25 +11,21 @@
HitProcessorManager* HitProcessorManager::_manager = 0;
-HitProcessorManager::HitProcessorManager() -{
+HitProcessorManager::HitProcessorManager() {
registerDefaultFactories(); }
-HitProcessorManager::~HitProcessorManager() -{
+HitProcessorManager::~HitProcessorManager() {
}
-HitProcessorManager* HitProcessorManager::instance() -{
+HitProcessorManager* HitProcessorManager::instance() {
if (_manager == 0) { _manager = new HitProcessorManager(); } return _manager; }
-void HitProcessorManager::registerDefaultFactories() -{
+void HitProcessorManager::registerDefaultFactories() {
registerFactory(new LegacyCalorimeterHitProcessorFactory()); registerFactory(new UnsegmentedCalorimeterHitProcessorFactory()); registerFactory(new OpticalCalorimeterHitProcessorFactory());
@@ -38,12 +34,10 @@
registerFactory(new StepCombiningTrackerHitProcessorFactory()); }
-void HitProcessorManager::registerFactory(HitProcessorFactory* factory) -{
+void HitProcessorManager::registerFactory(HitProcessorFactory* factory) {
_factories[factory->handlesType()] = factory; }
-HitProcessorFactory* HitProcessorManager::getFactory(const std::string& hitProcessorType) -{
+HitProcessorFactory* HitProcessorManager::getFactory(const std::string& hitProcessorType) {
return _factories[hitProcessorType]; }
diff -u -r1.4 -r1.5 --- LegacyCalorimeterHitProcessor.cc 17 Sep 2013 00:29:12 -0000 1.4 +++ LegacyCalorimeterHitProcessor.cc 13 Nov 2013 23:02:56 -0000 1.5 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/LegacyCalorimeterHitProcessor.cc,v 1.4 2013/09/17 00:29:12 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/LegacyCalorimeterHitProcessor.cc,v 1.5 2013/11/13 23:02:56 jeremy Exp $
// LCDD #include "lcdd/detectors/LegacyCalorimeterHitProcessor.hh"
@@ -8,24 +8,20 @@
#include "G4ChargedGeantino.hh" LegacyCalorimeterHitProcessor::LegacyCalorimeterHitProcessor(CalorimeterSD* calorimeter) :
- CalorimeterHitProcessor(calorimeter) -{
+ CalorimeterHitProcessor(calorimeter) {
}
-LegacyCalorimeterHitProcessor::~LegacyCalorimeterHitProcessor() -{
+LegacyCalorimeterHitProcessor::~LegacyCalorimeterHitProcessor() {
}
-bool LegacyCalorimeterHitProcessor::processHits(G4Step* step) -{
+bool LegacyCalorimeterHitProcessor::processHits(G4Step* step) {
// Get the energy deposition. G4double edep = step->GetTotalEnergyDeposit(); // Check for Geantino particle type. G4ParticleDefinition* def = step->GetTrack()->GetDefinition(); bool isGeantino = false;
- if (def == G4Geantino::Definition() - || def == G4ChargedGeantino::Definition()) {
+ if (def == G4Geantino::Definition() || def == G4ChargedGeantino::Definition()) {
isGeantino = true; }
diff -u -r1.5 -r1.6 --- OpticalCalorimeterHitProcessor.cc 13 Nov 2013 22:11:31 -0000 1.5 +++ OpticalCalorimeterHitProcessor.cc 13 Nov 2013 23:02:56 -0000 1.6 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/OpticalCalorimeterHitProcessor.cc,v 1.5 2013/11/13 22:11:31 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/OpticalCalorimeterHitProcessor.cc,v 1.6 2013/11/13 23:02:56 jeremy Exp $
// LCDD #include "lcdd/detectors/OpticalCalorimeterHitProcessor.hh"
@@ -10,25 +10,22 @@
#include "G4VProcess.hh" #include "G4Poisson.hh"
-OpticalCalorimeterHitProcessor::OpticalCalorimeterHitProcessor(CalorimeterSD* calorimeter) - : CalorimeterHitProcessor(calorimeter), _cerenGenerator(0) -{
+OpticalCalorimeterHitProcessor::OpticalCalorimeterHitProcessor(CalorimeterSD* calorimeter) : + CalorimeterHitProcessor(calorimeter), _cerenGenerator(0) {
}
-OpticalCalorimeterHitProcessor::~OpticalCalorimeterHitProcessor() -{ - if (_cerenGenerator != 0) { - delete _cerenGenerator; - }
+OpticalCalorimeterHitProcessor::~OpticalCalorimeterHitProcessor() { + if (_cerenGenerator != 0) { + delete _cerenGenerator; + }
}
-bool OpticalCalorimeterHitProcessor::processHits(G4Step* step) -{ - // FIXME: This initialization should not happen here. - // Put into PhysicsManager as statically accessible. - if (_cerenGenerator == 0) { - _cerenGenerator = new Cerenkov(); - }
+bool OpticalCalorimeterHitProcessor::processHits(G4Step* step) { + // FIXME: This initialization should not happen here. + // Put into PhysicsManager as statically accessible. + if (_cerenGenerator == 0) { + _cerenGenerator = new Cerenkov(); + }
G4int NCerenPhotons = 0; G4Track* theTrack = step->GetTrack();
@@ -84,8 +81,7 @@
} // end Cerenkov photon treatment }
-G4ThreeVector OpticalCalorimeterHitProcessor::getGlobalHitPosition(const G4StepPoint* aPreStepPoint) -{
+G4ThreeVector OpticalCalorimeterHitProcessor::getGlobalHitPosition(const G4StepPoint* aPreStepPoint) {
G4ThreeVector globalStepPos = aPreStepPoint->GetPosition(); // Figure out local step pos using touchable and global midpoint.
diff -u -r1.2 -r1.3 --- PositionComparator.cc 14 Sep 2013 02:06:35 -0000 1.2 +++ PositionComparator.cc 13 Nov 2013 23:02:56 -0000 1.3 @@ -1,19 +1,15 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/PositionComparator.cc,v 1.2 2013/09/14 02:06:35 jeremy Exp $ -
+// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/PositionComparator.cc,v 1.3 2013/11/13 23:02:56 jeremy Exp $
// LCDD #include "lcdd/detectors/PositionComparator.hh"
-PositionComparator::PositionComparator() -{
+PositionComparator::PositionComparator() {
}
-PositionComparator::~PositionComparator() -{
+PositionComparator::~PositionComparator() {
}
-bool PositionComparator::compare(const CalorimeterHit& hit1, const CalorimeterHit& hit2) const -{
+bool PositionComparator::compare(const CalorimeterHit& hit1, const CalorimeterHit& hit2) const {
return (hit1.getPosition() == hit2.getPosition()); }
diff -u -r1.2 -r1.3 --- ReadoutUtil.cc 3 Jul 2013 20:03:49 -0000 1.2 +++ ReadoutUtil.cc 13 Nov 2013 23:02:56 -0000 1.3 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/ReadoutUtil.cc,v 1.2 2013/07/03 20:03:49 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/ReadoutUtil.cc,v 1.3 2013/11/13 23:02:56 jeremy Exp $
// LCDD #include "lcdd/detectors/ReadoutUtil.hh"
@@ -13,28 +13,23 @@
const double ReadoutUtil::PI = acos(-1);
-G4ThreeVector ReadoutUtil::computeThreeVectorMean(const G4ThreeVector& vec1, const G4ThreeVector& vec2) -{
+G4ThreeVector ReadoutUtil::computeThreeVectorMean(const G4ThreeVector& vec1, const G4ThreeVector& vec2) {
return (0.5 * (vec1 + vec2)); }
-G4double ReadoutUtil::computeDistance(const G4ThreeVector& vec1, const G4ThreeVector& vec2) -{
+G4double ReadoutUtil::computeDistance(const G4ThreeVector& vec1, const G4ThreeVector& vec2) {
return (sqrt(pow(vec1.x() - vec2.x(), 2) + pow(vec1.y() - vec2.y(), 2) + pow(vec1.z() - vec2.z(), 2))); }
-G4double ReadoutUtil::computeDistance(const G4Step* aStep) -{
+G4double ReadoutUtil::computeDistance(const G4Step* aStep) {
return computeDistance(aStep->GetPreStepPoint()->GetPosition(), aStep->GetPostStepPoint()->GetPosition()); }
-G4ThreeVector ReadoutUtil::computeMidPos(const G4Step* aStep) -{
+G4ThreeVector ReadoutUtil::computeMidPos(const G4Step* aStep) {
return computeThreeVectorMean(aStep->GetPreStepPoint()->GetPosition(), aStep->GetPostStepPoint()->GetPosition()); }
-G4VSolid* ReadoutUtil::getSolidFromStepPoint(const G4StepPoint* aStepPoint) -{
+G4VSolid* ReadoutUtil::getSolidFromStepPoint(const G4StepPoint* aStepPoint) {
assert(aStepPoint); return aStepPoint->GetTouchableHandle()->GetVolume()->GetLogicalVolume()->GetSolid();
@@ -45,53 +40,44 @@
// return aStep->GetPreStepPoint()->GetTouchableHandle(); //}
-G4ThreeVector ReadoutUtil::getVolumeGlobalPosition(const G4StepPoint* aStepPoint, const G4ThreeVector& pnt) -{
+G4ThreeVector ReadoutUtil::getVolumeGlobalPosition(const G4StepPoint* aStepPoint, const G4ThreeVector& pnt) {
return aStepPoint->GetTouchableHandle()->GetHistory()->GetTopTransform().Inverse().TransformPoint(pnt); }
-G4ThreeVector ReadoutUtil::getVolumeGlobalPosition(const G4StepPoint* aStepPoint) -{
+G4ThreeVector ReadoutUtil::getVolumeGlobalPosition(const G4StepPoint* aStepPoint) {
return getVolumeGlobalPosition(aStepPoint, G4ThreeVector()); }
-const G4Tubs* ReadoutUtil::getTubs(const G4Step* aStep) -{
+const G4Tubs* ReadoutUtil::getTubs(const G4Step* aStep) {
const G4Tubs* tubs = 0; G4VSolid* solid = ReadoutUtil::getSolidFromStepPoint(aStep->GetPreStepPoint()); tubs = static_cast<const G4Tubs*>(solid); return tubs; }
-const G4Tubs* ReadoutUtil::getTubs(const G4StepPoint* aPreStepPoint) -{
+const G4Tubs* ReadoutUtil::getTubs(const G4StepPoint* aPreStepPoint) {
const G4Tubs* tubs = 0; G4VSolid* solid = ReadoutUtil::getSolidFromStepPoint(aPreStepPoint); tubs = static_cast<const G4Tubs*>(solid); return tubs; }
-double ReadoutUtil::computeTubsMidRadius(const G4Tubs* tubs) -{
+double ReadoutUtil::computeTubsMidRadius(const G4Tubs* tubs) {
double thickness = getTubsThickness(tubs); double rcyl = tubs->GetInnerRadius() + thickness / 2; return rcyl; }
-double ReadoutUtil::computeTubsMidRadius(const G4Step* aStep) -{
+double ReadoutUtil::computeTubsMidRadius(const G4Step* aStep) {
return computeTubsMidRadius(ReadoutUtil::getTubs(aStep)); }
-double ReadoutUtil::computeTubsMidRadius(const G4StepPoint* aPreStepPoint) -{
+double ReadoutUtil::computeTubsMidRadius(const G4StepPoint* aPreStepPoint) {
return computeTubsMidRadius(ReadoutUtil::getTubs(aPreStepPoint)); }
-double ReadoutUtil::getTubsThickness(const G4Tubs* tubs) -{
+double ReadoutUtil::getTubsThickness(const G4Tubs* tubs) {
return tubs->GetOuterRadius() - tubs->GetInnerRadius(); }
-G4ThreeVector ReadoutUtil::transformLocalToGlobal(const G4Step* aStep, const G4ThreeVector& localPos) -{
+G4ThreeVector ReadoutUtil::transformLocalToGlobal(const G4Step* aStep, const G4ThreeVector& localPos) {
// get touchable from PreStepPoint G4TouchableHandle theTouchable = aStep->GetPreStepPoint()->GetTouchableHandle();
@@ -100,8 +86,7 @@
return globalPos; }
-G4ThreeVector ReadoutUtil::transformLocalToGlobal(const G4StepPoint* aPreStepPoint, const G4ThreeVector& localPos) -{
+G4ThreeVector ReadoutUtil::transformLocalToGlobal(const G4StepPoint* aPreStepPoint, const G4ThreeVector& localPos) {
// get touchable from PreStepPoint G4TouchableHandle theTouchable = aPreStepPoint->GetTouchableHandle();
@@ -110,8 +95,7 @@
return globalPos; }
-G4ThreeVector ReadoutUtil::transformGlobalToLocal(const G4Step* aStep, const G4ThreeVector& globalPos) -{
+G4ThreeVector ReadoutUtil::transformGlobalToLocal(const G4Step* aStep, const G4ThreeVector& globalPos) {
// get touchable from PreStepPoint G4TouchableHandle theTouchable = aStep->GetPreStepPoint()->GetTouchableHandle();
@@ -120,8 +104,7 @@
return localPos; }
-G4ThreeVector ReadoutUtil::transformGlobalToLocal(const G4StepPoint* aPreStepPoint, const G4ThreeVector& globalPos) -{
+G4ThreeVector ReadoutUtil::transformGlobalToLocal(const G4StepPoint* aPreStepPoint, const G4ThreeVector& globalPos) {
// get touchable from PreStepPoint G4TouchableHandle theTouchable = aPreStepPoint->GetTouchableHandle();
@@ -131,8 +114,7 @@
return localPos; }
-std::vector<G4VPhysicalVolume*> ReadoutUtil::getPhysVolList(G4Step* aStep) -{
+std::vector<G4VPhysicalVolume*> ReadoutUtil::getPhysVolList(G4Step* aStep) {
std::vector<G4VPhysicalVolume*> physVols; // get touchable from PreStepPoint
@@ -154,8 +136,7 @@
return physVols; }
-int ReadoutUtil::getVolumeNumber(G4TouchableHandle theTouchable, int historyDepth) -{
+int ReadoutUtil::getVolumeNumber(G4TouchableHandle theTouchable, int historyDepth) {
bool no_depth = false; if (historyDepth == -1) {
@@ -190,8 +171,7 @@
return vnum; }
-bool ReadoutUtil::isGeantino(G4Step* aStep) -{
+bool ReadoutUtil::isGeantino(G4Step* aStep) {
G4ParticleDefinition* def = aStep->GetTrack()->GetDefinition(); if (def == G4Geantino::Definition() || def == G4ChargedGeantino::Definition()) return true;
diff -u -r1.3 -r1.4 --- ScoringTrackerHitProcessor.cc 2 Oct 2013 02:05:22 -0000 1.3 +++ ScoringTrackerHitProcessor.cc 13 Nov 2013 23:02:56 -0000 1.4 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/ScoringTrackerHitProcessor.cc,v 1.3 2013/10/02 02:05:22 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/ScoringTrackerHitProcessor.cc,v 1.4 2013/11/13 23:02:56 jeremy Exp $
// LCDD #include "lcdd/detectors/ScoringTrackerHitProcessor.hh"
@@ -7,17 +7,14 @@
// Geant4 #include "G4ThreeVector.hh"
-ScoringTrackerHitProcessor::ScoringTrackerHitProcessor(TrackerSD* tracker) - : TrackerHitProcessor(tracker), _currentTrackId(-1) -{
+ScoringTrackerHitProcessor::ScoringTrackerHitProcessor(TrackerSD* tracker) : + TrackerHitProcessor(tracker), _currentTrackId(-1) {
}
-ScoringTrackerHitProcessor::~ScoringTrackerHitProcessor() -{
+ScoringTrackerHitProcessor::~ScoringTrackerHitProcessor() {
}
-bool ScoringTrackerHitProcessor::processHits(G4Step* step) -{
+bool ScoringTrackerHitProcessor::processHits(G4Step* step) {
bool sameTrack = false; int trackId = step->GetTrack()->GetTrackID();
@@ -58,10 +55,7 @@
G4ThreeVector end = step->GetPostStepPoint()->GetPosition(); // Compute the step's path length.
- G4double length = sqrt( - pow(start.x() - end.x(), 2) + - pow(start.y() - end.y(), 2) + - pow(start.z() - end.z(), 2));
+ G4double length = sqrt(pow(start.x() - end.x(), 2) + pow(start.y() - end.y(), 2) + pow(start.z() - end.z(), 2));
// Set the hit information. newHit->setTrackID(trkID);
@@ -78,4 +72,3 @@
return true; }
-
diff -u -r1.7 -r1.8 --- SensitiveDetector.cc 14 Sep 2013 02:06:35 -0000 1.7 +++ SensitiveDetector.cc 13 Nov 2013 23:02:56 -0000 1.8 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/SensitiveDetector.cc,v 1.7 2013/09/14 02:06:35 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/SensitiveDetector.cc,v 1.8 2013/11/13 23:02:56 jeremy Exp $
// LCDD #include "lcdd/detectors/SensitiveDetector.hh"
@@ -26,9 +26,8 @@
const std::string& SensitiveDetector::calorimeterStr = "calorimeter"; const std::string& SensitiveDetector::noneStr = "none";
-SensitiveDetector::SensitiveDetector(G4String sdName, G4String hcName, EType sdType) - : G4VSensitiveDetector(sdName), _idspec(0), _type(sdType) -{
+SensitiveDetector::SensitiveDetector(G4String sdName, G4String hcName, EType sdType) : + G4VSensitiveDetector(sdName), _idspec(0), _type(sdType) {
// insert hits collection name into SD's name vector collectionName.insert(hcName);
@@ -44,8 +43,7 @@
} SensitiveDetector::SensitiveDetector(G4String sdName, const vector<G4String>& hcNames, EType sdType) :
- G4VSensitiveDetector(sdName), _idspec(0), _type(sdType) -{
+ G4VSensitiveDetector(sdName), _idspec(0), _type(sdType) {
_hcids.clear(); // Is this needed??? for (int i = 0; i < (int) hcNames.size(); i++) {
@@ -64,33 +62,29 @@
//SensitiveDetector::SensitiveDetector(G4String name, EType type) // : G4VSensitiveDetector(name), _idspec(0), _type(type) //{
- // register detector with G4SDManager
+// register detector with G4SDManager
// G4SDManager::GetSDMpointer()->AddNewDetector(this);
- // Create the command messenger.
+// Create the command messenger.
// _messenger = new SensitiveDetectorMessenger(this); //}
-SensitiveDetector::~SensitiveDetector() -{
+SensitiveDetector::~SensitiveDetector() {
// Delete registered HitProcessors. for (HitProcessors::iterator it = _hitProcessors.begin(); it != _hitProcessors.end(); it++) { delete (*it); } }
-void SensitiveDetector::Initialize(G4HCofThisEvent*) -{
+void SensitiveDetector::Initialize(G4HCofThisEvent*) {
// no-op }
-void SensitiveDetector::EndOfEvent(G4HCofThisEvent*) -{
+void SensitiveDetector::EndOfEvent(G4HCofThisEvent*) {
// no-op }
-G4bool SensitiveDetector::ProcessHits(G4Step* aStep, G4TouchableHistory*) -{
+G4bool SensitiveDetector::ProcessHits(G4Step* aStep, G4TouchableHistory*) {
// Set the cached step data. setStep(aStep);
@@ -107,8 +101,7 @@
return madeHits; }
-const std::string& SensitiveDetector::getTypeString() const -{
+const std::string& SensitiveDetector::getTypeString() const {
if (_type == eTracker) { return trackerStr; } else if (_type == eCalorimeter) {
@@ -117,8 +110,7 @@
return noneStr; }
-std::ostream& SensitiveDetector::printBasicInfo(std::ostream& os) -{
+std::ostream& SensitiveDetector::printBasicInfo(std::ostream& os) {
os << "name: " << GetName() << std::endl; os << "type: " << _type << std::endl; os << "hits collection: " << this->getHCName() << std::endl;
@@ -142,23 +134,22 @@
} /*
-Id64bit SensitiveDetector::makeId() const -{ - Id64bit id64; - if (hasIdSpec()) { - - // get idvec ordered by this idspec - const IdVec ids = IdFactory::createOrderedIdVec(step(), this);
+ Id64bit SensitiveDetector::makeId() const + { + Id64bit id64; + if (hasIdSpec()) { + + // get idvec ordered by this idspec + const IdVec ids = IdFactory::createOrderedIdVec(step(), this); + + // pack into 64 bit cell id + Id64bit id64 = IdFactory::createId64bit(ids, getIdSpec()); + } + return id64; + } + */
- // pack into 64 bit cell id - Id64bit id64 = IdFactory::createId64bit(ids, getIdSpec()); - } - return id64; -} -*/ - -Id64bit SensitiveDetector::makeIdentifier(G4Step* step) const -{
+Id64bit SensitiveDetector::makeIdentifier(G4Step* step) const {
Id64bit id64; if (hasIdSpec()) {
@@ -172,8 +163,7 @@
return id64; }
-G4VHitsCollection* SensitiveDetector::getHitsCollection() const -{
+G4VHitsCollection* SensitiveDetector::getHitsCollection() const {
G4VHitsCollection* hc = 0; if (this->getHCID() != -1) { hc = G4EventManager::GetEventManager()->GetConstCurrentEvent()->GetHCofThisEvent()->GetHC(this->getHCID());
@@ -181,8 +171,7 @@
return hc; }
-G4VHitsCollection* SensitiveDetector::getHitsCollection(G4int nHC) const -{
+G4VHitsCollection* SensitiveDetector::getHitsCollection(G4int nHC) const {
G4VHitsCollection* hc = 0; if (this->getHCID(nHC) != -1) { hc = G4EventManager::GetEventManager()->GetConstCurrentEvent()->GetHCofThisEvent()->GetHC(this->getHCID(nHC));
@@ -190,24 +179,22 @@
return hc; }
-std::ostream& SensitiveDetector::printNumberOfHits(std::ostream& os) -{
+std::ostream& SensitiveDetector::printNumberOfHits(std::ostream& os) {
for (int i = 0; i < getNumberOfHitsCollections(); i++) { os << getHitsCollection(i)->GetName() << " " << getHitsCollection(i)->GetSize() << std::endl; } return os; }
-std::ostream& SensitiveDetector::printEdep(std::ostream& os) -{
+std::ostream& SensitiveDetector::printEdep(std::ostream& os) {
os << "total edep: " << G4BestUnit(this->getEdep(), "Energy") << std::endl; return os; }
-std::vector<G4LogicalVolume*> SensitiveDetector::getLogicalVolumes() const -{
+std::vector<G4LogicalVolume*> SensitiveDetector::getLogicalVolumes() const {
std::vector<G4LogicalVolume*> volumes;
- for (G4LogicalVolumeStore::const_iterator it = G4LogicalVolumeStore::GetInstance()->begin(); it != G4LogicalVolumeStore::GetInstance()->end(); it++) {
+ for (G4LogicalVolumeStore::const_iterator it = G4LogicalVolumeStore::GetInstance()->begin(); it != G4LogicalVolumeStore::GetInstance()->end(); + it++) {
if ((*it)->GetSensitiveDetector() == this) { volumes.push_back(*it); }
@@ -215,8 +202,7 @@
return volumes; }
-std::ostream& SensitiveDetector::printVolumes(std::ostream& os) -{
+std::ostream& SensitiveDetector::printVolumes(std::ostream& os) {
std::vector<G4LogicalVolume*> volumes = this->getLogicalVolumes(); for (std::vector<G4LogicalVolume*>::const_iterator it = volumes.begin(); it != volumes.end(); it++) {
@@ -225,113 +211,90 @@
return os; }
-SensitiveDetector::EType SensitiveDetector::getType() const -{
+SensitiveDetector::EType SensitiveDetector::getType() const {
return _type; }
-G4int SensitiveDetector::getHCID() const -{
+G4int SensitiveDetector::getHCID() const {
return _hcids[0]; }
-G4int SensitiveDetector::getHCID(G4int nHC) const -{
+G4int SensitiveDetector::getHCID(G4int nHC) const {
if (nHC > getNumberOfHitsCollections() + 1 || nHC < 0) {
- G4cerr << "The index " << nHC << " is not valid for SD " - << this->GetName() << "." << G4endl; - G4Exception("", "", FatalException, "Invalid index.");
+ G4cerr << "The index " << nHC << " is not valid for SD " << this->GetName() << "." << G4endl; + G4Exception("", "", FatalException, "Invalid index.");
} return _hcids[nHC]; }
- -bool SensitiveDetector::isValidVolume(G4LogicalVolume* lv) -{
+bool SensitiveDetector::isValidVolume(G4LogicalVolume* lv) {
return lv != 0; }
-const std::string& SensitiveDetector::getHCName() const -{
+const std::string& SensitiveDetector::getHCName() const {
return collectionName[0]; }
-const std::string& SensitiveDetector::getHCName(G4int nHC) const -{
+const std::string& SensitiveDetector::getHCName(G4int nHC) const {
return collectionName[nHC]; }
-void SensitiveDetector::setVerbose(unsigned int v) -{
+void SensitiveDetector::setVerbose(unsigned int v) {
_verbose = v; }
-unsigned int SensitiveDetector::getVerbose() const -{
+unsigned int SensitiveDetector::getVerbose() const {
return _verbose; }
-G4double SensitiveDetector::getEnergyCut() -{
+G4double SensitiveDetector::getEnergyCut() {
return _ecut; }
-void SensitiveDetector::setEcut(G4double ecut) -{
+void SensitiveDetector::setEcut(G4double ecut) {
_ecut = ecut; }
-void SensitiveDetector::setIdSpec(IdSpec* idspec) -{
+void SensitiveDetector::setIdSpec(IdSpec* idspec) {
_idspec = idspec; }
-IdSpec* SensitiveDetector::getIdSpec() const -{
+IdSpec* SensitiveDetector::getIdSpec() const {
return _idspec; }
-bool SensitiveDetector::hasIdSpec() const -{
+bool SensitiveDetector::hasIdSpec() const {
return _idspec != 0; }
-void SensitiveDetector::setEndcapFlag(bool ec) -{
+void SensitiveDetector::setEndcapFlag(bool ec) {
_endcap = ec; }
-bool SensitiveDetector::getEndcapFlag() -{
+bool SensitiveDetector::getEndcapFlag() {
return _endcap; }
-std::ostream& SensitiveDetector::printHits(std::ostream& os) -{
+std::ostream& SensitiveDetector::printHits(std::ostream& os) {
return os; }
-void SensitiveDetector::clearHits() -{
+void SensitiveDetector::clearHits() {
}
-int SensitiveDetector::getNumberOfHitsCollections() const -{
+int SensitiveDetector::getNumberOfHitsCollections() const {
return _hcids.size(); }
-double SensitiveDetector::getEdep() const -{
+double SensitiveDetector::getEdep() const {
return 0.0; }
-void SensitiveDetector::setHCID(G4int hcid) -{
+void SensitiveDetector::setHCID(G4int hcid) {
_hcids[0] = hcid; }
-void SensitiveDetector::setHCID(G4int hcid, G4int nHC) -{
+void SensitiveDetector::setHCID(G4int hcid, G4int nHC) {
if (nHC > getNumberOfHitsCollections() + 1 || nHC < 0) { G4cerr << this->GetName() << "setHCID Nr of HC" << nHC << "not valid" << G4endl; G4Exception("", "", FatalException, "Bad HC index.");
@@ -339,18 +302,15 @@
_hcids[nHC] = hcid; }
-void SensitiveDetector::addHitProcessor(HitProcessor* processor) -{
+void SensitiveDetector::addHitProcessor(HitProcessor* processor) {
_hitProcessors.push_back(processor); }
-SensitiveDetector::HitProcessors SensitiveDetector::getHitProcessors() -{
+SensitiveDetector::HitProcessors SensitiveDetector::getHitProcessors() {
return _hitProcessors; }
-void SensitiveDetector::addHitProcessors(std::vector<HitProcessor*> processors) -{
+void SensitiveDetector::addHitProcessors(std::vector<HitProcessor*> processors) {
for (HitProcessors::iterator it = processors.begin(); it != processors.end(); it++) { _hitProcessors.push_back(*it); }
diff -u -r1.8 -r1.9 --- SensitiveDetectorFactory.cc 30 Oct 2013 00:10:15 -0000 1.8 +++ SensitiveDetectorFactory.cc 13 Nov 2013 23:02:56 -0000 1.9 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/SensitiveDetectorFactory.cc,v 1.8 2013/10/30 00:10:15 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/SensitiveDetectorFactory.cc,v 1.9 2013/11/13 23:02:56 jeremy Exp $
// LCDD #include "lcdd/detectors/SensitiveDetectorFactory.hh"
@@ -12,8 +12,7 @@
#include "lcdd/schema/hit_processor.hh" #include "lcdd/schema/hits_collection.hh"
-SensitiveDetector* SensitiveDetectorFactory::createSensitiveDetector(const SAXObject* object) -{
+SensitiveDetector* SensitiveDetectorFactory::createSensitiveDetector(const SAXObject* object) {
const SensitiveDetectorType* sensitiveDetectorType = dynamic_cast<const SensitiveDetectorType*>(object); SensitiveDetector* sensitiveDetector = 0; IdSpec* idspec = 0;
@@ -45,12 +44,13 @@
// Check if the IdSpec exists. if (idspec == 0) {
- G4cerr << "IdSpec <" << ref->get_ref() << "> referenced by detector <" << sensitiveDetectorType->get_name() << "> does not exist." << G4endl;
+ G4cerr << "IdSpec <" << ref->get_ref() << "> referenced by detector <" << sensitiveDetectorType->get_name() << "> does not exist." + << G4endl;
G4Exception("", "", FatalException, "IdSpec does not exist."); }
- // Process hit_processor child tag. - } else if (childTag == "hit_processor") {
+ // Process hit_processor child tag. + } else if (childTag == "hit_processor") {
// Cast object to appropriate element type. const hit_processor* hitProcessor = dynamic_cast<const hit_processor*>(seq->content(i).object);
@@ -58,7 +58,7 @@
// Push type name of HitProcessor onto list to be created later once SD is available. hitProcessorNames.push_back(hitProcessor->get_type());
- // Process hits_collection child tag.
+ // Process hits_collection child tag.
} else if (childTag == "hits_collection") { // Cast object to appropriate element type.
@@ -107,18 +107,18 @@
// Create HitProcessors from list of type names. for (std::vector<std::string>::iterator it = hitProcessorNames.begin(); it != hitProcessorNames.end(); it++) {
- std::string type = (*it); - HitProcessorFactory* hitProcessorFactory = HitProcessorManager::instance()->getFactory(type); - if (hitProcessorFactory == 0) { - std::cerr << "HitProcessorFactory was not found for type: " << type << std::endl; - G4Exception("", "", FatalException, "HitProcessor not found"); - } - HitProcessor* processor = hitProcessorFactory->createHitProcessor(sensitiveDetector);
+ std::string type = (*it); + HitProcessorFactory* hitProcessorFactory = HitProcessorManager::instance()->getFactory(type); + if (hitProcessorFactory == 0) { + std::cerr << "HitProcessorFactory was not found for type: " << type << std::endl; + G4Exception("", "", FatalException, "HitProcessor not found"); + } + HitProcessor* processor = hitProcessorFactory->createHitProcessor(sensitiveDetector);
- //std::cout << "create hits processor: " << type << std::endl;
+ //std::cout << "create hits processor: " << type << std::endl;
- // Add the HitProcessor to the list. - hitProcessors.push_back(processor);
+ // Add the HitProcessor to the list. + hitProcessors.push_back(processor);
} // Add the HitProcessors from the list.
@@ -129,10 +129,12 @@
// Need to add default HitProcessors because none were specified in the detector's XML. if (sensitiveDetectorTypeName == "tracker") { // Add the default TrackerHitProcessor.
- sensitiveDetector->addHitProcessor(HitProcessorManager::instance()->getFactory("StepCombiningTrackerHitProcessor")->createHitProcessor(sensitiveDetector)); - } else if (sensitiveDetectorTypeName == "calorimeter" ) {
+ sensitiveDetector->addHitProcessor( + HitProcessorManager::instance()->getFactory("StepCombiningTrackerHitProcessor")->createHitProcessor(sensitiveDetector)); + } else if (sensitiveDetectorTypeName == "calorimeter") {
// Add the default CalorimeterHitProcessor.
- sensitiveDetector->addHitProcessor(HitProcessorManager::instance()->getFactory("LegacyCalorimeterHitProcessor")->createHitProcessor(sensitiveDetector));
+ sensitiveDetector->addHitProcessor( + HitProcessorManager::instance()->getFactory("LegacyCalorimeterHitProcessor")->createHitProcessor(sensitiveDetector));
} }
@@ -153,8 +155,7 @@
return sensitiveDetector; }
-SensitiveDetector* SensitiveDetectorFactory::createCalorimeter(const SAXObject* object, const std::vector<G4String>& hitsCollections) -{
+SensitiveDetector* SensitiveDetectorFactory::createCalorimeter(const SAXObject* object, const std::vector<G4String>& hitsCollections) {
const SensitiveDetectorType* sensitiveDetectorType = dynamic_cast<const SensitiveDetectorType*>(object); Segmentation* segmentation = 0;
@@ -180,8 +181,7 @@
return new CalorimeterSD(sensitiveDetectorType->get_name(), hitsCollections, segmentation); }
-TrackerSD* SensitiveDetectorFactory::createTracker(const SAXObject* object, const std::vector<G4String>& hitsCollections) -{
+TrackerSD* SensitiveDetectorFactory::createTracker(const SAXObject* object, const std::vector<G4String>& hitsCollections) {
// Cast the SAXObject to tracker element. const tracker* trackerElement = dynamic_cast<const tracker*>(object);
@@ -191,8 +191,7 @@
return sd; }
-double SensitiveDetectorFactory::computeEcut(const SensitiveDetectorType* sdt) -{
+double SensitiveDetectorFactory::computeEcut(const SensitiveDetectorType* sdt) {
GDMLExpressionEvaluator* calc = GDMLProcessor::GetInstance()->GetEvaluator(); std::string sval = sdt->get_ecut(); sval += "*" + sdt->get_eunit();
@@ -200,23 +199,17 @@
return ecut; }
-int SensitiveDetectorFactory::convertVerbose(const SensitiveDetectorType* sdt) -{
+int SensitiveDetectorFactory::convertVerbose(const SensitiveDetectorType* sdt) {
GDMLExpressionEvaluator* calc = GDMLProcessor::GetInstance()->GetEvaluator(); std::string sval = sdt->get_verbose(); int verbose = (int) calc->Eval(sval); return verbose; }
-bool SensitiveDetectorFactory::isSegmentationTag(const std::string& s) -{
+bool SensitiveDetectorFactory::isSegmentationTag(const std::string& s) {
// FIXME This should automatically know all segmentation types somehow. // Can this be read from the schema? // http://xerces-c.sourcearchive.com/documentation/3.1.1-1/SchemaGrammar_8hpp_source.html
- return (s == "projective_cylinder" || - s == "grid_xyz" || - s == "global_grid_xy" || - s == "nonprojective_cylinder" || - s == "projective_zplane" || - s == "cell_readout_2d");
+ return (s == "projective_cylinder" || s == "grid_xyz" || s == "global_grid_xy" || s == "nonprojective_cylinder" || s == "projective_zplane" + || s == "cell_readout_2d");
}
diff -u -r1.3 -r1.4 --- SensitiveDetectorMessenger.cc 10 Jul 2013 16:49:47 -0000 1.3 +++ SensitiveDetectorMessenger.cc 13 Nov 2013 23:02:56 -0000 1.4 @@ -1,4 +1,4 @@
-// $Id: SensitiveDetectorMessenger.cc,v 1.3 2013/07/10 16:49:47 jeremy Exp $
+// $Id: SensitiveDetectorMessenger.cc,v 1.4 2013/11/13 23:02:56 jeremy Exp $
// LCDD #include "lcdd/detectors/SensitiveDetectorMessenger.hh"
@@ -14,8 +14,7 @@
G4UIdirectory* SensitiveDetectorMessenger::_detectorsDir = 0; SensitiveDetectorMessenger::SensitiveDetectorMessenger(SensitiveDetector* detector) :
- _detector(detector) -{
+ _detector(detector) {
if (_detectorsDir == 0) { makeDetectorsDir(); }
@@ -23,13 +22,11 @@
defineCommands(_detector); }
-SensitiveDetectorMessenger::~SensitiveDetectorMessenger() -{
+SensitiveDetectorMessenger::~SensitiveDetectorMessenger() {
// TODO: put command deletes here }
-void SensitiveDetectorMessenger::SetNewValue(G4UIcommand* cmd, G4String newVals) -{
+void SensitiveDetectorMessenger::SetNewValue(G4UIcommand* cmd, G4String newVals) {
if (cmd == _printInfoCmd) { _detector->printBasicInfo(std::cout); } else if (cmd == _printNHitsCmd) {
@@ -50,14 +47,12 @@
}
-void SensitiveDetectorMessenger::makeDetectorsDir() -{
+void SensitiveDetectorMessenger::makeDetectorsDir() {
_detectorsDir = new G4UIdirectory("/detectors/"); _detectorsDir->SetGuidance("Commands for sensitive detectors. [LCDD]"); }
-void SensitiveDetectorMessenger::defineCommands(G4VSensitiveDetector* sd) -{
+void SensitiveDetectorMessenger::defineCommands(G4VSensitiveDetector* sd) {
// Name of the sensitive detector. const G4String& name = sd->GetName();
diff -u -r1.3 -r1.4 --- StepCombiningTrackerHitProcessor.cc 2 Oct 2013 02:05:22 -0000 1.3 +++ StepCombiningTrackerHitProcessor.cc 13 Nov 2013 23:02:56 -0000 1.4 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/StepCombiningTrackerHitProcessor.cc,v 1.3 2013/10/02 02:05:22 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/StepCombiningTrackerHitProcessor.cc,v 1.4 2013/11/13 23:02:56 jeremy Exp $
// LCDD #include "lcdd/detectors/StepCombiningTrackerHitProcessor.hh"
@@ -9,32 +9,24 @@
#include "G4ChargedGeantino.hh" StepCombiningTrackerHitProcessor::StepCombiningTrackerHitProcessor(TrackerSD* tracker) :
- TrackerHitProcessor(tracker), - _currentTrackID(-1), - _currentPV(0), - _edepTotal(0.), - _minTime(0.), - _startedHit(false), - _currentTrack(0) -{}
+ TrackerHitProcessor(tracker), _currentTrackID(-1), _currentPV(0), _edepTotal(0.), _minTime(0.), _startedHit(false), _currentTrack(0) { +}
int _currentTrackID;
- G4VPhysicalVolume* _currentPV; - G4ThreeVector _entryPoint; - G4ThreeVector _exitPoint; - G4ThreeVector _entryMomentum; - G4ThreeVector _exitMomentum; - G4double _edepTotal; - G4double _minTime; - bool _startedHit; - G4Track* _currentTrack;
+G4VPhysicalVolume* _currentPV; +G4ThreeVector _entryPoint; +G4ThreeVector _exitPoint; +G4ThreeVector _entryMomentum; +G4ThreeVector _exitMomentum; +G4double _edepTotal; +G4double _minTime; +bool _startedHit; +G4Track* _currentTrack;
-StepCombiningTrackerHitProcessor::~StepCombiningTrackerHitProcessor() -{
+StepCombiningTrackerHitProcessor::~StepCombiningTrackerHitProcessor() {
}
-G4bool StepCombiningTrackerHitProcessor::processHits(G4Step* step) -{
+G4bool StepCombiningTrackerHitProcessor::processHits(G4Step* step) {
// The return value indicating whether a hit was inserted. bool r = false;
@@ -86,8 +78,7 @@
return r; }
-void StepCombiningTrackerHitProcessor::updateHit(G4Step* step) -{
+void StepCombiningTrackerHitProcessor::updateHit(G4Step* step) {
// Update can only happen if a hit has been started. if (_startedHit) {
@@ -105,8 +96,7 @@
} }
-void StepCombiningTrackerHitProcessor::clear() -{
+void StepCombiningTrackerHitProcessor::clear() {
_minTime = 0; _edepTotal = 0; _currentPV = 0;
@@ -114,8 +104,7 @@
_startedHit = false; }
-bool StepCombiningTrackerHitProcessor::insertHit(G4Step* step) -{
+bool StepCombiningTrackerHitProcessor::insertHit(G4Step* step) {
// Another hit was not started. if (!_startedHit) { G4cerr << "StepCombiningTrackerHitProcessor::insertHit - Never started a hit!" << G4endl;
@@ -172,8 +161,7 @@
return true; }
-void StepCombiningTrackerHitProcessor::startHit(G4Step* step, G4StepPoint* stepPoint) -{
+void StepCombiningTrackerHitProcessor::startHit(G4Step* step, G4StepPoint* stepPoint) {
_currentTrack = step->GetTrack(); _currentPV = stepPoint->GetPhysicalVolume(); _entryPoint = _exitPoint = stepPoint->GetPosition();
diff -u -r1.2 -r1.3 --- StepReadout.cc 3 Jul 2013 20:03:49 -0000 1.2 +++ StepReadout.cc 13 Nov 2013 23:02:56 -0000 1.3 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/StepReadout.cc,v 1.2 2013/07/03 20:03:49 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/StepReadout.cc,v 1.3 2013/11/13 23:02:56 jeremy Exp $
// LCDD #include "lcdd/detectors/StepReadout.hh"
@@ -18,96 +18,77 @@
#include "G4LogicalVolume.hh" StepReadout::StepReadout() :
- _step(0) -{
+ _step(0) {
}
-StepReadout::~StepReadout() -{
+StepReadout::~StepReadout() {
}
-void StepReadout::setStep(G4Step* s) -{
+void StepReadout::setStep(G4Step* s) {
_step = s; }
-G4Step* StepReadout::step() const -{
+G4Step* StepReadout::step() const {
return _step; }
-bool StepReadout::hasStep() const -{
+bool StepReadout::hasStep() const {
return (0 != _step); }
-G4StepPoint* StepReadout::pre() const -{
+G4StepPoint* StepReadout::pre() const {
return step()->GetPreStepPoint(); }
-G4StepPoint* StepReadout::post() const -{
+G4StepPoint* StepReadout::post() const {
return step()->GetPostStepPoint(); }
-G4VPhysicalVolume* StepReadout::prePV() const -{
+G4VPhysicalVolume* StepReadout::prePV() const {
return preTouchableHandle()->GetVolume(); }
-G4VPhysicalVolume* StepReadout::postPV() const -{
+G4VPhysicalVolume* StepReadout::postPV() const {
return postTouchableHandle()->GetVolume(); }
-G4VSolid* StepReadout::preSolid() const -{
+G4VSolid* StepReadout::preSolid() const {
return preLV()->GetSolid(); }
-G4VSolid* StepReadout::postSolid() const -{
+G4VSolid* StepReadout::postSolid() const {
return postLV()->GetSolid(); }
-G4LogicalVolume* StepReadout::preLV() const -{
+G4LogicalVolume* StepReadout::preLV() const {
return prePV()->GetLogicalVolume(); }
-G4LogicalVolume* StepReadout::postLV() const -{
+G4LogicalVolume* StepReadout::postLV() const {
return postPV()->GetLogicalVolume(); }
-G4Material* StepReadout::preMaterial() const -{
+G4Material* StepReadout::preMaterial() const {
return pre()->GetMaterial(); }
-G4Material* StepReadout::postMaterial() const -{
+G4Material* StepReadout::postMaterial() const {
return post()->GetMaterial(); }
-G4VSensitiveDetector* StepReadout::preSD() const -{
+G4VSensitiveDetector* StepReadout::preSD() const {
return getSD(pre()); }
-G4VSensitiveDetector* StepReadout::postSD() const -{
+G4VSensitiveDetector* StepReadout::postSD() const {
return getSD(post()); }
-G4VSensitiveDetector* StepReadout::getSD(G4StepPoint* stepPoint) const -{
+G4VSensitiveDetector* StepReadout::getSD(G4StepPoint* stepPoint) const {
return stepPoint->GetPhysicalVolume()->GetLogicalVolume()->GetSensitiveDetector(); }
-bool StepReadout::hasSameSD() const -{
+bool StepReadout::hasSameSD() const {
bool r = false; // post vol has an SD
@@ -122,92 +103,74 @@
return r; }
-G4ThreeVector StepReadout::volumePosition(G4TouchableHandle theTouchable) const -{
+G4ThreeVector StepReadout::volumePosition(G4TouchableHandle theTouchable) const {
return theTouchable->GetHistory()->GetTopTransform().Inverse().TransformPoint(_origin); }
-G4ThreeVector StepReadout::preVolumePosition() const -{
+G4ThreeVector StepReadout::preVolumePosition() const {
return volumePosition(preTouchableHandle()); }
-G4ThreeVector StepReadout::postVolumePosition() const -{
+G4ThreeVector StepReadout::postVolumePosition() const {
return volumePosition(postTouchableHandle()); }
-double StepReadout::edep() const -{
+double StepReadout::edep() const {
return step()->GetTotalEnergyDeposit(); }
-G4Track* StepReadout::track() const -{
+G4Track* StepReadout::track() const {
return step()->GetTrack(); }
-double StepReadout::globalTime() const -{
+double StepReadout::globalTime() const {
return track()->GetGlobalTime(); }
-int StepReadout::trackID() const -{
+int StepReadout::trackID() const {
return track()->GetTrackID(); }
-G4ThreeVector StepReadout::momentum() const -{
+G4ThreeVector StepReadout::momentum() const {
return track()->GetMomentum(); }
-TrackInformation* StepReadout::trackInformation() const -{
+TrackInformation* StepReadout::trackInformation() const {
return TrackInformation::getTrackInformation(track()); }
-G4ThreeVector StepReadout::prePosition() const -{
+G4ThreeVector StepReadout::prePosition() const {
return pre()->GetPosition(); }
-G4ThreeVector StepReadout::midPosition() const -{
+G4ThreeVector StepReadout::midPosition() const {
return ReadoutUtil::computeThreeVectorMean(prePosition(), postPosition()); }
-G4ThreeVector StepReadout::postPosition() const -{
+G4ThreeVector StepReadout::postPosition() const {
return post()->GetPosition(); }
-G4ThreeVector StepReadout::preMomentum() const -{
+G4ThreeVector StepReadout::preMomentum() const {
return pre()->GetMomentum(); }
-G4ThreeVector StepReadout::postMomentum() const -{
+G4ThreeVector StepReadout::postMomentum() const {
return post()->GetMomentum(); }
-G4ThreeVector StepReadout::meanMomentum() const -{
+G4ThreeVector StepReadout::meanMomentum() const {
return ReadoutUtil::computeThreeVectorMean(preMomentum(), postMomentum()); }
-G4TouchableHandle StepReadout::preTouchableHandle() const -{
+G4TouchableHandle StepReadout::preTouchableHandle() const {
return pre()->GetTouchableHandle(); }
-G4TouchableHandle StepReadout::postTouchableHandle() const -{
+G4TouchableHandle StepReadout::postTouchableHandle() const {
return post()->GetTouchableHandle(); }
-bool StepReadout::isGeantino() -{
+bool StepReadout::isGeantino() {
return ReadoutUtil::isGeantino(step()); }
diff -u -r1.1 -r1.2 --- TrackerHitProcessor.cc 11 Jul 2013 22:39:17 -0000 1.1 +++ TrackerHitProcessor.cc 13 Nov 2013 23:02:56 -0000 1.2 @@ -1,11 +1,11 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/TrackerHitProcessor.cc,v 1.1 2013/07/11 22:39:17 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/TrackerHitProcessor.cc,v 1.2 2013/11/13 23:02:56 jeremy Exp $
// LCDD #include "lcdd/detectors/TrackerHitProcessor.hh"
-TrackerHitProcessor::TrackerHitProcessor(TrackerSD* tracker) - : _tracker(tracker) -{}
+TrackerHitProcessor::TrackerHitProcessor(TrackerSD* tracker) : + _tracker(tracker) { +}
-TrackerHitProcessor::~TrackerHitProcessor() -{}
+TrackerHitProcessor::~TrackerHitProcessor() { +}
diff -u -r1.6 -r1.7 --- TrackerSD.cc 17 Sep 2013 00:25:40 -0000 1.6 +++ TrackerSD.cc 13 Nov 2013 23:02:56 -0000 1.7 @@ -1,16 +1,10 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/TrackerSD.cc,v 1.6 2013/09/17 00:25:40 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/TrackerSD.cc,v 1.7 2013/11/13 23:02:56 jeremy Exp $
// LCDD //#include "lcdd/id/IdManager.hh" //#include "lcdd/id/IdFactory.hh" //#include "lcdd/id/IdVec.hh" #include "lcdd/detectors/TrackerSD.hh"
-//#include "lcdd/detectors/ReadoutUtil.hh" -//#include "lcdd/hits/TrackerHit.hh" -//#include "lcdd/hits/TrackInformation.hh" - -// Geant4 -//#include "G4Geantino.hh"
// STL #include <iostream>
@@ -26,30 +20,28 @@
} }
-TrackerSD::~TrackerSD() -{
+TrackerSD::~TrackerSD() {
} /*
-void TrackerSD::Initialize(G4HCofThisEvent *HCE) -{ - clearHits(); - - // create tracker hits coll - _HC = new G4TrackerHitsCollection(GetName(), collectionName[0]);
+ void TrackerSD::Initialize(G4HCofThisEvent *HCE) + { + clearHits(); + + // create tracker hits coll + _HC = new G4TrackerHitsCollection(GetName(), collectionName[0]); + + // set HCID + if (getHCID() < 0) { + setHCID(GetCollectionID(0)); + } + + // add collection to HC of event + HCE->AddHitsCollection(getHCID(), _HC); + } + */
- // set HCID - if (getHCID() < 0) { - setHCID(GetCollectionID(0)); - } - - // add collection to HC of event - HCE->AddHitsCollection(getHCID(), _HC); -} -*/ - -void TrackerSD::Initialize(G4HCofThisEvent *HCE) -{
+void TrackerSD::Initialize(G4HCofThisEvent *HCE) {
// Loop over number of hits collections defined by this detector. for (int i = 0; i < getNumberOfHitsCollections(); i++) {
@@ -68,58 +60,51 @@
} }
- -G4bool TrackerSD::ProcessHits(G4Step* aStep, G4TouchableHistory*) -{
+G4bool TrackerSD::ProcessHits(G4Step* aStep, G4TouchableHistory*) {
// Call parent class's method which will activate registered HitProcessors. return SensitiveDetector::ProcessHits(aStep, 0); }
-std::ostream& TrackerSD::printHits(std::ostream& os) -{
+std::ostream& TrackerSD::printHits(std::ostream& os) {
/*
- for (G4TrackerHitList::const_iterator iter = _hits.begin(); iter != _hits.end(); iter++) { - os << (*(const_cast<const TrackerHit*>(*iter))); - } - os << std::endl; - */
+ for (G4TrackerHitList::const_iterator iter = _hits.begin(); iter != _hits.end(); iter++) { + os << (*(const_cast<const TrackerHit*>(*iter))); + } + os << std::endl; + */
return os; }
-void TrackerSD::EndOfEvent(G4HCofThisEvent *) -{
+void TrackerSD::EndOfEvent(G4HCofThisEvent *) {
/*
-#ifdef G4VERBOSE - if ( getVerbose() > 0 ) { - std::cout << GetName() << " has " << _HC->GetSize() << " hits." << std::endl; - } - - if ( getVerbose() > 1 ) { - printHits ( std::cout ); - } -#endif -*/
+ #ifdef G4VERBOSE + if ( getVerbose() > 0 ) { + std::cout << GetName() << " has " << _HC->GetSize() << " hits." << std::endl; + } + + if ( getVerbose() > 1 ) { + printHits ( std::cout ); + } + #endif + */
clearHits(); }
-double TrackerSD::getEdep() const -{
+double TrackerSD::getEdep() const {
double edep = 0.0; /*
- for (G4TrackerHitList::const_iterator it = _hits.begin(); it != _hits.end(); it++) { - edep += (*it)->getEdep(); - } - */
+ for (G4TrackerHitList::const_iterator it = _hits.begin(); it != _hits.end(); it++) { + edep += (*it)->getEdep(); + } + */
return edep; }
-void TrackerSD::clearHits() -{
+void TrackerSD::clearHits() {
//_hits.clear(); }
-void TrackerSD::addHit(TrackerHit* hit, int hcid) -{
+void TrackerSD::addHit(TrackerHit* hit, int hcid) {
_hitsCollections[hcid]->insert(hit); }
diff -u -r1.3 -r1.4 --- UnsegmentedCalorimeterHitProcessor.cc 14 Sep 2013 02:06:35 -0000 1.3 +++ UnsegmentedCalorimeterHitProcessor.cc 13 Nov 2013 23:02:56 -0000 1.4 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/UnsegmentedCalorimeterHitProcessor.cc,v 1.3 2013/09/14 02:06:35 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/UnsegmentedCalorimeterHitProcessor.cc,v 1.4 2013/11/13 23:02:56 jeremy Exp $
// LCDD #include "lcdd/detectors/UnsegmentedCalorimeterHitProcessor.hh"
@@ -7,17 +7,14 @@
#include "G4Geantino.hh" #include "G4ChargedGeantino.hh"
-UnsegmentedCalorimeterHitProcessor::UnsegmentedCalorimeterHitProcessor(CalorimeterSD* calorimeter) - : CalorimeterHitProcessor(calorimeter) -{
+UnsegmentedCalorimeterHitProcessor::UnsegmentedCalorimeterHitProcessor(CalorimeterSD* calorimeter) : + CalorimeterHitProcessor(calorimeter) {
}
-UnsegmentedCalorimeterHitProcessor::~UnsegmentedCalorimeterHitProcessor() -{
+UnsegmentedCalorimeterHitProcessor::~UnsegmentedCalorimeterHitProcessor() {
}
-bool UnsegmentedCalorimeterHitProcessor::processHits(G4Step* step) -{
+bool UnsegmentedCalorimeterHitProcessor::processHits(G4Step* step) {
// Get the energy deposition. G4double edep = step->GetTotalEnergyDeposit();
diff -u -r1.1 -r1.2 --- LCDDHeaderRecord.cc 10 Jul 2013 18:16:35 -0000 1.1 +++ LCDDHeaderRecord.cc 13 Nov 2013 23:02:57 -0000 1.2 @@ -1,133 +1,99 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/geant4/LCDDHeaderRecord.cc,v 1.1 2013/07/10 18:16:35 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/geant4/LCDDHeaderRecord.cc,v 1.2 2013/11/13 23:02:57 jeremy Exp $
// LCDD #include "lcdd/geant4/LCDDHeaderRecord.hh"
-LCDDHeaderRecord::LCDDHeaderRecord() -{
+LCDDHeaderRecord::LCDDHeaderRecord() {
}
-LCDDHeaderRecord::~LCDDHeaderRecord() -{
+LCDDHeaderRecord::~LCDDHeaderRecord() {
}
- -void LCDDHeaderRecord::setDetectorName(const std::string& dn) -{
+void LCDDHeaderRecord::setDetectorName(const std::string& dn) {
_detectorName = dn; }
- -void LCDDHeaderRecord::setDetectorVersion(const std::string& dv) -{
+void LCDDHeaderRecord::setDetectorVersion(const std::string& dv) {
_detectorVersion = dv; }
-void LCDDHeaderRecord::setDetectorUrl(const std::string& u) -{
+void LCDDHeaderRecord::setDetectorUrl(const std::string& u) {
_detectorUrl = u; }
-void LCDDHeaderRecord::setAuthorName(const std::string& an) -{
+void LCDDHeaderRecord::setAuthorName(const std::string& an) {
_authorName = an; }
-void LCDDHeaderRecord::setGeneratorName(const std::string& gn) -{
+void LCDDHeaderRecord::setGeneratorName(const std::string& gn) {
_generatorName = gn; }
- -void LCDDHeaderRecord::setGeneratorVersion(const std::string& gv) -{
+void LCDDHeaderRecord::setGeneratorVersion(const std::string& gv) {
_generatorVersion = gv; }
- -void LCDDHeaderRecord::setGeneratorChecksum(const std::string& c) -{
+void LCDDHeaderRecord::setGeneratorChecksum(const std::string& c) {
_generatorChecksum = c; }
- -void LCDDHeaderRecord::setGeneratorFile(const std::string& gurl) -{
+void LCDDHeaderRecord::setGeneratorFile(const std::string& gurl) {
_generatorFile = gurl; }
- -void LCDDHeaderRecord::setAuthorEmail(const std::string& ae) -{
+void LCDDHeaderRecord::setAuthorEmail(const std::string& ae) {
_authorEmail = ae; }
- -void LCDDHeaderRecord::setComment(const std::string& c) -{
+void LCDDHeaderRecord::setComment(const std::string& c) {
_comment = c; }
-void LCDDHeaderRecord::setChecksum(const std::string& c) -{
+void LCDDHeaderRecord::setChecksum(const std::string& c) {
_generatorChecksum = c; }
- -const std::string& LCDDHeaderRecord::getDetectorName() const -{
+const std::string& LCDDHeaderRecord::getDetectorName() const {
return _detectorName; }
-const std::string& LCDDHeaderRecord::getDetectorVersion() const -{
+const std::string& LCDDHeaderRecord::getDetectorVersion() const {
return _detectorVersion; }
- -const std::string& LCDDHeaderRecord::getDetectorUrl() const -{
+const std::string& LCDDHeaderRecord::getDetectorUrl() const {
return _detectorUrl; }
-const std::string& LCDDHeaderRecord::getComment() const -{
+const std::string& LCDDHeaderRecord::getComment() const {
return _comment; }
-const std::string& LCDDHeaderRecord::getAuthorName() const -{
+const std::string& LCDDHeaderRecord::getAuthorName() const {
return _authorName; }
-const std::string& LCDDHeaderRecord::getAuthorEmail() const -{
+const std::string& LCDDHeaderRecord::getAuthorEmail() const {
return _authorEmail; }
-const std::string& LCDDHeaderRecord::getGeneratorName() const -{
+const std::string& LCDDHeaderRecord::getGeneratorName() const {
return _generatorName; }
-const std::string& LCDDHeaderRecord::getGeneratorVersion() const -{
+const std::string& LCDDHeaderRecord::getGeneratorVersion() const {
return _generatorVersion; }
-const std::string& LCDDHeaderRecord::getGeneratorFile() const -{
+const std::string& LCDDHeaderRecord::getGeneratorFile() const {
return _generatorFile; }
- -const std::string& LCDDHeaderRecord::getGeneratorChecksum() const -{
+const std::string& LCDDHeaderRecord::getGeneratorChecksum() const {
return _generatorChecksum; }
-std::ostream& LCDDHeaderRecord::printOut(std::ostream &os) -{
+std::ostream& LCDDHeaderRecord::printOut(std::ostream &os) {
os << std::endl << "***** LCDD Header *****" << std::endl; os << "detectorName <" << _detectorName << ">" << std::endl;
diff -u -r1.1 -r1.2 --- PhysVolId.cc 10 Jul 2013 18:35:41 -0000 1.1 +++ PhysVolId.cc 13 Nov 2013 23:02:57 -0000 1.2 @@ -1,32 +1,26 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/geant4/PhysVolId.cc,v 1.1 2013/07/10 18:35:41 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/geant4/PhysVolId.cc,v 1.2 2013/11/13 23:02:57 jeremy Exp $
#include "lcdd/geant4/PhysVolId.hh" PhysVolId::PhysVolId(ValueType val, std::string fld) :
- _value(val), _fieldName(fld) -{
+ _value(val), _fieldName(fld) {
}
-PhysVolId::~PhysVolId() -{
+PhysVolId::~PhysVolId() {
}
-PhysVolId::ValueType PhysVolId::getValue() const -{
+PhysVolId::ValueType PhysVolId::getValue() const {
return _value; }
-const std::string& PhysVolId::getFieldName() const -{
+const std::string& PhysVolId::getFieldName() const {
return _fieldName; }
-bool PhysVolId::operator==(const PhysVolId& right) -{
+bool PhysVolId::operator==(const PhysVolId& right) {
return (_value == right._value); }
-bool PhysVolId::operator==(ValueType vt) -{
+bool PhysVolId::operator==(ValueType vt) {
return (_value == vt); }
diff -u -r1.1 -r1.2 --- PhysVolIdMap.cc 10 Jul 2013 20:49:06 -0000 1.1 +++ PhysVolIdMap.cc 13 Nov 2013 23:02:57 -0000 1.2 @@ -1,16 +1,15 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/geant4/PhysVolIdMap.cc,v 1.1 2013/07/10 20:49:06 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/geant4/PhysVolIdMap.cc,v 1.2 2013/11/13 23:02:57 jeremy Exp $
// LCDD #include "lcdd/geant4/PhysVolIdMap.hh"
-PhysVolIdMap::PhysVolIdMap() -{}
+PhysVolIdMap::PhysVolIdMap() { +}
-PhysVolIdMap::~PhysVolIdMap() -{}
+PhysVolIdMap::~PhysVolIdMap() { +}
-void PhysVolIdMap::addPhysVolId(G4VPhysicalVolume* pv, PhysVolId id) -{
+void PhysVolIdMap::addPhysVolId(G4VPhysicalVolume* pv, PhysVolId id) {
if (!hasPhysVolIds(pv)) { createPhysVolIds(pv); }
@@ -19,20 +18,16 @@
idvec.push_back(id); }
- -void PhysVolIdMap::createPhysVolIds(G4VPhysicalVolume* pv) -{
+void PhysVolIdMap::createPhysVolIds(G4VPhysicalVolume* pv) {
PhysVolId::PhysVolIds pvid; (*this)[pv] = pvid; }
-bool PhysVolIdMap::hasPhysVolIds(G4VPhysicalVolume* pv) const -{
+bool PhysVolIdMap::hasPhysVolIds(G4VPhysicalVolume* pv) const {
return (this->find(pv) != this->end()); }
-PhysVolId::PhysVolIds& PhysVolIdMap::getPhysVolIds(G4VPhysicalVolume* pv) -{
+PhysVolId::PhysVolIds& PhysVolIdMap::getPhysVolIds(G4VPhysicalVolume* pv) {
// create an empty one if not exists if (!hasPhysVolIds(pv)) { createPhysVolIds(pv);
diff -u -r1.2 -r1.3 --- PhysicsLimitSet.cc 3 Jul 2013 23:00:46 -0000 1.2 +++ PhysicsLimitSet.cc 13 Nov 2013 23:02:57 -0000 1.3 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/geant4/PhysicsLimitSet.cc,v 1.2 2013/07/03 23:00:46 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/geant4/PhysicsLimitSet.cc,v 1.3 2013/11/13 23:02:57 jeremy Exp $
// LCDD #include "lcdd/geant4/PhysicsLimitSet.hh"
@@ -27,8 +27,7 @@
const PhysicsLimitSet::LimitValueType PhysicsLimitSet::RANGE_MIN_DEFAULT = 0.; PhysicsLimitSet::PhysicsLimitSet(const G4String& name) :
- G4UserLimits("G4LimitSet"), _name(name) -{
+ G4UserLimits("G4LimitSet"), _name(name) {
_limitsMap[STEP_LENGTH_MAX_KEY] = LimitMap(); _limitsMap[TRACK_LENGTH_MAX_KEY] = LimitMap(); _limitsMap[TIME_MAX_KEY] = LimitMap();
@@ -36,47 +35,39 @@
_limitsMap[RANGE_MIN_KEY] = LimitMap(); }
-PhysicsLimitSet::~PhysicsLimitSet() -{
+PhysicsLimitSet::~PhysicsLimitSet() {
}
-G4double PhysicsLimitSet::GetMaxAllowedStep(const G4Track& aTrack) -{
+G4double PhysicsLimitSet::GetMaxAllowedStep(const G4Track& aTrack) {
double maxStepLength = getLimitForParticle(STEP_LENGTH_MAX_KEY, aTrack); return maxStepLength == LIMIT_NOT_SET ? STEP_LENGTH_MAX_DEFAULT : maxStepLength; }
-G4double PhysicsLimitSet::GetUserMaxTrackLength(const G4Track& aTrack) -{
+G4double PhysicsLimitSet::GetUserMaxTrackLength(const G4Track& aTrack) {
double maxTrackLength = getLimitForParticle(TRACK_LENGTH_MAX_KEY, aTrack); return maxTrackLength == LIMIT_NOT_SET ? TRACK_LENGTH_MAX_DEFAULT : maxTrackLength; }
-G4double PhysicsLimitSet::GetUserMaxTime(const G4Track& aTrack) -{
+G4double PhysicsLimitSet::GetUserMaxTime(const G4Track& aTrack) {
double maxTime = getLimitForParticle(TIME_MAX_KEY, aTrack); return maxTime == LIMIT_NOT_SET ? TIME_MAX_DEFAULT : maxTime; }
-G4double PhysicsLimitSet::GetUserMinEkine(const G4Track& aTrack) -{
+G4double PhysicsLimitSet::GetUserMinEkine(const G4Track& aTrack) {
double minEkine = getLimitForParticle(EKIN_MIN_KEY, aTrack); return minEkine == LIMIT_NOT_SET ? EKIN_MIN_DEFAULT : minEkine; }
-G4double PhysicsLimitSet::GetUserMinRange(const G4Track& aTrack) -{
+G4double PhysicsLimitSet::GetUserMinRange(const G4Track& aTrack) {
double minRange = getLimitForParticle(RANGE_MIN_KEY, aTrack); return minRange == LIMIT_NOT_SET ? RANGE_MIN_DEFAULT : minRange; }
-const PhysicsLimitSet::ParticleType PhysicsLimitSet::getParticleType(const G4Track& aTrack) -{
+const PhysicsLimitSet::ParticleType PhysicsLimitSet::getParticleType(const G4Track& aTrack) {
return aTrack.GetDefinition()->GetParticleName(); }
-void PhysicsLimitSet::setLimitForParticle(LimitNameType limitName, ParticleType particleType, LimitValueType limitValue) -{
+void PhysicsLimitSet::setLimitForParticle(LimitNameType limitName, ParticleType particleType, LimitValueType limitValue) {
if (_limitsMap.find(limitName) != _limitsMap.end()) { _limitsMap[limitName][particleType] = limitValue; } else {
@@ -84,8 +75,7 @@
} }
-PhysicsLimitSet::LimitValueType PhysicsLimitSet::getLimitForParticle(LimitNameType limitName, ParticleType particleType) -{
+PhysicsLimitSet::LimitValueType PhysicsLimitSet::getLimitForParticle(LimitNameType limitName, ParticleType particleType) {
//std::cout << "G4LimitSet::getLimitForParticle()" << std::endl; //std::cout << "limitName, particleType: " << limitName << " " << particleType << std::endl; LimitValueType limitValue = 0;
@@ -106,8 +96,7 @@
return limitValue; }
-PhysicsLimitSet::LimitValueType PhysicsLimitSet::getLimitForParticle(LimitNameType limitName, const G4Track& aTrack) -{
+PhysicsLimitSet::LimitValueType PhysicsLimitSet::getLimitForParticle(LimitNameType limitName, const G4Track& aTrack) {
return getLimitForParticle(limitName, getParticleType(aTrack)); }
@@ -116,8 +105,7 @@
// _name = n; //}
-G4String& PhysicsLimitSet::getName() -{
+G4String& PhysicsLimitSet::getName() {
return _name; }
diff -u -r1.7 -r1.8 --- CalorimeterHit.cc 14 Sep 2013 02:06:35 -0000 1.7 +++ CalorimeterHit.cc 13 Nov 2013 23:02:57 -0000 1.8 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/hits/CalorimeterHit.cc,v 1.7 2013/09/14 02:06:35 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/hits/CalorimeterHit.cc,v 1.8 2013/11/13 23:02:57 jeremy Exp $
// LCDD #include "lcdd/hits/CalorimeterHit.hh"
@@ -15,38 +15,32 @@
G4Allocator<CalorimeterHit> CalorimeterHitAllocator; CalorimeterHit::CalorimeterHit() :
- G4VHit(), _edep(0), _endcap(false) -{
+ G4VHit(), _edep(0), _endcap(false) {
}
-CalorimeterHit::CalorimeterHit(Id64bit id , G4double edep, G4ThreeVector globalCellPos) : - G4VHit(), _edep(edep), _pos(globalCellPos), _endcap(false), _id(id) -{
+CalorimeterHit::CalorimeterHit(Id64bit id, G4double edep, G4ThreeVector globalCellPos) : + G4VHit(), _edep(edep), _pos(globalCellPos), _endcap(false), _id(id) {
}
-CalorimeterHit::~CalorimeterHit() -{
+CalorimeterHit::~CalorimeterHit() {
} CalorimeterHit::CalorimeterHit(const CalorimeterHit &right) :
- G4VHit() -{
+ G4VHit() {
_edep = right._edep; _pos = right._pos; _id = right._id; _endcap = right._endcap; }
-const CalorimeterHit& CalorimeterHit::operator=(const CalorimeterHit &right) -{
+const CalorimeterHit& CalorimeterHit::operator=(const CalorimeterHit &right) {
_edep = right._edep; _pos = right._pos; return *this; }
-bool CalorimeterHit::operator==(const CalorimeterHit &right) -{
+bool CalorimeterHit::operator==(const CalorimeterHit &right) {
return (_pos == right._pos); }
@@ -70,8 +64,7 @@
} #endif
-void CalorimeterHit::printHitContributions(std::ostream& os) -{
+void CalorimeterHit::printHitContributions(std::ostream& os) {
printHitContributionsHeader(os); for (HitContributionList::iterator iter = _particleList.begin(); iter != _particleList.end(); iter++) {
@@ -79,64 +72,48 @@
} }
-void CalorimeterHit::printHitContributionsHeader(std::ostream& os) -{
+void CalorimeterHit::printHitContributionsHeader(std::ostream& os) {
os << "McpHitContribs" << std::endl; os << "trackID" << '\t' << "edep" << '\t' << '\t' << "PdgId" << '\t' << "time" << std::endl; }
-void CalorimeterHit::Print() -{
+void CalorimeterHit::Print() {
std::cout << *this << std::endl; }
-std::ostream& operator<<(std::ostream &os, const CalorimeterHit& hit) -{
+std::ostream& operator<<(std::ostream &os, const CalorimeterHit& hit) {
os << hit.getPosition() << " " << G4BestUnit(hit.getEdep(), "Energy") << std::endl; return os; }
- -void CalorimeterHit::setPosition(const G4ThreeVector& posXYZ) -{
+void CalorimeterHit::setPosition(const G4ThreeVector& posXYZ) {
_pos = posXYZ; }
- -void CalorimeterHit::setEdep(const G4double ed) -{
+void CalorimeterHit::setEdep(const G4double ed) {
_edep = ed; }
-void CalorimeterHit::addEdep(const G4double edincr) -{
+void CalorimeterHit::addEdep(const G4double edincr) {
_edep += edincr; }
- -G4ThreeVector CalorimeterHit::getPosition() const -{
+G4ThreeVector CalorimeterHit::getPosition() const {
return _pos; }
-G4double CalorimeterHit::getEdep() const -{
+G4double CalorimeterHit::getEdep() const {
return _edep; }
- -void CalorimeterHit::addHitContribution(HitContribution contrib) -{
+void CalorimeterHit::addHitContribution(HitContribution contrib) {
_particleList.push_back(contrib); }
- -const HitContributionList& CalorimeterHit::getHitContributions() const -{
+const HitContributionList& CalorimeterHit::getHitContributions() const {
return _particleList; }
-
//void CalorimeterHit::setId64bit(Id64bit::ElementType id0, Id64bit::ElementType id1) //{ // _id.setId0(id0);
@@ -144,18 +121,14 @@
// _id.encode(); //}
- -const Id64bit& CalorimeterHit::getId64bit() const -{
+const Id64bit& CalorimeterHit::getId64bit() const {
return _id; }
-void CalorimeterHit::setEndcapFlag(bool ec) -{
+void CalorimeterHit::setEndcapFlag(bool ec) {
_endcap = ec; }
-bool CalorimeterHit::getEndcapFlag() -{
+bool CalorimeterHit::getEndcapFlag() {
return _endcap; }
diff -u -r1.1 -r1.2 --- CalorimeterHitMap.cc 14 Sep 2013 01:40:04 -0000 1.1 +++ CalorimeterHitMap.cc 13 Nov 2013 23:02:57 -0000 1.2 @@ -1,26 +1,22 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/hits/CalorimeterHitMap.cc,v 1.1 2013/09/14 01:40:04 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/hits/CalorimeterHitMap.cc,v 1.2 2013/11/13 23:02:57 jeremy Exp $
#include "lcdd/hits/CalorimeterHitMap.hh"
-CalorimeterHitMap::CalorimeterHitMap() -{}
+CalorimeterHitMap::CalorimeterHitMap() { +}
-CalorimeterHitMap::~CalorimeterHitMap() -{ - _map.clear();
+CalorimeterHitMap::~CalorimeterHitMap() { + _map.clear();
}
-void CalorimeterHitMap::add(CalorimeterHit* hit) -{ - _map[hit->getId64bit().getValue()] = hit;
+void CalorimeterHitMap::add(CalorimeterHit* hit) { + _map[hit->getId64bit().getValue()] = hit;
}
-CalorimeterHit* CalorimeterHitMap::get(const Id64bit& id) -{ - return _map[id.getValue()];
+CalorimeterHit* CalorimeterHitMap::get(const Id64bit& id) { + return _map[id.getValue()];
}
-void CalorimeterHitMap::clear() -{ - _map.clear();
+void CalorimeterHitMap::clear() { + _map.clear();
}
diff -u -r1.3 -r1.4 --- HitContribution.cc 10 Jul 2013 20:49:06 -0000 1.3 +++ HitContribution.cc 13 Nov 2013 23:02:57 -0000 1.4 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/hits/HitContribution.cc,v 1.3 2013/07/10 20:49:06 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/hits/HitContribution.cc,v 1.4 2013/11/13 23:02:57 jeremy Exp $
// LCDD #include "lcdd/hits/HitContribution.hh"
@@ -11,24 +11,20 @@
#include "G4ParticleTypes.hh" HitContribution::HitContribution() :
- _trackID(-1), _edep(0), _PdgId(9999999), _globalTime(0) -{
+ _trackID(-1), _edep(0), _PdgId(9999999), _globalTime(0) {
; } HitContribution::HitContribution(G4int trackID, G4double edep, G4int PDGID, G4double globalTime) :
- _trackID(trackID), _edep(edep), _PdgId(PDGID), _globalTime(globalTime) -{
+ _trackID(trackID), _edep(edep), _PdgId(PDGID), _globalTime(globalTime) {
; }
-HitContribution::~HitContribution() -{
+HitContribution::~HitContribution() {
; }
-HitContribution::HitContribution(const G4Step* aStep) -{
+HitContribution::HitContribution(const G4Step* aStep) {
// Get the track. const G4Track* aTrack = aStep->GetTrack();
@@ -58,44 +54,36 @@
_position[2] = posVec[2]; }
-void HitContribution::printOut(std::ostream& os) -{
+void HitContribution::printOut(std::ostream& os) {
os << _trackID << '\t' << _edep << '\t' << _PdgId << '\t' << _globalTime << std::endl; }
-G4int HitContribution::getTrackID() const -{
+G4int HitContribution::getTrackID() const {
return _trackID; }
-G4double HitContribution::getEdep() const -{
+G4double HitContribution::getEdep() const {
return _edep; }
-void HitContribution::incrEdep(G4double incr) -{
+void HitContribution::incrEdep(G4double incr) {
_edep += incr; }
-G4int HitContribution::getPDGID() const -{
+G4int HitContribution::getPDGID() const {
return _PdgId; }
-G4double HitContribution::getGlobalTime() const -{
+G4double HitContribution::getGlobalTime() const {
return _globalTime; }
-void HitContribution::setMinTime(G4double new_time) -{
+void HitContribution::setMinTime(G4double new_time) {
if (new_time < _globalTime) { _globalTime = new_time; } }
-const float* HitContribution::getPosition() const -{
+const float* HitContribution::getPosition() const {
return _position; }
diff -u -r1.3 -r1.4 --- TrackInformation.cc 10 Jul 2013 20:49:06 -0000 1.3 +++ TrackInformation.cc 13 Nov 2013 23:02:57 -0000 1.4 @@ -1,41 +1,35 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/hits/TrackInformation.cc,v 1.3 2013/07/10 20:49:06 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/hits/TrackInformation.cc,v 1.4 2013/11/13 23:02:57 jeremy Exp $
// LCDD #include "lcdd/hits/TrackInformation.hh" G4Allocator<TrackInformation> TrackInformationAllocator;
-TrackInformation::TrackInformation() -{
+TrackInformation::TrackInformation() {
setDefaults(); }
-TrackInformation::TrackInformation(const G4Track* aTrack) -{
+TrackInformation::TrackInformation(const G4Track* aTrack) {
setDefaults(); _originalTrackID = aTrack->GetTrackID(); }
-TrackInformation::TrackInformation(const TrackInformation* aTrackInfo) -{
+TrackInformation::TrackInformation(const TrackInformation* aTrackInfo) {
assert(aTrackInfo); setFromTrackInformation(aTrackInfo, this); }
-TrackInformation::~TrackInformation() -{
+TrackInformation::~TrackInformation() {
}
-TrackInformation& TrackInformation::operator =(const TrackInformation& right) -{
+TrackInformation& TrackInformation::operator =(const TrackInformation& right) {
setFromTrackInformation(&right, this); return *this; }
-void TrackInformation::setDefaults() -{
+void TrackInformation::setDefaults() {
// default to invalid trackID _originalTrackID = -1;
@@ -50,8 +44,7 @@
_belowThreshold = false; }
-void TrackInformation::setFromTrackInformation(const TrackInformation* srcTrkInfo, TrackInformation* trgtTrkInfo) -{
+void TrackInformation::setFromTrackInformation(const TrackInformation* srcTrkInfo, TrackInformation* trgtTrkInfo) {
trgtTrkInfo->setTrackID(srcTrkInfo->_originalTrackID); trgtTrkInfo->setOriginalTrackingStatus(srcTrkInfo->_originalTrackingStatus);
@@ -63,8 +56,7 @@
trgtTrkInfo->setBelowThreshold(srcTrkInfo->getBelowThreshold()); }
-const std::string& TrackInformation::getTrackingStatusString(ETrackingStatus ts) -{
+const std::string& TrackInformation::getTrackingStatusString(ETrackingStatus ts) {
static const std::string str_none = "None"; static const std::string str_tracking = "InTrackingRegion"; static const std::string str_nontracking = "InNontrackingRegion";
@@ -81,96 +73,77 @@
return str_invalid; }
-int TrackInformation::operator ==(const TrackInformation& right) const -{
+int TrackInformation::operator ==(const TrackInformation& right) const {
return (this == &right); }
-void TrackInformation::Print() const -{
+void TrackInformation::Print() const {
}
-const std::string& TrackInformation::getTrackingStatusString() const -{
+const std::string& TrackInformation::getTrackingStatusString() const {
return TrackInformation::getTrackingStatusString(getTrackingStatus()); }
-G4int TrackInformation::getOriginalTrackID() const -{
+G4int TrackInformation::getOriginalTrackID() const {
return _originalTrackID; }
-TrackInformation::ETrackingStatus TrackInformation::getOriginalTrackingStatus() const -{
+TrackInformation::ETrackingStatus TrackInformation::getOriginalTrackingStatus() const {
return _originalTrackingStatus; }
-TrackInformation::ETrackingStatus TrackInformation::getTrackingStatus() const -{
+TrackInformation::ETrackingStatus TrackInformation::getTrackingStatus() const {
return _trackingStatus; }
-bool TrackInformation::hasTrackerHit() const -{
+bool TrackInformation::hasTrackerHit() const {
return _hasTrackerHit; }
-void TrackInformation::setHasTrackerHit(bool hasHit) -{
+void TrackInformation::setHasTrackerHit(bool hasHit) {
_hasTrackerHit = hasHit; }
-void TrackInformation::setTrackID(G4int id) -{
+void TrackInformation::setTrackID(G4int id) {
_originalTrackID = id; }
-void TrackInformation::setTrackingStatus(ETrackingStatus st) -{
+void TrackInformation::setTrackingStatus(ETrackingStatus st) {
_trackingStatus = st; }
-void TrackInformation::setOriginalTrackingStatus(ETrackingStatus st) -{
+void TrackInformation::setOriginalTrackingStatus(ETrackingStatus st) {
_originalTrackingStatus = st; }
-void TrackInformation::setVertexIsNotEndpointOfParent(bool val) -{
+void TrackInformation::setVertexIsNotEndpointOfParent(bool val) {
_vertexIsNotEndpointOfParent = val; }
-bool TrackInformation::getVertexIsNotEndpointOfParent() const -{
+bool TrackInformation::getVertexIsNotEndpointOfParent() const {
return _vertexIsNotEndpointOfParent; }
-void TrackInformation::setBackscatter(bool val) -{
+void TrackInformation::setBackscatter(bool val) {
_backscatter = val; }
-bool TrackInformation::getBackscatter() const -{
+bool TrackInformation::getBackscatter() const {
return _backscatter; }
-void TrackInformation::setBelowThreshold(bool val) -{
+void TrackInformation::setBelowThreshold(bool val) {
_belowThreshold = val; }
-bool TrackInformation::getBelowThreshold() const -{
+bool TrackInformation::getBelowThreshold() const {
return _belowThreshold; }
-TrackInformation* TrackInformation::getTrackInformation(const G4Track* aTrack) -{
+TrackInformation* TrackInformation::getTrackInformation(const G4Track* aTrack) {
return static_cast<TrackInformation*>(aTrack->GetUserInformation()); }
-TrackInformation* TrackInformation::getTrackInformation(const G4Step* aStep) -{
+TrackInformation* TrackInformation::getTrackInformation(const G4Step* aStep) {
return getTrackInformation(aStep->GetTrack()); }
diff -u -r1.6 -r1.7 --- TrackerHit.cc 2 Oct 2013 02:05:22 -0000 1.6 +++ TrackerHit.cc 13 Nov 2013 23:02:57 -0000 1.7 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/hits/TrackerHit.cc,v 1.6 2013/10/02 02:05:22 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/hits/TrackerHit.cc,v 1.7 2013/11/13 23:02:57 jeremy Exp $
// LCDD #include "lcdd/hits/TrackerHit.hh"
@@ -15,12 +15,10 @@
G4Allocator<TrackerHit> G4TrackerHitAllocator; TrackerHit::TrackerHit() :
- G4VHit(), _edep(0), _tdep(0), _trkID(-1), _length(0) -{
+ G4VHit(), _edep(0), _tdep(0), _trkID(-1), _length(0) {
}
-TrackerHit::~TrackerHit() -{
+TrackerHit::~TrackerHit() {
} #ifdef G4VIS_USE
@@ -43,93 +41,76 @@
} #endif
-void TrackerHit::Print() -{
+void TrackerHit::Print() {
std::cout << *this << std::endl; }
-std::ostream& operator<<(std::ostream &os, const TrackerHit& hit) -{ - std::cout << hit.getTrackID() << " " << hit.getPosition() << " " << G4BestUnit(hit.getEdep(), "Energy") << " " << hit.getMomentum() << " " << G4BestUnit(hit.getLength(), "Length") << " " << G4BestUnit(hit.getTdep(), "Time") << " " << hit.getPDG() << " " << std::endl;
+std::ostream& operator<<(std::ostream &os, const TrackerHit& hit) { + std::cout << hit.getTrackID() << " " << hit.getPosition() << " " << G4BestUnit(hit.getEdep(), "Energy") << " " << hit.getMomentum() << " " + << G4BestUnit(hit.getLength(), "Length") << " " << G4BestUnit(hit.getTdep(), "Time") << " " << hit.getPDG() << " " << std::endl;
return os; }
-void TrackerHit::setTdep(const G4double tdep) -{
+void TrackerHit::setTdep(const G4double tdep) {
_tdep = tdep; }
-void TrackerHit::setEdep(const G4double edep) -{
+void TrackerHit::setEdep(const G4double edep) {
_edep = edep; }
-void TrackerHit::setPosition(const G4ThreeVector& posXYZ) -{
+void TrackerHit::setPosition(const G4ThreeVector& posXYZ) {
_pos = posXYZ; }
-void TrackerHit::setMomentum(const G4ThreeVector& mom) -{
+void TrackerHit::setMomentum(const G4ThreeVector& mom) {
_mom = mom; }
-void TrackerHit::setTrackID(const G4int trkID) -{
+void TrackerHit::setTrackID(const G4int trkID) {
_trkID = trkID; }
-void TrackerHit::setPDG(const G4int pdg) -{
+void TrackerHit::setPDG(const G4int pdg) {
_PDG = pdg; }
-void TrackerHit::setLength(const G4double l) -{
+void TrackerHit::setLength(const G4double l) {
_length = l; }
-G4double TrackerHit::getTdep() const -{
+G4double TrackerHit::getTdep() const {
return _tdep; }
-G4double TrackerHit::getEdep() const -{
+G4double TrackerHit::getEdep() const {
return _edep; }
-G4ThreeVector TrackerHit::getPosition() const -{
+G4ThreeVector TrackerHit::getPosition() const {
return _pos; }
-G4ThreeVector TrackerHit::getMomentum() const -{
+G4ThreeVector TrackerHit::getMomentum() const {
return _mom; }
-G4int TrackerHit::getTrackID() const -{
+G4int TrackerHit::getTrackID() const {
return _trkID; }
-G4int TrackerHit::getPDG() const -{
+G4int TrackerHit::getPDG() const {
return _PDG; }
-G4double TrackerHit::getLength() const -{
+G4double TrackerHit::getLength() const {
return _length; }
-void TrackerHit::setId(Id64bit::ElementType id1) -{
+void TrackerHit::setId(Id64bit::ElementType id1) {
_id.setId1(id1); }
-int TrackerHit::getId() -{
+int TrackerHit::getId() {
return _id.getId1(); }
diff -u -r1.2 -r1.3 --- Id64bit.cc 14 Sep 2013 02:06:35 -0000 1.2 +++ Id64bit.cc 13 Nov 2013 23:02:57 -0000 1.3 @@ -1,76 +1,64 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/id/Id64bit.cc,v 1.2 2013/09/14 02:06:35 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/id/Id64bit.cc,v 1.3 2013/11/13 23:02:57 jeremy Exp $
#include "lcdd/id/Id64bit.hh" #include <iostream>
-Id64bit::Id64bit() - : _value(0) -{ - _ids[0] = 0; - _ids[1] = 0; - encode();
+Id64bit::Id64bit() : + _value(0) { + _ids[0] = 0; + _ids[1] = 0; + encode();
}
-Id64bit::Id64bit(ElementType id0, ElementType id1) - : _value(0) -{ - _ids[0] = id0; - _ids[1] = id1; - encode();
+Id64bit::Id64bit(ElementType id0, ElementType id1) : + _value(0) { + _ids[0] = id0; + _ids[1] = id1; + encode();
}
-Id64bit::Id64bit(const Id64bit &right) - : _value(0) -{ - _ids[0] = right._ids[0]; - _ids[1] = right._ids[1]; - encode();
+Id64bit::Id64bit(const Id64bit &right) : + _value(0) { + _ids[0] = right._ids[0]; + _ids[1] = right._ids[1]; + encode();
}
-Id64bit::~Id64bit() -{
+Id64bit::~Id64bit() {
}
-void Id64bit::setId0(ElementType id0) -{
+void Id64bit::setId0(ElementType id0) {
_ids[0] = id0; }
-void Id64bit::setId1(ElementType id1) -{
+void Id64bit::setId1(ElementType id1) {
_ids[1] = id1; }
-Id64bit::ElementType Id64bit::getId0() const -{
+Id64bit::ElementType Id64bit::getId0() const {
return _ids[0]; }
- -Id64bit::ElementType Id64bit::getId1() const -{
+Id64bit::ElementType Id64bit::getId1() const {
return _ids[1]; }
-bool Id64bit::operator==(const Id64bit& right) const -{
+bool Id64bit::operator==(const Id64bit& right) const {
return (_ids[0] == right._ids[0] && _ids[1] == right._ids[1]); }
-void Id64bit::encode() -{ - // Encode the first 32 bits contained in id0. - _value |= _ids[0];
+void Id64bit::encode() { + // Encode the first 32 bits contained in id0. + _value |= _ids[0];
- // Create value for second int in id1. - ValueType id1 = _ids[1];
+ // Create value for second int in id1. + ValueType id1 = _ids[1];
- // Encode id1 into second 32 bits. - _value |= (id1 << 32);
+ // Encode id1 into second 32 bits. + _value |= (id1 << 32);
}
-Id64bit::ValueType Id64bit::getValue() const -{ - return _value;
+Id64bit::ValueType Id64bit::getValue() const { + return _value;
}
diff -u -r1.1 -r1.2 --- IdComparator.cc 10 Jul 2013 20:49:06 -0000 1.1 +++ IdComparator.cc 13 Nov 2013 23:02:57 -0000 1.2 @@ -1,17 +1,14 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/id/IdComparator.cc,v 1.1 2013/07/10 20:49:06 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/id/IdComparator.cc,v 1.2 2013/11/13 23:02:57 jeremy Exp $
// LCDD #include "lcdd/id/IdComparator.hh"
-IdComparator::IdComparator() -{
+IdComparator::IdComparator() {
}
-IdComparator::~IdComparator() -{
+IdComparator::~IdComparator() {
}
-bool IdComparator::compare(const CalorimeterHit& hit1, const CalorimeterHit& hit2) const -{
+bool IdComparator::compare(const CalorimeterHit& hit1, const CalorimeterHit& hit2) const {
return (hit1.getId64bit() == hit2.getId64bit()); }
diff -u -r1.5 -r1.6 --- IdFactory.cc 14 Sep 2013 02:06:35 -0000 1.5 +++ IdFactory.cc 13 Nov 2013 23:02:57 -0000 1.6 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/id/IdFactory.cc,v 1.5 2013/09/14 02:06:35 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/id/IdFactory.cc,v 1.6 2013/11/13 23:02:57 jeremy Exp $
// Uncomment to enable verbose debug output from this class. //#define ID_DEBUG 1
@@ -20,18 +20,17 @@
IdFactory::Bits const IdFactory::MASK_ON = 0xFFFFFFFF;
-Id64bit IdFactory::createIdentifier(const IdVec& idVec, IdSpec* idSpec) -{ -/* -#ifdef ID_DEBUG - G4cout << G4endl; - G4cout.setf( ios::hex ); - G4cout << "IdFactory::createId64bit()" << G4endl; - G4cout << "idvec size: " << idVec.size() << G4endl; - G4cout << "idspec numFields: " << idSpec->getNumFields() << G4endl; - G4cout << "idspec bitLength: " << idSpec->getBitLength() << G4endl; -#endif -*/
+Id64bit IdFactory::createIdentifier(const IdVec& idVec, IdSpec* idSpec) { + /* + #ifdef ID_DEBUG + G4cout << G4endl; + G4cout.setf( ios::hex ); + G4cout << "IdFactory::createId64bit()" << G4endl; + G4cout << "idvec size: " << idVec.size() << G4endl; + G4cout << "idspec numFields: " << idSpec->getNumFields() << G4endl; + G4cout << "idspec bitLength: " << idSpec->getBitLength() << G4endl; + #endif + */
/* IdVec (expanded id) size must equal IdSpec size or die. */ if (idVec.size() != idSpec->getNumFields()) {
@@ -39,7 +38,7 @@
} /* A 2 member array for cell ids 1 & 2 (2x32-bit int). */
- Bits values[2] = {0, 0};
+ Bits values[2] = { 0, 0 };
size_t valueIndex = 0; /* Ptr to value of current idx. */
@@ -78,38 +77,38 @@
if ((fieldStart < 32) && (fieldStart + fieldLength > 32)) { G4cerr << "Field <" << field->getLabel() << "> crosses the 32-bit boundary." << G4endl; G4Exception("", "", FatalException, "Fields are not allowed to cross the 32-bit boundary.");
- /* Check if on 2nd int. */
+ /* Check if on 2nd int. */
} else if (fieldStart >= 32) { /* If 1st time, set id val pntr. */ if (!nextId) { #ifdef ID_DEBUG
- G4cout << "setting ptr to next id" << G4endl;
+ G4cout << "setting ptr to next id" << G4endl;
#endif
- ++valueIndex; - valueP = &values[valueIndex]; - nextId = true; - } - - /* Adjust start idx for position in next 32-bit id. */ - fieldStart -= 32;
+ ++valueIndex; + valueP = &values[valueIndex]; + nextId = true;
}
+ /* Adjust start idx for position in next 32-bit id. */ + fieldStart -= 32; + } +
Bits mask = makeBitMask(fieldLength);
-/* -#ifdef ID_DEBUG - G4cout << "idspec_idx: " << dec << idspec_idx << G4endl; - G4cout << "shifting left: " << dec << fieldLength << G4endl; - G4cout << "curr_bit: " << dec << curr_bit << G4endl; - G4cout << "field_label: " << field->getLabel() << G4endl; - G4cout << "field_start: " << fieldStart << G4endl; - G4cout << "field_val (dec): " << dec << field_val << G4endl; - G4cout << "field_val (hex): " << hex << field_val << G4endl; - G4cout << "field_bit_len: " << dec << fieldLength << G4endl; - G4cout << "field_mask: " << hex << mask << G4endl; -#endif -*/
+ /* + #ifdef ID_DEBUG + G4cout << "idspec_idx: " << dec << idspec_idx << G4endl; + G4cout << "shifting left: " << dec << fieldLength << G4endl; + G4cout << "curr_bit: " << dec << curr_bit << G4endl; + G4cout << "field_label: " << field->getLabel() << G4endl; + G4cout << "field_start: " << fieldStart << G4endl; + G4cout << "field_val (dec): " << dec << field_val << G4endl; + G4cout << "field_val (hex): " << hex << field_val << G4endl; + G4cout << "field_bit_len: " << dec << fieldLength << G4endl; + G4cout << "field_mask: " << hex << mask << G4endl; + #endif + */
/* For positive values, check that this value doesn't overflow the assigned length. */ // if ( field_val > 0 ) {
@@ -117,17 +116,17 @@
G4cerr << "Value <" << field_val << "> is too big for the field <" << field->getLabel() << ">, len <" << fieldLength << ">." << G4endl; G4Exception("", "", FatalException, "Value too large for field."); }
- // } - // else { - // } - -/* -#ifdef ID_DEBUG - G4cout << "field_mask: " << hex << mask << G4endl; -#endif -*/
+ // } + // else { + // } + + /* + #ifdef ID_DEBUG + G4cout << "field_mask: " << hex << mask << G4endl; + #endif + */
- /* Apply bit mask and shift to proper left pos. */
+ /* Apply bit mask and shift to proper left pos. */
Bits field_val_shifted_masked = (field_val & mask) << fieldStart; /* AND into the current id val. */
@@ -167,13 +166,11 @@
return id; }
-inline IdFactory::Bits IdFactory::makeBitMask(IdField::SizeType len) -{
+inline IdFactory::Bits IdFactory::makeBitMask(IdField::SizeType len) {
return (Bits) ((1 << len) - 1); }
-inline IdFactory::Bits IdFactory::checkOverflow(Id64bit::ElementType val, Bits mask) -{
+inline IdFactory::Bits IdFactory::checkOverflow(Id64bit::ElementType val, Bits mask) {
Bits xbits = 0x0; /* get flipped mask of all 1's in positions that should be masked off for this val */
@@ -200,8 +197,7 @@
return xbits; }
-IdVec IdFactory::createOrderedIdVec(G4Step* aStep, const SensitiveDetector* sd) -{
+IdVec IdFactory::createOrderedIdVec(G4Step* aStep, const SensitiveDetector* sd) {
//std::cout << "createOrderedIdVec" << std::endl; assert(aStep);
@@ -288,8 +284,7 @@
return ids; }
-int IdFactory::findFieldIdxInSegmentation(Segmentation* seg, const std::string& field_name) -{
+int IdFactory::findFieldIdxInSegmentation(Segmentation* seg, const std::string& field_name) {
const std::vector<std::string>& bin_names = seg->getBinNames(); int bin_count = 0;
@@ -309,8 +304,7 @@
return bin_count; }
-int IdFactory::findIdInPhysVols(const std::vector<G4VPhysicalVolume*>& pvs, const std::string& field_name) -{
+int IdFactory::findIdInPhysVols(const std::vector<G4VPhysicalVolume*>& pvs, const std::string& field_name) {
IdManager* id_mgr = IdManager::instance(); #ifdef ID_DEBUG
@@ -360,8 +354,7 @@
return id; }
-bool IdFactory::hasPhysVolId(const std::vector<G4VPhysicalVolume*>& pvs, const std::string& field_name) -{
+bool IdFactory::hasPhysVolId(const std::vector<G4VPhysicalVolume*>& pvs, const std::string& field_name) {
IdManager* id_mgr = IdManager::instance(); G4VPhysicalVolume* pv = 0;
diff -u -r1.3 -r1.4 --- IdField.cc 10 Jul 2013 22:01:21 -0000 1.3 +++ IdField.cc 13 Nov 2013 23:02:57 -0000 1.4 @@ -1,58 +1,46 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/id/IdField.cc,v 1.3 2013/07/10 22:01:21 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/id/IdField.cc,v 1.4 2013/11/13 23:02:57 jeremy Exp $
// LCDD #include "lcdd/id/IdField.hh"
-IdField::IdField() -{
+IdField::IdField() {
}
-IdField::~IdField() -{
+IdField::~IdField() {
} IdField::IdField(const std::string& label, SizeType start, SizeType length, bool isSigned) :
- _label(label), _start(start), _length(length), _isSigned(isSigned) -{
+ _label(label), _start(start), _length(length), _isSigned(isSigned) {
}
-void IdField::setLabel(const std::string& l) -{
+void IdField::setLabel(const std::string& l) {
_label = l; }
-void IdField::setStart(SizeType st) -{
+void IdField::setStart(SizeType st) {
_start = st; }
-void IdField::setLength(SizeType st) -{
+void IdField::setLength(SizeType st) {
_length = st; }
-void IdField::setSigned(bool s) -{
+void IdField::setSigned(bool s) {
_isSigned = s; }
-const std::string& IdField::getLabel() -{
+const std::string& IdField::getLabel() {
return _label; }
-IdField::SizeType IdField::getStart() -{
+IdField::SizeType IdField::getStart() {
return _start; }
- -IdField::SizeType IdField::getLength() -{
+IdField::SizeType IdField::getLength() {
return _length; }
-bool IdField::getSigned() -{
+bool IdField::getSigned() {
return _isSigned; }
diff -u -r1.1 -r1.2 --- IdFieldProcess.cc 26 Jun 2013 23:51:01 -0000 1.1 +++ IdFieldProcess.cc 13 Nov 2013 23:02:57 -0000 1.2 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/id/IdFieldProcess.cc,v 1.1 2013/06/26 23:51:01 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/id/IdFieldProcess.cc,v 1.2 2013/11/13 23:02:57 jeremy Exp $
// GDML #include "Saxana/ProcessingConfigurator.h"
@@ -19,26 +19,21 @@
@class idfieldProcess @brief SAX process to create the idfield element. */
-class idfieldProcess: public SAXStateProcess -{
+class idfieldProcess: public SAXStateProcess {
public: idfieldProcess(const ProcessingContext* context = 0) :
- SAXStateProcess(context), m_obj(0) - {
+ SAXStateProcess(context), m_obj(0) {
}
- virtual ~idfieldProcess() - {
+ virtual ~idfieldProcess() {
}
- virtual const SAXComponentObject* Build() const - {
+ virtual const SAXComponentObject* Build() const {
return this; }
- virtual void StartElement(const std::string&, const ASCIIAttributeList& attrs) - {
+ virtual void StartElement(const std::string&, const ASCIIAttributeList& attrs) {
SAXObject** obj = Context()->GetTopObject(); idfieldElem* idfield = new idfieldElem;
@@ -51,20 +46,16 @@
m_obj = idfield; *obj = idfield; }
- virtual void EndElement(const std::string&) - {
+ virtual void EndElement(const std::string&) {
}
- virtual void Characters(const std::string&) - {
+ virtual void Characters(const std::string&) {
}
- virtual void StackPopNotify(const std::string&) - {
+ virtual void StackPopNotify(const std::string&) {
}
- virtual const std::string& State() const - {
+ virtual const std::string& State() const {
static std::string tag = "idfield"; return tag; }
diff -u -r1.5 -r1.6 --- IdManager.cc 10 Jul 2013 22:39:27 -0000 1.5 +++ IdManager.cc 13 Nov 2013 23:02:57 -0000 1.6 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/id/IdManager.cc,v 1.5 2013/07/10 22:39:27 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/id/IdManager.cc,v 1.6 2013/11/13 23:02:57 jeremy Exp $
// LCDD #include "lcdd/id/IdManager.hh"
@@ -8,16 +8,13 @@
IdManager* IdManager::_instance = 0;
-IdManager::IdManager() -{
+IdManager::IdManager() {
}
-IdManager::~IdManager() -{
+IdManager::~IdManager() {
}
-IdManager* IdManager::instance() -{
+IdManager* IdManager::instance() {
if (_instance == 0) { _instance = new IdManager; }
@@ -25,34 +22,28 @@
return _instance; }
-void IdManager::addIdSpec(const std::string& name, IdSpec* spec) -{
+void IdManager::addIdSpec(const std::string& name, IdSpec* spec) {
_idSpecs[name] = spec; }
-IdSpec* IdManager::getIdSpec(const char* name) -{
+IdSpec* IdManager::getIdSpec(const char* name) {
std::string key = name; return getIdSpec(key); }
-IdSpec* IdManager::getIdSpec(const std::string& name) -{
+IdSpec* IdManager::getIdSpec(const std::string& name) {
return _idSpecs[name]; }
-IdManager::IdSpecs::const_iterator IdManager::getIdSpecsBegin() -{
+IdManager::IdSpecs::const_iterator IdManager::getIdSpecsBegin() {
return _idSpecs.begin(); }
-IdManager::IdSpecs::const_iterator IdManager::getIdSpecsEnd() -{
+IdManager::IdSpecs::const_iterator IdManager::getIdSpecsEnd() {
return _idSpecs.end(); }
-void IdManager::addPhysVolId(G4LogicalVolume* lvMom, int childIdx, PhysVolId childId) -{
+void IdManager::addPhysVolId(G4LogicalVolume* lvMom, int childIdx, PhysVolId childId) {
// DEBUG //std::cout << std::endl << "assigning physvolid..." << std::endl; //std::cout << "lvMom <" << lvMom->GetName() << ">" << std::endl;
@@ -76,8 +67,7 @@
//std::cout << std::endl; }
-void IdManager::printIds(std::ostream& os, const IdVec& ids) -{
+void IdManager::printIds(std::ostream& os, const IdVec& ids) {
os << "id stack:"; for (std::vector<int>::const_iterator iter = ids.getFieldsBegin(); iter != ids.getFieldsEnd(); iter++) {
@@ -87,22 +77,18 @@
os << std::endl; }
-bool IdManager::hasPhysVolIds(G4VPhysicalVolume* pv) const -{ - return _physVolIdMap.hasPhysVolIds(pv);
+bool IdManager::hasPhysVolIds(G4VPhysicalVolume* pv) const { + return _physVolIdMap.hasPhysVolIds(pv);
}
-const PhysVolIdMap& IdManager::getPhysVolIdMap() const -{ - return _physVolIdMap;
+const PhysVolIdMap& IdManager::getPhysVolIdMap() const { + return _physVolIdMap;
}
-PhysVolId::PhysVolIds& IdManager::getPhysVolIds(G4VPhysicalVolume* pv) -{
+PhysVolId::PhysVolIds& IdManager::getPhysVolIds(G4VPhysicalVolume* pv) {
return _physVolIdMap.getPhysVolIds(pv); }
-const IdManager::IdSpecs* IdManager::getIdSpecStore() -{
+const IdManager::IdSpecs* IdManager::getIdSpecStore() {
return &_idSpecs; }
diff -u -r1.4 -r1.5 --- IdSpec.cc 10 Jul 2013 22:01:21 -0000 1.4 +++ IdSpec.cc 13 Nov 2013 23:02:57 -0000 1.5 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/id/IdSpec.cc,v 1.4 2013/07/10 22:01:21 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/id/IdSpec.cc,v 1.5 2013/11/13 23:02:57 jeremy Exp $
// LCDD #include "lcdd/id/IdSpec.hh"
@@ -8,49 +8,38 @@
using namespace std;
-IdSpec::IdSpec() -{
+IdSpec::IdSpec() {
}
-IdSpec::~IdSpec() -{
+IdSpec::~IdSpec() {
deleteIdFields(); }
-void IdSpec::setName(const std::string& n) -{
+void IdSpec::setName(const std::string& n) {
_name = n; }
-void IdSpec::setBitLength(SizeType st) -{
+void IdSpec::setBitLength(SizeType st) {
_bitLength = st; }
-IdSpec::SizeType IdSpec::getBitLength() const -{
+IdSpec::SizeType IdSpec::getBitLength() const {
return _bitLength; }
- -const std::string& IdSpec::getName() const -{
+const std::string& IdSpec::getName() const {
return _name; }
-IdSpec::SizeType IdSpec::getNumFields() const -{
+IdSpec::SizeType IdSpec::getNumFields() const {
return _idFields.size(); }
- -void IdSpec::addIdField(IdField* f) -{
+void IdSpec::addIdField(IdField* f) {
_idFields.push_back(f); }
-IdField* IdSpec::getIdField(const std::string& n) const -{
+IdField* IdSpec::getIdField(const std::string& n) const {
IdField* f = 0; for (IdFields::const_iterator iter = IdFieldsBegin(); iter != IdFieldsEnd(); iter++) { if (n == (*iter)->getLabel()) {
@@ -61,33 +50,27 @@
return f; }
-IdField* IdSpec::getIdField(SizeType st) const -{
+IdField* IdSpec::getIdField(SizeType st) const {
return _idFields[st]; }
-const IdSpec::IdFields& IdSpec::getIdFields() const -{
+const IdSpec::IdFields& IdSpec::getIdFields() const {
return _idFields; }
-IdSpec::IdFields::const_iterator IdSpec::IdFieldsBegin() const -{
+IdSpec::IdFields::const_iterator IdSpec::IdFieldsBegin() const {
return _idFields.begin(); }
-IdSpec::IdFields::const_iterator IdSpec::IdFieldsEnd() const -{
+IdSpec::IdFields::const_iterator IdSpec::IdFieldsEnd() const {
return _idFields.end(); }
-void IdSpec::clear() -{
+void IdSpec::clear() {
_idFields.clear(); }
-void IdSpec::deleteIdFields() -{
+void IdSpec::deleteIdFields() {
if (_idFields.size() > 0) { for (IdFields::iterator iter = _idFields.begin(); iter != _idFields.end(); iter++) { delete *iter;
@@ -96,8 +79,7 @@
} }
-void IdSpec::printOut(std::ostream& os) const -{
+void IdSpec::printOut(std::ostream& os) const {
os << std::endl; os << "IdSpec: " << _name << std::endl;
@@ -154,8 +136,7 @@
os << std::endl; }
-std::string IdSpec::getFieldDescription() -{
+std::string IdSpec::getFieldDescription() {
std::stringstream enc; // Loop over the fields in the IdSpec.
diff -u -r1.2 -r1.3 --- IdVec.cc 3 Jul 2013 23:00:46 -0000 1.2 +++ IdVec.cc 13 Nov 2013 23:02:57 -0000 1.3 @@ -1,52 +1,42 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/id/IdVec.cc,v 1.2 2013/07/03 23:00:46 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/id/IdVec.cc,v 1.3 2013/11/13 23:02:57 jeremy Exp $
// LCDD #include "lcdd/id/IdVec.hh"
-IdVec::IdVec() -{
+IdVec::IdVec() {
}
-IdVec::~IdVec() -{
+IdVec::~IdVec() {
}
-void IdVec::clear() -{
+void IdVec::clear() {
_fields.clear(); }
-void IdVec::addFieldValue(ElementType et) -{
+void IdVec::addFieldValue(ElementType et) {
_fields.push_back(et); }
-IdVec::ElementType IdVec::getFieldValue(SizeType idx) const -{
+IdVec::ElementType IdVec::getFieldValue(SizeType idx) const {
return _fields.at(idx); }
-void IdVec::setFieldValue(SizeType idx, ElementType et) -{
+void IdVec::setFieldValue(SizeType idx, ElementType et) {
_fields.insert(_fields.begin() + idx, et); }
-IdVec::ElementType IdVec::operator [](SizeType idx) const -{
+IdVec::ElementType IdVec::operator [](SizeType idx) const {
return getFieldValue(idx); }
-IdVec::ElementVector::const_iterator IdVec::getFieldsBegin() const -{
+IdVec::ElementVector::const_iterator IdVec::getFieldsBegin() const {
return _fields.begin(); }
-IdVec::ElementVector::const_iterator IdVec::getFieldsEnd() const -{
+IdVec::ElementVector::const_iterator IdVec::getFieldsEnd() const {
return _fields.end(); }
-IdVec::SizeType IdVec::size() const -{
+IdVec::SizeType IdVec::size() const {
return _fields.size(); }
diff -u -r1.1 -r1.2 --- authorProcess.cc 27 Jun 2013 00:05:57 -0000 1.1 +++ authorProcess.cc 13 Nov 2013 23:02:57 -0000 1.2 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/processes/authorProcess.cc,v 1.1 2013/06/27 00:05:57 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/processes/authorProcess.cc,v 1.2 2013/11/13 23:02:57 jeremy Exp $
// LCDD #include "lcdd/schema/author.hh"
@@ -18,27 +18,22 @@
/** * @brief SAX process for author element. */
-class authorProcess: public SAXStateProcess -{
+class authorProcess: public SAXStateProcess {
public: authorProcess(const ProcessingContext* context = 0) :
- SAXStateProcess(context), m_obj(0) - {
+ SAXStateProcess(context), m_obj(0) {
}
- virtual ~authorProcess() - {
+ virtual ~authorProcess() {
}
- virtual const SAXComponentObject* Build() const - {
+ virtual const SAXComponentObject* Build() const {
return this; }
- virtual void StartElement(const std::string&, const ASCIIAttributeList& attrs) - {
+ virtual void StartElement(const std::string&, const ASCIIAttributeList& attrs) {
//std::cout << "authorProcess::StartElement" << std::endl; SAXObject** obj = Context()->GetTopObject();
@@ -52,20 +47,16 @@
*obj = a; }
- virtual void EndElement(const std::string&) - {
+ virtual void EndElement(const std::string&) {
}
- virtual void Characters(const std::string&) - {
+ virtual void Characters(const std::string&) {
}
- virtual void StackPopNotify(const std::string&) - {
+ virtual void StackPopNotify(const std::string&) {
}
- virtual const std::string& State() const - {
+ virtual const std::string& State() const {
static std::string tag = "author"; return tag; }
diff -u -r1.3 -r1.4 --- box_dipoleProcess.cc 3 Jul 2013 23:33:51 -0000 1.3 +++ box_dipoleProcess.cc 13 Nov 2013 23:02:57 -0000 1.4 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/processes/box_dipoleProcess.cc,v 1.3 2013/07/03 23:33:51 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/processes/box_dipoleProcess.cc,v 1.4 2013/11/13 23:02:57 jeremy Exp $
// GDML #include "Saxana/ProcessingConfigurator.h"
@@ -19,21 +19,17 @@
/** * @brief SAX process for box_dipole element. */
-class box_dipoleProcess: public FieldTypeProcess -{
+class box_dipoleProcess: public FieldTypeProcess {
public: box_dipoleProcess(const ProcessingContext* context = 0) :
- FieldTypeProcess(context) - {
+ FieldTypeProcess(context) {
}
- virtual ~box_dipoleProcess() - {
+ virtual ~box_dipoleProcess() {
}
- void StartElement(const std::string& name, const ASCIIAttributeList& attrs) - {
+ void StartElement(const std::string& name, const ASCIIAttributeList& attrs) {
SAXObject** obj = Context()->GetTopObject(); box_dipole* x = new box_dipole;
@@ -54,20 +50,16 @@
FieldTypeProcess::StartElement(name, attrs); }
- void EndElement(const std::string&) - {
+ void EndElement(const std::string&) {
}
- void Characters(const std::string&) - {
+ void Characters(const std::string&) {
}
- void StackPopNotify(const std::string&) - {
+ void StackPopNotify(const std::string&) {
}
- const std::string& State() const - {
+ const std::string& State() const {
static std::string tag = "box_dipole"; return tag; }
diff -u -r1.2 -r1.3 --- calorimeterProcess.cc 3 Jul 2013 23:33:51 -0000 1.2 +++ calorimeterProcess.cc 13 Nov 2013 23:02:57 -0000 1.3 @@ -1,19 +1,16 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/processes/calorimeterProcess.cc,v 1.2 2013/07/03 23:33:51 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/processes/calorimeterProcess.cc,v 1.3 2013/11/13 23:02:57 jeremy Exp $
// LCDD #include "lcdd/processes/calorimeterProcess.hh" calorimeterProcess::calorimeterProcess(const ProcessingContext* context) :
- SensitiveDetectorTypeProcess(context) -{
+ SensitiveDetectorTypeProcess(context) {
}
-calorimeterProcess::~calorimeterProcess() -{
+calorimeterProcess::~calorimeterProcess() {
}
-void calorimeterProcess::StartElement(const std::string& name, const ASCIIAttributeList& attrs) -{
+void calorimeterProcess::StartElement(const std::string& name, const ASCIIAttributeList& attrs) {
SAXObject** obj = Context()->GetTopObject(); calorimeter* cal = new calorimeter;
@@ -26,21 +23,17 @@
SensitiveDetectorTypeProcess::StartElement(name, attrs); }
-void calorimeterProcess::EndElement(const std::string&) -{
+void calorimeterProcess::EndElement(const std::string&) {
}
-void calorimeterProcess::Characters(const std::string&) -{
+void calorimeterProcess::Characters(const std::string&) {
}
-void calorimeterProcess::StackPopNotify(const std::string& name) -{
+void calorimeterProcess::StackPopNotify(const std::string& name) {
SensitiveDetectorTypeProcess::StackPopNotify(name); }
-const std::string& calorimeterProcess::State() const -{
+const std::string& calorimeterProcess::State() const {
static std::string tag = "calorimeter"; return tag; }
diff -u -r1.2 -r1.3 --- cell_readout_2dProcess.cc 1 Jul 2013 22:10:34 -0000 1.2 +++ cell_readout_2dProcess.cc 13 Nov 2013 23:02:57 -0000 1.3 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/processes/cell_readout_2dProcess.cc,v 1.2 2013/07/01 22:10:34 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/processes/cell_readout_2dProcess.cc,v 1.3 2013/11/13 23:02:57 jeremy Exp $
// GDML #include "Saxana/ProcessingConfigurator.h"
@@ -18,27 +18,22 @@
/** * @brief The SAX process for cell_readout_2d elements. */
-class cell_readout_2dProcess: public SAXStateProcess -{
+class cell_readout_2dProcess: public SAXStateProcess {
public: cell_readout_2dProcess(const ProcessingContext* context = 0) :
- SAXStateProcess(context), m_obj(0) - {
+ SAXStateProcess(context), m_obj(0) {
}
- virtual ~cell_readout_2dProcess() - {
+ virtual ~cell_readout_2dProcess() {
}
- virtual const SAXComponentObject* Build() const - {
+ virtual const SAXComponentObject* Build() const {
return this; }
- virtual void StartElement(const std::string& name, const ASCIIAttributeList& attrs) - {
+ virtual void StartElement(const std::string& name, const ASCIIAttributeList& attrs) {
std::cout << "cell_readout_2dProcess::StartElement: " << name << std::endl; SAXObject** obj = Context()->GetTopObject();
@@ -54,20 +49,16 @@
*obj = np; }
- virtual void EndElement(const std::string&) - {
+ virtual void EndElement(const std::string&) {
}
- virtual void Characters(const std::string&) - {
+ virtual void Characters(const std::string&) {
}
- virtual void StackPopNotify(const std::string&) - {
+ virtual void StackPopNotify(const std::string&) {
}
- virtual const std::string& State() const - {
+ virtual const std::string& State() const {
static std::string tag = "cell_readout_2d"; return tag; }
diff -u -r1.1 -r1.2 --- colorProcess.cc 27 Jun 2013 00:05:57 -0000 1.1 +++ colorProcess.cc 13 Nov 2013 23:02:57 -0000 1.2 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/processes/colorProcess.cc,v 1.1 2013/06/27 00:05:57 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/processes/colorProcess.cc,v 1.2 2013/11/13 23:02:57 jeremy Exp $
// LCDD #include "lcdd/schema/color.hh"
@@ -19,26 +19,21 @@
@class colorProcess @brief SAX process for color element. */
-class colorProcess: public SAXStateProcess -{
+class colorProcess: public SAXStateProcess {
public: colorProcess(const ProcessingContext* context = 0) :
- SAXStateProcess(context), m_obj(0) - {
+ SAXStateProcess(context), m_obj(0) {
}
- virtual ~colorProcess() - {
+ virtual ~colorProcess() {
}
- virtual const SAXComponentObject* Build() const - {
+ virtual const SAXComponentObject* Build() const {
return this; }
- virtual void StartElement(const std::string&, const ASCIIAttributeList& attrs) - {
+ virtual void StartElement(const std::string&, const ASCIIAttributeList& attrs) {
//std::cout << "color::StartElement()" << std::endl; SAXObject** obj = Context()->GetTopObject();
@@ -54,20 +49,16 @@
*obj = c; }
- virtual void EndElement(const std::string&) - {
+ virtual void EndElement(const std::string&) {
}
- virtual void Characters(const std::string&) - {
+ virtual void Characters(const std::string&) {
}
- virtual void StackPopNotify(const std::string&) - {
+ virtual void StackPopNotify(const std::string&) {
}
- virtual const std::string& State() const - {
+ virtual const std::string& State() const {
static std::string tag = "color"; return tag; }
diff -u -r1.1 -r1.2 --- commentProcess.cc 27 Jun 2013 00:05:57 -0000 1.1 +++ commentProcess.cc 13 Nov 2013 23:02:57 -0000 1.2 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/processes/commentProcess.cc,v 1.1 2013/06/27 00:05:57 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/processes/commentProcess.cc,v 1.2 2013/11/13 23:02:57 jeremy Exp $
// GDML #include "Saxana/ProcessingConfigurator.h"
@@ -19,24 +19,19 @@
@class commentProcess @brief SAX process for comment element. */
-class commentProcess: public SAXStateProcess -{
+class commentProcess: public SAXStateProcess {
public: commentProcess(const ProcessingContext* context = 0) :
- SAXStateProcess(context), m_obj(0) - {
+ SAXStateProcess(context), m_obj(0) {
}
- virtual ~commentProcess() - {
+ virtual ~commentProcess() {
}
- virtual const SAXComponentObject* Build() const - {
+ virtual const SAXComponentObject* Build() const {
return this; }
- virtual void StartElement(const std::string&, const ASCIIAttributeList&) - {
+ virtual void StartElement(const std::string&, const ASCIIAttributeList&) {
//std::cout << "commentProcess::StartElement" << std::endl; SAXObject** obj = Context()->GetTopObject();
@@ -47,23 +42,19 @@
*obj = c; }
- virtual void EndElement(const std::string&) - {
+ virtual void EndElement(const std::string&) {
}
- virtual void Characters(const std::string& cdata) - {
+ virtual void Characters(const std::string& cdata) {
//std::cout << "commentProcess::Characters() - <" << cdata << ">" << std::endl; comment* c = dynamic_cast<comment*>(m_obj); c->set_comment(cdata); }
- virtual void StackPopNotify(const std::string&) - {
+ virtual void StackPopNotify(const std::string&) {
}
- virtual const std::string& State() const - {
+ virtual const std::string& State() const {
static std::string tag = "comment"; return tag; }
diff -u -r1.1 -r1.2 --- detectorProcess.cc 27 Jun 2013 00:05:57 -0000 1.1 +++ detectorProcess.cc 13 Nov 2013 23:02:57 -0000 1.2 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/processes/detectorProcess.cc,v 1.1 2013/06/27 00:05:57 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/processes/detectorProcess.cc,v 1.2 2013/11/13 23:02:57 jeremy Exp $
// LCDD #include "lcdd/schema/detector.hh"
@@ -18,25 +18,20 @@
/** * @brief SAX process for detector element. */
-class detectorProcess: public SAXStateProcess -{
+class detectorProcess: public SAXStateProcess {
public: detectorProcess(const ProcessingContext* context = 0) :
- SAXStateProcess(context), m_obj(0) - {
+ SAXStateProcess(context), m_obj(0) {
}
- virtual ~detectorProcess() - {
+ virtual ~detectorProcess() {
}
- virtual const SAXComponentObject* Build() const - {
+ virtual const SAXComponentObject* Build() const {
return this; }
- virtual void StartElement(const std::string&, const ASCIIAttributeList& attrs) - {
+ virtual void StartElement(const std::string&, const ASCIIAttributeList& attrs) {
SAXObject** obj = Context()->GetTopObject(); detector* d = new detector;
@@ -49,20 +44,16 @@
*obj = d; }
- virtual void EndElement(const std::string&) - {
+ virtual void EndElement(const std::string&) {
}
- virtual void Characters(const std::string&) - {
+ virtual void Characters(const std::string&) {
}
- virtual void StackPopNotify(const std::string&) - {
+ virtual void StackPopNotify(const std::string&) {
}
- virtual const std::string& State() const - {
+ virtual const std::string& State() const {
static std::string tag = "detector"; return tag; }
diff -u -r1.1 -r1.2 --- dipoleProcess.cc 27 Jun 2013 00:05:58 -0000 1.1 +++ dipoleProcess.cc 13 Nov 2013 23:02:57 -0000 1.2 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/processes/dipoleProcess.cc,v 1.1 2013/06/27 00:05:58 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/processes/dipoleProcess.cc,v 1.2 2013/11/13 23:02:57 jeremy Exp $
// LCDD #include "lcdd/schema/dipole.hh"
@@ -15,26 +15,21 @@
/** * @brief SAX process for the dipole element. */
-class dipoleProcess: public SAXStateProcess -{
+class dipoleProcess: public SAXStateProcess {
public: dipoleProcess(const ProcessingContext* context = 0) :
- SAXStateProcess(context), m_obj(0) - {
+ SAXStateProcess(context), m_obj(0) {
}
- virtual ~dipoleProcess() - {
+ virtual ~dipoleProcess() {
}
- virtual const SAXComponentObject* Build() const - {
+ virtual const SAXComponentObject* Build() const {
return this; }
- virtual void StartElement(const std::string&, const ASCIIAttributeList& attrs) - {
+ virtual void StartElement(const std::string&, const ASCIIAttributeList& attrs) {
SAXObject** obj = Context()->GetTopObject(); dipole* d = new dipole;
@@ -49,23 +44,19 @@
*obj = d; }
- virtual void EndElement(const std::string&) - {
+ virtual void EndElement(const std::string&) {
}
- virtual void Characters(const std::string&) - {
+ virtual void Characters(const std::string&) {
}
- virtual void StackPopNotify(const std::string& name) - {
+ virtual void StackPopNotify(const std::string& name) {
SAXObject** so = Context()->GetTopObject(); dipole* d = dynamic_cast<dipole*>(m_obj); d->add_content(name, *so); }
- virtual const std::string& State() const - {
+ virtual const std::string& State() const {
static std::string tag = "dipole"; return tag; }
diff -u -r1.1 -r1.2 --- dipole_coeffProcess.cc 27 Jun 2013 00:05:58 -0000 1.1 +++ dipole_coeffProcess.cc 13 Nov 2013 23:02:57 -0000 1.2 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/processes/dipole_coeffProcess.cc,v 1.1 2013/06/27 00:05:58 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/processes/dipole_coeffProcess.cc,v 1.2 2013/11/13 23:02:57 jeremy Exp $
// GDML #include "Saxana/ProcessingConfigurator.h"
@@ -19,26 +19,21 @@
* @class dipole_coeffProcess * @brief SAX process to create the dipole_coeff element. */
-class dipole_coeffProcess: public SAXStateProcess -{
+class dipole_coeffProcess: public SAXStateProcess {
public: dipole_coeffProcess(const ProcessingContext* context = 0) :
- SAXStateProcess(context), m_obj(0) - {
+ SAXStateProcess(context), m_obj(0) {
}
- virtual ~dipole_coeffProcess() - {
+ virtual ~dipole_coeffProcess() {
}
- virtual const SAXComponentObject* Build() const - {
+ virtual const SAXComponentObject* Build() const {
return this; }
- virtual void StartElement(const std::string&, const ASCIIAttributeList& attrs) - {
+ virtual void StartElement(const std::string&, const ASCIIAttributeList& attrs) {
SAXObject** obj = Context()->GetTopObject(); dipole_coeff* dpc = new dipole_coeff;
@@ -48,20 +43,16 @@
m_obj = dpc; *obj = dpc; }
- virtual void EndElement(const std::string&) - {
+ virtual void EndElement(const std::string&) {
}
- virtual void Characters(const std::string&) - {
+ virtual void Characters(const std::string&) {
}
- virtual void StackPopNotify(const std::string&) - {
+ virtual void StackPopNotify(const std::string&) {
}
- virtual const std::string& State() const - {
+ virtual const std::string& State() const {
static std::string tag = "dipole_coeff"; return tag; }
diff -u -r1.4 -r1.5 --- field_map_3dProcess.cc 4 Sep 2013 00:38:03 -0000 1.4 +++ field_map_3dProcess.cc 13 Nov 2013 23:02:57 -0000 1.5 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/processes/field_map_3dProcess.cc,v 1.4 2013/09/04 00:38:03 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/processes/field_map_3dProcess.cc,v 1.5 2013/11/13 23:02:57 jeremy Exp $
// LCDD #include "lcdd/processes/FieldMapTypeProcess.hh"
@@ -13,22 +13,18 @@
/** * @brief The SAX process for field_map_3d elements. */
-class field_map_3dProcess: public FieldMapTypeProcess -{
+class field_map_3dProcess: public FieldMapTypeProcess {
public: field_map_3dProcess(const ProcessingContext* context = 0) :
- FieldMapTypeProcess(context) - {
+ FieldMapTypeProcess(context) {
}
- virtual ~field_map_3dProcess() - {
+ virtual ~field_map_3dProcess() {
}
- virtual void StartElement(const std::string& name, const ASCIIAttributeList& attrs) - {
+ virtual void StartElement(const std::string& name, const ASCIIAttributeList& attrs) {
SAXObject** obj = Context()->GetTopObject(); // Create schema object.
@@ -48,22 +44,18 @@
FieldMapTypeProcess::StartElement(name, attrs); }
- virtual void EndElement(const std::string&) - {
+ virtual void EndElement(const std::string&) {
}
- virtual void Characters(const std::string&) - {
+ virtual void Characters(const std::string&) {
}
- virtual void StackPopNotify(const std::string& name) - {
+ virtual void StackPopNotify(const std::string& name) {
//std::cout << "field_map_3d::StackPopNotify" << std::endl; FieldMapTypeProcess::StackPopNotify(name); }
- virtual const std::string& State() const - {
+ virtual const std::string& State() const {
static std::string tag = "field_map_3d"; return tag; }
diff -u -r1.1 -r1.2 --- fieldrefProcess.cc 27 Jun 2013 00:05:58 -0000 1.1 +++ fieldrefProcess.cc 13 Nov 2013 23:02:57 -0000 1.2 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/processes/fieldrefProcess.cc,v 1.1 2013/06/27 00:05:58 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/processes/fieldrefProcess.cc,v 1.2 2013/11/13 23:02:57 jeremy Exp $
// GDML #include "Processes/ReferenceTypeProcess.h"
@@ -9,20 +9,16 @@
/** * @brief SAX process for fieldref element. */
-class fieldrefProcess: public ReferenceTypeProcess -{
+class fieldrefProcess: public ReferenceTypeProcess {
public: fieldrefProcess(const ProcessingContext* context = 0) :
- ReferenceTypeProcess(context) - {
+ ReferenceTypeProcess(context) {
}
- virtual ~fieldrefProcess() - {
+ virtual ~fieldrefProcess() {
}
- virtual void StartElement(const std::string& name, const ASCIIAttributeList& attrs) - {
+ virtual void StartElement(const std::string& name, const ASCIIAttributeList& attrs) {
SAXObject** obj = Context()->GetTopObject(); FieldType::fieldref* fref = new FieldType::fieldref;
@@ -33,13 +29,11 @@
ReferenceTypeProcess::StartElement(name, attrs); }
- virtual void EndElement(const std::string& name) - {
+ virtual void EndElement(const std::string& name) {
ReferenceTypeProcess::EndElement(name); }
- virtual const std::string& State() const - {
+ virtual const std::string& State() const {
static std::string tag = "fieldref"; return tag; }
diff -u -r1.1 -r1.2 --- generatorProcess.cc 27 Jun 2013 00:05:58 -0000 1.1 +++ generatorProcess.cc 13 Nov 2013 23:02:57 -0000 1.2 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/processes/generatorProcess.cc,v 1.1 2013/06/27 00:05:58 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/processes/generatorProcess.cc,v 1.2 2013/11/13 23:02:57 jeremy Exp $
// LCDD #include "lcdd/schema/generator.hh"
@@ -18,25 +18,20 @@
/** * @brief SAX process for generator element. */
-class generatorProcess: public SAXStateProcess -{
+class generatorProcess: public SAXStateProcess {
public: generatorProcess(const ProcessingContext* context = 0) :
- SAXStateProcess(context), m_obj(0) - {
+ SAXStateProcess(context), m_obj(0) {
}
- virtual ~generatorProcess() - {
+ virtual ~generatorProcess() {
}
- virtual const SAXComponentObject* Build() const - {
+ virtual const SAXComponentObject* Build() const {
return this; }
- virtual void StartElement(const std::string&, const ASCIIAttributeList& attrs) - {
+ virtual void StartElement(const std::string&, const ASCIIAttributeList& attrs) {
SAXObject** obj = Context()->GetTopObject(); generator* g = new generator;
@@ -50,20 +45,16 @@
*obj = g; }
- virtual void EndElement(const std::string&) - {
+ virtual void EndElement(const std::string&) {
}
- virtual void Characters(const std::string&) - {
+ virtual void Characters(const std::string&) {
}
- virtual void StackPopNotify(const std::string&) - {
+ virtual void StackPopNotify(const std::string&) {
}
- virtual const std::string& State() const - {
+ virtual const std::string& State() const {
static std::string tag = "generator"; return tag; }
diff -u -r1.1 -r1.2 --- global_fieldProcess.cc 27 Jun 2013 00:05:58 -0000 1.1 +++ global_fieldProcess.cc 13 Nov 2013 23:02:57 -0000 1.2 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/processes/global_fieldProcess.cc,v 1.1 2013/06/27 00:05:58 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/processes/global_fieldProcess.cc,v 1.2 2013/11/13 23:02:57 jeremy Exp $
// GDML #include "Saxana/ProcessingConfigurator.h"
@@ -19,20 +19,16 @@
/** * @brief SAX process for global_field element. */
-class global_fieldProcess: public SAXStateProcess -{
+class global_fieldProcess: public SAXStateProcess {
public: global_fieldProcess(const ProcessingContext* context = 0) :
- SAXStateProcess(context), m_obj(0) - {
+ SAXStateProcess(context), m_obj(0) {
}
- virtual ~global_fieldProcess() - {
+ virtual ~global_fieldProcess() {
}
- virtual void StartElement(const std::string&, const ASCIIAttributeList&) - {
+ virtual void StartElement(const std::string&, const ASCIIAttributeList&) {
//std::cout << "global_fieldProcess::StartElement: " << name << std::endl; SAXObject** obj = Context()->GetTopObject();
@@ -43,17 +39,14 @@
*obj = cal; }
- virtual void EndElement(const std::string&) - {
+ virtual void EndElement(const std::string&) {
//std::cout << "global_fieldProcess::EndElement: " << name << " " << std::endl; }
- virtual void Characters(const std::string&) - {
+ virtual void Characters(const std::string&) {
}
- virtual void StackPopNotify(const std::string& name) - {
+ virtual void StackPopNotify(const std::string& name) {
//std::cout << "global_fieldProcess::StackPopNotify: " << name << std::endl; SAXObject** so = Context()->GetTopObject();
@@ -62,8 +55,7 @@
fobj->add_content(name, *so); }
- virtual const std::string& State() const - {
+ virtual const std::string& State() const {
static std::string tag = "global_field"; return tag; }
diff -u -r1.3 -r1.4 --- global_grid_xyProcess.cc 12 Sep 2013 19:45:11 -0000 1.3 +++ global_grid_xyProcess.cc 13 Nov 2013 23:02:57 -0000 1.4 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/processes/global_grid_xyProcess.cc,v 1.3 2013/09/12 19:45:11 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/processes/global_grid_xyProcess.cc,v 1.4 2013/11/13 23:02:57 jeremy Exp $
// GDML #include "Saxana/ProcessingConfigurator.h"
@@ -18,27 +18,22 @@
/** * @brief SAX process for global_grid_xyz elements. */
-class global_grid_xyProcess: public SAXStateProcess -{
+class global_grid_xyProcess: public SAXStateProcess {
public: global_grid_xyProcess(const ProcessingContext* context = 0) :
- SAXStateProcess(context), m_obj(0) - {
+ SAXStateProcess(context), m_obj(0) {
}
- virtual ~global_grid_xyProcess() - {
+ virtual ~global_grid_xyProcess() {
}
- virtual const SAXComponentObject* Build() const - {
+ virtual const SAXComponentObject* Build() const {
return this; }
- virtual void StartElement(const std::string&, const ASCIIAttributeList& attrs) - {
+ virtual void StartElement(const std::string&, const ASCIIAttributeList& attrs) {
SAXObject** obj = Context()->GetTopObject(); global_grid_xy* np = new global_grid_xy;
@@ -52,23 +47,19 @@
*obj = np; }
- virtual void EndElement(const std::string&) - {
+ virtual void EndElement(const std::string&) {
; }
- virtual void Characters(const std::string&) - {
+ virtual void Characters(const std::string&) {
; }
- virtual void StackPopNotify(const std::string&) - {
+ virtual void StackPopNotify(const std::string&) {
; }
- virtual const std::string& State() const - {
+ virtual const std::string& State() const {
static std::string tag = "global_grid_xy"; return tag; }
diff -u -r1.1 -r1.2 --- grid_xyzProcess.cc 27 Jun 2013 00:05:58 -0000 1.1 +++ grid_xyzProcess.cc 13 Nov 2013 23:02:57 -0000 1.2 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/processes/grid_xyzProcess.cc,v 1.1 2013/06/27 00:05:58 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/processes/grid_xyzProcess.cc,v 1.2 2013/11/13 23:02:57 jeremy Exp $
// LCDD #include "lcdd/schema/grid_xyz.hh"
@@ -18,27 +18,22 @@
/** * @brief SAX process for grid_xyz element. */
-class grid_xyzProcess: public SAXStateProcess -{
+class grid_xyzProcess: public SAXStateProcess {
public: grid_xyzProcess(const ProcessingContext* context = 0) :
- SAXStateProcess(context), m_obj(0) - {
+ SAXStateProcess(context), m_obj(0) {
}
- virtual ~grid_xyzProcess() - {
+ virtual ~grid_xyzProcess() {
}
- virtual const SAXComponentObject* Build() const - {
+ virtual const SAXComponentObject* Build() const {
return this; }
- virtual void StartElement(const std::string&, const ASCIIAttributeList& attrs) - {
+ virtual void StartElement(const std::string&, const ASCIIAttributeList& attrs) {
//std::cout << "grid_xyzProcess::StartElement: " << name << std::endl; SAXObject** obj = Context()->GetTopObject();
@@ -55,22 +50,18 @@
*obj = np; }
- virtual void EndElement(const std::string&) - {
+ virtual void EndElement(const std::string&) {
//std::cout << "PROCESS::END OF TAG : " << name << " " << std::endl; }
- virtual void Characters(const std::string&) - {
+ virtual void Characters(const std::string&) {
}
- virtual void StackPopNotify(const std::string&) - {
+ virtual void StackPopNotify(const std::string&) {
//std::cout << "PROCESS::NOTIFIED AFTER THE TAG: " << name << std::endl; }
- virtual const std::string& State() const - {
+ virtual const std::string& State() const {
static std::string tag = "grid_xyz"; return tag; }
diff -u -r1.1 -r1.2 --- headerProcess.cc 27 Jun 2013 00:05:58 -0000 1.1 +++ headerProcess.cc 13 Nov 2013 23:02:57 -0000 1.2 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/processes/headerProcess.cc,v 1.1 2013/06/27 00:05:58 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/processes/headerProcess.cc,v 1.2 2013/11/13 23:02:57 jeremy Exp $
// LCDD #include "lcdd/schema/header.hh"
@@ -18,25 +18,20 @@
/** * @brief SAX process for header element. */
-class headerProcess: public SAXStateProcess -{
+class headerProcess: public SAXStateProcess {
public: headerProcess(const ProcessingContext* context = 0) :
- SAXStateProcess(context), m_obj(0) - {
+ SAXStateProcess(context), m_obj(0) {
}
- virtual ~headerProcess() - {
+ virtual ~headerProcess() {
}
- virtual const SAXComponentObject* Build() const - {
+ virtual const SAXComponentObject* Build() const {
return this; }
- virtual void StartElement(const std::string&, const ASCIIAttributeList&) - {
+ virtual void StartElement(const std::string&, const ASCIIAttributeList&) {
//std::cout << "headerProcess::StartElement" << std::endl; SAXObject** obj = Context()->GetTopObject();
@@ -47,16 +42,13 @@
*obj = h; }
- virtual void EndElement(const std::string&) - {
+ virtual void EndElement(const std::string&) {
}
- virtual void Characters(const std::string&) - {
+ virtual void Characters(const std::string&) {
}
- virtual void StackPopNotify(const std::string& name) - {
+ virtual void StackPopNotify(const std::string& name) {
//std::cout << "headerProcess::StackPopNotify" << std::endl; SAXObject** so = Context()->GetTopObject();
@@ -66,8 +58,7 @@
}
- virtual const std::string& State() const - {
+ virtual const std::string& State() const {
static std::string tag = "header"; return tag; }
diff -u -r1.2 -r1.3 --- hit_processorProcess.cc 22 Aug 2013 22:32:17 -0000 1.2 +++ hit_processorProcess.cc 13 Nov 2013 23:02:57 -0000 1.3 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/processes/hit_processorProcess.cc,v 1.2 2013/08/22 22:32:17 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/processes/hit_processorProcess.cc,v 1.3 2013/11/13 23:02:57 jeremy Exp $
// LCDD #include "lcdd/processes/hit_processorProcess.hh"
@@ -8,23 +8,20 @@
#include "Saxana/ProcessingContext.h" #include "Saxana/SAXComponentFactory.h"
-hit_processorProcess::hit_processorProcess() - : SAXStateProcess(0), _obj(0) -{}
+hit_processorProcess::hit_processorProcess() : + SAXStateProcess(0), _obj(0) { +}
-hit_processorProcess::hit_processorProcess(ProcessingContext* context) - : SAXStateProcess(context), _obj(0) -{
+hit_processorProcess::hit_processorProcess(ProcessingContext* context) : + SAXStateProcess(context), _obj(0) {
}
-hit_processorProcess::~hit_processorProcess() -{
+hit_processorProcess::~hit_processorProcess() {
}
-void hit_processorProcess::StartElement(const std::string& name, const ASCIIAttributeList& attrs) -{
+void hit_processorProcess::StartElement(const std::string& name, const ASCIIAttributeList& attrs) {
SAXObject** obj = Context()->GetTopObject(); hit_processor* hitProcessor = new hit_processor;
@@ -34,14 +31,13 @@
*obj = hitProcessor; }
-void hit_processorProcess::EndElement(const std::string&) -{}
+void hit_processorProcess::EndElement(const std::string&) { +}
-void hit_processorProcess::Characters(const std::string&) -{}
+void hit_processorProcess::Characters(const std::string&) { +}
-void hit_processorProcess::StackPopNotify(const std::string& name) -{
+void hit_processorProcess::StackPopNotify(const std::string& name) {
SAXObject** so = Context()->GetTopObject(); HitProcessorType* hitProcessorType = dynamic_cast<HitProcessorType*>(_obj);
@@ -49,8 +45,7 @@
hitProcessorType->add_content(name, *so); }
-const std::string& hit_processorProcess::State() const -{
+const std::string& hit_processorProcess::State() const {
static std::string tag = "hit_processor"; return tag; }
diff -u -r1.2 -r1.3 --- hits_collectionProcess.cc 22 Aug 2013 22:32:17 -0000 1.2 +++ hits_collectionProcess.cc 13 Nov 2013 23:02:57 -0000 1.3 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/processes/hits_collectionProcess.cc,v 1.2 2013/08/22 22:32:17 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/processes/hits_collectionProcess.cc,v 1.3 2013/11/13 23:02:57 jeremy Exp $
// LCDD #include "lcdd/processes/hits_collectionProcess.hh"
@@ -8,22 +8,18 @@
#include "Saxana/ProcessingContext.h" #include "Saxana/SAXComponentFactory.h"
-hits_collectionProcess::hits_collectionProcess() - : SAXStateProcess(0), _obj(0) -{
+hits_collectionProcess::hits_collectionProcess() : + SAXStateProcess(0), _obj(0) {
}
-hits_collectionProcess::hits_collectionProcess(ProcessingContext* context) - : SAXStateProcess(context), _obj(0) -{
+hits_collectionProcess::hits_collectionProcess(ProcessingContext* context) : + SAXStateProcess(context), _obj(0) {
}
-hits_collectionProcess::~hits_collectionProcess() -{
+hits_collectionProcess::~hits_collectionProcess() {
}
-void hits_collectionProcess::StartElement(const std::string& name, const ASCIIAttributeList& attrs) -{
+void hits_collectionProcess::StartElement(const std::string& name, const ASCIIAttributeList& attrs) {
SAXObject** obj = Context()->GetTopObject(); hits_collection* hitsCollection = new hits_collection;
@@ -33,18 +29,16 @@
*obj = hitsCollection; }
-void hits_collectionProcess::EndElement(const std::string&) -{}
+void hits_collectionProcess::EndElement(const std::string&) { +}
-void hits_collectionProcess::Characters(const std::string&) -{}
+void hits_collectionProcess::Characters(const std::string&) { +}
-void hits_collectionProcess::StackPopNotify(const std::string& name) -{
+void hits_collectionProcess::StackPopNotify(const std::string& name) {
}
-const std::string& hits_collectionProcess::State() const -{
+const std::string& hits_collectionProcess::State() const {
static std::string tag = "hits_collection"; return tag; }
diff -u -r1.1 -r1.2 --- idspecProcess.cc 27 Jun 2013 00:05:58 -0000 1.1 +++ idspecProcess.cc 13 Nov 2013 23:02:58 -0000 1.2 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/processes/idspecProcess.cc,v 1.1 2013/06/27 00:05:58 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/processes/idspecProcess.cc,v 1.2 2013/11/13 23:02:58 jeremy Exp $
// LCDD #include "lcdd/schema/idspecElem.hh"
@@ -18,26 +18,21 @@
/** * @brief SAX process for idspec element. */
-class idspecProcess: public SAXStateProcess -{
+class idspecProcess: public SAXStateProcess {
public: idspecProcess(const ProcessingContext* context = 0) :
- SAXStateProcess(context), m_obj(0) - {
+ SAXStateProcess(context), m_obj(0) {
}
- virtual ~idspecProcess() - {
+ virtual ~idspecProcess() {
}
- virtual const SAXComponentObject* Build() const - {
+ virtual const SAXComponentObject* Build() const {
return this; }
- virtual void StartElement(const std::string&, const ASCIIAttributeList& attrs) - {
+ virtual void StartElement(const std::string&, const ASCIIAttributeList& attrs) {
//std::cout << "idspecProcess::StartElement() - " << name << std::endl; SAXObject** obj = Context()->GetTopObject();
@@ -50,23 +45,19 @@
m_obj = idspec; *obj = idspec; }
- virtual void EndElement(const std::string&) - {
+ virtual void EndElement(const std::string&) {
}
- virtual void Characters(const std::string&) - {
+ virtual void Characters(const std::string&) {
}
- virtual void StackPopNotify(const std::string& name) - {
+ virtual void StackPopNotify(const std::string& name) {
SAXObject** so = Context()->GetTopObject(); idspecElem* idspec = dynamic_cast<idspecElem*>(m_obj); idspec->add_content(name, *so); }
- virtual const std::string& State() const - {
+ virtual const std::string& State() const {
static std::string tag = "idspec"; return tag; }
diff -u -r1.1 -r1.2 --- idspecrefProcess.cc 27 Jun 2013 00:05:58 -0000 1.1 +++ idspecrefProcess.cc 13 Nov 2013 23:02:58 -0000 1.2 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/processes/idspecrefProcess.cc,v 1.1 2013/06/27 00:05:58 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/processes/idspecrefProcess.cc,v 1.2 2013/11/13 23:02:58 jeremy Exp $
// GDML #include "Processes/ReferenceTypeProcess.h"
@@ -13,20 +13,16 @@
* @brief SAX process for idspecref element. * @note Extends ReferenceTypeProcess for reference to idspec element. */
-class idspecrefProcess: public ReferenceTypeProcess -{
+class idspecrefProcess: public ReferenceTypeProcess {
public: idspecrefProcess(const ProcessingContext* context = 0) :
- ReferenceTypeProcess(context) - {
+ ReferenceTypeProcess(context) {
}
- virtual ~idspecrefProcess() - {
+ virtual ~idspecrefProcess() {
}
- virtual void StartElement(const std::string& name, const ASCIIAttributeList& attrs) - {
+ virtual void StartElement(const std::string& name, const ASCIIAttributeList& attrs) {
SAXObject** obj = Context()->GetTopObject(); IdSpecType::idspecref* s = new IdSpecType::idspecref;
@@ -36,13 +32,11 @@
ReferenceTypeProcess::StartElement(name, attrs); }
- virtual void EndElement(const std::string& name) - {
+ virtual void EndElement(const std::string& name) {
ReferenceTypeProcess::EndElement(name); }
- virtual const std::string& State() const - {
+ virtual const std::string& State() const {
static std::string tag = "idspecref"; return tag; }
diff -u -r1.2 -r1.3 --- limitProcess.cc 1 Jul 2013 22:10:34 -0000 1.2 +++ limitProcess.cc 13 Nov 2013 23:02:58 -0000 1.3 @@ -1,5 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/processes/limitProcess.cc,v 1.2 2013/07/01 22:10:34 jeremy Exp $ -
+// $Header: /cvs/lcd/lcdd/src/lcdd/processes/limitProcess.cc,v 1.3 2013/11/13 23:02:58 jeremy Exp $
// GDML #include "Saxana/ProcessingConfigurator.h"
@@ -16,26 +15,21 @@
/** * @brief SAX process for limit elements. */
-class limitProcess: public SAXStateProcess -{
+class limitProcess: public SAXStateProcess {
public: limitProcess(const ProcessingContext* context = 0) :
- SAXStateProcess(context), m_obj(0) - {
+ SAXStateProcess(context), m_obj(0) {
}
- virtual ~limitProcess() - {
+ virtual ~limitProcess() {
}
- virtual const SAXComponentObject* Build() const - {
+ virtual const SAXComponentObject* Build() const {
return this; }
- virtual void StartElement(const std::string&, const ASCIIAttributeList& attrs) - {
+ virtual void StartElement(const std::string&, const ASCIIAttributeList& attrs) {
SAXObject** obj = Context()->GetTopObject(); limit* lim = new limit;
@@ -49,20 +43,16 @@
*obj = lim; }
- virtual void EndElement(const std::string&) - {
+ virtual void EndElement(const std::string&) {
}
- virtual void StackPopNotify(const std::string&) - {
+ virtual void StackPopNotify(const std::string&) {
}
- virtual void Characters(const std::string&) - {
+ virtual void Characters(const std::string&) {
}
- virtual const std::string& State() const - {
+ virtual const std::string& State() const {
static std::string tag = "limit"; return tag; }
diff -u -r1.1 -r1.2 --- limitrefProcess.cc 27 Jun 2013 00:05:58 -0000 1.1 +++ limitrefProcess.cc 13 Nov 2013 23:02:58 -0000 1.2 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/processes/limitrefProcess.cc,v 1.1 2013/06/27 00:05:58 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/processes/limitrefProcess.cc,v 1.2 2013/11/13 23:02:58 jeremy Exp $
// GDML #include "Processes/ReferenceTypeProcess.h"
@@ -9,20 +9,16 @@
/** * @brief SAX process for limitref element. */
-class limitrefProcess: public ReferenceTypeProcess -{
+class limitrefProcess: public ReferenceTypeProcess {
public: limitrefProcess(const ProcessingContext* context = 0) :
- ReferenceTypeProcess(context) - {
+ ReferenceTypeProcess(context) {
}
- virtual ~limitrefProcess() - {
+ virtual ~limitrefProcess() {
}
- virtual void StartElement(const std::string& name, const ASCIIAttributeList& attrs) - {
+ virtual void StartElement(const std::string& name, const ASCIIAttributeList& attrs) {
//std::cout << "limitrefProcess" << std::endl; SAXObject** obj = Context()->GetTopObject();
@@ -35,13 +31,11 @@
ReferenceTypeProcess::StartElement(name, attrs); }
- virtual void EndElement(const std::string& name) - {
+ virtual void EndElement(const std::string& name) {
ReferenceTypeProcess::EndElement(name); }
- virtual const std::string& State() const - {
+ virtual const std::string& State() const {
static std::string tag = "limitref"; return tag; }
diff -u -r1.2 -r1.3 --- limitsetProcess.cc 1 Jul 2013 22:10:34 -0000 1.2 +++ limitsetProcess.cc 13 Nov 2013 23:02:58 -0000 1.3 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/processes/limitsetProcess.cc,v 1.2 2013/07/01 22:10:34 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/processes/limitsetProcess.cc,v 1.3 2013/11/13 23:02:58 jeremy Exp $
// LCDD #include "lcdd/schema/limitset.hh"
@@ -19,25 +19,20 @@
/** * @brief SAX process for limitset elements. */
-class limitsetProcess: public SAXStateProcess -{
+class limitsetProcess: public SAXStateProcess {
public: limitsetProcess(const ProcessingContext* context = 0) :
- SAXStateProcess(context), m_obj(0) - {
+ SAXStateProcess(context), m_obj(0) {
}
- virtual ~limitsetProcess() - {
+ virtual ~limitsetProcess() {
}
- virtual const SAXComponentObject* Build() const - {
+ virtual const SAXComponentObject* Build() const {
return this; }
- virtual void StartElement(const std::string&, const ASCIIAttributeList& attrs) - {
+ virtual void StartElement(const std::string&, const ASCIIAttributeList& attrs) {
SAXObject** obj = Context()->GetTopObject(); limitset* lim = new limitset;
@@ -47,16 +42,13 @@
*obj = lim; }
- virtual void EndElement(const std::string&) - {
+ virtual void EndElement(const std::string&) {
}
- virtual void Characters(const std::string&) - {
+ virtual void Characters(const std::string&) {
}
- virtual void StackPopNotify(const std::string& name) - {
+ virtual void StackPopNotify(const std::string& name) {
if (name == "limit") { SAXObject** so = Context()->GetTopObject(); limitset* lim = dynamic_cast<limitset*>(m_obj);
@@ -71,8 +63,7 @@
} }
- virtual const std::string& State() const - {
+ virtual const std::string& State() const {
static std::string tag = "limitset"; return tag; }
diff -u -r1.2 -r1.3 --- limitsetrefProcess.cc 1 Jul 2013 22:10:34 -0000 1.2 +++ limitsetrefProcess.cc 13 Nov 2013 23:02:58 -0000 1.3 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/processes/limitsetrefProcess.cc,v 1.2 2013/07/01 22:10:34 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/processes/limitsetrefProcess.cc,v 1.3 2013/11/13 23:02:58 jeremy Exp $
// GDML #include "Processes/ReferenceTypeProcess.h"
@@ -9,20 +9,16 @@
/** * @brief SAX process for limitsetref element. */
-class limitsetrefProcess: public ReferenceTypeProcess -{
+class limitsetrefProcess: public ReferenceTypeProcess {
public: limitsetrefProcess(const ProcessingContext* context = 0) :
- ReferenceTypeProcess(context) - {
+ ReferenceTypeProcess(context) {
}
- virtual ~limitsetrefProcess() - {
+ virtual ~limitsetrefProcess() {
}
- virtual void StartElement(const std::string& name, const ASCIIAttributeList& attrs) - {
+ virtual void StartElement(const std::string& name, const ASCIIAttributeList& attrs) {
SAXObject** obj = Context()->GetTopObject(); LimitSetType::limitsetref* lref = new LimitSetType::limitsetref;
@@ -33,13 +29,11 @@
ReferenceTypeProcess::StartElement(name, attrs); }
- virtual void EndElement(const std::string& name) - {
+ virtual void EndElement(const std::string& name) {
ReferenceTypeProcess::EndElement(name); }
- virtual const std::string& State() const - {
+ virtual const std::string& State() const {
static std::string tag = "limitsetref"; return tag; }
diff -u -r1.1 -r1.2 --- nonprojective_cylinderProcess.cc 27 Jun 2013 00:05:58 -0000 1.1 +++ nonprojective_cylinderProcess.cc 13 Nov 2013 23:02:58 -0000 1.2 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/processes/nonprojective_cylinderProcess.cc,v 1.1 2013/06/27 00:05:58 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/processes/nonprojective_cylinderProcess.cc,v 1.2 2013/11/13 23:02:58 jeremy Exp $
// GDML #include "Saxana/ProcessingConfigurator.h"
@@ -19,27 +19,22 @@
@class nonprojective_cylinderProcess @brief SAX process for nonprojective_cylinder element. */
-class nonprojective_cylinderProcess: public SAXStateProcess -{
+class nonprojective_cylinderProcess: public SAXStateProcess {
public: nonprojective_cylinderProcess(const ProcessingContext* context = 0) :
- SAXStateProcess(context), m_obj(0) - {
+ SAXStateProcess(context), m_obj(0) {
}
- virtual ~nonprojective_cylinderProcess() - {
+ virtual ~nonprojective_cylinderProcess() {
}
- virtual const SAXComponentObject* Build() const - {
+ virtual const SAXComponentObject* Build() const {
return this; }
- virtual void StartElement(const std::string&, const ASCIIAttributeList& attrs) - {
+ virtual void StartElement(const std::string&, const ASCIIAttributeList& attrs) {
//std::cout << "nonprojective_cylinderProcess::StartElement: " << name << std::endl; SAXObject** obj = Context()->GetTopObject();
@@ -54,20 +49,16 @@
*obj = np; }
- virtual void EndElement(const std::string&) - {
+ virtual void EndElement(const std::string&) {
}
- virtual void Characters(const std::string&) - {
+ virtual void Characters(const std::string&) {
}
- virtual void StackPopNotify(const std::string&) - {
+ virtual void StackPopNotify(const std::string&) {
}
- virtual const std::string& State() const - {
+ virtual const std::string& State() const {
static std::string tag = "nonprojective_cylinder"; return tag; }
diff -u -r1.1 -r1.2 --- physvolidProcess.cc 27 Jun 2013 00:05:58 -0000 1.1 +++ physvolidProcess.cc 13 Nov 2013 23:02:58 -0000 1.2 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/processes/physvolidProcess.cc,v 1.1 2013/06/27 00:05:58 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/processes/physvolidProcess.cc,v 1.2 2013/11/13 23:02:58 jeremy Exp $
// LCDD #include "lcdd/schema/physvolidElem.hh"
@@ -18,20 +18,16 @@
/** * @brief SAX process for physvolid element. */
-class physvolidProcess: public SAXStateProcess -{
+class physvolidProcess: public SAXStateProcess {
public: physvolidProcess(const ProcessingContext* context = 0) :
- SAXStateProcess(context), m_obj(0) - {
+ SAXStateProcess(context), m_obj(0) {
}
- virtual ~physvolidProcess() - {
+ virtual ~physvolidProcess() {
}
- virtual void StartElement(const std::string&, const ASCIIAttributeList& attrs) - {
+ virtual void StartElement(const std::string&, const ASCIIAttributeList& attrs) {
SAXObject** obj = Context()->GetTopObject(); physvolidElem* pvid = new physvolidElem;
@@ -43,20 +39,16 @@
*obj = pvid; }
- virtual void EndElement(const std::string&) - {
+ virtual void EndElement(const std::string&) {
}
- virtual void Characters(const std::string&) - {
+ virtual void Characters(const std::string&) {
}
- virtual void StackPopNotify(const std::string&) - {
+ virtual void StackPopNotify(const std::string&) {
}
- virtual const std::string& State() const - {
+ virtual const std::string& State() const {
static std::string tag = "physvolid"; return tag; }
diff -u -r1.1 -r1.2 --- projective_cylinderProcess.cc 27 Jun 2013 00:05:58 -0000 1.1 +++ projective_cylinderProcess.cc 13 Nov 2013 23:02:58 -0000 1.2 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/processes/projective_cylinderProcess.cc,v 1.1 2013/06/27 00:05:58 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/processes/projective_cylinderProcess.cc,v 1.2 2013/11/13 23:02:58 jeremy Exp $
// LCDD #include "lcdd/schema/projective_cylinder.hh"
@@ -18,27 +18,22 @@
/** * @brief SAX process for projective_cylinder element. */
-class projective_cylinderProcess: public SAXStateProcess -{
+class projective_cylinderProcess: public SAXStateProcess {
public: projective_cylinderProcess(const ProcessingContext* context = 0) :
- SAXStateProcess(context), m_obj(0) - {
+ SAXStateProcess(context), m_obj(0) {
}
- virtual ~projective_cylinderProcess() - {
+ virtual ~projective_cylinderProcess() {
}
- virtual const SAXComponentObject* Build() const - {
+ virtual const SAXComponentObject* Build() const {
return this; }
- virtual void StartElement(const std::string&, const ASCIIAttributeList& attrs) - {
+ virtual void StartElement(const std::string&, const ASCIIAttributeList& attrs) {
//std::cout << "projective_cylinderProcess::StartElement: " << name << std::endl; SAXObject** obj = Context()->GetTopObject();
@@ -52,20 +47,16 @@
*obj = prj; }
- virtual void EndElement(const std::string&) - {
+ virtual void EndElement(const std::string&) {
}
- virtual void Characters(const std::string&) - {
+ virtual void Characters(const std::string&) {
}
- virtual void StackPopNotify(const std::string&) - {
+ virtual void StackPopNotify(const std::string&) {
}
- virtual const std::string& State() const - {
+ virtual const std::string& State() const {
static std::string tag = "projective_cylinder"; return tag; }
diff -u -r1.1 -r1.2 --- projective_zplaneProcess.cc 27 Jun 2013 00:05:58 -0000 1.1 +++ projective_zplaneProcess.cc 13 Nov 2013 23:02:58 -0000 1.2 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/processes/projective_zplaneProcess.cc,v 1.1 2013/06/27 00:05:58 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/processes/projective_zplaneProcess.cc,v 1.2 2013/11/13 23:02:58 jeremy Exp $
// GDML #include "Saxana/ProcessingConfigurator.h"
@@ -19,27 +19,22 @@
@class projective_zplaneProcess @brief SAX process for projective_zplane element. */
-class projective_zplaneProcess: public SAXStateProcess -{
+class projective_zplaneProcess: public SAXStateProcess {
public: projective_zplaneProcess(const ProcessingContext* context = 0) :
- SAXStateProcess(context), m_obj(0) - {
+ SAXStateProcess(context), m_obj(0) {
}
- virtual ~projective_zplaneProcess() - {
+ virtual ~projective_zplaneProcess() {
}
- virtual const SAXComponentObject* Build() const - {
+ virtual const SAXComponentObject* Build() const {
return this; }
- virtual void StartElement(const std::string&, const ASCIIAttributeList& attrs) - {
+ virtual void StartElement(const std::string&, const ASCIIAttributeList& attrs) {
//std::cout << "projective_zplaneProcess::StartElement: " << name << std::endl; SAXObject** obj = Context()->GetTopObject();
@@ -53,20 +48,16 @@
*obj = prj; }
- virtual void EndElement(const std::string&) - {
+ virtual void EndElement(const std::string&) {
}
- virtual void Characters(const std::string&) - {
+ virtual void Characters(const std::string&) {
}
- virtual void StackPopNotify(const std::string&) - {
+ virtual void StackPopNotify(const std::string&) {
}
- virtual const std::string& State() const - {
+ virtual const std::string& State() const {
static std::string tag = "projective_zplane"; return tag; }
diff -u -r1.1 -r1.2 --- regionProcess.cc 27 Jun 2013 00:05:58 -0000 1.1 +++ regionProcess.cc 13 Nov 2013 23:02:58 -0000 1.2 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/processes/regionProcess.cc,v 1.1 2013/06/27 00:05:58 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/processes/regionProcess.cc,v 1.2 2013/11/13 23:02:58 jeremy Exp $
// LCDD #include "lcdd/schema/region.hh"
@@ -18,27 +18,22 @@
/** * @brief SAX process for region element. */
-class regionProcess: public SAXStateProcess -{
+class regionProcess: public SAXStateProcess {
public: regionProcess(const ProcessingContext* context = 0) :
- SAXStateProcess(context), m_obj(0) - {
+ SAXStateProcess(context), m_obj(0) {
}
- virtual ~regionProcess() - {
+ virtual ~regionProcess() {
}
- virtual const SAXComponentObject* Build() const - {
+ virtual const SAXComponentObject* Build() const {
return this; }
- virtual void StartElement(const std::string&, const ASCIIAttributeList& attrs) - {
+ virtual void StartElement(const std::string&, const ASCIIAttributeList& attrs) {
SAXObject** obj = Context()->GetTopObject(); region* reg = new region;
@@ -55,23 +50,19 @@
*obj = reg; }
- virtual void EndElement(const std::string&) - {
+ virtual void EndElement(const std::string&) {
}
- virtual void Characters(const std::string&) - {
+ virtual void Characters(const std::string&) {
}
- virtual void StackPopNotify(const std::string& name) - {
+ virtual void StackPopNotify(const std::string& name) {
SAXObject** so = Context()->GetTopObject(); region* r = dynamic_cast<region*>(m_obj); r->add_content(name, *so); }
- virtual const std::string& State() const - {
+ virtual const std::string& State() const {
static std::string tag = "region"; return tag; }
diff -u -r1.1 -r1.2 --- regionrefProcess.cc 27 Jun 2013 00:05:58 -0000 1.1 +++ regionrefProcess.cc 13 Nov 2013 23:02:58 -0000 1.2 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/processes/regionrefProcess.cc,v 1.1 2013/06/27 00:05:58 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/processes/regionrefProcess.cc,v 1.2 2013/11/13 23:02:58 jeremy Exp $
// GDML #include "Processes/ReferenceTypeProcess.h"
@@ -10,20 +10,16 @@
* @brief SAX process for regionref element. * @note Extends ReferenceTypeProcess for reference to region element. */
-class regionrefProcess: public ReferenceTypeProcess -{
+class regionrefProcess: public ReferenceTypeProcess {
public: regionrefProcess(const ProcessingContext* context = 0) :
- ReferenceTypeProcess(context) - {
+ ReferenceTypeProcess(context) {
}
- virtual ~regionrefProcess() - {
+ virtual ~regionrefProcess() {
}
- virtual void StartElement(const std::string& name, const ASCIIAttributeList& attrs) - {
+ virtual void StartElement(const std::string& name, const ASCIIAttributeList& attrs) {
SAXObject** obj = Context()->GetTopObject(); RegionType::regionref* regref = new RegionType::regionref;
@@ -34,13 +30,11 @@
ReferenceTypeProcess::StartElement(name, attrs); }
- virtual void EndElement(const std::string& name) - {
+ virtual void EndElement(const std::string& name) {
ReferenceTypeProcess::EndElement(name); }
- virtual const std::string& State() const - {
+ virtual const std::string& State() const {
static std::string tag = "regionref"; return tag; }
diff -u -r1.2 -r1.3 --- rz_field_mapProcess.cc 3 Jul 2013 23:33:51 -0000 1.2 +++ rz_field_mapProcess.cc 13 Nov 2013 23:02:58 -0000 1.3 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/processes/rz_field_mapProcess.cc,v 1.2 2013/07/03 23:33:51 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/processes/rz_field_mapProcess.cc,v 1.3 2013/11/13 23:02:58 jeremy Exp $
// LCDD #include "lcdd/processes/FieldMapTypeProcess.hh"
@@ -13,20 +13,16 @@
/** * @brief Processor for rz_field_map elements. */
-class rz_field_mapProcess: public FieldMapTypeProcess -{
+class rz_field_mapProcess: public FieldMapTypeProcess {
public: rz_field_mapProcess(const ProcessingContext* context = 0) :
- FieldMapTypeProcess(context) - {
+ FieldMapTypeProcess(context) {
}
- virtual ~rz_field_mapProcess() - {
+ virtual ~rz_field_mapProcess() {
}
- virtual void StartElement(const std::string& name, const ASCIIAttributeList& attrs) - {
+ virtual void StartElement(const std::string& name, const ASCIIAttributeList& attrs) {
// std::cout << "rz_field_mapProcess::StartElement - " << name << std::endl; SAXObject** obj = Context()->GetTopObject();
@@ -47,16 +43,13 @@
FieldMapTypeProcess::StartElement(name, attrs); }
- virtual void EndElement(const std::string&) - {
+ virtual void EndElement(const std::string&) {
}
- virtual void Characters(const std::string&) - {
+ virtual void Characters(const std::string&) {
}
- virtual void StackPopNotify(const std::string& name) - {
+ virtual void StackPopNotify(const std::string& name) {
// std::cout << "rz_field_mapProcess::StackPopNotify" << std::endl; if (name != "rzB") {
@@ -67,8 +60,7 @@
FieldMapTypeProcess::StackPopNotify(name); }
- virtual const std::string& State() const - {
+ virtual const std::string& State() const {
static std::string tag = "rz_field_map"; return tag; }
diff -u -r1.1 -r1.2 --- rzbProcess.cc 27 Jun 2013 00:05:58 -0000 1.1 +++ rzbProcess.cc 13 Nov 2013 23:02:58 -0000 1.2 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/processes/rzbProcess.cc,v 1.1 2013/06/27 00:05:58 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/processes/rzbProcess.cc,v 1.2 2013/11/13 23:02:58 jeremy Exp $
// GDML #include "Saxana/ProcessingConfigurator.h"
@@ -18,26 +18,21 @@
/** * @brief Processor for rzB elements. */
-class rzbProcess: public SAXStateProcess -{
+class rzbProcess: public SAXStateProcess {
public: rzbProcess(const ProcessingContext* context = 0) :
- SAXStateProcess(context), m_obj(0) - {
+ SAXStateProcess(context), m_obj(0) {
}
- virtual ~rzbProcess() - {
+ virtual ~rzbProcess() {
}
- virtual const SAXComponentObject* Build() const - {
+ virtual const SAXComponentObject* Build() const {
return this; }
- virtual void StartElement(const std::string&, const ASCIIAttributeList& attrs) - {
+ virtual void StartElement(const std::string&, const ASCIIAttributeList& attrs) {
//std::cout << "rzbProcess::StartElement" << std::endl; SAXObject** obj = Context()->GetTopObject();
@@ -53,20 +48,16 @@
*obj = row; }
- virtual void EndElement(const std::string&) - {
+ virtual void EndElement(const std::string&) {
}
- virtual void StackPopNotify(const std::string&) - {
+ virtual void StackPopNotify(const std::string&) {
}
- virtual void Characters(const std::string&) - {
+ virtual void Characters(const std::string&) {
}
- virtual const std::string& State() const - {
+ virtual const std::string& State() const {
static std::string tag = "rzB"; return tag; }
diff -u -r1.1 -r1.2 --- sdrefProcess.cc 27 Jun 2013 00:05:58 -0000 1.1 +++ sdrefProcess.cc 13 Nov 2013 23:02:58 -0000 1.2 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/processes/sdrefProcess.cc,v 1.1 2013/06/27 00:05:58 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/processes/sdrefProcess.cc,v 1.2 2013/11/13 23:02:58 jeremy Exp $
// LCDD #include "lcdd/schema/SensitiveDetectorType.hh"
@@ -14,20 +14,16 @@
@brief SAX process for sdref element. @note Extends ReferenceTypeProcess for reference to sd element. */
-class sdrefProcess: public ReferenceTypeProcess -{
+class sdrefProcess: public ReferenceTypeProcess {
public: sdrefProcess(const ProcessingContext* context = 0) :
- ReferenceTypeProcess(context) - {
+ ReferenceTypeProcess(context) {
}
- virtual ~sdrefProcess() - {
+ virtual ~sdrefProcess() {
}
- virtual void StartElement(const std::string& name, const ASCIIAttributeList& attrs) - {
+ virtual void StartElement(const std::string& name, const ASCIIAttributeList& attrs) {
SAXObject** obj = Context()->GetTopObject(); SensitiveDetectorType::sdref* s = new SensitiveDetectorType::sdref;
@@ -38,13 +34,11 @@
ReferenceTypeProcess::StartElement(name, attrs); }
- virtual void EndElement(const std::string& name) - {
+ virtual void EndElement(const std::string& name) {
ReferenceTypeProcess::EndElement(name); }
- virtual const std::string& State() const - {
+ virtual const std::string& State() const {
static std::string tag = "sdref"; return tag; }
diff -u -r1.2 -r1.3 --- solenoidProcess.cc 3 Jul 2013 23:33:51 -0000 1.2 +++ solenoidProcess.cc 13 Nov 2013 23:02:58 -0000 1.3 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/processes/solenoidProcess.cc,v 1.2 2013/07/03 23:33:51 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/processes/solenoidProcess.cc,v 1.3 2013/11/13 23:02:58 jeremy Exp $
// LCDD #include "lcdd/schema/solenoid.hh"
@@ -19,21 +19,17 @@
/** * @brief SAX process for solenoid element. */
-class solenoidProcess: public FieldTypeProcess -{
+class solenoidProcess: public FieldTypeProcess {
public: solenoidProcess(const ProcessingContext* context = 0) :
- FieldTypeProcess(context) - {
+ FieldTypeProcess(context) {
}
- virtual ~solenoidProcess() - {
+ virtual ~solenoidProcess() {
}
- virtual void StartElement(const std::string& name, const ASCIIAttributeList& attrs) - {
+ virtual void StartElement(const std::string& name, const ASCIIAttributeList& attrs) {
//std::cout << "solenoidProcess::StartElement: " << name << std::endl; SAXObject** obj = Context()->GetTopObject();
@@ -53,22 +49,18 @@
FieldTypeProcess::StartElement(name, attrs); }
- virtual void EndElement(const std::string&) - {
+ virtual void EndElement(const std::string&) {
//std::cout << "solenoidProcess::EndElement: " << name << " " << std::endl; }
- virtual void Characters(const std::string&) - {
+ virtual void Characters(const std::string&) {
}
- virtual void StackPopNotify(const std::string&) - {
+ virtual void StackPopNotify(const std::string&) {
//std::cout << "calorimeterProcess::StackPopNotify: " << name << std::endl; }
- virtual const std::string& State() const - {
+ virtual const std::string& State() const {
static std::string tag = "solenoid"; return tag; }
diff -u -r1.2 -r1.3 --- trackerProcess.cc 3 Jul 2013 23:33:51 -0000 1.2 +++ trackerProcess.cc 13 Nov 2013 23:02:58 -0000 1.3 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/processes/trackerProcess.cc,v 1.2 2013/07/03 23:33:51 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/processes/trackerProcess.cc,v 1.3 2013/11/13 23:02:58 jeremy Exp $
// LCDD #include "lcdd/schema/tracker.hh"
@@ -20,21 +20,17 @@
@class trackerProcess @brief SAX process for tracker element. */
-class trackerProcess: public SensitiveDetectorTypeProcess -{
+class trackerProcess: public SensitiveDetectorTypeProcess {
public: trackerProcess(const ProcessingContext* context = 0) :
- SensitiveDetectorTypeProcess(context) - {
+ SensitiveDetectorTypeProcess(context) {
}
- virtual ~trackerProcess() - {
+ virtual ~trackerProcess() {
}
- virtual void StartElement(const std::string& name, const ASCIIAttributeList& attrs) - {
+ virtual void StartElement(const std::string& name, const ASCIIAttributeList& attrs) {
SAXObject** obj = Context()->GetTopObject(); tracker* trk = new tracker;
@@ -46,17 +42,14 @@
SensitiveDetectorTypeProcess::StartElement(name, attrs); }
- virtual void EndElement(const std::string&) - {
+ virtual void EndElement(const std::string&) {
}
- virtual void StackPopNotify(const std::string& name) - {
+ virtual void StackPopNotify(const std::string& name) {
SensitiveDetectorTypeProcess::StackPopNotify(name); }
- virtual const std::string& State() const - {
+ virtual const std::string& State() const {
static std::string tag = "tracker"; return tag; }
diff -u -r1.1 -r1.2 --- visProcess.cc 27 Jun 2013 00:05:58 -0000 1.1 +++ visProcess.cc 13 Nov 2013 23:02:58 -0000 1.2 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/processes/visProcess.cc,v 1.1 2013/06/27 00:05:58 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/processes/visProcess.cc,v 1.2 2013/11/13 23:02:58 jeremy Exp $
// LCDD #include "lcdd/schema/vis.hh"
@@ -18,26 +18,21 @@
/** * @brief SAX process for vis element. */
-class visProcess: public SAXStateProcess -{
+class visProcess: public SAXStateProcess {
public: visProcess(const ProcessingContext* context = 0) :
- SAXStateProcess(context), m_obj(0) - {
+ SAXStateProcess(context), m_obj(0) {
}
- virtual ~visProcess() - {
+ virtual ~visProcess() {
}
- virtual const SAXComponentObject* Build() const - {
+ virtual const SAXComponentObject* Build() const {
return this; }
- virtual void StartElement(const std::string&, const ASCIIAttributeList& attrs) - {
+ virtual void StartElement(const std::string&, const ASCIIAttributeList& attrs) {
//std::cout << "visProcess::StartElement()" << std::endl; SAXObject** obj = Context()->GetTopObject();
@@ -54,24 +49,20 @@
*obj = v; }
- virtual void EndElement(const std::string&) - {
+ virtual void EndElement(const std::string&) {
}
- virtual void Characters(const std::string&) - {
+ virtual void Characters(const std::string&) {
}
- virtual void StackPopNotify(const std::string& name) - {
+ virtual void StackPopNotify(const std::string& name) {
// add all content SAXObject** so = Context()->GetTopObject(); vis* v = dynamic_cast<vis*>(m_obj); v->add_content(name, *so); }
- virtual const std::string& State() const - {
+ virtual const std::string& State() const {
static std::string tag = "vis"; return tag; }
diff -u -r1.1 -r1.2 --- visrefProcess.cc 27 Jun 2013 00:05:58 -0000 1.1 +++ visrefProcess.cc 13 Nov 2013 23:02:58 -0000 1.2 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/processes/visrefProcess.cc,v 1.1 2013/06/27 00:05:58 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/processes/visrefProcess.cc,v 1.2 2013/11/13 23:02:58 jeremy Exp $
// LCDD #include "lcdd/schema/VisType.hh"
@@ -10,20 +10,16 @@
* @brief SAX process for visref element. * @note Extends ReferenceTypeProcess for referencing the vis elements. */
-class visrefProcess: public ReferenceTypeProcess -{
+class visrefProcess: public ReferenceTypeProcess {
public: visrefProcess(const ProcessingContext* context = 0) :
- ReferenceTypeProcess(context) - {
+ ReferenceTypeProcess(context) {
}
- virtual ~visrefProcess() - {
+ virtual ~visrefProcess() {
}
- virtual void StartElement(const std::string& name, const ASCIIAttributeList& attrs) - {
+ virtual void StartElement(const std::string& name, const ASCIIAttributeList& attrs) {
SAXObject** obj = Context()->GetTopObject(); VisType::visref* visref = new VisType::visref;
@@ -34,13 +30,11 @@
ReferenceTypeProcess::StartElement(name, attrs); }
- virtual void EndElement(const std::string& name) - {
+ virtual void EndElement(const std::string& name) {
ReferenceTypeProcess::EndElement(name); }
- virtual const std::string& State() const - {
+ virtual const std::string& State() const {
static std::string tag = "visref"; return tag; }
diff -u -r1.1 -r1.2 --- volumeExtendedProcess.cc 27 Jun 2013 00:05:58 -0000 1.1 +++ volumeExtendedProcess.cc 13 Nov 2013 23:02:58 -0000 1.2 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/processes/volumeExtendedProcess.cc,v 1.1 2013/06/27 00:05:58 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/processes/volumeExtendedProcess.cc,v 1.2 2013/11/13 23:02:58 jeremy Exp $
#ifndef VolumeExtendedProcess_hh #define VolumeExtendedProcess_hh 1
@@ -18,26 +18,21 @@
* as this class does not appear to be extendable. It is only defined in a cpp * file with no include guards! */
-class volumeExtendedProcess: public SAXStateProcess -{
+class volumeExtendedProcess: public SAXStateProcess {
public: volumeExtendedProcess(const ProcessingContext* context = 0) :
- SAXStateProcess(context), m_obj(0) - {
+ SAXStateProcess(context), m_obj(0) {
}
- virtual ~volumeExtendedProcess() - {
+ virtual ~volumeExtendedProcess() {
}
- virtual const SAXComponentObject* Build() const - {
+ virtual const SAXComponentObject* Build() const {
return this; } // Analogical to SAX startElement callback
- virtual void StartElement(const std::string&, const ASCIIAttributeList& attrs) - {
+ virtual void StartElement(const std::string&, const ASCIIAttributeList& attrs) {
SAXObject** obj = Context()->GetTopObject(); volume* vo = new volume;
@@ -48,24 +43,20 @@
*obj = vo; }
- virtual void EndElement(const std::string&) - {
+ virtual void EndElement(const std::string&) {
}
- virtual void Characters(const std::string&) - {
+ virtual void Characters(const std::string&) {
}
- virtual void StackPopNotify(const std::string& name) - {
+ virtual void StackPopNotify(const std::string& name) {
SAXObject** so = Context()->GetTopObject(); volume* vobj = dynamic_cast<volume*>(m_obj); vobj->add_content(name, *so); } // The name of the state this object will process
- virtual const std::string& State() const - {
+ virtual const std::string& State() const {
static std::string tag = "volume"; return tag; }
diff -u -r1.2 -r1.3 --- HitProcessorType.cc 22 Aug 2013 22:32:17 -0000 1.2 +++ HitProcessorType.cc 13 Nov 2013 23:02:58 -0000 1.3 @@ -1,27 +1,22 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/schema/HitProcessorType.cc,v 1.2 2013/08/22 22:32:17 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/schema/HitProcessorType.cc,v 1.3 2013/11/13 23:02:58 jeremy Exp $
#include "lcdd/schema/HitProcessorType.hh"
-HitProcessorType::HitProcessorType() -{
+HitProcessorType::HitProcessorType() {
}
-HitProcessorType::~HitProcessorType() -{
+HitProcessorType::~HitProcessorType() {
}
-void HitProcessorType::set_type(const std::string& s) -{
+void HitProcessorType::set_type(const std::string& s) {
_type = s; }
-const std::string& HitProcessorType::get_type() const -{
+const std::string& HitProcessorType::get_type() const {
return _type; }
-void HitProcessorType::add_content(const std::string& tag, SAXObject* saxObject) -{
+void HitProcessorType::add_content(const std::string& tag, SAXObject* saxObject) {
ContentGroup::ContentItem contentItem = { tag, saxObject }; _sequence.add_content(contentItem); }
diff -u -r1.2 -r1.3 --- HitsCollectionType.cc 22 Aug 2013 22:32:17 -0000 1.2 +++ HitsCollectionType.cc 13 Nov 2013 23:02:58 -0000 1.3 @@ -1,20 +1,18 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/schema/HitsCollectionType.cc,v 1.2 2013/08/22 22:32:17 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/schema/HitsCollectionType.cc,v 1.3 2013/11/13 23:02:58 jeremy Exp $
// LCDD #include "lcdd/schema/HitsCollectionType.hh"
-HitsCollectionType::HitsCollectionType() -{}
+HitsCollectionType::HitsCollectionType() { +}
-HitsCollectionType::~HitsCollectionType() -{}
+HitsCollectionType::~HitsCollectionType() { +}
-void HitsCollectionType::set_name(const std::string& s) -{
+void HitsCollectionType::set_name(const std::string& s) {
_name = s; }
-const std::string& HitsCollectionType::get_name() const -{
+const std::string& HitsCollectionType::get_name() const {
return _name; }
diff -u -r1.2 -r1.3 --- hit_processor.cc 22 Aug 2013 22:32:17 -0000 1.2 +++ hit_processor.cc 13 Nov 2013 23:02:58 -0000 1.3 @@ -1,18 +1,15 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/schema/hit_processor.cc,v 1.2 2013/08/22 22:32:17 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/schema/hit_processor.cc,v 1.3 2013/11/13 23:02:58 jeremy Exp $
// LCDD #include "lcdd/schema/hit_processor.hh"
-hit_processor::hit_processor() -{
+hit_processor::hit_processor() {
}
-hit_processor::~hit_processor() -{
+hit_processor::~hit_processor() {
}
-SAXObject::Type hit_processor::type() -{
+SAXObject::Type hit_processor::type() {
return SAXObject::element; }
diff -u -r1.2 -r1.3 --- hits_collection.cc 22 Aug 2013 22:32:17 -0000 1.2 +++ hits_collection.cc 13 Nov 2013 23:02:58 -0000 1.3 @@ -1,17 +1,14 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/schema/hits_collection.cc,v 1.2 2013/08/22 22:32:17 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/schema/hits_collection.cc,v 1.3 2013/11/13 23:02:58 jeremy Exp $
#include "lcdd/schema/hits_collection.hh"
-hits_collection::hits_collection() -{
+hits_collection::hits_collection() {
}
-hits_collection::~hits_collection() -{
+hits_collection::~hits_collection() {
}
-SAXObject::Type hits_collection::type() -{
+SAXObject::Type hits_collection::type() {
return SAXObject::element; }
diff -u -r1.1 -r1.2 --- CellReadout.cc 10 Sep 2013 21:57:33 -0000 1.1 +++ CellReadout.cc 13 Nov 2013 23:02:58 -0000 1.2 @@ -1,11 +1,9 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/segmentation/CellReadout.cc,v 1.1 2013/09/10 21:57:33 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/segmentation/CellReadout.cc,v 1.2 2013/11/13 23:02:58 jeremy Exp $
#include "lcdd/segmentation/CellReadout.hh"
-CellReadout::CellReadout() -{
+CellReadout::CellReadout() {
}
-CellReadout::~CellReadout() -{
+CellReadout::~CellReadout() {
}
diff -u -r1.1 -r1.2 --- CellReadout2D.cc 10 Sep 2013 21:57:33 -0000 1.1 +++ CellReadout2D.cc 13 Nov 2013 23:02:58 -0000 1.2 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/segmentation/CellReadout2D.cc,v 1.1 2013/09/10 21:57:33 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/segmentation/CellReadout2D.cc,v 1.2 2013/11/13 23:02:58 jeremy Exp $
// LCDD #include "lcdd/segmentation/CellReadout2D.hh"
@@ -8,30 +8,25 @@
#include <iostream> #include <stdexcept>
-CellReadout2D::CellReadout2D(double cellSizeX, double cellSizeY) - : _cellSizeX(cellSizeX), _cellSizeY(cellSizeY), _dimensionX(0.), _dimensionY(0.) -{
+CellReadout2D::CellReadout2D(double cellSizeX, double cellSizeY) : + _cellSizeX(cellSizeX), _cellSizeY(cellSizeY), _dimensionX(0.), _dimensionY(0.) {
}
-CellReadout2D::~CellReadout2D() -{
+CellReadout2D::~CellReadout2D() {
}
-CellReadout2D::Position2D CellReadout2D::position(CellReadout2D::CellId cellId) -{
+CellReadout2D::Position2D CellReadout2D::position(CellReadout2D::CellId cellId) {
Position2D position; position.x = getCellPositionX(cellId.ix); position.y = getCellPositionY(cellId.iy); return position; }
-CellReadout::CellId CellReadout2D::cellId(Position2D position) -{
+CellReadout::CellId CellReadout2D::cellId(Position2D position) {
return createCell(getXIndex(position.x), getYIndex(position.y)); }
-CellReadout::Neighbors CellReadout2D::neighbors(CellId cellId) -{
+CellReadout::Neighbors CellReadout2D::neighbors(CellId cellId) {
Neighbors neighbors; CellId cell;
@@ -57,79 +52,65 @@
}
-double CellReadout2D::getCellSizeX() -{
+double CellReadout2D::getCellSizeX() {
return _cellSizeX; }
-double CellReadout2D::getCellSizeY() -{
+double CellReadout2D::getCellSizeY() {
return _cellSizeY; }
-int CellReadout2D::getXIndex(double x) -{
+int CellReadout2D::getXIndex(double x) {
return getCellIndex(x, _cellSizeX); }
-int CellReadout2D::getYIndex(double y) -{
+int CellReadout2D::getYIndex(double y) {
return getCellIndex(y, _cellSizeY); }
-double CellReadout2D::getCellCoordinate(int i, double cellSize) -{
+double CellReadout2D::getCellCoordinate(int i, double cellSize) {
return (i * cellSize) - cellSize / 2; }
-int CellReadout2D::getCellIndex(double c, double cellSize) -{
+int CellReadout2D::getCellIndex(double c, double cellSize) {
int v = std::ceil(c / cellSize); if (v == 0) v = 1; return v; }
-double CellReadout2D::getCellPositionX(int ix) -{
+double CellReadout2D::getCellPositionX(int ix) {
return getCellCoordinate(ix, _cellSizeX); }
-double CellReadout2D::getCellPositionY(int iy) -{
+double CellReadout2D::getCellPositionY(int iy) {
return getCellCoordinate(iy, _cellSizeY); }
-CellReadout2D::CellId CellReadout2D::createCell(int x, int y) -{
+CellReadout2D::CellId CellReadout2D::createCell(int x, int y) {
CellId cell; cell.ix = x; cell.iy = y; return cell; }
-void CellReadout2D::setDimensionX(double dimensionX) -{
+void CellReadout2D::setDimensionX(double dimensionX) {
_dimensionX = dimensionX; }
-void CellReadout2D::setDimensionY(double dimensionY) -{
+void CellReadout2D::setDimensionY(double dimensionY) {
_dimensionY = dimensionY; }
-double CellReadout2D::getDimensionX() -{
+double CellReadout2D::getDimensionX() {
return _dimensionX; }
-double CellReadout2D::getDimensionY() -{
+double CellReadout2D::getDimensionY() {
return _dimensionY; }
-bool CellReadout2D::isValidCell(CellId cell) -{
+bool CellReadout2D::isValidCell(CellId cell) {
// DEBUG //std::cout << "isValidCell: " << cell.ix << ", " << cell.iy << std::endl;
@@ -152,10 +133,11 @@
return true; }
-bool CellReadout2D::isValidPosition(Position2D position) -{ - if (position.x > getDimensionX() || position.x < 0) return false; - if (position.y > getDimensionY() || position.y < 0) return false;
+bool CellReadout2D::isValidPosition(Position2D position) { + if (position.x > getDimensionX() || position.x < 0) + return false; + if (position.y > getDimensionY() || position.y < 0) + return false;
return true; }
diff -u -r1.2 -r1.3 --- CellReadout2DSegmentation.cc 14 Sep 2013 01:38:52 -0000 1.2 +++ CellReadout2DSegmentation.cc 13 Nov 2013 23:02:58 -0000 1.3 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/segmentation/CellReadout2DSegmentation.cc,v 1.2 2013/09/14 01:38:52 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/segmentation/CellReadout2DSegmentation.cc,v 1.3 2013/11/13 23:02:58 jeremy Exp $
// LCDD #include "lcdd/segmentation/CellReadout2DSegmentation.hh"
@@ -15,19 +15,16 @@
//#define CellReadout2DSegmentation_DEBUG 1 CellReadout2DSegmentation::CellReadout2DSegmentation(double cellSizeX, double cellSizeY) :
- Segmentation(Segmentation::eNonprojective, 2) -{
+ Segmentation(Segmentation::eNonprojective, 2) {
_readout = new CellReadout2D(cellSizeX, cellSizeY); setBinNames(); }
-CellReadout2DSegmentation::~CellReadout2DSegmentation() -{
+CellReadout2DSegmentation::~CellReadout2DSegmentation() {
delete _readout; }
-G4ThreeVector CellReadout2DSegmentation::getGlobalHitPosition(const G4Step* aStep) -{
+G4ThreeVector CellReadout2DSegmentation::getGlobalHitPosition(const G4Step* aStep) {
#ifdef CellReadout2DSegmentation_DEBUG std::cout << "CellReadout2DSegmentation::getGlobalHitPosition" << std::endl; #endif
@@ -82,17 +79,16 @@
#ifdef CellReadout2DSegmentation_DEBUG std::cout << "globalCellPosition: "
- << globalCellPosition.x() << " " - << globalCellPosition.y() << " " - << globalCellPosition.z() << std::endl;
+ << globalCellPosition.x() << " " + << globalCellPosition.y() << " " + << globalCellPosition.z() << std::endl;
std::cout << std::endl; #endif return globalCellPosition; }
-void CellReadout2DSegmentation::setBins(const G4Step* aStep) -{
+void CellReadout2DSegmentation::setBins(const G4Step* aStep) {
#ifdef CellReadout2DSegmentation_DEBUG std::cout << "CellReadout2DSegmentation::setBins" << std::endl; #endif
@@ -151,14 +147,12 @@
#endif }
-void CellReadout2DSegmentation::setBinNames() -{
+void CellReadout2DSegmentation::setBinNames() {
addBinName("ix"); addBinName("iy"); }
-void CellReadout2DSegmentation::setup(const G4Step* aStep) -{
+void CellReadout2DSegmentation::setup(const G4Step* aStep) {
// Set dimensions from current box volume. G4VSolid* solid = ReadoutUtil::getSolidFromStepPoint(aStep->GetPreStepPoint()); G4Box* box = dynamic_cast<G4Box*>(solid);
@@ -174,16 +168,14 @@
#endif }
-CellReadout::Position2D CellReadout2DSegmentation::localToReadoutCoordinates(G4ThreeVector& vec) -{
+CellReadout::Position2D CellReadout2DSegmentation::localToReadoutCoordinates(G4ThreeVector& vec) {
CellReadout::Position2D position; position.x = vec.x() + _readout->getDimensionX() / 2.; position.y = vec.y() + _readout->getDimensionY() / 2.; return position; }
-G4ThreeVector CellReadout2DSegmentation::readoutToLocalCoordinates(CellReadout::Position2D position) -{
+G4ThreeVector CellReadout2DSegmentation::readoutToLocalCoordinates(CellReadout::Position2D position) {
double x = position.x - _readout->getDimensionX() / 2.; double y = position.y - _readout->getDimensionY() / 2.; return G4ThreeVector(x, y, 0);
diff -u -r1.1 -r1.2 --- GlobalGridXYSegmentation.cc 10 Sep 2013 21:57:33 -0000 1.1 +++ GlobalGridXYSegmentation.cc 13 Nov 2013 23:02:58 -0000 1.2 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/segmentation/GlobalGridXYSegmentation.cc,v 1.1 2013/09/10 21:57:33 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/segmentation/GlobalGridXYSegmentation.cc,v 1.2 2013/11/13 23:02:58 jeremy Exp $
// LCDD #include "lcdd/segmentation/GlobalGridXYSegmentation.hh"
@@ -8,24 +8,20 @@
#include "G4NavigationHistory.hh" GlobalGridXYSegmentation::GlobalGridXYSegmentation(double gridSizeX, double gridSizeY) :
- Segmentation(Segmentation::eNonprojective), _gridSizeX(gridSizeX), _gridSizeY(gridSizeY) -{
+ Segmentation(Segmentation::eNonprojective), _gridSizeX(gridSizeX), _gridSizeY(gridSizeY) {
setBinNames(); }
-GlobalGridXYSegmentation::~GlobalGridXYSegmentation() -{
+GlobalGridXYSegmentation::~GlobalGridXYSegmentation() {
}
-void GlobalGridXYSegmentation::setBinNames() -{
+void GlobalGridXYSegmentation::setBinNames() {
addBinName("x"); addBinName("y"); addBinName("z"); }
-G4ThreeVector GlobalGridXYSegmentation::getGlobalHitPosition(const G4Step* aStep) -{
+G4ThreeVector GlobalGridXYSegmentation::getGlobalHitPosition(const G4Step* aStep) {
// Compute the midpoint of the global step. G4ThreeVector globalStepPos = ReadoutUtil::computeMidPos(aStep);
@@ -43,8 +39,7 @@
return globalCellPos; }
-void GlobalGridXYSegmentation::setBins(const G4Step* aStep) -{
+void GlobalGridXYSegmentation::setBins(const G4Step* aStep) {
// Compute the midpoint of the step. G4ThreeVector globalStepPos = ReadoutUtil::computeMidPos(aStep);
@@ -57,22 +52,18 @@
setBin(1, binY); }
-int GlobalGridXYSegmentation::computeBinX(const G4ThreeVector& stepPos) -{
+int GlobalGridXYSegmentation::computeBinX(const G4ThreeVector& stepPos) {
return Segmentation::computeBin(stepPos.x(), _gridSizeX); }
-int GlobalGridXYSegmentation::computeBinY(const G4ThreeVector& stepPos) -{
+int GlobalGridXYSegmentation::computeBinY(const G4ThreeVector& stepPos) {
return Segmentation::computeBin(stepPos.y(), _gridSizeY); }
-double GlobalGridXYSegmentation::computeDimX(int bin) -{
+double GlobalGridXYSegmentation::computeDimX(int bin) {
return Segmentation::computeDim(bin, _gridSizeX); }
-double GlobalGridXYSegmentation::computeDimY(int bin) -{
+double GlobalGridXYSegmentation::computeDimY(int bin) {
return Segmentation::computeDim(bin, _gridSizeY); }
diff -u -r1.1 -r1.2 --- GridXYZSegmentation.cc 10 Sep 2013 21:57:33 -0000 1.1 +++ GridXYZSegmentation.cc 13 Nov 2013 23:02:58 -0000 1.2 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/segmentation/GridXYZSegmentation.cc,v 1.1 2013/09/10 21:57:33 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/segmentation/GridXYZSegmentation.cc,v 1.2 2013/11/13 23:02:58 jeremy Exp $
// LCDD #include "lcdd/segmentation/GridXYZSegmentation.hh"
@@ -8,24 +8,20 @@
#include "G4NavigationHistory.hh" GridXYZSegmentation::GridXYZSegmentation(double gridSizeX, double gridSizeY, double gridSizeZ) :
- Segmentation(Segmentation::eNonprojective), _gridSizeX(gridSizeX), _gridSizeY(gridSizeY), _gridSizeZ(gridSizeZ) -{
+ Segmentation(Segmentation::eNonprojective), _gridSizeX(gridSizeX), _gridSizeY(gridSizeY), _gridSizeZ(gridSizeZ) {
setBinNames(); }
-GridXYZSegmentation::~GridXYZSegmentation() -{
+GridXYZSegmentation::~GridXYZSegmentation() {
}
-void GridXYZSegmentation::setBinNames() -{
+void GridXYZSegmentation::setBinNames() {
addBinName("x"); addBinName("y"); addBinName("z"); }
-G4ThreeVector GridXYZSegmentation::getGlobalHitPosition(const G4Step* aStep) -{
+G4ThreeVector GridXYZSegmentation::getGlobalHitPosition(const G4Step* aStep) {
// compute midpoint G4ThreeVector globalStepPos = ReadoutUtil::computeMidPos(aStep);
@@ -41,8 +37,7 @@
return globalCellPos; }
-void GridXYZSegmentation::setBins(const G4Step* aStep) -{
+void GridXYZSegmentation::setBins(const G4Step* aStep) {
// Compute the midpoint of the step. G4ThreeVector globalStepPos = ReadoutUtil::computeMidPos(aStep);
@@ -67,8 +62,7 @@
++idx; }
-int GridXYZSegmentation::computeBinX(const G4ThreeVector& localStepPos) -{
+int GridXYZSegmentation::computeBinX(const G4ThreeVector& localStepPos) {
int ret; if (_gridSizeX != 0) { ret = Segmentation::computeBin(localStepPos.x(), _gridSizeX);
@@ -78,8 +72,7 @@
return ret; }
-int GridXYZSegmentation::computeBinY(const G4ThreeVector& localStepPos) -{
+int GridXYZSegmentation::computeBinY(const G4ThreeVector& localStepPos) {
int ret; if (_gridSizeY != 0) { ret = Segmentation::computeBin(localStepPos.y(), _gridSizeY);
@@ -89,8 +82,7 @@
return ret; }
-int GridXYZSegmentation::computeBinZ(const G4ThreeVector& localStepPos) -{
+int GridXYZSegmentation::computeBinZ(const G4ThreeVector& localStepPos) {
int ret; if (_gridSizeZ != 0) { ret = Segmentation::computeBin(localStepPos.z(), _gridSizeZ);
@@ -100,41 +92,37 @@
return ret; }
-double GridXYZSegmentation::computeDimX(int bin) -{
+double GridXYZSegmentation::computeDimX(int bin) {
return Segmentation::computeDim(bin, _gridSizeX); }
-double GridXYZSegmentation::computeDimY(int bin) -{
+double GridXYZSegmentation::computeDimY(int bin) {
return Segmentation::computeDim(bin, _gridSizeY); }
-double GridXYZSegmentation::computeDimZ(int bin) -{
+double GridXYZSegmentation::computeDimZ(int bin) {
return Segmentation::computeDim(bin, _gridSizeZ); } /*
-G4ThreeVector GridXYZSegmentation::getGlobalHitPosPreStep(const G4StepPoint* aPreStepPoint) -{ - G4ThreeVector globalStepPos = aPreStepPoint->GetPosition();
+ G4ThreeVector GridXYZSegmentation::getGlobalHitPosPreStep(const G4StepPoint* aPreStepPoint) + { + G4ThreeVector globalStepPos = aPreStepPoint->GetPosition();
- // Figure out local step pos using touchable and global midpoint. - G4ThreeVector localStepPos = ReadoutUtil::transformGlobalToLocal(aPreStepPoint, globalStepPos);
+ // Figure out local step pos using touchable and global midpoint. + G4ThreeVector localStepPos = ReadoutUtil::transformGlobalToLocal(aPreStepPoint, globalStepPos);
- // Compute local cell pos. - G4ThreeVector localCellPos = this->getLocalHitPos(localStepPos);
+ // Compute local cell pos. + G4ThreeVector localCellPos = this->getLocalHitPos(localStepPos);
- // Compute global cell pos. - G4ThreeVector globalCellPos = ReadoutUtil::transformLocalToGlobal(aPreStepPoint, localCellPos);
+ // Compute global cell pos. + G4ThreeVector globalCellPos = ReadoutUtil::transformLocalToGlobal(aPreStepPoint, localCellPos);
- return globalCellPos; -} -*/
+ return globalCellPos; + } + */
-G4ThreeVector GridXYZSegmentation::getLocalHitPos(const G4ThreeVector& localStepPos) -{
+G4ThreeVector GridXYZSegmentation::getLocalHitPos(const G4ThreeVector& localStepPos) {
G4ThreeVector localHitPos; if (_gridSizeX > 0) {
diff -u -r1.1 -r1.2 --- NonprojectiveCylinderSegmentation.cc 10 Sep 2013 21:57:33 -0000 1.1 +++ NonprojectiveCylinderSegmentation.cc 13 Nov 2013 23:02:58 -0000 1.2 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/segmentation/NonprojectiveCylinderSegmentation.cc,v 1.1 2013/09/10 21:57:33 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/segmentation/NonprojectiveCylinderSegmentation.cc,v 1.2 2013/11/13 23:02:58 jeremy Exp $
// LCDD #include "lcdd/segmentation/NonprojectiveCylinderSegmentation.hh"
@@ -17,18 +17,15 @@
setBinNames(); }
-NonprojectiveCylinderSegmentation::~NonprojectiveCylinderSegmentation() -{
+NonprojectiveCylinderSegmentation::~NonprojectiveCylinderSegmentation() {
}
-void NonprojectiveCylinderSegmentation::setBinNames() -{
+void NonprojectiveCylinderSegmentation::setBinNames() {
addBinName("phi"); addBinName("z"); }
-G4ThreeVector NonprojectiveCylinderSegmentation::getGlobalHitPosition(const G4Step* aStep) -{
+G4ThreeVector NonprojectiveCylinderSegmentation::getGlobalHitPosition(const G4Step* aStep) {
// local cell pos G4ThreeVector localCellPos = getLocalHitPos(aStep);
@@ -39,25 +36,24 @@
} /*
-G4ThreeVector NonprojectiveCylinderSegmentation::getGlobalHitPos(const G4StepPoint* aPreStepPoint) -{ - // local cell pos - G4ThreeVector localCellPos = getLocalHitPos(aPreStepPoint); - - // global cell pos - G4ThreeVector globalCellPos = ReadoutUtil::transformLocalToGlobal(aPreStepPoint, localCellPos); - - // DEBUG: print local, global cell pos - //G4cout << "localCellPos " << localCellPos << G4endl; - //G4cout << "globalCellPos " << globalCellPos << G4endl; - // - - return localCellPos; -} -*/
+ G4ThreeVector NonprojectiveCylinderSegmentation::getGlobalHitPos(const G4StepPoint* aPreStepPoint) + { + // local cell pos + G4ThreeVector localCellPos = getLocalHitPos(aPreStepPoint); + + // global cell pos + G4ThreeVector globalCellPos = ReadoutUtil::transformLocalToGlobal(aPreStepPoint, localCellPos); + + // DEBUG: print local, global cell pos + //G4cout << "localCellPos " << localCellPos << G4endl; + //G4cout << "globalCellPos " << globalCellPos << G4endl; + // + + return localCellPos; + } + */
-G4ThreeVector NonprojectiveCylinderSegmentation::getLocalHitPos(const G4Step* aStep) -{
+G4ThreeVector NonprojectiveCylinderSegmentation::getLocalHitPos(const G4Step* aStep) {
G4ThreeVector globalMidPos = ReadoutUtil::computeMidPos(aStep); // retrieve G4Tubs
@@ -90,8 +86,7 @@
return cellCenter; }
-G4ThreeVector NonprojectiveCylinderSegmentation::getLocalHitPos(const G4StepPoint* aPreStepPoint) -{
+G4ThreeVector NonprojectiveCylinderSegmentation::getLocalHitPos(const G4StepPoint* aPreStepPoint) {
G4ThreeVector globalPos = aPreStepPoint->GetPosition(); // retrieve G4Tubs
@@ -124,8 +119,7 @@
return cellCenter; }
-double NonprojectiveCylinderSegmentation::computeDeltaPhi(const G4Step* aStep) -{
+double NonprojectiveCylinderSegmentation::computeDeltaPhi(const G4Step* aStep) {
// mid radius of current tubs double mid_rad_layer = ReadoutUtil::computeTubsMidRadius(aStep);
@@ -140,8 +134,7 @@
return deltaPhi; }
-double NonprojectiveCylinderSegmentation::computeDeltaPhi(const G4StepPoint* aPreStepPoint) -{
+double NonprojectiveCylinderSegmentation::computeDeltaPhi(const G4StepPoint* aPreStepPoint) {
// mid radius of current tubs double mid_rad_layer = ReadoutUtil::computeTubsMidRadius(aPreStepPoint);
@@ -156,8 +149,7 @@
return deltaPhi; }
-void NonprojectiveCylinderSegmentation::setBins(const G4Step* aStep) -{
+void NonprojectiveCylinderSegmentation::setBins(const G4Step* aStep) {
//G4cout << "G4NonprojectiveCylinderSegmentation::setBins()" << G4endl; G4ThreeVector globalMidPos = ReadoutUtil::computeMidPos(aStep);
@@ -180,8 +172,7 @@
// setBin(0, bphi); // setBin(1, bz); //}
-int NonprojectiveCylinderSegmentation::computeBinPhi(const G4Step* aStep) -{
+int NonprojectiveCylinderSegmentation::computeBinPhi(const G4Step* aStep) {
G4ThreeVector globalMidPos = ReadoutUtil::computeMidPos(aStep); const G4Tubs* tubs = ReadoutUtil::getTubs(aStep);
@@ -201,8 +192,7 @@
return computeBin(stepPhi, deltaPhi / radian); }
-int NonprojectiveCylinderSegmentation::computeBinPhi(const G4StepPoint* aPreStepPoint) -{
+int NonprojectiveCylinderSegmentation::computeBinPhi(const G4StepPoint* aPreStepPoint) {
G4ThreeVector globalPos = aPreStepPoint->GetPosition(); const G4Tubs* tubs = ReadoutUtil::getTubs(aPreStepPoint);
@@ -222,13 +212,11 @@
return computeBin(stepPhi, deltaPhi / radian); }
-int NonprojectiveCylinderSegmentation::computeBinZ(const G4ThreeVector& localStepPos) -{
+int NonprojectiveCylinderSegmentation::computeBinZ(const G4ThreeVector& localStepPos) {
return computeBin(localStepPos.z(), _gridSizeZ); }
-bool NonprojectiveCylinderSegmentation::isValidSolid(G4VSolid* s) -{
+bool NonprojectiveCylinderSegmentation::isValidSolid(G4VSolid* s) {
bool valid = Segmentation::isValidSolid(s); if (valid) {
diff -u -r1.1 -r1.2 --- ProjectiveCylinderSegmentation.cc 10 Sep 2013 21:57:33 -0000 1.1 +++ ProjectiveCylinderSegmentation.cc 13 Nov 2013 23:02:58 -0000 1.2 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/segmentation/ProjectiveCylinderSegmentation.cc,v 1.1 2013/09/10 21:57:33 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/segmentation/ProjectiveCylinderSegmentation.cc,v 1.2 2013/11/13 23:02:58 jeremy Exp $
// LCDD #include "lcdd/segmentation/ProjectiveCylinderSegmentation.hh"
@@ -12,28 +12,24 @@
#include "G4Tubs.hh" ProjectiveCylinderSegmentation::ProjectiveCylinderSegmentation(G4int ntheta, G4int nphi) :
- ProjectiveSegmentation(ntheta, nphi) -{
+ ProjectiveSegmentation(ntheta, nphi) {
}
-ProjectiveCylinderSegmentation::~ProjectiveCylinderSegmentation() -{
+ProjectiveCylinderSegmentation::~ProjectiveCylinderSegmentation() {
}
-double ProjectiveCylinderSegmentation::getRadius(const G4Step* aStep) -{
+double ProjectiveCylinderSegmentation::getRadius(const G4Step* aStep) {
return ReadoutUtil::computeTubsMidRadius(ReadoutUtil::getTubs(aStep)); } /*
-double ProjectiveCylinderSegmentation::getRadius(const G4StepPoint* aPreStepPoint) -{ - return ReadoutUtil::computeTubsMidRadius(ReadoutUtil::getTubs(aPreStepPoint)); -} -*/
+ double ProjectiveCylinderSegmentation::getRadius(const G4StepPoint* aPreStepPoint) + { + return ReadoutUtil::computeTubsMidRadius(ReadoutUtil::getTubs(aPreStepPoint)); + } + */
-double ProjectiveCylinderSegmentation::getZ(const G4Step* aStep) -{
+double ProjectiveCylinderSegmentation::getZ(const G4Step* aStep) {
double rcyl = getRadius(aStep); double ctheta = getThetaDim(aStep);
@@ -46,22 +42,21 @@
return zcell; } /*
-double ProjectiveCylinderSegmentation::getZ(const G4StepPoint* aPreStepPoint) -{ - double rcyl = getRadius(aPreStepPoint);
+ double ProjectiveCylinderSegmentation::getZ(const G4StepPoint* aPreStepPoint) + { + double rcyl = getRadius(aPreStepPoint);
- double ctheta = getThetaDim(aPreStepPoint);
+ double ctheta = getThetaDim(aPreStepPoint);
- // ctheta in 0 to pi ... - // ctheta < pi/2 should be negative
+ // ctheta in 0 to pi ... + // ctheta < pi/2 should be negative
- double zcell = rcyl / tan(ctheta);
+ double zcell = rcyl / tan(ctheta);
- return zcell; -} -*/ -bool ProjectiveCylinderSegmentation::isValidSolid(G4VSolid* s) -{
+ return zcell; + } + */ +bool ProjectiveCylinderSegmentation::isValidSolid(G4VSolid* s) {
bool valid = Segmentation::isValidSolid(s); if (valid) {
diff -u -r1.1 -r1.2 --- ProjectiveSegmentation.cc 10 Sep 2013 21:57:33 -0000 1.1 +++ ProjectiveSegmentation.cc 13 Nov 2013 23:02:59 -0000 1.2 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/segmentation/ProjectiveSegmentation.cc,v 1.1 2013/09/10 21:57:33 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/segmentation/ProjectiveSegmentation.cc,v 1.2 2013/11/13 23:02:59 jeremy Exp $
// LCDD #include "lcdd/segmentation/ProjectiveSegmentation.hh"
@@ -12,24 +12,20 @@
#include "G4Tubs.hh" ProjectiveSegmentation::ProjectiveSegmentation(G4int ntheta, G4int nphi) :
- Segmentation(Segmentation::eProjective), _ntheta(ntheta), _nphi(nphi) -{
+ Segmentation(Segmentation::eProjective), _ntheta(ntheta), _nphi(nphi) {
computeDivisions(); setBinNames(); }
-ProjectiveSegmentation::~ProjectiveSegmentation() -{
+ProjectiveSegmentation::~ProjectiveSegmentation() {
}
-void ProjectiveSegmentation::setBinNames() -{
+void ProjectiveSegmentation::setBinNames() {
addBinName("theta"); addBinName("phi"); }
-G4ThreeVector ProjectiveSegmentation::getGlobalHitPosition(const G4Step* aStep) -{
+G4ThreeVector ProjectiveSegmentation::getGlobalHitPosition(const G4Step* aStep) {
// divide entire theta, phi range into bins; bins always positive // theta, phi coord of step midpoint // compute bin numbers
@@ -54,52 +50,51 @@
} /*
-G4ThreeVector ProjectiveSegmentation::getGlobalHitPos(const G4StepPoint* aPreStepPoint) -{ - // DEBUG - //G4cout << "G4ProjectiveSegmentation::getGlobalHitPos()" << G4endl; - // - - // divide entire theta, phi range into bins; bins always positive - // theta, phi coord of step midpoint - // compute bin numbers - // get dim from bins - - // get radius, z components (probably from subclass function) - double rcyl = getRadius(aPreStepPoint); - double zcell = getZ(aPreStepPoint);
+ G4ThreeVector ProjectiveSegmentation::getGlobalHitPos(const G4StepPoint* aPreStepPoint) + { + // DEBUG + //G4cout << "G4ProjectiveSegmentation::getGlobalHitPos()" << G4endl; + // + + // divide entire theta, phi range into bins; bins always positive + // theta, phi coord of step midpoint + // compute bin numbers + // get dim from bins + + // get radius, z components (probably from subclass function) + double rcyl = getRadius(aPreStepPoint); + double zcell = getZ(aPreStepPoint); + + // get phi component + double cphi = getPhiDim(aPreStepPoint); + + // compute x, y cells + double xcell = rcyl * cos(cphi); + double ycell = rcyl * sin(cphi); + + G4ThreeVector pos(xcell, ycell, zcell); + + //G4ThreeVector midPos = ReadoutUtil::computeMidPos( aStep ); + + // DEBUG: print all + //G4cout << "sphi <" << midPos.phi() << ">" << G4endl; + //G4cout << "cphi <" << cphi << ">" << G4endl; + //G4cout << "sphi - cphi = " << midPos.phi() - cphi << G4endl; + + //G4cout << "stheta <" << midPos.theta() << ">" << G4endl; + //G4cout << "ctheta <" << getThetaDim( aStep ) << ">" << G4endl; + //G4cout << "stheta - ctheta = " << midPos.theta() - getThetaDim( aStep ) << G4endl; + + //G4cout << "rcyl <" << rcyl << ">" << G4endl; + //G4cout << "zcell <" << zcell << ">" << G4endl; + //G4cout << "globalCellPos <" << pos << ">" << G4endl; + // + + return pos; + } + */
- // get phi component - double cphi = getPhiDim(aPreStepPoint); - - // compute x, y cells - double xcell = rcyl * cos(cphi); - double ycell = rcyl * sin(cphi); - - G4ThreeVector pos(xcell, ycell, zcell); - - //G4ThreeVector midPos = ReadoutUtil::computeMidPos( aStep ); - - // DEBUG: print all - //G4cout << "sphi <" << midPos.phi() << ">" << G4endl; - //G4cout << "cphi <" << cphi << ">" << G4endl; - //G4cout << "sphi - cphi = " << midPos.phi() - cphi << G4endl; - - //G4cout << "stheta <" << midPos.theta() << ">" << G4endl; - //G4cout << "ctheta <" << getThetaDim( aStep ) << ">" << G4endl; - //G4cout << "stheta - ctheta = " << midPos.theta() - getThetaDim( aStep ) << G4endl; - - //G4cout << "rcyl <" << rcyl << ">" << G4endl; - //G4cout << "zcell <" << zcell << ">" << G4endl; - //G4cout << "globalCellPos <" << pos << ">" << G4endl; - // - - return pos; -} -*/ - -void ProjectiveSegmentation::setBins(const G4Step* aStep) -{
+void ProjectiveSegmentation::setBins(const G4Step* aStep) {
G4ThreeVector globalMidPos = ReadoutUtil::computeMidPos(aStep); setBin(0, getThetaBin(globalMidPos));
@@ -107,39 +102,34 @@
} /*
-void ProjectiveSegmentation::setBins(const G4StepPoint* aPreStepPoint) -{ - G4ThreeVector globalPos = aPreStepPoint->GetPosition(); - - setBin(0, getThetaBin(globalPos)); - setBin(1, getPhiBin(globalPos)); -} -*/
+ void ProjectiveSegmentation::setBins(const G4StepPoint* aPreStepPoint) + { + G4ThreeVector globalPos = aPreStepPoint->GetPosition(); + + setBin(0, getThetaBin(globalPos)); + setBin(1, getPhiBin(globalPos)); + } + */
-G4int ProjectiveSegmentation::getNtheta() const -{
+G4int ProjectiveSegmentation::getNtheta() const {
return _ntheta; }
-G4int ProjectiveSegmentation::getNphi() const -{
+G4int ProjectiveSegmentation::getNphi() const {
return _nphi; }
-void ProjectiveSegmentation::computeDivisions() -{
+void ProjectiveSegmentation::computeDivisions() {
_divTheta = (180.0 * deg) / _ntheta; _divPhi = (360.0 * deg) / _nphi; }
-int ProjectiveSegmentation::getThetaBin(const G4ThreeVector& globalStepPos) -{
+int ProjectiveSegmentation::getThetaBin(const G4ThreeVector& globalStepPos) {
// theta needs to be in range 0 - PI return Segmentation::computeBin(globalStepPos.theta(), _divTheta / radian); }
-int ProjectiveSegmentation::getPhiBin(const G4ThreeVector& globalStepPos) -{
+int ProjectiveSegmentation::getPhiBin(const G4ThreeVector& globalStepPos) {
// adjust phi for < 0 double sphi = globalStepPos.phi();
@@ -158,8 +148,7 @@
} // default impl. returns mag of pos
-double ProjectiveSegmentation::getRadius(const G4Step* aStep) -{
+double ProjectiveSegmentation::getRadius(const G4Step* aStep) {
//G4cout << "G4ProjectiveSegmentation::getRadius()" << G4endl; return ReadoutUtil::computeMidPos(aStep).mag();
@@ -167,35 +156,31 @@
//double ProjectiveSegmentation::getRadius(const G4StepPoint* aPreStepPoint) //{
- //G4cout << "G4ProjectiveSegmentation::getRadius()" << G4endl;
+//G4cout << "G4ProjectiveSegmentation::getRadius()" << G4endl;
// return aPreStepPoint->GetPosition().mag(); //} // default impl. returns z of pos
-double ProjectiveSegmentation::getZ(const G4Step* aStep) -{
+double ProjectiveSegmentation::getZ(const G4Step* aStep) {
//G4cout << "G4ProjectiveSegmentation::getZ()" << G4endl; return ReadoutUtil::computeMidPos(aStep).z(); } //double ProjectiveSegmentation::getZ(const G4StepPoint* aPreStepPoint) //{
- //G4cout << "G4ProjectiveSegmentation::getZ()" << G4endl;
+//G4cout << "G4ProjectiveSegmentation::getZ()" << G4endl;
// return aPreStepPoint->GetPosition().z(); //}
-double ProjectiveSegmentation::getThetaDim(const int &thetaBin) const -{
+double ProjectiveSegmentation::getThetaDim(const int &thetaBin) const {
return Segmentation::computeDim(thetaBin, _divTheta); }
-double ProjectiveSegmentation::getPhiDim(const int &phiBin) const -{
+double ProjectiveSegmentation::getPhiDim(const int &phiBin) const {
return Segmentation::computeDim(phiBin, _divPhi); }
-double ProjectiveSegmentation::getThetaDim(const G4Step* aStep) -{
+double ProjectiveSegmentation::getThetaDim(const G4Step* aStep) {
//G4cout << "G4ProjectiveSegmentation::getThetaDim(G4Step*)" << G4endl; G4ThreeVector globalStepPos = ReadoutUtil::computeMidPos(aStep); double ctheta = getThetaDim(getThetaBin(globalStepPos));
@@ -204,14 +189,13 @@
//double ProjectiveSegmentation::getThetaDim(const G4StepPoint* aPreStepPoint) //{
- //G4cout << "G4ProjectiveSegmentation::getThetaDim(G4Step*)" << G4endl;
+//G4cout << "G4ProjectiveSegmentation::getThetaDim(G4Step*)" << G4endl;
// G4ThreeVector globalStepPos = aPreStepPoint->GetPosition(); // double ctheta = getThetaDim(getThetaBin(globalStepPos)); // return ctheta; //}
-double ProjectiveSegmentation::getPhiDim(const G4Step* aStep) -{
+double ProjectiveSegmentation::getPhiDim(const G4Step* aStep) {
//G4cout << "G4ProjectiveSegmentation::getPhiDim(G4Step*)" << G4endl; G4ThreeVector globalStepPos = ReadoutUtil::computeMidPos(aStep);
@@ -220,7 +204,7 @@
} //double ProjectiveSegmentation::getPhiDim(const G4StepPoint* aPreStepPoint) //{
- //G4cout << "G4ProjectiveSegmentation::getPhiDim(G4Step*)" << G4endl;
+//G4cout << "G4ProjectiveSegmentation::getPhiDim(G4Step*)" << G4endl;
// G4ThreeVector globalStepPos = aPreStepPoint->GetPosition(); // double cphi = getPhiDim(getPhiBin(globalStepPos));
diff -u -r1.1 -r1.2 --- ProjectiveZPlaneSegmentation.cc 10 Sep 2013 21:57:33 -0000 1.1 +++ ProjectiveZPlaneSegmentation.cc 13 Nov 2013 23:02:59 -0000 1.2 @@ -1,45 +1,41 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/segmentation/ProjectiveZPlaneSegmentation.cc,v 1.1 2013/09/10 21:57:33 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/segmentation/ProjectiveZPlaneSegmentation.cc,v 1.2 2013/11/13 23:02:59 jeremy Exp $
// LCDD #include "lcdd/segmentation/ProjectiveZPlaneSegmentation.hh" #include "lcdd/detectors/ReadoutUtil.hh" ProjectiveZPlaneSegmentation::ProjectiveZPlaneSegmentation(G4int ntheta, G4int nphi) :
- ProjectiveSegmentation(ntheta, nphi) -{
+ ProjectiveSegmentation(ntheta, nphi) {
}
-ProjectiveZPlaneSegmentation::~ProjectiveZPlaneSegmentation() -{
+ProjectiveZPlaneSegmentation::~ProjectiveZPlaneSegmentation() {
}
-double ProjectiveZPlaneSegmentation::getRadius(const G4Step* aStep) -{
+double ProjectiveZPlaneSegmentation::getRadius(const G4Step* aStep) {
double zcell = getZ(aStep); double ctheta = ProjectiveSegmentation::getThetaDim(aStep); double rcyl = zcell * tan(ctheta); return rcyl; } /*
-double ProjectiveZPlaneSegmentation::getRadius(const G4StepPoint* aPreStepPoint) -{ - double zcell = getZ(aPreStepPoint); - double ctheta = ProjectiveSegmentation::getThetaDim(aPreStepPoint); - double rcyl = zcell * tan(ctheta); - return rcyl; -} -*/
+ double ProjectiveZPlaneSegmentation::getRadius(const G4StepPoint* aPreStepPoint) + { + double zcell = getZ(aPreStepPoint); + double ctheta = ProjectiveSegmentation::getThetaDim(aPreStepPoint); + double rcyl = zcell * tan(ctheta); + return rcyl; + } + */
-double ProjectiveZPlaneSegmentation::getZ(const G4Step* aStep) -{
+double ProjectiveZPlaneSegmentation::getZ(const G4Step* aStep) {
G4ThreeVector gpos = ReadoutUtil::getVolumeGlobalPosition(aStep->GetPreStepPoint(), G4ThreeVector()); return gpos.z(); } /*
-double ProjectiveZPlaneSegmentation::getZ(const G4StepPoint* aPreStepPoint) -{ - G4ThreeVector gpos = ReadoutUtil::getVolumeGlobalPosition(aPreStepPoint, G4ThreeVector()); - return gpos.z(); -} -*/
+ double ProjectiveZPlaneSegmentation::getZ(const G4StepPoint* aPreStepPoint) + { + G4ThreeVector gpos = ReadoutUtil::getVolumeGlobalPosition(aPreStepPoint, G4ThreeVector()); + return gpos.z(); + } + */
diff -u -r1.1 -r1.2 --- Segmentation.cc 10 Sep 2013 21:57:33 -0000 1.1 +++ Segmentation.cc 13 Nov 2013 23:02:59 -0000 1.2 @@ -1,12 +1,11 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/segmentation/Segmentation.cc,v 1.1 2013/09/10 21:57:33 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/segmentation/Segmentation.cc,v 1.2 2013/11/13 23:02:59 jeremy Exp $
// LCDD #include "lcdd/segmentation/Segmentation.hh" #include "lcdd/detectors/ReadoutUtil.hh" Segmentation::Segmentation(EType segType, int nbins) :
- _numBins(nbins), _type(segType) -{
+ _numBins(nbins), _type(segType) {
// reserve nbins _bins.reserve(_numBins);
@@ -14,27 +13,22 @@
resetBins(); }
-Segmentation::~Segmentation() -{
+Segmentation::~Segmentation() {
}
-void Segmentation::setBin(int binIdx, int binVal) -{
+void Segmentation::setBin(int binIdx, int binVal) {
_bins.insert(_bins.begin() + binIdx, binVal); }
-int Segmentation::getNumberOfBins() -{
+int Segmentation::getNumberOfBins() {
return _numBins; }
-const std::vector<int>& Segmentation::getBins() -{
+const std::vector<int>& Segmentation::getBins() {
return _bins; }
-Segmentation::EType Segmentation::getType() -{
+Segmentation::EType Segmentation::getType() {
return _type; }
@@ -49,18 +43,15 @@
// return aPreStepPoint->GetPosition(); //}
-G4ThreeVector Segmentation::getLocalHitPosition(const G4ThreeVector& localStepPos) -{
+G4ThreeVector Segmentation::getLocalHitPosition(const G4ThreeVector& localStepPos) {
return localStepPos; }
-void Segmentation::resetBins() -{
+void Segmentation::resetBins() {
_bins.clear(); }
-void Segmentation::printOutBins(std::ostream& os, const std::vector<int>& bins) -{
+void Segmentation::printOutBins(std::ostream& os, const std::vector<int>& bins) {
os << "segmentationBins <" << bins.size() << "> :: "; for (std::vector<int>::const_iterator iter = bins.begin(); iter != bins.end(); iter++) { os << *iter << " ";
@@ -68,8 +59,7 @@
os << std::endl; }
-bool Segmentation::isValidSolid(G4VSolid* s) -{
+bool Segmentation::isValidSolid(G4VSolid* s) {
bool valid = true; if (0 == s) {
@@ -79,8 +69,7 @@
return valid; }
-const G4String& Segmentation::getTypeString() -{
+const G4String& Segmentation::getTypeString() {
static G4String typestr; if (_type == Segmentation::eProjective) { typestr = "Projective";
@@ -92,37 +81,30 @@
return typestr; }
-int Segmentation::getBin(int idx) -{
+int Segmentation::getBin(int idx) {
return _bins.at(idx); }
-const std::string& Segmentation::getBinName(int idx) -{
+const std::string& Segmentation::getBinName(int idx) {
return _binNames.at(idx); }
-void Segmentation::addBinName(const std::string& binName) -{
+void Segmentation::addBinName(const std::string& binName) {
_binNames.push_back(binName); }
-const std::vector<std::string>& Segmentation::getBinNames() -{
+const std::vector<std::string>& Segmentation::getBinNames() {
return _binNames; }
-void Segmentation::printOutBins(std::ostream& os) -{
+void Segmentation::printOutBins(std::ostream& os) {
printOutBins(os, _bins); }
-int Segmentation::computeBin(double localDim, double gridDim) -{
+int Segmentation::computeBin(double localDim, double gridDim) {
return int(floor(localDim / gridDim)); }
-double Segmentation::computeDim(const int &bin, const double &incr) -{
+double Segmentation::computeDim(const int &bin, const double &incr) {
return (double(bin) + .5) * incr; }
diff -u -r1.2 -r1.3 --- SegmentationFactory.cc 12 Sep 2013 19:45:11 -0000 1.2 +++ SegmentationFactory.cc 13 Nov 2013 23:02:59 -0000 1.3 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/segmentation/SegmentationFactory.cc,v 1.2 2013/09/12 19:45:11 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/segmentation/SegmentationFactory.cc,v 1.3 2013/11/13 23:02:59 jeremy Exp $
// LCDD #include "lcdd/segmentation/SegmentationFactory.hh"
@@ -24,12 +24,10 @@
// STL #include <iostream>
-SegmentationFactory::SegmentationFactory() -{
+SegmentationFactory::SegmentationFactory() {
}
-Segmentation* SegmentationFactory::createSegmentation(SAXObject* obj, const std::string& tag) -{
+Segmentation* SegmentationFactory::createSegmentation(SAXObject* obj, const std::string& tag) {
Segmentation* seg = 0; GDMLExpressionEvaluator* calc = GDMLProcessor::GetInstance()->GetEvaluator();
diff -u -r1.3 -r1.4 --- box_dipoleSubscriber.cc 1 Jul 2013 22:10:35 -0000 1.3 +++ box_dipoleSubscriber.cc 13 Nov 2013 23:02:59 -0000 1.4 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/subscribers/box_dipoleSubscriber.cc,v 1.3 2013/07/01 22:10:35 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/subscribers/box_dipoleSubscriber.cc,v 1.4 2013/11/13 23:02:59 jeremy Exp $
// LCDD #include "lcdd/core/LCDDProcessor.hh"
@@ -14,29 +14,24 @@
/** * @brief Instantiate BoxDipole objects from box_dipole SAX elements. */
-class box_dipoleSubscriber: virtual public SAXSubscriber -{
+class box_dipoleSubscriber: virtual public SAXSubscriber {
public:
- virtual const SAXComponentObject* Build() const - {
+ virtual const SAXComponentObject* Build() const {
return this; } public:
- box_dipoleSubscriber() - {
+ box_dipoleSubscriber() {
Subscribe("box_dipole"); }
- virtual ~box_dipoleSubscriber() - {
+ virtual ~box_dipoleSubscriber() {
}
- virtual void Activate(const SAXObject* object) - {
+ virtual void Activate(const SAXObject* object) {
GDMLExpressionEvaluator* calc = GDMLProcessor::GetInstance()->GetEvaluator(); if (object != 0) {
diff -u -r1.4 -r1.5 --- calorimeterSubscriber.cc 10 Sep 2013 21:57:33 -0000 1.4 +++ calorimeterSubscriber.cc 13 Nov 2013 23:02:59 -0000 1.5 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/subscribers/calorimeterSubscriber.cc,v 1.4 2013/09/10 21:57:33 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/subscribers/calorimeterSubscriber.cc,v 1.5 2013/11/13 23:02:59 jeremy Exp $
// GDML #include "Saxana/SAXSubscriber.h"
@@ -21,26 +21,21 @@
* @brief SAX subscriber for calorimeter element. * @note Delegates to SensitiveDetectorFactory to create G4CalorimeterSD object. */
-class calorimeterSubscriber: virtual public SAXSubscriber -{
+class calorimeterSubscriber: virtual public SAXSubscriber {
public:
- virtual const SAXComponentObject* Build() const - {
+ virtual const SAXComponentObject* Build() const {
return this; } public:
- calorimeterSubscriber() - {
+ calorimeterSubscriber() {
Subscribe("calorimeter"); }
- virtual ~calorimeterSubscriber() - {
+ virtual ~calorimeterSubscriber() {
}
- virtual void Activate(const SAXObject* object) - {
+ virtual void Activate(const SAXObject* object) {
// use factory to create this SD SensitiveDetectorFactory::createSensitiveDetector(object); }
diff -u -r1.3 -r1.4 --- dipoleSubscriber.cc 10 Jul 2013 18:06:20 -0000 1.3 +++ dipoleSubscriber.cc 13 Nov 2013 23:02:59 -0000 1.4 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/subscribers/dipoleSubscriber.cc,v 1.3 2013/07/10 18:06:20 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/subscribers/dipoleSubscriber.cc,v 1.4 2013/11/13 23:02:59 jeremy Exp $
// GDML #include "Saxana/SAXSubscriber.h"
@@ -15,27 +15,22 @@
/** * @brief Creates G4Dipole runtime objects from dipole elements. */
-class dipoleSubscriber: virtual public SAXSubscriber -{
+class dipoleSubscriber: virtual public SAXSubscriber {
public:
- virtual const SAXComponentObject* Build() const - {
+ virtual const SAXComponentObject* Build() const {
return this; } public:
- dipoleSubscriber() - {
+ dipoleSubscriber() {
Subscribe("dipole"); }
- virtual ~dipoleSubscriber() - {
+ virtual ~dipoleSubscriber() {
}
- virtual void Activate(const SAXObject* object) - {
+ virtual void Activate(const SAXObject* object) {
GDMLExpressionEvaluator* calc = GDMLProcessor::GetInstance()->GetEvaluator(); if (object) {
diff -u -r1.4 -r1.5 --- field_map_3dSubscriber.cc 4 Sep 2013 00:38:03 -0000 1.4 +++ field_map_3dSubscriber.cc 13 Nov 2013 23:02:59 -0000 1.5 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/subscribers/field_map_3dSubscriber.cc,v 1.4 2013/09/04 00:38:03 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/subscribers/field_map_3dSubscriber.cc,v 1.5 2013/11/13 23:02:59 jeremy Exp $
// lcdd #include "lcdd/core/LCDDProcessor.hh"
@@ -19,29 +19,24 @@
/** * @brief Creates FieldMap3D objects from field_map_3d elements. */
-class field_map_3dSubscriber: virtual public SAXSubscriber -{
+class field_map_3dSubscriber: virtual public SAXSubscriber {
public:
- virtual const SAXComponentObject* Build() const - {
+ virtual const SAXComponentObject* Build() const {
return this; } public:
- field_map_3dSubscriber() - {
+ field_map_3dSubscriber() {
Subscribe("field_map_3d"); }
- virtual ~field_map_3dSubscriber() - {
+ virtual ~field_map_3dSubscriber() {
}
- virtual void Activate(const SAXObject* object) - {
+ virtual void Activate(const SAXObject* object) {
//std::cout << "field_map_3d::Subscriber" << std::endl;
diff -u -r1.2 -r1.3 --- global_fieldSubscriber.cc 10 Jul 2013 18:06:20 -0000 1.2 +++ global_fieldSubscriber.cc 13 Nov 2013 23:02:59 -0000 1.3 @@ -1,4 +1,4 @@
-// $Id: global_fieldSubscriber.cc,v 1.2 2013/07/10 18:06:20 jeremy Exp $
+// $Id: global_fieldSubscriber.cc,v 1.3 2013/11/13 23:02:59 jeremy Exp $
// LCDD #include "lcdd/core/LCDDProcessor.hh"
@@ -20,26 +20,21 @@
* @brief Creates fields from global_field element. * @note Resolves fieldref and sets global field in LCDDProcessor. */
-class global_fieldSubscriber: virtual public SAXSubscriber -{
+class global_fieldSubscriber: virtual public SAXSubscriber {
public:
- virtual const SAXComponentObject* Build() const - {
+ virtual const SAXComponentObject* Build() const {
return this; } public:
- global_fieldSubscriber() - {
+ global_fieldSubscriber() {
Subscribe("global_field"); }
- virtual ~global_fieldSubscriber() - {
+ virtual ~global_fieldSubscriber() {
}
- virtual void Activate(const SAXObject* object) - {
+ virtual void Activate(const SAXObject* object) {
const global_field* fobj = 0; G4MagneticField* mag = 0; LCDDProcessor* proc = LCDDProcessor::instance();
diff -u -r1.2 -r1.3 --- headerSubscriber.cc 10 Jul 2013 18:06:20 -0000 1.2 +++ headerSubscriber.cc 13 Nov 2013 23:02:59 -0000 1.3 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/subscribers/headerSubscriber.cc,v 1.2 2013/07/10 18:06:20 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/subscribers/headerSubscriber.cc,v 1.3 2013/11/13 23:02:59 jeremy Exp $
// GDML #include "Saxana/SAXSubscriber.h"
@@ -20,26 +20,21 @@
/** * @brief Creates LCDDHeaderRecord objects from header elements. */
-class headerSubscriber: virtual public SAXSubscriber -{
+class headerSubscriber: virtual public SAXSubscriber {
public:
- virtual const SAXComponentObject* Build() const - {
+ virtual const SAXComponentObject* Build() const {
return this; } public:
- headerSubscriber() - {
+ headerSubscriber() {
Subscribe("header"); }
- virtual ~headerSubscriber() - {
+ virtual ~headerSubscriber() {
}
- virtual void Activate(const SAXObject* object) - {
+ virtual void Activate(const SAXObject* object) {
LCDDProcessor* proc = LCDDProcessor::instance(); const header* obj = dynamic_cast<const header*>(object); LCDDHeaderRecord* hdr = new LCDDHeaderRecord();
diff -u -r1.2 -r1.3 --- idspecSubscriber.cc 10 Jul 2013 18:06:20 -0000 1.2 +++ idspecSubscriber.cc 13 Nov 2013 23:02:59 -0000 1.3 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/subscribers/idspecSubscriber.cc,v 1.2 2013/07/10 18:06:20 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/subscribers/idspecSubscriber.cc,v 1.3 2013/11/13 23:02:59 jeremy Exp $
// GDML #include "Saxana/SAXSubscriber.h"
@@ -17,26 +17,21 @@
* @brief Creates IdSpec objects from idspec elements. * @note Also creates IdField objects from idfield child elements. */
-class idspecSubscriber: virtual public SAXSubscriber -{
+class idspecSubscriber: virtual public SAXSubscriber {
public:
- virtual const SAXComponentObject* Build() const - {
+ virtual const SAXComponentObject* Build() const {
return this; } public:
- idspecSubscriber() - {
+ idspecSubscriber() {
Subscribe("idspec"); }
- virtual ~idspecSubscriber() - {
+ virtual ~idspecSubscriber() {
}
- virtual void Activate(const SAXObject* object) - {
+ virtual void Activate(const SAXObject* object) {
//std::cout << "idspecSubscriber::Activate()" << std::endl; if (object) {
diff -u -r1.4 -r1.5 --- limitsetSubscriber.cc 10 Jul 2013 18:06:20 -0000 1.4 +++ limitsetSubscriber.cc 13 Nov 2013 23:02:59 -0000 1.5 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/subscribers/limitsetSubscriber.cc,v 1.4 2013/07/10 18:06:20 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/subscribers/limitsetSubscriber.cc,v 1.5 2013/11/13 23:02:59 jeremy Exp $
// GDML #include "Saxana/SAXSubscriber.h"
@@ -21,23 +21,19 @@
/** * @brief Creates PhysicsLimitSet objects from limitset elements. */
-class limitsetSubscriber: virtual public SAXSubscriber -{
+class limitsetSubscriber: virtual public SAXSubscriber {
public:
- virtual const SAXComponentObject* Build() const - {
+ virtual const SAXComponentObject* Build() const {
return this; } public:
- limitsetSubscriber() - {
+ limitsetSubscriber() {
Subscribe("limitset"); }
- virtual void Activate(const SAXObject* object) - {
+ virtual void Activate(const SAXObject* object) {
//std::cout << "limitsetSubscriber::Activate()" << std::endl; if (object != 0) {
diff -u -r1.3 -r1.4 --- regionSubscriber.cc 10 Jul 2013 18:06:20 -0000 1.3 +++ regionSubscriber.cc 13 Nov 2013 23:02:59 -0000 1.4 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/subscribers/regionSubscriber.cc,v 1.3 2013/07/10 18:06:20 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/subscribers/regionSubscriber.cc,v 1.4 2013/11/13 23:02:59 jeremy Exp $
// GDML #include "Saxana/SAXSubscriber.h"
@@ -23,22 +23,18 @@
/** * @brief Creates G4Region objects from region elements. */
-class regionSubscriber: virtual public SAXSubscriber -{
+class regionSubscriber: virtual public SAXSubscriber {
public:
- virtual const SAXComponentObject* Build() const - {
+ virtual const SAXComponentObject* Build() const {
return this; } public:
- regionSubscriber() - {
+ regionSubscriber() {
Subscribe("region"); }
- virtual void Activate(const SAXObject* object) - {
+ virtual void Activate(const SAXObject* object) {
if (object != 0) { LCDDProcessor* proc = LCDDProcessor::instance();
@@ -105,7 +101,9 @@
reg->SetUserLimits( ulim ); std::cout << "Set user limits <" << limitsetref->get_ref() << "> on region <" << name << ">" << std::endl; #else
- std::cerr << "WARNING: Ignoring limitsetref on region. The method G4Region::SetUserLimits is not supported by your Geant4 version." << std::endl;
+ std::cerr + << "WARNING: Ignoring limitsetref on region. The method G4Region::SetUserLimits is not supported by your Geant4 version." + << std::endl;
#endif } else { std::cerr << "FATAL ERROR: limit element not found - " << limitsetref->get_ref() << std::endl;
diff -u -r1.3 -r1.4 --- rz_field_mapSubscriber.cc 10 Jul 2013 18:06:20 -0000 1.3 +++ rz_field_mapSubscriber.cc 13 Nov 2013 23:02:59 -0000 1.4 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/subscribers/rz_field_mapSubscriber.cc,v 1.3 2013/07/10 18:06:20 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/subscribers/rz_field_mapSubscriber.cc,v 1.4 2013/11/13 23:02:59 jeremy Exp $
// GDML #include "Saxana/SAXSubscriber.h"
@@ -14,27 +14,22 @@
/** * @brief Creates RZFieldMap objects from rz_field_map elements. */
-class rz_field_mapSubscriber: virtual public SAXSubscriber -{
+class rz_field_mapSubscriber: virtual public SAXSubscriber {
public:
- virtual const SAXComponentObject* Build() const - {
+ virtual const SAXComponentObject* Build() const {
return this; } public:
- rz_field_mapSubscriber() - {
+ rz_field_mapSubscriber() {
Subscribe("rz_field_map"); }
- virtual ~rz_field_mapSubscriber() - {
+ virtual ~rz_field_mapSubscriber() {
} /** Instantiates a G4RZFieldMap object into Geant4 runtime. */
- virtual void Activate(const SAXObject* object) - {
+ virtual void Activate(const SAXObject* object) {
//std::cout << "rz_field_mapSubscriber" << std::endl; if (object != 0) {
diff -u -r1.3 -r1.4 --- solenoidSubscriber.cc 10 Jul 2013 18:06:20 -0000 1.3 +++ solenoidSubscriber.cc 13 Nov 2013 23:02:59 -0000 1.4 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/subscribers/solenoidSubscriber.cc,v 1.3 2013/07/10 18:06:20 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/subscribers/solenoidSubscriber.cc,v 1.4 2013/11/13 23:02:59 jeremy Exp $
// GDML #include "Saxana/SAXSubscriber.h"
@@ -14,26 +14,21 @@
/** * @brief Creates Solenoid objects from solenoid elements. */
-class solenoidSubscriber: virtual public SAXSubscriber -{
+class solenoidSubscriber: virtual public SAXSubscriber {
public:
- virtual const SAXComponentObject* Build() const - {
+ virtual const SAXComponentObject* Build() const {
return this; } public:
- solenoidSubscriber() - {
+ solenoidSubscriber() {
Subscribe("solenoid"); }
- virtual ~solenoidSubscriber() - {
+ virtual ~solenoidSubscriber() {
}
- virtual void Activate(const SAXObject* object) - {
+ virtual void Activate(const SAXObject* object) {
//std::cout << "solenoidSubscriber" << std::endl; GDMLExpressionEvaluator* calc = GDMLProcessor::GetInstance()->GetEvaluator();
diff -u -r1.3 -r1.4 --- trackerSubscriber.cc 10 Jul 2013 18:06:20 -0000 1.3 +++ trackerSubscriber.cc 13 Nov 2013 23:02:59 -0000 1.4 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/subscribers/trackerSubscriber.cc,v 1.3 2013/07/10 18:06:20 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/subscribers/trackerSubscriber.cc,v 1.4 2013/11/13 23:02:59 jeremy Exp $
// GDML #include "Saxana/SAXSubscriber.h"
@@ -17,26 +17,21 @@
/** * @brief Creates TrackerSD objects from tracker elements. */
-class trackerSubscriber: virtual public SAXSubscriber -{
+class trackerSubscriber: virtual public SAXSubscriber {
public:
- virtual const SAXComponentObject* Build() const - {
+ virtual const SAXComponentObject* Build() const {
return this; } public:
- trackerSubscriber() - {
+ trackerSubscriber() {
Subscribe("tracker"); }
- virtual ~trackerSubscriber() - {
+ virtual ~trackerSubscriber() {
}
- virtual void Activate(const SAXObject* object) - {
+ virtual void Activate(const SAXObject* object) {
SensitiveDetectorFactory::createSensitiveDetector(object); } };
diff -u -r1.2 -r1.3 --- visSubscriber.cc 10 Jul 2013 18:06:20 -0000 1.2 +++ visSubscriber.cc 13 Nov 2013 23:02:59 -0000 1.3 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/subscribers/visSubscriber.cc,v 1.2 2013/07/10 18:06:20 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/subscribers/visSubscriber.cc,v 1.3 2013/11/13 23:02:59 jeremy Exp $
// LCDD #include "lcdd/core/LCDDProcessor.hh"
@@ -16,26 +16,21 @@
/** * @brief Creates G4VisAttributes objects from vis elements. */
-class visSubscriber: virtual public SAXSubscriber -{
+class visSubscriber: virtual public SAXSubscriber {
public:
- virtual const SAXComponentObject* Build() const - {
+ virtual const SAXComponentObject* Build() const {
return this; } public:
- visSubscriber() - {
+ visSubscriber() {
Subscribe("vis"); }
- virtual ~visSubscriber() - {
+ virtual ~visSubscriber() {
}
- virtual void Activate(const SAXObject* object) - {
+ virtual void Activate(const SAXObject* object) {
//std::cout << "visSubscriber::Activate()" << std::endl; if (object != 0) {
@@ -99,8 +94,7 @@
//delete object; }
- static G4VisAttributes::LineStyle convertLineStyle(const std::string& s) - {
+ static G4VisAttributes::LineStyle convertLineStyle(const std::string& s) {
G4VisAttributes::LineStyle l = G4VisAttributes::unbroken; if (s == "unbroken") {
@@ -116,8 +110,7 @@
return l; }
- static G4VisAttributes::ForcedDrawingStyle convertDrawingStyle(const std::string& s) - {
+ static G4VisAttributes::ForcedDrawingStyle convertDrawingStyle(const std::string& s) {
G4VisAttributes::ForcedDrawingStyle d = G4VisAttributes::wireframe; if (s == "wireframe") { d = G4VisAttributes::wireframe;
diff -u -r1.3 -r1.4 --- volumeExtendedSubscriber.cc 10 Jul 2013 18:06:20 -0000 1.3 +++ volumeExtendedSubscriber.cc 13 Nov 2013 23:02:59 -0000 1.4 @@ -1,24 +1,20 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/subscribers/volumeExtendedSubscriber.cc,v 1.3 2013/07/10 18:06:20 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/subscribers/volumeExtendedSubscriber.cc,v 1.4 2013/11/13 23:02:59 jeremy Exp $
// LCDD #include "lcdd/subscribers/volumeExtendedSubscriber.hh"
-const SAXComponentObject* volumeExtendedSubscriber::Build() const -{
+const SAXComponentObject* volumeExtendedSubscriber::Build() const {
return this; }
-volumeExtendedSubscriber::volumeExtendedSubscriber() -{
+volumeExtendedSubscriber::volumeExtendedSubscriber() {
Subscribe("volume"); }
-volumeExtendedSubscriber::~volumeExtendedSubscriber() -{
+volumeExtendedSubscriber::~volumeExtendedSubscriber() {
}
-void volumeExtendedSubscriber::Activate(const SAXObject* object) -{
+void volumeExtendedSubscriber::Activate(const SAXObject* object) {
LCDDProcessor* proc = LCDDProcessor::instance(); const volume* vobj = 0; SensitiveDetector* g4sd = 0;
@@ -66,108 +62,108 @@
} else if ( seq->content(i).tag == "regionref" ) { // handle regionref
- // get regionref object - RegionType::regionref* regref = dynamic_cast<RegionType::regionref*> ( seq->content(i).object );
+ // get regionref object + RegionType::regionref* regref = dynamic_cast<RegionType::regionref*> ( seq->content(i).object );
- // get region from store - G4Region* reg = dynamic_cast<G4Region*> ( proc->getRegion( regref->get_ref() ) );
+ // get region from store + G4Region* reg = dynamic_cast<G4Region*> ( proc->getRegion( regref->get_ref() ) );
- // add LV to region - if ( reg ) { - reg->AddRootLogicalVolume( lv ); - } else { - G4cerr << "Failed to fetch and/or cast to region: " << regref->get_ref() << G4endl; - G4Exception("volumeExtendedSubscriber::Activate()", "", FatalException, "Invalid regionref."); - } - } else if ( seq->content(i).tag == "limitsetref" ) { - // handle limitsetref
+ // add LV to region + if ( reg ) { + reg->AddRootLogicalVolume( lv ); + } else { + G4cerr << "Failed to fetch and/or cast to region: " << regref->get_ref() << G4endl; + G4Exception("volumeExtendedSubscriber::Activate()", "", FatalException, "Invalid regionref."); + } + } else if ( seq->content(i).tag == "limitsetref" ) { + // handle limitsetref
- LimitSetType::limitsetref* limitsetref = dynamic_cast<LimitSetType::limitsetref*> ( seq->content(i).object );
+ LimitSetType::limitsetref* limitsetref = dynamic_cast<LimitSetType::limitsetref*> ( seq->content(i).object );
- G4UserLimits* ulim = dynamic_cast<PhysicsLimitSet*> ( proc->getLimitSet( limitsetref->get_ref() ) );
+ G4UserLimits* ulim = dynamic_cast<PhysicsLimitSet*> ( proc->getLimitSet( limitsetref->get_ref() ) );
- if ( ulim ) { - lv->SetUserLimits( ulim ); - std::cout << "Set user limits <" << limitsetref->get_ref() << "> on logical volume <" << lv->GetName() << ">" << std::endl; - } else { - std::cerr << "FATAL ERROR: limit element not found - " << limitsetref->get_ref() << std::endl; - G4Exception("", "", FatalException, "limitsetref not found."); - } - } else if ( seq->content(i).tag == "visref" ) { - // handle visref
+ if ( ulim ) { + lv->SetUserLimits( ulim ); + std::cout << "Set user limits <" << limitsetref->get_ref() << "> on logical volume <" << lv->GetName() << ">" << std::endl; + } else { + std::cerr << "FATAL ERROR: limit element not found - " << limitsetref->get_ref() << std::endl; + G4Exception("", "", FatalException, "limitsetref not found."); + } + } else if ( seq->content(i).tag == "visref" ) { + // handle visref
- //std::cout << "handling visref" << std::endl;
+ //std::cout << "handling visref" << std::endl;
- VisType::visref* visref = dynamic_cast<VisType::visref*> ( seq->content(i).object );
+ VisType::visref* visref = dynamic_cast<VisType::visref*> ( seq->content(i).object );
- G4VisAttributes* vis = dynamic_cast<G4VisAttributes*> ( proc->getVisAttributes( visref->get_ref() ) );
+ G4VisAttributes* vis = dynamic_cast<G4VisAttributes*> ( proc->getVisAttributes( visref->get_ref() ) );
- if ( vis ) { - //std::cout << "assigning vis: " << visref->get_ref() << std::endl; - lv->SetVisAttributes( vis ); - } else { - std::cerr << "FATAL ERROR: vis element not found - " << visref->get_ref() << std::endl; - G4Exception("", "", FatalException, "vis element not found."); - } - }
+ if ( vis ) { + //std::cout << "assigning vis: " << visref->get_ref() << std::endl; + lv->SetVisAttributes( vis ); + } else { + std::cerr << "FATAL ERROR: vis element not found - " << visref->get_ref() << std::endl; + G4Exception("", "", FatalException, "vis element not found."); + } + }
- if ( seq->content(i).tag == "physvol" ) { - // handle physvols to look for physvolids
+ if ( seq->content(i).tag == "physvol" ) { + // handle physvols to look for physvolids
- ++nchildren;
+ ++nchildren;
- // get physvol content sequence - physvol* pv = dynamic_cast<physvol*>( seq->content(i).object ); - const ContentSequence* pv_seq = pv->get_content(); - size_t ccount = pv_seq->size();
+ // get physvol content sequence + physvol* pv = dynamic_cast<physvol*>( seq->content(i).object ); + const ContentSequence* pv_seq = pv->get_content(); + size_t ccount = pv_seq->size();
- // iterate over physvol content - for ( size_t pvidx = 0; pvidx < ccount; pvidx++ ) {
+ // iterate over physvol content + for ( size_t pvidx = 0; pvidx < ccount; pvidx++ ) {
- // found "choice" tag? - if( pv_seq->content(pvidx).tag == "choice" ) {
+ // found "choice" tag? + if( pv_seq->content(pvidx).tag == "choice" ) {
- const ContentChoice* pv_choice = dynamic_cast<const ContentChoice*>( pv_seq->content(pvidx).object );
+ const ContentChoice* pv_choice = dynamic_cast<const ContentChoice*>( pv_seq->content(pvidx).object );
- // found a physvolid? - if ( pv_choice->content().tag == "physvolid" ) {
+ // found a physvolid? + if ( pv_choice->content().tag == "physvolid" ) {
- // add the physvolid...
+ // add the physvolid...
- physvolidElem* pvid_elem = - dynamic_cast<physvolidElem*>( pv_choice->content().object );
+ physvolidElem* pvid_elem = + dynamic_cast<physvolidElem*>( pv_choice->content().object );
- if ( pvid_elem == 0 ) { - G4Exception("", "", FatalException, "Failed cast to physvolidElem."); - }
+ if ( pvid_elem == 0 ) { + G4Exception("", "", FatalException, "Failed cast to physvolidElem."); + }
- GDMLExpressionEvaluator* calc = GDMLProcessor::GetInstance()->GetEvaluator();
+ GDMLExpressionEvaluator* calc = GDMLProcessor::GetInstance()->GetEvaluator();
- std::string strID = pvid_elem->get_value(); - std::string fld = pvid_elem->get_field_name();
+ std::string strID = pvid_elem->get_value(); + std::string fld = pvid_elem->get_field_name();
- int intID = (int)calc->Eval( strID );
+ int intID = (int)calc->Eval( strID );
- PhysVolId pvid(intID, fld);
+ PhysVolId pvid(intID, fld);
- // assign physvolid to lv's child by the in-order idx - IdManager::instance()->addPhysVolId( - lv, // LV mom - nchildren - 1, // child idx in mom - pvid ); // PhysVolId - }
+ // assign physvolid to lv's child by the in-order idx + IdManager::instance()->addPhysVolId( + lv,// LV mom + nchildren - 1,// child idx in mom + pvid );// PhysVolId + }
+ } + } + }
}
+ } else { + G4Exception("", "", FatalException, "Failed cast to G4LogicalVolume.");
}
+ } else { + G4Exception("", "", FatalException, "Failed cast to volume.");
} }
- } else { - G4Exception("", "", FatalException, "Failed cast to G4LogicalVolume.");
}
- } else { - G4Exception("", "", FatalException, "Failed cast to volume."); - } - } -}
//DECLARE_SUBSCRIBER_FACTORY(volumeExtendedSubscriber)
diff -u -r1.1 -r1.2 --- GDMLWriter.cc 26 Jun 2013 23:51:02 -0000 1.1 +++ GDMLWriter.cc 13 Nov 2013 23:02:59 -0000 1.2 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/util/GDMLWriter.cc,v 1.1 2013/06/26 23:51:02 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/util/GDMLWriter.cc,v 1.2 2013/11/13 23:02:59 jeremy Exp $
// LCDD #include "lcdd/util/GDMLWriter.hh"
@@ -10,8 +10,7 @@
#include "G4VPhysicalVolume.hh" #include "G4TransportationManager.hh"
-void GDMLWriter::writeCurrentGeometry(const std::string& fileName, std::vector<std::string> volumes) -{
+void GDMLWriter::writeCurrentGeometry(const std::string& fileName, std::vector<std::string> volumes) {
G4VPhysicalVolume* world = G4TransportationManager::GetTransportationManager()->GetNavigatorForTracking()->GetWorldVolume(); G4GDMLWriter g4writer("http://www.lcsim.org/schemas/gdml/1.0/gdml.xsd", fileName); try {
@@ -21,8 +20,7 @@
} }
-void GDMLWriter::writeCurrentGeometry(const std::string& fileName) -{
+void GDMLWriter::writeCurrentGeometry(const std::string& fileName) {
G4cout << "Dumping current geometry to file <" << fileName << ">" << G4endl; G4VPhysicalVolume* world =
diff -u -r1.2 -r1.3 --- GDMLWriterMessenger.cc 3 Jul 2013 23:33:51 -0000 1.2 +++ GDMLWriterMessenger.cc 13 Nov 2013 23:02:59 -0000 1.3 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/util/GDMLWriterMessenger.cc,v 1.2 2013/07/03 23:33:51 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/util/GDMLWriterMessenger.cc,v 1.3 2013/11/13 23:02:59 jeremy Exp $
// LCDD #include "lcdd/util/GDMLWriterMessenger.hh"
@@ -7,17 +7,14 @@
// Geant4 #include "G4UIcmdWithAString.hh"
-GDMLWriterMessenger::GDMLWriterMessenger() -{
+GDMLWriterMessenger::GDMLWriterMessenger() {
defineCommands(); }
-GDMLWriterMessenger::~GDMLWriterMessenger() -{
+GDMLWriterMessenger::~GDMLWriterMessenger() {
}
-void GDMLWriterMessenger::SetNewValue(G4UIcommand *, G4String newVals) -{
+void GDMLWriterMessenger::SetNewValue(G4UIcommand *, G4String newVals) {
std::string volume; std::string fileName; std::istringstream is(newVals);
@@ -33,8 +30,7 @@
} }
-void GDMLWriterMessenger::defineCommands() -{
+void GDMLWriterMessenger::defineCommands() {
_dumpGDMLCmd = new G4UIcommand("/lcdd/dumpGDML", this); _dumpGDMLCmd->SetGuidance("Dump current geometry to GDML output file."); G4UIparameter* p = new G4UIparameter("outputFile", 's', false);
diff -u -r1.2 -r1.3 --- NistElementsDump.cc 10 Jul 2013 20:49:06 -0000 1.2 +++ NistElementsDump.cc 13 Nov 2013 23:02:59 -0000 1.3 @@ -1,4 +1,4 @@
-// $Id: NistElementsDump.cc,v 1.2 2013/07/10 20:49:06 jeremy Exp $
+// $Id: NistElementsDump.cc,v 1.3 2013/11/13 23:02:59 jeremy Exp $
// LCDD #include "lcdd/util/NistElementsDump.hh"
@@ -21,21 +21,17 @@
#include "lcdd/util/ElementNames.icc"
-NistElementsDump::NistElementsDump() -{
+NistElementsDump::NistElementsDump() {
}
- -void NistElementsDump::writeXml(const std::string& filename) -{
+void NistElementsDump::writeXml(const std::string& filename) {
ofstream fstr; fstr.open(filename.c_str(), fstream::out); printXml(fstr); fstr.close(); }
-void NistElementsDump::printXml(std::ostream& out) -{
+void NistElementsDump::printXml(std::ostream& out) {
// Get the NIST manager from G4. G4NistManager* mgr = G4NistManager::Instance();
diff -u -r1.1 -r1.2 --- StringUtil.cc 26 Jun 2013 23:51:02 -0000 1.1 +++ StringUtil.cc 13 Nov 2013 23:02:59 -0000 1.2 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/util/StringUtil.cc,v 1.1 2013/06/26 23:51:02 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/util/StringUtil.cc,v 1.2 2013/11/13 23:02:59 jeremy Exp $
// LCDD #include "lcdd/util/StringUtil.hh"
@@ -20,22 +20,19 @@
using std::istringstream; using std::vector;
-string StringUtil::toString(double d) -{
+string StringUtil::toString(double d) {
stringstream ostr; ostr << d; return ostr.str(); }
-string StringUtil::toString(float f) -{
+string StringUtil::toString(float f) {
stringstream ostr; ostr << f; return ostr.str(); }
-string StringUtil::toString(bool b) -{
+string StringUtil::toString(bool b) {
if (b) { return "1"; }
@@ -43,42 +40,36 @@
return "0"; }
-string StringUtil::toString(int i) -{
+string StringUtil::toString(int i) {
stringstream ostr; ostr << i; return ostr.str(); }
-string& StringUtil::toLower(string& s) -{
+string& StringUtil::toLower(string& s) {
std::transform(s.begin(), s.end(), s.begin(), tolower); return s; }
-string& StringUtil::toLower(const string& s) -{
+string& StringUtil::toLower(const string& s) {
return StringUtil::toLower(const_cast<string&>(s)); }
-double StringUtil::toDouble(string& s) -{
+double StringUtil::toDouble(string& s) {
std::istringstream is(s.c_str()); double d; is >> d; return d; }
-int StringUtil::toInt(string& s) -{
+int StringUtil::toInt(string& s) {
std::istringstream is(s.c_str()); int i; is >> i; return i; }
-bool StringUtil::toBool(string& s) -{
+bool StringUtil::toBool(string& s) {
if (StringUtil::toLower(s) == "true" || s == "1") { return true; } else {
@@ -86,18 +77,15 @@
} }
-bool StringUtil::toBool(const string& s) -{
+bool StringUtil::toBool(const string& s) {
return StringUtil::toBool(const_cast<string&>(s)); }
-double StringUtil::toDouble(const string& s) -{
+double StringUtil::toDouble(const string& s) {
return StringUtil::toDouble(const_cast<string&>(s)); }
-void StringUtil::trim(string& str) -{
+void StringUtil::trim(string& str) {
string::size_type pos = str.find_last_not_of(' '); if (pos != string::npos) { str.erase(pos + 1);
@@ -108,8 +96,7 @@
str.erase(str.begin(), str.end()); }
-string StringUtil::concatStrVec(const vector<string>& s_vec, const string& sep) -{
+string StringUtil::concatStrVec(const vector<string>& s_vec, const string& sep) {
string r; // concat w/ a space in between
@@ -123,8 +110,7 @@
return r; }
-void StringUtil::split(const string& str, const string& delimiters, vector<string>& tokens) -{
+void StringUtil::split(const string& str, const string& delimiters, vector<string>& tokens) {
// Skip delimiters at beginning. string::size_type lastPos = str.find_first_not_of(delimiters, 0);
diff -u -r1.3 -r1.4 --- Verbose.cc 10 Jul 2013 18:06:20 -0000 1.3 +++ Verbose.cc 13 Nov 2013 23:02:59 -0000 1.4 @@ -1,25 +1,21 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/util/Verbose.cc,v 1.3 2013/07/10 18:06:20 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/util/Verbose.cc,v 1.4 2013/11/13 23:02:59 jeremy Exp $
// LCDD #include "lcdd/util/Verbose.hh" const Verbose::LevelType Verbose::_defaultLevel = 0;
-Verbose::Verbose(LevelType lt) -{
+Verbose::Verbose(LevelType lt) {
_level = lt; }
-Verbose::~Verbose() -{
+Verbose::~Verbose() {
}
-Verbose::LevelType Verbose::verbose() const -{
+Verbose::LevelType Verbose::verbose() const {
return _level; }
-void Verbose::setVerbose(LevelType lt) -{
+void Verbose::setVerbose(LevelType lt) {
_level = lt; }
Use REPLY-ALL to reply to list
To unsubscribe from the LCD-CVS list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=LCD-CVS&A=1