#include <Write.hpp>
Inheritance diagram for cafe::Write:

Configuration options:
To create SAM metadata output, the following options have to be all set:
Definition at line 50 of file Write.hpp.
Public Member Functions | |
| Write (const char *name) | |
| ~Write () | |
| void | finish () |
| Called at end of processing. | |
| bool | processEvent (Event &event) |
| Called for every event. | |
| void | inputFileOpened (TFile *file) |
| Called for every new input file that was opened. | |
| void | inputFileOpened (TFile *file, bool force) |
| ClassDef (Write, 0) | |
Private Member Functions | |
| void | check_file () |
| This method checks that the file object embedded in _tree matches _file. | |
| void | copy_file () |
| void | writeMetaData () |
| bool | containsUpdatedClass (TBranch *br) |
| Returns true if the branch references a class of some sort that has a class version different from the one we currently have loaded in memory. | |
| void | updateBranch (TTree *input_tree, const std::string &branch_name) |
| Update the current output tree with a new version of this branch. | |
Private Attributes | |
| std::string | _treeName |
| std::string | _oldFileName |
| std::vector< std::string > | _branches |
| std::vector< std::string > | _disable |
| TFile * | _input_file |
| TFile * | _file |
| TTree * | _tree |
| FilePattern | _pattern |
| Long64_t | _autosave |
| bool | _fileOwner |
| std::string | _destination |
| unsigned int | _filesPerOutput |
| unsigned int | _filesPerOutputDone |
| Long64_t | _rootMaxTreeSize |
| unsigned int | _maxEventsPerFile |
| unsigned int | _maxBytesPerFile |
| std::string | _samFamily |
| SAM parameters SAM.Family:. | |
| std::string | _samApplication |
| SAM.Application:. | |
| std::string | _samVersion |
| SAM.Version:. | |
| bool | _doMetaData |
| std::vector< std::string > | _parents |
| List of parent files. | |
| std::set< int > | _runs |
| List of runs. | |
| int | _firstEvent |
| Lowest event no. | |
| int | _lastEvent |
| Highest event no. | |
| Variables | _vars |
| To read event number and run. | |
| bool | _updateObjectVersion |
| Should we re-write branches that contain new versions of objects. | |
| std::vector< std::string > | _updatedBranches |
| List of top level branch names that need updating. | |
|
|
Definition at line 51 of file Write.cpp. References _autosave, _branches, _destination, _disable, _doMetaData, _filesPerOutput, _filesPerOutputDone, _maxBytesPerFile, _maxEventsPerFile, _pattern, _rootMaxTreeSize, _samApplication, _samFamily, _samVersion, _treeName, _updateObjectVersion, cafe::Config::get(), cafe::Config::getVString(), cafe::Processor::name(), and cafe::FilePattern::set(). |
|
|
|
|
|
This method checks that the file object embedded in _tree matches _file. If the file objects don't match, crash. Definition at line 462 of file Write.cpp. References _file, _fileOwner, _oldFileName, _tree, cafe::Processor::err(), and cafe::Processor::name(). Referenced by finish(), inputFileOpened(), processEvent(), and writeMetaData(). |
|
||||||||||||
|
|
|
|
Returns true if the branch references a class of some sort that has a class version different from the one we currently have loaded in memory.
Definition at line 420 of file Write.cpp. Referenced by inputFileOpened(). |
|
|
Definition at line 480 of file Write.cpp. References _destination, _file, cafe::Processor::err(), cafe::Processor::name(), and cafe::Processor::out(). Referenced by finish(), and inputFileOpened(). |
|
|
Called at end of processing.
Reimplemented from cafe::Processor. Definition at line 98 of file Write.cpp. References _destination, _file, _fileOwner, check_file(), copy_file(), and writeMetaData(). |
|
||||||||||||
|
|
Called for every new input file that was opened.
Reimplemented from cafe::Processor. Definition at line 58 of file Write.hpp. Referenced by processEvent(). |
|
|
Called for every event.
Reimplemented from cafe::Processor. Definition at line 113 of file Write.cpp. References _autosave, _doMetaData, _fileOwner, _firstEvent, _input_file, _lastEvent, _maxBytesPerFile, _maxEventsPerFile, _runs, _tree, _vars, check_file(), cafe::Processor::eventCount(), TMBGlobal::evtno(), cafe::Event::getGlobal(), inputFileOpened(), cafe::EventBase::readBranch(), and TMBGlobal::runno(). |
|
||||||||||||
|
Update the current output tree with a new version of this branch. Get the address and use that Definition at line 440 of file Write.cpp. References _tree. Referenced by inputFileOpened(). |
|
|
Definition at line 334 of file Write.cpp. References _doMetaData, _file, _fileOwner, _firstEvent, _lastEvent, _parents, _runs, _samApplication, _samFamily, _samVersion, _tree, check_file(), cafe::Processor::name(), and cafe::Processor::out(). Referenced by finish(), and inputFileOpened(). |
|
|
Definition at line 73 of file Write.hpp. Referenced by processEvent(), and Write(). |
|
|
Definition at line 67 of file Write.hpp. Referenced by inputFileOpened(), and Write(). |
|
|
Definition at line 75 of file Write.hpp. Referenced by copy_file(), finish(), inputFileOpened(), and Write(). |
|
|
Definition at line 68 of file Write.hpp. Referenced by inputFileOpened(), and Write(). |
|
|
Definition at line 91 of file Write.hpp. Referenced by processEvent(), Write(), and writeMetaData(). |
|
|
Definition at line 70 of file Write.hpp. Referenced by check_file(), copy_file(), finish(), inputFileOpened(), and writeMetaData(). |
|
|
Definition at line 74 of file Write.hpp. Referenced by check_file(), finish(), inputFileOpened(), processEvent(), and writeMetaData(). |
|
|
Definition at line 76 of file Write.hpp. Referenced by inputFileOpened(), and Write(). |
|
|
Definition at line 77 of file Write.hpp. Referenced by inputFileOpened(), and Write(). |
|
|
Lowest event no.
Definition at line 98 of file Write.hpp. Referenced by processEvent(), and writeMetaData(). |
|
|
Definition at line 69 of file Write.hpp. Referenced by inputFileOpened(), and processEvent(). |
|
|
Highest event no.
Definition at line 100 of file Write.hpp. Referenced by processEvent(), and writeMetaData(). |
|
|
Definition at line 80 of file Write.hpp. Referenced by processEvent(), and Write(). |
|
|
Definition at line 79 of file Write.hpp. Referenced by processEvent(), and Write(). |
|
|
Definition at line 66 of file Write.hpp. Referenced by check_file(), and inputFileOpened(). |
|
|
List of parent files.
Definition at line 94 of file Write.hpp. Referenced by inputFileOpened(), and writeMetaData(). |
|
|
Definition at line 72 of file Write.hpp. Referenced by inputFileOpened(), and Write(). |
|
|
Definition at line 78 of file Write.hpp. Referenced by Write(). |
|
|
List of runs.
Definition at line 96 of file Write.hpp. Referenced by processEvent(), and writeMetaData(). |
|
|
SAM.Application:.
Definition at line 87 of file Write.hpp. Referenced by Write(), and writeMetaData(). |
|
|
SAM parameters SAM.Family:.
Definition at line 85 of file Write.hpp. Referenced by Write(), and writeMetaData(). |
|
|
SAM.Version:.
Definition at line 89 of file Write.hpp. Referenced by Write(), and writeMetaData(). |
|
|
Definition at line 71 of file Write.hpp. Referenced by check_file(), inputFileOpened(), processEvent(), updateBranch(), and writeMetaData(). |
|
|
Definition at line 65 of file Write.hpp. Referenced by inputFileOpened(), and Write(). |
|
|
List of top level branch names that need updating.
Definition at line 109 of file Write.hpp. Referenced by inputFileOpened(). |
|
|
Should we re-write branches that contain new versions of objects.
Definition at line 106 of file Write.hpp. Referenced by inputFileOpened(), and Write(). |
|
|
To read event number and run.
Definition at line 103 of file Write.hpp. Referenced by processEvent(). |
1.3.4