diff --git a/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTDigitizationTool.cxx b/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTDigitizationTool.cxx index 6315d362474ccccc4016041e2446105a8389b672..98ddbd57957daa345e1dbe4cc598e34220174adb 100644 --- a/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTDigitizationTool.cxx +++ b/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTDigitizationTool.cxx @@ -8,8 +8,6 @@ // Implementation file for class TRTDigitizationTool // /////////////////////////////////////////////////////////////////// -// (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// #include "TRTDigitizationTool.h" #include "HitManagement/TimedHitCollection.h" @@ -55,8 +53,6 @@ // Gaudi includes #include "GaudiKernel/SmartDataPtr.h" -#include <set> -#include <sstream> #include "TRT_ConditionsServices/ITRT_StrawNeighbourSvc.h" //CondDB @@ -69,7 +65,6 @@ static constexpr unsigned int crazyParticleBarcode(std::numeric_limits<int32_t>: #include "CLHEP/Random/RandGaussZiggurat.h" -#include "StoreGate/WriteHandleKey.h" //#include "driftCircle.h" // local copy for debugging and development //_____________________________________________________________________________ @@ -755,26 +750,26 @@ StatusCode TRTDigitizationTool::createAndStoreRDOs() if (IdHash != IdHashOld) { RDOColl = new TRT_RDO_Collection(IdHash); - ATH_MSG_DEBUG ( "New TRT RDO Collection created with IdHash " << static_cast<int>(IdHash) ); - IdHashOld = IdHash; RDOColl->setIdentifier(layer_id); // Add to the container if (m_trtrdo_container->addCollection(RDOColl, RDOColl->identifyHash()).isFailure()) { - ATH_MSG_FATAL ( "Container " << m_outputRDOCollName.key() << " could not be registered in StoreGate !" ); - return StatusCode::FAILURE; + ATH_MSG_FATAL ( "Container " << m_outputRDOCollName.key() << " could not be registered in StoreGate !" ); + return StatusCode::FAILURE; } else { - ATH_MSG_DEBUG ( "Container " << m_outputRDOCollName.key() << " registered in StoreGate" ); + ATH_MSG_DEBUG ( "Container " << m_outputRDOCollName.key() << " registered in StoreGate" ); } } // Put RDO into Collection TRT_LoLumRawData *p_rdo(new TRT_LoLumRawData(idStraw, TRTDigitIter->GetDigit())); - if (RDOColl!=NULL) { RDOColl->push_back(p_rdo); } - else { + if (RDOColl) { + RDOColl->push_back(p_rdo); + } else { ATH_MSG_FATAL ( "Failed to create the TRT_RDO_Collection before trying to add an RDO to it! IdHash = " << static_cast<int>(IdHash) ); + delete p_rdo; return StatusCode::FAILURE; } ++TRTDigitIter; diff --git a/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTDigitizationTool.h b/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTDigitizationTool.h index 249ffdddb1dd0203b736fcdf27ed69b59185a90d..9297d76560144bf455e21845833aeb2b75c50b63 100644 --- a/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTDigitizationTool.h +++ b/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTDigitizationTool.h @@ -9,9 +9,7 @@ * $Id: PileUpStream.h,v 1.18 2008-10-31 18:34:42 calaf Exp $ * @author Paolo Calafiura - ATLAS Collaboration */ -#include <vector> -#include <list> -#include <utility> /* pair */ + #include "xAODEventInfo/EventInfo.h" /*SubEvent*/ #include "PileUpTools/PileUpToolBase.h" #include "TRTDigit.h" @@ -19,13 +17,13 @@ #include "GaudiKernel/ToolHandle.h" #include "InDetRawData/TRT_RDO_Container.h" #include "InDetSimData/InDetSimDataCollection.h" -//#include "CommissionEvent/ComTime.h" -#include "TRT_ConditionsServices/ITRT_StrawNeighbourSvc.h" -#include "HepPDT/ParticleDataTable.hh" -#include "TRT_ConditionsServices/ITRT_StrawStatusSummarySvc.h" -#include "CLHEP/Random/RandomEngine.h" + #include "StoreGate/WriteHandleKey.h" #include "StoreGate/WriteHandle.h" +#include <vector> +#include <list> +#include <set> +#include <utility> /* pair */ class PileUpMergeSvc; class ITRT_PAITool; @@ -37,6 +35,15 @@ class TRTElectronicsProcessing; class TRTDigCondBase; class TRTNoise; class ITRT_StrawNeighbourSvc; +class ITRT_StrawStatusSummarySvc; + +namespace CLHEP{ + class HepRandomEngine; +} + +namespace HepPDT{ + class ParticleDataTable; +} #include "HitManagement/TimedHitCollection.h" class TRTUncompressedHit;