Counting Events in an LCIO File [message #1556] |
Mon, 28 July 2008 14:00  |
vogel Messages: 83 Registered: March 2005 Location: DESY, Hamburg, Germany |
|
|
|
Hi all,
I have no idea whether the following will be useful for anybody else, but at least it was useful for myself: in order to find out quickly how many events are contained in an LCIO file (in the slcio format, to be precise), you can run
strings foo.slcio | grep '^LCEvent$' | wc -l However, this might only work with LCIO version 1 files, and it will only find the top-level objects LCRunHeader, LCEventHeader, and LCEvent, but no collections or any kind of contained LCObjects.
Cheers,
Adrian
Update on 2008-08-05: For some reason, strings doesn’t seem to work with DCAP. If you want to scan LCIO files on the dCache, prepend the pipe with an ordinary cat:
LD_PRELOAD=/opt/products/lib/libpdcap.so cat foo.slcio | strings | grep '^LCEvent$' | wc -l
[Updated on: Tue, 05 August 2008 09:11]
|
|
|