本文整理汇总了C++中MyClass::Write方法的典型用法代码示例。如果您正苦于以下问题:C++ MyClass::Write方法的具体用法?C++ MyClass::Write怎么用?C++ MyClass::Write使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MyClass
的用法示例。
在下文中一共展示了MyClass::Write方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: skipWrite
void skipWrite() {
MyClass m;
m.x = 100;
m.x1 = 1001;
m.x2 = 2002;
m.x3 = 3003;
m.x4 = 4004;
m.x5 = 5005;
m.x6 = 6006;
m.x7 = 7007;
m.x8 = 8008;
m.x9 = 9009;
m.x10 = 10010;
m.x11 = 110011;
m.x12 = 120012;
m.x13 = 130013;
m.pobj = new TNamed("pobj","pobj title");
m.skipObjectP = new TCut("CutNameP","Cut title for test skipObjectP");
m.skipTRefP = new TRef;
m.host1 = 10;
m.host2 = 20;
m.host3 = 30;
m.skipsize = 20;
m.skip3 = new Float_t[m.skipsize];
for(int n=0;n<m.skipsize;n++)
m.skip3[n] = 0;
m.skip3[5] = 555;
m.skipstr = new char[100];
strcpy((char*) m.skipstr,"Value of Char Start");
TFile* f = TFile::Open("skiptestfile.xml","recreate");
if (f) {
m.Write("abc");
delete f;
}
f = TFile::Open("skiptestfile.root","recreate");
m.Write("abc");
delete f;
}