CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
StorageMaker Class Referenceabstract

#include <StorageMaker.h>

Inheritance diagram for StorageMaker:
DCacheStorageMaker GsiFTPStorageMaker HttpStorageMaker LocalStorageMaker LStoreStorageMaker RFIOStorageMaker StormLcgGtStorageMaker StormStorageMaker XrdStorageMaker

Public Member Functions

virtual bool check (const std::string &proto, const std::string &path, IOOffset *size=0)
 
virtual Storageopen (const std::string &proto, const std::string &path, int mode)=0
 
virtual void setDebugLevel (unsigned int debugLevel)
 
virtual void setTimeout (unsigned int timeout)
 
virtual void stagein (const std::string &proto, const std::string &path)
 
 StorageMaker (void)
 
virtual ~StorageMaker (void)
 

Detailed Description

Definition at line 8 of file StorageMaker.h.

Constructor & Destructor Documentation

StorageMaker::StorageMaker ( void  )

Definition at line 6 of file StorageMaker.cc.

7 {}
StorageMaker::~StorageMaker ( void  )
virtual

Definition at line 9 of file StorageMaker.cc.

10 {}

Member Function Documentation

bool StorageMaker::check ( const std::string &  proto,
const std::string &  path,
IOOffset size = 0 
)
virtual

Reimplemented in RFIOStorageMaker, StormLcgGtStorageMaker, StormStorageMaker, DCacheStorageMaker, XrdStorageMaker, LStoreStorageMaker, and LocalStorageMaker.

Definition at line 26 of file StorageMaker.cc.

References newFWLiteAna::found, alignBH_cfg::mode, open(), IOFlags::OpenRead, IOFlags::OpenUnbuffered, and alignCSCRings::s.

29 {
30  // Fallback method is to open the file and check its
31  // size. Because grid jobs run in a directory where
32  // there is usually more space than in /tmp, and that
33  // directory is automatically cleaned up, open up the
34  // temporary files in the current directory. If the
35  // file is downloaded, it will delete itself in the
36  // destructor or close method.
37  bool found = false;
39  if (Storage *s = open (proto, path, mode))
40  {
41  if (size)
42  *size = s->size ();
43 
44  s->close ();
45  delete s;
46 
47  found = true;
48  }
49 
50  return found;
51 }
virtual Storage * open(const std::string &proto, const std::string &path, int mode)=0
tuple size
Write out results.
virtual Storage* StorageMaker::open ( const std::string &  proto,
const std::string &  path,
int  mode 
)
pure virtual
void StorageMaker::setDebugLevel ( unsigned int  debugLevel)
virtual

Reimplemented in XrdStorageMaker.

Definition at line 22 of file StorageMaker.cc.

23 {}
void StorageMaker::setTimeout ( unsigned int  timeout)
virtual

Reimplemented in DCacheStorageMaker.

Definition at line 18 of file StorageMaker.cc.

19 {}
void StorageMaker::stagein ( const std::string &  proto,
const std::string &  path 
)
virtual

Reimplemented in RFIOStorageMaker, DCacheStorageMaker, and XrdStorageMaker.

Definition at line 13 of file StorageMaker.cc.

15 {}