|
|
Go to the documentation of this file.
15 #include <TPluginManager.h>
45 mgr->AddHandler(
"TFile",
47 "TStorageFactoryFile",
49 "TStorageFactoryFile(char const*,Option_t*,char const*,Int_t)");
51 mgr->AddHandler(
"TSystem",
type,
"TStorageFactorySystem",
"IOPoolTFileAdaptor",
"TStorageFactorySystem()");
52 }
else if (altType == 1) {
53 mgr->AddHandler(
"TFile",
55 "TStorageFactoryFile",
57 "TStorageFactoryFile(char const*,Option_t*,char const*,Int_t, Int_t, Bool_t)");
60 "TSystem",
type,
"TStorageFactorySystem",
"IOPoolTFileAdaptor",
"TStorageFactorySystem(const char *,Bool_t)");
72 enablePrefetching_(
false),
73 cacheHint_(
"auto-detect"),
74 readHint_(
"auto-detect"),
93 minFree_ =
pset.getUntrackedParameter<
double>(
"tempMinFree",
f->tempMinFree());
139 <<
"', recognised values are 'application-only',"
140 <<
" 'storage-only', 'lazy-download', 'auto-detect'";
144 else if (
readHint_ ==
"read-ahead-buffered")
150 <<
"', recognised values are 'direct-unbuffered',"
151 <<
" 'read-ahead-buffered', 'auto-detect'";
163 TPluginManager* mgr = gROOT->GetPluginManager();
166 mgr->LoadHandlersFromPluginDirs(
"TFile");
167 mgr->LoadHandlersFromPluginDirs(
"TSystem");
202 desc.addOptionalUntracked<
bool>(
"enable");
203 desc.addOptionalUntracked<
bool>(
"stats");
207 desc.addOptionalUntracked<
double>(
"tempMinFree");
208 desc.addOptionalUntracked<std::vector<std::string> >(
"native");
209 descriptions.
add(
"AdaptorConfig",
desc);
214 std::map<std::string, std::string>
data;
226 float const oneMeg = 1048576.0;
227 o <<
"Storage parameters: adaptor: true"
228 <<
" Stats:" << (
doStats_ ?
"true" :
"false") <<
'\n'
233 << (TFile::GetFileBytesRead() / oneMeg) <<
"MB/?ms/?ms/?ms"
234 <<
"; tfile/write=?/?/" << (TFile::GetFileBytesWritten() / oneMeg) <<
"MB/?ms/?ms/?ms";
241 float const oneMeg = 1048576.0;
242 data.insert(std::make_pair(
"Parameter-untracked-bool-enabled",
"true"));
243 data.insert(std::make_pair(
"Parameter-untracked-bool-stats", (
doStats_ ?
"true" :
"false")));
244 data.insert(std::make_pair(
"Parameter-untracked-bool-prefetching", (
enablePrefetching_ ?
"true" :
"false")));
245 data.insert(std::make_pair(
"Parameter-untracked-string-cacheHint",
cacheHint_));
246 data.insert(std::make_pair(
"Parameter-untracked-string-readHint",
readHint_));
248 std::ostringstream
r;
249 std::ostringstream
w;
250 r << (TFile::GetFileBytesRead() / oneMeg);
251 w << (TFile::GetFileBytesWritten() / oneMeg);
252 data.insert(std::make_pair(
"ROOT-tfile-read-totalMegabytes",
r.str()));
253 data.insert(std::make_pair(
"ROOT-tfile-write-totalMegabytes",
w.str()));
261 me = std::make_shared<TFileAdaptor>(param, ar);
edm::propagate_const< std::shared_ptr< TFileAdaptor > > me
void termination(void) const
std::vector< std::string > native_
virtual std::vector< std::string > const * sourceNativeProtocols() const =0
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
static StorageFactory * getToModify(void)
void watchPostEndJob(PostEndJob::slot_type const &iSlot)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void stats(std::ostream &o) const
virtual std::string const * sourceCacheTempDir() const =0
virtual std::string const * sourceReadHint() const =0
virtual bool enablePrefetching() const =0
TFileAdaptor(edm::ParameterSet const &pset, edm::ActivityRegistry &ar)
bool native(char const *proto) const
virtual double const * sourceCacheMinFree() const =0
void statsXML(std::map< std::string, std::string > &data) const
virtual unsigned int debugLevel() const =0
static std::string summaryText(bool banner=false)
virtual unsigned int const * sourceTimeout() const =0
virtual std::string const * sourceCacheHint() const =0
char data[epos_bytes_allocation]
void reportPerformanceSummary(std::string const &metricClass, std::map< std::string, std::string > const &metrics)
static void addType(TPluginManager *mgr, char const *type, int altType=0)
static void fillSummary(std::map< std::string, std::string > &summary)