ATLAS Offline Software
Loading...
Searching...
No Matches
ZdcByteStreamRawDataV2.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/*
6 * ZdcByteStreamRawDataV2.cxx
7 *
8 * Updated: October 2015
9 * Author: Peter Steinberg (peter.steinberg@bnl.gov)
10 *
11 */
12
13#include <utility>
14
15#include "GaudiKernel/ISvcLocator.h"
16#include "GaudiKernel/MsgStream.h"
17#include "GaudiKernel/StatusCode.h"
19
20#include "ZdcEvent/ZdcDigits.h"
22
26
27//==================================================================================================
28ZdcByteStreamRawDataV2::ZdcByteStreamRawDataV2(const std::string& name, ISvcLocator* pSvcLocator) :
29 AthReentrantAlgorithm(name, pSvcLocator)
30{
31 declareProperty("ForceSlicesLUT", m_forceSlicesLut = 0);
32 declareProperty("ForceSlicesFADC", m_forceSlicesFadc = 0);
33}
34//==================================================================================================
35
36
37//==================================================================================================
39{
41 return StatusCode::SUCCESS;
42}
43//==================================================================================================
44
45
46//==================================================================================================
47StatusCode ZdcByteStreamRawDataV2::execute (const EventContext& ctx) const
48{
49 if (!msgLvl(MSG::INFO)) return StatusCode::SUCCESS;
50 msg(MSG::INFO);
51
52 msg(MSG::DEBUG) << "Looking for ZDC trigger tower container at " << m_ZdcTriggerTowerContainerLocation.key() << endmsg;
53
56
57 msg(MSG::DEBUG) << ZdcToString(*ttCollection) << endmsg;
58
59 return StatusCode::SUCCESS;
60}
61//==================================================================================================
62
63
64//==================================================================================================
65//FIXME There is no such thing like ZdcDigitsMap
67{
68 //msg() << "Number of ZdcDigits = " << m_ZdcDigitsMap.size() << endmsg;
69// ZdcDigitsMap::const_iterator mapIter = m_ZdcDigitsMap.begin();
70// ZdcDigitsMap::const_iterator mapEnd = m_ZdcDigitsMap.end();
71}
72//==================================================================================================
73
74
75//==================================================================================================
76void ZdcByteStreamRawDataV2::printVec(const std::vector<int>& vec) const
77{
78 std::vector<int>::const_iterator pos;
79 for (pos = vec.begin(); pos != vec.end(); ++pos)
80 {
81 if (pos != vec.begin()) msg() << ",";
82 msg() << *pos;
83 }
84 msg() << "/";
85}
86//==================================================================================================
87
88/* REMOVE
89
90 // Set up trigger tower map
91 void ZdcByteStreamRawDataV2::setupZdcDigitsMap(const ZdcDigitsCollection* const ttCollection)
92 {
93 m_ZdcDigitsMap.clear();
94 ZdcDigitsCollection::const_iterator pos = ttCollection->begin();
95 ZdcDigitsCollection::const_iterator pose = ttCollection->end();
96 for (; pos != pose; ++pos) {
97 const ZdcDigits* const tt = *pos;
98 tt->get_ID();
99
100 //const unsigned int key = m_towerKey->ttKey(tt->phi(), tt->eta());
101 //m_ttMap.insert(std::make_pair(key, tt));
102 }
103 }
104 */
#define endmsg
#define ATH_CHECK
Evaluate an expression and check for errors.
std::vector< size_t > vec
Handle class for reading from StoreGate.
std::string ZdcToString(const std::vector< T > &vv)
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
bool msgLvl(const MSG::Level lvl) const
An algorithm that can be simultaneously executed in multiple threads.
virtual StatusCode execute(const EventContext &ctx) const override
SG::ReadHandleKey< xAOD::TriggerTowerContainer > m_ZdcTriggerTowerContainerLocation
ZDC Container and collection StoreGate key.
int m_forceSlicesFadc
REMOVE Force number of FADC slices REMOVE.
void printVec(const std::vector< int > &vec) const
virtual StatusCode initialize() override
ZdcByteStreamRawDataV2(const std::string &name, ISvcLocator *pSvcLocator)
int m_forceSlicesLut
REMOVE Force number of LUT slices REMOVE.