ATLAS Offline Software
MiniConfig.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef dqiMiniConfig_h
6 #define dqiMiniConfig_h
7 
8 #include <set>
9 #include <string>
10 
11 #include <TObject.h>
12 
14 
15 
16 namespace dqi {
17 
25 class MiniConfig : public TObject {
26 public:
27 
28  MiniConfig();
29 
30  virtual ~MiniConfig();
31 
32  virtual void AddKeyword( std::string keyword_ );
33  virtual void AddAttributeKeyword( std::string keyword_ );
34 
35  virtual void SetAttribKeywordPropagateDown( bool propagateDown );
36 
37  virtual bool ReadFile( std::string fileName );
38 
39 
40  virtual std::string GetStringAttribute( std::string objName, std::string attName ) const;
41 
42  virtual int GetIntAttribute( std::string objName, std::string attName ) const;
43 
44  virtual float GetFloatAttribute( std::string objName, std::string attName ) const;
45 
46  virtual void GetAttributeNames( std::string objName, std::set<std::string>& attSet ) const;
47 
48  virtual void SendVisitor( MiniConfigTreeNode::Visitor& visitor ) const;
49 
51 
52 protected:
53 
54  typedef std::set<std::string> KeySet_t;
55  typedef KeySet_t::const_iterator KeyIter_t;
56 
60 
62 
63 private:
64 
65 //Get rid of Root macros that confuse Doxygen
67  ClassDef( MiniConfig, 0 ) // A class that reads a configuration from a file
69 };
70 
71 } // namespace dqi
72 
73 #endif
dqi::MiniConfigTreeNode
A node of a tree structure holding a configuration, where each node may be given attributes,...
Definition: MiniConfigTreeNode.h:25
dqi::MiniConfig::m_propagateDown
bool m_propagateDown
Definition: MiniConfig.h:61
dqi::MiniConfig::AddKeyword
virtual void AddKeyword(std::string keyword_)
Definition: MiniConfig.cxx:49
MiniConfigTreeNode.h
dqi::MiniConfig::m_keywords
KeySet_t m_keywords
Definition: MiniConfig.h:57
dqi::MiniConfig::KeyIter_t
KeySet_t::const_iterator KeyIter_t
Definition: MiniConfig.h:55
dqi::MiniConfig::GetAttributeNames
virtual void GetAttributeNames(std::string objName, std::set< std::string > &attSet) const
Definition: MiniConfig.cxx:297
dqi::MiniConfig::m_tree
MiniConfigTreeNode * m_tree
Definition: MiniConfig.h:59
dqi::MiniConfig::AddAttributeKeyword
virtual void AddAttributeKeyword(std::string keyword_)
Definition: MiniConfig.cxx:58
dqi::MiniConfig::GetStringAttribute
virtual std::string GetStringAttribute(std::string objName, std::string attName) const
Definition: MiniConfig.cxx:215
dqi::MiniConfig::GetIntAttribute
virtual int GetIntAttribute(std::string objName, std::string attName) const
Definition: MiniConfig.cxx:235
dqi::MiniConfig::SetAttribKeywordPropagateDown
virtual void SetAttribKeywordPropagateDown(bool propagateDown)
Definition: MiniConfig.cxx:66
dqi::MiniConfig::SendVisitor
virtual void SendVisitor(MiniConfigTreeNode::Visitor &visitor) const
Definition: MiniConfig.cxx:320
FortranAlgorithmOptions.fileName
fileName
Definition: FortranAlgorithmOptions.py:13
dqi::MiniConfig::~MiniConfig
virtual ~MiniConfig()
Definition: MiniConfig.cxx:41
dqi::MiniConfig::GetFloatAttribute
virtual float GetFloatAttribute(std::string objName, std::string attName) const
Definition: MiniConfig.cxx:266
dqi::MiniConfigTreeNode::Visitor
Definition: MiniConfigTreeNode.h:28
dqi::MiniConfigTreeNode::Writer
Definition: MiniConfigTreeNode.h:34
dqi::MiniConfig
description
Definition: MiniConfig.h:25
dqi::MiniConfig::MiniConfig
MiniConfig()
Definition: MiniConfig.cxx:33
dqi::MiniConfig::KeySet_t
std::set< std::string > KeySet_t
Definition: MiniConfig.h:54
dqi::MiniConfig::ReadFile
virtual bool ReadFile(std::string fileName)
Definition: MiniConfig.cxx:73
dqi::MiniConfig::m_attKeywords
KeySet_t m_attKeywords
Definition: MiniConfig.h:58
example.writer
writer
show summary of content
Definition: example.py:36
dqi
Definition: CompositeAlgorithm.h:16
dqi::MiniConfig::SendWriter
virtual void SendWriter(MiniConfigTreeNode::Writer &writer)
Definition: MiniConfig.cxx:332