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

#include <HanConfigGroup.h>

Inheritance diagram for dqi::HanConfigGroup:
Collaboration diagram for dqi::HanConfigGroup:

Public Member Functions

 HanConfigGroup ()
 HanConfigGroup (const HanConfigGroup &other)
HanConfigGroupoperator= (const HanConfigGroup &other)
virtual ~HanConfigGroup ()
virtual std::string GetUniqueName () const
virtual void SetPathName (const std::string &name_)
virtual const char * GetPathName () const
virtual void AddAssessor (const HanConfigAssessor &hcass_)
virtual const HanConfigAssessor GetAssessor (const std::string &name_) const
virtual TIter GetAllAssessors () const
virtual void AddGroup (const HanConfigGroup &hcg_)
virtual HanConfigGroup GetGroup (const std::string &name_) const
virtual TIter GetAllGroups () const
virtual HanConfigGroupGetNode (const std::string &name_) const
virtual TSeqCollection * GetList (TDirectory *basedir, std::map< std::string, TSeqCollection * > &mp)
virtual void Accept (Visitor &visitor, boost::shared_ptr< dqm_core::Region > dqParent) const
virtual void PrintIOStream (std::ostream &o) const
virtual void SetName (std::string name_)
virtual const char * GetName () const
virtual const char * GetHistPath () const
virtual void SetAlgName (std::string name_)
virtual const char * GetAlgName () const
virtual void SetAlgLibName (std::string name_)
virtual const char * GetAlgLibName () const
virtual void SetAlgRefName (std::string name_)
virtual std::string GetAlgRefName () const
virtual const char * GetAlgRefString () const
virtual void AddAlgPar (const HanConfigAlgPar &algPar_)
virtual HanConfigAlgPar GetAlgPar (std::string name_) const
virtual TIter GetAllAlgPars () const
virtual void AddAlgStrPar (const HanConfigParMap &algPar_)
virtual HanConfigParMap GetAlgStrPar (std::string name_) const
virtual TIter GetAllAlgStrPars () const
virtual void AddAlgLimit (const HanConfigAlgLimit &algLim_)
virtual HanConfigAlgLimit GetAlgLimit (std::string name_) const
virtual TIter GetAllAlgLimits () const
virtual void AddAnnotation (const HanConfigParMap &annotation_)
virtual const HanConfigParMapGetAnnotation (std::string name_) const
virtual TIter GetAllAnnotations () const
virtual void SetWeight (float weight_)
virtual float GetWeight () const
virtual void SetIsRegex (bool isRegex_)
virtual bool GetIsRegex () const

Protected Attributes

TObjString m_pathName
TList m_assessors
TList m_groups
TObjString m_name
TObjString m_algName
TObjString m_algLibName
TObjString m_algRefName
TSeqCollection * m_algPars
TSeqCollection * m_algStrPars
TSeqCollection * m_algLimits
TSeqCollection * m_annotations
float m_weight
bool m_isRegex

Detailed Description

Definition at line 23 of file HanConfigGroup.h.

Constructor & Destructor Documentation

◆ HanConfigGroup() [1/2]

dqi::HanConfigGroup::HanConfigGroup ( )

Definition at line 26 of file HanConfigGroup.cxx.

28{
29}

◆ HanConfigGroup() [2/2]

dqi::HanConfigGroup::HanConfigGroup ( const HanConfigGroup & other)

Definition at line 32 of file HanConfigGroup.cxx.

34 : HanConfigAssessor(other)
35 , m_pathName(other.m_pathName)
36{
37 TIter nextAssess( &other.m_assessors );
38 HanConfigAssessor* otherAssess;
39 while( (otherAssess = dynamic_cast<HanConfigAssessor*>( nextAssess() )) != 0 ) {
40 HanConfigAssessor* acpy = new HanConfigAssessor( *otherAssess );
41 m_assessors.Add( acpy );
42 }
43
44 TIter nextGroup( &other.m_groups );
45 HanConfigGroup* otherGroup;
46 while( (otherGroup = dynamic_cast<HanConfigGroup*>( nextGroup() )) != 0 ) {
47 HanConfigGroup* gcpy = new HanConfigGroup( *otherGroup );
48 m_groups.Add( gcpy );
49 }
50}

