MantisBT - JANA | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0000455 | JANA | Bug | public | 2015-02-28 19:33 | 2015-06-05 16:23 |
Reporter | sdobbs | ||||
Assigned To | davidl | ||||
Priority | high | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | OS | OS Version | |||
Summary | 0000455: Wrong ordering when loading CCDB tables with multiple columns | ||||
Description | When loading tables with multiple columns in JANA, the columns are loaded ordered by their column labels alphabetically, instead of the order they are stored in the CCDB. This problem came up when loading the CCDB table /BCAL/attenuation_parameters, which has three columns, named "L1", "L2", and "L0", respectively. When loading the table in DBCALPoint_factory, the values were loaded in the order "L0", "L1", "L2". | ||||
Steps To Reproduce | This problem is illustrated in the plugin in the following location: /w/halld-scifs1a/home/sdobbs/plugins/CCDBTest compared to the output of ccdb cat /BCAL/attenuation_parameters Sample outputs are attached. | ||||
Additional Information | Dmitry pointed out that the problem lies in this function: //------------- template<class T> bool JCalibration::Get(string namepath, vector< vector<T> > &vals, int event_number) { vector< map<string, string> >svals; bool res = GetCalib(namepath, svals, event_number); // copying them into the vals map. vals.clear(); for(unsigned int i=0; i<svals.size(); i++){ map<string,string>::const_iterator iter; ... } return res; } Since this function gets the calibration values as a map instead of a vector<vector<>>, and maps in C++ are ordered by key name, this is where this mis-ordering comes from. | ||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | ![]() https://halldweb1.jlab.org/mantisbt/file_download.php?file_id=4&type=bug | ||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2015-02-28 19:33 | sdobbs | New Issue | |||
2015-02-28 19:33 | sdobbs | File Added: bug_output.txt | |||
2015-03-02 10:17 | davidl | Note Added: 0000629 | |||
2015-06-05 16:23 | davidl | Note Added: 0000640 | |||
2015-06-05 16:23 | davidl | Status | new => resolved | ||
2015-06-05 16:23 | davidl | Resolution | open => fixed | ||
2015-06-05 16:23 | davidl | Assigned To | => davidl |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|