ATLAS Offline Software
ZdcDataAccessV2.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "GaudiKernel/MsgStream.h"
6 #include "GaudiKernel/StatusCode.h"
7 
11 
14 
15 //namespace LVL1BS {
16 
17 // Constructor
18 
19 ZdcDataAccessV2::ZdcDataAccessV2(const std::string& name /*="ZdcDataAccessV2"*/)
20  : AsgTool(name),
21  m_tool("ZdcByteStreamReadV1V2Tool/ZdcByteStreamReadV1V2Tool")
22 {
23 
24 }
25 
26 
27 // Initialize
28 
30 {
31  // Retrieve Tool
32  CHECK(m_tool.retrieve());
33 
34  return StatusCode::SUCCESS;
35 }
36 
37 
38 
39 // Return iterators to required trigger towers
40 
42 {
43  CHECK((m_tool->convert(&container)));
44  return StatusCode::SUCCESS;
45 }
46 
48 {
49  xAOD::TriggerTowerContainer ttCollection;
51 
52  ttCollection.setStore(&aux);
53  CHECK(loadTriggerTowers(ttCollection));
54  ATH_MSG_ALWAYS(ZdcToString(ttCollection));
55  return StatusCode::SUCCESS;
56 }
57 
58 //} // end namespace
ZdcDataAccessV2::m_tool
ToolHandle< ZdcByteStreamReadV1V2Tool > m_tool
Tool that does the actual work.
Definition: ZdcDataAccessV2.h:40
ZdcDataAccessV2.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ZdcToString
std::string ZdcToString(const std::vector< T > &vv)
Definition: ZdcToString.cxx:12
ZdcDataAccessV2::PrintTriggerTowers
virtual StatusCode PrintTriggerTowers()
Definition: ZdcDataAccessV2.cxx:47
ATH_MSG_ALWAYS
#define ATH_MSG_ALWAYS(x)
Definition: AthMsgStreamMacros.h:35
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
xAOD::TriggerTowerAuxContainer_v2
AuxContainer for TriggerTower_v2.
Definition: TriggerTowerAuxContainer_v2.h:28
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
ZdcDataAccessV2::initialize
virtual StatusCode initialize()
Dummy implementation of the initialisation function.
Definition: ZdcDataAccessV2.cxx:29
ZdcToString.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
ZdcDataAccessV2::ZdcDataAccessV2
ZdcDataAccessV2(const std::string &name)
Definition: ZdcDataAccessV2.cxx:19
ZdcByteStreamReadV1V2Tool.h
ZdcDataAccessV2::loadTriggerTowers
virtual StatusCode loadTriggerTowers(xAOD::TriggerTowerContainer &container)
Definition: ZdcDataAccessV2.cxx:41
IROBDataProviderSvc.h
TriggerTowerAuxContainer.h