2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
5 #include "ISF_FastCaloSimEvent/TFCSParametrization.h"
7 inline FCSReturnCode TFCSParametrizationChain::simulate_and_retry(
8 TFCSParametrizationBase *parametrization, TFCSSimulationState &simulstate,
9 const TFCSTruthState *truth, const TFCSExtrapolationState *extrapol) const {
10 int retry_warning = 1;
12 for (int i = 0; i <= retry; i++) {
13 if (i >= retry_warning)
15 "TFCSParametrizationChain::simulate_and_retry(): Retry simulate call "
16 << i << "/" << retry);
18 FCSReturnCode status =
19 parametrization->simulate(simulstate, truth, extrapol);
21 if (status == FCSSuccess)
23 if (status == FCSFatal)
25 if (status >= FCSRetry) {
26 retry = status - FCSRetry;
27 retry_warning = retry >> 1;
28 if (retry_warning < 1)
32 if (RetryChainFromStart())
36 ATH_MSG_FATAL("TFCSParametrizationChain::simulate_and_retry(): Simulate call "
38 << retry << " retries");