| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

RandomHeaderCnv Class Reference

Converter between RandomHeader and PerRandomHeader. More...

#include <RandomHeaderCnv.h>

Inheritance diagram for RandomHeaderCnv:

[legend]
Collaboration diagram for RandomHeaderCnv:
[legend]
List of all members.

Public Types

 INVALID_ADDRESS
 INVALID_OBJECT
 NO_MEMORY
 BAD_STORAGE_TYPE
 NO_SOURCE_OBJECT
 ICONVERSIONSVC_LAST_ERROR
 SUCCESS
 NO_INTERFACE
 VERSMISMATCH
 LAST_ERROR
enum  Status

Public Member Functions

 RandomHeaderCnv (ISvcLocator *svc)
virtual ~RandomHeaderCnv ()
StatusCode PerToTran (const PerRandomState &tobj, DayaBay::RandomHeader &dobj)
 Copy data from TObject based class of type TType to DataObject based class of type DOType.
StatusCode TranToPer (const DayaBay::RandomHeader &dobj, PerRandomState &tobj)
 Copy data from DataObject based class of type DOType to TObject based class of type TType.
StatusCode fillRepRefs (IOpaqueAddress *addr, DataObject *dobj)
StatusCode fillObjRefs (IOpaqueAddress *addr, DataObject *dobj)
PerRandomStategetPerInputObject ()
PerRandomStategetPerOutputObject ()
const RootIOBaseObjectgetBaseInputObject ()
const RootIOBaseObjectgetBaseOutputObject ()
virtual StatusCode TranObjectToPerObject (DataObject &dat, const RootOutputAddress &)
virtual StatusCode PerObjectToTranObject (DataObject *&dat)
virtual RootInputStreammakeInputStream (const RootInputAddress &ria)
virtual RootOutputStreammakeOutputStream (const RootOutputAddress &ria)
virtual long repSvcType () const
virtual StatusCode initialize ()
virtual StatusCode finalize ()
virtual StatusCode createObj (IOpaqueAddress *addr, DataObject *&dat)
virtual StatusCode createRep (DataObject *pObject, IOpaqueAddress *&refpAddress)
int commit (const RootOutputAddress &roa)
RootIOBaseCnvotherConverter (int clID)
virtual StatusCode queryInterface (const InterfaceID &riid, void **ppvInterface)
virtual unsigned long addRef ()
virtual unsigned long release ()
virtual StatusCode setDataProvider (IDataProviderSvc *svc)
virtual IDataProviderSvcdataProvider () const
virtual StatusCode setConversionSvc (IConversionSvc *svc)
virtual IConversionSvcconversionSvc () const
virtual StatusCode setAddressCreator (IAddressCreator *creator)
virtual IAddressCreatoraddressCreator () const
virtual const CLIDobjType () const
virtual long i_repSvcType () const
virtual StatusCode updateObj (IOpaqueAddress *pAddress, DataObject *refpObject)
virtual StatusCode updateObjRefs (IOpaqueAddress *pAddress, DataObject *pObject)
virtual StatusCode updateRep (IOpaqueAddress *pAddress, DataObject *pObject)
virtual StatusCode updateRepRefs (IOpaqueAddress *pAddress, DataObject *pObject)
StatusCode service (const std::string &name, T *&psvc, bool createIf=false) const
StatusCode service (const std::string &type, const std::string &name, T *&psvc) const

Static Public Member Functions

static const CLIDclassID ()
static unsigned char storageType ()
static const InterfaceIDinterfaceID ()
static const InterfaceIDinterfaceID ()

Public Attributes

 INVALID_ADDRESS
 INVALID_OBJECT
 NO_MEMORY
 BAD_STORAGE_TYPE
 NO_SOURCE_OBJECT
 ICONVERSIONSVC_LAST_ERROR

Protected Member Functions

ISvcLocatorserviceLocator () const
IMessageSvcmsgSvc () const
IMessageSvcmessageService () const
IDataManagerSvcdataManager () const

Protected Attributes

std::string m_perclassName
PerRandomStatem_perInObj
PerRandomStatem_perOutObj
IRootIOSvcm_rioSvc
IConversionSvcm_cnvSvc
RootInputStreamm_ris

Detailed Description

Converter between RandomHeader and PerRandomHeader.

goettj@rpi.edu Wed 16 October 2008

Definition at line 18 of file RandomHeaderCnv.h.


Constructor & Destructor Documentation

RandomHeaderCnv::RandomHeaderCnv ( ISvcLocator svc  ) 

Definition at line 7 of file RandomHeaderCnv.cc.

00008   : RootIOTypedCnv<PerRandomState,RandomHeader>("PerRandomState",classID(),svc)
00009 {
00010 }

RandomHeaderCnv::~RandomHeaderCnv (  )  [virtual]

