Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add autoflush options, default -10MB #30

Merged
merged 1 commit into from
Oct 3, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions PhysicsTools/NanoAOD/plugins/NanoAODOutputModule.cc
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ class NanoAODOutputModule : public edm::one::OutputModule<> {
std::string m_compressionAlgorithm;
bool m_writeProvenance;
bool m_fakeName; //crab workaround, remove after crab is fixed
int m_autoFlush;
edm::ProcessHistoryRegistry m_processHistoryRegistry;
edm::JobReport::Token m_jrToken;
std::unique_ptr<TFile> m_file;
Expand Down Expand Up @@ -139,6 +140,7 @@ NanoAODOutputModule::NanoAODOutputModule(edm::ParameterSet const& pset):
m_compressionAlgorithm(pset.getUntrackedParameter<std::string>("compressionAlgorithm")),
m_writeProvenance(pset.getUntrackedParameter<bool>("saveProvenance", true)),
m_fakeName(pset.getUntrackedParameter<bool>("fakeNameForCrab", false)),
m_autoFlush(pset.getUntrackedParameter<int>("autoFlush", -10000000)),
m_processHistoryRegistry()
{
}
Expand Down Expand Up @@ -258,6 +260,7 @@ NanoAODOutputModule::openFile(edm::FileBlock const&) {
// create the trees
m_tree.reset(new TTree("Events","Events"));
m_tree->SetAutoSave(std::numeric_limits<Long64_t>::max());
m_tree->SetAutoFlush(m_autoFlush);
m_commonBranches.branch(*m_tree);

m_lumiTree.reset(new TTree("LuminosityBlocks","LuminosityBlocks"));
Expand Down