-
Notifications
You must be signed in to change notification settings - Fork 3
/
ORMksPdr2000Decoder.hh
52 lines (40 loc) · 1.7 KB
/
ORMksPdr2000Decoder.hh
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// ORMksPdr2000Decoder.hh
/*
* Decoder for MksPdr2000 which measures pressure and time. It is very similar
* to the BocTIC3
*/
#ifndef _ORMksPdr2000Decoder_hh_
#define _ORMksPdr2000Decoder_hh_
#include "ORVBasicTreeDecoder.hh"
class ORMksPdr2000Decoder: public ORVBasicTreeDecoder
{
public:
ORMksPdr2000Decoder() {}
virtual ~ORMksPdr2000Decoder() {}
enum EORMksPdr2000Consts {kNumChannels = 3};
enum EORMksPdr2000Units { kUnknown = 0,
kTorr,
kmBar,
kPascal,
kArbitrary };
virtual inline EORMksPdr2000Units GetUnits(UInt_t* record)
{return (EORMksPdr2000Units)((record[1] >> 16) & 0xf);}
/* The number of channels in this card. */
virtual inline UInt_t GetNumberOfChannels() {return (UInt_t)kNumChannels;}
virtual inline UShort_t GetDeviceID(UInt_t* record) {return record[1] & 0xfff;}
/* Return the id of the device. */
virtual Float_t GetPressureOfChannel(UInt_t* record, UInt_t channel);
/* Pressure of a channel. */
virtual UInt_t GetTimeOfChannel(UInt_t* record, UInt_t channel);
/* Time in channel given in seconds since 1 Jan 1970. */
virtual void Dump(UInt_t* record);
/* Provides a debug dump of the record. */
virtual std::string GetDataObjectPath()
{ return "MksPdr2000Model:Pressures"; }
/* Satisfying the ORVBasicTreeDecoder interface. */
virtual size_t GetNPars() { return 5; }
virtual size_t GetNRows(UInt_t* /*record*/) { return GetNumberOfChannels(); }
virtual std::string GetParName(size_t iPar);
virtual UInt_t GetPar(UInt_t* record, size_t iPar, size_t iRow);
};
#endif