| The Gaudi Framework v29r0 (ff2e7097)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

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

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 143 of file SmartDataStorePtr.h.

144 {
145 if ( 0 != object_1.accessTypeSafeData() ) { // Test existence of the first object
146 if ( 0 != object_2.accessTypeSafeData() ) { // Test existence of the second object
147 return true; // Fine: Both objects exist
148 }
149 }
150 return false; // Tough luck: One is missing.
151 }
SmartDataStorePtr::accessTypeSafeData
TYPE * accessTypeSafeData()
Internal type safe accessor to data.
Definition: SmartDataStorePtr.h:119
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 164 of file SmartDataStorePtr.h.

165 {
166 if ( test ) { // Test existence of the first object
167 if ( 0 != object.accessTypeSafeData() ) { // Test existence of the second object
168 return true; // Fine: Both objects exist
169 }
170 }
171 return false; // Tough luck: One is missing.
172 }
compareRootHistos.test
string test
Definition: compareRootHistos.py:15
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 185 of file SmartDataStorePtr.h.

186 {
187 if ( test ) { // Test existence of the first object
188 if ( 0 != object.accessTypeSafeData() ) { // Test existence of the second object
189 return true; // Fine: Both objects exist
190 }
191 }
192 return false; // Tough luck: One is missing.
193 }
compareRootHistos.test
string test
Definition: compareRootHistos.py:15
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 210 of file SmartDataStorePtr.h.

211 {
212 if ( 0 != object_1.accessTypeSafeData() ) { // Test existence of the first object
213 return true;
214 }
215 if ( 0 != object_2.accessTypeSafeData() ) { // Test existence of the second object
216 return true;
217 }
218 return false; // Tough luck: Both are missing.
219 }
SmartDataStorePtr::accessTypeSafeData
TYPE * accessTypeSafeData()
Internal type safe accessor to data.
Definition: SmartDataStorePtr.h:119
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 232 of file SmartDataStorePtr.h.

233 {
234 if ( test ) { // Test existence of the first object
235 return true;
236 }
237 if ( 0 != object.accessTypeSafeData() ) { // Test existence of the second object
238 return true; // Fine: Both objects exist
239 }
240 return false; // Tough luck: One is missing.
241 }
compareRootHistos.test
string test
Definition: compareRootHistos.py:15
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 254 of file SmartDataStorePtr.h.

255 {
256 if ( test ) { // Test existence of the first object
257 return true;
258 }
259 if ( 0 != object.accessTypeSafeData() ) { // Test existence of the second object
260 return true; // Fine: Both objects exist
261 }
262 return false; // Tough luck: One is missing.
263 }
compareRootHistos.test
string test
Definition: compareRootHistos.py:15