14 #include <QtCore/QString>
55 "' of pp '"+
_one->name() +
56 "'. Condition is '" +
_condition->name() +
"'");
73 nth_element(lastData.begin(), lastData.begin() +
_medianSize/2,
103 string filename(s.
value(
"BinaryFile",
"").toString().toStdString());
104 size_t sizeX(s.
value(
"SizeX",0).toInt());
105 size_t sizeY(s.
value(
"SizeY",0).toInt());
110 std::ifstream in(filename.c_str(), std::ios::binary|std::ios::ate);
113 const size_t size_raw = in.tellg();
114 const size_t size = size_raw /
sizeof(float);
117 if (size == sizeX*sizeY)
119 in.seekg(0,std::ios::beg);
120 in.read(reinterpret_cast<char*>(&(_result->front())), size_raw );
123 throw invalid_argument(
"pp302:loadSettings(): binary file Histogram2D: wrong size '"+
127 throw invalid_argument(
"pp302:loadSettings(): binary file Histogram2D: cannot open file '" +
131 "' loads 2DHistogram from binary File '" + filename +
132 "' which is is of size '" +
toString(sizeX) +
file contains processors that will operate on histograms of other processors, calculating statistical...
CachedList::item_type result_t
define the results
virtual void loadSettings(size_t)
load the settings of this pp
Event to store all LCLS Data.
const_iterator end() const
retrieve iterator to the end of storage
unsigned int _medianSize
last N items to be used for median calculation
const name_t name() const
retrieve the name of this processor
std::tr1::shared_ptr< self_type > shared_pointer
a shared pointer of this class
QMutex _mutex
mutex to lock the median storage
shared_pointer _one
pp containing first histogram
things written only at end of run H5Dump ProcessorSummary size
std::deque< float > _medianStorage
storage of last values for median calculation
pp302(const name_t &)
constructor
result_t::shared_pointer _result
the constant result
static void add(Level level, const std::string &line)
add a string to the log
void setValue(const_reference value)
assign the result container to a value
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.
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()
virtual void createHistList(result_t::shared_pointer result)
create the list of results
void setupGeneral()
general setup of the processor
file contains specialized class that do the settings for cass
an accumulating processor
shared_pointer _condition
pointer to the processor that will contain the condition
virtual void loadSettings(size_t)
load the settings of this pp
bool setupCondition(bool defaultConditionType=true)
setup the condition.
std::string name_t
define the name type
contains a logger for cass
check if there is some light in the chamber based upon the GMD value
virtual void process(const CASSEvent &, result_t &)
process event
beginGroup(const QString &prefix)