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 }
info
static const TGPicture * info(bool iBackgroundIsBlack)
Definition: FWCollectionSummaryWidget.cc:152
TStorageFactorySystem::TStorageFactorySystem
TStorageFactorySystem(void)
Definition: TStorageFactorySystem.cc:11
RPCNoise_example.check
check
Definition: RPCNoise_example.py:71
TStorageFactorySystem::GetPathInfo
Int_t GetPathInfo(const char *path, FileStat_t &info) override
Definition: TStorageFactorySystem.cc:48
ClassImp
ClassImp(TStorageFactorySystem)
StorageFactory::get
static const StorageFactory * get(void)
Definition: StorageFactory.cc:26
TStorageFactorySystem::MakeDirectory
Int_t MakeDirectory(const char *name) override
Definition: TStorageFactorySystem.cc:21
TStorageFactorySystem.h
StorageFactory::check
bool check(const std::string &url, IOOffset *size=nullptr) const
Definition: StorageFactory.cc:178
TStorageFactorySystem::OpenDirectory
void * OpenDirectory(const char *name) override
Definition: TStorageFactorySystem.cc:26
IOOffset
int64_t IOOffset
Definition: IOTypes.h:19
leef::Error
edm::ErrorSummaryEntry Error
Definition: LogErrorEventFilter.cc:29
StorageFactory.h
TStorageFactorySystem::FreeDirectory
void FreeDirectory(void *dirp) override
Definition: TStorageFactorySystem.cc:31
TStorageFactorySystem::Unlink
int Unlink(const char *name) override
Definition: TStorageFactorySystem.cc:43
TStorageFactorySystem::AccessPathName
Bool_t AccessPathName(const char *path, EAccessMode mode) override
Definition: TStorageFactorySystem.cc:38
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
TStorageFactorySystem::~TStorageFactorySystem
~TStorageFactorySystem(void) override
Definition: TStorageFactorySystem.cc:16
TStorageFactorySystem::GetDirEntry
const char * GetDirEntry(void *dirp) override
Definition: TStorageFactorySystem.cc:33
TStorageFactorySystem
Definition: TStorageFactorySystem.h:10