-
Notifications
You must be signed in to change notification settings - Fork 614
[PWGUD] Added RCT flags to UD tables #11714
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
1d77b95
Added predefined RCT selectors
amatyja 9484336
Fixed formatting
amatyja 4e9df85
Fixed formating
amatyja 8d52411
Formatting + linter changes
amatyja cf6df0f
Clang format for SGSelector
amatyja 4269a61
Add makefile for converter
amatyja a86cc9f
executables in lowercase
amatyja 60ae872
Change name and type of column for rct flag
amatyja 9e13d85
O2linter fixes, new TrueGap enumerator
amatyja 9c1e231
Namespace fix (rctsel)
amatyja cf1b2f9
Removed unnecessary line
amatyja File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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
126 changes: 126 additions & 0 deletions
126
PWGUD/TableProducer/Converters/UDCollisionSelExtrasV003Converter.cxx
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,126 @@ | ||
| // Copyright 2019-2020 CERN and copyright holders of ALICE O2. | ||
| // See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. | ||
| // All rights not expressly granted are reserved. | ||
| // | ||
| // This software is distributed under the terms of the GNU General Public | ||
| // License v3 (GPL Version 3), copied verbatim in the file "COPYING". | ||
| // | ||
| // 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 UDCollisionSelExtrasV003Converter.cxx | ||
| /// \brief Converts UDCollisionSelExtras table from version 000 to 003 and 001 to 003 and 002 to 003 | ||
| /// \author Adam Matyja <adam.tomasz.matyja@cern.ch> | ||
|
|
||
| #include "PWGUD/DataModel/UDTables.h" | ||
|
|
||
| #include "Framework/AnalysisDataModel.h" | ||
| #include "Framework/AnalysisTask.h" | ||
| #include "Framework/runDataProcessing.h" | ||
|
|
||
| using namespace o2; | ||
| using namespace o2::framework; | ||
|
|
||
| // Converts UDCollisions for version 000 to 003 and 001 to 003 and 002 to 003 | ||
| struct UDCollisionSelExtrasV003Converter { | ||
| Produces<o2::aod::UDCollisionSelExtras_003> udCollisionSelExtras_003; | ||
|
|
||
| void init(InitContext const&) | ||
| { | ||
| if (!doprocessV000ToV003 && !doprocessV001ToV003 && !doprocessV002ToV003) { | ||
| LOGF(fatal, "Neither processV000ToV003 nor processV001ToV003 nor processV002ToV003 is enabled. Please choose one!"); | ||
| } | ||
| if (static_cast<int>(doprocessV000ToV003) + static_cast<int>(doprocessV001ToV003) + static_cast<int>(doprocessV002ToV003) > 1) { | ||
| LOGF(fatal, "More than one among processV000ToV003, processV001ToV003, processV002ToV003 is enabled. Please choose only one!"); | ||
| } | ||
| } | ||
|
|
||
| void processV000ToV003(o2::aod::UDCollisionSelExtras_000 const& collisions) | ||
| { | ||
|
|
||
| for (const auto& collision : collisions) { | ||
|
|
||
| udCollisionSelExtras_003(collision.chFT0A(), | ||
| collision.chFT0C(), | ||
| collision.chFDDA(), | ||
| collision.chFDDC(), | ||
| collision.chFV0A(), | ||
| 0, // dummy occupancy | ||
| 0.0f, // dummy rate | ||
| 0, // dummy trs | ||
| 0, // dummy trofs | ||
| 0, // dummy hmpr | ||
| 0, // dummy tfb | ||
| 0, // dummy itsROFb | ||
| 0, // dummy sbp | ||
| 0, // dummy zVtxFT0vPV | ||
| 0, // dummy vtxITSTPC | ||
| 0); // dummy rct | ||
| } | ||
| } | ||
| PROCESS_SWITCH(UDCollisionSelExtrasV003Converter, processV000ToV003, "process v000-to-v003 conversion", false); | ||
|
|
||
| void processV001ToV003(o2::aod::UDCollisionSelExtras_001 const& collisions) | ||
| { | ||
|
|
||
| for (const auto& collision : collisions) { | ||
|
|
||
| udCollisionSelExtras_003(collision.chFT0A(), | ||
| collision.chFT0C(), | ||
| collision.chFDDA(), | ||
| collision.chFDDC(), | ||
| collision.chFV0A(), | ||
| collision.occupancyInTime(), | ||
| collision.hadronicRate(), | ||
| collision.trs(), | ||
| collision.trofs(), | ||
| collision.hmpr(), | ||
| 0, // dummy tfb | ||
| 0, // dummy itsROFb | ||
| 0, // dummy sbp | ||
| 0, // dummy zVtxFT0vPV | ||
| 0, // dummy vtxITSTPC | ||
| 0); // dummy rct | ||
| } | ||
| } | ||
| PROCESS_SWITCH(UDCollisionSelExtrasV003Converter, processV001ToV003, "process v001-to-v003 conversion", false); | ||
|
|
||
| void processV002ToV003(o2::aod::UDCollisionSelExtras_002 const& collisions) | ||
| { | ||
|
|
||
| for (const auto& collision : collisions) { | ||
|
|
||
| udCollisionSelExtras_003(collision.chFT0A(), | ||
| collision.chFT0C(), | ||
| collision.chFDDA(), | ||
| collision.chFDDC(), | ||
| collision.chFV0A(), | ||
| collision.occupancyInTime(), | ||
| collision.hadronicRate(), | ||
| collision.trs(), | ||
| collision.trofs(), | ||
| collision.hmpr(), | ||
| collision.tfb(), | ||
| collision.itsROFb(), | ||
| collision.sbp(), | ||
| collision.zVtxFT0vPV(), | ||
| collision.vtxITSTPC(), | ||
| 0); // dummy rct | ||
| } | ||
| } | ||
| PROCESS_SWITCH(UDCollisionSelExtrasV003Converter, processV002ToV003, "process v002-to-v003 conversion", true); | ||
| }; | ||
|
|
||
| /// Spawn the extended table for UDCollisionSelExtras003 to avoid the call to the internal spawner and a consequent circular dependency | ||
| // struct UDCollisionSelExtrasSpawner { | ||
| // Spawns<aod::UDCollisionSelExtras_003> udCollisionSelExtras_003; | ||
| // }; | ||
|
|
||
| WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) | ||
| { | ||
| return WorkflowSpec{ | ||
| adaptAnalysisTask<UDCollisionSelExtrasV003Converter>(cfgc), | ||
| // adaptAnalysisTask<UDCollisionSelExtrasSpawner>(cfgc), | ||
| }; | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.