musrfit 1.10.0
addRun.cpp File Reference
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <fstream>
#include <memory>
#include <boost/algorithm/string.hpp>
#include <boost/filesystem.hpp>
#include <TString.h>
#include "PMusr.h"
#include "PStartupHandler.h"
#include "PRunDataHandler.h"
#include "PFindRun.h"
Include dependency graph for addRun.cpp:

Go to the source code of this file.

Classes

struct  PAddRunInfo
 

Functions

void addRun_syntax ()
 
bool addRun_checkFormat (std::string &format)
 
bool addRun_readInputFiles (const std::string fileName, std::vector< PAddRunInfo > &infoVec)
 
UInt_t addRun_getPromptPeakPos (PDoubleVector *vec)
 
bool addRun_filter_t0 (int argc, char *argv[], int &idx, PIntVector &t0)
 
bool addRun_filter_runList (int argc, char *argv[], int &idx, PUIntVector &runList)
 
int main (int argc, char *argv[])
 

Function Documentation

◆ addRun_checkFormat()

bool addRun_checkFormat ( std::string & format)

check if the requested format is supported.

Parameters
formatrequested format string
Returns
true if supported, false otherwise

Definition at line 129 of file addRun.cpp.

Referenced by main().

◆ addRun_filter_runList()

bool addRun_filter_runList ( int argc,
char * argv[],
int & idx,
PUIntVector & runList )

Filters the runList arguments. Allowed are: (i) run1 run2 ... runN (ii) runStart-runEnd, and (iii) runStart:runEnd:step

Parameters
argcargument counter
argvargument list
idxargument index from which to start
runListvector
Returns
true on success, false otherwise

Definition at line 325 of file addRun.cpp.

References PStringNumberList::GetList(), and PStringNumberList::Parse().

Referenced by main().

◆ addRun_filter_t0()

bool addRun_filter_t0 ( int argc,
char * argv[],
int & idx,
PIntVector & t0 )

Filters the t0 arguments. Allowed is a comma separeted list of integers > -2.

Parameters
argcargument counter
argvargument list
idxargument index from which to start
t0vector
Returns
true on success, false otherwise

Definition at line 275 of file addRun.cpp.

References status.

Referenced by main().

◆ addRun_getPromptPeakPos()

UInt_t addRun_getPromptPeakPos ( PDoubleVector * vec)

Automatically determines the t0-bin. This assumes that there is a prompt peak in the data!

Parameters
vechisto data
Returns
maximum of the histo data

Definition at line 244 of file addRun.cpp.

Referenced by main().

◆ addRun_readInputFiles()

bool addRun_readInputFiles ( const std::string fileName,
std::vector< PAddRunInfo > & infoVec )

Reads the inputFile to extract the necessary information.

Parameters
fileName
infoVec
Returns

Definition at line 162 of file addRun.cpp.

References PAddRunInfo::fPathFileName, PAddRunInfo::fT0, NULL, and status.

Referenced by main().

◆ addRun_syntax()

void addRun_syntax ( )

Sends the usage description to the standard output.

Definition at line 67 of file addRun.cpp.

Referenced by main().

◆ main()