ATLAS Offline Software
BCM_RawDataProviderTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // BCM_RawDataProviderTool.cxx
7 // Implementation file for class BCM_RawDataProviderTool
9 // Version 00-00-01 12/05/2008 Daniel Dobos
10 // Version 00-00-02 19/05/2008 Daniel Dobos
11 // Version 00-00-11 05/02/2009 Daniel Dobos
13 
15 
17 
18 static const InterfaceID IID_IBCM_RawCollByteStreamTool("BCM_RawDataProviderTool", 1, 0);
20 { return IID_IBCM_RawCollByteStreamTool; }
21 
23 // destructor
26 {}
27 
29 // initialize() -
32 {
34 
35  // Retrieve decoder
36  ATH_CHECK( m_decoder.retrieve() );
37  ATH_MSG_INFO( "Retrieved tool " << m_decoder );
38 
39  return StatusCode::SUCCESS;
40 }
41 
43 // finalize() -
46 {
48  return StatusCode::SUCCESS;
49 }
50 
51 
52 StatusCode BCM_RawDataProviderTool::convert( std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*>& vecRobs, BCM_RDO_Container* rdoCont) const
53 {
54  if(vecRobs.size() == 0) return StatusCode::SUCCESS;
55 
56  std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*>::const_iterator rob_it = vecRobs.begin();
57 
58  // loop over the ROB fragments
59  for(; rob_it!=vecRobs.end(); ++rob_it) {
60 
61  StatusCode sc = m_decoder->fillCollection(&**rob_it, rdoCont);
62  if (sc != StatusCode::SUCCESS) {
63  if (m_decodeErrCount < 100) {
64  ATH_MSG_INFO( "Problem with BCM ByteStream Decoding!" );
65  } else if (100 == m_decodeErrCount) {
66  ATH_MSG_INFO( "Too many Problems with BCM Decoding. Turning message off." );
67  }
69  }
70  }
71 
72  return StatusCode::SUCCESS;
73 }
BCM_RawDataProviderTool::m_decodeErrCount
std::atomic< unsigned > m_decodeErrCount
Definition: BCM_RawDataProviderTool.h:41
python.tests.PyTestsLib.finalize
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
Definition: PyTestsLib.py:50
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
initialize
void initialize()
Definition: run_EoverP.cxx:894
BCM_RawDataProviderTool::~BCM_RawDataProviderTool
virtual ~BCM_RawDataProviderTool()
destructor
Definition: BCM_RawDataProviderTool.cxx:25
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
BCM_RawDataProviderTool::convert
StatusCode convert(std::vector< const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment * > &vecRobs, BCM_RDO_Container *rdoCont) const
this is the main decoding method
Definition: BCM_RawDataProviderTool.cxx:52
BCM_RawDataProviderTool.h
BCM_RawDataProviderTool::interfaceID
static const InterfaceID & interfaceID()
AthAlgTool InterfaceID.
Definition: BCM_RawDataProviderTool.cxx:19
BCM_RDO_Container
Definition: BCM_RDO_Container.h:27
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
BCM_RawDataProviderTool::m_decoder
ToolHandle< BCM_RodDecoder > m_decoder
Definition: BCM_RawDataProviderTool.h:42
BCM_RDO_Container.h
BCM_RawDataProviderTool::finalize
virtual StatusCode finalize() override
finalize
Definition: BCM_RawDataProviderTool.cxx:45
BCM_RawDataProviderTool::initialize
virtual StatusCode initialize() override
initialize
Definition: BCM_RawDataProviderTool.cxx:31