Project
Loading...
Searching...
No Matches
PedestalCalibDevice.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#ifndef EMCAL_PEDESTAL_CALIB_DEVICE_H_
13#define EMCAL_PEDESTAL_CALIB_DEVICE_H_
14
15#include <memory>
16#include <vector>
17
19#include "Framework/Task.h"
20#include "EMCALBase/Mapper.h"
21#include "EMCALBase/Geometry.h"
25
26namespace o2::emcal
27{
28
30{
31 public:
32 PedestalCalibDevice(bool dumpToFile, bool addRunNum) : mDumpToFile(dumpToFile), mAddRunNumber(addRunNum){};
33 ~PedestalCalibDevice() final = default;
34
35 void init(framework::InitContext& ctx) final;
36
37 void run(framework::ProcessingContext& ctx) final;
38
39 void sendData(o2::framework::EndOfStreamContext& ec, const Pedestal& data) const;
40
42
44
45 static const char* getPedDataBinding() { return "PEDData"; }
46
47 private:
48 Geometry* mGeometry = nullptr;
49 o2::emcal::EMCALCalibExtractor mCalibExtractor;
50 PedestalProcessorData mPedestalData;
51 long int mStartTS = 0;
52 bool mDumpToFile;
53 int mRun = 0;
54 bool mAddRunNumber = false;
55};
56
58
59} // end namespace o2::emcal
60
61#endif
void dumpToFile(std::string fileName, const CathodeSegmentation &seg, const std::vector< Point > &points)
EMCAL geometry definition.
Definition Geometry.h:40
void endOfStream(o2::framework::EndOfStreamContext &ec) final
This is invoked whenever we have an EndOfStream event.
void init(framework::InitContext &ctx) final
static const char * getPedDataBinding()
~PedestalCalibDevice() final=default
void run(framework::ProcessingContext &ctx) final
void sendData(o2::framework::EndOfStreamContext &ec, const Pedestal &data) const
PedestalCalibDevice(bool dumpToFile, bool addRunNum)
Exchange container between PedestalProcessorDevice and PedestalAggregatorDevice.
CCDB container for pedestal values.
Definition Pedestal.h:48
GLboolean * data
Definition glcorearb.h:298
long getCurrentTimestamp()
returns the timestamp in long corresponding to "now"
o2::framework::DataProcessorSpec getPedestalCalibDevice(bool dumpToFile, bool addRunNum)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...