ATLAS Offline Software
SGFolder.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 
3 /*
4  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 #ifndef SGCOMPS_FOLDER_H
8 #define SGCOMPS_FOLDER_H 1
9 
15 #include <string>
16 
18 #include "GaudiKernel/IClassIDSvc.h"
19 #include "GaudiKernel/ServiceHandle.h"
20 
21 #include "SGTools/SGIFolder.h"
22 
23 namespace SG {
24  class Folder_tester;
25 
42  class Folder : public extends<AthAlgTool, IFolder>
43  {
44  public:
46 
47  Folder(const std::string& type,
48  const std::string& name,
49  const IInterface* parent);
50  virtual ~Folder() override;
52 
55 
57 
59  virtual const_iterator begin() const override { return m_list.begin(); }
60  virtual const_iterator end() const override { return m_list.end(); }
62 
66  virtual StatusCode add(const std::string& typeName, const std::string& skey) override;
69  virtual StatusCode add(const CLID& clid, const std::string& skey) override {
70  const bool DONTCHECKVALIDCLID(false);
71  return add(clid, skey, DONTCHECKVALIDCLID, false);
72  }
73 
75  virtual void clear() override { m_list.clear(); }
76 
77 
79  virtual void updateItemList(bool checkValidCLID) override final;
80 
82 
83  virtual StatusCode initialize() override;
85 
86  private:
87 
90  StringArrayProperty m_itemList;
91  void decodeItemList(Gaudi::Details::PropertyBase&) {
92  const bool DONTCHECKVALIDCLID(false);
93  Folder::updateItemList(DONTCHECKVALIDCLID);
94  }
95  void decodeItem(const std::string& item, bool checkValidCLID);
96  friend class Folder_tester;
99  StatusCode add(const CLID& clid, const std::string& skey,
100  bool checkValidCLID, bool exact);
101 
104  BooleanProperty m_checkItems;
105 
106  };
107 } //ns SG
108 
109 #endif
SG::Folder::~Folder
virtual ~Folder() override
Definition: SGFolder.cxx:42
SGIFolder.h
SG::Folder::Folder_tester
friend class Folder_tester
Definition: SGFolder.h:96
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:51
SG::Folder::const_iterator
IFolder::const_iterator const_iterator
Definition: SGFolder.h:58
SG::Folder::clear
virtual void clear() override
clear the folder contents
Definition: SGFolder.h:75
SG::IFolder::const_iterator
ItemList::const_iterator const_iterator
Definition: SGIFolder.h:34
SG::Folder::m_pCLIDSvc
ServiceHandle< IClassIDSvc > m_pCLIDSvc
Definition: SGFolder.h:88
SG::Folder::m_itemList
StringArrayProperty m_itemList
property: the list of items (data objects identified by a class name/key pair)
Definition: SGFolder.h:90
SG::Folder::ItemList
IFolder::ItemList ItemList
the list we manage
Definition: SGFolder.h:54
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:69
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:102
test_pyathena.parent
parent
Definition: test_pyathena.py:15
SG::Folder::decodeItemList
void decodeItemList(Gaudi::Details::PropertyBase &)
Definition: SGFolder.h:91
SG::Folder::begin
virtual const_iterator begin() const override
Definition: SGFolder.h:59
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:104
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
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:79
SG::IFolder::ItemList
std::set< FolderItem > ItemList
the list we manage
Definition: SGIFolder.h:30
item
Definition: ItemListSvc.h:43
SG::Folder::initialize
virtual StatusCode initialize() override
Definition: SGFolder.cxx:46
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
ReadCalibFromCool.typeName
typeName
Definition: ReadCalibFromCool.py:477
SG::Folder::end
virtual const_iterator end() const override
Definition: SGFolder.h:60
SG::Folder::decodeItem
void decodeItem(const std::string &item, bool checkValidCLID)
Definition: SGFolder.cxx:57
SG::Folder
a run-time configurable list of data objects
Definition: SGFolder.h:43
ServiceHandle< IClassIDSvc >