/** \file Declaration of class EyeHeader \author Stefano Argirņ \version $Id$ \date 23 Nov 2003 */ #ifndef _fevt_EyeHeader_h_ #define _fevt_EyeHeader_h_ #include #include static const char CVSId_fevt_EyeHeader[] = "$Id$"; namespace fevt { class Eye; /** \class EyeHeader EyeHeader.h "fevt/EyeHeader.h" \brief Header of Eye-level event \author Stefano Argirņ \date 23 Nov 2003 \ingroup fevt */ class EyeHeader { public: /** Enumeration type for the various event types. The event type is * determined by the trigger type which gives that event. */ enum EventType { /** Event type is not known or not set. */ eUnknown = 0, /** A physics event, the real purpose of the DAQ. */ ePhysics, /** Any type of artificial (calibration) event. */ eCalibration, /** A simulated event, usually generated by the DAQ simulation * (no physics). */ eSimulated, /** Event happened in the time window (offset) assigned to the * laser shooting. */ eLaserOffset, /** Event happened in the time window (offset) assigned to the * flasher shooting. */ eFlasherOffset, /** Event happened in the time window (offset) assigned to any * calibration light sources activity. */ eCalibrationOffset, /** Last, but invalid event type. */ eInvalidType }; /** Event classes which are used as attributed for analysed events. * * If an event contains for example muon pattern and shower data pattern * it will be finally classified as a shower as the muon data should be * removed from the event. */ enum EventClass { /** No classification of the event was done so far. */ eUnClassified = 0, /** Event is a calibration or simulation event. */ eNoPhysicsEvent, /** Event has too many pixels to be something reasonable. */ eLargeEvent, /** Event could be everything but the algorithmus is not able to deal * with the found signature ... */ eUnhandledSignature, /* No pixels matching pattern. */ eEmpty, /** Event has muon signature. It contains only 4 pixels * with the same T1. */ eIsMuon, /** Event has muon signature. It contains >= 4 pixels. * The pixels FADC data * are analized to perform this classification. */ eLongMuon, /** Event has close shower signature, i.e. shower close * to the telescope with duration smaller than 1 micros. * It contains >= 4 pixels. The pixels FADC data are * analized to perform this classification. T3 is not sent * to CDAS. */ eCloseShower, /** Event has noise signature. */ eNoise, /** Event has muon and noise signature. */ eMuonAndNoise, /** This event is excluded because of a certain time signature. * This could be for example be ralated to a laser shot. */ eVetoedEvent, /** Event has shower candidate signature, * with duration greater than 1 microsec. */ eShowerCandidate, /** Event has horizontal shower candidate signature. * No extrapolation to ground can be performed. */ eHorizontalShower, /** Event has shower signature, with duration greater * than 1 microsec. T3 sent to CDAS. */ eIsShower, // >>> more classes might come in here ... /** Event is rejected (by TLT) but kept in the data stream * for trigger performance/efficiency studies. */ eRejected = 98, /** Last, but invalid event class. */ eInvalidClass }; /// Time of the Eye Event as tagged by FD-DAS (== eye trigger time plus pixel trace length) utl::TimeStamp GetTimeStamp() const { return fTimeStamp; } /// Eye level run number unsigned int GetRunNumber() const { return fRunNo; } /// Event number unsigned int GetEventNumber() const { return fEventNo; } /// Event Type (see FD-DAS EyeEventHeader.hh) EventType GetEventType() const { return fEventType; } /// Event Class (see FD-DAS EyeEventHeader.hh) EventClass GetEventClass() const { return fEventClass; } /// bad online MHz time correction available? bool HasBadTimeCorrection() const { return fHasBadTimeCorrection; } /// MHz time correction done offline? bool IsOfflineTimeCorrected() const { return fIsOfflineTimeCorrected; } void SetTimeStamp(const utl::TimeStamp ts) { fTimeStamp = ts; } void SetRunNumber(const unsigned int runno) { fRunNo = runno; } void SetEventNumber(const unsigned int evno) { fEventNo = evno; } void SetEventType(const EventType et) { fEventType = et; } void SetEventClass(const EventClass ec) { fEventClass = ec; } void SetBadTimeCorrection(const bool isBad) { fHasBadTimeCorrection = isBad; } void SetOfflineTimeCorrected(const bool isSet) { fIsOfflineTimeCorrected = isSet; } private: EyeHeader() : fEventNo(0), fRunNo(0), fEventType(eInvalidType), fEventClass(eInvalidClass), fHasBadTimeCorrection(false) , fIsOfflineTimeCorrected(false) { } ~EyeHeader() { } unsigned int fEventNo; unsigned int fRunNo; EventType fEventType; EventClass fEventClass; utl::TimeStamp fTimeStamp; bool fHasBadTimeCorrection; bool fIsOfflineTimeCorrected; friend class fevt::Eye; friend class utl::ShadowPtr; }; } #endif // Configure (x)emacs for this file ... // Local Variables: // mode: c++ // compile-command: "make -C .. -k" // End: