ATLAS Offline Software
TrigT1CaloDataAccessV2.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 
10 #include "TrigT1CaloDataAccessV2.h"
11 
12 #include "ToString.h"
14 
15 namespace LVL1BS {
16 
17 // Constructor
18 
19 TrigT1CaloDataAccessV2::TrigT1CaloDataAccessV2(const std::string& name /*="TrigT1CaloDataAccessV2"*/)
20  : AsgTool(name),
21  m_tool("LVL1BS::PpmByteStreamReadV1V2Tool/PpmByteStreamReadV1V2Tool")
22 {
23 
24 }
25 
26 
27 // Initialize
28 
29 
31 {
32  ATH_MSG_INFO("Initializing " << name());
33 
34  // Retrieve Tool
35  CHECK(m_tool.retrieve());
36 
37  return StatusCode::SUCCESS;
38 }
39 
40 
41 
42 // Return iterators to required trigger towers
43 
45 {
46  CHECK(m_tool->convert(&container));
47  return StatusCode::SUCCESS;
48 }
49 
51 {
52  xAOD::TriggerTowerContainer ttCollection;
54 
55  ttCollection.setStore(&aux);
56  CHECK(loadTriggerTowers(ttCollection));
57  ATH_MSG_ALWAYS(ToString(ttCollection));
58  return StatusCode::SUCCESS;
59 }
60 
61 } // end namespace
LVL1BS::ToString
std::string ToString(const xAOD::TriggerTower &tt)
Definition: ToString.cxx:23
LVL1BS::TrigT1CaloDataAccessV2::loadTriggerTowers
virtual StatusCode loadTriggerTowers(xAOD::TriggerTowerContainer &container)
Definition: TrigT1CaloDataAccessV2.cxx:44
LVL1BS::TrigT1CaloDataAccessV2::m_tool
ToolHandle< LVL1BS::PpmByteStreamReadV1V2Tool > m_tool
Tool that does the actual work.
Definition: TrigT1CaloDataAccessV2.h:40
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
LVL1BS::TrigT1CaloDataAccessV2::initialize
virtual StatusCode initialize()
Dummy implementation of the initialisation function.
Definition: TrigT1CaloDataAccessV2.cxx:30
ToString.h
TrigT1CaloDataAccessV2.h
LVL1BS::TrigT1CaloDataAccessV2::TrigT1CaloDataAccessV2
TrigT1CaloDataAccessV2(const std::string &name)
Definition: TrigT1CaloDataAccessV2.cxx:19
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
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:794
PpmByteStreamReadV1V2Tool.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
LVL1BS
Definition: ZdcModifySlices.h:10
LVL1BS::TrigT1CaloDataAccessV2::PrintTriggerTowers
virtual StatusCode PrintTriggerTowers()
Definition: TrigT1CaloDataAccessV2.cxx:50
IROBDataProviderSvc.h
TriggerTowerAuxContainer.h