Yes, I copied the certain lines:
Write:
unsigned int *FADC[(68+8)];
TRACELEN=detector.get_maxevents(5); // 4, only for bonntest set to 1
printf(“Length of trace: %i\n”, TRACELEN);
unsigned int FADC_ev4_crystal_11[TRACELEN];
for(int n=0; n<(68+8); n++)
{
FADC[n]=new unsigned int[TRACELEN];
}
hfile.mkdir (“raw_trace”);
hfile.cd (“raw_trace”);
TH1D *pFADC=new TH1D(“FADC_raw”,“”,TRACELEN,0,TRACELEN);
hfile.mkdir (“tree”);
hfile.cd(“tree”);
TTree *anaTree = new TTree(“anaTree”, “anaTree”);
anaTree->Branch(“FADC_raw_APD1_ev4_crystal_11”, FADC_ev4_crystal_11);
FADC_ev4_crystal_11[n]=FADC[board*8+channel][n];
anaTree->Fill();
Read:
// get input file
const char *inTree=“tree/anaTree”;
TFile *f;
Char_t tmpstr[80];
Double_t fraction;
f = new TFile(inFile,“”); // Input File
if(f->IsZombie())
{
cout<<“Input file " << inFile << " doesn’t exist!” << endl;
cout<<“Exit program” << endl;
return 0;
}
cout << "Reading from file: " << inFile << endl;
TTree *anaTree=(TTree *) f->Get(inTree);
if(anaTree==0)
{
cout << “Tree " << inTree << " doesn’t exist!!!” << endl;
cout <<“Exit program” << endl;
return 0;
}
int TRACELEN = 500;
unsigned int FADC_ev4_crystal_11[TRACELEN];
anaTree->SetBranchAddress("FADC_raw_APD1_ev4_crystal_11", FADC_ev4_crystal_11);
TH1D *pFADC_ev4_crystal_11;
sprintf(name,"Event 4 : Crystal 11 : APD 1");
pFADC_ev4_crystal_11=new TH1D(name,name,TRACELEN,0,TRACELEN);
for(int i=0; i<TRACELEN; i++)
{
pFADC_ev4_crystal_11->Fill(i, FADC_ev4_crystal_11[i]);
}
pFADC_ev4_crystal_11->Draw(“”);
It’s not the complete code but it should be all that’s necessary. Otherwise it would be too much. But I attached also the complete files.
aw_proto120_5times5.cxx (15.7 KB)
Filter.cxx (4.8 KB)
All the included files/headers and so on were never changed so it must be somewhere in one of both macros respectively probable in both.
Thank you very much in advance!