Tips and FAQ

  1. C++ mangling
  2. The C++ compiler has to derived a unique name for all methods, and that should take into account namespace, the class name, possible template, the number and type of argument, the constness, etc.. This is called the C++ mangling of names. As a result, the symbol names as they appear in the binary file are difficult to decipher. You can use the c++filt utility to unmangle the name:

    echo "_Z11OBUnmarshalR23SAM_SamDictionaryStructRPKhb" | c++filt
    OBUnmarshal(SAM_SamDictionaryStruct&, unsigned char const*&, bool)
         

    For KCC based releases, i.e. p14 and before, the demangler was called edg_decode.

  3. Subtleties in "setup D0RunII" :
  4. There are two ways to setup the maxopt version of a release, but those two are not exactly equivalent :

    The first formed is to be preferred, but the second form originally appeared in many tutorials. The difference is that the second form will end up using the RCP database for non maxopt (aka debug), which is fine as long as the the debug version of the release is present. This is rarely the case at CCIN2P3.

  5. "No RCP with the given RCIPD could be found, The RCPID was: <24484 1>":
  6. The RCP system has three different databases :

    In this example, 24484 is the id of the rcp file in database 1: 1 is the official database, 2 is the build database and 99 is the personal database.

  7. Find how many events there are in a given dspack/evpack file :
  8. "How can I split this file into many files with N lines each ? "
  9. This line splits the input file final.list into files tempoXXX.list that are 4 lines long.

    awk 'BEGIN {count=0; filecount=0; x[0]=""}; {count=count+1;x[count]=$0; if (count == 4) {filecount=filecount+1;filename=sprintf("tempo%d.list",filecount); print filename; print x[1]"\n"x[2]"\n"x[3]"\n"x[4]>filename; print ""; count=0};}' final.list 
    

    Another possibility is to use the split command line: this split the file input.list into sublist_aa, sublist_ab, sublist_ac, etc that are 4 lines long:

    split -l 4 input.list sublist_
    





updated Jan 1, 2006