eic-smear
1.0.3
A collection of ROOT classes for Monte Carlo events and a fast-smearing code simulating detector effects for the Electron-Ion Collider task force
|
Go to the documentation of this file.
10 #ifndef INCLUDE_EICSMEAR_ERHIC_FORESTER_H_
11 #define INCLUDE_EICSMEAR_ERHIC_FORESTER_H_
24 #include <TStopwatch.h>
33 class VirtualEventFactory;
123 void Print(std::ostream& stream)
const;
130 void Print(Option_t* =
"not used")
const;
158 virtual std::ostream&
Print(std::ostream& os = std::cout)
const;
327 #endif // INCLUDE_EICSMEAR_ERHIC_FORESTER_H_
const erhic::FileType * mFile
< Stores event branch address
Forester()
Default constructor.
void Finish()
Writes output and takes end-of-file actions.
bool BeVerbose() const
Returns the verbosity i.e.
VirtualEvent * mEvent
< Output TTree, owned by mRootFile
Long64_t mMaxNEvents
< Pointer to output ROOT file
Bool_t mQuit
Quit status. Set to true once EoF or max events reached.
virtual void StartTimer()
virtual void ModifyParticleCount(Long64_t count)
std::string GetInputFileName() const
Returns the name of the input text file containing Monte Carlo data.
bool MustQuit() const
Prints the quit flag status.
std::ifstream * mTextFile
std::string GetOutputFileName() const
Returns the name of the ROOT tree file to create.
bool FindFirstEvent()
Aligns the input text file on the first line of the first event.
Abstract base class for a physics event.
Status mStatus
Forester status information.
std::string mBranchName
Name of the event TBranch.
void SetMustQuit(bool quit)
Set the quit flag.
const Status & GetGetStatus() const
Prints a summary of the last call to Plant() to the requested output stream.
void Print(std::ostream &stream) const
Prints the current configuration to the requested output stream.
bool SetupOutput()
Opens the output ROOT file and creates the TTree ready for filling.
virtual std::ostream & Print(std::ostream &os=std::cout) const
void SetTreeName(const std::string &="EICTree")
Sets the name of the TTree to write to the file named by SetOutputFileName().
bool AllocateEvent()
Allocate an event buffer for the TTree based on the generator type.
void PrintStatus() const
Prints the status of the current Plant() call to the standard output.
Abstract base class for event builders.
Long64_t GetMaxNEvents() const
Returns the maximum number of events to process.
void SetMessageInterval(Long64_t=10000)
Sets the event count interval at which to print a status message.
void SetOutputFileName(const std::string &)
Sets the name of the ROOT tree file to create.
void SetBranchName(const std::string &="event")
Sets the name of the TBranch containing event objects.
std::string mTreeName
Name of the output TTree.
std::string GetBranchName() const
Returns the name of the TBranch containing event objects.
std::string mOutputName
Name of the output ROOT file.
Long64_t Plant()
Processes a text file into a ROOT file.
VirtualEventFactory * mFactory
Long64_t mInterval
Event interval between printing status messages.
virtual ~Forester()
Destructor.
bool OpenInput()
Opens the input file and checks that it was produced by a supported Monte Carlo generator.
Stores summary information about the last call to Forester::Plant().
void SetMaxNEvents(Long64_t=0)
Sets the maximum number of events to process.
TFile * mRootFile
< File type information
Abstract base class for Monte Carlo file types.
std::string GetTreeName() const
Returns the name of the TTree to write to the file named by SetOutputFileName().
std::string mInputName
< Input text file
void SetBeVerbose(bool=false)
If set to true, prints messages during running.
const erhic::FileType * GetFileType() const
Returns the file type information for the last processed file.
std::string mLine
Stores the latest text line read from the input file.
Bool_t mVerbose
Verbosity flag.
Manages the creation of trees from plain-text Monte Carlo files.
void SetInputFileName(const std::string &)
Sets the name of the input text file containing Monte Carlo data.
virtual void ModifyEventCount(Long64_t count)