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

In This Package:

GiGaCnvUtils Namespace Reference

GiGaCnvUtils.h GiGaCnv/GiGaCnvUtils.h. More...


Enumerations

enum  {
  CNVSVC_IS_NULL = 300, OBJECT_IS_NULL, ADDRESS_IS_NULL, REGISTRY_IS_NULL,
  SELECTOR_IS_NULL
}

Functions

StatusCode createRep (IConversionSvc *cnvsvc, DataObject *object)
 createRep
StatusCode createReps (IConversionSvc *cnvsvc, IDataSelector *selector)
 createReps
IRegistryparent (const IRegistry *registry, IDataManagerSvc *manager)
 parent
IRegistryparent (const IRegistry *registry, IDataProviderSvc *provider)
 parent
IRegistryparent (const IRegistry *registry)
 parent

Detailed Description

GiGaCnvUtils.h GiGaCnv/GiGaCnvUtils.h.

Collection of useful function to make the transition from Gaudi v9 to Gaudi v10 much easier

Author:
Vanya Belyaev Ivan.Belyaev@itep.ru
Date:
17/01/2002


Enumeration Type Documentation

anonymous enum

Enumerator:
CNVSVC_IS_NULL 
OBJECT_IS_NULL 
ADDRESS_IS_NULL 
REGISTRY_IS_NULL 
SELECTOR_IS_NULL 

Definition at line 36 of file GiGaCnvUtils.h.

00037   {
00038     CNVSVC_IS_NULL = 300 ,
00039     OBJECT_IS_NULL       ,
00040     ADDRESS_IS_NULL      ,
00041     REGISTRY_IS_NULL     ,
00042     SELECTOR_IS_NULL
00043   };


Function Documentation

StatusCode GiGaCnvUtils::createRep ( IConversionSvc cnvsvc,
DataObject object 
) [inline]

createRep

Useful combination of createObj and fillRepRefs calls and update registry methods

Parameters:
cncsvc pointer to conversion service
object object to be converted to another representation
Author:
Vanya Belyaev Ivan.Belyaev@itep.ru
Date:
17/01/2002

create the representation

update the registry

fill references

Definition at line 57 of file GiGaCnvUtils.h.

00059   {
00060     if( 0 == cnvsvc        ) { return StatusCode ( CNVSVC_IS_NULL   ) ; }
00061     if( 0 == object        ) { return StatusCode ( OBJECT_IS_NULL   ) ; }
00062     IOpaqueAddress* address = 0 ;
00064     StatusCode status = cnvsvc->createRep( object , address ) ;
00066     if( status.isFailure() ) { return status ; }
00067     if( 0 == address       ) { return StatusCode ( ADDRESS_IS_NULL  ) ; }
00069     IRegistry* registry = object->registry() ;
00070     if( 0 == registry      ) { return StatusCode ( REGISTRY_IS_NULL ) ; }
00071     registry->setAddress( address ) ;
00073     return cnvsvc->fillRepRefs( registry->address() , object );
00074   };

StatusCode GiGaCnvUtils::createReps ( IConversionSvc cnvsvc,
IDataSelector selector 
) [inline]

createReps

Useful combination of createObj and fillRepRefs calls and update registry methods

Parameters:
cncsvc pointer to conversion service
selector collection of objects to be converted
Author:
Vanya Belyaev Ivan.Belyaev@itep.ru
Date:
17/01/2002

the first loop over selector

create the representation

update the registry

the second loop over selector

Definition at line 88 of file GiGaCnvUtils.h.

00090   {
00091     if( 0 == cnvsvc        ) { return StatusCode ( CNVSVC_IS_NULL   ) ; }
00092     if( 0 == selector      ) { return StatusCode ( SELECTOR_IS_NULL ) ; }
00094     IDataSelector::iterator object;
00095     for( object = selector->begin() ; selector->end() != object ; ++object ) 
00096       {
00097         if( 0 == *object   ) { return StatusCode ( OBJECT_IS_NULL   ) ; }
00098         IOpaqueAddress* address = 0 ;
00100         StatusCode st = cnvsvc->createRep( *object , address ) ;
00102         if( st.isFailure() ) { return st ; }
00103         if( 0 == address   ) { return StatusCode ( ADDRESS_IS_NULL  ) ; }
00105         IRegistry* registry = (*object)->registry() ;
00106         if( 0 == registry  ) { return StatusCode ( REGISTRY_IS_NULL ) ; }
00107         registry->setAddress( address ) ;
00108       }
00110     for( object = selector->begin() ; selector->end() != object ; ++object ) 
00111       {
00112         IRegistry* registry = (*object)->registry();
00113         StatusCode st = cnvsvc->fillRepRefs( registry->address() , *object );
00114         if( st.isFailure() ) { return st ; }
00115       }
00117     return StatusCode::SUCCESS ;
00118   };

IRegistry* GiGaCnvUtils::parent ( const IRegistry registry,
IDataManagerSvc manager 
) [inline]

parent

useful function to get the access to parent registry

Parameters:
registry pointer to object registry
manager data manager service
Returns:
selector registry of parent object
Author:
Vanya Belyaev Ivan.Belyaev@itep.ru
Date:
17/01/2002

Definition at line 132 of file GiGaCnvUtils.h.

00134   {
00135     if( 0 == registry || 0 == manager ) { return 0 ; }
00136     IRegistry* reg = 0 ;
00137     StatusCode sc = manager->objectParent( registry , reg );
00138     return sc.isSuccess() ? reg : (IRegistry*) 0 ;
00139   };

IRegistry* GiGaCnvUtils::parent ( const IRegistry registry,
IDataProviderSvc provider 
) [inline]

parent

useful function to get the access to parent registry

Parameters:
registry pointer to object registry
manager data provider service
Returns:
selector registry of parent object
Author:
Vanya Belyaev Ivan.Belyaev@itep.ru
Date:
17/01/2002

Definition at line 153 of file GiGaCnvUtils.h.

00155   {
00156     return 
00157       ( 0 == registry ) ? (IRegistry*) 0 :
00158       ( 0 == provider ) ? (IRegistry*) 0 :
00159       parent( registry , SmartIF<IDataManagerSvc>( provider ) );
00160   };

IRegistry* GiGaCnvUtils::parent ( const IRegistry registry  )  [inline]

parent

useful function to get the access to parent registry

Parameters:
registry pointer to object registry
Returns:
selector registry of parent object
Author:
Vanya Belyaev Ivan.Belyaev@itep.ru
Date:
17/01/2002

Definition at line 172 of file GiGaCnvUtils.h.

00173   {
00174     return 
00175       ( 0 == registry ) ? (IRegistry*) 0 : 
00176       parent( registry  , registry->dataSvc() ) ;  
00177   };

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

Generated on Mon Apr 11 20:03:53 2011 for GiGaCnv by doxygen 1.4.7