| The Gaudi Framework v32r1 (f65d50dc)

Public Member Functions | Protected Attributes | List of all members
DataStoreItem Class Reference

Description of the DataStoreItem class. More...

`#include <GaudiKernel/DataStoreItem.h>`

Collaboration diagram for DataStoreItem:
[legend]

## Public Member Functions
| DataStoreItem (std::string path, int depth=1)
| Standard Constructor. More...
| DataStoreItem (const DataStoreItem &item)
| Copy constructor. More...
virtual | ~DataStoreItem ()=default
| Standard Destructor. More...
bool | operator== (const DataStoreItem &cmp) const
| Equality operator. More...
bool | operator!= (const DataStoreItem &cmp) const
| Inequality operator. More...
DataStoreItem & | operator= (const DataStoreItem &cmp)
| Equivalence operator. More...
void | analyse ()
| Interprete the load path for special options. More...
const std::string & | path () const
| Accessor: Retrieve load path. More...
int | depth () const
| Accessor: Retrieve load depth. More...

## Protected Attributes
std::string | m_path
| Path of item to be loaded. More...
int | m_depth
| Depth to be auto-loaded from the requested path onwards. More...

## Detailed Description

Description of the DataStoreItem class.

DataStoreItems describe in an abstract way an item in the data store. Items can be supplied to the services in order to e.g. trigger preloading or writing.

Author
  M.Frank

Version
  1.0

Definition at line 17 of file DataStoreItem.h.

## Constructor & Destructor Documentation

## ◆ DataStoreItem() [1/2]

DataStoreItem::DataStoreItem | ( | std::string | path,
|  | int | depth = `1`
| ) |  |
| inline

Standard Constructor.

Definition at line 26 of file DataStoreItem.h.

26 : m_path( std::move( path ) ), m_depth( depth ) { analyse(); }
DataStoreItem::m_path
std::string m_path
Path of item to be loaded.
Definition: DataStoreItem.h:20
DataStoreItem::analyse
void analyse()
Interprete the load path for special options.
Definition: DataStoreItem.h:44
DataStoreItem::m_depth
int m_depth
Depth to be auto-loaded from the requested path onwards.
Definition: DataStoreItem.h:22
std::move
T move(T... args)
DataStoreItem::depth
int depth() const
Accessor: Retrieve load depth.
Definition: DataStoreItem.h:57
DataStoreItem::path
const std::string & path() const
Accessor: Retrieve load path.
Definition: DataStoreItem.h:55

## ◆ DataStoreItem() [2/2]

DataStoreItem::DataStoreItem | ( | const DataStoreItem & | item | ) |
| inline

Copy constructor.

Definition at line 28 of file DataStoreItem.h.

28 : m_path( item.m_path ), m_depth( item.m_depth ) { analyse(); }
DataStoreItem::m_path
std::string m_path
Path of item to be loaded.
Definition: DataStoreItem.h:20
DataStoreItem::analyse
void analyse()
Interprete the load path for special options.
Definition: DataStoreItem.h:44
DataStoreItem::m_depth
int m_depth
Depth to be auto-loaded from the requested path onwards.
Definition: DataStoreItem.h:22

## ◆ ~DataStoreItem()

virtual DataStoreItem::~DataStoreItem | ( |  | ) |
| virtual default

Standard Destructor.

## Member Function Documentation

## ◆ analyse()

void DataStoreItem::analyse | ( |  | ) |
| inline

Interprete the load path for special options.

Definition at line 44 of file DataStoreItem.h.

44 {
45 int len = m_path.length() - 1;
46 if ( m_path[len] == '*' ) {
47 m_depth = 99999999;
48 ( m_path[len - 1] == '/' ) ? m_path.erase( len - 1, 2 ) : m_path.erase( len, 1 );
49 } else if ( m_path[len] == '+' ) {
50 ( m_path[len - 1] == '/' ) ? m_path.erase( len - 1, 2 ) : m_path.erase( len, 1 );
51 m_depth = 2;
52 }
53 }
DataStoreItem::m_path
std::string m_path
Path of item to be loaded.
Definition: DataStoreItem.h:20
std::string::erase
T erase(T... args)
DataStoreItem::m_depth
int m_depth
Depth to be auto-loaded from the requested path onwards.
Definition: DataStoreItem.h:22
std::string::length
T length(T... args)

