Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:17:32

0001 
0002 // Copyright 2012-2025, Jefferson Science Associates, LLC.
0003 // Subject to the terms in the LICENSE file found in the top-level directory.
0004 // Author: David Lawrence
0005 
0006 #pragma once
0007 #include "JCalibration.h"
0008 
0009 #include <fstream>
0010 
0011 class JCalibrationFile:public JCalibration{
0012     public:
0013         JCalibrationFile(string url, int32_t run, string context="default");
0014         virtual ~JCalibrationFile();
0015         virtual const char* className(void){return static_className();}
0016         static const char* static_className(void){return "JCalibrationFile";}
0017 
0018         bool GetCalib(string namepath, map<string, string> &svals, uint64_t event_number=0);
0019         bool GetCalib(string namepath, vector<string> &svals, uint64_t event_number=0);
0020         bool GetCalib(string namepath, vector< map<string, string> > &svals, uint64_t event_number=0);
0021         bool GetCalib(string namepath, vector< vector<string> > &svals, uint64_t event_number=0);
0022         bool PutCalib(string namepath, int32_t run_min, int32_t run_max, uint64_t event_min, uint64_t event_max, string &author, map<string, string> &svals, string comment="");
0023         bool PutCalib(string namepath, int32_t run_min, int32_t run_max, uint64_t event_min, uint64_t event_max, string &author, vector< map<string, string> > &svals, string comment="");
0024         void GetListOfNamepaths(vector<string> &namepaths);
0025 
0026     protected:
0027 
0028         std::ofstream* CreateItemFile(string namepath, int32_t run_min, int32_t run_max, string &author, string &comment);
0029         void MakeDirectoryPath(string namepath);
0030 
0031     private:
0032         JCalibrationFile();
0033 
0034         string basedir;
0035 
0036         void AddToNamepathList(string dir, vector<string> &namepaths);
0037 };
0038 
0039