source: trunk/MagicSoft/include-Classes/MMcFormat/MMcTrig.cxx@ 575

Last change on this file since 575 was 483, checked in by magicsol, 24 years ago
It is the old file MagicSoft/include-classes/MMcTrig.cxx, which has been moved to this directory.
File size: 1.6 KB
Line 
1#include <iostream.h>
2#include "MMcTrig.hxx"
3
4
5//==========
6// MMcTrig
7//
8// This class handles and contains the MonteCarlo information
9// with which the events have been generated
10// This information exists for each event.
11
12
13
14ClassImp(MMcTrig)
15
16
17
18MMcTrig::MMcTrig() {
19 //
20 // default constructor
21 // set all values to zero
22
23 Int_t i;
24
25 nFirstLevel = 0 ;
26
27 for(i=0;i<TOTAL_TRIGGER_TIME/LEVEL1_DEAD_TIME+1;i++){
28 timeFirst[i] = -99.9;
29 pixelFirst[i] = -9;
30 }
31
32 nSecondLevel = 0 ;
33 for(i=0;i<TOTAL_TRIGGER_TIME/LEVEL2_DEAD_TIME+1;i++){
34 FirstToSecond[i]=0;
35 }
36}
37
38MMcTrig::~MMcTrig() {
39 //
40 // default destructor
41 //
42}
43
44void MMcTrig::Clear() {
45 //
46 //
47 // reset all values to zero
48 Int_t i;
49
50 nFirstLevel = 0 ;
51 for(i=0;i<TOTAL_TRIGGER_TIME/LEVEL1_DEAD_TIME+1;i++){
52 timeFirst[i] = -99.9;
53 pixelFirst[i] = -9;
54 }
55
56 nSecondLevel = 0 ;
57 for(i=0;i<TOTAL_TRIGGER_TIME/LEVEL2_DEAD_TIME+1;i++){
58 FirstToSecond[i]=0;
59 }
60
61 // cout << "MMcTrig::Clear() " << endl ;
62}
63
64void MMcTrig::Print(Option_t *Option) {
65 //
66 // print out the data member on screen
67 //
68 Int_t i;
69
70 cout <<endl << "Monte Carlo Trigger output:" <<endl;
71 cout << " First Level Trigger in this Event : "<<nFirstLevel<<endl;
72 cout << " Times of first Level Trigger in this Event : ";
73 for (i=0;i<nFirstLevel;i++){
74 cout<< timeFirst[i]<<"-";
75 }
76 cout<<endl;
77 cout << " Pixels of first Level Trigger in this Event : ";
78 for (i=0;i<nFirstLevel;i++){
79 cout<<pixelFirst[i]<<"-";
80 }
81 cout<<endl;
82 cout << " Second Level Trigger in this Event : " << nSecondLevel << endl ;
83 cout << endl ;
84}
Note: See TracBrowser for help on using the repository browser.