◆ ~HanConfigGroup()

dqi::HanConfigGroup::~HanConfigGroup ( )
virtual

Definition at line 80 of file HanConfigGroup.cxx.

82{
83 // Assume that the same object has not been added to both lists
84 m_assessors.Delete();
85 m_groups.Delete();
86}

Member Function Documentation

◆ Accept()

void dqi::HanConfigGroup::Accept ( Visitor & visitor,
boost::shared_ptr< dqm_core::Region > dqParent ) const
virtual

Reimplemented from dqi::HanConfigAssessor.

Definition at line 227 of file HanConfigGroup.cxx.

229{
230 std::string nodeName( GetName() );
231 boost::shared_ptr<dqm_core::Region> dqr;
232 if( nodeName != "top_level" ) {
233 boost::shared_ptr<dqm_core::Node> dqp(visitor.Visit( this, std::move(dqParent) ));
234 dqr = boost::dynamic_pointer_cast<dqm_core::Region>( dqp );
235 }
236 else {
237 dqr = std::move(dqParent);
238 }
239 // Accept the same visitor on all containing m_groups and m_assessors
240
241 try {
242 TIter nextAssess(&m_assessors);
244 while ((hca = dynamic_cast<HanConfigAssessor*>(nextAssess())) != 0) {
245 hca->Accept(visitor, dqr);
246 }
247 } catch (std::exception& s) {
248 std::cout << "Assess: Caught exception " << s.what() << std::endl;
249 throw;
250 }
251
252 try {
253 TIter nextGroup(&m_groups);
254 HanConfigGroup* hcg;
255 while ((hcg = dynamic_cast<HanConfigGroup*>(nextGroup())) != 0) {
256 hcg->Accept(visitor, dqr);
257 }
258 } catch (std::exception& s) {
259 std::cout << "Group: Caught exception " << s.what() << std::endl;
260 throw;
261 }
262}
virtual const char * GetName() const

◆ AddAlgLimit()

void dqi::HanConfigAssessor::AddAlgLimit ( const HanConfigAlgLimit & algLim_)
virtualinherited

Definition at line 305 of file HanConfigAssessor.cxx.

307{
308 HanConfigAlgLimit* lim = new HanConfigAlgLimit( algLim_ );
309 m_algLimits->Add( lim );
310}
TSeqCollection * m_algLimits

◆ AddAlgPar()

void dqi::HanConfigAssessor::AddAlgPar ( const HanConfigAlgPar & algPar_)
virtualinherited

Definition at line 245 of file HanConfigAssessor.cxx.

247{
248 HanConfigAlgPar* par = new HanConfigAlgPar( algPar_ );
249 m_algPars->Add( par );
250}

◆ AddAlgStrPar()

void dqi::HanConfigAssessor::AddAlgStrPar ( const HanConfigParMap & algPar_)
virtualinherited

Definition at line 275 of file HanConfigAssessor.cxx.

277{
278 HanConfigParMap* strPar = new HanConfigParMap( algStrPar_ );
279 m_algStrPars->Add( strPar );
280}
TSeqCollection * m_algStrPars

◆ AddAnnotation()

void dqi::HanConfigAssessor::AddAnnotation ( const HanConfigParMap & annotation_)
virtualinherited

Definition at line 334 of file HanConfigAssessor.cxx.

336{
337 HanConfigParMap* parMap = new HanConfigParMap( annotation_ );
338 m_annotations->Add( parMap );
339}
TSeqCollection * m_annotations

◆ AddAssessor()

void dqi::HanConfigGroup::AddAssessor ( const HanConfigAssessor & hcass_)
virtual

Definition at line 114 of file HanConfigGroup.cxx.

116{
117 HanConfigAssessor* acpy = new HanConfigAssessor( hcass_ );
118 m_assessors.Add( acpy );
119}

◆ AddGroup()

void dqi::HanConfigGroup::AddGroup ( const HanConfigGroup & hcg_)
virtual

Definition at line 144 of file HanConfigGroup.cxx.

146{
147 HanConfigGroup* gcpy = new HanConfigGroup( hcg_ );
148 m_groups.Add( gcpy );
149}

◆ GetAlgLibName()

const char * dqi::HanConfigAssessor::GetAlgLibName ( ) const
virtualinherited

