<commit_before>////////////////////////////////////////////////////////////////////////////////
// 
// Macro to launch Monitoring program for TPC raw data
// 
// Author: <NAME>, IKF, Frankfurt
//
////////////////////////////////////////////////////////////////////////////////

#include "iostream"

#include "TGFrame.h"
#include "TGButton.h"
#include "TGTextEntry.h"
#include "TGLabel.h"
#include "TGFileDialog.h"
#include "TGClient.h"
#include "TGApplication.h"
#include "TSystem.h"
#include "TStyle.h"
#include "TDirectory.h"
#include "TFileMerger.h"
#include "TGComboBox.h"

#include "AliTPCMonitor.h"
#include "AliTPCMonitorMappingHandler.h"
//#include "AliTPCMonitorEditor.h"
#include "AliTPCMonitorDialog.h"

using namespace std;


static    AliTPCMonitor*               fMon               = 0;
static    AliTPCMonitorMappingHandler* fMapHand           = 0;

static    TGMainFrame*                 fFrameMain         = 0;
static    TGCheckButton*               fFrameChDisFit     = 0;
static    TGCheckButton*               fFrameCh10bit      = 0;
static    TGCheckButton*               fFrameCheckVerb    = 0;
static    TGCheckButton*               fFrameCheckProcOne = 0;
static    TGCheckButton*               fFrameCheckPed     = 0;
static    TGCheckButton*               fFrameCalcBSL      = 0;           

static    TGComboBox*                  fTableField        = 0;

static    Int_t                        fVerb              = 0;
static    TGTextEntry*                 fTextEvId          = 0;

void      WriteChannel();
void      WriteHistos();  
void      SetConfig();
void      DisableFit();
//void      ProcessSector(char* fdata,char* ffil, Int_t side, Int_t sector);
void      ProcessSector(Int_t sid, Int_t sector);
//Int_t     DrawFit();
Int_t     DrawRMSMap();
void      ShowSelected();
//void      SetSize() ;
void      ResizeCanv();
void      ReadMe();
void      OpenDir();
void      SetWrite10Bit();
void      SetCheckVerb();
void      SetProcOne();
void      SetPedestalRun(Int_t val);
void      InitDialog(Int_t id);
//void      Resize(Int_t update,Int_t doit , Int_t side);
void      MonitorGui(AliTPCMonitor* fMon);
void      SetStyle();
 

//_________________________________________________________________________
void TPCMonitor()
{
  // Initialize the monitor 
  SetStyle();
  
  TString aliceroot=gSystem->Getenv("ALICE_ROOT");
  TString dateroot=gSystem->Getenv("DATE_ROOT");
  
  cout << " ALICE_ROOT : " << aliceroot.Data() << endl;
  cout << " DATE_ROOT  : " << dateroot.Data()  << endl;
  
  // MappingHandler
  TString fglobalmap=Form("%s/TPC/mapping/MappingGlobal.txt", aliceroot.Data());
  TString frowmap=Form("%s/TPC/mapping/MappingRow.txt",    aliceroot.Data());
  TString ffecmap=Form("%s/TPC/mapping/MappingCards.txt",  aliceroot.Data());
  TString fnameconf=Form("%s/TPC/TPCmon/AliTPCMonitorConfig.txt",   aliceroot.Data());
  fMapHand = new AliTPCMonitorMappingHandler("maphand","maphand");
  fMapHand->ReadMapping(fglobalmap.Data());<commit_msg>Fix path to config file<commit_after>////////////////////////////////////////////////////////////////////////////////
// 
// Macro to launch Monitoring program for TPC raw data
// 
// Author: <NAME>, IKF, Frankfurt
//
////////////////////////////////////////////////////////////////////////////////

#include "iostream"

#include "TGFrame.h"
#include "TGButton.h"
#include "TGTextEntry.h"
#include "TGLabel.h"
#include "TGFileDialog.h"
#include "TGClient.h"
#include "TGApplication.h"
#include "TSystem.h"
#include "TStyle.h"
#include "TDirectory.h"
#include "TFileMerger.h"
#include "TGComboBox.h"

#include "AliTPCMonitor.h"
#include "AliTPCMonitorMappingHandler.h"
//#include "AliTPCMonitorEditor.h"
#include "AliTPCMonitorDialog.h"

using namespace std;


static    AliTPCMonitor*               fMon               = 0;
static    AliTPCMonitorMappingHandler* fMapHand           = 0;

static    TGMainFrame*                 fFrameMain         = 0;
static    TGCheckButton*               fFrameChDisFit     = 0;
static    TGCheckButton*               fFrameCh10bit      = 0;
static    TGCheckButton*               fFrameCheckVerb    = 0;
static    TGCheckButton*               fFrameCheckProcOne = 0;
static    TGCheckButton*               fFrameCheckPed     = 0;
static    TGCheckButton*               fFrameCalcBSL      = 0;           

static    TGComboBox*                  fTableField        = 0;

static    Int_t                        fVerb              = 0;
static    TGTextEntry*                 fTextEvId          = 0;

void      WriteChannel();
void      WriteHistos();  
void      SetConfig();
void      DisableFit();
//void      ProcessSector(char* fdata,char* ffil, Int_t side, Int_t sector);
void      ProcessSector(Int_t sid, Int_t sector);
//Int_t     DrawFit();
Int_t     DrawRMSMap();
void      ShowSelected();
//void      SetSize() ;
void      ResizeCanv();
void      ReadMe();
void      OpenDir();
void      SetWrite10Bit();
void      SetCheckVerb();
void      SetProcOne();
void      SetPedestalRun(Int_t val);
void      InitDialog(Int_t id);
//void      Resize(Int_t update,Int_t doit , Int_t side);
void      MonitorGui(AliTPCMonitor* fMon);
void      SetStyle();
 

//_________________________________________________________________________
void TPCMonitor()
{
  // Initialize the monitor 
  SetStyle();
  
  TString aliceroot=gSystem->Getenv("ALICE_ROOT");
  TString dateroot=gSystem->Getenv("DATE_ROOT");
  
  cout << " ALICE_ROOT : " << aliceroot.Data() << endl;
  cout << " DATE_ROOT  : " << dateroot.Data()  << endl;
  
  // MappingHandler
  TString fglobalmap=Form("%s/TPC/mapping/MappingGlobal.txt", aliceroot.Data());
  TString frowmap=Form("%s/TPC/mapping/MappingRow.txt",    aliceroot.Data());
  TString ffecmap=Form("%s/TPC/mapping/MappingCards.txt",  aliceroot.Data());
  TString fnameconf=Form("%s/TPC/TPCmon/macros/AliTPCMonitorConfig.txt",   aliceroot.Data());
  fMapHand = new AliTPCMonitorMappingHandler("maphand","maphand");
  fMapHand->ReadMapping(fglobalmap.Data());
{'fraction_non_alphanumeric': 0.16458645365285404, 'fraction_numerical': 0.005325345315360293, 'mean_word_length': 2.259219088937093, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2620930', 'n_tokens_mistral': 1910, 'n_tokens_neox': 1825, 'n_words': 387}