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

Last change on this file since 476 was 436, checked in by harald, 24 years ago
Added a lot of changes done by oscar.
File size: 1.5 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#include "../Simulation/Detector/include-MTrigger/MTriggerDefine.h"
14
15class MMcTrig : public TObject {
16 private:
17
18 Short_t nFirstLevel ; // Number of First Level Trigger in this Event
19 Short_t nSecondLevel ; // Number of Second Level Trigger in this Event
20
21 Float_t timeFirst[((Int_t)(TOTAL_TRIGGER_TIME/LEVEL1_DEAD_TIME))+1];
22 // Time when it triggers
23 Int_t pixelFirst[((Int_t)(TOTAL_TRIGGER_TIME/LEVEL1_DEAD_TIME))+1];
24 // Pixel which triggers
25 Short_t FirstToSecond[((Int_t)(TOTAL_TRIGGER_TIME/LEVEL2_DEAD_TIME))+1];
26
27 public:
28 MMcTrig() ;
29
30 ~MMcTrig();
31
32 void Clear();
33
34 void Print(Option_t *);
35
36 void SetFirstLevel ( Short_t nTr ) {
37 nFirstLevel = nTr ;
38 }
39 void SetSecondLevel ( Short_t nTr ) {
40 nSecondLevel = nTr ;
41 }
42
43 void SetTime( Float_t t, Int_t i){
44 if (i>TOTAL_TRIGGER_TIME/LEVEL1_DEAD_TIME+1 || i<1){
45 cout<<"nFirstLevel out of range. Time will be -99"<<endl;
46 }
47 else{
48 timeFirst[i-1]=t;
49 }
50 }
51
52 void SetPixel( Int_t iPix, Int_t i){
53 if (i>TOTAL_TRIGGER_TIME/LEVEL1_DEAD_TIME+1 || i<1){
54 cout<<"nFirstLevel out of range. Pixel will be -1"<<endl;
55 }
56 else{
57 pixelFirst[i-1]=iPix;
58 }
59 }
60
61 Int_t GetFirstLevel() {
62 return ( nFirstLevel );
63 }
64
65 ClassDef(MMcTrig, 1) //Stores Montecarlo Information
66
67};
68
69#endif
Note: See TracBrowser for help on using the repository browser.