-
Notifications
You must be signed in to change notification settings - Fork 253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove eostools dependency from cmsIO #184
Conversation
Ciao Giovanni, many thanks! It works, but the file used by heppy_batch is the same, but in PhysicsTools: |
@GaelTouquet tested it for H2TauTau, and it also appears to work fine in our case. Thanks for the quick fix!
… On 13 Jun 2017, at 14:26, Giovanni Petrucciani ***@***.***> wrote:
cmsIO used to be taken from the CAF AFS installation, but it is now deprecated.
This small change to eostools avoids using cmsIO, and in the test case I've run things seem to work fine, but a few more tests would be welcome (especially if other analysis setups make a more complex use of eostools wrt the multilepton cfg I tested)
Many eostools are still littered with multiple translations from lfn to pfn and back again that to me don't seem necessary (maybe they were introduced to make sure the paths had a canonical form?) but I didn't remove them yet.
There's probably also a lot of obsolete legacy API (e.g for castor) that could be cleaned up.
A volunteer would be welcome.
You can view, comment on, or merge this pull request online at:
#184
Commit Summary
• eostools: avoid cmsIO module that is no longer available in the standard CAF environment
• samples_13TeV_80X_susySignalsPriv: Remove missing private Higgsino samples
File Changes
• M Production/python/eostools.py (145)
• M RootTools/python/samples/samples_13TeV_80X_susySignalsPriv.py (10)
Patch Links:
• https://github.com/CERN-PH-CMG/cmgtools-lite/pull/184.patch
• https://github.com/CERN-PH-CMG/cmgtools-lite/pull/184.diff
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me (VVResonances) as well. Thanks!
cmsIO fix (CERN-PH-CMG/cmgtools-lite#184) also in HeppyCore
|
||
def splitPFN(pfn): | ||
"""Split the PFN in to { <protocol>, <host>, <path>, <opaque> }""" | ||
groups = re.match("^(\w\+)://([^/]+)/(/[^?]+)(\?.*)?", pfn) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I missed one problem here, the backslash before the first + should not be there. Instead, it should be:
groups = re.match("^(\w+)://([^/]+)/(/[^?]+)(\?.*)?", pfn)
which for instance works for root://eoscms.cern.ch//eos/cms/store/cmst3/user/jngadiub/ntuple
returning
root
eoscms.cern.ch
/eos/cms/store/cmst3/user/jngadiub/ntuple
lfn = eosToLFN(path) | ||
pfn = lfnToPFN(lfn) | ||
tokens = cmsIO.splitPFN(pfn) | ||
tokens = splitPFN(path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is another issue here (or in general), it calls splitPFN with a /eos/...
path and not with the protocol prepended, so the regex evaluation above will fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the error is later on at lines 194-196. It works when replacing those lines with:
pfn = lfnToPFN(path)
if not isEOSFile(pfn):
runEOSCommand(pfn,'mkdir','-p')
typo in filename
cmsIO used to be taken from the CAF AFS installation, but it is now deprecated.
This small change to eostools avoids using cmsIO, and in the test case I've run things seem to work fine, but a few more tests would be welcome (especially if other analysis setups make a more complex use of eostools wrt the multilepton cfg I tested)
Many eostools are still littered with multiple translations from lfn to pfn and back again that to me don't seem necessary (maybe they were introduced to make sure the paths had a canonical form?) but I didn't remove them yet.
There's probably also a lot of obsolete legacy API (e.g for castor) that could be cleaned up.
A volunteer would be welcome.