ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
D3PD::RootReaderD3PDSvc Class Reference

A very simple D3PDSvc which produces RootReaderD3PD objects. More...

#include <RootReaderD3PDSvc.h>

Inheritance diagram for D3PD::RootReaderD3PDSvc:
Collaboration diagram for D3PD::RootReaderD3PDSvc:

Public Member Functions

 RootReaderD3PDSvc (const std::string &name, ISvcLocator *svcloc)
 Standard Service constructor. More...
 
virtual StatusCode initialize ()
 Standatd Gaudi initialization function. More...
 
virtual StatusCode finalize ()
 Standard Gaudi finalization function. More...
 
virtual StatusCode make (const std::string &name, ID3PD *&d3pd)
 Function implementing the ID3PDSvc interface. More...
 
virtual StatusCode queryInterface (const InterfaceID &riid, void **ppvIf)
 Gaudi framework function declaring the implemented interfaces. More...
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 
 DeclareInterfaceID (ID3PDSvc, 1, 0)
 Gaudi interface definition. More...
 

Private Attributes

std::vector< ID3PD * > m_d3pds
 Internal list of all the created D3PD objects. More...
 
int m_version
 D3PDReader version to use. More...
 

Detailed Description

A very simple D3PDSvc which produces RootReaderD3PD objects.

   This service can be used to create RootReaderD3PD objects, and
   generate C++ D3PDReader classes using D3PD::ReaderAlg. It should
   not be used with D3PD::MakerAlg, as the created RootReaderD3PD
   objects do not implement the full D3PD::ID3PD interface. (The job
   will fail...)
Author
Attila Krasznahorkay Attil.nosp@m.a.Kr.nosp@m.aszna.nosp@m.hork.nosp@m.ay@ce.nosp@m.rn.c.nosp@m.h
Revision
452707
Date
2011-08-08 13:45:42 +0200 (Mon, 08 Aug 2011)

Definition at line 37 of file RootReaderD3PDSvc.h.

Constructor & Destructor Documentation

◆ RootReaderD3PDSvc()

D3PD::RootReaderD3PDSvc::RootReaderD3PDSvc ( const std::string &  name,
ISvcLocator *  svcloc 
)

Standard Service constructor.

Definition at line 16 of file RootReaderD3PDSvc.cxx.

17  : AthService( name, svcloc ) {
18 
19  declareProperty( "Version", m_version = 2,
20  "Version of the D3PDReader code to be generated" );
21  }

Member Function Documentation

◆ DeclareInterfaceID()

D3PD::ID3PDSvc::DeclareInterfaceID ( ID3PDSvc  ,
,
 
)
inherited

Gaudi interface definition.

◆ finalize()

StatusCode D3PD::RootReaderD3PDSvc::finalize ( )
virtual

Standard Gaudi finalization function.

Definition at line 36 of file RootReaderD3PDSvc.cxx.

36  {
37 
38  // Delete all the D3PD objects from memory:
41  for( ; itr != end; ++itr ) {
42  delete ( *itr );
43  }
44  m_d3pds.clear();
45 
46  return StatusCode::SUCCESS;
47  }

◆ initialize()

StatusCode D3PD::RootReaderD3PDSvc::initialize ( )
virtual

Standatd Gaudi initialization function.

Definition at line 23 of file RootReaderD3PDSvc.cxx.

23  {
24 
25  if( ( m_version < 1 ) || ( m_version > 2 ) ) {
26  REPORT_MESSAGE( MSG::ERROR ) << "D3PDReader version " << m_version
27  << " not known";
28  return StatusCode::FAILURE;
29  }
30 
31  ATH_MSG_INFO( "Generating sources of version: " << m_version );
32 
33  return StatusCode::SUCCESS;
34  }

◆ make()

StatusCode D3PD::RootReaderD3PDSvc::make ( const std::string &  name,
ID3PD *&  d3pd 
)
virtual

Function implementing the ID3PDSvc interface.

Implements D3PD::ID3PDSvc.

Definition at line 49 of file RootReaderD3PDSvc.cxx.

49  {
50 
51  // Create a new D3PD:
52  ID3PD* d = 0;
53  switch( m_version ) {
54  case 1:
55  REPORT_MESSAGE( MSG::VERBOSE ) << "Creating RootReaderD3PD_v1 with name: "
56  << name;
57  d = new RootReaderD3PD_v1();
58  break;
59  case 2:
60  REPORT_MESSAGE( MSG::VERBOSE ) << "Creating RootReaderD3PD_v2 with name: "
61  << name;
62  d = new RootReaderD3PD_v2();
63  break;
64  default:
65  REPORT_MESSAGE( MSG::ERROR ) << "Version number not recognised!";
66  return StatusCode::FAILURE;
67  break;
68  }
69 
70  m_d3pds.push_back( d );
71  d3pd = d;
72 
73  // This function can actually never fail...
74  return StatusCode::SUCCESS;
75  }

◆ msg() [1/2]

MsgStream& AthCommonMsg< Service >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< Service >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< Service >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ queryInterface()

StatusCode D3PD::RootReaderD3PDSvc::queryInterface ( const InterfaceID &  riid,
void **  ppvIf 
)
virtual

Gaudi framework function declaring the implemented interfaces.

Definition at line 77 of file RootReaderD3PDSvc.cxx.

78  {
79 
80  if( riid == ID3PDSvc::interfaceID() ) {
81  *ppvIf = static_cast< ID3PDSvc* >( this );
82  addRef();
83  return StatusCode::SUCCESS;
84  }
85 
86  return AthService::queryInterface( riid, ppvIf );
87  }

Member Data Documentation

◆ m_d3pds

std::vector< ID3PD* > D3PD::RootReaderD3PDSvc::m_d3pds
private

Internal list of all the created D3PD objects.

Definition at line 58 of file RootReaderD3PDSvc.h.

◆ m_version

int D3PD::RootReaderD3PDSvc::m_version
private

D3PDReader version to use.

Definition at line 61 of file RootReaderD3PDSvc.h.


The documentation for this class was generated from the following files:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
AthService::AthService
AthService()
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
hist_file_dump.d
d
Definition: hist_file_dump.py:137
D3PD::RootReaderD3PDSvc::m_d3pds
std::vector< ID3PD * > m_d3pds
Internal list of all the created D3PD objects.
Definition: RootReaderD3PDSvc.h:58
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
REPORT_MESSAGE
#define REPORT_MESSAGE(LVL)
Report a message.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:365
D3PD::RootReaderD3PDSvc::m_version
int m_version
D3PDReader version to use.
Definition: RootReaderD3PDSvc.h:61
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14