BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
McCnvSvc Class Reference

#include <McCnvSvc.h>

Inheritance diagram for McCnvSvc:

Friends

class SvcFactory< McCnvSvc >
 Allow the factory class access to the constructor.

: Object implementation

 McCnvSvc (const std::string &name, ISvcLocator *svc)
 Standard Constructor.
virtual ~McCnvSvc ()
 Standard Destructor.

McCnvSvc overrides

virtual StatusCode initialize ()
 Initialize the service.
virtual StatusCode finalize ()
virtual StatusCode queryInterface (const InterfaceID &riid, void **ppvInterface)
 Override inherited queryInterface due to enhanced interface.
virtual StatusCode updateServiceState (IOpaqueAddress *pAddress)
 Update state of the service.
IConverter * createConverter (long typ, const CLID &wanted, const ICnvFactory *fac) override
static unsigned char storageType ()
 storage type

Detailed Description

Definition at line 22 of file McCnvSvc.h.

Constructor & Destructor Documentation

◆ McCnvSvc()

McCnvSvc::McCnvSvc ( const std::string & name,
ISvcLocator * svc )

Standard Constructor.

Standard constructor.

Definition at line 35 of file McCnvSvc.cxx.

36 : ConversionSvc( name, svc, storageType() ) {}
static unsigned char storageType()
storage type
Definition McCnvSvc.cxx:86

Referenced by McCnvSvc(), and queryInterface().

◆ ~McCnvSvc()

McCnvSvc::~McCnvSvc ( )
virtual

Standard Destructor.

Definition at line 39 of file McCnvSvc.cxx.

39{}

Member Function Documentation

◆ createConverter()

IConverter * McCnvSvc::createConverter ( long typ,
const CLID & wanted,
const ICnvFactory * fac )
override

Definition at line 91 of file McCnvSvc.cxx.

91 {
92 if ( wanted == 110 ) return new McEventCnv( serviceLocator().get() );
93 else return ConversionSvc::createConverter( typ, wanted, fac );
94}

◆ finalize()

StatusCode McCnvSvc::finalize ( )
virtual

Definition at line 48 of file McCnvSvc.cxx.

48 {
49 MsgStream log( msgSvc(), name() );
50 log << MSG::DEBUG << "RootCnvSvc::finalize" << endmsg;
51
52 ConversionSvc::finalize().ignore();
53
54 return StatusCode::SUCCESS;
55}
IMessageSvc * msgSvc()

◆ initialize()

StatusCode McCnvSvc::initialize ( )
virtual

Initialize the service.

Definition at line 42 of file McCnvSvc.cxx.

42 {
43 info() << "McCnvSvc::initialize" << endmsg;
44 StatusCode status = ConversionSvc::initialize();
45 return status;
46}

◆ queryInterface()

StatusCode McCnvSvc::queryInterface ( const InterfaceID & riid,
void ** ppvInterface )
virtual

Override inherited queryInterface due to enhanced interface.

Definition at line 57 of file McCnvSvc.cxx.

57 {
58 if ( IID_IMcCnvSvc == riid ) { *ppvInterface = (McCnvSvc*)this; }
59 else
60 {
61 // Interface is not directly availible: try out a base class
62 return ConversionSvc::queryInterface( riid, ppvInterface );
63 }
64 addRef();
65 return StatusCode::SUCCESS;
66}
McCnvSvc(const std::string &name, ISvcLocator *svc)
Standard Constructor.
Definition McCnvSvc.cxx:35

◆ storageType()

unsigned char McCnvSvc::storageType ( )
static

storage type

Definition at line 86 of file McCnvSvc.cxx.

86 {
87 static unsigned char type = 0x10;
88 return type;
89}

Referenced by McCnvSvc(), McEventCnv::repSvcType(), and McEventCnv::storageType().

◆ updateServiceState()

StatusCode McCnvSvc::updateServiceState ( IOpaqueAddress * pAddress)
virtual

Update state of the service.

Definition at line 69 of file McCnvSvc.cxx.

69 {
70 MsgStream log( msgSvc(), name() );
71 static bool first = true;
72 // static int fid = 0;
73 // static int recid = 0;
74 if ( 0 != pAddress )
75 {
76 GenericAddress* pAddr = dynamic_cast<GenericAddress*>( pAddress );
77 if ( 0 != pAddr )
78 {
79 if ( first ) { first = false; }
80 return StatusCode::SUCCESS;
81 }
82 }
83 return StatusCode::FAILURE;
84}
Index first(Pair i)

◆ SvcFactory< McCnvSvc >

friend class SvcFactory< McCnvSvc >
friend

Allow the factory class access to the constructor.

Definition at line 20 of file McCnvSvc.h.


The documentation for this class was generated from the following files: