-
Notifications
You must be signed in to change notification settings - Fork 499
Add ITS stuck-pixel CCDB object output #15468
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
Open
JaehyeokRyu
wants to merge
1
commit into
AliceO2Group:dev
Choose a base branch
from
JaehyeokRyu:feature/its-stuck-pixels
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+300
−84
Open
Changes from all commits
Commits
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
77 changes: 77 additions & 0 deletions
77
DataFormats/Detectors/ITSMFT/common/include/DataFormatsITSMFT/StuckPixelData.h
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,77 @@ | ||
| // 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 StuckPixelData.h | ||
| /// @brief CCDB-serializable container for stuck (repeating) pixel error records. | ||
| /// | ||
| /// Design rationale | ||
| /// ---------------- | ||
| /// TTree-based storage is intentionally avoided for CCDB objects because TTree | ||
| /// branches hold internal file-pointer state; serialising an in-memory TTree | ||
| /// via CcdbApi::createObjectImage() can silently drop the last unflushed basket. | ||
| /// A plain std::vector<StuckPixelEntry> has no such issue: ROOT's TClass | ||
| /// machinery serialises it correctly via the generated dictionary, exactly as | ||
| /// it does for TimeDeadMap. | ||
|
|
||
| #ifndef ITSMFT_STUCKPIXELDATA_H | ||
| #define ITSMFT_STUCKPIXELDATA_H | ||
|
|
||
| #include <vector> | ||
| #include <cstdint> | ||
| #include <Rtypes.h> // ClassDefNV | ||
|
|
||
| namespace o2 | ||
| { | ||
| namespace itsmft | ||
| { | ||
|
|
||
| /// One stuck-pixel (RepeatingPixel error) record. | ||
| struct StuckPixelEntry { | ||
| Long64_t orbit{0}; ///< first orbit of the TF in which the error was seen | ||
| uint16_t chipID{0}; ///< global chip ID (ITS only) | ||
| uint16_t row{0}; ///< pixel row | ||
| uint16_t col{0}; ///< pixel column | ||
|
|
||
| StuckPixelEntry() = default; | ||
| StuckPixelEntry(Long64_t o, uint16_t c, uint16_t r, uint16_t col_) | ||
| : orbit(o), chipID(c), row(r), col(col_) {} | ||
|
|
||
| ClassDefNV(StuckPixelEntry, 1); | ||
| }; | ||
|
|
||
| /// CCDB payload object: a run-level collection of stuck-pixel records. | ||
| class StuckPixelData | ||
| { | ||
| public: | ||
| StuckPixelData() = default; | ||
| ~StuckPixelData() = default; | ||
|
|
||
| void addEntry(Long64_t orbit, uint16_t chipID, uint16_t row, uint16_t col) | ||
| { | ||
| mEntries.emplace_back(orbit, chipID, row, col); | ||
| } | ||
|
|
||
| void clear() { mEntries.clear(); } | ||
|
|
||
| const std::vector<StuckPixelEntry>& getEntries() const { return mEntries; } | ||
| std::size_t size() const { return mEntries.size(); } | ||
| bool empty() const { return mEntries.empty(); } | ||
|
|
||
| private: | ||
| std::vector<StuckPixelEntry> mEntries; | ||
|
|
||
| ClassDefNV(StuckPixelData, 1); | ||
| }; | ||
|
|
||
| } // namespace itsmft | ||
| } // namespace o2 | ||
|
|
||
| #endif // ITSMFT_STUCKPIXELDATA_H |
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 |
|---|---|---|
|
|
@@ -132,8 +132,19 @@ | |
|
|
||
| // Flag to avoid that endOfStream and stop are both done | ||
| bool isEnded = false; | ||
| <<<<<<< HEAD | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are failed merge remnants to remove. |
||
| ======= | ||
|
|
||
| std::string mStuckPixelFileName = ""; | ||
|
|
||
| TTree* mErrorTree = nullptr; | ||
| Long64_t mErrOrbit = 0; | ||
| UShort_t mErrChipID = 0; | ||
| UShort_t mErrRow = 0; | ||
| UShort_t mErrCol = 0; | ||
| >>>>>>> 5df4d36ff6 (Add ITS stuck-pixel CCDB object output) | ||
| }; | ||
|
|
||
| 6 | ||
| // Create a processor spec | ||
| o2::framework::DataProcessorSpec getITSMFTDeadMapBuilderSpec(std::string datasource, bool doMFT); | ||
|
|
||
|
|
||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One should also add
to DataFormats/Detectors/ITSMFT/common/src/ITSMFTDataFormatsLinkDef.h