00001 // $Id: emcFEMtupleFactory.C,v 1.7 2003/10/02 11:54:05 aphecete Exp $ 00002 00003 #include "emcFEMtupleFactory.h" 00004 #include "emcGains.h" 00005 #include "emcTacPeds.h" 00006 #include "emcPedestals.h" 00007 #include "emcPedestals5.h" 00008 #include "emcHLRatios.h" 00009 #include "emcLCTofs.h" 00010 #include "emcWalkTofs.h" 00011 #include "emcTofT0s.h" 00012 #include "emcQAs.h" 00013 #include "emcDefines.h" 00014 #include <string> 00015 #include <iostream> 00016 00017 //_____________________________________________________________________________ 00018 emcFEMtuple* emcFEMtupleFactory::Create(const char* category) 00019 { 00020 std::string c = category ; 00021 if ( c == "Gains" ) return new emcGains() ; 00022 if ( c == "Pedestals" ) return new emcPedestals() ; 00023 if ( c == "Pedestals5" ) return new emcPedestals5() ; 00024 if ( c == "HLRatios" ) return new emcHLRatios() ; 00025 if ( c == "LCTofs" ) return new emcLCTofs() ; 00026 if ( c == "WalkTofs" ) return new emcWalkTofs() ; 00027 if ( c == "TofT0s" ) return new emcTofT0s() ; 00028 if ( c == "QAs" ) return new emcQAs() ; 00029 if ( c == "TacPeds" ) return new emcTacPeds() ; 00030 00031 std::cerr << EMC_ERROR_MSG 00032 << " emcFEMtupleFactory::Create : I don't know how to" 00033 << " create an emcFEMtuple of category " << c << std::endl ; 00034 return 0 ; 00035 }