Updates in SDD preprocessor: new infos from DA, HLT mode no longer needed (F. Prino)
authorprino <prino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 30 Jun 2009 17:09:47 +0000 (17:09 +0000)
committerprino <prino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 30 Jun 2009 17:09:47 +0000 (17:09 +0000)
ITS/AliITSPreprocessorSDD.cxx
ITS/AliITSPreprocessorSDD.h
ITS/TestPreprocessorSDD.C

index 9ca2824..a287304 100644 (file)
@@ -79,8 +79,6 @@ UInt_t AliITSPreprocessorSDD::Process(TMap* dcsAliasMap){
   }else if(runType== "INJECTOR"){
     Log("Process FXS files from INJECTOR RUN");
     retcode=ProcessInjector(ddlmap);
-  }else if(runType== "PHYSICS"){
-    retcode=ProcessPhysics();
   }
   if(retcode!=0) return retcode;
 
@@ -91,25 +89,6 @@ UInt_t AliITSPreprocessorSDD::Process(TMap* dcsAliasMap){
 
 }
 //______________________________________________________________________
-UInt_t AliITSPreprocessorSDD::ProcessPhysics(){
-  // Get the HLT status for the PHYSICS run 
-  // needeed to define the raw data format  
-
-  AliITSHLTforSDD *hltSDD=new AliITSHLTforSDD();
-  TString hltMode = GetRunParameter("HLTmode");
-  TSubString firstChar = hltMode(0,1);
-  if (firstChar == "C") hltSDD->SetHLTmodeC(kTRUE);
-  else hltSDD->SetHLTmodeC(kFALSE);
-
-  AliCDBMetaData *md= new AliCDBMetaData();
-  md->SetResponsible("Francesco Prino");
-  md->SetBeamPeriod(0);
-  md->SetComment("HLT mode C flag for PHYSICS run");
-  Bool_t retCode = Store("Calib","HLTforSDD",hltSDD,md);
-  if(retCode) return 0;
-  else return 1;
-}
-//______________________________________________________________________
 UInt_t AliITSPreprocessorSDD::ProcessPulser(AliITSDDLModuleMapSDD* ddlmap){
   // Process FXS files from PULSER run (baseline, noise, gain)
   // returns 0 in case of success, 
@@ -143,6 +122,16 @@ UInt_t AliITSPreprocessorSDD::ProcessPulser(AliITSDDLModuleMapSDD* ddlmap){
     ind++;
   }
   delete sourceList;
+  // Read ADC sampling frequency from fee.conf
+  Int_t amSamplFreq=40;
+  FILE* feefil=fopen("fee.conf","r");
+  if(feefil){
+    fscanf(feefil,"%d \n",&amSamplFreq);
+    fclose(feefil);
+    Log(Form("AM sampling frequency = %d MHz",amSamplFreq));
+  }else{
+    Log("File fee.conf not found. AM sampling set at 40 MHz by default");
+  }
   
   for(Int_t iddl=0;iddl<kNumberOfDDL;iddl++){
     for(Int_t imod=0;imod<kModulesPerDDL;imod++){
@@ -150,7 +139,7 @@ UInt_t AliITSPreprocessorSDD::ProcessPulser(AliITSDDLModuleMapSDD* ddlmap){
       if(modID==-1) continue;
       modID-=240; // to have SDD modules numbering from 0 to 260
       AliITSCalibrationSDD *cal = new AliITSCalibrationSDD("simulated");
-      cal->SetAMAt20MHz();            // for runs > 51275 with clock at 20 MHz
+      if(amSamplFreq!=40) cal->SetAMAt20MHz();
       numOfBadChannels[modID]=0;
       Int_t badch[kNumberOfChannels];
       for(Int_t isid=0;isid<=1;isid++){
index e9dfe31..b87184d 100644 (file)
@@ -36,7 +36,6 @@ class AliITSPreprocessorSDD : public AliPreprocessor {
 
   
   virtual UInt_t Process(TMap* dcsAliasMap);
-  UInt_t ProcessPhysics();
   UInt_t ProcessPulser(AliITSDDLModuleMapSDD* ddlmap);
   UInt_t ProcessInjector(AliITSDDLModuleMapSDD* ddlmap);
   Bool_t ProcessDCSDataPoints(TMap* dcsAliasMap);
index 6136297..8778ec5 100644 (file)
@@ -24,16 +24,23 @@ void TestPreprocessorSDD(Char_t *optRunType="PULSER"){
   shuttle->SetDCSInput(dcsAliasMap);
 
   // DA input files
+  gSystem->Exec("rm -v OCDB/ITS/DCS/DataSDD/Run*.root");
   if(optRunType=="PULSER"){
     shuttle->AddInputFile(AliShuttleInterface::kDAQ, "SDD","SDD_Calib","LDC1","SDDbase_LDC1.tar");
     shuttle->AddInputFile(AliShuttleInterface::kDAQ, "SDD","SDD_Calib","LDC2","SDDbase_LDC2.tar");
     shuttle->AddInputFile(AliShuttleInterface::kDAQ, "SDD","SDD_Calib","LDC3","SDDbase_LDC3.tar");
     shuttle->AddInputFile(AliShuttleInterface::kDAQ, "SDD","SDD_Calib","LDC4","SDDbase_LDC4.tar");
+    shuttle->AddInputFile(AliShuttleInterface::kDAQ, "SDD","SDD_Calib","LDC5","SDDbase_LDC5.tar");
+    shuttle->AddInputFile(AliShuttleInterface::kDAQ, "SDD","SDD_Calib","LDC6","SDDbase_LDC6.tar");
+    gSystem->Exec("rm -v OCDB/ITS/Calib/CalibSDD/Run*.root");
   }else if(optRunType=="INJECTOR"){ 
     shuttle->AddInputFile(AliShuttleInterface::kDAQ, "SDD","SDD_Injec","LDC1","SDDinj_LDC1.tar");
     shuttle->AddInputFile(AliShuttleInterface::kDAQ, "SDD","SDD_Injec","LDC2","SDDinj_LDC2.tar");
     shuttle->AddInputFile(AliShuttleInterface::kDAQ, "SDD","SDD_Injec","LDC3","SDDinj_LDC3.tar");
     shuttle->AddInputFile(AliShuttleInterface::kDAQ, "SDD","SDD_Injec","LDC4","SDDinj_LDC4.tar");
+    shuttle->AddInputFile(AliShuttleInterface::kDAQ, "SDD","SDD_Injec","LDC5","SDDinj_LDC5.tar");
+    shuttle->AddInputFile(AliShuttleInterface::kDAQ, "SDD","SDD_Injec","LDC6","SDDinj_LDC6.tar");
+    gSystem->Exec("rm -v OCDB/ITS/Calib/DriftSpeedSDD/Run*.root");
   }
 
   shuttle->SetInputRunType(optRunType);
@@ -57,15 +64,16 @@ void TestPreprocessorSDD(Char_t *optRunType="PULSER"){
   Char_t theDir[100];
   Bool_t doCheck=kFALSE;
   if(optRunType=="PULSER"){
+    gSystem->Exec("rm SDDbase_ddl*.data");
+    gSystem->Exec("rm fee.conf");
     sprintf(theDir,"ITS/Calib/CalibSDD");
     doCheck=kTRUE;
   }else if(optRunType=="INJECTOR"){ 
+    gSystem->Exec("rm SDDinj_ddl*.data");
     sprintf(theDir,"ITS/Calib/DriftSpeedSDD");
     doCheck=kTRUE;
-  }else if(optRunType=="PHYSICS"){
-    sprintf(theDir,"ITS/Calib/HLTforSDD");
-    doCheck=kTRUE;
   } 
+
   if(doCheck){
     AliCDBEntry* chkEntry = AliCDBManager::Instance()->GetStorage(AliShuttleInterface::GetMainCDB())->Get(theDir, 7);
     if (!chkEntry){