ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
ForwardDetectors
ZDC
ZdcCnv
ZdcByteStream
src
ZdcByteStreamRawData.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
* ZdcByteStreamRawData.cxx
7
*
8
* Created on: Jun 29, 2009
9
* Author: leite
10
*
11
* Based on Athena Algorithm this class must provide 3 methods:
12
*
13
* ZdcByteStreamRawData::initialize (run once at run start)
14
* ZdcByteStreamRawData::execute (run for every event)
15
* ZdcByteStreamRawData::finalize (run one at run end)
16
*
17
* plus some helpers
18
*/
19
20
#include <utility>
21
22
#include "GaudiKernel/ISvcLocator.h"
23
#include "GaudiKernel/MsgStream.h"
24
#include "GaudiKernel/StatusCode.h"
25
#include "
StoreGate/StoreGateSvc.h
"
26
27
#include "
ZdcEvent/ZdcDigits.h
"
28
#include "
ZdcEvent/ZdcDigitsCollection.h
"
29
30
#include "
ZdcByteStream/ZdcDefs.h
"
31
#include "
ZdcByteStream/ZdcByteStreamRawData.h
"
32
33
//==================================================================================================
34
ZdcByteStreamRawData::ZdcByteStreamRawData
(
const
std::string& name, ISvcLocator* pSvcLocator) :
35
AthAlgorithm
(name, pSvcLocator)
36
{
37
declareProperty
(
"ZdcDigitsCollectionLocation"
,
m_ZdcDigitsCollectionLocation
=
ZdcDefs::ZdcDigitsCollectionLocation
);
38
declareProperty
(
"ForceSlicesLUT"
,
m_forceSlicesLut
= 0);
39
declareProperty
(
"ForceSlicesFADC"
,
m_forceSlicesFadc
= 0);
40
}
41
//==================================================================================================
42
43
44
//==================================================================================================
45
StatusCode
ZdcByteStreamRawData::execute
(
const
EventContext&
/*ctx*/
)
46
{
47
if
(!
msgLvl
(MSG::INFO))
return
StatusCode::SUCCESS;
48
msg
(MSG::INFO);
49
53
54
const
ZdcDigitsCollection
* ttCollection =
nullptr
;
55
56
msg
(MSG::DEBUG) <<
"Looking for ZDC Digits Collection at "
<<
m_ZdcDigitsCollectionLocation
<<
endmsg
;
57
//std::cout << "Looking for ZDC Digits Collection at " << m_ZdcDigitsCollectionLocation << std::endl;
58
StatusCode
sc
=
evtStore
()->retrieve(ttCollection,
m_ZdcDigitsCollectionLocation
);
59
if
(
sc
.isFailure() || !ttCollection || ttCollection->
empty
())
60
{
61
msg
() <<
"No Zdc Digits found"
<<
endmsg
;
62
return
StatusCode::SUCCESS;
63
}
64
65
return
StatusCode::SUCCESS;
66
}
67
//==================================================================================================
68
69
70
71
//==================================================================================================
72
//FIXME There is no such thing like ZdcDigitsMap
73
void
ZdcByteStreamRawData::printZdcDigits
()
const
74
{
75
msg
() <<
"Number of ZdcDigits = "
<<
m_ZdcDigitsMap
.size() <<
endmsg
;
76
// ZdcDigitsMap::const_iterator mapIter = m_ZdcDigitsMap.begin();
77
// ZdcDigitsMap::const_iterator mapEnd = m_ZdcDigitsMap.end();
78
}
79
//==================================================================================================
80
81
82
//==================================================================================================
83
void
ZdcByteStreamRawData::printVec
(
const
std::vector<int>&
vec
)
const
84
{
85
std::vector<int>::const_iterator pos;
86
for
(pos =
vec
.begin(); pos !=
vec
.end(); ++pos)
87
{
88
if
(pos !=
vec
.begin())
msg
() <<
","
;
89
msg
() << *pos;
90
}
91
msg
() <<
"/"
;
92
}
93
//==================================================================================================
94
95
/* REMOVE
96
97
// Set up trigger tower map
98
void ZdcByteStreamRawData::setupZdcDigitsMap(const ZdcDigitsCollection* const ttCollection)
99
{
100
m_ZdcDigitsMap.clear();
101
ZdcDigitsCollection::const_iterator pos = ttCollection->begin();
102
ZdcDigitsCollection::const_iterator pose = ttCollection->end();
103
for (; pos != pose; ++pos) {
104
const ZdcDigits* const tt = *pos;
105
tt->get_ID();
106
107
//const unsigned int key = m_towerKey->ttKey(tt->phi(), tt->eta());
108
//m_ttMap.insert(std::make_pair(key, tt));
109
}
110
}
111
*/
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
vec
std::vector< size_t > vec
Definition
CombinationsGeneratorTest.cxx:9
sc
static Double_t sc
Definition
LArPhysWaveHECTool.cxx:37
StoreGateSvc.h
ZdcByteStreamRawData.h
ZdcDefs.h
ZdcDigitsCollection.h
ZdcDigits.h
AthAlgorithm::AthAlgorithm
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition
AthAlgorithm.cxx:10
AthCommonAlgorithm< Gaudi::Algorithm >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition
AthCommonDataStore.h:145
AthCommonAlgorithm< Gaudi::Algorithm >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
Definition
AthCommonDataStore.h:85
AthCommonAlgorithm< Gaudi::Algorithm >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition
AthCommonMsg.h:30
AthCommonAlgorithm< Gaudi::Algorithm >::msg
MsgStream & msg() const
Definition
AthCommonMsg.h:24
DataVector::empty
bool empty() const noexcept
Returns true if the collection is empty.
ZdcByteStreamRawData::m_forceSlicesLut
int m_forceSlicesLut
REMOVE Force number of LUT slices REMOVE.
Definition
ZdcByteStreamRawData.h:51
ZdcByteStreamRawData::printVec
void printVec(const std::vector< int > &vec) const
Definition
ZdcByteStreamRawData.cxx:83
ZdcByteStreamRawData::printZdcDigits
void printZdcDigits() const
Definition
ZdcByteStreamRawData.cxx:73
ZdcByteStreamRawData::ZdcByteStreamRawData
ZdcByteStreamRawData(const std::string &name, ISvcLocator *pSvcLocator)
Definition
ZdcByteStreamRawData.cxx:34
ZdcByteStreamRawData::m_ZdcDigitsMap
ZdcDigitsMap m_ZdcDigitsMap
Definition
ZdcByteStreamRawData.h:55
ZdcByteStreamRawData::m_forceSlicesFadc
int m_forceSlicesFadc
REMOVE Force number of FADC slices REMOVE.
Definition
ZdcByteStreamRawData.h:54
ZdcByteStreamRawData::execute
virtual StatusCode execute(const EventContext &ctx) override
Execute method.
Definition
ZdcByteStreamRawData.cxx:45
ZdcByteStreamRawData::m_ZdcDigitsCollectionLocation
std::string m_ZdcDigitsCollectionLocation
Definition
ZdcByteStreamRawData.h:45
ZdcDefs::ZdcDigitsCollectionLocation
static const std::string ZdcDigitsCollectionLocation
Definition
ZdcDefs.h:20
ZdcDigitsCollection
Definition
ZdcDigitsCollection.h:20
Generated on
for ATLAS Offline Software by
1.17.0