Skip to content

Commit

Permalink
Merge pull request #9 from alibuild/alibot-cleanup-13813
Browse files Browse the repository at this point in the history
Please consider the following formatting changes to AliceO2Group#13813
  • Loading branch information
jackal1-66 authored Dec 17, 2024
2 parents 0758007 + bc1e572 commit 3f6c1b9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Generators/src/GeneratorHybrid.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ GeneratorHybrid::GeneratorHybrid(const std::string& inputgens)
}
int index = 0;
if (!(mRandomize || mGenerationMode == GenMode::kParallel)) {
if(mCocktailMode) {
if (mCocktailMode) {
if (mGroups.size() != mFractions.size()) {
LOG(fatal) << "Number of groups does not match the number of fractions";
return;
Expand All @@ -58,7 +58,7 @@ GeneratorHybrid::GeneratorHybrid(const std::string& inputgens)
LOG(fatal) << "All fractions provided are 0, no simulation will be performed";
return;
}
}
}
for (auto gen : mInputGens) {
// Search if the generator name is inside generatorNames (which is a vector of strings)
LOG(info) << "Checking if generator " << gen << " is in the list of available generators \n";
Expand Down Expand Up @@ -335,7 +335,7 @@ bool GeneratorHybrid::importParticles()
mResultQueue[0].pop(genIndex);
} else {
// need to pop from a particular queue
if(!mCocktailMode){
if (!mCocktailMode) {
mResultQueue[mIndex].pop(genIndex);
} else {
// in cocktail mode we need to pop from the group queue
Expand Down Expand Up @@ -508,18 +508,18 @@ Bool_t GeneratorHybrid::parseJSON(const std::string& path)
for (const auto& subset : sets.GetArray()) {
mGroups.back().push_back(subset.GetInt());
}
if(group.HasMember("fractions")) {
if (group.HasMember("fractions")) {
const auto& subfrac = group["fractions"];
mCocktailFractions.push_back({});
for (const auto& frac : subfrac.GetArray()) {
mCocktailFractions.back().push_back(frac.GetInt());
}
if(mGroups.back().size() != mCocktailFractions.back().size()) {
if (mGroups.back().size() != mCocktailFractions.back().size()) {
LOG(fatal) << "Number of fractions does not match the number of generators in the cocktail";
return false;
}
} else {
LOG(warn) << "Fractions not provided for cocktail group " << mGroups.size()-1 << " setting all fractions to 1";
LOG(warn) << "Fractions not provided for cocktail group " << mGroups.size() - 1 << " setting all fractions to 1";
mCocktailFractions.push_back({});
for (int i = 0; i < mGroups.back().size(); i++) {
mCocktailFractions.back().push_back(1);
Expand Down

0 comments on commit 3f6c1b9

Please sign in to comment.