This class knows how to write ROOT files from the ring items created by the fitting program.
More...
#include <RootFileDataSink.h>
This class knows how to write ROOT files from the ring items created by the fitting program.
- Note
- Put is not intended to be used by this file. If it's used, a warning will be output to stderr. pData will then be treated as a raw ring item, turned into a CRingItem and putItem will be called from then on.
◆ RootFileDataSink()
| RootFileDataSink::RootFileDataSink |
( |
const char * |
filename, |
|
|
const char * |
treename = "DDASFit" |
|
) |
| |
Constructor.
- Parameters
-
| filename | ROOT file to open. |
| treename | Name of the tree to create in the root file. The tree name defaults to "DDASFit" if not provided. |
- Exceptions
-
| ... | All exceptions back to the caller. |
We're going to make this sink so it can be used in other programs. That implies presrving ROOT's concept of a current working directory across our operation.
◆ ~RootFileDataSink()
| RootFileDataSink::~RootFileDataSink |
( |
| ) |
|
|
virtual |
Destructor.
Flush the stuff to file and delete all the dynamic components.
◆ put()
| void RootFileDataSink::put |
( |
const void * |
pData, |
|
|
size_t |
nBytes |
|
) |
| |
|
virtual |
Called to put arbitrary data to the file.
- Parameters
-
| pData | Pointer to the data. |
| nBytes | Number of bytes of data to put; actually ignored. |
We really don't know how to do this so:
- First time we're called we'll emit a warning that users shouldn't really do this.
- We'll treat the data pointer as a pointer to a raw ring item, turn it into a CRingItem and call putItem.
◆ putItem()
| void RootFileDataSink::putItem |
( |
const CRingItem & |
item | ) |
|
|
virtual |
Put a ring item to file.
- Parameters
-
| item | Reference to a ring item object. |
The ring item is assumed to consist of a set of fragments. Each fragment contains a hit. The hits are decoded and added to the tree event. Once that's done we can fill the tree and delete any dynamic storage we got.
The documentation for this class was generated from the following files: