00001 #ifndef Physics_Analysis_TagWriterAlg_H 00002 #define Physics_Analysis_TagWriterAlg_H 00003 00004 #include "GaudiKernel/AlgFactory.h" 00005 #include "GaudiKernel/Algorithm.h" 00006 #include "GaudiKernel/NTuple.h" 00007 00008 class RootInterface; 00009 00010 #include "TFile.h" 00011 #include "TTree.h" 00012 using namespace std; 00013 00014 class TagWriterAlg : public Algorithm { 00015 00016 public: 00017 00018 TagWriterAlg(const std::string& name, ISvcLocator* pSvcLocator); 00019 StatusCode initialize(); 00020 StatusCode execute(); 00021 StatusCode finalize(); 00022 StatusCode getTagInfo(); 00023 void openOutputTagFile(std::string file); 00024 //bool eventFilter(); 00025 00026 private: 00027 00028 RootInterface* m_rootInterface; 00029 00030 int m_fileNum; 00031 00032 //TFile* m_iFile; 00033 TFile* m_oFile; 00034 //TTree* m_iTree; 00035 TTree* m_oTree; 00036 TTree* m_oFileTree; 00037 00038 //input tag file name 00039 //vector<string> m_inputTagFile; 00040 00041 //output file name 00042 vector<string> m_outputTagFile; 00043 00044 //for reading: input 00045 /*int m_r_entry; 00046 int m_r_runNo; 00047 int m_r_eventId; 00048 int m_r_totalCharged; 00049 int m_r_totalNeutral; 00050 int m_r_totalTrks; 00051 */ 00052 00053 //for writing: output 00054 string m_dstFile; 00055 int m_entry; 00056 int m_runNo; 00057 int m_eventId; 00058 int m_totalCharged; 00059 int m_totalNeutral; 00060 int m_totalTrks; 00061 00062 string m_dstOutput; 00063 int m_entry_in_alg; 00064 //int m_filterTotalCharged; 00065 }; 00066 00067 #endif