diff --git a/LArCalorimeter/LArCellRec/src/LArCellBuilderFromLArRawChannelTool.cxx b/LArCalorimeter/LArCellRec/src/LArCellBuilderFromLArRawChannelTool.cxx index 75a99d46471e7386ccb6a99a1c39f9e914b59961..14ea1c753099f041ebe96d3f05712757a5427529 100755 --- a/LArCalorimeter/LArCellRec/src/LArCellBuilderFromLArRawChannelTool.cxx +++ b/LArCalorimeter/LArCellRec/src/LArCellBuilderFromLArRawChannelTool.cxx @@ -170,8 +170,13 @@ LArCellBuilderFromLArRawChannelTool::geoInit(IOVSVC_CALLBACK_ARGS) { // ========================================================================================== // StatusCode LArCellBuilderFromLArRawChannelTool::process(CaloCellContainer * theCellContainer) { +#ifndef ATHENAHIVE if (theCellContainer->ownPolicy() == SG::OWN_ELEMENTS) { msg(MSG::ERROR) << "Called with a CaloCellContainer with wrong ownership policy! Need a VIEW container!" << endreq; +#else + if (theCellContainer->ownPolicy() != SG::OWN_ELEMENTS) { + msg(MSG::ERROR) << "Called with a CaloCellContainer with wrong ownership policy! Need a OWN container!" << endreq; +#endif return StatusCode::FAILURE; } @@ -296,10 +301,14 @@ LArCell* LArCellBuilderFromLArRawChannelTool::getCell(const LArRawChannel& theRa const uint16_t provenance = (theRawChannel.provenance() & 0x3FFF); // to be sure not to set by error "dead" bit const CaloGain::CaloGain gain = theRawChannel.gain(); +#ifndef ATHENAHIVE static DataPool<LArCell> larCellsP(m_initialDataPoolSize); //LArCell * theCell = new LArCell(theDDE,energy,time,quality,gain); LArCell *pCell = larCellsP.nextElementPtr(); +#else + LArCell *pCell = new LArCell(); +#endif pCell->m_energy = energy; pCell->m_time = time; pCell->m_qualProv[0] = quality; diff --git a/LArCalorimeter/LArCellRec/src/LArCellHVCorr.cxx b/LArCalorimeter/LArCellRec/src/LArCellHVCorr.cxx index e141950d8f9a51e06693bbf144083c6c1d09dd6d..c476927d8bbb9aa90638d58d57174cddd30db346 100755 --- a/LArCalorimeter/LArCellRec/src/LArCellHVCorr.cxx +++ b/LArCalorimeter/LArCellRec/src/LArCellHVCorr.cxx @@ -57,6 +57,13 @@ void LArCellHVCorr::MakeCorrection(CaloCell* theCell) { if (hvonline>0. && hvonline<100.) hvcorr = hvcorr/hvonline; } - theCell->setEnergy(theCell->energy()*hvcorr); + if (hvcorr>0.01) { + //hvcorr might be zero in case of problems with the DCS database + theCell->setEnergy(theCell->energy()*hvcorr); + } + // else + // msg(MSG::WARNING) << "HVScaleCorr is zero for cell with id 0x" + // << std::hex << theCell->ID().get_identifier32().get_compact() << std::dec + // << " Correction NOT applied" << std::endl; return; }