11 #include <QtCore/QFileInfo>
35 _eventIdhead = s.
value(
"EventIdHeader",
"Event ID 24 bits").toString().toStdString();
48 getline(file, headerline);
50 string info(
"TextReader: '" +
_filename +
"' contains the following variables:");
53 info +=
"'"+ *h++ +
"',";
60 vector<double> values;
70 throw runtime_error(
"TextReader(): In file '" +
_filename +
71 "' are not enough values for the amount of values '" +
toString(values.size()) +
73 "'. This is the line: " + line);
76 throw runtime_error(
"TextReader():The CASSEvent does not contain a Machine Data Device");
81 vector<double>::const_iterator
value(values.begin());
82 vector<string>::const_iterator head(
_headers.begin());
84 md.BeamlineData()[*head] = *
value;
void loadSettings()
load the settings of the reader
Event to store all LCLS Data.
file contains declaration of the CASSEvent
base class for all file readers
Splitter _split
a splitter object to split up the lines
char _delim
the deliminator by which the values are separated in the ascii file
static void add(Level level, const std::string &line)
add a string to the log
fromStdString(const std::string &str)
bool operator()(std::ifstream &file, CASSEvent &event)
read the frms6 file contents put them into cassevent
Container for all Machine related Data.
devices_t & devices()
setters
file contains global definitions for project cass
std::string toString(const Type &t)
convert any type to a string
std::vector< std::string > _headers
the value names
value(const QString &key, const QVariant &defaultValue=QVariant()
size_t _linesToSkip
how many lines should be skipped before reading the header line
std::string _filename
the name of the file that we read the values from
void readHeaderInfo(std::ifstream &file)
read the file header
std::string _eventIdhead
the header name under which the event id is stored
definitions of a machine device
file contains specialized class that do the settings for cass
contains class to read txt ascii files
contains a logger for cass
check if there is some light in the chamber based upon the GMD value
beginGroup(const QString &prefix)