adopted to new PSI-BIN lib. Added facility for finding runs via musrfit_startup.xml templates.

This commit is contained in:
2022-05-28 14:10:15 +02:00
parent 40007650f6
commit 843ad88498
10 changed files with 1150 additions and 94 deletions

View File

@@ -829,22 +829,22 @@ typedef struct {
* <p>Holds the informations for the any2many converter program
*/
typedef struct {
Bool_t useStandardOutput; ///< flag showing if the converted shall be sent to the standard output
TString inFormat; ///< holds the information about the input data file format
TString outFormat; ///< holds the information about the output data file format
TString inTemplate; ///< holds the input file template
TString outTemplate; ///< holds the output file template
TString year; ///< holds the information about the year to be used
PUIntVector runList; ///< holds the run number list to be converted
PIntVector groupHistoList; ///< holds the histo group list offset (used to define for MusrRoot files, what to be exported)
PStringVector inFileName; ///< holds the file name of the input data file
TString outFileName; ///< holds the output file name
PStringVector outPathFileName; ///< holds the out path/file name
TString outPath; ///< holds the output path
UInt_t rebin; ///< holds the number of bins to be packed
UInt_t compressionTag; ///< 0=no compression, 1=gzip compression, 2=bzip2 compression
TString compressFileName; ///< holds the name of the outputfile name in case of compression is used
UInt_t idf; ///< IDF version for NeXus files.
Bool_t useStandardOutput{false}; ///< flag showing if the converted shall be sent to the standard output
TString inFormat{""}; ///< holds the information about the input data file format
TString outFormat{""}; ///< holds the information about the output data file format
TString inTemplate{""}; ///< holds the input file template
TString outTemplate{""}; ///< holds the output file template
TString year{""}; ///< holds the information about the year to be used
PUIntVector runList; ///< holds the run number list to be converted
PIntVector groupHistoList; ///< holds the histo group list offset (used to define for MusrRoot files, what to be exported)
PStringVector inFileName; ///< holds the file name of the input data file
TString outFileName{""}; ///< holds the output file name
PStringVector outPathFileName; ///< holds the out path/file name
TString outPath{""}; ///< holds the output path
UInt_t rebin{1}; ///< holds the number of bins to be packed
UInt_t compressionTag{0}; ///< 0=no compression, 1=gzip compression, 2=bzip2 compression
TString compressFileName{""}; ///< holds the name of the outputfile name in case of compression is used
UInt_t idf{0}; ///< IDF version for NeXus files.
} PAny2ManyInfo;
//-------------------------------------------------------------
@@ -882,4 +882,19 @@ class PStringNumberList {
virtual void StripSpaces();
};
//-------------------------------------------------------------
/**
* <p> Run name template structure.
*/
typedef struct {
TString instrument{""};
TString runNameTemplate{""};
} PRunNameTemplate;
//-------------------------------------------------------------
/**
* <p>typedef to make to code more readable: list of run name templates.
*/
typedef std::vector<PRunNameTemplate> PRunNameTemplateList;
#endif // _PMUSR_H_

View File

@@ -53,13 +53,15 @@ class PRunDataHandler
virtual void ReadData();
virtual void ConvertData();
virtual void WriteData();
virtual Bool_t WriteData(TString fileName="");
virtual Bool_t IsAllDataAvailable() const { return fAllDataAvailable; }
virtual PRawRunData* GetRunData(const TString &runName);
virtual PRawRunData* GetRunData(const UInt_t idx=0);
virtual Int_t GetNoOfRunData() {return fData.size(); }
virtual Bool_t SetRunData(PRawRunData *data, UInt_t idx=0);
private:
PMsrHandler *fMsrInfo; ///< pointer to the msr-file handler
PAny2ManyInfo *fAny2ManyInfo; ///< pointer to the any2many data structure

View File

@@ -75,12 +75,13 @@ class PStartupHandler : public TObject, public TQObject
virtual PStartupOptions* GetStartupOptions() { return &fStartupOptions; } ///< returns the startup options
virtual PMsrFourierStructure GetFourierDefaults() { return fFourierDefaults; } ///< returns the Fourier defaults
virtual const PRunNameTemplateList GetRunNameTemplateList() { return fRunNameTemplate; }
virtual const PStringVector GetDataPathList() const { return fDataPathList; } ///< returns the search data path list
virtual const PIntVector GetMarkerList() const { return fMarkerList; } ///< returns the marker list
virtual const PIntVector GetColorList() const { return fColorList; } ///< returns the color list
private:
enum EKeyWords {eEmpty, eComment, eDataPath, eOptions, eUseDKS,
enum EKeyWords {eEmpty, eComment, eDataPath, eRunNameTemplate, eOptions, eUseDKS,
eFourierSettings, eUnits, eFourierPower,
eApodization, ePlot, ePhase, ePhaseIncrement,
eRootSettings, eMarkerList, eMarker,
@@ -89,8 +90,10 @@ class PStartupHandler : public TObject, public TQObject
Bool_t fStartupFileFound; ///< startup file found flag
TString fStartupFilePath; ///< full musrfit_startup.xml startup file paths
TString fCurrentInstrumentName; ///< current instrument name
PMsrFourierStructure fFourierDefaults; ///< Fourier defaults
PStringVector fDataPathList; ///< search data path list
PRunNameTemplateList fRunNameTemplate; ///< run name template vector
PIntVector fMarkerList; ///< marker list
PIntVector fColorList; ///< color list
PStartupOptions fStartupOptions; ///< collects all startup options which will be requested by PMsrFileHandler