Help me

So i have a hole in my tooth and i go for surgery the 26th because i have a few teeth that need work on if i have an infection in my teeth would I know? Like it hurts but not all the time just some times how would I know if I had an infection