ATLAS Offline Software
SGFolderItem.h
Go to the documentation of this file.
1 /* -*- C++ -*- */
2 
3 /*
4  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5 */
6 
10 #ifndef SGTOOLS_FOLDERITEM_H
11 #define SGTOOLS_FOLDERITEM_H
12 #include <string>
13 #include "GaudiKernel/ClassID.h"
14 namespace SG {
24  class FolderItem {
25  public:
26  FolderItem(CLID id=CLID_NULL,
27  const std::string& key="",
28  bool exact = false)
29  : m_id(id), m_key(key), m_exact(exact) {}
30  CLID id() const { return m_id; }
31  const std::string& key() const { return m_key; }
32  bool operator < (const FolderItem& rhs) const {
33  return ( id() < rhs.id() ||
34  ( (id() == rhs.id()) && key() < rhs.key()) );
35  }
36  bool isFolder() const;
37  bool exact() const { return m_exact; }
38  private:
40  std::string m_key;
41  bool m_exact;
42  };
43 } //ns SG
44 
45 #endif
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
SG::FolderItem::m_exact
bool m_exact
Definition: SGFolderItem.h:41
SG::FolderItem::m_key
std::string m_key
Definition: SGFolderItem.h:40
SG::FolderItem::key
const std::string & key() const
Definition: SGFolderItem.h:31
SG::FolderItem::isFolder
bool isFolder() const
Definition: SGFolderItem.cxx:8
SG::FolderItem::m_id
CLID m_id
Definition: SGFolderItem.h:39
SG::FolderItem::id
CLID id() const
Definition: SGFolderItem.h:30
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
SG::FolderItem::operator<
bool operator<(const FolderItem &rhs) const
Definition: SGFolderItem.h:32
SG::FolderItem::exact
bool exact() const
Definition: SGFolderItem.h:37
SG::FolderItem::FolderItem
FolderItem(CLID id=CLID_NULL, const std::string &key="", bool exact=false)
Definition: SGFolderItem.h:26
SG::FolderItem
a Folder item (data object) is identified by the clid/key pair
Definition: SGFolderItem.h:24