[SUS-2896] Collapse feature
Jira Ticket: https://its.cern.ch/jira/browse/SUS-2896
User Need: LGC input files for future LHC calculations are very large. Information is not directly used by the user but remains necessary for the calculations. A "collapse" feature is required to automatically group and hide lines that are not relevant for the file analysis.
Implementation:
Two points to consider:
If the collapse region begins (%%*...) and end (... *%%) within the scope of another collapse region (for e. INSTR), a new collapse region is created and everything else works as usual.
- Eg.
*CALA
PT1 0 0 0
%%*
PT2 0 0 0
PT3 0 0 0
*%%
PT4 0 0 0
If the collapse region begins (%%*...) and there is a conflicting beginning of another collapse region (say FRAME for eg.) in such a manner that the ends are not proper, the keyword %%* will always have higher priority and other collapse regions until the end *%% will be suppressed.
*CALA
PT1 0 0 0
PT2 0 0 0
PT3 0 0 0
%%*
PT4 0 0 0
*INCLY I1 ----> this is no longer collapsible
PT1 1.0 AC 0.5 RF 0.3 ACSE 1 RFSE 2 OBSE 4 PPM 3 ID TEST1
PT2 1.0 AC 0.6 RF 0.4 ACSE 2 RFSE 3 OBSE 5 PPM 4 ID TEST2
PT3 1.0 ID TEST3
PT4 1.0 INSTR I1 ID TEST4
PT1 1.0 AC 0.5 RF 0.3 ACSE 1 RFSE 2 OBSE 4 PPM 3
PT2 1.0 AC 0.6 RF 0.4 ACSE 2 RFSE 3 OBSE 5 PPM 4
PT3 1.0
*%%
PT4 1.0 INSTR I2