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

TRefFinder.hpp

Go to the documentation of this file.
00001 #ifndef CAFUTIL_TREFFINDER_HPP__
00002 #define CAFUTIL_TREFFINDER_HPP__
00003 
00004 #include "cafe/Event.hpp"
00005 #include "cafe/Variables.hpp"
00006 #include "TRef.h"
00007 #include <string>
00008 
00009 namespace caf_util {
00010 
00032   class TRefFinder {
00033   private:
00034     std::string _trackBranch ;
00035     std::string _vertexBranch ;
00036     cafe::Variables _trvars ;
00037     cafe::Variables _vtxvars ;
00038     int _debug ;
00039   public :    
00040     TRefFinder() ;
00041     virtual ~TRefFinder() {}
00042 
00043     void setDebug(int debug) {_debug = debug;}
00044 
00045     void setTrackBranchName(const std::string name) {_trackBranch = name ;}
00046     void setVertexBranchName(const std::string name) {_vertexBranch = name ;}
00047 
00048     void SetVariablesTrack(const cafe::Variables& vars) {_trvars = vars ;}
00049     void addTrackVariable(const std::string& name) {_trvars.add(name) ;}
00050     void SetVariablesVertex(const cafe::Variables& vars) {_vtxvars = vars ;}    
00051     void addVertexVariable(const std::string& name) {_vtxvars.add(name) ;}
00052 
00053     const TMBTrack*  FindTrack(cafe::Event &event, const TRef& ref) const ;
00054     const TMBPrimaryVertex*  FindVertex(cafe::Event &event, const TRef& ref) const ;
00055 
00056     ClassDef(TRefFinder, 0) ;
00057   } ;
00058 
00059 }
00060 #endif // CAFUTIL_TREFFINDER_HPP__

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