	function fff()
c
c	calcolo T*G*DEM                
	dimension y2(100),fi(100),pr(100),pr1(100)
	common/tt/ain0,ddt,mmt,att(100)
	common/spettro/al(100),asp(100,200),at(200)
	common/pinco/xxa(100,100),yya(100,100),nt(100)
	common/caio/yfi(100,100)
	common/line1/line,kkt
	common/cfff/nnodi,hcf(100),xt(100)
	common/ngauss/ngauss
	external func_t
	ain=ain0
	segnale=0
	nnn=nt(line)
	ain=xxa(2,line)
	afin=xxa(nnn-1,line)
c	ain=xxa(1,line)
c	afin=xxa(nnn,line)
c	write(41,*)'xt= ',(xt(i),i=1,nnodi)
	do jt=1,nnn
	yfi(jt,line)=0.
	xb=xxa(jt,line)
c	if(xb.gt.xt(nnodi))go to 10
	call spline(xt,hcf,nnodi,2.e30,2.e30,y2)
	call splint(xt,hcf,y2,nnodi,xb,fy)
c
c	log [G(T)*f(T)]
c
	fi(jt)=fy
	yfi(jt,line)=yya(jt,line)+fy
	pr(jt)=yya(jt,line)
	pr1(jt)=yfi(jt,line)
c	write(41,*)xb,jt,fy,pr(jt),pr1(jt)
c	write(*,*)xb,jt,fy,pr(jt),pr1(jt)
	end do
10	aain=10.**ain
	aafin=10.**afin
c	kpassi=40
c	call integra(func,aain,aafin,segnale,kpassi)
c	go to 541
	deltat=(afin-ain)/ngauss
	t1=ain
	do n=1,ngauss
	t2=t1+deltat
	aain=10.**t1
	aafin=10.**t2
	call qgaus(func_t,aain,aafin,ss)
	segnale=segnale+ss

c        write(36,*)t1,t2,ss,segnale,al(line)

	t1=t2
	end do
541	fff=segnale
	return
	end
