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
// Collection open mode mapping to StorageSvc open mode
30
inline
const
Io::IoFlag
collModeToPoolMode
[] = { Io::WRITE, Io::READ };
31
32
37
class
RootCollection
:
public
ICollection
,
public
APRMessaging
{
38
39
public
:
44
RootCollection
(
const
pool::CollectionDescription
*
description
,
45
pool::ICollection::OpenMode
mode );
46
48
~RootCollection
();
49
50
52
virtual
void
open
() final override;
53
55
virtual
void
insertRow
(
const
pool
::
CollectionRowBuffer
& inputRowBuffer ) final override;
56
58
virtual
void
commit
(
bool
restartTransaction = false ) final override;
59
61
virtual
void
close
() final override;
62
64
virtual
const
CollectionDescription
&
description
()
const
final override;
65
67
virtual
std
::
unique_ptr
<
ICollectionCursor
>
cursor
() final override;
68
69
private
:
70
72
RootCollection
(
const
RootCollection
&) = delete;
73
RootCollection
& operator = (
const
RootCollection
&) = delete;
74
75
void
writeColumn
(
const
std
::
string
& columnName,
const
void
* data,
const
std
::type_info& typeInfo);
76
77
78
CollectionDescription
m_description
;
79
80
std
::
string
m_name
;
81
std
::
string
m_fileName
;
83
std
::
string
m_containerPrefix
;
84
ICollection
::
OpenMode
m_mode
;
85
86
bool
m_open
;
87
88
std
::
unique_ptr
<
IStorageSvc
>
m_storageSvc
;
89
pool
::
FileDescriptor
m_fileDescr
;
90
ContainerMap
m_containerMap
;
91
};
92
}
93
#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::ICollection::OpenMode
OpenMode
Enumeration of the possible open modes of the collection.
Definition
ICollection.h:27
pool::ISession
ISession is the interface class for user (macroscopic) sessions Every transaction and connection to a...
Definition
ISession.h:37
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::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:90
pool::RootCollection::m_open
bool m_open
Definition
RootCollection.h:86
pool::RootCollection::m_description
CollectionDescription m_description
Definition
RootCollection.h:78
pool::RootCollection::m_fileDescr
pool::FileDescriptor m_fileDescr
Definition
RootCollection.h:89
pool::RootCollection::m_fileName
std::string m_fileName
Definition
RootCollection.h:81
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:83
pool::RootCollection::m_storageSvc
std::unique_ptr< IStorageSvc > m_storageSvc
Definition
RootCollection.h:88
pool::RootCollection::commit
virtual void commit(bool restartTransaction=false) final override
Commits the last changes made to the collection.
pool::RootCollection::RootCollection
RootCollection(const pool::CollectionDescription *description, pool::ICollection::OpenMode mode)
Constructor.
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:80
pool::RootCollection::m_mode
ICollection::OpenMode m_mode
Definition
RootCollection.h:84
unique_ptr
STL class.
const
pool
Framework include files.
Definition
libname.h:15
pool::collModeToPoolMode
const Io::IoFlag collModeToPoolMode[]
Definition
RootCollection.h:30
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