CMS 3D CMS Logo

TStorageFactorySystem.cc
Go to the documentation of this file.
3 
5 
6 
7 TStorageFactorySystem::TStorageFactorySystem(const char *, Bool_t)
8  : TSystem("-StorageFactory", "Storage Factory System"),
9  fDirp(nullptr)
10 { SetName("StorageFactory"); }
11 
13  : TSystem("-StorageFactory", "Storage Factory System"),
14  fDirp(nullptr)
15 { SetName("StorageFactory"); }
16 
18 {}
19 
23 Int_t
25 {
26  Error("MakeDirectory", "Unsupported");
27  return -1;
28 }
29 
30 void *
32 {
33  Error("OpenDirectory", "Unsupported");
34  return nullptr;
35 }
36 
37 void
39 {
40  Error("FreeDirectory", "Unsupported");
41 }
42 
43 const char *
45 {
46  Error("GetDirEntry", "Unsupported");
47  return nullptr;
48 }
49 
50 Bool_t
51 TStorageFactorySystem::AccessPathName(const char *name, EAccessMode /* mode */)
52 {
53  // NB: This return reverse of check(): kTRUE if access *fails*
54  return name ? !StorageFactory::get()->check(name) : kTRUE;
55 }
56 
57 Int_t
58 TStorageFactorySystem::Unlink(const char */*name*/)
59 {
60  Error("Unlink", "Unsupported");
61  return 1;
62 }
63 
64 Int_t
65 TStorageFactorySystem::GetPathInfo(const char *name, FileStat_t &info)
66 {
67  info.fDev = 0;
68  info.fIno = 0;
69  info.fMode = 0644;
70  info.fUid = 0;
71  info.fGid = 0;
72  info.fSize = 0;
73  info.fMtime = 0;
74 
75  IOOffset storageSize;
76  if (StorageFactory::get()->check(name, &storageSize))
77  {
78  info.fSize = storageSize;
79  return 0;
80  }
81 
82  return -1;
83 }
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
ClassImp(TStorageFactorySystem) TStorageFactorySystem
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