10 #include <tr1/functional>
24 using std::tr1::placeholders::_1;
91 _comment = settings.
value(
"Comment",
"").toString().toStdString();
99 if (settings.
contains(
"ConditionName"))
118 if (dependkey.empty())
127 throw invalid_argument(
"Processor::setupDependency(): Error: '" +
128 name() +
"' looks for a dependency '" + dependkey +
129 "'. One cannot let a processor depend on itself." +
130 " Note that qsettings is not case sensitive, so on must provide" +
131 " names that differ not only in upper / lower case.");
135 "' check if dependency key '" + depVarName +
"' which is '" +
136 dependkey +
"' is already on the dependency list");
140 "': '" + dependkey +
"' is not on depend list, add it ");
146 "' Dependency is on list. Retrieve '"+dependkey +
"' from the mananger");
157 _hide = settings.
value(
"Hide",
false).toBool();
158 _comment = settings.
value(
"Comment",
"").toString().toStdString();
159 if (settings.
contains(
"ConditionName"))
168 "' not implemented");
174 "' not implemented");
180 "' not implemented");
186 "' not implemented");
Event to store all LCLS Data.
virtual void createHistList(result_t::shared_pointer result)
create result list.
std::string _comment
optional comment that one can add to a processor.
const item_type & latest() const
retrieve the latest item
const name_t name() const
retrieve the name of this processor
check if FEL is off by checking for bykick which is eventid
std::tr1::shared_ptr< self_type > shared_pointer
a shared pointer of this class
virtual void aboutToQuit()
function that will be called when the processor is about to be deleted
result_t::shared_pointer resultCopy(const uint64_t eventid)
retrieve histogram for id
void clearItems()
clear the items in the list
uint64_t id_t
define the id type
bool _hide
flag to tell whether this pp should be hidden in the dropdown list
uint64_t id() const
retrieve the id of the result
file contains custom exceptions used in cass
Exception thrown when there is a problem with the data.
virtual void processCommand(std::string command)
process command in pp
static void add(Level level, const std::string &line)
add a string to the log
iter_type newItem(const id_type &id)
get an item for processing
fromStdString(const std::string &str)
shared_pointer clone() const
create a copy of the result
virtual ~Processor()
virtual destructor
virtual void processEvent(const CASSEvent &event)
process the event
void setup(item_sp item, size_t size)
create the list of items
shared_pointer setupDependency(const std::string &depVarName, const name_t &name="")
setup the dependecy.
contains(const QString &key)
virtual void process(const CASSEvent &event, result_t &result)
process the event
void release(const id_type &id)
unlock the item with id
virtual void releaseEvent(const CASSEvent &event)
tell the list that the result for event can be overwritten
CachedList _resultList
the list of results
names_t _dependencies
the list of dependencies
QReadWriteLock lock
lock for locking operations on the data of the container
contains the manager for the processors
std::string toString(const Type &t)
convert any type to a string
virtual void loadSettings(size_t unused)
Provide default implementation of loadSettings that does nothing.
file contains processors baseclass declaration
value(const QString &key, const QVariant &defaultValue=QVariant()
Processor(const name_t &name)
constructor
void setupGeneral()
general setup of the processor
file contains specialized class that do the settings for cass
virtual void load()
load the general settings
const size_t NbrOfWorkers
global variable to set the number of worker threads
static shared_pointer::element_type & reference()
return a reference to this instance
list_type::iterator iter_type
define an iterator for the list
shared_pointer _condition
pointer to the processor that will contain the condition
void clearHistograms()
clear the histograms
bool setupCondition(bool defaultConditionType=true)
setup the condition.
std::string name_t
define the name type
const item_type & item(const id_type &id)
retrieve an item with the right id
contains a logger for cass
std::tr1::shared_ptr< Processor > shared_pointer
a shared pointer of this
beginGroup(const QString &prefix)
virtual const result_t & result(const CASSEvent::id_t eventid=0)
retrieve a result for a given id.