ATLAS Offline Software
Loading...
Searching...
No Matches
dqi::HanConfigCompAlg Class Reference

#include <HanConfigCompAlg.h>

Inheritance diagram for dqi::HanConfigCompAlg:
Collaboration diagram for dqi::HanConfigCompAlg:

Public Member Functions

 HanConfigCompAlg ()
 HanConfigCompAlg (const HanConfigCompAlg &other)
HanConfigCompAlgoperator= (const HanConfigCompAlg &other)
virtual ~HanConfigCompAlg ()
virtual void SetName (std::string name)
virtual const char * GetName () const
virtual void AddAlg (std::string alg)
virtual TIter GetAllAlg () const
virtual void AddLib (std::string lib)
virtual TIter GetAllLib () const
virtual void PrintIOStream (std::ostream &o) const

Protected Attributes

TObjString m_name
TSeqCollection * m_subAlgs
TSeqCollection * m_libs

Detailed Description

Definition at line 22 of file HanConfigCompAlg.h.

Constructor & Destructor Documentation

◆ HanConfigCompAlg() [1/2]

dqi::HanConfigCompAlg::HanConfigCompAlg ( )

Definition at line 15 of file HanConfigCompAlg.cxx.

17{
18 this->m_subAlgs = newTList("subAlgs");
19 this->m_libs = newTList("libs");
20}
TSeqCollection * m_libs
TSeqCollection * m_subAlgs
TSeqCollection * newTList(const char *name, TObject *obj=0)
Definition HanUtils.cxx:18

◆ HanConfigCompAlg() [2/2]

dqi::HanConfigCompAlg::HanConfigCompAlg ( const HanConfigCompAlg & other)

Definition at line 22 of file HanConfigCompAlg.cxx.

24 :TObject(other),
25 m_name(other.m_name)
26{
27 this->m_subAlgs = newTList("subAlgs");
28 this->m_libs = newTList("libs");
29 TIter nextAlg(other.m_subAlgs);
30 TObjString* otherAlg;
31 while((otherAlg = dynamic_cast<TObjString*>(nextAlg())) != 0){
32 TObjString* alg = new TObjString(*otherAlg);
33 this->m_subAlgs->Add(alg);
34 }
35 TIter nextLib(other.m_libs);
36 TObjString* otherLib;
37 while((otherLib = dynamic_cast<TObjString*>(nextLib())) != 0){
38 TObjString* lib = new TObjString(*otherLib);
39 this->m_libs->Add(lib);
40 }
41}

◆ ~HanConfigCompAlg()

dqi::HanConfigCompAlg::~HanConfigCompAlg ( )
virtual

Definition at line 66 of file HanConfigCompAlg.cxx.

67 {
68 this->m_subAlgs->Delete();
69 this->m_libs->Delete();
70 delete m_subAlgs;
71 delete m_libs;
72}

Member Function Documentation

◆ AddAlg()

void dqi::HanConfigCompAlg::AddAlg ( std::string alg)
virtual

Definition at line 89 of file HanConfigCompAlg.cxx.

91{
92 TObjString* newAlg = new TObjString(alg.c_str());
93 this->m_subAlgs->Add(newAlg);
94}

◆ AddLib()

void dqi::HanConfigCompAlg::AddLib ( std::string lib)
virtual

Definition at line 104 of file HanConfigCompAlg.cxx.

106{
107 TObjString* newLib = new TObjString(lib.c_str());
108 this->m_libs->Add(newLib);
109}

◆ GetAllAlg()

TIter dqi::HanConfigCompAlg::GetAllAlg ( ) const
virtual

Definition at line 97 of file HanConfigCompAlg.cxx.

99{
100 return TIter(this->m_subAlgs);
101}

◆ GetAllLib()

TIter dqi::HanConfigCompAlg::GetAllLib ( ) const
virtual

Definition at line 112 of file HanConfigCompAlg.cxx.

114{
115 return TIter(this->m_libs);
116}

◆ GetName()

const char * dqi::HanConfigCompAlg::GetName ( ) const
virtual

Definition at line 82 of file HanConfigCompAlg.cxx.

84{
85 return this->m_name.GetName();
86}

◆ operator=()

HanConfigCompAlg & dqi::HanConfigCompAlg::operator= ( const HanConfigCompAlg & other)

Definition at line 44 of file HanConfigCompAlg.cxx.

45{
46 if (this == &other) return *this;
47
48 this->m_name = other.m_name;
49 this->m_subAlgs = newTList("subAlgs");
50 this->m_libs = newTList("libs");
51 TIter nextAlg(other.m_subAlgs);
52 TObjString* otherAlg;
53 while((otherAlg = dynamic_cast<TObjString*>(nextAlg())) != 0){
54 TObjString* alg = new TObjString(*otherAlg);
55 this->m_subAlgs->Add(alg);
56 }
57 TIter nextLib(other.m_libs);
58 TObjString* otherLib;
59 while((otherLib = dynamic_cast<TObjString*>(nextLib())) != 0){
60 TObjString* lib = new TObjString(*otherLib);
61 this->m_libs->Add(lib);
62 }
63 return *this;
64}

◆ PrintIOStream()

void dqi::HanConfigCompAlg::PrintIOStream ( std::ostream & o) const
virtual

Definition at line 119 of file HanConfigCompAlg.cxx.

121{
122 o << "\nHanConfigCompAlg: " << this->GetName() << "\n";
123
124 if (!( m_subAlgs->IsEmpty())) {
125 o << " Sub-Algorithms = {\n";
126 TIter nextAlg(m_subAlgs);
127 TObjString* alg;
128 while((alg=dynamic_cast<TObjString*>(nextAlg()))!=0){
129 o << " " << alg;
130 }
131 o << " }\n";
132 }
133 if (!( m_libs->IsEmpty())) {
134 o << " Libraries = {\n";
135 TIter nextLib(m_libs);
136 TObjString* lib;
137 while((lib=dynamic_cast<TObjString*>(nextLib()))!=0){
138 o << " " << lib;
139 }
140 o << " }\n";
141 }
142}
virtual const char * GetName() const

◆ SetName()

void dqi::HanConfigCompAlg::SetName ( std::string name)
virtual

Definition at line 75 of file HanConfigCompAlg.cxx.

77{
78 this->m_name.SetString(name.c_str());
79}

Member Data Documentation

◆ m_libs

TSeqCollection* dqi::HanConfigCompAlg::m_libs
protected

Definition at line 43 of file HanConfigCompAlg.h.

◆ m_name

TObjString dqi::HanConfigCompAlg::m_name
protected

Definition at line 41 of file HanConfigCompAlg.h.

◆ m_subAlgs

TSeqCollection* dqi::HanConfigCompAlg::m_subAlgs
protected

Definition at line 42 of file HanConfigCompAlg.h.


The documentation for this class was generated from the following files: