26 const TString& outputDirName,
27 const Long64_t maxEvent,
28 const std::string& logFileName) {
32 TTree::SetMaxTreeSize(10LL * 1024LL * 1024LL * 1024LL);
36 TString outName = gSystem->BaseName(inputFileName);
39 if (outName.Last(
'.') > -1) {
40 outName.Replace(outName.Last(
'.'), outName.Length(),
"");
48 outName.Append(
"event");
51 outName.Append(
".root");
53 TString outDir(outputDirName);
54 if (!outDir.EndsWith(
"/")) outDir.Append(
'/');
55 outName.Prepend(outDir);
67 Long64_t result = forester.
Plant();
69 std::cerr <<
"Tree building failed" << std::endl;
76 std::string logFile(logFileName);
77 if (logFile.empty()) {
86 TFile rootFile(outName,
"UPDATE");
90 bool wasRead = (reader ? reader->
Extract(logFile) :
false);
Long64_t BuildTree(const TString &inputFileName, const TString &outputDirName, const Long64_t maxEvent, const std::string &logFileName)
virtual LogReader * CreateLogReader() const =0
void SetMessageInterval(Long64_t=10000)
void SetBranchName(const std::string &="event")
std::string Locate(const std::string &mcFile) const
const erhic::FileType * GetFileType() const
static LogReaderFactory & GetInstance()
virtual bool Extract(const std::string &file)=0
void SetInputFileName(const std::string &)
void SetMaxNEvents(Long64_t=0)
void SetOutputFileName(const std::string &)
void SetBeVerbose(bool=false)
virtual Int_t Save() const =0