Gaudi Framework, version v23r2

Home   Generated: Thu Jun 28 2012
Classes | Functions

SmartDataStorePtr.h File Reference

#include "GaudiKernel/SmartDataObjectPtr.h"
Include dependency graph for SmartDataStorePtr.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  SmartDataStorePtr< TYPE, LOADER >
 A small class used to access easily (and efficiently) data items residing in data stores. More...

Functions

template<class A , class LDA , class B , class LDB >
bool operator&& (SmartDataStorePtr< A, LDA > &object_1, SmartDataStorePtr< B, LDB > &object_2)
 Helper to test Smart data objects efficiently This construct allows statements like: SmartDataPtr<MCVertexVector> mcvertices (evt,"/MC/MCVertices"); SmartDataPtr<MCParticleVector> mctracks (evt,"/MC/MCParticles"); if ( mctracks && mcvertices ) { ...
template<class B , class LDB >
bool operator&& (bool test, SmartDataStorePtr< B, LDB > &object)
 Helper to test Smart data objects efficiently This construct allows statements like: SmartDataPtr<MCVertexVector> mcvertices (evt,"/MC/MCVertices"); bool test = ...
template<class B , class LDB >
bool operator&& (SmartDataStorePtr< B, LDB > &object, bool test)
 Helper to test Smart data objects efficiently This construct allows statements like: SmartDataPtr<MCVertexVector> mcvertices (evt,"/MC/MCVertices"); bool test = ...
template<class A , class LDA , class B , class LDB >
bool operator|| (SmartDataStorePtr< A, LDA > &object_1, SmartDataStorePtr< B, LDB > &object_2)
 Helper to test Smart data objects efficiently This construct allows statements like: SmartDataPtr<MCVertexVector> mcvertices (evt,"/MC/MCVertices"); SmartDataPtr<MCParticleVector> mctracks (evt,"/MC/MCParticles"); if ( mctracks || mcvertices ) { ...
template<class B , class LDB >
bool operator|| (bool test, SmartDataStorePtr< B, LDB > &object)
 Helper to test Smart data objects efficiently This construct allows statements like: SmartDataPtr<MCVertexVector> mcvertices (evt,"/MC/MCVertices"); bool test = ...
template<class B , class LDB >
bool operator|| (SmartDataStorePtr< B, LDB > &object, bool test)
 Helper to test Smart data objects efficiently This construct allows statements like: SmartDataPtr<MCVertexVector> mcvertices (evt,"/MC/MCVertices"); bool test = ...

Function Documentation

template<class A , class LDA , class B , class LDB >
bool operator&& ( SmartDataStorePtr< A, LDA > &  object_1,
SmartDataStorePtr< B, LDB > &  object_2 
)

Helper to test Smart data objects efficiently This construct allows statements like: SmartDataPtr<MCVertexVector> mcvertices (evt,"/MC/MCVertices"); SmartDataPtr<MCParticleVector> mctracks (evt,"/MC/MCParticles"); if ( mctracks && mcvertices ) { ...

} and tests the existence of BOTH objects in the data store.

Parameters:
object_1Smart pointer to object 1
object_2Smart pointer to second object
Returns:
Boolean indicating existence of both objects

Definition at line 150 of file SmartDataStorePtr.h.

                                                                                              {
  if ( 0 != object_1.accessTypeSafeData() )    {     // Test existence of the first object
    if ( 0 != object_2.accessTypeSafeData() )    {   // Test existence of the second object
      return true;                                   // Fine: Both objects exist
    }
  }
  return false;                                      // Tough luck: One is missing.
}
template<class B , class LDB >
bool operator&& ( bool  test,
SmartDataStorePtr< B, LDB > &  object 
)

Helper to test Smart data objects efficiently This construct allows statements like: SmartDataPtr<MCVertexVector> mcvertices (evt,"/MC/MCVertices"); bool test = ...

if ( test && mcvertices ) { ... } and tests the existence of BOTH objects in the data store.

Parameters:
testFirst boolean to test
objectSmart pointer to second object
Returns:
Boolean indicating existence of both objects

Definition at line 170 of file SmartDataStorePtr.h.

                                                                  {
  if ( test )    {                                   // Test existence of the first object
    if ( 0 != object.accessTypeSafeData() )    {     // Test existence of the second object
      return true;                                   // Fine: Both objects exist
    }
  }
  return false;                                      // Tough luck: One is missing.
}
template<class B , class LDB >
bool operator&& ( SmartDataStorePtr< B, LDB > &  object,
bool  test 
)

Helper to test Smart data objects efficiently This construct allows statements like: SmartDataPtr<MCVertexVector> mcvertices (evt,"/MC/MCVertices"); bool test = ...

if ( test && mcvertices ) { ... } and tests the existence of BOTH objects in the data store.

Parameters:
objectSmart pointer to second object
testSecond boolean to test
Returns:
Boolean indicating existence of both objects

Definition at line 190 of file SmartDataStorePtr.h.

                                                                  {
  if ( test )    {                                   // Test existence of the first object
    if ( 0 != object.accessTypeSafeData() )    {     // Test existence of the second object
      return true;                                   // Fine: Both objects exist
    }
  }
  return false;                                      // Tough luck: One is missing.
}
template<class A , class LDA , class B , class LDB >
bool operator|| ( SmartDataStorePtr< A, LDA > &  object_1,
SmartDataStorePtr< B, LDB > &  object_2 
)

Helper to test Smart data objects efficiently This construct allows statements like: SmartDataPtr<MCVertexVector> mcvertices (evt,"/MC/MCVertices"); SmartDataPtr<MCParticleVector> mctracks (evt,"/MC/MCParticles"); if ( mctracks || mcvertices ) { ...

} and tests the existence of at least one objects in the data store. The second object will then NOT be loaded. It is assumed that the second choice is only an alternative usable in case the first object cannot be retrieved.

Parameters:
object_1Smart pointer to object 1
object_2Smart pointer to second object
Returns:
Boolean indicating existence of both objects

Definition at line 214 of file SmartDataStorePtr.h.

                                                                                              {
  if ( 0 != object_1.accessTypeSafeData() )    {     // Test existence of the first object
    return true;
  }
  if ( 0 != object_2.accessTypeSafeData() )    {     // Test existence of the second object
    return true;
  }
  return false;                                      // Tough luck: Both are missing.
}
template<class B , class LDB >
bool operator|| ( bool  test,
SmartDataStorePtr< B, LDB > &  object 
)

Helper to test Smart data objects efficiently This construct allows statements like: SmartDataPtr<MCVertexVector> mcvertices (evt,"/MC/MCVertices"); bool test = ...

if ( test || mcvertices ) { ... } and tests the existence of BOTH objects in the data store.

Parameters:
testFirst boolean to test
objectSmart pointer to second object
Returns:
Boolean indicating existence of both objects

Definition at line 236 of file SmartDataStorePtr.h.

                                                                  {
  if ( test )    {                                 // Test existence of the first object
    return true;
  }
  if ( 0 != object.accessTypeSafeData() )    {     // Test existence of the second object
    return true;                                   // Fine: Both objects exist
  }
  return false;                                    // Tough luck: One is missing.
}
template<class B , class LDB >
bool operator|| ( SmartDataStorePtr< B, LDB > &  object,
bool  test 
)

Helper to test Smart data objects efficiently This construct allows statements like: SmartDataPtr<MCVertexVector> mcvertices (evt,"/MC/MCVertices"); bool test = ...

if ( test && mcvertices ) { ... } and tests the existence of BOTH objects in the data store.

Parameters:
objectSmart pointer to second object
testSecond boolean to test
Returns:
Boolean indicating existence of both objects

Definition at line 257 of file SmartDataStorePtr.h.

                                                                  {
  if ( test )    {                                 // Test existence of the first object
    return true;
  }
  if ( 0 != object.accessTypeSafeData() )    {     // Test existence of the second object
    return true;                                   // Fine: Both objects exist
  }
  return false;                                    // Tough luck: One is missing.
}
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines

Generated at Thu Jun 28 2012 23:27:32 for Gaudi Framework, version v23r2 by Doxygen version 1.7.2 written by Dimitri van Heesch, © 1997-2004