source: trunk/Mars/macros/readIPR.C@ 18910

Last change on this file since 18910 was 8384, checked in by tbretz, 18 years ago
*** empty log message ***
File size: 1.9 KB
Line 
1///////////////////////////////////////////////////////////////////////////
2//
3// readIPR.C
4//
5// This macro shows how to read the Individual Pixel Rates from
6// a CC report file.
7//
8// Input:
9// - root file obtained merpping a .rep CC file
10// container: MTriggerIPR
11//
12// Output:
13// - a camera display showing the IPRs
14// - Some histos for checking purposes
15//
16// Note:
17// a similar macro can be used to read the following trigger containers:
18// - MTriggerIPR (Individual Pixel Rates)
19// - MTriggerCell (Rate of trigger cells)
20// - MTriggerBit (Output Bits from prescaler (before/after presc.)
21// - MTriggerPrescFact (Prescaling factors for each bit)
22// - MTriggerLiveTime (Values of counters for dead/livetime)
23//
24// Author(s): Antonio Stamerra. 09/04 <antonio.stamerra@pi.infn.it>
25//
26////////////////////////////////////////////////////////////////////////////
27void readIPR(TString fname)
28{
29 //
30 // Create a empty Parameter List and an empty Task List
31 // The tasklist is identified in the eventloop by its name
32 //
33 MParList plist;
34
35 MTaskList tlist;
36 plist.AddToList(&tlist);
37
38 //
39 // Now setup the tasks and tasklist:
40 // ---------------------------------
41 //
42
43 // Create the magic geometry
44 MGeomCamMagic geom;
45 plist.AddToList(&geom);
46
47 // First Task: Read ROOT file with Trigger-REPORT data
48 MReadTree read("Trigger", fname);
49 read.DisableAutoScheme();
50
51 tlist.AddToList(&read);
52
53 MHCamEvent evt0(0, "IPR", "Individual Pixel Rate;;IPR [Hz]");
54 // evt0b.SetThreshold(0);
55
56 MFillH fill0(&evt0, "MTriggerIPR", "FillIPR");
57
58 tlist.AddToList(&fill0);
59
60 MStatusDisplay *d = new MStatusDisplay;
61
62 //
63 // Create and setup the eventloop
64 //
65 MEvtLoop evtloop;
66 evtloop.SetParList(&plist);
67 evtloop.SetDisplay(d);
68
69 if (!evtloop.Eventloop())
70 return;
71
72 tlist.PrintStatistics();
73}
74
Note: See TracBrowser for help on using the repository browser.