ATLAS Offline Software
CollectionService.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 COLLECTIONBASE_COLLECTIONSERVICE_H
6 #define COLLECTIONBASE_COLLECTIONSERVICE_H
7 
10 
11 
12 namespace pool {
13 
14  class ICollectionDescription;
15  class ISession;
16 
26  {
27 
28  public:
34  CollectionService() = default;
35 
36 
38  virtual ~CollectionService() = default;
39 
48  bool overwrite = false );
49 
50  virtual ICollection* open( const std::string & name,
51  const std::string & type,
52  const std::string & connection = "",
53  bool readOnly = true) const
54  {
55  return handle(name, type, connection, readOnly, 0);
56  }
57 
58 
72  virtual ICollection* handle( const std::string & name,
73  const std::string & type,
74  const std::string & connection = "",
75  bool readOnly = true,
76  ISession* session = 0 ) const;
77 
81  static void setMessageSvcQuiet( bool quiet=true );
82 
84  ICollection::OpenMode openMode,
85  ISession* session = 0 ) const;
86 
87  };
88 }
89 
90 #endif
pool::CollectionService::handle
virtual ICollection * handle(const std::string &name, const std::string &type, const std::string &connection="", bool readOnly=true, ISession *session=0) const
Retrieves a handle to an existing collection or collection fragment for read or update transactions,...
pool::CollectionService::create
virtual ICollection * create(const ICollectionDescription &description, bool overwrite=false)
Creates or overwrites a collection or collection fragment, given a description of its properties.
pool::CollectionService::~CollectionService
virtual ~CollectionService()=default
Default destructor.
quiet
bool quiet
Definition: TrigGlobEffCorrValidation.cxx:190
pool
pool namespace
Definition: libname.h:15
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
pool::ISession
Definition: ISession.h:32
pool::CollectionService::plugin
pool::ICollection * plugin(const ICollectionDescription &description, ICollection::OpenMode openMode, ISession *session=0) const
pool::ICollection::OpenMode
OpenMode
Enumeration of the possible open modes of the collection.
Definition: ICollection.h:26
pool::CollectionService::setMessageSvcQuiet
static void setMessageSvcQuiet(bool quiet=true)
suppress (or enable) warning about a missing MessageSvc (logging)
ICollection.h
pool::CollectionService::CollectionService
CollectionService()=default
Constructor:
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
pool::CollectionService::open
virtual ICollection * open(const std::string &name, const std::string &type, const std::string &connection="", bool readOnly=true) const
Definition: CollectionService.h:50
pool::CollectionService
Definition: CollectionService.h:26
checker_macros.h
Define macros for attributes used to control the static checker.
pool::ICollection
Definition: ICollection.h:23
pool::ICollectionDescription
Definition: ICollectionDescription.h:23
description
std::string description
glabal timer - how long have I taken so far?
Definition: hcg.cxx:91