Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DDIRCPmtHit.h
Go to the documentation of this file.
1 // -----------------------------------------
2 // DDIRCPmtHit.h
3 // -----------------------------------------
4 
5 #ifndef DDIRCPMTHIT_H_
6 #define DDIRCPMTHIT_H_
7 
8 #include <JANA/JObject.h>
9 #include <JANA/JFactory.h>
10 using namespace jana;
11 
12 class DDIRCPmtHit: public JObject {
13 
14 public:
15  JOBJECT_PUBLIC (DDIRCPmtHit);
16 
17  float t; // detection time
18  float tot; // time-over-threshold
19  int ch; // PMT channel of the hit
20 
21  inline void setTime( double time ) { t = time;}
22  inline void setTOT( double timeOverThreshold ) { tot = timeOverThreshold;}
23  inline void setChannel( int channel ) { ch = channel;}
24 
25  void toStrings(vector<pair<string, string> >&items) const {
26  AddString(items, "t", "%1.3f", t);
27  AddString(items, "tot", "%1.3f", tot);
28  AddString(items, "ch", "%d", ch);
29  }
30 };
31 
32 #endif /* DDIRCPMTHIT_H_ */
void setTOT(double timeOverThreshold)
Definition: DDIRCPmtHit.h:22
void toStrings(vector< pair< string, string > > &items) const
Definition: DDIRCPmtHit.h:25
void setTime(double time)
Definition: DDIRCPmtHit.h:21
void setChannel(int channel)
Definition: DDIRCPmtHit.h:23