Skip to content

Remove private MsgStream instance - fix race condition writing log files

Stewart Martin-Haugh requested to merge smh/athena:msgSvc_in_service into master

Since services can be called at any time, if they have a MsgStream member, it can write to output at any time. This leads to mangled output like:

RpcRdoToRpcPrepDataFS.RpcRdoToPrepDat...5   0     DEBUG  Looking/Creating a collection with ID = [7.3.-3.8.2.2.1.1.1.0.1] hash = 251 in PREPDATA container at 0xabced020MuonTGC_CablingSvc  DEBUG  subDetectorID104 rodID=10 sswID=5 channelID=81
RpcRdoToRpcPrepDataFS.RpcRdoToPrepDat...5   0     DEBUG  eta view = 1MuonTGC_CablingSvc  DEBUG  SUCCESS  getReadoutIDfromOnlineID
RpcRdoToRpcPrepDataFS.RpcRdoToPrepDat...5   0     DEBUG Empty CMMuonTGC_CablingSvc  DEBUG  onlineID:   side=-1 octant=6 module=3 layer=5 chamber=3 w/s=0 channel=164
RpcRdoToRpcPrepDataFS.RpcRdoToPrepDat...5   0     DEBUG ***************** for Pad online Id 4 m_logic sector ID 29MuonTGC_CablingSvc  DEBUG  subDetectorID104 rodID=10 sswID=5 channelID=105
RpcRdoToRpcPrepDataFS.RpcRdoToPrepDat...5   0     DEBUG  eta view = 0MuonTGC_CablingSvc  DEBUG  SUCCESS  getReadoutIDfromOnlineID
ToolSvc.InDetPixelRodDecoder            10  0     DEBUG Hit word foundMuonTGC_CablingSvc  DEBUG  onlineID:   side=1 octant=6 module=0 layer=5 chamber=1 w/s=0 channel=42
ToolSvc.InDetPixelRodDecoder            10  0     DEBUG Hit word foundMuonTGC_CablingSvc  DEBUG  subDetectorID103 rodID=10 sswID=3 channelID=81
ToolSvc.InDetPixelRodDecoder            10  0     DEBUG Hit word foundMuonTGC_CablingSvc  DEBUG  subDetectorID103 rodID=10 sswID=3 channelID=89
ToolSvc.InDetPixelRodDecoder            10  0     DEBUG link trailer foundMuonTGC_CablingSvc  DEBUG  onlineID:   side=1 octant=6 module=0 layer=6 chamber=1 w/s=1 channel=11
ToolSvc.InDetPixelRodDecoder            10  0     DEBUG Header word foundMuonTGC_CablingSvc  DEBUG  side=1 octant=6 module=0 layer=6 chamber=1 w/s=1 channel=11adjacent=0
InDetSCTRawDataProvider.InDetSCTRawDa...11  0     DEBUG Adding 134MuonTGC_CablingSvc  DEBUG  side=1 octant=6 module=0 layer=6 chamber=1 w/s=1 channel=11adjacent=0

Since MuonTGC_CablingSvc derives from AthService, the ATH_MSG macros can be used directly, so the code changes were minor.

Services not deriving from AthService are a bit trickier: I had a go with TagInfoMgr but didn't get all the way through.

May be of interest to @ssnyder, @leggett, @fwinkl

Cheers,

Stewart

Edited by Binish Batool

Merge request reports