CMS 3D CMS Logo

TStorageFactorySystem.cc
Go to the documentation of this file.
3 
5 
7  : TSystem("-StorageFactory", "Storage Factory System"), fDirp(nullptr) {
8  SetName("StorageFactory");
9 }
10 
12  : TSystem("-StorageFactory", "Storage Factory System"), fDirp(nullptr) {
13  SetName("StorageFactory");
14 }
15 
17 
21 Int_t TStorageFactorySystem::MakeDirectory(const char * /*name*/) {
22  Error("MakeDirectory", "Unsupported");
23  return -1;
24 }
25 
26 void *TStorageFactorySystem::OpenDirectory(const char * /*name*/) {
27  Error("OpenDirectory", "Unsupported");
28  return nullptr;
29 }
30 
31 void TStorageFactorySystem::FreeDirectory(void * /*dirp*/) { Error("FreeDirectory", "Unsupported"); }
32 
33 const char *TStorageFactorySystem::GetDirEntry(void * /*dirp*/) {
34  Error("GetDirEntry", "Unsupported");
35  return nullptr;
36 }
37 
38 Bool_t TStorageFactorySystem::AccessPathName(const char *name, EAccessMode /* mode */) {
39  // NB: This return reverse of check(): kTRUE if access *fails*
40  return name ? !StorageFactory::get()->check(name) : kTRUE;
41 }
42 
43 Int_t TStorageFactorySystem::Unlink(const char * /*name*/) {
44  Error("Unlink", "Unsupported");
45  return 1;
46 }
47 
48 Int_t TStorageFactorySystem::GetPathInfo(const char *name, FileStat_t &info) {
49  info.fDev = 0;
50  info.fIno = 0;
51  info.fMode = 0644;
52  info.fUid = 0;
53  info.fGid = 0;
54  info.fSize = 0;
55  info.fMtime = 0;
56 
57  IOOffset storageSize;
58  if (StorageFactory::get()->check(name, &storageSize)) {
59  info.fSize = storageSize;
60  return 0;
61  }
62 
63  return -1;
64 }
bool check(const std::string &url, IOOffset *size=0) const
edm::ErrorSummaryEntry Error
Int_t GetPathInfo(const char *path, FileStat_t &info) override
static const TGPicture * info(bool iBackgroundIsBlack)
#define nullptr
void * OpenDirectory(const char *name) override
int Unlink(const char *name) override
static const StorageFactory * get(void)
const char * GetDirEntry(void *dirp) override
~TStorageFactorySystem(void) override
int64_t IOOffset
Definition: IOTypes.h:19
def check(config)
Definition: trackerTree.py:14
Int_t MakeDirectory(const char *name) override
void FreeDirectory(void *dirp) override
Bool_t AccessPathName(const char *path, EAccessMode mode) override
ClassImp(TStorageFactorySystem)