Skip to content

Commit

Permalink
Merge pull request #7 from alibuild/alibot-cleanup-13745
Browse files Browse the repository at this point in the history
Please consider the following formatting changes to #13745
  • Loading branch information
jackal1-66 authored Nov 27, 2024
2 parents 4d59fdd + ce98376 commit 743e749
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Generators/src/GeneratorHybrid.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ Bool_t GeneratorHybrid::Init()
addSubGenerator(count, gen);
count++;
}
if(mRandomize) {
if (mRandomize) {
if (std::all_of(mFractions.begin(), mFractions.end(), [](int i) { return i == 1; })) {
LOG(info) << "Full randomisation of generators order";
} else {
Expand Down Expand Up @@ -163,7 +163,7 @@ Bool_t GeneratorHybrid::generateEvent()
// Order randomisation or sequence of generators
// following provided fractions. If not available generators will be used sequentially
if (mRandomize) {
if(mRngFractions.size() != 0) {
if (mRngFractions.size() != 0) {
// Generate number between 0 and 1
float rnum = gRandom->Rndm();
// Find generator index
Expand All @@ -175,7 +175,7 @@ Bool_t GeneratorHybrid::generateEvent()
}
} else {
mIndex = gRandom->Integer(mGens.size());
}
}
} else {
while (mFractions[mCurrentFraction] == 0 || mseqCounter == mFractions[mCurrentFraction]) {
if (mFractions[mCurrentFraction] != 0) {
Expand Down

0 comments on commit 743e749

Please sign in to comment.