9 #include <QtCore/QDateTime>
40 bool allDepsAreThere(
true);
42 string hName(s.
value(
"Name",
"Unknown").toString().toStdString());
43 if (hName !=
"Unknown")
46 allDepsAreThere =
_pHist && allDepsAreThere;
49 string summaryName(s.
value(
"SummaryName",
"Unknown").toString().toStdString());
50 if (summaryName !=
"Unknown")
57 if (!(ret && allDepsAreThere))
64 throw invalid_argument(
"pp1500: The histogram '" +
_pHist->name()
65 +
"' is not a 2d histogram");
72 throw invalid_argument(
"pp1500: The summary histogram '" +
_summaryHist->name()
73 +
"'is not a 2d histogram");
91 ". Condition is '" +
_condition->name() +
"'");
96 throw logic_error(
"pp1500::result: '"+
name()+
"' should never be called");
146 CBF::write(filename,sHist.begin(),sHist.shape());
Event to store all LCLS Data.
std::string _basefilename
the filename that the data will be written to
const name_t name() const
retrieve the name of this processor
file contains declaration of the CASSEvent
shared_pointer _summaryHist
pp containing histogram that will be written as summary to dump to cbf
pp1500(const name_t &)
constructor
uint64_t id_t
define the id type
bool _hide
flag to tell whether this pp should be hidden in the dropdown list
static std::string increaseDirCounter(const std::string &fname)
increase the alpha counter
shared_pointer _pHist
pp containing histogram to dump to cbf
static void add(Level level, const std::string &line)
add a string to the log
const_iterator begin() const
retrieve a iterator for read access to beginning
fromStdString(const std::string &str)
base class for processors.
shared_pointer setupDependency(const std::string &depVarName, const name_t &name="")
setup the dependecy.
virtual const result_t & result(const CASSEvent::id_t eventid=0)
overwrite the retrieval of an histogram
virtual void processEvent(const CASSEvent &)
overwrite process event
file contains declaration of classes and functions that help other processors to do their job...
QReadWriteLock lock
lock for locking operations on the data of the container
std::string toString(const Type &t)
convert any type to a string
value(const QString &key, const QVariant &defaultValue=QVariant()
int _maxFilePerSubDir
the number of files in each subdir
void setupGeneral()
general setup of the processor
static std::string removeAlphaSubdir(const std::string &fname)
remove the alpha counter subdir from filename
int _filecounter
counter to count how many files have been written
file contains specialized class that do the settings for cass
QMutex _lock
a lock to make the process reentrant
output of 2d histograms into the cbf.
shared_pointer _condition
pointer to the processor that will contain the condition
virtual void aboutToQuit()
dump dark to cbf just before quitting
shape_t shape() const
return the shape of the result
bool setupCondition(bool defaultConditionType=true)
setup the condition.
std::string name_t
define the name type
contains a logger for cass
static std::string intializeDir(const std::string &fname)
initialize the directory
beginGroup(const QString &prefix)
void write(const std::string &filename, std::vector< float >::const_iterator data, const std::pair< int, int > &shape)
write cbf file
virtual void loadSettings(size_t)
load the settings of this pp