[Clas_offline] C function to force flushing of BOS buffer?

Zhiwen Zhao zwzhao at jlab.org
Thu Sep 2 19:02:43 EDT 2010


Sure you can
Here the 7 is an arbitrary number as a handler
But I am not sure if "0" is the right way
I always use "E" instead
After tracking it down through a series of functions, I found its 
definition is in bosio/bosread.c
There're possible options, like C,E,R,S,T
Can someone enlighten me what they mean?
Thanks

Zhiwen

On 09/02/2010 03:31 PM, Craig Bookwalter wrote:
> Since I use c_bos_io, what I needed was this call at the end of my
> program, right before I closed the file:
>
>    putBOS(&bcs_, 7, "0");
>
> Many thanks to all!
>
> Jixie Zhang wrote:
>> Hi,
>>    You will find "bosWrite" in package bosio.
>>
>> Jixie
>>
>>
>> On Fri, Sep 3, 2010 at 2:57 AM, Craig Bookwalter<craigb at jlab.org
>> <mailto:craigb at jlab.org>>  wrote:
>>
>>      That sounds tantalizing! What header file is in? I grepped for it
>>      in the
>>      SVN include directory:
>>
>>      /group/clas/builds/32bit/STABLE/include
>>
>>      but nothing came up...
>>
>>      Gagik Gavalian wrote:
>>      >  Dear Craig,
>>      >
>>      >  It is done by using the function:
>>      >
>>      >  bosWrite(bosFileHandleOut,bcs_.iw,"0");
>>      >
>>      >  The "0" passed as a list argument flushes the memory into the disk !
>>      >
>>      >  Hope this is helpful
>>      >
>>      >  Gagik
>>      >
>>      >  On Sep 2, 2010, at 2:45 PM, Craig Bookwalter wrote:
>>      >
>>      >
>>      >>  Hi offliners,
>>      >>     Thanks again for the help with the GSIM issue--I have another
>>      >>  question for everyone. Does anyone know offhand a C function
>>      call that
>>      >>  will force BOS banks currently stored in memory to be written
>>      to the
>>      >>  file? I've found (especially during this GSIM study) that it's
>>      pretty
>>      >>  hard, if not impossible, to write out a BOS file with less than 15
>>      >>  events, and it seems like it's just a buffer that isn't flushed
>>      before
>>      >>  the program exits. I believe Dennis was having trouble with
>>      this when he
>>      >>  was using part2gamp before, but I don't recall if he sent his
>>      troubles
>>      >>  to clas_offline or just to the g12 list.
>>      >>
>>      >>  Thanks again!!
>>      >>
>>      >>  --cb
>>      >>
>>      >>  --
>>      >>
>>      -------------------------------------------------------------------------
>>      >>  Craig Bookwalter                     FSU Office:  (850) 644 3808
>>      >>  Department of Physics                        JLab Office: (757)
>>      269 5465
>>      >>  Florida State University
>>      craigb at hadron.physics.fsu.edu<mailto:craigb at hadron.physics.fsu.edu>
>>      >>  Tallahasse, FL 32306                 craigb at jlab.org
>>      <mailto:craigb at jlab.org>
>>      >>
>>      >>
>>      >>  "One toke? You poor fool. Just wait till you see those
>>      (expletive) bats."
>>      >>
>>      -------------------------------------------------------------------------
>>      >>
>>      >>  _______________________________________________
>>      >>  Clas_offline mailing list
>>      >>  Clas_offline at jlab.org<mailto:Clas_offline at jlab.org>
>>      >>  https://mailman.jlab.org/mailman/listinfo/clas_offline
>>      >>
>>
>>
>>      --
>>      -------------------------------------------------------------------------
>>       Craig Bookwalter                       FSU Office:  (850) 644 3808
>>       Department of Physics                  JLab Office: (757) 269 5465
>>       Florida State University
>>      craigb at hadron.physics.fsu.edu<mailto:craigb at hadron.physics.fsu.edu>
>>       Tallahasse, FL 32306                   craigb at jlab.org
>>      <mailto:craigb at jlab.org>
>>
>>
>>      "One toke? You poor fool. Just wait till you see those (expletive)
>>      bats."
>>      -------------------------------------------------------------------------
>>
>>      _______________________________________________
>>      Clas_offline mailing list
>>      Clas_offline at jlab.org<mailto:Clas_offline at jlab.org>
>>      https://mailman.jlab.org/mailman/listinfo/clas_offline
>>
>>
>>
>>
>> --
>> Best Regards,
>> Jixie Zhang
>> Jefferson Lab - Hall A - A112,
>> 757-269-5352
>> _______________________________________________
>
>


More information about the Clas_offline mailing list