BOSS 6.6.4.p01
BESIII Offline Software System
Loading...
Searching...
No Matches
MdcAlignAlg/MdcAlignAlg-00-01-04/share/distAlign/src/include/fun.h File Reference
#include <string>
#include <cstring>
#include <vector>
#include "TROOT.h"
#include "TObjArray.h"

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/MdcAlignAlg-00-01-04/share/distAlign/src/fun.cpp.

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

◆ 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

◆ INNERNMAX

const int INNERNMAX = 8

◆ LAYERNMAX

◆ NEP

◆ NTRKPAR

const int NTRKPAR = 5

◆ NTRKPARALL

const int NTRKPARALL = 10

◆ PI

const double PI = 3.141592653

◆ PI2

◆ WIRENMAX

const int WIRENMAX = 6796