Project
Loading...
Searching...
No Matches
PedestalsCalculationSpec.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 DETECTORS_HMPID_WORKFLOW_INCLUDE_HMPIDWORKFLOW_PEDESTALS_H_
13#define DETECTORS_HMPID_WORKFLOW_INCLUDE_HMPIDWORKFLOW_PEDESTALS_H_
14
16#include "Framework/Task.h"
17
18#include "CCDB/CcdbApi.h"
19
20#include "HMPIDBase/Common.h"
22
23namespace o2
24{
25namespace hmpid
26{
27
29{
30 public:
32 ~PedestalsCalculationTask() override = default;
33 void init(framework::InitContext& ic) final;
34 void run(framework::ProcessingContext& pc) final;
37
38 private:
39 void recordPedInCcdb();
40 void recordPedInFiles();
41 void recordPedInDcsCcdb();
42
43 private:
44 HmpidDecoder2* mDeco;
45 long mTotalDigits;
46 long mTotalFrames;
47 float mSigmaCut;
48 std::string mPedestalTag;
49 bool mWriteToFiles;
50 std::string mPedestalsBasePath;
51 std::map<std::string, std::string> mDbMetadata; // can be empty
52 std::string mPedestalsCCDBBasePath;
53 o2::ccdb::CcdbApi mDBapi;
54 bool mWriteToDB;
55 o2::ccdb::CcdbApi mDCSDBapi;
56 bool mWriteToDCSDB;
57 int mDcsCcdbAliveHours;
58
59 bool mFastAlgorithm;
60 ExecutionTimer mExTimer;
61};
62
63o2::framework::DataProcessorSpec getPedestalsCalculationSpec(std::string inputSpec = "TF:HMP/RAWDATA");
64
65} // end namespace hmpid
66} // end namespace o2
67
68#endif
HMPID Derived class for the Time of Workflows.
Definition Common.h:34
void decodeTF(framework::ProcessingContext &pc)
void init(framework::InitContext &ic) final
~PedestalsCalculationTask() override=default
void run(framework::ProcessingContext &pc) final
void endOfStream(framework::EndOfStreamContext &ec) override
This is invoked whenever we have an EndOfStream event.
o2::framework::DataProcessorSpec getPedestalsCalculationSpec(std::string inputSpec="TF:HMP/RAWDATA")
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...