Definition at line 12 of file RandomHeaderCnv.cc.

00013 {
00014 }


Member Function Documentation

static const CLID& RandomHeaderCnv::classID (  )  [inline, static]

Definition at line 21 of file RandomHeaderCnv.h.

00021                                 {
00022       return DayaBay::CLID_RandomHeader;
00023     }

StatusCode RandomHeaderCnv::PerToTran ( const PerRandomState tobj,
DayaBay::RandomHeader dobj 
) [virtual]

Copy data from TObject based class of type TType to DataObject based class of type DOType.

Implements RootIOTypedCnv< PerRandomState, DayaBay::RandomHeader >.

Definition at line 17 of file RandomHeaderCnv.cc.

00018 {
00019     StatusCode sc = HeaderObjectCnv::toTran(perobj,tranobj);
00020     if(sc.isFailure()) return sc;
00021 
00022     MsgStream log(msgSvc(),"RandomHeaderCnv::PerToTran");
00023 
00024     //Set Engine
00025     tranobj.setHEPEngine(perobj.Engine);
00026     //Set Random Seeds
00027     tranobj.setRndmSeeds(perobj.RndmSeeds);
00028 
00029     return sc;
00030 }

StatusCode RandomHeaderCnv::TranToPer ( const DayaBay::RandomHeader dobj,
PerRandomState tobj 
) [virtual]

Copy data from DataObject based class of type DOType to TObject based class of type TType.

Implements RootIOTypedCnv< PerRandomState, DayaBay::RandomHeader >.

Definition at line 32 of file RandomHeaderCnv.cc.

00033 { 
00034     StatusCode sc = HeaderObjectCnv::toPer(tranobj,perobj);
00035     if(sc.isFailure()) return sc;
00036 
00037     MsgStream log(msgSvc(),"RandomHeaderCnv::TranToPer");
00038 
00039     //Set Engine
00040     perobj.Engine = tranobj.hepEngine();
00041     //Set Random Seeds
00042     perobj.RndmSeeds = tranobj.RndmSeeds();
00043  
00044     return sc;
00045 }

StatusCode RandomHeaderCnv::fillRepRefs ( IOpaqueAddress addr,
DataObject dobj 
) [virtual]

Reimplemented from RootIOTypedCnv< PerRandomState, DayaBay::RandomHeader >.

Definition at line 47 of file RandomHeaderCnv.cc.

00048 {
00049     MsgStream log(msgSvc(), "RandomHeaderCnv::fillRepRefs");
00050     RandomHeader* gh = dynamic_cast<RandomHeader*>(dobj);
00051 
00052     log << MSG::DEBUG
00053         << "Got " << gh->inputHeaders().size() << " headers" << endreq;
00054 
00055 
00056     StatusCode sc = HeaderObjectCnv::fillPer(m_rioSvc,*gh,*m_perOutObj);
00057     if (sc.isFailure()) {
00058         log << MSG::ERROR << "Failed to fill RandomState part" << endreq;
00059         return sc;
00060     }
00061 
00062     // ... fill GenHeader part...
00063     return sc;
00064 }

StatusCode RandomHeaderCnv::fillObjRefs ( IOpaqueAddress addr,
DataObject dobj 
) [virtual]

Reimplemented from RootIOTypedCnv< PerRandomState, DayaBay::RandomHeader >.

Definition at line 66 of file RandomHeaderCnv.cc.

00067 {
00068     MsgStream log(msgSvc(), "GenHeaderCnv::fillObjRefs");
00069     RandomHeader* hobj = dynamic_cast<RandomHeader*>(dobj);
00070     StatusCode sc = HeaderObjectCnv::fillTran(m_rioSvc,*m_perInObj,*hobj);
00071     if (sc.isFailure()) {
00072         log << MSG::ERROR << "Failed to fill RandomHeader part" << endreq;
00073         return sc;
00074     }
00075 
00076     log << MSG::INFO
00077         << "Got " << hobj->inputHeaders().size() << " headers" << endreq;
00078 
00079     // ... fill GenHeader part...
00080     return sc;
00081 }

PerRandomState & RootIOTypedCnv< PerRandomState , DayaBay::RandomHeader >::getPerInputObject (  )  [inherited]

PerRandomState & RootIOTypedCnv< PerRandomState , DayaBay::RandomHeader >::getPerOutputObject (  )  [inherited]

const RootIOBaseObject * RootIOTypedCnv< PerRandomState , DayaBay::RandomHeader >::getBaseInputObject (  )  [virtual, inherited]

Implements RootIOBaseCnv.

const RootIOBaseObject * RootIOTypedCnv< PerRandomState , DayaBay::RandomHeader >::getBaseOutputObject (  )  [virtual, inherited]

Implements RootIOBaseCnv.

