CMS 3D CMS Logo

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

Public Member Functions

bool check (const std::string &, const std::string &path, const AuxSettings &, IOOffset *size=nullptr) const override
 
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

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

Reimplemented from StorageMaker.

Definition at line 30 of file LocalStorageMaker.cc.

References DEFINE_EDM_PLUGIN, findQualityFiles::size, and hgcalPlots::stat.

33  {
34  struct stat st;
35  if (stat(path.c_str(), &st) != 0)
36  return false;
37 
38  if (size)
39  *size = st.st_size;
40 
41  return true;
42  }
size
Write out results.
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 13 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, castor_dqm_sourceclient_file_cfg::path, StorageFactory::READ_HINT_UNBUFFERED, StorageFactory::readHint(), and StorageFactory::wrapNonLocalFile().

16  {
18  StorageFactory::ReadHint readHint = f->readHint();
19  StorageFactory::CacheHint cacheHint = f->cacheHint();
20 
23  else
25 
26  auto file = std::make_unique<File>(path, mode);
27  return f->wrapNonLocalFile(std::move(file), proto, path, mode);
28  }
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:511