diff --git a/Framework/Crystal/src/SCDCalibratePanels.cpp b/Framework/Crystal/src/SCDCalibratePanels.cpp index be3bd66cf023288475cbe10d1eeb676070260bdb..38b403d5eeaab96328f309c206e6ac97f33ccb19 100644 --- a/Framework/Crystal/src/SCDCalibratePanels.cpp +++ b/Framework/Crystal/src/SCDCalibratePanels.cpp @@ -87,8 +87,21 @@ void SCDCalibratePanels::exec() { if (snapPanels) { MyPanels.insert("East"); MyPanels.insert("West"); - for (int i = 1; i < 19; ++i) - MyBankNames.insert("bank" + boost::lexical_cast<std::string>(i)); + int maxRecurseDepth = 4; + // cppcheck-suppress syntaxError + PRAGMA_OMP(parallel for schedule(dynamic, 1) ) + for (int num = 1; num < 64; ++num) { + PARALLEL_START_INTERUPT_REGION + std::ostringstream mess; + mess << "bank" << num; + IComponent_const_sptr comp = + inst->getComponentByName(mess.str(), maxRecurseDepth); + PARALLEL_CRITICAL(MyBankNames) + if (comp) + MyBankNames.insert(mess.str()); + PARALLEL_END_INTERUPT_REGION + } + PARALLEL_CHECK_INTERUPT_REGION } else { for (int i = 0; i < nPeaks; ++i) { std::string name = peaksWs->getPeak(i).getBankName();