{"action":"created","issue":{"url":"https://api.github.com/repos/alcap-org/AlcapDAQ/issues/271","labels_url":"https://api.github.com/repos/alcap-org/AlcapDAQ/issues/271/labels{/name}","comments_url":"https://api.github.com/repos/alcap-org/AlcapDAQ/issues/271/comments","events_url":"https://api.github.com/repos/alcap-org/AlcapDAQ/issues/271/events","html_url":"https://github.com/alcap-org/AlcapDAQ/issues/271","id":99286539,"number":271,"title":"Reading keys from ODB","user":{"login":"dmalexan","id":5910796,"avatar_url":"https://avatars.githubusercontent.com/u/5910796?v=3","gravatar_id":"","url":"https://api.github.com/users/dmalexan","html_url":"https://github.com/dmalexan","followers_url":"https://api.github.com/users/dmalexan/followers","following_url":"https://api.github.com/users/dmalexan/following{/other_user}","gists_url":"https://api.github.com/users/dmalexan/gists{/gist_id}","starred_url":"https://api.github.com/users/dmalexan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmalexan/subscriptions","organizations_url":"https://api.github.com/users/dmalexan/orgs","repos_url":"https://api.github.com/users/dmalexan/repos","events_url":"https://api.github.com/users/dmalexan/events{/privacy}","received_events_url":"https://api.github.com/users/dmalexan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-08-05T19:58:24Z","updated_at":"2015-08-05T20:11:44Z","closed_at":null,"body":"Working on the MDQ_Threshold module.  I have it searching for and finding the keys.  It retrieves a value, but the output is weird.  Most of these keys are in WORD or DWORD type, and when I output the value obtained (Thresholds[0], same thing used to fill the histograms last time) I get values in the range of 10^-42 for the DWORD types and aproximately -1.5 for the WORD types.  The values for most of these should be falling in the 7000 or 15000 range according to the odb itself.  How did this work last time, and what can be done to correct this now?"},"comment":{"url":"https://api.github.com/repos/alcap-org/AlcapDAQ/issues/comments/128133657","html_url":"https://github.com/alcap-org/AlcapDAQ/issues/271#issuecomment-128133657","issue_url":"https://api.github.com/repos/alcap-org/AlcapDAQ/issues/271","id":128133657,"user":{"login":"dmalexan","id":5910796,"avatar_url":"https://avatars.githubusercontent.com/u/5910796?v=3","gravatar_id":"","url":"https://api.github.com/users/dmalexan","html_url":"https://github.com/dmalexan","followers_url":"https://api.github.com/users/dmalexan/followers","following_url":"https://api.github.com/users/dmalexan/following{/other_user}","gists_url":"https://api.github.com/users/dmalexan/gists{/gist_id}","starred_url":"https://api.github.com/users/dmalexan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmalexan/subscriptions","organizations_url":"https://api.github.com/users/dmalexan/orgs","repos_url":"https://api.github.com/users/dmalexan/repos","events_url":"https://api.github.com/users/dmalexan/events{/privacy}","received_events_url":"https://api.github.com/users/dmalexan/received_events","type":"User","site_admin":false},"created_at":"2015-08-05T20:11:44Z","updated_at":"2015-08-05T20:11:44Z","body":"```C++\r\n    //---------------------dt5730----------------------------//\r\n    if(TSetupData::IsWFD(bankname) && bankname.at(1) == '7'){\r\n      // first get the channel and address from the bankname\r\n      int iChn = (int)(bankname[3] - 48);\r\n\r\n      // Get the threshold\r\n      sprintf(keyName, \"/Equipment/Crate 7/Settings/CAEN/Ch0%d/Self trigger threshold DPP\", iChn);\r\n      if(db_find_key(hDB,0,keyName, &hKey) != SUCCESS){\r\n\tprintf(\"Warning: Could not find key %s\\n\", keyName);\r\n\treturn false;\r\n      }\r\n      KEY threshold_key;\r\n      if(db_get_key(hDB, hKey, &threshold_key) != DB_SUCCESS){\r\n\tprintf(\"Warning: Could not find key %s\\n\", keyName);\r\n\treturn false;\r\n      }\r\n      float Thresholds[threshold_key.num_values];\r\n      int size = sizeof(Thresholds);\r\n      if(db_get_value(hDB, 0, keyName, Thresholds, &size, TID_WORD, 0) != DB_SUCCESS){\r\n\tprintf(\"Warning: Could not retrieve values for key %s\\n\", keyName);\r\n\treturn false;\r\n      }\r\n      std::cout << bankname << \"   \"  << Thresholds[0] << std::endl;\r\n\r\n      DQ_Thresholds_histograms_map[bankname]->Fill(\"Self_trigger_threshold DPP\", Thresholds[0]);\r\n    }\r\n```"}}