CFEL - ASG Software Suite
2.5.0
CASS
|
root file converter More...
#include <roottree_converter.h>
Public Member Functions | |
pp2001 (const name_t &, std::string) | |
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 | |
TFile * | _rootfile |
the root file More... | |
TTree * | _tree |
the root tree to fill More... | |
std::list< ACQIRIS::HelperAcqirisDetectors::helperinstancesmap_t::key_type > | _detectors |
list of detectors who's hits should be filled into the tree More... | |
std::list< std::pair< ACQIRIS::DelaylineDetector::particles_t::key_type, ACQIRIS::HelperAcqirisDetectors::helperinstancesmap_t::key_type > > | _particles |
list of particles whos hits should be added to the tree More... | |
treestructure_t | _treestructure |
structure that should be written to tree More... | |
treestructure_t * | _treestructure_ptr |
pointer to the above structure (needed by the tree) More... | |
uint64_t | _eventid |
copy of the event id More... | |
machinestructure_t | _machinestructure |
machine data structure More... | |
machinestructure_t * | _machinestructure_ptr |
pointer to the machine structure defined above More... | |
eventStatus_t | _eventstatusstructure |
event status structure More... | |
eventStatus_t * | _eventstatusstructure_ptr |
pointer to the event status structure More... | |
std::list< shared_pointer > | _pps |
container for all 0d Processors that should be added to the tree More... | |
ppstructure_t | _ppstructure |
0d processor structure More... | |
ppstructure_t * | _ppstructure_ptr |
pointer to the 0d processor structure 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 write detectorhits of user specified delayline detectors to a root tree.
Processor/%name%/{Detectors}
comma separated list of Delaylinedetectors who's hits should be added to the tree.
Processor/%name%/{Particles}
comma separated list of Particles who's hits should be added to the tree. The corrosponding detector does not need to be added above since this processor will find out what detector a particle belongs to automatically.
Processor/%name%/{Processors}
comma separated list of 0d Processors who's values should be added to the tree.
Processor/%name%/{MachineData}
Flag whether to add the Beamline and Epics data to the tree. Default is false.
Processor/%name%/{EventStatus}
Flag whether to add the EventStatus array data to the tree. Default is false.
Definition at line 52 of file roottree_converter.h.
pp2001::pp2001 | ( | const name_t & | name, |
std::string | filename | ||
) |
Construct processor for converting histograms to root histograms.
Definition at line 173 of file roottree_converter.cpp.
References _rootfile, and loadSettings().
|
virtual |
dump all histogram to a root file just before quitting
Reimplemented from cass::Processor.
Definition at line 253 of file roottree_converter.cpp.
References _rootfile, _tree, and cass::ROOTFileHelper::close().
|
virtual |
load the settings of this pp
Reimplemented from cass::Processor.
Definition at line 193 of file roottree_converter.cpp.
References cass::Processor::_condition, _detectors, _eventid, _eventstatusstructure_ptr, cass::Processor::_hide, _machinestructure_ptr, _particles, _pps, _ppstructure_ptr, _rootfile, _tree, _treestructure_ptr, cass::Log::add(), QSettings::beginGroup(), detectors, QString::fromStdString(), cass::Log::INFO, cass::loadAllDets(), cass::Processor::name(), cass::qstring2detector(), cass::qstring2particle(), cass::Processor::setupCondition(), cass::Processor::setupDependency(), cass::Processor::setupGeneral(), and QSettings::value().
Referenced by pp2001().
|
virtual |
only a stub does nothing, but needs to be there because its pure virtual in base class
copy the values of each 0d Processor into the processor structure
Reimplemented from cass::Processor.
Definition at line 259 of file roottree_converter.cpp.
References cass::Processor::_condition, _detectors, _eventid, _eventstatusstructure, _lock, _machinestructure, _particles, _pps, _ppstructure, _tree, _treestructure, cass::copyMapValues(), detector, cass::CASSEvent::devices(), cass::ACQIRIS::e_au, cass::ACQIRIS::e_eV, hit, hits, cass::CASSEvent::id(), cass::CASSEvent::MachineData, cass::ACQIRIS::method, cass::Processor::name(), cass::ACQIRIS::phi, cass::ACQIRIS::px, cass::ACQIRIS::py, cass::ACQIRIS::pz, cass::Processor::result(), cass::ACQIRIS::roh, cass::ACQIRIS::t, cass::ACQIRIS::theta, cass::ACQIRIS::tof_ns, cass::ACQIRIS::tofCor_ns, value, cass::ACQIRIS::x, cass::ACQIRIS::x_mm, cass::ACQIRIS::xCor_mm, cass::ACQIRIS::xCorScal_mm, cass::ACQIRIS::xCorScalRot_mm, cass::ACQIRIS::y, cass::ACQIRIS::y_mm, cass::ACQIRIS::yCor_mm, cass::ACQIRIS::yCorScal_mm, and cass::ACQIRIS::yCorScalRot_mm.
|
inlinevirtual |
overwrite the release
Reimplemented from cass::Processor.
Definition at line 71 of file roottree_converter.h.
|
virtual |
overwrite the retrieval of an histogram
Reimplemented from cass::Processor.
Definition at line 188 of file roottree_converter.cpp.
References cass::Processor::name().
|
protected |
list of detectors who's hits should be filled into the tree
Definition at line 81 of file roottree_converter.h.
Referenced by loadSettings(), and processEvent().
|
protected |
copy of the event id
Definition at line 94 of file roottree_converter.h.
Referenced by loadSettings(), and processEvent().
|
protected |
event status structure
Definition at line 103 of file roottree_converter.h.
Referenced by processEvent().
|
protected |
pointer to the event status structure
Definition at line 106 of file roottree_converter.h.
Referenced by loadSettings().
|
private |
a lock to make the process reentrant
Definition at line 119 of file roottree_converter.h.
Referenced by processEvent().
|
protected |
machine data structure
Definition at line 97 of file roottree_converter.h.
Referenced by processEvent().
|
protected |
pointer to the machine structure defined above
Definition at line 100 of file roottree_converter.h.
Referenced by loadSettings().
|
protected |
list of particles whos hits should be added to the tree
Definition at line 85 of file roottree_converter.h.
Referenced by loadSettings(), and processEvent().
|
protected |
container for all 0d Processors that should be added to the tree
Definition at line 109 of file roottree_converter.h.
Referenced by loadSettings(), and processEvent().
|
protected |
0d processor structure
Definition at line 112 of file roottree_converter.h.
Referenced by processEvent().
|
protected |
pointer to the 0d processor structure
Definition at line 115 of file roottree_converter.h.
Referenced by loadSettings().
|
protected |
the root file
Definition at line 75 of file roottree_converter.h.
Referenced by aboutToQuit(), loadSettings(), and pp2001().
|
protected |
the root tree to fill
Definition at line 78 of file roottree_converter.h.
Referenced by aboutToQuit(), loadSettings(), and processEvent().
|
protected |
structure that should be written to tree
Definition at line 88 of file roottree_converter.h.
Referenced by processEvent().
|
protected |
pointer to the above structure (needed by the tree)
Definition at line 91 of file roottree_converter.h.
Referenced by loadSettings().