-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathORBasicRunDataProcessor.cc
38 lines (32 loc) · 1.09 KB
/
ORBasicRunDataProcessor.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// ORBasicRunDataProcessor.cc
#include "ORBasicRunDataProcessor.hh"
#include "ORRunDecoder.hh"
#include "ORLogger.hh"
using namespace std;
ORBasicRunDataProcessor::ORBasicRunDataProcessor() : ORDataProcessor(new ORRunDecoder)
{
fRunDecoder = dynamic_cast<ORRunDecoder*>(fDataDecoder);
}
ORBasicRunDataProcessor::~ORBasicRunDataProcessor()
{
delete fRunDecoder;
}
ORDataProcessor::EReturnCode ORBasicRunDataProcessor::ProcessMyDataRecord(UInt_t* record)
{
if (fRunDecoder->IsHeartBeat(record)) {
return ProcessRunHeartBeat(record);
} else if (fRunDecoder->IsRunStart(record)) {
return ProcessRunStart(record);
} else if (fRunDecoder->IsPrepareForSubRun(record)) {
return ProcessPrepareForSubRun(record);
} else if (fRunDecoder->IsSubRunStart(record)) {
return ProcessSubRunStart(record);
} else if (fRunDecoder->IsRunStop(record)) {
return ProcessRunStop(record);
} else {
ORLog(kWarning) << "ProcessMyDataRecord(): "
<< "got run data that wasn't a heartbeat, a (sub) run start, "
<< "or a (sub) run stop" << endl;
return kFailure;
}
}