80{
81 dqm_core::Result::Status
status(dqm_core::Result::Undefined);
82 std::map<std::string,double>
tags;
83 std::unique_ptr<TObjArray> returnObjs(new TObjArray);
84
86
88 try {
89 m_subalg.reset(dqm_core::AlgorithmManager::instance().getAlgorithm(subalgname));
90 }
91 catch (dqm_core::Exception& ex) {
92 throw dqm_core::BadConfig( ERS_HERE, "RepeatAlgorithm", ex.what(), ex );
93 }
94 }
96 try {
98 } catch (dqm_core::BadConfig &) {
99 throw dqm_core::BadConfig( ERS_HERE, "RepeatAlgorithm", "No references defined for RepeatAlgorithm - this makes no sense" );
100 }
101 const TCollection* listptr(
dynamic_cast<const TCollection*
>(
ref));
102 if (!listptr) {
103 throw dqm_core::BadConfig( ERS_HERE, "RepeatAlgorithm", "Reference needs to be a TCollection" );
104 }
105 TIter itr(listptr);
106 while ( TObject* ireference = itr.Next() ) {
107 std::unique_ptr<dqm_core::AlgorithmConfig> subConfig(
ConfigureSubAlg(config, ireference));
108 dqm_core::Result* subResult =
m_subalg->execute( name,
data, *subConfig );
109 if( subResult->status_ != dqm_core::Result::Undefined ) {
110 status = (
status == dqm_core::Result::Undefined ) ? dqm_core::Result::Green :
status;
112 }
113
114 std::map<std::string,double>::const_iterator tagsEnd = subResult->tags_.end();
115 std::map<std::string,double>::const_iterator tagsIter = subResult->tags_.begin();
116 for( ; tagsIter != tagsEnd; ++tagsIter ) {
117 tags[ireference->GetName() + std::string(
"|") + tagsIter->first] = tagsIter->second;
118 }
119 tags[ireference->GetName() + std::string(
"|Status")] = subResult->status_;
121
122 if( ireference->IsA()->InheritsFrom( "TH1" )){
123 TH1* hireference = dynamic_cast<TH1*>(ireference);
124 if (hireference) {
125 tags[ireference->GetName() + std::string(
"|NEntries")] = hireference->GetEntries();
126 }
127 }
128 }
129
130 if (subResult->getObject()) {
131
132
133 }
134
135 delete subResult;
136 }
137
138 dqm_core::Result*
result =
new dqm_core::Result( status );
140 if (!returnObjs->IsEmpty()) {
141 result->object_.reset(returnObjs.release());
142 }
143
145}
const boost::regex ref(r_ef)
char data[hepevt_bytes_allocation_ATLAS]
dqm_core::AlgorithmConfig * ConfigureSubAlg(const dqm_core::AlgorithmConfig &config, TObject *reference)
std::vector< std::string > tags