Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
Utilities
StorageFactory
plugins
GsiFTPStorageMaker.cc
Go to the documentation of this file.
1
#include "
Utilities/StorageFactory/interface/StorageMaker.h
"
2
#include "
Utilities/StorageFactory/interface/StorageMakerFactory.h
"
3
#include "
Utilities/StorageFactory/interface/StorageFactory.h
"
4
#include "
Utilities/StorageFactory/interface/RemoteFile.h
"
5
6
class
GsiFTPStorageMaker
:
public
StorageMaker
7
{
8
public
:
9
virtual
Storage
*
open
(
const
std::string
&proto,
10
const
std::string
&
path
,
11
int
mode
)
override
12
{
13
std::string
temp
;
14
StorageFactory
*
f
=
StorageFactory::get
();
15
int
localfd =
RemoteFile::local
(f->
tempDir
(),
temp
);
16
std::string
lurl =
"file://"
+
temp
;
17
std::string
newurl ((proto ==
"sfn"
?
"gsiftp"
: proto) +
":"
+ path);
18
const
char
*ftpopts [] = {
"globus-url-copy"
, newurl.c_str (), lurl.c_str (), 0 };
19
return
RemoteFile::get
(localfd, temp, (
char
**) ftpopts, mode);
20
}
21
};
22
23
DEFINE_EDM_PLUGIN
(
StorageMakerFactory
,
GsiFTPStorageMaker
,
"gsiftp"
);
24
DEFINE_EDM_PLUGIN
(
StorageMakerFactory
,
GsiFTPStorageMaker
,
"sfn"
);
GsiFTPStorageMaker
Definition:
GsiFTPStorageMaker.cc:6
StorageFactory
Definition:
StorageFactory.h:12
StorageMakerFactory.h
groupFilesInBlocks.temp
temp
Definition:
groupFilesInBlocks.py:140
getHLTPrescaleColumns.path
list path
Definition:
getHLTPrescaleColumns.py:16
GsiFTPStorageMaker::open
virtual Storage * open(const std::string &proto, const std::string &path, int mode) override
Definition:
GsiFTPStorageMaker.cc:9
Storage
Definition:
Storage.h:20
StorageMaker
Definition:
StorageMaker.h:8
alignBH_cfg.mode
list mode
Definition:
alignBH_cfg.py:7
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:255
StorageFactory::get
static StorageFactory * get(void)
Definition:
StorageFactory.cc:33
RemoteFile::local
static int local(const std::string &tmpdir, std::string &temp)
Definition:
RemoteFile.cc:55
RemoteFile.h
edmplugin::PluginFactory
Definition:
PluginFactory.h:31
StorageFactory::tempDir
std::string tempDir(void) const
Definition:
StorageFactory.cc:121
f
double f[11][100]
Definition:
MuScleFitUtils.cc:77
RemoteFile::get
static Storage * get(int localfd, const std::string &name, char **cmd, int mode)
Definition:
RemoteFile.cc:90
StorageFactory.h
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition:
PluginFactory.h:101
StorageMaker.h
Generated for CMSSW Reference Manual by
1.8.5