Project

General

Profile

Errors

"Missing" Header File

Problem:
Compiling of .ccx (.cpp) files are failing with error messages to the tone of:
In DDTFragment.cxx: #include DDTDataBaseProducts/DDTFragment.h does not exist

Solution:
The header file might actually not exist, or you misspelled it. In my case the error stemmed from the fact that there was a broken link in my include directory of my test release. Creating the correct link fixed this problem.

In the include directory of your test release, do:

ln -s ../<package-name> ./

Unknown Module

Problem:
In this case an undefined symbol error is being masked within the Module Construction step of art during gmake of a package.

01-Nov-2012 12:02:29 CDT  ModuleConstruction
cet::exception caught in art
---- Configuration BEGIN
  UnknownModule
  ---- Configuration BEGIN
    Unable to load requested library /nova/app/users/janzirn/ddt/lib/Linux2.6-GCC-debug/libNuESelect_module.so
    /nova/app/users/janzirn/ddt/lib/Linux2.6-GCC-debug/libNuESelect_module.so: undefined symbol: typeinfo for novaddt::Cluster
  ---- Configuration END
  Module NuESelect with version v1_01_01 was not registered.
  Perhaps your module type is misspelled or is not a framework plugin.
---- Configuration END
%MSG

Solution:
Added appropriate lines to classes.h and classes_def.xml files. Which resulted in the following:

Problem:

%MSG                                                            
terminate called after throwing an instance of 'cet::coded_exception<art::errors::ErrorCodes, &art::ExceptionDetail::translate>'
  what():  ---- Configuration BEGIN                                                                                             
  Unable to load requested library /nova/app/users/janzirn/ddt/lib/Linux2.6-GCC-debug/libDDTBaseDataProducts_dict.so            
  /nova/app/users/janzirn/ddt/lib/Linux2.6-GCC-debug/libDDTBaseDataProducts_dict.so: undefined symbol: typeinfo for novaddt::Cluster
---- Configuration END                                                                                                              

Looks familiar...

Solution:
The underlying problem was in the Cluster.h file. The destructor did not have a function definition. Changed

virtual ~Cluster();
to
virtual ~Cluster() {};

New DAQDataFormats

Problem:

Duyang generated Millislice files using the latest DAQDataFormats and I am now trying to run over those files using the DDT framework (which initially used DAQDataFromats from last summer). Here is the setup:

1. Go to your test release and setup the environment:

setup_novaddt
srt_setup -a

2. Get the following two DDT packages:

addpkg_svn -h DDTBaseDataProducts
addpkg_svn -h DDTproto

3. Get the latest DAQDataFormats from the online world:

addpkg -hd :pserver:anonymous@cdcvs.fnal.gov:/cvs/nova DAQDataFormats

4. Compile the three packages (make sure to clean DDTBaseDataProducts and DDTproto if they were already in your release).

5. Run the code:

ddt-filter -c mc-files.fcl

6. Here is the problem that I run into with the Hit Producer:

novagpvm04:ddt> gmake DDTproto.all
<**all**> DDTproto
<**compiling**> NovaDDTHitProducer_module.cc
In file included from /nusoft/app/externals/art/v1_02_06/include/art/Framework/Core/EngineCreator.h:11:0,
                 from /nusoft/app/externals/art/v1_02_06/include/art/Framework/Core/EDProducer.h:11,
                 from /nova/app/users/mfrank/src/ddt/DDTproto/NovaDDTHitProducer_module.cc:15:
