Skip to content

Commit

Permalink
Stop the gitinfo.hh header from recompiling all files every damn time.
Browse files Browse the repository at this point in the history
It's now included in the RunData source file, not the header. This avoids
the dependency cascade. Only dictionaries are regenerated every time.
  • Loading branch information
wdconinc committed Jun 24, 2016
1 parent 77f7656 commit 8619363
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
4 changes: 1 addition & 3 deletions include/remollRunData.hh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@

#include <vector>
#include <string>
#include "remolltypes.hh"

#include "gitinfo.hh"
#include "remolltypes.hh"
#include "remollTextFile.hh"

/*!
Expand Down Expand Up @@ -52,7 +51,6 @@ class remollRunData : public TObject {
unsigned int fSeed;
double fBeamE;
char fGenName[__RUNSTR_LEN];
char fGitInfo[__GITMAXINFO_SIZE];

char fHostName[__RUNSTR_LEN];
char fRunPath[__RUNSTR_LEN];
Expand Down
9 changes: 6 additions & 3 deletions src/remollRunData.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "remollRunData.hh"
#include "gitinfo.hh"

#include <string.h>
#include <errno.h>
Expand All @@ -11,7 +12,6 @@ remollRunData::remollRunData(){
fNthrown = -1;
fBeamE = -1e9;
fGenName[0] = '\0';
fGitInfo[0] = '\0';
fHostName[0] = '\0';
}

Expand All @@ -22,7 +22,6 @@ void remollRunData::Init(){
fNthrown = 0;
fBeamE = 0;
strcpy(fGenName, "default");
strcpy(fGitInfo, gGitInfoStr);
if(gethostname(fHostName,__RUNSTR_LEN) == -1){
fprintf(stderr, "%s line %d: ERROR could not get hostname\n", __PRETTY_FUNCTION__ , __LINE__ );
fprintf(stderr, "%s\n",strerror(errno));
Expand All @@ -34,7 +33,11 @@ void remollRunData::Init(){
}

void remollRunData::Print(){
printf("git repository info\n-------------------------------------------------\n%s-------------------------------------------------\n\n", fGitInfo);
char gitInfo[__GITMAXINFO_SIZE];
gitInfo[0] = '\0';
strcpy(gitInfo, gGitInfoStr);

printf("git repository info\n-------------------------------------------------\n%s-------------------------------------------------\n\n", gitInfo);
printf("Run at %s on %s\n", fRunTime.AsString("ls"), fHostName);
printf("Run Path %s\n", fRunPath);
printf("N generated = %ld\n", fNthrown);
Expand Down

0 comments on commit 8619363

Please sign in to comment.