Classes | |
struct | CloseBeforeDelete |
Public Member Functions | |
DuplicateTreeSentry (TTree *tree) | |
TTree * | tree () const |
Private Member Functions | |
void | dup () |
DuplicateTreeSentry (DuplicateTreeSentry const &)=delete | |
DuplicateTreeSentry & | operator= (DuplicateTreeSentry const &)=delete |
Private Attributes | |
std::unique_ptr< TFile, CloseBeforeDelete > | file_ |
std::unique_ptr< TTree > | mytree_ = nullptr |
TTree * | tree_ = nullptr |
Currently, ROOT doesn't use any latency-hiding optimizations for fast-cloning. This causes a significant slowdown when doing fast-cloning over a high-latency network (30ms latency makes this multiple factors slower).
Accordingly, we allow sites to provide a separate hint on how to treat fast- cloning. The DuplicateTreeSentry allows us to implement it - given a tree we are about to clone, with the appropriate configs, this will re-open the file with lazy-download and re-open the tree. The new tree is appropriate for cloning. When the object is destroyed, the new file and tree are cleaned up.
Definition at line 41 of file RootOutputTree.cc.
|
inline |
|
privatedelete |
|
inlineprivate |
Definition at line 59 of file RootOutputTree.cc.
References geometryDiff::file, file_, edm::Service< T >::isAvailable(), mytree_, edm::SiteLocalConfig::sourceCacheHint(), edm::SiteLocalConfig::sourceCloneCacheHint(), tree_, and relmon_authenticated_wget::url.
Referenced by DuplicateTreeSentry().
|
privatedelete |
|
inline |
Definition at line 45 of file RootOutputTree.cc.
References mytree_, and tree_.
Referenced by ZJetsTreeAnalyzer.ZJetsTreeAnalyzer::beginLoop(), MetTreeProducer.MetTreeProducer::declareVariables(), core.AutoFillTreeProducer.AutoFillTreeProducer::declareVariables(), edm::RootOutputTree::fastCloneTTree(), core.AutoFillTreeProducer.AutoFillTreeProducer::fillTree(), ZJetsTreeAnalyzer.ZJetsTreeAnalyzer::process(), MetTreeProducer.MetTreeProducer::process(), and python.cmstools.EventTree::SetAlias().
|
private |
Note this relies on the implicit delete ordering - mytree_ (if non-null) must be deleted before file_. Do not reorder the class members!
Definition at line 91 of file RootOutputTree.cc.
Referenced by dup().
|
private |
Definition at line 93 of file RootOutputTree.cc.
|
private |
Definition at line 92 of file RootOutputTree.cc.