{"action":"created","issue":{"url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/issues/147","repository_url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts","labels_url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/issues/147/labels{/name}","comments_url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/issues/147/comments","events_url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/issues/147/events","html_url":"https://github.com/cms-gem-daq-project/vfatqc-python-scripts/issues/147","id":267931513,"number":147,"title":"Feature Request: Resume a trim run","user":{"login":"bdorney","id":6432141,"avatar_url":"https://avatars0.githubusercontent.com/u/6432141?v=4","gravatar_id":"","url":"https://api.github.com/users/bdorney","html_url":"https://github.com/bdorney","followers_url":"https://api.github.com/users/bdorney/followers","following_url":"https://api.github.com/users/bdorney/following{/other_user}","gists_url":"https://api.github.com/users/bdorney/gists{/gist_id}","starred_url":"https://api.github.com/users/bdorney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdorney/subscriptions","organizations_url":"https://api.github.com/users/bdorney/orgs","repos_url":"https://api.github.com/users/bdorney/repos","events_url":"https://api.github.com/users/bdorney/events{/privacy}","received_events_url":"https://api.github.com/users/bdorney/received_events","type":"User","site_admin":false},"labels":[{"id":490990136,"url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/labels/Priority:%20Medium","name":"Priority: Medium","color":"f7d358","default":false},{"id":374344295,"url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/labels/Status:%20Help%20Wanted","name":"Status: Help Wanted","color":"128A0C","default":false},{"id":493658966,"url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/labels/Type:%20Feature%20Request","name":"Type: Feature Request","color":"0052cc","default":false}],"state":"open","locked":false,"assignee":{"login":"cbravo135","id":1453874,"avatar_url":"https://avatars2.githubusercontent.com/u/1453874?v=4","gravatar_id":"","url":"https://api.github.com/users/cbravo135","html_url":"https://github.com/cbravo135","followers_url":"https://api.github.com/users/cbravo135/followers","following_url":"https://api.github.com/users/cbravo135/following{/other_user}","gists_url":"https://api.github.com/users/cbravo135/gists{/gist_id}","starred_url":"https://api.github.com/users/cbravo135/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbravo135/subscriptions","organizations_url":"https://api.github.com/users/cbravo135/orgs","repos_url":"https://api.github.com/users/cbravo135/repos","events_url":"https://api.github.com/users/cbravo135/events{/privacy}","received_events_url":"https://api.github.com/users/cbravo135/received_events","type":"User","site_admin":false},"assignees":[{"login":"cbravo135","id":1453874,"avatar_url":"https://avatars2.githubusercontent.com/u/1453874?v=4","gravatar_id":"","url":"https://api.github.com/users/cbravo135","html_url":"https://github.com/cbravo135","followers_url":"https://api.github.com/users/cbravo135/followers","following_url":"https://api.github.com/users/cbravo135/following{/other_user}","gists_url":"https://api.github.com/users/cbravo135/gists{/gist_id}","starred_url":"https://api.github.com/users/cbravo135/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbravo135/subscriptions","organizations_url":"https://api.github.com/users/cbravo135/orgs","repos_url":"https://api.github.com/users/cbravo135/repos","events_url":"https://api.github.com/users/cbravo135/events{/privacy}","received_events_url":"https://api.github.com/users/cbravo135/received_events","type":"User","site_admin":false},{"login":"jsturdy","id":5197820,"avatar_url":"https://avatars1.githubusercontent.com/u/5197820?v=4","gravatar_id":"","url":"https://api.github.com/users/jsturdy","html_url":"https://github.com/jsturdy","followers_url":"https://api.github.com/users/jsturdy/followers","following_url":"https://api.github.com/users/jsturdy/following{/other_user}","gists_url":"https://api.github.com/users/jsturdy/gists{/gist_id}","starred_url":"https://api.github.com/users/jsturdy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsturdy/subscriptions","organizations_url":"https://api.github.com/users/jsturdy/orgs","repos_url":"https://api.github.com/users/jsturdy/repos","events_url":"https://api.github.com/users/jsturdy/events{/privacy}","received_events_url":"https://api.github.com/users/jsturdy/received_events","type":"User","site_admin":false},{"login":"bdorney","id":6432141,"avatar_url":"https://avatars0.githubusercontent.com/u/6432141?v=4","gravatar_id":"","url":"https://api.github.com/users/bdorney","html_url":"https://github.com/bdorney","followers_url":"https://api.github.com/users/bdorney/followers","following_url":"https://api.github.com/users/bdorney/following{/other_user}","gists_url":"https://api.github.com/users/bdorney/gists{/gist_id}","starred_url":"https://api.github.com/users/bdorney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdorney/subscriptions","organizations_url":"https://api.github.com/users/bdorney/orgs","repos_url":"https://api.github.com/users/bdorney/repos","events_url":"https://api.github.com/users/bdorney/events{/privacy}","received_events_url":"https://api.github.com/users/bdorney/received_events","type":"User","site_admin":false},{"login":"mexanick","id":7428758,"avatar_url":"https://avatars1.githubusercontent.com/u/7428758?v=4","gravatar_id":"","url":"https://api.github.com/users/mexanick","html_url":"https://github.com/mexanick","followers_url":"https://api.github.com/users/mexanick/followers","following_url":"https://api.github.com/users/mexanick/following{/other_user}","gists_url":"https://api.github.com/users/mexanick/gists{/gist_id}","starred_url":"https://api.github.com/users/mexanick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mexanick/subscriptions","organizations_url":"https://api.github.com/users/mexanick/orgs","repos_url":"https://api.github.com/users/mexanick/repos","events_url":"https://api.github.com/users/mexanick/events{/privacy}","received_events_url":"https://api.github.com/users/mexanick/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2017-10-24T07:53:05Z","updated_at":"2017-10-24T08:09:43Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"<!--- Provide a general summary of the issue in the Title above -->\r\n## Brief summary of issue\r\n<!--- Provide a description of the issue, including any other issues or pull requests it references -->\r\nTrim runs take a lot of time.  Occasionally they crash or fail to complete successfully.  However usually they will write out *some* of their data (e.g. the first few scurves will have completed successfully but at some point the scan will fail).  Would like that the functionality exists to resume a trim run from the last successfully produced scurve output file\r\n\r\n### Types of issue\r\n<!--- Propsed labels (see CONTRIBUTING.md) to help maintainers label your issue: -->\r\n- [ ] Bug report (report an issue with the code)\r\n- [X] Feature request (request for change which adds functionality)\r\n\r\n## Expected Behavior\r\n<!--- If you're describing a bug, tell us what should happen -->\r\n<!--- If you're suggesting a change/improvement, tell us how it should work -->\r\nIf a trim run crashes or fails to complete but some of the data is present, e.g.:\r\n\r\n```\r\n% cd /gemdata/GE11-X-S-CERN-0001/trim/z4.000000/current\r\n% ll              \r\ntotal 7.7M\r\n-rw-r--r--. 1 dorney zh 314K Oct 24 09:38 scanLog.log\r\n-rw-r--r--. 1 dorney zh 1.9M Oct 23 20:09 SCurveData_trimdac0_range0.root\r\n-rw-r--r--. 1 dorney zh 2.0M Oct 23 20:40 SCurveData_trimdac31_range0.root\r\n-rw-r--r--. 1 dorney zh 1.9M Oct 23 20:58 SCurveData_trimdac31_range1.root\r\n-rw-r--r--. 1 dorney zh 404 Oct 24 07:16 SCurveData_trimdac31_range2.root\r\n```\r\n\r\nHere the the last scurve `SCurveData_trimdac31_range2.root` failed to complete (e.g. almost null size).  I would like the ability to call:\r\n\r\n```\r\ntrimChamber.py --shelf=3 -s2 -g1 --resume --origDir=/gemdata/GE11-X-S-CERN-0001/trim/z4.000000/current\r\n```\r\n\r\nIt should then identify that the first three scurves completed successfully, e.g. `SCurveData_trimdac0_range0.root` through `SCurveData_trimdac31_range1.root`, but the last one did not and then resume the scan by restarting the scurve: `SCurveData_trimdac31_range2.root`.\r\n\r\nIt should also be able to determine the original `--ztrim` value that was used.  We might need to add this to the output `TTree` that is produced by `ultraScurve.py` or it could check the `--origDir` path to get it; although I think having it in the `TTree` is more reliable and path independent.\r\n\r\nTo do this one way might be when performing the binary search step script could check if a given  `SCurveData_trimdacX_rangeY.root` file exists.  If it doesn't exist then the current behavior is executed (e.g. take the scan).  If it does exist instead it should try to fit the data and then use these results to move to the next step in the binary search.\r\n\r\n## Current Behavior\r\n<!--- If describing a bug, tell us what happens instead of the expected behavior -->\r\n<!--- If suggesting a change/improvement, explain the difference from current behavior -->\r\nIf there is a problem during a trim run we loose a lot of time and data has to be repeatedly re-taken.\r\n\r\n## Context (for feature requests)\r\n<!--- How has this issue affected you? What are you trying to accomplish? -->\r\n<!--- Providing context helps us come up with a solution that is most useful in the real world -->\r\nRight now we only have to manage a max of 9-10 detectors in a system.  In the future this number will be 30 (QC8) or 144 in (P5).  It would be good to be able to resume partially completed trim runs.\r\n\r\n<!--- Template thanks to https://www.talater.com/open-source-templates/#/page/98 -->\r\n"},"comment":{"url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/issues/comments/338909554","html_url":"https://github.com/cms-gem-daq-project/vfatqc-python-scripts/issues/147#issuecomment-338909554","issue_url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/issues/147","id":338909554,"user":{"login":"jsturdy","id":5197820,"avatar_url":"https://avatars1.githubusercontent.com/u/5197820?v=4","gravatar_id":"","url":"https://api.github.com/users/jsturdy","html_url":"https://github.com/jsturdy","followers_url":"https://api.github.com/users/jsturdy/followers","following_url":"https://api.github.com/users/jsturdy/following{/other_user}","gists_url":"https://api.github.com/users/jsturdy/gists{/gist_id}","starred_url":"https://api.github.com/users/jsturdy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsturdy/subscriptions","organizations_url":"https://api.github.com/users/jsturdy/orgs","repos_url":"https://api.github.com/users/jsturdy/repos","events_url":"https://api.github.com/users/jsturdy/events{/privacy}","received_events_url":"https://api.github.com/users/jsturdy/received_events","type":"User","site_admin":false},"created_at":"2017-10-24T08:09:43Z","updated_at":"2017-10-24T08:09:43Z","author_association":"COLLABORATOR","body":"At some point, I think that @cbravo135 had some way to have this working"}}
{"actor":{"display_login":"jsturdy"}}