Hall algebras associated to triangulated categories