1 #ifndef HADAQ_HLDPROCESSOR_H
2 #define HADAQ_HLDPROCESSOR_H
4 #include "base/EventProc.h"
6 #include "hadaq/definess.h"
8 #include "hadaq/TrbProcessor.h"
14 typedef std::map<unsigned,TrbProcessor*> TrbProcMap;
79 if (sub==0)
return false;
153 HldProcessor(
bool auto_create =
false,
const char* after_func =
"");
188 unsigned TransformEvent(
void* src,
unsigned len,
void* tgt = 0,
unsigned tgtlen = 0);
Memory management class.
Definition: Buffer.h:49
Abstract processor of build events.
Definition: EventProc.h:12
EventProc(const char *name="", unsigned brdid=DummyBrdId)
Make constructor protected - no way to create base class instance.
Definition: EventProc.cxx:3
Event - collection of several subevents.
Definition: Event.h:17
base::SubEvent * GetSubEvent(const std::string &name) const
Return subevent by name.
Definition: Event.h:69
Abstract processor of data streams.
Definition: StreamProc.h:21
SubEvent - base class for all event structures Need for: virtual destructor - to be able delete any i...
Definition: base/SubEvent.h:14
SubEvent()
default constructor
Definition: base/SubEvent.h:17
HLD filter.
Definition: HldProcessor.h:62
virtual ~HldFilter()
destructor
Definition: HldProcessor.h:71
virtual bool Process(base::Event *ev)
process event
Definition: HldProcessor.h:74
HldFilter(unsigned trig=0x1)
constructor
Definition: HldProcessor.h:68
unsigned fOnlyTrig
configured trigger to filter
Definition: HldProcessor.h:64
HLD processor.
Definition: HldProcessor.h:93
void SetEventTypeSelect(unsigned evid)
Set event type, only used in the analysis.
Definition: HldProcessor.h:172
virtual void UserPreLoop()
Executing preliminary function before entering event loop.
Definition: HldProcessor.cxx:446
TdcProcessor * GetTDC(unsigned indx) const
Get TDC by index.
Definition: HldProcessor.cxx:122
void CreatePerTDCHisto()
Create summary histos where each bin corresponds to single TDC.
Definition: HldProcessor.cxx:457
virtual void CreateBranch(TTree *)
Create branch in TTree to store provided data - hadaq::HldMessage.
Definition: HldProcessor.cxx:204
base::H2handle fCorrPerTDCChannel
HADAQ corrections per TDC channel.
Definition: HldProcessor.h:119
TrbProcessor * GetTRB(unsigned indx) const
Get TRB by index.
Definition: HldProcessor.cxx:89
std::string fCalibrName
name of calibration for (auto)created components
Definition: HldProcessor.h:108
virtual bool FirstBufferScan(const base::Buffer &buf)
Scan all messages, find reference signals.
Definition: HldProcessor.cxx:216
base::H2handle fHitsPerTDCChannel
HADAQ hits per TDC channel.
Definition: HldProcessor.h:117
hadaqs::RawEvent fLastEvHdr
! copy of last event header (without data)
Definition: HldProcessor.h:129
base::H1handle fSubevSize
HADAQ sub-event size.
Definition: HldProcessor.h:114
std::string fAfterFunc
function called after new elements are created
Definition: HldProcessor.h:106
bool fAutoCreate
when true, TRB/TDC processors will be created automatically
Definition: HldProcessor.h:105
HldMessage fMsg
used for TTree store
Definition: HldProcessor.h:126
void ConfigureCalibration(const std::string &fileprefix, long period, unsigned trig=0xFFFF)
Configure calibration modes.
Definition: HldProcessor.cxx:159
virtual bool doTriggerSelection() const
Returns true when processor used to select trigger signal TRB3 not yet able to perform trigger select...
Definition: HldProcessor.h:135
base::H2handle fQaFinePerTDCChannel
HADAQ QA fine time per TDC channel.
Definition: HldProcessor.h:120
void SetCrossProcess(bool on)
Enable cross-processing of data Let produce time correlation between different TRBs.
Definition: HldProcessor.cxx:547
unsigned NumberOfTDC() const
Return number of TDCs in all TRBs.
Definition: HldProcessor.cxx:111
TdcProcessor * FindTDC(unsigned tdcid) const
Find TDC by id.
Definition: HldProcessor.cxx:136
uint32_t GetEventId() const
Returns current event id.
Definition: HldProcessor.h:157
virtual void Store(base::Event *ev)
Call store event.
Definition: HldProcessor.cxx:357
base::H1handle fErrPerTDC
HADAQ errors per TDC.
Definition: HldProcessor.h:116
hadaqs::RawEvent & GetLastEventHdr()
Return reference on last event header structure.
Definition: HldProcessor.h:193
base::H1handle fQaSummary
HADAQ QA summary histogram.
Definition: HldProcessor.h:124
unsigned fEventTypeSelect
selection for event type (lower 4 bits in event id)
Definition: HldProcessor.h:101
long fCalibrPeriod
how often calibration should be performed
Definition: HldProcessor.h:109
base::H1handle fHitsPerTDC
HADAQ hits per TDC.
Definition: HldProcessor.h:115
virtual void SetStoreKind(unsigned kind=1)
Set store kind for all sub processors.
Definition: HldProcessor.cxx:182
HldProcessor(bool auto_create=false, const char *after_func="")
constructor
Definition: HldProcessor.cxx:23
virtual ~HldProcessor()
destructor
Definition: HldProcessor.cxx:66
base::H2handle fQaEdgesPerTDCChannel
HADAQ QA edges per TDC channel.
Definition: HldProcessor.h:122
base::H2handle fQaToTPerTDCChannel
HADAQ QA ToT per TDC channel.
Definition: HldProcessor.h:121
void DoHadesHistSummary()
Fill QA summary histograms.
Definition: HldProcessor.cxx:323
HldMessage * pMsg
used for TTree store
Definition: HldProcessor.h:127
void SetPrintRawData(bool on=true)
Configure printing raw data in all sub-processors.
Definition: HldProcessor.cxx:193
TrbProcMap fMap
map of trb processors
Definition: HldProcessor.h:99
long fLastHadesTm
! last hades time
Definition: HldProcessor.h:131
unsigned NumberOfTRB() const
Return number of TRBs.
Definition: HldProcessor.cxx:81
void SetAutoCreate(bool on=true)
Enable auto-create mode.
Definition: HldProcessor.h:186
unsigned TransformEvent(void *src, unsigned len, void *tgt=0, unsigned tgtlen=0)
Function to transform HLD event, used for TDC calibrations.
Definition: HldProcessor.cxx:384
virtual void ResetStore()
Reset store.
Definition: HldProcessor.cxx:376
base::H1handle fEvSize
HADAQ event size.
Definition: HldProcessor.h:113
bool IsPrintRawData() const
Returns true if print raw data configured.
Definition: HldProcessor.h:183
base::H2handle fErrPerTDCChannel
HADAQ errors per TDC channel.
Definition: HldProcessor.h:118
bool fPrintRawData
true when raw data should be printed
Definition: HldProcessor.h:103
base::H2handle fQaErrorsPerTDCChannel
HADAQ QA errors per TDC channel.
Definition: HldProcessor.h:123
void AddTrb(TrbProcessor *trb, unsigned id)
Way to register trb processor.
Definition: HldProcessor.cxx:73
TrbProcessor * FindTRB(unsigned trbid) const
Find TRB by id.
Definition: HldProcessor.cxx:101
base::H1handle fEvType
HADAQ event type.
Definition: HldProcessor.h:112
virtual void SetTriggerWindow(double left, double right)
Set trigger window not only for itself, but for all subprocessors.
Definition: HldProcessor.cxx:171
uint32_t GetRunId() const
Returns current run id.
Definition: HldProcessor.h:159
unsigned fCalibrTriggerMask
mask with enabled event ID, default all
Definition: HldProcessor.h:110
HLD subevent.
Definition: HldProcessor.h:40
HldSubEvent(const HldMessage &msg)
copy constructor
Definition: HldProcessor.h:47
virtual ~HldSubEvent()
destructor
Definition: HldProcessor.h:49
virtual unsigned Multiplicity() const
Method returns event multiplicity - that ever it means.
Definition: HldProcessor.h:52
HldSubEvent()
constructor
Definition: HldProcessor.h:45
HldMessage fMsg
message
Definition: HldProcessor.h:42
TDC processor.
Definition: TdcProcessor.h:32
TRB processor.
Definition: TrbProcessor.h:46
HLD message.
Definition: HldProcessor.h:22
uint32_t run_nr
run number
Definition: HldProcessor.h:25
HldMessage(const HldMessage &src)
copy constructor
Definition: HldProcessor.h:31
uint8_t trig_type
trigger type
Definition: HldProcessor.h:23
uint32_t seq_nr
event sequence number
Definition: HldProcessor.h:24
HldMessage()
constructor
Definition: HldProcessor.h:28
HADES raw event.
Definition: definess.h:315