00001 #ifndef CAFE_WRITE_HPP__ 00002 #define CAFE_WRITE_HPP__ 00003 00004 #include "cafe/Processor.hpp" 00005 #include "cafe/FilePattern.hpp" 00006 00007 #include <string> 00008 #include <vector> 00009 00010 class TFile; 00011 class TTree; 00012 class TBranch; 00013 00014 namespace cafe { 00015 00037 class Write : public Processor { 00038 public: 00039 Write(const char *name); 00040 ~Write(); 00041 00042 // Processor interface 00043 void finish(); 00044 bool processEvent(Event& event); 00045 void inputFileOpened(TFile *file); 00046 private: 00047 void copy_file(); 00048 00049 std::string _treeName; 00050 std::vector<std::string> _branches; 00051 std::vector<std::string> _disable; 00052 TFile *_file; 00053 TTree *_tree; 00054 FilePattern _pattern; 00055 Long64_t _autosave; 00056 bool _fileOwner; 00057 std::string _destination; 00058 unsigned int _filesPerOutput; 00059 unsigned int _filesPerOutputDone; 00060 00062 bool _updateObjectVersion; 00063 00065 std::vector<std::string> _updatedBranches; 00066 00068 bool containsUpdatedClass (TBranch *br); 00069 00072 void updateBranch(TTree *input_tree, const std::string& branch_name); 00073 00074 public: 00075 ClassDef(Write,0); 00076 }; 00077 00078 } 00079 00080 #endif // CAFE_WRITE_HPP__
1.3.4