BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
OfflineRevise Class Reference

#include <OfflineRevise.h>

Public Member Functions

 OfflineRevise (const SniperJSON &json)
virtual ~OfflineRevise ()
void fixHeader (Event::EventHeader *header)
int timeRound (int run)
 OfflineRevise (const SniperJSON &json)
virtual ~OfflineRevise ()
void fixHeader (Event::EventHeader *header)
int timeRound (int run)
 OfflineRevise (const SniperJSON &json)
virtual ~OfflineRevise ()
void fixHeader (Event::EventHeader *header)
int timeRound (int run)

Detailed Description

Constructor & Destructor Documentation

◆ OfflineRevise() [1/3]

OfflineRevise::OfflineRevise ( const SniperJSON & json)

Definition at line 6 of file OfflineRevise.cxx.

6 : m_lastRun( -1 ), m_lastFlag( true ) {
7 const SniperJSON& c1 = json["Ets1MissingSecond"];
8 for ( SniperJSON::vec_iterator it = c1["RunRanges"].vec_begin();
9 it != c1["RunRanges"].vec_end(); ++it )
10 {
11 m_runRanges.push_back(
12 std::make_pair( ( *it )["From"].get<int>(), ( *it )["To"].get<int>() ) );
13 }
14
15 m_runs = c1["Runs"].get<std::vector<int>>();
16
17 // for ( std::vector<std::pair<int, int> >::iterator it = m_runRanges.begin();
18 // it != m_runRanges.end(); ++it) {
19 // std::cout << "RunRange: " << it->first << ", " << it->second << std::endl;
20 // }
21 // for (std::vector<int>::iterator it = m_runs.begin();
22 // it != m_runs.end(); ++it) {
23 // std::cout << "Run: " << *it << std::endl;
24 // }
25
26 m_tRoundSwitch = json["TimeRoundSwitch"].get<int>();
27}
std::vector< SniperJSON >::const_iterator vec_iterator

◆ ~OfflineRevise() [1/3]

OfflineRevise::~OfflineRevise ( )
virtual

Definition at line 29 of file OfflineRevise.cxx.

29{}

◆ OfflineRevise() [2/3]

OfflineRevise::OfflineRevise ( const SniperJSON & json)

◆ ~OfflineRevise() [2/3]

virtual OfflineRevise::~OfflineRevise ( )
virtual

◆ OfflineRevise() [3/3]

OfflineRevise::OfflineRevise ( const SniperJSON & json)

◆ ~OfflineRevise() [3/3]

virtual OfflineRevise::~OfflineRevise ( )
virtual

Member Function Documentation

◆ fixHeader() [1/3]

void OfflineRevise::fixHeader ( Event::EventHeader * header)

Definition at line 31 of file OfflineRevise.cxx.

31 {
32 bool goodFlag = true;
33 int run = header->runNumber();
34
35 if ( run == m_lastRun ) { goodFlag = m_lastFlag; }
36 else
37 {
38 for ( std::vector<std::pair<int, int>>::iterator it = m_runRanges.begin();
39 it != m_runRanges.end(); ++it )
40 {
41 if ( run >= it->first && run <= it->second )
42 {
43 goodFlag = false;
44 break;
45 }
46 }
47
48 if ( goodFlag && std::find( m_runs.begin(), m_runs.end(), run ) != m_runs.end() )
49 { goodFlag = false; }
50
51 m_lastFlag = goodFlag;
52 m_lastRun = run;
53 m_lastEvent = header->eventNumber();
54 m_t0Sec = header->time();
55 m_t0NanoShift0 = -1;
56 m_t0NanoShift1 = -1;
57 m_lastEts1 = 0;
58 m_lastEts2Old = 0;
59 m_lastEts2New = 0;
60 }
61
62 if ( !goodFlag )
63 {
64 fixEts1( header );
65 fixEts2( header );
66 }
67}
int eventNumber() const
Retrieve event number.

◆ fixHeader() [2/3]

void OfflineRevise::fixHeader ( Event::EventHeader * header)

◆ fixHeader() [3/3]

void OfflineRevise::fixHeader ( Event::EventHeader * header)

◆ timeRound() [1/3]

int OfflineRevise::timeRound ( int run)
inline

Definition at line 18 of file Event/RawDataCnv/include/RawDataCnv/OfflineRevise.h.

18{ return ( run < m_tRoundSwitch ) ? 61 : 60; }

◆ timeRound() [2/3]

int OfflineRevise::timeRound ( int run)
inline

Definition at line 18 of file InstallArea/x86_64-el9-gcc13-dbg/include/RawDataCnv/OfflineRevise.h.

18{ return ( run < m_tRoundSwitch ) ? 61 : 60; }

◆ timeRound() [3/3]

int OfflineRevise::timeRound ( int run)
inline

Definition at line 18 of file InstallArea/x86_64-el9-gcc13-opt/include/RawDataCnv/OfflineRevise.h.

18{ return ( run < m_tRoundSwitch ) ? 61 : 60; }

The documentation for this class was generated from the following files: