6 #include "Identifier/Identifier.h" 
    7 #include "GaudiKernel/EventIDRange.h" 
   21      ATH_MSG_ERROR(
"The database is set to be input source (2) but the ReadKey is empty.");
 
   27   return StatusCode::SUCCESS;
 
   35     ATH_MSG_DEBUG(
"CondHandle " << writeHandle.
fullKey() << 
" is already valid.. In theory this should not be called, but may happen if multiple concurrent events are being processed out of order.");
 
   36     return StatusCode::SUCCESS; 
 
   40   std::unique_ptr<PixelCalib::PixelOfflineCalibData> writeCdo(std::make_unique<PixelCalib::PixelOfflineCalibData>());
 
   44     return StatusCode::FAILURE;
 
   49     auto calibData = std::make_unique<PixelCalib::PixelOfflineCalibData>();
 
   56     ATH_MSG_INFO(
"Load PixelErrorData constants from text file");
 
   58     if (file_name1.empty()) { 
ATH_MSG_WARNING(
"Input file " << file_name1 << 
" not found! Default (hardwired) values to be used!"); }
 
   59     else { pced->
Load(file_name1);  }
 
   61     ATH_MSG_INFO(
"Load PixelClusterOnTrackErrorData constants from text file");
 
   63     if (file_name2.empty()) { 
ATH_MSG_WARNING(
"Input file " << file_name2 << 
" not found! Default (hardwired) values to be used!"); }
 
   64     else { pcoted->
Load(file_name2); }
 
   66     ATH_MSG_INFO(
"Load PixelChargeInterpolationData constants from text file");
 
   68     if (file_name3.empty()) { 
ATH_MSG_WARNING(
"Input file " << file_name3 << 
" not found! Default (hardwired) values to be used!"); }
 
   69     else { pcip->
Load(file_name3);  }
 
   73     std::vector<float> 
constants = calibData->GetConstants();
 
   77     const EventIDBase 
start{EventIDBase::UNDEFNUM, EventIDBase::UNDEFEVT, 0,                       0,                       EventIDBase::UNDEFNUM, EventIDBase::UNDEFNUM};
 
   78     const EventIDBase 
stop {EventIDBase::UNDEFNUM, EventIDBase::UNDEFEVT, EventIDBase::UNDEFNUM-1, EventIDBase::UNDEFNUM-1, EventIDBase::UNDEFNUM, EventIDBase::UNDEFNUM};
 
   84       ATH_MSG_DEBUG(
"Found constants with new-style Identifier key");
 
   88     if (writeHandle.
record(rangeW, std::move(writeCdo)).isFailure()) {
 
   89       ATH_MSG_FATAL(
"Could not record PixelCalib::PixelOfflineCalibData " << writeHandle.
key() << 
" with EventRange " << rangeW << 
" into Conditions Store");
 
   90       return StatusCode::FAILURE;
 
   92     ATH_MSG_DEBUG(
"recorded new CDO " << writeHandle.
key() << 
" with range " << rangeW << 
" into Conditions Store");
 
  103     if (readCdo==
nullptr) {
 
  105       return StatusCode::FAILURE;
 
  109     if (not readHandle.range(rangeW)) {
 
  110       ATH_MSG_FATAL(
"Failed to retrieve validity range for " << readHandle.key());
 
  111       return StatusCode::FAILURE;
 
  113     ATH_MSG_DEBUG(
"Size of DetCondCFloat " << readHandle.fullKey() << 
" readCdo->size()= " << readCdo->size());
 
  122       ATH_MSG_DEBUG(
"Found constants with new-style Identifier key");
 
  129       std::vector<float> const2;
 
  130       const2.reserve(readCdo->size());
 
  132 for (
int i=0; 
i<readCdo->size(); 
i++) { const2.push_back(readCdo->get(
key.set_literal(
i+1),
i)); }
 
  134       if (!const2.empty()) {
 
  135         ATH_MSG_DEBUG(
"Found constants with old-style Identifier key");
 
  140         return StatusCode::FAILURE;
 
  143     if (writeHandle.
record(rangeW, std::move(writeCdo)).isFailure()) {
 
  144       ATH_MSG_FATAL(
"Could not record PixelCalib::PixelOfflineCalibData " << writeHandle.
key() << 
" with EventRange " << rangeW << 
" into Conditions Store");
 
  145       return StatusCode::FAILURE;
 
  147     ATH_MSG_DEBUG(
"recorded new CDO " << writeHandle.
key() << 
" with range " << rangeW << 
" into Conditions Store");
 
  150   return StatusCode::SUCCESS;