当前位置: 首页>>代码示例>>C++>>正文


C++ IRegistry::address方法代码示例

本文整理汇总了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;
}
开发者ID:atlas-org,项目名称:gaudi,代码行数:27,代码来源:RConverter.cpp

示例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;
}
开发者ID:atlas-org,项目名称:gaudi,代码行数:25,代码来源:RConverter.cpp

示例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;
}
开发者ID:atlas-org,项目名称:gaudi,代码行数:64,代码来源:MTEventLoopMgr.cpp


注:本文中的IRegistry::address方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。