CFEL - ASG Software Suite  2.5.0
CASS
Public Member Functions | Protected Attributes | Private Attributes | List of all members
cass::pp2001 Class Reference

root file converter More...

#include <roottree_converter.h>

+ Inheritance diagram for cass::pp2001:
+ Collaboration diagram for cass::pp2001:

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_tresult (const CASSEvent::id_t eventid=0)
 overwrite the retrieval of an histogram More...
 
virtual void releaseEvent (const CASSEvent &)
 overwrite the release More...
 
- Public Member Functions inherited from cass::Processor
 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_tdependencies ()
 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...
 
- Protected Attributes inherited from cass::Processor
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

- Public Types inherited from cass::Processor
typedef std::tr1::shared_ptr< Processorshared_pointer
 a shared pointer of this More...
 
typedef std::string name_t
 define the name type More...
 
typedef std::list< name_tnames_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...
 
- Protected Member Functions inherited from cass::Processor
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...
 

Detailed Description

root file converter

will write detectorhits of user specified delayline detectors to a root tree.

User definable Parameters:

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.

Author
Lutz Foucar

Definition at line 52 of file roottree_converter.h.

Constructor & Destructor Documentation

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().

Member Function Documentation

void pp2001::aboutToQuit ( )
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().

void pp2001::loadSettings ( size_t  )
virtual
void pp2001::processEvent ( const CASSEvent evt)
virtual
virtual void cass::pp2001::releaseEvent ( const CASSEvent )
inlinevirtual

overwrite the release

Reimplemented from cass::Processor.

Definition at line 71 of file roottree_converter.h.

const Processor::result_t & pp2001::result ( const CASSEvent::id_t  eventid = 0)
virtual

overwrite the retrieval of an histogram

Reimplemented from cass::Processor.

Definition at line 188 of file roottree_converter.cpp.

References cass::Processor::name().

Member Data Documentation

std::list<ACQIRIS::HelperAcqirisDetectors::helperinstancesmap_t::key_type> cass::pp2001::_detectors
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().

uint64_t cass::pp2001::_eventid
protected

copy of the event id

Definition at line 94 of file roottree_converter.h.

Referenced by loadSettings(), and processEvent().

eventStatus_t cass::pp2001::_eventstatusstructure
protected

event status structure

Definition at line 103 of file roottree_converter.h.

Referenced by processEvent().

eventStatus_t* cass::pp2001::_eventstatusstructure_ptr
protected

pointer to the event status structure

Definition at line 106 of file roottree_converter.h.

Referenced by loadSettings().

QMutex cass::pp2001::_lock
private

a lock to make the process reentrant

Definition at line 119 of file roottree_converter.h.

Referenced by processEvent().

machinestructure_t cass::pp2001::_machinestructure
protected

machine data structure

Definition at line 97 of file roottree_converter.h.

Referenced by processEvent().

machinestructure_t* cass::pp2001::_machinestructure_ptr
protected

pointer to the machine structure defined above

Definition at line 100 of file roottree_converter.h.

Referenced by loadSettings().

std::list<std::pair<ACQIRIS::DelaylineDetector::particles_t::key_type, ACQIRIS::HelperAcqirisDetectors::helperinstancesmap_t::key_type> > cass::pp2001::_particles
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().

std::list<shared_pointer> cass::pp2001::_pps
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().

ppstructure_t cass::pp2001::_ppstructure
protected

0d processor structure

Definition at line 112 of file roottree_converter.h.

Referenced by processEvent().

ppstructure_t* cass::pp2001::_ppstructure_ptr
protected

pointer to the 0d processor structure

Definition at line 115 of file roottree_converter.h.

Referenced by loadSettings().

TFile* cass::pp2001::_rootfile
protected

the root file

Definition at line 75 of file roottree_converter.h.

Referenced by aboutToQuit(), loadSettings(), and pp2001().

TTree* cass::pp2001::_tree
protected

the root tree to fill

Definition at line 78 of file roottree_converter.h.

Referenced by aboutToQuit(), loadSettings(), and processEvent().

treestructure_t cass::pp2001::_treestructure
protected

structure that should be written to tree

Definition at line 88 of file roottree_converter.h.

Referenced by processEvent().

treestructure_t* cass::pp2001::_treestructure_ptr
protected

pointer to the above structure (needed by the tree)

Definition at line 91 of file roottree_converter.h.

Referenced by loadSettings().


The documentation for this class was generated from the following files: