ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Database
APR
CollectionSvc
src
RootCollection.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef ROOTCOLLECTION_ROOTCOLLECTION_H
6
#define ROOTCOLLECTION_ROOTCOLLECTION_H
7
8
#include "
CollectionSvc/ICollection.h
"
9
#include "
CollectionSvc/CollectionDescription.h
"
10
#include "
CollectionSvc/CollectionRowBuffer.h
"
11
#include "
StorageSvc/DbPrint.h
"
12
#include "
StorageSvc/FileDescriptor.h
"
13
#include "
StorageSvc/DbContainer.h
"
14
#include "
CollectionCursor.h
"
15
16
#include <string>
17
#include <memory>
18
19
20
namespace
pool
{
21
22
class
ISession
;
23
class
IStorageSvc
;
24
25
class
Attribute;
26
27
// Create and Overwrite is only option, we'll never update
28
constexpr
const
char
*
const
poolOptToRootOpt
[] = {
"UPDATE"
,
"READ"
};
29
34
class
RootCollection
:
public
ICollection
,
public
APRMessaging
{
35
36
public
:
41
RootCollection
(
const
pool::CollectionDescription
*
description
,
42
Io::IoFlag mode );
43
45
~RootCollection
();
46
47
49
virtual
void
open
() final override;
50
52
virtual
void
insertRow
(
const
pool
::
CollectionRowBuffer
& inputRowBuffer ) final override;
53
55
virtual
void
commit
(
bool
restartTransaction = false ) final override;
56
58
virtual
void
close
() final override;
59
61
virtual
const
CollectionDescription
&
description
()
const
final override;
62
64
virtual
std
::
unique_ptr
<
ICollectionCursor
>
cursor
() final override;
65
66
private
:
67
69
RootCollection
(
const
RootCollection
&) = delete;
70
RootCollection
& operator = (
const
RootCollection
&) = delete;
71
72
void
writeColumn
(
const
std
::
string
& columnName,
const
void
* data,
const
std
::type_info& typeInfo);
73
74
75
CollectionDescription
m_description
;
76
77
std
::
string
m_name
;
78
std
::
string
m_fileName
;
80
std
::
string
m_containerPrefix
;
81
Io
::IoFlag
m_mode
;
82
83
bool
m_open
;
84
85
std
::
unique_ptr
<
IStorageSvc
>
m_storageSvc
;
86
pool
::
FileDescriptor
m_fileDescr
;
87
ContainerMap
m_containerMap
;
88
};
89
}
90
#endif
CollectionCursor.h
CollectionDescription.h
CollectionRowBuffer.h
DbContainer.h
DbPrint.h
FileDescriptor.h
ICollection.h
pool::APRMessaging::APRMessaging
APRMessaging(const std::string &name)
pool::CollectionDescription
An implementation used to define the properties of a collection to be constructed and to retrieve the...
Definition
CollectionDescription.h:26
pool::CollectionRowBuffer
A class representing a row of a collection.
Definition
CollectionRowBuffer.h:25
pool::FileDescriptor
Description:
Definition
FileDescriptor.h:40
pool::ICollectionCursor
An interface used to navigate the result of a query on a collection.
Definition
ICollectionCursor.h:22
pool::ICollection
An interface to a storage technology specific collection of event references and attributes.
Definition
ICollection.h:24
pool::ISession
ISession is the interface class for user (macroscopic) sessions Every connection to a database and ob...
Definition
ISession.h:35
pool::IStorageSvc
The IStorageSvc interface is able to handle user request for.
Definition
IStorageSvc.h:48
pool::RootCollection::description
virtual const CollectionDescription & description() const final override
Returns an object used to describe the collection properties.
pool::RootCollection::m_mode
Io::IoFlag m_mode
Definition
RootCollection.h:81
pool::RootCollection::RootCollection
RootCollection(const pool::CollectionDescription *description, Io::IoFlag mode)
Constructor.
pool::RootCollection::close
virtual void close() final override
Explicitly closes the collection.
pool::RootCollection::insertRow
virtual void insertRow(const pool::CollectionRowBuffer &inputRowBuffer) final override
Adds a new row of data to the collection.
pool::RootCollection::writeColumn
void writeColumn(const std::string &columnName, const void *data, const std::type_info &typeInfo)
pool::RootCollection::m_containerMap
ContainerMap m_containerMap
Definition
RootCollection.h:87
pool::RootCollection::m_open
bool m_open
Definition
RootCollection.h:83
pool::RootCollection::m_description
CollectionDescription m_description
Definition
RootCollection.h:75
pool::RootCollection::m_fileDescr
pool::FileDescriptor m_fileDescr
Definition
RootCollection.h:86
pool::RootCollection::m_fileName
std::string m_fileName
Definition
RootCollection.h:78
pool::RootCollection::cursor
virtual std::unique_ptr< ICollectionCursor > cursor() final override
Returns a cursor for the collection.
pool::RootCollection::m_containerPrefix
std::string m_containerPrefix
The common prefix for branch container names for attributes.
Definition
RootCollection.h:80
pool::RootCollection::m_storageSvc
std::unique_ptr< IStorageSvc > m_storageSvc
Definition
RootCollection.h:85
pool::RootCollection::commit
virtual void commit(bool restartTransaction=false) final override
Commits the last changes made to the collection.
pool::RootCollection::open
virtual void open() final override
Explicitly re-opens the collection after it has been closed.
pool::RootCollection::~RootCollection
~RootCollection()
Destructor.
pool::RootCollection::m_name
std::string m_name
Definition
RootCollection.h:77
unique_ptr
STL class.
const
Io
Definition
MetaDataSvc.h:36
pool
Framework include files.
Definition
libname.h:15
pool::ContainerMap
std::map< std::string, DbContainer > ContainerMap
Definition
CollectionCursor.h:21
pool::poolOptToRootOpt
constexpr const char *const poolOptToRootOpt[]
Definition
RootCollection.h:28
std
STL namespace.
private
#define private
Definition
testRead.cxx:27
Generated on
for ATLAS Offline Software by
1.17.0