Project
Loading...
Searching...
No Matches
RawToDigitConverterSpec.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#include <vector>
13#include <chrono>
15#include "Framework/Task.h"
24
25namespace o2
26{
27
28namespace cpv
29{
30
31namespace reco_workflow
32{
33
40{
41 public:
44 RawToDigitConverterSpec(bool isPedestal, bool useBadChannelMap, bool useGainCalibration) : framework::Task(),
45 mIsUsingGainCalibration(useGainCalibration),
46 mIsUsingBadMap(useBadChannelMap),
47 mIsPedestalData(isPedestal){};
48
50 ~RawToDigitConverterSpec() override = default;
51
54 void init(framework::InitContext& ctx) final;
55
64 void run(framework::ProcessingContext& ctx) final;
65 void finaliseCCDB(framework::ConcreteDataMatcher& matcher, void* obj) final;
66
67 protected:
69 char CheckHWAddress(short ddl, short hwAddress, short& fee);
70
71 private:
72 void updateTimeDependentParams(framework::ProcessingContext& ctx);
73
74 private:
75 bool mIsUsingGainCalibration;
76 bool mIsUsingBadMap;
77 bool mIsPedestalData;
78 const o2::cpv::Pedestals* mPedestals = nullptr;
79 const o2::cpv::BadChannelMap* mBadMap = nullptr;
80 const o2::cpv::CalibParams* mGains = nullptr;
81 std::vector<Digit> mOutputDigits;
82 std::vector<TriggerRecord> mOutputTriggerRecords;
83 std::vector<RawDecoderError> mOutputHWErrors;
84 bool mIsMuteDecoderErrors = false;
85 int mDecoderErrorsCounterWhenMuted = 0;
86 int mDecoderErrorsPerMinute = 0;
87 int mMinutesPassed = 0;
88 std::chrono::time_point<std::chrono::system_clock> mStartTime;
89 std::chrono::time_point<std::chrono::system_clock> mTimeWhenMuted;
90};
91
96 bool isPedestal = false,
97 bool useBadChannelMap = true,
98 bool useGainCalibration = true);
99
100} // namespace reco_workflow
101
102} // namespace cpv
103
104} // namespace o2
CCDB container for bad (masked) channels in CPV.
Coverter task for Raw data to CPV cells.
void finaliseCCDB(framework::ConcreteDataMatcher &matcher, void *obj) final
void init(framework::InitContext &ctx) final
Initializing the RawToDigitConverterSpec.
RawToDigitConverterSpec(bool isPedestal, bool useBadChannelMap, bool useGainCalibration)
Constructor.
~RawToDigitConverterSpec() override=default
Destructor.
void run(framework::ProcessingContext &ctx) final
Run conversion of raw data to cells.
char CheckHWAddress(short ddl, short hwAddress, short &fee)
simple check of HW address
o2::framework::DataProcessorSpec getRawToDigitConverterSpec(bool askDISTSTF=true, bool isPedestal=false, bool useBadChannelMap=true, bool useGainCalibration=true)
Creating DataProcessorSpec for the CPV Digit Converter Spec.
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...