From cc1c10b0637cc6ecbb7d5904ab8cafe3352f99af Mon Sep 17 00:00:00 2001 From: Benjamin Linnik Date: Thu, 7 May 2015 12:26:43 +0200 Subject: [PATCH] Analysis: only std=c++11 warnings left --- MABS_run_analyzer/MAPS.c | 181 +++------------------------------------ MABS_run_analyzer/MAPS.h | 18 ++-- MABS_run_analyzer/Run.c | 3 +- 3 files changed, 22 insertions(+), 180 deletions(-) diff --git a/MABS_run_analyzer/MAPS.c b/MABS_run_analyzer/MAPS.c index 5f4118a..24e0844 100644 --- a/MABS_run_analyzer/MAPS.c +++ b/MABS_run_analyzer/MAPS.c @@ -537,13 +537,13 @@ void MAPS::initHistograms() { //#################################################################### -bool MAPS::getFrame(Int_t FrameNumber) { +bool MAPS::getFrame(UInt_t FrameNumber) { fFrameNumber = FrameNumber; if(fFrameNumber -arraytype MAPS::debugStream(const arraytype* (a), Int_t n, Int_t columns, Int_t precision, float highlightabove) { +void MAPS::debugStream(const arraytype* (a), Int_t n, Int_t columns, Int_t precision, float highlightabove) { cout << colorwhite << "----------------------------------" << colorreset << endl; for (int i=0; iBranch("frame" , &fFrameNumber , "frame/i" , 32000); - fDynNoiseTree->Branch("noise" , &fNoiseMean , "noise/F" , 32000); - fDynNoiseTree->Branch("pedestal" , &fPedestalsMean , "pedestal/F" , 32000); - } - - if(fOk) - { -//Check amount of Frames - if(Frames<50) - { - cout<<"Too few Frames! Change Frames from "<= 1) { - printf("%6.2f TB ", (Float_t)(End/(TMath::Power(2,40))) ); - } - else if (End/(TMath::Power(2,30)) >= 1) { - printf("%6.2f GB ", (Float_t)(End/(TMath::Power(2,30))) ); - } - else if (End/(TMath::Power(2,20)) >= 1) { - printf("%6.2f MB ", (Float_t)(End/(TMath::Power(2,20))) ); - } - else if (End/(TMath::Power(2,10)) >= 1) { - printf("%6.2f kB ", (Float_t)(End/(TMath::Power(2,10))) ); - } - else { - printf("%6.2f B ", (Float_t)(End)); - } - cout<<"for dynamic noise calculation! "< fEventsSum ) { - Frames = fEventsSum; - printf("Changed 'Number Frames' to: %u\n", Frames ); - } -// Get fPixels and allocate array - Float_t PEDESTAL; - Float_t NOISE; -// Int_t PIXEL=0; - - if(!fNoiseOk) { - getNoise(0,Frames); - } - { - int i=0; - - - while(!STOP) - { - getFrame(i); - hitana(); - - STOP = true; - - for(Int_t j=0; jFill(); - - fFrameNumber = 0; - fNoiseMean = TMath::Mean((const int)fPixels, fNoise); - fPedestalsMean = TMath::Mean((const int)fPixels, fPedestals); - - fDynNoiseTree->Fill(); - } - return true; - } - else - { - return false; - } -}; - -//#################################################################### - - bool MAPS::regetDynNoise(Int_t Frames) { for(Int_t pixeli=0; pixeli - arraytype debugStream(const arraytype* (a), Int_t n=512, Int_t columns=8, Int_t precision=2, float highlightabove = 99999999); + void debugStream(const arraytype* (a), Int_t n=512, Int_t columns=8, Int_t precision=2, float highlightabove = 99999999); /** * @brief Initialize histogram labels and histograms #hint1, #hint2, #fdiscriminatedhitmatrix, #fADCHitmatrix @@ -335,10 +335,10 @@ public: * @param FrameNumber TheFrame * */ - bool getFrame (Int_t FrameNumber); + bool getFrame (UInt_t FrameNumber); /** * @brief Old routine, shoould be deletable without side effects */ - bool getNoise (Int_t Start, Int_t Frames); + bool getNoise (UInt_t Start, UInt_t Frames); /** * @brief Calculates a first estimate of the noise and pedestial of each pixel in #frames @@ -357,10 +357,6 @@ public: /** * @brief Old routine, shoould be deletable without side effects */ bool getDynNoise (Int_t Frames = numberofframesfornoise); - /** - * @brief Old routine, shoould be deletable without side effects */ - bool getDynNoise2(Int_t Frames = numberofframesfornoise); - /** * @brief Eliminates line structures in the chip * @@ -448,9 +444,9 @@ public: void plotNoise (void); void plotFrame (Int_t FrameNumber); - void plotHitDis (Int_t Start, Int_t Frames); - void plotSignal (Int_t Start, Int_t Frames); - void plotPixSignal (Int_t Start, Int_t Frames, Int_t Pixel); + void plotHitDis (UInt_t Start, UInt_t Frames); + void plotSignal (UInt_t Start, UInt_t Frames); + void plotPixSignal (UInt_t Start, UInt_t Frames, Int_t Pixel); void writeData (); diff --git a/MABS_run_analyzer/Run.c b/MABS_run_analyzer/Run.c index 532dc9b..b1dceee 100644 --- a/MABS_run_analyzer/Run.c +++ b/MABS_run_analyzer/Run.c @@ -652,6 +652,7 @@ Bool_t Run::plotSeed() plot1DHistogram(histogram.Seed, "landau"); return 0; } + return 1; } @@ -979,7 +980,7 @@ Bool_t Run::writeAllHistogramsToFile() TString filename= savepathresults + "/" + runcode + " histograms.dat"; fstream* fout = new fstream(filename,ios::out); - TString header = Form("#bin [ADU]\tbin [e]\tSeed\tSum\t\Veto\tbin noise [ADU]\tbin noise [e]\tnoise\n"); + TString header = Form("#bin [ADU]\tbin [e]\tSeed\tSum\tVeto\tbin noise [ADU]\tbin noise [e]\tnoise\n"); header += Form("#posVeto, run: %.1f, DB: %.1f, Fe55 DB (%d, %.1f): %.1f\n", histogram.posVeto, labbook.posVetoDB, Fe55run.posVetorunnumber, Fe55run.temperature, Fe55run.posVeto); header += Form("#posSeed, run: %.1f, DB: %.1f\n", histogram.posSeed, labbook.posSeedDB); header += Form("#posSum, run: %.1f, DB: %.1f\n", histogram.posSum, labbook.posSumDB); -- 2.43.0