14 using namespace Diana;
18 fInputOwner = GetString(
"InputOwner",
"DAQ");
19 fmSecLeft = GetInt(
"mSecLeft",0);
20 fmSecRight = GetInt(
"mSecRight",0);
21 fOverWritePulse = GetBool(
"Overwrite",
true);
25 if(!fOverWritePulse) {
31 fChannelInfos.clear();
40 if(!filler || !filler->IsValid()) Panic(
"QPulse does not contain a valid QPulseFiller, access to continuous data not possible.");
43 const int run = header.
GetRun();
46 fChannelInfos.clear();
49 fRunDuration =
rHandle.Get().fDuration*1e9;
51 const std::map<int,QChannelRunData*>& chanMap =
rHandle.Get().GetChannelsRunData();
52 std::map<int,QChannelRunData*>::const_iterator iter = chanMap.begin();
53 while(iter != chanMap.end()) {
54 const int channel = iter->first;
70 if(numberOfSamples%2 != 0) {
79 void* rdv = (
void*)&channelRunData;
85 GlobalData().Set(&
rHandle,
"CurrentWriter");
91 if(fChannelInfos.find(
channel) == fChannelInfos.end()) {
92 Warn(
"Channel %d was not found in QRunData and will not be customized",
channel);
106 if(start >= 0 && stop <= fRunDuration) {
110 outputPulse.Validate();
115 for(
size_t s = 0; s < SI.size(); s++)
119 Warn(
"Event number %d (Channel %d) is skipped since there are not enough data to build the waveform",header.
GetEventNumber(),
channel);
122 if(fOverWritePulse) {
123 eva.
Get<
QPulse>(fInputOwner.c_str(),
"Pulse") = outputPulse;
124 eva.
Get<
QPulseInfo>(fInputOwner.c_str(),
"PulseInfo") = outputPI;
QRunDataHandle rHandle(753)
#define REGISTER_MODULE(clazz)
basic channel and run based info. Used in the QRunData object.
double fSamplingFrequency
sampling frequency in Hz
int fNumberOfSamples
number of samples in ADC window
class to store ActionId and fEventNumber (in case fActionId=ACT_GOTOEV)
Visitor class of QEvent that provides full handling of QEvent.
QEvent & GetEvent()
Get the QEvent.
void Get(const char *owner, WriteHandle< Q > &handle)
Get QObject from the event in write mode. This method has to be called in the event loop,...
void Require(const std::string &owner, const std::string &name) const
notify the QEvent that we need a QObject, if not found an exception is thrown
void Get(const char *owner, ReadHandle< Q > &handle) const
Get a QObject Handle in read mode.
void Add(WriteHandle< Q > &handle)
Add a QObject to the event.
coordinates to filla QPulse from a continuous file
void SetStopTime(Long64_t stop)
void SetStartTime(Long64_t start)
Raw event: bolometer channel, trigger positions and types.
const QSampleInfo & GetMasterSample() const
Get MasterSample.
const std::vector< QSampleInfo > & GetSamplesInfo() const
Get Samples Info.
const int & GetChannelId() const
Get ChannelId.
Raw event: sampled waveform.
const QPulseFiller * GetPulseFiller() const
Get QPulseFiller.
void SetPulseFiller(const QPulseFiller &filler)
Set QPulseFiller as input from continuous files.
global handle for QRunData
contains information on flagged samples
Int_t GetSampleIndex() const
Get SampleIndex from the beginning of the waveform.
void SetSampleIndex(Int_t index)
Set SampleIndex.
the Diana namespace is needed because sometimes we use Qt libraries, that use same class names of our...