All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ParamHolder.h
Go to the documentation of this file.
1 #ifndef __SIMTESTPULSE_PARAMHOLDER_H__
2 #define __SIMTESTPULSE_PARAMHOLDER_H__
3 
4 #include <array>
5 #include <vector>
6 
7 namespace alternative {
8 
9  struct TruthHit {
10  int signal_id;
11  std::array<int,3> channel_list;
12  unsigned int tdc;
13  unsigned int tick;
14  double num_electrons;
15  };
16 
17  class ParamHolder {
18  private:
20  public:
22 
23  static ParamHolder& get()
24  { if(!_me) _me = new ParamHolder;
25  return *_me;
26  }
27 
28  static void destroy()
29  { if(_me) delete _me; }
30 
32 
33  const std::vector<alternative::TruthHit>& TruthHitArray() const;
34 
35  void Clear();
36 
37  private:
38  static ParamHolder* _me;
39  std::vector<alternative::TruthHit> _hit_v;
40  };
41 }
42 #endif
unsigned int tick
Definition: ParamHolder.h:13
static ParamHolder * _me
Definition: ParamHolder.h:38
unsigned int tdc
Definition: ParamHolder.h:12
void Register(alternative::TruthHit &&hit)
Definition: ParamHolder.cxx:7
process_name hit
Definition: cheaterreco.fcl:51
std::vector< alternative::TruthHit > _hit_v
Definition: ParamHolder.h:39
std::array< int, 3 > channel_list
Definition: ParamHolder.h:11
const std::vector< alternative::TruthHit > & TruthHitArray() const
Definition: ParamHolder.cxx:13
static void destroy()
Definition: ParamHolder.h:28