virtual StatusCode RootIOTypedCnv< PerRandomState , DayaBay::RandomHeader >::TranObjectToPerObject ( DataObject dat,
const RootOutputAddress  
) [virtual, inherited]

Implements RootIOBaseCnv.

virtual StatusCode RootIOTypedCnv< PerRandomState , DayaBay::RandomHeader >::PerObjectToTranObject ( DataObject *&  dat  )  [virtual, inherited]

Implements RootIOBaseCnv.

virtual RootInputStream * RootIOTypedCnv< PerRandomState , DayaBay::RandomHeader >::makeInputStream ( const RootInputAddress ria  )  [virtual, inherited]

Implements RootIOBaseCnv.

virtual RootOutputStream * RootIOTypedCnv< PerRandomState , DayaBay::RandomHeader >::makeOutputStream ( const RootOutputAddress ria  )  [virtual, inherited]

Implements RootIOBaseCnv.

virtual long RootIOTypedCnv< PerRandomState , DayaBay::RandomHeader >::repSvcType (  )  const [virtual, inherited]

Reimplemented from RootIOBaseCnv.

virtual StatusCode RootIOTypedCnv< PerRandomState , DayaBay::RandomHeader >::initialize (  )  [virtual, inherited]

Reimplemented from RootIOBaseCnv.

virtual StatusCode RootIOTypedCnv< PerRandomState , DayaBay::RandomHeader >::finalize (  )  [virtual, inherited]

Reimplemented from RootIOBaseCnv.

virtual StatusCode RootIOTypedCnv< PerRandomState , DayaBay::RandomHeader >::createObj ( IOpaqueAddress addr,
DataObject *&  dat 
) [virtual, inherited]

Reimplemented from RootIOBaseCnv.

virtual StatusCode RootIOTypedCnv< PerRandomState , DayaBay::RandomHeader >::createRep ( DataObject pObject,
IOpaqueAddress *&  refpAddress 
) [virtual, inherited]

Reimplemented from RootIOBaseCnv.

int RootIOTypedCnv< PerRandomState , DayaBay::RandomHeader >::commit ( const RootOutputAddress roa  )  [inherited]

Reimplemented from RootIOBaseCnv.

RootIOBaseCnv * RootIOTypedCnv< PerRandomState , DayaBay::RandomHeader >::otherConverter ( int  clID  )  [inherited]

Reimplemented from RootIOBaseCnv.

virtual StatusCode RootIOTypedCnv< PerRandomState , DayaBay::RandomHeader >::queryInterface ( const InterfaceID riid,
void **  ppvInterface 
) [virtual, inherited]

Reimplemented from RootIOBaseCnv.

virtual unsigned long RootIOTypedCnv< PerRandomState , DayaBay::RandomHeader >::addRef (  )  [virtual, inherited]

Reimplemented from RootIOBaseCnv.

virtual unsigned long RootIOTypedCnv< PerRandomState , DayaBay::RandomHeader >::release (  )  [virtual, inherited]

Reimplemented from RootIOBaseCnv.

virtual StatusCode RootIOTypedCnv< PerRandomState , DayaBay::RandomHeader >::setDataProvider ( IDataProviderSvc svc  )  [virtual, inherited]

Reimplemented from RootIOBaseCnv.

virtual IDataProviderSvc * RootIOTypedCnv< PerRandomState , DayaBay::RandomHeader >::dataProvider (  )  const [virtual, inherited]

Reimplemented from RootIOBaseCnv.

virtual StatusCode RootIOTypedCnv< PerRandomState , DayaBay::RandomHeader >::setConversionSvc ( IConversionSvc svc  )  [virtual, inherited]

Reimplemented from RootIOBaseCnv.

virtual IConversionSvc * RootIOTypedCnv< PerRandomState , DayaBay::RandomHeader >::conversionSvc (  )  const [virtual, inherited]

Reimplemented from RootIOBaseCnv.

virtual StatusCode RootIOTypedCnv< PerRandomState , DayaBay::RandomHeader >::setAddressCreator ( IAddressCreator creator  )  [virtual, inherited]

Reimplemented from RootIOBaseCnv.

virtual IAddressCreator * RootIOTypedCnv< PerRandomState , DayaBay::RandomHeader >::addressCreator (  )  const [virtual, inherited]

Reimplemented from RootIOBaseCnv.

virtual const CLID & RootIOTypedCnv< PerRandomState , DayaBay::RandomHeader >::objType (  )  const [virtual, inherited]

Reimplemented from RootIOBaseCnv.

virtual long RootIOTypedCnv< PerRandomState , DayaBay::RandomHeader >::i_repSvcType (  )  const [virtual, inherited]

Reimplemented from RootIOBaseCnv.

virtual StatusCode RootIOTypedCnv< PerRandomState , DayaBay::RandomHeader >::updateObj ( IOpaqueAddress pAddress,
DataObject refpObject 
) [virtual, inherited]

Reimplemented from RootIOBaseCnv.

virtual StatusCode RootIOTypedCnv< PerRandomState , DayaBay::RandomHeader >::updateObjRefs ( IOpaqueAddress pAddress,
DataObject pObject 
) [virtual, inherited]

Reimplemented from RootIOBaseCnv.

virtual StatusCode RootIOTypedCnv< PerRandomState , DayaBay::RandomHeader >::updateRep ( IOpaqueAddress pAddress,
DataObject pObject 
) [virtual, inherited]

Reimplemented from RootIOBaseCnv.

virtual StatusCode RootIOTypedCnv< PerRandomState , DayaBay::RandomHeader >::updateRepRefs ( IOpaqueAddress pAddress,
DataObject pObject 
) [virtual, inherited]

Reimplemented from RootIOBaseCnv.

StatusCode RootIOTypedCnv< PerRandomState , DayaBay::RandomHeader >::service ( const std::string &  name,
T *&  psvc,
bool  createIf = false 
) const [inherited]

Reimplemented from RootIOBaseCnv.

StatusCode RootIOTypedCnv< PerRandomState , DayaBay::RandomHeader >::service ( const std::string &  type,
const std::string &  name,
T *&  psvc 
) const [inherited]

Reimplemented from RootIOBaseCnv.

static unsigned char RootIOTypedCnv< PerRandomState , DayaBay::RandomHeader >::storageType (  )  [static, inherited]

Reimplemented from RootIOBaseCnv.

static const InterfaceID & RootIOTypedCnv< PerRandomState , DayaBay::RandomHeader >::interfaceID (  )  [static, inherited]

Reimplemented from RootIOBaseCnv.

static const InterfaceID & RootIOTypedCnv< PerRandomState , DayaBay::RandomHeader >::interfaceID (  )  [static, inherited]

Reimplemented from RootIOBaseCnv.

ISvcLocator * RootIOTypedCnv< PerRandomState , DayaBay::RandomHeader >::serviceLocator (  )  const [protected, inherited]

Reimplemented from RootIOBaseCnv.

IMessageSvc * RootIOTypedCnv< PerRandomState , DayaBay::RandomHeader >::msgSvc (  )  const [protected, inherited]

Reimplemented from RootIOBaseCnv.

IMessageSvc * RootIOTypedCnv< PerRandomState , DayaBay::RandomHeader >::messageService (  )  const [protected, inherited]

Reimplemented from RootIOBaseCnv.

IDataManagerSvc * RootIOTypedCnv< PerRandomState , DayaBay::RandomHeader >::dataManager (  )  const [protected, inherited]

Reimplemented from RootIOBaseCnv.


Member Data Documentation

RootIOTypedCnv< PerRandomState , DayaBay::RandomHeader >::INVALID_ADDRESS [inherited]

Reimplemented from RootIOBaseCnv.

RootIOTypedCnv< PerRandomState , DayaBay::RandomHeader >::INVALID_OBJECT [inherited]

Reimplemented from RootIOBaseCnv.

RootIOTypedCnv< PerRandomState , DayaBay::RandomHeader >::NO_MEMORY [inherited]

Reimplemented from RootIOBaseCnv.

RootIOTypedCnv< PerRandomState , DayaBay::RandomHeader >::BAD_STORAGE_TYPE [inherited]

Reimplemented from RootIOBaseCnv.

RootIOTypedCnv< PerRandomState , DayaBay::RandomHeader >::NO_SOURCE_OBJECT [inherited]

Reimplemented from RootIOBaseCnv.

RootIOTypedCnv< PerRandomState , DayaBay::RandomHeader >::ICONVERSIONSVC_LAST_ERROR [inherited]

Reimplemented from RootIOBaseCnv.

std::string RootIOTypedCnv< PerRandomState , DayaBay::RandomHeader >::m_perclassName [protected, inherited]

PerRandomState * RootIOTypedCnv< PerRandomState , DayaBay::RandomHeader >::m_perInObj [protected, inherited]

PerRandomState * RootIOTypedCnv< PerRandomState , DayaBay::RandomHeader >::m_perOutObj [protected, inherited]

IRootIOSvc * RootIOTypedCnv< PerRandomState , DayaBay::RandomHeader >::m_rioSvc [protected, inherited]

Reimplemented from RootIOBaseCnv.

IConversionSvc * RootIOTypedCnv< PerRandomState , DayaBay::RandomHeader >::m_cnvSvc [protected, inherited]

Reimplemented from RootIOBaseCnv.

RootInputStream * RootIOTypedCnv< PerRandomState , DayaBay::RandomHeader >::m_ris [protected, inherited]

Reimplemented from RootIOBaseCnv.


The documentation for this class was generated from the following files:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:19:16 2011 for PerRandomState by doxygen 1.4.7