Project
Loading...
Searching...
No Matches
o2TestAnalysisCCDB.cxx
Go to the documentation of this file.
1// Copyright 2019-2025 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.
15
20#include <iostream>
21
22#include <TH2F.h>
23
24using namespace o2;
25using namespace o2::framework;
26using namespace o2::framework::expressions;
27
28namespace o2::aod
29{
30namespace tofcalib
31{
32DECLARE_SOA_CCDB_COLUMN(LHCphase, lhcPhase, o2::dataformats::CalibLHCphaseTOF, "TOF/Calib/LHCphase");
33} // namespace tofcalib
34
35DECLARE_SOA_TIMESTAMPED_TABLE(TOFCalibrationObjects, aod::Timestamps, o2::aod::timestamp::Timestamp, 1, "TOFCALIB",
36 tofcalib::LHCphase);
37} // namespace o2::aod
38
42
44 {
45 timestamps(1747442464000); // c2b3d801393540b7bddb949d600b199f, ecacb915-3d70-11f0-ac6f-808de0f5250c
46 timestamps(1747442764000); // 0262dbd9d50aa79c3d4dcd5ec3ca67c3, ed5471c5-3d70-11f0-b0a3-808de0f524ee
47 control->readyToQuit(QuitRequest::Me);
48 control->endOfStream();
49 std::cout << "Executed " << std::endl;
50 }
51};
52
54 void process(o2::aod::TOFCalibrationObjects const& ccdbObjectsForAllTimestamps)
55 {
56 LOGP(info, "Looking at all the LHCphases associated to the timestamps");
57 for (auto& object : ccdbObjectsForAllTimestamps) {
58 std::cout << object.lhcPhase().getStartValidity() << " " << object.lhcPhase().getEndValidity() << std::endl;
59 }
60 }
61};
62
64{
65 return WorkflowSpec{
66 adaptAnalysisTask<DummyTimestampsTable>(cfgc),
67 adaptAnalysisTask<SimpleCCDBConsumer>(cfgc, TaskName{"simple-ccdb-cunsumer"}),
68 };
69}
#define DECLARE_SOA_TIMESTAMPED_TABLE(_Name_, _TimestampSource_, _TimestampColumn_, _Version_, _Desc_,...)
Definition ASoA.h:3303
#define DECLARE_SOA_CCDB_COLUMN(_Name_, _Getter_, _ConcreteType_, _CCDBQuery_)
Definition ASoA.h:2392
Class to store the output of the matching to TOF for calibration.
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
std::vector< DataProcessorSpec > WorkflowSpec
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
WorkflowSpec defineDataProcessing(ConfigContext const &cfgc)
This function hooks up the the workflow specifications into the DPL driver.
void process(Enumeration< 0, 1 > &e)
Service< o2::framework::ControlService > control
Table with SOR timestamps produced by the task.
Produces< aod::Timestamps > timestamps
void process(o2::aod::TOFCalibrationObjects const &ccdbObjectsForAllTimestamps)
Struct to differentiate task names from possible task string arguments.