Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
plugins/Analysis/level1_trigger/DTrigger.h
Go to the documentation of this file.
1 // $Id$
2 //
3 // File: DTrigger.h
4 // Created: Tue Jun 7 10:15:05 EDT 2011
5 // Creator: davidl (on Darwin eleanor.jlab.org 10.7.0 i386)
6 //
7 
8 #ifndef _DTrigger_
9 #define _DTrigger_
10 
11 #include <JANA/JObject.h>
12 #include <JANA/JFactory.h>
13 
14 class DTrigger:public jana::JObject{
15  public:
17 
18  bool L1a_fired; // BCAL + 4FCAL >2 GeV && BCAL > 200 MeV && FCAL > 30 MeV
19  bool L1b_fired; // BCAL + 4FCAL >2 GeV && BCAL > 30 MeV && FCAL > 30 MeV && NSC>0
20  bool L1c_fired; // FCAL > 250MeV
21 
22  double Ebcal;
23  double Efcal;
24  unsigned int Nschits;
25 
26  // This method is used primarily for pretty printing
27  // the second argument to AddString is printf style format
28  void toStrings(vector<pair<string,string> > &items)const{
29  AddString(items, "L1a_fired", "%d", L1a_fired ? 1:0);
30  AddString(items, "L1b_fired", "%d", L1b_fired ? 1:0);
31  AddString(items, "Ebcal", "%5.3f", Ebcal);
32  AddString(items, "Efcal", "%5.3f", Efcal);
33  AddString(items, "Nschits", "%2d", Nschits);
34  }
35 
36 };
37 
38 #endif // _DTrigger_
39 
JOBJECT_PUBLIC(DTrigger)
void toStrings(vector< pair< string, string > > &items) const