forked from AliceO2Group/O2Physics
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Common] Uniform tracks extra converter to the coding conventions (Al…
…iceO2Group#3671) * [Common] Uniform tracks extra converter to the coding conventions * Add doxygen documentation + capitalize tasks
- Loading branch information
Showing
2 changed files
with
19 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,22 +8,30 @@ | |
// In applying this license CERN does not waive the privileges and immunities | ||
// granted to it by virtue of its status as an Intergovernmental Organization | ||
// or submit itself to any jurisdiction. | ||
|
||
/// \file tracksExtraConverter.cxx | ||
/// \brief Converts TracksExtra table from version 000 to 001 | ||
|
||
/// This task allows for the conversion of the TracksExtra table from version 000 to 001. | ||
/// The conversion is needed because the table has been extended with the ITSClusterSize column | ||
/// and the ITSClusterMap column is evaluated dynamically from it. | ||
/// In the converter a dummy ITSClusterSize column is filled with overflows if a hit in the layer is present | ||
|
||
/// \author F.Mazzaschi <[email protected]> | ||
|
||
#include "Framework/runDataProcessing.h" | ||
#include "Framework/AnalysisTask.h" | ||
#include "Framework/AnalysisDataModel.h" | ||
|
||
using namespace o2; | ||
using namespace o2::framework; | ||
|
||
// Converts TracksExtra table from version 000 to 001 | ||
struct tracksextraConverter { | ||
struct TracksExtraConverter { | ||
Produces<aod::StoredTracksExtra_001> tracksExtra_001; | ||
void process(aod::TracksExtra_000 const& tracksExtra_000) | ||
{ | ||
|
||
// dummy itsClusterSizes, fill with overflows if a hit in the layer is present | ||
|
||
for (auto& track0 : tracksExtra_000) { | ||
for (const auto& track0 : tracksExtra_000) { | ||
|
||
uint32_t itsClusterSizes = 0; | ||
for (int layer = 0; layer < 7; layer++) { | ||
|
@@ -56,15 +64,15 @@ struct tracksextraConverter { | |
} | ||
}; | ||
|
||
struct trackExtraSpawner { | ||
// spawn the extended table for TracksExtra001 to avoid the call to the internal spawner and the circular dependency | ||
/// Spawn the extended table for TracksExtra001 to avoid the call to the internal spawner and a consequent circular dependency | ||
struct TracksExtraSpawner { | ||
Spawns<aod::TracksExtra_001> tracksExtra_001; | ||
}; | ||
|
||
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) | ||
{ | ||
return WorkflowSpec{ | ||
adaptAnalysisTask<tracksextraConverter>(cfgc), | ||
adaptAnalysisTask<trackExtraSpawner>(cfgc), | ||
adaptAnalysisTask<TracksExtraConverter>(cfgc), | ||
adaptAnalysisTask<TracksExtraSpawner>(cfgc), | ||
}; | ||
} |