+
+ if(exactive==0 && emptydiff==0 && exactivedriftregion==0 && emptydrdiff==0){
+ AliInfo(Form("All the active modules (%i) and single drift regions (%i) are in acquisition. The number of excluded modules are %i and the excluded single drift regions are %i\n",active,activedriftregion,excluded,excludeddriftregion));
+ results1.Form("OK.");
+ results2.Form(" All active modules have recpoints");
+ color=3;
+ sddQACheckerValue=fHighSDDValue[AliQAv1::kINFO];
+ }
+ if(exactive!=0||exactivedriftregion!=0){
+ AliError(Form("%i modules and %i single drift regions excluded from the acquisition have recpoints. Active modules %i single drift region %i \n ",exactive,exactivedriftregion,active,activedriftregion));
+ AliError(Form("Layer 3: %i modules and %i single drift regions excluded from the acquisition have recpoints. Active modules %i single drift region %i \n ",exactivemoduleperlayer[0],exactivedrperlayer[0],activemoduleperlayer[0],activedrperlayer[0]));
+ AliError(Form("Layer 3: %i modules and %i single drift regions excluded from the acquisition have recpoints. Active modules %i single drift region %i \n ",exactivemoduleperlayer[1],exactivedrperlayer[1],activemoduleperlayer[1],activedrperlayer[1]));
+ results1.Form("%i modules and %i drift region excluded from the acquisition have recpoints",exactive,exactivedriftregion);
+ results2.Form("Follow the TWiki instructions and Call the SDD expert ");
+ color=2;
+ sddQACheckerValue=fHighSDDValue[AliQAv1::kERROR];
+ }
+ if(excluded==exactive||excludeddriftregion==exactivedriftregion){
+ AliError(Form("All the modules (%d) or single drift regions (%d) excluded from the acquisition have recpoints!\n Active modules %i \t Active drfift regions %i\n",excluded,excludeddriftregion,active,activedriftregion));
+ results1.Form("All the modules (%d) or drift regions (%d) excluded from the acquisition have recpoints!",excluded,excludeddriftregion );
+ results2.Form("Follow the TWiki instructions and Call the SDD expert ");
+ color=6;
+ sddQACheckerValue=fHighSDDValue[AliQAv1::kFATAL];
+ }
+ if(active==0||activedriftregion==0){
+ AliError(Form("No modules or single drift regions have recpoints: excluded %i \t excluded active %i \n\t\t excluded single drift regions %i \t excluded active drift regions %i \n", excluded, exactive, excludeddriftregion, exactivedriftregion));
+ results1.Form("No modules or drift region have recpoints: excluded modules %i excluded drift regions %i ", excluded, excludeddriftregion );
+ results2.Form("Follow the TWiki instructions and Call the SDD expert ");
+ color=6;
+ sddQACheckerValue=fHighSDDValue[AliQAv1::kFATAL];
+ }
+
+ TPaveText *pave[2];
+ next.Begin();
+
+ while( (hdata=dynamic_cast<TH1* >(next())) )
+ {
+ if (hdata){
+ TString hname=hdata->GetName();
+ if(hname.Contains("SDDModPatternL3RP") || hname.Contains("SDDModPatternL4RP")){
+ if(hname.Contains("NORM"))continue;
+ //AliInfo("========================================Found histo 11\n");
+ Int_t lay=0;
+ if(hname.Contains("3"))lay=0;
+ else if(hname.Contains("4"))lay=1;
+ pave[lay]=new TPaveText(0.3,0.88,0.9,0.99,"NDC");
+ pave[lay]->AddText(results1.Data());
+ pave[lay]->AddText(results2.Data());
+ pave[lay]->SetFillColor(color);
+ pave[lay]->SetBorderSize(1);
+ pave[lay]->SetLineWidth(1);
+ hdata->GetListOfFunctions()->Add(pave[lay]);
+ }
+ else
+ if(hname.Contains("SDDRecPointCheck"))
+ {
+
+ //AliInfo("========================================Found histo\n");
+ ((TH1F*)hdata)->SetBinContent(5,active);
+ ((TH1F*)hdata)->SetBinContent(6,filled);
+ ((TH1F*)hdata)->SetBinContent(7,activedriftregion);
+ ((TH1F*)hdata)->SetBinContent(8,filleddr);
+ ((TH1F*)hdata)->SetBinContent(9,excluded);
+ ((TH1F*)hdata)->SetBinContent(10,empty);
+ ((TH1F*)hdata)->SetBinContent(11,excludeddriftregion);
+ ((TH1F*)hdata)->SetBinContent(12,emptydr);
+ ((TH1F*)hdata)->SetBinContent(13,exactive);
+ ((TH1F*)hdata)->SetBinContent(14,emptydiff);
+ ((TH1F*)hdata)->SetBinContent(15,exactivedriftregion);
+ ((TH1F*)hdata)->SetBinContent(16,emptydr);
+
+ //layer 3
+ ((TH1F*)hdata)->SetBinContent(19,activemoduleperlayer[0]);
+ ((TH1F*)hdata)->SetBinContent(20,filledmodules[0]);
+ ((TH1F*)hdata)->SetBinContent(21,activedrperlayer[0]);
+ ((TH1F*)hdata)->SetBinContent(22,filleddriftregion[0]);
+ ((TH1F*)hdata)->SetBinContent(23,excludedmoduleperlayer[0]);
+ ((TH1F*)hdata)->SetBinContent(24,emptymodules[0]);
+ ((TH1F*)hdata)->SetBinContent(25,excludeddrperlayer[0]);
+ ((TH1F*)hdata)->SetBinContent(26,emptydriftregion[0]);
+ ((TH1F*)hdata)->SetBinContent(27,exactivemoduleperlayer[0]);
+ ((TH1F*)hdata)->SetBinContent(28,emptyactivemoduleperlayer[0]);
+ ((TH1F*)hdata)->SetBinContent(29,activedrperlayer[0]);
+ ((TH1F*)hdata)->SetBinContent(30,emptyactivedrperlayer[0]);
+
+ //layer 4
+ ((TH1F*)hdata)->SetBinContent(35,activemoduleperlayer[1]);
+ ((TH1F*)hdata)->SetBinContent(36,filledmodules[1]);
+ ((TH1F*)hdata)->SetBinContent(37,activedrperlayer[1]);
+ ((TH1F*)hdata)->SetBinContent(38,filleddriftregion[1]);
+ ((TH1F*)hdata)->SetBinContent(39,excludedmoduleperlayer[1]);
+ ((TH1F*)hdata)->SetBinContent(40,emptymodules[1]);
+ ((TH1F*)hdata)->SetBinContent(41,excludeddrperlayer[1]);
+ ((TH1F*)hdata)->SetBinContent(42,emptydriftregion[1]);
+ ((TH1F*)hdata)->SetBinContent(43,exactivemoduleperlayer[1]);
+ ((TH1F*)hdata)->SetBinContent(44,emptyactivemoduleperlayer[1]);
+ ((TH1F*)hdata)->SetBinContent(45,activedrperlayer[1]);
+ ((TH1F*)hdata)->SetBinContent(46,emptyactivedrperlayer[1]);
+
+ }
+ }//if hadata
+
+ }//end while
+
+ }//end else
+ delete hmodule;
+ hmodule=NULL;
+ for(Int_t i=0;i<2;i++) {
+ delete hlayer[i];
+ hlayer[i]=NULL;
+ }//end for
+
+
+ //sddQACheckerValue=1.;
+ }//end recpoint list uid = 20
+ if(uidrec==40)
+ {
+ //digitsr
+ if (list->GetEntries() == 0){
+ sddQACheckerValue=fHighSDDValue[AliQAv1::kFATAL];
+ break;
+ } else{
+
+ while( (hdata = dynamic_cast<TH1* >(next())) ){
+ if (hdata){
+ if(hdata->GetEntries()==0)sddQACheckerValue += fStepBitSDD[AliQAv1::kFATAL];
+ else {
+ TString hname=hdata->GetName();
+ if(hname.Contains("SDD DIGITS Module Pattern")) {
+ //see raws
+
+ sddQACheckerValue += fStepBitSDD[AliQAv1::kINFO];
+ } else if(hname.Contains("SDD Anode Distribution")) {
+ sddQACheckerValue += fStepBitSDD[AliQAv1::kINFO];
+ } else if(hname.Contains("SDD Tbin Distribution")) {
+ //to do as rp
+ sddQACheckerValue += fStepBitSDD[AliQAv1::kINFO];
+ } else if(hname.Contains("SDD ADC Counts Distribution")) {
+ sddQACheckerValue += fStepBitSDD[AliQAv1::kINFO];
+ }//end adc counts
+
+ }//end entries !=0
+ }//end hdata
+ }//end while
+ }//end else
+ sddQACheckerValue=1.;
+ }
+
+ }
+ break;
+ case AliQAv1::kANA:
+ {
+ AliInfo(Form("===================> No Check on %s\n",AliQAv1::GetAliTaskName(index)));
+ sddQACheckerValue=1.;
+ }
+ break;
+ case AliQAv1::kESD:
+ {
+ AliInfo(Form("==================> No Check on %s\n",AliQAv1::GetAliTaskName(index)));
+ sddQACheckerValue=1.;
+ }
+ break;
+ case AliQAv1::kNTASK:{
+ AliInfo(Form("==================> No Check on %s\n",AliQAv1::GetAliTaskName(index)));
+ sddQACheckerValue=1.;
+ }
+ break;
+ case AliQAv1::kSIM:{
+ AliInfo(Form("Check on %s\n",AliQAv1::GetAliTaskName(index)));
+ Int_t uid=list->GetUniqueID();
+ if(uid==60) {
+ //digits
+ if (list->GetEntries() == 0){
+ sddQACheckerValue=fHighSDDValue[AliQAv1::kFATAL];
+ break;
+ } else{
+
+ while( (hdata = dynamic_cast<TH1* >(next())) ){
+ if (hdata){
+ if(hdata->GetEntries()==0)sddQACheckerValue += fStepBitSDD[AliQAv1::kFATAL];
+ else {
+ TString hname=hdata->GetName();
+ if(hname.Contains("SDDDIGITSModulePattern")) {
+ //see raws
+
+ sddQACheckerValue += fStepBitSDD[AliQAv1::kINFO];
+ } else if(hname.Contains("SDDAnodeDistribution")) {
+ sddQACheckerValue += fStepBitSDD[AliQAv1::kINFO];
+ } else if(hname.Contains("SDDTbinDistribution")) {
+ //to do as rp
+ sddQACheckerValue += fStepBitSDD[AliQAv1::kINFO];
+ } else if(hname.Contains("SDDADCCountsDistribution")) {
+ sddQACheckerValue += fStepBitSDD[AliQAv1::kINFO];
+ }//end adc counts
+
+ }//end entries !=0
+ }//end hdata
+ }//end while
+ }//end else
+ } else if(uid==50)
+ {
+ //hits
+ if (list->GetEntries() == 0){
+ sddQACheckerValue=fHighSDDValue[AliQAv1::kFATAL];
+ break;
+ }
+ else{
+
+ while( (hdata = dynamic_cast<TH1* >(next())) ){
+ if (hdata){
+ if(hdata->GetEntries()==0)sddQACheckerValue += fStepBitSDD[AliQAv1::kFATAL];
+ else {
+ TString hname=hdata->GetName();
+ if(hname.Contains("SDDHITSModulePattern")) {
+ //to do as raws
+ sddQACheckerValue += fStepBitSDD[AliQAv1::kINFO];
+ } else if(hname.Contains("SDDHITlenghtalonglocalYCoord")) {
+ sddQACheckerValue += fStepBitSDD[AliQAv1::kINFO];
+ } else if(hname.Contains("SDDHITlenghtalonglocalYCoordZoom")) {
+ sddQACheckerValue += fStepBitSDD[AliQAv1::kINFO];
+ } else if(hname.Contains("SDDDepositedEnergyDistribution")) {
+ sddQACheckerValue += fStepBitSDD[AliQAv1::kINFO];
+ }//end deposited energy
+
+ }//end entries !=0
+ }//end hdata
+ }//end while
+ }//end else
+ } else if(uid==70)
+ {
+ //sdigits
+ if (list->GetEntries() == 0){
+ sddQACheckerValue=fHighSDDValue[AliQAv1::kFATAL];
+ break;
+ } else{
+
+ while( (hdata = dynamic_cast<TH1* >(next())) ){
+ if (hdata){
+ if(hdata->GetEntries()==0)sddQACheckerValue += fStepBitSDD[AliQAv1::kFATAL];
+ else {
+ TString hname=hdata->GetName();
+ if(hname.Contains("SDDSDIGITSModulePattern")) {
+ //to do as raws
+ sddQACheckerValue += fStepBitSDD[AliQAv1::kINFO];
+ } else if(hname.Contains("SDDAnodeDistribution")) {
+ sddQACheckerValue += fStepBitSDD[AliQAv1::kINFO];
+ } else if(hname.Contains("SDDTbinDistribution")) {
+ //to do as rp
+ sddQACheckerValue += fStepBitSDD[AliQAv1::kINFO];
+ } else if(hname.Contains("SDDADCCountsDistribution")) {
+ sddQACheckerValue += fStepBitSDD[AliQAv1::kINFO];
+ }//end adc counts bindistribution
+ }//end entries !=0
+ }//end hdata
+ }//end while
+ }//end else
+ }//end sdigits
+ sddQACheckerValue=1.;
+ }
+ break;
+
+ }//end switch
+
+ fCalibration=NULL;
+ if(hdata) delete hdata;
+
+
+ return sddQACheckerValue;