Project
Loading...
Searching...
No Matches
STFDecoderSpec.h
Go to the documentation of this file.
1// Copyright 2019-2026 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
15
16#ifndef O2_ITSMFT_STFDECODER_
17#define O2_ITSMFT_STFDECODER_
18
19#include <memory>
20#include <string>
21#include <vector>
22#include <TStopwatch.h>
24#include "Framework/Task.h"
30
31using namespace o2::framework;
32
33namespace o2
34{
35namespace base
36{
37class GRPGeomRequest;
38}
39namespace itsmft
40{
41class Clusterer;
42
44 bool doClusters = true;
45 bool doPatterns = true;
46 bool doDigits = false;
47 bool doCalib = false;
48 bool doSquashing = false;
49 bool doStaggering = false;
50 bool askSTFDist = true;
51 bool allowReporting = true;
52 bool verifyDecoder = false;
54 std::string deviceName{};
55 std::string inputSpec{};
56};
57
58template <class Mapping>
59class STFDecoder : public Task
60{
61 using AlpideParam = DPLAlpideParam<Mapping::getDetID()>;
62
63 public:
64 STFDecoder(const STFDecoderInp& inp, std::shared_ptr<o2::base::GRPGeomRequest> gr);
65 STFDecoder() = default;
66 ~STFDecoder() override = default;
67 void init(InitContext& ic) final;
68 void run(ProcessingContext& pc) final;
69 void endOfStream(EndOfStreamContext& ec) final { finalize(); }
70 void stop() final { finalize(); }
71 void finaliseCCDB(ConcreteDataMatcher& matcher, void* obj) final;
72
73 private:
74 void updateTimeDependentParams(ProcessingContext& pc);
75 void finalize();
76 void reset();
77 std::unique_ptr<o2::itsmft::Clusterer> setupClusterer(const std::string& dictName);
78 void ensureContinuousROF(const std::vector<ROFRecord>& in, std::vector<ROFRecord>& out, int lr, int nROFsTF, const char* name);
79
80 TStopwatch mTimer;
81 bool mDoClusters = false;
82 bool mDoPatterns = false;
83 bool mDoDigits = false;
84 bool mDoCalibData = false;
85 bool mDoStaggering = false;
86 bool mUnmutExtraLanes = false;
87 bool mFinalizeDone = false;
88 bool mAllowReporting = true;
89 bool mApplyNoiseMap = true;
90 bool mUseClusterDictionary = true;
91 bool mVerifyDecoder = false;
92 bool mDumpFrom1stPipeline = false;
93 int mDumpOnError = 0;
94 int mNThreads = 1;
95 int mVerbosity = 0;
96 int mLayers = 1;
97 long mROFErrRepIntervalMS = 0;
98 size_t mTFCounter = 0;
99 uint32_t mFirstTFOrbit = 0;
100 o2::InteractionRecord mFirstIR;
101 std::vector<size_t> mEstNDig{0};
102 std::vector<size_t> mEstNClus{0};
103 std::vector<size_t> mEstNClusPatt{0};
104 std::vector<size_t> mEstNCalib{0};
105 size_t mMaxRawDumpsSize = 0;
106 size_t mRawDumpedSize = 0;
107 std::string mInputSpec;
108 std::string mSelfName;
109 std::vector<std::unique_ptr<RawPixelDecoder<Mapping>>> mDecoder;
110 std::unique_ptr<Clusterer> mClusterer;
111 std::shared_ptr<o2::base::GRPGeomRequest> mGGCCDBRequest;
112};
113
116
118
119} // namespace itsmft
120} // namespace o2
121
122#endif /* O2_ITS_DIGITREADER */
Definition of the ITSMFT ROFrame (trigger) record.
Definition of the Alpide pixel reader for raw data processing.
void endOfStream(EndOfStreamContext &ec) final
This is invoked whenever we have an EndOfStream event.
void run(ProcessingContext &pc) final
void finaliseCCDB(ConcreteDataMatcher &matcher, void *obj) final
void init(InitContext &ic) final
void stop() final
This is invoked on stop.
~STFDecoder() override=default
GLuint const GLchar * name
Definition glcorearb.h:781
Defining ITS Vertex explicitly as messageable.
Definition Cartesian.h:288
o2::framework::DataProcessorSpec getSTFDecoderSpec(const STFDecoderInp &inp)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
o2::header::DataOrigin origin