Opening a file in update mode causes Error in <TBasket::Streamer>: The value of fNbytes is incorrect

The error was:

/Users/jvavrek/ta_stj/src/RunAction.cc:154:6: error: no matching member function for call to 'Write'
  f->Write(primaries, "primaries");
  ~~~^~~~~
/Users/jvavrek/root/install/include/TFile.h:279:24: note: candidate function not viable: no known conversion from
      'std::vector<unsigned long>' to 'const char *' for 1st argument
   virtual Int_t       Write(const char *name=0, Int_t opt=0, Int_t bufsiz=0);
                       ^
/Users/jvavrek/root/install/include/TFile.h:280:24: note: candidate function not viable: no known conversion from
      'std::vector<unsigned long>' to 'const char *' for 1st argument
   virtual Int_t       Write(const char *name=0, Int_t opt=0, Int_t bufsiz=0) const;

Based on this post should it be WriteObject instead of Write?