Patent Number: 
Section: claims

1. An irradiating device comprising:an electron accelerator;a scanning box connected to the electron accelerator; anda scanning magnet for controlling electron beams generated by the electron accelerator;wherein the scanning box is provided with both a target and an electron beam exit window, so that when the scanning magnet is not in operation, the electron beams impinge on the target and X-rays are generated to be output, and when the scanning magnet is in operation, the electron beams are scanned by the scanning magnet and then the scanned electron beams are output via the electron beam exit window. 2. The irradiating device of claim 1 wherein the target is positioned right in a direction of the electron beams generated by the electron accelerator. 3. The irradiating device of claim 2 wherein the electron beam exit window is positioned at a left or right side of the target. 4. The irradiating device of claim 2 wherein the target is positioned at an inner side of the electron beam exit window, forming an inner target structure. 5. The irradiating device of claim 1 wherein the scanning box is further provided with cooling fluid loop for cooling the target and the electron beam exit window. 6. The irradiating device of claim 1 wherein, when the scanning magnet is in operation, a center of the electron beams is deflected with respect to a direction of the electron beams generated by the electron accelerator by controlling a scanning current supplied to the scanning magnet. 7. A method for controlling an irradiating device, which comprises an electron accelerator, a scanning box connected to the electron accelerator, and a scanning magnet for controlling electron beams generated by the electron accelerator, wherein the scanning box is provided with both a target and an electron beam exit window, the method comprising steps of:a) when the scanning magnet is not in operation, the electron beams impinge on the target to generate X-rays, so that the irradiating device outputs the X-rays; andb) when the scanning magnet is in operation, the electron beams are scanned and deflected by supplying deflecting scanning current to the scanning magnet, and then the scanned electron beams pass through the electron beam exit window, so that the irradiating device outputs the electron beams. 8. The irradiating device of claim 1, wherein the electron accelerator is a linear accelerator. 9. The method of claim 7, wherein the electron accelerator is a linear accelerator.