/nusoft/app/externals/art/v1_02_06/include/art/Framework/Services/Optional/RandomNumberGenerator.h:205:12: error: expected identifier before 'void'
/nusoft/app/externals/art/v1_02_06/include/art/Framework/Services/Optional/RandomNumberGenerator.h:205:12: error: 'RawDAQData' has not been declared
/nusoft/app/externals/art/v1_02_06/include/art/Framework/Services/Optional/RandomNumberGenerator.h:205:12: error: expected unqualified-id before '*' token
/nusoft/app/externals/art/v1_02_06/include/art/Framework/Services/Optional/RandomNumberGenerator.h:205:12: error: expected ')' before '*' token
/nusoft/app/externals/art/v1_02_06/include/art/Framework/Services/Optional/RandomNumberGenerator.h:209:29: error: 'RawDAQData' was not declared in this scope
/nusoft/app/externals/art/v1_02_06/include/art/Framework/Services/Optional/RandomNumberGenerator.h:209:29: note: suggested alternative:
In file included from /nova/app/users/mfrank/src/ddt/include/DAQDataFormats/RawNanoSliceHeaderV0.h:3:0,
                 from /nova/app/users/mfrank/src/ddt/include/DAQDataFormats/RawNanoSliceHeaderV1.h:3,
                 from /nova/app/users/mfrank/src/ddt/include/DAQDataFormats/RawNanoSliceHeader.h:3,
                 from /nova/app/users/mfrank/src/ddt/include/DAQDataFormats/RawNanoSliceV0.h:3,
                 from /nova/app/users/mfrank/src/ddt/include/DAQDataFormats/RawNanoSliceV1.h:3,
                 from /nova/app/users/mfrank/src/ddt/include/DAQDataFormats/RawNanoSlice.h:3,
                 from /nova/app/users/mfrank/src/ddt/include/DAQDataFormats/FEBSimulator.h:4,
                 from /nova/app/users/mfrank/src/ddt/include/DAQDataFormats/RawMicroSlice.h:4,
                 from /nova/app/users/mfrank/src/ddt/DDTproto/NovaDDTHitProducer_module.cc:10:
/nova/app/users/mfrank/src/ddt/include/DAQDataFormats/RawDAQData.h:80:7: note:   'daqdataformats::RawDAQData'
In file included from /nusoft/app/externals/art/v1_02_06/include/art/Framework/Core/EngineCreator.h:11:0,
                 from /nusoft/app/externals/art/v1_02_06/include/art/Framework/Core/EDProducer.h:11,
                 from /nova/app/users/mfrank/src/ddt/DDTproto/NovaDDTHitProducer_module.cc:15:
/nusoft/app/externals/art/v1_02_06/include/art/Framework/Services/Optional/RandomNumberGenerator.h:209:35: error: template argument 2 is invalid
/nusoft/app/externals/art/v1_02_06/include/art/Framework/Services/Optional/RandomNumberGenerator.h:209:35: error: template argument 4 is invalid
/nova/app/users/mfrank/src/ddt/DDTproto/NovaDDTHitProducer_module.cc: In member function 'size_t NovaDDTHitProducer::populateMilliBlock(const void*, RawMilliBlock&)':
/nova/app/users/mfrank/src/ddt/DDTproto/NovaDDTHitProducer_module.cc:65:33: error: 'MILLISLICEHEADER_SIZE' was not declared in this scope
/nova/app/users/mfrank/src/ddt/DDTproto/NovaDDTHitProducer_module.cc:65:33: note: suggested alternative:
In file included from /nova/app/users/mfrank/src/ddt/include/DAQDataFormats/RawMilliSlice.h:4:0,
                 from /nova/app/users/mfrank/src/ddt/include/DAQDataFormats/RawMilliBlock.h:11,
                 from /nova/app/users/mfrank/src/ddt/DDTproto/NovaDDTHitProducer_module.cc:11:
/nova/app/users/mfrank/src/ddt/include/DAQDataFormats/RawMilliSliceHeader.h:16:35: note:   'daqdataformats::rawmillihdr::MILLISLICEHEADER_SIZE'
mv: cannot stat `/nova/app/users/mfrank/src/ddt/tmp/Linux2.6-GCC-debug/DDTproto/srt_dep_tmp.28121': No such file or directory
gmake[1]: *** [/nova/app/users/mfrank/src/ddt/lib/Linux2.6-GCC-debug/NovaDDTHitProducer_module.o] Error 1
gmake: *** [DDTproto.all] Error 2
novagpvm04:ddt> 

Solution:

It turns out that the order of included headers matters. You have to include the ART headers before anything else:

#include "art/Framework/Core/EDProducer.h" 
#include "art/Framework/Core/ModuleMacros.h" 
#include "art/Framework/Principal/Event.h" 
#include "art/Framework/Principal/Handle.h" 
#include "artdaq/DAQdata/Fragments.hh" 

#include "DAQDataFormats/RawMicroSlice.h" 
#include "DAQDataFormats/RawMilliBlock.h" 
#include "DAQDataFormats/RawMilliBlockHeader.h" 
#include "DAQDataFormats/RawMilliSlice.h" 
#include "DAQDataFormats/RawNanoSlice.h" 

#include "DDTBaseDataProducts/DAQHit.h"