forked from kvtsang/Supera
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SuperaTypes.h
65 lines (55 loc) · 1.89 KB
/
SuperaTypes.h
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
53
54
55
56
57
58
59
60
61
62
63
64
65
#ifndef __SUPERA_TYPES_H__
#define __SUPERA_TYPES_H__
//#ifndef __CINT__
//#ifndef __CLING__
#include "FMWKInterface.h"
namespace supera {
/// enum to define LAr* data type
enum class LArDataType_t : unsigned int{
kLArWire_t, ///< recob::Wire
kLArHit_t, ///< recob::Hit
kLArOpDigit_t, ///< raw::OpDetWaveform
kLArMCTruth_t, ///< simb::MCTruth
kLArMCTrack_t, ///< sim::MCTrack
kLArMCShower_t, ///< sim::MCShower
kLArSimCh_t, ///< sim::SimChannel
kLArDataTypeMax
};
template <class T>
LArDataType_t LArDataType();
template<> LArDataType_t LArDataType<supera::LArHit_t>();
template<> LArDataType_t LArDataType<supera::LArWire_t>();
template<> LArDataType_t LArDataType<supera::LArOpDigit_t>();
template<> LArDataType_t LArDataType<supera::LArMCTruth_t>();
template<> LArDataType_t LArDataType<supera::LArMCTrack_t>();
template<> LArDataType_t LArDataType<supera::LArMCShower_t>();
template<> LArDataType_t LArDataType<supera::LArSimCh_t>();
class RSEID {
public:
RSEID(size_t run_val=0, size_t subrun_val=0, size_t event_val=0)
: run(run_val)
, subrun(subrun_val)
, event(event_val)
{}
~RSEID(){}
inline bool operator < (const RSEID& rhs) const
{ if(run < rhs.run) return true;
if(run > rhs.run) return false;
if(subrun < rhs.subrun) return true;
if(subrun > rhs.subrun) return false;
if(event < rhs.event) return true;
if(event > rhs.event) return false;
return false;
}
inline bool operator == (const RSEID& rhs) const
{ return (run == rhs.run && subrun == rhs.subrun && event == rhs.event); }
inline bool operator != (const RSEID& rhs) const
{ return !( (*this) == rhs ); }
inline bool operator > (const RSEID& rhs) const
{ return ( (*this) != rhs && !((*this) < rhs) ); }
size_t run, subrun, event;
};
}
//#endif
//#endif
#endif