CMS 3D CMS Logo

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

#include <StorageMaker.h>

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

Classes

struct  AuxSettings
 

Public Member Functions

virtual bool check (const std::string &proto, const std::string &path, const AuxSettings &aux, IOOffset *size=0) const
 
virtual std::unique_ptr< Storageopen (const std::string &proto, const std::string &path, int mode, const AuxSettings &aux) const =0
 
virtual void stagein (const std::string &proto, const std::string &path, const AuxSettings &aux) const
 
 StorageMaker ()=default
 
virtual ~StorageMaker ()=default
 

Detailed Description

Definition at line 9 of file StorageMaker.h.

Constructor & Destructor Documentation

StorageMaker::StorageMaker ( )
default
virtual StorageMaker::~StorageMaker ( )
virtualdefault

Member Function Documentation

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

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

Definition at line 13 of file StorageMaker.cc.

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

17 {
18  // Fallback method is to open the file and check its
19  // size. Because grid jobs run in a directory where
20  // there is usually more space than in /tmp, and that
21  // directory is automatically cleaned up, open up the
22  // temporary files in the current directory. If the
23  // file is downloaded, it will delete itself in the
24  // destructor or close method.
25  bool found = false;
27  if (auto s = open (proto, path, mode, aux))
28  {
29  if (size)
30  *size = s->size ();
31 
32  s->close ();
33 
34  found = true;
35  }
36 
37  return found;
38 }
virtual std::unique_ptr< Storage > open(const std::string &proto, const std::string &path, int mode, const AuxSettings &aux) const =0
tuple size
Write out results.
virtual std::unique_ptr<Storage> StorageMaker::open ( const std::string &  proto,
const std::string &  path,
int  mode,
const AuxSettings aux 
) const
pure virtual
void StorageMaker::stagein ( const std::string &  proto,
const std::string &  path,
const AuxSettings aux 
) const
virtual

Reimplemented in RFIOStorageMaker, XrdStorageMaker, and DCacheStorageMaker.

Definition at line 7 of file StorageMaker.cc.

10 {}