#include #include #include #include #include #include #include #include #include "analysis.h" #include #include "decoding.h" using namespace std; char input[200]; // Develop all functions TChain *read_pedestal_XY(Int_t startrun, Int_t endrun, Int_t check_MS, Char_t *inputdir) { // cout << inputdir <Get("DataTree"); if(!temp) { ftemp->Close(); cout << "Segment " << k << " of run " << i << " is not present " << endl; continue; } ch->Add(input,0); cout << "Added segment " << k << " of run " << i << endl; } } return ch; } Double_t **pedestal_calc(char* inputdir,char* outputdir,int pederun, int check_max_subrun, Option_t *direction) { cout << " HELLO bis" << endl; Double_t **pedestal_value = new Double_t*[32]; for(int i=0;i *q_p; // Create a vector to contain the 32 signals for each one of the 32 strips vector *sat_p; // Create a vector to contain the 32 indexes saying, for each of the 32 strips, if the signal is saturated TBranch *charge_p = 0; // Create pointers to the branches of the TTree TBranch *saturation_p = 0; TBranch *card_p = 0; TBranch *time_p = 0; t_p->SetBranchAddress("time",&time_ns_p); // Get the branches t_p->SetBranchAddress("card",&card_nb_p); t_p->SetBranchAddress("Q", &q_p, &charge_p); t_p->SetBranchAddress("S", &sat_p, &saturation_p); // The next operation is performed just to set the single channel histogram range and binning; int nEntries_p=t_p->GetEntries(); double temp_mean_card1 = 0; double temp_mean_card2 = 0; double flag_card1 = 0; double flag_card2 = 0; Int_t ii = 0; while(flag_card1==0 ||flag_card2 ==0) { if(ii>=nEntries_p) {cout << "You have data only from one card or no card at all " << endl; exit(0);} else{ cout << ii << endl; Long64_t tentry_p = t_p->LoadTree(ii); charge_p->GetEntry(tentry_p); saturation_p->GetEntry(tentry_p); ii++;} } return pedestal_value; }