ATLAS Offline Software
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"
18 #include "StoreGate/ReadHandle.h"
19 
20 #include "ZdcEvent/ZdcDigits.h"
22 
23 #include "ZdcByteStream/ZdcDefs.h"
26 
27 //==================================================================================================
28 ZdcByteStreamRawDataV2::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 //==================================================================================================
47 StatusCode 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 //==================================================================================================
76 void 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  */
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
ZdcByteStreamRawDataV2::m_forceSlicesLut
int m_forceSlicesLut
REMOVE Force number of LUT slices REMOVE.
Definition: ZdcByteStreamRawDataV2.h:55
AthCommonMsg< Gaudi::Algorithm >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
ZdcByteStreamRawDataV2::initialize
virtual StatusCode initialize() override
Definition: ZdcByteStreamRawDataV2.cxx:38
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
ZdcDigitsCollection.h
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
ZdcByteStreamRawDataV2::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition: ZdcByteStreamRawDataV2.cxx:47
ZdcByteStreamRawDataV2::m_forceSlicesFadc
int m_forceSlicesFadc
REMOVE Force number of FADC slices REMOVE.
Definition: ZdcByteStreamRawDataV2.h:58
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
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
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
ZdcByteStreamRawDataV2::m_ZdcTriggerTowerContainerLocation
SG::ReadHandleKey< xAOD::TriggerTowerContainer > m_ZdcTriggerTowerContainerLocation
ZDC Container and collection StoreGate key.
Definition: ZdcByteStreamRawDataV2.h:49
ZdcToString.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
ZdcDigits.h
ZdcByteStreamRawDataV2.h
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
ZdcDefs.h
DEBUG
#define DEBUG
Definition: page_access.h:11
AthCommonMsg< Gaudi::Algorithm >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
ZdcByteStreamRawDataV2::printVec
void printVec(const std::vector< int > &vec) const
Definition: ZdcByteStreamRawDataV2.cxx:76
ReadHandle.h
Handle class for reading from StoreGate.
ZdcByteStreamRawDataV2::printZdcTriggerTowers
void printZdcTriggerTowers() const
Definition: ZdcByteStreamRawDataV2.cxx:66
ZdcByteStreamRawDataV2::ZdcByteStreamRawDataV2
ZdcByteStreamRawDataV2(const std::string &name, ISvcLocator *pSvcLocator)
Definition: ZdcByteStreamRawDataV2.cxx:28