ATLAS Offline Software
Loading...
Searching...
No Matches
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
11#include "StorageSvc/DbPrint.h"
14#include "CollectionCursor.h"
15
16#include <string>
17#include <memory>
18
19
20namespace 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:
46
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
73 RootCollection& operator = (const RootCollection &) = delete;
74
75 void writeColumn( const std::string& columnName, const void* data, const std::type_info& typeInfo);
76
77
79
80 std::string m_name;
81 std::string m_fileName;
85
86 bool m_open;
87
91 };
92}
93#endif
APRMessaging(const std::string &name)
An implementation used to define the properties of a collection to be constructed and to retrieve the...
A class representing a row of a collection.
An interface used to navigate the result of a query on a collection.
An interface to a storage technology specific collection of event references and attributes.
Definition ICollection.h:24
OpenMode
Enumeration of the possible open modes of the collection.
Definition ICollection.h:27
ISession is the interface class for user (macroscopic) sessions Every transaction and connection to a...
Definition ISession.h:37
The IStorageSvc interface is able to handle user request for.
Definition IStorageSvc.h:48
virtual const CollectionDescription & description() const final override
Returns an object used to describe the collection properties.
virtual void close() final override
Explicitly closes the collection.
virtual void insertRow(const pool::CollectionRowBuffer &inputRowBuffer) final override
Adds a new row of data to the collection.
void writeColumn(const std::string &columnName, const void *data, const std::type_info &typeInfo)
ContainerMap m_containerMap
CollectionDescription m_description
pool::FileDescriptor m_fileDescr
virtual std::unique_ptr< ICollectionCursor > cursor() final override
Returns a cursor for the collection.
std::string m_containerPrefix
The common prefix for branch container names for attributes.
std::unique_ptr< IStorageSvc > m_storageSvc
virtual void commit(bool restartTransaction=false) final override
Commits the last changes made to the collection.
RootCollection(const pool::CollectionDescription *description, pool::ICollection::OpenMode mode)
Constructor.
virtual void open() final override
Explicitly re-opens the collection after it has been closed.
~RootCollection()
Destructor.
ICollection::OpenMode m_mode
STL class.
Framework include files.
Definition libname.h:15
const Io::IoFlag collModeToPoolMode[]
std::map< std::string, DbContainer > ContainerMap
constexpr const char *const poolOptToRootOpt[]
STL namespace.
#define private
Definition testRead.cxx:27