For Jim Daly: There may be a connection here although somewhat misty.
My gggrandfather was Cain Mahoney born c. July 30 1812 in Couty Cork, possibly Carrigaline where he was married on Oct 28, 1835. He and his wife, Margaret Sullivan had several children namely Mary Ann (my ggrandmother) born in Carrigaline Mar 25, 1841, Daniel born presumably there on April 6 1848. There were others with birth places unknown:
Anne born Aug 28 1836 - place unknown, Ellen born July 3,1838, Michael born Oct 11, 1842, Julia born c. April 29, 1846, Margaret born c. July 13 1844.
If there is a connection it could be that the original Cain (my gggrandfather as above) had a brother named Daniel who could have been born in the time frame you mentioned. Again I'm speculating but that could account for Cain naming his first born son Daniel after both his father named Daniel and his brother which seemed to have been traditional in Irish families of that vintage. Unfortunately I have no info on all the other children of Cain and Margaret Mahoney although I assume that their descendants probably began their adult lives in and around the Boston area, perhaps close to where their parents lived and possibly Waltham where Cain and Margaret are buried in Old Calvary Cemetery.
As an additional matter of interest, during a trip to Boston I was exploring St. Mary's Cemetery aka "Old Dorchester' in Dorchester, Ma a few months ago where more of my ancestors are buried and was startled to encounter an old gravestone very near the front entrance that could be read through the fence. It said:
COL 4 Mas Cav
Died May 2 1880
Age 60 yrs
In later research I could not find any Colonel by that name who served with the 4th Massachusetts Cavalry in the Civil War although I did not have a chance to research all the sources. Obviously there was a Colonel Cain Mahoney. But where he fits in I just don't know. It is one of those things for which I have yet to find a definitive answer. It's complicated because the name Cain was a common one among Mahoneys. If I can have your email I can send you a photo of the gravestone. email@example.com