CFEL - ASG Software Suite
2.5.0
CASS
|
root file converter More...
#include <root_converter.h>
Classes | |
struct | entry_t |
struct bundleing info for writing an entry to file More... | |
Public Member Functions | |
pp2000 (const name_t &name) | |
Construct processor for converting histograms to root histograms. More... | |
virtual void | processEvent (const CASSEvent &) |
only a stub does nothing, but needs to be there because its pure virtual in base class More... | |
virtual void | loadSettings (size_t) |
load the settings of this pp More... | |
virtual void | aboutToQuit () |
dump all histogram to a root file just before quitting 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 | _rootfilename |
the root filename where we store the data in More... | |
std::list< entry_t > | _ppList |
container with all pps that contain the histograms to dump to hdf5 More... | |
std::list< entry_t > | _ppSummaryList |
container for all pps that should be written when program quits More... | |
TFile * | _rootfile |
the root file 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... | |
root file converter
will convert all histograms defined in cass to root histograms and write them to a root file. Filename can be chosen with the -o parameter at program start.
Processor/%name%/{FileName}
The name of the output root file. Default is "output.root"
Processor/%name%/Processor/{size}
How many Processors should be written to the root file.
Processor/%name%/Processor/%id%/{Name}
Name of the Processor that should be written into the root file. Default is "unknown"
Processor/%name%/Processor/%id%/{GroupName}
Name of the group in the h5 file into which the Processor should be written into. Default is "/". Note that the eventid will be prepended to the Name given here.
Processor/%name%/Processor/%id%/{ValName}
Name that the data should have in the root file. Default is the name of the Processor.
Processor/%name%/ProcessorSummary/size
How many Processors should be written to the root file.
Processor/%name%/ProcessorSummary/%id%/{Name}
Name of the Processor that should be written into the root file. Default is "unknown"
Processor/%name%/ProcessorSummary/%id%/{GroupName}
Name of the group in the root file into which the Processor should be written into. Default is "/"
Processor/%name%/ProcessorSummary/%id%/{ValName}
Name that the data should have in the root file. Default is the name of the Processor.
Definition at line 56 of file root_converter.h.
pp2000::pp2000 | ( | const name_t & | name | ) |
Construct processor for converting histograms to root histograms.
Definition at line 202 of file root_converter.cpp.
References loadSettings().
|
virtual |
dump all histogram to a root file just before quitting
check if something to be written
write all entries to file
create and change into dir given by user then write hist with given name into the file
go back to original directory and save file
Reimplemented from cass::Processor.
Definition at line 270 of file root_converter.cpp.
References _ppSummaryList, _rootfile, cass::Log::add(), cass::ROOT::changeDir(), cass::ROOTFileHelper::close(), cass::ROOT::copyHistToRootFile(), cass::Processor::name(), and cass::Log::VERBOSEINFO.
|
virtual |
load the settings of this pp
Reimplemented from cass::Processor.
Definition at line 213 of file root_converter.cpp.
References cass::Processor::_condition, cass::Processor::_hide, _ppList, _ppSummaryList, _rootfile, cass::Log::add(), QSettings::beginGroup(), QSettings::beginReadArray(), cass::ROOTFileHelper::create(), QSettings::endArray(), QString::fromStdString(), cass::Log::INFO, cass::Processor::name(), QSettings::setArrayIndex(), cass::Processor::setupCondition(), cass::Processor::setupDependency(), cass::Processor::setupGeneral(), size, and QSettings::value().
Referenced by pp2000().
|
virtual |
only a stub does nothing, but needs to be there because its pure virtual in base class
check if there is something to be written
create the directory name from eventId
write all entries to file
create and change into dir given by user then write hist with given name into the file
go back to original directory and save file
Reimplemented from cass::Processor.
Definition at line 298 of file root_converter.cpp.
References cass::Processor::_condition, _lock, _ppList, _rootfile, cass::ROOT::changeDir(), cass::ROOT::copyHistToRootFile(), cass::ROOT::eventIdToDirectoryName(), and cass::CASSEvent::id().
|
inlinevirtual |
overwrite the release
Reimplemented from cass::Processor.
Definition at line 103 of file root_converter.h.
|
virtual |
overwrite the retrieval of an histogram
Reimplemented from cass::Processor.
Definition at line 208 of file root_converter.cpp.
References cass::Processor::name().
|
private |
a lock to make the process reentrant
Definition at line 120 of file root_converter.h.
Referenced by processEvent().
|
protected |
container with all pps that contain the histograms to dump to hdf5
Definition at line 110 of file root_converter.h.
Referenced by loadSettings(), and processEvent().
|
protected |
container for all pps that should be written when program quits
Definition at line 113 of file root_converter.h.
Referenced by aboutToQuit(), and loadSettings().
|
protected |
the root file
Definition at line 116 of file root_converter.h.
Referenced by aboutToQuit(), loadSettings(), and processEvent().
|
protected |
the root filename where we store the data in
Definition at line 107 of file root_converter.h.