Changeset 402 for trunk


Ignore:
Timestamp:
06/13/00 14:25:24 (24 years ago)
Author:
blanch
Message:
The multiple arrays have been replaced, since they do not work
in alpha machines. Now we are using pointers and the command new
to allocate memory.
File:
1 edited

Legend:

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

    r388 r402  
    2121//
    2222// $RCSfile: camera.cxx,v $
    23 // $Revision: 1.8 $
     23// $Revision: 1.9 $
    2424// $Author: blanch $
    25 // $Date: 2000-05-11 13:57:27 $
     25// $Date: 2000-06-13 13:25:24 $
    2626//
    2727////////////////////////////////////////////////////////////////////////
     
    601601  //  Definition and initialization of array to save trigger statistics
    602602 
    603   int ntriggerloop[(int) (Trigger_loop_uthres+1)][Trigger_loop_umult+1][Trigger_loop_utop+1];
    604 
    605   for (ithrescount=Trigger_loop_lthres;ithrescount<=Trigger_loop_uthres;ithrescount++){
    606     for (imulticount=Trigger_loop_lmult;imulticount<=Trigger_loop_umult;imulticount++){
    607       for(itopocount=Trigger_loop_ltop;itopocount<=Trigger_loop_utop;itopocount++){
     603  int ***ntriggerloop;
     604
     605  ntriggerloop= new int ** [(int) (Trigger_loop_uthres+1-Trigger_loop_lthres)];
     606  for (ithrescount=0;ithrescount<=Trigger_loop_uthres-Trigger_loop_lthres;ithrescount++){
     607    ntriggerloop[ithrescount]= new int * [Trigger_loop_umult-Trigger_loop_lmult+1];
     608    for (imulticount=0;imulticount<=Trigger_loop_umult-Trigger_loop_lmult;imulticount++){
     609      ntriggerloop[ithrescount][imulticount]= new int [Trigger_loop_utop-Trigger_loop_ltop+1];
     610      for(itopocount=0;itopocount<=Trigger_loop_utop-Trigger_loop_ltop;itopocount++){
    608611        ntriggerloop[ithrescount][imulticount][itopocount]=0;
    609612      }
     
    11021105                  McTrig->SetFirstLevel (Lev1=Trigger.FirstLevel());
    11031106                  if(Lev1>0) {
    1104                     ntriggerloop[ithrescount][imulticount][itopocount]++;
     1107                    ntriggerloop[ithrescount-Trigger_loop_lthres][imulticount-Trigger_loop_lmult][itopocount-Trigger_loop_ltop]++;
    11051108                    McTrig->SetTopology(itopocount);
    11061109                    McTrig->SetMultiplicity(imulticount);
     
    13661369        for(itopocount=Trigger_loop_ltop;itopocount<=Trigger_loop_utop;itopocount++){
    13671370          log( SIGNATURE, "Thres %d, Multi %d, Topo %d: %5.1f%% (%d out of %d)\n",
    1368                ithrescount,imulticount,itopocount,((float)ntriggerloop[ithrescount][imulticount][itopocount] / ((float)ntshow) * 100.0), ntriggerloop[ithrescount][imulticount][itopocount], ntshow);
     1371               ithrescount,imulticount,itopocount,((float)ntriggerloop[ithrescount-Trigger_loop_lthres][imulticount-Trigger_loop_lmult][itopocount-Trigger_loop_ltop] / ((float)ntshow) * 100.0), ntriggerloop[ithrescount-Trigger_loop_lthres][imulticount-Trigger_loop_lmult][itopocount-Trigger_loop_ltop], ntshow);
    13691372        }
    13701373      }   
     
    28662869//
    28672870// $Log: not supported by cvs2svn $
     2871// Revision 1.8  2000/05/11 13:57:27  blanch
     2872// The option to loop over several trigger configurations has been included.
     2873// Some non-sense with triggertime range has been solved.
     2874// Montecarlo information and ADC counts are saved in a root file.
     2875// There was a problem with the maximum number of phe that the program could analyse. Now there is not limit.
     2876//
    28682877// Revision 1.7  2000/03/24 18:10:46  blanch
    28692878// A first FADC simulation and a trigger simulation are already implemented.
Note: See TracChangeset for help on using the changeset viewer.