## ◆ depth()

int DataStoreItem::depth | ( |  | ) | const
| inline

Accessor: Retrieve load depth.

Definition at line 57 of file DataStoreItem.h.

57 { return m_depth; }
DataStoreItem::m_depth
int m_depth
Depth to be auto-loaded from the requested path onwards.
Definition: DataStoreItem.h:22

## ◆ operator!=()

bool DataStoreItem::operator!= | ( | const DataStoreItem & | cmp | ) | const
| inline

Inequality operator.

Definition at line 35 of file DataStoreItem.h.

35 { return !( m_path == cmp.path() && m_depth == cmp.depth() ); }
DataStoreItem::m_path
std::string m_path
Path of item to be loaded.
Definition: DataStoreItem.h:20
DataStoreItem::m_depth
int m_depth
Depth to be auto-loaded from the requested path onwards.
Definition: DataStoreItem.h:22
DataStoreItem::depth
int depth() const
Accessor: Retrieve load depth.
Definition: DataStoreItem.h:57
DataStoreItem::path
const std::string & path() const
Accessor: Retrieve load path.
Definition: DataStoreItem.h:55

## ◆ operator=()

DataStoreItem& DataStoreItem::operator= | ( | const DataStoreItem & | cmp | ) |
| inline

Equivalence operator.

Definition at line 37 of file DataStoreItem.h.

37 {
38 m_path = cmp.path();
39 m_depth = cmp.depth();
40 analyse();
41 return *this;
42 }
DataStoreItem::m_path
std::string m_path
Path of item to be loaded.
Definition: DataStoreItem.h:20
DataStoreItem::analyse
void analyse()
Interprete the load path for special options.
Definition: DataStoreItem.h:44
DataStoreItem::m_depth
int m_depth
Depth to be auto-loaded from the requested path onwards.
Definition: DataStoreItem.h:22
DataStoreItem::depth
int depth() const
Accessor: Retrieve load depth.
Definition: DataStoreItem.h:57
DataStoreItem::path
const std::string & path() const
Accessor: Retrieve load path.
Definition: DataStoreItem.h:55

## ◆ operator==()

bool DataStoreItem::operator== | ( | const DataStoreItem & | cmp | ) | const
| inline

Equality operator.

Definition at line 33 of file DataStoreItem.h.

33 { return m_path == cmp.path() && m_depth == cmp.depth(); }
DataStoreItem::m_path
std::string m_path
Path of item to be loaded.
Definition: DataStoreItem.h:20
DataStoreItem::m_depth
int m_depth
Depth to be auto-loaded from the requested path onwards.
Definition: DataStoreItem.h:22
DataStoreItem::depth
int depth() const
Accessor: Retrieve load depth.
Definition: DataStoreItem.h:57
DataStoreItem::path
const std::string & path() const
Accessor: Retrieve load path.
Definition: DataStoreItem.h:55

## ◆ path()

const std::string& DataStoreItem::path | ( |  | ) | const
| inline

Accessor: Retrieve load path.

Definition at line 55 of file DataStoreItem.h.

55 { return m_path; }
DataStoreItem::m_path
std::string m_path
Path of item to be loaded.
Definition: DataStoreItem.h:20

## Member Data Documentation

## ◆ m_depth

int DataStoreItem::m_depth
| protected

Depth to be auto-loaded from the requested path onwards.

Definition at line 22 of file DataStoreItem.h.

## ◆ m_path

std::string DataStoreItem::m_path
| protected

Path of item to be loaded.

Definition at line 20 of file DataStoreItem.h.

The documentation for this class was generated from the following file:

- GaudiKernel/GaudiKernel/DataStoreItem.h