18 #include "Riostream.h"
20 #if ROOT_VERSION_CODE <= ROOT_VERSION(6,8,0)
28 #include "TObjString.h"
52 GO4TRACE((15,
"TGo4MbsFile::TGo4MbsFile()",__LINE__, __FILE__));
64 GO4TRACE((15,
"TGo4MbsFile::TGo4MbsFile(const char*)",__LINE__, __FILE__));
83 GO4TRACE((15,
"TGo4MbsFile::TGo4MbsFile(TGo4MbsFileParameter*)",__LINE__, __FILE__));
100 GO4TRACE((15,
"TGo4MbsFile::~TGo4MbsFile()",__LINE__, __FILE__));
108 if ((name==0) || (*name==0))
return;
112 bool read_multi =
false;
123 if(fname.Contains(
"*") || fname.Contains(
"?")) {
129 SetErrMess(Form(
"No lmd file with mask %s", GetName()));
136 lst->SetOwner(kFALSE);
147 if ((tagname!=0) && (strcmp(tagname,
fgcNOTAGFILE)!=0)) {
158 std::ifstream ff(fname.Data());
161 SetErrMess(Form(
"Error opening multiple file:%s", fname.Data()));
179 if (isonly) SetName(fname);
180 else SetName(
"LmdFilesSelection");
190 GO4TRACE((12,
"TGo4MbsFile::NextEvent()",__LINE__, __FILE__));
258 GO4TRACE((12,
"TGo4MbsFile::Close()",__LINE__, __FILE__));
272 GO4TRACE((12,
"TGo4MbsFile::Open()",__LINE__, __FILE__));
310 const char* command=0;
327 nextline = obj->GetName();
334 rem1 = strstr(nextline.Data(),
"!");
335 rem2 = strstr(nextline.Data(),
"#");
336 command = strstr(nextline.Data(),
"@");
337 if(command!=0 && !(rem1!=0 && rem1<command) && !(rem2!=0 && rem2<command)) {
343 gROOT->ProcessLineSync(command);
345 }
while((nextline.Length()==0) || rem1!=0 || rem2!=0 || command!=0);
346 convs = sscanf(nextline.Data(),
"%s %s %lu %lu %lu",nextfile,nexttag,
359 if(!strcmp(nexttag,
"0") || !strcmp(nexttag,
""))
399 const_cast<char*>(tagfile),
401 (Char_t**) headptr, 0);
436 fname.ReplaceAll(
".lmd",4,
"_ASF",4);
439 TString asfname = fname+
".root";
440 std::cout <<
"Setting autosavefile to name " << asfname << std::endl;
static const char * fgcLMDSUF
virtual const char * GetActiveName()
Bool_t IsAutoSaveFileChange() const
void AddFileName(const char *name, const char *tagname=0, bool isonly=kFALSE)
s_evt_channel * fxInputChannel
void SetCreateStatus(Int_t status)
const char * GetCurrentTagName() const
INTS4 f_evt_error(INTS4 l_error, CHARS *pc_dest, INTS4 l_out)
const char * GetTagName() const
void SetNewInputFile(Bool_t on=kTRUE)
static const char * fgcNOTAGFILE
INTS4 f_evt_get_tagnext(s_evt_channel *ps_chan, INTS4 l_skip, INTS4 **pl_event)
void SetErrMess(const char *txt)
Int_t GetCreateStatus() const
void Message(Int_t prio, const char *text,...)
const char * GetMoreName(Int_t n) const
const char * GetCurrentFileName() const
Bool_t ClearObjects(const char *name)
void SetInputFileName(const char *fname)
INTS4 f_evt_get_tagopen(s_evt_channel *ps_chan, CHARS *pc_tag, CHARS *pc_lmd, CHARS **ps_head, INTS4 l_prihe)
Int_t GetEventStatus() const
void SetEventStatus(Int_t status)
void SetAutoSaveFile(const char *filename=0, Bool_t overwrite=kFALSE, Int_t compression=5)
static TList * ProducesFilesList(const char *mask)
Int_t NewFileAction(Bool_t dosave=kTRUE)
Int_t NumMoreFiles() const
static TGo4Analysis * Instance()
INTS4 f_evt_get_tagclose(s_evt_channel *ps_chan)
static const char * fgcFILELISTSUF
static void Info(const char *text,...)
virtual Int_t NextEvent()
static void Debug(const char *text,...)
const char * GetTagName() const