/* include files */ #include #include #include #include #include #include #include using namespace std; // root include files #include "TApplication.h" // needed to display canvas #include "TSystem.h" #include "TCanvas.h" #include "TFile.h" #include "TH1.h" #include "TH1F.h" #include "TH2F.h" #include "TH3F.h" #include "TF1.h" #include "TMath.h" #include "TGraph.h" #include "TGraphErrors.h" int main(int argc, char **argv) { int Slot = 0; int DISPLAY = 1; int version = 1; char files[4][128]; if (argc>1){ for (Int_t i=1;i>NewEVENT>>NewSLOT>>NewChan>>time; if (NewChan != Chan){ EVENT = NewEVENT; SLOT = NewSLOT; Chan = NewChan; int Package = 0; if ((n<2) && (SLOT>5)){ Package = 1; } else if ((n>1) && (SLOT<6)){ Package = 2; } else if ((n>1) && (SLOT>5)){ Package = 3; } int c = Chan + 1 + Offsets[n][SLOT]*24; if (c<25){ c += 24; } else if (c<49){ c -= 24; } else if (c<73){ c += 24; } else if (c<97){ c -= 24; } //cout<20000000) WirePlanes[Package][Plane[n][SLOT]-1]->Fill((float)c); } } INF.close(); } TFile *fout; sprintf(fnam,"%s/tdcs_ALLPackages_NEW%d.root",DataDir,version); fout = new TFile(fnam,"RECREATE"); for (int n=0;n<4;n++) { for (int k=0;k<6;k++) { WirePlanes[n][k]->Write(); } } fout->Close(); return 0; }