- Timestamp:
- 07/31/01 15:58:23 (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/macros/getRate.C
r872 r903 18 18 // access them- 19 19 // 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. 20 29 21 30 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 } 22 57 23 58 // … … 31 66 tasklist.AddToList(&reader); 32 67 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}; 34 69 cout<<dim<<endl; 35 70
Note:
See TracChangeset
for help on using the changeset viewer.