I think I have now finally got there.
I am using 2.4 and this is what I did.
Created the file module_calendar\code\CalendarEventExtension.php.
Placed in this file the following code.
class CalendarEventExtension extends DataObjectDecorator {
function returnCalendarEvents(){
.......
return $object_set;
}
}
Added the following line to module_calendar\_config.php
#Object::add_extension('SiteTree', 'CalendarEventExtension');
(Note that this line is commented out)
Ran the following command to build the database
dev/build?flush=all
Uncommented the line in module_calendar\_config.php
Job done!!
On browsing the homepage of my site, calendar events now appear in the calendar area.
Although I may still not be doing things correctly, data now appears to be retrieved using code in my module which is totally segregated from other modules.
Unfortunately it has taken me several weeks to reach this point. On a brighter note this is something which I suspect I will be using a lot (if I have done things correctly) so this may be a very big milestone for me.