CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/IOPool/TFileAdaptor/src/TStorageFactorySystem.cc

Go to the documentation of this file.
00001 #include "IOPool/TFileAdaptor/interface/TStorageFactorySystem.h"
00002 #include "Utilities/StorageFactory/interface/StorageFactory.h"
00003 
00004 ClassImp(TStorageFactorySystem)
00005 
00006 TStorageFactorySystem::TStorageFactorySystem(void)
00007   : TSystem("-StorageFactory", "Storage Factory System"),
00008     fDirp(0)
00009 { SetName("StorageFactory"); }
00010 
00011 TStorageFactorySystem::~TStorageFactorySystem(void)
00012 {}
00013 
00017 Int_t
00018 TStorageFactorySystem::MakeDirectory(const char */*name*/)
00019 {
00020   Error("MakeDirectory", "Unsupported");
00021   return -1;
00022 }
00023 
00024 void *
00025 TStorageFactorySystem::OpenDirectory(const char */*name*/)
00026 {
00027   Error("OpenDirectory", "Unsupported");
00028   return 0;
00029 }
00030 
00031 void
00032 TStorageFactorySystem::FreeDirectory(void */*dirp*/)
00033 {
00034   Error("FreeDirectory", "Unsupported");
00035 }
00036 
00037 const char *
00038 TStorageFactorySystem::GetDirEntry(void */*dirp*/)
00039 {
00040   Error("GetDirEntry", "Unsupported");
00041   return 0;
00042 }
00043 
00044 Bool_t
00045 TStorageFactorySystem::AccessPathName(const char *name, EAccessMode /* mode */)
00046 {
00047   // NB: This return reverse of check(): kTRUE if access *fails*
00048   return name ? !StorageFactory::get()->check(name) : kTRUE;
00049 }
00050 
00051 Int_t
00052 TStorageFactorySystem::GetPathInfo(const char *name, FileStat_t &info)
00053 {
00054   info.fDev = 0;
00055   info.fIno = 0;
00056   info.fMode = 0644;
00057   info.fUid = 0;
00058   info.fGid = 0;
00059   info.fSize = 0;
00060   info.fMtime = 0;
00061 
00062   IOOffset storageSize;
00063   if (StorageFactory::get()->check(name, &storageSize))
00064   {
00065     info.fSize = storageSize;
00066     return 0;
00067   }
00068 
00069   return -1;
00070 }