Definition at line 212 of file HanConfigAssessor.cxx.

214{
215 return m_algLibName.GetName();
216}

◆ GetAlgLimit()

HanConfigAlgLimit dqi::HanConfigAssessor::GetAlgLimit ( std::string name_) const
virtualinherited

Definition at line 314 of file HanConfigAssessor.cxx.

316{
317 HanConfigAlgLimit* lim = dynamic_cast<HanConfigAlgLimit*>( m_algLimits->FindObject(name_.c_str()) );
318 if( lim == 0 ) {
319 return HanConfigAlgLimit();
320 }
321
322 return *lim;
323}

◆ GetAlgName()

const char * dqi::HanConfigAssessor::GetAlgName ( ) const
virtualinherited

Definition at line 196 of file HanConfigAssessor.cxx.

198{
199 return m_algName.GetName();
200}

◆ GetAlgPar()

HanConfigAlgPar dqi::HanConfigAssessor::GetAlgPar ( std::string name_) const
virtualinherited

Definition at line 254 of file HanConfigAssessor.cxx.

256{
257 HanConfigAlgPar* par = dynamic_cast<HanConfigAlgPar*>( m_algPars->FindObject(name_.c_str()) );
258 if( par == 0 ) {
259 return HanConfigAlgPar();
260 }
261
262 return *par;
263}

◆ GetAlgRefName()

std::string dqi::HanConfigAssessor::GetAlgRefName ( ) const
virtualinherited

Definition at line 228 of file HanConfigAssessor.cxx.

230{
231 dqi::ConditionsSingleton& condSingleton=dqi::ConditionsSingleton::getInstance();
232 return condSingleton.conditionalSelect(std::string(m_algRefName.GetName()),std::string(condSingleton.getCondition()));
233}
static ConditionsSingleton & getInstance()
const std::string & getCondition() const
std::string conditionalSelect(std::string inp, const std::string &condition)

◆ GetAlgRefString()

const char * dqi::HanConfigAssessor::GetAlgRefString ( ) const
virtualinherited

Definition at line 237 of file HanConfigAssessor.cxx.

239{
240 return m_algRefName.GetName();
241}

◆ GetAlgStrPar()

HanConfigParMap dqi::HanConfigAssessor::GetAlgStrPar ( std::string name_) const
virtualinherited

Definition at line 284 of file HanConfigAssessor.cxx.

286{
287 HanConfigParMap* strPar = dynamic_cast<HanConfigParMap*>( m_algStrPars->FindObject(name_.c_str()) );
288 if( strPar == 0 ) {
289 return HanConfigParMap();
290 }
291
292 return *strPar;
293}

◆ GetAllAlgLimits()

TIter dqi::HanConfigAssessor::GetAllAlgLimits ( ) const
virtualinherited

Definition at line 327 of file HanConfigAssessor.cxx.

329{
330 return TIter( m_algLimits );
331}

◆ GetAllAlgPars()

TIter dqi::HanConfigAssessor::GetAllAlgPars ( ) const
virtualinherited

Definition at line 267 of file HanConfigAssessor.cxx.

269{
270 return TIter( m_algPars );
271}

◆ GetAllAlgStrPars()

TIter dqi::HanConfigAssessor::GetAllAlgStrPars ( ) const
virtualinherited

Definition at line 297 of file HanConfigAssessor.cxx.

299{
300 return TIter( m_algStrPars );
301}

◆ GetAllAnnotations()

TIter dqi::HanConfigAssessor::GetAllAnnotations ( ) const
virtualinherited

Definition at line 356 of file HanConfigAssessor.cxx.

358{
359 return TIter( m_annotations );
360}

◆ GetAllAssessors()

TIter dqi::HanConfigGroup::GetAllAssessors ( ) const
virtual

Definition at line 136 of file HanConfigGroup.cxx.

138{
139 return TIter( &m_assessors );
140}

◆ GetAllGroups()

TIter dqi::HanConfigGroup::GetAllGroups ( ) const
virtual

Definition at line 166 of file HanConfigGroup.cxx.

168{
169 return TIter( &m_groups );
170}

◆ GetAnnotation()

const HanConfigParMap * dqi::HanConfigAssessor::GetAnnotation ( std::string name_) const
virtualinherited

