Back to index

See source file

CDetector.h

 
//----------------------------------------------------------------------------- 
//  $Header: /asis/offline/ceres/cool/project/RCS/CDetector.h,v 2.7 1997/07/16 15:10:38 messer Exp $ 
// 
//  COOL Program Library   
//  Copyright (C) CERES collaboration, 1996 
// 
//  Declarations for abstract CDetector class. 
// 
//----------------------------------------------------------------------------- 
#ifndef CDETECTOR_H  
#define CDETECTOR_H 
 
#include "cool.h" 
#include "CDetectorSetup.h" 
#include "CErrorCollection.h" 
 
class CEventServer; 
class CTrack; 
class CElectronTrack; 
template <class T> class CSortedList; 
 
class CDetector { 
public: 
   enum CDetectorId { SiDC1, SiDC2, Rich1, Rich2, PadChamber }; 
    
public: 
   CDetector(); 
   virtual		~CDetector(); 
   virtual CBoolean	unpack(CEventServer&) = 0; 
    
public: 
   virtual void		listSetup(ostream& = cout) const; 
    
public: 
   virtual const	CString& getName() const { return name; }                         
   virtual CDetectorId	getDetectorId() const { return id; } 
    
   const CErrorCollection& getErrorCollection() const { return errorCollection; } 
    
   // 
   // With this nasty looking trick we ensure a correct template 
   // instantiation for the interactive stuff. 
   // 
   void			attachTrackList(CSortedList<CTrack>*); 
   void			attachElectronTrackList(CSortedList<CElectronTrack>*);    
   void			detachTrackList() { trackList = 0; } 
    
protected: 
   CDetectorId		id;                  // id of detector 
   CString		name;                // name of detector 
   int                  lastRunNumber;       // to decide when to unpack pedestals 
 
   CDetectorSetup      *setup;               // contains data valid for all kinds of detectors 
   CSortedList<CTrack> *trackList;           // used only for drawing of tracks	 
   CErrorCollection    errorCollection;      // to monitor all kinds of errors 
    
}; 
 
#endif /* CDETECTOR_H */ 

Back to index

See source file