Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions Framework/Core/include/Framework/ASoA.h
Original file line number Diff line number Diff line change
Expand Up @@ -2307,6 +2307,7 @@ namespace o2::aod
O2ORIGIN("AOD");
O2ORIGIN("AOD1");
O2ORIGIN("AOD2");
O2ORIGIN("EMB");

O2ORIGIN("JOIN");
O2HASH("JOIN/0");
Expand Down Expand Up @@ -3214,12 +3215,15 @@ consteval auto getIndexTargets()
#define DECLARE_SOA_TABLE_STAGED_VERSIONED(_BaseName_, _Desc_, _Version_, ...) \
O2HASH(_Desc_ "/" #_Version_); \
O2HASH(#_BaseName_); \
O2HASH("Stored" #_BaseName_); \
O2HASH("Stored" #_BaseName_); \
O2HASH("StoredEMB" #_BaseName_); \

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this needed? Since StoredBaseName is already declared, you can use StoredBaseNameFrom<> for it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but that is for origin AOD1 isnt it? what if you want 3 versions of a table with AOD, AOD1 and EMB as origins?

@aalkin aalkin Sep 24, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In principle, with the new ability to set the origin explicitly, the staged declaration is not really needed. From<EMB> is the same as From<AOD1>. Instead of declaring several types, this should be reworked into declaring a single type and predeclaring its aliases with AOD1 and EMB origins, for example.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok I will remove it then

DECLARE_SOA_TABLE_METADATA(_BaseName_, _Desc_, _Version_, __VA_ARGS__); \
using Stored##_BaseName_##Metadata = _BaseName_##Metadata; \
using StoredEMB##_BaseName_##Metadata = _BaseName_##Metadata; \
DECLARE_SOA_TABLE_METADATA_TRAIT(_BaseName_, _Desc_, _Version_); \
DECLARE_SOA_STAGE(_BaseName_, "AOD", _Desc_, _Version_); \
DECLARE_SOA_STAGE(Stored##_BaseName_, "AOD1", _Desc_, _Version_);
DECLARE_SOA_STAGE(Stored##_BaseName_, "AOD1", _Desc_, _Version_); \
DECLARE_SOA_STAGE(StoredEMB##_BaseName_, "EMB", _Desc_, _Version_);

#define DECLARE_SOA_TABLE_STAGED(_BaseName_, _Desc_, ...) \
DECLARE_SOA_TABLE_STAGED_VERSIONED(_BaseName_, _Desc_, 0, __VA_ARGS__);
Expand Down
9 changes: 9 additions & 0 deletions Framework/Core/include/Framework/AnalysisDataModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ DECLARE_SOA_TABLE_VERSIONED(Collisions_001, "AOD", "COLLISION", 1, //! Time and
collision::Flags, collision::Chi2, collision::NumContrib,
collision::CollisionTime, collision::CollisionTimeRes);

template <aod::is_origin_hash O>
using CollisionsFrom = Collisions_001From<O>;
using Collisions = Collisions_001; // current version
using Collision = Collisions::iterator;

Expand Down Expand Up @@ -671,6 +673,8 @@ DECLARE_SOA_TABLE_VERSIONED(Run2TrackExtras_001, "AOD", "RUN2TRACKEXTRA", 1, //!
track::ITSSignal, track::ITSSharedClusterMap,
track::ITSNSharedCls<track::ITSSharedClusterMap>);

template <aod::is_origin_hash O>
using TracksExtraFrom = TracksExtra_002From<O>;
Comment on lines +676 to +677

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this needed for all tables which use the new feature?
If yes, @aalkin could it be added to the table declaration macro?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The plan is to make this a part of the table declaration macro eventually, however, it would be much more involved, than just adding an alias. I am trying to find a way to avoid having to break the declarations in O2Physics.

using StoredTracksExtra = StoredTracksExtra_002;
using TracksExtra = TracksExtra_002;

Expand Down Expand Up @@ -1918,6 +1922,8 @@ DECLARE_SOA_TABLE_VERSIONED(McCollisions_001, "AOD", "MCCOLLISION", 1, //! MC co
mccollision::GetSubGeneratorId<mccollision::GeneratorsID>,
mccollision::GetSourceId<mccollision::GeneratorsID>);

template <aod::is_origin_hash O>
using McCollisionsFrom = McCollisions_001From<O>;
using McCollisions = McCollisions_001;
using McCollision = McCollisions::iterator;

Expand Down Expand Up @@ -2048,6 +2054,9 @@ DECLARE_SOA_EXTENDED_TABLE(McParticles_001, StoredMcParticles_001, "EXMCPARTICLE
mcparticle::P,
mcparticle::Y);

template <aod::is_origin_hash O>
using McParticlesFrom = McParticles_001From<O>;

using StoredMcParticles = StoredMcParticles_001;
using McParticles = McParticles_001;
using McParticle = McParticles::iterator;
Expand Down
1 change: 0 additions & 1 deletion Framework/TestWorkflows/src/o2TestHistograms.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ using namespace o2::framework::expressions;

namespace o2::aod
{
O2ORIGIN("EMB");
namespace skimmedExampleTrack
{
DECLARE_SOA_COLUMN(Pt, pt, float); //!
Expand Down
1 change: 0 additions & 1 deletion Framework/TestWorkflows/src/o2TestMultisource.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ using namespace o2::framework::expressions;

namespace o2::aod
{
O2ORIGIN("EMB");
using TracksPlus = soa::Join<StoredTracksIU, StoredTracksExtra>;
template <is_aod_hash T>
using TracksPlusFrom = soa::Join<StoredTracksIUFrom<T>, StoredTracksExtra_002From<T>>;
Expand Down
Loading