]> git.uio.no Git - u/mrichter/AliRoot.git/blob - RALICE/AliDevice.h
26-nov-2004 NvE Printout of UniqueID added in AliSignal::Data() and AliEvent::ShowDev...
[u/mrichter/AliRoot.git] / RALICE / AliDevice.h
1 #ifndef ALIDEVICE_H
2 #define ALIDEVICE_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 // $Id$
7
8 #include "TPolyMarker3D.h"
9
10 #include "AliSignal.h"
11
12 class AliDevice : public AliSignal
13 {
14  public:
15   AliDevice();                                       // Default constructor
16   virtual ~AliDevice();                              // Default destructor
17   AliDevice(const AliDevice& dev);                   // Copy constructor
18   virtual TObject* Clone(const char* name="") const; // Make a deep copy and provide its pointer
19   void SetHitCopy(Int_t j);                          // (De)activate creation of private copies of hits
20   Int_t GetHitCopy() const;                          // Provide HitCopy flag value      
21   void AddHit(AliSignal& s);                         // Register an AliSignal object as a hit to this module
22   void AddHit(AliSignal* s) { if (s) AddHit(*s); }
23   void RemoveHit(AliSignal& s);                      // Remove AliSignal object as hit from this module
24   void RemoveHit(AliSignal* s) { if (s) RemoveHit(*s); }
25   void RemoveHits();                                 // Remove all AliSignals as hits from this module
26   Int_t GetNhits() const;                            // Provide number of registered hits
27   AliSignal* GetHit(Int_t j) const;                  // Access to the AliSignal registered as hit number j
28   AliSignal* GetIdHit(Int_t id) const;               // Provide the hit with unique identifier "id"
29   TObjArray* GetHits();                              // Provide the references to all the registered hits
30   virtual void Reset(Int_t mode=0);                  // Reset registered hits and AliSignal attributes
31   void ShowHit(Int_t j=0) const;                     // Show data of the j-th hit (j=0 means all hits)
32   virtual void Data(TString f="car") const;          // Print device and all signal info for coord. frame f
33   void GetExtremes(Float_t& vmin,Float_t& vmax,Int_t idx=1,TObjArray* hits=0) const; // Get min. and max. signal value
34   void GetExtremes(Float_t& vmin,Float_t& vmax,TString name,TObjArray* hits=0) const;// Get min. and max. signal value
35   TObjArray* SortHits(TString name,Int_t mode=-1,TObjArray* hits=0); // Sort hits by named signal value
36   TObjArray* SortHits(Int_t idx=1,Int_t mode=-1,TObjArray* hits=0);  // Sort hits by indexed signal value
37   void DisplayHits(TString name,Float_t scale=-1,TObjArray* hits=0,Int_t dp=0,Int_t mstyle=8,Int_t mcol=4);// Hit disp.
38   void DisplayHits(Int_t idx=1,Float_t scale=-1,TObjArray* hits=0,Int_t dp=0,Int_t mstyle=8,Int_t mcol=4); // Hit disp.
39
40  protected:
41   Int_t fHitCopy;      // Flag to denote making private copies of added hits
42   TObjArray* fHits;    // Array to hold the registered hits
43   TObjArray* fOrdered; //! Temp. array to hold the ordered hits
44   TObjArray* fMarkers; //! Temp. array to hold the 3D markers for the hit display
45
46  ClassDef(AliDevice,5) // Signal (Hit) handling of a generic device.
47 };
48 #endif