CMS 3D CMS Logo

List of all members | Public Member Functions
LocalStorageMaker Class Reference
Inheritance diagram for LocalStorageMaker:
StorageMaker

Public Member Functions

virtual bool check (const std::string &, const std::string &path, const AuxSettings &, IOOffset *size=0) const override
 
virtual std::unique_ptr< Storageopen (const std::string &proto, const std::string &path, int mode, const AuxSettings &) const override
 
- Public Member Functions inherited from StorageMaker
virtual void stagein (const std::string &proto, const std::string &path, const AuxSettings &aux) const
 
 StorageMaker ()=default
 
virtual ~StorageMaker ()=default
 

Detailed Description

Definition at line 11 of file LocalStorageMaker.cc.

Member Function Documentation

virtual bool LocalStorageMaker::check ( const std::string &  ,
const std::string &  path,
const AuxSettings ,
IOOffset size = 0 
) const
inlineoverridevirtual

Reimplemented from StorageMaker.

Definition at line 33 of file LocalStorageMaker.cc.

References DEFINE_EDM_PLUGIN, and findQualityFiles::size.

37  {
38  struct stat st;
39  if (stat (path.c_str(), &st) != 0)
40  return false;
41 
42  if (size)
43  *size = st.st_size;
44 
45  return true;
46  }
size
Write out results.
virtual std::unique_ptr<Storage> LocalStorageMaker::open ( const std::string &  proto,
const std::string &  path,
int  mode,
const AuxSettings  
) const
inlineoverridevirtual

Implements StorageMaker.

Definition at line 14 of file LocalStorageMaker.cc.

References StorageFactory::CACHE_HINT_STORAGE, StorageFactory::cacheHint(), f, FrontierConditions_GlobalTag_cff::file, StorageFactory::get(), ALCARECOPromptCalibProdSiPixelAli0T_cff::mode, eostools::move(), IOFlags::OpenUnbuffered, callgraph::path, StorageFactory::READ_HINT_UNBUFFERED, StorageFactory::readHint(), and StorageFactory::wrapNonLocalFile().

18  {
20  StorageFactory::ReadHint readHint = f->readHint();
21  StorageFactory::CacheHint cacheHint = f->cacheHint();
22 
24  || cacheHint == StorageFactory::CACHE_HINT_STORAGE)
26  else
28 
29  auto file = std::make_unique<File> (path, mode);
30  return f->wrapNonLocalFile (std::move(file), proto, path, mode);
31  }
CacheHint cacheHint(void) const
std::unique_ptr< Storage > wrapNonLocalFile(std::unique_ptr< Storage > s, const std::string &proto, const std::string &path, int mode) const
Definition: IOFlags.h:4
static const StorageFactory * get(void)
double f[11][100]
ReadHint readHint(void) const
def move(src, dest)
Definition: eostools.py:510