Skip to content
Snippets Groups Projects
Commit 11b8a35c authored by Scott Snyder's avatar Scott Snyder Committed by Graeme Stewart
Browse files

'endreq -> endmsg.' (InDetIdCnv-00-00-11)

	* Tagging InDetIdCnv-00-00-11.
	* endreq -> endmsg.

2016-07-12  scott snyder  <snyder@bnl.gov>

	* Tagging InDetIdCnv-00-00-10.
	* Add missing braces (fix gcc6 indentation warnings).


Former-commit-id: 671fc148
parent 205b58b7
No related branches found
No related tags found
No related merge requests found
......@@ -50,11 +50,11 @@ PixelIDDetDescrCnv::initialize()
{
// First call parent init
StatusCode sc = DetDescrConverter::initialize();
MsgStream log(messageService(), "PixelIDDetDescrCnv");
log << MSG::DEBUG << "in initialize" << endreq;
MsgStream log(msgSvc(), "PixelIDDetDescrCnv");
log << MSG::DEBUG << "in initialize" << endmsg;
if (sc.isFailure()) {
log << MSG::ERROR << "DetDescrConverter::initialize failed" << endreq;
log << MSG::ERROR << "DetDescrConverter::initialize failed" << endmsg;
return sc;
}
......@@ -69,7 +69,7 @@ PixelIDDetDescrCnv::initialize()
// // - this is ONLY needed for the manager of each system
// sc = addToDetStore(classID(), "PidelID");
// if (sc.isFailure()) {
// log << MSG::FATAL << "Unable to add proxy for PixelID to the Detector Store!" << endreq;
// log << MSG::FATAL << "Unable to add proxy for PixelID to the Detector Store!" << endmsg;
// return StatusCode::FAILURE;
// } else {}
......@@ -81,8 +81,8 @@ PixelIDDetDescrCnv::initialize()
StatusCode
PixelIDDetDescrCnv::finalize()
{
MsgStream log(messageService(), "PixelIDDetDescrCnv");
log << MSG::DEBUG << "in finalize" << endreq;
MsgStream log(msgSvc(), "PixelIDDetDescrCnv");
log << MSG::DEBUG << "in finalize" << endmsg;
return StatusCode::SUCCESS;
}
......@@ -93,32 +93,32 @@ StatusCode
PixelIDDetDescrCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pObj)
{
//StatusCode sc = StatusCode::SUCCESS;
MsgStream log(messageService(), "PixelIDDetDescrCnv");
log << MSG::INFO << "in createObj: creating a PixelID helper object in the detector store" << endreq;
MsgStream log(msgSvc(), "PixelIDDetDescrCnv");
log << MSG::INFO << "in createObj: creating a PixelID helper object in the detector store" << endmsg;
// Create a new PixelID
DetDescrAddress* ddAddr;
ddAddr = dynamic_cast<DetDescrAddress*> (pAddr);
if(!ddAddr) {
log << MSG::FATAL << "Could not cast to DetDescrAddress." << endreq;
log << MSG::FATAL << "Could not cast to DetDescrAddress." << endmsg;
return StatusCode::FAILURE;
}
// Get the StoreGate key of this container.
std::string helperKey = *( ddAddr->par() );
if ("" == helperKey) {
log << MSG::DEBUG << "No Helper key " << endreq;
log << MSG::DEBUG << "No Helper key " << endmsg;
}
else {
log << MSG::DEBUG << "Helper key is " << helperKey << endreq;
log << MSG::DEBUG << "Helper key is " << helperKey << endmsg;
}
// get DetectorStore service
StoreGateSvc * detStore;
StatusCode status = serviceLocator()->service("DetectorStore", detStore);
if (status.isFailure()) {
log << MSG::FATAL << "DetectorStore service not found !" << endreq;
log << MSG::FATAL << "DetectorStore service not found !" << endmsg;
return StatusCode::FAILURE;
} else {}
......@@ -126,11 +126,11 @@ PixelIDDetDescrCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pObj)
const DataHandle<IdDictManager> idDictMgr;
status = detStore->retrieve(idDictMgr, "IdDict");
if (status.isFailure()) {
log << MSG::FATAL << "Could not get IdDictManager !" << endreq;
log << MSG::FATAL << "Could not get IdDictManager !" << endmsg;
return StatusCode::FAILURE;
}
else {
log << MSG::DEBUG << " Found the IdDictManager. " << endreq;
log << MSG::DEBUG << " Found the IdDictManager. " << endmsg;
}
......@@ -150,7 +150,7 @@ PixelIDDetDescrCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pObj)
if (!dict) {
log << MSG::ERROR
<< "unable to find idDict for InnerDetector"
<< endreq;
<< endmsg;
return StatusCode::FAILURE;
}
......@@ -169,39 +169,40 @@ PixelIDDetDescrCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pObj)
// Internal InDet id tag
initHelper = true;
log << MSG::DEBUG << " Changed internal InDet id tag: "
<< inDetIDTag << endreq;
<< inDetIDTag << endmsg;
}
if (inDetIDFileName != m_inDetIDFileName) {
// File to be read for InDet ids
initHelper = true;
log << MSG::DEBUG << " Changed InDetFileName:"
<< inDetIDFileName << endreq;
<< inDetIDFileName << endmsg;
}
if (inDetIdDictTag != m_inDetIdDictTag) {
// Tag of RDB record for InDet ids
initHelper = true;
log << MSG::DEBUG << " Changed InDetIdDictTag: "
<< inDetIdDictTag
<< endreq;
<< endmsg;
}
if (doChecks != m_doChecks)
if (doChecks != m_doChecks) {
// DoChecks flag
initHelper = true;
log << MSG::DEBUG << " Changed doChecks flag: "
<< doChecks
<< endreq;
<< endmsg;
}
}
else {
// create the helper
m_pixelId = new PixelID;
initHelper = true;
// add in message service for printout
m_pixelId->setMessageSvc(messageService());
m_pixelId->setMessageSvc(msgSvc());
}
if (initHelper) {
if (idDictMgr->initializeHelper(*m_pixelId)) {
log << MSG::ERROR << "Unable to initialize PixelID" << endreq;
log << MSG::ERROR << "Unable to initialize PixelID" << endmsg;
return StatusCode::FAILURE;
}
// Save state:
......
......@@ -50,11 +50,11 @@ SCT_IDDetDescrCnv::initialize()
{
// First call parent init
StatusCode sc = DetDescrConverter::initialize();
MsgStream log(messageService(), "SCT_IDDetDescrCnv");
log << MSG::DEBUG << "in initialize" << endreq;
MsgStream log(msgSvc(), "SCT_IDDetDescrCnv");
log << MSG::DEBUG << "in initialize" << endmsg;
if (sc.isFailure()) {
log << MSG::ERROR << "DetDescrConverter::initialize failed" << endreq;
log << MSG::ERROR << "DetDescrConverter::initialize failed" << endmsg;
return sc;
}
......@@ -69,7 +69,7 @@ SCT_IDDetDescrCnv::initialize()
// // - this is ONLY needed for the manager of each system
// sc = addToDetStore(classID(), "PidelID");
// if (sc.isFailure()) {
// log << MSG::FATAL << "Unable to add proxy for SCT_ID to the Detector Store!" << endreq;
// log << MSG::FATAL << "Unable to add proxy for SCT_ID to the Detector Store!" << endmsg;
// return StatusCode::FAILURE;
// } else {}
......@@ -81,8 +81,8 @@ SCT_IDDetDescrCnv::initialize()
StatusCode
SCT_IDDetDescrCnv::finalize()
{
MsgStream log(messageService(), "SCT_IDDetDescrCnv");
log << MSG::DEBUG << "in finalize" << endreq;
MsgStream log(msgSvc(), "SCT_IDDetDescrCnv");
log << MSG::DEBUG << "in finalize" << endmsg;
return StatusCode::SUCCESS;
}
......@@ -93,25 +93,25 @@ StatusCode
SCT_IDDetDescrCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pObj)
{
//StatusCode sc = StatusCode::SUCCESS;
MsgStream log(messageService(), "SCT_IDDetDescrCnv");
log << MSG::INFO << "in createObj: creating a SCT_ID helper object in the detector store" << endreq;
MsgStream log(msgSvc(), "SCT_IDDetDescrCnv");
log << MSG::INFO << "in createObj: creating a SCT_ID helper object in the detector store" << endmsg;
// Create a new SCT_ID
DetDescrAddress* ddAddr;
ddAddr = dynamic_cast<DetDescrAddress*> (pAddr);
if(!ddAddr) {
log << MSG::FATAL << "Could not cast to DetDescrAddress." << endreq;
log << MSG::FATAL << "Could not cast to DetDescrAddress." << endmsg;
return StatusCode::FAILURE;
}
// Get the StoreGate key of this container.
std::string helperKey = *( ddAddr->par() );
if ("" == helperKey) {
log << MSG::DEBUG << "No Helper key " << endreq;
log << MSG::DEBUG << "No Helper key " << endmsg;
}
else {
log << MSG::DEBUG << "Helper key is " << helperKey << endreq;
log << MSG::DEBUG << "Helper key is " << helperKey << endmsg;
}
......@@ -119,7 +119,7 @@ SCT_IDDetDescrCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pObj)
StoreGateSvc * detStore;
StatusCode status = serviceLocator()->service("DetectorStore", detStore);
if (status.isFailure()) {
log << MSG::FATAL << "DetectorStore service not found !" << endreq;
log << MSG::FATAL << "DetectorStore service not found !" << endmsg;
return StatusCode::FAILURE;
} else {}
......@@ -127,11 +127,11 @@ SCT_IDDetDescrCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pObj)
const DataHandle<IdDictManager> idDictMgr;
status = detStore->retrieve(idDictMgr, "IdDict");
if (status.isFailure()) {
log << MSG::FATAL << "Could not get IdDictManager !" << endreq;
log << MSG::FATAL << "Could not get IdDictManager !" << endmsg;
return StatusCode::FAILURE;
}
else {
log << MSG::DEBUG << " Found the IdDictManager. " << endreq;
log << MSG::DEBUG << " Found the IdDictManager. " << endmsg;
}
// Only create new helper if it is the first pass or if there is a
......@@ -150,7 +150,7 @@ SCT_IDDetDescrCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pObj)
if (!dict) {
log << MSG::ERROR
<< "unable to find idDict for InnerDetector"
<< endreq;
<< endmsg;
return StatusCode::FAILURE;
}
......@@ -169,39 +169,40 @@ SCT_IDDetDescrCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pObj)
// Internal InDet id tag
initHelper = true;
log << MSG::DEBUG << " Changed internal InDet id tag: "
<< inDetIDTag << endreq;
<< inDetIDTag << endmsg;
}
if (inDetIDFileName != m_inDetIDFileName) {
// File to be read for InDet ids
initHelper = true;
log << MSG::DEBUG << " Changed InDetFileName:"
<< inDetIDFileName << endreq;
<< inDetIDFileName << endmsg;
}
if (inDetIdDictTag != m_inDetIdDictTag) {
// Tag of RDB record for InDet ids
initHelper = true;
log << MSG::DEBUG << " Changed InDetIdDictTag: "
<< inDetIdDictTag
<< endreq;
<< endmsg;
}
if (doChecks != m_doChecks)
if (doChecks != m_doChecks) {
// DoChecks flag
initHelper = true;
log << MSG::DEBUG << " Changed doChecks flag: "
<< doChecks
<< endreq;
<< endmsg;
}
}
else {
// create the helper
m_sctId = new SCT_ID;
initHelper = true;
// add in message service for printout
m_sctId->setMessageSvc(messageService());
m_sctId->setMessageSvc(msgSvc());
}
if (initHelper) {
if (idDictMgr->initializeHelper(*m_sctId)) {
log << MSG::ERROR << "Unable to initialize SCT_ID" << endreq;
log << MSG::ERROR << "Unable to initialize SCT_ID" << endmsg;
return StatusCode::FAILURE;
}
// Save state:
......
......@@ -52,11 +52,11 @@ SiliconIDDetDescrCnv::initialize()
{
// First call parent init
StatusCode sc = DetDescrConverter::initialize();
MsgStream log(messageService(), "SiliconIDDetDescrCnv");
log << MSG::DEBUG << "in initialize" << endreq;
MsgStream log(msgSvc(), "SiliconIDDetDescrCnv");
log << MSG::DEBUG << "in initialize" << endmsg;
if (sc.isFailure()) {
log << MSG::ERROR << "DetDescrConverter::initialize failed" << endreq;
log << MSG::ERROR << "DetDescrConverter::initialize failed" << endmsg;
return sc;
}
......@@ -71,7 +71,7 @@ SiliconIDDetDescrCnv::initialize()
// // - this is ONLY needed for the manager of each system
// sc = addToDetStore(classID(), "PidelID");
// if (sc.isFailure()) {
// log << MSG::FATAL << "Unable to add proxy for SiliconID to the Detector Store!" << endreq;
// log << MSG::FATAL << "Unable to add proxy for SiliconID to the Detector Store!" << endmsg;
// return StatusCode::FAILURE;
// } else {}
......@@ -83,8 +83,8 @@ SiliconIDDetDescrCnv::initialize()
StatusCode
SiliconIDDetDescrCnv::finalize()
{
MsgStream log(messageService(), "SiliconIDDetDescrCnv");
log << MSG::DEBUG << "in finalize" << endreq;
MsgStream log(msgSvc(), "SiliconIDDetDescrCnv");
log << MSG::DEBUG << "in finalize" << endmsg;
return StatusCode::SUCCESS;
}
......@@ -95,25 +95,25 @@ StatusCode
SiliconIDDetDescrCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pObj)
{
//StatusCode sc = StatusCode::SUCCESS;
MsgStream log(messageService(), "SiliconIDDetDescrCnv");
log << MSG::INFO << "in createObj: creating a SiliconID helper object in the detector store" << endreq;
MsgStream log(msgSvc(), "SiliconIDDetDescrCnv");
log << MSG::INFO << "in createObj: creating a SiliconID helper object in the detector store" << endmsg;
// Create a new SiliconID
DetDescrAddress* ddAddr;
ddAddr = dynamic_cast<DetDescrAddress*> (pAddr);
if(!ddAddr) {
log << MSG::FATAL << "Could not cast to DetDescrAddress." << endreq;
log << MSG::FATAL << "Could not cast to DetDescrAddress." << endmsg;
return StatusCode::FAILURE;
}
// Get the StoreGate key of this container.
std::string helperKey = *( ddAddr->par() );
if ("" == helperKey) {
log << MSG::DEBUG << "No Helper key " << endreq;
log << MSG::DEBUG << "No Helper key " << endmsg;
}
else {
log << MSG::DEBUG << "Helper key is " << helperKey << endreq;
log << MSG::DEBUG << "Helper key is " << helperKey << endmsg;
}
......@@ -121,7 +121,7 @@ SiliconIDDetDescrCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pObj)
StoreGateSvc * detStore;
StatusCode status = serviceLocator()->service("DetectorStore", detStore);
if (status.isFailure()) {
log << MSG::FATAL << "DetectorStore service not found !" << endreq;
log << MSG::FATAL << "DetectorStore service not found !" << endmsg;
return StatusCode::FAILURE;
} else {}
......@@ -129,47 +129,47 @@ SiliconIDDetDescrCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pObj)
const DataHandle<IdDictManager> idDictMgr;
status = detStore->retrieve(idDictMgr, "IdDict");
if (status.isFailure()) {
log << MSG::FATAL << "Could not get IdDictManager !" << endreq;
log << MSG::FATAL << "Could not get IdDictManager !" << endmsg;
return StatusCode::FAILURE;
}
else {
log << MSG::DEBUG << " Found the IdDictManager. " << endreq;
log << MSG::DEBUG << " Found the IdDictManager. " << endmsg;
}
// Get both Pixel and SCT id helpers
const PixelID* pixelID;
status = detStore->retrieve(pixelID, "PixelID");
if (status.isFailure()) {
log << MSG::FATAL << "Could not get PixelID helper !" << endreq;
log << MSG::FATAL << "Could not get PixelID helper !" << endmsg;
return StatusCode::FAILURE;
}
else {
log << MSG::DEBUG << " Found the PixelID. " << endreq;
log << MSG::DEBUG << " Found the PixelID. " << endmsg;
}
const SCT_ID* sctID;
status = detStore->retrieve(sctID, "SCT_ID");
if (status.isFailure()) {
log << MSG::FATAL << "Could not get SCT_ID helper !" << endreq;
log << MSG::FATAL << "Could not get SCT_ID helper !" << endmsg;
return StatusCode::FAILURE;
}
else {
log << MSG::DEBUG << " Found the SCT_ID. " << endreq;
log << MSG::DEBUG << " Found the SCT_ID. " << endmsg;
}
if (!m_siliconId) {
// create the helper only once
log << MSG::DEBUG << " Create SiliconID. " << endreq;
log << MSG::DEBUG << " Create SiliconID. " << endmsg;
m_siliconId = new SiliconID(pixelID, sctID);
m_siliconId->setMessageSvc(messageService());
m_siliconId->setMessageSvc(msgSvc());
}
if (idDictMgr->initializeHelper(*m_siliconId)) {
log << MSG::ERROR << "Unable to initialize SiliconID" << endreq;
log << MSG::ERROR << "Unable to initialize SiliconID" << endmsg;
return StatusCode::FAILURE;
}
else {
log << MSG::DEBUG << " Initialized SiliconID. " << endreq;
log << MSG::DEBUG << " Initialized SiliconID. " << endmsg;
}
// Pass a pointer to the container to the Persistency service by reference.
......
......@@ -50,11 +50,11 @@ TRT_IDDetDescrCnv::initialize()
{
// First call parent init
StatusCode sc = DetDescrConverter::initialize();
MsgStream log(messageService(), "TRT_IDDetDescrCnv");
log << MSG::DEBUG << "in initialize" << endreq;
MsgStream log(msgSvc(), "TRT_IDDetDescrCnv");
log << MSG::DEBUG << "in initialize" << endmsg;
if (sc.isFailure()) {
log << MSG::ERROR << "DetDescrConverter::initialize failed" << endreq;
log << MSG::ERROR << "DetDescrConverter::initialize failed" << endmsg;
return sc;
}
......@@ -69,7 +69,7 @@ TRT_IDDetDescrCnv::initialize()
// // - this is ONLY needed for the manager of each system
// sc = addToDetStore(classID(), "PidelID");
// if (sc.isFailure()) {
// log << MSG::FATAL << "Unable to add proxy for TRT_ID to the Detector Store!" << endreq;
// log << MSG::FATAL << "Unable to add proxy for TRT_ID to the Detector Store!" << endmsg;
// return StatusCode::FAILURE;
// } else {}
......@@ -81,8 +81,8 @@ TRT_IDDetDescrCnv::initialize()
StatusCode
TRT_IDDetDescrCnv::finalize()
{
MsgStream log(messageService(), "TRT_IDDetDescrCnv");
log << MSG::DEBUG << "in finalize" << endreq;
MsgStream log(msgSvc(), "TRT_IDDetDescrCnv");
log << MSG::DEBUG << "in finalize" << endmsg;
return StatusCode::SUCCESS;
}
......@@ -93,25 +93,25 @@ StatusCode
TRT_IDDetDescrCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pObj)
{
//StatusCode sc = StatusCode::SUCCESS;
MsgStream log(messageService(), "TRT_IDDetDescrCnv");
log << MSG::INFO << "in createObj: creating a TRT_ID helper object in the detector store" << endreq;
MsgStream log(msgSvc(), "TRT_IDDetDescrCnv");
log << MSG::INFO << "in createObj: creating a TRT_ID helper object in the detector store" << endmsg;
// Create a new TRT_ID
DetDescrAddress* ddAddr;
ddAddr = dynamic_cast<DetDescrAddress*> (pAddr);
if(!ddAddr) {
log << MSG::FATAL << "Could not cast to DetDescrAddress." << endreq;
log << MSG::FATAL << "Could not cast to DetDescrAddress." << endmsg;
return StatusCode::FAILURE;
}
// Get the StoreGate key of this container.
std::string helperKey = *( ddAddr->par() );
if ("" == helperKey) {
log << MSG::DEBUG << "No Helper key " << endreq;
log << MSG::DEBUG << "No Helper key " << endmsg;
}
else {
log << MSG::DEBUG << "Helper key is " << helperKey << endreq;
log << MSG::DEBUG << "Helper key is " << helperKey << endmsg;
}
......@@ -119,7 +119,7 @@ TRT_IDDetDescrCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pObj)
StoreGateSvc * detStore;
StatusCode status = serviceLocator()->service("DetectorStore", detStore);
if (status.isFailure()) {
log << MSG::FATAL << "DetectorStore service not found !" << endreq;
log << MSG::FATAL << "DetectorStore service not found !" << endmsg;
return StatusCode::FAILURE;
} else {}
......@@ -127,11 +127,11 @@ TRT_IDDetDescrCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pObj)
const DataHandle<IdDictManager> idDictMgr;
status = detStore->retrieve(idDictMgr, "IdDict");
if (status.isFailure()) {
log << MSG::FATAL << "Could not get IdDictManager !" << endreq;
log << MSG::FATAL << "Could not get IdDictManager !" << endmsg;
return StatusCode::FAILURE;
}
else {
log << MSG::DEBUG << " Found the IdDictManager. " << endreq;
log << MSG::DEBUG << " Found the IdDictManager. " << endmsg;
}
// Only initialize helper if it is the first pass or if there is a
......@@ -150,7 +150,7 @@ TRT_IDDetDescrCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pObj)
if (!dict) {
log << MSG::ERROR
<< "unable to find idDict for InnerDetector"
<< endreq;
<< endmsg;
return StatusCode::FAILURE;
}
......@@ -169,39 +169,40 @@ TRT_IDDetDescrCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pObj)
// Internal InDet id tag
initHelper = true;
log << MSG::DEBUG << " Changed internal InDet id tag: "
<< inDetIDTag << endreq;
<< inDetIDTag << endmsg;
}
if (inDetIDFileName != m_inDetIDFileName) {
// File to be read for InDet ids
initHelper = true;
log << MSG::DEBUG << " Changed InDetFileName:"
<< inDetIDFileName << endreq;
<< inDetIDFileName << endmsg;
}
if (inDetIdDictTag != m_inDetIdDictTag) {
// Tag of RDB record for InDet ids
initHelper = true;
log << MSG::DEBUG << " Changed InDetIdDictTag: "
<< inDetIdDictTag
<< endreq;
<< endmsg;
}
if (doChecks != m_doChecks)
if (doChecks != m_doChecks) {
// DoChecks flag
initHelper = true;
log << MSG::DEBUG << " Changed doChecks flag: "
<< doChecks
<< endreq;
<< endmsg;
}
}
else {
// create the helper
m_trtId = new TRT_ID;
initHelper = true;
// add in message service for printout
m_trtId->setMessageSvc(messageService());
m_trtId->setMessageSvc(msgSvc());
}
if (initHelper) {
if (idDictMgr->initializeHelper(*m_trtId)) {
log << MSG::WARNING << "Unable to initialize TRT_ID" << endreq;
log << MSG::WARNING << "Unable to initialize TRT_ID" << endmsg;
//return StatusCode::FAILURE;
}
// Save state:
......
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