ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
SGComps
src
SGFolder.h
Go to the documentation of this file.
1
// -*- c++ -*-
2
3
/*
4
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
5
*/
6
7
#ifndef SGCOMPS_FOLDER_H
8
#define SGCOMPS_FOLDER_H 1
14
15
#include <string>
16
17
#include "
AthenaBaseComps/AthAlgTool.h
"
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
54
typedef
IFolder::ItemList
ItemList
;
55
57
58
typedef
IFolder::const_iterator
const_iterator
;
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
88
ServiceHandle<IClassIDSvc>
m_pCLIDSvc
;
89
90
BooleanProperty
m_checkItems
{
this
,
"CheckItems"
,
false
,
"check if item types are known to ClassIDSvc"
};
91
92
StringArrayProperty
m_itemList
{
this
,
"ItemList"
, {}, &
Folder::decodeItemList
,
93
"List of data objects identified by a class name (or clid)#key pairs. One can use '*' as key value to "
94
"add all objects of a given type to the Folder. If the type name ends with !, then write the object as "
95
"exactly that type (and not as any derived class)."
};
96
97
void
decodeItemList
(Gaudi::Details::PropertyBase&) {
98
const
bool
DONTCHECKVALIDCLID(
false
);
99
Folder::updateItemList
(DONTCHECKVALIDCLID);
100
}
101
void
decodeItem
(
const
std::string& item,
bool
checkValidCLID);
102
friend
class
Folder_tester
;
105
StatusCode
add
(
const
CLID
& clid,
const
std::string& skey,
106
bool
checkValidCLID,
bool
exact);
107
108
ItemList
m_list
;
109
110
};
111
}
//ns SG
112
113
#endif
AthAlgTool.h
CLID
uint32_t CLID
The Class ID type.
Definition
Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
SGIFolder.h
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:73
SG::Folder::updateItemList
virtual void updateItemList(bool checkValidCLID) override final
update contents of the ItemList
Definition
SGFolder.cxx:45
SG::Folder::~Folder
virtual ~Folder() override
Definition
SGFolder.cxx:36
SG::Folder::m_list
ItemList m_list
Definition
SGFolder.h:108
SG::Folder::Folder_tester
friend class Folder_tester
Definition
SGFolder.h:102
SG::Folder::decodeItem
void decodeItem(const std::string &item, bool checkValidCLID)
Definition
SGFolder.cxx:51
SG::Folder::const_iterator
IFolder::const_iterator const_iterator
Definition
SGFolder.h:58
SG::Folder::m_pCLIDSvc
ServiceHandle< IClassIDSvc > m_pCLIDSvc
Definition
SGFolder.h:88
SG::Folder::begin
virtual const_iterator begin() const override
Definition
SGFolder.h:59
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::m_checkItems
BooleanProperty m_checkItems
Definition
SGFolder.h:90
SG::Folder::initialize
virtual StatusCode initialize() override
Definition
SGFolder.cxx:40
SG::Folder::ItemList
IFolder::ItemList ItemList
the list we manage
Definition
SGFolder.h:54
SG::Folder::end
virtual const_iterator end() const override
Definition
SGFolder.h:60
SG::Folder::m_itemList
StringArrayProperty m_itemList
Definition
SGFolder.h:92
SG::Folder::Folder
Folder(const std::string &type, const std::string &name, const IInterface *parent)
Definition
SGFolder.cxx:27
SG::Folder::clear
virtual void clear() override
clear the folder contents
Definition
SGFolder.h:75
SG::Folder::decodeItemList
void decodeItemList(Gaudi::Details::PropertyBase &)
Definition
SGFolder.h:97
SG::IFolder::const_iterator
ItemList::const_iterator const_iterator
Definition
SGIFolder.h:31
SG::IFolder::ItemList
std::set< FolderItem > ItemList
the list we manage
Definition
SGIFolder.h:27
ServiceHandle
Definition
ClusterMakerTool.h:36
SG
Forward declaration.
Definition
CaloCellPacker_400_500.h:32
SG::type
Generated on
for ATLAS Offline Software by
1.17.0