Project
Loading...
Searching...
No Matches
CcdbRequestSpec.cxx
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#include <vector>
15
18#include "Framework/Logger.h"
22#include "TOFBase/Utils.h"
23
24using namespace o2::framework;
25using namespace o2::tof;
26
27namespace o2
28{
29namespace tof
30{
31
33{
34 LOG(debug) << "Init TOF CCDB Request!";
36}
37
39{
40 static uint32_t counts = 0;
42 static bool firstCall = true;
43 if (firstCall) {
44 Utils::setNOrbitInTF(o2::base::GRPGeomHelper::instance().getGRPECS()->getNHBFPerTF());
45 LOG(info) << "NHBFperTF = " << Utils::getNOrbitInTF();
46 }
47 counts++;
48 LOG(debug) << counts << ") NHBFperTF = " << Utils::getNOrbitInTF();
49
50 firstCall = false;
51}
52
54{
55 std::vector<OutputSpec> outputs;
56 std::vector<InputSpec> inputs;
57
58 inputs.emplace_back("stdDist", "FLP", "DISTSUBTIMEFRAME", 0, Lifetime::Timeframe);
59
60 auto ccdbRequest = std::make_shared<o2::base::GRPGeomRequest>(false, // orbitResetTime
61 true, // GRPECS=true for nHBF per TF
62 false, // GRPLHCIF
63 false, // GRPMagField
64 false, // askMatLUT
66 inputs);
67
68 return DataProcessorSpec{
69 "tof-ccdb-request",
70 inputs,
71 outputs,
72 AlgorithmSpec{adaptFromTask<CcdbRequest>(ccdbRequest)},
73 Options{}};
74}
75
76} // namespace tof
77} // namespace o2
Header of the General Run Parameters object.
Definition of the Names Generator class.
std::ostringstream debug
void checkUpdates(o2::framework::ProcessingContext &pc)
static GRPGeomHelper & instance()
void setRequest(std::shared_ptr< GRPGeomRequest > req)
void run(ProcessingContext &pc) final
void init(InitContext &ic) final
static void setNOrbitInTF(uint32_t norb)
Definition Utils.h:73
static uint32_t getNOrbitInTF()
Definition Utils.h:72
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
std::vector< ConfigParamSpec > Options
framework::DataProcessorSpec getCcdbRequestSpec()
create a processor spec
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"