CGEM BOSS 6.6.5.f
BESIII Offline Software System
Loading...
Searching...
No Matches
BesGeoSelector Class Reference

#include <BesGeoSelector.h>

Public Member Functions

 BesGeoSelector ()
 
void addGeomFile (const char *fname, int startno)
 
void clear ()
 
const char * getGeomFileNameFromRunNo (int run_no)
 
bool hasGeomFile (const char *fname)
 
 BesGeoSelector ()
 
void addGeomFile (const char *fname, int startno)
 
void clear ()
 
const char * getGeomFileNameFromRunNo (int run_no)
 
bool hasGeomFile (const char *fname)
 

Detailed Description

Constructor & Destructor Documentation

◆ BesGeoSelector() [1/2]

BesGeoSelector::BesGeoSelector ( )

Definition at line 11 of file BesGeoSelector.cxx.

11{}

◆ BesGeoSelector() [2/2]

BesGeoSelector::BesGeoSelector ( )

Member Function Documentation

◆ addGeomFile() [1/2]

void BesGeoSelector::addGeomFile ( const char *  fname,
int  startno 
)

Definition at line 13 of file BesGeoSelector.cxx.

14{
15 cout << "BesGeoSelector: " << fname << " start number " << startno << endl;
16 fgeom.push_back(GeomFileInfo(fname, startno));
17 sort(fgeom.begin(), fgeom.end());
18}

Referenced by BesClient::InitGeoSelector().

◆ addGeomFile() [2/2]

void BesGeoSelector::addGeomFile ( const char *  fname,
int  startno 
)

◆ clear() [1/2]

void BesGeoSelector::clear ( )

Definition at line 20 of file BesGeoSelector.cxx.

21{
22 fgeom.clear();
23}

◆ clear() [2/2]

void BesGeoSelector::clear ( )

◆ getGeomFileNameFromRunNo() [1/2]

const char * BesGeoSelector::getGeomFileNameFromRunNo ( int  run_no)

Definition at line 26 of file BesGeoSelector.cxx.

27{
28 int absno = (run_no >= 0 ? run_no : -run_no);
29 for (vector<GeomFileInfo>::reverse_iterator i = fgeom.rbegin(); i != fgeom.rend(); ++i)
30 {
31 if (absno >= i->startno)
32 {
33 return i->filename.c_str();
34 }
35 }
36 cout << "BesGeoSelector Error: There is no suitable detector geometry!" << endl;
37 return "";
38}

Referenced by BesClient::GetEvent().

◆ getGeomFileNameFromRunNo() [2/2]

const char * BesGeoSelector::getGeomFileNameFromRunNo ( int  run_no)

◆ hasGeomFile() [1/2]

bool BesGeoSelector::hasGeomFile ( const char *  fname)

Definition at line 41 of file BesGeoSelector.cxx.

42{
43 string filename(fname);
44 for (vector<GeomFileInfo>::iterator i = fgeom.begin(); i != fgeom.end(); ++i)
45 {
46 if (filename == i->filename) return true;
47 }
48 return false;
49}

Referenced by BesClient::OpenGeoFile().

◆ hasGeomFile() [2/2]

bool BesGeoSelector::hasGeomFile ( const char *  fname)

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