ToolDAQFramework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
TriggersComparison.h
Go to the documentation of this file.
1 #ifndef TRIGGERSCOMPARISON_H
2 #define TRIGGERSCOMPARISON_H
3 
4 #include <string>
5 #include <iostream>
6 #include <fstream>
7 
8 #include "Tool.h"
9 
10 #include "TFile.h"
11 #include "TTree.h"
12 #include "TH1F.h"
13 #include "TH1I.h"
14 #include <Stopwatch.h>
15 
16 class TriggersComparison: public Tool {
17 
18  public:
19 
21  bool Initialise(std::string configfile,DataModel &data);
22  bool Execute();
23  bool Finalise();
24 
25 
26  private:
27 
31  std::string m_stopwatch_file;
32 
34  int m_verbose;
35 
37  std::stringstream m_ss;
38 
41  void StreamToLog(int level) {
42  Log(m_ss.str(), level, m_verbose);
43  m_ss.str("");
44  }
45 
47  enum LogLevel {FATAL=-1, ERROR=0, WARN=1, INFO=2, DEBUG1=3, DEBUG2=4, DEBUG3=5};
48 
50  std::string m_input_filename1;
51  std::string m_input_filename2;
53  TFile * m_input_file1;
54  TFile * m_input_file2;
59  TTree * m_header_tree1;
60  TTree * m_header_tree2;
61 
62 
65 
71  long int m_n_events1;
72 
78  long int m_n_events2;
79 
80 
82  std::string m_output_filename;
84  TFile * m_output_file;
85 
89 
92 
94 
102 
107 
108  float timebinsize;
109 
110 
111 };
112 
113 
114 #endif
util::Stopwatch * m_stopwatch
The stopwatch, if we&#39;re using one.
std::string m_input_filename1
names of input ROOT trees
long int m_n_events2
The total number of events from file2.
long int m_first_event_num1
The first event number from file1 to read.
LogLevel
Log level enumerations.
TH1F * h_triggertime_1
output histograms
std::string m_output_filename
Output ROOT filename that this tool RECREATE&#39;s.
long int m_current_event_num1
The current event number from file1.
TFile * m_output_file
Output ROOT file.
std::string m_input_filename2
long int m_first_event_num2
The first event number from file2 to read.
TFile * m_input_file1
input ROOT files
std::string m_stopwatch_file
Image filename to save the histogram to, if required.
TTree * m_triggers_tree1
input trees containing triggers
std::stringstream m_ss
For easy formatting of Log messages.
long int m_current_event_num2
The current event number from file2.
int m_verbose
Verbosity level, as defined in tool parameter file.
float the_trigger_time1
trigger time
long int m_n_events1
The total number of events from file1.
void StreamToLog(int level)
TTree * m_header_tree1
input headers trees
void Log(const std::string &message, const int message_level)
Format messages in the same way as for tools.
Definition: Utilities.cpp:276
bool Initialise(std::string configfile, DataModel &data)