Commits

Sebastien Binet  committed 3232da1

expose acerdet.acdnout common block

  • Participants
  • Parent commits 1dc0070

Comments (0)

Files changed (1)

File pkg/acerdet.go

 */
 import "C"
 
-import (
-	"unsafe"
-)
+
+type acdnout int
+// placeholder for
+// INTEGER NINP,NOUT
+// COMMON /ACDNOUT/ NINP,NOUT
+var Acdnout acdnout
+
+func (a *acdnout) SetNinp(n int) {
+	C.acdnout.NINP = C.int(n)
+}
+
+func (a *acdnout) Ninp() int {
+	return int(C.acdnout.NINP)
+}
+
+func (a *acdnout) SetNout(n int) {
+	C.acdnout.NOUT = C.int(n)
+}
+
+func (a *acdnout) Nout() int {
+	return int(C.acdnout.NOUT)
+}
 
 // set the RANNOR seed
 func SetRannorSeed(seed uint) {
 	C.acerdet_finalize()
 }
 
-// setup the acerdet I/O file handles
-func InitIo(ninp int, nout int) {
-	nulptr := (*C.char)(unsafe.Pointer(nil))
-	C.acerdet_init_io(C.int(ninp), nulptr, C.int(nout), nulptr)
-}
-
-// finalize the acerdet I/O file handles
-func FiniIo() {
-	C.acerdet_fini_io()
-}
-
 // call acerdet NTUPLE filling
 // func AcerdetNtup(mode int) {
 // 	C.acerdetntup(C.int(mode))