Import Geant4 11.1.0.beta source tree
This commit is contained in:
+3
-3
@@ -44,8 +44,8 @@ public:
|
||||
bool fIsUnsigned;
|
||||
|
||||
short v;
|
||||
unsigned int s,c;
|
||||
if(!a_buffer.read_version(v,s,c)) return false;
|
||||
unsigned int _s,_c;
|
||||
if(!a_buffer.read_version(v,_s,_c)) return false;
|
||||
//FIXME if (v > 1) {
|
||||
//TLeaf::Class()->ReadBuffer(b, this, R__v, R__s, R__c);
|
||||
//FIXME } else {
|
||||
@@ -88,7 +88,7 @@ public:
|
||||
if(created) m_own_leaf_count = true;
|
||||
}}
|
||||
|
||||
if(!a_buffer.check_byte_count(s,c,"TLeaf")) return false;
|
||||
if(!a_buffer.check_byte_count(_s,_c,"TLeaf")) return false;
|
||||
|
||||
if(!m_length) m_length = 1;
|
||||
/*
|
||||
|
||||
+12
-12
@@ -56,10 +56,10 @@ public:
|
||||
uint32 fMaxBaskets;
|
||||
int fOffset;
|
||||
|
||||
unsigned int s,c;
|
||||
unsigned int _s,_c;
|
||||
//FIXME gROOT->SetReadingObject(kTRUE);
|
||||
short vers;
|
||||
if(!a_buffer.read_version(vers,s,c)) return false;
|
||||
if(!a_buffer.read_version(vers,_s,_c)) return false;
|
||||
|
||||
//::printf("debug : branch::stream : version %d count %d\n",vers,c);
|
||||
|
||||
@@ -338,12 +338,12 @@ public:
|
||||
return false;
|
||||
}
|
||||
for(int i=0;i<n;i++) {
|
||||
seek32 _s;
|
||||
if(!a_buffer.read(_s)) {
|
||||
seek32 _seek;
|
||||
if(!a_buffer.read(_seek)) {
|
||||
_clear();
|
||||
return false;
|
||||
}
|
||||
fBasketSeek[i] = _s;
|
||||
fBasketSeek[i] = _seek;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -389,12 +389,12 @@ public:
|
||||
}
|
||||
} else {
|
||||
for(uint32 i=0;i<fMaxBaskets;i++) {
|
||||
seek32 _s;
|
||||
if(!a_buffer.read(_s)) {
|
||||
seek32 _seek;
|
||||
if(!a_buffer.read(_seek)) {
|
||||
_clear();
|
||||
return false;
|
||||
}
|
||||
fBasketSeek[i] = _s;
|
||||
fBasketSeek[i] = _seek;
|
||||
}
|
||||
}}
|
||||
|
||||
@@ -458,7 +458,7 @@ public:
|
||||
|
||||
//FIXME if(vers<4) SetAutoDelete(kTRUE);
|
||||
//FIXME gROOT->SetReadingObject(kFALSE);
|
||||
if(!a_buffer.check_byte_count(s, c,"TBranch")) {
|
||||
if(!a_buffer.check_byte_count(_s, _c,"TBranch")) {
|
||||
_clear();
|
||||
return false;
|
||||
}
|
||||
@@ -749,10 +749,10 @@ public:
|
||||
num = mn<uint32>(num,10);
|
||||
if(!num) continue;
|
||||
|
||||
{std::string s;
|
||||
{std::string _s;
|
||||
uint32 len = uint32(bl->name().size())+128;
|
||||
sprintf(s,len," %-15s = ",bl->name().c_str());
|
||||
a_out << s;}
|
||||
sprintf(_s,len," %-15s = ",bl->name().c_str());
|
||||
a_out << _s;}
|
||||
|
||||
for(uint32 i=0;i<num;i++) {
|
||||
if(i) a_out << ", ";
|
||||
|
||||
+16
-16
@@ -39,10 +39,10 @@ public:
|
||||
_clear();
|
||||
|
||||
short v;
|
||||
unsigned int s, c;
|
||||
if(!a_buffer.read_version(v,s,c)) return false;
|
||||
unsigned int _s,_c;
|
||||
if(!a_buffer.read_version(v,_s,_c)) return false;
|
||||
|
||||
//::printf("debug : inlib::branch_element::stream : version %d, count %d\n",v,c);
|
||||
//::printf("debug : tools::branch_element::stream : version %d, count %d\n",v,c);
|
||||
|
||||
if(!parent::stream(a_buffer)) {
|
||||
m_out << "tools::rroot::branch_element::stream : parent::stream() failed." << std::endl;
|
||||
@@ -57,34 +57,34 @@ public:
|
||||
if(!a_buffer.read(fStreamerType)) return false;
|
||||
} else { //v>=8
|
||||
if(!a_buffer.read(fClassName)) return false;
|
||||
//::printf("debug : inlib::branch_element::stream : fClassName \"%s\"\n",fClassName.c_str());
|
||||
//::printf("debug : tools::branch_element::stream : fClassName \"%s\"\n",fClassName.c_str());
|
||||
std::string fParentName;
|
||||
if(!a_buffer.read(fParentName)) return false;
|
||||
//::printf("debug : inlib::branch_element::stream : fParentName \"%s\"\n",fParentName.c_str());
|
||||
//::printf("debug : tools::branch_element::stream : fParentName \"%s\"\n",fParentName.c_str());
|
||||
std::string fCloneName;
|
||||
if(!a_buffer.read(fCloneName)) return false;
|
||||
//::printf("debug : inlib::branch_element::stream : fCloneName \"%s\"\n",fCloneName.c_str());
|
||||
//::printf("debug : tools::branch_element::stream : fCloneName \"%s\"\n",fCloneName.c_str());
|
||||
int dummy_int;
|
||||
if(!a_buffer.read(dummy_int)) return false; //fCheckSum
|
||||
//::printf("debug : inlib::branch_element::stream : fCheckSum %d\n",dummy_int);
|
||||
//::printf("debug : tools::branch_element::stream : fCheckSum %d\n",dummy_int);
|
||||
|
||||
if(v>=10) {
|
||||
short dummy_short;
|
||||
if(!a_buffer.read(dummy_short)) return false; //fClassVersion
|
||||
//::printf("debug : inlib::branch_element::stream : fClassVersion %d\n",dummy_short);
|
||||
//::printf("debug : tools::branch_element::stream : fClassVersion %d\n",dummy_short);
|
||||
} else {
|
||||
if(!a_buffer.read(dummy_int)) return false; //fClassVersion
|
||||
}
|
||||
|
||||
if(!a_buffer.read(fID)) return false;
|
||||
//::printf("debug : inlib::branch_element::stream : fID %d\n",fID);
|
||||
//::printf("debug : tools::branch_element::stream : fID %d\n",fID);
|
||||
if(!a_buffer.read(fType)) return false;
|
||||
//::printf("debug : inlib::branch_element::stream : fType %d\n",fType);
|
||||
//::printf("debug : tools::branch_element::stream : fType %d\n",fType);
|
||||
if(!a_buffer.read(fStreamerType)) return false;
|
||||
//::printf("debug : inlib::branch_element::stream : fStreamerType %d\n",fStreamerType);
|
||||
//::printf("debug : tools::branch_element::stream : fStreamerType %d\n",fStreamerType);
|
||||
|
||||
if(!a_buffer.read(dummy_int)) return false; //fMaximum
|
||||
//::printf("debug : inlib::branch_element::stream : fMaximum %d\n",dummy_int);
|
||||
//::printf("debug : tools::branch_element::stream : fMaximum %d\n",dummy_int);
|
||||
|
||||
//TBranchElement* fBranchCount;
|
||||
ifac::args args;
|
||||
@@ -106,7 +106,7 @@ public:
|
||||
|
||||
}
|
||||
|
||||
if(!a_buffer.check_byte_count(s,c,"TBranchElement")) {_clear();return false;}
|
||||
if(!a_buffer.check_byte_count(_s,_c,"TBranchElement")) {_clear();return false;}
|
||||
return true;
|
||||
}
|
||||
public: //branch
|
||||
@@ -607,10 +607,10 @@ public: //branch
|
||||
uint32 n;
|
||||
if(!find_entry(a_file,a_entry,n)) return false;
|
||||
|
||||
{std::string s;
|
||||
{std::string _s;
|
||||
uint32 len = uint32(name().size())+128;
|
||||
sprintf(s,len," %-15s = ",name().c_str());
|
||||
a_out << s;}
|
||||
sprintf(_s,len," %-15s = ",name().c_str());
|
||||
a_out << _s;}
|
||||
|
||||
a_out << m_obj << std::endl;
|
||||
|
||||
|
||||
@@ -31,11 +31,11 @@ public:
|
||||
public:
|
||||
virtual bool stream(buffer& a_buffer) {
|
||||
short v;
|
||||
unsigned int s, c;
|
||||
if(!a_buffer.read_version(v,s,c)) return false;
|
||||
unsigned int _s,_c;
|
||||
if(!a_buffer.read_version(v,_s,_c)) return false;
|
||||
if(!parent::stream(a_buffer)) return false;
|
||||
if(!a_buffer.read(fClassName)) return false;
|
||||
if(!a_buffer.check_byte_count(s,c,"TBranchObject")) return false;
|
||||
if(!a_buffer.check_byte_count(_s,_c,"TBranchObject")) return false;
|
||||
return true;
|
||||
}
|
||||
public: //branch
|
||||
|
||||
+6
-6
@@ -139,17 +139,17 @@ protected:
|
||||
if(!parent::read(tag)) return false;
|
||||
|
||||
if(tag==kNewClassTag()) {
|
||||
char s[80];
|
||||
if(!read_string(s, 80)) {
|
||||
char _s[80];
|
||||
if(!read_string(_s, 80)) {
|
||||
m_out << "tools::rroot::read_class_tag :"
|
||||
<< " read string." << std::endl;
|
||||
return false;
|
||||
}
|
||||
//m_out << "tools::rroot::read_class_tag :"
|
||||
// << " tag kNewClassTag"
|
||||
// << " class " << s
|
||||
// << " class " << _s
|
||||
// << std::endl;
|
||||
a_class = s;
|
||||
a_class = _s;
|
||||
return true;
|
||||
|
||||
} else if(tag & kClassMask()) {
|
||||
@@ -661,7 +661,7 @@ inline bool pointer_stream(buffer& a_buffer,
|
||||
a_obj = (T*)obj->cast(a_T_class);
|
||||
if(!a_obj) {
|
||||
a_buffer.out() << "tools::rroot::pointer_stream : "
|
||||
<< " inlib::cast to " << a_T_class << " failed."
|
||||
<< " tools::cast to " << a_T_class << " failed."
|
||||
<< ". Object is a " << obj->s_cls() << "."
|
||||
<< std::endl;
|
||||
if(a_created) delete obj;
|
||||
@@ -691,7 +691,7 @@ inline bool pointer_stream(buffer& a_buffer,
|
||||
a_obj = (T*)obj->cast(a_T_class);
|
||||
if(!a_obj) {
|
||||
a_buffer.out() << "tools::rroot::pointer_stream : "
|
||||
<< " inlib::cast to " << a_T_class << " failed."
|
||||
<< " tools::cast to " << a_T_class << " failed."
|
||||
<< ". Object is a " << obj->s_cls() << "."
|
||||
<< std::endl;
|
||||
if(a_created) delete obj;
|
||||
|
||||
+4
-4
@@ -43,10 +43,10 @@ public:
|
||||
//the below code skips correctly the data in the file.
|
||||
uint32 startpos = a_buffer.length();
|
||||
short v;
|
||||
unsigned int s,c;
|
||||
if(!a_buffer.read_version(v,s,c)) return false;
|
||||
a_buffer.set_offset(startpos+c+sizeof(unsigned int));
|
||||
if(!a_buffer.check_byte_count(s,c,"dummy")) return false;
|
||||
unsigned int _s,_c;
|
||||
if(!a_buffer.read_version(v,_s,_c)) return false;
|
||||
a_buffer.set_offset(startpos+_c+sizeof(unsigned int));
|
||||
if(!a_buffer.check_byte_count(_s,_c,"dummy")) return false;
|
||||
return true;
|
||||
}
|
||||
public:
|
||||
|
||||
+4
-4
@@ -39,10 +39,10 @@ public:
|
||||
virtual bool stream(buffer& a_buffer) {
|
||||
uint32 startpos = a_buffer.length();
|
||||
short v;
|
||||
unsigned int s,c;
|
||||
if(!a_buffer.read_version(v,s,c)) return false;
|
||||
a_buffer.set_offset(startpos+c+sizeof(unsigned int));
|
||||
if(!a_buffer.check_byte_count(s,c,s_store_class())) return false;
|
||||
unsigned int _s,_c;
|
||||
if(!a_buffer.read_version(v,_s,_c)) return false;
|
||||
a_buffer.set_offset(startpos+_c+sizeof(unsigned int));
|
||||
if(!a_buffer.check_byte_count(_s,_c,s_store_class())) return false;
|
||||
return true;
|
||||
}
|
||||
public:
|
||||
|
||||
+13
-13
@@ -38,8 +38,8 @@ public: //iro
|
||||
|
||||
virtual bool stream(buffer& a_buffer) {
|
||||
short v;
|
||||
unsigned int s, c;
|
||||
if(!a_buffer.read_version(v,s,c)) return false;
|
||||
unsigned int _s,_c;
|
||||
if(!a_buffer.read_version(v,_s,_c)) return false;
|
||||
if(!Named_stream(a_buffer,fName,fTitle)) return false;
|
||||
if(!a_buffer.read(fType)) return false;
|
||||
if(!a_buffer.read(fSize)) return false;
|
||||
@@ -47,16 +47,16 @@ public: //iro
|
||||
if(!a_buffer.read(fArrayDim)) return false;
|
||||
if(!a_buffer.read_fast_array<int>(fMaxIndex,5)) return false;
|
||||
if(!a_buffer.read(fTypeName)) return false;
|
||||
return a_buffer.check_byte_count(s,c,s_store_class());
|
||||
return a_buffer.check_byte_count(_s,_c,s_store_class());
|
||||
}
|
||||
public:
|
||||
virtual void out(std::ostream& aOut) const {
|
||||
std::string _fname;
|
||||
fullName(_fname);
|
||||
char s[128];
|
||||
snpf(s,sizeof(s)," %-14s%-15s offset=%3d type=%2d %-20s",
|
||||
char _s[128];
|
||||
snpf(_s,sizeof(_s)," %-14s%-15s offset=%3d type=%2d %-20s",
|
||||
fTypeName.c_str(),_fname.c_str(),fOffset,fType,fTitle.c_str());
|
||||
aOut << s << std::endl;
|
||||
aOut << _s << std::endl;
|
||||
}
|
||||
public:
|
||||
streamer_element()
|
||||
@@ -130,13 +130,13 @@ public: //iro
|
||||
//the below code skips correctly the data in the file.
|
||||
uint32 startpos = a_buffer.length();
|
||||
short v;
|
||||
unsigned int s,c;
|
||||
if(!a_buffer.read_version(v,s,c)) return false;
|
||||
unsigned int _s,_c;
|
||||
if(!a_buffer.read_version(v,_s,_c)) return false;
|
||||
|
||||
if(!parent::stream(a_buffer)) return false;
|
||||
|
||||
a_buffer.set_offset(startpos+c+sizeof(unsigned int));
|
||||
if(!a_buffer.check_byte_count(s,c,"dummy_streamer_element")) return false;
|
||||
a_buffer.set_offset(startpos+_c+sizeof(unsigned int));
|
||||
if(!a_buffer.check_byte_count(_s,_c,"dummy_streamer_element")) return false;
|
||||
return true;
|
||||
}
|
||||
public:
|
||||
@@ -175,8 +175,8 @@ public: //iro
|
||||
|
||||
virtual bool stream(buffer& a_buffer) {
|
||||
short v;
|
||||
unsigned int s, c;
|
||||
if(!a_buffer.read_version(v,s,c)) return false;
|
||||
unsigned int _s,_c;
|
||||
if(!a_buffer.read_version(v,_s,_c)) return false;
|
||||
|
||||
if(!Named_stream(a_buffer,m_name,m_title)) return false;
|
||||
if(!a_buffer.read(m_check_sum)) return false;
|
||||
@@ -196,7 +196,7 @@ public: //iro
|
||||
if(obj) m_elements.operator=(*obj);
|
||||
if(obj_created) delete obj;}
|
||||
|
||||
return a_buffer.check_byte_count(s,c,s_store_class());
|
||||
return a_buffer.check_byte_count(_s,_c,s_store_class());
|
||||
}
|
||||
public:
|
||||
void out(std::ostream& a_out) const {
|
||||
|
||||
+12
-12
@@ -78,12 +78,12 @@ public:
|
||||
virtual iro* copy() const {return new leaf<T>(*this);}
|
||||
virtual bool stream(buffer& a_buffer) {
|
||||
short v;
|
||||
unsigned int s,c;
|
||||
if(!a_buffer.read_version(v,s,c)) return false;
|
||||
unsigned int _s,_c;
|
||||
if(!a_buffer.read_version(v,_s,_c)) return false;
|
||||
if(!base_leaf::stream(a_buffer)) return false;
|
||||
if(!a_buffer.read(m_min)) return false;
|
||||
if(!a_buffer.read(m_max)) return false;
|
||||
if(!a_buffer.check_byte_count(s,c,leaf_store_class(T()))) return false;
|
||||
if(!a_buffer.check_byte_count(_s,_c,leaf_store_class(T()))) return false;
|
||||
return true;
|
||||
}
|
||||
public: //base_leaf
|
||||
@@ -230,12 +230,12 @@ public:
|
||||
virtual iro* copy() const {return new leaf_string(*this);}
|
||||
virtual bool stream(buffer& a_buffer) {
|
||||
short v;
|
||||
unsigned int s,c;
|
||||
if(!a_buffer.read_version(v,s,c)) return false;
|
||||
unsigned int _s,_c;
|
||||
if(!a_buffer.read_version(v,_s,_c)) return false;
|
||||
if(!base_leaf::stream(a_buffer)) return false;
|
||||
if(!a_buffer.read(m_min)) return false;
|
||||
if(!a_buffer.read(m_max)) return false;
|
||||
if(!a_buffer.check_byte_count(s,c,s_store_class())) return false;
|
||||
if(!a_buffer.check_byte_count(_s,_c,s_store_class())) return false;
|
||||
return true;
|
||||
}
|
||||
public: //base_leaf
|
||||
@@ -337,12 +337,12 @@ public:
|
||||
virtual iro* copy() const {return new leaf_element(*this);}
|
||||
virtual bool stream(buffer& a_buffer) {
|
||||
short v;
|
||||
unsigned int s,c;
|
||||
if(!a_buffer.read_version(v,s,c)) return false;
|
||||
unsigned int _s,_c;
|
||||
if(!a_buffer.read_version(v,_s,_c)) return false;
|
||||
if(!base_leaf::stream(a_buffer)) return false;
|
||||
if(!a_buffer.read(fID)) return false;
|
||||
if(!a_buffer.read(fType)) return false;
|
||||
if(!a_buffer.check_byte_count(s,c,s_store_class())) return false;
|
||||
if(!a_buffer.check_byte_count(_s,_c,s_store_class())) return false;
|
||||
return true;
|
||||
}
|
||||
public: //base_leaf
|
||||
@@ -401,11 +401,11 @@ public:
|
||||
virtual iro* copy() const {return new leaf_object(*this);}
|
||||
virtual bool stream(buffer& a_buffer) {
|
||||
short v;
|
||||
unsigned int s,c;
|
||||
if(!a_buffer.read_version(v,s,c)) return false;
|
||||
unsigned int _s,_c;
|
||||
if(!a_buffer.read_version(v,_s,_c)) return false;
|
||||
if(!base_leaf::stream(a_buffer)) return false;
|
||||
if(!a_buffer.read(fVirtual)) return false;
|
||||
if(!a_buffer.check_byte_count(s,c,s_store_class())) return false;
|
||||
if(!a_buffer.check_byte_count(_s,_c,s_store_class())) return false;
|
||||
return true;
|
||||
}
|
||||
public: //base_leaf
|
||||
|
||||
+3
-3
@@ -38,9 +38,9 @@ public:
|
||||
}
|
||||
public:
|
||||
virtual bool stream(buffer& a_buffer) {
|
||||
unsigned int s, c;
|
||||
unsigned int _s,_c;
|
||||
short v;
|
||||
if(!a_buffer.read_version(v,s,c)) return false;
|
||||
if(!a_buffer.read_version(v,_s,_c)) return false;
|
||||
|
||||
//printf("debug : tools::rroot::matrix::stream : version %d\n",v);
|
||||
|
||||
@@ -63,7 +63,7 @@ public:
|
||||
//Real_t* Elements; //[fNelems]
|
||||
if(!dummy_array_stream<float>(a_buffer,Nelems)) return false;
|
||||
|
||||
if(!a_buffer.check_byte_count(s,c,s_store_class())) return false;
|
||||
if(!a_buffer.check_byte_count(_s,_c,s_store_class())) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+18
-18
@@ -14,34 +14,34 @@ namespace rroot {
|
||||
|
||||
inline bool Named_stream(buffer& a_buffer,std::string& a_name,std::string& a_title) {
|
||||
short v;
|
||||
unsigned int s, c;
|
||||
if(!a_buffer.read_version(v,s,c)) return false;
|
||||
unsigned int _s, _c;
|
||||
if(!a_buffer.read_version(v,_s,_c)) return false;
|
||||
{uint32 id,bits;
|
||||
if(!Object_stream(a_buffer,id,bits)) return false;}
|
||||
if(!a_buffer.read(a_name)) return false;
|
||||
if(!a_buffer.read(a_title)) return false;
|
||||
if(!a_buffer.check_byte_count(s,c,"TNamed")) return false;
|
||||
if(!a_buffer.check_byte_count(_s,_c,"TNamed")) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
inline bool AttLine_stream(buffer& a_buffer,short& a_color,short& a_style,short& a_width){
|
||||
short v;
|
||||
unsigned int s, c;
|
||||
if(!a_buffer.read_version(v,s,c)) return false;
|
||||
unsigned int _s, _c;
|
||||
if(!a_buffer.read_version(v,_s,_c)) return false;
|
||||
if(!a_buffer.read(a_color)) return false;
|
||||
if(!a_buffer.read(a_style)) return false;
|
||||
if(!a_buffer.read(a_width)) return false;
|
||||
if(!a_buffer.check_byte_count(s,c,"TAttLine")) return false;
|
||||
if(!a_buffer.check_byte_count(_s,_c,"TAttLine")) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
inline bool AttFill_stream(buffer& a_buffer,short& a_color,short& a_style){
|
||||
short v;
|
||||
unsigned int s, c;
|
||||
if(!a_buffer.read_version(v,s,c)) return false;
|
||||
unsigned int _s, _c;
|
||||
if(!a_buffer.read_version(v,_s,_c)) return false;
|
||||
if(!a_buffer.read(a_color)) return false;
|
||||
if(!a_buffer.read(a_style)) return false;
|
||||
if(!a_buffer.check_byte_count(s,c,"TAttFill")) return false;
|
||||
if(!a_buffer.check_byte_count(_s,_c,"TAttFill")) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -50,30 +50,30 @@ inline bool AttMarker_stream(buffer& a_buffer) {
|
||||
short fMarkerStyle;
|
||||
float fMarkerWidth;
|
||||
short v;
|
||||
unsigned int s, c;
|
||||
if(!a_buffer.read_version(v,s,c)) return false;
|
||||
unsigned int _s, _c;
|
||||
if(!a_buffer.read_version(v,_s,_c)) return false;
|
||||
if(!a_buffer.read(fMarkerColor)) return false;
|
||||
if(!a_buffer.read(fMarkerStyle)) return false;
|
||||
if(!a_buffer.read(fMarkerWidth)) return false;
|
||||
if(!a_buffer.check_byte_count(s,c,"TAttMarker")) return false;
|
||||
if(!a_buffer.check_byte_count(_s,_c,"TAttMarker")) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
inline bool GeoAtt_stream(buffer& a_buffer) {
|
||||
unsigned int fGeoAtt; // option flags
|
||||
short v;
|
||||
unsigned int s, c;
|
||||
if(!a_buffer.read_version(v,s,c)) return false;
|
||||
unsigned int _s, _c;
|
||||
if(!a_buffer.read_version(v,_s,_c)) return false;
|
||||
if(!a_buffer.read(fGeoAtt)) return false;
|
||||
if(!a_buffer.check_byte_count(s,c,"TGeoAtt")) return false;
|
||||
if(!a_buffer.check_byte_count(_s,_c,"TGeoAtt")) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
inline bool Att3D_stream(buffer& a_buffer) {
|
||||
short v;
|
||||
unsigned int s, c;
|
||||
if(!a_buffer.read_version(v,s,c)) return false;
|
||||
if(!a_buffer.check_byte_count(s,c,"TAtt3D")) return false;
|
||||
unsigned int _s, _c;
|
||||
if(!a_buffer.read_version(v,_s,_c)) return false;
|
||||
if(!a_buffer.check_byte_count(_s,_c,"TAtt3D")) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -77,7 +77,7 @@ public:
|
||||
T* obj = safe_cast<iro,T>(*_obj);
|
||||
if(!obj) {
|
||||
m_fac.out() << "tools::rroot::obj_array::obj_array :"
|
||||
<< " inlib::cast failed."
|
||||
<< " tools::cast failed."
|
||||
<< std::endl;
|
||||
delete _obj;
|
||||
parent::push_back(0);
|
||||
@@ -104,7 +104,7 @@ public:
|
||||
T* obj = safe_cast<iro,T>(*_obj);
|
||||
if(!obj) {
|
||||
m_fac.out() << "tools::rroot::obj_array::operator= :"
|
||||
<< " inlib::cast failed."
|
||||
<< " tools::cast failed."
|
||||
<< std::endl;
|
||||
delete _obj;
|
||||
parent::push_back(0);
|
||||
@@ -160,7 +160,7 @@ public:
|
||||
T* to = safe_cast<iro,T>(*obj);
|
||||
if(!to) {
|
||||
a_buffer.out() << "tools::rroot::obj_array::stream :"
|
||||
<< " inlib::cast failed."
|
||||
<< " tools::cast failed."
|
||||
<< " " << obj->s_cls() << " is not a " << T::s_class() << "."
|
||||
<< std::endl;
|
||||
if(created) {
|
||||
|
||||
+3
-3
@@ -48,8 +48,8 @@ public:
|
||||
safe_clear();
|
||||
|
||||
short v;
|
||||
unsigned int s, c;
|
||||
if(!a_buffer.read_version(v,s,c)) return false;
|
||||
unsigned int _s,_c;
|
||||
if(!a_buffer.read_version(v,_s,_c)) return false;
|
||||
|
||||
//::printf("debug : obj_list::stream : version %d, byte count %d\n",v,c);
|
||||
|
||||
@@ -93,7 +93,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
return a_buffer.check_byte_count(s,c,s_store_class());
|
||||
return a_buffer.check_byte_count(_s,_c,s_store_class());
|
||||
}
|
||||
public:
|
||||
obj_list(ifac& a_fac)
|
||||
|
||||
@@ -51,6 +51,7 @@ inline TDirectory* find_dir(directory& a_dir,const std::string& a_name) {
|
||||
out << "tools::rroot::find_dir :"
|
||||
<< " can't stream TDirectory."
|
||||
<< std::endl;
|
||||
delete tdir;
|
||||
return 0;
|
||||
}
|
||||
return tdir;
|
||||
|
||||
+3
-3
@@ -248,9 +248,9 @@ public:
|
||||
int n;
|
||||
if(!read(n)) {a_a.clear();return false;}
|
||||
for(int index=0;index<n;index++) {
|
||||
std::string s;
|
||||
if(!read(s)) {a_a.clear();return false;}
|
||||
a_a.push_back(s);
|
||||
std::string _s;
|
||||
if(!read(_s)) {a_a.clear();return false;}
|
||||
a_a.push_back(_s);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
+10
-10
@@ -42,8 +42,8 @@ public:
|
||||
std::vector<T>::clear();
|
||||
|
||||
short v;
|
||||
unsigned int s, c;
|
||||
if(!a_buffer.read_version(v,s,c)) return false;
|
||||
unsigned int _s,_c;
|
||||
if(!a_buffer.read_version(v,_s,_c)) return false;
|
||||
|
||||
//::printf("debug : stl_vector::stream<%s> : version %d, byte count %d\n",
|
||||
// stype(T()).c_str(),v,c);
|
||||
@@ -67,7 +67,7 @@ public:
|
||||
delete [] vec;
|
||||
}
|
||||
|
||||
return a_buffer.check_byte_count(s,c,s_store_class());
|
||||
return a_buffer.check_byte_count(_s,_c,s_store_class());
|
||||
}
|
||||
public:
|
||||
stl_vector(){
|
||||
@@ -128,8 +128,8 @@ public:
|
||||
std::vector<vec_t>::clear();
|
||||
|
||||
short v;
|
||||
unsigned int s, c;
|
||||
if(!a_buffer.read_version(v,s,c)) return false;
|
||||
unsigned int _s,_c;
|
||||
if(!a_buffer.read_version(v,_s,_c)) return false;
|
||||
|
||||
//::printf("debug : stl_vector_vector::stream<%s> : version %d, byte count %d\n",stype(T()).c_str(),v,c);
|
||||
|
||||
@@ -161,7 +161,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
return a_buffer.check_byte_count(s,c,s_store_class());
|
||||
return a_buffer.check_byte_count(_s,_c,s_store_class());
|
||||
}
|
||||
public:
|
||||
stl_vector_vector(){
|
||||
@@ -220,8 +220,8 @@ public:
|
||||
//WARNING : not tested yet.
|
||||
|
||||
short v;
|
||||
unsigned int s, c;
|
||||
if(!a_buffer.read_version(v,s,c)) return false;
|
||||
unsigned int _s,_c;
|
||||
if(!a_buffer.read_version(v,_s,_c)) return false;
|
||||
|
||||
//::printf("debug : stl_vector_string::stream : version %d, byte count %d\n",v,c);
|
||||
|
||||
@@ -239,9 +239,9 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
//a_buffer.set_offset(startpos+c+sizeof(unsigned int));
|
||||
//a_buffer.set_offset(startpos+_c+sizeof(unsigned int));
|
||||
|
||||
return a_buffer.check_byte_count(s,c,s_store_class());
|
||||
return a_buffer.check_byte_count(_s,_c,s_store_class());
|
||||
}
|
||||
public:
|
||||
stl_vector_string(){
|
||||
|
||||
+36
-36
@@ -51,8 +51,8 @@ inline bool AttAxis_stream(buffer& a_buffer){
|
||||
|
||||
// Version 4 streaming (ROOT/v3-00-6).
|
||||
short v;
|
||||
unsigned int s, c;
|
||||
if(!a_buffer.read_version(v,s,c)) return false;
|
||||
unsigned int _s,_c;
|
||||
if(!a_buffer.read_version(v,_s,_c)) return false;
|
||||
|
||||
if(!a_buffer.read(fNdivisions)) return false;
|
||||
if(!a_buffer.read(fAxisColor)) return false;
|
||||
@@ -66,15 +66,15 @@ inline bool AttAxis_stream(buffer& a_buffer){
|
||||
if(!a_buffer.read(fTitleColor)) return false;
|
||||
if(!a_buffer.read(fTitleFont)) return false;
|
||||
|
||||
if(!a_buffer.check_byte_count(s, c,"TAttAxis")) return false;
|
||||
if(!a_buffer.check_byte_count(_s,_c,"TAttAxis")) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
inline bool Axis_stream(buffer& a_buffer,histo::axis<double,unsigned int>& a_fAxis){
|
||||
// Version 6 streaming (ROOT/v3-00-6).
|
||||
short v;
|
||||
unsigned int s, c;
|
||||
if(!a_buffer.read_version(v,s,c)) return false;
|
||||
unsigned int _s,_c;
|
||||
if(!a_buffer.read_version(v,_s,_c)) return false;
|
||||
|
||||
std::string name;
|
||||
std::string title;
|
||||
@@ -127,7 +127,7 @@ inline bool Axis_stream(buffer& a_buffer,histo::axis<double,unsigned int>& a_fAx
|
||||
if(!dummy_TXxx_pointer_stream(a_buffer,fac)) return false;
|
||||
}
|
||||
|
||||
if(!a_buffer.check_byte_count(s,c,"TAxis")) return false;
|
||||
if(!a_buffer.check_byte_count(_s,_c,"TAxis")) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -143,9 +143,9 @@ inline bool TH_read_1D(buffer& a_buffer,hd_data& a_data,
|
||||
a_Sxw = 0;
|
||||
a_Sx2w = 0;
|
||||
|
||||
unsigned int s, c;
|
||||
unsigned int _s,_c;
|
||||
short vers;
|
||||
if(!a_buffer.read_version(vers,s,c)) return false;
|
||||
if(!a_buffer.read_version(vers,_s,_c)) return false;
|
||||
|
||||
//::printf("debug : tools::rroot::TH_read_1D : version %d\n",vers);
|
||||
|
||||
@@ -275,7 +275,7 @@ inline bool TH_read_1D(buffer& a_buffer,hd_data& a_data,
|
||||
a_data.m_bin_Sw2.assign(binn,0);
|
||||
}
|
||||
|
||||
if(!a_buffer.check_byte_count(s,c,"TH")) return false;
|
||||
if(!a_buffer.check_byte_count(_s,_c,"TH")) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -284,9 +284,9 @@ inline bool TH_read_1D(buffer& a_buffer,hd_data& a_data,
|
||||
inline bool TH_read_2D(buffer& a_buffer,hd_data& a_data,
|
||||
double& a_entries,double& a_Sw,double& a_Sw2,
|
||||
double& a_Sxw,double& a_Sx2w,double& a_Syw,double& a_Sy2w){
|
||||
unsigned int s, c;
|
||||
unsigned int _s,_c;
|
||||
short v;
|
||||
if(!a_buffer.read_version(v,s,c)) return false;
|
||||
if(!a_buffer.read_version(v,_s,_c)) return false;
|
||||
|
||||
// Version 3 streaming (ROOT/v3-00-6).
|
||||
|
||||
@@ -306,7 +306,7 @@ inline bool TH_read_2D(buffer& a_buffer,hd_data& a_data,
|
||||
if(!a_buffer.read(Tsumwxy)) return false;
|
||||
a_data.m_in_range_plane_Sxyw[0] = Tsumwxy;
|
||||
|
||||
if(!a_buffer.check_byte_count(s,c,"TH2")) return false;
|
||||
if(!a_buffer.check_byte_count(_s,_c,"TH2")) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -316,9 +316,9 @@ inline bool TH_read_3D(buffer& a_buffer,hd_data& a_data,
|
||||
double& a_Sxw,double& a_Sx2w,
|
||||
double& a_Syw,double& a_Sy2w,
|
||||
double& a_Szw,double& a_Sz2w){
|
||||
unsigned int s, c;
|
||||
unsigned int _s,_c;
|
||||
short v;
|
||||
if(!a_buffer.read_version(v,s,c)) return false;
|
||||
if(!a_buffer.read_version(v,_s,_c)) return false;
|
||||
|
||||
if(!TH_read_1D(a_buffer,a_data,a_entries,a_Sw,a_Sw2,a_Sxw,a_Sx2w)) return false;
|
||||
if(!Att3D_stream(a_buffer)) return false;
|
||||
@@ -345,15 +345,15 @@ inline bool TH_read_3D(buffer& a_buffer,hd_data& a_data,
|
||||
a_data.m_in_range_plane_Sxyw[1] = Tsumwyz;
|
||||
a_data.m_in_range_plane_Sxyw[2] = Tsumwxz;
|
||||
|
||||
if(!a_buffer.check_byte_count(s,c,"TH3")) return false;
|
||||
if(!a_buffer.check_byte_count(_s,_c,"TH3")) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
inline histo::h1d* TH1F_stream(buffer& a_buffer){
|
||||
unsigned int s, c;
|
||||
unsigned int _s,_c;
|
||||
short v;
|
||||
if(!a_buffer.read_version(v,s,c)) return 0;
|
||||
if(!a_buffer.read_version(v,_s,_c)) return 0;
|
||||
|
||||
// Version 1 streaming (ROOT/v3-00-6).
|
||||
|
||||
@@ -379,7 +379,7 @@ inline histo::h1d* TH1F_stream(buffer& a_buffer){
|
||||
|
||||
std::vector<float> bins; //fArray TArrayF
|
||||
if(!Array_stream<float>(a_buffer,bins)) return 0;
|
||||
if(!a_buffer.check_byte_count(s,c,"TH1F")) return 0;
|
||||
if(!a_buffer.check_byte_count(_s,_c,"TH1F")) return 0;
|
||||
|
||||
unsigned int binn = data.m_bin_number;
|
||||
data.m_bin_Sw.resize(binn,0);
|
||||
@@ -407,9 +407,9 @@ inline histo::h1d* TH1F_stream(buffer& a_buffer){
|
||||
}
|
||||
|
||||
inline histo::h1d* TH1D_stream(buffer& a_buffer){
|
||||
unsigned int s, c;
|
||||
unsigned int _s,_c;
|
||||
short v;
|
||||
if(!a_buffer.read_version(v,s,c)) return 0;
|
||||
if(!a_buffer.read_version(v,_s,_c)) return 0;
|
||||
|
||||
// Version 1 streaming (ROOT/v3-00-6).
|
||||
|
||||
@@ -433,7 +433,7 @@ inline histo::h1d* TH1D_stream(buffer& a_buffer){
|
||||
|
||||
std::vector<double> bins; //fArray TArrayD
|
||||
if(!Array_stream<double>(a_buffer,bins)) return 0;
|
||||
if(!a_buffer.check_byte_count(s,c,"TH1D")) return 0;
|
||||
if(!a_buffer.check_byte_count(_s,_c,"TH1D")) return 0;
|
||||
|
||||
unsigned int binn = data.m_bin_number;
|
||||
data.m_bin_Sw = bins;
|
||||
@@ -459,9 +459,9 @@ inline histo::h1d* TH1D_stream(buffer& a_buffer){
|
||||
}
|
||||
|
||||
inline histo::h2d* TH2F_stream(buffer& a_buffer){
|
||||
unsigned int s, c;
|
||||
unsigned int _s,_c;
|
||||
short v;
|
||||
if(!a_buffer.read_version(v,s,c)) return 0;
|
||||
if(!a_buffer.read_version(v,_s,_c)) return 0;
|
||||
|
||||
// Version 3 streaming (ROOT/v3-00-6).
|
||||
|
||||
@@ -490,7 +490,7 @@ inline histo::h2d* TH2F_stream(buffer& a_buffer){
|
||||
|
||||
std::vector<float> bins; //fArray TArrayF
|
||||
if(!Array_stream<float>(a_buffer,bins)) return 0;
|
||||
if(!a_buffer.check_byte_count(s,c,"TH2F")) return 0;
|
||||
if(!a_buffer.check_byte_count(_s,_c,"TH2F")) return 0;
|
||||
|
||||
unsigned int binn = data.m_bin_number;
|
||||
data.m_bin_Sw.resize(binn,0);
|
||||
@@ -521,9 +521,9 @@ inline histo::h2d* TH2F_stream(buffer& a_buffer){
|
||||
}
|
||||
|
||||
inline histo::h2d* TH2D_stream(buffer& a_buffer){
|
||||
unsigned int s, c;
|
||||
unsigned int _s,_c;
|
||||
short v;
|
||||
if(!a_buffer.read_version(v,s,c)) return 0;
|
||||
if(!a_buffer.read_version(v,_s,_c)) return 0;
|
||||
|
||||
// Version 3 streaming (ROOT/v3-00-6).
|
||||
|
||||
@@ -552,7 +552,7 @@ inline histo::h2d* TH2D_stream(buffer& a_buffer){
|
||||
|
||||
std::vector<double> bins; //fArray TArrayD
|
||||
if(!Array_stream<double>(a_buffer,bins)) return 0;
|
||||
if(!a_buffer.check_byte_count(s,c,"TH2D")) return 0;
|
||||
if(!a_buffer.check_byte_count(_s,_c,"TH2D")) return 0;
|
||||
|
||||
unsigned int binn = data.m_bin_number;
|
||||
data.m_bin_Sw = bins;
|
||||
@@ -580,9 +580,9 @@ inline histo::h2d* TH2D_stream(buffer& a_buffer){
|
||||
}
|
||||
|
||||
inline histo::h3d* TH3D_stream(buffer& a_buffer){
|
||||
unsigned int s, c;
|
||||
unsigned int _s,_c;
|
||||
short v;
|
||||
if(!a_buffer.read_version(v,s,c)) return 0;
|
||||
if(!a_buffer.read_version(v,_s,_c)) return 0;
|
||||
|
||||
// Now we have to reconstruct a valid Histogram from a_buffer :
|
||||
hd_data data;
|
||||
@@ -611,7 +611,7 @@ inline histo::h3d* TH3D_stream(buffer& a_buffer){
|
||||
|
||||
std::vector<double> bins; //fArray TArrayD
|
||||
if(!Array_stream<double>(a_buffer,bins)) return 0;
|
||||
if(!a_buffer.check_byte_count(s,c,"TH3D")) return 0;
|
||||
if(!a_buffer.check_byte_count(_s,_c,"TH3D")) return 0;
|
||||
|
||||
unsigned int binn = data.m_bin_number;
|
||||
data.m_bin_Sw = bins;
|
||||
@@ -641,9 +641,9 @@ inline histo::h3d* TH3D_stream(buffer& a_buffer){
|
||||
}
|
||||
|
||||
inline histo::p1d* TProfile_stream(buffer& a_buffer){
|
||||
unsigned int s, c;
|
||||
unsigned int _s,_c;
|
||||
short v;
|
||||
if(!a_buffer.read_version(v,s,c)) return 0;
|
||||
if(!a_buffer.read_version(v,_s,_c)) return 0;
|
||||
|
||||
// Version 3 streaming (ROOT/v3-00-6).
|
||||
|
||||
@@ -680,7 +680,7 @@ inline histo::p1d* TProfile_stream(buffer& a_buffer){
|
||||
if(!Array_stream<double>(a_buffer,bins_sumw2)) return 0;
|
||||
}
|
||||
|
||||
if(!a_buffer.check_byte_count(s,c,"TProfile")) return 0;
|
||||
if(!a_buffer.check_byte_count(_s,_c,"TProfile")) return 0;
|
||||
|
||||
data.m_is_profile = true;
|
||||
data.m_cut_v = true;
|
||||
@@ -710,9 +710,9 @@ inline histo::p1d* TProfile_stream(buffer& a_buffer){
|
||||
}
|
||||
|
||||
inline histo::p2d* TProfile2D_stream(buffer& a_buffer){
|
||||
unsigned int s, c;
|
||||
unsigned int _s,_c;
|
||||
short v;
|
||||
if(!a_buffer.read_version(v,s,c)) return 0;
|
||||
if(!a_buffer.read_version(v,_s,_c)) return 0;
|
||||
|
||||
// Version 3 streaming (ROOT/v3-00-6).
|
||||
|
||||
@@ -747,7 +747,7 @@ inline histo::p2d* TProfile2D_stream(buffer& a_buffer){
|
||||
std::vector<double> bins_sumw2; //fBinSumw2 TArrayD
|
||||
if(!Array_stream<double>(a_buffer,bins_sumw2)) return 0;
|
||||
}
|
||||
if(!a_buffer.check_byte_count(s,c,"TProfile2D")) return 0;
|
||||
if(!a_buffer.check_byte_count(_s,_c,"TProfile2D")) return 0;
|
||||
|
||||
data.m_is_profile = true;
|
||||
data.m_cut_v = true;
|
||||
|
||||
+3
-3
@@ -133,8 +133,8 @@ public:
|
||||
//uint64 m_saved_bytes;
|
||||
|
||||
short vers;
|
||||
unsigned int s, c;
|
||||
if(!a_buffer.read_version(vers,s,c)) return false;
|
||||
unsigned int _s,_c;
|
||||
if(!a_buffer.read_version(vers,_s,_c)) return false;
|
||||
|
||||
//::printf("debug : tree::stream : version %d count %d\n",vers,c);
|
||||
|
||||
@@ -385,7 +385,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
if(!a_buffer.check_byte_count(s,c,TTree_cls())) return false;
|
||||
if(!a_buffer.check_byte_count(_s,_c,TTree_cls())) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
+7
-7
@@ -36,9 +36,9 @@ public:
|
||||
virtual bool stream(buffer& a_buffer) {
|
||||
uint32 startpos = a_buffer.length();
|
||||
|
||||
unsigned int s,c;
|
||||
unsigned int _s,_c;
|
||||
short v;
|
||||
if(!a_buffer.read_version(v,s,c)) return false;
|
||||
if(!a_buffer.read_version(v,_s,_c)) return false;
|
||||
//::printf("debug : tree_index::stream : version %d count %d\n",v,c);
|
||||
|
||||
if(!virtual_index_stream(a_buffer)) return false;
|
||||
@@ -58,9 +58,9 @@ public:
|
||||
|
||||
//FIXME : still problem with this streamer.
|
||||
|
||||
a_buffer.set_offset(startpos+c+sizeof(unsigned int));
|
||||
a_buffer.set_offset(startpos+_c+sizeof(unsigned int));
|
||||
|
||||
if(!a_buffer.check_byte_count(s,c,s_store_class())) return false;
|
||||
if(!a_buffer.check_byte_count(_s,_c,s_store_class())) return false;
|
||||
|
||||
//::printf("debug : tree_index::stream : ok\n");
|
||||
return true;
|
||||
@@ -88,12 +88,12 @@ protected:
|
||||
}
|
||||
bool virtual_index_stream(buffer& a_buffer){
|
||||
short v;
|
||||
unsigned int s, c;
|
||||
if(!a_buffer.read_version(v,s,c)) return false;
|
||||
unsigned int _s,_c;
|
||||
if(!a_buffer.read_version(v,_s,_c)) return false;
|
||||
//::printf("debug : virtual_index::stream : version %d count %d\n",v,c);
|
||||
std::string ds;
|
||||
if(!Named_stream(a_buffer,ds,ds)) return false;
|
||||
if(!a_buffer.check_byte_count(s,c,virtual_index_s_store_class()))
|
||||
if(!a_buffer.check_byte_count(_s,_c,virtual_index_s_store_class()))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
+3
-3
@@ -38,9 +38,9 @@ public:
|
||||
}
|
||||
public:
|
||||
virtual bool stream(buffer& a_buffer) {
|
||||
unsigned int s, c;
|
||||
unsigned int _s,_c;
|
||||
short v;
|
||||
if(!a_buffer.read_version(v,s,c)) return false;
|
||||
if(!a_buffer.read_version(v,_s,_c)) return false;
|
||||
|
||||
//printf("debug : tools::rroot::vector3::stream : version %d\n",v);
|
||||
|
||||
@@ -51,7 +51,7 @@ public:
|
||||
if(!a_buffer.read(m_y)) return false;
|
||||
if(!a_buffer.read(m_z)) return false;
|
||||
|
||||
if(!a_buffer.check_byte_count(s,c,s_store_class())) return false;
|
||||
if(!a_buffer.check_byte_count(_s,_c,s_store_class())) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user