Load this package before \documentclass:
\RequirePackage{classlist}
\documentclass[some,options]{whatever}
After doing this, \MainClass contains the name of the first loaded class, \ClassList contains a set of triples <class name>, <options directly requested>, and <version requested>. (The package may also be loaded after \documentclass, in which case some information is not available.)
The package is part of the oberdiek bundle.
The author is Heiko Oberdiek. The package is Copyright © 2005,2006,2008,2011 Heiko Oberdiek.
License: lppl1.3 Version: 1.4 Catalogued: 2013-09-30