[ROOT] how to combine kSingleKey and kOverWrite

From: Aihong Tang (aihong@cnr.physics.kent.edu)
Date: Thu Aug 10 2000 - 16:28:14 MEST


Hi,

I am trying to save a TMap object in to a TFile.
I want overwrite the existing object in the file and I also want the map
to be saved as a single key.

In the Object::Write(), I found:

  //  The option can be a combination of:
   //    kSingleKey and kOverwrite
   //  Using the kOverwrite option a previous key with the same name is
   //  overwritten.
   //  The kSingleKey option is only used by TCollection::Write() to write
   //  a container with a single key instead of each object in the
container
   //  with its own key.


My question is how to combine these two options?
Should I try myMap->Write("myMap", TObject::kOverwrite &&
TObject::kSingleKey) ?


Thanks!

Aihong



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:31 MET