00001 #ifndef PANDAROOTTOOLS_H_
00002 #define PANDAROOTTOOLS_H_
00003
00004 #include <vector>
00005 #include <string>
00006 #include <iostream>
00007 #include <fstream>
00008 #include <sstream>
00009
00010 #include <TROOT.h>
00011 #include <TSystem.h>
00012 #include <TString.h>
00013 #include <TFile.h>
00014
00015 class PandaRootTools {
00016
00017 public:
00018
00019 PandaRootTools();
00020
00021 virtual ~PandaRootTools(){}
00022
00023 TFile* OpenNextFile();
00024
00025 int GetNumberOfInputFiles();
00026 int GetFilesRead();
00027 int GetEventsRead();
00028
00029 void NotifyNewEvent();
00030 void NotifyJobFinished();
00031
00032 void Fail();
00033 void Abort();
00034
00035 private:
00036
00037 enum ErrorCodes {
00038 EC_FAIL = 220,
00039 EC_ABORT = 221,
00040 EC_NOTFINISHED = 222,
00041 EC_BADINPUT = 223
00042 };
00043
00044 std::vector<TString> m_fileList;
00045 unsigned int m_currentFile;
00046 unsigned int m_nEventsProcessed;
00047
00048 void createJobSummary();
00049
00050 ClassDef(PandaRootTools, 1)
00051 };
00052
00053 #endif