source: branches/start/MagicSoft/Simulation/Detector/include-CORSIKA/COREvent.hxx@ 10113

Last change on this file since 10113 was 294, checked in by harald, 25 years ago
This is a part of the development of Jose Carlos Gonzales. This directory contains some classes to read in the CORSIKA output of the mmcs program. This directory is needed by the reflector program. Now all is under CVS control and one has to take CVS for further developments.
File size: 1.7 KB
Line 
1/////////////////////////////////////////////////////////////////
2//
3// COREvent
4//
5// Created: Tue Apr 28 16:14:05 1998
6// Author: Jose Carlos Gonzales
7// Purpose: Base class for Event-classes
8// Notes:
9//
10/////////////////////////////////////////////////////////////////
11
12#ifndef COREvent_Class
13#define COREvent_Class
14
15#ifdef __ROOT__
16#include "TROOT.h"
17#include "TObject.h"
18#else // not __ROOT__
19#include "Rtypes.h"
20#endif
21
22#include "COREventHeader.hxx"
23
24class COREvent {
25
26public:
27 Int_t NCphotons;
28 Float_t TimeBegin;
29 Float_t TimeEnd;
30 COREventHeader EvtHdr;
31 UInt_t Flag;
32
33public:
34 COREvent(void) {} // default constructor
35 virtual ~COREvent(void) {} // default destructor
36
37 // set number of Cphotons for this event
38 inline void SetNCphotons( Int_t n ) { NCphotons = n; }
39
40 // set flag with a number
41 inline void SetFlag( UInt_t f ) { Flag = f; }
42
43 // toggle flag bit number b
44 inline void ToggleFlagBit( UInt_t b ) { }
45
46 // get number of Cherenkov photons
47 inline Int_t GetNCphotons() const { return NCphotons; }
48
49 // get EventHeader pointer
50 inline COREventHeader *GetHeader() { return &EvtHdr; }
51
52 // Get flag value
53 inline UInt_t GetFlag() const { return Flag; }
54
55 // get status of flag bit number b
56 inline UInt_t GetFlagBit( UInt_t b ) { return ( Flag && 1 << (b-1) ); }
57
58 // set times for this event (first and last Cherenkov photons)
59 void SetTimes( Float_t t1, Float_t t2 ) {
60 TimeBegin = t1;
61 TimeEnd = t2;
62 }
63
64 // get times of this event (first and last Cherenkov photons)
65 Float_t GetTimes(Float_t *t1, Float_t *t2) const {
66 *t1 = TimeBegin;
67 *t2 = TimeEnd;
68 return (TimeEnd - TimeBegin);
69 }
70
71};
72
73#endif // not defined COREvent_Class
74
Note: See TracBrowser for help on using the repository browser.