24 std::string inFile =
GetString(
"InputFile",
"NODEFAULT");
25 std::string fileExtension =
"";
26 size_t dotpos = inFile.find_last_of(
".");
27 if(dotpos != std::string::npos)
28 fileExtension = inFile.substr( dotpos+1 );
39 Debug(
"InputFileName is %s", inFile.c_str());
44 Debug(
"FileList is %s",listPath.c_str());
89 errDescr =
"JumpToEvent is not implemented with reader " +
GetName();
#define Q_BEGIN_NAMESPACE
const std::string & GetString(const std::string &parname, const std::string &defVal, bool warnCfg=true) const
Get a string parameter from config file ( see GetDouble() )
void Debug(const char *descr,...) const
Send a debug message (used to debug the module) with printf syntax.
unsigned int GetIteration() const
Get Current sequence iteration.
void Info(const char *descr,...) const
Send an info message (information) with printf syntax.
void Panic(const char *descr,...) const
Send a panic message (stops the framework) with printf syntax.
const std::string & GetName() const
Get Module name.
error class with error type and description
void SetDescription(const std::string &descr)
set error description
Visitor class of QEvent that provides full handling of QEvent.
void Read(const std::string &fileListPath)
std::list< std::string >::const_iterator fFileListIter
virtual const QError & JumpToEvent(Long64_t event)
Jump to event.
void Init(QEventAssembler &eva)
Init method is called before event loop, getting the QEventAssembler as argument This method must be ...
std::string fFileListPath
file list path
virtual ~QFileReader()
destructor
virtual void Add(const std::string &fileName, QEventAssembler &eva)=0
Add objects to File, called only once in the Init phase.
void Done()
Done method is called after event loop. This method must be implemented by inheriting classes.
virtual void Open(const std::string &fileName, QEventAssembler &eva)=0
Open File.
std::list< std::string > fFileList
list of files
unsigned int fFileEventNumber
last event read
QFileReader()
Mandatory constructor.
virtual bool Fill(QEventAssembler &eva)=0
Fill event, return false when file has no more events.
bool fReadFileList
read file list
bool Do(Diana::QEventAssembler &eva)
std::string fTempOutputFileList
Base class for diana event readers.
QRWCommon * fRWCommon
object to share file names with QWriter
static std::list< std::string > fFullPathFilesList
list of files
void OpenNewFile(const std::string &fileName)
Call it when opening new file.
QError fErr
Error returned by methods.
int fFileNumber
current file number read