ATLAS Offline Software
Public Types | Public Member Functions | Public Attributes | List of all members
xAOD::RAuxStore::RFieldInfo Class Reference
Collaboration diagram for xAOD::RAuxStore::RFieldInfo:

Public Types

enum  Status { NotInitialized, Initialized, TypeError, NotFound }
 The different available statuses for the field. More...
 

Public Member Functions

 RFieldInfo ()
 Constructor. More...
 
::Int_t getEntry (::Long64_t entryToLoad)
 Get entry from the field. More...
 

Public Attributes

enum Status status = NotInitialized
 The current status of the field. More...
 
std::string fieldName
 The name of the field. More...
 
std::string fieldTypeName
 The name of the field's type. More...
 
std::unique_ptr< RNTupleView< void > > field
 A pointer to the field in the ntuple. More...
 
std::string ntupleName
 The name of the ntuple. More...
 
::Long64_t entryLoaded
 The entry that was loaded from the ntuple. More...
 
void * object {}
 The pointer to the object in memory. More...
 
std::type_info * typeInfo {}
 The typeinfo of the object. More...
 

Detailed Description

Definition at line 239 of file RAuxStore.h.

Member Enumeration Documentation

◆ Status

The different available statuses for the field.

Enumerator
NotInitialized 
Initialized 
TypeError 
NotFound 

Definition at line 246 of file RAuxStore.h.

Constructor & Destructor Documentation

◆ RFieldInfo()

xAOD::RAuxStore::RFieldInfo::RFieldInfo ( )

Constructor.

Definition at line 1840 of file RAuxStore.cxx.

1841  : status( NotInitialized ),
1842  fieldName(),
1843  fieldTypeName(),
1844  field( nullptr ),
1845  ntupleName(),
1846  entryLoaded( -1 ) {}

Member Function Documentation

◆ getEntry()

Int_t xAOD::RAuxStore::RFieldInfo::getEntry ( ::Long64_t  entryToLoad)

Get entry from the field.

Definition at line 1848 of file RAuxStore.cxx.

1848  {
1849 
1850  // A little sanity check:
1851  if( !field ) {
1852  // This is no longer an error. We can have such objects for
1853  // decorations, which don't exist on the input.
1854  return 0;
1855  }
1856 
1857  if( ntupleName == "" ) {
1858  Error( "xAOD::RAuxStore::RFieldInfo::getEntry",
1859  XAOD_MESSAGE( "field=%s has not defined a name of the ntuple "
1860  "it comes from" ),
1861  ntupleName.c_str() );
1862  return -1;
1863  }
1864  if( entryToLoad < 0 ) {
1865  Error( "xAOD::RAuxStore::RFieldInfo::getEntry",
1866  XAOD_MESSAGE(
1867  "Entry to read is not set for field=%s from ntuple=%s. " ),
1868  fieldName.c_str(), ntupleName.c_str() );
1869  return -1;
1870  }
1871 
1872  // Check if anything needs to be done:
1873  if( entryLoaded == entryToLoad ) {
1874  return 0;
1875  }
1876 
1877  try {
1878  field->BindRawPtr( object );
1879  // Load the entry
1880  ( *field )( entryToLoad );
1881 
1882  } catch( RException& e ) {
1883  ::Error( "xAOD::RAuxStore::RFieldInfo::getEntry",
1884  "Failed to load entry %lld for field %s: %s", entryToLoad,
1885  fieldName.c_str(), e.what() );
1886  return -1;
1887  }
1888  entryLoaded = entryToLoad;
1889  return 1;
1890  }

Member Data Documentation

◆ entryLoaded

::Long64_t xAOD::RAuxStore::RFieldInfo::entryLoaded

The entry that was loaded from the ntuple.

Definition at line 263 of file RAuxStore.h.

◆ field

std::unique_ptr< RNTupleView< void > > xAOD::RAuxStore::RFieldInfo::field

A pointer to the field in the ntuple.

Definition at line 259 of file RAuxStore.h.

◆ fieldName

std::string xAOD::RAuxStore::RFieldInfo::fieldName

The name of the field.

Definition at line 250 of file RAuxStore.h.

◆ fieldTypeName

std::string xAOD::RAuxStore::RFieldInfo::fieldTypeName

The name of the field's type.

Definition at line 252 of file RAuxStore.h.

◆ ntupleName

std::string xAOD::RAuxStore::RFieldInfo::ntupleName

The name of the ntuple.

Definition at line 261 of file RAuxStore.h.

◆ object

void* xAOD::RAuxStore::RFieldInfo::object {}

The pointer to the object in memory.

Definition at line 265 of file RAuxStore.h.

◆ status

enum Status xAOD::RAuxStore::RFieldInfo::status = NotInitialized

The current status of the field.

Definition at line 244 of file RAuxStore.h.

◆ typeInfo

std::type_info* xAOD::RAuxStore::RFieldInfo::typeInfo {}

The typeinfo of the object.

Definition at line 267 of file RAuxStore.h.


The documentation for this class was generated from the following files:
xAOD::RAuxStore::RFieldInfo::field
std::unique_ptr< RNTupleView< void > > field
A pointer to the field in the ntuple.
Definition: RAuxStore.h:259
xAOD::RAuxStore::RFieldInfo::ntupleName
std::string ntupleName
The name of the ntuple.
Definition: RAuxStore.h:261
XAOD_MESSAGE
#define XAOD_MESSAGE(MESSAGE)
Simple macro for printing error/verbose messages.
Definition: Control/xAODRootAccess/xAODRootAccess/tools/Message.h:19
xAOD::RAuxStore::RFieldInfo::NotFound
@ NotFound
Definition: RAuxStore.h:246
xAOD::RAuxStore::RFieldInfo::status
enum Status status
The current status of the field.
Definition: RAuxStore.h:248
xAOD::RAuxStore::RFieldInfo::Initialized
@ Initialized
Definition: RAuxStore.h:246
xAOD::RAuxStore::RFieldInfo::fieldName
std::string fieldName
The name of the field.
Definition: RAuxStore.h:250
xAOD::e
setPy e
Definition: CompositeParticle_v1.cxx:166
xAOD::RAuxStore::RFieldInfo::fieldTypeName
std::string fieldTypeName
The name of the field's type.
Definition: RAuxStore.h:252
xAOD::RAuxStore::RFieldInfo::entryLoaded
::Long64_t entryLoaded
The entry that was loaded from the ntuple.
Definition: RAuxStore.h:263
xAOD::RAuxStore::RFieldInfo::TypeError
@ TypeError
Definition: RAuxStore.h:246
L1Topo::Error
Error
The different types of error that can be flagged in the L1TopoRDO.
Definition: Error.h:16
xAOD::RAuxStore::RFieldInfo::NotInitialized
@ NotInitialized
Definition: RAuxStore.h:246