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
55
56 void process(o2::aod::TOFCalibrationObjects const& ccdbObjectsForAllTimestamps)
57 {
58 LOGP(info, "LHCphase CCDB path configurable value: {}", lhcPhasePath.value);
59 LOGP(info, "Looking at all the LHCphases associated to the timestamps");
60 for (auto& object : ccdbObjectsForAllTimestamps) {
61 std::cout << object.lhcPhase().getStartValidity() << " " << object.lhcPhase().getEndValidity() << std::endl;
62 }
63 }
64};
65
68
69 void process(o2::aod::TOFCalibrationObjects const& ccdbObjectsForAllTimestamps)
70 {
71 LOGP(info, "AnotherCCDBConsumer LHCphase CCDB path configurable value: {}", lhcPhasePath.value);
72 for (auto& object : ccdbObjectsForAllTimestamps) {
73 std::cout << object.lhcPhase().getStartValidity() << " " << object.lhcPhase().getEndValidity() << std::endl;
74 }
75 }
76};
77
79{
80 return WorkflowSpec{
81 adaptAnalysisTask<DummyTimestampsTable>(cfgc),
82 adaptAnalysisTask<SimpleCCDBConsumer>(cfgc, TaskName{"simple-ccdb-consumer"}),
83 adaptAnalysisTask<AnotherCCDBConsumer>(cfgc, TaskName{"another-ccdb-consumer"}),
84 };
85}
#define DECLARE_SOA_TIMESTAMPED_TABLE(_Name_, _TimestampSource_, _TimestampColumn_, _Version_, _Desc_,...)
Definition ASoA.h:3393
#define DECLARE_SOA_CCDB_COLUMN(_Name_, _Getter_, _ConcreteType_, _CCDBQuery_)
Definition ASoA.h:2436
Class to store the output of the matching to TOF for calibration.
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char e
Defining ITS Vertex explicitly as messageable.
Definition Cartesian.h:288
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(o2::aod::TOFCalibrationObjects const &ccdbObjectsForAllTimestamps)
ConfigurableCCDBPath< o2::aod::tofcalib::LHCphase > lhcPhasePath
void process(Enumeration< 0, 1 > &e)
Service< o2::framework::ControlService > control
Table with SOR timestamps produced by the task.
Produces< aod::Timestamps > timestamps
ConfigurableCCDBPath< o2::aod::tofcalib::LHCphase > lhcPhasePath
void process(o2::aod::TOFCalibrationObjects const &ccdbObjectsForAllTimestamps)
Struct to differentiate task names from possible task string arguments.