74 lines
2.0 KiB
Plaintext
74 lines
2.0 KiB
Plaintext
// Copyright (C) 2010, Guy Barrand. All rights reserved.
|
|
// See the file tools.license for terms.
|
|
|
|
#ifndef tools_rroot_dummy_fac
|
|
#define tools_rroot_dummy_fac
|
|
|
|
//#include "info"
|
|
//#include "iros"
|
|
|
|
#include "graph"
|
|
|
|
namespace tools {
|
|
namespace rroot {
|
|
|
|
class dummy_fac : public virtual ifac {
|
|
public: //ifac
|
|
virtual std::ostream& out() const {return m_out;}
|
|
virtual iro* create(const std::string& a_class,const args& /*a_args*/) {
|
|
if(rcmp(a_class,"TGraph")) { //for TH_read_1D/List.
|
|
return new graph();
|
|
/*
|
|
} else if(rcmp(a_class,"TObjArray")) {
|
|
std::string* sc = ifac::arg_class(a_args);
|
|
if(sc) {
|
|
if((*sc)==streamer_element::s_class()){
|
|
return new obj_array<streamer_element>(*this);
|
|
} else {
|
|
m_out << "tools::rroot::dummy_fac::create :"
|
|
<< " Can't create TObjArray of " << *sc << "."
|
|
<< std::endl;
|
|
return 0;
|
|
}
|
|
} else {
|
|
return new iros(*this);
|
|
}
|
|
*/
|
|
/*
|
|
// for read_sinfos() :
|
|
} else if(rcmp(a_class,"TStreamerInfo")) {
|
|
return new streamer_info(*this);
|
|
} else if(rcmp(a_class,"TStreamerBase")
|
|
||rcmp(a_class,"TStreamerBasicType")
|
|
||rcmp(a_class,"TStreamerBasicPointer")
|
|
||rcmp(a_class,"TStreamerObjectAny")
|
|
||rcmp(a_class,"TStreamerObject")
|
|
||rcmp(a_class,"TStreamerObjectPointer")
|
|
||rcmp(a_class,"TStreamerString")
|
|
||rcmp(a_class,"TStreamerSTL")
|
|
||rcmp(a_class,"TStreamerLoop")
|
|
||rcmp(a_class,"TList")
|
|
) {
|
|
return new dummy_streamer_element();
|
|
*/
|
|
} else {
|
|
m_out << "tools::rroot::dummy_fac::create :"
|
|
<< " dummy. Can't create object of class " << sout(a_class) << "."
|
|
<< std::endl;
|
|
}
|
|
return 0;
|
|
}
|
|
public:
|
|
dummy_fac(std::ostream& a_out):m_out(a_out){}
|
|
virtual ~dummy_fac(){}
|
|
protected:
|
|
dummy_fac(const dummy_fac& a_from): ifac(a_from),m_out(a_from.m_out){}
|
|
dummy_fac& operator=(const dummy_fac&){return *this;}
|
|
protected:
|
|
std::ostream& m_out;
|
|
};
|
|
|
|
}}
|
|
|
|
#endif
|