Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

ReconHeader.h

Go to the documentation of this file.
00001 #ifndef RECONHEADER_H
00002 #define RECONHEADER_H
00003 
00004 #include "TObject.h"
00005 
00007 
00011 class ReconHeader : public TObject
00012 {
00013 private:
00015 
00031     UInt_t m_flags;
00032 
00033     enum {
00035         calOffset = 8,
00037         tkrOffset = 0
00038     };
00039 
00041     UInt_t m_eventId;
00042 
00044     UInt_t m_runId;
00045 
00046 public:
00048     typedef enum {
00049         TKRRECON = UInt_t(1 << tkrOffset),     // 1 == Tkr Recon data is available
00050         NOTRACKS = UInt_t(1 << (tkrOffset+1)),  // 1 == No tracks were reconstructed 
00051         GAMMA = UInt_t(1 << (tkrOffset+2)),      // bit is on (1) when there was a reconstructed gamma
00052         MANYTRACKS = UInt_t(1 << (tkrOffset+3))  // bit is on (1) when there were >1 tracks found
00053     } tkrFlags;
00054 
00056     typedef enum {
00058         GOOD = UInt_t(1 << calOffset),  
00060         FAIR = UInt_t(1 << (calOffset+1)),  
00062         POOR = UInt_t(1 << (calOffset+2)), 
00064         NOENERGY = UInt_t(1 << (calOffset+3))
00065     } calFlags;
00066 
00067     enum {
00069         tkrTestWord = UInt_t(TKRRECON | NOTRACKS | GAMMA | MANYTRACKS), 
00071         calTestWord = UInt_t(GOOD | FAIR | POOR | NOENERGY) 
00072     };
00073 
00075     ReconHeader();
00076 
00078     ~ReconHeader() {Clear();};
00079     
00081     int Clear();
00082 
00084     UInt_t getFlags() { return m_flags; };
00085 
00087     UInt_t getTkrFlags() { return (m_flags & tkrTestWord); };
00088 
00089     // Returns the integer value of the CAL flags
00090     UInt_t getCalFlags(){ return (m_flags & calTestWord); };
00091 
00093 
00094     Bool_t HasRecon() { return (((m_flags & TKRRECON) || !(m_flags & NOENERGY)) ? kTRUE : kFALSE); };
00095 
00097     Bool_t HasTkrRecon() { return ((m_flags & TKRRECON) ? kTRUE : kFALSE); };
00098 
00100     Bool_t HasGamma() { return ((m_flags & GAMMA) ? kTRUE : kFALSE); };
00101 
00103     Bool_t HasManyTracks() { return ((m_flags & MANYTRACKS) ? kTRUE : kFALSE); };
00104 
00106     Bool_t HasCalRecon() { return (!(m_flags & NOENERGY) ? kTRUE : kFALSE);};
00107 
00109     Bool_t HasCalGood() { return ((m_flags & GOOD) ? kTRUE : kFALSE);};
00110 
00112     Bool_t HasCalFair() { return ((m_flags & FAIR) ? kTRUE : kFALSE);};
00113 
00115     Bool_t HasCalPoor() { return ((m_flags & POOR) ? kTRUE : kFALSE);};
00116 
00118     Bool_t HasCalNoEnergyRecon() { return ((m_flags & NOENERGY) ? kTRUE : kFALSE);};
00119 
00121 
00123     Bool_t setTkrFlag(UInt_t val);
00124 
00126 
00128     Bool_t setCalFlag(UInt_t val);
00129 
00131     Bool_t isValidTkrFlag(UInt_t val);
00132 
00134     Bool_t isValidCalFlag(UInt_t val);
00135 
00137     UInt_t getEventId() { return m_eventId; };
00138 
00140     void setEventId(UInt_t id) { m_eventId = id; };
00141 
00142     UInt_t getRunId() { return m_runId; };
00143 
00144     void setRunId(UInt_t id) { m_runId = id; };
00145 
00146     ClassDef(ReconHeader,2)
00147 };
00148 
00149 #endif

Generated at Wed Nov 14 20:41:50 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000