[Halld-physics] Making REST skims
Paul Mattione
pmatt at jlab.org
Tue Feb 12 11:27:54 EST 2013
Yes it does.
- Paul
On Feb 12, 2013, at 11:26 AM, Richard Jones wrote:
> Paul,
>
> Does the original plugin retain its original behavior? Just including the datarest plugin on the command line should automatically cause it to generate a REST output file containing all of the input events from all sources.
>
> -Richard J.
>
> On 2/11/2013 9:47 PM, Paul Mattione wrote:
>> I've just checked code into the repository that allows users to create skimmed hddm files in the REST format (I moved the core REST-writing code from the danarest plugin to libraries/HDDM/DEventWriterREST.cc). To use it, you need to check out new versions of the HDDM and DANA libraries (and check out the danarest plugin as well to keep it up to date).
>>
>> In short, just add these lines to your plugin:
>>
>> vector<const DEventWriterREST*> locEventWriterRESTVector;
>> locEventLoop->Get(locEventWriterRESTVector);
>> locEventWriterRESTVector[0]->Write_RESTEvent(locEventLoop, "b1pi");
>>
>> And it will save the event in the REST format in a file called "dana_rest_b1pi.hddm."
>>
>> Also, you can simultaneously skim events to several different REST files within the same plugin, even during multi-threaded execution. E.g.:
>>
>> if((locNumPositiveTracks >= 2) && (locNumNegativeTracks >= 2))
>> locEventWriterRESTVector[0]->Write_RESTEvent(locEventLoop, "2+_2-");
>>
>> if((locNumPositiveTracks >= 3) && (locNumNegativeTracks >= 2))
>> locEventWriterRESTVector[0]->Write_RESTEvent(locEventLoop, "3+_2-");
>>
>> will create two different skims, dana_rest_2+_2-.hddm and dana_rest_3+_2-.hddm, containing REST events with those track topologies.
>>
>> - Paul
>>
>>
>> _______________________________________________
>> Halld-physics mailing list
>> Halld-physics at jlab.org
>> https://mailman.jlab.org/mailman/listinfo/halld-physics
>
>
> _______________________________________________
> Halld-physics mailing list
> Halld-physics at jlab.org
> https://mailman.jlab.org/mailman/listinfo/halld-physics
More information about the Halld-physics
mailing list