artmod created Module missing needed #include Event.h
When using artmod to create a module, in this case:
artmod -e beginJob analyzer novaddt::ClusterAna
The default includes don't have:
and without it I get the following errors:
/nova/app/users/janzirn/svnddt/NuETriggers/ClusterAna_module.cc: In member function ‘virtual void novaddt::ClusterAna::analyze(const art::Event&)’:
/nova/app/users/janzirn/svnddt/NuETriggers/ClusterAna_module.cc:68:4: error: invalid use of incomplete type ‘const class art::Event’
In file included from /nusoft/app/externals/art/v1_02_06/include/art/Framework/Core/EngineCreator.h:11:0,
/nusoft/app/externals/art/v1_02_06/include/art/Framework/Services/Optional/RandomNumberGenerator.h:171:9: error: forward declaration of ‘const class art::Event’
mv: cannot stat `/nova/app/users/janzirn/svnddt/tmp/Linux2.6-GCC-debug/NuETriggers/srt_dep_tmp.27034': No such file or directory
make1: * [/nova/app/users/janzirn/svnddt/lib/Linux2.6-GCC-debug/ClusterAna_module.o] Error 1
make: * [NuETriggers.all] Error 2
It seems to me that this include is needed since EDAnalyzer.h includes EngineCreator.h which includes RandomNumberGenerator.h which will throw an error unless Event.h is included somewhere along the way.
I don't know if putting the include to Event.h as a default for every module created by artmod is the right thing, or if it should instead be included in EDAnalyzer.h or maybe some other place.
#1 Updated by Christopher Green about 7 years ago
- Status changed from New to Resolved
- Target version changed from 1.02.06 to 1.03.06
- % Done changed from 0 to 100
This has been in
artmod since 1.03.06. Incidentally,
artmod has been moved to the
cetpkgsupport package (available with
setup cetpkgsupport to set up the current version) to enable it to be used without the entire art suite being set up. I believe NOvA are planning to upgrade to the latest version shortly.