Assuming you're using plain signal ports, you can use the event member function to check, whether a specific port has been triggered in the current delta cycle:

Notes:
line5:  if i try to use 	//sensitive << port_vec[i].post(); instead it doesnt work.