Skip to content
Snippets Groups Projects
Commit e342d870 authored by Atlas-Software Librarian's avatar Atlas-Software Librarian Committed by Graeme Stewart
Browse files

'CMakeLists.txt' (PixelConditionsServices-00-24-28)

Former-commit-id: 60b980b8c7b5fee854879eb86295e85bf59ef161
parent 3b002aef
No related branches found
No related tags found
No related merge requests found
......@@ -368,11 +368,25 @@ StatusCode PixelByteStreamErrorsSvc::readData() {
// record the data to Storegate: for one event, one entry per module with errors
StatusCode PixelByteStreamErrorsSvc::recordData() {
InDetBSErrContainer* cont = new InDetBSErrContainer();
StatusCode sc = m_storeGate->overwrite(cont,"PixelByteStreamErrs");
if (sc.isFailure() ){
msg(MSG::ERROR) <<"Failed to record/overwrite BSErrors to SG"<<endreq;
return sc;
StatusCode sc(StatusCode::SUCCESS);
bool recorded = m_storeGate->contains<InDetBSErrContainer>("PixelByteStreamErrs"); // check if already recorded (by a previous HLT call for example)
InDetBSErrContainer* cont;
if (!recorded){ // create a new object
cont = new InDetBSErrContainer();
sc = m_storeGate->record(cont,"PixelByteStreamErrs");
if (sc.isFailure() ){
msg(MSG::ERROR) <<"Failed to record BSErrors to SG"<<endreq;
return sc;
}
}
else{ // already recorded, retrieve object and modify
sc = m_storeGate->retrieve(cont,"PixelByteStreamErrs");
if (sc.isFailure() ){
msg(MSG::ERROR) <<"Failed to retrieve BSErrors from SG, but contains() returns true"<<endreq;
return sc;
}
cont->clear(); // delete and fill anew
}
for (unsigned int i=0; i<m_max_hashes; i++) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment