14 modified files
lcdd/src
diff -u -r1.1 -r1.2
--- G4LimitSet.cc 9 Jul 2005 00:25:57 -0000 1.1
+++ G4LimitSet.cc 1 Feb 2012 10:28:56 -0000 1.2
@@ -79,7 +79,7 @@
m_limitsMap[limitName][particleType] = limitValue;
}
else {
- G4Exception(limitName + " is not a valid limits map.");
+ G4Exception("", "", FatalException, "Invalid limits map.");
}
}
@@ -103,7 +103,7 @@
}
}
else {
- G4Exception(limitName + " is not a valid limits map.");
+ G4Exception("", "", FatalException, "Invalid limits map.");
}
//std::cout << "limitValue: " << limitValue << std::endl;
return limitValue;
lcdd/src
diff -u -r1.10 -r1.11
--- G4RZFieldMap.cc 8 Dec 2006 00:43:49 -0000 1.10
+++ G4RZFieldMap.cc 1 Feb 2012 10:28:56 -0000 1.11
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/G4RZFieldMap.cc,v 1.10 2006/12/08 00:43:49 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/G4RZFieldMap.cc,v 1.11 2012/02/01 10:28:56 jeremy Exp $
#include "G4RZFieldMap.hh"
#include "globals.hh"
@@ -35,19 +35,19 @@
#endif
if ( numBinsR < 2 ) {
- G4Exception("numBinsR must be >= 2");
+ G4Exception("", "", FatalException, "numBinsR must be >= 2");
}
if ( numBinsZ < 2 ) {
- G4Exception("numBinsZ must be >= 2");
+ G4Exception("", "", FatalException, "numBinsZ must be >= 2");
}
if ( gridSizeR <= 0 ) {
- G4Exception("gridSizeR must be >= 0");
+ G4Exception("", "", FatalException, "gridSizeR must be >= 0");
}
if ( gridSizeZ <= 0 ) {
- G4Exception("gridSizeZ must be >= 0");
+ G4Exception("", "", FatalException, "gridSizeZ must be >= 0");
}
m_maxR = ( numBinsR - 1 ) * m_gridSizeR;
lcdd/src
diff -u -r1.8 -r1.9
--- G4SegmentationFactory.cc 30 Oct 2009 23:16:59 -0000 1.8
+++ G4SegmentationFactory.cc 1 Feb 2012 10:28:56 -0000 1.9
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/G4SegmentationFactory.cc,v 1.8 2009/10/30 23:16:59 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/G4SegmentationFactory.cc,v 1.9 2012/02/01 10:28:56 jeremy Exp $
// GDML
#include "Saxana/SAXObject.h"
@@ -170,7 +170,7 @@
if (seg == 0)
{
- G4Exception("Failed to create segmentation!");
+ G4Exception("", "", FatalException, "Failed to create segmentation.");
}
return seg;
lcdd/src
diff -u -r1.25 -r1.26
--- IdFactory.cc 24 May 2007 19:29:05 -0000 1.25
+++ IdFactory.cc 1 Feb 2012 10:28:56 -0000 1.26
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/IdFactory.cc,v 1.25 2007/05/24 19:29:05 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/IdFactory.cc,v 1.26 2012/02/01 10:28:56 jeremy Exp $
// set for verbose output from this class
//#define ID_DEBUG 1
@@ -33,7 +33,7 @@
/* IdVec (expanded id) size must equal IdSpec size or die. */
if ( idvec.size() != idspec->getNumFields() ) {
- G4Exception("FATAL ERROR: idspec size != idvec size.");
+ G4Exception("", "", FatalException, "idspec size != idvec size.");
}
/* Make a 64-bit id to return. */
@@ -81,7 +81,7 @@
*/
if ( ( field_start < 32 ) && (field_start + field_bit_len > 32 ) ) {
G4cerr << "Field <" << id_field->getLabel() << "> crosses the 32-bit boundary." << G4endl;
- G4Exception("FATAL ERROR: Ids are currently not allowed to cross the 32-bit boundary.");
+ G4Exception("", "", FatalException, "Fields are not allowed to cross the 32-bit boundary.");
}
/* check if on 2nd dbl word. */
else if ( field_start >= 32 ) {
@@ -121,7 +121,7 @@
<< "> is too big for the field <"
<< id_field->getLabel() << ">, len <"
<< field_bit_len << ">." << G4endl;
- G4Exception("FATAL ERROR: Id value too large for field.");
+ G4Exception("", "", FatalException, "Value too large for field.");
}
// }
// else {
@@ -260,7 +260,7 @@
bin_val = ReadoutUtil::getVolumeNumber( aStep->GetPreStepPoint()->GetTouchableHandle() );
if ( -1 == bin_val ) {
- G4Exception("FATAL ERROR: Valid copy number not found for PV.");
+ G4Exception("", "", FatalException, "Valid copy number not found for PV.");
}
else {
fnd_it = true;
lcdd/src
diff -u -r1.13 -r1.14
--- LCDDDetectorConstruction.cc 16 Feb 2007 02:04:47 -0000 1.13
+++ LCDDDetectorConstruction.cc 1 Feb 2012 10:28:56 -0000 1.14
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/LCDDDetectorConstruction.cc,v 1.13 2007/02/16 02:04:47 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/LCDDDetectorConstruction.cc,v 1.14 2012/02/01 10:28:56 jeremy Exp $
// LCDD
#include "LCDDDetectorConstruction.hh"
@@ -66,7 +66,7 @@
void LCDDDetectorConstruction::setWorldVolume(G4VPhysicalVolume *pv)
{
if (pv == 0) {
- G4Exception("FATAL ERROR: Setting DetConstr world volume to NULL is not allowed!");
+ G4Exception("", "", FatalException, "PhysVol points to null.");
}
m_world = pv;
lcdd/src
diff -u -r1.11 -r1.12
--- LCDDParser.cc 30 Oct 2009 23:16:59 -0000 1.11
+++ LCDDParser.cc 1 Feb 2012 10:28:56 -0000 1.12
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/LCDDParser.cc,v 1.11 2009/10/30 23:16:59 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/LCDDParser.cc,v 1.12 2012/02/01 10:28:56 jeremy Exp $
#include "LCDDParser.hh"
// lcdd
@@ -100,7 +100,7 @@
m_world = (G4VPhysicalVolume*)GDMLProcessor::GetInstance()->GetWorldVolume();
}
catch (std::exception& e) {
- G4Exception("LCDD failed to create the world volume!");
+ G4Exception("", "", FatalException, "Failed to get the world volume.");
}
// Setup magnetic field.
lcdd/src
diff -u -r1.13 -r1.14
--- ReadoutUtil.cc 30 Oct 2009 23:16:59 -0000 1.13
+++ ReadoutUtil.cc 1 Feb 2012 10:28:56 -0000 1.14
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/ReadoutUtil.cc,v 1.13 2009/10/30 23:16:59 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/ReadoutUtil.cc,v 1.14 2012/02/01 10:28:56 jeremy Exp $
#include "ReadoutUtil.hh"
#include <cmath>
@@ -61,28 +61,14 @@
{
const G4Tubs* tubs = 0;
G4VSolid* solid = ReadoutUtil::getSolidFromStepPoint( aStep->GetPreStepPoint() );
- G4String solidType = solid->GetEntityType();
-
- if ( solidType == "G4Tubs" ) {
- tubs = static_cast<const G4Tubs*> ( solid );
- }
- else {
- G4Exception("ReadoutUtil::getTubs() - G4VSolid from the step is not a tubs.");
- }
+ tubs = static_cast<const G4Tubs*> ( solid );
return tubs;
}
const G4Tubs* ReadoutUtil::getTubs(const G4StepPoint* aPreStepPoint)
{
const G4Tubs* tubs = 0;
G4VSolid* solid = ReadoutUtil::getSolidFromStepPoint( aPreStepPoint);
- G4String solidType = solid->GetEntityType();
-
- if ( solidType == "G4Tubs" ) {
- tubs = static_cast<const G4Tubs*> ( solid );
- }
- else {
- G4Exception("ReadoutUtil::getTubs() - G4VSolid from the step is not a tubs.");
- }
+ tubs = static_cast<const G4Tubs*> ( solid );
return tubs;
}
double ReadoutUtil::computeTubsMidRadius(const G4Tubs* tubs)
lcdd/src
diff -u -r1.22 -r1.23
--- SensitiveDetectorFactory.cc 8 Dec 2010 21:06:24 -0000 1.22
+++ SensitiveDetectorFactory.cc 1 Feb 2012 10:28:56 -0000 1.23
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/SensitiveDetectorFactory.cc,v 1.22 2010/12/08 21:06:24 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/SensitiveDetectorFactory.cc,v 1.23 2012/02/01 10:28:56 jeremy Exp $
#include "SensitiveDetectorFactory.hh"
// lcdd
@@ -46,7 +46,7 @@
else
{
G4cerr << "Invalid sd_type <" << sd_type << ">." << G4endl;
- G4Exception( "Unknown SD type. Check the LCDD file." );
+ G4Exception( "", "", FatalException, "Unknown SD type. Check the LCDD file." );
}
// set ecut and verbose
@@ -67,7 +67,7 @@
}
else
{
- G4Exception( "Failed cast to SensitiveDetectorType." );
+ G4Exception("", "", FatalException, "Failed cast to SensitiveDetectorType.");
}
return sd;
@@ -117,8 +117,8 @@
if ( hitCompareStr != "id" && hitCompareStr != "position" )
{
- G4Exception( "Invalid selection for hit comparison <" + hitCompareStr
- + ">, for calorimeter <" + sdt->get_name() + ">." );
+ G4cerr << "Invalid selection for hit comparison <" << hitCompareStr << ">, for calorimeter <" << sdt->get_name() << ">." << G4endl;
+ G4Exception("", "", FatalException, "Invalid selection for hit comparison.");
}
// Compare on IDs.
@@ -173,8 +173,9 @@
}
else
{
- G4Exception( "SensitiveDetectorFactory - Unknown sensitive detector type: "
- + sd_type );
+
+ G4cerr << "Unknown sensitive detector type: " << sd_type << G4endl;
+ G4Exception("SensitiveDetectorFactory", "", FatalException, "Unknown sensitive detector type.");
}
return sd;
@@ -193,8 +194,7 @@
if ( checkHCName( hc ) )
{
- G4Exception(
- "SensitiveDetectorFactory - There was a problem with the name of the hits collection." );
+ G4Exception("SensitiveDetectorFactory", "", FatalException, "Name of the hits collection is invalid.");
}
/* tracker that aggregates hits */
@@ -222,8 +222,7 @@
if ( checkHCName( hc ) )
{
- G4Exception(
- "SensitiveDetectorFactory - There was a problem with the name of the hits collection." );
+ G4Exception("SensitiveDetectorFactory", "", FatalException, "Name of the hits collections is invalid.");
}
sd = new G4ScorerSD( nm, hc );
@@ -250,9 +249,8 @@
if ( idspec == 0 )
{
- G4Exception( "The IdSpec <" + id_ref->get_ref()
- + "> referenced by detector <" + sdt->get_name()
- + "> does not exist!" );
+ G4cerr << "IdSpec <" << id_ref->get_ref() << "> referenced by detector <" << sdt->get_name() << "> does not exist." << G4endl;
+ G4Exception("", "", FatalException, "IdSpec does not exist.");
}
break;
lcdd/src
diff -u -r1.7 -r1.8
--- idspecSubscriber.cc 5 Jun 2006 17:41:30 -0000 1.7
+++ idspecSubscriber.cc 1 Feb 2012 10:28:56 -0000 1.8
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/idspecSubscriber.cc,v 1.7 2006/06/05 17:41:30 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/idspecSubscriber.cc,v 1.8 2012/02/01 10:28:56 jeremy Exp $
// GDML
#include "Saxana/SAXSubscriber.h"
@@ -109,7 +109,7 @@
idspec->addIdField( idfield );
}
else {
- G4Exception( "Failed cast to idfieldElem." );
+ G4Exception("", "", FatalException, "Failed cast to idfieldElem." );
}
}
else {
@@ -118,11 +118,11 @@
}
}
else {
- G4Exception( "Failed cast to idspecElem." );
+ G4Exception("", "", FatalException, "Failed cast to idspecElem.");
}
}
else {
- G4Exception( "SAXObject is null!" );
+ G4Exception("", "", FatalException, "SAXObject is null!");
}
//delete object;
lcdd/src
diff -u -r1.2 -r1.3
--- limitsetProcess.cc 5 Jun 2006 17:41:30 -0000 1.2
+++ limitsetProcess.cc 1 Feb 2012 10:28:56 -0000 1.3
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/limitsetProcess.cc,v 1.2 2006/06/05 17:41:30 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/limitsetProcess.cc,v 1.3 2012/02/01 10:28:56 jeremy Exp $
#include "limitset.hh"
#include "limit.hh"
@@ -57,7 +57,7 @@
lim->add_content( name, *so);
}
else {
- G4Exception("limitsetProcess::StackPopNotify() - Failed cast to limitset.");
+ G4Exception("limitsetProcess::StackPopNotify()", "", FatalException, "Failed cast to limitset.");
}
}
else {
lcdd/src
diff -u -r1.3 -r1.4
--- limitsetSubscriber.cc 5 Jun 2006 17:41:30 -0000 1.3
+++ limitsetSubscriber.cc 1 Feb 2012 10:28:56 -0000 1.4
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/limitsetSubscriber.cc,v 1.3 2006/06/05 17:41:30 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/limitsetSubscriber.cc,v 1.4 2012/02/01 10:28:56 jeremy Exp $
// GDML
#include "Saxana/SAXSubscriber.h"
@@ -88,7 +88,7 @@
}
}
else {
- G4Exception("Failed cast to limit.");
+ G4Exception("", "", FatalException, "Failed cast to limit.");
}
}
}
@@ -96,7 +96,7 @@
LCDDProcessor::instance()->addLimitSet(ls->getName(), ls);
}
else {
- G4Exception("Failed cast to limitset.");
+ G4Exception("", "", FatalException, "Failed cast to limitset.");
}
}
}
lcdd/src
diff -u -r1.14 -r1.15
--- regionSubscriber.cc 15 Oct 2009 00:08:24 -0000 1.14
+++ regionSubscriber.cc 1 Feb 2012 10:28:56 -0000 1.15
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/regionSubscriber.cc,v 1.14 2009/10/15 00:08:24 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/regionSubscriber.cc,v 1.15 2012/02/01 10:28:56 jeremy Exp $
// GDML
#include "Saxana/SAXSubscriber.h"
@@ -108,7 +108,7 @@
}
else {
std::cerr << "FATAL ERROR: limit element not found - " << limitsetref->get_ref() << std::endl;
- G4Exception( "limitsetref not found." );
+ G4Exception("", "", FatalException, "limitsetref not found.");
}
}
else {
lcdd/src
diff -u -r1.6 -r1.7
--- rz_field_mapSubscriber.cc 5 Jun 2006 17:41:31 -0000 1.6
+++ rz_field_mapSubscriber.cc 1 Feb 2012 10:28:56 -0000 1.7
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/rz_field_mapSubscriber.cc,v 1.6 2006/06/05 17:41:31 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/rz_field_mapSubscriber.cc,v 1.7 2012/02/01 10:28:56 jeremy Exp $
#include "Saxana/SAXSubscriber.h"
#include "Saxana/SAXComponentFactory.h"
@@ -101,7 +101,7 @@
fieldData.push_back(RZBData(r, z, Br, Bz));
}
else {
- G4Exception("Failed cast to rzB.");
+ G4Exception("", "", FatalException, "Failed cast to rzB.");
}
}
else {
@@ -113,11 +113,11 @@
LCDDProcessor::instance()->addMagneticField(name, fmap);
}
else {
- G4Exception("Failed cast to rz_field_map.");
+ G4Exception("", "", FatalException, "Failed cast to rz_field_map.");
}
}
else {
- G4Exception("SAXObject is null.");
+ G4Exception("", "", FatalException, "SAXObject is null.");
}
}
};
lcdd/src
diff -u -r1.29 -r1.30
--- volumeExtendedSubscriber.cc 19 Jun 2007 23:55:05 -0000 1.29
+++ volumeExtendedSubscriber.cc 1 Feb 2012 10:28:56 -0000 1.30
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/volumeExtendedSubscriber.cc,v 1.29 2007/06/19 23:55:05 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/volumeExtendedSubscriber.cc,v 1.30 2012/02/01 10:28:56 jeremy Exp $
#include "volumeExtendedSubscriber.hh"
@@ -59,14 +59,15 @@
if (g4sd) {
if ( !g4sd->isValidVolume( lv ) ) {
- G4Exception("FATAL ERROR: The G4LogicalVolume <" + lv->GetName() + "> is not valid for the SD <" + g4sd->GetName() + ">.");
+ //G4Exception("FATAL ERROR: The G4LogicalVolume <" + lv->GetName() + "> is not valid for the SD <" + g4sd->GetName() + ">.");
+ G4Exception("", "", FatalException, "LogVol not valid for the SD");
}
lv->SetSensitiveDetector(g4sd);
}
else {
- std::cerr << "SD not found: " << sd->get_ref() << "." << std::endl;
- G4Exception( "volumeExtendedSubscriber::Activate() - Invalid sdref.");
+ G4cerr << "SD not found: " << sd->get_ref() << "." << G4endl;
+ G4Exception( "volumeExtendedSubscriber::Activate()", "", FatalException, "Invalid sdref.");
}
}
// handle regionref
@@ -85,18 +86,16 @@
reg->AddRootLogicalVolume( lv );
}
else {
- std::cerr << "Failed to fetch and/or cast to region: " << regref->get_ref() << std::endl;
- G4Exception( "volumeExtendedSubscriber::Activate() - Invalid regionref.");
+ G4cerr << "Failed to fetch and/or cast to region: " << regref->get_ref() << G4endl;
+ G4Exception("volumeExtendedSubscriber::Activate()", "", FatalException, "Invalid regionref.");
}
}
// handle limitsetref
else if ( seq->content(i).tag == "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<G4LimitSet*> ( proc->getLimitSet( limitsetref->get_ref() ) );
+ G4UserLimits* ulim = dynamic_cast<G4LimitSet*> ( proc->getLimitSet( limitsetref->get_ref() ) );
if ( ulim ) {
lv->SetUserLimits( ulim );
@@ -104,7 +103,7 @@
}
else {
std::cerr << "FATAL ERROR: limit element not found - " << limitsetref->get_ref() << std::endl;
- G4Exception( "limitsetref not found." );
+ G4Exception("", "", FatalException, "limitsetref not found.");
}
}
@@ -125,7 +124,7 @@
}
else {
std::cerr << "FATAL ERROR: vis element not found - " << visref->get_ref() << std::endl;
- G4Exception("vis element not found.");
+ G4Exception("", "", FatalException, "vis element not found.");
}
}
// handle physvols to look for physvolids
@@ -156,7 +155,7 @@
dynamic_cast<physvolidElem*>( pv_choice->content().object );
if ( pvid_elem == 0 ) {
- G4Exception("Failed cast to physvolidElem.");
+ G4Exception("", "", FatalException, "Failed cast to physvolidElem.");
}
GDMLExpressionEvaluator* calc = GDMLProcessor::GetInstance()->GetEvaluator();
@@ -181,11 +180,11 @@
}
}
else {
- G4Exception("Failed cast to G4LogicalVolume!");
+ G4Exception("", "", FatalException, "Failed cast to G4LogicalVolume.");
}
}
else {
- G4Exception("Failed cast to volume!");
+ G4Exception("", "", FatalException, "Failed cast to volume.");
}
}
CVSspam 0.2.12