10 #ifndef INCLUDE_EICSMEAR_ERHIC_FORESTER_H_
11 #define INCLUDE_EICSMEAR_ERHIC_FORESTER_H_
24 #include <TStopwatch.h>
33 class VirtualEventFactory;
122 void Print(std::ostream& stream)
const;
129 void Print(Option_t* =
"not used")
const;
160 std::time(&mStartTime);
161 mEndTime = mStartTime;
167 virtual std::ostream& Print(std::ostream& os = std::cout)
const {
170 os <<
"Began on " << std::ctime(&mStartTime);
171 os <<
"Ended on " << std::ctime(&mEndTime);
172 os <<
"Processed " << mNEvents <<
" events containing "
173 << mNParticles <<
" particles in "
174 << mTimer.RealTime() <<
" seconds "
175 <<
'(' << mTimer.RealTime()/mNEvents <<
" sec/event)" << std::endl;
180 virtual void StartTimer() {
181 std::time(&mStartTime);
185 virtual void StopTimer() {
186 std::time(&mEndTime);
190 virtual void ModifyEventCount(Long64_t count) {
194 virtual void ModifyParticleCount(Long64_t count) {
195 mNParticles += count;
201 Long64_t mNParticles;
204 mutable TStopwatch mTimer;
358 #endif // INCLUDE_EICSMEAR_ERHIC_FORESTER_H_
Status mStatus
Forester status information.
const Status & GetGetStatus() const
std::string mLine
Stores the latest text line read from the input file.
std::ifstream * mTextFile
Input text file.
void SetMessageInterval(Long64_t=10000)
void SetBranchName(const std::string &="event")
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.
Bool_t mQuit
Quit status. Set to true once EoF or max events reached.
std::string GetOutputFileName() const
std::string mInputName
Name of the input text file.
VirtualEvent * mEvent
Stores event branch address.
const erhic::FileType * GetFileType() const
std::string GetTreeName() const
Abstract base class for a physics event.
Long64_t mInterval
Event interval between printing status messages.
Long64_t GetMaxNEvents() const
std::string GetBranchName() const
Bool_t mVerbose
Verbosity flag.
VirtualEventFactory * mFactory
Pointer to the event-builder object.
void SetInputFileName(const std::string &)
Long64_t mMaxNEvents
Maximum number of events to process.
void SetMaxNEvents(Long64_t=0)
void SetOutputFileName(const std::string &)
void SetBeVerbose(bool=false)
std::string mTreeName
Name of the output TTree.
void SetTreeName(const std::string &="EICTree")
TTree * mTree
Output TTree, owned by mRootFile.
void SetMustQuit(bool quit)