Out-of-tree-module

Hey everyone,

I am new to gr-modtool, and I want to use it to construct a general
block.

The function of the block is to take a vector of length N as its input,
and apply summation to the elements of that vector.
The output should be the summation result of these elements.

My question is, how to define input as a vector of length N (N is
defined by user) ??

Any help will be appreciated.
Thanks in advance.