-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathORIpeV4FLTEnergyDecoder.cc
39 lines (34 loc) · 1009 Bytes
/
ORIpeV4FLTEnergyDecoder.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
38
// ORIpeV4FLTEnergyDecoder.cc
#include "TROOT.h"
#include "ORIpeV4FLTEnergyDecoder.hh"
#include "ORLogger.hh"
std::string ORIpeV4FLTEnergyDecoder::GetParName(size_t iPar)
{
switch(iPar) {
case 0: return "crate";
case 1: return "card";
case 2: return "seconds";
case 3: return "subseconds";
case 4: return "channelMap";
case 5: return "energy";
default:
ORLog(kWarning) << "GetParName(): index (" << iPar
<< ") out of range." << std::endl;
return "unknown";
}
}
UInt_t ORIpeV4FLTEnergyDecoder::GetPar(UInt_t* record, size_t iPar, size_t /*iRow*/)
{
switch(iPar) {
case 0: return CrateOf(record);
case 1: return CardOf(record);
case 2: return SecondsOf(record);
case 3: return SubSecondsOf(record);
case 4: return ChannelMapOf(record);
case 5: return EnergyOf(record);
default:
ORLog(kWarning) << "GetPar(): index (" << iPar
<< ") out of range." << std::endl;
return 0;
}
}