Project
Loading...
Searching...
No Matches
STFDecoderSpec.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
15
16#ifndef O2_ITSMFT_STFDECODER_
17#define O2_ITSMFT_STFDECODER_
18
19#include <TStopwatch.h>
21#include "Framework/Task.h"
22#include <memory>
23#include <string>
24#include <string_view>
28
29using namespace o2::framework;
30
31namespace o2
32{
33namespace base
34{
35class GRPGeomRequest;
36}
37namespace itsmft
38{
39class Clusterer;
40
42 bool doClusters = true;
43 bool doPatterns = true;
44 bool doDigits = false;
45 bool doCalib = false;
46 bool doSquashing = false;
47 bool askSTFDist = true;
48 bool allowReporting = true;
49 bool verifyDecoder = false;
51 std::string deviceName{};
52 std::string inputSpec{};
53};
54
55template <class Mapping>
56class STFDecoder : public Task
57{
58 public:
59 STFDecoder(const STFDecoderInp& inp, std::shared_ptr<o2::base::GRPGeomRequest> gr);
60 STFDecoder() = default;
61 ~STFDecoder() override = default;
62 void init(InitContext& ic) final;
63 void run(ProcessingContext& pc) final;
64 void endOfStream(EndOfStreamContext& ec) final { finalize(); }
65 void stop() final { finalize(); }
66 void finaliseCCDB(ConcreteDataMatcher& matcher, void* obj) final;
67
68 private:
69 void updateTimeDependentParams(ProcessingContext& pc);
70 void finalize();
71 void reset();
72 std::unique_ptr<o2::itsmft::Clusterer> setupClusterer(const std::string& dictName);
73 TStopwatch mTimer;
74 bool mDoClusters = false;
75 bool mDoPatterns = false;
76 bool mDoDigits = false;
77 bool mDoCalibData = false;
78 bool mUnmutExtraLanes = false;
79 bool mFinalizeDone = false;
80 bool mAllowReporting = true;
81 bool mApplyNoiseMap = true;
82 bool mUseClusterDictionary = true;
83 bool mVerifyDecoder = false;
84 bool mDumpFrom1stPipeline = false;
85 int mDumpOnError = 0;
86 int mNThreads = 1;
87 int mVerbosity = 0;
88 long mROFErrRepIntervalMS = 0;
89 size_t mTFCounter = 0;
90 size_t mEstNDig = 0;
91 size_t mEstNClus = 0;
92 size_t mEstNClusPatt = 0;
93 size_t mEstNCalib = 0;
94 size_t mEstNROF = 0;
95 size_t mMaxRawDumpsSize = 0;
96 size_t mRawDumpedSize = 0;
97 std::string mInputSpec;
98 std::string mSelfName;
99 std::unique_ptr<RawPixelDecoder<Mapping>> mDecoder;
100 std::unique_ptr<Clusterer> mClusterer;
101 std::shared_ptr<o2::base::GRPGeomRequest> mGGCCDBRequest;
102};
103
106
108
109} // namespace itsmft
110} // namespace o2
111
112#endif /* O2_ITS_DIGITREADER */
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
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
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