During the Sònar Festival in Barcelona some hotels host parties in their rooftop bar terraces. Check the festival schedule for further information.
But for a more relaxed time, many of the most famous and emblematic hotels in the city have also rooftop bar terraces open to the public (it is not necessarely to be a guest of the hotel) in which to have a drink while admiring the views. See here some of the most well known.
Video: © mobilee