ATLAS Offline Software
Loading...
Searching...
No Matches
McEventCnv Class Reference

#include <McEventCnv.h>

Inheritance diagram for McEventCnv:
Collaboration diagram for McEventCnv:

Public Member Functions

 McEventCnv (ISvcLocator *svcloc)
StatusCode createObj (IOpaqueAddress *pAddr, DataObject *&pObj)
virtual long repSvcType () const

Static Public Member Functions

static long storageType ()
 Storage type and class ID.
static CLID classID ()

Detailed Description

Definition at line 18 of file McEventCnv.h.

Constructor & Destructor Documentation

◆ McEventCnv()

McEventCnv::McEventCnv ( ISvcLocator * svcloc)

Definition at line 16 of file McEventCnv.cxx.

16 :
17 Converter(McCnvSvc::storageType(), EventInfo::classID(), svcloc) {
18}
static long storageType()
storage type
Definition McCnvSvc.cxx:56

Member Function Documentation

◆ classID()

CLID McEventCnv::classID ( )
static

Definition at line 46 of file McEventCnv.cxx.

46{ return EventInfo::classID(); }

◆ createObj()

StatusCode McEventCnv::createObj ( IOpaqueAddress * pAddr,
DataObject *& pObj )

Definition at line 21 of file McEventCnv.cxx.

21 {
22 McAddress *pMcAddr;
23 EventType* peT = new EventType();
25 peT->set_user_type("McEvent");
26 if ((pMcAddr = dynamic_cast<McAddress*>(pAddr)) &&
27 (pObj = SG::asStorable (new EventInfo(
28 new EventID(pMcAddr->runNumber(),
29 pMcAddr->eventNumber(),
30 pMcAddr->timeStamp(),
31 0,
32 pMcAddr->lumiBlock(),
33 0),
34 peT) ) //owned by EventInfo --> TDS
35 ) )
36 return StatusCode::SUCCESS;
37 else
38 delete peT;
39 return StatusCode::FAILURE;
40}
EventInfo
void set_user_type(const std::string &user_type)
Add user (string) type.
Definition EventType.cxx:57
static const EventTypeCode IS_SIMULATION
true: IS_SIMULATION, false: IS_DATA
Definition EventType.h:156
void add_type(EventTypeCode type_code)
Add a new event type.
Definition EventType.cxx:51
unsigned int timeStamp() const
Definition McAddress.h:49
uint64_t eventNumber() const
Definition McAddress.h:47
unsigned int lumiBlock() const
Definition McAddress.h:48
unsigned int runNumber() const
Definition McAddress.h:46
DataObject * asStorable(SG::DataObjectSharedPtr< T > pObject)

◆ repSvcType()

virtual long McEventCnv::repSvcType ( ) const
inlinevirtual

Definition at line 29 of file McEventCnv.h.

29 {
30 return i_repSvcType();
31 }

◆ storageType()

long McEventCnv::storageType ( )
static

Storage type and class ID.

Definition at line 43 of file McEventCnv.cxx.

43{ return McCnvSvc::storageType(); }

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