Changeset 903 for trunk/MagicSoft


Ignore:
Timestamp:
07/31/01 15:58:23 (23 years ago)
Author:
magicsol
Message:
It has been addapted to latest changes in the global MARS structure.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/macros/getRate.C

    r872 r903  
    1818    //    access them-
    1919    //
     20    //  - we need to create MHMcRate only. The other containers
     21    //    are created automatically without loss - we don't have to
     22    //    access them-
     23    //  - MHMcRate must be created by us because we need the pointer
     24    //    to it and if it would get created automatically it would also be
     25    //    deleted automatically
     26    //  - Actually, depending on using a single trigger option MonteCarlo
     27    //    file or a multyple trigger option, a MHMcRate or an array of
     28    //    MHMcRate are needed.
    2029   
    2130    parlist.AddToList(&tasklist);
     31
     32    if (dim==0){
     33      MHMcRate *rate = new MHMcRate();
     34      parlist.AddToList(rate);
     35    }
     36    if (dim<0){
     37      char *name = new char[8];
     38      name="MHMcRate";
     39      char *auxname = new char[8+7];
     40      strcpy(auxname, name);
     41      sprintf(auxname+8, ";%d", -dim);
     42      MHMcRate *ratem = new MHMcRate(auxname);
     43      parlist.AddToList(ratem);
     44    }
     45    else{
     46      MHMcRate **ratep = new MHMcRate *[dim];
     47      char *name = new char[8];
     48      name="MHMcRate";
     49      char *auxname = new char[8+7];
     50      strcpy(auxname, name);
     51      for(int i=0;i<dim;i++){
     52        sprintf(auxname+8, ";%d", i+1);
     53        ratep[i] = new MHMcRate(auxname);
     54        parlist.AddToList(ratep[i]);
     55      }
     56    }
    2257
    2358    //
     
    3166    tasklist.AddToList(&reader);
    3267
    33     Float_t BgR[10]={20907,352,0,0,0,0,0,0,0,0};
     68    Float_t BgR[10]={660,4,0,0,0,0,0,0,0,0};
    3469    cout<<dim<<endl;
    3570
Note: See TracChangeset for help on using the changeset viewer.