Project
Loading...
Searching...
No Matches
RawReaderFDD.h
Go to the documentation of this file.
1
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3
// All rights not expressly granted are reserved.
4
//
5
// This software is distributed under the terms of the GNU General Public
6
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7
//
8
// In applying this license CERN does not waive the privileges and immunities
9
// granted to it by virtue of its status as an Intergovernmental Organization
10
// or submit itself to any jurisdiction.
11
//
12
//file RawReaderFDD.h class for RAW data reading
13
//
14
// Artur.Furs
15
// afurs@cern.ch
16
//
17
//Main purpuse is to decode FDD data blocks and push them to DigitBlockFDD for proccess
18
//TODO: prepare wrappers for containers with digits and combine classes below into one template class?
19
#ifndef ALICEO2_FDD_RAWREADERFDD_H_
20
#define ALICEO2_FDD_RAWREADERFDD_H_
21
#include <iostream>
22
#include <vector>
23
#include <Rtypes.h>
24
#include "
FDDRaw/RawReaderFDDBase.h
"
25
26
#include "
DataFormatsFDD/Digit.h
"
27
#include "
DataFormatsFDD/ChannelData.h
"
28
29
#include "
Framework/ProcessingContext.h
"
30
#include "
Framework/DataAllocator.h
"
31
#include "
Framework/OutputSpec.h
"
32
#include <gsl/span>
33
34
namespace
o2
35
{
36
namespace
fdd
37
{
38
//Normal TCM mode
39
class
RawReaderFDD
:
public
RawReaderFDDBaseNorm
40
{
41
public
:
42
RawReaderFDD
(
bool
dumpData) :
mDumpData
(dumpData) {}
43
RawReaderFDD
(
const
RawReaderFDD
&) =
default
;
44
45
RawReaderFDD
() =
default
;
46
~RawReaderFDD
() =
default
;
47
void
clear
()
48
{
49
mVecDigits
.clear();
50
mVecChannelData
.clear();
51
}
52
void
accumulateDigits
()
53
{
54
getDigits
(
mVecDigits
,
mVecChannelData
);
55
LOG
(info) <<
"Number of Digits: "
<<
mVecDigits
.size();
56
LOG
(info) <<
"Number of ChannelData: "
<<
mVecChannelData
.size();
57
if
(
mDumpData
) {
58
DigitBlockFDD::print
(
mVecDigits
,
mVecChannelData
);
59
}
60
}
61
static
void
prepareOutputSpec
(std::vector<o2::framework::OutputSpec>& outputSpec)
62
{
63
outputSpec.emplace_back(
o2::header::gDataOriginFDD
,
"DIGITSBC"
, 0, o2::framework::Lifetime::Timeframe);
64
outputSpec.emplace_back(
o2::header::gDataOriginFDD
,
"DIGITSCH"
, 0, o2::framework::Lifetime::Timeframe);
65
}
66
void
makeSnapshot
(
o2::framework::ProcessingContext
& pc)
67
{
68
pc.
outputs
().
snapshot
(
o2::framework::Output
{
o2::header::gDataOriginFDD
,
"DIGITSBC"
, 0},
mVecDigits
);
69
pc.
outputs
().
snapshot
(
o2::framework::Output
{
o2::header::gDataOriginFDD
,
"DIGITSCH"
, 0},
mVecChannelData
);
70
}
71
bool
mDumpData
;
72
std::vector<Digit>
mVecDigits
;
73
std::vector<ChannelData>
mVecChannelData
;
74
};
75
76
}
// namespace fdd
77
}
// namespace o2
78
79
#endif
DataAllocator.h
Digit.h
ChannelData.h
Container class to store values of single FDD channel.
OutputSpec.h
ProcessingContext.h
RawReaderFDDBase.h
o2::fdd::RawReaderFDD
Definition
RawReaderFDD.h:40
o2::fdd::RawReaderFDD::~RawReaderFDD
~RawReaderFDD()=default
o2::fdd::RawReaderFDD::RawReaderFDD
RawReaderFDD(bool dumpData)
Definition
RawReaderFDD.h:42
o2::fdd::RawReaderFDD::mDumpData
bool mDumpData
Definition
RawReaderFDD.h:71
o2::fdd::RawReaderFDD::RawReaderFDD
RawReaderFDD()=default
o2::fdd::RawReaderFDD::clear
void clear()
Definition
RawReaderFDD.h:47
o2::fdd::RawReaderFDD::mVecChannelData
std::vector< ChannelData > mVecChannelData
Definition
RawReaderFDD.h:73
o2::fdd::RawReaderFDD::mVecDigits
std::vector< Digit > mVecDigits
Definition
RawReaderFDD.h:72
o2::fdd::RawReaderFDD::RawReaderFDD
RawReaderFDD(const RawReaderFDD &)=default
o2::fdd::RawReaderFDD::makeSnapshot
void makeSnapshot(o2::framework::ProcessingContext &pc)
Definition
RawReaderFDD.h:66
o2::fdd::RawReaderFDD::accumulateDigits
void accumulateDigits()
Definition
RawReaderFDD.h:52
o2::fdd::RawReaderFDD::prepareOutputSpec
static void prepareOutputSpec(std::vector< o2::framework::OutputSpec > &outputSpec)
Definition
RawReaderFDD.h:61
o2::fit::DigitBlockFIT::print
void print() const
Definition
DigitBlockFIT.h:302
o2::fit::RawReaderBaseFIT
Definition
RawReaderBaseFIT.h:41
o2::fit::RawReaderBase< DigitBlockFITtype, DataBlockPMtype, DataBlockTCMtype >::getDigits
int getDigits(VecDigitType &... vecDigit)
Definition
RawReaderBase.h:111
o2::framework::DataAllocator::snapshot
void snapshot(const Output &spec, T const &object)
Definition
DataAllocator.h:325
o2::framework::ProcessingContext
Definition
ProcessingContext.h:27
o2::framework::ProcessingContext::outputs
DataAllocator & outputs()
The data allocator is used to allocate memory for the output data.
Definition
ProcessingContext.h:41
o2::header::gDataOriginFDD
constexpr o2::header::DataOrigin gDataOriginFDD
Definition
DataHeader.h:568
o2::upgrades_utils::fdd
struct o2::upgrades_utils::@459 fdd
Collision labels.
o2
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
Definition
BitstreamReader.h:24
o2::framework::Output
Definition
Output.h:27
LOG
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"
Detectors
FIT
FDD
workflow
include
FDDWorkflow
RawReaderFDD.h
Generated on Tue Feb 25 2025 23:16:15 for Project by
1.9.8