17 #include <TRefArray.h>
35 , mInputName(
"default.txt")
36 , mOutputName(
"default.root")
37 , mTreeName(
"EICTree")
38 , mBranchName(
"event")
86 std::cout <<
"Processing event "<< std::setw(width) << i;
90 std::cout << std::endl;
114 catch(std::exception& e) {
115 std::cerr <<
"Caught exception in Forester::Plant(): "
116 << e.what() << std::endl;
117 std::cerr <<
"Event will be skipped..." << std::endl;
123 catch(std::exception& e) {
124 std::cerr <<
"Caught exception in Forester::Plant(): "
125 << e.what() << std::endl;
139 std::string message(
"Unable to open file ");
147 " is not from a supported generator");
153 catch(std::exception&) {
163 std::string message(
"Unable to open file ");
169 std::string message(
"Error allocating TTree ");
170 throw std::runtime_error(message.append(
GetTreeName()));
178 mTree->SetAutoSave(500LL * 1024LL * 1024LL);
186 catch(std::exception&) {
223 catch(std::exception&) {
242 os <<
"Input file: " <<
mInputName << std::endl;
244 os <<
"Output tree: " <<
mTreeName << std::endl;
245 os <<
"Output branch: " <<
mBranchName << std::endl;
246 os <<
"Maximum number of events: " <<
mMaxNEvents << std::endl;
248 os <<
"Event type: " <<
mEvent->ClassName() << std::endl;
Status mStatus
Forester status information.
const Status & GetGetStatus() const
std::string mLine
Stores the latest text line read from the input file.
virtual VirtualEvent * Create()=0
std::ifstream * mTextFile
Input text file.
virtual EventBase * AllocateEvent() const =0
std::string mOutputName
Name of the output ROOT file.
std::string mBranchName
Name of the event TBranch.
TFile * mRootFile
Pointer to output ROOT file.
std::string GetInputFileName() const
void Print(std::ostream &stream) const
const erhic::FileType * mFile
File type information.
static FileFactory & GetInstance()
std::string GetOutputFileName() const
std::string mInputName
Name of the input text file.
VirtualEvent * mEvent
Stores event branch address.
std::string GetTreeName() const
virtual UInt_t GetNTracks() const =0
Long64_t mInterval
Event interval between printing status messages.
Long64_t GetMaxNEvents() const
std::string GetBranchName() const
const FileType * GetFile(const std::string &generatorName) const
VirtualEventFactory * mFactory
Pointer to the event-builder object.
Long64_t mMaxNEvents
Maximum number of events to process.
std::string mTreeName
Name of the output TTree.
TTree * mTree
Output TTree, owned by mRootFile.
void SetMustQuit(bool quit)
virtual VirtualEventFactory * CreateEventFactory(std::istream &) const =0