]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - VZERO/AliVZEROTriggerSimulator.h
end-of-line normalization
[u/mrichter/AliRoot.git] / VZERO / AliVZEROTriggerSimulator.h
index 007c1caf0d69158192648393dfc7695d3ca14080..37ce63fc12bb045aa2e264a810ec349a0c93eb15 100644 (file)
-#ifndef ALIVZEROTRIGGERSIMULATOR_H\r
-#define ALIVZEROTRIGGERSIMULATOR_H\r
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights\r
- * reserved. \r
- *\r
- * See cxx source for full Copyright notice                               \r
- */\r
-// \r
-// Class AliVZEROTriggerSimulator\r
-// ------------------------------\r
-//  Simulate the VZERO Trigger response\r
-// Use FEE parameters stored in Database\r
-// Can work on real data or in simulation\r
-//\r
-\r
-#include <TObject.h>\r
-\r
-#include "AliVZEROTriggerData.h"\r
-\r
-class AliVZEROLogicalSignal;\r
-class TTree;\r
-class TClonesArray;\r
-\r
-class AliVZEROTriggerSimulator : public TObject {\r
-public:\r
-       AliVZEROTriggerSimulator();\r
-       AliVZEROTriggerSimulator(TTree * digitsTree, TClonesArray* digits);\r
-       ~AliVZEROTriggerSimulator();\r
-       \r
-       AliVZEROTriggerData * GetTriggerData() const {return fTriggerData;};\r
-       \r
-       Bool_t GetBBAandBBC() const             {return (fTriggerWord & 0x1);};\r
-       Bool_t GetBBAorBBC() const              {return (fTriggerWord>>1 & 0x1);};\r
-       Bool_t GetBGAandBBC() const             {return (fTriggerWord>>2 & 0x1);};\r
-       Bool_t GetBGA() const                   {return (fTriggerWord>>3 & 0x1);};\r
-       Bool_t GetBGCandBBA() const             {return (fTriggerWord>>4 & 0x1);};\r
-       Bool_t GetBGC() const                   {return (fTriggerWord>>5 & 0x1);};\r
-       Bool_t GetCTA1andCTC1() const   {return (fTriggerWord>>6 & 0x1);};\r
-       Bool_t GetCTA1orCTC1() const    {return (fTriggerWord>>7 & 0x1);};\r
-       Bool_t GetCTA2andCTC2() const   {return (fTriggerWord>>8 & 0x1);};\r
-       Bool_t GetCTA2orCTC2() const    {return (fTriggerWord>>9 & 0x1);};\r
-       Bool_t GetMTAandMTC() const             {return (fTriggerWord>>10 & 0x1);};\r
-       Bool_t GetMTAorMTC() const              {return (fTriggerWord>>11 & 0x1);};\r
-       Bool_t GetBBA() const                   {return (fTriggerWord>>12 & 0x1);};\r
-       Bool_t GetBBC() const                   {return (fTriggerWord>>13 & 0x1);};\r
-       Bool_t GetBGAorBGC() const              {return (fTriggerWord>>14 & 0x1);};\r
-       Bool_t GetBeamGas() const               {return (fTriggerWord>>15 & 0x1);};\r
-       \r
-       void SetBBAandBBC()             { (fTriggerWord += 0x1);};\r
-       void SetBBAorBBC()              { (fTriggerWord += 0x1<<1);};\r
-       void SetBGAandBBC()             { (fTriggerWord += 0x1<<2);};\r
-       void SetBGA()                   { (fTriggerWord += 0x1<<3);};\r
-       void SetBGCandBBA()             { (fTriggerWord += 0x1<<4);};\r
-       void SetBGC()                   { (fTriggerWord += 0x1<<5);};\r
-       void SetCTA1andCTC1()   { (fTriggerWord += 0x1<<6);};\r
-       void SetCTA1orCTC1()    { (fTriggerWord += 0x1<<7);};\r
-       void SetCTA2andCTC2()   { (fTriggerWord += 0x1<<8);};\r
-       void SetCTA2orCTC2()    { (fTriggerWord += 0x1<<9);};\r
-       void SetMTAandMTC()             { (fTriggerWord += 0x1<<10);};\r
-       void SetMTAorMTC()              { (fTriggerWord += 0x1<<11);};  \r
-       void SetBBA()                   { (fTriggerWord += 0x1<<12);};\r
-       void SetBBC()                   { (fTriggerWord += 0x1<<13);};\r
-       void SetBGAorBGC()              { (fTriggerWord += 0x1<<14);};\r
-       void SetBeamGas()               { (fTriggerWord += 0x1<<15);};\r
-       \r
-       void Run();\r
-       \r
-private:\r
-       // Private methods\r
-       AliVZEROTriggerSimulator(const AliVZEROTriggerSimulator &/*triggerSim*/);\r
-       AliVZEROTriggerSimulator& operator= (const AliVZEROTriggerSimulator & /*triggerSim*/);\r
-       AliVZEROTriggerData * LoadTriggerData() const ;\r
-       void                  LoadClockOffset();\r
-       void GenerateBBWindows();\r
-       void GenerateBGWindows();\r
-       \r
-       // Members\r
-       AliVZEROLogicalSignal * fBBGate[AliVZEROTriggerData::kNCIUBoards];  // BB Observation window\r
-       AliVZEROLogicalSignal * fBBLatch[AliVZEROTriggerData::kNCIUBoards]; // BB Latch window\r
-       AliVZEROLogicalSignal * fBBReset[AliVZEROTriggerData::kNCIUBoards]; // BB Reset Window\r
-       \r
-       AliVZEROLogicalSignal * fBGGate[AliVZEROTriggerData::kNCIUBoards];  // BG Observation window\r
-       AliVZEROLogicalSignal * fBGLatch[AliVZEROTriggerData::kNCIUBoards]; // BG Latch Window\r
-       AliVZEROLogicalSignal * fBGReset[AliVZEROTriggerData::kNCIUBoards]; // BG Reset Window\r
-\r
-       AliVZEROTriggerData *fTriggerData; // Object holding the trigger configuration parameters\r
-       Float_t fClockOffset[AliVZEROTriggerData::kNCIUBoards]; // TDC clock offset including roll-over, trig count and L0->L1 delay\r
-       \r
-       TTree* fDigitsTree; //Pointer to VZERO digit tree\r
-       TClonesArray* fDigits; //Pointer to VZERO digit array\r
-       \r
-       Bool_t fBBFlags[64]; // Individual BB Flags\r
-       Bool_t fBGFlags[64]; // Individual BG Flags\r
-       Float_t  fCharges[64]; // Individual Charge\r
-       \r
-       UShort_t fTriggerWord; // Word holding the 16 triggers return by the FEE\r
-               \r
-       ClassDef( AliVZEROTriggerSimulator, 3 )  \r
-\r
-};\r
-\r
-\r
-#endif // ALIVZEROTRIGGERSIMULATOR_H\r
-\r
-\r
+#ifndef ALIVZEROTRIGGERSIMULATOR_H
+#define ALIVZEROTRIGGERSIMULATOR_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights
+ * reserved. 
+ *
+ * See cxx source for full Copyright notice                               
+ */
+// 
+// Class AliVZEROTriggerSimulator
+// ------------------------------
+//  Simulate the VZERO Trigger response
+// Use FEE parameters stored in Database
+// Can work on real data or in simulation
+//
+
+#include <TObject.h>
+
+#include "AliVZEROTriggerData.h"
+
+class AliVZEROLogicalSignal;
+class TTree;
+class TClonesArray;
+
+class AliVZEROTriggerSimulator : public TObject {
+public:
+       AliVZEROTriggerSimulator();
+       AliVZEROTriggerSimulator(TTree * digitsTree, TClonesArray* digits);
+       ~AliVZEROTriggerSimulator();
+       
+       AliVZEROTriggerData * GetTriggerData() const {return fTriggerData;};
+       
+       Bool_t GetBBAandBBC() const             {return (fTriggerWord & 0x1);};
+       Bool_t GetBBAorBBC() const              {return (fTriggerWord>>1 & 0x1);};
+       Bool_t GetBGAandBBC() const             {return (fTriggerWord>>2 & 0x1);};
+       Bool_t GetBGA() const                   {return (fTriggerWord>>3 & 0x1);};
+       Bool_t GetBGCandBBA() const             {return (fTriggerWord>>4 & 0x1);};
+       Bool_t GetBGC() const                   {return (fTriggerWord>>5 & 0x1);};
+       Bool_t GetCTA1andCTC1() const   {return (fTriggerWord>>6 & 0x1);};
+       Bool_t GetCTA1orCTC1() const    {return (fTriggerWord>>7 & 0x1);};
+       Bool_t GetCTA2andCTC2() const   {return (fTriggerWord>>8 & 0x1);};
+       Bool_t GetCTA2orCTC2() const    {return (fTriggerWord>>9 & 0x1);};
+       Bool_t GetMTAandMTC() const             {return (fTriggerWord>>10 & 0x1);};
+       Bool_t GetMTAorMTC() const              {return (fTriggerWord>>11 & 0x1);};
+       Bool_t GetBBA() const                   {return (fTriggerWord>>12 & 0x1);};
+       Bool_t GetBBC() const                   {return (fTriggerWord>>13 & 0x1);};
+       Bool_t GetBGAorBGC() const              {return (fTriggerWord>>14 & 0x1);};
+       Bool_t GetBeamGas() const               {return (fTriggerWord>>15 & 0x1);};
+       
+       void SetBBAandBBC()             { (fTriggerWord += 0x1);};
+       void SetBBAorBBC()              { (fTriggerWord += 0x1<<1);};
+       void SetBGAandBBC()             { (fTriggerWord += 0x1<<2);};
+       void SetBGA()                   { (fTriggerWord += 0x1<<3);};
+       void SetBGCandBBA()             { (fTriggerWord += 0x1<<4);};
+       void SetBGC()                   { (fTriggerWord += 0x1<<5);};
+       void SetCTA1andCTC1()   { (fTriggerWord += 0x1<<6);};
+       void SetCTA1orCTC1()    { (fTriggerWord += 0x1<<7);};
+       void SetCTA2andCTC2()   { (fTriggerWord += 0x1<<8);};
+       void SetCTA2orCTC2()    { (fTriggerWord += 0x1<<9);};
+       void SetMTAandMTC()             { (fTriggerWord += 0x1<<10);};
+       void SetMTAorMTC()              { (fTriggerWord += 0x1<<11);};  
+       void SetBBA()                   { (fTriggerWord += 0x1<<12);};
+       void SetBBC()                   { (fTriggerWord += 0x1<<13);};
+       void SetBGAorBGC()              { (fTriggerWord += 0x1<<14);};
+       void SetBeamGas()               { (fTriggerWord += 0x1<<15);};
+       
+       void Run();
+       virtual void Print(Option_t* /* opt */) const;
+       
+private:
+       // Private methods
+       AliVZEROTriggerSimulator(const AliVZEROTriggerSimulator &/*triggerSim*/);
+       AliVZEROTriggerSimulator& operator= (const AliVZEROTriggerSimulator & /*triggerSim*/);
+       AliVZEROTriggerData * LoadTriggerData() const ;
+       void                  LoadClockOffset();
+       void GenerateBBWindows();
+       void GenerateBGWindows();
+       Bool_t AreGatesOpen() const;
+       
+       // Members
+       AliVZEROLogicalSignal * fBBGate[AliVZEROTriggerData::kNCIUBoards];  // BB Observation window
+       AliVZEROLogicalSignal * fBBLatch[AliVZEROTriggerData::kNCIUBoards]; // BB Latch window
+       AliVZEROLogicalSignal * fBBReset[AliVZEROTriggerData::kNCIUBoards]; // BB Reset Window
+       
+       AliVZEROLogicalSignal * fBGGate[AliVZEROTriggerData::kNCIUBoards];  // BG Observation window
+       AliVZEROLogicalSignal * fBGLatch[AliVZEROTriggerData::kNCIUBoards]; // BG Latch Window
+       AliVZEROLogicalSignal * fBGReset[AliVZEROTriggerData::kNCIUBoards]; // BG Reset Window
+
+       AliVZEROTriggerData *fTriggerData; // Object holding the trigger configuration parameters
+       Float_t fClockOffset[AliVZEROTriggerData::kNCIUBoards]; // TDC clock offset including roll-over, trig count and L0->L1 delay
+       
+       TTree* fDigitsTree; //Pointer to VZERO digit tree
+       TClonesArray* fDigits; //Pointer to VZERO digit array
+       
+       Bool_t fBBFlags[64]; // Individual BB Flags
+       Bool_t fBGFlags[64]; // Individual BG Flags
+       Float_t  fCharges[64]; // Individual Charge
+       
+       UShort_t fTriggerWord; // Word holding the 16 triggers return by the FEE
+               
+       ClassDef( AliVZEROTriggerSimulator, 3 )  
+
+};
+
+
+#endif // ALIVZEROTRIGGERSIMULATOR_H
+
+