ATLAS Offline Software
SGFolder.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 
3 /*
4  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 #ifndef SGCOMPS_FOLDER_H
8 #define SGCOMPS_FOLDER_H 1
9 
16 #include <string>
17 
19 #include "GaudiKernel/IClassIDSvc.h"
20 #include "GaudiKernel/ServiceHandle.h"
21 
22 #include "SGTools/SGIFolder.h"
23 
24 namespace SG {
25  class Folder_tester;
26 
43  class Folder : public virtual IFolder, public virtual AthAlgTool
44  {
45  public:
47 
48  Folder(const std::string& type,
49  const std::string& name,
50  const IInterface* parent);
51  virtual ~Folder() override;
53 
56 
58 
60  virtual const_iterator begin() const override { return m_list.begin(); }
61  virtual const_iterator end() const override { return m_list.end(); }
63 
67  virtual StatusCode add(const std::string& typeName, const std::string& skey) override;
70  virtual StatusCode add(const CLID& clid, const std::string& skey) override {
71  const bool DONTCHECKVALIDCLID(false);
72  return add(clid, skey, DONTCHECKVALIDCLID, false);
73  }
74 
76  virtual void clear() override { m_list.clear(); }
77 
78 
80  virtual void updateItemList(bool checkValidCLID) override final;
81 
83 
84  virtual StatusCode initialize() override;
86  virtual StatusCode queryInterface(const InterfaceID& , void** ) override;
88 
89  private:
90 
93  StringArrayProperty m_itemList;
94  void decodeItemList(Gaudi::Details::PropertyBase&) {
95  const bool DONTCHECKVALIDCLID(false);
96  Folder::updateItemList(DONTCHECKVALIDCLID);
97  }
98  void decodeItem(const std::string& item, bool checkValidCLID);
99  friend class Folder_tester;
102  StatusCode add(const CLID& clid, const std::string& skey,
103  bool checkValidCLID, bool exact);
104 
107  BooleanProperty m_checkItems;
108 
109  };
110 } //ns SG
111 
112 #endif
SG::Folder::~Folder
virtual ~Folder() override
Definition: SGFolder.cxx:42
SGIFolder.h
SG::Folder::Folder_tester
friend class Folder_tester
Definition: SGFolder.h:99
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
SG::Folder::updateItemList
virtual void updateItemList(bool checkValidCLID) override final
update contents of the ItemList
Definition: SGFolder.cxx:61
SG::Folder::const_iterator
IFolder::const_iterator const_iterator
Definition: SGFolder.h:59
SG::Folder::clear
virtual void clear() override
clear the folder contents
Definition: SGFolder.h:76
SG::Folder::queryInterface
virtual StatusCode queryInterface(const InterfaceID &, void **) override
Query for a given interface.
Definition: SGFolder.cxx:46
SG::IFolder::const_iterator
ItemList::const_iterator const_iterator
Definition: SGIFolder.h:32
SG::Folder::m_pCLIDSvc
ServiceHandle< IClassIDSvc > m_pCLIDSvc
Definition: SGFolder.h:91
SG::Folder::m_itemList
StringArrayProperty m_itemList
property: the list of items (data objects identified by a class name/key pair)
Definition: SGFolder.h:93
SG::IFolder
a run-time configurable list of data objects
Definition: SGIFolder.h:25
SG::Folder::ItemList
IFolder::ItemList ItemList
the list we manage
Definition: SGFolder.h:55
SG::Folder::add
virtual StatusCode add(const CLID &clid, const std::string &skey) override
add a data object identifier to the list.
Definition: SGFolder.h:70
SG::Folder::Folder
Folder(const std::string &type, const std::string &name, const IInterface *parent)
Definition: SGFolder.cxx:27
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
SG::Folder::m_list
ItemList m_list
Definition: SGFolder.h:105
test_pyathena.parent
parent
Definition: test_pyathena.py:15
SG::Folder::decodeItemList
void decodeItemList(Gaudi::Details::PropertyBase &)
Definition: SGFolder.h:94
SG::Folder::begin
virtual const_iterator begin() const override
Definition: SGFolder.h:60
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
SG::Folder::m_checkItems
BooleanProperty m_checkItems
property: check if item types are known to ClassIDSvc
Definition: SGFolder.h:107
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
SG::Folder::add
virtual StatusCode add(const std::string &typeName, const std::string &skey) override
add a data object identifier to the list.
Definition: SGFolder.cxx:89
SG::IFolder::ItemList
std::set< FolderItem > ItemList
the list we manage
Definition: SGIFolder.h:28
item
Definition: ItemListSvc.h:43
SG::Folder::initialize
virtual StatusCode initialize() override
Definition: SGFolder.cxx:56
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
ReadCalibFromCool.typeName
typeName
Definition: ReadCalibFromCool.py:477
AthAlgTool
Definition: AthAlgTool.h:26
SG::Folder::end
virtual const_iterator end() const override
Definition: SGFolder.h:61
SG::Folder::decodeItem
void decodeItem(const std::string &item, bool checkValidCLID)
Definition: SGFolder.cxx:67
SG::Folder
a run-time configurable list of data objects
Definition: SGFolder.h:44
ServiceHandle< IClassIDSvc >