CFEL - ASG Software Suite
2.5.0
CASS
|
container and call handler for all registered processors. More...
#include <processor_manager.h>
Public Member Functions | |
void | operator() (const CASSEvent &event) |
process event More... | |
std::tr1::shared_ptr< IdList > | keys () |
retrieve all activated processors keys More... | |
Processor & | getProcessor (const Processor::name_t &name) |
retreive pp with key More... | |
Processor::shared_pointer | getProcessorSPointer (const Processor::name_t &name) |
retreive pp with name More... | |
processors_t & | processors () |
retrieve pp container More... | |
void | aboutToQuit () |
will be called when program will quit More... | |
const keyList_t & | activeList () |
retrieve the list of active processors More... | |
void | loadSettings (size_t) |
Load active processors and histograms. More... | |
Static Public Member Functions | |
static shared_pointer | instance (std::string outputfilename) |
create the instance if not it does not exist already. More... | |
static shared_pointer | instance () |
return the already created instance of this More... | |
static shared_pointer::element_type & | reference () |
return a reference to this instance More... | |
Public Attributes | |
QReadWriteLock | lock |
a read write lock More... | |
Protected Member Functions | |
Processor::shared_pointer | create (const key_t &key) |
factory to create new processor with the name key. More... | |
Protected Attributes | |
std::tr1::shared_ptr< IdList > | _keys |
the list of keys. More... | |
processors_t | _processors |
container for user selected and registered processors More... | |
std::string | _outputfilename |
filename of the output file More... | |
keyList_t | _active |
list of active keys More... | |
Private Member Functions | |
ProcessorManager (std::string outputfilename) | |
Private constructor of singleton. More... | |
ProcessorManager (const ProcessorManager &) | |
Prevent copy-construction of singleton. More... | |
ProcessorManager & | operator= (const ProcessorManager &) |
Prevent assignment (potentially resulting in a copy) of singleton. More... | |
Static Private Attributes | |
static shared_pointer | _instance |
pointer to the singleton instance More... | |
static QMutex | _mutex |
Singleton operation locker. More... | |
container and call handler for all registered processors.
All currently registered processors are listed here, specifying their id and a short description. The processor classes are named according to their number and placed in the file for the most appropriate group according to their content.
The Classes that implement the processor are pointed out in parenthesis. See the Class description for information about what parameters are user settable. (Keep in mind that cases matter)
---Operations-- 00001: Operation on 2 Result 00002: Operation on Result with value or 0D Result 00004: Apply boolean NOT to 0D Result 00014: Ternary Operation (output InputOne when condition is true, InputTwo otherwise) 00009: Check whether Result is in a range 00012: Constant Value 00013: Identity Operation (returns the input) 00015: Check whether value of 0d Result has changed 00040: Threshold result 00041: Set bin value in result to user value, when corresponding bin value of another result is in given range 00050: Project 2D result onto a axis 00057: weighted Project 2D result onto a axis 00051: Integral of 1D result 00055: rotate, transpose or invert axis on 2d result 00056: Contains the result of the previous event 00060: Histogram 0D, 1D or 2D values to a 1D histogram, optionally with custom weights and remembering the counts per bin 00061: Average of a result 00062: Summing up of result 00063: Time Average of a result over given time-intervals 00064: 0D, 1D or 2D into 1D (append on right end, shifting old values to the left) 00065: Histogram two 0D values to a 2D histogram 00066: Create 2D result from two 1D results 00068: Create 2D result from 0D and 1D results, 0D defines the y-axis 00069: Use two 0D values for a scatter plot 00070: Subset a Result 00071: retrieve a user choosable value of a Result 00081: retrieve user choosable bin of 1D Result 00072: Returns a user choosable column from a table like 2D result 00073: Returns a subset of a table based on a condition on a chossable column 00074: Returns a specific value of a specific row of a table 00079: 2D Result from 2 Columns of a table with optional weight column 00500: Add a new column with content of another inputs index which is in table 00075: Clear a Result 00076: Quit CASS when Condition is met 00077: Checks if eventid is on a user provided list 00078: Count how many times it has been called (Counter) 00082: user choosable statistics value of all values of a result 00085: full width at half maximum for a peak in given range of 1D result 00086: find step in a given range of 1D result 00087: find center of mass in given range of 1D result 00088: retrieve an axis parameter of the result 00089: high or low pass filter on 1D result 00090: Q average of detector image 00091: Find local minima in a 1D result ---Data retrieval (Histogram contain only last shot)-- ## Data used with new pixeldetector device 00109: retrieve raw, untreated pixeldetector Image ## Processors below only work when one has set up the pixel detectors 00105: Pixeldetector Image 00107: Display the Map used for correction and pixel detection 00148: 2d image from detected pixels 00149: Number of detected pixels 00144: 2d image from coalesced detected pixels (hits) 00145: Number of coalesced detected pixels (hits) 00146: Split level of coalesced detected pixels (hits) (how many detected pixels within coalseced hit) ## Beamline Data Retrieval 00120: Beamline data 00121: Eventcode check 00122: EventID retrival 00123: Beamline Spectrometer Data 00130: Epics data ## Waveform and detectors recorded via waveform 00110: Acqiris Waveform 00111: CFD Trace from Acqiris Waveform 00112: CFD Analysis of Waveform 00150: TofDetector number of signals in MCP waveform 00151: TofDetector all signals 00152: TofDetector signal height vs. fwhm 00153: TofDetector Deadtime between two consecutive MCP signals 00160: Delayline wireend number of signals 00161: Delayline wireend signal height vs. fwhm 00162: Delayline timesum on anode 00163: Delayline timesum on anode vs. position 00164: Delayline image of first good hit 00165: Delayline reconstructed Number of detectorhits 00166: Delayline data of all reconstructed detectorhits 00167: Delayline Deadtime between two consecutive anode signals 00170: Hex Delayline Calibrator (see Hexcalibrator for parameters) ---Data analysis-- 00200: Scalar value of <cos^2\theta> from 2D Histogram 00201: Angular distribution from a 2D Histogram (interpolating) 00202: transform 2D Histogram kartesian coordinates to polar coordinates (interpolating) 00220: PIPICO Spectrum 00230: Photon energy of Shot 00250: Property of particle 00251: 2d hist with two properties of particle 00252: Number of found particle hits per shot 00203: Local image background using median box 00204: Find Bragg peaks in image using signal to noise ratio 00208: Find Bragg peaks in image using signal to noise ratio without outliers 00210: Find Bragg peaks in image MAD 00209: Cluster connected pixels which are above a threshold in an image 00205: Display Peaks found in an image 00206: Find Pixels that might belong to a bragg peak by looking above threshold 00300: single particle detection 00301: median over last values 00302: binary file 2DHistogram 00310: Autocorrelation of image in polar coordinates 00311: Autocorrelation of image in kartesian coordinates 00312: FFT of an histogram 00313: Convolute a histogram with a kernel 00240: Test Image 00330: Generate Calibration data from raw images 00331: Generate Gain Calibration from images 00332: Generate Hot Pixel Map from images 00333: Generate common mode Background level 00334: Generate common mode Background level for CsPAD 00241: fix distorted offset of pnCCD frames 00242: same as 105, but one can put a user defined value at the masked pixels 00243: apply a mask to an image set the masked values to a user defined value 00244: generate a histogram of the pixelvalues for each pixel in an image 01600: convert cass cspad to cheetah cspad 01601: rearrange cspad to coarsly right orientation (looking from upstream) 01602: rearrange cspad using a geom file 00400: ToF to Energy conversion 00404: ToF to Mass to Charge ratio conversion 00405: Pulse duration of shot 00406: ToF to Energy conversion from 0D histogram 00407: ToF to Energy conversion by linear interpolation 00408: ToF to Energy conversion by linear interpolation and correction from 0D histogram 00410: calculate covariance map 00412: calculate intensity correction ---Output-- 01002: Put selectable histograms into HDF5-Files 01500: Put a selectable 2d histogram into CBF Files 02000: Dump all selected 0d, 1d and 2d cass histograms to root file 02001: Write Hits of selected Delayline Detectors to ROOT Tree ---Coltrims Analysis-- 05000: Electron Energy from Recoil momenta 05001: Tripple Coincidence Spectra from same detector ---Removed Processors--- 00003: removed use pp2 instead 00005: removed use pp1 instead 00006: removed use pp1 instead 00007: removed use pp1 instead 00008: removed use pp1 instead 00010: removed use pp12 instead 00011: removed use pp12 instead 00020: removed used pp1 instead 00021: removed used pp1 instead 00022: removed used pp1 instead 00023: removed used pp1 instead 00024: removed use pp2 instead 00025: removed use pp2 instead 00026: removed use pp2 instead 00027: removed use pp2 instead 00030: removed use pp2 instead 00031: removed use pp2 instead 00032: removed use pp2 instead 00033: removed use pp2 instead 00052: removed use pp202 and pp50 instead 00053: removed use pp202 and pp50 instead 00054: removed use pp202 instead 00067: removed use pp60 instead 00080: removed use pp78 instead 00083: removed use pp82 instead 00084: removed use pp82 instead 00100: removed use pp105 instead 00101: removed use pp105 and pp82 instead 00102: removed use pp105, pp40 and pp82 instead 00106: removed use pp60 instead 00108: removed use pp84 instead 00140: removed use pp105 and pp60 instead 00141: removed use pp148 instead 00142: removed use pp149 instead 00143: removed use pp60 instead 00147: removed use pp60 instead 00155: removed use pp84 instead 00156: removed use pp84 instead 00207: removed use pp79 instead 00212: removed use pp144 or pp148 instead 00401: removed use pp83 instead 00402: removed use pp61 instead 00403: removed use pp70 instead 00420: removed use pp80 instead 01000: removed use pp1002 instead 01001: removed use pp1002 instead
Definition at line 264 of file processor_manager.h.
type of proccessor accessor key
Definition at line 491 of file processor_manager.h.
List of all processor keys.
Definition at line 497 of file processor_manager.h.
typedef std::list<Processor::shared_pointer> cass::ProcessorManager::processors_t |
Container of all currently active processors.
Definition at line 494 of file processor_manager.h.
typedef std::tr1::shared_ptr<ProcessorManager> cass::ProcessorManager::shared_pointer |
a shared pointer of this class
Definition at line 488 of file processor_manager.h.
List of all currently registered processors.
Keep this fully list synchronized with the documentation in the class header!
Definition at line 274 of file processor_manager.h.
|
private |
Private constructor of singleton.
outputfilename | filename of the file containing the results. Used by special processors. |
Definition at line 104 of file processor_manager.cpp.
References _outputfilename, cass::Log::add(), and cass::Log::DEBUG0.
|
private |
Prevent copy-construction of singleton.
void ProcessorManager::aboutToQuit | ( | ) |
will be called when program will quit
Definition at line 141 of file processor_manager.cpp.
References _processors.
|
inline |
retrieve the list of active processors
Definition at line 557 of file processor_manager.h.
References _active.
|
protected |
factory to create new processor with the name key.
The ID which processor should be used for the name is extracted from the settings and has the property ID.
[in] | key | the key of the processor |
Definition at line 277 of file processor_manager.cpp.
References _outputfilename, AcqirisWaveform, cass::Log::add(), AddColumnToTable, AnodeTimesum, AnodeTimesumVsPos, Autocorrelation, Autocorrelation2, axisparameter, QSettings::beginGroup(), binaryFile2D, BlData, BldSpecData, BooleanNOT, BraggPeakMedian, BraggPeakSNR, BraggPeakSNRWOOutliers, BraggPeakThreshold, calcCorrection, calcCovarianceMap, calibration, CBFOutput, CCDCoalescedPhotonHitsImage, centerofmass, CFDAnalysis, CFDTraceFromWaveform, CheckChange, CheckRange, ChetahConv, ClearHistogram, ClusterPixelsAboveThreshold, CoarseCsPadAligment, commonmodecalc, commonmodecalcCsPad, ConstantValue, convoluteKernel, CorrectionMaps, Cos2Theta, Counter, cass::Log::DEBUG0, DelaylineAllReconstuctedHits, DelaylineAnodeSigDeadtime, DelaylineFirstGoodHit, DelaylineNbrReconstructedHits, DrawPeaks, ElectronEnergy, EpicsData, EventID, EvrCode, fft, fixOffset, QString::fromStdString(), fwhmPeak, gaincalibration, GeomFileCsPadAligment, HDF52dConverter, HEXCalibrator, highlowpassfilter, HistogramAveraging, HistogramSumming, hotpixmap, Identity, IdIsOnList, imageManip, MaskImageValue, MaskValue, maximumBin, meanvalue, MedianBoxBackground, medianLastValues, NbrOfCCDCoalescedPhotonHits, NbrParticles, NewCCDPhotonHitsImage, NewNbrOfCCDPhotonHits, nodes, OneDIntergral, OneDto2DHistogramming, OneDtoScatterPlot, OperationsOn2Histos, OperationWithValue, ParticleValue, ParticleValues, PhotonEnergy, PIPICO, PixelDetectorImage, PixelHistogram, previousHist, PulseDuration, qaverage, QuitCASS, RAWPixeldetectorFrame, RealAngularDistribution, RealPolarTransformation, RetrieveColFromTable, RetrieveValOfRow, RetrieveValue, ROOTDump, ROOTTreeDump, running1Dfrom0D, SingleParticleDetection, SplitLevelCoalescedPhotonHits, step, SubsetHistogram, SubsetTable, Table2TwoDHist, TernaryOperator, TestImage, Threshold, ThresholdImage, tof2energy, tof2energy0D, tof2energylinear, tof2energylinear0D, TofDetAllSignals, TofDetDeadtime, TofDetMcpHeightVsFwhm, TofDetNbrSignals, TofToMTC, cass::toString(), TrippleCoincidence, TwoDProjection, QSettings::value(), weightedProject, WireendHeightvsFwhm, WireendNbrSignals, ZeroDand1Dto2DHistogramming, ZeroDHistogramming, and ZeroDto2DHistogramming.
Referenced by loadSettings().
Processor & ProcessorManager::getProcessor | ( | const Processor::name_t & | name | ) |
retreive pp with key
Definition at line 260 of file processor_manager.cpp.
References getProcessorSPointer().
Processor::shared_pointer ProcessorManager::getProcessorSPointer | ( | const Processor::name_t & | name | ) |
retreive pp with name
name | The name of the Processor to retrive |
Definition at line 247 of file processor_manager.cpp.
References _processors.
Referenced by getProcessor().
|
static |
create the instance if not it does not exist already.
outputfilename | filename of the outputfile |
Definition at line 71 of file processor_manager.cpp.
References cass::Log::add(), cass::toString(), QMutexLocker::unlock(), and cass::Log::VERBOSEINFO.
|
static |
return the already created instance of this
check whether static instance has been created and returns if so otherwise throws an exception.
Definition at line 85 of file processor_manager.cpp.
Referenced by cass::Workers::end(), and cass::RatePlotter::run().
tr1::shared_ptr< IdList > ProcessorManager::keys | ( | ) |
retrieve all activated processors keys
populate the serializable list of keys with the processors that are not hidden and return it
Definition at line 265 of file processor_manager.cpp.
References _keys, and _processors.
void ProcessorManager::loadSettings | ( | size_t | ) |
Load active processors and histograms.
Reset set of active processors/histograms based on cass.ini
remove all processors
load all processors declared in the ini file and convert them to list of std strings
add a default true and false processors to beginning of list
create all processors in the list
sort the processors such that the ones with no dependencies are ealier in the list
retrive dependencies of processor
move all dependencies of this processor that appear later in the list to one before this processor in the list and set the pointer to the moved processor
when the list has not been reordered we continue with the next element in the next iteration, otherwise we should treat the current element in the next iteration
log which pp are generated and their order
load the settings of the processors
Definition at line 153 of file processor_manager.cpp.
References _processors, cass::Log::add(), QSettings::beginGroup(), QSettings::childGroups(), create(), cass::Log::DEBUG0, cass::Log::DEBUG1, QSettings::fileName(), QSettings::group(), cass::Log::INFO, cass::toString(), and cass::Log::VERBOSEINFO.
void ProcessorManager::operator() | ( | const CASSEvent & | event | ) |
process event
This function will call processors operators in the container
event | CASSEvent to process by all active processors |
tell the pp that the event is completly processed
Definition at line 113 of file processor_manager.cpp.
References _processors, cass::CASSEvent::id(), cass::pixeldetector::DetectorHelper::releaseDetector(), and cass::ACQIRIS::HelperAcqirisDetectors::releaseDetector().
|
private |
Prevent assignment (potentially resulting in a copy) of singleton.
|
inline |
|
static |
return a reference to this instance
check whether static instance has been created and returns if so otherwise throws an exception.
Definition at line 93 of file processor_manager.cpp.
Referenced by cass::RatePlotter::run(), and cass::Processor::setupDependency().
|
protected |
|
staticprivate |
pointer to the singleton instance
Definition at line 614 of file processor_manager.h.
|
protected |
the list of keys.
used to create the combobox in cassview
Definition at line 588 of file processor_manager.h.
Referenced by keys().
|
staticprivate |
Singleton operation locker.
Definition at line 617 of file processor_manager.h.
|
protected |
filename of the output file
Definition at line 594 of file processor_manager.h.
Referenced by create(), and ProcessorManager().
|
protected |
container for user selected and registered processors
Definition at line 591 of file processor_manager.h.
Referenced by aboutToQuit(), getProcessorSPointer(), keys(), loadSettings(), operator()(), and processors().
QReadWriteLock cass::ProcessorManager::lock |
a read write lock
read write for making sure that reload is not called when someone wants retrieve a list or retrieve a processor.
Definition at line 564 of file processor_manager.h.