The circuit is built around resistor R2, a standard bar magnet, reed switch S2, IC CD4093 (N1 through N4), transistor T1 and some discrete components (refer Fig. 1). NAND gates N1 and N2 are used as an inverter. An oscillator is built around gate N3, resistor R3 and capacitor C2. Gate N4 with resistor R4 and transistor T1 works as a buffer-cum-electromagnetic relay or buzzer driver.
When the door is closed, reed switch S2 is in closed state. When the door is opened, the bar magnet moves away from reed switch S2. As a result, the input to gate N1 is high. The low output (pin 3) of gate N1 makes the output of gate N2 high to enable the oscillator.
The output of the oscillator circuit is fed to piezobuzzer-driver transistor T1. When the door is opened, the piezobuzzer sounds an alarm alerting that someone is entering the swimming pool area.
Optionally, you can use electromagnatic relay RL1 (as shown with dotted line in Fig. 1) to operate a 230V AC mains operated call-bell or hooter. RL1 energises/de-energises at a frequency equal to that of the oscillator.
Assemble the circuit on a general-purpose PCB and enclose in a suitable cabinet. Connect the piezobuzzer at the back side of the cabinet. Install the unit on the swimming pool door as shown in Fig. 2.