Back to home page

EIC code displayed by LXR

 
 

    


Warning, /include/Geant4/tools/rroot/dummy_fac is written in an unsupported language. File is not indexed.

0001 // Copyright (C) 2010, Guy Barrand. All rights reserved.
0002 // See the file tools.license for terms.
0003 
0004 #ifndef tools_rroot_dummy_fac
0005 #define tools_rroot_dummy_fac
0006 
0007 //#include "info"
0008 //#include "iros"
0009 
0010 #include "graph"
0011 
0012 namespace tools {
0013 namespace rroot {
0014 
0015 class dummy_fac : public virtual ifac {
0016 public: //ifac
0017   virtual std::ostream& out() const {return m_out;}
0018   virtual iro* create(const std::string& a_class,const args& /*a_args*/) {
0019     if(rcmp(a_class,"TGraph")) { //for TH_read_1D/List.
0020       return new graph();
0021 /*
0022     } else if(rcmp(a_class,"TObjArray")) {
0023       std::string* sc = ifac::arg_class(a_args);
0024       if(sc) {
0025         if((*sc)==streamer_element::s_class()){
0026           return new obj_array<streamer_element>(*this);
0027         } else {
0028           m_out << "tools::rroot::dummy_fac::create :"
0029                 << " Can't create TObjArray of " << *sc << "."
0030                 << std::endl;
0031           return 0;
0032         }
0033       } else {
0034         return new iros(*this);
0035       }
0036       */
0037 /*
0038     // for read_sinfos() :
0039     } else if(rcmp(a_class,"TStreamerInfo")) {
0040       return new streamer_info(*this);
0041     } else if(rcmp(a_class,"TStreamerBase")
0042             ||rcmp(a_class,"TStreamerBasicType")
0043             ||rcmp(a_class,"TStreamerBasicPointer")
0044             ||rcmp(a_class,"TStreamerObjectAny")
0045             ||rcmp(a_class,"TStreamerObject")
0046             ||rcmp(a_class,"TStreamerObjectPointer")
0047             ||rcmp(a_class,"TStreamerString")
0048             ||rcmp(a_class,"TStreamerSTL")
0049             ||rcmp(a_class,"TStreamerLoop")
0050             ||rcmp(a_class,"TList")
0051              ) {
0052       return new dummy_streamer_element();
0053 */
0054     } else {
0055       m_out << "tools::rroot::dummy_fac::create :"
0056             << " dummy. Can't create object of class " << sout(a_class) << "."
0057             << std::endl;
0058     }
0059     return 0;
0060   }
0061 public:
0062   dummy_fac(std::ostream& a_out):m_out(a_out){}
0063   virtual ~dummy_fac(){}
0064 protected:
0065   dummy_fac(const dummy_fac& a_from): ifac(a_from),m_out(a_from.m_out){}
0066   dummy_fac& operator=(const dummy_fac&){return *this;}
0067 protected:
0068   std::ostream& m_out;
0069 };
0070 
0071 }}
0072 
0073 #endif