Skip to content
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

Updated overlay classes to accomodate the new link subsystem ids #46

Merged
merged 6 commits into from
Feb 5, 2025

Conversation

giro94
Copy link
Contributor

@giro94 giro94 commented Jan 29, 2025

Subevent header now has:

	uint64_t link0_subsystem : 3;
	uint64_t link1_subsystem : 3;
	uint64_t link2_subsystem : 3;
	uint64_t link3_subsystem : 3;
	uint64_t link4_subsystem : 3;
	uint64_t link5_subsystem : 3;
	uint64_t reserved2 : 14;

instead of the previous:

	uint64_t source_subsystem : 3;
	uint64_t reserved2 : 29;

Function
std::vector<DTC_SubEvent> DTC_Event::GetSubsystemData(DTC_Subsystem subsys)
has same behavior and returns all subevents with at least 1 subsys ROC

New function
std::vector<DTC_DataBlock> DTC_Event::GetSubsystemBlocks(DTC_Subsystem subsys)
directly returns the subsys datablocks.

Function
DTC_Subsystem DTC_SubEvent::GetSubsystem(uint link = 0)
is bacward compatible

Function
void DTC_SubEvent::SetSourceDTC(uint8_t id, DTC_Subsystem subsystem = DTC_Subsystem_Other)
is backward compatible but is deprecated and should be changed/removed.
A quick search finds these modules using this function:

  • Offline/DAQ/src/ArtBinaryPacketsFromDigis_module.cc
  • mu2e-pcie-utils/dtcInterfaceLib/mu2esim.cpp

There is currently NO consistency check between the SubEventHeader link*_subsystem and the DataBlock header GetSubsystemID()

@giro94
Copy link
Contributor Author

giro94 commented Jan 31, 2025

Update:

Function
void DTC_SubEvent::SetSourceDTC(uint8_t id, DTC_Subsystem subsystem = DTC_Subsystem_Other)
is now fully backward compatible.

@giro94 giro94 requested a review from eflumerf February 5, 2025 18:20
@eflumerf eflumerf merged commit a91723a into develop Feb 5, 2025
4 of 7 checks passed
@eflumerf eflumerf deleted the pgirotti/DTC_subsystemID branch February 5, 2025 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants