Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

CdbBdb2RooPayloadConverter< P, R > Class Template Reference

The generic "P-R" abstract base class for user defined converters. More...

#include <CdbBdb2RooPayloadConverter.hh>

Inheritance diagram for CdbBdb2RooPayloadConverter< P, R >:

CdbRooConverterBase CdbBdb2RooNTupleConverter< P, R, P_ELEMENT_CONVERSION_RULES, R_ELEMENT_CONVERSION_RULES > CdbBdb2RooPayloadMrgConverter< P, R > CdbRooSimpleConverter< P, T, R > List of all members.

Public Member Functions

virtual ~CdbBdb2RooPayloadConverter ()
 The destructor.

virtual CdbStatus conversion (const BdbRef(BdbObject)&theInputObjectRef, const std::vector< BdbRef(BdbObject) > &theExtraObjectsList)
 A wrapper method for the conversion operation.

virtual TBranch * branchConstructor (TTree &theTree, const char *theBranchName)
 Create a new branch with specified parameters.


Protected Member Functions

 CdbBdb2RooPayloadConverter ()
 The default constructor.

 CdbBdb2RooPayloadConverter (const CdbBdb2RooPayloadConverter< P, R > &theOther)
 The copy constructor.

CdbBdb2RooPayloadConverter<
P, R > & 
operator= (const CdbBdb2RooPayloadConverter< P, R > &theOther)
 The assignment operator.

virtual CdbStatus userDefinedConversion (const BdbRef(BdbObject)&theInputObjectRef, R *&theOutputObjectPtr) const=0
 Implement a user-defined conversion.


Protected Attributes

const std::vector< BdbRef(BdbObject) > extraObjects )() const
 Get a list of extra objects.


Detailed Description

template<class P, class R>
class CdbBdb2RooPayloadConverter< P, R >

The generic "P-R" abstract base class for user defined converters.

The only role of this interface is to obtain names of persistent types to be converted. This is the class to be normally used by users as a base one when making type-specific converters.

IMPLEMENTATION NOTES:

1. The converter will derive the type names of the specified persistent classes using the current Objectivity/DB (for 'P') schema and ROOT/CINT dictionary (for 'R').

2. The virtual tables for Objectovity/DB classes must be loaded to prevent crashes in case if the "T* P::transient() const" is defined as the virtual one.

3. The dictionary for the 'R' class must also be available.

Definition at line 29 of file CdbBdb2RooPayloadConverter.hh.


Constructor & Destructor Documentation

template<class P, class R>
CdbBdb2RooPayloadConverter< P, R >::CdbBdb2RooPayloadConverter   [protected]
 

The default constructor.

Any type incompatibility will cause either compilation errors or run time crash in the constructor.

See also:
CdbBdb2RooPayloadConverter::pTypeName()

CdbBdb2RooPayloadConverter::rTypeName()

Definition at line 33 of file CdbBdb2RooPayloadConverter.cc.

template<class P, class R>
CdbBdb2RooPayloadConverter< P, R >::CdbBdb2RooPayloadConverter const CdbBdb2RooPayloadConverter< P, R > &    theOther [protected]
 

The copy constructor.

Definition at line 42 of file CdbBdb2RooPayloadConverter.cc.

template<class P, class R>
CdbBdb2RooPayloadConverter< P, R >::~CdbBdb2RooPayloadConverter   [virtual]
 

The destructor.

Definition at line 53 of file CdbBdb2RooPayloadConverter.cc.


Member Function Documentation

template<class P, class R>
TBranch * CdbBdb2RooPayloadConverter< P, R >::branchConstructor TTree &    theTree,
const char *    theBranchName
[virtual]
 

Create a new branch with specified parameters.

Imnplement the corresponding method defined in the base class.

See also:
CdbRooConverterBase::branchConstructor()

Implements CdbRooConverterBase.

Definition at line 221 of file CdbBdb2RooPayloadConverter.cc.

References CdbRooConverterBase::outputClassName().

template<class P, class R>
CdbStatus CdbBdb2RooPayloadConverter< P, R >::conversion const BdbRef(BdbObject)&    theInputObjectRef,
const std::vector< BdbRef(BdbObject) > &    theExtraObjectsList
[virtual]
 

A wrapper method for the conversion operation.

Imnplement the corresponding method defined in the base class.

See also:
CdbRooConverterBase::conversion()

Implements CdbRooConverterBase.

Definition at line 149 of file CdbBdb2RooPayloadConverter.cc.

References CdbStatus::Error, CdbStatus::IllegalParameters, CdbRooConverterBase::inputClassName(), CdbRooConverterBase::mergingConverter(), CdbRooConverterBase::outputClassName(), CdbStatus::Success, and CdbBdb2RooPayloadConverter< P, R >::userDefinedConversion().

template<class P, class R>
CdbBdb2RooPayloadConverter< P, R > & CdbBdb2RooPayloadConverter< P, R >::operator= const CdbBdb2RooPayloadConverter< P, R > &    theOther [protected]
 

The assignment operator.

Definition at line 64 of file CdbBdb2RooPayloadConverter.cc.

References CdbBdb2RooPayloadConverter< P, R >::_extraObjects, and CdbRooConverterBase::operator=().

Referenced by CdbBdb2RooPayloadMrgConverter< P, R >::operator=().

template<class P, class R>
virtual CdbStatus CdbBdb2RooPayloadConverter< P, R >::userDefinedConversion const BdbRef(BdbObject)&    theInputObjectRef,
R *&    theOutputObjectPtr
const [protected, pure virtual]
 

Implement a user-defined conversion.

This pure virtual method is supposed to be implemented by subclasses for the specified (in the constructor) pair of classes.

The method will be invoked by the below defined "::conversion()" method.

The method is supposed to return CdbStatus::Success in case of its successfull completion, or any other value otherwise, which will be treated as a failure. Also when a call is successfull then the ouput object pointer must be filled with a valid pointer onto a nely created object.

NOTE: The output object's ownership is also expected to be returned with the object.

See also:
CdbBdb2RooPayloadConverter::CdbBdb2RooPayloadConverter()

CdbBdb2RooPayloadConverter::conversion()

Implemented in CdbBdb2RooNTupleConverter< P, R, P_ELEMENT_CONVERSION_RULES, R_ELEMENT_CONVERSION_RULES >, and CdbRooSimpleConverter< P, T, R >.

Referenced by CdbBdb2RooPayloadConverter< P, R >::conversion().


Member Data Documentation

template<class P, class R>
const std::vector< BdbRef(BdbObject) > CdbBdb2RooPayloadConverter< P, R >::extraObjects)( ) const [inline, protected]
 

Get a list of extra objects.

This list is meant to be used by the above defined user defined conversion algorithm when merging multiple input objects into an output one. The list contains "extra" objects in addition to the main input object. The order of objects in the list is defined during the planing phase of the payload conversion. The objects passed in the list ara guaranteed to be valid.

The list returned by the method will contain no elements for regular (non-merging) converters.

See also:
CdbRooConverterBase::mergingConverter()

Definition at line 124 of file CdbBdb2RooPayloadConverter.hh.


The documentation for this class was generated from the following files:
Generated on Mon Dec 5 18:22:17 2005 for CDB by doxygen1.3-rc3