00001 00003 // // 00004 // TMBTree Trig class // 00005 // // 00007 00008 #include "tmb_tree/TMBL1Names.hpp" 00009 #include "TObjString.h" 00010 #include "TObjArray.h" 00011 #include <vector> 00012 #include <string> 00013 00014 using namespace std; 00015 00016 ClassImp(TMBL1Names) 00017 00018 00019 TMBL1Names::TMBL1Names(){} 00020 00021 TMBL1Names::TMBL1Names( const TMBL1Names & trig ) : TObject(trig),_l1names (trig._l1names){} 00022 00023 TMBL1Names::~TMBL1Names(){} 00024 00028 void TMBL1Names::Clear (const Option_t *opt){ 00029 TObject::Clear (opt); 00030 _l1names.Clear(); 00031 } 00032 00033 00037 00038 00039 00040 void TMBL1Names::set_l1names(vector<string> &_l1namesvec){ 00041 _l1names.SetOwner(); // TObjArray takes care of deleting datamembers 00042 vector<string>::iterator last = _l1namesvec.end(); 00043 vector<string>::iterator i; 00044 for (i = _l1namesvec.begin();i!=last;++i) { 00045 TObjString *t = new TObjString(i->c_str()); 00046 _l1names.AddLast(t); 00047 } 00048 } 00049 00055 00056 const bool TMBL1Names::l1name (const char *s) const{ 00057 return (_l1names.FindObject(s)); 00058 } 00059 00063 00064 const TObjArray &TMBL1Names::allL1Names() const { 00065 return _l1names; 00066 }
1.3.4