Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
Utilities
StorageFactory
plugins
HttpStorageMaker.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
HttpStorageMaker
:
public
StorageMaker
7
{
8
public
:
9
virtual
std::unique_ptr<Storage>
open
(
const
std::string
&proto,
10
const
std::string
&
path
,
11
int
mode
,
12
const
AuxSettings
&)
const override
13
{
14
std::string
temp
;
15
const
StorageFactory
*
f
=
StorageFactory::get
();
16
int
localfd =
RemoteFile::local
(f->
tempDir
(),
temp
);
17
std::string
newurl ((proto ==
"web"
?
"http"
: proto) +
":"
+ path);
18
const
char
*curlopts [] = {
19
"curl"
,
"-L"
,
"-f"
,
"-o"
, temp.c_str(),
"-q"
,
"-s"
,
"--url"
,
20
newurl.c_str (), 0
21
};
22
23
return
RemoteFile::get
(localfd, temp, (
char
**) curlopts, mode);
24
}
25
};
26
27
DEFINE_EDM_PLUGIN
(
StorageMakerFactory
,
HttpStorageMaker
,
"http"
);
28
DEFINE_EDM_PLUGIN
(
StorageMakerFactory
,
HttpStorageMaker
,
"ftp"
);
29
DEFINE_EDM_PLUGIN
(
StorageMakerFactory
,
HttpStorageMaker
,
"web"
);
StorageFactory
Definition:
StorageFactory.h:13
StorageMakerFactory.h
groupFilesInBlocks.temp
temp
Definition:
groupFilesInBlocks.py:140
StorageMaker::AuxSettings
Definition:
StorageMaker.h:12
StorageMaker
Definition:
StorageMaker.h:9
RemoteFile::get
static std::unique_ptr< Storage > get(int localfd, const std::string &name, char **cmd, int mode)
Definition:
RemoteFile.cc:90
alignBH_cfg.mode
list mode
Definition:
alignBH_cfg.py:7
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:255
RemoteFile::local
static int local(const std::string &tmpdir, std::string &temp)
Definition:
RemoteFile.cc:55
RemoteFile.h
StorageFactory::get
static const StorageFactory * get(void)
Definition:
StorageFactory.cc:30
edmplugin::PluginFactory
Definition:
PluginFactory.h:31
StorageFactory::tempDir
std::string tempDir(void) const
Definition:
StorageFactory.cc:122
f
double f[11][100]
Definition:
MuScleFitUtils.cc:78
HttpStorageMaker
Definition:
HttpStorageMaker.cc:6
HttpStorageMaker::open
virtual std::unique_ptr< Storage > open(const std::string &proto, const std::string &path, int mode, const AuxSettings &) const override
Definition:
HttpStorageMaker.cc:9
fed_dqm_sourceclient-live_cfg.path
string path
Definition:
fed_dqm_sourceclient-live_cfg.py:33
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