#include <OfflineRevise.h>
Definition at line 11 of file OfflineRevise.h.
◆ OfflineRevise()
OfflineRevise::OfflineRevise |
( |
const SniperJSON & | json | ) |
|
Definition at line 6 of file OfflineRevise.cxx.
7 : m_lastRun(-1),
8 m_lastFlag(true)
9{
10 const SniperJSON& c1 = json[
"Ets1MissingSecond"];
12 it != c1[
"RunRanges"].
vec_end();
13 ++it)
14 {
15 m_runRanges.push_back(std::make_pair(
16 (*it)["From"].get<int>(),
17 (*it)["To"].get<int>() ));
18 }
19
20 m_runs = c1[
"Runs"].
get<std::vector<int> >();
21
22
23
24
25
26
27
28
29
30
31 m_tRoundSwitch = json[
"TimeRoundSwitch"].
get<
int>();
32}
std::vector< SniperJSON >::const_iterator vec_iterator
vec_iterator vec_end() const
◆ ~OfflineRevise()
OfflineRevise::~OfflineRevise |
( |
| ) |
|
|
virtual |
◆ fixHeader()
Definition at line 38 of file OfflineRevise.cxx.
39{
40 bool goodFlag = true;
42
43 if ( run == m_lastRun ) {
44 goodFlag = m_lastFlag;
45 }
46 else {
47 for ( std::vector<std::pair<int, int> >::iterator it = m_runRanges.begin();
48 it != m_runRanges.end();
49 ++it)
50 {
51 if ( run >= it->first && run <= it->second ) {
52 goodFlag = false;
53 break;
54 }
55 }
56
57 if ( goodFlag && std::find(m_runs.begin(), m_runs.end(), run) != m_runs.end() ) {
58 goodFlag = false;
59 }
60
61 m_lastFlag = goodFlag;
62 m_lastRun = run;
64 m_t0Sec = header->
time();
65 m_t0NanoShift0 = -1;
66 m_t0NanoShift1 = -1;
67 m_lastEts1 = 0;
68 m_lastEts2Old = 0;
69 m_lastEts2New = 0;
70 }
71
72 if ( ! goodFlag ) {
73 fixEts1(header);
74 fixEts2(header);
75 }
76}
◆ timeRound()
int OfflineRevise::timeRound |
( |
int | run | ) |
|
|
inline |
The documentation for this class was generated from the following files: