From: Benjamin Linnik Date: Mon, 21 Sep 2015 15:45:47 +0000 (+0200) Subject: Run analyzer: ignore ChargeSpectrum.c X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=1dd4c887f28d856ee3ea397a9fdf5298023467c6;p=radhard.git Run analyzer: ignore ChargeSpectrum.c --- diff --git a/MABS_run_analyzer/ChargeSpektrum.c b/MABS_run_analyzer/ChargeSpektrum.c deleted file mode 100644 index c02941d..0000000 --- a/MABS_run_analyzer/ChargeSpektrum.c +++ /dev/null @@ -1,152 +0,0 @@ -/** - * @file ChargeSpektrum.c - * @brief Use brief, otherwise the index won't have a brief explanation. - * - * Detailed explanation. - * - * - */ - -#include "MAPS.c" -#include "Run.c" -#include "CSVRow.h" -#include "CSVRow.C" -#include -#include "help.h" - -Run** runs; -Int_t numberRuns; -Bool_t isBatch = kFALSE; - -#include "ChargeSpektrumFunctions.c" - -void ChargeSpektrum(TString runnumber = "") -{ - cout << endl << endl; - if (gROOT->IsBatch()) - isBatch = kTRUE; - - numberRuns=0; - std::vector runList; - if (runnumber.Length() > 0) - { - if (runnumber.Contains("-")) - { - TObjArray* runarray = runnumber.Tokenize("-"); - if (runarray->GetEntries()==2) - { - TObjString* tempstrobj; - tempstrobj=static_cast(runarray->At(0)); - if (tempstrobj->GetString().Length()>0) - { - Int_t tempintstart = tempstrobj->GetString().Atoi(); - tempstrobj=static_cast(runarray->At(1)); - if (tempstrobj->GetString().Length()>0) - { - Int_t tempintend = tempstrobj->GetString().Atoi(); - if (tempintend-tempintstart > 0) - { - for (Int_t i=tempintstart; i <= tempintend; i++) - { - runList.push_back(i); - numberRuns++; - } - } - else - cout << coloryellow << "Invalid run number range "<< colorreset << colorwhite << tempintstart << " till " << tempintend << endlr; - } - else - cout << coloryellow << "Invalid run number "<< colorreset << colorwhite << tempstrobj->GetString() << endlr; - - } - else - cout << coloryellow << "Invalid run number "<< colorreset << colorwhite << tempstrobj->GetString() << endlr; - } - else - { - cout << endl << colorred << "Given parameters have wrong format, please enter integer run numbers devided by '" << colorreset << colorwhite << "," << colorreset << colorred << " or 2 runnumbers devided by " << colorreset << colorwhite << "-" << colorreset << colorred << "' and surrounded by '" << colorreset << colorwhite << "\"" << colorreset << colorred << "'." << endlr; - cout << "For example run: " << colorwhite << "root -l 'ChargeSpektrum.c+(\"342815,342816\")'" << endl; - exit(1); - } - - } - else - { - TObjArray* runarray = runnumber.Tokenize(","); - if (runarray->GetEntries()>0) - { - TObjString* tempstrobj; - for (Int_t i=0; i < runarray->GetEntries(); i++) - { - tempstrobj=static_cast(runarray->At(i)); - if (tempstrobj->GetString().Length()>0) - { - Int_t tempint = tempstrobj->GetString().Atoi(); - if (tempint > 0) - { - runList.push_back(tempint); - numberRuns++; - } - else - cout << coloryellow << "Invalid run number "<< colorreset << colorwhite << tempint << endlr; - } - else - cout << coloryellow << "Invalid run number "<< colorreset << colorwhite << tempstrobj->GetString() << endlr; - } - } - else - { - cout << endl << colorred << "Given parameters have wrong format, please enter integer run numbers devided by '" << colorreset << colorwhite << "," << colorreset << colorred << "' and surrounded by '" << colorreset << colorwhite << "\"" << colorreset << colorred << "'." << endlr; - cout << "For example run: " << colorwhite << "root -l 'ChargeSpektrum.c+(\"342815,342816\")'" << endl; - exit(1); - } - } - } - else - { - /// number of runs to be analyzed, number of lines read by @c ReadRunList() - ReadRunList(&runList); - } - runs = new Run*[numberRuns]; - - cout << "Found " << numberRuns << " run(s) in 'runlist.txt' or given as parameters." << endl; - for(Int_t runi=0;runi0) - { - runs[runi] = new Run(runList[runi], runi); - if (!runs[runi]->error) - { - runs[runi]->setResultsPath("./results/"); - runs[runi]->error=runs[runi]->initRun(); - runs[runi]->setDynamicalNoiseMode("simple"); - runs[runi]->useDynamicalNoise(true); - runs[runi]->useCommonModeFilter(false); - runs[runi]->setFixedThresholdValueElectrons(1440); - -// runs[runi]->analyzeFrame(57826); -// runs[runi]->analyzeFrame(57827); -// runs[runi]->analyzeFrame(983603); - - // creates or opens .root file, can analyze the RAW data - runs[runi]->error=runs[runi]->analyzeRun(false); // creates or opens .root file, can analyze the RAW data - if (!runs[runi]->error) - { - // gROOT->SetBatch(kTRUE); - if (!isBatch) - gROOT->SetBatch(kFALSE); - runs[runi]->plot1DHistogram(runs[runi]->histogram->calibrated, runs[runi]->histogram->calibrated->Seed, "landau"); - runs[runi]->writeAllHistogramsToFile(); - } - } - } - } - plotAllRuns(); - writeObservableToFile(); -// plotAllRuns("seed threshold calibrated"); -// setCustomPath("Excel/"); -// writeObservableToFile("seed threshold calibrated"); -// writeObservableToFile("seed threshold"); -// writeObservableToFile("seed threshold"); -// writeObservableToFile("sum threshold"); -}