Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • Corryvreckan Corryvreckan
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 39
    • Issues 39
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Issue
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • CorryvreckanCorryvreckan
  • CorryvreckanCorryvreckan
  • Issues
  • #55
Closed
Open
Issue created Apr 08, 2019 by Jens Kroeger@jekroegeOwner

FIXME: Sorting of data types in [EventLoaderEUDAQ2], follow-up of !98

Jens:

// FIXME get TLU events with trigger IDs before Ni - sort by name, reversed
sort(events_.begin(), events_.end(), [](const eudaq::EventSPC& a, const eudaq::EventSPC& b) -> bool {
  return a->GetDescription() > b->GetDescription();
});

If I understand this code block correctly, it sorts the (sub-)events by name in reverse alphabetical order (z->a), right? So it's fine for now because TluRawDataEvent ends up before NiRawDataEvent. But once we introduce another detector with data like ZdetRawDataEvent it'll fail.

So what if we introduced another parameter in the config file like

data_type_order = ["TluRawDataEvent","NiRawDataEvent"]

and then we sort according to the position of the names in the list?

Simon: If you implement this, please take care of all corner cases (some data type not specified, the data type specified does not exist) and also keep the performance of the algorithm in mind. Especially string comparisons are very heavy. Make sure to document the behavior of this properly.

Assignee
Assign to
Time tracking