Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

TMBL3BTagIP.cpp

Go to the documentation of this file.
00001 #include "tmb_tree/TMBL3BTagIP.hpp"
00002 
00003 ClassImp(TMBL3BTagIP);
00004 
00005 TMBL3BTagIP::TMBL3BTagIP()  
00006     : jet_info(new TClonesArray("TMBL3BTagJet",100)),
00007       btag(-10),
00008       toolname("none"),
00009       n_jet_info(0)
00010 {
00011 }
00012 
00013 TMBL3BTagIP::~TMBL3BTagIP() 
00014 {
00015   jet_info->Clear();
00016   delete jet_info;
00017 } 
00018 
00019 TMBL3BTagIP::TMBL3BTagIP(const TMBL3BTagIP& l3) 
00020     : TObject(l3),
00021       jet_info(new TClonesArray("TMBL3BTagJet",100)),
00022       btag(l3.btag),
00023       toolname(l3.toolname),
00024       n_jet_info(l3.n_jet_info)
00025 {
00026     for (int i=0 ; i <n_jet_info;i++){
00027         new ((*jet_info)[i]) TMBL3BTagJet( *((TMBL3BTagJet*) (l3.jet_info->At(i))));
00028     }  
00029 }
00030 
00031 TMBL3BTagIP& TMBL3BTagIP::operator=(const TMBL3BTagIP& other)
00032 {
00033     if(&other != this) {
00034         TObject::operator=(*this);
00035         jet_info->Clear();
00036         delete jet_info;
00037         jet_info   = new TClonesArray("TMBL3BTagJet", other.jet_info->GetLast() + 1);
00038         btag       = other.btag;
00039         toolname   = other.toolname;
00040         n_jet_info = other.n_jet_info;
00041         for (int i=0 ; i <n_jet_info;i++){
00042             new ((*jet_info)[i]) TMBL3BTagJet( *((TMBL3BTagJet*) (other.jet_info->At(i))));
00043         }
00044     }
00045     return *this;
00046 }
00047 
00048 void TMBL3BTagIP::Add(const TMBL3BTagJet& j) 
00049 {
00050     new ((*jet_info)[n_jet_info++]) TMBL3BTagJet(j);
00051 }

Generated on Tue Mar 28 10:13:05 2006 for CAF by doxygen 1.3.4