Skip to content
Snippets Groups Projects
Commit f54dae30 authored by John Chapman's avatar John Chapman
Browse files

Extra debugging printout

parent 87bec751
No related merge requests found
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
// ISF_Algs includes
......@@ -26,6 +26,8 @@
#include "GeneratorObjects/McEventCollection.h"
#include "GeneratorObjects/HepMcParticleLink.h"
#undef ISFDEBUG
///////////////////////////////////////////////////////////////////
// Public methods:
///////////////////////////////////////////////////////////////////
......@@ -382,6 +384,7 @@ StatusCode ISF::SimKernel::execute()
const ISF::ConstISFParticleVector &particles = m_particleBroker->popVector(m_maxParticleVectorSize);
const unsigned int numParticlesLeftInBroker = m_particleBroker->numParticles();
int numParticles = particles.size();
// particle vector empty -> end simulation
if (numParticles==0) break;
......@@ -396,6 +399,16 @@ StatusCode ISF::SimKernel::execute()
ATH_MSG_DEBUG ( "Took " << numParticles << " particles from queue (remaining: " << m_particleBroker->numParticles() << ")" );
ATH_MSG_VERBOSE( " -> All particles will be sent to '" << m_simSvcNames[simID] << "' simulator (SimSvcID=" << simID << ")" );
#ifdef ISFDEBUG
if (loopCounter>100 && numParticles<3) {
ATH_MSG_INFO("Main Loop pass no. " << loopCounter);
ATH_MSG_INFO("Selected " << numParticles << " particles to be processed by " << m_simSvcNames[simID]);
for ( const ISFParticle *particle : particles ) {
ATH_MSG_INFO(*particle);
}
}
#endif // ISFDEBUG
// ensure that all particles in the vector have the same SimID
for ( const ISFParticle *particle : particles ) {
if ( particle->nextSimID() != simID ) {
......
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
/**
......@@ -20,6 +20,7 @@
#include <queue>
#include <utility>
#undef ISFDEBUG
ISF::SimKernelMT::SimKernelMT( const std::string& name, ISvcLocator* pSvcLocator ) :
::AthAlgorithm( name, pSvcLocator ),
......@@ -129,7 +130,7 @@ StatusCode ISF::SimKernelMT::initialize() {
StatusCode ISF::SimKernelMT::execute() {
// Release the event from all simulators (TODO: make the tools do this)
// Call setupEvent for all simulators (TODO: make the tools do this)
for (auto& curSimTool: m_simulationTools) {
if ( curSimTool ) {
ATH_CHECK(curSimTool->setupEvent());
......@@ -223,6 +224,16 @@ StatusCode ISF::SimKernelMT::execute() {
}
}
particleQueue = std::move(tempQueue);
#ifdef ISFDEBUG
if (loopCounter>100 && particles.size()<3) {
ATH_MSG_INFO("Main Loop pass no. " << loopCounter);
ATH_MSG_INFO("Selected " << particles.size() << " particles to be processed by " << lastSimulator->name());
for ( const ISFParticle *particle : particles ) {
ATH_MSG_INFO(*particle);
}
}
#endif // ISFDEBUG
ATH_MSG_VERBOSE("Selected " << particles.size() << " particles to be processed by " << lastSimulator->name());
// Run the simulation
ATH_CHECK( lastSimulator->simulateVector( particles, newSecondaries, outputTruth.ptr() ) );
......
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