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() [1/2]

TStorageFactorySystem::TStorageFactorySystem ( const char *  ,
Bool_t   
)

Definition at line 6 of file TStorageFactorySystem.cc.

7  : TSystem("-StorageFactory", "Storage Factory System"), fDirp(nullptr) {
8  SetName("StorageFactory");
9 }

◆ TStorageFactorySystem() [2/2]

TStorageFactorySystem::TStorageFactorySystem ( void  )

Definition at line 11 of file TStorageFactorySystem.cc.

12  : TSystem("-StorageFactory", "Storage Factory System"), fDirp(nullptr) {
13  SetName("StorageFactory");
14 }

◆ ~TStorageFactorySystem()

TStorageFactorySystem::~TStorageFactorySystem ( void  )
override

Definition at line 16 of file TStorageFactorySystem.cc.

16 {}

Member Function Documentation

◆ AccessPathName()

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

Definition at line 38 of file TStorageFactorySystem.cc.

38  {
39  // NB: This return reverse of check(): kTRUE if access *fails*
40  return name ? !StorageFactory::get()->check(name) : kTRUE;
41 }

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

◆ ClassDefOverride()

TStorageFactorySystem::ClassDefOverride ( TStorageFactorySystem  ,
 
)

◆ FreeDirectory()

void TStorageFactorySystem::FreeDirectory ( void *  dirp)
override

Definition at line 31 of file TStorageFactorySystem.cc.

31 { Error("FreeDirectory", "Unsupported"); }

◆ GetDirEntry()

const char * TStorageFactorySystem::GetDirEntry ( void *  dirp)
override

Definition at line 33 of file TStorageFactorySystem.cc.

33  {
34  Error("GetDirEntry", "Unsupported");
35  return nullptr;
36 }

◆ GetDirPt()

void* TStorageFactorySystem::GetDirPt ( void  ) const
inlineprivate

Definition at line 13 of file TStorageFactorySystem.h.

13 { return fDirp; }

References fDirp.

◆ GetPathInfo()

Int_t TStorageFactorySystem::GetPathInfo ( const char *  path,
FileStat_t &  info 
)
override

Definition at line 48 of file TStorageFactorySystem.cc.

48  {
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 }

References RPCNoise_example::check, StorageFactory::get(), info(), and Skims_PA_cff::name.

◆ MakeDirectory()

Int_t TStorageFactorySystem::MakeDirectory ( const char *  name)
override

Definition at line 21 of file TStorageFactorySystem.cc.

21  {
22  Error("MakeDirectory", "Unsupported");
23  return -1;
24 }

◆ OpenDirectory()

void * TStorageFactorySystem::OpenDirectory ( const char *  name)
override

Definition at line 26 of file TStorageFactorySystem.cc.

26  {
27  Error("OpenDirectory", "Unsupported");
28  return nullptr;
29 }

◆ Unlink()

Int_t TStorageFactorySystem::Unlink ( const char *  name)
override

Definition at line 43 of file TStorageFactorySystem.cc.

43  {
44  Error("Unlink", "Unsupported");
45  return 1;
46 }

Member Data Documentation

◆ fDirp

void* TStorageFactorySystem::fDirp
private

Definition at line 12 of file TStorageFactorySystem.h.

Referenced by GetDirPt().

info
static const TGPicture * info(bool iBackgroundIsBlack)
Definition: FWCollectionSummaryWidget.cc:153
RPCNoise_example.check
check
Definition: RPCNoise_example.py:71
StorageFactory::get
static const StorageFactory * get(void)
Definition: StorageFactory.cc:28
StorageFactory::check
bool check(const std::string &url, IOOffset *size=nullptr) const
Definition: StorageFactory.cc:181
IOOffset
int64_t IOOffset
Definition: IOTypes.h:19
leef::Error
edm::ErrorSummaryEntry Error
Definition: LogErrorEventFilter.cc:29
TStorageFactorySystem::fDirp
void * fDirp
Definition: TStorageFactorySystem.h:12
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17