root [ 0 ] TF1 efunc ( "efunc" , "exp ([0]+[1]*x)" , 0 . , 5 . ) ; root [ 1 ] efunc . SetParameter ( 0 , 1 ) ; root [ 2 ] efunc . SetParameter (1 ,-1) ; root [ 3 ] TH1F* h=new TH1F ( "h" , "example histogram" , 1 0 0 , 0 . , 5 . ) ; root [ 4 ] for ( int i=0;i<1000;i++) {h->Fill ( efunc . GetRandom ( ) ) ; } root [ 5 ] h->Draw ( ) ;