File indexing completed on 2024-04-06 12:31:53
0001 #include "Utilities/StorageFactory/interface/StorageMaker.h"
0002 #include "Utilities/StorageFactory/interface/Storage.h"
0003 #include "Utilities/StorageFactory/interface/IOFlags.h"
0004 #include <cstdlib>
0005
0006 using namespace edm::storage;
0007
0008 void StorageMaker::stagein(const std::string & , const std::string & , const AuxSettings &) const {}
0009
0010 bool StorageMaker::check(const std::string &proto,
0011 const std::string &path,
0012 const AuxSettings &aux,
0013 IOOffset *size ) const {
0014
0015
0016
0017
0018
0019
0020
0021 bool found = false;
0022 int mode = IOFlags::OpenRead | IOFlags::OpenUnbuffered;
0023 if (auto s = open(proto, path, mode, aux)) {
0024 if (size)
0025 *size = s->size();
0026
0027 s->close();
0028
0029 found = true;
0030 }
0031
0032 return found;
0033 }