Project
Loading...
Searching...
No Matches
ThresholdAggregatorSpec.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_ITS_THRESHOLD_AGGREGATOR_
15#define O2_ITS_THRESHOLD_AGGREGATOR_
16
17#include <string>
18#include <vector>
19#include <iostream>
20#include <fstream>
21
24#include "Framework/Task.h"
25#include <fairmq/Device.h>
26
27#include <ITSMFTReconstruction/RawPixelDecoder.h> //o2::itsmft::RawPixelDecoder
28
30#include "Headers/DataHeader.h"
32#include "CCDB/CcdbObjectInfo.h"
33#include "CCDB/CcdbApi.h"
38
39using namespace o2::framework;
40using namespace o2::itsmft;
41
42namespace o2
43{
44namespace its
45{
46
48{
49 public:
51 ~ITSThresholdAggregator() override = default;
52
53 void init(InitContext& ic) final;
54 void run(ProcessingContext& pc) final;
55 void endOfStream(EndOfStreamContext& ec) final;
56
58 void stop() final;
59
61 private:
62 void finalizeOutput();
63 void updateLHCPeriodAndRunNumber(ProcessingContext&);
64
65 std::unique_ptr<o2::ccdb::CcdbObjectInfo> mWrapper = nullptr;
66 std::string mOutputStr;
67 std::string mType;
68
69 std::string mSelfName;
70
71 // Helper functions for writing to the database
72 bool mVerboseOutput = false;
73
74 // Keep track of whether the endOfStream() or stop() has been called
75 bool mStopped = false;
76
77 o2::dcs::DCSconfigObject_t tuningMerge;
78 o2::dcs::DCSconfigObject_t PIXTYPMerge;
79 o2::dcs::DCSconfigObject_t chipDoneMerge;
80 short int mRunType = -1;
81 // Either "T" for threshold, "V" for VCASN, or "I" for ITHR
82 char mScanType = 'n';
83 // Either "derivative"=0, "fit"=1, or "hitcounting=2
84 char mFitType = 'n';
85
86 std::string mLHCPeriod;
87 // Ccdb url for ccdb upload withing the wf
88 std::string mCcdbUrl = "";
89 std::string mCcdbUrlProd = "";
90 // Run number
91 int mRunNumber = -1;
92 // confDB version
93 short int mDBversion = -1;
94};
95
96// Create a processor spec
98
99} // namespace its
100} // namespace o2
101
102#endif
Utils and constants for calibration and related workflows.
A helper class to iteratate over all parts of all input routes.
Definition of the Alpide pixel reader for raw data processing.
void stop() final
This is invoked on stop.
void endOfStream(EndOfStreamContext &ec) final
This is invoked whenever we have an EndOfStream event.
~ITSThresholdAggregator() override=default
void finalize(EndOfStreamContext *ec)
void run(ProcessingContext &pc) final
GLdouble n
Definition glcorearb.h:1982
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
o2::framework::DataProcessorSpec getITSThresholdAggregatorSpec()
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
Defining DataPointCompositeObject explicitly as copiable.