A man caught on the roof of a gun shop was arrested Thursday morning for attempted burglary and a burglary at another business on May 12, police said.Police responded to a silent alarm at Helms House of Guns at 880 Piner Road around 12:45 a.m. today, Sgt. Lisa Banayat said.Banayat said officers found 18-year-old Devin Dwyer of Santa Rosa on the roof of the building and detained him after he jumped and tried to escape.Detectives recognized Dwyer as the suspect who broke into the Rent-a-Center at 3181 Cleveland Ave. on May 12, Banayat said. Based on a surveillance video from the May 12 burglary, Dwyer was arrested for that burglary. He also was arrested for attempted burglary of the gun shop, Banayat said.The alarm and security systems prevented Dwyer from taking any property from the two businesses, Banayat said.Dwyer had burglary tools and a collapsible police baton when he was arrested, Banayat said. He was booked into the Sonoma County jail for burglary, attempted burglary, possession of a dangerous weapon and possession of burglary tools, Banayat said.Dwyer had been released from the jail pending a court appearance on an unrelated case and he also was arrested today for committing a felony while out of custody on other charges, Banayat said.