Project
Loading...
Searching...
No Matches
tof-dummy-ccdb.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.
13#include <TClass.h>
17
18using namespace o2::framework;
19
20// This is how you can define your processing in a declarative way
21std::vector<DataProcessorSpec> defineDataProcessing(ConfigContext const&)
22{
23 return {
25 "simple",
26 Inputs{},
27 Outputs{OutputSpec{{"phase"}, "TOF", "LHCphase"},
28 OutputSpec{{"timeSlewing"}, "TOF", "ChannelCalib"}},
29 adaptStateless([](DataAllocator& outputs, ControlService& control) {
30 // Create and fill a dummy LHCphase object
31 auto& lhcPhase = outputs.make<o2::dataformats::CalibLHCphaseTOF>(OutputRef{"phase", 0});
32 lhcPhase.addLHCphase(0, 1234); // should be in ps
33 lhcPhase.addLHCphase(2000000000, 2345); // should be in ps
34 auto& calibTimeSlewing = outputs.make<o2::dataformats::CalibTimeSlewingParamTOF>(OutputRef{"timeSlewing", 0});
35 for (int ich = 0; ich < o2::dataformats::CalibTimeSlewingParamTOF::NCHANNELS; ich++) {
36 calibTimeSlewing.addTimeSlewingInfo(ich, 0, 0);
39 calibTimeSlewing.setFractionUnderPeak(sector, channelInSector, 1);
40 }
41 control.endOfStream();
42 control.readyToQuit(QuitRequest::Me);
43 })}};
44}
Class to store the output of the matching to TOF for calibration.
Class to store the output of the matching to TOF for calibration.
void addLHCphase(int timestamp, float phaseLHC)
void addTimeSlewingInfo(int channel, float tot, float time)
void readyToQuit(bool all)
Compatibility with old API.
void endOfStream()
Signal that we are done with the current stream.
decltype(auto) make(const Output &spec, Args... args)
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
AlgorithmSpec::ProcessCallback adaptStateless(LAMBDA l)
std::vector< InputSpec > Inputs
std::vector< OutputSpec > Outputs
std::vector< DataProcessorSpec > defineDataProcessing(ConfigContext const &)
This function hooks up the the workflow specifications into the DPL driver.