//______________________________________________________________________________ void CopyCDB(const char* runlist, const char* fromURI, const char* toURI) { std::vector<int> runs; ReadIntegers(runlist,runs); CopyCDB(runs,fromURI,toURI); }
//______________________________________________________________________________ void MUONStatusMapEvolution(const char* runlist, const char* outfile) { // Compute the number of bad pads (because of bad ped, bad hv, bad lv, // or missing in configuration) // // output a root file with the different graphs. // // output can be then plotted using the DrawEvolution function // // Note that the output of different runlists can then be merged simply using // the hadd program, and so then the DrawEvolution can be used over // a huge period, e.g. a full year, while this method is better restricted // to a period or even less (depending on your success of accessing the OCDB) // std::vector<int> runs; ReadIntegers(runlist,runs); if ( runs.empty() ) { cout << "No runs to process..." << endl; return; } int year(2016); if ( runs[0] <= 139699 ) year=2010; if ( runs[0] <= 176000 ) year=2011; if ( runs[0] <= 195344 ) year = 2012; if ( runs[0] <= 198000 ) year = 2013; if ( runs[0] <= 246994 ) year = 2015; TString defaultOCDB; defaultOCDB.Form("local:///cvmfs/alice-ocdb.cern.ch/calibration/data/%d/OCDB",year); // defaultOCDB.Form("alien://folder=/alice/data/%d/OCDB?cacheFold=/local/cdb",year); AliCDBManager::Instance()->SetDefaultStorage(defaultOCDB.Data()); AliCDBManager::Instance()->SetRun(0); TList glist; glist.SetOwner(kTRUE); TGraph* gnbad = new TGraph(runs.size()); gnbad->SetName("nbad"); glist.Add(gnbad); TGraph* gnbadped = new TGraph(runs.size()); gnbadped->SetName("nbadped"); glist.Add(gnbadped); TGraph* gnbadocc = new TGraph(runs.size()); gnbadocc->SetName("nbadocc"); glist.Add(gnbadocc); TGraph* gnbadhv = new TGraph(runs.size()); gnbadhv->SetName("nbadhv"); glist.Add(gnbadhv); TGraph* gnmissing = new TGraph(runs.size()); gnmissing->SetName("nmissing"); glist.Add(gnmissing); TGraph* gnreco = new TGraph(runs.size()); gnreco->SetName("nreco"); glist.Add(gnreco); TGraph* gnbadlv = new TGraph(runs.size()); gnbadlv->SetName("nbadlv"); glist.Add(gnbadlv); for ( std::vector<int>::size_type i = 0; i < runs.size(); ++i ) { Int_t runNumber = runs[i]; Int_t nbadped; Int_t nbadhv; Int_t nbadlv; Int_t nbadocc; Int_t nmissing; Int_t nreco; Int_t nbad = GetBadChannels(runNumber,nbadped,nbadhv,nbadlv,nbadocc,nmissing,nreco); gnbad->SetPoint(i,runNumber,nbad); gnbadped->SetPoint(i,runNumber,nbadped); gnbadhv->SetPoint(i,runNumber,nbadhv); gnbadlv->SetPoint(i,runNumber,nbadlv); gnbadocc->SetPoint(i,runNumber,nbadocc); gnmissing->SetPoint(i,runNumber,nmissing); gnreco->SetPoint(i,runNumber,nreco); } TIter next(&glist); TGraph* g; Int_t index(0); TFile f(outfile,"recreate"); Int_t color[] = { 1 , 2 , 3 , 4, 6, 8, 7 }; Int_t marker[] = { 28 , 24 , 23 , 26, 30, 5, 32 }; while ( ( g = static_cast<TGraph*>(next() ) ) ) { g->GetXaxis()->SetNdivisions(505); g->GetXaxis()->SetNoExponent(); g->SetMinimum(0); g->GetYaxis()->SetNoExponent(); g->SetLineColor(color[index]); g->SetMarkerStyle(marker[index]); g->SetMarkerColor(color[index]); g->SetMarkerSize(1.0); ++index; g->Write(); } f.Close(); }