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

Last change on this file since 575 was 574, checked in by tbretz, 24 years ago
see Mars/Changelog
File size: 1.7 KB
Line 
1#ifndef __MMcTrig__
2#define __MMcTrig__
3
4#include <stdlib.h>
5#include <stdio.h>
6#include <string.h>
7#include <unistd.h>
8#include <fcntl.h>
9
10#include <iostream.h>
11#include "TObject.h"
12
13#ifndef __MARS__
14#include "../../Simulation/Detector/include-MTrigger/MTriggerDefine.h"
15#else
16//
17// From the include file above
18//
19#define TOTAL_TRIGGER_TIME 160
20#define LEVEL1_DEAD_TIME 50
21#define LEVEL2_DEAD_TIME 300
22#endif
23
24class MMcTrig : public TObject {
25 private:
26
27 Short_t nFirstLevel ; // Number of First Level Trigger in this Event
28 Short_t nSecondLevel ; // Number of Second Level Trigger in this Event
29
30 Float_t timeFirst[((Int_t)(TOTAL_TRIGGER_TIME/LEVEL1_DEAD_TIME))+1];
31 // Time when it triggers
32 Int_t pixelFirst[((Int_t)(TOTAL_TRIGGER_TIME/LEVEL1_DEAD_TIME))+1];
33 // Pixel which triggers
34 Short_t FirstToSecond[((Int_t)(TOTAL_TRIGGER_TIME/LEVEL2_DEAD_TIME))+1];
35
36 public:
37 MMcTrig() ;
38
39 ~MMcTrig();
40
41 void Clear();
42
43 void Print(Option_t *);
44
45 void SetFirstLevel ( Short_t nTr ) {
46 nFirstLevel = nTr ;
47 }
48 void SetSecondLevel ( Short_t nTr ) {
49 nSecondLevel = nTr ;
50 }
51
52 void SetTime( Float_t t, Int_t i){
53 if (i>TOTAL_TRIGGER_TIME/LEVEL1_DEAD_TIME+1 || i<1){
54 cout<<"nFirstLevel out of range. Time will be -99"<<endl;
55 }
56 else{
57 timeFirst[i-1]=t;
58 }
59 }
60
61 void SetPixel( Int_t iPix, Int_t i){
62 if (i>TOTAL_TRIGGER_TIME/LEVEL1_DEAD_TIME+1 || i<1){
63 cout<<"nFirstLevel out of range. Pixel will be -1"<<endl;
64 }
65 else{
66 pixelFirst[i-1]=iPix;
67 }
68 }
69
70 Int_t GetFirstLevel() {
71 return ( nFirstLevel );
72 }
73
74 ClassDef(MMcTrig, 1) //Stores Montecarlo Information
75
76};
77
78#endif
Note: See TracBrowser for help on using the repository browser.