Skip to content
Snippets Groups Projects
Commit 68b45ed1 authored by Riccardo Maria Bianchi's avatar Riccardo Maria Bianchi :sunny: Committed by Johannes Junggeburth
Browse files

Increase debug level to reduce clutter; add new log messages

parent 025f675a
No related branches found
No related tags found
1 merge request!327New schema for the GeoModel SQLite database and updated I/O
......@@ -147,7 +147,7 @@ void WriteGeoModel::handleFullPhysVol(const GeoFullPhysVol* vol) {
}
void WriteGeoModel::handleVPhysVolObjects(const GeoVPhysVol* vol) {
if (m_loglevel >= 2) {
if (m_loglevel >= 3) {
std::cout << "WriteGeoModel::handleVPhysVolObjects() -- visiting... "
<< vol << std::endl;
}
......@@ -338,7 +338,7 @@ void WriteGeoModel::handleVPhysVolObjects(const GeoVPhysVol* vol) {
const unsigned int volCopyN = setVolumeCopyNumber(physId, volTypeStr);
// debug msg
if (m_loglevel >= 2) {
if (m_loglevel >= 3) {
std::cout << "WriteGeoModel -- physId: " << physId
<< "- volume copy number : " << volCopyN << std::endl;
}
......@@ -739,6 +739,10 @@ unsigned int WriteGeoModel::storeMaterial(const GeoMaterial* mat) {
const double matDensity = mat->getDensity(); // The density of the material
const unsigned numElements = mat->getNumElements(); // The number of elements composing the material
if (m_loglevel >= 3) {
std::cout << "mat: " << matName << " -- get n elems: " << numElements << std::endl;
}
if (0 == numElements) {
THROW_EXCEPTION("ERROR!!! The material '" << matName << "' has zero elements!");
}
......@@ -1648,14 +1652,17 @@ unsigned int WriteGeoModel::storeObj(const GeoElement* pointer,
const std::string& name,
const std::string& symbol,
const double& elZ, const double& elA) {
if(m_loglevel>=3) std::cout << "storing " << name << std::endl;
std::string address = getAddressStringFromPointer(pointer);
unsigned int elementId;
if (!isAddressStored(address)) {
elementId = addElement(name, symbol, elZ, elA);
storeAddress(address, elementId);
if(m_loglevel>=3) std::cout << "stored\n";
} else {
elementId = getStoredIdFromAddress(address);
if(m_loglevel>=3) std::cout << "retrieved from cache\n";
}
return elementId;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment