<html>
<head>
  
</head>
<body text="#000000" bgcolor="#ffffff">
Blake,<br>
<br>
Yes, this is just the kind of thing that hddm was built to be able to
do easily.  To make it simple for you to try out, I just created a
short utility program hddmcp.c in the HDGeant svn directory.  To use
it, follow these steps.<br>
<ol>
  <li>Find a big hddm file that contains way more data sections than
you want to see.</li>
  <li>Using "head -n" (or your favorite text editor) pick the xml text
header from the beginning of the file (starting with <HDDM> and
ending with </HDDM> and save it in a new file.  Let's call it
xxx.hddm and save it in a new working directory, such as HDGeant/work.</li>
  <li>Edit your xxx.hddm file, stripping out all of the sections that
you don't want to see in the output file.  The only restriction is that
you have to remove complete sections, so that there are no unmatched
tags.  Anything will do, provided that the xml remains valid and the
top-level tag is <HDDM>...</HDDM><br>
  </li>
  <li>From inside the new work directory, run the command "hddm-c
xxx.hddm" to generate the hddm_s.h and hddm_s.c libraries.</li>
  <li>Copy hddmcp.c from the HDGeant svn directory [you must have done
svn update recently to see it] into your work directory and compile it
there, as in "gcc -I $HALLD_HOME/include hddcp.c -o hddmcp hddm_s.c"</li>
  <li>Run it, as in "./hddmcp     my_gargantuan_hddm_file.hddm    
my_new_trimmed_hddm_file.hddm"</li>
</ol>
Just for fun, I just tried it on a recent hddm file I produced with
hdgeant, and I stripped out everything except the Monte Carlo and the
barrelEMcal sections.  The size of the hddm file went from 34 MB to 0.5
MB.  <br>
<br>
-Richard Jones<br>
<br>
Blake Leverington wrote:
<blockquote type="cite" cite="mid:4ACA545B.7030603@uregina.ca">
  <pre wrap="">Hi guys,

This is just sort of a general query. I'm looking at different ways of 
reducing file size and cpu times for a rather large PYTHIA data 
set(2.5x10^8) events. Aside from simply filtering out events I was 
hoping I could cut out some of the information that HDGEANT records 
since I am only using information from the calorimeters. The rest of the 
detectors are effectively dead material for my analysis. Any thoughts on 
whether this is feasable, possible or just plain ineffective in reducing 
my file size?

Cheers,
-Blake

  </pre>
</blockquote>
<br>
</body>
</html>