Athena Developer Guide
Athena Developer Guide
Athena Developer Guide
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>Athena</strong> Chapter 12 N-tuple and Event Collection facilities Version/Issue: 2.0.0<br />
• FUN (optional)<br />
Specifies the name of a function object used for the second-stage preselection. An example of<br />
a such a function object is shown in Listing 12.5. Note that the factory declaration on line 16<br />
is mandatory in order to allow <strong>Athena</strong> to instantiate the function object.<br />
• The DATAFILE and TYP tags, as well as additional optional tags, have the same meaning<br />
and syntax as for n-tuples, as described in section 12.2.3.1.<br />
Listing 12.5 Example of a function object for second stage pre-selections.<br />
1: class EvtCollectionSelector : public NTuple::Selector {<br />
2: NTuple::Item m_ntrack;<br />
3: public:<br />
4: EvtCollectionSelector(IInterface* svc) : NTuple::Selector(svc) { }<br />
5: virtual ~EvtCollectionSelector() { }<br />
6: /// Initialization<br />
7: virtual StatusCode initialize(NTuple::Tuple* nt) {<br />
8: return nt->item("Ntrack", m_ntrack);<br />
9: }<br />
10: /// Specialized callback for NTuples<br />
11: virtual bool operator()(NTuple::Tuple* nt) {<br />
12: return m_ntrack>cut;<br />
13: }<br />
14: };<br />
15:<br />
16: ObjectFactory EvtCollectionSelectorFactory<br />
12.4 Interactive Analysis using N-tuples<br />
n-tuples are of special interest to the end-user, because they can be accessed using commonly known<br />
tools such as PAW, ROOT or Java Analysis Studio (JAS). In the past it was not a particular strength of<br />
the software used in HEP to plug into many possible persistent data representations. Except for JAS,<br />
only proprietary data formats are understood. For this reason the choice of the output format of the data<br />
depends on the preferred analysis tool/viewer. In the following an overview is given over the possible<br />
data formats.<br />
In the examples below the output of the GaudiExample/NTuple.write program was used.<br />
12.4.1 HBOOK<br />
This data format is used by PAW. PAW can understand this and only this data format. Files of this type<br />
can be converted to the ROOT format using the h2root data conversion program. The use of PAW in<br />
the long term is deprecated.<br />
page 92