test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 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  }
tuple 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, mergeVDriftHistosByStation::file, StorageFactory::get(), alignBH_cfg::mode, eostools::move(), IOFlags::OpenUnbuffered, fed_dqm_sourceclient-live_cfg::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)
25  mode &= ~IOFlags::OpenUnbuffered;
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
static const StorageFactory * get(void)
def move
Definition: eostools.py:510
double f[11][100]
ReadHint readHint(void) const