ATLAS Offline Software
ImplicitCollection.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef INCLUDE_IMPLICITCOLLECTION_IMPLICITCOLLECTION_H
6 #define INCLUDE_IMPLICITCOLLECTION_IMPLICITCOLLECTION_H
7 
11 #include "POOLCore/DbPrint.h"
12 
14 #include "Gaudi/PluginService.h"
15 
16 namespace pool {
17 
18  // forward declarations
19  class ISession;
20  class IContainer;
21  class ICollectionQuery;
22  class ICollectionIterator;
23  class ImplicitCollectionIterator;
24 
27  // ^ due to not thread-safe ImplicitCollectionIterator
28  {
29  public:
30  typedef Gaudi::PluginService::Factory<ICollection*( const ICollectionDescription*, ICollection::OpenMode, ISession*)> Factory;
31 
40  const std::string& connection,
41  const std::string& name,
43 
48  ISession* session );
49 
52 
55 
57  virtual ICollection::OpenMode openMode() const override;
58 
59 
61  virtual void insertRow( const pool::CollectionRowBuffer& inputRowBuffer ) override;
62 
64  void commit(bool reopen=false) override;
65 
67  void rollback();
68 
70  void close() override;
71 
73  void open() override;
74 
76  bool isOpen() const override;
77 
79  virtual const ICollectionDescription& description() const override;
80 
82  virtual ICollectionCursor& cursor() final override;
83 
84  protected:
85  void open( ICollection::OpenMode mode, ISession* session );
86 
87  private:
89  IContainer* m_container;
90 
91  CollectionDescription m_description;
92  };
93 }
94 
95 #endif
pool::IContainer
Definition: IContainer.h:23
ATLAS_NOT_THREAD_SAFE
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
Definition: checker_macros.h:212
CollectionDescription.h
pool
pool namespace
Definition: libname.h:15
columnar::operator=
AccessorTemplate & operator=(AccessorTemplate &&that)
Definition: VectorColumn.h:88
pool::APRMessaging
AthMessaging wrapper to set the output level in APR components.
Definition: DbPrint.h:35
pool::ImplicitCollection::cursor
virtual ICollectionCursor & cursor() final override
Returns a cursor for the collection.
pool::ISession
Definition: ISession.h:32
pool::ImplicitCollection::open
void open() override
no-op at the moment
DbPrint.h
pool::ImplicitCollection::~ImplicitCollection
~ImplicitCollection()
Destructor.
pool::ImplicitCollection::Factory
Gaudi::PluginService::Factory< ICollection *(const ICollectionDescription *, ICollection::OpenMode, ISession *)> Factory
Definition: ImplicitCollection.h:30
CollectionRowBuffer.h
pool::ImplicitCollection::ImplicitCollection
ImplicitCollection(const ICollectionDescription *description, ICollection::OpenMode mode, ISession *session)
Constructor compying to the new Collections API parameters as above, but name and connection passed i...
pool::ICollection::OpenMode
OpenMode
Enumeration of the possible open modes of the collection.
Definition: ICollection.h:26
pool::ImplicitCollection::close
void close() override
no-op at the moment
pool::CollectionDescription
Definition: CollectionDescription.h:27
ICollection.h
Preparation.mode
mode
Definition: Preparation.py:107
pool::ICollectionCursor
Definition: ICollectionCursor.h:22
pool::ImplicitCollection::ImplicitCollection
ImplicitCollection(ISession *session, const std::string &connection, const std::string &name, ICollection::OpenMode mode)
Constructor - old style Throws POOL exception.
protected
#define protected
Definition: GenEventCnv_p1.h:26
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
pool::CollectionRowBuffer
Definition: CollectionRowBuffer.h:31
pool::ImplicitCollection::description
virtual const ICollectionDescription & description() const override
Returns an object used to describe the collection properties.
Trk::open
@ open
Definition: BinningType.h:40
pool::ImplicitCollection::openMode
virtual ICollection::OpenMode openMode() const override
Return openMode.
pool::ImplicitCollection::insertRow
virtual void insertRow(const pool::CollectionRowBuffer &inputRowBuffer) override
Adds a new row of data to the collection. Will always throw exception.
pool::ImplicitCollection::commit
void commit(bool reopen=false) override
Commits the last changes made to the collection. Will always return true.
private
#define private
Definition: xAODTruthCnvAlg.h:20
pool::ImplicitCollection
An implicit collection implementation of the ICollection interface.
Definition: ImplicitCollection.h:28
pool::ImplicitCollection::isOpen
bool isOpen() const override
Checks if the collection is open.
checker_macros.h
Define macros for attributes used to control the static checker.
pool::ImplicitCollection::ImplicitCollection
ImplicitCollection(const ImplicitCollection &)=delete
pool::ICollection
Definition: ICollection.h:23
pool::ImplicitCollection::rollback
void rollback()
Aborts the last changes made to the collection. Will always return true.
pool::ICollectionDescription
Definition: ICollectionDescription.h:23
description
std::string description
glabal timer - how long have I taken so far?
Definition: hcg.cxx:91