Index: external/ExRootAnalysis/ExRootTreeBranch.cc
===================================================================
--- external/ExRootAnalysis/ExRootTreeBranch.cc	(revision 8a4fba82d3d1ca650363628ec52361af283dda41)
+++ external/ExRootAnalysis/ExRootTreeBranch.cc	(revision e5ea42e567ec58be1c52023f0c4f91579c2e446b)
@@ -82,8 +82,8 @@
 //------------------------------------------------------------------------------
 
-void ExRootTreeBranch::Clear()
+void ExRootTreeBranch::Clear(Option_t *option)
 {
   fSize = 0;
-  if(fData) fData->Clear();
+  if(fData) fData->Clear(option);
 }
 
Index: external/ExRootAnalysis/ExRootTreeBranch.h
===================================================================
--- external/ExRootAnalysis/ExRootTreeBranch.h	(revision 8a4fba82d3d1ca650363628ec52361af283dda41)
+++ external/ExRootAnalysis/ExRootTreeBranch.h	(revision e5ea42e567ec58be1c52023f0c4f91579c2e446b)
@@ -24,5 +24,5 @@
 
   TObject *NewEntry();
-  void Clear();
+  virtual void Clear(Option_t *option="");
 
 private:
Index: external/ExRootAnalysis/ExRootTreeWriter.cc
===================================================================
--- external/ExRootAnalysis/ExRootTreeWriter.cc	(revision 8a4fba82d3d1ca650363628ec52361af283dda41)
+++ external/ExRootAnalysis/ExRootTreeWriter.cc	(revision e5ea42e567ec58be1c52023f0c4f91579c2e446b)
@@ -59,18 +59,28 @@
 //------------------------------------------------------------------------------
 
-void ExRootTreeWriter::Write()
+Int_t ExRootTreeWriter::Write(const char *name, Int_t option, Int_t bufsize) const
 {
-  fFile = fTree ? fTree->GetCurrentFile() : 0;
-  if(fFile) fFile->Write();
+  if (fTree != 0) {
+    return fTree->GetCurrentFile()->Write(name, option, bufsize);
+  }
+  return 0;
 }
 
 //------------------------------------------------------------------------------
 
-void ExRootTreeWriter::Clear()
+Int_t ExRootTreeWriter::Write(const char *name, Int_t option, Int_t bufsize)
+{
+  // forward call to const version of this function
+  return static_cast<const ExRootTreeWriter*>(this)->Write(name, option, bufsize);
+}
+
+//------------------------------------------------------------------------------
+
+void ExRootTreeWriter::Clear(Option_t *option)
 {
   set<ExRootTreeBranch*>::iterator itBranches;
   for(itBranches = fBranches.begin(); itBranches != fBranches.end(); ++itBranches)
   {
-    (*itBranches)->Clear();
+    (*itBranches)->Clear(option);
   }
 }
Index: external/ExRootAnalysis/ExRootTreeWriter.h
===================================================================
--- external/ExRootAnalysis/ExRootTreeWriter.h	(revision 8a4fba82d3d1ca650363628ec52361af283dda41)
+++ external/ExRootAnalysis/ExRootTreeWriter.h	(revision e5ea42e567ec58be1c52023f0c4f91579c2e446b)
@@ -31,7 +31,8 @@
   ExRootTreeBranch *NewBranch(const char *name, TClass *cl);
 
-  void Clear();
+  virtual void Clear(Option_t *option = "");
   void Fill();
-  void Write();
+  virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0) const;
+  virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0);
 
 private:
Index: modules/Delphes.cc
===================================================================
--- modules/Delphes.cc	(revision 8a4fba82d3d1ca650363628ec52361af283dda41)
+++ modules/Delphes.cc	(revision e5ea42e567ec58be1c52023f0c4f91579c2e446b)
@@ -89,7 +89,7 @@
 //------------------------------------------------------------------------------
 
-void Delphes::Clear()
+void Delphes::Clear(Option_t* option)
 {
-  if(fFactory) fFactory->Clear();
+  if(fFactory) fFactory->Clear(option);
 }
 
Index: modules/Delphes.h
===================================================================
--- modules/Delphes.h	(revision 8a4fba82d3d1ca650363628ec52361af283dda41)
+++ modules/Delphes.h	(revision e5ea42e567ec58be1c52023f0c4f91579c2e446b)
@@ -49,5 +49,5 @@
   DelphesFactory *GetFactory() const { return fFactory; }
 
-  void Clear();
+  virtual void Clear(Option_t* option = "");
 
   virtual void Init();