Definition at line 343 of file HanConfigAssessor.cxx.

345{
346 HanConfigParMap* parMap = dynamic_cast<HanConfigParMap*>( m_annotations->FindObject(name_.c_str()) );
347 if( parMap == 0 ) {
348 //std::cerr << "WARNING: attempt to access non-existent annotation " << name_ << " on assessor " << GetName() << std::endl;
349 return 0;
350 }
351 return parMap;
352}

◆ GetAssessor()

const HanConfigAssessor dqi::HanConfigGroup::GetAssessor ( const std::string & name_) const
virtual

Definition at line 123 of file HanConfigGroup.cxx.

125{
126 HanConfigAssessor* hca = dynamic_cast<HanConfigAssessor*>( m_assessors.FindObject(name_.c_str()) );
127 if( hca == 0 ) {
128 return HanConfigAssessor();
129 }
130
131 return *hca;
132}

◆ GetGroup()

HanConfigGroup dqi::HanConfigGroup::GetGroup ( const std::string & name_) const
virtual

Definition at line 153 of file HanConfigGroup.cxx.

155{
156 HanConfigGroup* hcg = dynamic_cast<HanConfigGroup*>( m_groups.FindObject(name_.c_str()) );
157 if( hcg == 0 ) {
158 return HanConfigGroup();
159 }
160
161 return *hcg;
162}

◆ GetHistPath()

const char * dqi::HanConfigAssessor::GetHistPath ( ) const
virtualinherited

Definition at line 176 of file HanConfigAssessor.cxx.

178{
179 const HanConfigParMap* parmap = GetAnnotation("inputname");
180 if (!parmap) {
181 return GetName();
182 } else {
183 return parmap->GetValue();
184 }
185}
virtual const HanConfigParMap * GetAnnotation(std::string name_) const

◆ GetIsRegex()

bool dqi::HanConfigAssessor::GetIsRegex ( ) const
virtualinherited

Definition at line 384 of file HanConfigAssessor.cxx.

386{
387 return m_isRegex;
388}

◆ GetList()

TSeqCollection * dqi::HanConfigGroup::GetList ( TDirectory * basedir,
std::map< std::string, TSeqCollection * > & mp )
virtual

Reimplemented from dqi::HanConfigAssessor.

Definition at line 204 of file HanConfigGroup.cxx.

206{
207 // Let the original method do all the work
208 TSeqCollection *ret = HanConfigAssessor::GetList( basedir, mp );
209 ret->SetName( this->m_name.GetName() );
210
211 // Iterate through containing m_groups and m_assessors and add them to the childrenList
212 TIter nextAssess( &m_assessors );
214 while( (hca = dynamic_cast<HanConfigAssessor*>( nextAssess() )) != 0 )
215 ret->Add( hca->GetList(basedir,mp) );
216
217 TIter nextGroup( &m_groups );
218 HanConfigGroup* hcg;
219 while( (hcg = dynamic_cast<HanConfigGroup*>( nextGroup() )) != 0 )
220 ret->Add( hcg->GetList(basedir,mp) );
221
222 return ret;
223}
virtual TSeqCollection * GetList(TDirectory *basedir, std::map< std::string, TSeqCollection * > &mp)

◆ GetName()

const char * dqi::HanConfigAssessor::GetName ( ) const
virtualinherited

Definition at line 169 of file HanConfigAssessor.cxx.

171{
172 return m_name.GetName();
173}

◆ GetNode()

HanConfigGroup * dqi::HanConfigGroup::GetNode ( const std::string & name_) const
virtual

Definition at line 174 of file HanConfigGroup.cxx.

176{
177 if( m_groups.IsEmpty() ) {
178 return 0;
179 }
180
181 std::string::size_type k = name_.find_first_of('/');
182 if( k != std::string::npos ) {
183 std::string dName( name_, 0, k );
184 std::string pName( name_, k+1, std::string::npos );
185 if( dName != "" ) {
186 if( dName == std::string( GetName() ) ) {
187 return GetNode( pName );
188 }
189 HanConfigGroup* subreg = dynamic_cast<HanConfigGroup*>( m_groups.FindObject(dName.c_str()) );
190 if( subreg == 0 ) {
191 return 0;
192 }
193 return subreg->GetNode( pName );
194 }
195 return GetNode( pName );
196 }
197
198 HanConfigGroup* subreg = dynamic_cast<HanConfigGroup*>( m_groups.FindObject(name_.c_str()) );
199 return subreg;
200}
virtual HanConfigGroup * GetNode(const std::string &name_) const

