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

#include <ReadBeamInfFromDb.h>

Public Member Functions

 ReadBeamInfFromDb ()
 ~ReadBeamInfFromDb ()
bool isRunValid (int run)
double getbeamE (int run)
 ReadBeamInfFromDb ()
 ~ReadBeamInfFromDb ()
bool isRunValid (int run)
double getbeamE (int run, double defaultbeamE)
CLHEP::Hep3Vector getbeta ()
void setcalib (bool calib)

Detailed Description

Definition at line 8 of file DQA/DQADtagAlg/src/util/ReadBeamInfFromDb.h.

Constructor & Destructor Documentation

◆ ReadBeamInfFromDb() [1/2]

ReadBeamInfFromDb::ReadBeamInfFromDb ( )

Definition at line 5 of file DQA/DQADtagAlg/src/util/ReadBeamInfFromDb.cxx.

5: m_run( -1 ), m_isRunValid( false ), m_beamE( 0 ) {}

◆ ~ReadBeamInfFromDb() [1/2]

ReadBeamInfFromDb::~ReadBeamInfFromDb ( )
inline

Definition at line 12 of file DQA/DQADtagAlg/src/util/ReadBeamInfFromDb.h.

12{}

◆ ReadBeamInfFromDb() [2/2]

ReadBeamInfFromDb::ReadBeamInfFromDb ( )

◆ ~ReadBeamInfFromDb() [2/2]

ReadBeamInfFromDb::~ReadBeamInfFromDb ( )
inline

Definition at line 12 of file Reconstruction/DTagAlg/src/ReadBeamInfFromDb.h.

12{}

Member Function Documentation

◆ getbeamE() [1/2]

double ReadBeamInfFromDb::getbeamE ( int run)

Definition at line 73 of file DQA/DQADtagAlg/src/util/ReadBeamInfFromDb.cxx.

73 {
74 if ( !isRunValid( run ) )
75 { fprintf( stderr, "ERROR in ReadBeamInfFromDb: runNo is invalid!\n" ); }
76 return m_beamE;
77}

◆ getbeamE() [2/2]

double ReadBeamInfFromDb::getbeamE ( int run,
double defaultbeamE )

Definition at line 74 of file Reconstruction/DTagAlg/src/ReadBeamInfFromDb.cxx.

74 {
75 int absrun = abs( run );
76 if ( !isRunValid( absrun ) )
77 {
78 return defaultbeamE;
79 fprintf( stderr, "ERROR in ReadBeamInfFromDb: runNo is invalid!\n" );
80 }
81 return m_beamE;
82}

◆ getbeta()

CLHEP::Hep3Vector ReadBeamInfFromDb::getbeta ( )
inline

Definition at line 16 of file Reconstruction/DTagAlg/src/ReadBeamInfFromDb.h.

16{ return m_beta; }

◆ isRunValid() [1/2]

bool ReadBeamInfFromDb::isRunValid ( int run)

Definition at line 67 of file DQA/DQADtagAlg/src/util/ReadBeamInfFromDb.cxx.

67 {
68 if ( run == -1 || m_run != run ) { ReadDb( run ); }
69
70 return m_isRunValid;
71}

Referenced by getbeamE(), and getbeamE().

◆ isRunValid() [2/2]

bool ReadBeamInfFromDb::isRunValid ( int run)

◆ setcalib()

void ReadBeamInfFromDb::setcalib ( bool calib)
inline

Definition at line 17 of file Reconstruction/DTagAlg/src/ReadBeamInfFromDb.h.

17{ m_usecbE = calib; }

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