CMS 3D CMS Logo

Classes | Functions

edm::typelookup Namespace Reference

Classes

class  NameRegistrar

Functions

template<typename T >
const char * className ()
template<typename T >
const std::type_info & classTypeInfo ()
std::pair< const char *, const
std::type_info * > 
findType (const char *iClassName)

Function Documentation

template<typename T >
const char* edm::typelookup::className ( )

Returns the registered string (usually the class name) for the type T

template<typename T >
const std::type_info& edm::typelookup::classTypeInfo ( )

Returns the std::type_info for the class T. This is done just by calling typeid(T). So why bother? The call to typeid(T) requires one to include the header file which defines class T while the call to classTypeInfo<T>() does not.

std::pair< const char *, const std::type_info * > edm::typelookup::findType ( const char *  iClassName)

Returns a std::type_info and a long lived const char* containing the name associated with the string iClassName. If the string is not associated with a known type then returns two null pointers

Definition at line 51 of file typelookup.cc.

References end.

Referenced by DTDAQInfo::beginLuminosityBlock(), DTDCSByLumiTask::beginRun(), edm::EmptyESSource::delaySettingRecords(), FWLiteESSource::delaySettingRecords(), edm::eventsetup::determinePreferred(), edm::EventSetupRecordDataGetter::doGet(), FWLiteESSource::registerProxies(), and FWLiteESRecordWriterAnalyzer::update().

                                             {

   std::map<const char*, const std::type_info*,StringCompare>::iterator itFind = typeNameToValueMap().find(iTypeName);
   
   if(itFind == typeNameToValueMap().end()) {
      return std::make_pair(static_cast<const char*>(0), static_cast<std::type_info*> (0));
   }
   
   return (*itFind);
}