CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes
StorageFactory Class Reference

#include <StorageFactory.h>

Public Types

enum  CacheHint { CACHE_HINT_APPLICATION, CACHE_HINT_STORAGE, CACHE_HINT_LAZY_DOWNLOAD, CACHE_HINT_AUTO_DETECT }
 
enum  ReadHint { READ_HINT_UNBUFFERED, READ_HINT_READAHEAD, READ_HINT_AUTO }
 

Public Member Functions

bool accounting (void) const
 
CacheHint cacheHint (void) const
 
bool check (const std::string &url, IOOffset *size=0) const
 
unsigned int debugLevel (void) const
 
bool enableAccounting (bool enabled)
 
std::unique_ptr< Storageopen (const std::string &url, int mode=IOFlags::OpenRead) const
 
ReadHint readHint (void) const
 
void setCacheHint (CacheHint value)
 
void setDebugLevel (unsigned int level)
 
void setReadHint (ReadHint value)
 
void setTempDir (const std::string &s, double minFreeSpace)
 
void setTimeout (unsigned int timeout)
 
void stagein (const std::string &url) const
 
std::string tempDir (void) const
 
double tempMinFree (void) const
 
std::string tempPath (void) const
 
unsigned int timeout (void) const
 
std::unique_ptr< StoragewrapNonLocalFile (std::unique_ptr< Storage > s, const std::string &proto, const std::string &path, int mode) const
 
 ~StorageFactory (void)
 

Static Public Member Functions

static const StorageFactoryget (void)
 
static StorageFactorygetToModify (void)
 

Private Types

typedef
tbb::concurrent_unordered_map
< std::string, std::shared_ptr
< StorageMaker > > 
MakerTable
 

Private Member Functions

StorageMakergetMaker (const std::string &proto) const
 
StorageMakergetMaker (const std::string &url, std::string &protocol, std::string &rest) const
 
 StorageFactory (void)
 

Private Attributes

bool m_accounting
 
CacheHint m_cacheHint
 
unsigned int m_debugLevel
 
LocalFileSystem m_lfs
 
MakerTable m_makers
 
ReadHint m_readHint
 
std::string m_tempdir
 
double m_tempfree
 
std::string m_temppath
 
unsigned int m_timeout
 
std::string m_unusableDirWarnings
 

Static Private Attributes

static StorageFactory s_instance
 

Detailed Description

Definition at line 13 of file StorageFactory.h.

Member Typedef Documentation

typedef tbb::concurrent_unordered_map<std::string, std::shared_ptr<StorageMaker> > StorageFactory::MakerTable
private

Definition at line 71 of file StorageFactory.h.

Member Enumeration Documentation

Enumerator
CACHE_HINT_APPLICATION 
CACHE_HINT_STORAGE 
CACHE_HINT_LAZY_DOWNLOAD 
CACHE_HINT_AUTO_DETECT 

Definition at line 16 of file StorageFactory.h.

Enumerator
READ_HINT_UNBUFFERED 
READ_HINT_READAHEAD 
READ_HINT_AUTO 

Definition at line 24 of file StorageFactory.h.

Constructor & Destructor Documentation

StorageFactory::~StorageFactory ( void  )

Definition at line 25 of file StorageFactory.cc.

StorageFactory::StorageFactory ( void  )
private

Definition at line 13 of file StorageFactory.cc.

Member Function Documentation

bool StorageFactory::accounting ( void  ) const

Definition at line 46 of file StorageFactory.cc.

StorageFactory::CacheHint StorageFactory::cacheHint ( void  ) const
bool StorageFactory::check ( const std::string &  url,
IOOffset size = 0 
) const

Definition at line 239 of file StorageFactory.cc.

Referenced by TStorageFactorySystem::AccessPathName().

unsigned int StorageFactory::debugLevel ( void  ) const

Definition at line 78 of file StorageFactory.cc.

bool StorageFactory::enableAccounting ( bool  enabled)

Definition at line 38 of file StorageFactory.cc.

const StorageFactory * StorageFactory::get ( void  )
static
StorageMaker * StorageFactory::getMaker ( const std::string &  proto) const
private

Definition at line 134 of file StorageFactory.cc.

StorageMaker * StorageFactory::getMaker ( const std::string &  url,
std::string &  protocol,
std::string &  rest 
) const
private

Definition at line 151 of file StorageFactory.cc.

StorageFactory * StorageFactory::getToModify ( void  )
static

Definition at line 34 of file StorageFactory.cc.

std::unique_ptr< Storage > StorageFactory::open ( const std::string &  url,
int  mode = IOFlags::OpenRead 
) const

Definition at line 171 of file StorageFactory.cc.

StorageFactory::ReadHint StorageFactory::readHint ( void  ) const
void StorageFactory::setCacheHint ( CacheHint  value)

Definition at line 50 of file StorageFactory.cc.

void StorageFactory::setDebugLevel ( unsigned int  level)

Definition at line 74 of file StorageFactory.cc.

void StorageFactory::setReadHint ( ReadHint  value)

Definition at line 58 of file StorageFactory.cc.

void StorageFactory::setTempDir ( const std::string &  s,
double  minFreeSpace 
)

Definition at line 82 of file StorageFactory.cc.

void StorageFactory::setTimeout ( unsigned int  timeout)

Definition at line 66 of file StorageFactory.cc.

void StorageFactory::stagein ( const std::string &  url) const
std::string StorageFactory::tempDir ( void  ) const

Definition at line 122 of file StorageFactory.cc.

Referenced by GsiFTPStorageMaker::open(), and HttpStorageMaker::open().

double StorageFactory::tempMinFree ( void  ) const

Definition at line 130 of file StorageFactory.cc.

std::string StorageFactory::tempPath ( void  ) const

Definition at line 126 of file StorageFactory.cc.

unsigned int StorageFactory::timeout ( void  ) const

Definition at line 70 of file StorageFactory.cc.

std::unique_ptr< Storage > StorageFactory::wrapNonLocalFile ( std::unique_ptr< Storage s,
const std::string &  proto,
const std::string &  path,
int  mode 
) const

Member Data Documentation

bool StorageFactory::m_accounting
private

Definition at line 82 of file StorageFactory.h.

CacheHint StorageFactory::m_cacheHint
private

Definition at line 80 of file StorageFactory.h.

unsigned int StorageFactory::m_debugLevel
private

Definition at line 88 of file StorageFactory.h.

LocalFileSystem StorageFactory::m_lfs
private

Definition at line 89 of file StorageFactory.h.

MakerTable StorageFactory::m_makers
mutableprivate

Definition at line 79 of file StorageFactory.h.

ReadHint StorageFactory::m_readHint
private

Definition at line 81 of file StorageFactory.h.

std::string StorageFactory::m_tempdir
private

Definition at line 85 of file StorageFactory.h.

double StorageFactory::m_tempfree
private

Definition at line 83 of file StorageFactory.h.

std::string StorageFactory::m_temppath
private

Definition at line 84 of file StorageFactory.h.

unsigned int StorageFactory::m_timeout
private

Definition at line 87 of file StorageFactory.h.

std::string StorageFactory::m_unusableDirWarnings
private

Definition at line 86 of file StorageFactory.h.

StorageFactory StorageFactory::s_instance
staticprivate

Definition at line 90 of file StorageFactory.h.