Skip to content
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

Izisopou patch new fitting approaches #30

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
759 changes: 759 additions & 0 deletions JetAnalyzers/XrdClFileSystem_v2.hh

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions JetAnalyzers/bin/jet_correction_analyzer_x.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
#include "CondFormats/JetMETObjects/interface/FactorizedJetCorrector.h"
#include "PhysicsTools/Utilities/interface/LumiReWeighting.h"
#if __has_include("xrootd/XrdCl/XrdClFileSystem.hh")
#include "xrootd/XrdCl/XrdClFileSystem.hh"
//#include "xrootd/XrdCl/XrdClFileSystem.hh"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a comment in #29 about using a copy of an XRootD header. A short version is you shouldn't copy headers from external dependencies. Instead you should use static_asserts and header guards to make sure the dependencies you need exist during compilation.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We were getting compilation errors when using the xrootd/XrdCl/XrdClFileSystem.hh file and since it’s read-only we created a slightly modified XrdClFileSystem_v2.hh script in oder to avoid the error. This was a quick and easy way to keep the workflow running without getting errors. I’m not sure I understood what you are suggesting. Could you explain more in detail?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without knowing what the compilation errors were I can't comment on an alternative for fixing them. I was assuming the original xrootd/XrdCl/XrdClFileSystem.hh file would work and that you were worried about dependencies. Perhaps you can post the compilation error you were seeing (as an attachment).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I am attaching an image of the error we were having. Basically we changed the kXR_evict to kXR_wait , as the error suggested, and the compilation of XrdClFileSystem_v2.hh works fine without issues.
compilation_error

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't be certain, but it look like adding #include "xrootd/XProtocol/XProtocol.hh" above the other XRootD header will fix the problem. Give it a try and let us know.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I tested it and it works, I don't get the compilation error anymore. I'll add this line and remove the XrdClFileSystem_v2.hh code, if that's okay with you.

#include "JetMETAnalysis/JetAnalyzers/XrdClFileSystem_v2.hh"
#define has_xrdcl 1
#else
#define has_xrdcl 0
Expand Down Expand Up @@ -215,7 +216,7 @@ int main(int argc,char**argv)

edm::LumiReWeighting LumiWeights_;
if(!MCPUReWeighting.IsNull() && !DataPUReWeighting.IsNull()) {
LumiWeights_ = edm::LumiReWeighting(string(MCPUReWeighting),string(DataPUReWeighting),"pileup","pileup");
LumiWeights_ = edm::LumiReWeighting(string(MCPUReWeighting),string(DataPUReWeighting),"h_pileup","pileup");
}

if(!outputDir.IsNull() && !outputDir.EndsWith("/")) outputDir += "/";
Expand Down
Loading