4#include "KVMFMDataFileReader.h"
7#include "MFMXmlFileHeaderFrame.h"
32 std::string actions_dir =
gEnv->
GetValue(
"KVMFMDataFileReader.ActionsDirectory",
"");
33 if (actions_dir !=
"") SetActionsDirectory(actions_dir);
34 std::string actions_expname =
gEnv->
GetValue(
"KVMFMDataFileReader.ActionsExpName",
"");
35 if (actions_expname !=
"") SetActionsExpName(actions_expname);
36 if (!ReadNextFrame()) {
37 Error(
"KVMFMDataFileReader",
"Cannot read file %s", filepath);
41 if (GetFrameReadType() != MFM_XML_FILE_HEADER_FRAME_TYPE) {
42 Warning(
"KVMFMDataFileReader",
"First frame in file is not MFM_XML_FILE_HEADER_FRAME_TYPE: type is %s",
43 GetFrameReadTypeSymbol().c_str());
46 GetFrameRead().Print();
47 fRunInfos.SetValue(
"ExperimentName", GetFrameRead<MFMXmlFileHeaderFrame>().GetExperimentName());
48 fRunInfos.SetValue(
"FileName", GetFrameRead<MFMXmlFileHeaderFrame>().
GetFileName());
49 fRunInfos.SetValue(
"FileCreationTime", GetFrameRead<MFMXmlFileHeaderFrame>().GetFileCreationTime());
50 fRunInfos.SetValue(
"RunNumber", GetFrameRead<MFMXmlFileHeaderFrame>().GetRunNumber());
51 fRunInfos.SetValue(
"RunIndex", GetFrameRead<MFMXmlFileHeaderFrame>().GetRunIndex());
52 fRunInfos.SetValue(
"RunStartTime", GetFrameRead<MFMXmlFileHeaderFrame>().GetRunStartTime());
64 ::Info(
"KVMFMDataFileReader::Open",
"Opening file %s...", fp.
Data());
78 GetFrameLibrary().SetEbyedatActionsDirectory(
d);
95 GetFrameLibrary().SetEbyedatExpName(
e);
120 return GetFrameLibrary().GetLastEbyedatActionsFile().c_str();
130void KVMFMDataFileReader::InitialiseMesytecConfig(
const std::string& crate,
const std::string& channels)
135#ifndef MESYTEC_DATA_BUFFER_READER_NO_DEFINE_SETUP
136 mesytec::experimental_setup
exp;
137 exp.read_crate_map(crate);
138 exp.read_detector_correspondence(channels);
139 MTEC_bufrdr.define_setup(exp);
141 MTEC_bufrdr.read_crate_map(crate);
142 MTEC_bufrdr.read_detector_correspondence(channels);
R__EXTERN TSystem * gSystem
Read MFM format acquisition data.
Int_t GetRunNumberReadFromFile() const
void SetActionsExpName(const string &)
void SetActionsDirectory(const string &)
TString GetPathToLastEbyedatActionsFile()
Returns full path to last ACTIONS file used to decode Ebyedat parameters.
static KVMFMDataFileReader * Open(const Char_t *filepath, Option_t *="")
Int_t GetIntValue(const Char_t *name) const
Abstract base class for reading raw (DAQ) data.
KVNameValueList fRunInfos
informations on run extracted from file
virtual const char * GetValue(const char *name, const char *dflt) const
virtual void Info(const char *method, const char *msgfmt,...) const
const char * Data() const
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
virtual char * ExpandPathName(const char *path)
RVec< PromoteType< T > > exp(const RVec< T > &v)