Instructions on running QA code for development
This document information Gene provided how to deal with github to get relevant QA makers, and how to run them on daq files
I have set this up in ~videbaks/tpcqa in Stroot and work directories.
Running code for tests
How to run the TPC QA codes, which you probably want to do in 'stardev' to minimize any surprises that may come later
1) Compile your version of the codes with cons.
2) Process data to fill histograms. I put some DAQ files here:
/star/data03/daq/2023/211/24211048/
>> there are several files. certainly enough for my tests
And here's an example job to process one:
setenv INPUTFILE0 st_physics_adc_24211048_raw_0400004.daq
root4star -b -q -l bfc.C\(10000,\"P2023a,Stica,BEmcChkStat,\-hitfilt,TpxRaw\",\"$INPUTFILE0\"\)>& ${INPUTFILE0:r}.log
>>
>> should the input file name not have the full path?
>> when I ran this no log file was produced- replaced with a simple test.log in local directory
>> need to try again
.. I just ran it with 10 events.
>> The log file indicated my local .so was loaded and hist.root file generated. All good.
I found that I can speed this up by about a third if we turn _off_ tracking. But for that, you need to change the chain slightly...
root4star -b -q -l bfc.C\(10000,\"P2023a,QAalltrigs,\-ITTF,BEmcChkStat,\-hitfilt,TpxRaw\",\"$INPUTFILE0\"\)>& ${INPUTFILE0:r}.log
...and you need a copy of StRoot/St_QA_Maker with the following change to StEventQAMaker.cxx line 447 to set fillHists = kTRUE:
447c447
< fillHists = kFALSE;
---
fillHists = kRUE;
The data processing creates st_physics*.hist.root files. I suggest doing this with just 100 events at first to make sure it works OK. But if you need lots of statistics, you may want to process several of the DAQ files I restored for you.
3) [optional] If you processed multiple DAQ files, then add them together:
ls -1 st_physics*.hist.root > histlist
root4star -b -q -l bfcread_hist_files_add.C\(20,\"histlist\",\"st_physics_adc_24211048_raw_9999999\"\) >&! log.add
4) Extract the TPC histograms into a regular ROOT file:
/star/u/starqa/bin/getTpcQA.csh BLAH
where BLAH is either a single st_physics*.hist.root file from step 2 if you only processed one, or st_physics_adc_24211048_raw_9999999.hist.root if you added several together via step 3.
5) Run the TPC QA post-processing to generate a summary report:
if (-e summary.txt) rm summary.txt
root -l -b tpcQA_24211048.root <<EOF >&! tpcQA.log
.L /star/data10/qa/tpc/macros/AnaQA.C
if(checkFile()) {
openDoc("summary.txt");
getAllBadPads();
}
EOF
--- setup git and local copies
3) Then, in an empty directory on SDCC:
--- documentation for changes made:
- videbaks's blog
- Login or register to post comments