◆ GetPathName()

const char * dqi::HanConfigGroup::GetPathName ( ) const
virtual

Definition at line 106 of file HanConfigGroup.cxx.

108{
109 return m_pathName.GetName();
110}

◆ GetUniqueName()

std::string dqi::HanConfigGroup::GetUniqueName ( ) const
virtual

Reimplemented from dqi::HanConfigAssessor.

Definition at line 90 of file HanConfigGroup.cxx.

92{
93 return std::string( GetPathName() );
94}
virtual const char * GetPathName() const

◆ GetWeight()

float dqi::HanConfigAssessor::GetWeight ( ) const
virtualinherited

Definition at line 370 of file HanConfigAssessor.cxx.

372{
373 return m_weight;
374}

◆ operator=()

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

Definition at line 54 of file HanConfigGroup.cxx.

56{
57 if (this != &other) {
59 m_pathName = other.m_pathName;
60
61 TIter nextAssess( &other.m_assessors );
62 HanConfigAssessor* otherAssess;
63 while( (otherAssess = dynamic_cast<HanConfigAssessor*>( nextAssess() )) != 0 ) {
64 HanConfigAssessor* acpy = new HanConfigAssessor( *otherAssess );
65 m_assessors.Add( acpy );
66 }
67
68 TIter nextGroup( &other.m_groups );
69 HanConfigGroup* otherGroup;
70 while( (otherGroup = dynamic_cast<HanConfigGroup*>( nextGroup() )) != 0 ) {
71 HanConfigGroup* gcpy = new HanConfigGroup( *otherGroup );
72 m_groups.Add( gcpy );
73 }
74 }
75
76 return *this;
77}
HanConfigAssessor & operator=(const HanConfigAssessor &other)

◆ PrintIOStream()

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

Reimplemented from dqi::HanConfigAssessor.

Definition at line 265 of file HanConfigGroup.cxx.

267{
268 o << "\nHanConfigGroup: " << GetName() << "\n"
269 << " Algorithm Name = \"" << GetAlgName() << "\"\n"
270 << " Algorithm Library = \"" << GetAlgLibName() << "\"\n"
271 << " Algorithm Reference = \"" << GetAlgRefName() << "\"\n"
272 << " Weight = " << GetWeight() << "\n";
273
274 if( !m_algPars->IsEmpty() ) {
275 o << " Algorithm Parameters = {\n";
276 TIter nextPar( m_algPars );
277 HanConfigAlgPar* par;
278 while( (par = dynamic_cast<HanConfigAlgPar*>( nextPar() )) != 0 ) {
279 o << " " << par;
280 }
281 TIter nextStrPar( m_algStrPars );
282 HanConfigParMap* strPar;
283 while( (strPar = dynamic_cast<HanConfigParMap*>( nextStrPar() )) != 0 ) {
284 o << " " << strPar;
285 }
286 o << " }\n";
287 }
288
289 if( !m_algLimits->IsEmpty() ) {
290 o << " Algorithm Limits = {\n";
291 TIter nextLim( m_algLimits );
292 HanConfigAlgLimit* lim;
293 while( (lim = dynamic_cast<HanConfigAlgLimit*>( nextLim() )) != 0 ) {
294 o << " " << lim;
295 }
296 o << " }\n";
297 }
298
299 if( !m_groups.IsEmpty() ) {
300 o << "\n>> BEGIN SUB REGIONS of \"" << GetName() << "\"\n";
301 TIter nextGroup( &m_groups );
302 HanConfigGroup* hcg;
303 while( (hcg = dynamic_cast<HanConfigGroup*>( nextGroup() )) != 0 ) {
304 o << hcg;
305 }
306 o << "\n<< END SUB REGIONS of \"" << GetName() << "\"\n";
307 }
308
309 if( !m_assessors.IsEmpty() ) {
310 o << "\n>> BEGIN ASSESSMENTS of \"" << GetName() << "\"\n";
311 TIter nextAssess( &m_assessors );
313 while( (hca = dynamic_cast<HanConfigAssessor*>( nextAssess() )) != 0 ) {
314 o << hca;
315 }
316 o << "\n<< END ASSESSMENTS of \"" << GetName() << "\"\n";
317 }
318
319}
virtual float GetWeight() const
virtual const char * GetAlgName() const
virtual const char * GetAlgLibName() const
virtual std::string GetAlgRefName() const

