diff --git a/CuFluo_analysis_sc_singlethread_data.cpp b/CuFluo_analysis_sc_singlethread_data.cpp index fbfaaa5..9ef31a0 100644 --- a/CuFluo_analysis_sc_singlethread_data.cpp +++ b/CuFluo_analysis_sc_singlethread_data.cpp @@ -20,7 +20,6 @@ #include "TPaveStats.h" #include "TLegend.h" #include "TPaveText.h" -//#include "TObjArray.h" #include #include @@ -54,16 +53,13 @@ int main(int argc, char* argv[]) { string data_loc = argv[3]; string pede_file = argv[4]; string data_file = argv[5]; - string anadata_loc = argv[6]; //uncomment for VH 210906 + string anadata_loc = argv[6]; bool save_to_afs = false; int createHistoFile = 1; - //char histoname[128]; - //char savename[128]; - //char histoname[256]; // VH 210902 - char savename[256]; // VH 210902 + char savename[256]; char plotfolder[256]; char rootdatafolder[256]; int filen = 352; @@ -86,9 +82,7 @@ int main(int argc, char* argv[]) { // plots/Mxxx/CuFluo/HG0 sprintf(savename,"plots/M%s/CuFluo/HG0", module_str.c_str()); mkdir(savename, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH); - // /mnt/pcmoench_jungfrau_data/jungfrau_ana_sophie/Mxxx_CalibAna - //sprintf(savename,"/mnt/sls_det_storage/jungfrau_data1/jungfrau_ana_sophie/M%s_CalibAna", module_str.c_str()); //uncomment for SR - sprintf(savename,"%s", anadata_loc.c_str()); //uncomment for VH 210906 + sprintf(savename,"%s", anadata_loc.c_str()); mkdir(savename, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH); if ( save_to_afs ) { @@ -133,8 +127,6 @@ int main(int argc, char* argv[]) { mapcanvas->SetTopMargin(0.08); mapcanvas->SetBottomMargin(0.15); - //TCanvas* c1 = new TCanvas("c1",""); - /*****************************************************************************************************************/ /* NOTE: Since arrays, as they were used before, tend to cause memory leaks if they grow too large on the stack, */ /* it might be smarter to realize all array objects with std::vector instead. */ @@ -147,7 +139,7 @@ int main(int argc, char* argv[]) { jungfrauPedestal* pedestalObject_SC = new jungfrauPedestal(); pedestalObject_SC->pedestalSetNFrames(100); - vector pedestals16_G0_start( NCH ); //I suppose, this is to track pedestal shifting over the course of data taking + vector pedestals16_G0_start( NCH ); //Track pedestal shifting over the course of data taking vector pedeRMS16_G0( NCH ); //cout << "Last element of pedeRMS16_G0 = " << pedeRMS16_G0[NCH-1] << endl; @@ -169,7 +161,7 @@ int main(int argc, char* argv[]) { for (int pedefilei = 0; pedefilei < pedefilen; ++pedefilei) { // open pede file - sprintf( savename, "%s/%s_%%6.6d.dat", data_loc.c_str(), pede_file.c_str() ); //VH: note, this adds a double slash in the filepath + sprintf( savename, "%s/%s_%%6.6d.dat", data_loc.c_str(), pede_file.c_str() ); thisfile->open( (char*)savename, pedefilei ); //count events in file @@ -254,8 +246,6 @@ int main(int argc, char* argv[]) { TH1D* adcpc_spec; TH2F* pede_updates; TH2F* pede_diff; - - //cout << "Initialize vectors of histograms..." << endl; //initialize Char_t *_histoname = new Char_t[50]; @@ -266,12 +256,10 @@ int main(int argc, char* argv[]) { snprintf( _histoname, 50, "pede_diff_sc%d", this_storagecell ); pede_diff = new TH2F( _histoname, "", NC, -0.5, NC-0.5, NR, -0.5, NR-0.5 ); - //cout << "Done." << endl; - for (int filei = 0; filei < filen; filei++) { // open data file - sprintf(savename,"%s/%s_%%6.6d.dat", data_loc.c_str(), data_file.c_str()); //VH: note, this adds a double slash in the filepath + sprintf(savename,"%s/%s_%%6.6d.dat", data_loc.c_str(), data_file.c_str()); thisfile->open((char*)savename, filei); while (thisfile->readNextFrame()) { @@ -355,8 +343,7 @@ int main(int argc, char* argv[]) { } // end of file loop - //sprintf(savename,"/mnt/sls_det_storage/jungfrau_data1/jungfrau_ana_sophie/M%s_CalibAna/CuFluo_%s_file0to%d.root", module_str.c_str(), gain_str.c_str(), filen-1); - sprintf(savename,"%s/CuFluo_%s_sc%d_file0to%d.root", anadata_loc.c_str(), gain_str.c_str(), this_storagecell, filen-1); //uncomment for VH 210906 + sprintf(savename,"%s/CuFluo_%s_sc%d_file0to%d.root", anadata_loc.c_str(), gain_str.c_str(), this_storagecell, filen-1); TFile* saved_file = new TFile((const char *)(savename),"RECREATE"); for ( int adci = 0; adci < 8; ++adci ) { adc2d[adci]->Write(); @@ -370,7 +357,7 @@ int main(int argc, char* argv[]) { saved_file->Close(); - } // end if i creatHistoFile + } // end if creatHistoFile }