Feature #1349


Added by Mark Messier almost 9 years ago. Updated almost 9 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:
SSI Package:


artmod is quite nice and I'd like to make some standard boilerplate files which conform to the NOvA coding standards. To that end, it would be nice to have a few more format strings available:

%n - the namespace the class lives in
%N - the namespace converted to all caps
%K - the classname converted to all caps

The last two are motivated by the NOvA conventions which specify #include protections as:


The namespace seems to me like it must be there, but I didn't find in in the artmod documentation.

Associated revisions

Revision 66fcbd3d (diff)
Added by Christopher Green almost 9 years ago

Implement key features requested by issue #1349.


#1 Updated by Mark Messier almost 9 years ago

...working with this a little more I'm finding that one more would also be useful:

Name of package that the module belongs to.

This would help with the include path into the NOvA release which are usually given as "PackageName/ModuleName.h".

#2 Updated by Christopher Green almost 9 years ago

  • Category set to Infrastructure
  • Status changed from New to Feedback
  • Assignee set to Christopher Green
  • Target version set to 1.00.00
  • % Done changed from 0 to 90

Hi Mark,

I'm glad you're finding artmod useful.

We didn't provide the namespace chain explicitly because we have %C (fully-qualified class name), ie a::b::MyClass, and %c (Myclass). We didn't envisage anyone requiring just the namespace chain explicitly (of course in the general case it can be multiple namespaces with double-colon delimiters). Howeer, since there's no particular reason not to I have provided this information as %n.

A slight wrinkle to your request: the header guard is not part of the boiler plate, because it is only required for the split situation whereas the boilerplate could be used in either case. Rather than add it to the boiler plate and cause complications, I have added an option --guard and another environment variable ARTMOD_HEADER_GUARD which will consist of the format string, eg:

Note that we honor the Perl markers for upper-case (\U), lower-case (\L) and cancel (\E). However, the cancel is optional as end-of-line or end-of-input will automatically cancel the case switch.

Some feedback is required here now: the %p is hard, because there is no completely general way of ascertaining the project name. In a very limited set of cases which happen to encompass yours, the project name is the first item of the path provided for the header. Is this what you want? There is no way to deduce the project name from any information which is not entirely experiment-specific:: for you, the top directory is SRT_PRIVATE_CONTEXT; for mu2e it's MU2E_TEST_RELEASE; for g-2 it's going to be something else again. If the only reason you require the three-header format is current limitations of your build system, I would be happy to take a look at making it accommodate the single-file module format which would remove the need for a header entirely. I believe the limitations are not inherent to SoftRelTools itself.

Please let me know how you would like to proceed on the %p issue and/or three-file vs one-file. Everything else is implemented.

#3 Updated by Christopher Green almost 9 years ago

  • Status changed from Feedback to Resolved
  • Target version changed from 1.00.00 to 0.07.10
  • % Done changed from 90 to 100

Key features implemented with a44ef75d6f8bb5ad7602459a53035a191d1cfd84 and released with version:v0.07.10. If you wish us to act on any of the items mentioned in the previous feedback request, please let us know by replying to this issue.

#4 Updated by Marc Paterno almost 9 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF