Add possibility to rotate event
[u/mrichter/AliRoot.git] / RALICE / AliDevice.h
7a086578 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 */
6// $Id$
965bd237 8#include "TPolyMarker3D.h"
7a086578 10#include "AliSignal.h"
12class AliDevice : public AliSignal
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
9e6577df 19 void SetStatus(Int_t word); // Set the status word (user definable)
20 Int_t GetStatus() const; // Provide the status word
7a086578 21 void SetHitCopy(Int_t j); // (De)activate creation of private copies of hits
22 Int_t GetHitCopy() const; // Provide HitCopy flag value
23 void AddHit(AliSignal& s); // Register an AliSignal object as a hit to this module
b055c99d 24 void AddHit(AliSignal* s) { if (s) AddHit(*s); }
7a086578 25 void RemoveHit(AliSignal& s); // Remove AliSignal object as hit from this module
b055c99d 26 void RemoveHit(AliSignal* s) { if (s) RemoveHit(*s); }
7a086578 27 void RemoveHits(); // Remove all AliSignals as hits from this module
28 Int_t GetNhits() const; // Provide number of registered hits
29 AliSignal* GetHit(Int_t j) const; // Access to the AliSignal registered as hit number j
69884331 30 AliSignal* GetHit(TString name) const; // Provide the hit with the specified name
4f368c8c 31 AliSignal* GetIdHit(Int_t id) const; // Provide the hit with unique identifier "id"
7a086578 32 TObjArray* GetHits(); // Provide the references to all the registered hits
33 virtual void Reset(Int_t mode=0); // Reset registered hits and AliSignal attributes
34 void ShowHit(Int_t j=0) const; // Show data of the j-th hit (j=0 means all hits)
1f241680 35 virtual void Data(TString f="car",TString u="rad") const; // Print device/signal info for frame f and ang units u
27e6d856 36 void GetExtremes(Float_t& vmin,Float_t& vmax,Int_t idx=1,TObjArray* hits=0,Int_t mode=1) const;// min and max signal
37 void GetExtremes(Float_t& vmin,Float_t& vmax,TString name,TObjArray* hits=0,Int_t mode=1) const;// min and max signal
38 TObjArray* SortHits(TString name,Int_t mode=-1,TObjArray* hits=0,Int_t mcal=1);// Sort hits by named signal value
39 TObjArray* SortHits(Int_t idx=1,Int_t mode=-1,TObjArray* hits=0,Int_t mcal=1); // Sort hits by indexed signal value
40 void DisplayHits(TString name,Float_t scale=-1,TObjArray* hits=0,Int_t dp=0,Int_t mode=1,Int_t mcol=4);// Hit disp.
41 void DisplayHits(Int_t idx=1,Float_t scale=-1,TObjArray* hits=0,Int_t dp=0,Int_t mode=1,Int_t mcol=4); // Hit disp.
7a086578 42
43 protected:
9e6577df 44 Int_t fStatus; // User definable status word
7b825f44 45 Int_t fHitCopy; // Flag to denote making private copies of added hits
46 TObjArray* fHits; // Array to hold the registered hits
47 TObjArray* fOrdered; //! Temp. array to hold the ordered hits
965bd237 48 TObjArray* fMarkers; //! Temp. array to hold the 3D markers for the hit display
7a086578 49
69884331 50 ClassDef(AliDevice,9) // Signal (Hit) handling of a generic device.
7a086578 51};