{
    "EventConfig": {
        "enabled": true,
        "id": "{16c2407f-f0bd-4cee-866a-27c266f55186}",
        "irqLevel": 2,
        "irqVector": 0,
        "modules": [
        ],
        "name": "start_event",
        "scalerReadoutFrequency": 0,
        "scalerReadoutPeriod": 2,
        "triggerCondition": "MVLC Trigger I/O",
        "triggerOptions": {
            "IRQUseIACK": false,
            "mvlc.timer_base": "ms",
            "mvlc.timer_period": 1000,
            "sis3153.timer_period": 1
        },
        "variable_table": {
            "name": "",
            "variables": {
                "mesy_eoe_marker": {
                    "comment": "EndOfEvent marker for mesytec modules (0: eventcounter, 1: timestamp, 3: extended_timestamp).",
                    "definitionLocation": "",
                    "value": "1"
                },
                "mesy_mcst": {
                    "comment": "The most significant byte of the 32-bit multicast address to be used by this event.",
                    "definitionLocation": "",
                    "value": "bb"
                },
                "mesy_readout_num_events": {
                    "comment": "Number of events to read out in each cycle.",
                    "definitionLocation": "",
                    "value": "1"
                },
                "sys_irq": {
                    "comment": "IRQ value set for the VME Controller for this event.",
                    "definitionLocation": "",
                    "value": "0"
                }
            }
        },
        "vme_scripts": {
            "daq_start": {
                "enabled": true,
                "id": "{dce3e149-6293-4a99-9638-0f49ee2523ee}",
                "name": "DAQ Start",
                "properties": {
                    "icon": ":/vme_script.png"
                },
                "variable_table": {
                    "name": "",
                    "variables": {
                    }
                },
                "vme_script": "# Activates soft trigger unit 0. In multicrate setups this is used to create MasterTrigger0\n# which in turn create SlaveTriggers on all connected MVLCs. The SlaveTrigger is then used to\n# execute the \"start_event\" command stack.\n\nsetbase 0xffff0000      # use the mvlc vme interface as the base address for the following writes\n\nset trigger_index 0                         # valid values: 0-7 (trigger_resource units)\n\nset trigger_unit $(4 + ${trigger_index})    # Level0 Units 4-11\n0x0200 ${trigger_unit}                      # select the unit\n0x0302 1                                    # write to the soft_trigger output activation register"
            },
            "daq_stop": {
                "enabled": true,
                "id": "{8f456811-6478-4cec-92dc-c4629d9e3a03}",
                "name": "DAQ Stop",
                "properties": {
                    "icon": ":/vme_script.png"
                },
                "variable_table": {
                    "name": "",
                    "variables": {
                    }
                },
                "vme_script": "# Activates soft trigger unit 1. In multicrate setups this is used to create MasterTrigger1\n# which in turn create SlaveTriggers on all connected MVLCs. The SlaveTrigger is then used to\n# execute the \"stop_event\" command stack.\n\nsetbase 0xffff0000      # use the mvlc vme interface as the base address for the following writes\n\nset trigger_index 1                         # valid values: 0-7 (trigger_resource units)\n\nset trigger_unit $(4 + ${trigger_index})    # Level0 Units 4-11\n0x0200 ${trigger_unit}                      # select the unit\n0x0302 1                                    # write to the soft_trigger output activation register"
            },
            "readout_end": {
                "enabled": true,
                "id": "{c3035249-cfab-4370-a2b8-80a82eb3172f}",
                "name": "Cycle End",
                "properties": {
                    "icon": ":/vme_script.png"
                },
                "variable_table": {
                    "name": "",
                    "variables": {
                    }
                },
                "vme_script": ""
            },
            "readout_start": {
                "enabled": true,
                "id": "{54853325-a9fe-42dd-9b97-e46ffc6d0c78}",
                "name": "Cycle Start",
                "properties": {
                    "icon": ":/vme_script.png"
                },
                "variable_table": {
                    "name": "",
                    "variables": {
                    }
                },
                "vme_script": "# Start the acquisition sequence for all modules via the events multicast address.\n# In multicrate setups this is uploaded to the MVLC and executed in response to a\n# slave trigger signal.\nwriteabs a32 d16 0x${mesy_mcst}00603a      0   # stop acq\nwriteabs a32 d16 0x${mesy_mcst}006090      3   # reset CTRA and CTRB\nwriteabs a32 d16 0x${mesy_mcst}00603c      1   # FIFO reset\nwriteabs a32 d16 0x${mesy_mcst}00603a      1   # start acq\nwriteabs a32 d16 0x${mesy_mcst}006034      1   # readout reset"
            }
        }
    }
}
