Changeset 5103


Ignore:
Timestamp:
09/17/04 15:48:22 (20 years ago)
Author:
moralejo
Message:
Changes to adapt headers to c++ style.
Location:
trunk/MagicSoft/Simulation/Detector
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Simulation/Detector/Camera/camera.h

    r5075 r5103  
    1919//=
    2020//= $RCSfile: camera.h,v $
    21 //= $Revision: 1.21 $
     21//= $Revision: 1.22 $
    2222//= $Author: moralejo $
    23 //= $Date: 2004-09-16 15:24:53 $
     23//= $Date: 2004-09-17 14:48:21 $
    2424//=
    2525//=//////////////////////////////////////////////////////////////////////
     
    4040//!@{
    4141
    42 #include <iostream.h>
    43 #include <fstream.h>
     42#include <iostream>
     43#include <fstream>
    4444#include <stdlib.h>
    4545#include <stdio.h>
    46 #include <string.h>
     46#include <string>
    4747#include <stdarg.h>
    4848#include <math.h>
     
    350350/*
    351351 *$Log: not supported by cvs2svn $
     352 *Revision 1.21  2004/09/16 15:24:53  moralejo
     353 *Updated on CVS after long time...
     354 *
    352355 *
    353356 *Revision 1.19  2003/10/17 19:39:30  blanch
  • trunk/MagicSoft/Simulation/Detector/Camera/config.mk.Linux

    r5096 r5103  
    1818#---------------------------------------------------------------
    1919# $RCSfile: config.mk.Linux,v $
    20 # $Revision: 1.9 $
     20# $Revision: 1.10 $
    2121# $Author: moralejo $
    22 # $Date: 2004-09-17 10:32:54 $
     22# $Date: 2004-09-17 14:48:21 $
    2323##################################################################
    2424# @maintitle
     
    5757
    5858
    59 OPTIM    = -O5 -Wall -fno-exceptions -fPIC -Wpointer-arith -Wcast-align -Wconversion -Wstrict-prototypes -Wmissing-prototypes -Woverloaded-virtual -Wno-deprecated
     59OPTIM    = -O5 -Wall -fno-exceptions -fPIC -Wpointer-arith -Wcast-align -Wconversion -Wstrict-prototypes -Wmissing-prototypes -Woverloaded-virtual
    6060
    6161DEBUG    = -g
  • trunk/MagicSoft/Simulation/Detector/Camera/config.mk.linux

    r5096 r5103  
    1818#---------------------------------------------------------------
    1919# $RCSfile: config.mk.linux,v $
    20 # $Revision: 1.6 $
     20# $Revision: 1.7 $
    2121# $Author: moralejo $
    22 # $Date: 2004-09-17 10:32:54 $
     22# $Date: 2004-09-17 14:48:21 $
    2323##################################################################
    2424# @maintitle
     
    5656INCLUDE_MARS_MRAW   = ../../../Mars/mraw
    5757
    58 OPTIM    = -O5 -Wall -fno-exceptions -fPIC -Wpointer-arith -Wcast-align -Wconversion -Wstrict-prototypes -Wmissing-prototypes -Woverloaded-virtual -Wno-deprecated
     58OPTIM    = -O5 -Wall -fno-exceptions -fPIC -Wpointer-arith -Wcast-align -Wconversion -Wstrict-prototypes -Wmissing-prototypes -Woverloaded-virtual
    5959DEBUG    = -g
    6060
  • trunk/MagicSoft/Simulation/Detector/Camera/config.mk.linux-gnu

    r5096 r5103  
    1818#---------------------------------------------------------------
    1919# $RCSfile: config.mk.linux-gnu,v $
    20 # $Revision: 1.10 $
     20# $Revision: 1.11 $
    2121# $Author: moralejo $
    22 # $Date: 2004-09-17 10:32:54 $
     22# $Date: 2004-09-17 14:48:21 $
    2323##################################################################
    2424# @maintitle
     
    5656INCLUDE_MARS_MRAW   = ../../../Mars/mraw
    5757
    58 OPTIM    = -O5 -Wall -fno-exceptions -fPIC -Wpointer-arith -Wcast-align -Wconversion -Wstrict-prototypes -Wmissing-prototypes -Woverloaded-virtual -Wno-deprecated
     58OPTIM    = -O5 -Wall -fno-exceptions -fPIC -Wpointer-arith -Wcast-align -Wconversion -Wstrict-prototypes -Wmissing-prototypes -Woverloaded-virtual
     59
    5960DEBUG    = -g
    6061
  • trunk/MagicSoft/Simulation/Detector/Camera/creadparam.cxx

    r5077 r5103  
    1919//=
    2020//= $RCSfile: creadparam.cxx,v $
    21 //= $Revision: 1.28 $
     21//= $Revision: 1.29 $
    2222//= $Author: moralejo $
    23 //= $Date: 2004-09-16 15:27:08 $
     23//= $Date: 2004-09-17 14:48:21 $
    2424//=
    2525//=//////////////////////////////////////////////////////////////////////
    2626
    27 // @T \newpage
    28 
    29 //!@section Source code of |creadparam.cxx|.
    30 
    31 /*!@"
    32  
    33   This section describes briefly the source code for the file
    34   |creadparam.cxx|. This file is very closely related to the file
    35   |readparams.cxx| from the |reflector| program. Actually, this later
    36   file was the ancestror of the file you are looking at.
    37 
    38   All the defines it uses are located in the file |creadparam.h|. In
    39   the first one we can see the definitions of the commands available
    40   for the parameters file. We describe these commands in a later
    41   section.
    42  
    43   @"*/
    44 
    45 //!@subsection Includes and Global variables definition.
    46 
    47 /*!@"
    48  
    49   All the defines are located in the file {\tt creadparam.h}.
    50 
    51   @"*/
    52  
    53 //!@{
    5427
    5528#include "creadparam.h"
    5629#include "camera.h"      // Needed for MAX_NUMBER_OF_CTS
    5730
    58 //!@}
    59 
    60 //!@subsection Definition of global variables.
    61 
    62 /*!@"
    63 
    64   Here we define the global variables where the values from the
    65   parameters file are stored.
    66  
    67   @"*/
    68 
    69 //!@{
     31//  Here we define the global variables where the values from the
     32//  parameters file are stored.
    7033
    7134static char **Input_filename;  //@< input filename
     
    147110// Coordinates of CT locations, in centimeters, in the Corsika system.
    148111
    149 //!@}
    150 
    151 //!@subsection The function |readparam()|.
    152 
    153 //!-----------------------------------------------------------
    154 // @name  creadparam
    155 //                                               
    156 // @desc  read parameters from the stdin / parameters file
    157 //
    158 // @var   *filename  Name of the parameters file (NULL->STDIN)
    159 //
    160 // @date Mon Sep 14 13:27:56 MET DST 1998
    161 //------------------------------------------------------------
    162 // @function
    163 
    164 //!@{
    165112void
    166113readparam(char * filename)
     
    336283      //
    337284
    338       if (fmod(FADC_pedestal, 1.) > 1.e-4)
     285      if (fmod((double)FADC_pedestal, (double)1.) > 1.e-4)
    339286      {
    340287          printf("ERROR :  requested average FADC pedestal (%f) is not integer. Please use an integer value.\n", FADC_pedestal);
     
    14091356}
    14101357
    1411 
    1412 
    1413 //!@}
    14141358//=------------------------------------------------------------
    14151359//!@subsection Log of this file.
     
    14181362//
    14191363// $Log: not supported by cvs2svn $
     1364// Revision 1.28  2004/09/16 15:27:08  moralejo
     1365// Updated in CVS after some time (see changes below)
     1366//
    14201367//
    14211368// Revision 1.27  2004/05/12 A. Moralejo
  • trunk/MagicSoft/Simulation/Detector/Camera/creadparam.h

    r5077 r5103  
    1919//=
    2020//= $RCSfile: creadparam.h,v $
    21 //= $Revision: 1.25 $
     21//= $Revision: 1.26 $
    2222//= $Author: moralejo $
    23 //= $Date: 2004-09-16 15:27:08 $
     23//= $Date: 2004-09-17 14:48:21 $
    2424//=
    2525//=//////////////////////////////////////////////////////////////////////
    26 
    27 // @T \newpage
    28 
    29 //!@section Source code of |creadparam.h|.
    30 
    31 /*!@"
    32 
    33   In this section you can find the source code for the file
    34   |creadparam.h|.  This file is mainly needed by
    35   |creadparam.cxx|. Here is located the definition of the commands you
    36   can use in the parameters file. In this file, the first line must be
    37   |camera 'version'|, where |'version'| is the appropiate version of
    38   the output format (NOT the version of the camera program) which can
    39   read the commands written in that parameters file. You cannot mix
    40   parameters files and executables with different versions. The
    41   current version is |camera 0.2|.
    42 
    43   The commands now available for the parameters file are:
    44 
    45   @itemize
    46  
    47   @- |input_file| filename :   
    48      Sets the name of the input file (|.rfl|).
    49   @- |starfield_file| filename :   
    50      Sets the name of the starfield input file (|.rfl|).
    51   @- |ct_file| filename :   
    52      Sets the name of the CT definition file (|.def|).
    53   @- |data_file| filename :   
    54      Sets the name of the output data file (|.dat|).
    55   @- |elec_noise_off| :   
    56      De-activates ElecNoise for FADC and Trigger channels. By default it is on.
    57   @- |fadc_noise_off| :   
    58      Sets the  ElecNoise for FADC.
    59   @- |trig_noise_off| :   
    60      Sets the  ElecNoise for trigger system.
    61   @- |nsb_on| :   
    62      Activates the NSB simulation. This is the default.
    63   @- |nsb_off| :   
    64      De-activates the NSB simulation.
    65   @- |nsb_mean| number :   
    66      Sets the mean value for the NSB.
    67      Default value: 6 for CT1, 6 for MAGIC.
    68      This implies always |nsb_on|.
    69   @- |threshold| number :   
    70      Sets the Threshold value q0. Default value: 10.
    71   @- |tail_cut| number :
    72      Sets the Tail-Cut value.
    73      Default value: 7.
    74   @- |islands_cut| number :   
    75      Sets the Islands-Cut value i0.
    76      Default value: 10.
    77   @- |end_file|
    78      Last command in the parameters file.
    79 
    80   @enditemize
    81 
    82   @ignoreHTML
    83   A parameters file (a small one) looks like this:
    84 
    85   |camera 0.2|
    86 
    87   |input_file    gm100-500.rfl|
    88 
    89   |output_file   gm100-500.phe|
    90 
    91   |output_file   gm100-500.dat|
    92 
    93   |ct_file       magic.def|
    94 
    95   |threshold     10.0|
    96 
    97   |tail_cut      7.0|
    98 
    99   |nsb_mean      5.0|
    100 
    101   |end_file|
    102   @endignoreHTML
    103 
    104 @"*/
    105 
    106 //!@{
    10726
    10827#ifndef _creadparam_
     
    11938//!@{
    12039
    121 #include <iostream.h>
    122 #include <fstream.h>
     40#include <iostream>
     41#include <fstream>
     42#include <string>
     43
    12344#include <stdlib.h>
    12445#include <stdio.h>
    125 #include <string.h>
    12646#include <math.h>
    12747#include <float.h>
     
    283203/*
    284204 * $Log: not supported by cvs2svn $
     205 * Revision 1.25  2004/09/16 15:27:08  moralejo
     206 * Updated in CVS after some time (see changes below)
     207 *
    285208 *
    286209 * Revision 1.23  2004/01/30 09:55:33  blanch
  • trunk/MagicSoft/Simulation/Detector/Camera/moments.h

    r308 r5103  
    1919//=
    2020//= $RCSfile: moments.h,v $
    21 //= $Revision: 1.1.1.1 $
    22 //= $Author: harald $
    23 //= $Date: 1999-11-05 11:59:33 $
     21//= $Revision: 1.2 $
     22//= $Author: moralejo $
     23//= $Date: 2004-09-17 14:48:21 $
    2424//=
    2525//=//////////////////////////////////////////////////////////////////////
     
    5151//!@{
    5252
    53 #include <iostream.h>
    54 #include <fstream.h>
     53#include <iostream>
     54#include <fstream>
     55#include <string>
     56
    5557#include <stdlib.h>
    56 #include <stdio.h>
    57 #include <string.h>
    5858#include <math.h>
    5959#include <float.h>
     60#include <stdio.h>
    6061
    6162#include "jcmacros.h"
     
    144145/*
    145146 *$Log: not supported by cvs2svn $
     147 *Revision 1.1.1.1  1999/11/05 11:59:33  harald
     148 *This the starting point for CVS controlled further developments of the
     149 *camera program. The program was originally written by Jose Carlos.
     150 *But here you can find a "rootified" version to the program. This means
     151 *that there is no hbook stuff in it now. Also the output of the
     152 *program changed to the MagicRawDataFormat.
     153 *
     154 *The "rootification" was done by Dirk Petry and Harald Kornmayer.
     155 *
     156 *In the following you can see the README file of that version:
     157 *
     158 *==================================================
     159 *
     160 *Fri Oct 22  1999   D.P.
     161 *
     162 *The MAGIC Monte Carlo System
     163 *
     164 *Camera Simulation Programme
     165 *---------------------------
     166 *
     167 *1) Description
     168 *
     169 *This version is the result of the fusion of H.K.'s
     170 *root_camera which is described below (section 2)
     171 *and another version by D.P. which had a few additional
     172 *useful features.
     173 *
     174 *The version compiles under Linux with ROOT 2.22 installed
     175 *(variable ROOTSYS has to be set).
     176 *
     177 *Compile as before simply using "make" in the root_camera
     178 *directory.
     179 *
     180 *All features of H.K.'s root_camera were retained.
     181 *
     182 *Additional features of this version are:
     183 *
     184 *  a) HBOOK is no longer used and all references are removed.
     185 *
     186 *  b) Instead of HBOOK, the user is given now the possibility of
     187 *     having Diagnostic data in ROOT format as a complement
     188 *     to the ROOT Raw data.
     189 *
     190 *     This data is written to the file which is determined by
     191 *     the new input parameter "diag_file" in the camera parameter
     192 *     file.
     193 *
     194 *     All source code file belonging to this part have filenames
     195 *     starting with "MDiag".
     196 *
     197 *     The user can read the output file using the following commands
     198 *     in an interactive ROOT session:
     199 *
     200 *              root [0] .L MDiag.so
     201 *      root [1] new TFile("diag.root");
     202 *      root [2] new TTreeViewer("T");
     203 *     
     204 *     This brings up a viewer from which all variables of the
     205 *     TTree can be accessed and histogrammed. This example
     206 *     assumes that you have named the file "diag.root", that
     207 *     you are using ROOT version 2.22 or later and that you have
     208 *     the shared object library "MDiag.so" which is produced
     209 *     by the Makefile along with the executable "camera".
     210 *       
     211 * !   The contents of the so-called diag file is not yet fixed.
     212 * !   At the moment it is what J.C.G. used to put into the HBOOK
     213 * !   ntuple. In future versions the moments calculation can be
     214 * !   removed and the parameter list be modified correspondingly.
     215 *
     216 *  c) Now concatenated reflector files can be read. This is useful
     217 *     if you have run the reflector with different parameters but
     218 *     you want to continue the analysis with all reflector data
     219 *     going into ONE ROOT outputfile.
     220 *
     221 *     The previous camera version contained a bug which made reading
     222 *     of two or more concatenated reflector files impossible.
     223 *
     224 *  d) The reflector output format was changed. It is now version
     225 *     0.4 .
     226 *     The change solely consists in a shortening of the flag
     227 *     definition in the file
     228 *
     229 *           include-MC/MCCphoton.hxx 
     230 *
     231 * !   IF YOU WANT TO READ REFLECTOR FORMAT 0.3, you can easily
     232 * !   do so by recompiling camera with the previous version of
     233 * !   include-MC/MCCphoton.hxx.
     234 *
     235 *     The change was necessary for saving space and better
     236 *     debugging. From now on, this format can be frozen.
     237 *
     238 * !   For producing reflector output in the new format, you
     239 * !   of course have to recompile your reflector with the
     240 * !   new include-MC/MCCphoton.hxx .
     241 *
     242 *  e) A first version of the pixelization with the larger
     243 *     outer pixels is implemented. THIS IS NOT YET FULLY
     244 *     TESTED, but first rough tests show that it works
     245 *     at least to a good approximation.
     246 *
     247 *     The present version implements the camera outline
     248 *     with 18 "gap-pixels" and 595 pixels in total as
     249 *     shown in
     250 *
     251 *        http://sarastro.ifae.es/internal/home/hardware/camera/numbering.ps
     252 *
     253 *     This change involved
     254 *
     255 *      (i) The file pixels.dat is no longer needed. Instead
     256 *          the coordinates are generated by the program itself
     257 *          (takes maybe 1 second). In the file
     258 *
     259 *              pixel-coords.txt
     260 *
     261 *        in the same directory as this README, you find a list
     262 *          of the coordinates generated by this new routine. It
     263 *          has the format
     264 *
     265 *              number   i   j   x  y  size-factor
     266 *
     267 *          where i and j are J.C.G.'s so called biaxis hexagonal
     268 *          coordinates (for internal use) and x and y are the
     269 *          coordinates of the pixel centers in the standard camera
     270 *          coordinate system in units of centimeters. The value
     271 *          of "size-factor" determines the linear size of the pixel
     272 *          relative to the central pixels.
     273 *
     274 *        (ii) The magic.def file has two additional parameters
     275 *          which give the number of central pixels and the
     276 *          number of gap pixels
     277 *
     278 *        (iii) In camera.h and camera.cxx several changes were
     279 *          necessary, among them the introduction of several
     280 *          new functions
     281 *
     282 *     The newly suggested outline with asymmetric Winston cones
     283 *     will be implemented in a later version.
     284 *
     285 *  f) phe files can no longer be read since this contradicts
     286 *     our philosophy that the analysis should be done with other
     287 *     programs like e.g. EVITA and not with "camera" itself.
     288 *     This possibility was removed.
     289 *
     290 *  g) ROOT is no longer invoked with an interactive interface.
     291 *     In this way, camera can better be run as a batch program and
     292 *     it uses less memory.
     293 *
     294 *  h) small changes concerning the variable "t_chan" were necessary in
     295 *     order to avoid segmentation faults: The variable is used as an
     296 *     index and it went sometimes outside the limits when camera
     297 *     was reading proton data. This is because the reflector files
     298 *     don't contain the photons in a chronological order and also
     299 *     the timespread can be considerably longer that the foreseen
     300 *     digitisation timespan. Please see the source code of camera.cxx
     301 *     round about line 1090.
     302 *
     303 *  j) several unused variables were removed, a few warning messages
     304 *     occur when you compile camera.cxx but these can be ignored at
     305 *     the moment.
     306 *
     307 *In general the program is of course not finished. It still needs
     308 *debugging, proper trigger simulation, simulation of the asymmetric
     309 *version of the outer pixels, proper NSB simulation, adaption of
     310 *the diag "ntuple" contents to our need and others small improvements.
     311 *
     312 *In the directory rfl-files there is now a file in reflector format 0.4
     313 *containing a single event produced by the starfiled adder. It has
     314 *a duration of 30 ns and represents the region around the Crab Nebula.
     315 *Using the enclosed input parameter file, camera should process this
     316 *file without problems.
     317 *
     318 *2) The README for the previous version of root_camera
     319 *
     320 *README for a preliminary version of the
     321 *root_camera program.
     322 *
     323 *root_camera is based on the program "camera"of Jose Carlos
     324 *Gonzalez. It was changed in the way that only the pixelisation
     325 *and the distibution of the phe to the FADCs works in a
     326 *first version.
     327 *
     328 *Using the #undef command most possibilities of the orignal
     329 *program are switched of.
     330 *
     331 *The new parts are signed by
     332 *
     333 *- ROOT or __ROOT__
     334 *  nearly all  important codelines for ROOT output are enclosed
     335 *  in structures like
     336 *  #ifdef __ROOT__
     337 * 
     338 *    code
     339 *
     340 *  #endif __ROOT__
     341 *
     342 *  In same case the new lines are signed by a comment with the word
     343 *  ROOT in it.
     344 *
     345 *  For timing of the pulse some variable names are changed.
     346 *  (t0, t1, t  -->  t_ini, t_fin, t_1st, t_chan,...)
     347 *  Look also for this changes.
     348 *
     349 *  For the new root-file is also a change in readparm-files
     350 *
     351 *
     352 *- __DETAIL_TRIGGER__
     353 *
     354 *  This is for the implementation of the current work on trigger
     355 *  studies. Because the class MTrigger is not well documented it
     356 *  isn´t a part of this tar file. Only a dummy File exists.
     357 *
     358 *
     359 *
     360 *With all files in the archive, the root_camera program should run.
     361 *
     362 *A reflector file is in the directory rfl-files
     363 *
     364 *==================================================
     365 *
     366 *From now on, use CVS for development!!!!
     367 *
     368 *
     369 *
    146370 *Revision 1.1.1.1  1999/10/21 16:35:10  petry
    147371 *first synthesised version
  • trunk/MagicSoft/Simulation/Detector/include-CORSIKA/COREventHeader.hxx

    r3046 r5103  
    2727#include "TObject.h"
    2828
    29 #include <iostream.h>
    30 #include <iomanip.h>
    31 #include <fstream.h>
     29#include <iostream>
     30#include <iomanip>
     31#include <fstream>
    3232#include <stdlib.h>
    3333#include <math.h>
    34 #include <string.h>
     34#include <string>
    3535// @endcode
     36
     37using namespace std;
    3638
    3739// @subsection Class {\em COREventHeader}: Definition
  • trunk/MagicSoft/Simulation/Detector/include-MC/MCCphoton.hxx

    r5078 r5103  
    2727#include "TObject.h"
    2828
    29 #include <iostream.h>
    30 #include <iomanip.h>
    31 #include <fstream.h>
     29#include <iostream>
     30#include <iomanip>
     31#include <fstream>
    3232#include <stdlib.h>
    33 #include <string.h>
     33#include <string>
    3434#include <math.h>
    3535
    3636#include "jcmacros.h"
     37
     38using namespace std;
    3739
    3840// const char variables to use in MCCphoton::isA() function
  • trunk/MagicSoft/Simulation/Detector/include-MC/MCEventHeader.hxx

    r5078 r5103  
    2727#include <TObject.h>
    2828
    29 #include <iostream.h>
    30 #include <iomanip.h>
    31 #include <fstream.h>
     29#include <iostream>
     30#include <iomanip>
     31#include <fstream>
    3232#include <stdlib.h>
    3333#include <math.h>
  • trunk/MagicSoft/Simulation/Detector/include-MC/MCEventHeader_2.hxx

    r5078 r5103  
    2727#include "TObject.h"
    2828
    29 #include <iostream.h>
    30 #include <iomanip.h>
    31 #include <fstream.h>
     29#include <iostream>
     30#include <iomanip>
     31#include <fstream>
    3232#include <stdlib.h>
    3333#include <math.h>
  • trunk/MagicSoft/Simulation/Detector/include-MC/MCRunHeader.hxx

    r5078 r5103  
    2727#include "TObject.h"
    2828
    29 #include <iostream.h>
    30 #include <iomanip.h>
    31 #include <fstream.h>
     29#include <iostream>
     30#include <iomanip>
     31#include <fstream>
    3232#include <stdlib.h>
    3333#include <math.h>
    3434
    3535#define SIZE_OF_MCRUNHEADER    272   /* floats */
     36
     37using namespace std;
    3638
    3739// @endcode
  • trunk/MagicSoft/Simulation/Detector/include-MLons/MLons.cxx

    r5081 r5103  
    11#include "MLons.hxx"
     2
     3using namespace std;
    24
    35MLons::MLons(){
  • trunk/MagicSoft/Simulation/Detector/include-MLons/MLons.hxx

    r5081 r5103  
    99//
    1010//
    11 #include <iostream.h>
     11#include <iostream>
    1212#include <math.h>
    1313
Note: See TracChangeset for help on using the changeset viewer.