Changeset 892 for trunk/MagicSoft
- Timestamp:
- 07/20/01 16:51:53 (23 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r891 r892 15 15 - Added FindCreateObjList 16 16 - Added CreateObjList 17 18 * mhist/MHMcEnergies.[h,cc]: 19 - deleted 20 21 * mhist/MHMcEnergy.[h,cc]: 22 - rewrote constructor in a way that MHMcEnergies isn't needed anymore 23 - added a SetName function which replaces the old constructor somehow 24 25 * macros/getThreshold.C: 26 - make use of some new features 17 27 18 28 -
trunk/MagicSoft/Mars/macros/getThreshold.C
r861 r892 1 void getThreshold( char* filename = "/hdb1/users/jlopez/temp_loop.root")1 void getThreshold(char* filename="data/CrabNebula_dnsb_09_loop.root") 2 2 { 3 3 // … … 18 18 // taking only the trigger information from MMcTrig 19 19 // 20 const UInt_t numtriggerconditions = 5;20 const UInt_t numtriggerconditions = 4; 21 21 22 MHMcEnergies *hists = new MHMcEnergies(numtriggerconditions); 23 hists->AddEntriesToList(&parlist); 22 // 23 // Create numtriggerconditions histograms of type MHMcEnergy 24 // and store the histograms in an TObjArray 25 // 26 TObjArray *hists = new TObjArray(MParList::CreateObjList("MHMcEnergy", numtriggerconditions)); 27 28 // 29 // Check if the list really contains the right number of histograms 30 // 31 if (hists->GetEntriesFast() != numtriggerconditions) 32 return; 33 34 // 35 // Add the histograms to the paramater list. 36 // 37 parlist.AddToList(hists); 24 38 25 39 // … … 32 46 // like one dimension MMcThresholdCalc 33 47 // 34 MReadTree read("Events ", filename);48 MReadTree read("Events;7", filename); 35 49 MMcThresholdCalc calc(numtriggerconditions); 36 50 … … 42 56 43 57 // 44 // Begin the loop 58 // Begin the loop (if the loop wasn't succesfull 59 // don't try to draw the results 45 60 // 46 evtloop.Eventloop(); 61 if (!evtloop.Eventloop()) 62 return; 47 63 48 64 // 49 65 // Now you can display the results 50 66 // 51 for (UInt_t i=0; i<numtriggerconditions; i++) { 52 ((*hists)[i]).Draw(); 53 if (getchar()=='q') break; 54 } 67 for (UInt_t i=0; i<numtriggerconditions; i++) 68 ((*hists)[i])->Draw(); 55 69 }
Note:
See TracChangeset
for help on using the changeset viewer.