Type mismatches fixed - between DCS and Preprocessor - between Digit and TriggerSimulator
authorcheynis <cheynis@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 18 Nov 2009 18:13:38 +0000 (18:13 +0000)
committercheynis <cheynis@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 18 Nov 2009 18:13:38 +0000 (18:13 +0000)
VZERO/AliVZEROCalibData.cxx
VZERO/AliVZEROCalibData.h
VZERO/AliVZEROTriggerData.cxx
VZERO/AliVZEROTriggerData.h
VZERO/AliVZEROTriggerSimulator.cxx
VZERO/AliVZEROTriggerSimulator.h
VZERO/VZEROTestPreprocessor.C

index b8f7427..51b4222 100644 (file)
@@ -166,10 +166,10 @@ void AliVZEROCalibData::FillDCSData(AliVZERODataDCS * data){
        
        while ((  aliasName = (TObjString*) iter.Next() ))  {
                AliDCSValue* aValue = (AliDCSValue*) params->GetValue(aliasName);
-               Float_t val;
+               Int_t val;
                if(aValue) {
-                       val = aValue->GetFloat();
-                       AliInfo(Form("%s : %f",aliasName->String().Data(), val));
+                       val = aValue->GetInt();
+                       AliInfo(Form("%s : %d",aliasName->String().Data(), val));
                        SetParameter(aliasName->String(),val);
                }
        }       
@@ -180,7 +180,7 @@ void AliVZEROCalibData::FillDCSData(AliVZERODataDCS * data){
 
 }
 //_____________________________________________________________________________
-void AliVZEROCalibData::SetParameter(TString name, Float_t val){
+void AliVZEROCalibData::SetParameter(TString name, Int_t val){
        // Set given parameter
        
        Int_t iBoard = -1;
index 7d577a1..0663eeb 100644 (file)
@@ -77,7 +77,7 @@ class AliVZEROCalibData: public TNamed {
   void     SetTimeGain(Float_t val, Int_t channel) {fTimeGain[channel]=val;}
   void     SetTimeGain(Float_t* TimeGain);
   
-  void            SetParameter(TString name, Float_t val);
+  void            SetParameter(TString name, Int_t val);
   void     SetTimeResolution(UShort_t *resols);
   void     SetTimeResolution(UShort_t resol, Int_t board);
   void     SetWidthResolution(UShort_t *resols);
index d48d616..c87c2c8 100644 (file)
@@ -115,17 +115,17 @@ void AliVZEROTriggerData::FillData(AliVZERODataFEE * data){
        \r
        while ((  aliasName = (TObjString*) iter.Next() ))  {\r
                AliDCSValue* aValue = (AliDCSValue*) params->GetValue(aliasName);\r
-               Float_t val;\r
+               Int_t val;\r
                if(aValue) {\r
-                       val = aValue->GetFloat();\r
-                       AliInfo(Form("%s : %f",aliasName->String().Data(), val));\r
+                       val = aValue->GetInt();\r
+                       AliInfo(Form("%s : %d",aliasName->String().Data(), val));\r
                        SetParameter(aliasName->String(),val);\r
                }\r
        }       \r
 }\r
 \r
 //_____________________________________________________________________________\r
-void AliVZEROTriggerData::SetParameter(TString name, Float_t val){\r
+void AliVZEROTriggerData::SetParameter(TString name, Int_t val){\r
        // Set given parameter\r
        \r
        Int_t iBoard = -1;\r
@@ -167,7 +167,7 @@ void AliVZEROTriggerData::SetParameter(TString name, Float_t val){
        else if(name.Contains("MultV0AThrHigh")) SetMultV0AThrHigh((UShort_t) val);\r
        else if(name.Contains("MultV0CThrLow")) SetMultV0CThrLow((UShort_t) val);\r
        else if(name.Contains("MultV0CThrHigh")) SetMultV0CThrHigh((UShort_t) val);\r
-       else if(name.Contains("TriggerSelect")) SetTriggerSelected((UShort_t) val, iBoard );\r
+       else if(name.Contains("TriggerSelect")) SetTriggerSelected((UShort_t) val, iChannel-1 );\r
        else if(name.Contains("EnableCharge")) SetEnableCharge((Bool_t) val, iBoard , iChannel-1);\r
        else if(name.Contains("EnableTiming")) SetEnableTiming((Bool_t) val, iBoard , iChannel-1);\r
        else if(name.Contains("DiscriThr")) SetDiscriThr((UShort_t) val, iBoard, iChannel-1);\r
index 232f258..0f49a0c 100644 (file)
@@ -212,7 +212,7 @@ private:
        Bool_t fIsProcessed; // bool to know processing status\r
        \r
        Bool_t  IsClkValid(UShort_t clock) const;\r
-       void SetParameter(TString name, Float_t val);\r
+       void SetParameter(TString name, Int_t val);\r
        \r
        \r
        ClassDef( AliVZEROTriggerData, 2 )  \r
index 015ea5b..878727f 100644 (file)
@@ -44,7 +44,7 @@ TObject(),fTriggerData(NULL),fDigitsTree(digitsTree),fDigits(digits),fTriggerWor
        \r
        for(int i=0;i<64;i++) {\r
                fBBFlags[i] = fBGFlags[i] = kFALSE;\r
-               fCharges[i] = 0;\r
+               fCharges[i] = 0.;\r
        }\r
        GenerateBBWindows();\r
        GenerateBGWindows();\r
@@ -159,17 +159,17 @@ void AliVZEROTriggerSimulator::Run() {
                        if(fTriggerData->GetEnableCharge(board,channel)) {\r
                                fCharges[pmNumber] = digit->ADC();\r
                                if(fTriggerData->GetPedestalSubtraction(board)) {\r
-                                       if(fCharges[pmNumber]>=fTriggerData->GetPedestalCut(integrator,board,channel)){ \r
-                                               fCharges[pmNumber] -= fTriggerData->GetPedestal(integrator,board,channel);\r
+                                       if(fCharges[pmNumber]>=(Float_t) fTriggerData->GetPedestalCut(integrator,board,channel)){ \r
+                                               fCharges[pmNumber] -= (Float_t) fTriggerData->GetPedestal(integrator,board,channel);\r
                                        } else {\r
-                                               fCharges[pmNumber] = 0;\r
+                                               fCharges[pmNumber] = 0.;\r
                                        }\r
                                }\r
                        } else {\r
-                               fCharges[pmNumber] = 0;\r
+                               fCharges[pmNumber] = 0.;\r
                        }\r
                        \r
-                       Float_t time = (Float_t)digit->Time() / 10.; // digit->Time() in bin of 100 picoseconds. Divide by 10 to have it in nanoseconds\r
+                       Float_t time = digit->Time(); \r
                        time += fTriggerData->GetDelayHit(board,channel);\r
                        \r
                        //AliInfo(Form(" PM nb : %d ; ADC= %d ; TDC= %f  Enable Time %d charge %d",pmNumber,digit->ADC(),time,fTriggerData->GetEnableTiming(board,channel),fTriggerData->GetEnableCharge(board,channel)));\r
@@ -183,8 +183,8 @@ void AliVZEROTriggerSimulator::Run() {
        Int_t nBBflagsV0C = 0;\r
        Int_t nBGflagsV0A = 0;\r
        Int_t nBGflagsV0C = 0;\r
-       Int_t chargeV0A   = 0;\r
-       Int_t chargeV0C   = 0;\r
+       Float_t chargeV0A   = 0.;\r
+       Float_t chargeV0C   = 0.;\r
 \r
        for(int i=0;i<64;i++) {\r
                if(i<32) {\r
index 714b85d..722b212 100644 (file)
@@ -89,11 +89,11 @@ private:
        \r
        Bool_t fBBFlags[64]; // Individual BB Flags\r
        Bool_t fBGFlags[64]; // Individual BG Flags\r
-       Int_t  fCharges[64]; // Individual Charge\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, 1 )  \r
+       ClassDef( AliVZEROTriggerSimulator, 2 )  \r
 \r
 };\r
 \r
index 2cb4bbf..64842a6 100644 (file)
@@ -159,14 +159,17 @@ TMap* CreateDCSAliasMap()
 
                int timeStamp=10;
                
-               AliDCSValue* dcsVal = new AliDCSValue((Float_t) (val), timeStamp);
-               valueSet->Add(dcsVal);
                
                if(aliasName.Contains("HV")) {
                        for(int i=0;i<10;i++){
                                dcsVal = new AliDCSValue((Float_t) (val+random.Gaus(0,10)), timeStamp+10*i);
                                valueSet->Add(dcsVal);
                        }
+               } else {
+                       for(int i=0;i<2;i++){
+                               AliDCSValue* dcsVal = new AliDCSValue((Int_t) (val), timeStamp+10*i);
+                               valueSet->Add(dcsVal);
+                       }
                }
                
                aliasMap->Add(new TObjString(aliasName), valueSet);