|
Gaudi Framework, version v22r4 |
| Home | Generated: Fri Sep 2 2011 |
#include <algorithm>#include "GaudiPoolDb/IPoolDbMgr.h"#include "GaudiPoolDb/PoolDbAddress.h"#include "GaudiPoolDb/PoolDbNTupleCnv.h"#include "GaudiPoolDb/PoolDbLinkManager.h"#include "GaudiPoolDb/PoolDbNTupleDescriptor.h"#include "GaudiPoolDb/PoolDbTupleCallback.h"#include "GaudiKernel/xtoa.h"#include "GaudiKernel/NTuple.h"#include "GaudiKernel/SmartIF.h"#include "GaudiKernel/SmartRef.h"#include "GaudiKernel/MsgStream.h"#include "GaudiKernel/INTupleSvc.h"#include "GaudiKernel/IRegistry.h"#include "GaudiKernel/ISelectStatement.h"#include "GaudiKernel/ContainedObject.h"#include "GaudiKernel/GenericAddress.h"#include "GaudiKernel/CnvFactory.h"#include "StorageSvc/DbSelect.h"#include "StorageSvc/DbReflex.h"#include "StorageSvc/DbColumn.h"#include "StorageSvc/DbTypeInfo.h"#include "StorageSvc/DbObjectCallBack.h"#include "Reflex/Builder/ReflexBuilder.h"#include <memory>
Go to the source code of this file.
| #define ALLOW_ALL_TYPES |
Definition at line 18 of file PoolDbNTupleCnv.cpp.
| #define S_FAIL StatusCode::FAILURE |
Definition at line 46 of file PoolDbNTupleCnv.cpp.
| #define S_OK StatusCode::SUCCESS |
Definition at line 45 of file PoolDbNTupleCnv.cpp.
| static StatusCode createItem | ( | INTuple * | tuple, |
| std::istream & | is, | ||
| const std::string & | name, | ||
| const TYP & | null | ||
| ) | [static] |
Definition at line 152 of file PoolDbNTupleCnv.cpp.
{
std::string idxName;
long len, ndim, dim[4], hasIdx, idxLow, idxLen;
long dim1 = 1, dim2 = 1;
INTupleItem* it = 0;
char c;
is >> len >> c
>> ndim >> c
>> hasIdx >> c;
if ( !is.good() ) {
return S_FAIL;
}
if ( hasIdx ) {
std::getline(is, idxName, ';') >> idxLow >> c >> idxLen >> c;
}
for ( int i = 0; i < ndim; i++ )
is >> dim[i] >> c;
TYP low = null, high = null;
is >> low >> c >> high >> c;
is >> c;
switch( ndim ) {
case 0:
it = NTuple::_Item<TYP>::create (tuple, name, typeid(TYP), low, high, null);
break;
case 1:
dim1 = (hasIdx) ? idxLen : dim[0];
it = NTuple::_Array<TYP>::create (tuple,
name,
typeid(TYP),
idxName,
dim1,
low,
high,
null);
break;
case 2:
dim1 = (hasIdx) ? idxLen : dim[0];
dim2 = (hasIdx) ? dim[0] : dim[1];
it = NTuple::_Matrix<TYP>::create ( tuple,
name,
typeid(TYP),
idxName,
dim1,
dim2,
low,
high,
null);
break;
default:
return S_FAIL;
}
return tuple->add(it);
}
| static int load | ( | void * | ptr, |
| PoolDbTokenWrap * | lnk | ||
| ) | [inline, static] |
Definition at line 113 of file PoolDbNTupleCnv.cpp.
{
IOpaqueAddress* pA = *(IOpaqueAddress**)ptr;
GenericAddress* pAddr = (GenericAddress*)(pA);
if ( 0 != pAddr ) {
pool::Token& tok = lnk->token;
std::string* spar = (std::string*)pAddr->par();
unsigned long* ipar = (unsigned long*)pAddr->ipar();
pAddr->setClID(tok.classID().Data1);
pAddr->setSvcType(tok.technology());
ipar[0] = tok.oid().first;
ipar[1] = tok.oid().second;
spar[0] = tok.dbID();
spar[1] = tok.contID();
return 0;
}
else if ( pA ) {
return 10;
}
return 11;
}
| static int load | ( | pool::DbBlob & | s, |
| void * | buff | ||
| ) | [inline, static] |
Definition at line 98 of file PoolDbNTupleCnv.cpp.
{
int len;
s >> len;
s.swapFromBuffer(buff, len*sizeof(T));
return 0;
}
| int load< std::string > | ( | pool::DbBlob & | s, |
| void * | ptr | ||
| ) | [inline] |
Definition at line 106 of file PoolDbNTupleCnv.cpp.
{
std::string* str = (std::string*)ptr;
s >> (*str);
return 0;
}
| IConverter ISvcLocator* static std::istream& operator>> | ( | std::istream & | is, |
| IOpaqueAddress *& | |||
| ) | [inline, static] |
Definition at line 145 of file PoolDbNTupleCnv.cpp.
{
long i;
is >> i;
return is;
}
| PLUGINSVC_FACTORY_WITH_ID | ( | PoolDbNTupleCnv | , |
| ConverterID(POOL_StorageType, CLID_RowWiseTuple) | , | ||
| IConverter * | long, CLID, ISvcLocator * | ||
| ) |
| void popCurrentDataObject | ( | ) |
Definition at line 72 of file PoolDbIOHandler.cpp.
{
Gaudi::popCurrentDataObject();
resetLastLink();
}
| void pushCurrentDataObject | ( | DataObject ** | pobjAddr ) |
Definition at line 67 of file PoolDbIOHandler.cpp.
{
Gaudi::pushCurrentDataObject(pobjAddr);
resetLastLink();
}
| static void putRange | ( | std::ostream & | os, |
| NTuple::_Data< T > * | it | ||
| ) | [inline, static] |
Definition at line 211 of file PoolDbNTupleCnv.cpp.
{
if ( it ) {
const NTuple::Range<T>& x = it->range();
os << x.lower() << ';' << x.upper() << ';';
return;
}
os << "0;0;";
}
| static void* save | ( | const void * | b, |
| PoolDbTokenWrap * | lnk | ||
| ) | [static] |
Definition at line 76 of file PoolDbNTupleCnv.cpp.
{
IOpaqueAddress* pA = (*(IOpaqueAddress**)b);
pool::Token& tok = lnk->token;
pool::Guid guid(pool::Guid::null());
if ( pA ) {
const std::string* spar = pA->par();
const unsigned long* ipar = pA->ipar();
guid.Data1 = pA->clID();
tok.setTechnology(pA->svcType());
tok.setDb(spar[0]).setCont(spar[1]);
tok.oid().first = ipar[0];
tok.oid().second = ipar[1];
}
else {
tok.setTechnology(0).setDb("").setCont("");
tok.oid().first = tok.oid().second = pool::INVALID;
}
tok.setClassID(guid);
return lnk;
}
| static void* save | ( | pool::DbBlob & | s, |
| const void * | buffer, | ||
| int | len, | ||
| bool | save_len | ||
| ) | [inline, static] |
Definition at line 62 of file PoolDbNTupleCnv.cpp.
Definition at line 142 of file PoolDbNTupleCnv.cpp.
Definition at line 142 of file PoolDbNTupleCnv.cpp.