ATLAS Offline Software
Loading...
Searching...
No Matches
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
18static const InterfaceID IID_IBCM_RawCollByteStreamTool("BCM_RawDataProviderTool", 1, 0);
21
23// destructor
27
29// initialize() -
32{
33 ATH_CHECK( AthAlgTool::initialize() );
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{
47 ATH_CHECK( AthAlgTool::finalize() );
48 return StatusCode::SUCCESS;
49}
50
51
52StatusCode 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}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_INFO(x)
static const InterfaceID IID_IBCM_RawCollByteStreamTool("BCM_RawDataProviderTool", 1, 0)
static Double_t sc
ToolHandle< BCM_RodDecoder > m_decoder
std::atomic< unsigned > m_decodeErrCount
virtual StatusCode initialize() override
initialize
virtual ~BCM_RawDataProviderTool()
destructor
static const InterfaceID & interfaceID()
AthAlgTool InterfaceID.
StatusCode convert(std::vector< const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment * > &vecRobs, BCM_RDO_Container *rdoCont) const
this is the main decoding method
virtual StatusCode finalize() override
finalize