ATLAS Offline Software
Loading...
Searching...
No Matches
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"
24
25Trk::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
48 || Trk::Vertex::numberOfInstantiations() > 2 || Trk::VxCandidate::numberOfInstantiations() )
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
#define ATH_MSG_INFO(x)
#define ATH_MSG_WARNING(x)
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
~EventDataModelMonitor()
Default Destructor.
EventDataModelMonitor(const std::string &name, ISvcLocator *pSvcLocator)
Standard Athena-Algorithm Constructor.
StatusCode initialize()
standard Athena-Algorithm method
StatusCode execute()
standard Athena-Algorithm method
StatusCode finalize()
standard Athena-Algorithm method
static std::size_t numberOfInstantiations()