<commit_before>/**************************************************************************
 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
 *                                                                        *
 * Author: The ALICE Off-line Project.                                    *
 * Contributors are mentioned in the code where appropriate.              *
 *                                                                        *
 * Permission to use, copy, modify and distribute this software and its   *
 * documentation strictly for non-commercial purposes is hereby granted   *
 * without fee, provided that the above copyright notice appears in all   *
 * copies and that both the copyright notice and this permission notice   *
 * appear in the supporting documentation. The authors make no claims     *
 * about the suitability of this software for any purpose. It is          *
 * provided "as is" without express or implied warranty.                  *
 **************************************************************************/

/*
  Checks the quality assurance. 
  By comparing with reference data

  Based on PHOS code written by
  <NAME> CERN July 2007

 For the moment we only implement the checking of raw data QA.
 The checked for ESD and RecPoints will be implemented later.
 

 */


// --- ROOT system ---
#include <TClass.h>
#include <TH1.h> 
#include <TF1.h> 
#include <TH1I.h> 
#include <TH2F.h>
#include <TIterator.h> 
#include <TKey.h> 
#include <TFile.h> 
#include <TLine.h>
#include <TText.h>
#include <TPaveText.h>
#include <TMath.h>

// --- Standard library ---

// --- AliRoot header files ---
#include "AliLog.h"
#include "AliQAv1.h"
#include "AliQAChecker.h"
#include "AliEMCALQAChecker.h"

ClassImp(AliEMCALQAChecker)

//__________________________________________________________________
AliEMCALQAChecker::AliEMCALQAChecker() : 
AliQACheckerBase("EMCAL","EMCAL Quality Assurance Data Maker"),
fTextSM(new TText*[fknSM]),
fLineCol(new TLine(47.5,-0.5,47.5,119.5)),
fText(new TPaveText(0.2,0.7,0.8,0.9,"NDC"))
{
  // ctor
  fLineCol->SetLineColor(1);
  fLineCol->SetLineWidth(2);

  fTextSM[0]= new TText(20, 12, "SM A0");
  fTextSM[1]= new TText(20, 36, "SM A1");
  fTextSM[2]= new TText(20, 60, "SM A2");
  fTextSM[3]= new TText(20, 84, "SM A3");
  fTextSM[4]= new TText(20, 108,"SM A4");

  fTextSM[5]= new TText(64, 12, "SM C0");
  fTextSM[6]= new TText(64, 36, "SM C1");
  fTextSM[7]= new TText(64, 60, "SM C2");
  fTextSM[8]= new TText(64, 84, "SM C3");
  fTextSM[9]= new TText(64, 108,"SM C4");

	for(int i = 0; i < 4; i++) {
		fLineRow[i] = new TLine(-0.5,23.5+(24*i),95.5,23.5+(24*i));
		fLineRow[i]->SetLineColor(1);
		fLineRow[i]->SetLineWidth(2);
	}


}          

//__________________________________________________________________
AliEMCALQAChecker::~AliEMCALQAChecker() 
{
	/// dtor
  delete [] fTextSM ;
  delete fLineCol ;
  delete []fLineRow ;
  delete fText  ; <commit_msg>Fix for Coverity 16288: BAD_FREE<commit_after>/**************************************************************************
 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
 *                                                                        *
 * Author: The ALICE Off-line Project.                                    *
 * Contributors are mentioned in the code where appropriate.              *
 *                                                                        *
 * Permission to use, copy, modify and distribute this software and its   *
 * documentation strictly for non-commercial purposes is hereby granted   *
 * without fee, provided that the above copyright notice appears in all   *
 * copies and that both the copyright notice and this permission notice   *
 * appear in the supporting documentation. The authors make no claims     *
 * about the suitability of this software for any purpose. It is          *
 * provided "as is" without express or implied warranty.                  *
 **************************************************************************/

/*
  Checks the quality assurance. 
  By comparing with reference data

  Based on PHOS code written by
  <NAME> CERN July 2007

 For the moment we only implement the checking of raw data QA.
 The checked for ESD and RecPoints will be implemented later.
 

 */


// --- ROOT system ---
#include <TClass.h>
#include <TH1.h> 
#include <TF1.h> 
#include <TH1I.h> 
#include <TH2F.h>
#include <TIterator.h> 
#include <TKey.h> 
#include <TFile.h> 
#include <TLine.h>
#include <TText.h>
#include <TPaveText.h>
#include <TMath.h>

// --- Standard library ---

// --- AliRoot header files ---
#include "AliLog.h"
#include "AliQAv1.h"
#include "AliQAChecker.h"
#include "AliEMCALQAChecker.h"

ClassImp(AliEMCALQAChecker)

//__________________________________________________________________
AliEMCALQAChecker::AliEMCALQAChecker() : 
AliQACheckerBase("EMCAL","EMCAL Quality Assurance Data Maker"),
fTextSM(new TText*[fknSM]),
fLineCol(new TLine(47.5,-0.5,47.5,119.5)),
fText(new TPaveText(0.2,0.7,0.8,0.9,"NDC"))
{
  // ctor
  fLineCol->SetLineColor(1);
  fLineCol->SetLineWidth(2);

  fTextSM[0]= new TText(20, 12, "SM A0");
  fTextSM[1]= new TText(20, 36, "SM A1");
  fTextSM[2]= new TText(20, 60, "SM A2");
  fTextSM[3]= new TText(20, 84, "SM A3");
  fTextSM[4]= new TText(20, 108,"SM A4");

  fTextSM[5]= new TText(64, 12, "SM C0");
  fTextSM[6]= new TText(64, 36, "SM C1");
  fTextSM[7]= new TText(64, 60, "SM C2");
  fTextSM[8]= new TText(64, 84, "SM C3");
  fTextSM[9]= new TText(64, 108,"SM C4");

	for(int i = 0; i < 4; i++) {
		fLineRow[i] = new TLine(-0.5,23.5+(24*i),95.5,23.5+(24*i));
		fLineRow[i]->SetLineColor(1);
		fLineRow[i]->SetLineWidth(2);
	}


}          

//__________________________________________________________________
AliEMCALQAChecker::~AliEMCALQAChecker() 
{
	/// dtor
  delete [] fTextSM ;
  delete fLineCol ;
  for (Int_t i=0; i<4; ++i) delete fLineRow[i] ;
  delete fText  ; 
{'fraction_non_alphanumeric': 0.1761458681833389, 'fraction_numerical': 0.041318166610906655, 'mean_word_length': 3.0235531628532972, 'pattern_counts': {'":': 0, '<': 32, '<?xml version=': 0, '>': 37, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 14, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6171233', 'n_tokens_mistral': 2106, 'n_tokens_neox': 1919, 'n_words': 545}