00001 #ifndef SCTTEST_SCTDAQROOTFILE_H
00002 #define SCTTEST_SCTDAQROOTFILE_H
00003
00004 #include <memory>
00005 #include <string>
00006 #include <TFile.h>
00007
00008 using std::auto_ptr;
00009 using std::string;
00010
00011 class TH1F;
00012 class TH2D;
00013
00014 namespace SctTest {
00015
00020 class SctDaqRootFile {
00021 public:
00022 SctDaqRootFile(string fileName);
00023 char* fillData32(const TH1F& hist0Data, const TH1F& hist1Data);
00024 char* fillData16(const TH1F& hist0Data, const TH1F& hist1Data);
00025 auto_ptr<TH2D> fillData(const TH1F& histData);
00026 void dealWithOccupancy(TH1F& hist0Data, TH1F& hist1Data, TH1F& triggerData, unsigned short scanVar, bool forceConstTrigger=true);
00027 auto_ptr<TH1F> getTriggerData();
00028 auto_ptr<TH1F> getHistData(int cycleNum, int id);
00029 int getCycleNum(string serialNum);
00030
00031 protected:
00032 TFile file;
00033 };
00034
00035 }
00036
00037 #endif //SCTTEST_SCTDAQROOTFILE_H