ATLAS Offline Software
EventDataModelMonitor.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // EventDataModelMonitor.cxx, (c) ATLAS Detector Software
8 
10 // Gaudi
11 #include "GaudiKernel/MsgStream.h"
12 #include "GaudiKernel/SmartDataPtr.h"
13 // Trk
16 #include "TrkSegment/Segment.h"
17 #include "TrkTrack/Track.h"
19 #include "TrkSurfaces/Surface.h"
21 #include "VxVertex/Vertex.h"
23 #include "VxVertex/VxCandidate.h"
24 
25 Trk::EventDataModelMonitor::EventDataModelMonitor(const std::string& name, ISvcLocator* pSvcLocator):
26  AthAlgorithm(name,pSvcLocator)
27 {
28 }
29 
31 
32 #ifndef NDEBUG
33  ATH_MSG_INFO( "EventDataModelMonitor AFTER finalize of algorithms (dbg only):" );
34  ATH_MSG_INFO( "left over all Surfaces : \t"<<Trk::Surface::numberOfInstantiations() );
35  ATH_MSG_INFO( "left over PrepRawDatas : \t"<<Trk::PrepRawData::numberOfInstantiations() );
36  ATH_MSG_INFO( "left over RIO_OnTracks : \t"<<Trk::RIO_OnTrack::numberOfInstantiations() );
37  ATH_MSG_INFO( "left over Segments : \t"<<Trk::Segment::numberOfInstantiations() );
38  ATH_MSG_INFO( "left over Tracks : \t"<<Trk::Track::numberOfInstantiations() );
39  ATH_MSG_INFO( "left over TrackSummaries : \t"<<Trk::TrackSummary::numberOfInstantiations() );
40  ATH_MSG_INFO( "left over VxTrackAtVertices : \t"<<Trk::VxTrackAtVertex::numberOfInstantiations() );
41  ATH_MSG_INFO( "left over Trk::Vertex : \t"<<Trk::Vertex::numberOfInstantiations() );
42  ATH_MSG_INFO( "left over VxCandidates : \t"<<Trk::VxCandidate::numberOfInstantiations() );
43  ATH_MSG_INFO( "==> this may still contain the ID geometry and last event, (srv finalize comes now)" );
44 
49  ATH_MSG_WARNING("Leaks detected!");
50 
51 #endif
52 
53 }
54 
56  ATH_MSG_INFO("EventDataModelMonitor initialize()" );
57  return StatusCode::SUCCESS;
58 }
59 
61 #ifndef NDEBUG
62  ATH_MSG_INFO( "EventDataModelMonitor at start of event (dbg only):" );
63  ATH_MSG_INFO( "number of all Surfaces (about const) : \t"<<Trk::Surface::numberOfInstantiations() );
64  ATH_MSG_INFO( "number of PrepRawData (about const) : \t"<<Trk::PrepRawData::numberOfInstantiations() );
65  ATH_MSG_INFO( "number of RIO_OnTrack (should be 0) : \t"<<Trk::RIO_OnTrack::numberOfInstantiations() );
66  ATH_MSG_INFO( "number of Segments (should be 0) : \t"<<Trk::Segment::numberOfInstantiations() );
67  ATH_MSG_INFO( "number of Tracks (should be 0) : \t"<<Trk::Track::numberOfInstantiations() );
68  ATH_MSG_INFO( "number of TrackSummaries (should be 0) : \t"<<Trk::TrackSummary::numberOfInstantiations() );
69  ATH_MSG_INFO( "number of VxTrackAtVertices (should be 0) : \t"<<Trk::VxTrackAtVertex::numberOfInstantiations() );
70  ATH_MSG_INFO( "number of Trk::Vertex (should be < 3) : \t"<<Trk::Vertex::numberOfInstantiations() );
71  ATH_MSG_INFO( "number of VxCandidates (should be 0) : \t"<<Trk::VxCandidate::numberOfInstantiations() );
72 #endif
73 
74  return StatusCode::SUCCESS;
75 }
76 
78  return StatusCode::SUCCESS;
79 }
80 
Trk::EventDataModelMonitor::finalize
StatusCode finalize()
standard Athena-Algorithm method
Definition: EventDataModelMonitor.cxx:77
TrackParameters.h
Trk::EventDataModelMonitor::EventDataModelMonitor
EventDataModelMonitor(const std::string &name, ISvcLocator *pSvcLocator)
Standard Athena-Algorithm Constructor.
Definition: EventDataModelMonitor.cxx:25
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
Surface.h
Trk::EventDataModelMonitor::~EventDataModelMonitor
~EventDataModelMonitor()
Default Destructor.
Definition: EventDataModelMonitor.cxx:30
PrepRawData.h
Trk::EventDataModelMonitor::initialize
StatusCode initialize()
standard Athena-Algorithm method
Definition: EventDataModelMonitor.cxx:55
Track.h
Trk::ObjectCounter< Trk::Surface >::numberOfInstantiations
static std::size_t numberOfInstantiations()
Definition: TrkObjectCounter.h:25
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Segment.h
VxTrackAtVertex.h
TrackSummary.h
AthAlgorithm
Definition: AthAlgorithm.h:47
VxCandidate.h
EventDataModelMonitor.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
RIO_OnTrack.h
Vertex.h
Trk::EventDataModelMonitor::execute
StatusCode execute()
standard Athena-Algorithm method
Definition: EventDataModelMonitor.cxx:60
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32