ATLAS Offline Software
Loading...
Searching...
No Matches
ZdcByteStreamTool.h
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 * ZdcByteZtreamTool.h
7 *
8 * Created on: May 27, 2009
9 * Author: leite
10 * based on the L1Calo ByteStream Tool
11 *
12 */
13
14#ifndef ZDCBYTESTREAMTOOL_H
15#define ZDCBYTESTREAMTOOL_H
16
17#include <stdint.h>
18
19#include <map>
20#include <string>
21#include <vector>
22
27#include "eformat/SourceIdentifier.h"
28#include "GaudiKernel/ToolHandle.h"
29
30class ZdcID;
31
32class IInterface;
33class InterfaceID;
34class StatusCode;
35
36template<class T> class FullEventAssembler;
37
38//Use ZdcDigits onde it's fixed
39//class ZdcRdo;
40//class ZdcRdoCollection;
41class ZdcDigits;
43
44class ZdcSrcIdMap;
45class ZdcPpmSubBlock;
46
52
54{
55
56public:
57 ZdcByteStreamTool(const std::string& type,
58 const std::string& name,
59 const IInterface* parent);
60
62 static const InterfaceID& interfaceID();
63
64 virtual StatusCode initialize() override;
65 virtual StatusCode finalize() override;
66
68 StatusCode convert( const IROBDataProviderSvc::VROBFRAG& robFrags,
69 ZdcDigitsCollection* ttCollection);
70
72 static StatusCode convert(const ZdcDigitsCollection* ttCollection,
74
76 const std::vector<uint32_t>& sourceIDs();
77
78private:
79// typedef DataVector<ZdcDigits> ZdcDigitsCollection;
80 typedef std::map<unsigned int, ZdcDigits*> ZdcDigitsMap;
81 typedef std::map<unsigned int, const ZdcDigits*> ZdcDigitsMapConst;
82 typedef IROBDataProviderSvc::VROBFRAG::const_iterator ROBIterator;
84
86 void addCompStats(const std::vector<uint32_t>& stats);
88 void printCompStats() const;
90 void printVec(const std::vector<int>& vec) const;
91
93 //int m_version;
97 //int m_compVers;
105 //int m_modules;
125 std::vector<uint32_t> m_sourceIDs;
127 eformat::SubDetector m_subDetector;
135 std::vector<uint32_t> m_compStats;
137 std::vector<uint32_t>* m_rodStatus;
139 std::map<uint32_t, std::vector<uint32_t>*> m_rodStatusMap;
140
141 const ZdcID* m_zdcID{};
142
143};
144
145#endif /* ZDCBYTESTREAMTOOL_H*/
const boost::regex re(r_e)
std::vector< size_t > vec
An STL vector of pointers that by default owns its pointed-to elements.
OFFLINE_FRAGMENTS_NAMESPACE_WRITE::FullEventFragment RawEventWrite
data type for writing raw event
Definition RawEvent.h:39
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Derived DataVector<T>.
Definition DataVector.h:795
Template class for assembling a full atlas raw event from subfragments.
std::vector< const ROBF * > VROBFRAG
int m_dataFormat
Sub_block header version.
DataVector< ZdcPpmSubBlock > m_ppmBlocks
Vector for current PPM sub-blocks.
IROBDataProviderSvc::VROBFRAG::const_iterator ROBIterator
int m_fadcThreshold
FADC threshold for super-compressed format.
const std::vector< uint32_t > & sourceIDs()
Return reference to vector with all possible Source Identifiers.
int m_slinks
Number of modules per crate (may not all exist)
void printCompStats() const
Print compression stats.
int m_printCompStats
Compression version.
int m_zeroSuppress
Zero suppression on input.
int m_channels
Number of channels per module (may not all be used)
int m_fadcBaseline
FADC baseline lower bound.
std::map< unsigned int, ZdcDigits * > ZdcDigitsMap
OFFLINE_FRAGMENTS_NAMESPACE::PointerType RODPointer
int m_crates
Number of crates.
int m_dfltSlicesFadc
Default number of FADC slices in simulation.
std::vector< uint32_t > m_compStats
Vector for compression statistics.
std::vector< uint32_t > * m_rodStatus
ROD Status words.
void printVec(const std::vector< int > &vec) const
Print a vector.
StatusCode convert(const IROBDataProviderSvc::VROBFRAG &robFrags, ZdcDigitsCollection *ttCollection)
Convert ROB fragments to ZdcCollection.
eformat::SubDetector m_subDetector
Sub-detector type.
int m_forceSlicesLut
Force number of LUT slices in bytestream.
std::map< unsigned int, const ZdcDigits * > ZdcDigitsMapConst
int m_pedestal
Pedestal value.
virtual StatusCode initialize() override
std::map< uint32_t, std::vector< uint32_t > * > m_rodStatusMap
ROD status map.
int m_forceSlicesFadc
Force number of FADC slices in bytestream.
std::vector< uint32_t > m_sourceIDs
ROB source IDs.
ZdcByteStreamTool(const std::string &type, const std::string &name, const IInterface *parent)
virtual StatusCode finalize() override
void addCompStats(const std::vector< uint32_t > &stats)
Add compression stats to totals.
static const InterfaceID & interfaceID()
AlgTool InterfaceID.
ZdcPpmSubBlock * m_errorBlock
Trigger tower key provider.
int m_dfltSlicesLut
Default number of LUT slices in simulation.
ZdcSrcIdMap * m_srcIdMap
Source ID converter.
Definition ZdcID.h:25
Sub-Block class for PPM data.
This class provides conversion between Lower level Source ID to higher level source ID for L1Calo Byt...
Definition ZdcSrcIdMap.h:24
const DataType * PointerType
Definition RawEvent.h:25