ATLAS Offline Software
ALFA_RawDataProviderTool_charge.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
8 
10 // contructor
12 
14 (const std::string& type, const std::string& name, const IInterface* parent)
16 {
17 }
18 
20 // destructor
23 
25 // initialize() -
28 
29  // Retrieve decoder
30  ATH_CHECK(m_decoder_charge.retrieve());
31 
32  return StatusCode::SUCCESS;
33 }
34 
35 
36 
38 // convert() -
40 
42 
43 {
44  std::set<uint32_t> robIdSet;
45 
46  ATH_MSG_DEBUG("Number of ROB fragments is " << vecRobs.size());
47 
48  if(vecRobs.empty()) return StatusCode::SUCCESS;
49 
50  std::vector<const ROBFragment*>::const_iterator rob_it = vecRobs.begin();
51 
52  // loop over the ROB fragments
53  for(; rob_it!=vecRobs.end(); ++rob_it) {
54 
55  uint32_t robid = (*rob_it)->rod_source_id();
56 
57 
58  // check if this ROBFragment was already decoded
59  if (!robIdSet.insert(robid).second) {
60  ATH_MSG_DEBUG(" ROB Fragment with ID " << std::hex<<robid<<std::dec << " already decoded, skip");
61  } else {
62  ATH_CHECK( m_decoder_charge->fillCollection(&**rob_it, rdoCont) );
63  ATH_MSG_DEBUG(" ROB Fragment with ID " << std::hex<<robid<<std::dec << " fill Container");
64  }
65  }// loop over the ROB fragments
66 
67  return StatusCode::SUCCESS;
68 }
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
ALFA_RawDataProviderTool_charge::m_decoder_charge
ToolHandle< ALFA_Decoder_charge > m_decoder_charge
Definition: ALFA_RawDataProviderTool_charge.h:52
ALFA_RawDataProviderTool_charge.h
ALFA_RawDataProviderTool_charge::ALFA_RawDataProviderTool_charge
ALFA_RawDataProviderTool_charge(const std::string &type, const std::string &name, const IInterface *parent)
constructor
Definition: ALFA_RawDataProviderTool_charge.cxx:14
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
ALFA_RawDataProviderTool_charge::~ALFA_RawDataProviderTool_charge
virtual ~ALFA_RawDataProviderTool_charge()
destructor
Definition: ALFA_RawDataProviderTool_charge.cxx:22
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment
eformat::ROBFragment< PointerType > ROBFragment
Definition: RawEvent.h:27
ALFA_RawDataContainer_charge
This container provides acces to the PMF RDOs.
Definition: ALFA_RawDataContainer_charge.h:21
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
ALFA_RawDataProviderTool_charge::convert_charge
StatusCode convert_charge(std::vector< const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment * > &vecRobs, ALFA_RawDataContainer_charge *rdoCont)
this is the main decoding method
Definition: ALFA_RawDataProviderTool_charge.cxx:41
AthAlgTool
Definition: AthAlgTool.h:26
ALFA_RawDataProviderTool_charge::initialize
virtual StatusCode initialize() override
initialize
Definition: ALFA_RawDataProviderTool_charge.cxx:27