Project
Loading...
Searching...
No Matches
FITDCSDataProcessor.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
16
17#ifndef O2_FIT_DCSDATAPROCESSOR_H
18#define O2_FIT_DCSDATAPROCESSOR_H
19
23#include "Framework/Task.h"
24#include "Headers/DataHeader.h"
25
26#include <chrono>
27#include <cstdint>
28#include <memory>
29#include <string>
30#include <vector>
31
32namespace o2
33{
34namespace fit
35{
36
43{
44 public:
45 FITDCSDataProcessor(const std::string& detectorName, const o2::header::DataDescription& dataDescription)
46 : mDetectorName(detectorName),
47 mDataDescription(dataDescription) {}
48 void init(o2::framework::InitContext& ic) final;
51 const std::string& getDetectorName() const;
52 bool getVerboseMode() const;
53 void setVerboseMode(bool verboseMode = true);
54
55 protected:
58 virtual std::vector<o2::dcs::DataPointIdentifier> getHardCodedDPIDs() = 0;
59
60 std::string mDetectorName;
61 bool mVerbose = false;
62
63 private:
65 void sendDPsOutput(o2::framework::DataAllocator& output);
66
67 std::unique_ptr<o2::fit::FITDCSDataReader> mDataReader;
68 std::chrono::high_resolution_clock::time_point mTimer;
69 int64_t mDPsUpdateInterval;
70 o2::header::DataDescription mDataDescription;
71
72}; // end class
73
74} // namespace fit
75} // namespace o2
76
77#endif // O2_FIT_DCSDATAPROCESSOR_H
DCS data point reader for FIT.
void output(const std::map< std::string, ChannelStat > &channels)
Definition rawdump.cxx:197
FITDCSDataProcessor(const std::string &detectorName, const o2::header::DataDescription &dataDescription)
virtual std::vector< o2::dcs::DataPointIdentifier > getHardCodedDPIDs()=0
std::string mDetectorName
Detector name.
void endOfStream(o2::framework::EndOfStreamContext &ec) final
This is invoked whenever we have an EndOfStream event.
void setVerboseMode(bool verboseMode=true)
void run(o2::framework::ProcessingContext &pc) final
const std::string & getDetectorName() const
void init(o2::framework::InitContext &ic) final
TFitResultPtr fit(const size_t nBins, const T *arr, const T xMin, const T xMax, TF1 &func, std::string_view option="")
Definition fit.h:59
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...