CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
TStorageFactorySystem Class Reference

#include <TStorageFactorySystem.h>

Inheritance diagram for TStorageFactorySystem:

Public Member Functions

Bool_t AccessPathName (const char *path, EAccessMode mode) override
 
 ClassDefOverride (TStorageFactorySystem, 0)
 
void FreeDirectory (void *dirp) override
 
const char * GetDirEntry (void *dirp) override
 
Int_t GetPathInfo (const char *path, FileStat_t &info) override
 
Int_t MakeDirectory (const char *name) override
 
void * OpenDirectory (const char *name) override
 
 TStorageFactorySystem (const char *, Bool_t)
 
 TStorageFactorySystem (void)
 
int Unlink (const char *name) override
 
 ~TStorageFactorySystem (void) override
 

Private Member Functions

void * GetDirPt (void) const
 

Private Attributes

void * fDirp
 

Detailed Description

TSystem wrapper around StorageFactory and CMS Storage. This class is a blatant copy of TDCacheSystem.

Definition at line 10 of file TStorageFactorySystem.h.

Constructor & Destructor Documentation

TStorageFactorySystem::TStorageFactorySystem ( const char *  ,
Bool_t   
)
TStorageFactorySystem::TStorageFactorySystem ( void  )

Definition at line 12 of file TStorageFactorySystem.cc.

Referenced by GetDirPt().

13  : TSystem("-StorageFactory", "Storage Factory System"),
14  fDirp(nullptr)
15 { SetName("StorageFactory"); }
TStorageFactorySystem::~TStorageFactorySystem ( void  )
override

Definition at line 17 of file TStorageFactorySystem.cc.

Referenced by GetDirPt().

18 {}

Member Function Documentation

Bool_t TStorageFactorySystem::AccessPathName ( const char *  path,
EAccessMode  mode 
)
override

Definition at line 51 of file TStorageFactorySystem.cc.

References StorageFactory::check(), and StorageFactory::get().

Referenced by GetDirPt().

52 {
53  // NB: This return reverse of check(): kTRUE if access *fails*
54  return name ? !StorageFactory::get()->check(name) : kTRUE;
55 }
bool check(const std::string &url, IOOffset *size=0) const
static const StorageFactory * get(void)
TStorageFactorySystem::ClassDefOverride ( TStorageFactorySystem  ,
 
)

Referenced by GetDirPt().

void TStorageFactorySystem::FreeDirectory ( void *  dirp)
override

Definition at line 38 of file TStorageFactorySystem.cc.

Referenced by GetDirPt().

39 {
40  Error("FreeDirectory", "Unsupported");
41 }
const char * TStorageFactorySystem::GetDirEntry ( void *  dirp)
override

Definition at line 44 of file TStorageFactorySystem.cc.

Referenced by GetDirPt().

45 {
46  Error("GetDirEntry", "Unsupported");
47  return nullptr;
48 }
void* TStorageFactorySystem::GetDirPt ( void  ) const
inlineprivate
Int_t TStorageFactorySystem::GetPathInfo ( const char *  path,
FileStat_t &  info 
)
override

Definition at line 65 of file TStorageFactorySystem.cc.

References trackerTree::check(), and StorageFactory::get().

Referenced by GetDirPt().

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 }
static const TGPicture * info(bool iBackgroundIsBlack)
static const StorageFactory * get(void)
int64_t IOOffset
Definition: IOTypes.h:19
def check(config)
Definition: trackerTree.py:14
Int_t TStorageFactorySystem::MakeDirectory ( const char *  name)
override

Definition at line 24 of file TStorageFactorySystem.cc.

Referenced by GetDirPt().

25 {
26  Error("MakeDirectory", "Unsupported");
27  return -1;
28 }
void * TStorageFactorySystem::OpenDirectory ( const char *  name)
override

Definition at line 31 of file TStorageFactorySystem.cc.

Referenced by GetDirPt().

32 {
33  Error("OpenDirectory", "Unsupported");
34  return nullptr;
35 }
Int_t TStorageFactorySystem::Unlink ( const char *  name)
override

Definition at line 58 of file TStorageFactorySystem.cc.

Referenced by GetDirPt().

59 {
60  Error("Unlink", "Unsupported");
61  return 1;
62 }

Member Data Documentation

void* TStorageFactorySystem::fDirp
private

Definition at line 13 of file TStorageFactorySystem.h.

Referenced by GetDirPt().