Changeset 1235 for trunk/MagicSoft/Mars/mbase/MWriteAsciiFile.cc
- Timestamp:
- 03/07/02 15:28:30 (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/MWriteAsciiFile.cc
r1222 r1235 148 148 while ((cont=(MParContainer*)NextCont())) 149 149 { 150 const TObject *memb =NextMemb();150 const MScale *memb = (MScale*)NextMemb(); 151 151 152 152 if (!cont->IsReadyToSave()) … … 160 160 else 161 161 { 162 if (!cont->WriteDataMember(*fOut, memb->GetName() ))162 if (!cont->WriteDataMember(*fOut, memb->GetName(), memb->GetScale())) 163 163 continue; 164 164 } … … 196 196 Bool_t MWriteAsciiFile::GetContainer(MParList *pList) 197 197 { 198 TObject*obj = NULL;198 MScale *obj = NULL; 199 199 200 200 TIter Next(&fContNames); 201 201 202 while ((obj= Next()))202 while ((obj=(MScale*)Next())) 203 203 { 204 204 const char *name = obj->GetName(); … … 211 211 } 212 212 213 AddContainer(cont, obj->GetTitle() );213 AddContainer(cont, obj->GetTitle(), obj->GetScale()); 214 214 } 215 215 … … 223 223 // If you want to write only one data member of the container 224 224 // specify the name of the data member (eg. fAlpha) Make sure, 225 // that a "GetteMethod" for this data type exists (stri fthe f and225 // that a "GetteMethod" for this data type exists (strip the f and 226 226 // replace it by Get) 227 // 228 void MWriteAsciiFile::AddContainer(const char *cname, const char *member) 229 { 230 TNamed *named = new TNamed(cname, member); 231 fContNames.AddLast(named); 227 // If you specify a single data member you can add a scale-factor which 228 // is (in case of the data member being a floating point value) multiplied 229 // with the data member value. This is usefull if you are want to 230 // change the scale (unit) of a data member for writing (eg. 231 // writing degrees for the hillas parameters instead of the internally 232 // used millimeters) 233 // 234 void MWriteAsciiFile::AddContainer(const char *cname, const char *member, Double_t scale) 235 { 236 MScale *name = new MScale(cname, member, scale); 237 fContNames.AddLast(name); 232 238 } 233 239 … … 238 244 // If you want to write only one data member of the container 239 245 // specify the name of the data member (eg. fAlpha) Make sure, 240 // that a "GetteMethod" for this data type exists (stri fthe f and246 // that a "GetteMethod" for this data type exists (strip the f and 241 247 // replace it by Get) 242 // 243 void MWriteAsciiFile::AddContainer(MParContainer *cont, const char *member) 248 // If you specify a single data member you can add a scale-factor which 249 // is (in case of the data member being a floating point value) multiplied 250 // with the data member value. This is usefull if you are want to 251 // change the scale (unit) of a data member for writing (eg. 252 // writing degrees for the hillas parameters instead of the internally 253 // used millimeters) 254 // 255 void MWriteAsciiFile::AddContainer(MParContainer *cont, const char *member, Double_t scale) 244 256 { 245 257 fContainer.AddLast(cont); 246 258 247 TNamed *named = new TNamed(member, "");248 fMembers.AddLast(name d);249 } 250 259 MScale *name = new MScale(member, "", scale); 260 fMembers.AddLast(name); 261 } 262
Note:
See TracChangeset
for help on using the changeset viewer.