#!/usr/bin/python

import Manyo
import PeakData

peak0=PeakData.Peak(PeakData.SHOLDER_I, -2.5,  50000.0,   4.5, -7.5, -2.5);
peak1=PeakData.Peak(PeakData.PEAK     ,  0.0, 100000.0,   2.5, -2.5,  2.5);
peak2=PeakData.Peak(PeakData.SHOLDER_D,  2.5,  50000.0,   4.5,  2.5,  7.5);
PeakData.Peak.title()
peak0.dump()
peak1.dump()
peak2.dump()

pc = PeakData.PeakData()
pc.add(peak0)
pc.add(peak1)
pc.add(peak2)

v = pc.toVector()
print isinstance(v, Manyo.VecDouble)
print v
print "size=", v.size()
for i in range(v.size()):
    print "v[", i, "]=", v[i]
print ""

v = pc.toFullVector()
print "size=", v.size()
for i in range(v.size()):
    print "v[", i, "]=", v[i]
print ""

pc.Dump()

#print "size of short array =", pc.sizeOfArray()
#v = pc.toArray()
#for i in range( pc.sizeOfArray() ):
#    print "v[", i, "]=", v[i]
#print ""

#print "size of gsl short array =", pc.sizeOfGslArray()
#v = pc.toGslVector()
#for i in range( pc.sizeOfGslVector() ):
#    print "v[", i, "]=", v[i]
#print ""

