|
| 1 | +// Copyright 2019-2026 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 | +/// |
| 12 | +/// \brief Tests that the same tables from different origins are routed correctly. |
| 13 | +/// Required two input files, <name>.root and <name>_EMB.root, that contain |
| 14 | +/// same number of DFs with the same names. |
| 15 | +/// \author |
| 16 | +/// \since |
| 17 | + |
| 18 | +#include "Framework/runDataProcessing.h" |
| 19 | +#include "Framework/AnalysisTask.h" |
| 20 | + |
| 21 | +using namespace o2; |
| 22 | +using namespace o2::framework; |
| 23 | +using namespace o2::framework::expressions; |
| 24 | + |
| 25 | +namespace o2::aod |
| 26 | +{ |
| 27 | +O2ORIGIN("EMB"); |
| 28 | +template <is_aod_hash T> |
| 29 | +using BCsFrom = BCs_001From<T>; |
| 30 | +using TracksPlus = soa::Join<StoredTracksIU, StoredTracksExtra>; |
| 31 | +template <is_aod_hash T> |
| 32 | +using TracksPlusFrom = soa::Join<StoredTracksIUFrom<T>, StoredTracksExtra_002From<T>>; |
| 33 | +} // namespace o2::aod |
| 34 | + |
| 35 | +struct TestEmbeddingSubscription { |
| 36 | + void process(aod::BCs const& bcs, aod::BCsFrom<aod::Hash<"EMB"_h>> const& bcse, |
| 37 | + aod::TracksPlus const& tracks, aod::TracksPlusFrom<aod::Hash<"EMB"_h>> const& trackse) |
| 38 | + { |
| 39 | + LOGP(info, "BCs from run {} and {}", bcs.begin().runNumber(), bcse.begin().runNumber()); |
| 40 | + LOGP(info, "Joined tracks: {} and {}", tracks.size(), trackse.size()); |
| 41 | + } |
| 42 | +}; |
| 43 | + |
| 44 | +WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) |
| 45 | +{ |
| 46 | + return {adaptAnalysisTask<TestEmbeddingSubscription>(cfgc)}; |
| 47 | +} |
0 commit comments