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

SelectBranches.hpp

Go to the documentation of this file.
00001 #ifndef CAFE_SELECTBRANCHES_HPP_
00002 #define CAFE_SELECTBRANCHES_HPP_
00003 
00004 #include <string>
00005 #include <vector>
00006 
00007 class TBranch;
00008 class TTree;
00009 
00010 namespace cafe {
00011 
00012     class Event;
00013     class SelectBranches;
00014 
00024     class BranchNames {
00025     public:
00026         BranchNames();
00027         BranchNames(const std::string& name);
00028         BranchNames(const std::string& name1, const std::string& name2);
00029         BranchNames(const std::string& name1, const std::string& name2, const std::string& name3);
00030         BranchNames(const std::string& name1, const std::string& name2, const std::string& name3, const std::string& name4);
00031         BranchNames(const std::vector<std::string>& names);
00032 
00033         BranchNames(const BranchNames& other);
00034         BranchNames& operator=(const BranchNames& other);
00035 
00036     private:
00037         friend class SelectBranches;
00038         void disable(TTree *tree, int cookie) const;
00039         void enable() const;
00040         
00041         std::vector<std::string>      _branchNames;
00042         mutable std::vector<TBranch*> _branches;
00043         mutable std::vector<bool>     _oldStatus;
00044         mutable int                   _cookie;
00045     };
00046 
00062 
00063     class SelectBranches {
00064     public:
00065         SelectBranches(cafe::Event& event, const BranchNames& names);
00066         ~SelectBranches();
00067     private:
00068         // not implemented
00069         SelectBranches(const SelectBranches& );
00070         SelectBranches operator=(const SelectBranches& );
00071 
00072         const BranchNames& _names;
00073     };
00074     
00075 
00076 }
00077 
00078 #endif // CAFE_SELECTBRANCHES_HPP_

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