source: trunk/MagicSoft/Simulation/Detector/include-CORSIKA/COREvent.hxx

Last change on this file was 3046, checked in by blanch, 21 years ago
*** empty log message ***
File size: 1.6 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#include "TROOT.h"
16
17#include "COREventHeader.hxx"
18
19class COREvent {
20
21public:
22 Int_t NCphotons;
23 Float_t TimeBegin;
24 Float_t TimeEnd;
25 COREventHeader EvtHdr;
26 UInt_t Flag;
27
28public:
29 COREvent(void) {} // default constructor
30 virtual ~COREvent(void) {} // default destructor
31
32 // set number of Cphotons for this event
33 inline void SetNCphotons( Int_t n ) { NCphotons = n; }
34
35 // set flag with a number
36 inline void SetFlag( UInt_t f ) { Flag = f; }
37
38 // toggle flag bit number b
39 inline void ToggleFlagBit( UInt_t b ) { }
40
41 // get number of Cherenkov photons
42 inline Int_t GetNCphotons() const { return NCphotons; }
43
44 // get EventHeader pointer
45 inline COREventHeader *GetHeader() { return &EvtHdr; }
46
47 // Get flag value
48 inline UInt_t GetFlag() const { return Flag; }
49
50 // get status of flag bit number b
51 inline UInt_t GetFlagBit( UInt_t b ) { return ( Flag && 1 << (b-1) ); }
52
53 // set times for this event (first and last Cherenkov photons)
54 void SetTimes( Float_t t1, Float_t t2 ) {
55 TimeBegin = t1;
56 TimeEnd = t2;
57 }
58
59 // get times of this event (first and last Cherenkov photons)
60 Float_t GetTimes(Float_t *t1, Float_t *t2) const {
61 *t1 = TimeBegin;
62 *t2 = TimeEnd;
63 return (TimeEnd - TimeBegin);
64 }
65
66};
67
68#endif // not defined COREvent_Class
69
Note: See TracBrowser for help on using the repository browser.