| The Gaudi Framework v32r1 (f65d50dc)

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 ) { ... More...
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 = ... More...
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 = ... More...
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 ) { ... More...
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 = ... More...
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 = ... More...

## Function Documentation

## ◆ operator &&() [1/3]

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_1 | Smart pointer to object 1
  object_2 | Smart pointer to second object

Returns
  Boolean indicating existence of both objects

Definition at line 132 of file SmartDataStorePtr.h.

132 {
133 if ( 0 != object_1.accessTypeSafeData() ) { // Test existence of the first object
134 if ( 0 != object_2.accessTypeSafeData() ) { // Test existence of the second object
135 return true; // Fine: Both objects exist
136 }
137 }
138 return false; // Tough luck: One is missing.
139 }
SmartDataStorePtr::accessTypeSafeData
TYPE * accessTypeSafeData()
Internal type safe accessor to data.
Definition: SmartDataStorePtr.h:111

## ◆ operator &&() [2/3]

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

  test | First boolean to test
  object | Smart pointer to second object

Returns
  Boolean indicating existence of both objects

Definition at line 152 of file SmartDataStorePtr.h.

152 {
153 if ( test ) { // Test existence of the first object
154 if ( 0 != object.accessTypeSafeData() ) { // Test existence of the second object
155 return true; // Fine: Both objects exist
156 }
157 }
158 return false; // Tough luck: One is missing.
159 }
compareRootHistos.test
string test
Definition: compareRootHistos.py:15

## ◆ operator &&() [3/3]

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

  object | Smart pointer to second object
  test | Second boolean to test

Returns
  Boolean indicating existence of both objects

Definition at line 172 of file SmartDataStorePtr.h.

172 {
173 if ( test ) { // Test existence of the first object
174 if ( 0 != object.accessTypeSafeData() ) { // Test existence of the second object
175 return true; // Fine: Both objects exist
176 }
177 }
178 return false; // Tough luck: One is missing.
179 }
compareRootHistos.test
string test
Definition: compareRootHistos.py:15

## ◆ operator||() [1/3]

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_1 | Smart pointer to object 1
  object_2 | Smart pointer to second object

Returns
  Boolean indicating existence of both objects

Definition at line 196 of file SmartDataStorePtr.h.

196 {
197 if ( 0 != object_1.accessTypeSafeData() ) { // Test existence of the first object
198 return true;
199 }
200 if ( 0 != object_2.accessTypeSafeData() ) { // Test existence of the second object
201 return true;
202 }
203 return false; // Tough luck: Both are missing.
204 }
SmartDataStorePtr::accessTypeSafeData
TYPE * accessTypeSafeData()
Internal type safe accessor to data.
Definition: SmartDataStorePtr.h:111

## ◆ operator||() [2/3]

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

  test | First boolean to test
  object | Smart pointer to second object

Returns
  Boolean indicating existence of both objects

Definition at line 217 of file SmartDataStorePtr.h.

217 {
218 if ( test ) { // Test existence of the first object
219 return true;
220 }
221 if ( 0 != object.accessTypeSafeData() ) { // Test existence of the second object
222 return true; // Fine: Both objects exist
223 }
224 return false; // Tough luck: One is missing.
225 }
compareRootHistos.test
string test
Definition: compareRootHistos.py:15

## ◆ operator||() [3/3]

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

  object | Smart pointer to second object
  test | Second boolean to test

Returns
  Boolean indicating existence of both objects

Definition at line 238 of file SmartDataStorePtr.h.

238 {
239 if ( test ) { // Test existence of the first object
240 return true;
241 }
242 if ( 0 != object.accessTypeSafeData() ) { // Test existence of the second object
243 return true; // Fine: Both objects exist
244 }
245 return false; // Tough luck: One is missing.
246 }
compareRootHistos.test
string test
Definition: compareRootHistos.py:15