本文整理汇总了C++中IRegistry::address方法的典型用法代码示例。如果您正苦于以下问题:C++ IRegistry::address方法的具体用法?C++ IRegistry::address怎么用?C++ IRegistry::address使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IRegistry
的用法示例。
在下文中一共展示了IRegistry::address方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: dataMgr
//-----------------------------------------------------------------------------
/// Switch to object directory (=Parent directory)
TDirectory* RootHistCnv::RConverter::changeDirectory(DataObject* pObject)
//-----------------------------------------------------------------------------
{
if ( pObject ) {
IRegistry* pReg = pObject->registry();
if ( pReg ) {
SmartIF<IDataManagerSvc> dataMgr(dataProvider());
if ( dataMgr.isValid() ) {
IRegistry* pParentReg = 0;
StatusCode status = dataMgr->objectParent(pReg, pParentReg);
if ( status.isSuccess() ) {
IOpaqueAddress* pParAddr = pParentReg->address();
if ( pParAddr ) {
TDirectory* pParentDir = (TDirectory*)pParAddr->ipar()[0];
if ( pParentDir ) {
gDirectory->cd(pParentDir->GetPath());
return pParentDir;
}
}
}
}
}
}
return 0;
}
示例2: RootObjAddress
//-----------------------------------------------------------------------------
StatusCode RootHistCnv::RConverter::createAddress(DataObject* pObj,
TDirectory* pDir,
TObject* pTObj,
IOpaqueAddress*& refpAddr)
//-----------------------------------------------------------------------------
{
// Get address again....it does not change
IRegistry* pReg = pObj->registry();
if ( 0 != pReg ) {
refpAddr = pReg->address();
if ( 0 == refpAddr ) {
refpAddr = new RootObjAddress(repSvcType(),
objType(),
pReg->name(),
"",
(unsigned long)(pDir),
(unsigned long)(pTObj),
pTObj);
return StatusCode::SUCCESS;
}
}
return StatusCode::FAILURE;
}
示例3: finalize
//--------------------------------------------------------------------------------------------
// implementation of IAppMgrUI::finalize
//--------------------------------------------------------------------------------------------
StatusCode MTEventLoopMgr::finalize() {
StatusCode sc;
MsgStream log(msgSvc(), name());
log << MSG::INFO << " Number of events processed : " << m_total_nevt << endmsg;
// Finalize base class
MinimalEventLoopMgr::finalize();
// Save Histograms Now
if ( 0 != m_histoPersSvc ) {
HistogramAgent agent;
sc = m_histoDataMgrSvc->traverseTree( &agent );
if( sc.isSuccess() ) {
IDataSelector* objects = agent.selectedObjects();
// skip /stat entry!
if ( objects->size() > 0 ) {
IDataSelector::iterator i;
for ( i = objects->begin(); i != objects->end(); i++ ) {
IOpaqueAddress* pAddr = 0;
StatusCode iret = m_histoPersSvc->createRep(*i, pAddr);
if ( iret.isSuccess() ) {
(*i)->registry()->setAddress(pAddr);
}
else {
sc = iret;
}
}
for ( i = objects->begin(); i != objects->end(); i++ ) {
IRegistry* reg = (*i)->registry();
StatusCode iret = m_histoPersSvc->fillRepRefs(reg->address(), *i);
if ( !iret.isSuccess() ) {
sc = iret;
}
}
}
if ( sc.isSuccess() ) {
log << MSG::INFO << "Histograms converted successfully according to request." << endmsg;
}
else {
log << MSG::ERROR << "Error while saving Histograms." << endmsg;
}
}
else {
log << MSG::ERROR << "Error while traversing Histogram data store" << endmsg;
}
}
if ( 0 != m_evtCtxt && 0 != m_evtSelector ) {
m_evtSelector->releaseContext(m_evtCtxt);
m_evtCtxt = 0;
}
// Release all interfaces...
m_histoDataMgrSvc = releaseInterface(m_histoDataMgrSvc);
m_histoPersSvc = releaseInterface(m_histoPersSvc);
m_evtSelector = releaseInterface(m_evtSelector);
m_incidentSvc = releaseInterface(m_incidentSvc);
m_evtDataSvc = releaseInterface(m_evtDataSvc);
m_evtDataMgrSvc = releaseInterface(m_evtDataMgrSvc);
return StatusCode::SUCCESS;
}