Skip to content

Conversation

@wdconinc
Copy link
Member

@wdconinc wdconinc commented Oct 6, 2025

This PR removes the virtual inheritance support which was originally introduced to support multiple subsystem types:

classDiagram
    class VQwSubsystem {
        <<abstract>>
        +TString fSystemName
        +ProcessEvent()
        +operator=(VQwSubsystem*)
    }
    
    class VQwSubsystemParity {
        <<abstract>>
        +operator=(VQwSubsystem*) = 0
        +operator+=(VQwSubsystem*) = 0
        +FillDB()
        +Blind()
    }

    class VQwSubsystemTracking {
        <<abstract>>
        +operator=(VQwSubsystem*) = 0
    }

    class VQwDetectorArray {
        <<abstract>>
        +vector<QwIntegrationPMT> fIntegrationPMT
        +vector<QwCombinedPMT> fCombinedPMT
        +operator=(VQwSubsystem*)
        +operator+=(VQwSubsystem*)
    }
    
    class QwDetectorArray {
        +QwDetectorArray(name)
        +using VQwDetectorArray::operator=
    }
    
    class QwBlindDetectorArray {
        +Blind(QwBlinder*)
        +using VQwDetectorArray::operator=
    }

    class QwScanner {
        +QwScanner(name)
        +operator=(VQwSubsystem*)
        +operator+=(VQwSubsystem*)
        +FillDB()
        +Blind()
    }

    %% Virtual inheritance relationships
    VQwSubsystem <|-- VQwSubsystemParity : "virtual inheritance"
    VQwSubsystem <|-- VQwSubsystemTracking : "virtual inheritance"
    VQwSubsystemParity <|-- VQwDetectorArray : "virtual inheritance"
    
    %% Regular inheritance
    VQwDetectorArray <|-- QwDetectorArray : "public inheritance"
    QwDetectorArray <|-- QwBlindDetectorArray : "public inheritance"

    %% Show the diamond pattern being avoided
    VQwSubsystemParity <|-- QwDetectorArray : "virtual public (redundant)"
    VQwSubsystemParity <|-- QwBlindDetectorArray : "virtual public (redundant)"

    %% Show the diamond pattern being avoided
    VQwSubsystemParity <|-- QwScanner : "virtual public (redundant)"
    VQwSubsystemTracking <|-- QwScanner : "virtual public (redundant)"

    note for VQwSubsystemParity "Uses virtual inheritance\nto avoid diamond problem"
    note for QwDetectorArray "Uses 'using' declarations\nto expose base operators"
    note for VQwSubsystemTracking "Already removed"
    note for QwScanner "Already removed"
Loading

Since we don't aim to support VQwSubsystemTracking anymore, we can get rid of the virtual inheritance entirely.

@wdconinc wdconinc marked this pull request as draft October 6, 2025 18:00
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.

1 participant