<commit_before>#include <stdlib.h>

#include "ACorsikaIACTRunHeader.h"

ClassImp(ACorsikaIACTRunHeader)

ACorsikaIACTRunHeader::ACorsikaIACTRunHeader(Float_t* runHeader)
{
  memcpy(fRunHeader, runHeader, sizeof(Float_t)*273);
}

//_____________________________________________________________________________
ACorsikaIACTRunHeader::~ACorsikaIACTRunHeader()
{
}

//_____________________________________________________________________________
TDatime ACorsikaIACTRunHeader::GetDateOfBeginRun() const
{
  Int_t yymmdd = (Int_t)fRunHeader[2];
  Int_t year  = yymmdd/10000; // Y2K problem may be happened.
  Int_t month = (yymmdd - year*10000)/100;
  Int_t day   = yymmdd - year*10000 - month*100;

  return TDatime(year, month, day, 0, 0, 0);
}

//_____________________________________________________________________________
Float_t ACorsikaIACTRunHeader::GetHeightOfLevel(Int_t i) const
{
  if(1 <= i and i<= 10){
    return fRunHeader[4 + i];
  } else {
    return atof("NaN");
  } // if
}

//_____________________________________________________________________________
Float_t ACorsikaIACTRunHeader::GetC(Int_t i) const
{<commit_msg>Fix a Y2K problem in ACorsikaIACTRunHeader::GetDateOfBeginRun.<commit_after>#include <stdlib.h>

#include "ACorsikaIACTRunHeader.h"

ClassImp(ACorsikaIACTRunHeader)

ACorsikaIACTRunHeader::ACorsikaIACTRunHeader(Float_t* runHeader)
{
  memcpy(fRunHeader, runHeader, sizeof(Float_t)*273);
}

//_____________________________________________________________________________
ACorsikaIACTRunHeader::~ACorsikaIACTRunHeader()
{
}

//_____________________________________________________________________________
TDatime ACorsikaIACTRunHeader::GetDateOfBeginRun() const
{
  Int_t yymmdd = (Int_t)fRunHeader[2];
  Int_t year  = yymmdd/10000;
  Int_t month = (yymmdd - year*10000)/100;
  Int_t day   = yymmdd - year*10000 - month*100;

  if(year >= 95) {
    year += 1900;
  } else {
    year += 2000;
  } // if

  return TDatime(year, month, day, 0, 0, 0);
}

//_____________________________________________________________________________
Float_t ACorsikaIACTRunHeader::GetHeightOfLevel(Int_t i) const
{
  if(1 <= i and i<= 10){
    return fRunHeader[4 + i];
  } else {
    return atof("NaN");
  } // if
}

//_____________________________________________________________________________
Float_t ACorsikaIACTRunHeader::GetC(Int_t i) const
{
{'fraction_non_alphanumeric': 0.10321489001692047, 'fraction_numerical': 0.032148900169204735, 'mean_word_length': 6.413793103448276, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 6, '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': '3925381', 'n_tokens_mistral': 795, 'n_tokens_neox': 735, 'n_words': 130}