Skip to content

Commit

Permalink
Add test cases to profile histograms
Browse files Browse the repository at this point in the history
  • Loading branch information
JavierCVilla committed Aug 22, 2018
1 parent 211464b commit acd0906
Show file tree
Hide file tree
Showing 16 changed files with 4,755 additions and 0 deletions.
79 changes: 79 additions & 0 deletions cplusplus/profiling/common.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
#ifndef _common_h_
#define _common_h_

int rcIncompatibleDiagonal = 123;

//----------------------------------------------------------------------------------------------------

void Init(const std::string &dgnStr)
{
// ---------- apply standard settings ----------

Init_base();

diagonal = dUnknown;

if (dgnStr.compare("45b_56t") == 0)
{
Init_45b_56t();
diagonal = d45b_56t;
th_y_sign = +1.;
}

if (dgnStr.compare("45t_56b") == 0)
{
Init_45t_56b();
diagonal = d45t_56b;
th_y_sign = -1.;
}

if (dgnStr.compare("combined") == 0)
{
diagonal = dCombined;
}

if (dgnStr.compare("45b_56b") == 0)
{
diagonal = ad45b_56b;

Init_45t_56b();
th_y_sign = -1.;
}

if (dgnStr.compare("45t_56t") == 0)
{
diagonal = ad45t_56t;

Init_45b_56t();
th_y_sign = +1.;
}

if (diagonal == dUnknown)
{
printf("Init > unrecognised diagonal %s\n", dgnStr.c_str());
}

// ---------- apply additional settings, if any ----------

#ifdef USE_INIT_ADDITIONAL
printf(">> Applying Init_additional\n");
Init_additional();
#endif

// ---------- print important information ----------

printf(">> bunchMap\n");
// for (BunchMap::iterator rit = bunchMap.begin(); rit != bunchMap.end(); ++rit)
// {
// printf("\trun %u: ", rit->first);
// for (unsigned int i = 0; i < rit->second.size(); i++)
// {
// if (i > 0)
// printf(", ");
// printf("%u", rit->second[i]);
// }
// printf("\n");
// }
}

#endif
Loading

0 comments on commit acd0906

Please sign in to comment.