Skip to content

ZDC-like Digits and RecPoints structure#2926

Merged
shahor02 merged 14 commits intoAliceO2Group:devfrom
AllaMaevskaya:bcdata1
Feb 22, 2020
Merged

ZDC-like Digits and RecPoints structure#2926
shahor02 merged 14 commits intoAliceO2Group:devfrom
AllaMaevskaya:bcdata1

Conversation

@AllaMaevskaya
Copy link
Contributor

No description provided.

@AllaMaevskaya AllaMaevskaya force-pushed the bcdata1 branch 8 times, most recently from 97fb669 to 5ead715 Compare February 11, 2020 06:50
Copy link
Collaborator

Choose a reason for hiding this comment

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

including iostream in headers should be avoided. Why do you need it?

Copy link
Collaborator

Choose a reason for hiding this comment

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

please remove comment

Copy link
Collaborator

Choose a reason for hiding this comment

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

please remove comment

Copy link
Collaborator

Choose a reason for hiding this comment

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

please remove comment

Copy link
Collaborator

Choose a reason for hiding this comment

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

could you add a sentence of what is "Temp" here? Is it some intermediate format?

Copy link
Collaborator

Choose a reason for hiding this comment

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

please remove comment if this is no longer needed

@sawenzel
Copy link
Collaborator

@MichaelLettrich : MacOS tells:

-- The Fortran compiler identification is unknown
CMake Error at CMakeLists.txt:4 (Enable_Language):
  No CMAKE_Fortran_COMPILER could be found.

  Tell CMake where to find the compiler by setting either the environment
  variable "FC" or the CMake cache entry CMAKE_Fortran_COMPILER to the full
  path to the compiler, or to the compiler name if it is in the PATH.

Is this a new problem?

@sawenzel
Copy link
Collaborator

@AllaMaevskaya : Thanks for this comprehensive PR. Could you just please provide a description of what it achieves? Is this implementing pileup/embedding?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@AllaMaevskaya Could you please remind the range of these data members? Do you really need 4 ints?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

DetID - 0-208
CFDTime is 12 bits of RawData
QTCAmpl - 13 bit
ChainQTC can be 1 or 0

You suggest to use RawEventData uint64_t word to keep it in Digits?

Copy link
Collaborator

Choose a reason for hiding this comment

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

You can simply use

uint8_t ChanID
int8_t ChainQTC
int16_t CFDTime
int16_t QTCAmpl

will take the same 8 bytes (instead of current 16) and w/o bit operations.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done, thank you

Copy link
Collaborator

Choose a reason for hiding this comment

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

Do you really need doubles here (and again, what is the range of int members?) Anyway, if the types cannot be changed, please move ChainQTC right after the ChId, this will save 8 B in the sizeof(ChannelDataFloat)

Copy link
Collaborator

Choose a reason for hiding this comment

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

could you please define in the Geometry the inverse of MV_2_Nchannels and multiply by it?

Copy link
Collaborator

Choose a reason for hiding this comment

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

idem, if possible, multiply by precalculated inverse instead of dividing.

Copy link
Collaborator

Choose a reason for hiding this comment

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

here too, if possible, multiply by precalculated inverse instead of dividing.

Copy link
Collaborator

Choose a reason for hiding this comment

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

here too

Copy link
Collaborator

Choose a reason for hiding this comment

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

why are you getting a vector here and not a span?

Copy link
Collaborator

Choose a reason for hiding this comment

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

This question was not answered

Copy link
Collaborator

Choose a reason for hiding this comment

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

@AllaMaevskaya , did you miss this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, I really misread question.
Digits are structure with event-wise data like BC, orbit and triggers and span of ChannelData, similar to ZDC as you requested. This Digits are collected in vector event-by-event. What is wrong?

Copy link
Collaborator

Choose a reason for hiding this comment

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

When you do pc.inputs().get<const std::vector... you create a local copy of the framework-owned data. This is a waste of the memory and CPU resources. Instead on can use span, which is essentially a pointer on these data. But using the span requires that elements of this span (Digits in your case) are copiable (do not contain pointers, vectors etc). So, the whole point of these ZDC-like structures was to make T0 objects copiable and use spans instead of the vectors. Just change auto digits = pc.inputs().get<const std::vector<o2::ft0::Digit>>("digits"); to
auto digits = pc.inputs().get<gsl::span<o2::ft0::Digit>>("digits");

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@shahor02
Copy link
Collaborator

@sawenzel the bulk of this PR is getting rid of the std::vectors in the digits and recpoints (e.g. to avoid root seralization at messaging).

@AllaMaevskaya
Copy link
Contributor Author

Here is detail description of what is in PR:

  • embedding is implemented, pile-up not;
  • TCM (trigger module) data v0 (v1 is comming) added in raw data;
  • FT0 Digits and RecPoints are vectors with each element is event (BC/Orbit) related information as triggers and reconstructed collision time and vertex, and time and amplitude signals in fired channels written as a span.

@AllaMaevskaya AllaMaevskaya force-pushed the bcdata1 branch 3 times, most recently from fcd0aaf to 22206d8 Compare February 12, 2020 08:49
@AllaMaevskaya
Copy link
Contributor Author

Sorry , I found bug. Please wait until tomorrow.
Can you tell me: ROOT can not treat structure union correctly, yes?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@AllaMaevskaya by initializing the uint8_t wih -1 you are assigning to 256. Is this what you want?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no, I fixed it now

Copy link
Collaborator

Choose a reason for hiding this comment

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

But you wrote before that the chanID goes from 0 to 208, with in8_t you cannot cover this range. If you want to initialize with the value which is outside of the allowed range, use uin8_t and init with 0xff

@AllaMaevskaya AllaMaevskaya force-pushed the bcdata1 branch 2 times, most recently from 9e642ba to 351ebf8 Compare February 15, 2020 15:54
@shahor02
Copy link
Collaborator

@AllaMaevskaya could you please apply clang-format ?

@AllaMaevskaya AllaMaevskaya force-pushed the bcdata1 branch 2 times, most recently from 465285f to afbf331 Compare February 18, 2020 16:02
@AllaMaevskaya
Copy link
Contributor Author

Hello

in the morning all test were green, now 2 of them are red and logs are not visible. What should I do?

@shahor02
Copy link
Collaborator

shahor02 commented Feb 20, 2020 via email

@ktf
Copy link
Member

ktf commented Feb 21, 2020

@shahor02 Everything is back to green here. Squash and merge?

@shahor02 shahor02 merged commit 92ad52b into AliceO2Group:dev Feb 22, 2020
@AllaMaevskaya AllaMaevskaya deleted the bcdata1 branch March 9, 2020 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants