[G14_run] Rootbeer system bug
Franz Klein
fklein at jlab.org
Fri Aug 23 20:39:22 EDT 2013
Dao,
strange that you discovered that after so much time: you had this
problem before (during g14 data taking: I added a call to check the
status of the file in RootBeerUtil.cxx and it worked). I think the
change is not in the tar ball nor in the cvs version.
Thanks for your suggestion,
Franz
On 08/23/2013 04:49 PM, daoh at andrew.cmu.edu wrote:
> For who using Rootbeer to do analysis,
>
> Maybe you are all aware of the problem that when an input DST root file
> does not exist in your list of root files your main rootbeer analysis
> program will then terminate in an horrific way (break segmentation
> violation) and all the previous computations would all be lost. It is
> annoying to submit a job on the farm just to find out the next day that
> you will have to redo all the work because of one input file got deleted
> somewhere.
> To fix this bug, you need to add some lines of code to the main Rootbeer
> classes, but right now I just found a band-aid solution.
> In you main rootbeer (.C) file that you do your analysis (rtest.C for
> example), add three lines to guard against non-existent input files, then
> you won't have the nightmare anymore.
>
> You can find out these below lines at the beginning of your code. Just add
> the relevant lines.
>
> // ******* End of User
> initialisation
> ********************************//
>
>
> // ********************** main file loop
> **********************************************************
>
> class TFile *infile=NULL;
> //------------------------------------------------------------->>>>>>>>>>>>>>>add
> this line
> while((fileNo=getNextFile(inFile,file))!=-1){ // loop while files are
> still avialable
>
> // Start of user stuff to do before sorting each file ---------------
> infile = new TFile(inFile);
> //-------------------------------------------------------------------->>>>>>add
> this line
> if(infile->IsZombie()){std::cout<<"BAD input file, skip
> it"<<std::endl; continue;} //---------------->>>>>>add this line
>
> fprintf(stderr,"Sorting file - %s\n",inFile);
>
> // End of user stuff to do before sorting each file ---------------
>
>
> if((rootbeer=createBeerObject(inFile))==NULL) return; // create
> rootbeer object
>
>
> Sincerely,
> Dao Ho
>
> _______________________________________________
> G14_run mailing list
> G14_run at jlab.org
> https://mailman.jlab.org/mailman/listinfo/g14_run
--
===============================================================
Franz J. Klein, Associate Professor
CUA, Department of Physics
Washington, DC 20064
office: Hannan Hall 206 phone: 202-319-6190
or: Jefferson Lab,CC F-243 phone: 757-269-6672
---------------------------------------------------------------
More information about the G14_run
mailing list