◆ SetAlgLibName()

void dqi::HanConfigAssessor::SetAlgLibName ( std::string name_)
virtualinherited

Definition at line 204 of file HanConfigAssessor.cxx.

206{
207 m_algLibName.SetString( name_.c_str() );
208}

◆ SetAlgName()

void dqi::HanConfigAssessor::SetAlgName ( std::string name_)
virtualinherited

Definition at line 188 of file HanConfigAssessor.cxx.

190{
191 m_algName.SetString( name_.c_str() );
192}

◆ SetAlgRefName()

void dqi::HanConfigAssessor::SetAlgRefName ( std::string name_)
virtualinherited

Definition at line 220 of file HanConfigAssessor.cxx.

222{
223 m_algRefName.SetString( name_.c_str() );
224}

◆ SetIsRegex()

void dqi::HanConfigAssessor::SetIsRegex ( bool isRegex_)
virtualinherited

Definition at line 377 of file HanConfigAssessor.cxx.

379{
380 m_isRegex = isRegex_;
381}

◆ SetName()

void dqi::HanConfigAssessor::SetName ( std::string name_)
virtualinherited

Definition at line 161 of file HanConfigAssessor.cxx.

163{
164 m_name.SetString( name_.c_str() );
165}

◆ SetPathName()

void dqi::HanConfigGroup::SetPathName ( const std::string & name_)
virtual

Definition at line 98 of file HanConfigGroup.cxx.

100{
101 m_pathName.SetString( name_.c_str() );
102}

◆ SetWeight()

void dqi::HanConfigAssessor::SetWeight ( float weight_)
virtualinherited

Definition at line 363 of file HanConfigAssessor.cxx.

365{
366 m_weight = weight_;
367}

Member Data Documentation

◆ m_algLibName

TObjString dqi::HanConfigAssessor::m_algLibName
protectedinherited

Definition at line 109 of file HanConfigAssessor.h.

◆ m_algLimits

TSeqCollection* dqi::HanConfigAssessor::m_algLimits
protectedinherited

Definition at line 114 of file HanConfigAssessor.h.

◆ m_algName

TObjString dqi::HanConfigAssessor::m_algName
protectedinherited

Definition at line 108 of file HanConfigAssessor.h.

◆ m_algPars

TSeqCollection* dqi::HanConfigAssessor::m_algPars
protectedinherited

Definition at line 112 of file HanConfigAssessor.h.

◆ m_algRefName

TObjString dqi::HanConfigAssessor::m_algRefName
protectedinherited

Definition at line 110 of file HanConfigAssessor.h.

◆ m_algStrPars

TSeqCollection* dqi::HanConfigAssessor::m_algStrPars
protectedinherited

Definition at line 113 of file HanConfigAssessor.h.

◆ m_annotations

TSeqCollection* dqi::HanConfigAssessor::m_annotations
protectedinherited

Definition at line 115 of file HanConfigAssessor.h.

◆ m_assessors

TList dqi::HanConfigGroup::m_assessors
protected

Definition at line 64 of file HanConfigGroup.h.

◆ m_groups

TList dqi::HanConfigGroup::m_groups
protected

Definition at line 65 of file HanConfigGroup.h.

◆ m_isRegex

bool dqi::HanConfigAssessor::m_isRegex
protectedinherited

Definition at line 118 of file HanConfigAssessor.h.

◆ m_name

TObjString dqi::HanConfigAssessor::m_name
protectedinherited

Definition at line 106 of file HanConfigAssessor.h.

◆ m_pathName

TObjString dqi::HanConfigGroup::m_pathName
protected

Definition at line 62 of file HanConfigGroup.h.

◆ m_weight

float dqi::HanConfigAssessor::m_weight
protectedinherited

Definition at line 117 of file HanConfigAssessor.h.


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