CMS 3D CMS Logo

Namespaces | Classes | Functions
edmplugin Namespace Reference

Namespaces

 standard
 

Classes

class  CacheParser
 
class  PluginCapabilities
 
class  PluginFactory
 
class  PluginFactory< R *(Args...)>
 
class  PluginFactoryBase
 
class  PluginFactoryManager
 
struct  PluginInfo
 
class  PluginManager
 
struct  PluginManagerPathHasher
 
class  SharedLibrary
 

Functions

static void checkForError (const std::istream &iIn, unsigned long iRecordNumber, const std::string &iContext)
 
static bool readCacheFile (const std::filesystem::path &cacheFile, const std::filesystem::path &dir, PluginManager::CategoryToInfos &categoryToInfos)
 

Detailed Description

A plugin factory for pede labelers

Original author: Andreas Mussgiller, January 2011

Date
2010/09/10 10:26:20
Revision
1.1

(last update by

Author
mussgill

)

Function Documentation

◆ checkForError()

static void edmplugin::checkForError ( const std::istream &  iIn,
unsigned long  iRecordNumber,
const std::string &  iContext 
)
static

Definition at line 71 of file CacheParser.cc.

References Exception.

Referenced by edmplugin::CacheParser::readline().

71  {
72  if (iIn.eof()) {
73  throw cms::Exception("PluginCacheParseFailed")
74  << "Unexpectedly reached end of file for line " << iRecordNumber << " just after '" << iContext << "'";
75  }
76  if (iIn.bad()) {
77  throw cms::Exception("PluginCacheParseFailed")
78  << "Reading failed on line " << iRecordNumber << " just after '" << iContext << "'";
79  }
80  }

◆ readCacheFile()

static bool edmplugin::readCacheFile ( const std::filesystem::path &  cacheFile,
const std::filesystem::path &  dir,
PluginManager::CategoryToInfos categoryToInfos 
)
static

Definition at line 43 of file PluginManager.cc.

References DeadROC_duringRun::dir, Exception, geometryDiff::file, and edmplugin::CacheParser::read().

Referenced by edmplugin::PluginManager::PluginManager().

45  {
46  if (exists(cacheFile)) {
47  std::ifstream file(cacheFile.string().c_str());
48  if (not file) {
49  throw cms::Exception("PluginMangerCacheProblem")
50  << "Unable to open the cache file '" << cacheFile.string() << "'. Please check permissions on file";
51  }
53  CacheParser::read(file, dir, categoryToInfos);
54  return true;
55  }
56  return false;
57  }