Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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