Project
Loading...
Searching...
No Matches
NoiseCalibratorSpec.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
13
14#ifndef O2_MFT_NOISECALIBRATORSPEC
15#define O2_MFT_NOISECALIBRATORSPEC
16
17#include <string>
18
19#include "CCDB/CcdbApi.h"
20
22#include "Framework/Task.h"
23
27
28//#include "MFTCalibration/NoiseSlotCalibrator.h" //For TimeSlot calibration
29// using CALIBRATOR = o2::mft::NoiseSlotCalibrator;
30
32
33using namespace o2::framework;
34
35namespace o2
36{
37
38namespace mft
39{
40
42{
43 public:
44 NoiseCalibratorSpec(bool digits = false, std::shared_ptr<o2::base::GRPGeomRequest> req = {});
45 ~NoiseCalibratorSpec() override = default;
46
47 void init(InitContext& ic) final;
48 void run(ProcessingContext& pc) final;
49 void endOfStream(EndOfStreamContext& ec) final;
50 void finaliseCCDB(ConcreteDataMatcher& matcher, void* obj) final;
51
52 private:
54 void updateTimeDependentParams(ProcessingContext& pc);
55 void sendOutputCcdb(DataAllocator& output);
56 void sendOutputCcdbMerge(DataAllocator& output);
57 void sendOutputCcdbDcs(DataAllocator& output);
58 void sendOutputDcs(DataAllocator& output);
59 void setOutputDcs(const o2::itsmft::NoiseMap& payload);
60 o2::itsmft::NoiseMap mNoiseMap{936};
61 std::unique_ptr<CALIBRATOR> mCalibrator = nullptr;
62 std::shared_ptr<o2::base::GRPGeomRequest> mCCDBRequest;
63 std::string mPath;
64 std::string mPathMerge;
65 std::string mMeta;
66
67 std::vector<std::array<int, 3>> mNoiseMapForDcs;
68 std::string mPathDcs;
69 std::string mPathDcsMerge;
70 std::string mOutputType;
71
72 double mThresh;
73 int64_t mStart;
74 int64_t mEnd;
75 bool mDigits = false;
76 bool mStopMeOnly = false; // send QuitRequest::Me instead of QuitRequest::All
77};
78
82
83} // namespace mft
84} // namespace o2
85
86#endif /* O2_MFT_NOISECALIBRATORSPEC */
Helper for geometry and GRP related CCDB requests.
void output(const std::map< std::string, ChannelStat > &channels)
Definition rawdump.cxx:197
Definition of the ITSMFT NoiseMap.
NoiseMap class for the ITS and MFT.
Definition NoiseMap.h:39
~NoiseCalibratorSpec() override=default
void endOfStream(EndOfStreamContext &ec) final
This is invoked whenever we have an EndOfStream event.
void run(ProcessingContext &pc) final
void init(InitContext &ic) final
void finaliseCCDB(ConcreteDataMatcher &matcher, void *obj) final
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
DataProcessorSpec getNoiseCalibratorSpec(bool useDigits)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::vector< Digit > digits