CFEL - ASG Software Suite
2.5.0
CASS
|
converts histograms to (c)rystal (b)inary (f)ormat files. More...
#include <cbf_output.h>
Public Member Functions | |
pp1500 (const name_t &) | |
constructor More... | |
virtual void | processEvent (const CASSEvent &) |
overwrite process event More... | |
virtual void | aboutToQuit () |
dump dark to cbf just before quitting More... | |
virtual void | loadSettings (size_t) |
load the settings of this pp More... | |
virtual const result_t & | result (const CASSEvent::id_t eventid=0) |
overwrite the retrieval of an histogram More... | |
virtual void | releaseEvent (const CASSEvent &) |
overwrite the release More... | |
![]() | |
Processor (const name_t &name) | |
constructor More... | |
virtual | ~Processor () |
virtual destructor More... | |
result_t::shared_pointer | resultCopy (const uint64_t eventid) |
retrieve histogram for id More... | |
virtual void | load () |
load the general settings More... | |
const names_t & | dependencies () |
Define all processors keys a processor depends on. More... | |
void | clearDependencies () |
clear the dependenies More... | |
void | clearHistograms () |
clear the histograms More... | |
virtual void | processCommand (std::string command) |
process command in pp More... | |
const name_t | name () const |
retrieve the name of this processor More... | |
bool | hide () const |
retrieve the hide flag of this processor More... | |
const std::string & | comment () const |
retrieve the comment of this processor More... | |
Protected Attributes | |
std::string | _basefilename |
the filename that the data will be written to More... | |
shared_pointer | _pHist |
pp containing histogram to dump to cbf More... | |
shared_pointer | _summaryHist |
pp containing histogram that will be written as summary to dump to cbf More... | |
int | _maxFilePerSubDir |
the number of files in each subdir More... | |
int | _filecounter |
counter to count how many files have been written More... | |
![]() | |
const name_t | _name |
the processors name More... | |
bool | _hide |
flag to tell whether this pp should be hidden in the dropdown list More... | |
std::string | _comment |
optional comment that one can add to a processor. More... | |
CachedList | _resultList |
the list of results More... | |
names_t | _dependencies |
the list of dependencies More... | |
shared_pointer | _condition |
pointer to the processor that will contain the condition More... | |
Private Attributes | |
QMutex | _lock |
a lock to make the process reentrant More... | |
Additional Inherited Members | |
![]() | |
typedef std::tr1::shared_ptr< Processor > | shared_pointer |
a shared pointer of this More... | |
typedef std::string | name_t |
define the name type More... | |
typedef std::list< name_t > | names_t |
define the list of names More... | |
typedef CachedList::item_type | result_t |
define the results More... | |
typedef CachedList::item_sp | resultsp_t |
define the shared pointer to the result More... | |
![]() | |
virtual void | process (const CASSEvent &event, result_t &result) |
process the event More... | |
virtual void | createHistList (result_t::shared_pointer result) |
create result list. More... | |
void | setupGeneral () |
general setup of the processor More... | |
bool | setupCondition (bool defaultConditionType=true) |
setup the condition. More... | |
shared_pointer | setupDependency (const std::string &depVarName, const name_t &name="") |
setup the dependecy. More... | |
converts histograms to (c)rystal (b)inary (f)ormat files.
Processor/%name%/{Name}
processor name containing the histogram that write to cbf. If not set then no cbf file will be written when condition is true
Processor/%name%/{SummaryName}
processor name containing Histogram to be written as summary to cbf. If not set then no summary will be written
Processor/%name%/{FileBaseName}
Default name given by program parameter
Processor/%name%/{MaximumNbrFilesPerDir}
Distribute the files over subdirectories where each subdir contains this amount of files. If -1 it will not distribute the files. Default is -1.
Definition at line 38 of file cbf_output.h.
pp1500::pp1500 | ( | const name_t & | name | ) |
|
virtual |
dump dark to cbf just before quitting
return if there is no summary to be written
create filename from base filename, but first remove subdir from filename when they should be distributed
Reimplemented from cass::Processor.
Definition at line 130 of file cbf_output.cpp.
References _basefilename, _lock, _maxFilePerSubDir, _summaryHist, cass::AlphaCounter::removeAlphaSubdir(), and cass::CBF::write().
|
virtual |
load the settings of this pp
when requested add the first subdir to the filename and make sure that the directory exists.
Reimplemented from cass::Processor.
Definition at line 34 of file cbf_output.cpp.
References _basefilename, cass::Processor::_condition, _filecounter, cass::Processor::_hide, _maxFilePerSubDir, _pHist, _summaryHist, cass::Log::add(), QSettings::beginGroup(), QString::fromStdString(), cass::Log::INFO, cass::AlphaCounter::intializeDir(), cass::Processor::name(), cass::Processor::setupCondition(), cass::Processor::setupDependency(), cass::Processor::setupGeneral(), and QSettings::value().
Referenced by pp1500().
|
virtual |
overwrite process event
return if there is no histogram to be written
return if the condition for this pp is false
increment subdir in filename when they should be distributed and the counter exeeded the maximum amount of files per subdir
create filename from base filename + event id
Reimplemented from cass::Processor.
Definition at line 99 of file cbf_output.cpp.
References _basefilename, cass::Processor::_condition, _filecounter, _lock, _maxFilePerSubDir, _pHist, cass::Result< T >::begin(), cass::CASSEvent::id(), cass::AlphaCounter::increaseDirCounter(), cass::Result< T >::lock, cass::Result< T >::shape(), cass::toString(), and cass::CBF::write().
|
inlinevirtual |
overwrite the release
Reimplemented from cass::Processor.
Definition at line 57 of file cbf_output.h.
|
virtual |
overwrite the retrieval of an histogram
Reimplemented from cass::Processor.
Definition at line 94 of file cbf_output.cpp.
References cass::Processor::name().
|
protected |
the filename that the data will be written to
Definition at line 61 of file cbf_output.h.
Referenced by aboutToQuit(), loadSettings(), and processEvent().
|
protected |
counter to count how many files have been written
Definition at line 73 of file cbf_output.h.
Referenced by loadSettings(), and processEvent().
|
private |
a lock to make the process reentrant
Definition at line 77 of file cbf_output.h.
Referenced by aboutToQuit(), and processEvent().
|
protected |
the number of files in each subdir
Definition at line 70 of file cbf_output.h.
Referenced by aboutToQuit(), loadSettings(), and processEvent().
|
protected |
pp containing histogram to dump to cbf
Definition at line 64 of file cbf_output.h.
Referenced by loadSettings(), and processEvent().
|
protected |
pp containing histogram that will be written as summary to dump to cbf
Definition at line 67 of file cbf_output.h.
Referenced by aboutToQuit(), and loadSettings().