Adding a new feature extracting class to the trigger package

Introduction

First you have to ssh to a particular lxplus machine and follow the instructions from AdrianBuzatuAthenaTrigger01.

Create the class TrigBjetFexEF

cd ~/TriggerWork/Trigger/TrigHypothesis/TrigBjetHypo/src
cp TrigBjetFex.cxx TrigBjetFexEF.cxx
sed -i 's/TrigBjetFex/TrigBjetFexEF/g' TrigBjetFexEF.cxx
cd ~/TriggerWork/Trigger/TrigHypothesis/TrigBjetHypo/TrigBjetHypo
cp TrigBjetFex.h TrigBjetFexEF.h
sed -i 's/TrigBjetFex/TrigBjetFexEF/g' TrigBjetFexEF.h
sed -i 's/TRIGBJETFEX_H/TRIGBJETFEXEF_H/g' TrigBjetFexEF.h

Since we are going to add new code in this class, optionally you could replace these lines in both the .cxx and .h files

// AUTHOR:   Andrea Coccaro                                                                                                                                                                                         
// EMAIL:    Andrea.Coccaro@ge.infn.it

with these lines

// AUTHOR:   Adrian Buzatu                                                                                                                                                                                          
// EMAIL:    Adrian.Buzatu@glasgow.ac.uk

Now we have to add a line with TrigBjetFexEF to the _entries.cxx file from the src/components directory for each line that contains TrigBjetFex.

cd ../src/components
emacs -nw TrigBjetHypo_entries.cxx

The file will look like this

#include "GaudiKernel/DeclareFactoryEntries.h"
#include "TrigBjetHypo/TrigBjetHypo.h"
#include "TrigBjetHypo/TrigBjetFex.h"
#include "TrigBjetHypo/TrigBjetFexEF.h"
#include "TrigBjetHypo/TrigLeptonJetHypo.h"
#include "TrigBjetHypo/TrigLeptonJetFex.h"
#include "TrigBjetHypo/TrigLeptonJetFexAllTE.h"
#include "TrigBjetHypo/TrigLeptonJetMatchAllTE.h"
#include "TrigBjetHypo/TrigEFBjetSequenceAllTE.h"
#include "TrigBjetHypo/TrigBjetEtHypo.h"

DECLARE_ALGORITHM_FACTORY( TrigBjetHypo )
DECLARE_ALGORITHM_FACTORY( TrigBjetFex )
DECLARE_ALGORITHM_FACTORY( TrigBjetFexEF )
DECLARE_ALGORITHM_FACTORY( TrigLeptonJetHypo )
DECLARE_ALGORITHM_FACTORY( TrigLeptonJetFex )
DECLARE_ALGORITHM_FACTORY( TrigLeptonJetFexAllTE )
DECLARE_ALGORITHM_FACTORY( TrigLeptonJetMatchAllTE )
DECLARE_ALGORITHM_FACTORY( TrigEFBjetSequenceAllTE )
DECLARE_ALGORITHM_FACTORY( TrigBjetEtHypo )

DECLARE_FACTORY_ENTRIES( TrigBjetHypo ) { 

    DECLARE_ALGORITHM( TrigBjetHypo )
    DECLARE_ALGORITHM( TrigBjetFex )
    DECLARE_ALGORITHM( TrigBjetFexEF )
    DECLARE_ALGORITHM( TrigLeptonJetHypo )
    DECLARE_ALGORITHM( TrigLeptonJetFex )
    DECLARE_ALGORITHM( TrigLeptonJetFexAllTE )
    DECLARE_ALGORITHM( TrigLeptonJetMatchAllTE )
    DECLARE_ALGORITHM( TrigEFBjetSequenceAllTE )
    DECLARE_ALGORITHM( TrigBjetEtHypo )

}

Run "cmt config"

We need to do "cmt config" when we add a new file and/or when the requirements file with new include libraries. When we check out a new package, this command is run by default for us. We do not have Makefiles, but this command will write the Makefile for us.

cmt config

Compile the package

cd ../../cmt
gmake

The compilation will crash with

#CMT---> compiling ../src/TrigBjetFexEF.cxx
../src/TrigBjetFexEF.cxx: In member function 'virtual HLT::ErrorCode TrigBjetFexEF::hltInitialize()':
../src/TrigBjetFexEF.cxx:262: error: no matching function for call to 'TrigBjetTagger::TrigBjetTagger(TrigBjetFexEF* const, MsgStream&, unsigned int)'
/afs/cern.ch/user/a/abuzatu/TriggerWork/InstallArea/include/TrigBjetHypo/TrigBjetHypo/TrigBjetTagger.h:58: note: candidates are: TrigBjetTagger::TrigBjetTagger(TrigBjetFex*, MsgStream&, unsigned int)

But this is exactly what we expected, because the "TrigBjetTagger" that evaluates the tagger does not have an object "TrigBjetFexEF", which is the new object. So now we will clean this class by removing all its members and methods, except the three methods for start, run and now indeed it compiles.

Next step? AdrianBuzatuAthenaTrigger03.

Previous step: setup: AdrianBuzatuAthenaTrigger01.


Major updates:

-- AdrianBuzatu - 24-Oct-2012

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r3 - 2013-01-14 - AdrianBuzatu
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Sandbox All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback