/** * Asyeosroot Macro for KRATTA data analysis * * unpack_kratta_calibration * * Autor: * Sebastian.Kupny@uj.edu.pl * * Date: * 2013/09/18 * * Description: * This macro presents how to use TKratAnalysisAssistant for * runlist creation. * */ void test_unpack_krat_ana_asystent(){ // ----- Load libraries ------------------------------------------------------ gROOT->LoadMacro("$VMCWORKDIR/gconfig/basiclibs.C"); basiclibs(); gSystem->Load("libTKratAnalysisAssistant"); // --------------------------------------------------------------------------- /// 1. Test the runlist cration procedure: TString pathToLmdFiles = "/lustre/fopi/asyeos/MAY11/"; TKratAnalysisAssistant rAa(pathToLmdFiles); getchar(); rAa.SetDebugLevel(3); cout << "List of all LMD files: (press any key)" << endl; getchar(); rAa.PrintLoadedLmdFiles(); cout << "Sorted ist of all LMD files: (press any key)" << endl; getchar(); rAa.PrintLoadedLmdFilesSorted(); /// 2. Test the runlist cration procedure: ///Run number: first and last: int first = 0; int last = 3000; Int_t noOfFoundedFiles = rAa.CreateRunlistForRuns(first,last); cout << "Found = " << noOfFoundedFiles << " files." << endl; first = 1000; last = 2000; vector str = rAa.GetLmdFilesForRuns(first,last); first = 1670; last = 1680; vector str = rAa.GetLmdFilesForRuns(first,last); cout << "Im creating runlsist with name: runlist-from_test.dat " << endl; noOfFoundedFiles = rAa.CreateRunlistForRuns(first,last, "runlist-from_test.dat" ); cout << "Found = " << noOfFoundedFiles << " files." << endl; cout << "Now I'm going to remove last runlist: " << endl; rAa.RemoveLastRunlist(); noOfFoundedFiles = rAa.CreateRunlistForRuns(first,last); cout << "Found = " << noOfFoundedFiles << " files." << endl; cout << "TEST_PASSED" << endl; /// for testing only cout << "test_unpack_krat_ana_asystent - done" << endl; }