BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
fun.h File Reference
#include "TObjArray.h"
#include "TROOT.h"
#include <cstring>
#include <string>
#include <vector>

Go to the source code of this file.

Functions

std::vector< std::string > getHistList ()
std::vector< std::string > getHistList (std::string path)

Variables

const double CC = 2.99792458E10
const double PI = 3.141592653
const double PI2 = 6.283185307
const double HFPI = 1.570796327
const int WIRENMAX = 6796
const int LAYERNMAX = 43
const int CELLNMAX = 288
const int INNERNMAX = 8
const int NEP = 16
const int NTRKPAR = 5
const int NTRKPARALL = 10

Function Documentation

◆ getHistList() [1/2]

std::vector< std::string > getHistList ( )

Definition at line 14 of file MdcAlignAlg/share/distAlign/src/fun.cpp.

14 {
15 vector<string> fnames;
16
17 string command( "JobOutputDir=`/bin/ls -dt1 joboutput-* 2>/dev/null | head -1`\n"
18 "if [ -d \"${JobOutputDir}\" ]; then\n"
19 " find ${JobOutputDir} -name hist.root\n"
20 "fi\n" );
21
22 stringstream fnstream;
23
24 char* fnbuf = new char[1024];
25 FILE* fstream = popen( command.c_str(), "r" );
26
27 while ( fgets( fnbuf, 1024, fstream ) != NULL ) { fnstream << fnbuf; }
28
29 string fname;
30 while ( !( fnstream >> fname ).eof() ) { fnames.push_back( fname ); }
31
32 pclose( fstream );
33 delete[] fnbuf;
34
35 if ( fnames.empty() )
36 {
37 cout << "WARNING: Failed to retrieve hist files in the current directory!" << endl;
38 // exit(1);
39 }
40 return fnames;
41}

◆ getHistList() [2/2]

std::vector< std::string > getHistList ( std::string path)

Variable Documentation

◆ CC

const double CC = 2.99792458E10

◆ CELLNMAX

const int CELLNMAX = 288

◆ HFPI

const double HFPI = 1.570796327

Definition at line 14 of file MdcAlignAlg/share/distAlign/src/include/fun.h.

Referenced by MdcCalib::fillHist().

◆ INNERNMAX

const int INNERNMAX = 8

Definition at line 19 of file MdcAlignAlg/share/distAlign/src/include/fun.h.

Referenced by MdcCosGeom::initWire().

◆ LAYERNMAX

◆ NEP

◆ NTRKPAR

const int NTRKPAR = 5

◆ NTRKPARALL

const int NTRKPARALL = 10

◆ PI

const double PI = 3.141592653

◆ PI2

◆ WIRENMAX

const int WIRENMAX = 6796