A trigger system is the first part of a data analysis and it is an essential part of modern detectors. It processes and overviews all events in real time and activates an consecutive data acquisition, when defined criteria are satisfied. Thus the trigger system is critical for an consecutive offline data analysis. This work is focused on implementation and optimization of the trigger system of the TOTEM experiment. An integration of the CMS and TOTEM trigger systems for common physics program is also discussed