Skip to content

Commit 7866ee4

Browse files
committed
Fix CI complaints
1 parent f960487 commit 7866ee4

File tree

3 files changed

+33
-9
lines changed

3 files changed

+33
-9
lines changed

src/libraries/JANA/Components/JHasInputs.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ struct JHasInputs {
288288
facset->Print();
289289
throw JException("Databundle with unique name '%s' does not inherit from JPodioDatabundle", m_databundle_name.c_str());
290290
}
291-
m_data = dynamic_cast<const PodioT::collection_type*>(typed_databundle->GetCollection());
291+
m_data = dynamic_cast<const typename PodioT::collection_type*>(typed_databundle->GetCollection());
292292
if (m_data == nullptr) {
293293
throw JException("Databundle with unique name '%s' does not contain %s", m_databundle_name.c_str(), JTypeInfo::demangle<typename PodioT::collection_type>().c_str());
294294
}
@@ -448,7 +448,7 @@ struct JHasInputs {
448448
facset->Print();
449449
throw JException("Databundle with name '%s' does not inherit from JPodioDatabundle", short_or_unique_name.c_str());
450450
}
451-
auto* typed_collection = dynamic_cast<const PodioT::collection_type*>(typed_databundle->GetCollection());
451+
auto* typed_collection = dynamic_cast<const typename PodioT::collection_type*>(typed_databundle->GetCollection());
452452
if (typed_collection == nullptr) {
453453
throw JException("Databundle with unique name '%s' does not contain %s", short_or_unique_name.c_str(), JTypeInfo::demangle<typename PodioT::collection_type>().c_str());
454454
}

src/libraries/JANA/Components/JPodioOutput.h

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -145,14 +145,38 @@ class VariadicPodioOutput : public JHasOutputs::VariadicOutputBase {
145145
public:
146146
VariadicPodioOutput(JHasOutputs* owner, std::vector<std::string> default_collection_names={}) {
147147
owner->RegisterOutput(this);
148-
this->m_is_variadic = true;
149148
for (const std::string& name : default_collection_names) {
150-
auto coll = std::make_unique<JPodioDatabundle>();
151-
coll->SetUniqueName(name);
152-
coll->SetTypeName(JTypeInfo::demangle<PodioT>());
153-
m_transient_collections.push_back(std::move(coll));
149+
auto databundle = new JPodioDatabundle;
150+
databundle->SetUniqueName(name);
151+
databundle->SetTypeName(JTypeInfo::demangle<PodioT>());
152+
databundle->SetTypeIndex(std::type_index(typeid(PodioT)));
153+
m_databundles.push_back(databundle);
154+
m_transient_collections.push_back(std::make_unique<typename PodioT::collection_type>());
154155
}
155-
for (auto& coll_name : this->collection_names) {
156+
}
157+
158+
void SetShortNames (std::vector<std::string> short_names) override {
159+
m_databundles.clear();
160+
m_transient_collections.clear();
161+
for (const std::string& name : short_names) {
162+
auto databundle = new JPodioDatabundle;
163+
databundle->SetShortName(name);
164+
databundle->SetTypeName(JTypeInfo::demangle<PodioT>());
165+
databundle->SetTypeIndex(std::type_index(typeid(PodioT)));
166+
m_databundles.push_back(databundle);
167+
m_transient_collections.push_back(std::make_unique<typename PodioT::collection_type>());
168+
}
169+
}
170+
171+
void SetUniqueNames(std::vector<std::string> unique_names) override {
172+
m_databundles.clear();
173+
m_transient_collections.clear();
174+
for (const std::string& name : unique_names) {
175+
auto databundle = new JPodioDatabundle;
176+
databundle->SetShortName(name);
177+
databundle->SetTypeName(JTypeInfo::demangle<PodioT>());
178+
databundle->SetTypeIndex(std::type_index(typeid(PodioT)));
179+
m_databundles.push_back(databundle);
156180
m_transient_collections.push_back(std::make_unique<typename PodioT::collection_type>());
157181
}
158182
}

src/libraries/JANA/JFactoryGenerator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
#include <JANA/JFactorySet.h>
88
#include <JANA/Utils/JTypeInfo.h>
9+
#include <JANA/JApplicationFwd.h>
910

10-
class JApplication;
1111

1212
class JFactoryGenerator {
1313

0 commit comments

Comments
 (0)